geojs 1.7.2 → 1.7.3

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
@@ -1,4 +1,4 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geo=t():e.geo=t()}(self,(function(){return function(){var e={7839:function(e){e.exports={momentum:"geo_action_momentum",pan:"geo_action_pan",rotate:"geo_action_rotate",select:"geo_action_select",unzoomselect:"geo_action_unzoomselect",zoom:"geo_action_zoom",zoomrotate:"geo_action_zoom_rotate",zoomselect:"geo_action_zoomselect",annotation_line:"geo_annotation_line",annotation_polygon:"geo_annotation_polygon",annotation_rectangle:"geo_annotation_rectangle",annotation_edit_handle:"geo_annotation_edit_handle"}},7800:function(e,t,n){var r=n(5638),i=n(5699),o=n(5108),a=n(7839),s=n(6853),l=n(4634),u=n(4647).registerAnnotation,c=n(4708),d=n(2557),f=n(4343),p=n(9757),h=0,m={create:"create",done:"done",highlight:"highlight",edit:"edit"},g="annotationAction",v={fill:!0,fillColor:function(e){return e.selected?{r:0,g:1,b:1}:{r:.3,g:.3,b:.3}},fillOpacity:function(e){return e.selected?.5:.25},radius:function(e){return"edge"===e.type||"rotate"===e.type?8:10},scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:function(e){return"edge"===e.type||"rotate"===e.type?2:3},rotateHandleOffset:24,rotateHandleRotation:-Math.PI/4,resizeHandleOffset:48,resizeHandleRotation:-Math.PI/4,handles:{vertex:!0,edge:!0,center:!0,rotate:!0,resize:!0}},y=function e(t,n){"use strict";if(!(this instanceof e))return new e(t,n);var i=this,u=r.extend({},{showLabel:!0},n||{}),c=u.annotationId;delete u.annotationId,void 0===c||u.layer&&u.layer.annotationById(c)?(h+=1,void 0!==c&&console.warn("Annotation id "+c+" is in use; using "+h+" instead."),c=h):c>h&&(h=c);var d=u.name||t.charAt(0).toUpperCase()+t.substr(1)+" "+c,f=u.label||null,y=u.description||void 0,b=t,x=u.layer,w=u.state||m.done;delete u.state,delete u.layer,delete u.name,delete u.label,delete u.description,this._exit=function(){},this.id=function(){return c},this.name=function(e){return void 0===e?d:(null!==e&&(""+e).trim()&&(e=(""+e).trim())!==d&&(d=e,i.modified()),i)},this.label=function(e,t){return void 0===e?null!==f||t?f:d:(e!==f&&(f=e,i.modified()),i)},this._labelPosition=function(){return l.centerFromPerimeter(i._coordinates())},this._rotateHandlePosition=function(e,t){var n,r,o,a=i.layer().map(),s=i._coordinates(),u=l.centerFromPerimeter(i._coordinates()),c=u?a.gcsToDisplay(u,null):void 0,d=0;if(u){for(e=e||0,t=t||0,n=0;n<s.length;n+=1)r=a.gcsToDisplay(s[n],null),d=Math.max(d,Math.pow(r.x-c.x,2)+Math.pow(r.y-c.y,2));return o=Math.sqrt(d)+e,r=a.displayToGcs({x:c.x+o*Math.cos(t),y:c.y-o*Math.sin(t)},null)}},this.labelRecord=function(){var e=i.options("showLabel");if(e){var t=i.state();if(!(!0===e&&t===m.create||!0!==e&&e.indexOf(t)<0)){var n=i.labelStyle(),r={text:i.label(),position:i._labelPosition()};if(r.position)return n&&(r.style=n),r}}},this.description=function(e){return void 0===e?y:(e!==y&&(y=e,i.modified()),i)},this.layer=function(e){return void 0===e?x:(x=e,i)},this.state=function(e){return void 0===e?w:(w!==e&&(w=e,i.layer()&&i.layer().geoTrigger(o.annotation.state,{annotation:i})),i)},this.actions=function(e){return e||(e=i.state()),e===m.edit?[{action:a.annotation_edit_handle,name:"annotation edit",owner:g,input:"left"},{action:a.annotation_edit_handle,name:"annotation edit",owner:g,input:"pan"}]:[]},this.processAction=function(e){},this.processEditAction=function(e){if(e&&i._editHandle&&i._editHandle.handle)switch(i._editHandle.handle.type){case"vertex":return i._processEditActionVertex(e);case"edge":return i._processEditActionEdge(e);case"center":return i._processEditActionCenter(e);case"rotate":return i._processEditActionRotate(e);case"resize":return i._processEditActionResize(e)}},this.selectEditHandle=function(e,t){t&&i._editHandle&&i._editHandle.handle&&i._editHandle.handle.selected&&(i._editHandle.handle.selected=!1),e.selected=t;var n=(i._editHandle||{}).amountRotated||0;return i._editHandle={handle:e,startCoordinates:i._coordinates().slice(),center:l.centerFromPerimeter(i._coordinates()),rotatePosition:i._rotateHandlePosition(e.style.rotateHandleOffset,e.style.rotateHandleRotation+n),startAmountRotated:n,amountRotated:n,resizePosition:i._rotateHandlePosition(e.style.resizeHandleOffset,e.style.resizeHandleRotation)},i.layer()&&i.layer().geoTrigger(o.annotation.select_edit_handle,{annotation:i,handle:i._editHandle,enable:t}),i},this.options=function(e,t){if(void 0===e)return u;if("string"==typeof e&&void 0===t)return u[e];var n;if(void 0===t?(n=void 0!==e[i._coordinateOption],u=r.extend(!0,u,e),["style","createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(t){void 0!==e[t]&&r.extend(u[t],e[t])}))):(n=e===i._coordinateOption,u[e]=t),u.coordinates){var a=u.coordinates;delete u.coordinates,i._coordinates(a)}if(void 0!==u.name){var s=u.name;delete u.name,i.name(s)}if(void 0!==u.label){var l=u.label;delete u.label,i.label(l)}if(void 0!==u.description){var c=u.description;delete u.description,i.description(c)}return i.modified(),n&&i.layer()&&i.layer().geoTrigger(o.annotation.coordinates,{annotation:i}),i},this.style=function(e,t,n){return n=n||"style",void 0===e?u[n]:"string"==typeof e&&void 0===t?(u[n]||{})[e]:(void 0===u[n]&&(u[n]={}),void 0===t?u[n]=r.extend(!0,u[n],e):u[n][e]=t,i.modified(),i)},["createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(e){i[e]=function(t,n){return i.style(t,n,e)}})),this.styleForState=function(e){return(e=e||i.state())===m.edit||e===m.highlight?r.extend({},u.style,u[e+"Style"]):e===m.create?r.extend({},u.style,u.editStyle,u[e+"Style"]):u[e+"Style"]||u.style||{}},this.type=function(){return b},this.features=function(){return[]},this.mouseClick=function(e){},this.mouseClickEdit=function(e){},this.mouseMove=function(e){},this._coordinates=function(e){return[]},this._coordinateOption="vertices",this.coordinates=function(e){var t=i._coordinates()||[];if(i.layer()){var n=i.layer().map();(e=null===e?n.gcs():void 0===e?n.ingcs():e)!==n.gcs()&&(t=s.transformCoordinates(n.gcs(),e,t))}return t},this.modified=function(){return i.layer()&&i.layer().modified(),i},this.draw=function(){return i.layer()&&(i.layer()._update(),i.layer().draw()),i},this._geojsonStyles=function(){return["closed","fill","fillColor","fillOpacity","lineCap","lineJoin","radius","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(e){return[]},this._geojsonGeometryType=function(){return""},this.geojson=function(e,t){var n,r,o,a=i._geojsonCoordinates(e),s=i._geojsonGeometryType(),u=i._geojsonStyles(),c=i.options("style")||{},d=i.labelStyle()||{};if(a&&a.length&&s){var h={type:"Feature",geometry:{type:s,coordinates:a},properties:{annotationType:b,name:i.name(),annotationId:i.id()}};for(f&&(h.properties.label=f),y&&(h.properties.description=y),!1===i.options("showLabel")&&(h.properties.showLabel=i.options("showLabel")),n=0;n<u.length;n+=1)r=u[n],void 0!==(o=l.ensureFunction(c[r])())&&(r.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),h.properties[r]=o);for(n=0;n<p.usedStyles.length;n+=1)r=p.usedStyles[n],void 0!==(o=l.ensureFunction(d[r])())&&(r.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),h.properties["label"+r.charAt(0).toUpperCase()+r.slice(1)]=o);if(t){var m=i.layer().map();e=null===e?m.gcs():void 0===e?m.ingcs():e,h.crs={type:"name",properties:{type:"proj4",name:e}}}return h}},this._addEditHandles=function(e,t,n,o){var a,s=r.extend({},v,i.editHandleStyle()),u=l.ensureFunction(s.handles)()||{},c=i._editHandle&&i._editHandle.handle&&i._editHandle.handle.selected?i._editHandle.handle:void 0;n=r.extend({},n),Object.keys(u).forEach((function(e){!1===u[e]&&(n[e]=!1)})),e[3]||(e[3]={point:[]}),a=e[3].point,t.forEach((function(e,i){!1!==n.vertex&&a.push(r.extend({},e,{type:"vertex",index:i,style:s,editHandle:!0})),!1===n.edge||i===t.length-1||e.x===t[i+1].x&&e.y===t[i+1].y||a.push(r.extend({x:(e.x+t[i+1].x)/2,y:(e.y+t[i+1].y)/2},{type:"edge",index:i,style:s,editHandle:!0})),!1===n.edge||o||i!==t.length-1||e.x===t[0].x&&e.y===t[0].y||a.push(r.extend({x:(e.x+t[0].x)/2,y:(e.y+t[0].y)/2},{type:"edge",index:i,style:s,editHandle:!0}))})),!1!==n.center&&a.push(r.extend({},l.centerFromPerimeter(i._coordinates()),{type:"center",style:s,editHandle:!0})),!1!==n.rotate&&(a.push(r.extend(i._rotateHandlePosition(s.rotateHandleOffset,s.rotateHandleRotation+(c&&"rotate"===c.type?i._editHandle.amountRotated:0)),{type:"rotate",style:s,editHandle:!0})),!i._editHandle||c&&"rotate"===c.type||(i._editHandle.amountRotated=0)),!1!==n.resize&&a.push(r.extend(i._rotateHandlePosition(s.resizeHandleOffset,s.resizeHandleRotation),{type:"resize",style:s,editHandle:!0})),c&&a.forEach((function(e){e.type===c.type&&e.index===c.index&&(e.selected=!0)}))},this._processEditActionCenter=function(e){var t=i._editHandle.startCoordinates,n=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,r=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,o=i._coordinates(),a=t.map((function(e){return{x:e.x+n,y:e.y+r}}));return(a[0].x!==o[0].x||a[0].y!==o[0].y)&&(i._coordinates(a),!0)},this._processEditActionRotate=function(e){var t=i._editHandle,n=t.startCoordinates,r=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,o=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,a=Math.atan2(t.rotatePosition.y-t.center.y,t.rotatePosition.x-t.center.x),s=Math.atan2(t.rotatePosition.y+o-t.center.y,t.rotatePosition.x+r-t.center.x)-a,l=i._coordinates(),u=n.map((function(e){var n=e.x-t.center.x,r=e.y-t.center.y;return{x:n*Math.cos(s)-r*Math.sin(s)+t.center.x,y:n*Math.sin(s)+r*Math.cos(s)+t.center.y}}));return(u[0].x!==l[0].x||u[0].y!==l[0].y)&&(i._coordinates(u),t.amountRotated=t.startAmountRotated+s,!0)},this._processEditActionResize=function(e){var t=i._editHandle,n=t.startCoordinates,r=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,o=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,a=i.layer().map(),s=a.gcsToDisplay(t.center,null),l=a.gcsToDisplay(t.resizePosition,null),u=a.gcsToDisplay({x:t.resizePosition.x+r,y:t.resizePosition.y+o},null),c=Math.pow(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2),.5)-t.handle.style.resizeHandleOffset,d=Math.pow(Math.pow(u.y-s.y,2)+Math.pow(u.x-s.x,2),.5)-t.handle.style.resizeHandleOffset,f=i._coordinates();if(d&&c){var p=d/c,h=n.map((function(e){return{x:(e.x-t.center.x)*p+t.center.x,y:(e.y-t.center.y)*p+t.center.y}}));if(h[0].x!==f[0].x||h[0].y!==f[0].y)return i._coordinates(h),!0}return!1},this._processEditActionEdge=function(e){var t=i._editHandle,n=t.handle.index,r=i._coordinates();return r.splice(n+1,0,{x:t.handle.x,y:t.handle.y}),t.handle.type="vertex",t.handle.index+=1,t.startCoordinates=r.slice(),i.modified(),!0},this._processEditActionVertex=function(e,t){var n,r,a=i._editHandle,s=a.handle.index,l=a.startCoordinates,u=i._coordinates(),c=u.length,d=u[s],f=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,p=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,h=i.layer(),m=h.options("adjacentPointProximity");return u[s]={x:l[s].x+f,y:l[s].y+p},h.displayDistance(u[s],null,l[s],null)<=m||(h.displayDistance(u[s],null,u[(s+1)%u.length],null)<=m?n=(s+1)%u.length:h.displayDistance(u[s],null,u[(s+u.length-1)%u.length],null)<=m&&(n=(s+u.length-1)%u.length)),r=0===n&&s===u.length-1||n===u.length-1&&0===s,!1===t&&r&&(n=void 0),void 0!==n&&u.length>(t||i.options("style").closed?3:2)&&(u[s]={x:u[n].x,y:u[n].y},e.event===o.actionup&&(t&&r&&(i.options("style").closed=!0),u.splice(s,1))),(u.length!==c||u[s].x!==d.x||u[s].y!==d.y)&&(i._coordinates(u),!0)}};function b(e,t,n,r,i){return n||(n=e.state()),n===m.create?[{action:a["annotation_"+r],name:r+" create",owner:g,input:"left",modifiers:{shift:!1,ctrl:!1}},{action:a["annotation_"+r],name:r+" create",owner:g,input:"pan"}]:t.apply(e,i)}function x(e,t,n){var r=e.layer();if(e.state()===m.create&&r&&t.state.action===a["annotation_"+n]){var i=r.options("continuousPointProximity"),s=r.options("continuousPointCollinearity"),l=r.options("continuousCloseProximity");if(i||0===i){var u=e.options("vertices"),c=!1;if(!u.length)return u.push(t.mouse.mapgcs),u.push(t.mouse.mapgcs),!0;var d=r.displayDistance(u[u.length-2],null,t.mouse.map,"display");if(d&&d>i){if(u.length>=(e._lastClickVertexCount||1)+3){var f=r.displayDistance(u[u.length-3],null,u[u.length-2],null),p=d,h=r.displayDistance(u[u.length-3],null,t.mouse.map,"display");if(f&&h)(h*h-f*f-p*p)/(2*f*p)>Math.cos(s)&&u.pop()}u[u.length-1]=t.mouse.mapgcs,u.push(t.mouse.mapgcs),c=!0}return(l||0===l)&&t.event===o.actionup&&(!0===l||r.displayDistance(u[0],null,t.mouse.map,"display")<=i)?u.length<3+("polygon"===n?1:0)?"remove":(u.pop(),e.state(m.done),"done"):c}}}var w=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(e){return e.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}}},t||{})).corners=t.corners||t.coordinates||[],delete t.coordinates,y.call(this,"rectangle",t);var n=this,i=this.actions,s=this.processEditAction;this.actions=function(e){return e||(e=n.state()),e===m.create?[{action:a.annotation_rectangle,name:"rectangle create",owner:g,input:"left",modifiers:{shift:!1,ctrl:!1},selectionRectangle:!0}]:i.apply(n,arguments)},this.processAction=function(e){var t=n.layer();if(n.state()===m.create&&t&&e.event===o.actionselection&&e.state.action===a.annotation_rectangle){var r=t.map(),i=[r.displayToGcs({x:e.lowerLeft.x,y:e.lowerLeft.y},null),r.displayToGcs({x:e.lowerLeft.x,y:e.upperRight.y},null),r.displayToGcs({x:e.upperRight.x,y:e.upperRight.y},null),r.displayToGcs({x:e.upperRight.x,y:e.lowerLeft.y},null)];return t.displayDistance(i[0],null,i[1],null)*t.displayDistance(i[0],null,i[3],null)<.01?"remove":(n.options("corners",i),n.state(m.done),"done")}},this.features=function(){var e,t=n.options(),r=n.state();if(r===m.create)e=[],t.corners&&t.corners.length>=4&&(e=[{polygon:{polygon:t.corners,style:n.styleForState(r)}}]);else e=[{polygon:{polygon:t.corners,style:n.styleForState(r)}}],r===m.edit&&n._addEditHandles(e,t.corners);return e},this._coordinates=function(e){return e&&e.length>=4&&n.options("corners",e.slice(0,4)),n.options("corners")},this._coordinateOption="corners",this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&n.state()!==m.create&&!(t.length<4)){for(var r=[],i=0;i<4;i+=1)r.push([t[i].x,t[i].y]);return r.push([t[0].x,t[0].y]),[r]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._setCornersFromMouse=function(e,t){var i=n.layer().map(),o=i.gcsToDisplay({x:e[0].x,y:e[0].y},null),a=i.gcsToDisplay(t.mapgcs,null),s={x:a.x,y:o.y},l={x:o.x,y:a.y};e[2]=r.extend({},t.mapgcs),e[1]=i.displayToGcs(s,null),e[3]=i.displayToGcs(l,null)},this.mouseMove=function(e){if(n.state()===m.create){var t=n.options("corners");return t.length?(n._setCornersFromMouse(t,e),!0):void 0}},this.mouseClick=function(e){var t=n.layer();if(n.state()===m.create&&t&&(e.buttonsDown.left||e.buttonsDown.right)){var i=n.options("corners");if(!e.buttonsDown.right||i.length)return e.handled=!0,i.length?(n._setCornersFromMouse(i,e),t.displayDistance(i[0],null,i[1],null)*t.displayDistance(i[0],null,i[3],null)<.01?"remove":(n.state(m.done),"done")):e.buttonsDown.left?(i.push(r.extend({},e.mapgcs)),i.push(r.extend({},e.mapgcs)),i.push(r.extend({},e.mapgcs)),i.push(r.extend({},e.mapgcs)),!0):void 0}},this.processEditAction=function(e){var t,r,i,o,a,l=n._editHandle.startCoordinates,u={x:e.mouse.mapgcs.x-e.state.origin.mapgcs.x,y:e.mouse.mapgcs.y-e.state.origin.mapgcs.y},c=n._editHandle.handle.type,d=n._editHandle.handle.index,f=[Math.atan2(l[1].y-l[0].y,l[1].x-l[0].x),Math.atan2(l[2].y-l[1].y,l[2].x-l[1].x),Math.atan2(l[3].y-l[2].y,l[3].x-l[2].x),Math.atan2(l[0].y-l[3].y,l[0].x-l[3].x)];switch(f[0]||f[1]||f[2]||f[3]||(f[1]=Math.PI/2,f[2]=Math.PI,f[3]=-Math.PI/2),f[0]||f[2]||(f[0]=f[1]-Math.PI/2,f[2]=f[1]+Math.PI/2),f[1]||f[3]||(f[1]=f[2]-Math.PI/2,f[3]=f[2]+Math.PI/2),c){case"vertex":return t=l.map((function(e){return{x:e.x,y:e.y}})),o=f[(d+1)%4],r={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},a=f[d],i={x:(u.x*Math.cos(a)+u.y*Math.sin(a))*Math.cos(a),y:(u.y*Math.sin(a)+u.x*Math.cos(a))*Math.sin(a)},t[d].x+=u.x,t[d].y+=u.y,t[(d+1)%4].x+=r.x,t[(d+1)%4].y+=r.y,t[(d+3)%4].x+=i.x,t[(d+3)%4].y+=i.y,n.options("corners",t),!0;case"edge":return t=l.map((function(e){return{x:e.x,y:e.y}})),o=f[(d+1)%4],u={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},t[d].x+=u.x,t[d].y+=u.y,t[(d+1)%4].x+=u.x,t[(d+1)%4].y+=u.y,n.options("corners",t),!0}return s.apply(n,arguments)}};i(w,y);var _={};_[f.capabilities.feature]=!0,u("rectangle",w,_);var S=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(e){return e.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{closed:!1,fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,line:function(e){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return e}))},position:function(e,t){return n.options("vertices")[t]},stroke:!1,strokeColor:{r:0,g:0,b:1}}},t||{})).vertices=t.vertices||t.coordinates||[],delete t.coordinates,y.call(this,"polygon",t);var n=this,i=this.actions;this.features=function(){var e,t=n.options(),r=n.state(),i=n.styleForState(r);if(r===m.create)e=[],t.vertices&&t.vertices.length>=3&&(e[1]={polygon:{polygon:t.vertices,style:i}}),t.vertices&&t.vertices.length>=2&&(e[2]={line:{line:t.vertices,style:i}});else e=[{polygon:{polygon:t.vertices,style:i}}],r===m.edit&&n._addEditHandles(e,t.vertices);return e},this._coordinates=function(e){return e&&n.options("vertices",e),n.options("vertices")},this.mouseMove=function(e){if(n.state()===m.create){var t=n.options("vertices");return t.length?(t[t.length-1]=e.mapgcs,!0):void 0}},this.mouseClick=function(e){var t=n.layer();if(n.state()===m.create&&t){var r,i=!!e.buttonsDown.right;if(e.buttonsDown.left||e.buttonsDown.right){var o=n.options("vertices");if(!e.buttonsDown.right||o.length)return e.handled=!0,e.buttonsDown.left&&(o.length?o.length>=2&&t.displayDistance(o[o.length-2],null,e.map,"display")<=t.options("adjacentPointProximity")?(r=!0,n._lastClick&&e.time-n._lastClick<t.options("dblClickTime")&&(i=!0)):o.length>=2&&t.displayDistance(o[0],null,e.map,"display")<=t.options("finalPointProximity")?i=!0:o[o.length-1]=e.mapgcs:o.push(e.mapgcs),i||r||o.push(e.mapgcs),n._lastClick=e.time,n._lastClickVertexCount=o.length),i?o.length<4?"remove":(o.pop(),n.state(m.done),"done"):!r}}},this.actions=function(e){return b(n,i,e,"polygon",arguments)},this.processAction=function(e){return x(n,e,"polygon")},this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&!(t.length<3)&&n.state()!==m.create){for(var r=[],i=0;i<t.length;i+=1)r.push([t[i].x,t[i].y]);return r.push([t[0].x,t[0].y]),[r]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]}};i(S,y);var C={};C[f.capabilities.feature]=!0,C[c.capabilities.basic]=[m.create],u("polygon",S,C);var A=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{line:function(e){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return e}))},position:function(e,t){return n.options("vertices")[t]},strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"},highlightStyle:{strokeWidth:5},createStyle:{line:function(e){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return e}))},position:function(e,t){return n.options("vertices")[t]},strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"}},t||{})).vertices=t.vertices||t.coordinates||[],delete t.coordinates,y.call(this,"line",t);var n=this,i=this.actions,o=this.processEditAction;this.features=function(){var e,t=n.options(),r=n.state();if(r===m.create)e=[{line:{line:t.vertices,style:n.styleForState(r)}}];else e=[{line:{line:t.vertices,style:n.styleForState(r)}}],r===m.edit&&n._addEditHandles(e,t.vertices,void 0,!n.style("closed"));return e},this._coordinates=function(e){return e&&n.options("vertices",e),n.options("vertices")},this.mouseMove=function(e){if(n.state()===m.create){var t=n.options("vertices");return t.length?(t[t.length-1]=e.mapgcs,!0):void 0}},this.mouseClick=function(e){var t=n.layer();if(n.state()===m.create&&t){var r,i=!!e.buttonsDown.right;if(e.buttonsDown.left||e.buttonsDown.right){var o=n.options("vertices");if(!e.buttonsDown.right||o.length)return e.handled=!0,e.buttonsDown.left&&(o.length?o.length>=2&&t.displayDistance(o[o.length-2],null,e.map,"display")<=t.options("adjacentPointProximity")?(r=!0,n._lastClick&&e.time-n._lastClick<t.options("dblClickTime")&&(i=!0)):o.length>=2&&t.displayDistance(o[0],null,e.map,"display")<=t.options("finalPointProximity")?i="close":o[o.length-1]=e.mapgcs:o.push(e.mapgcs),i||r||o.push(e.mapgcs),n._lastClick=e.time,n._lastClickVertexCount=o.length),i?o.length<3?"remove":(o.pop(),n.options("style").closed="close"===i,n.state(m.done),"done"):!r}}},this.actions=function(e){return b(n,i,e,"line",arguments)},this.processAction=function(e){return x(n,e,"line")},this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&!(t.length<2)&&n.state()!==m.create){for(var r=[],i=0;i<t.length;i+=1)r.push([t[i].x,t[i].y]);return r}},this._geojsonGeometryType=function(){return"LineString"},this._geojsonStyles=function(){return["closed","lineCap","lineJoin","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this.processEditAction=function(e){return"vertex"===n._editHandle.handle.type?n._processEditActionVertex(e,!0):o.apply(n,arguments)},this.mouseClickEdit=function(e){var t,r=n.layer(),i=n._editHandle;if(n.state()===m.edit&&r&&e.buttonsDown.left&&i&&i.handle.selected&&"edge"===i.handle.type&&n.options("style").closed&&(e.handled=!0,n._lastClick&&e.time-n._lastClick<r.options("dblClickTime")&&(t=!0),n._lastClick=e.time,t)){var o=i.handle.index,a=n._coordinates(),s=a.slice(o+1).concat(a.slice(0,o+1));return n._coordinates(s),n.options("style").closed=!1,i.handle.index=void 0,!0}}};i(A,y);var T={};T[c.capabilities.basic]=[m.create],u("line",A,T);var P=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,radius:10,scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5}},t||{})).position=t.position||(t.coordinates?t.coordinates[0]:void 0),delete t.coordinates,y.call(this,"point",t);var n=this;this.features=function(){var e,t,i,o=n.options(),a=n.state();if(a===m.create)e=[];else t=n.styleForState(a),(o.style.scaled||0===o.style.scaled)&&(!0===o.style.scaled&&(o.style.scaled=n.layer().map().zoom()),t=r.extend({},t,{radius:function(){var e=o.style.radius,t=n.layer().map().zoom();return l.isFunction(e)&&(e=e.apply(n,arguments)),e*=Math.pow(2,t-o.style.scaled),e}}),i=!0),e=[{point:{x:o.position.x,y:o.position.y,style:t,scaleOnZoom:i}}],a===m.edit&&n._addEditHandles(e,[o.position],{edge:!1,center:!1,resize:!1,rotate:!1});return e},this._coordinates=function(e){return e&&e.length>=1&&n.options("position",e[0]),n.state()===m.create?[]:[n.options("position")]},this._coordinateOption="position",this.mouseClick=function(e){if(n.state()===m.create&&e.buttonsDown.left)return e.handled=!0,n.options("position",e.mapgcs),n.state(m.done),"done"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","radius","scaled","stroke","strokeColor","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&n.state()!==m.create&&!(t.length<1)&&void 0!==t[0])return[t[0].x,t[0].y]},this._geojsonGeometryType=function(){return"Point"}};i(P,y);var E={};E[d.capabilities.feature]=!0,u("point",P,E),e.exports={state:m,actionOwner:g,annotation:y,lineAnnotation:A,pointAnnotation:P,polygonAnnotation:S,rectangleAnnotation:w,_editHandleFeatureLevel:3,defaultEditHandleStyle:v}},836:function(e,t,n){var r=n(5699),i=n(3715),o=n(7800),a=n(5108),s=n(4647),l=n(6853),u=n(5638),c=n(3345),d=n(9757),f=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var r,f,p,h,m=n(3870),g=n(6618),v=n(4634),y=this,b=this._init,x=this._exit,w=this.draw,_=this._update,S=g(),C=null,A=[],T=[],P={closed:{dataType:"boolean",keys:["closed","close"]},fill:{dataType:"boolean",keys:["fill"]},fillColor:{dataType:"color",keys:["fillColor","fill-color","marker-color","fill"]},fillOpacity:{dataType:"opacity",keys:["fillOpacity","fill-opacity"]},lineCap:{dataType:"text",keys:["lineCap","line-cap"]},lineJoin:{dataType:"text",keys:["lineJoin","line-join"]},radius:{dataType:"positive",keys:["radius"]},scaled:{dataType:"booleanOrNumber",keys:["scaled"]},stroke:{dataType:"boolean",keys:["stroke"]},strokeColor:{dataType:"color",keys:["strokeColor","stroke-color","stroke"]},strokeOffset:{dataType:"number",keys:["strokeOffset","stroke-offset"]},strokeOpacity:{dataType:"opacity",keys:["strokeOpacity","stroke-opacity"]},strokeWidth:{dataType:"positive",keys:["strokeWidth","stroke-width"]}},E={offset:"coordinate2",rotateWithMap:"boolean",rotation:"angle",scaleWithMap:"boolean",scale:"booleanOrNumber",shadowBlur:"numberOrBlank",shadowOffset:"coordinate2",strokeWidth:"numberOrBlank",visible:"boolean"};return d.usedStyles.forEach((function(e){P[e]={option:"labelStyle",dataType:E[e]||"text",keys:[e,"label"+e.charAt(0).toUpperCase()+e.slice(1),e.replace(/([A-Z])/g,"-$1").toLowerCase(),"label-"+e.replace(/([A-Z])/g,"-$1").toLowerCase()]}})),r=u.extend(!0,{},{dblClickTime:300,adjacentPointProximity:5,continuousPointProximity:5,continuousPointCollinearity:1*Math.PI/180,continuousCloseProximity:10,finalPointProximity:10,showLabels:!0,clickToEdit:!1},t),this._processAction=function(e){var t;if(e.state&&e.state.actionRecord&&e.state.actionRecord.owner===o.actionOwner&&y.currentAnnotation)if(y.mode()===y.modes.edit)t=y.currentAnnotation.processEditAction(e),y.currentAnnotation&&y.currentAnnotation._editHandle&&y.currentAnnotation._editHandle.handle&&(y.geoTrigger(a.annotation.edit_action,{annotation:y.currentAnnotation,handle:y.currentAnnotation._editHandle?y.currentAnnotation._editHandle.handle:void 0,action:e.event}),e.event===a.actionup&&y._selectEditHandle({data:y.currentAnnotation._editHandle.handle},y.currentAnnotation._editHandle.handle.selected));else t=y.currentAnnotation.processAction(e);y._updateFromEvent(t)},this._updateFromEvent=function(e){switch(e){case"remove":y.removeAnnotation(y.currentAnnotation,!1),y.mode(null);break;case"done":y.mode(null)}e&&(y.modified(),y.draw())},this._handleMouseMove=function(e){y.mode()&&y.currentAnnotation&&(y.currentAnnotation.mouseMove(e)&&(y.modified(),y.draw()))},this._selectEditHandle=function(e,t){if(e.data&&e.data.editHandle){if(u.each(T[o._editHandleFeatureLevel],(function(e,t){t.feature.modified()})),y.currentAnnotation.selectEditHandle(e.data,t),y.draw(),y.map().node().toggleClass("annotation-input",!!t),y.map().interactor().removeAction(void 0,void 0,o.actionOwner),t){var n=y.currentAnnotation.actions(o.state.edit);u.each(n,(function(e,t){y.map().interactor().addAction(t)}))}return y}},this._handleMouseOn=function(e){e.data&&e.data.annotation&&(y.mode()===y.modes.edit&&y.currentAnnotation?y._selectEditHandle(e,!0):y.mode()||y.currentAnnotation||!y.options("clickToEdit")||(e.data.annotation.state(o.state.highlight),y.modified(),y.draw()))},this._handleMouseOff=function(e){e.data&&e.data.annotation&&(y.mode()===y.modes.edit&&e.data.editHandle&&e.data.selected?y._selectEditHandle(e,!1):e.data.annotation.state()===o.state.highlight&&(e.data.annotation.state(o.state.done),y.modified(),y.draw()))},this._handleMouseClick=function(e){var t,n=!1;if(y.mode()===y.modes.edit){if(y.map().interactor().hasAction(void 0,void 0,o.actionOwner))return t=y.currentAnnotation.mouseClickEdit(e),void y._updateFromEvent(t);y.mode(null),y.draw(),u.each(T,(function(e,t){u.each(t,(function(e,t){t.feature._clearSelectedFeatures()}))})),n=!0}else if(y.mode()&&y.currentAnnotation)t=y.currentAnnotation.mouseClick(e),y._updateFromEvent(t),n=!y.mode();else if(!y.mode()&&!y.currentAnnotation&&y.options("clickToEdit")){var r=y.annotations().filter((function(e){return e.state()===o.state.highlight}));if(1!==r.length)return;y.mode(y.modes.edit,r[0]),y.draw(),n=!0}n&&y.map().interactor().retriggerMouseMove()},this.options=function(e,t){return void 0===e?r:"string"==typeof e&&void 0===t?r[e]:(void 0===t?r=u.extend(!0,r,e):r[e]=t,y.modified(),y)},this.displayDistance=function(e,t,n,r){var i=y.map();return"display"!==t&&(t=null===t?i.gcs():void 0===t?i.ingcs():t,e=i.gcsToDisplay(e,t)),"display"!==r&&(r=null===r?i.gcs():void 0===r?i.ingcs():r,n=i.gcsToDisplay(n,r)),Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))},this.addAnnotation=function(e,t,n){if(u.inArray(e,A)<0){y.geoTrigger(a.annotation.add_before,{annotation:e}),A.push(e),e.layer(y);var r=y.map();(t=null===t?r.gcs():void 0===t?r.ingcs():t)!==r.gcs()&&e._coordinates(l.transformCoordinates(t,r.gcs(),e._coordinates())),!1!==n&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.add,{annotation:e})}return y},this.removeAnnotation=function(e,t){var n=u.inArray(e,A);return n>=0&&(e===y.currentAnnotation&&(y.currentAnnotation=null),e._exit(),A.splice(n,1),!1!==t&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.remove,{annotation:e})),n>=0},this.removeAllAnnotations=function(e,t){for(var n,r=0,i=0;i<A.length;)n=A[i],e&&n.state()===o.state.create?i+=1:(y.removeAnnotation(n,!1),r+=1);return r&&!1!==t&&(y.modified(),y.draw()),r},this.annotations=function(){return A.slice()},this.annotationById=function(e){null!=e&&(e=+e);var t=A.filter((function(t){return t.id()===e}));if(t.length)return t[0]},this.modes={edit:"edit"},this.mode=function(e,t){if(void 0===e)return C;if(e!==C||e===y.modes.edit&&t!==y.editAnnotation){var n,r,i=y.map().node(),s=C;if(C=e,i.toggleClass("annotation-input",!(!C||C===y.modes.edit)),h||(h=c(i[0])),C?h.bind("esc",(function(){y.mode(null)})):h.unbind("esc"),y.currentAnnotation){switch(y.currentAnnotation.state()){case o.state.create:y.removeAnnotation(y.currentAnnotation);break;case o.state.edit:y.currentAnnotation.state(o.state.done),y.modified(),y.draw()}y.currentAnnotation=null}switch(C){case y.modes.edit:y.currentAnnotation=t,y.currentAnnotation.state(o.state.edit),y.modified();break;case"line":n=o.lineAnnotation;break;case"point":n=o.pointAnnotation;break;case"polygon":n=o.polygonAnnotation;break;case"rectangle":n=o.rectangleAnnotation}y.map().interactor().removeAction(void 0,void 0,o.actionOwner),n&&(y.currentAnnotation=n({state:o.state.create,layer:y}),y.addAnnotation(y.currentAnnotation,null),r=y.currentAnnotation.actions(o.state.create),u.each(r,(function(e,t){y.map().interactor().addAction(t)}))),y.geoTrigger(a.annotation.mode,{mode:C,oldMode:s}),s===y.modes.edit&&y.modified()}return y},this.geojson=function(e,t,n,r){if(void 0!==e){var i=s.createFileReader("geojsonReader",{layer:y});if(!i.canRead(e))return;return!0===t&&y.removeAllAnnotations(!0,!1),"update"===t&&u.each(y.annotations(),(function(e,t){t.options("updated",!1)})),i.read(e,(function(e){u.each(e.slice(),(function(e,t){y._geojsonFeatureToAnnotation(t,n),y.deleteFeature(t)}))})),"update"===t&&u.each(y.annotations(),(function(e,t){!1===t.options("updated")&&t.state()===o.state.done&&y.removeAnnotation(t,!1)})),y.modified(),y.draw(),A.length}e=null;var a=[];return u.each(A,(function(e,t){var i=t.geojson(n,r);i&&a.push(i)})),a.length&&(e={type:"FeatureCollection",features:a}),e},this._geojsonFeatureToAnnotation=function(e,t){var n=e.data(),r=s.listAnnotations(),i=y.map();t=null===t?i.gcs():void 0===t?i.ingcs():t,u.each(n,(function(n,c){var d,f,p,h,m=(c.properties||{}).annotationType||e.featureType,g=u.extend({},c.properties||{});if(!(u.inArray(m,r)<0)){switch(g.style=g.style||{},g.labelStyle=g.labelStyle||{},delete g.annotationType,e.featureType){case"line":if(!(d=e.line()(c,n))||d.length<2)return;d=d.slice();break;case"polygon":if(!(d=e.polygon()(c,n))||!d.outer||d.outer.length<3)return;if((d=d.outer.slice())[d.length-1][0]===d[0][0]&&d[d.length-1][1]===d[0][1]&&(d.splice(d.length-1,1),d.length<3))return;break;case"point":d=[e.position()(c,n)]}for(p=0;p<d.length;p+=1)d[p]=v.normalizeCoordinates(d[p]);(f=c.crs&&"name"===c.crs.type&&c.crs.properties&&"proj4"===c.crs.properties.type&&c.crs.properties.name?c.crs.properties.name:t)!==i.gcs()&&(d=l.transformCoordinates(f,i.gcs(),d)),g.coordinates=d,u.each(P,(function(t,r){var i;u.each(r.keys,(function(e,t){void 0===i&&(i=y.validateAttribute(g[t],r.dataType))})),void 0===i&&(i=y.validateAttribute(e.style.get(t)(c,n),r.dataType)),void 0!==i&&(g[r.option||"style"][t]=i)})),u.each(P,(function(e,t){u.each(t.keys,(function(e,t){delete g[t]}))})),void 0!==g.annotationId&&(h=y.annotationById(g.annotationId))&&delete g.annotationId,h&&h.type()===m&&h.state()===o.state.done&&!1===h.options("updated")?(delete g.state,delete g.layer,g.updated=!0,h.options(g),y.geoTrigger(a.annotation.update,{annotation:h})):(g.state=o.state.done,g.layer=y,g.updated="new",y.addAnnotation(s.createAnnotation(m,g),null))}}))},this.validateAttribute=function(e,t){var n;if(null!=e){switch(t){case"angle":if(""===e)break;if(!(n=/^\s*([-.0-9eE]+)\s*(deg|rad|grad|turn)?\s*$/.exec((""+e).toLowerCase()))||!isFinite(n[1]))return;var r="grad"===n[2]?Math.PI/200:"deg"===n[2]?Math.PI/180:"turn"===n[2]?2*Math.PI:1;e=+n[1]*r;break;case"boolean":e=!!e&&["false","no","off"].indexOf((""+e).toLowerCase())<0;break;case"booleanOrNumber":if(!e&&0!==e&&""!==e||["true","false","off","on","no","yes"].indexOf((""+e).toLowerCase())>=0)e=!!e&&["false","no","off"].indexOf((""+e).toLowerCase())<0;else{if(!v.isNonNullFinite(e))return;e=+e}break;case"coordinate2":if(""===e)break;if(e&&v.isNonNullFinite(e.x)&&v.isNonNullFinite(e.y)){e.x=+e.x,e.y=+e.y;break}try{e=JSON.parse(e)}catch(e){}if(e&&v.isNonNullFinite(e.x)&&v.isNonNullFinite(e.y)){e.x=+e.x,e.y=+e.y;break}if(Array.isArray(e)&&v.isNonNullFinite(e[0])&&v.isNonNullFinite(e[1])){e={x:+e[0],y:+e[1]};break}if(!(n=/^\s*([-.0-9eE]+)(?:\s+|\s*,)\s*([-.0-9eE]+)\s*$/.exec(""+e))||!isFinite(n[1])||!isFinite(n[2]))return;e={x:+n[1],y:+n[2]};break;case"color":if(void 0===(e=v.convertColor(e))||void 0===e.r)return;break;case"number":if(!v.isNonNullFinite(e))return;e=+e;break;case"numberOrBlank":if(""===e)break;if(!v.isNonNullFinite(e))return;e=+e;break;case"opacity":if(""===e)return;if(e=+e,isNaN(e)||e<0||e>1)return;break;case"positive":if(e=+e,!isFinite(e)||e<=0)return;break;case"text":e=""+e}return e}},this._update=function(){if(y.timestamp()>S.timestamp()){var e=y.options("showLabels")?[]:null,t=y.options("clickToEdit")||y.mode()===y.modes.edit;u.each(T,(function(e,t){u.each(t,(function(e,t){t.data=[],delete t.feature.scaleOnZoom}))})),u.each(A,(function(n,r){var i=r.features();if(e){var o=r.labelRecord();o&&e.push(o)}u.each(i,(function(e,n){void 0===T[e]&&(T[e]={}),u.each(n,(function(n,i){if(T[e][n])(o=T[e][n].feature).selectionAPI()!==!!t&&(o.selectionAPI(t),t?(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff)):(o.geoOff(a.feature.mouseon,y._handleMouseOn),o.geoOff(a.feature.mouseoff,y._handleMouseOff)));else{var o=y.createFeature(n,{gcs:y.map().gcs(),selectionAPI:t});if(!o){var s="error_feature_"+n;return void(y[s]||(console.warn("Cannot create a "+n+" feature for annotations."),y[s]=!0))}t&&(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff));var l={};u.each(["closed","fill","fillColor","fillOpacity","line","lineCap","lineJoin","polygon","position","radius","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth","uniformPolygon"],(function(e,t){var n;void 0!==o.style()[t]&&(n=o.style.get(t)),l[t]=function(e,r,i,o){var a=e&&e.style?e.style:e&&e[2]&&e[2].style?e[2].style:i.style,s=a?a[t]:e;return v.isFunction(s)&&(s=s(e,r,i,o)),void 0===s&&n&&(s=n(e,r,i,o)),s}})),o.style(l),T[e][n]={feature:o,style:l,data:[]}}var c=i.data||i;Array.isArray(c)||(c=[c]),c.forEach((function(t){t.annotation=r,T[e][n].data.push(t),i.scaleOnZoom&&(T[e][n].feature.scaleOnZoom=!0)}))}))}))})),u.each(T,(function(e,t){u.each(t,(function(e,t){t.feature.data(t.data)}))})),y._updateLabels(e),S.modified()}return _.call(y,arguments),y},this._updateLabels=function(e){if(!e||!e.length)return y._removeLabelFeature(),y;if(!f){if(!(s.registries.features[y.rendererName()]||{}).text){var t=s.rendererForFeatures(["text"]);p=s.createLayer("feature",y.map(),{renderer:t}),y.addChild(p),p._update(),y.geoTrigger(a.layerAdd,{target:y,layer:p})}var n={};d.usedStyles.forEach((function(e){n[e]=function(t,n){return t.style&&void 0!==t.style[e]?t.style[e]:(y.options("defaultLabelStyle")||{})[e]}})),f=(p||y).createFeature("text",{style:n,gcs:y.map().gcs(),position:function(e){return e.position}})}return f.data(e),y},this._handleZoom=function(){var e,t=y.features();for(e=0;e<t.length;e+=1)t[e].scaleOnZoom&&t[e].modified()},this._removeLabelFeature=function(){return p&&(p._exit(),y.removeChild(p),y.geoTrigger(a.layerRemove,{target:y,layer:p}),p=f=null),f&&(y.removeFeature(f),f=null),y},this.draw=function(){return y._update(),w.call(y),y},this._init=function(){return b.call(y),y.map().interactor()||y.map().interactor(m({actions:[]})),y.geoOn(a.actionselection,y._processAction),y.geoOn(a.actionmove,y._processAction),y.geoOn(a.actionup,y._processAction),y.geoOn(a.mouseclick,y._handleMouseClick),y.geoOn(a.mousemove,y._handleMouseMove),y.geoOn(a.zoom,y._handleZoom),y},this._exit=function(){return h&&h.reset(),y._removeLabelFeature(),x.call(y),A=[],T=[],y},y};r(f,i),s.registerLayer("annotation",f),e.exports=f},9986:function(e,t,n){var r=n(5699),i=n(3737),o=n(4634),a=n(8054),s=n(5365),l=n(5240),u=n(8608),c=function e(t){if(!(this instanceof e))return new e(t);var r=n(5108);return t=t||{},i.call(this,t),this._view=o.mat4AsArray(),this._proj=o.mat4AsArray(),this._projection=null,this._transform=o.mat4AsArray(),this._inverse=o.mat4AsArray(),this._bounds=null,this._display=null,this._world=null,this._viewport={width:1,height:1},this._createProj=function(){var e="perspective"===this._projection?l.frustum:l.ortho,t=this._clipbounds[this._projection];e(this._proj,t.left,t.right,t.bottom,t.top,t.near,t.far)},this._update=function(){this._bounds=null,this._display=null,this._world=null,this._transform=l.multiply(o.mat4AsArray(),this._proj,this._view),l.invert(this._inverse,this._transform),this.geoTrigger(r.camera.view,{camera:this})},Object.defineProperty(this,"view",{get:function(){return this._view},set:function(e){l.copy(this._view,e),this._update()},configurable:!0}),Object.defineProperty(this,"bounds",{get:function(){return null===this._bounds&&(this._bounds=this._getBounds()),this._bounds},set:function(e){this._setBounds(e),this._update()}}),Object.defineProperty(this,"clipbounds",{get:function(){return this._clipbounds[this._projection]},set:function(e){var t=this._clipbounds[this._projection];if((e={left:void 0===e.left?t.left:e.left,right:void 0===e.right?t.right:e.right,top:void 0===e.top?t.top:e.top,bottom:void 0===e.bottom?t.bottom:e.bottom,near:void 0===e.near?t.near:e.near,far:void 0===e.far?t.far:e.far}).left===e.right)throw new Error("Left and right values must be different");if(e.top===e.bottom)throw new Error("Top and bottom values must be different");if(e.near===e.far)throw new Error("Near and far values must be different");this._clipbounds[this._projection]=e,this._createProj(),this._update()}}),Object.defineProperty(this,"display",{get:function(){if(null===this._display){var e=this._clipbounds[this._projection],t=o.mat4AsArray();l.translate(t,t,[this.viewport.width/2,this.viewport.height/2,0]),l.scale(t,t,[this.viewport.width/(e.right-e.left),this.viewport.height/(e.bottom-e.top),1]),l.translate(t,t,[-(e.left+e.right)/2,-(e.top+e.bottom)/2,0]),l.multiply(t,t,this._transform),this._display=t}return this._display}}),Object.defineProperty(this,"world",{get:function(){return null===this._world&&(this._world=l.invert(o.mat4AsArray(),this.display)),this._world}}),Object.defineProperty(this,"projection",{get:function(){return this._projection},set:function(e){if(!this.constructor.projection[e])throw new Error("Unsupported projection type: "+e);e!==this._projection&&(this._projection=e,this._createProj(),this._update(),this.geoTrigger(r.camera.projection,{camera:this,projection:e}))}}),Object.defineProperty(this,"projectionMatrix",{get:function(){return this._proj}}),Object.defineProperty(this,"transform",{get:function(){return this._transform}}),Object.defineProperty(this,"inverse",{get:function(){return this._inverse}}),Object.defineProperty(this,"viewport",{get:function(){return{width:this._viewport.width,height:this._viewport.height,left:this._viewport.left,top:this._viewport.top}},set:function(e){if(!(e.width>0&&e.height>0))throw new Error("Invalid viewport dimensions");e.width===this._viewport.width&&e.height===this._viewport.height||(this._viewport.width&&this._viewport.height&&(this._scale([this._viewport.width/e.width,this._viewport.height/e.height,1]),this._translate([(e.width-this._viewport.width)/2,(e.height-this._viewport.height)/2,0])),this._viewport={width:e.width,height:e.height,left:e.left,top:e.top},this._update(),this.geoTrigger(r.camera.viewport,{camera:this,viewport:this.viewport}))}}),this._resetView=function(){return l.identity(this._view),this},this._translate=function(e){return l.translate(this._view,this._view,e),this},this._scale=function(e){return l.scale(this._view,this._view,e),this},this._worldToClip4=function(e){return u.transformMat4(e,e,this._transform)},this._clipToWorld4=function(e){return u.transformMat4(e,e,this._inverse)},this.applyProjection=function(e){var t;return"perspective"===this._projection?(t=1/(e[3]||1),e[0]=t*e[0],e[1]=t*e[1],e[2]=t*e[2],e[3]=t):e[3]=1,e},this.unapplyProjection=function(e){var t;return"perspective"===this._projection?(t=e[3]||1,e[0]=t*e[0],e[1]=t*e[1],e[2]=t*e[2],e[3]=t):e[3]=1,e},this.worldToDisplay4=function(e){return e=[e[0],e[1],e[2]||0,e[3]||1],(e=u.transformMat4(e,e,this.display))[3]&&1!==e[3]&&(e=[e[0]/e[3],e[1]/e[3],e[2]/e[3],1]),e},this.displayToWorld4=function(e){return e=[e[0],e[1],e[2]||0,e[3]||1],(e=u.transformMat4(e,e,this.world))[3]&&1!==e[3]&&(e=[e[0]/e[3],e[1]/e[3],e[2]/e[3],1]),e},this.worldToDisplay=function(e){var t=this._clipbounds[this._projection];return{x:(e=this.worldToDisplay4([e.x,e.y,-t.near]))[0],y:e[1]}},this.displayToWorld=function(e){return{x:(e=this.displayToWorld4([e.x,e.y,-1]))[0],y:e[1]}},this._getBounds=function(){var e,t,n,r,i={};return e=this.displayToWorld({x:0,y:0}),t=this.displayToWorld({x:this._viewport.width,y:0}),n=this.displayToWorld({x:0,y:this._viewport.height}),r=this.displayToWorld({x:this._viewport.width,y:this._viewport.height}),i.left=Math.min(e.x,t.x,n.x,r.x),i.bottom=Math.min(e.y,t.y,n.y,r.y),i.right=Math.max(e.x,t.x,n.x,r.x),i.top=Math.max(e.y,t.y,n.y,r.y),i},this._setBounds=function(e){var t={width:e.right-e.left,height:e.top-e.bottom},n={x:(e.left+e.right)/2,y:(e.bottom+e.top)/2};return this._viewFromCenterSizeRotation(n,t,0),this},this._viewFromCenterSizeRotation=function(e,t,n){var r,i,a,s=o.vec3AsArray(),l=o.vec3AsArray();return this._resetView(),(i=Math.abs(t.width))/(a=Math.abs(t.height))>=(r=this._viewport.width/this._viewport.height)?(a=i/r,l[0]=2/i,l[1]=2/a):(i=a*r,l[0]=2/i,l[1]=2/a),l[2]=1,this._scale(l),n&&this._rotate(n),s[0]=-e.x,s[1]=-e.y,s[2]=0,this._translate(s),this},this.viewFromCenterSizeRotation=function(e,t,n){return this._viewFromCenterSizeRotation(e,t,n),this._update(),this},this.pan=function(e){if(e.x||e.y||e.z)return this._translate([e.x,e.y,e.z||0]),this._update(),this},this.zoom=function(e){if(1!==e)return l.scale(this._view,this._view,[e,e,e]),this._update(),this},this._rotate=function(e,t,n){if(e){n=n||[0,0,-1],t?void 0!==t.x&&(t=[t.x||0,t.y||0,t.z||0]):t=[0,0,0];var r=[-t[0],-t[1],-t[2]];return l.translate(this._view,this._view,t),l.rotate(this._view,this._view,e,n),l.translate(this._view,this._view,r),this}},this.css=function(t){var n;switch((t||"").toLowerCase()){case"display":case"":n=this.display;break;case"world":n=this.world;break;default:throw new Error("Unknown transform "+t)}return e.css(n)},this.ppMatrix=function(e,t){var n=e;function r(e){var r=n[e],i=r.toExponential(t);return r>=0&&(i=" "+i),i}return t=t||2,[[r(0),r(4),r(8),r(12)].join(" "),[r(1),r(5),r(9),r(13)].join(" "),[r(2),r(6),r(10),r(14)].join(" "),[r(3),r(7),r(11),r(15)].join(" ")].join("\n")},this.toString=function(){return this.ppMatrix(this._transform)},this.debug=function(){return["bounds",JSON.stringify(this.bounds),"view:",this.ppMatrix(this._view),"projection:",this.ppMatrix(this._proj),"transform:",this.ppMatrix(this._transform)].join("\n")},this.valueOf=function(){return this._transform},this._clipbounds=this.constructor.clipbounds,this._resetView(),this.projection=t.projection||"parallel",t.viewport&&(this.viewport=t.viewport),this._update(),this};c.projection={perspective:!0,parallel:!0},c.clipbounds={perspective:{left:-1,right:1,top:1,bottom:-1,far:2e3,near:.01},parallel:{left:-1,right:1,top:1,bottom:-1,far:-1,near:1}},c.css=function(e){return"matrix3d("+e.map((function(e){return(e=(+e).toPrecision(15)).indexOf("e")>=0?e=(+e).toString():e.indexOf(".")>=0&&(e=e.replace(/(\.|)0+$/,"")),e})).join(",")+")"},c.vec3=s,c.mat3=a,c.vec4=u,c.mat4=l,r(c,i),e.exports=c},3086:function(e,t,n){var r,i=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function e(t){"use strict";var r=n(5638);if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var i=this,o=!0,s=this._init,l=this._exit;return this.clearCanvas=function(e){o=e},this.api=function(){return e.apiname},this._init=function(){if(i.initialized())return i;s.call(i);var e=t.canvas||r(document.createElement("canvas"));i.context2d=e[0].getContext("2d"),e.addClass("canvas-canvas"),r(i.layer().node().get(0)).append(e),i.canvas(e);var n=i.layer().map().size();return i._resize(0,0,n.width,n.height),i},this._resize=function(e,t,n,r){var o=i.canvas();return parseInt(o.attr("width"),10)===n&&parseInt(o.attr("height"),10)===r||(i._setWidthHeight(n,r),o.attr("width",n),o.attr("height",r),i._render()),i},this._render=function(){return i.layer().map().scheduleAnimationFrame(i._renderFrame),i},this._renderFrame=function(){var e,t=i.layer(),n=t.map(),r=n.size(),a=t.features?t.features():[];for(e=0;e<a.length;e+=1)if(a[e]._delayRender())return void i._render();for(o&&(i.context2d.setTransform(1,0,0,1,0,0),i.context2d.clearRect(0,0,r.width,r.height)),e=0;e<a.length;e+=1)a[e].visible()&&a[e]._renderOnCanvas(i.context2d,n)},this._exit=function(){i.canvas().remove(),l()},this};s.apiname="canvas",i(s,a),o("canvas",s),s.supported=function(){if(void 0===r){var e;try{e=document.createElement("canvas"),r=!(!e.getContext||!e.getContext("2d"))}catch(e){r=!1}e=void 0}return r},s.fallback=function(){return null},e.exports=s},1225:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(1111),a=n(6618),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(3160).call(this);var r,i,l,u,c,d,f=n(5108),p=this,h=this._init,m=this._update,g=a();return this._computeGradient=function(){var e,t,n,r,i;if(i=p.style("color"),!p._grad||p._gradColors!==i){for(t in r=(n=(e=document.createElement("canvas")).getContext("2d")).createLinearGradient(0,0,0,256),e.width=1,e.height=256,i)r.addColorStop(t,s.convertColorToRGBA(i[t]));n.fillStyle=r,n.fillRect(0,0,1,256),p._grad=n.getImageData(0,0,1,256).data,p._gradColors=i}return p},this._createCircle=function(){var e,t,n,r,i,o,a;if(n=p.style("radius"),i=p.style("blurRadius"),o=p.style("gaussian"),a=p.style("scaleWithZoom")){var s=this.layer().map().zoom();n*=a=Math.pow(2,s),i*=a}if(!p._circle||p._circle.gaussian!==o||p._circle.radius!==n||p._circle.blurRadius!==i){if(t=(e=p._circle=document.createElement("canvas")).getContext("2d"),r=i+n,e.width=e.height=2*r,o){var l=t.createRadialGradient(r,r,0,r,r,r);l.addColorStop(0,"rgba(255,255,255,1)"),l.addColorStop(.1,"rgba(255,255,255,0.946)"),l.addColorStop(.2,"rgba(255,255,255,0.801)"),l.addColorStop(.3,"rgba(255,255,255,0.607)"),l.addColorStop(.4,"rgba(255,255,255,0.411)"),l.addColorStop(.5,"rgba(255,255,255,0.249)"),l.addColorStop(.6,"rgba(255,255,255,0.135)"),l.addColorStop(.7,"rgba(255,255,255,0.066)"),l.addColorStop(.8,"rgba(255,255,255,0.029)"),l.addColorStop(.9,"rgba(255,255,255,0.011)"),l.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=l,t.fillRect(0,0,2*r,2*r)}else t.shadowOffsetX=t.shadowOffsetY=2*r,t.shadowBlur=i,t.shadowColor="black",t.beginPath(),t.arc(-r,-r,n,0,2*Math.PI,!0),t.closePath(),t.fill();e.radius=n,e.blurRadius=i,e.gaussian=o,p._circle=e}return p},this._colorize=function(e,t){var n,o,a,s=new Uint32Array(t.buffer),u=e.length;for(r&&r.length===u||(r=new ArrayBuffer(u),i=new Uint8ClampedArray(r),l=new Uint32Array(r)),n=3,a=0;n<u;n+=4,a+=1)(o=e[n])&&(l[a]=s[o]);e.set(i)},this._renderPoints=function(e,t,n,r){var i,o,a,s=p.gcsPosition(),l=p.intensity(),u=p.minIntensity(),c=p.maxIntensity()-u||1;for(i=n.length-1;i>=0;i-=1)o=t.worldToDisplay(s[i]),(a=(l(n[i],i)-u)/c)<=0||(e.globalAlpha=a<.01?.01:a>1?1:a,e.drawImage(p._circle,o.x-r,o.y-r))},this._renderBinnedData=function(e,t,n,r,i){var o,a,s,l,u,c,d,f,h=p.gcsPosition(),m=p.intensity(),g=p.minIntensity(),v=p.maxIntensity()-g||1,y=t.size(),b=[],x=Math.ceil(r/i),w=Math.ceil(y.width/i)+2*x+2,_=Math.ceil(y.height/i)+2*x+2,S=n.length;for(o=0;o<S;o+=1)a=t.worldToDisplay(h[o]),isNaN(a.x)||isNaN(a.y)||(void 0===d&&(d=(a.x%i+i)%i,f=(a.y%i+i)%i),(l=Math.floor((a.x-d)/i)+x+1)<0||l>=w||(u=Math.floor((a.y-f)/i)+x+1)<0||u>=_||(s=(m(n[o],o)-g)/v)<=0||(s>1&&(s=1),b[u]=b[u]||[],l*=4,(c=b[u])[l]?(c[l]+=s,c[l+1]+=(1-c[l+1])*s,c[l+2]+=a.x*s,c[l+3]+=a.y*s):(c[l]=c[l+1]=s,c[l+2]=a.x*s,c[l+3]=a.y*s)));for(u=b.length-1;u>=0;u-=1)if(c=b[u])for(l=c.length-4;l>=0;l-=4)c[l]&&(s=c[l+1],e.globalAlpha=s<.01?.01:s>1?1:s,e.drawImage(p._circle,c[l+2]/c[l]-r,c[l+3]/c[l]-r))},this._renderOnCanvas=function(e,t){if(g.timestamp()<p.buildTime().timestamp()){var n,r,i=Date.now(),o=p.data()||[],a=p.style("radius")+p.style("blurRadius"),s=p.binned(),l=p.layer(),f=t.size();if(p.style("scaleWithZoom")&&(a*=Math.pow(2,t.zoom())),!0===s||"auto"===s)if(s=Math.max(Math.floor(a/8),Math.max(1.5,Math.min(3,a/2.5))),"auto"===p.binned())Math.ceil((f.width+2*a)/s)*Math.ceil((f.height+2*a)/s)>=o.length&&(s=0);(s<1||isNaN(s))&&(s=!1),p._binned=s,e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,f.width,f.height),c="",a>.5&&a<8192&&(t.scheduleAnimationFrame(p._setTransform,!1),l.canvas().css({transform:""}),p._createCircle(),p._computeGradient(),s?p._renderBinnedData(e,t,o,a,s):p._renderPoints(e,t,o,a),n=l.canvas()[0],r=e.getImageData(0,0,n.width,n.height),p._colorize(r.data,p._grad),e.putImageData(r,0,0)),u={zoom:t.zoom(),gcsOrigin:t.displayToGcs({x:0,y:0},null),rotation:t.rotation(),lastScale:void 0,lastOrigin:{x:0,y:0},lastRotation:void 0},g.modified(),l.renderer().clearCanvas(!1),d=Date.now()-i}return p},this._init=function(){return h.call(p,t),p.geoOn(f.pan,p._animatePan),p},this._update=function(){return m.call(p),(p.buildTime().timestamp()<=p.dataTime().timestamp()||p.updateTime().timestamp()<p.timestamp())&&p._build(),p.updateTime().modified(),p},this._setTransform=function(){p.layer()&&p.layer().canvas()&&p.layer().canvas()[0]&&(p.layer().canvas()[0].style.transform=c)},this._animatePan=function(){if(u){var e=p.layer().map(),t=e.zoom(),n=Math.pow(2,t-u.zoom),r=e.gcsToDisplay(u.gcsOrigin,null),i=e.rotation();if(u.lastScale!==n||u.lastOrigin.x!==r.x||u.lastOrigin.y!==r.y||u.lastRotation!==i){var o=" translate("+r.x+"px,"+r.y+"px) scale("+n+") rotate("+180*(i-u.rotation)/Math.PI+"deg)";if(e.scheduleAnimationFrame(p._setTransform),c=o,u.lastScale=n,u.lastOrigin.x=r.x,u.lastOrigin.y=r.y,u.lastRotation=i,u.timeout&&(window.clearTimeout(u.timeout),u.timeout=void 0),1!==parseFloat(n.toFixed(4))||0!==parseFloat((i-u.rotation).toFixed(4))||0!==parseFloat(r.x.toFixed(1))||0!==parseFloat(r.y.toFixed(1))){var a=p.updateDelay();a=a<0&&d?d-Math.floor(1e3/60*a):d?2*d:100,u.timeout=window.setTimeout((function(){u.timeout=void 0,p.buildTime().modified(),p.layer().draw()}),p.updateDelay())}}}},p._init(t),this};r(l,o),i("canvas","heatmap",l),e.exports=l},7562:function(e,t,n){e.exports={canvasRenderer:n(3086),heatmapFeature:n(1225),isolineFeature:n(6025),lineFeature:n(7822),pixelmapFeature:n(1471),quadFeature:n(9895),textFeature:n(8124),tileLayer:n(5993),trackFeature:n(1546)}},6025:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2367),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(3160).call(this),this._init(t),this):new e(t)};r(a,o),i("canvas","isoline",a),e.exports=a},7822:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(3160);t=t||{},o.call(this,t),r.call(this);var i=this;return this._renderOnCanvas=function(e,t){var n,r,o,a,s,l=i.data(),u=i.position(),c=i.line(),d=i.style.get("strokeWidth"),f=i.style.get("strokeColor"),p=i.style.get("strokeOpacity"),h=i.style.get("lineCap"),m=i.style.get("lineJoin"),g=i.style.get("miterLimit")(l),v=i.style.get("closed"),y={},b={};l.forEach((function(t,l){if(!((r=c(t,l)).length<2)){for(b.closed=v(t,l),b.width=d(r[0],0,t,l),b.color=f(r[0],0,t,l),b.opacity=p(r[0],0,t,l),b.linecap=h(r[0],0,t,l),b.linejoin=m(r[0],0,t,l),b.strokeStyle="rgba("+255*b.color.g+", "+255*b.color.g+", "+255*b.color.b+", "+(void 0!==b.opacity?b.opacity:1)+")",y.strokeStyle===b.strokeStyle&&y.width===b.width&&y.linecap===b.linecap&&y.linejoin===b.linejoin&&y.miterlimit===b.miterlimit||(void 0!==y.strokeStyle&&e.stroke(),e.beginPath(),e.strokeStyle=b.strokeStyle,e.lineWidth=b.width,e.lineCap=b.linecap,e.lineJoin=b.linejoin,e.miterLimit=g),s=0;s<r.length;s+=1)o=i.featureGcsToDisplay(u(r[s],s,t,l)),s?e.lineTo(o.x,o.y):(a=o,e.moveTo(o.x,o.y));b.closed&&e.lineTo(a.x,a.y),n=y,y=b,b=n}})),void 0!==y.strokeStyle&&e.stroke()},this._init(t),this};r(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,i("canvas","line",a,s),e.exports=a},3160:function(e,t,n){e.exports=function e(t){"use strict";if(!(this instanceof n(3737)))return new e(t);var r=this,i=this.draw,o={};return this._renderOnCanvas=function(){},this._delayRender=function(){return!1},this._canvasProperty=function(e,t,n){return e&&t?(o[t]!==n&&(o[t]=n,e[t]=n),r):(o={},r)},this.draw=function(){return r.ready&&(r._update(),r.renderer()._render(),i()),r},this}},1471:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6374),a=n(5108),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(3160).call(this);var r,i=this._exit,l=this;return this.pointSearch=function(e,t){if(r&&l.m_info){var n=r.pointSearch(e,t);if(1===n.index.length&&n.extra&&n.extra[n.index[0]].basis){var i,o,a,s=n.extra[n.index[0]].basis;if(i=Math.floor(s.x*l.m_info.width),o=Math.floor(s.y*l.m_info.height),i>=0&&i<l.m_info.width&&o>=0&&o<l.m_info.height)return n={index:[a=l.m_info.indices[o*l.m_info.width+i]],found:[l.data()[a]]}}}return{index:[],found:[]}},this._preparePixelmap=function(){var e,t,n;if(s.isReadyImage(l.m_srcImage)){for(l.m_info={width:l.m_srcImage.naturalWidth,height:l.m_srcImage.naturalHeight,canvas:document.createElement("canvas")},l.m_info.canvas.width=l.m_info.width,l.m_info.canvas.height=l.m_info.height,l.m_info.context=l.m_info.canvas.getContext("2d"),l.m_info.context.drawImage(l.m_srcImage,0,0),l.m_info.imageData=l.m_info.context.getImageData(0,0,l.m_info.canvas.width,l.m_info.canvas.height),n=l.m_info.imageData.data,l.m_info.indices=new Array(n.length/4),l.m_info.area=n.length/4,l.m_info.mappedColors={},e=0;e<n.length;e+=4)t=n[e]+(n[e+1]<<8)+(n[e+2]<<16),l.m_info.indices[e/4]=t,l.m_info.mappedColors[t]||(l.m_info.mappedColors[t]={first:e/4}),l.m_info.mappedColors[t].last=e/4;return l.m_info}},this._computePixelmap=function(){var e,t,n,i,o,s,u,c,d,f,p=l.data()||[],h=l.style.get("color"),m=-1;if(!l.m_info){if(l.indexModified(void 0,"clear"),!l._preparePixelmap())return;f=!0}for(t in l.indexModified(void 0,"clear"),u=l.m_info.mappedColors,c=l.m_info.area,u)u.hasOwnProperty(t)&&(i=[255*((i=h(p[t],+t)||{}).r||0),255*(i.g||0),255*(i.b||0),void 0===i.a?255:255*i.a],u[t].update=!u[t].color||u[t].color[0]!==i[0]||u[t].color[1]!==i[1]||u[t].color[2]!==i[2]||u[t].color[3]!==i[3],u[t].update&&(u[t].color=i,c=Math.min(u[t].first,c),m=Math.max(u[t].last,m)));if(!(c>=m)){for(o=l.m_info.imageData.data,s=l.m_info.indices,e=c;e<=m;e+=1)(t=s[e])!==n&&(n=t,i=u[t].color,d=u[t].update),d&&(o[4*e]=i[0],o[4*e+1]=i[1],o[4*e+2]=i[2],o[4*e+3]=i[3]);l.m_info.context.putImageData(l.m_info.imageData,0,0,0,Math.floor(c/l.m_info.width),l.m_info.width,Math.ceil((m+1)/l.m_info.width)),r||(r=l.layer().createFeature("quad",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([r]),r.style({image:l.m_info.canvas,position:l.style.get("position")}).data([{}]).draw()),f&&l.geoTrigger(a.pixelmap.prepared,{pixelmap:l})}},this._exit=function(){return r&&l.layer()&&(l.layer().deleteFeature(r),r=null,l.dependentFeatures([])),i(),l},this._init(t),this};r(l,o),i("canvas","pixelmap",l),e.exports=l},9895:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=n(4634),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(3160).call(this);var r,i=n(5638),s=this,l=this._exit,u=this._init,c=this._update;return this._build=function(){s.position()&&((r=s._generateQuads()).imgQuads&&r.imgQuads.sort((function(e,t){return e.pos[2]-t.pos[2]})),s.buildTime().modified())},this._checkQuadUpdate=function(e,t){s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._checkIfChanged=function(){if(r&&r.vidQuads&&r.vidQuads.length){var e=!1,t=!1;i.each(r.vidQuads,(function(n,r){r.video&&void 0!==r.video.HAVE_CURRENT_DATA&&(!r.video.seeking&&r.video.readyState>=r.video.HAVE_CURRENT_DATA&&(e=!0),r.video.paused&&!r.video.seeking||(t=!0))})),e&&s.renderer()&&s.renderer()._render(),t&&s.layer().map().scheduleAnimationFrame(s._checkIfChanged)}},this._renderColorQuads=function(e,t){if(r.clrQuads&&r.clrQuads.length){var n=e.globalAlpha,o=n;i.each(r.clrQuads,(function(n,r){var i=t.gcsToDisplay({x:r.pos[0],y:r.pos[1]},null),s=t.gcsToDisplay({x:r.pos[3],y:r.pos[4]},null),l=t.gcsToDisplay({x:r.pos[6],y:r.pos[7]},null),u=t.gcsToDisplay({x:r.pos[9],y:r.pos[10]},null);r.opacity!==o&&(o=r.opacity,e.globalAlpha=o),e.fillStyle=a.convertColorToHex(r.color,!0),e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(s.x,s.y),e.lineTo(u.x,u.y),e.lineTo(l.x,l.y),e.closePath(),e.fill()})),o!==n&&(e.globalAlpha=n)}},this._renderImageAndVideoQuads=function(e,t){if(r.imgQuads&&r.imgQuads.length||r.vidQuads&&r.vidQuads.length){var n=e.globalAlpha,o=n;i.each([r.imgQuads,r.vidQuads],(function(n,r){r&&i.each(r,(function(n,r){var i,a,s;if(r.image)a=(i=r.image).width,s=i.height;else if(r.video&&(a=(i=r.video).videoWidth,s=i.videoHeight,i.seeking))return;if(i&&a&&s&&!(r.opacity<=0)){var l=t.gcsToDisplay({x:r.pos[0],y:r.pos[1]},null),u=t.gcsToDisplay({x:r.pos[6],y:r.pos[7]},null),c=t.gcsToDisplay({x:r.pos[9],y:r.pos[10]},null);if(e.setTransform((c.x-u.x)/a,(c.y-u.y)/a,(l.x-u.x)/s,(l.y-u.y)/s,u.x,u.y),r.opacity!==o&&(o=r.opacity,e.globalAlpha=o),r.crop){var d=Math.min(a,r.crop.x||a),f=Math.min(s,r.crop.y||s),p=Math.max(0,r.crop.left||0),h=Math.max(0,r.crop.top||0),m=Math.min(a,r.crop.right||a),g=Math.min(s,r.crop.bottom||s);a&&s&&d>0&&f>0&&m>p&&g>h&&e.drawImage(i,p,h,Math.floor((m-p)*d/a),Math.floor((g-h)*f/s),0,0,d,f)}else e.drawImage(i,0,0)}}))})),o!==n&&(e.globalAlpha=n),e.setTransform(1,0,0,1,0,0)}},this._delayRender=function(){var e=!1;return r&&r.vidQuads&&r.vidQuads.length&&i.each(r.vidQuads,(function(t,n){n.video&&void 0!==n.video.HAVE_CURRENT_DATA&&(e|=n.video.seeking&&n.delayRenderWhenSeeking)})),e},this._renderOnCanvas=function(e,t){r&&(s._renderImageAndVideoQuads(e,t),s._renderColorQuads(e,t))},this._update=function(){c.call(s),(s.buildTime().timestamp()<=s.dataTime().timestamp()||s.updateTime().timestamp()<s.timestamp())&&s._build(),s.updateTime().modified(),s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._init=function(){u.call(s,t)},this._exit=function(){l.call(s)},s._init(t),this};r(s,o);var l={};l[o.capabilities.color]=!0,l[o.capabilities.image]=!0,l[o.capabilities.imageCrop]=!0,l[o.capabilities.imageFixedScale]=!0,l[o.capabilities.imageFull]=!1,l[o.capabilities.canvas]=!0,l[o.capabilities.video]=!0,i("canvas","quad",s,l),e.exports=s},8124:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(9757),a=n(4634),s=n(8054),l=n(5365),u=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(3160);t=t||{},o.call(this,t),r.call(this);var i=this,u="bold 16px sans-serif",c=new RegExp('^\\s*(?=(?:(?:[-a-z0-9]+\\s+){0,3}(italic|oblique))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(small-caps))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(bold(?:er)?|lighter|[1-9]00))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}((?:ultra-|extra-|semi-)?(?:condensed|expanded)))?)(?:(?:normal|\\1|\\2|\\3|\\4)\\s+){0,4}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:/(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s+([-,\\"\\sa-z]+?)\\s*$',"i");return this.getFontFromStyles=function(e,t,n){var r=i.style.get("font")(t,n)||u;if(e){var o=c.exec(r);null===o&&(o=c.exec(u)),o[1]=i.style.get("fontStyle")(t,n)||o[1],o[2]=i.style.get("fontVariant")(t,n)||o[2],o[3]=i.style.get("fontWeight")(t,n)||o[3],o[4]=i.style.get("fontStretch")(t,n)||o[4],o[5]=i.style.get("fontSize")(t,n)||o[5]||"16px",o[6]=i.style.get("lineHeight")(t,n)||o[6],o[7]=i.style.get("fontFamily")(t,n)||o[7]||"sans-serif",r=(r=(o[1]||"")+" "+(o[2]||"")+" "+(o[3]||"")+" "+(o[4]||"")+" "+(o[5]||"")+(o[6]?"/"+o[6]:"")+" "+o[7]).trim().replace(/\s\s+/g," ")}return r},this._renderOnCanvas=function(e,t){var n,r,o,u,c,d,f,p,h,m,g,v,y,b,x=i.data(),w=i.style.get("position"),_=i.style.get("renderThreshold")(x),S=i.style.get("text"),C=t.rotation(),A=t.zoom(),T=t.size(),P=a.mat3AsArray();n=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily"].some((function(e){return null!==i.style(e)&&void 0!==i.style(e)})),i._canvasProperty(),o=i.featureGcsToDisplay(x.map(w)),x.forEach((function(t,x){u=o[x],_>0&&(u.x<-_||u.x>T.width+_||u.y<-_||u.y>T.height+_)||((c=i.style.get("visible")(t,x))||void 0===c)&&(d=a.convertColorAndOpacity(i.style.get("color")(t,x),i.style.get("textOpacity")(t,x)),p=a.convertColorAndOpacity(i.style.get("textStrokeColor")(t,x),i.style.get("textOpacity")(t,x),{r:0,g:0,b:0,a:0}),0===d.a&&0===p.a||(i._canvasProperty(e,"fillStyle",a.convertColorToRGBA(d)),r=S(t,x),i._canvasProperty(e,"font",i.getFontFromStyles(n,t,x)),i._canvasProperty(e,"textAlign",i.style.get("textAlign")(t,x)||"center"),i._canvasProperty(e,"textBaseline",i.style.get("textBaseline")(t,x)||"middle"),m=i.style.get("rotation")(t,x)||0,g=i.style.get("rotateWithMap")(t,x)&&C,v=i.style.get("textScaled")(t,x),v=a.isNonNullFinite(v)?Math.pow(2,A-v):null,y=i.style.get("offset")(t,x),b=a.mat3AsArray(),(m||g||v&&1!==v||y&&(y.x||y.y))&&(s.translate(b,b,[u.x,u.y]),g&&C&&s.rotate(b,b,C),s.translate(b,b,[y&&y.x?+y.x:0,y&&y.y?+y.y:0]),m&&s.rotate(b,b,m),v&&1!==v&&s.scale(b,b,[v,v]),s.translate(b,b,[-u.x,-u.y])),P[0]===b[0]&&P[1]===b[1]&&P[3]===b[3]&&P[4]===b[4]&&P[6]===b[6]&&P[7]===b[7]||(e.setTransform(b[0],b[1],b[3],b[4],b[6],b[7]),s.copy(P,b)),(d=a.convertColorAndOpacity(i.style.get("shadowColor")(t,x),void 0,{r:0,g:0,b:0,a:0})).a&&(y=i.style.get("shadowOffset")(t,x),f=i.style.get("shadowBlur")(t,x)),d.a&&(y&&(y.x||y.y)||f)?(i._canvasProperty(e,"shadowColor",a.convertColorToRGBA(d)),y&&(m||g)&&i.style.get("shadowRotate")(t,x)&&(b=[+y.x,+y.y,0],l.rotateZ(b,b,[0,0,0],m+(g?C:0)),y={x:b[0],y:b[1]}),i._canvasProperty(e,"shadowOffsetX",y&&y.x?+y.x:0),i._canvasProperty(e,"shadowOffsetY",y&&y.y?+y.y:0),i._canvasProperty(e,"shadowBlur",f||0)):i._canvasProperty(e,"shadowColor","rgba(0,0,0,0)"),p.a&&(h=i.style.get("textStrokeWidth")(t,x),isFinite(h)&&h>0&&(i._canvasProperty(e,"strokeStyle",a.convertColorToRGBA(p)),i._canvasProperty(e,"lineWidth",h),e.strokeText(r,u.x,u.y),i._canvasProperty(e,"shadowColor","rgba(0,0,0,0)"))),e.fillText(r,u.x,u.y)))})),i._canvasProperty(e,"globalAlpha",1),e.setTransform(1,0,0,1,0,0)},this};r(u,o);i("canvas","text",u,{}),e.exports=u},5993:function(e,t,n){var r=function(){"use strict";var e,t=this,n=this._init,r=this._exit,i=this._update,o=0,a=[];this._drawTile=function(n){if(e){var r=t._tileBounds(n),i=n.index.level||0,s=t._tileOffset(i),l=t.tileCropFromBounds(n),u={};l&&(u.crop=l),u.ul=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.top-s.y},i),0),u.ll=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.bottom-s.y},i),0),u.ur=t.fromLocal(t.fromLevel({x:r.right-s.x,y:r.top-s.y},i),0),u.lr=t.fromLocal(t.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,a.push(u),e.data(a),e._update(),t.draw()}},this._remove=function(n){if(void 0!==n.quadId&&e){for(var r=0;r<a.length;r+=1)if(a[r].id===n.quadId){a.splice(r,1);break}e.data(a),e._update(),t.draw()}},this._update=function(n){return i.call(t,n),t._addBaseQuadToTiles(e,a),t},this._exit=function(){t.deleteFeature(e),e=null,a=[],r.apply(t,arguments)},this._init=function(){n.apply(t,arguments),(e=t.createFeature("quad",{previewColor:t._options.previewColor,previewImage:t._options.previewImage})).geoTrigger=void 0,e.gcs(t._options.gcs||t.map().gcs()),e.data(a),e._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("canvas","tile",r),e.exports=r},1546:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(3160).call(this),this._init(t),this):new e(t)};r(a,o),i("canvas","track",a),e.exports=a},8719:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=n(4634).ensureFunction;delete t.layer,delete t.renderer;var a=n(2531).d3,s=this,l=this._init,u=r.extend({},{colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}],scale:a.scale.quantize(),geoId:function(e){return e.properties.GEO_ID},scalarId:function(e){return e.id},scalarValue:function(e){return e.value}},t);return this.featureType="choropleth",this.scalar=function(e,t){var n,r;return void 0===e?s.choropleth.get("scalar")()||[]:(n=s.choropleth.get("scalarId"),r=s.choropleth.get("scalarValue"),u.scalar=e,u.scalarAggregator=t||a.mean,u.scalar._dictionary=e.reduce((function(e,t){var i,o;return i=n(t),o=r(t),e[i]=e[i]?e[i].push(o):[o],e}),{}),s.dataTime().modified(),s)},this.choropleth=function(e,t){var n;return void 0===e?u:"string"==typeof e&&void 0===t?u[e]:(void 0===t?(n=r.extend({},u,e),u=n):u[e]=t,s.modified(),s)},this.choropleth.get=function(e){var t,n={};if(void 0===e){for(t in u)u.hasOwnProperty(t)&&(n[t]=s.choropleth.get(t));return n}return o(u[e])},this._featureToPolygons=function(e,t){var n=s.layer().createFeature("polygon",{});return"Polygon"===e.geometry.type?n.data([{type:"Polygon",coordinates:e.geometry.coordinates}]):"MultiPolygon"===e.geometry.type&&n.data(e.geometry.coordinates.map((function(e){return{type:"Polygon",coordinates:e}}))),n.polygon((function(e){return{outer:e.coordinates[0],inner:e.coordinates[1]}})).position((function(e){return{x:e[0],y:e[1]}})).style({fillColor:t}),n},this._generateScale=function(e){var t=a.extent(s.scalar(),e||void 0);return s.choropleth().scale.domain(t).range(s.choropleth().colorRange),s},this.createChoropleth=function(){var e=s.choropleth,t=s.data(),n=s.scalar(),r=e.get("scalarValue"),i=e.get("geoId");return s._generateScale(r),t.map((function(t){var r=i(t),o=n._dictionary[r],a=e().scalarAggregator(o),l=s.choropleth().scale(a);return s._featureToPolygons(t,l)}))},this._init=function(e){return l.call(s,e),u&&s.dataTime().modified(),s},this._init(t),this};r(o,i),e.exports=o},9005:function(e,t,n){var r=n(5699),i=n(9146),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),o=n(4634),a=n(9244);t=t||{},i.call(this,t);var s=this,l=this._init;return this._createContours=function(){return a.createColoredMesh(s,!1)},this.contour=s.mesh,this._init=function(e){l.call(s,e);var t=r.extend({},{opacity:1,value:function(e,t){return o.isNonNullFinite(e)?e:s.position()(e,t).z},position:function(e){return e||{x:0,y:0}},origin:function(e){return e.length>=3?[e[0],e[1],0]:[0,0,0]}},void 0===e.style?{}:e.style);s.style(t),s.contour(r.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},e.mesh||{},e.contour||{})),(e.mesh||e.contour)&&s.dataTime().modified()},this._init(t),this};r(o,i),e.exports=o},2805:function(e,t,n){var r=n(5699),i=n(3234),o=n(4647).registerRenderer,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t),t=t||{};var n=this;return this.api=function(){return"dom"},this._init=function(e){var t=n.layer().node();return!n.canvas()&&t&&t.length&&n.canvas(t[0]),n},this._init(t),this};r(a,i),o("dom",a),e.exports=a},5108:function(e){var t={layerAdd:"geo_layerAdd",layerRemove:"geo_layerRemove",zoom:"geo_zoom",rotate:"geo_rotate",pan:"geo_pan",resize:"geo_resize",draw:"geo_draw",drawEnd:"geo_drawEnd",unhidden:"geo_unhidden",hidden:"geo_hidden",mousemove:"geo_mousemove",mouseclick:"geo_mouseclick",brush:"geo_brush",brushend:"geo_brushend",brushstart:"geo_brushstart",select:"geo_select",zoomselect:"geo_zoomselect",unzoomselect:"geo_unzoomselect",actiondown:"geo_actiondown",actionmove:"geo_actionmove",actionup:"geo_actionup",actionselection:"geo_actionselection",actionwheel:"geo_actionwheel",keyaction:"geo_keyaction",transitionstart:"geo_transitionstart",transitionend:"geo_transitionend",transitioncancel:"geo_transitioncancel",parallelprojection:"geo_parallelprojection",feature:{mousemove:"geo_feature_mousemove",mouseover:"geo_feature_mouseover",mouseover_order:"geo_feature_mouseover_order",mouseout:"geo_feature_mouseout",mouseon:"geo_feature_mouseon",mouseoff:"geo_feature_mouseoff",mouseclick:"geo_feature_mouseclick",mouseclick_order:"geo_feature_mouseclick_order",brushend:"geo_feature_brushend",brush:"geo_feature_brush"},pixelmap:{prepared:"geo_pixelmap_prepared"},screenshot:{ready:"geo_screenshot_ready"},camera:{}};t.camera.view="geo_camera_view",t.camera.projection="geo_camera_projection",t.camera.viewport="geo_camera_viewport",t.annotation={},t.annotation.add="geo_annotation_add",t.annotation.add_before="geo_annotation_add_before",t.annotation.update="geo_annotation_update",t.annotation.coordinates="geo_annotation_coordinates",t.annotation.select_edit_handle="geo_annotation_select_edit_handle",t.annotation.edit_action="geo_annotation_edit_action",t.annotation.remove="geo_annotation_remove",t.annotation.state="geo_annotation_state",t.annotation.mode="geo_annotation_mode",e.exports=t},6837:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=n(5638),o=n(5699),a=n(5358),s=n(6618),l=n(6853),u=n(5108),c=function e(t){"use strict";if(!(this instanceof e))return new e(t);a.call(this);var r=n(4634);t=t||{};var o,c=this,d=this._exit,f=this.geoOn,p=this.geoOff,h=void 0===t.selectionAPI?"auto":t.selectionAPI,m={},g=void 0===t.layer?null:t.layer,v=t.gcs,y=void 0===t.visible||t.visible,b=void 0===t.bin?null:t.bin,x=void 0===t.renderer||g&&t.renderer===g.renderer()?null:t.renderer,w=s(),_=s(),S=s(),C=[],A=[];return this._subfeatureStyles={},Object.defineProperty(this,"ready",{get:function(){return o}}),this._bindMouseHandlers=function(){c.selectionAPI()&&(c._unbindMouseHandlers(),c.geoOn(u.mousemove,c._handleMousemove),c.geoOn(u.mouseclick,c._handleMouseclick),c.geoOn(u.brushend,c._handleBrushend),c.geoOn(u.brush,c._handleBrush))},this._unbindMouseHandlers=function(){c.geoOff(u.mousemove,c._handleMousemove),c.geoOff(u.mouseclick,c._handleMouseclick),c.geoOff(u.brushend,c._handleBrushend),c.geoOff(u.brush,c._handleBrush)},this.pointSearch=function(e,t){return{index:[],found:[]}},this.boxSearch=function(e,t,n,r){return c.polygonSearch([e,{x:e.x,y:t.y},t,{x:t.x,y:e.y}],n,r)},this.polygonSearch=function(e,t,n){return{index:[],found:[]}},this._handleMousemove=function(t){var n,r=c.layer().map().interactor().mouse(),i=c.data(),o=c.pointSearch(r.geo),a=[],s=[],l=-1,d=-1;(A.length||o.index.length)&&(n=o.extra||{},o.index.length>1&&c.geoTrigger(u.feature.mouseover_order,{feature:c,mouse:r,previous:A,over:o,sourceEvent:t}),A.length&&(l=A[A.length-1]),a=o.index.filter((function(e){return A.indexOf(e)<0})),s=A.filter((function(e){return o.index.indexOf(e)<0})),e.eventID+=1,a.forEach((function(o,s){c.geoTrigger(u.feature.mouseover,{data:i[o],index:o,extra:n[o],mouse:r,eventID:e.eventID,top:s===a.length-1,sourceEvent:t},!0)})),e.eventID+=1,s.forEach((function(n,o){c.geoTrigger(u.feature.mouseout,{data:i[n],index:n,mouse:r,eventID:e.eventID,top:o===s.length-1,sourceEvent:t},!0)})),e.eventID+=1,o.index.forEach((function(a,s){c.geoTrigger(u.feature.mousemove,{data:i[a],index:a,extra:n[a],mouse:r,eventID:e.eventID,top:s===o.index.length-1,sourceEvent:t},!0)})),(A=o.index).length&&(d=A[A.length-1]),l!==d&&(-1!==l&&c.geoTrigger(u.feature.mouseoff,{data:i[l],index:l,mouse:r,sourceEvent:t},!0),-1!==d&&c.geoTrigger(u.feature.mouseon,{data:i[d],index:d,extra:n[d],mouse:r,sourceEvent:t},!0)))},this._clearSelectedFeatures=function(){return A=[],c},this._handleMouseclick=function(t){var n=c.layer().map().interactor().mouse(),r=c.data(),i=c.pointSearch(n.geo),o=i.extra||{};i.index.length>1&&c.geoTrigger(u.feature.mouseclick_order,{feature:c,mouse:n,over:i,sourceEvent:t}),n.buttonsDown=t.buttonsDown,e.eventID+=1,i.index.forEach((function(a,s){c.geoTrigger(u.feature.mouseclick,{data:r[a],index:a,extra:o[a],mouse:n,eventID:e.eventID,top:s===i.index.length-1,sourceEvent:t},!0)}))},this._handleBrush=function(t){var n=[t.gcs.lowerLeft,t.gcs.lowerRight,t.gcs.upperRight,t.gcs.upperLeft];if(c.layer()){var r=c.layer().map();n=l.transformCoordinates(r.gcs(),r.ingcs(),n)}var i=c.polygonSearch(n);e.eventID+=1,i.index.forEach((function(n,r){c.geoTrigger(u.feature.brush,{data:i.found[r],index:n,mouse:t.mouse,brush:t,eventID:e.eventID,top:r===i.index.length-1},!0)}))},this._handleBrushend=function(t){var n=[t.gcs.lowerLeft,t.gcs.lowerRight,t.gcs.upperRight,t.gcs.upperLeft];if(c.layer()){var r=c.layer().map();n=l.transformCoordinates(r.gcs(),r.ingcs(),n)}var i=c.polygonSearch(n);e.eventID+=1,i.index.forEach((function(n,r){c.geoTrigger(u.feature.brushend,{data:i.found[r],index:n,mouse:t.mouse,brush:t,eventID:e.eventID,top:r===i.index.length-1},!0)}))},this.style=function(e,t){return void 0===e?m:"string"==typeof e&&void 0===t?m[e]:void 0===t?(m=i.extend({},m,e),c.modified(),c):(m[e]=t,c.modified(),c)},this.style.get=function(e){var t;if(void 0===e){var n,i={};for(n in m)m.hasOwnProperty(n)&&(i[n]=c.style.get(n));return i}return t=e.toLowerCase().match(/color$/)?r.isFunction(m[e])?function(){return r.convertColor(m[e].apply(c,arguments))}:r.ensureFunction(r.convertColor(m[e])):r.ensureFunction(m[e]),t},this.updateStyleFromArray=function(e,t,n){if("string"!=typeof e)i.each(e,(function(e,t){c.updateStyleFromArray(e,t)}));else{var r;if(e.toLowerCase().match(/color$/)&&(r={r:0,g:0,b:0}),!Array.isArray(t))return c;c._subfeatureStyles[e]?t.length&&Array.isArray(t[0])?c.style(e,(function(e,n,i,o){var a=(t[o]||[])[n];return void 0!==a?a:r})):c.style(e,(function(e,n,i,o){var a=t[o];return void 0!==a?a:r})):c.style(e,(function(e,n){var i=t[n];return void 0!==i?i:r}))}return n&&c.visible()&&c.draw(),c},this.layer=function(){return g},this.renderer=function(){return x||g&&g.renderer()},this.gcs=function(e){return void 0===e?null==v&&g?g.map().ingcs():v:(v=e,c.modified(),c)},this.featureGcsToDisplay=function(e){var t=g.map();return e=t.gcsToWorld(e,c.gcs()),e=t.worldToDisplay(e),c.renderer().baseToLocal&&(e=c.renderer().baseToLocal(e)),e},this.visible=function(e,t){if(void 0===e)return!(!t&&g&&g.visible&&!g.visible())&&y;if(y!==e||t){y=e,c.modified(),g&&g.visible&&!g.visible()&&(e=!1),e?c._bindMouseHandlers():c._unbindMouseHandlers();for(var n=0;n<C.length;n+=1)C[n].visible(y,t)}return c},this.dependentFeatures=function(e){return void 0===e?C.slice():(C=e.slice(),c)},this.bin=function(e,t){if(void 0===e){if(null===b&&!t){var n=c.parent(),i=n?n.children().indexOf(c):-1;return i>=0?i:0}return b}return b=r.isNonNullFinite(e)?parseInt(e,10):null,c.modified(),c},this.dataTime=function(e){return void 0===e?w:(w=e,c.modified(),c)},this.buildTime=function(e){return void 0===e?_:(_=e,c.modified(),c)},this.updateTime=function(e){return void 0===e?S:(S=e,c.modified(),c)},this.data=function(e){return void 0===e?c.style("data")||[]:(c.style("data",e),c.dataTime().modified(),c.modified(),c)},this.selectionAPI=function(e,t){return void 0===e?!(!t&&g&&g.selectionAPI&&!g.selectionAPI())&&(t||"auto"!==h?h:!!c.geoIsOn(Object.values(u.feature))):("auto"!==e&&(e=!!e),(e!==h||t)&&(h=e,c._unbindMouseHandlers(),c._bindMouseHandlers()),c)},this.mouseOverOrderHighestIndex=function(e){e.over.index.sort();var t=e.feature.data();e.over.index.forEach((function(n,r){e.over.found[r]=t[n]}))},this._init=function(e){if(!g)throw new Error("Feature requires a valid layer");m=i.extend({},{opacity:1},void 0===e.style?{}:e.style),c._bindMouseHandlers(),o=!0},this._build=function(){},this._update=function(){},this.geoOn=function(e,t){var n="auto"===c.selectionAPI(void 0,!0),r=n&&c.selectionAPI(),i=f.apply(c,arguments);return n&&!r&&c.selectionAPI()&&c._bindMouseHandlers(),i},this.geoOff=function(e,t){var n="auto"===c.selectionAPI(void 0,!0),r=n&&c.selectionAPI(),i=p.apply(c,arguments);return n&&r&&!c.selectionAPI()&&c._unbindMouseHandlers(),i},this._exit=function(){c._unbindMouseHandlers(),A=[],m={},d(),o=!1},this._init(t),this};c.eventID=0,c.create=function(e,t){"use strict";if(!(e instanceof n(9105)))return console.warn("Invalid layer"),null;if("object"!==r(t))return console.warn("Invalid spec"),null;var i=t.type,o=e.createFeature(i,t);return o?(t.data=t.data||[],o.style(t)):(console.warn('Could not create feature type "'+i+'"'),null)},o(c,a),e.exports=c},3715:function(e,t,n){var r=n(5699),i=n(9105),o=n(5108),a=n(4647),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var n=this,r=[],s=this._init,l=this._exit,u=this._update,c=this.visible,d=this.selectionAPI,f=this.draw;return this.createFeature=function(e,t){var r=a.createFeature(e,n,n.renderer(),t);return r?n.addFeature(r):console.warn("Layer renderer ("+n.rendererName()+') does not support feature type "'+e+'"'),r},this.addFeature=function(e){return n.removeFeature(e),n.addChild(e),r.push(e),n.dataTime().modified(),n.modified(),n},this.removeFeature=function(e){var t;return(t=r.indexOf(e))>=0&&(r.splice(t,1),n.removeChild(e),n.dataTime().modified(),n.modified()),n},this.deleteFeature=function(e){return e&&(r.indexOf(e)>=0&&e._exit(),n.removeFeature(e)),n},this.features=function(e){if(void 0===e)return r.slice();var t,i=r.slice();for(t=0;t<i.length;t+=1)e.indexOf(i[t])<0&&r.indexOf(i[t])>=0&&n.deleteFeature(i[t]);for(t=0;t<e.length;t+=1)n.addFeature(e[t]);return n},this.gcsFeatures=function(e){var t,r;return void 0===e?(this.features().forEach((function(e){void 0===t?t=e.gcs():e.gcs()!==t&&(r=!0)})),r?void 0:t):(n.features().forEach((function(t){t.gcs()!==e&&t.gcs(e)})),n)},this._init=function(){return n.initialized()||(s.call(n,!0),n.geoOn(o.resize,(function(e){n.renderer()?(n.renderer()._resize(e.x,e.y,e.width,e.height),n._update({event:e}),n.renderer()._render()):n._update({event:e})})),n.geoOn(o.pan,(function(e){n._update({event:e}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.rotate,(function(e){n._update({event:e}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.zoom,(function(e){n._update({event:e}),n.renderer()&&n.renderer()._render()}))),n},this._update=function(e){var t;if(!r.length)return n;if(u.call(n,e),n.dataTime().timestamp()>n.updateTime().timestamp())for(t=0;t<r.length;t+=1)r[t].renderer(n.renderer());for(t=0;t<r.length;t+=1)r[t]._update();return n.updateTime().modified(),n},this._exit=function(){n.clear(),l()},this.draw=function(){return n.visible()&&(f(),n.renderer()&&n.renderer()._render()),n},this.visible=function(e){if(void 0===e)return c();if(n.visible()!==e){c(e);var t,i=r.slice();for(t=0;t<i.length;t+=1)i[t].visible(i[t].visible(void 0,!0),!0);e&&n.draw()}return n},this.selectionAPI=function(e){if(void 0===e)return d();if(n.selectionAPI()!==e){d(e);var t,i=r.slice();for(t=0;t<i.length;t+=1)i[t].selectionAPI(i[t].selectionAPI(void 0,!0),!0)}return n},this.clear=function(){for(;r.length;)n.deleteFeature(r[0]);return n},n};r(s,i),a.registerLayer("feature",s),e.exports=s},3705:function(e,t,n){var r=n(5638);e.exports=function e(t){if(!(this instanceof e))return new e(t);t=t||{},this._size=t.size||6,this._initialSize=t.initialSize||0,this._track=t.track||600,this._needed=t.needed||null,this._batch=!1;var n=this,i=1;return Object.defineProperty(this,"size",{get:function(){return n._size},set:function(e){n._size=e,n._initialSize>1&&e<n._initialSize&&(n._initialSize=e),n.next_item()}}),Object.defineProperty(this,"initialSize",{get:function(){return n._initialSize},set:function(e){n._initialSize=e,n.next_item()}}),Object.defineProperty(this,"length",{get:function(){return n._queue.length}}),Object.defineProperty(this,"processing",{get:function(){return n._processing}}),this.clear=function(){return n._queue=[],n._processing=0,n},this.add=function(e,t,i){if(e.__fetchQueue){var o=r.inArray(e,n._queue);if(o>=0)return n._queue.splice(o,1),n._addToQueue(e,i),e}var a=r.Deferred(),s=r.Deferred();return a.done((function(){r.when(t.call(e)).always(s.resolve)})).fail(s.resolve),e.__fetchQueue=a,n._addToQueue(e,i),r.when(a,s).always((function(){n._processing>0&&(n._processing-=1),n._initialSize=0,n.next_item()})).promise(e),n.next_item(),e},this._addToQueue=function(e,t){if(e.__fetchQueue._batch=n._batch,t)n._queue.push(e);else if(this._batch){for(var r=0;r<n._queue.length&&n._queue[r].__fetchQueue._batch===n._batch;r+=1);n._queue.splice(r,0,e)}else n._queue.unshift(e)},this.get=function(e){return r.inArray(e,n._queue)},this.remove=function(e){var t=r.inArray(e,n._queue);return t>=0&&(n._queue.splice(t,1),!0)},this.batch=function(e){return void 0===e?n._batch:(e?(n._batch=i,i+=1):n._batch=!1,n)},this.next_item=function(){if(!n._innextitem){if(n._innextitem=!0,n._queue.length>n._track&&n._needed)for(var e=n._queue.length-1;e>=0;e-=1)if(!n._needed(n._queue[e])){var t=n._queue.splice(e,1)[0];n._processing+=1,t.__fetchQueue.reject(),delete t.__fetchQueue}for(;n._processing<(n._initialSize||n._size)&&n._queue.length;){var r=n._queue.shift();if(r.__fetchQueue)n._processing+=1,!n._needed||n._needed(r)?r.__fetchQueue.resolve():r.__fetchQueue.reject(),delete r.__fetchQueue}n._innextitem=!1}},this.clear(),this}},407:function(e,t,n){var r=n(5699),i=n(3715),o=n(3737),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);if(o.call(this),!((t=t||{}).layer instanceof i))throw new Error("fileReader must be given a feature layer");var n=t.layer;return this.layer=function(){return n},this.canRead=function(e){return!1},this.read=function(e,t,n){var r=new Promise((function(e,n){throw t&&t(!1),new Error("The default file reader always fails")}));return this.addPromise(r),r},this._getString=function(e,t,n){var r=function(e,t){var n=new FileReader;return t&&(n.onprogress=t),n.onloadend=function(){e(n.error||n.result)},n}(t,n);r.readAsText(e)},this};r(a,o),e.exports=a},3088:function(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(5699),s=n(4647).registerFileReader,l=n(407),u=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),a=n(4634).convertColor,s=this,u=i(i({},t),{},{pointStyle:i({fill:!0,fillColor:"#ff7800",fillOpacity:.8,stroke:!0,strokeColor:"#000",strokeWidth:1,strokeOpacity:1,radius:8},t.pointStyle),lineStyle:i({strokeColor:"#ff7800",strokeWidth:4,strokeOpacity:.5,strokeOffset:0,lineCap:"butt",lineJoin:"miter",closed:!1},t.lineStyle),polygonStyle:i({fill:!0,fillColor:"#b0de5c",fillOpacity:.8,stroke:!0,strokeColor:"#999999",strokeWidth:2,strokeOpacity:1},t.polygonStyle)});l.call(this,u),this.canRead=function(e){if(e instanceof File||e instanceof Blob)return!!("application/json"===e.type||e.name&&e.name.match(/\.json$/));if("string"==typeof e){try{JSON.parse(e)}catch(e){return!1}return!0}try{if(Array.isArray(s._featureArray(e)))return!0}catch(e){}return!1},this._readObject=function(e,t,n){var i;function o(e){try{i=JSON.parse(e),t(i)}catch(n){i||r.ajax({type:"GET",url:e,dataType:"text"}).done((function(e){try{i=JSON.parse(e),t(i)}catch(e){i||t(!1)}})).fail((function(){t(!1)}))}}e instanceof File||e instanceof Blob?s._getString(e,o,n):"string"==typeof e?o(e):t(e)},this._featureArray=function(e){var t,n=[];switch(e.type){case"FeatureCollection":t=e.features;break;case"Feature":t=[e];break;case"GeometryCollection":t=e.geometries.map((function(e){return{type:"Feature",geometry:e,properties:{}}}));break;case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":t=[{type:"Feature",geometry:e,properties:{}}];break;default:throw new Error("Invalid json type")}return t.forEach((function(e){Array.prototype.push.apply(n,s._feature(e))})),n=n.filter((function(e){return e.geometry&&e.geometry.coordinates&&e.geometry.coordinates.length}))},this._feature=function(e){if("Feature"!==e.type)throw new Error("Invalid feature object");switch(e.geometry.type){case"Point":case"LineString":case"Polygon":return[e];case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.geometry.coordinates.map((function(t){return{type:"Feature",geometry:{type:e.geometry.type.replace("Multi",""),coordinates:t},properties:e.properties}}));default:throw new Error("Invalid geometry type")}},this._position=function(e){return{x:e[0],y:e[1],z:e[2]||0}},this._style=function(e,t){var n=e.toLowerCase().match(/color$/);return n&&(t=a(t)),function(r,i,o,s){var l;return void 0!==(l=void 0!==o&&o.properties?o.properties:r.properties)&&l.hasOwnProperty(e)?n?a(l[e]):l[e]:t}},this.read=function(e,t,n){var r=new Promise((function(r,a){s._readObject(e,(function(e){if(!1===e)return t&&t(e),void a(new Error("Failed to parse GeoJSON"));var n,l,c=[];try{n=s._featureArray(e)}catch(e){return void a(e)}var d=n.filter((function(e){return"Point"===e.geometry.type}));d.length&&(l=s.layer().createFeature("point"))&&(l.data(d).position((function(e){return s._position(e.geometry.coordinates)})).style([{}].concat(Object.keys(u.pointStyle)).reduce((function(e,t){return i(o({},t,d.some((function(e){return e.properties&&void 0!==e.properties[t]}))?s._style(t,u.pointStyle[t]):u.pointStyle[t]),e)}))),c.push(l));var f=n.filter((function(e){return"LineString"===e.geometry.type}));f.length&&(l=s.layer().createFeature("line"))&&(l.data(f).line((function(e){return e.geometry.coordinates})).position(s._position).style([{}].concat(Object.keys(u.lineStyle)).reduce((function(e,t){return i(o({},t,f.some((function(e){return e.properties&&void 0!==e.properties[t]}))?s._style(t,u.lineStyle[t]):u.lineStyle[t]),e)}))),c.push(l));var p=n.filter((function(e){return"Polygon"===e.geometry.type}));p.length&&(l=s.layer().createFeature("polygon"))&&(l.data(p).polygon((function(e,t){return{outer:e.geometry.coordinates[0],inner:e.geometry.coordinates.slice(1)}})).position(s._position).style([{}].concat(Object.keys(u.polygonStyle)).reduce((function(e,t){return i(o({},t,p.some((function(e){return e.properties&&void 0!==e.properties[t]}))?s._style(t,u.polygonStyle[t]):u.polygonStyle[t]),e)}))),c.push(l)),t&&t(c),r(c)}),n)}));return s.addPromise(r),r}};a(u,l),s("geojsonReader",u),s("jsonReader",u),e.exports=u},4745:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=n(4634),a=n(4647),s=this,l=this.draw,u=this.style,c=null,d=null,f=function(e){return e.children},p=[],h=this._init,m=this._exit;return this.featureType="graph",this._init=function(e){h.call(s,e);var t=r.extend(!0,{},{nodes:{radius:5,fill:!0,fillColor:{r:1,g:0,b:0},strokeColor:{r:0,g:0,b:0}},links:{strokeColor:{r:0,g:0,b:0}},linkType:"path"},void 0===e.style?{}:e.style);return s.style(t),s.nodes((function(e){return e})),s},this._build=function(){s.children().forEach((function(e){e._build()}))},this._update=function(){s.children().forEach((function(e){e._update()}))},this._exit=function(){return s.data([]),p.forEach((function(e){e._exit(),s.removeChild(e)})),p=[],d._exit(),s.removeChild(d),m(),s},this.style=function(e,t){var n=u.call(s,e,t);return n!==s?n:(d.style(e.nodes),p.forEach((function(t){t.style(e.links)})),s)},this.style.get=u.get,this.links=function(e){return void 0===e?f:(f=o.ensureFunction(e),s)},this.nodes=function(e){return void 0===e?c:(c=e,s.modified(),s)},this.nodeFeature=function(){return d},this.linkFeatures=function(){return p},this.draw=function(){var e,t=s.layer(),n=s.data(),r=0;return e=s.style(),d.data(n),d.style(e.nodes),n.forEach((function(n){(n.children||[]).forEach((function(i){var o;r+=1,p.length<r&&(o=a.createFeature(e.linkType,t,t.renderer()).style(e.links),s.addChild(o),p.push(o)),p[r-1].data([n,i])}))})),p.splice(r,p.length-r).forEach((function(e){e._exit(),s.removeChild(e)})),l(),s},d=a.createFeature("point",this.layer(),this.layer().renderer()),s.addChild(d),t.nodes&&this.nodes(t.nodes),this._init(t),this};r(o,i),e.exports=o},1109:function(e,t,n){var r=n(5699),i=n(9146),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),o=n(4634),a=n(9244);t=t||{},i.call(this,t);var s=this,l=this._init;return this._createGrids=function(){return a.createColoredMesh(s,!0)},this.grid=s.mesh,this._init=function(e){l.call(s,e);var t=r.extend({},{opacity:1,value:function(e,t){return o.isNonNullFinite(e)?e:s.position()(e,t).z},position:function(e){return e||{x:0,y:0}},origin:function(e){return e.length>=3?[e[0],e[1],0]:[0,0,0]}},void 0===e.style?{}:e.style);s.style(t),s.grid(r.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},e.mesh||{},e.grid||{})),(e.mesh||e.grid)&&s.dataTime().modified()},this._init(t),this};r(o,i),e.exports=o},1111:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=n(6853),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n,i,s,l,u,c,d,f=this,p=this._init;return this.featureType="heatmap",n=t.position||function(e){return e},i=t.intensity||function(e){return 1},s=void 0!==t.maxIntensity?t.maxIntensity:null,l=void 0!==t.minIntensity?t.minIntensity:null,c=void 0!==t.binned?t.binned:"auto",u=t.updateDelay||0===t.updateDelay?parseInt(t.updateDelay,10):-1,this.maxIntensity=function(e){return void 0===e?s:(s=e,f.dataTime().modified(),f.modified(),f)},this.minIntensity=function(e){return void 0===e?l:(l=e,f.dataTime().modified(),f.modified(),f)},this.updateDelay=function(e){return void 0===e?u:(u=parseInt(e,10),f)},this.binned=function(e){return void 0===e?c:("true"===e?e=!0:("false"===e||"auto"!==e&&!0!==e&&!1!==e&&((e=parseInt(e,10))<=0||isNaN(e)))&&(e=!1),c=e,f.dataTime().modified(),f.modified(),f)},this.position=function(e){return void 0===e?n:(n=e,f.dataTime().modified(),f.modified(),f)},this.gcsPosition=function(){return f._update(),d},this.intensity=function(e){return void 0===e?i:(i=e,f.dataTime().modified(),f.modified(),f)},this._init=function(e){p.call(f,e);var t=r.extend({},{radius:10,blurRadius:10,gaussian:!0,color:{0:{r:0,g:0,b:0,a:0},.25:{r:0,g:0,b:1,a:.5},.5:{r:0,g:1,b:1,a:.6},.75:{r:1,g:1,b:0,a:.7},1:{r:1,g:0,b:0,a:.8}},scaleWithZoom:!1},void 0===e.style?{}:e.style);f.style(t),n&&f.dataTime().modified()},this._build=function(){var e=f.data(),t=null,n=[],r=null==s,i=null==l;return e.forEach((function(e,o){n.push(f.position()(e,o)),(r||i)&&(t=f.intensity()(e,o),null==s&&(s=t),null==l&&(l=t),r&&t>s&&(s=t),i&&t<l&&(l=t))})),i&&r&&l===s&&(l-=1),d=a.transformCoordinates(f.gcs(),f.layer().map().gcs(),n),f.buildTime().modified(),f},this._init(t),this};i(s,o),e.exports=s},4665:function(e,t,n){var r=n(5699),i=n(8418),o=function e(t){if(!(this instanceof e))return new e(t);var r=n(5638);return t.size=t.size||{x:256,y:256},this._image=null,this._cors=t.crossDomain||null===t.crossDomain?t.crossDomain:"anonymous",i.call(this,t),Object.defineProperty(this,"image",{get:function(){return this._image}}),this.fetch=function(){var e;return this._image||(this._image=new Image(this.right-this.left,this.bottom-this.top),this._cors&&this._url.indexOf(":")>=0&&this._url.indexOf("/")===this._url.indexOf(":")+1&&(this._image.crossOrigin=this._cors),e=r.Deferred(),this._image.onload=e.resolve,this._image.onerror=e.reject,this._image.src=this._url,e.done(function(){this._fetched=!0}.bind(this)).promise(this)),this},this.fadeIn=function(e){var t=this.fetch(),n=r.Deferred();return r(this._image).css("display","none"),t.done(function(){r(this._image).fadeIn(e,(function(){n.resolve()}))}.bind(this)),n.promise(this)},this};r(o,i),e.exports=o},6062:function(e,t,n){
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.geo=t():e.geo=t()}(self,(function(){return function(){var e={7839:function(e){e.exports={momentum:"geo_action_momentum",pan:"geo_action_pan",rotate:"geo_action_rotate",select:"geo_action_select",unzoomselect:"geo_action_unzoomselect",zoom:"geo_action_zoom",zoomrotate:"geo_action_zoom_rotate",zoomselect:"geo_action_zoomselect",annotation_line:"geo_annotation_line",annotation_polygon:"geo_annotation_polygon",annotation_rectangle:"geo_annotation_rectangle",annotation_edit_handle:"geo_annotation_edit_handle"}},7800:function(e,t,n){var r=n(5638),i=n(5699),o=n(5108),a=n(7839),s=n(6853),l=n(4634),u=n(4647).registerAnnotation,c=n(4708),d=n(2557),f=n(4343),p=n(9757),h=0,m={create:"create",done:"done",highlight:"highlight",edit:"edit"},g="annotationAction",v={fill:!0,fillColor:function(e){return e.selected?{r:0,g:1,b:1}:{r:.3,g:.3,b:.3}},fillOpacity:function(e){return e.selected?.5:.25},radius:function(e){return"edge"===e.type||"rotate"===e.type?8:10},scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:function(e){return"edge"===e.type||"rotate"===e.type?2:3},rotateHandleOffset:24,rotateHandleRotation:-Math.PI/4,resizeHandleOffset:48,resizeHandleRotation:-Math.PI/4,handles:{vertex:!0,edge:!0,center:!0,rotate:!0,resize:!0}},y=function e(t,n){"use strict";if(!(this instanceof e))return new e(t,n);var i=this,u=r.extend({},{showLabel:!0},n||{}),c=u.annotationId;delete u.annotationId,void 0===c||u.layer&&u.layer.annotationById(c)?(h+=1,void 0!==c&&console.warn("Annotation id "+c+" is in use; using "+h+" instead."),c=h):c>h&&(h=c);var d=u.name||t.charAt(0).toUpperCase()+t.substr(1)+" "+c,f=u.label||null,y=u.description||void 0,b=t,x=u.layer,w=u.state||m.done;delete u.state,delete u.layer,delete u.name,delete u.label,delete u.description,this._exit=function(){},this.id=function(){return c},this.name=function(e){return void 0===e?d:(null!==e&&(""+e).trim()&&(e=(""+e).trim())!==d&&(d=e,i.modified()),i)},this.label=function(e,t){return void 0===e?null!==f||t?f:d:(e!==f&&(f=e,i.modified()),i)},this._labelPosition=function(){return l.centerFromPerimeter(i._coordinates())},this._rotateHandlePosition=function(e,t){var n,r,o,a=i.layer().map(),s=i._coordinates(),u=l.centerFromPerimeter(i._coordinates()),c=u?a.gcsToDisplay(u,null):void 0,d=0;if(u){for(e=e||0,t=t||0,n=0;n<s.length;n+=1)r=a.gcsToDisplay(s[n],null),d=Math.max(d,Math.pow(r.x-c.x,2)+Math.pow(r.y-c.y,2));return o=Math.sqrt(d)+e,r=a.displayToGcs({x:c.x+o*Math.cos(t),y:c.y-o*Math.sin(t)},null)}},this.labelRecord=function(){var e=i.options("showLabel");if(e){var t=i.state();if(!(!0===e&&t===m.create||!0!==e&&e.indexOf(t)<0)){var n=i.labelStyle(),r={text:i.label(),position:i._labelPosition()};if(r.position)return n&&(r.style=n),r}}},this.description=function(e){return void 0===e?y:(e!==y&&(y=e,i.modified()),i)},this.layer=function(e){return void 0===e?x:(x=e,i)},this.state=function(e){return void 0===e?w:(w!==e&&(w=e,i.layer()&&i.layer().geoTrigger(o.annotation.state,{annotation:i})),i)},this.actions=function(e){return e||(e=i.state()),e===m.edit?[{action:a.annotation_edit_handle,name:"annotation edit",owner:g,input:"left"},{action:a.annotation_edit_handle,name:"annotation edit",owner:g,input:"pan"}]:[]},this.processAction=function(e){},this.processEditAction=function(e){if(e&&i._editHandle&&i._editHandle.handle)switch(i._editHandle.handle.type){case"vertex":return i._processEditActionVertex(e);case"edge":return i._processEditActionEdge(e);case"center":return i._processEditActionCenter(e);case"rotate":return i._processEditActionRotate(e);case"resize":return i._processEditActionResize(e)}},this.selectEditHandle=function(e,t){t&&i._editHandle&&i._editHandle.handle&&i._editHandle.handle.selected&&(i._editHandle.handle.selected=!1),e.selected=t;var n=(i._editHandle||{}).amountRotated||0;return i._editHandle={handle:e,startCoordinates:i._coordinates().slice(),center:l.centerFromPerimeter(i._coordinates()),rotatePosition:i._rotateHandlePosition(e.style.rotateHandleOffset,e.style.rotateHandleRotation+n),startAmountRotated:n,amountRotated:n,resizePosition:i._rotateHandlePosition(e.style.resizeHandleOffset,e.style.resizeHandleRotation)},i.layer()&&i.layer().geoTrigger(o.annotation.select_edit_handle,{annotation:i,handle:i._editHandle,enable:t}),i},this.options=function(e,t){if(void 0===e)return u;if("string"==typeof e&&void 0===t)return u[e];var n;if(void 0===t?(n=void 0!==e[i._coordinateOption],u=r.extend(!0,u,e),["style","createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(t){void 0!==e[t]&&r.extend(u[t],e[t])}))):(n=e===i._coordinateOption,u[e]=t),u.coordinates){var a=u.coordinates;delete u.coordinates,i._coordinates(a)}if(void 0!==u.name){var s=u.name;delete u.name,i.name(s)}if(void 0!==u.label){var l=u.label;delete u.label,i.label(l)}if(void 0!==u.description){var c=u.description;delete u.description,i.description(c)}return i.modified(),n&&i.layer()&&i.layer().geoTrigger(o.annotation.coordinates,{annotation:i}),i},this.style=function(e,t,n){return n=n||"style",void 0===e?u[n]:"string"==typeof e&&void 0===t?(u[n]||{})[e]:(void 0===u[n]&&(u[n]={}),void 0===t?u[n]=r.extend(!0,u[n],e):u[n][e]=t,i.modified(),i)},["createStyle","editStyle","editHandleStyle","labelStyle","highlightStyle"].forEach((function(e){i[e]=function(t,n){return i.style(t,n,e)}})),this.styleForState=function(e){return(e=e||i.state())===m.edit||e===m.highlight?r.extend({},u.style,u[e+"Style"]):e===m.create?r.extend({},u.style,u.editStyle,u[e+"Style"]):u[e+"Style"]||u.style||{}},this.type=function(){return b},this.features=function(){return[]},this.mouseClick=function(e){},this.mouseClickEdit=function(e){},this.mouseMove=function(e){},this._coordinates=function(e){return[]},this._coordinateOption="vertices",this.coordinates=function(e){var t=i._coordinates()||[];if(i.layer()){var n=i.layer().map();(e=null===e?n.gcs():void 0===e?n.ingcs():e)!==n.gcs()&&(t=s.transformCoordinates(n.gcs(),e,t))}return t},this.modified=function(){return i.layer()&&i.layer().modified(),i},this.draw=function(){return i.layer()&&(i.layer()._update(),i.layer().draw()),i},this._geojsonStyles=function(){return["closed","fill","fillColor","fillOpacity","lineCap","lineJoin","radius","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(e){return[]},this._geojsonGeometryType=function(){return""},this.geojson=function(e,t){var n,r,o,a=i._geojsonCoordinates(e),s=i._geojsonGeometryType(),u=i._geojsonStyles(),c=i.options("style")||{},d=i.labelStyle()||{};if(a&&a.length&&s){var h={type:"Feature",geometry:{type:s,coordinates:a},properties:{annotationType:b,name:i.name(),annotationId:i.id()}};for(f&&(h.properties.label=f),y&&(h.properties.description=y),!1===i.options("showLabel")&&(h.properties.showLabel=i.options("showLabel")),n=0;n<u.length;n+=1)r=u[n],void 0!==(o=l.ensureFunction(c[r])())&&(r.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),h.properties[r]=o);for(n=0;n<p.usedStyles.length;n+=1)r=p.usedStyles[n],void 0!==(o=l.ensureFunction(d[r])())&&(r.toLowerCase().match(/color$/)&&(o=l.convertColorToHex(o,"needed")),h.properties["label"+r.charAt(0).toUpperCase()+r.slice(1)]=o);if(t){var m=i.layer().map();e=null===e?m.gcs():void 0===e?m.ingcs():e,h.crs={type:"name",properties:{type:"proj4",name:e}}}return h}},this._addEditHandles=function(e,t,n,o){var a,s=r.extend({},v,i.editHandleStyle()),u=l.ensureFunction(s.handles)()||{},c=i._editHandle&&i._editHandle.handle&&i._editHandle.handle.selected?i._editHandle.handle:void 0;n=r.extend({},n),Object.keys(u).forEach((function(e){!1===u[e]&&(n[e]=!1)})),e[3]||(e[3]={point:[]}),a=e[3].point,t.forEach((function(e,i){!1!==n.vertex&&a.push(r.extend({},e,{type:"vertex",index:i,style:s,editHandle:!0})),!1===n.edge||i===t.length-1||e.x===t[i+1].x&&e.y===t[i+1].y||a.push(r.extend({x:(e.x+t[i+1].x)/2,y:(e.y+t[i+1].y)/2},{type:"edge",index:i,style:s,editHandle:!0})),!1===n.edge||o||i!==t.length-1||e.x===t[0].x&&e.y===t[0].y||a.push(r.extend({x:(e.x+t[0].x)/2,y:(e.y+t[0].y)/2},{type:"edge",index:i,style:s,editHandle:!0}))})),!1!==n.center&&a.push(r.extend({},l.centerFromPerimeter(i._coordinates()),{type:"center",style:s,editHandle:!0})),!1!==n.rotate&&(a.push(r.extend(i._rotateHandlePosition(s.rotateHandleOffset,s.rotateHandleRotation+(c&&"rotate"===c.type?i._editHandle.amountRotated:0)),{type:"rotate",style:s,editHandle:!0})),!i._editHandle||c&&"rotate"===c.type||(i._editHandle.amountRotated=0)),!1!==n.resize&&a.push(r.extend(i._rotateHandlePosition(s.resizeHandleOffset,s.resizeHandleRotation),{type:"resize",style:s,editHandle:!0})),c&&a.forEach((function(e){e.type===c.type&&e.index===c.index&&(e.selected=!0)}))},this._processEditActionCenter=function(e){var t=i._editHandle.startCoordinates,n=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,r=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,o=i._coordinates(),a=t.map((function(e){return{x:e.x+n,y:e.y+r}}));return(a[0].x!==o[0].x||a[0].y!==o[0].y)&&(i._coordinates(a),!0)},this._processEditActionRotate=function(e){var t=i._editHandle,n=t.startCoordinates,r=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,o=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,a=Math.atan2(t.rotatePosition.y-t.center.y,t.rotatePosition.x-t.center.x),s=Math.atan2(t.rotatePosition.y+o-t.center.y,t.rotatePosition.x+r-t.center.x)-a,l=i._coordinates(),u=n.map((function(e){var n=e.x-t.center.x,r=e.y-t.center.y;return{x:n*Math.cos(s)-r*Math.sin(s)+t.center.x,y:n*Math.sin(s)+r*Math.cos(s)+t.center.y}}));return(u[0].x!==l[0].x||u[0].y!==l[0].y)&&(i._coordinates(u),t.amountRotated=t.startAmountRotated+s,!0)},this._processEditActionResize=function(e){var t=i._editHandle,n=t.startCoordinates,r=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,o=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,a=i.layer().map(),s=a.gcsToDisplay(t.center,null),l=a.gcsToDisplay(t.resizePosition,null),u=a.gcsToDisplay({x:t.resizePosition.x+r,y:t.resizePosition.y+o},null),c=Math.pow(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2),.5)-t.handle.style.resizeHandleOffset,d=Math.pow(Math.pow(u.y-s.y,2)+Math.pow(u.x-s.x,2),.5)-t.handle.style.resizeHandleOffset,f=i._coordinates();if(d&&c){var p=d/c,h=n.map((function(e){return{x:(e.x-t.center.x)*p+t.center.x,y:(e.y-t.center.y)*p+t.center.y}}));if(h[0].x!==f[0].x||h[0].y!==f[0].y)return i._coordinates(h),!0}return!1},this._processEditActionEdge=function(e){var t=i._editHandle,n=t.handle.index,r=i._coordinates();return r.splice(n+1,0,{x:t.handle.x,y:t.handle.y}),t.handle.type="vertex",t.handle.index+=1,t.startCoordinates=r.slice(),i.modified(),!0},this._processEditActionVertex=function(e,t){var n,r,a=i._editHandle,s=a.handle.index,l=a.startCoordinates,u=i._coordinates(),c=u.length,d=u[s],f=e.mouse.mapgcs.x-e.state.origin.mapgcs.x,p=e.mouse.mapgcs.y-e.state.origin.mapgcs.y,h=i.layer(),m=h.options("adjacentPointProximity");return u[s]={x:l[s].x+f,y:l[s].y+p},h.displayDistance(u[s],null,l[s],null)<=m||(h.displayDistance(u[s],null,u[(s+1)%u.length],null)<=m?n=(s+1)%u.length:h.displayDistance(u[s],null,u[(s+u.length-1)%u.length],null)<=m&&(n=(s+u.length-1)%u.length)),r=0===n&&s===u.length-1||n===u.length-1&&0===s,!1===t&&r&&(n=void 0),void 0!==n&&u.length>(t||i.options("style").closed?3:2)&&(u[s]={x:u[n].x,y:u[n].y},e.event===o.actionup&&(t&&r&&(i.options("style").closed=!0),u.splice(s,1))),(u.length!==c||u[s].x!==d.x||u[s].y!==d.y)&&(i._coordinates(u),!0)}};function b(e,t,n,r,i){return n||(n=e.state()),n===m.create?[{action:a["annotation_"+r],name:r+" create",owner:g,input:"left",modifiers:{shift:!1,ctrl:!1}},{action:a["annotation_"+r],name:r+" create",owner:g,input:"pan"}]:t.apply(e,i)}function x(e,t,n){var r=e.layer();if(e.state()===m.create&&r&&t.state.action===a["annotation_"+n]){var i=r.options("continuousPointProximity"),s=r.options("continuousPointCollinearity"),l=r.options("continuousCloseProximity");if(i||0===i){var u=e.options("vertices"),c=!1;if(!u.length)return u.push(t.mouse.mapgcs),u.push(t.mouse.mapgcs),!0;var d=r.displayDistance(u[u.length-2],null,t.mouse.map,"display");if(d&&d>i){if(u.length>=(e._lastClickVertexCount||1)+3){var f=r.displayDistance(u[u.length-3],null,u[u.length-2],null),p=d,h=r.displayDistance(u[u.length-3],null,t.mouse.map,"display");if(f&&h)(h*h-f*f-p*p)/(2*f*p)>Math.cos(s)&&u.pop()}u[u.length-1]=t.mouse.mapgcs,u.push(t.mouse.mapgcs),c=!0}return(l||0===l)&&t.event===o.actionup&&(!0===l||r.displayDistance(u[0],null,t.mouse.map,"display")<=i)?u.length<3+("polygon"===n?1:0)?"remove":(u.pop(),e.state(m.done),"done"):c}}}var w=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(e){return e.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}}},t||{})).corners=t.corners||t.coordinates||[],delete t.coordinates,y.call(this,"rectangle",t);var n=this,i=this.actions,s=this.processEditAction;this.actions=function(e){return e||(e=n.state()),e===m.create?[{action:a.annotation_rectangle,name:"rectangle create",owner:g,input:"left",modifiers:{shift:!1,ctrl:!1},selectionRectangle:!0}]:i.apply(n,arguments)},this.processAction=function(e){var t=n.layer();if(n.state()===m.create&&t&&e.event===o.actionselection&&e.state.action===a.annotation_rectangle){var r=t.map(),i=[r.displayToGcs({x:e.lowerLeft.x,y:e.lowerLeft.y},null),r.displayToGcs({x:e.lowerLeft.x,y:e.upperRight.y},null),r.displayToGcs({x:e.upperRight.x,y:e.upperRight.y},null),r.displayToGcs({x:e.upperRight.x,y:e.lowerLeft.y},null)];return t.displayDistance(i[0],null,i[1],null)*t.displayDistance(i[0],null,i[3],null)<.01?"remove":(n.options("corners",i),n.state(m.done),"done")}},this.features=function(){var e,t=n.options(),r=n.state();if(r===m.create)e=[],t.corners&&t.corners.length>=4&&(e=[{polygon:{polygon:t.corners,style:n.styleForState(r)}}]);else e=[{polygon:{polygon:t.corners,style:n.styleForState(r)}}],r===m.edit&&n._addEditHandles(e,t.corners);return e},this._coordinates=function(e){return e&&e.length>=4&&n.options("corners",e.slice(0,4)),n.options("corners")},this._coordinateOption="corners",this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&n.state()!==m.create&&!(t.length<4)){for(var r=[],i=0;i<4;i+=1)r.push([t[i].x,t[i].y]);return r.push([t[0].x,t[0].y]),[r]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this._setCornersFromMouse=function(e,t){var i=n.layer().map(),o=i.gcsToDisplay({x:e[0].x,y:e[0].y},null),a=i.gcsToDisplay(t.mapgcs,null),s={x:a.x,y:o.y},l={x:o.x,y:a.y};e[2]=r.extend({},t.mapgcs),e[1]=i.displayToGcs(s,null),e[3]=i.displayToGcs(l,null)},this.mouseMove=function(e){if(n.state()===m.create){var t=n.options("corners");return t.length?(n._setCornersFromMouse(t,e),!0):void 0}},this.mouseClick=function(e){var t=n.layer();if(n.state()===m.create&&t&&(e.buttonsDown.left||e.buttonsDown.right)){var i=n.options("corners");if(!e.buttonsDown.right||i.length)return e.handled=!0,i.length?(n._setCornersFromMouse(i,e),t.displayDistance(i[0],null,i[1],null)*t.displayDistance(i[0],null,i[3],null)<.01?"remove":(n.state(m.done),"done")):e.buttonsDown.left?(i.push(r.extend({},e.mapgcs)),i.push(r.extend({},e.mapgcs)),i.push(r.extend({},e.mapgcs)),i.push(r.extend({},e.mapgcs)),!0):void 0}},this.processEditAction=function(e){var t,r,i,o,a,l=n._editHandle.startCoordinates,u={x:e.mouse.mapgcs.x-e.state.origin.mapgcs.x,y:e.mouse.mapgcs.y-e.state.origin.mapgcs.y},c=n._editHandle.handle.type,d=n._editHandle.handle.index,f=[Math.atan2(l[1].y-l[0].y,l[1].x-l[0].x),Math.atan2(l[2].y-l[1].y,l[2].x-l[1].x),Math.atan2(l[3].y-l[2].y,l[3].x-l[2].x),Math.atan2(l[0].y-l[3].y,l[0].x-l[3].x)];switch(f[0]||f[1]||f[2]||f[3]||(f[1]=Math.PI/2,f[2]=Math.PI,f[3]=-Math.PI/2),f[0]||f[2]||(f[0]=f[1]-Math.PI/2,f[2]=f[1]+Math.PI/2),f[1]||f[3]||(f[1]=f[2]-Math.PI/2,f[3]=f[2]+Math.PI/2),c){case"vertex":return t=l.map((function(e){return{x:e.x,y:e.y}})),o=f[(d+1)%4],r={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},a=f[d],i={x:(u.x*Math.cos(a)+u.y*Math.sin(a))*Math.cos(a),y:(u.y*Math.sin(a)+u.x*Math.cos(a))*Math.sin(a)},t[d].x+=u.x,t[d].y+=u.y,t[(d+1)%4].x+=r.x,t[(d+1)%4].y+=r.y,t[(d+3)%4].x+=i.x,t[(d+3)%4].y+=i.y,n.options("corners",t),!0;case"edge":return t=l.map((function(e){return{x:e.x,y:e.y}})),o=f[(d+1)%4],u={x:(u.x*Math.cos(o)+u.y*Math.sin(o))*Math.cos(o),y:(u.y*Math.sin(o)+u.x*Math.cos(o))*Math.sin(o)},t[d].x+=u.x,t[d].y+=u.y,t[(d+1)%4].x+=u.x,t[(d+1)%4].y+=u.y,n.options("corners",t),!0}return s.apply(n,arguments)}};i(w,y);var _={};_[f.capabilities.feature]=!0,u("rectangle",w,_);var S=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,polygon:function(e){return e.polygon},stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,uniformPolygon:!0},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5},createStyle:{closed:!1,fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,line:function(e){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return e}))},position:function(e,t){return n.options("vertices")[t]},stroke:!1,strokeColor:{r:0,g:0,b:1}}},t||{})).vertices=t.vertices||t.coordinates||[],delete t.coordinates,y.call(this,"polygon",t);var n=this,i=this.actions;this.features=function(){var e,t=n.options(),r=n.state(),i=n.styleForState(r);if(r===m.create)e=[],t.vertices&&t.vertices.length>=3&&(e[1]={polygon:{polygon:t.vertices,style:i}}),t.vertices&&t.vertices.length>=2&&(e[2]={line:{line:t.vertices,style:i}});else e=[{polygon:{polygon:t.vertices,style:i}}],r===m.edit&&n._addEditHandles(e,t.vertices);return e},this._coordinates=function(e){return e&&n.options("vertices",e),n.options("vertices")},this.mouseMove=function(e){if(n.state()===m.create){var t=n.options("vertices");return t.length?(t[t.length-1]=e.mapgcs,!0):void 0}},this.mouseClick=function(e){var t=n.layer();if(n.state()===m.create&&t){var r,i=!!e.buttonsDown.right;if(e.buttonsDown.left||e.buttonsDown.right){var o=n.options("vertices");if(!e.buttonsDown.right||o.length)return e.handled=!0,e.buttonsDown.left&&(o.length?o.length>=2&&t.displayDistance(o[o.length-2],null,e.map,"display")<=t.options("adjacentPointProximity")?(r=!0,n._lastClick&&e.time-n._lastClick<t.options("dblClickTime")&&(i=!0)):o.length>=2&&t.displayDistance(o[0],null,e.map,"display")<=t.options("finalPointProximity")?i=!0:o[o.length-1]=e.mapgcs:o.push(e.mapgcs),i||r||o.push(e.mapgcs),n._lastClick=e.time,n._lastClickVertexCount=o.length),i?o.length<4?"remove":(o.pop(),n.state(m.done),"done"):!r}}},this.actions=function(e){return b(n,i,e,"polygon",arguments)},this.processAction=function(e){return x(n,e,"polygon")},this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&!(t.length<3)&&n.state()!==m.create){for(var r=[],i=0;i<t.length;i+=1)r.push([t[i].x,t[i].y]);return r.push([t[0].x,t[0].y]),[r]}},this._geojsonGeometryType=function(){return"Polygon"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","lineCap","lineJoin","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]}};i(S,y);var C={};C[f.capabilities.feature]=!0,C[c.capabilities.basic]=[m.create],u("polygon",S,C);var A=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{line:function(e){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return e}))},position:function(e,t){return n.options("vertices")[t]},strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"},highlightStyle:{strokeWidth:5},createStyle:{line:function(e){return Array.apply(null,Array(n.options("vertices").length)).map((function(){return e}))},position:function(e,t){return n.options("vertices")[t]},strokeColor:{r:0,g:0,b:1},strokeOpacity:1,strokeWidth:3,closed:!1,lineCap:"butt",lineJoin:"miter"}},t||{})).vertices=t.vertices||t.coordinates||[],delete t.coordinates,y.call(this,"line",t);var n=this,i=this.actions,o=this.processEditAction;this.features=function(){var e,t=n.options(),r=n.state();if(r===m.create)e=[{line:{line:t.vertices,style:n.styleForState(r)}}];else e=[{line:{line:t.vertices,style:n.styleForState(r)}}],r===m.edit&&n._addEditHandles(e,t.vertices,void 0,!n.style("closed"));return e},this._coordinates=function(e){return e&&n.options("vertices",e),n.options("vertices")},this.mouseMove=function(e){if(n.state()===m.create){var t=n.options("vertices");return t.length?(t[t.length-1]=e.mapgcs,!0):void 0}},this.mouseClick=function(e){var t=n.layer();if(n.state()===m.create&&t){var r,i=!!e.buttonsDown.right;if(e.buttonsDown.left||e.buttonsDown.right){var o=n.options("vertices");if(!e.buttonsDown.right||o.length)return e.handled=!0,e.buttonsDown.left&&(o.length?o.length>=2&&t.displayDistance(o[o.length-2],null,e.map,"display")<=t.options("adjacentPointProximity")?(r=!0,n._lastClick&&e.time-n._lastClick<t.options("dblClickTime")&&(i=!0)):o.length>=2&&t.displayDistance(o[0],null,e.map,"display")<=t.options("finalPointProximity")?i="close":o[o.length-1]=e.mapgcs:o.push(e.mapgcs),i||r||o.push(e.mapgcs),n._lastClick=e.time,n._lastClickVertexCount=o.length),i?o.length<3?"remove":(o.pop(),n.options("style").closed="close"===i,n.state(m.done),"done"):!r}}},this.actions=function(e){return b(n,i,e,"line",arguments)},this.processAction=function(e){return x(n,e,"line")},this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&!(t.length<2)&&n.state()!==m.create){for(var r=[],i=0;i<t.length;i+=1)r.push([t[i].x,t[i].y]);return r}},this._geojsonGeometryType=function(){return"LineString"},this._geojsonStyles=function(){return["closed","lineCap","lineJoin","strokeColor","strokeOffset","strokeOpacity","strokeWidth"]},this.processEditAction=function(e){return"vertex"===n._editHandle.handle.type?n._processEditActionVertex(e,!0):o.apply(n,arguments)},this.mouseClickEdit=function(e){var t,r=n.layer(),i=n._editHandle;if(n.state()===m.edit&&r&&e.buttonsDown.left&&i&&i.handle.selected&&"edge"===i.handle.type&&n.options("style").closed&&(e.handled=!0,n._lastClick&&e.time-n._lastClick<r.options("dblClickTime")&&(t=!0),n._lastClick=e.time,t)){var o=i.handle.index,a=n._coordinates(),s=a.slice(o+1).concat(a.slice(0,o+1));return n._coordinates(s),n.options("style").closed=!1,i.handle.index=void 0,!0}}};i(A,y);var T={};T[c.capabilities.basic]=[m.create],u("line",A,T);var P=function e(t){"use strict";if(!(this instanceof e))return new e(t);(t=r.extend(!0,{},{style:{fill:!0,fillColor:{r:0,g:1,b:0},fillOpacity:.25,radius:10,scaled:!1,stroke:!0,strokeColor:{r:0,g:0,b:0},strokeOpacity:1,strokeWidth:3},createStyle:{fillColor:{r:.3,g:.3,b:.3},fillOpacity:.25,strokeColor:{r:0,g:0,b:1}},highlightStyle:{fillColor:{r:0,g:1,b:1},fillOpacity:.5,strokeWidth:5}},t||{})).position=t.position||(t.coordinates?t.coordinates[0]:void 0),delete t.coordinates,y.call(this,"point",t);var n=this;this.features=function(){var e,t,i,o=n.options(),a=n.state();if(a===m.create)e=[];else t=n.styleForState(a),(o.style.scaled||0===o.style.scaled)&&(!0===o.style.scaled&&(o.style.scaled=n.layer().map().zoom()),t=r.extend({},t,{radius:function(){var e=o.style.radius,t=n.layer().map().zoom();return l.isFunction(e)&&(e=e.apply(n,arguments)),e*=Math.pow(2,t-o.style.scaled),e}}),i=!0),e=[{point:{x:o.position.x,y:o.position.y,style:t,scaleOnZoom:i}}],a===m.edit&&n._addEditHandles(e,[o.position],{edge:!1,center:!1,resize:!1,rotate:!1});return e},this._coordinates=function(e){return e&&e.length>=1&&n.options("position",e[0]),n.state()===m.create?[]:[n.options("position")]},this._coordinateOption="position",this.mouseClick=function(e){if(n.state()===m.create&&e.buttonsDown.left)return e.handled=!0,n.options("position",e.mapgcs),n.state(m.done),"done"},this._geojsonStyles=function(){return["fill","fillColor","fillOpacity","radius","scaled","stroke","strokeColor","strokeOpacity","strokeWidth"]},this._geojsonCoordinates=function(e){var t=n.coordinates(e);if(t&&n.state()!==m.create&&!(t.length<1)&&void 0!==t[0])return[t[0].x,t[0].y]},this._geojsonGeometryType=function(){return"Point"}};i(P,y);var E={};E[d.capabilities.feature]=!0,u("point",P,E),e.exports={state:m,actionOwner:g,annotation:y,lineAnnotation:A,pointAnnotation:P,polygonAnnotation:S,rectangleAnnotation:w,_editHandleFeatureLevel:3,defaultEditHandleStyle:v}},836:function(e,t,n){var r=n(5699),i=n(3715),o=n(7800),a=n(5108),s=n(4647),l=n(6853),u=n(5638),c=n(3345),d=n(9757),f=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var r,f,p,h,m=n(3870),g=n(6618),v=n(4634),y=this,b=this._init,x=this._exit,w=this.draw,_=this._update,S=g(),C=null,A=[],T=[],P={closed:{dataType:"boolean",keys:["closed","close"]},fill:{dataType:"boolean",keys:["fill"]},fillColor:{dataType:"color",keys:["fillColor","fill-color","marker-color","fill"]},fillOpacity:{dataType:"opacity",keys:["fillOpacity","fill-opacity"]},lineCap:{dataType:"text",keys:["lineCap","line-cap"]},lineJoin:{dataType:"text",keys:["lineJoin","line-join"]},radius:{dataType:"positive",keys:["radius"]},scaled:{dataType:"booleanOrNumber",keys:["scaled"]},stroke:{dataType:"boolean",keys:["stroke"]},strokeColor:{dataType:"color",keys:["strokeColor","stroke-color","stroke"]},strokeOffset:{dataType:"number",keys:["strokeOffset","stroke-offset"]},strokeOpacity:{dataType:"opacity",keys:["strokeOpacity","stroke-opacity"]},strokeWidth:{dataType:"positive",keys:["strokeWidth","stroke-width"]}},E={offset:"coordinate2",rotateWithMap:"boolean",rotation:"angle",scaleWithMap:"boolean",scale:"booleanOrNumber",shadowBlur:"numberOrBlank",shadowOffset:"coordinate2",strokeWidth:"numberOrBlank",visible:"boolean"};return d.usedStyles.forEach((function(e){P[e]={option:"labelStyle",dataType:E[e]||"text",keys:[e,"label"+e.charAt(0).toUpperCase()+e.slice(1),e.replace(/([A-Z])/g,"-$1").toLowerCase(),"label-"+e.replace(/([A-Z])/g,"-$1").toLowerCase()]}})),r=u.extend(!0,{},{dblClickTime:300,adjacentPointProximity:5,continuousPointProximity:5,continuousPointCollinearity:1*Math.PI/180,continuousCloseProximity:10,finalPointProximity:10,showLabels:!0,clickToEdit:!1},t),this._processAction=function(e){var t;if(e.state&&e.state.actionRecord&&e.state.actionRecord.owner===o.actionOwner&&y.currentAnnotation)if(y.mode()===y.modes.edit)t=y.currentAnnotation.processEditAction(e),y.currentAnnotation&&y.currentAnnotation._editHandle&&y.currentAnnotation._editHandle.handle&&(y.geoTrigger(a.annotation.edit_action,{annotation:y.currentAnnotation,handle:y.currentAnnotation._editHandle?y.currentAnnotation._editHandle.handle:void 0,action:e.event}),e.event===a.actionup&&y._selectEditHandle({data:y.currentAnnotation._editHandle.handle},y.currentAnnotation._editHandle.handle.selected));else t=y.currentAnnotation.processAction(e);y._updateFromEvent(t)},this._updateFromEvent=function(e){switch(e){case"remove":y.removeAnnotation(y.currentAnnotation,!1),y.mode(null);break;case"done":y.mode(null)}e&&(y.modified(),y.draw())},this._handleMouseMove=function(e){y.mode()&&y.currentAnnotation&&(y.currentAnnotation.mouseMove(e)&&(y.modified(),y.draw()))},this._selectEditHandle=function(e,t){if(e.data&&e.data.editHandle){if(u.each(T[o._editHandleFeatureLevel],(function(e,t){t.feature.modified()})),y.currentAnnotation.selectEditHandle(e.data,t),y.draw(),y.map().node().toggleClass("annotation-input",!!t),y.map().interactor().removeAction(void 0,void 0,o.actionOwner),t){var n=y.currentAnnotation.actions(o.state.edit);u.each(n,(function(e,t){y.map().interactor().addAction(t)}))}return y}},this._handleMouseOn=function(e){e.data&&e.data.annotation&&(y.mode()===y.modes.edit&&y.currentAnnotation?y._selectEditHandle(e,!0):y.mode()||y.currentAnnotation||!y.options("clickToEdit")||(e.data.annotation.state(o.state.highlight),y.modified(),y.draw()))},this._handleMouseOff=function(e){e.data&&e.data.annotation&&(y.mode()===y.modes.edit&&e.data.editHandle&&e.data.selected?y._selectEditHandle(e,!1):e.data.annotation.state()===o.state.highlight&&(e.data.annotation.state(o.state.done),y.modified(),y.draw()))},this._handleMouseClick=function(e){var t,n=!1;if(y.mode()===y.modes.edit){if(y.map().interactor().hasAction(void 0,void 0,o.actionOwner))return t=y.currentAnnotation.mouseClickEdit(e),void y._updateFromEvent(t);y.mode(null),y.draw(),u.each(T,(function(e,t){u.each(t,(function(e,t){t.feature._clearSelectedFeatures()}))})),n=!0}else if(y.mode()&&y.currentAnnotation)t=y.currentAnnotation.mouseClick(e),y._updateFromEvent(t),n=!y.mode();else if(!y.mode()&&!y.currentAnnotation&&y.options("clickToEdit")){var r=y.annotations().filter((function(e){return e.state()===o.state.highlight}));if(1!==r.length)return;y.mode(y.modes.edit,r[0]),y.draw(),n=!0}n&&y.map().interactor().retriggerMouseMove()},this.options=function(e,t){return void 0===e?r:"string"==typeof e&&void 0===t?r[e]:(void 0===t?r=u.extend(!0,r,e):r[e]=t,y.modified(),y)},this.displayDistance=function(e,t,n,r){var i=y.map();return"display"!==t&&(t=null===t?i.gcs():void 0===t?i.ingcs():t,e=i.gcsToDisplay(e,t)),"display"!==r&&(r=null===r?i.gcs():void 0===r?i.ingcs():r,n=i.gcsToDisplay(n,r)),Math.sqrt(Math.pow(e.x-n.x,2)+Math.pow(e.y-n.y,2))},this.addAnnotation=function(e,t,n){if(u.inArray(e,A)<0){y.geoTrigger(a.annotation.add_before,{annotation:e}),A.push(e),e.layer(y);var r=y.map();(t=null===t?r.gcs():void 0===t?r.ingcs():t)!==r.gcs()&&e._coordinates(l.transformCoordinates(t,r.gcs(),e._coordinates())),!1!==n&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.add,{annotation:e})}return y},this.removeAnnotation=function(e,t){var n=u.inArray(e,A);return n>=0&&(e===y.currentAnnotation&&(y.currentAnnotation=null),e._exit(),A.splice(n,1),!1!==t&&(y.modified(),y.draw()),y.geoTrigger(a.annotation.remove,{annotation:e})),n>=0},this.removeAllAnnotations=function(e,t){for(var n,r=0,i=0;i<A.length;)n=A[i],e&&n.state()===o.state.create?i+=1:(y.removeAnnotation(n,!1),r+=1);return r&&!1!==t&&(y.modified(),y.draw()),r},this.annotations=function(){return A.slice()},this.annotationById=function(e){null!=e&&(e=+e);var t=A.filter((function(t){return t.id()===e}));if(t.length)return t[0]},this.modes={edit:"edit"},this.mode=function(e,t){if(void 0===e)return C;if(e!==C||e===y.modes.edit&&t!==y.editAnnotation){var n,r,i=y.map().node(),s=C;if(C=e,i.toggleClass("annotation-input",!(!C||C===y.modes.edit)),h||(h=c(i[0])),C?h.bind("esc",(function(){y.mode(null)})):h.unbind("esc"),y.currentAnnotation){switch(y.currentAnnotation.state()){case o.state.create:y.removeAnnotation(y.currentAnnotation);break;case o.state.edit:y.currentAnnotation.state(o.state.done),y.modified(),y.draw()}y.currentAnnotation=null}switch(C){case y.modes.edit:y.currentAnnotation=t,y.currentAnnotation.state(o.state.edit),y.modified();break;case"line":n=o.lineAnnotation;break;case"point":n=o.pointAnnotation;break;case"polygon":n=o.polygonAnnotation;break;case"rectangle":n=o.rectangleAnnotation}y.map().interactor().removeAction(void 0,void 0,o.actionOwner),n&&(y.currentAnnotation=n({state:o.state.create,layer:y}),y.addAnnotation(y.currentAnnotation,null),r=y.currentAnnotation.actions(o.state.create),u.each(r,(function(e,t){y.map().interactor().addAction(t)}))),y.geoTrigger(a.annotation.mode,{mode:C,oldMode:s}),s===y.modes.edit&&y.modified()}return y},this.geojson=function(e,t,n,r){if(void 0!==e){var i=s.createFileReader("geojsonReader",{layer:y});if(!i.canRead(e))return;return!0===t&&y.removeAllAnnotations(!0,!1),"update"===t&&u.each(y.annotations(),(function(e,t){t.options("updated",!1)})),i.read(e,(function(e){u.each(e.slice(),(function(e,t){y._geojsonFeatureToAnnotation(t,n),y.deleteFeature(t)}))})),"update"===t&&u.each(y.annotations(),(function(e,t){!1===t.options("updated")&&t.state()===o.state.done&&y.removeAnnotation(t,!1)})),y.modified(),y.draw(),A.length}e=null;var a=[];return u.each(A,(function(e,t){var i=t.geojson(n,r);i&&a.push(i)})),a.length&&(e={type:"FeatureCollection",features:a}),e},this._geojsonFeatureToAnnotation=function(e,t){var n=e.data(),r=s.listAnnotations(),i=y.map();t=null===t?i.gcs():void 0===t?i.ingcs():t,u.each(n,(function(n,c){var d,f,p,h,m=(c.properties||{}).annotationType||e.featureType,g=u.extend({},c.properties||{});if(!(u.inArray(m,r)<0)){switch(g.style=g.style||{},g.labelStyle=g.labelStyle||{},delete g.annotationType,e.featureType){case"line":if(!(d=e.line()(c,n))||d.length<2)return;d=d.slice();break;case"polygon":if(!(d=e.polygon()(c,n))||!d.outer||d.outer.length<3)return;if((d=d.outer.slice())[d.length-1][0]===d[0][0]&&d[d.length-1][1]===d[0][1]&&(d.splice(d.length-1,1),d.length<3))return;break;case"point":d=[e.position()(c,n)]}for(p=0;p<d.length;p+=1)d[p]=v.normalizeCoordinates(d[p]);(f=c.crs&&"name"===c.crs.type&&c.crs.properties&&"proj4"===c.crs.properties.type&&c.crs.properties.name?c.crs.properties.name:t)!==i.gcs()&&(d=l.transformCoordinates(f,i.gcs(),d)),g.coordinates=d,u.each(P,(function(t,r){var i;u.each(r.keys,(function(e,t){void 0===i&&(i=y.validateAttribute(g[t],r.dataType))})),void 0===i&&(i=y.validateAttribute(e.style.get(t)(c,n),r.dataType)),void 0!==i&&(g[r.option||"style"][t]=i)})),u.each(P,(function(e,t){u.each(t.keys,(function(e,t){delete g[t]}))})),void 0!==g.annotationId&&(h=y.annotationById(g.annotationId))&&delete g.annotationId,h&&h.type()===m&&h.state()===o.state.done&&!1===h.options("updated")?(delete g.state,delete g.layer,g.updated=!0,h.options(g),y.geoTrigger(a.annotation.update,{annotation:h})):(g.state=o.state.done,g.layer=y,g.updated="new",y.addAnnotation(s.createAnnotation(m,g),null))}}))},this.validateAttribute=function(e,t){var n;if(null!=e){switch(t){case"angle":if(""===e)break;if(!(n=/^\s*([-.0-9eE]+)\s*(deg|rad|grad|turn)?\s*$/.exec((""+e).toLowerCase()))||!isFinite(n[1]))return;var r="grad"===n[2]?Math.PI/200:"deg"===n[2]?Math.PI/180:"turn"===n[2]?2*Math.PI:1;e=+n[1]*r;break;case"boolean":e=!!e&&["false","no","off"].indexOf((""+e).toLowerCase())<0;break;case"booleanOrNumber":if(!e&&0!==e&&""!==e||["true","false","off","on","no","yes"].indexOf((""+e).toLowerCase())>=0)e=!!e&&["false","no","off"].indexOf((""+e).toLowerCase())<0;else{if(!v.isNonNullFinite(e))return;e=+e}break;case"coordinate2":if(""===e)break;if(e&&v.isNonNullFinite(e.x)&&v.isNonNullFinite(e.y)){e.x=+e.x,e.y=+e.y;break}try{e=JSON.parse(e)}catch(e){}if(e&&v.isNonNullFinite(e.x)&&v.isNonNullFinite(e.y)){e.x=+e.x,e.y=+e.y;break}if(Array.isArray(e)&&v.isNonNullFinite(e[0])&&v.isNonNullFinite(e[1])){e={x:+e[0],y:+e[1]};break}if(!(n=/^\s*([-.0-9eE]+)(?:\s+|\s*,)\s*([-.0-9eE]+)\s*$/.exec(""+e))||!isFinite(n[1])||!isFinite(n[2]))return;e={x:+n[1],y:+n[2]};break;case"color":if(void 0===(e=v.convertColor(e))||void 0===e.r)return;break;case"number":if(!v.isNonNullFinite(e))return;e=+e;break;case"numberOrBlank":if(""===e)break;if(!v.isNonNullFinite(e))return;e=+e;break;case"opacity":if(""===e)return;if(e=+e,isNaN(e)||e<0||e>1)return;break;case"positive":if(e=+e,!isFinite(e)||e<=0)return;break;case"text":e=""+e}return e}},this._update=function(){if(y.timestamp()>S.timestamp()){var e=y.options("showLabels")?[]:null,t=y.options("clickToEdit")||y.mode()===y.modes.edit;u.each(T,(function(e,t){u.each(t,(function(e,t){t.data=[],delete t.feature.scaleOnZoom}))})),u.each(A,(function(n,r){var i=r.features();if(e){var o=r.labelRecord();o&&e.push(o)}u.each(i,(function(e,n){void 0===T[e]&&(T[e]={}),u.each(n,(function(n,i){if(T[e][n])(o=T[e][n].feature).selectionAPI()!==!!t&&(o.selectionAPI(t),t?(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff)):(o.geoOff(a.feature.mouseon,y._handleMouseOn),o.geoOff(a.feature.mouseoff,y._handleMouseOff)));else{var o=y.createFeature(n,{gcs:y.map().gcs(),selectionAPI:t});if(!o){var s="error_feature_"+n;return void(y[s]||(console.warn("Cannot create a "+n+" feature for annotations."),y[s]=!0))}t&&(o.geoOn(a.feature.mouseon,y._handleMouseOn),o.geoOn(a.feature.mouseoff,y._handleMouseOff));var l={};u.each(["closed","fill","fillColor","fillOpacity","line","lineCap","lineJoin","polygon","position","radius","stroke","strokeColor","strokeOffset","strokeOpacity","strokeWidth","uniformPolygon"],(function(e,t){var n;void 0!==o.style()[t]&&(n=o.style.get(t)),l[t]=function(e,r,i,o){var a=e&&e.style?e.style:e&&e[2]&&e[2].style?e[2].style:i.style,s=a?a[t]:e;return v.isFunction(s)&&(s=s(e,r,i,o)),void 0===s&&n&&(s=n(e,r,i,o)),s}})),o.style(l),T[e][n]={feature:o,style:l,data:[]}}var c=i.data||i;Array.isArray(c)||(c=[c]),c.forEach((function(t){t.annotation=r,T[e][n].data.push(t),i.scaleOnZoom&&(T[e][n].feature.scaleOnZoom=!0)}))}))}))})),u.each(T,(function(e,t){u.each(t,(function(e,t){t.feature.data(t.data)}))})),y._updateLabels(e),S.modified()}return _.call(y,arguments),y},this._updateLabels=function(e){if(!e||!e.length)return y._removeLabelFeature(),y;if(!f){if(!(s.registries.features[y.rendererName()]||{}).text){var t=s.rendererForFeatures(["text"]);p=s.createLayer("feature",y.map(),{renderer:t}),y.addChild(p),p._update(),y.geoTrigger(a.layerAdd,{target:y,layer:p})}var n={};d.usedStyles.forEach((function(e){n[e]=function(t,n){return t.style&&void 0!==t.style[e]?t.style[e]:(y.options("defaultLabelStyle")||{})[e]}})),f=(p||y).createFeature("text",{style:n,gcs:y.map().gcs(),position:function(e){return e.position}})}return f.data(e),y},this._handleZoom=function(){var e,t=y.features();for(e=0;e<t.length;e+=1)t[e].scaleOnZoom&&t[e].modified()},this._removeLabelFeature=function(){return p&&(p._exit(),y.removeChild(p),y.geoTrigger(a.layerRemove,{target:y,layer:p}),p=f=null),f&&(y.removeFeature(f),f=null),y},this.draw=function(){return y._update(),w.call(y),y},this._init=function(){return b.call(y),y.map().interactor()||y.map().interactor(m({actions:[]})),y.geoOn(a.actionselection,y._processAction),y.geoOn(a.actionmove,y._processAction),y.geoOn(a.actionup,y._processAction),y.geoOn(a.mouseclick,y._handleMouseClick),y.geoOn(a.mousemove,y._handleMouseMove),y.geoOn(a.zoom,y._handleZoom),y},this._exit=function(){return h&&h.reset(),y._removeLabelFeature(),x.call(y),A=[],T=[],y},y};r(f,i),s.registerLayer("annotation",f),e.exports=f},9986:function(e,t,n){var r=n(5699),i=n(3737),o=n(4634),a=n(8054),s=n(5365),l=n(5240),u=n(8608),c=function e(t){if(!(this instanceof e))return new e(t);var r=n(5108);return t=t||{},i.call(this,t),this._view=o.mat4AsArray(),this._proj=o.mat4AsArray(),this._projection=null,this._transform=o.mat4AsArray(),this._inverse=o.mat4AsArray(),this._bounds=null,this._display=null,this._world=null,this._viewport={width:1,height:1},this._createProj=function(){var e="perspective"===this._projection?l.frustum:l.ortho,t=this._clipbounds[this._projection];e(this._proj,t.left,t.right,t.bottom,t.top,t.near,t.far)},this._update=function(){this._bounds=null,this._display=null,this._world=null,this._transform=l.multiply(o.mat4AsArray(),this._proj,this._view),l.invert(this._inverse,this._transform),this.geoTrigger(r.camera.view,{camera:this})},Object.defineProperty(this,"view",{get:function(){return this._view},set:function(e){l.copy(this._view,e),this._update()},configurable:!0}),Object.defineProperty(this,"bounds",{get:function(){return null===this._bounds&&(this._bounds=this._getBounds()),this._bounds},set:function(e){this._setBounds(e),this._update()}}),Object.defineProperty(this,"clipbounds",{get:function(){return this._clipbounds[this._projection]},set:function(e){var t=this._clipbounds[this._projection];if((e={left:void 0===e.left?t.left:e.left,right:void 0===e.right?t.right:e.right,top:void 0===e.top?t.top:e.top,bottom:void 0===e.bottom?t.bottom:e.bottom,near:void 0===e.near?t.near:e.near,far:void 0===e.far?t.far:e.far}).left===e.right)throw new Error("Left and right values must be different");if(e.top===e.bottom)throw new Error("Top and bottom values must be different");if(e.near===e.far)throw new Error("Near and far values must be different");this._clipbounds[this._projection]=e,this._createProj(),this._update()}}),Object.defineProperty(this,"display",{get:function(){if(null===this._display){var e=this._clipbounds[this._projection],t=o.mat4AsArray();l.translate(t,t,[this.viewport.width/2,this.viewport.height/2,0]),l.scale(t,t,[this.viewport.width/(e.right-e.left),this.viewport.height/(e.bottom-e.top),1]),l.translate(t,t,[-(e.left+e.right)/2,-(e.top+e.bottom)/2,0]),l.multiply(t,t,this._transform),this._display=t}return this._display}}),Object.defineProperty(this,"world",{get:function(){return null===this._world&&(this._world=l.invert(o.mat4AsArray(),this.display)),this._world}}),Object.defineProperty(this,"projection",{get:function(){return this._projection},set:function(e){if(!this.constructor.projection[e])throw new Error("Unsupported projection type: "+e);e!==this._projection&&(this._projection=e,this._createProj(),this._update(),this.geoTrigger(r.camera.projection,{camera:this,projection:e}))}}),Object.defineProperty(this,"projectionMatrix",{get:function(){return this._proj}}),Object.defineProperty(this,"transform",{get:function(){return this._transform}}),Object.defineProperty(this,"inverse",{get:function(){return this._inverse}}),Object.defineProperty(this,"viewport",{get:function(){return{width:this._viewport.width,height:this._viewport.height,left:this._viewport.left,top:this._viewport.top}},set:function(e){if(!(e.width>0&&e.height>0))throw new Error("Invalid viewport dimensions");e.width===this._viewport.width&&e.height===this._viewport.height||(this._viewport.width&&this._viewport.height&&(this._scale([this._viewport.width/e.width,this._viewport.height/e.height,1]),this._translate([(e.width-this._viewport.width)/2,(e.height-this._viewport.height)/2,0])),this._viewport={width:e.width,height:e.height,left:e.left,top:e.top},this._update(),this.geoTrigger(r.camera.viewport,{camera:this,viewport:this.viewport}))}}),this._resetView=function(){return l.identity(this._view),this},this._translate=function(e){return l.translate(this._view,this._view,e),this},this._scale=function(e){return l.scale(this._view,this._view,e),this},this._worldToClip4=function(e){return u.transformMat4(e,e,this._transform)},this._clipToWorld4=function(e){return u.transformMat4(e,e,this._inverse)},this.applyProjection=function(e){var t;return"perspective"===this._projection?(t=1/(e[3]||1),e[0]=t*e[0],e[1]=t*e[1],e[2]=t*e[2],e[3]=t):e[3]=1,e},this.unapplyProjection=function(e){var t;return"perspective"===this._projection?(t=e[3]||1,e[0]=t*e[0],e[1]=t*e[1],e[2]=t*e[2],e[3]=t):e[3]=1,e},this.worldToDisplay4=function(e){return e=[e[0],e[1],e[2]||0,e[3]||1],(e=u.transformMat4(e,e,this.display))[3]&&1!==e[3]&&(e=[e[0]/e[3],e[1]/e[3],e[2]/e[3],1]),e},this.displayToWorld4=function(e){return e=[e[0],e[1],e[2]||0,e[3]||1],(e=u.transformMat4(e,e,this.world))[3]&&1!==e[3]&&(e=[e[0]/e[3],e[1]/e[3],e[2]/e[3],1]),e},this.worldToDisplay=function(e){var t=this._clipbounds[this._projection];return{x:(e=this.worldToDisplay4([e.x,e.y,-t.near]))[0],y:e[1]}},this.displayToWorld=function(e){return{x:(e=this.displayToWorld4([e.x,e.y,-1]))[0],y:e[1]}},this._getBounds=function(){var e,t,n,r,i={};return e=this.displayToWorld({x:0,y:0}),t=this.displayToWorld({x:this._viewport.width,y:0}),n=this.displayToWorld({x:0,y:this._viewport.height}),r=this.displayToWorld({x:this._viewport.width,y:this._viewport.height}),i.left=Math.min(e.x,t.x,n.x,r.x),i.bottom=Math.min(e.y,t.y,n.y,r.y),i.right=Math.max(e.x,t.x,n.x,r.x),i.top=Math.max(e.y,t.y,n.y,r.y),i},this._setBounds=function(e){var t={width:e.right-e.left,height:e.top-e.bottom},n={x:(e.left+e.right)/2,y:(e.bottom+e.top)/2};return this._viewFromCenterSizeRotation(n,t,0),this},this._viewFromCenterSizeRotation=function(e,t,n){var r,i,a,s=o.vec3AsArray(),l=o.vec3AsArray();return this._resetView(),(i=Math.abs(t.width))/(a=Math.abs(t.height))>=(r=this._viewport.width/this._viewport.height)?(a=i/r,l[0]=2/i,l[1]=2/a):(i=a*r,l[0]=2/i,l[1]=2/a),l[2]=1,this._scale(l),n&&this._rotate(n),s[0]=-e.x,s[1]=-e.y,s[2]=0,this._translate(s),this},this.viewFromCenterSizeRotation=function(e,t,n){return this._viewFromCenterSizeRotation(e,t,n),this._update(),this},this.pan=function(e){if(e.x||e.y||e.z)return this._translate([e.x,e.y,e.z||0]),this._update(),this},this.zoom=function(e){if(1!==e)return l.scale(this._view,this._view,[e,e,e]),this._update(),this},this._rotate=function(e,t,n){if(e){n=n||[0,0,-1],t?void 0!==t.x&&(t=[t.x||0,t.y||0,t.z||0]):t=[0,0,0];var r=[-t[0],-t[1],-t[2]];return l.translate(this._view,this._view,t),l.rotate(this._view,this._view,e,n),l.translate(this._view,this._view,r),this}},this.css=function(t){var n;switch((t||"").toLowerCase()){case"display":case"":n=this.display;break;case"world":n=this.world;break;default:throw new Error("Unknown transform "+t)}return e.css(n)},this.ppMatrix=function(e,t){var n=e;function r(e){var r=n[e],i=r.toExponential(t);return r>=0&&(i=" "+i),i}return t=t||2,[[r(0),r(4),r(8),r(12)].join(" "),[r(1),r(5),r(9),r(13)].join(" "),[r(2),r(6),r(10),r(14)].join(" "),[r(3),r(7),r(11),r(15)].join(" ")].join("\n")},this.toString=function(){return this.ppMatrix(this._transform)},this.debug=function(){return["bounds",JSON.stringify(this.bounds),"view:",this.ppMatrix(this._view),"projection:",this.ppMatrix(this._proj),"transform:",this.ppMatrix(this._transform)].join("\n")},this.valueOf=function(){return this._transform},this._clipbounds=this.constructor.clipbounds,this._resetView(),this.projection=t.projection||"parallel",t.viewport&&(this.viewport=t.viewport),this._update(),this};c.projection={perspective:!0,parallel:!0},c.clipbounds={perspective:{left:-1,right:1,top:1,bottom:-1,far:2e3,near:.01},parallel:{left:-1,right:1,top:1,bottom:-1,far:-1,near:1}},c.css=function(e){return"matrix3d("+e.map((function(e){return(e=(+e).toPrecision(15)).indexOf("e")>=0?e=(+e).toString():e.indexOf(".")>=0&&(e=e.replace(/(\.|)0+$/,"")),e})).join(",")+")"},c.vec3=s,c.mat3=a,c.vec4=u,c.mat4=l,r(c,i),e.exports=c},3086:function(e,t,n){var r,i=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function e(t){"use strict";var r=n(5638);if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var i=this,o=!0,s=this._init,l=this._exit;return this.clearCanvas=function(e){o=e},this.api=function(){return e.apiname},this._init=function(){if(i.initialized())return i;s.call(i);var e=t.canvas||r(document.createElement("canvas"));i.context2d=e[0].getContext("2d"),e.addClass("canvas-canvas"),r(i.layer().node().get(0)).append(e),i.canvas(e);var n=i.layer().map().size();return i._resize(0,0,n.width,n.height),i},this._resize=function(e,t,n,r){var o=i.canvas();return parseInt(o.attr("width"),10)===n&&parseInt(o.attr("height"),10)===r||(i._setWidthHeight(n,r),o.attr("width",n),o.attr("height",r),i._render()),i},this._render=function(){return i.layer().map().scheduleAnimationFrame(i._renderFrame),i},this._renderFrame=function(){var e,t=i.layer(),n=t.map(),r=n.size(),a=t.features?t.features():[];for(e=0;e<a.length;e+=1)if(a[e]._delayRender())return void i._render();for(o&&(i.context2d.setTransform(1,0,0,1,0,0),i.context2d.clearRect(0,0,r.width,r.height)),e=0;e<a.length;e+=1)a[e].visible()&&a[e]._renderOnCanvas(i.context2d,n)},this._exit=function(){i.canvas().remove(),l()},this};s.apiname="canvas",i(s,a),o("canvas",s),s.supported=function(){if(void 0===r){var e;try{e=document.createElement("canvas"),r=!(!e.getContext||!e.getContext("2d"))}catch(e){r=!1}e=void 0}return r},s.fallback=function(){return null},e.exports=s},1225:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(1111),a=n(6618),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(3160).call(this);var r,i,l,u,c,d,f=n(5108),p=this,h=this._init,m=this._update,g=a();return this._computeGradient=function(){var e,t,n,r,i;if(i=p.style("color"),!p._grad||p._gradColors!==i){for(t in r=(n=(e=document.createElement("canvas")).getContext("2d")).createLinearGradient(0,0,0,256),e.width=1,e.height=256,i)r.addColorStop(t,s.convertColorToRGBA(i[t]));n.fillStyle=r,n.fillRect(0,0,1,256),p._grad=n.getImageData(0,0,1,256).data,p._gradColors=i}return p},this._createCircle=function(){var e,t,n,r,i,o,a;if(n=p.style("radius"),i=p.style("blurRadius"),o=p.style("gaussian"),a=p.style("scaleWithZoom")){var s=this.layer().map().zoom();n*=a=Math.pow(2,s),i*=a}if(!p._circle||p._circle.gaussian!==o||p._circle.radius!==n||p._circle.blurRadius!==i){if(t=(e=p._circle=document.createElement("canvas")).getContext("2d"),r=i+n,e.width=e.height=2*r,o){var l=t.createRadialGradient(r,r,0,r,r,r);l.addColorStop(0,"rgba(255,255,255,1)"),l.addColorStop(.1,"rgba(255,255,255,0.946)"),l.addColorStop(.2,"rgba(255,255,255,0.801)"),l.addColorStop(.3,"rgba(255,255,255,0.607)"),l.addColorStop(.4,"rgba(255,255,255,0.411)"),l.addColorStop(.5,"rgba(255,255,255,0.249)"),l.addColorStop(.6,"rgba(255,255,255,0.135)"),l.addColorStop(.7,"rgba(255,255,255,0.066)"),l.addColorStop(.8,"rgba(255,255,255,0.029)"),l.addColorStop(.9,"rgba(255,255,255,0.011)"),l.addColorStop(1,"rgba(255,255,255,0)"),t.fillStyle=l,t.fillRect(0,0,2*r,2*r)}else t.shadowOffsetX=t.shadowOffsetY=2*r,t.shadowBlur=i,t.shadowColor="black",t.beginPath(),t.arc(-r,-r,n,0,2*Math.PI,!0),t.closePath(),t.fill();e.radius=n,e.blurRadius=i,e.gaussian=o,p._circle=e}return p},this._colorize=function(e,t){var n,o,a,s=new Uint32Array(t.buffer),u=e.length;for(r&&r.length===u||(r=new ArrayBuffer(u),i=new Uint8ClampedArray(r),l=new Uint32Array(r)),n=3,a=0;n<u;n+=4,a+=1)(o=e[n])&&(l[a]=s[o]);e.set(i)},this._renderPoints=function(e,t,n,r){var i,o,a,s=p.gcsPosition(),l=p.intensity(),u=p.minIntensity(),c=p.maxIntensity()-u||1;for(i=n.length-1;i>=0;i-=1)o=t.worldToDisplay(s[i]),(a=(l(n[i],i)-u)/c)<=0||(e.globalAlpha=a<.01?.01:a>1?1:a,e.drawImage(p._circle,o.x-r,o.y-r))},this._renderBinnedData=function(e,t,n,r,i){var o,a,s,l,u,c,d,f,h=p.gcsPosition(),m=p.intensity(),g=p.minIntensity(),v=p.maxIntensity()-g||1,y=t.size(),b=[],x=Math.ceil(r/i),w=Math.ceil(y.width/i)+2*x+2,_=Math.ceil(y.height/i)+2*x+2,S=n.length;for(o=0;o<S;o+=1)a=t.worldToDisplay(h[o]),isNaN(a.x)||isNaN(a.y)||(void 0===d&&(d=(a.x%i+i)%i,f=(a.y%i+i)%i),(l=Math.floor((a.x-d)/i)+x+1)<0||l>=w||(u=Math.floor((a.y-f)/i)+x+1)<0||u>=_||(s=(m(n[o],o)-g)/v)<=0||(s>1&&(s=1),b[u]=b[u]||[],l*=4,(c=b[u])[l]?(c[l]+=s,c[l+1]+=(1-c[l+1])*s,c[l+2]+=a.x*s,c[l+3]+=a.y*s):(c[l]=c[l+1]=s,c[l+2]=a.x*s,c[l+3]=a.y*s)));for(u=b.length-1;u>=0;u-=1)if(c=b[u])for(l=c.length-4;l>=0;l-=4)c[l]&&(s=c[l+1],e.globalAlpha=s<.01?.01:s>1?1:s,e.drawImage(p._circle,c[l+2]/c[l]-r,c[l+3]/c[l]-r))},this._renderOnCanvas=function(e,t){if(g.timestamp()<p.buildTime().timestamp()){var n,r,i=Date.now(),o=p.data()||[],a=p.style("radius")+p.style("blurRadius"),s=p.binned(),l=p.layer(),f=t.size();if(p.style("scaleWithZoom")&&(a*=Math.pow(2,t.zoom())),!0===s||"auto"===s)if(s=Math.max(Math.floor(a/8),Math.max(1.5,Math.min(3,a/2.5))),"auto"===p.binned())Math.ceil((f.width+2*a)/s)*Math.ceil((f.height+2*a)/s)>=o.length&&(s=0);(s<1||isNaN(s))&&(s=!1),p._binned=s,e.setTransform(1,0,0,1,0,0),e.clearRect(0,0,f.width,f.height),c="",a>.5&&a<8192&&(t.scheduleAnimationFrame(p._setTransform,!1),l.canvas().css({transform:""}),p._createCircle(),p._computeGradient(),s?p._renderBinnedData(e,t,o,a,s):p._renderPoints(e,t,o,a),n=l.canvas()[0],r=e.getImageData(0,0,n.width,n.height),p._colorize(r.data,p._grad),e.putImageData(r,0,0)),u={zoom:t.zoom(),gcsOrigin:t.displayToGcs({x:0,y:0},null),rotation:t.rotation(),lastScale:void 0,lastOrigin:{x:0,y:0},lastRotation:void 0},g.modified(),l.renderer().clearCanvas(!1),d=Date.now()-i}return p},this._init=function(){return h.call(p,t),p.geoOn(f.pan,p._animatePan),p},this._update=function(){return m.call(p),(p.buildTime().timestamp()<=p.dataTime().timestamp()||p.updateTime().timestamp()<p.timestamp())&&p._build(),p.updateTime().modified(),p},this._setTransform=function(){p.layer()&&p.layer().canvas()&&p.layer().canvas()[0]&&(p.layer().canvas()[0].style.transform=c)},this._animatePan=function(){if(u){var e=p.layer().map(),t=e.zoom(),n=Math.pow(2,t-u.zoom),r=e.gcsToDisplay(u.gcsOrigin,null),i=e.rotation();if(u.lastScale!==n||u.lastOrigin.x!==r.x||u.lastOrigin.y!==r.y||u.lastRotation!==i){var o=" translate("+r.x+"px,"+r.y+"px) scale("+n+") rotate("+180*(i-u.rotation)/Math.PI+"deg)";if(e.scheduleAnimationFrame(p._setTransform),c=o,u.lastScale=n,u.lastOrigin.x=r.x,u.lastOrigin.y=r.y,u.lastRotation=i,u.timeout&&(window.clearTimeout(u.timeout),u.timeout=void 0),1!==parseFloat(n.toFixed(4))||0!==parseFloat((i-u.rotation).toFixed(4))||0!==parseFloat(r.x.toFixed(1))||0!==parseFloat(r.y.toFixed(1))){var a=p.updateDelay();a=a<0&&d?d-Math.floor(1e3/60*a):d?2*d:100,u.timeout=window.setTimeout((function(){u.timeout=void 0,p.buildTime().modified(),p.layer().draw()}),p.updateDelay())}}}},p._init(t),this};r(l,o),i("canvas","heatmap",l),e.exports=l},7562:function(e,t,n){e.exports={canvasRenderer:n(3086),heatmapFeature:n(1225),isolineFeature:n(6025),lineFeature:n(7822),pixelmapFeature:n(1471),quadFeature:n(9895),textFeature:n(8124),tileLayer:n(5993),trackFeature:n(1546)}},6025:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2367),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(3160).call(this),this._init(t),this):new e(t)};r(a,o),i("canvas","isoline",a),e.exports=a},7822:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(3160);t=t||{},o.call(this,t),r.call(this);var i=this;return this._renderOnCanvas=function(e,t){var n,r,o,a,s,l=i.data(),u=i.position(),c=i.line(),d=i.style.get("strokeWidth"),f=i.style.get("strokeColor"),p=i.style.get("strokeOpacity"),h=i.style.get("lineCap"),m=i.style.get("lineJoin"),g=i.style.get("miterLimit")(l),v=i.style.get("closed"),y={},b={};l.forEach((function(t,l){if(!((r=c(t,l)).length<2)){for(b.closed=v(t,l),b.width=d(r[0],0,t,l),b.color=f(r[0],0,t,l),b.opacity=p(r[0],0,t,l),b.linecap=h(r[0],0,t,l),b.linejoin=m(r[0],0,t,l),b.strokeStyle="rgba("+255*b.color.g+", "+255*b.color.g+", "+255*b.color.b+", "+(void 0!==b.opacity?b.opacity:1)+")",y.strokeStyle===b.strokeStyle&&y.width===b.width&&y.linecap===b.linecap&&y.linejoin===b.linejoin&&y.miterlimit===b.miterlimit||(void 0!==y.strokeStyle&&e.stroke(),e.beginPath(),e.strokeStyle=b.strokeStyle,e.lineWidth=b.width,e.lineCap=b.linecap,e.lineJoin=b.linejoin,e.miterLimit=g),s=0;s<r.length;s+=1)o=i.featureGcsToDisplay(u(r[s],s,t,l)),s?e.lineTo(o.x,o.y):(a=o,e.moveTo(o.x,o.y));b.closed&&e.lineTo(a.x,a.y),n=y,y=b,b=n}})),void 0!==y.strokeStyle&&e.stroke()},this._init(t),this};r(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,i("canvas","line",a,s),e.exports=a},3160:function(e,t,n){e.exports=function e(t){"use strict";if(!(this instanceof n(3737)))return new e(t);var r=this,i=this.draw,o={};return this._renderOnCanvas=function(){},this._delayRender=function(){return!1},this._canvasProperty=function(e,t,n){return e&&t?(o[t]!==n&&(o[t]=n,e[t]=n),r):(o={},r)},this.draw=function(){return r.ready&&(r._update(),r.renderer()._render(),i()),r},this}},1471:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6374),a=n(5108),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(3160).call(this);var r,i=this._exit,l=this;return this.pointSearch=function(e,t){if(r&&l.m_info){var n=r.pointSearch(e,t);if(1===n.index.length&&n.extra&&n.extra[n.index[0]].basis){var i,o,a,s=n.extra[n.index[0]].basis;if(i=Math.floor(s.x*l.m_info.width),o=Math.floor(s.y*l.m_info.height),i>=0&&i<l.m_info.width&&o>=0&&o<l.m_info.height)return n={index:[a=l.m_info.indices[o*l.m_info.width+i]],found:[l.data()[a]]}}}return{index:[],found:[]}},this._preparePixelmap=function(){var e,t,n;if(s.isReadyImage(l.m_srcImage)){for(l.m_info={width:l.m_srcImage.naturalWidth,height:l.m_srcImage.naturalHeight,canvas:document.createElement("canvas")},l.m_info.canvas.width=l.m_info.width,l.m_info.canvas.height=l.m_info.height,l.m_info.context=l.m_info.canvas.getContext("2d"),l.m_info.context.drawImage(l.m_srcImage,0,0),l.m_info.imageData=l.m_info.context.getImageData(0,0,l.m_info.canvas.width,l.m_info.canvas.height),n=l.m_info.imageData.data,l.m_info.indices=new Array(n.length/4),l.m_info.area=n.length/4,l.m_info.mappedColors={},e=0;e<n.length;e+=4)t=n[e]+(n[e+1]<<8)+(n[e+2]<<16),l.m_info.indices[e/4]=t,l.m_info.mappedColors[t]||(l.m_info.mappedColors[t]={first:e/4}),l.m_info.mappedColors[t].last=e/4;return l.m_info}},this._computePixelmap=function(){var e,t,n,i,o,s,u,c,d,f,p=l.data()||[],h=l.style.get("color"),m=-1;if(!l.m_info){if(l.indexModified(void 0,"clear"),!l._preparePixelmap())return;f=!0}for(t in l.indexModified(void 0,"clear"),u=l.m_info.mappedColors,c=l.m_info.area,u)u.hasOwnProperty(t)&&(i=[255*((i=h(p[t],+t)||{}).r||0),255*(i.g||0),255*(i.b||0),void 0===i.a?255:255*i.a],u[t].update=!u[t].color||u[t].color[0]!==i[0]||u[t].color[1]!==i[1]||u[t].color[2]!==i[2]||u[t].color[3]!==i[3],u[t].update&&(u[t].color=i,c=Math.min(u[t].first,c),m=Math.max(u[t].last,m)));if(!(c>=m)){for(o=l.m_info.imageData.data,s=l.m_info.indices,e=c;e<=m;e+=1)(t=s[e])!==n&&(n=t,i=u[t].color,d=u[t].update),d&&(o[4*e]=i[0],o[4*e+1]=i[1],o[4*e+2]=i[2],o[4*e+3]=i[3]);l.m_info.context.putImageData(l.m_info.imageData,0,0,0,Math.floor(c/l.m_info.width),l.m_info.width,Math.ceil((m+1)/l.m_info.width)),r||(r=l.layer().createFeature("quad",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([r]),r.style({image:l.m_info.canvas,position:l.style.get("position")}).data([{}]).draw()),f&&l.geoTrigger(a.pixelmap.prepared,{pixelmap:l})}},this._exit=function(){return r&&l.layer()&&(l.layer().deleteFeature(r),r=null,l.dependentFeatures([])),i(),l},this._init(t),this};r(l,o),i("canvas","pixelmap",l),e.exports=l},9895:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=n(4634),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(3160).call(this);var r,i=n(5638),s=this,l=this._exit,u=this._init,c=this._update;return this._build=function(){s.position()&&((r=s._generateQuads()).imgQuads&&r.imgQuads.sort((function(e,t){return e.pos[2]-t.pos[2]})),s.buildTime().modified())},this._checkQuadUpdate=function(e,t){s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._checkIfChanged=function(){if(r&&r.vidQuads&&r.vidQuads.length){var e=!1,t=!1;i.each(r.vidQuads,(function(n,r){r.video&&void 0!==r.video.HAVE_CURRENT_DATA&&(!r.video.seeking&&r.video.readyState>=r.video.HAVE_CURRENT_DATA&&(e=!0),r.video.paused&&!r.video.seeking||(t=!0))})),e&&s.renderer()&&s.renderer()._render(),t&&s.layer().map().scheduleAnimationFrame(s._checkIfChanged)}},this._renderColorQuads=function(e,t){if(r.clrQuads&&r.clrQuads.length){var n=e.globalAlpha,o=n;i.each(r.clrQuads,(function(n,r){var i=t.gcsToDisplay({x:r.pos[0],y:r.pos[1]},null),s=t.gcsToDisplay({x:r.pos[3],y:r.pos[4]},null),l=t.gcsToDisplay({x:r.pos[6],y:r.pos[7]},null),u=t.gcsToDisplay({x:r.pos[9],y:r.pos[10]},null);r.opacity!==o&&(o=r.opacity,e.globalAlpha=o),e.fillStyle=a.convertColorToHex(r.color,!0),e.beginPath(),e.moveTo(i.x,i.y),e.lineTo(s.x,s.y),e.lineTo(u.x,u.y),e.lineTo(l.x,l.y),e.closePath(),e.fill()})),o!==n&&(e.globalAlpha=n)}},this._renderImageAndVideoQuads=function(e,t){if(r.imgQuads&&r.imgQuads.length||r.vidQuads&&r.vidQuads.length){var n=e.globalAlpha,o=n;i.each([r.imgQuads,r.vidQuads],(function(n,r){r&&i.each(r,(function(n,r){var i,a,s;if(r.image)a=(i=r.image).width,s=i.height;else if(r.video&&(a=(i=r.video).videoWidth,s=i.videoHeight,i.seeking))return;if(i&&a&&s&&!(r.opacity<=0)){var l=t.gcsToDisplay({x:r.pos[0],y:r.pos[1]},null),u=t.gcsToDisplay({x:r.pos[6],y:r.pos[7]},null),c=t.gcsToDisplay({x:r.pos[9],y:r.pos[10]},null);if(e.setTransform((c.x-u.x)/a,(c.y-u.y)/a,(l.x-u.x)/s,(l.y-u.y)/s,u.x,u.y),r.opacity!==o&&(o=r.opacity,e.globalAlpha=o),r.crop){var d=Math.min(a,r.crop.x||a),f=Math.min(s,r.crop.y||s),p=Math.max(0,r.crop.left||0),h=Math.max(0,r.crop.top||0),m=Math.min(a,r.crop.right||a),g=Math.min(s,r.crop.bottom||s);a&&s&&d>0&&f>0&&m>p&&g>h&&e.drawImage(i,p,h,Math.floor((m-p)*d/a),Math.floor((g-h)*f/s),0,0,d,f)}else e.drawImage(i,0,0)}}))})),o!==n&&(e.globalAlpha=n),e.setTransform(1,0,0,1,0,0)}},this._delayRender=function(){var e=!1;return r&&r.vidQuads&&r.vidQuads.length&&i.each(r.vidQuads,(function(t,n){n.video&&void 0!==n.video.HAVE_CURRENT_DATA&&(e|=n.video.seeking&&n.delayRenderWhenSeeking)})),e},this._renderOnCanvas=function(e,t){r&&(s._renderImageAndVideoQuads(e,t),s._renderColorQuads(e,t))},this._update=function(){c.call(s),(s.buildTime().timestamp()<=s.dataTime().timestamp()||s.updateTime().timestamp()<s.timestamp())&&s._build(),s.updateTime().modified(),s.layer().map().scheduleAnimationFrame(s._checkIfChanged)},this._init=function(){u.call(s,t)},this._exit=function(){l.call(s)},s._init(t),this};r(s,o);var l={};l[o.capabilities.color]=!0,l[o.capabilities.image]=!0,l[o.capabilities.imageCrop]=!0,l[o.capabilities.imageFixedScale]=!0,l[o.capabilities.imageFull]=!1,l[o.capabilities.canvas]=!0,l[o.capabilities.video]=!0,i("canvas","quad",s,l),e.exports=s},8124:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(9757),a=n(4634),s=n(8054),l=n(5365),u=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(3160);t=t||{},o.call(this,t),r.call(this);var i=this,u="bold 16px sans-serif",c=new RegExp('^\\s*(?=(?:(?:[-a-z0-9]+\\s+){0,3}(italic|oblique))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(small-caps))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}(bold(?:er)?|lighter|[1-9]00))?)(?=(?:(?:[-a-z0-9]+\\s+){0,3}((?:ultra-|extra-|semi-)?(?:condensed|expanded)))?)(?:(?:normal|\\1|\\2|\\3|\\4)\\s+){0,4}((?:xx?-)?(?:small|large)|medium|smaller|larger|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx]))(?:/(normal|[.\\d]+(?:\\%|in|[cem]m|ex|p[ctx])))?\\s+([-,\\"\\sa-z]+?)\\s*$',"i");return this.getFontFromStyles=function(e,t,n){var r=i.style.get("font")(t,n)||u;if(e){var o=c.exec(r);null===o&&(o=c.exec(u)),o[1]=i.style.get("fontStyle")(t,n)||o[1],o[2]=i.style.get("fontVariant")(t,n)||o[2],o[3]=i.style.get("fontWeight")(t,n)||o[3],o[4]=i.style.get("fontStretch")(t,n)||o[4],o[5]=i.style.get("fontSize")(t,n)||o[5]||"16px",o[6]=i.style.get("lineHeight")(t,n)||o[6],o[7]=i.style.get("fontFamily")(t,n)||o[7]||"sans-serif",r=(r=(o[1]||"")+" "+(o[2]||"")+" "+(o[3]||"")+" "+(o[4]||"")+" "+(o[5]||"")+(o[6]?"/"+o[6]:"")+" "+o[7]).trim().replace(/\s\s+/g," ")}return r},this._renderOnCanvas=function(e,t){var n,r,o,u,c,d,f,p,h,m,g,v,y,b,x=i.data(),w=i.style.get("position"),_=i.style.get("renderThreshold")(x),S=i.style.get("text"),C=t.rotation(),A=t.zoom(),T=t.size(),P=a.mat3AsArray();n=["fontStyle","fontVariant","fontWeight","fontStretch","fontSize","lineHeight","fontFamily"].some((function(e){return null!==i.style(e)&&void 0!==i.style(e)})),i._canvasProperty(),o=i.featureGcsToDisplay(x.map(w)),x.forEach((function(t,x){u=o[x],_>0&&(u.x<-_||u.x>T.width+_||u.y<-_||u.y>T.height+_)||((c=i.style.get("visible")(t,x))||void 0===c)&&(d=a.convertColorAndOpacity(i.style.get("color")(t,x),i.style.get("textOpacity")(t,x)),p=a.convertColorAndOpacity(i.style.get("textStrokeColor")(t,x),i.style.get("textOpacity")(t,x),{r:0,g:0,b:0,a:0}),0===d.a&&0===p.a||(i._canvasProperty(e,"fillStyle",a.convertColorToRGBA(d)),r=S(t,x),i._canvasProperty(e,"font",i.getFontFromStyles(n,t,x)),i._canvasProperty(e,"textAlign",i.style.get("textAlign")(t,x)||"center"),i._canvasProperty(e,"textBaseline",i.style.get("textBaseline")(t,x)||"middle"),m=i.style.get("rotation")(t,x)||0,g=i.style.get("rotateWithMap")(t,x)&&C,v=i.style.get("textScaled")(t,x),v=a.isNonNullFinite(v)?Math.pow(2,A-v):null,y=i.style.get("offset")(t,x),b=a.mat3AsArray(),(m||g||v&&1!==v||y&&(y.x||y.y))&&(s.translate(b,b,[u.x,u.y]),g&&C&&s.rotate(b,b,C),s.translate(b,b,[y&&y.x?+y.x:0,y&&y.y?+y.y:0]),m&&s.rotate(b,b,m),v&&1!==v&&s.scale(b,b,[v,v]),s.translate(b,b,[-u.x,-u.y])),P[0]===b[0]&&P[1]===b[1]&&P[3]===b[3]&&P[4]===b[4]&&P[6]===b[6]&&P[7]===b[7]||(e.setTransform(b[0],b[1],b[3],b[4],b[6],b[7]),s.copy(P,b)),(d=a.convertColorAndOpacity(i.style.get("shadowColor")(t,x),void 0,{r:0,g:0,b:0,a:0})).a&&(y=i.style.get("shadowOffset")(t,x),f=i.style.get("shadowBlur")(t,x)),d.a&&(y&&(y.x||y.y)||f)?(i._canvasProperty(e,"shadowColor",a.convertColorToRGBA(d)),y&&(m||g)&&i.style.get("shadowRotate")(t,x)&&(b=[+y.x,+y.y,0],l.rotateZ(b,b,[0,0,0],m+(g?C:0)),y={x:b[0],y:b[1]}),i._canvasProperty(e,"shadowOffsetX",y&&y.x?+y.x:0),i._canvasProperty(e,"shadowOffsetY",y&&y.y?+y.y:0),i._canvasProperty(e,"shadowBlur",f||0)):i._canvasProperty(e,"shadowColor","rgba(0,0,0,0)"),p.a&&(h=i.style.get("textStrokeWidth")(t,x),isFinite(h)&&h>0&&(i._canvasProperty(e,"strokeStyle",a.convertColorToRGBA(p)),i._canvasProperty(e,"lineWidth",h),e.strokeText(r,u.x,u.y),i._canvasProperty(e,"shadowColor","rgba(0,0,0,0)"))),e.fillText(r,u.x,u.y)))})),i._canvasProperty(e,"globalAlpha",1),e.setTransform(1,0,0,1,0,0)},this};r(u,o);i("canvas","text",u,{}),e.exports=u},5993:function(e,t,n){var r=function(){"use strict";var e,t=this,n=this._init,r=this._exit,i=this._update,o=0,a=[];this._drawTile=function(n){if(e){var r=t._tileBounds(n),i=n.index.level||0,s=t._tileOffset(i),l=t.tileCropFromBounds(n),u={};l&&(u.crop=l),u.ul=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.top-s.y},i),0),u.ll=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.bottom-s.y},i),0),u.ur=t.fromLocal(t.fromLevel({x:r.right-s.x,y:r.top-s.y},i),0),u.lr=t.fromLocal(t.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,a.push(u),e.data(a),e._update(),t.draw()}},this._remove=function(n){if(void 0!==n.quadId&&e){for(var r=0;r<a.length;r+=1)if(a[r].id===n.quadId){a.splice(r,1);break}e.data(a),e._update(),t.draw()}},this._update=function(n){return i.call(t,n),t._addBaseQuadToTiles(e,a),t},this._exit=function(){t.deleteFeature(e),e=null,a=[],r.apply(t,arguments)},this._init=function(){n.apply(t,arguments),(e=t.createFeature("quad",{previewColor:t._options.previewColor,previewImage:t._options.previewImage})).geoTrigger=void 0,e.gcs(t._options.gcs||t.map().gcs()),e.data(a),e._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("canvas","tile",r),e.exports=r},1546:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(3160).call(this),this._init(t),this):new e(t)};r(a,o),i("canvas","track",a),e.exports=a},8719:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=n(4634).ensureFunction;delete t.layer,delete t.renderer;var a=n(2531).d3,s=this,l=this._init,u=r.extend({},{colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}],scale:a.scale.quantize(),geoId:function(e){return e.properties.GEO_ID},scalarId:function(e){return e.id},scalarValue:function(e){return e.value}},t);return this.featureType="choropleth",this.scalar=function(e,t){var n,r;return void 0===e?s.choropleth.get("scalar")()||[]:(n=s.choropleth.get("scalarId"),r=s.choropleth.get("scalarValue"),u.scalar=e,u.scalarAggregator=t||a.mean,u.scalar._dictionary=e.reduce((function(e,t){var i,o;return i=n(t),o=r(t),e[i]=e[i]?e[i].push(o):[o],e}),{}),s.dataTime().modified(),s)},this.choropleth=function(e,t){var n;return void 0===e?u:"string"==typeof e&&void 0===t?u[e]:(void 0===t?(n=r.extend({},u,e),u=n):u[e]=t,s.modified(),s)},this.choropleth.get=function(e){var t,n={};if(void 0===e){for(t in u)u.hasOwnProperty(t)&&(n[t]=s.choropleth.get(t));return n}return o(u[e])},this._featureToPolygons=function(e,t){var n=s.layer().createFeature("polygon",{});return"Polygon"===e.geometry.type?n.data([{type:"Polygon",coordinates:e.geometry.coordinates}]):"MultiPolygon"===e.geometry.type&&n.data(e.geometry.coordinates.map((function(e){return{type:"Polygon",coordinates:e}}))),n.polygon((function(e){return{outer:e.coordinates[0],inner:e.coordinates[1]}})).position((function(e){return{x:e[0],y:e[1]}})).style({fillColor:t}),n},this._generateScale=function(e){var t=a.extent(s.scalar(),e||void 0);return s.choropleth().scale.domain(t).range(s.choropleth().colorRange),s},this.createChoropleth=function(){var e=s.choropleth,t=s.data(),n=s.scalar(),r=e.get("scalarValue"),i=e.get("geoId");return s._generateScale(r),t.map((function(t){var r=i(t),o=n._dictionary[r],a=e().scalarAggregator(o),l=s.choropleth().scale(a);return s._featureToPolygons(t,l)}))},this._init=function(e){return l.call(s,e),u&&s.dataTime().modified(),s},this._init(t),this};r(o,i),e.exports=o},9005:function(e,t,n){var r=n(5699),i=n(9146),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),o=n(4634),a=n(9244);t=t||{},i.call(this,t);var s=this,l=this._init;return this._createContours=function(){return a.createColoredMesh(s,!1)},this.contour=s.mesh,this._init=function(e){l.call(s,e);var t=r.extend({},{opacity:1,value:function(e,t){return o.isNonNullFinite(e)?e:s.position()(e,t).z},position:function(e){return e||{x:0,y:0}},origin:function(e){return e.length>=3?[e[0],e[1],0]:[0,0,0]}},void 0===e.style?{}:e.style);s.style(t),s.contour(r.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},e.mesh||{},e.contour||{})),(e.mesh||e.contour)&&s.dataTime().modified()},this._init(t),this};r(o,i),e.exports=o},2805:function(e,t,n){var r=n(5699),i=n(3234),o=n(4647).registerRenderer,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t),t=t||{};var n=this;return this.api=function(){return"dom"},this._init=function(e){var t=n.layer().node();return!n.canvas()&&t&&t.length&&n.canvas(t[0]),n},this._init(t),this};r(a,i),o("dom",a),e.exports=a},5108:function(e){var t={layerAdd:"geo_layerAdd",layerRemove:"geo_layerRemove",layerMove:"geo_layerMove",zoom:"geo_zoom",rotate:"geo_rotate",pan:"geo_pan",resize:"geo_resize",draw:"geo_draw",drawEnd:"geo_drawEnd",unhidden:"geo_unhidden",hidden:"geo_hidden",mousemove:"geo_mousemove",mouseclick:"geo_mouseclick",brush:"geo_brush",brushend:"geo_brushend",brushstart:"geo_brushstart",select:"geo_select",zoomselect:"geo_zoomselect",unzoomselect:"geo_unzoomselect",actiondown:"geo_actiondown",actionmove:"geo_actionmove",actionup:"geo_actionup",actionselection:"geo_actionselection",actionwheel:"geo_actionwheel",keyaction:"geo_keyaction",transitionstart:"geo_transitionstart",transitionend:"geo_transitionend",transitioncancel:"geo_transitioncancel",parallelprojection:"geo_parallelprojection",feature:{mousemove:"geo_feature_mousemove",mouseover:"geo_feature_mouseover",mouseover_order:"geo_feature_mouseover_order",mouseout:"geo_feature_mouseout",mouseon:"geo_feature_mouseon",mouseoff:"geo_feature_mouseoff",mouseclick:"geo_feature_mouseclick",mouseclick_order:"geo_feature_mouseclick_order",brushend:"geo_feature_brushend",brush:"geo_feature_brush"},pixelmap:{prepared:"geo_pixelmap_prepared"},screenshot:{ready:"geo_screenshot_ready"},camera:{}};t.camera.view="geo_camera_view",t.camera.projection="geo_camera_projection",t.camera.viewport="geo_camera_viewport",t.annotation={},t.annotation.add="geo_annotation_add",t.annotation.add_before="geo_annotation_add_before",t.annotation.update="geo_annotation_update",t.annotation.coordinates="geo_annotation_coordinates",t.annotation.select_edit_handle="geo_annotation_select_edit_handle",t.annotation.edit_action="geo_annotation_edit_action",t.annotation.remove="geo_annotation_remove",t.annotation.state="geo_annotation_state",t.annotation.mode="geo_annotation_mode",e.exports=t},6837:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=n(5638),o=n(5699),a=n(5358),s=n(6618),l=n(6853),u=n(5108),c=function e(t){"use strict";if(!(this instanceof e))return new e(t);a.call(this);var r=n(4634);t=t||{};var o,c=this,d=this._exit,f=this.geoOn,p=this.geoOff,h=void 0===t.selectionAPI?"auto":t.selectionAPI,m={},g=void 0===t.layer?null:t.layer,v=t.gcs,y=void 0===t.visible||t.visible,b=void 0===t.bin?null:t.bin,x=void 0===t.renderer||g&&t.renderer===g.renderer()?null:t.renderer,w=s(),_=s(),S=s(),C=[],A=[];return this._subfeatureStyles={},Object.defineProperty(this,"ready",{get:function(){return o}}),this._bindMouseHandlers=function(){c.selectionAPI()&&(c._unbindMouseHandlers(),c.geoOn(u.mousemove,c._handleMousemove),c.geoOn(u.mouseclick,c._handleMouseclick),c.geoOn(u.brushend,c._handleBrushend),c.geoOn(u.brush,c._handleBrush))},this._unbindMouseHandlers=function(){c.geoOff(u.mousemove,c._handleMousemove),c.geoOff(u.mouseclick,c._handleMouseclick),c.geoOff(u.brushend,c._handleBrushend),c.geoOff(u.brush,c._handleBrush)},this.pointSearch=function(e,t){return{index:[],found:[]}},this.boxSearch=function(e,t,n,r){return c.polygonSearch([e,{x:e.x,y:t.y},t,{x:t.x,y:e.y}],n,r)},this.polygonSearch=function(e,t,n){return{index:[],found:[]}},this._handleMousemove=function(t){var n,r=c.layer().map().interactor().mouse(),i=c.data(),o=c.pointSearch(r.geo),a=[],s=[],l=-1,d=-1;(A.length||o.index.length)&&(n=o.extra||{},o.index.length>1&&c.geoTrigger(u.feature.mouseover_order,{feature:c,mouse:r,previous:A,over:o,sourceEvent:t}),A.length&&(l=A[A.length-1]),a=o.index.filter((function(e){return A.indexOf(e)<0})),s=A.filter((function(e){return o.index.indexOf(e)<0})),e.eventID+=1,a.forEach((function(o,s){c.geoTrigger(u.feature.mouseover,{data:i[o],index:o,extra:n[o],mouse:r,eventID:e.eventID,top:s===a.length-1,sourceEvent:t},!0)})),e.eventID+=1,s.forEach((function(n,o){c.geoTrigger(u.feature.mouseout,{data:i[n],index:n,mouse:r,eventID:e.eventID,top:o===s.length-1,sourceEvent:t},!0)})),e.eventID+=1,o.index.forEach((function(a,s){c.geoTrigger(u.feature.mousemove,{data:i[a],index:a,extra:n[a],mouse:r,eventID:e.eventID,top:s===o.index.length-1,sourceEvent:t},!0)})),(A=o.index).length&&(d=A[A.length-1]),l!==d&&(-1!==l&&c.geoTrigger(u.feature.mouseoff,{data:i[l],index:l,mouse:r,sourceEvent:t},!0),-1!==d&&c.geoTrigger(u.feature.mouseon,{data:i[d],index:d,extra:n[d],mouse:r,sourceEvent:t},!0)))},this._clearSelectedFeatures=function(){return A=[],c},this._handleMouseclick=function(t){var n=c.layer().map().interactor().mouse(),r=c.data(),i=c.pointSearch(n.geo),o=i.extra||{};i.index.length>1&&c.geoTrigger(u.feature.mouseclick_order,{feature:c,mouse:n,over:i,sourceEvent:t}),n.buttonsDown=t.buttonsDown,e.eventID+=1,i.index.forEach((function(a,s){c.geoTrigger(u.feature.mouseclick,{data:r[a],index:a,extra:o[a],mouse:n,eventID:e.eventID,top:s===i.index.length-1,sourceEvent:t},!0)}))},this._handleBrush=function(t){var n=[t.gcs.lowerLeft,t.gcs.lowerRight,t.gcs.upperRight,t.gcs.upperLeft];if(c.layer()){var r=c.layer().map();n=l.transformCoordinates(r.gcs(),r.ingcs(),n)}var i=c.polygonSearch(n);e.eventID+=1,i.index.forEach((function(n,r){c.geoTrigger(u.feature.brush,{data:i.found[r],index:n,mouse:t.mouse,brush:t,eventID:e.eventID,top:r===i.index.length-1},!0)}))},this._handleBrushend=function(t){var n=[t.gcs.lowerLeft,t.gcs.lowerRight,t.gcs.upperRight,t.gcs.upperLeft];if(c.layer()){var r=c.layer().map();n=l.transformCoordinates(r.gcs(),r.ingcs(),n)}var i=c.polygonSearch(n);e.eventID+=1,i.index.forEach((function(n,r){c.geoTrigger(u.feature.brushend,{data:i.found[r],index:n,mouse:t.mouse,brush:t,eventID:e.eventID,top:r===i.index.length-1},!0)}))},this.style=function(e,t){return void 0===e?m:"string"==typeof e&&void 0===t?m[e]:void 0===t?(m=i.extend({},m,e),c.modified(),c):(m[e]=t,c.modified(),c)},this.style.get=function(e){var t;if(void 0===e){var n,i={};for(n in m)m.hasOwnProperty(n)&&(i[n]=c.style.get(n));return i}return t=e.toLowerCase().match(/color$/)?r.isFunction(m[e])?function(){return r.convertColor(m[e].apply(c,arguments))}:r.ensureFunction(r.convertColor(m[e])):r.ensureFunction(m[e]),t},this.updateStyleFromArray=function(e,t,n){if("string"!=typeof e)i.each(e,(function(e,t){c.updateStyleFromArray(e,t)}));else{var r;if(e.toLowerCase().match(/color$/)&&(r={r:0,g:0,b:0}),!Array.isArray(t))return c;c._subfeatureStyles[e]?t.length&&Array.isArray(t[0])?c.style(e,(function(e,n,i,o){var a=(t[o]||[])[n];return void 0!==a?a:r})):c.style(e,(function(e,n,i,o){var a=t[o];return void 0!==a?a:r})):c.style(e,(function(e,n){var i=t[n];return void 0!==i?i:r}))}return n&&c.visible()&&c.draw(),c},this.layer=function(){return g},this.renderer=function(){return x||g&&g.renderer()},this.gcs=function(e){return void 0===e?null==v&&g?g.map().ingcs():v:(v=e,c.modified(),c)},this.featureGcsToDisplay=function(e){var t=g.map();return e=t.gcsToWorld(e,c.gcs()),e=t.worldToDisplay(e),c.renderer().baseToLocal&&(e=c.renderer().baseToLocal(e)),e},this.visible=function(e,t){if(void 0===e)return!(!t&&g&&g.visible&&!g.visible())&&y;if(y!==e||t){y=e,c.modified(),g&&g.visible&&!g.visible()&&(e=!1),e?c._bindMouseHandlers():c._unbindMouseHandlers();for(var n=0;n<C.length;n+=1)C[n].visible(y,t)}return c},this.dependentFeatures=function(e){return void 0===e?C.slice():(C=e.slice(),c)},this.bin=function(e,t){if(void 0===e){if(null===b&&!t){var n=c.parent(),i=n?n.children().indexOf(c):-1;return i>=0?i:0}return b}return b=r.isNonNullFinite(e)?parseInt(e,10):null,c.modified(),c},this.dataTime=function(e){return void 0===e?w:(w=e,c.modified(),c)},this.buildTime=function(e){return void 0===e?_:(_=e,c.modified(),c)},this.updateTime=function(e){return void 0===e?S:(S=e,c.modified(),c)},this.data=function(e){return void 0===e?c.style("data")||[]:(c.style("data",e),c.dataTime().modified(),c.modified(),c)},this.selectionAPI=function(e,t){return void 0===e?!(!t&&g&&g.selectionAPI&&!g.selectionAPI())&&(t||"auto"!==h?h:!!c.geoIsOn(Object.values(u.feature))):("auto"!==e&&(e=!!e),(e!==h||t)&&(h=e,c._unbindMouseHandlers(),c._bindMouseHandlers()),c)},this.mouseOverOrderHighestIndex=function(e){e.over.index.sort();var t=e.feature.data();e.over.index.forEach((function(n,r){e.over.found[r]=t[n]}))},this._init=function(e){if(!g)throw new Error("Feature requires a valid layer");m=i.extend({},{opacity:1},void 0===e.style?{}:e.style),c._bindMouseHandlers(),o=!0},this._build=function(){},this._update=function(){},this.geoOn=function(e,t){var n="auto"===c.selectionAPI(void 0,!0),r=n&&c.selectionAPI(),i=f.apply(c,arguments);return n&&!r&&c.selectionAPI()&&c._bindMouseHandlers(),i},this.geoOff=function(e,t){var n="auto"===c.selectionAPI(void 0,!0),r=n&&c.selectionAPI(),i=p.apply(c,arguments);return n&&r&&!c.selectionAPI()&&c._unbindMouseHandlers(),i},this._exit=function(){c._unbindMouseHandlers(),A=[],m={},d(),o=!1},this._init(t),this};c.eventID=0,c.create=function(e,t){"use strict";if(!(e instanceof n(9105)))return console.warn("Invalid layer"),null;if("object"!==r(t))return console.warn("Invalid spec"),null;var i=t.type,o=e.createFeature(i,t);return o?(t.data=t.data||[],o.style(t)):(console.warn('Could not create feature type "'+i+'"'),null)},o(c,a),e.exports=c},3715:function(e,t,n){var r=n(5699),i=n(9105),o=n(5108),a=n(4647),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var n=this,r=[],s=this._init,l=this._exit,u=this._update,c=this.visible,d=this.selectionAPI,f=this.draw;return this.createFeature=function(e,t){var r=a.createFeature(e,n,n.renderer(),t);return r?n.addFeature(r):console.warn("Layer renderer ("+n.rendererName()+') does not support feature type "'+e+'"'),r},this.addFeature=function(e){return n.removeFeature(e),n.addChild(e),r.push(e),n.dataTime().modified(),n.modified(),n},this.removeFeature=function(e){var t;return(t=r.indexOf(e))>=0&&(r.splice(t,1),n.removeChild(e),n.dataTime().modified(),n.modified()),n},this.deleteFeature=function(e){return e&&(r.indexOf(e)>=0&&e._exit(),n.removeFeature(e)),n},this.features=function(e){if(void 0===e)return r.slice();var t,i=r.slice();for(t=0;t<i.length;t+=1)e.indexOf(i[t])<0&&r.indexOf(i[t])>=0&&n.deleteFeature(i[t]);for(t=0;t<e.length;t+=1)n.addFeature(e[t]);return n},this.gcsFeatures=function(e){var t,r;return void 0===e?(this.features().forEach((function(e){void 0===t?t=e.gcs():e.gcs()!==t&&(r=!0)})),r?void 0:t):(n.features().forEach((function(t){t.gcs()!==e&&t.gcs(e)})),n)},this._init=function(){return n.initialized()||(s.call(n,!0),n.geoOn(o.resize,(function(e){n.renderer()?(n.renderer()._resize(e.x,e.y,e.width,e.height),n._update({event:e}),n.renderer()._render()):n._update({event:e})})),n.geoOn(o.pan,(function(e){n._update({event:e}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.rotate,(function(e){n._update({event:e}),n.renderer()&&n.renderer()._render()})),n.geoOn(o.zoom,(function(e){n._update({event:e}),n.renderer()&&n.renderer()._render()}))),n},this._update=function(e){var t;if(!r.length)return n;if(u.call(n,e),n.dataTime().timestamp()>n.updateTime().timestamp())for(t=0;t<r.length;t+=1)r[t].renderer(n.renderer());for(t=0;t<r.length;t+=1)r[t]._update();return n.updateTime().modified(),n},this._exit=function(){n.clear(),l()},this.draw=function(){return n.visible()&&(f(),n.renderer()&&n.renderer()._render()),n},this.visible=function(e){if(void 0===e)return c();if(n.visible()!==e){c(e);var t,i=r.slice();for(t=0;t<i.length;t+=1)i[t].visible(i[t].visible(void 0,!0),!0);e&&n.draw()}return n},this.selectionAPI=function(e){if(void 0===e)return d();if(n.selectionAPI()!==e){d(e);var t,i=r.slice();for(t=0;t<i.length;t+=1)i[t].selectionAPI(i[t].selectionAPI(void 0,!0),!0)}return n},this.clear=function(){for(;r.length;)n.deleteFeature(r[0]);return n},n};r(s,i),a.registerLayer("feature",s),e.exports=s},3705:function(e,t,n){var r=n(5638);e.exports=function e(t){if(!(this instanceof e))return new e(t);t=t||{},this._size=t.size||6,this._initialSize=t.initialSize||0,this._track=t.track||600,this._needed=t.needed||null,this._batch=!1;var n=this,i=1;return Object.defineProperty(this,"size",{get:function(){return n._size},set:function(e){n._size=e,n._initialSize>1&&e<n._initialSize&&(n._initialSize=e),n.next_item()}}),Object.defineProperty(this,"initialSize",{get:function(){return n._initialSize},set:function(e){n._initialSize=e,n.next_item()}}),Object.defineProperty(this,"length",{get:function(){return n._queue.length}}),Object.defineProperty(this,"processing",{get:function(){return n._processing}}),this.clear=function(){return n._queue=[],n._processing=0,n},this.add=function(e,t,i){if(e.__fetchQueue){var o=r.inArray(e,n._queue);if(o>=0)return n._queue.splice(o,1),n._addToQueue(e,i),e}var a=r.Deferred(),s=r.Deferred();return a.done((function(){r.when(t.call(e)).always(s.resolve)})).fail(s.resolve),e.__fetchQueue=a,n._addToQueue(e,i),r.when(a,s).always((function(){n._processing>0&&(n._processing-=1),n._initialSize=0,n.next_item()})).promise(e),n.next_item(),e},this._addToQueue=function(e,t){if(e.__fetchQueue._batch=n._batch,t)n._queue.push(e);else if(this._batch){for(var r=0;r<n._queue.length&&n._queue[r].__fetchQueue._batch===n._batch;r+=1);n._queue.splice(r,0,e)}else n._queue.unshift(e)},this.get=function(e){return r.inArray(e,n._queue)},this.remove=function(e){var t=r.inArray(e,n._queue);return t>=0&&(n._queue.splice(t,1),!0)},this.batch=function(e){return void 0===e?n._batch:(e?(n._batch=i,i+=1):n._batch=!1,n)},this.next_item=function(){if(!n._innextitem){if(n._innextitem=!0,n._queue.length>n._track&&n._needed)for(var e=n._queue.length-1;e>=0;e-=1)if(!n._needed(n._queue[e])){var t=n._queue.splice(e,1)[0];n._processing+=1,t.__fetchQueue.reject(),delete t.__fetchQueue}for(;n._processing<(n._initialSize||n._size)&&n._queue.length;){var r=n._queue.shift();if(r.__fetchQueue)n._processing+=1,!n._needed||n._needed(r)?r.__fetchQueue.resolve():r.__fetchQueue.reject(),delete r.__fetchQueue}n._innextitem=!1}},this.clear(),this}},407:function(e,t,n){var r=n(5699),i=n(3715),o=n(3737),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);if(o.call(this),!((t=t||{}).layer instanceof i))throw new Error("fileReader must be given a feature layer");var n=t.layer;return this.layer=function(){return n},this.canRead=function(e){return!1},this.read=function(e,t,n){var r=new Promise((function(e,n){throw t&&t(!1),new Error("The default file reader always fails")}));return this.addPromise(r),r},this._getString=function(e,t,n){var r=function(e,t){var n=new FileReader;return t&&(n.onprogress=t),n.onloadend=function(){e(n.error||n.result)},n}(t,n);r.readAsText(e)},this};r(a,o),e.exports=a},3088:function(e,t,n){function r(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function i(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?r(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):r(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}var a=n(5699),s=n(4647).registerFileReader,l=n(407),u=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),a=n(4634).convertColor,s=this,u=i(i({},t),{},{pointStyle:i({fill:!0,fillColor:"#ff7800",fillOpacity:.8,stroke:!0,strokeColor:"#000",strokeWidth:1,strokeOpacity:1,radius:8},t.pointStyle),lineStyle:i({strokeColor:"#ff7800",strokeWidth:4,strokeOpacity:.5,strokeOffset:0,lineCap:"butt",lineJoin:"miter",closed:!1},t.lineStyle),polygonStyle:i({fill:!0,fillColor:"#b0de5c",fillOpacity:.8,stroke:!0,strokeColor:"#999999",strokeWidth:2,strokeOpacity:1},t.polygonStyle)});l.call(this,u),this.canRead=function(e){if(e instanceof File||e instanceof Blob)return!!("application/json"===e.type||e.name&&e.name.match(/\.json$/));if("string"==typeof e){try{JSON.parse(e)}catch(e){return!1}return!0}try{if(Array.isArray(s._featureArray(e)))return!0}catch(e){}return!1},this._readObject=function(e,t,n){var i;function o(e){try{i=JSON.parse(e),t(i)}catch(n){i||r.ajax({type:"GET",url:e,dataType:"text"}).done((function(e){try{i=JSON.parse(e),t(i)}catch(e){i||t(!1)}})).fail((function(){t(!1)}))}}e instanceof File||e instanceof Blob?s._getString(e,o,n):"string"==typeof e?o(e):t(e)},this._featureArray=function(e){var t,n=[];switch(e.type){case"FeatureCollection":t=e.features;break;case"Feature":t=[e];break;case"GeometryCollection":t=e.geometries.map((function(e){return{type:"Feature",geometry:e,properties:{}}}));break;case"Point":case"LineString":case"Polygon":case"MultiPoint":case"MultiLineString":case"MultiPolygon":t=[{type:"Feature",geometry:e,properties:{}}];break;default:throw new Error("Invalid json type")}return t.forEach((function(e){Array.prototype.push.apply(n,s._feature(e))})),n=n.filter((function(e){return e.geometry&&e.geometry.coordinates&&e.geometry.coordinates.length}))},this._feature=function(e){if("Feature"!==e.type)throw new Error("Invalid feature object");switch(e.geometry.type){case"Point":case"LineString":case"Polygon":return[e];case"MultiPoint":case"MultiLineString":case"MultiPolygon":return e.geometry.coordinates.map((function(t){return{type:"Feature",geometry:{type:e.geometry.type.replace("Multi",""),coordinates:t},properties:e.properties}}));default:throw new Error("Invalid geometry type")}},this._position=function(e){return{x:e[0],y:e[1],z:e[2]||0}},this._style=function(e,t){var n=e.toLowerCase().match(/color$/);return n&&(t=a(t)),function(r,i,o,s){var l;return void 0!==(l=void 0!==o&&o.properties?o.properties:r.properties)&&l.hasOwnProperty(e)?n?a(l[e]):l[e]:t}},this.read=function(e,t,n){var r=new Promise((function(r,a){s._readObject(e,(function(e){if(!1===e)return t&&t(e),void a(new Error("Failed to parse GeoJSON"));var n,l,c=[];try{n=s._featureArray(e)}catch(e){return void a(e)}var d=n.filter((function(e){return"Point"===e.geometry.type}));d.length&&(l=s.layer().createFeature("point"))&&(l.data(d).position((function(e){return s._position(e.geometry.coordinates)})).style([{}].concat(Object.keys(u.pointStyle)).reduce((function(e,t){return i(o({},t,d.some((function(e){return e.properties&&void 0!==e.properties[t]}))?s._style(t,u.pointStyle[t]):u.pointStyle[t]),e)}))),c.push(l));var f=n.filter((function(e){return"LineString"===e.geometry.type}));f.length&&(l=s.layer().createFeature("line"))&&(l.data(f).line((function(e){return e.geometry.coordinates})).position(s._position).style([{}].concat(Object.keys(u.lineStyle)).reduce((function(e,t){return i(o({},t,f.some((function(e){return e.properties&&void 0!==e.properties[t]}))?s._style(t,u.lineStyle[t]):u.lineStyle[t]),e)}))),c.push(l));var p=n.filter((function(e){return"Polygon"===e.geometry.type}));p.length&&(l=s.layer().createFeature("polygon"))&&(l.data(p).polygon((function(e,t){return{outer:e.geometry.coordinates[0],inner:e.geometry.coordinates.slice(1)}})).position(s._position).style([{}].concat(Object.keys(u.polygonStyle)).reduce((function(e,t){return i(o({},t,p.some((function(e){return e.properties&&void 0!==e.properties[t]}))?s._style(t,u.polygonStyle[t]):u.polygonStyle[t]),e)}))),c.push(l)),t&&t(c),r(c)}),n)}));return s.addPromise(r),r}};a(u,l),s("geojsonReader",u),s("jsonReader",u),e.exports=u},4745:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=n(4634),a=n(4647),s=this,l=this.draw,u=this.style,c=null,d=null,f=function(e){return e.children},p=[],h=this._init,m=this._exit;return this.featureType="graph",this._init=function(e){h.call(s,e);var t=r.extend(!0,{},{nodes:{radius:5,fill:!0,fillColor:{r:1,g:0,b:0},strokeColor:{r:0,g:0,b:0}},links:{strokeColor:{r:0,g:0,b:0}},linkType:"path"},void 0===e.style?{}:e.style);return s.style(t),s.nodes((function(e){return e})),s},this._build=function(){s.children().forEach((function(e){e._build()}))},this._update=function(){s.children().forEach((function(e){e._update()}))},this._exit=function(){return s.data([]),p.forEach((function(e){e._exit(),s.removeChild(e)})),p=[],d._exit(),s.removeChild(d),m(),s},this.style=function(e,t){var n=u.call(s,e,t);return n!==s?n:(d.style(e.nodes),p.forEach((function(t){t.style(e.links)})),s)},this.style.get=u.get,this.links=function(e){return void 0===e?f:(f=o.ensureFunction(e),s)},this.nodes=function(e){return void 0===e?c:(c=e,s.modified(),s)},this.nodeFeature=function(){return d},this.linkFeatures=function(){return p},this.draw=function(){var e,t=s.layer(),n=s.data(),r=0;return e=s.style(),d.data(n),d.style(e.nodes),n.forEach((function(n){(n.children||[]).forEach((function(i){var o;r+=1,p.length<r&&(o=a.createFeature(e.linkType,t,t.renderer()).style(e.links),s.addChild(o),p.push(o)),p[r-1].data([n,i])}))})),p.splice(r,p.length-r).forEach((function(e){e._exit(),s.removeChild(e)})),l(),s},d=a.createFeature("point",this.layer(),this.layer().renderer()),s.addChild(d),t.nodes&&this.nodes(t.nodes),this._init(t),this};r(o,i),e.exports=o},1109:function(e,t,n){var r=n(5699),i=n(9146),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),o=n(4634),a=n(9244);t=t||{},i.call(this,t);var s=this,l=this._init;return this._createGrids=function(){return a.createColoredMesh(s,!0)},this.grid=s.mesh,this._init=function(e){l.call(s,e);var t=r.extend({},{opacity:1,value:function(e,t){return o.isNonNullFinite(e)?e:s.position()(e,t).z},position:function(e){return e||{x:0,y:0}},origin:function(e){return e.length>=3?[e[0],e[1],0]:[0,0,0]}},void 0===e.style?{}:e.style);s.style(t),s.grid(r.extend({},{minColor:"black",minOpacity:0,maxColor:"black",maxOpacity:0,colorRange:[{r:.07514311,g:.468049805,b:1},{r:.468487184,g:.588057293,b:1},{r:.656658579,g:.707001303,b:1},{r:.821573924,g:.837809045,b:1},{r:.943467973,g:.943498599,b:.943398095},{r:1,g:.788626485,b:.750707739},{r:1,g:.6289553,b:.568237474},{r:1,g:.472800903,b:.404551679},{r:.916482116,g:.236630659,b:.209939162}]},e.mesh||{},e.grid||{})),(e.mesh||e.grid)&&s.dataTime().modified()},this._init(t),this};r(o,i),e.exports=o},1111:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=n(6853),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n,i,s,l,u,c,d,f=this,p=this._init;return this.featureType="heatmap",n=t.position||function(e){return e},i=t.intensity||function(e){return 1},s=void 0!==t.maxIntensity?t.maxIntensity:null,l=void 0!==t.minIntensity?t.minIntensity:null,c=void 0!==t.binned?t.binned:"auto",u=t.updateDelay||0===t.updateDelay?parseInt(t.updateDelay,10):-1,this.maxIntensity=function(e){return void 0===e?s:(s=e,f.dataTime().modified(),f.modified(),f)},this.minIntensity=function(e){return void 0===e?l:(l=e,f.dataTime().modified(),f.modified(),f)},this.updateDelay=function(e){return void 0===e?u:(u=parseInt(e,10),f)},this.binned=function(e){return void 0===e?c:("true"===e?e=!0:("false"===e||"auto"!==e&&!0!==e&&!1!==e&&((e=parseInt(e,10))<=0||isNaN(e)))&&(e=!1),c=e,f.dataTime().modified(),f.modified(),f)},this.position=function(e){return void 0===e?n:(n=e,f.dataTime().modified(),f.modified(),f)},this.gcsPosition=function(){return f._update(),d},this.intensity=function(e){return void 0===e?i:(i=e,f.dataTime().modified(),f.modified(),f)},this._init=function(e){p.call(f,e);var t=r.extend({},{radius:10,blurRadius:10,gaussian:!0,color:{0:{r:0,g:0,b:0,a:0},.25:{r:0,g:0,b:1,a:.5},.5:{r:0,g:1,b:1,a:.6},.75:{r:1,g:1,b:0,a:.7},1:{r:1,g:0,b:0,a:.8}},scaleWithZoom:!1},void 0===e.style?{}:e.style);f.style(t),n&&f.dataTime().modified()},this._build=function(){var e=f.data(),t=null,n=[],r=null==s,i=null==l;return e.forEach((function(e,o){n.push(f.position()(e,o)),(r||i)&&(t=f.intensity()(e,o),null==s&&(s=t),null==l&&(l=t),r&&t>s&&(s=t),i&&t<l&&(l=t))})),i&&r&&l===s&&(l-=1),d=a.transformCoordinates(f.gcs(),f.layer().map().gcs(),n),f.buildTime().modified(),f},this._init(t),this};i(s,o),e.exports=s},4665:function(e,t,n){var r=n(5699),i=n(8418),o=function e(t){if(!(this instanceof e))return new e(t);var r=n(5638);return t.size=t.size||{x:256,y:256},this._image=null,this._cors=t.crossDomain||null===t.crossDomain?t.crossDomain:"anonymous",i.call(this,t),Object.defineProperty(this,"image",{get:function(){return this._image}}),this.fetch=function(){var e;return this._image||(this._image=new Image(this.right-this.left,this.bottom-this.top),this._cors&&this._url.indexOf(":")>=0&&this._url.indexOf("/")===this._url.indexOf(":")+1&&(this._image.crossOrigin=this._cors),e=r.Deferred(),this._image.onload=e.resolve,this._image.onerror=e.reject,this._image.src=this._url,e.done(function(){this._fetched=!0}.bind(this)).promise(this)),this},this.fadeIn=function(e){var t=this.fetch(),n=r.Deferred();return r(this._image).css("display","none"),t.done(function(){r(this._image).fadeIn(e,(function(){n.resolve()}))}.bind(this)),n.promise(this)},this};r(o,i),e.exports=o},6062:function(e,t,n){
2
2
  /**
3
3
  * GeoJS
4
4
  * @copyright 2013-2022, Kitware, Inc.
@@ -32,7 +32,7 @@
32
32
  * @copyright 2017, Vladimir Agafonkin
33
33
  * @license ISC
34
34
  */
35
- 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(e){return e.replace(i,"<$1></$2>")},n(8701),e.exports=r.extend({annotation:n(7800),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),util:n(4634),jQuery:r,canvas:n(7562),svg:n(2878),vtkjs:n(6653),webgl:n(9205),gui:n(253)},n(4647)),window&&!window.$&&(window.$=r),window&&!window.jQuery&&(window.jQuery=r)},5699:function(e){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},2367:function(e,t,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}]},l=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),l=n(6853),u=n(5108),c=n(9757);t=t||{},i.call(this,t);var d,f,p,h,m,g=this,v=this.draw,y=this._exit,b=this._init,x=this.modified,w=this._update;return this.featureType="isoline",this.contour=g.mesh,this.isoline=g.mesh,this._createIsolines=function(){var e,t=g.style.get("value"),n=void 0!==g.style("used")?g.style.get("used"):function(e,n){return a.isNonNullFinite(t(e,n))},r=!1,i=[],o=g._createMesh({used:n,value:t});return(e=g._getValueList(o)).length?(e.forEach((function(e){var t=g._isolinesForValue(o,e);t.length&&(i=i.concat(t),r=r||!!e.label)})),{lines:i,mesh:o,values:e,hasLabels:r}):{}},this._getValueList=function(e){var t,n,r,i,o,s,l,u=g.isoline,c=u.get("values")(e),d=u.get("spacing")(e),f=u.get("count")(e),p=u.get("autofit")(e),h=u.get("levels")(e);if(!e.numVertices||!e.numElements)return[];if(t=a.getMinMaxValues(e.value,u.get("min")(e),u.get("max")(e),!0),e.minValue=t.min,e.maxValue=t.max,(n=e.maxValue-e.minValue)<=0)return[];if(Array.isArray(c))c=(c=c.map((function(e,t){return{value:void 0!==e.value?e.value:e,position:t,level:e.level}}))).filter((function(t){return t.value>=e.minValue&&t.value<=e.maxValue}));else if(d||p)for(d||(r=n/(2*f/3),o=Math.floor(Math.log10(r)),s=Math.max(0,-o),d=(r=(r/=i=Math.pow(10,o))>=5?5:r>=2?2:1)*i),c=[],l=Math.ceil(e.minValue/d);l<=Math.floor(e.maxValue/d);l+=1)c.push({value:l*d,position:l,fixedDigits:s});else for(c=Array(f),l=0;l<f;l+=1)c[l]={value:e.minValue+n*(l+1)/(f+1),position:l+1};return h.length&&c.forEach((function(e,t){if(void 0===e.level){e.level=0;for(var n=0,r=h[0];n<h.length&&!(e.position%r);r*=h[n+=1])e.level=n+1}if(u.get("label")(e,e.position)){var i=u.get("labelText")(e,e.position);void 0===i&&(i=void 0!==e.fixedDigits?""+parseFloat(e.value.toFixed(e.fixedDigits)):""+e.value),i&&(e.label=i)}})),c},this._addSegment=function(e,t,n){var r,i,o,a,s,l,u=[t,n],c=e.length;for(e.push(u),i=0;i<2;i+=1){for(r=c-1;r>=0;r-=1){if(a=(o=e[r])[0],s=o[o.length-1],n[0]===a[0]&&n[1]===a[1])l=u.concat(o.slice(1));else{if(t[0]!==s[0]||t[1]!==s[1])continue;l=o.concat(u.slice(1))}e.splice(c,1),e[r]=u=l,c=r,t=u[0],n=u[u.length-1];break}if(r<0)break}return e},this._chainVertex=function(e,t,n){var r=n[0],i=n[1],o=3*r,a=3*i,s=(t.value-e.value[r])/(e.value[i]-e.value[r]),l=1-s;return{x:e.pos[o]*l+e.pos[a]*s,y:e.pos[o+1]*l+e.pos[a+1]*s,z:e.pos[o+2]*l+e.pos[a+2]*s}},this._isolinesForValue=function(e,t){var n,r,i,o,a=t.value,l=Array(e.value.length),u=[];for(n=l.length-1;n>=0;n-=1)l[n]=e.value[n]<=a?0:1;var c=e.verticesPerElement,d="square"===e.shape,f=e.elements,p=f.length;for(r=0;r<p;r+=c){if(d){if(0===(i=8*l[f[r]]+4*l[f[r+1]]+2*l[f[r+2]]+l[f[r+3]])||15===i)continue}else if(16===(i=16+4*l[f[r]]+2*l[f[r+1]]+l[f[r+2]])||23===i)continue;s[i].forEach((function(e){u=g._addSegment(u,[f[r+e.l0],f[r+e.h0]],[f[r+e.l1],f[r+e.h1]])}))}return o=u.map((function(n){var r=[];return n.forEach((function(n){var i=g._chainVertex(e,t,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=t.value,r.level=t.level,r.position=t.position,r.label=t.label,r})).filter((function(e){return e.length>1})),o},this.modified=function(){var e=x();return p&&p.modified(),m&&m.modified(),e},this.labelPositions=function(){if(g.dataTime().timestamp()>=g.buildTime().timestamp()&&g._build(),f=null,!m)return g;if(!(d&&d.hasLabels&&d.lines&&d.lines.length))return m.data([]),g;var e=g.isoline,t=e.get("labelSpacing"),n=e.get("labelOffset"),r=e.get("labelViewport")(d.mesh),i=g.gcs(),o=g.layer().map(),s=o.gcs(),u=o.rotation(),c=o.size(),p=[],h=0;return d.lines.forEach((function(e,d){if(e.label){var f,m,g,v,y,b,x,w,_,S,C,A=t(e.value,e.value.position),T=n(e.value,e.value.position)||0,P=o.gcsToDisplay(e,i),E=0;if(!(A<=0||isNaN(A))&&(h=Math.max(A,h),T=T+.5-Math.floor(T+.5),f=P.map((function(t,n){if(!e.closed&&n+1===P.length)return 0;var r=Math.sqrt(a.distance2dSquared(t,P[n+1<P.length?n+1:0]));return E+=r,r})),m=Math.floor(E/A)))for(C=l.transformCoordinates(i,s,e),v=(g=E/m)*T,y=0,b=0;b<P.length;b+=1){for(;y+f[b]>=v;)x=b+1===P.length?0:b+1,_=1-(w=(v-y)/f[b]),v+=g,r>0&&((S={x:P[b].x*_+P[x].x*w,y:P[b].y*_+P[x].y*w}).x<-r||S.x>c.width+r||S.y<-r||S.y>c.height+r)||p.push({x:C[b].x*_+C[x].x*w,y:C[b].y*_+C[x].y*w,z:C[b].z*_+C[x].z*w,line:e,rotation:Math.atan2(P[b].y-P[x].y,P[b].x-P[x].x)-u});y+=f[b]}}})),m.gcs(s),m.data(p),m.style("renderThreshold",2*h),f={zoom:o.zoom(),center:o.center(),rotation:u,size:c,labelViewport:r,maxSpacing:h,labelAutoUpdate:e.get("labelAutoUpdate")(d.mesh)},g},this.lastLabelPositions=function(){return r.extend({},f)},this._updateLabelPositions=function(){var e=f;if(!e||!e.labelAutoUpdate)return g;var t=g.layer().map(),n=t.zoom(),r=t.size(),i=!!(Math.abs(n-e.zoom)>=2);if(!i&&e.labelViewport>0){var o=Math.sqrt(a.distance2dSquared(t.gcsToDisplay(t.center()),t.gcsToDisplay(e.center)))*Math.pow(2,e.zoom-n),s=e.labelViewport/2-2*e.maxSpacing-Math.max(r.width-e.size.width,r.height-e.size.height,0);i=i||o>=s}return i&&g.labelPositions().draw(),g},this._build=function(){if((d=g._createIsolines())&&d.lines&&d.lines.length){p||(p=g.layer().createFeature("line",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{closed:function(e){return e.closed}}}),g.dependentFeatures([p]));var e=g.style();if(p.data(d.lines).style({antialiasing:e.antialiasing,lineCap:e.lineCap,lineJoin:e.lineJoin,miterLimit:e.miterLimit,strokeWidth:e.strokeWidth,strokeStyle:e.strokeStyle,strokeColor:e.strokeColor,strokeOffset:e.strokeOffset,strokeOpacity:e.strokeOpacity}),d.hasLabels){if(!m){if(!(o.registries.features[g.layer().rendererName()]||{}).text){var t=o.rendererForFeatures(["text"]);h=o.createLayer("feature",g.layer().map(),{renderer:t}),g.layer().addChild(h),g.layer().node().append(h.node())}m=(h||g.layer()).createFeature("text",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{text:function(e){return e.line.label}}}).geoOn(u.pan,g._updateLabelPositions)}c.usedStyles.forEach((function(t){"visible"!==t&&m.style(t,e[t])})),g.dependentFeatures([p,m])}}else p&&p.data([]);return g.buildTime().modified(),g.labelPositions(),g},this._update=function(){return w.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),g.updateTime().modified(),g},this.draw=function(){var e=v();return p&&p.draw(),m&&m.draw(),e},this._exit=function(){m&&((h||g.layer())&&(h||g.layer()).deleteFeature(m),h&&g.layer()&&g.layer().removeChild(h)),p&&g.layer()&&g.layer().deleteFeature(p),m=null,h=null,p=null,g.dependentFeatures([]),y()},this._init=function(t){t=t||{},b.call(g,t);var n=r.extend({},{opacity:1,value:function(e,t){return g.position()(e,t).z},rotateWithMap:!0,rotation:e.rotationFunction(),strokeWidth:function(e,t,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===t.style?{}:t.style);g.style(n),g.isoline(r.extend({},{count:15,autofit:!0,levels:[5,5],label:function(e){return e.level>=1},labelSpacing:200,labelViewport:1e4,labelAutoUpdate:!0},t.mesh||{},t.contour||{},t.isoline||{})),(t.mesh||t.contour||t.isoline)&&g.dataTime().modified()},this};l.rotationFunction=function(e,t){var n={higher:function(e){return e.rotation},lower:function(e){return e.rotation+Math.PI},map:function(e){var t=e.rotation,n=a.wrapAngle(t,!0);return(n>Math.PI/2||n<-Math.PI/2)&&(t+=Math.PI),t},screen:function(e){var n=e.rotation,r=a.wrapAngle(n+t.rotation(),!0);return(r>Math.PI/2||r<-Math.PI/2)&&(n+=Math.PI),n}};return n[e]||n.higher},r(l,i),e.exports=l},9105:function(e,t,n){var r=n(5699),i=n(5358),o=n(6837),a=n(4647).checkRenderer,s=n(4647).rendererForFeatures,l=n(4647).rendererForAnnotations,u=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r,o=n(5638),u=n(6618),c=n(3234),d=n(4647).createRenderer,f=n(4647).adjustLayerForRenderer,p=n(5108),h=this,m=this._exit,g=void 0===t.id?e.newLayerId():t.id,v=void 0===t.name?"":t.name,y=void 0===t.map?null:t.map,b=null,x=void 0===t.canvas?null:t.canvas,w=t.renderer instanceof c?t.renderer:null,_=!1,S=void 0!==t.renderer?t.renderer instanceof c?t.renderer.api():t.renderer:t.annotations?l(t.annotations):s(t.features),C=void 0===t.autoshareRenderer||t.autoshareRenderer,A=u(),T=u(),P=void 0===t.sticky||t.sticky,E=void 0===t.active||t.active,O=void 0===t.opacity?1:t.opacity,M=t.attribution||null,D=void 0===t.visible||t.visible,k=void 0===t.selectionAPI||t.selectionAPI;if(S=a(S),!y)throw new Error("Layers must be initialized on a map.");function I(){return(h.parent()||h.map()).children().filter((function(t){return t instanceof e}))}if(this.rendererName=function(){return S},this.autoshareRenderer=function(){return C},this.zIndex=function(e,t){return void 0===e?r:(t||I().reverse().forEach((function(t){t!==h&&t.zIndex()===e&&t.zIndex(e+1)})),e!==r&&(r=e,b.css("z-index",r),h.geoTrigger(p.layerRemove,{layer:h})),h)},this.moveUp=function(e){var t,n,r,i,o=null;for(void 0===e&&(e=1),i=1,e<0&&(i=-1,e=-e),t=I().sort((function(e,t){return i*(e.zIndex()-t.zIndex())})),n=0;n<t.length;n+=1)if(null===o)t[n]===h&&(o=n);else{if(!(n-o<=e))break;r=h.zIndex(),h.zIndex(t[n].zIndex(),!0),t[n].zIndex(r,!0)}return h},this.moveDown=function(e){return void 0===e&&(e=1),h.moveUp(-e)},this.moveToTop=function(){return h.moveUp(I().length-1)},this.moveToBottom=function(){return h.moveDown(I().length-1)},this.sticky=function(){return P},this.active=function(e){return void 0===e?E:(E!==e&&(E=e,b.toggleClass("active",E)),h)},this.node=function(){return b},this.id=function(t){return void 0===t?g:(g=null===t?e.newLayerId():t,h.modified(),h)},this.name=function(e){return void 0===e?v:(v=e,b.attr("id",v),h.modified(),h)},this.map=function(){return y},this.renderer=function(){return w},this._renderer=function(e){return void 0===e?w:(w=e,h)},this.canvas=function(){return x},this._canvas=function(e){return void 0===e?x:(x=e,h)},this.dataTime=function(){return A},this.updateTime=function(){return T},this.initialized=function(e){return void 0!==e?(_=e,h):_},this.toLocal=function(e){return e},this.fromLocal=function(e){return e},this.attribution=function(e){return void 0!==e?(M=e,h.map().updateAttribution(),h):M},this.visible=function(e){return void 0===e?D:(D!==e&&(D=e,b.toggleClass("hidden",!D),h.modified()),h)},this.selectionAPI=function(e){return void 0===e?k:(k!==e&&(k=e),h)},this._init=function(e){if(_)return h;y.node().append(b);var n=o.extend({},t);return delete n.map,w?h._canvas(w.canvas()):null===S?(h._renderer(null),h._canvas(b)):x?h._renderer(d(S,h,x,n)):(h._renderer(d(S,h,void 0,n)),h._canvas(w.canvas())),b.toggleClass("active",h.active()),_=!0,e||(h.geoOn(p.resize,(function(e){h._update({event:e})})),h.geoOn(p.pan,(function(e){h._update({event:e})})),h.geoOn(p.rotate,(function(e){h._update({event:e})})),h.geoOn(p.zoom,(function(e){h._update({event:e})}))),h},this._exit=function(){h.geoOff(),w&&w._exit(),b.off(),b.remove(),t={},h._canvas(null),h._renderer(null),m()},this._update=function(e){return h},this.width=function(){return h.map().size().width},this.height=function(){return h.map().size().height},this.opacity=function(e){return void 0!==e?(O=e,b.css("opacity",O),h):O},(b=o(document.createElement("div"))).addClass("geojs-layer"),b.attr("renderer",S),v&&b.attr("id",v),h.opacity(O),h.visible(D),void 0===t.zIndex){var R=-1;I().forEach((function(e){void 0!==e.zIndex()&&(R=Math.max(R,e.zIndex()))})),t.zIndex=R+1}return h.zIndex(t.zIndex),f("all",h),h};u.newLayerId=function(){"use strict";var e=1;return function(){var t=e;return e+=1,t}}(),u.create=function(e,t){"use strict";if((t=t||{}).type=t.type||"feature",t.renderer=void 0===t.renderer?"webgl":t.renderer,t.renderer=a(t.renderer),!t.renderer)return console.warn("Invalid renderer"),null;var n=e.createLayer(t.type,t);return n?(t.features&&t.features.forEach((function(e){e.data=e.data||t.data,e.feature=o.create(n,e)})),n):(console.warn("Unable to create a layer"),null)},r(u,i),e.exports=u},4708:function(e,t,n){var r=n(5699),i=n(6837),o=n(6618),a=n(6853),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638);t=t||{},i.call(this,t);var l,u=this,c=this._init,d=o();return this.featureType="line",this._subfeatureStyles={lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.line=function(e){return void 0===e?u.style("line"):(u.style("line",e),u.dataTime().modified(),u.modified(),u)},this.position=function(e){return void 0===e?u.style("position"):(u.style("position",e),u.dataTime().modified(),u.modified(),u)},this._updatePointSearchInfo=function(){if(d.timestamp()>=u.dataTime().timestamp()&&d.timestamp()>=u.timestamp())return l;d.modified(),l=[];var e=u.data(),t=u.line(),n=u.style.get("strokeWidth"),r=u.position(),i=u.style.get("closed"),o=u.gcs(),s=u.layer().map().gcs();return e.forEach((function(e,u){var c,d,f,p,h,m,g,v=i(e,u),y=[];t(e,u).forEach((function(t,i){var l=r(t,i,e,u);o!==s&&(l=a.transformCoordinates(o,s,l)),void 0===m&&(m={x:l.x,y:l.y}),void 0===g&&(g={x:l.x,y:l.y}),l.x<m.x&&(m.x=l.x),l.x>g.x&&(g.x=l.x),l.y<m.y&&(m.y=l.y),l.y>g.y&&(g.y=l.y);var b=Math.ceil(n(t,i,e,u)/2)+2;(void 0===g.r||b>g.r)&&(g.r=b);var x=b*b;c&&y.push({u:l,v:c,r:f>b?f:b,r2:p>x?p:x,i:i,j:d}),c=l,d=i,f=b,p=x,!h&&v&&(h={p:l,r:b,r2:x,i:i})})),v&&h&&(c.x!==h.p.x||c.y!==h.p.y)&&y.push({u:c,v:h.p,r:f>h.r?f:h.r,r2:p>h.r2?p:h.r2,i:d,j:h.i}),y.min=m,y.max=g,l.push(y)})),l},this.pointSearch=function(e,t){var n=u.data(),r=[],i=[],o={};if(!n||!n.length||!u.layer())return{found:i,index:r,extra:o};u._updatePointSearchInfo();var c=u.layer().map();t=null===t?c.gcs():void 0===t?c.ingcs():t;var d,f,p,h,m=c.unitsPerPixel(c.zoom()),g=m*m,v=a.transformCoordinates(t,c.gcs(),e),y=u.style.get("strokeWidth"),b=u.style.get("strokeOpacity"),x=u.line();for(f=0;f<l.length;f+=1)for(h=l[f],d=null,p=0;p<h.length;p+=1)if(s.distance2dToLineSquared(v,h[p].u,h[p].v)<=h[p].r2*g&&(d||(d=x(n[f],f)),(b(d[h[p].i],h[p].i,n[f],f)>0||b(d[h[p].j],h[p].j,n[f],f)>0)&&(y(d[h[p].i],h[p].i,n[f],f)>0||y(d[h[p].j],h[p].j,n[f],f)>0))){i.push(n[f]),r.push(f),o[f]=p;break}return{found:i,index:r,extra:o}},this.polygonSearch=function(e,t,n){var r,i,o=u.data(),c=[],d=[],f={},p=u.layer().map(),h=u.style.get("strokeWidth"),m=u.style.get("strokeOpacity"),g=u.line();if(n=null===n?p.gcs():void 0===n?p.ingcs():n,e.outer||(e={outer:e,inner:[]}),!o||!o.length||e.outer.length<3)return{found:d,index:c,extra:f};(t=t||{}).partial=t.partial||!1,(e={outer:a.transformCoordinates(n,p.gcs(),e.outer),inner:(e.inner||[]).map((function(e){return a.transformCoordinates(n,p.gcs(),e)}))}).outer.forEach((function(e){r||(r={x:e.x,y:e.y},i={x:e.x,y:e.y}),e.x<r.x&&(r.x=e.x),e.x>i.x&&(i.x=e.x),e.y<r.y&&(r.y=e.y),e.y>i.y&&(i.y=e.y)})),u._updatePointSearchInfo();var v,y,b,x,w,_,S=p.unitsPerPixel(p.zoom());for(v=0;v<l.length;v+=1)if(!(!(b=l[v]).max||b.max.x<r.x-b.max.r*S||b.min.x>i.x+b.max.r*S||b.max.y<r.y-b.max.r*S||b.min.y>i.y+b.max.r*S)){var C=void 0,A=void 0,T=void 0;for(y=0;y<b.length;y+=1)if(x=b[y].u,w=b[y].v,_=b[y].r,!(x.x<r.x-_*S&&w.x<r.x-_*S||x.x>i.x+_*S&&w.x>i.x+_*S||x.y<r.y-_*S&&w.y<r.y-_*S||x.y>i.y+_*S&&w.y>i.y+_*S||(T||(T=g(o[v],v)),m(T[b[y].i],b[y].i,o[v],v)<=0&&m(T[b[y].j],b[y].j,o[v],v)<=0||h(T[b[y].i],b[y].i,o[v],v)<=0&&h(T[b[y].j],b[y].j,o[v],v)<=0))){var P=s.distanceToPolygon2d(x,e),E=s.distanceToPolygon2d(w,e);if(P>-_*S&&P<_*S||E>-_*S&&E<_&S||P*E<0){A=!0;break}if(s.crossedLineSegmentPolygon2d(x,w,e)){A=!0;break}for(var O=_*_*S*S,M=0;M<e.outer.length&&!A;M+=1)A=s.distance2dToLineSquared(e.outer[M],x,w)<O;for(var D=0;D<e.inner.length&&!A;D+=1)for(var k=0;k<e.inner[D].length&&!A;k+=1)A=s.distance2dToLineSquared(e.inner[D][k],x,w)<O;if(A)break;P>0&&(C=!0)}(!t.partial&&C&&!A||t.partial&&(C||A))&&(c.push(v),d.push(o[v]),f[v]={partial:A,segment:y<l[v].length?y:0})}return{found:d,index:c,extra:f}},this.rdpSimplifyData=function(e,t,n,r){e=e||u.data(),n=n||u.style.get("position"),r=r||u.style.get("line");var i=u.layer().map(),o=i.gcs(),l=u.gcs(),c=u.style.get("closed");return void 0===t&&(t=.5*i.unitsPerPixel(i.zoom())),e=e.map((function(e,i){var u=r(e,i),d=a.transformCoordinates(l,o,u.map((function(t,r){return n(t,r,e,i)}))),f=s.rdpLineSimplify(d,t,c(e,i),[]);for(var p in(f.length<2||2===f.length&&s.distance2dSquared(f[0],f[1])<t*t)&&(f=[]),f=a.transformCoordinates(o,l,f),e)!e.hasOwnProperty(p)||Array.isArray(e)&&p>=0&&p<e.length||(f[p]=e[p]);return f})),u.style("position",(function(e){return e})),u.style("line",(function(e){return e})),u.data(e),u},this._init=function(e){e=e||{},c.call(u,e);var t=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:.8431372549,b:0},strokeStyle:"solid",strokeOpacity:1,antialiasing:2,closed:!1,line:function(e){return e},position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},origin:function(e){return e.length>=3?e.slice(0,3):[0,0,0]}},void 0===e.style?{}:e.style);return void 0!==e.line&&(t.line=e.line),void 0!==e.position&&(t.position=e.position),u.style(t),u.dataTime().modified(),u},this._init(t),this};l.create=function(e,t){"use strict";return(t=t||{}).type="line",i.create(e,t)},l.capabilities={feature:"line",basic:"line.basic",multicolor:"line.multicolor"},r(l,i),e.exports=l},2804:function(e,t,n){var r=n(5638),i=n(5699),o=n(5358),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);if(void 0===(t=t||{}).node||null===t.node)return console.warn("map creation requires a node"),this;o.call(this,t);var i,a,s,l,u,c=n(9986),d=n(6853),f=n(4634),p=n(4647),h=n(5108),m=n(3870),g=n(6408),v=this,y=this._exit,b=r(t.node),x=t.width||b.width()||512,w=t.height||b.height()||512,_=void 0===t.gcs?"EPSG:3857":t.gcs,S=void 0===t.ingcs?"EPSG:4326":t.ingcs,C={x:0,y:0},A=void 0===t.zoom?4:t.zoom,T=t.rotation?t.rotation:0,P=null,E=null,O={min:0,max:16,origMin:0},M=null,D=null,k=!!t.discreteZoom,I="function"==typeof t.allowRotation?t.allowRotation:void 0===t.allowRotation||!!t.allowRotation,R=t.maxBounds||{},N=t.camera||c(),F=t.animationQueue||[],L=void 0===t.autoResize||t.autoResize,B=t.autoshareRenderer,V=((R.left||0)+(R.right||0))/2,j=((R.bottom||0)+(R.top||0))/2;function z(){var e;void 0!==document.hidden?e="hidden":void 0!==document.msHidden?e="msHidden":void 0!==document.webkitHidden&&(e="webkitHidden"),v.geoTrigger(document[e]?h.hidden:h.unhidden)}function G(e){var t;void 0!==document.hidden?t="visibilitychange":void 0!==document.msHidden?t="msvisibilitychange":void 0!==document.webkitHidden&&(t="webkitvisibilitychange"),document.removeEventListener(t,z),!1!==e&&document.addEventListener(t,z)}function U(e,t){var n=e.zIndex(),r=t.zIndex();if(n!==r)return n-r;var i=e.node()[0],o=t.node()[0],a=i&&i.parentNode,s=o&&o.parentNode;if(a&&s&&a===s){var l=Array.from(a.children),u=l.indexOf(i),c=l.indexOf(o);if(u>=0&&c>=0)return u-c}return a?-1:s?1:0}function W(e,t,n,r,i){e.globalAlpha=t,i&&(e.globalCompositeOperation=i);var o=n.css("transform");o&&"matrix("===o.substr(0,7)?e.setTransform.apply(e,o.substr(7,o.length-8).split(",").map(parseFloat)):e.setTransform(1,0,0,1,0,0),e.drawImage(r,0,0),e.globalCompositeOperation="source-over"}function H(){for(var e=F.splice(0,F.length),t=1;t<e.length;t+=1)try{e[t].apply(v,arguments)}catch(e){console.error(e)}}function q(e,t,n){var r=t.width/2,i=t.height/2,o=Math.sin(n),a=Math.cos(n),s={},l={},u={},c={};return s.x=e.x+-r*a- -i*o,s.y=e.y+-r*o+-i*a,l.x=e.x+r*a- -i*o,l.y=e.y+r*o+-i*a,u.x=e.x+-r*a-i*o,u.y=e.y+-r*o+i*a,c.x=e.x+r*a-i*o,c.y=e.y+r*o+i*a,{left:Math.min(s.x,l.x,u.x,c.x),right:Math.max(s.x,l.x,u.x,c.x),bottom:Math.min(s.y,l.y,u.y,c.y),top:Math.max(s.y,l.y,u.y,c.y)}}function X(e,t){void 0===t&&(t=T),e=function(e,t){return t&&(e=q({x:(e.left+e.right)/2,y:(e.top+e.bottom)/2},{width:Math.abs(e.left-e.right),height:Math.abs(e.top-e.bottom)},t)),e}(e,t);var n=function(e){var t,n,r=e.right-e.left,i=e.top-e.bottom,o=Math.abs(r/i),a=x/w;return o>a?(t=1,n=o/a):(n=1,t=a/o),{x:t,y:n}}(e);return n.y>n.x?-Math.log2(Math.abs(e.right-e.left)*n.x/(x*i)):-Math.log2(Math.abs(e.top-e.bottom)*n.y/(w*i))}function K(){O.min=l?Math.max(O.origMin,X(R)):O.origMin}function Z(e,t,n){if(!I)return 0;if(t||"function"!=typeof I||(e=I(e)),!n){var r=2*Math.PI;e=e%r+(e>=0?0:r),Math.min(Math.abs(e),Math.abs(e-r))<1e-5&&(e=0)}return e}function Y(e,t,n,i){if(!a&&!s)return e;var o,l,u=R;if(t){u=r.extend({},R);var c,d,f=Math.abs(e.right-e.left),p=Math.abs(e.top-e.bottom),h=Math.abs(Math.sin(t)),m=Math.abs(Math.cos(t));if(e.width&&e.height)c=e.width,d=e.height;else if(Math.abs(h-m)<5e-4)if(x&&w){var g=Math.abs(x/w),v=Math.pow(1+Math.pow(g,2),.5);d=(c=Math.max(f,p)/v)*g}else c=f*m,d=p*h;else c=(m*f-h*p)/(m*m-h*h),d=(m*p-h*f)/(m*m-h*h);var y=f-Math.max(m*c,h*d),b=p-Math.max(m*d,h*c);u.left-=y,u.right+=y,u.top+=b,u.bottom-=b}return i&&(u={left:u.left-(e.right-e.left)/2,right:u.right+(e.right-e.left)/2,top:u.top-(e.bottom-e.top)/2,bottom:u.bottom+(e.bottom-e.top)/2}),a&&(e.right-e.left>u.right-u.left?o=u.left-(e.right-e.left-(u.right-u.left))/2-e.left:e.left<u.left?o=u.left-e.left:e.right>u.right&&(o=u.right-e.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)),e={left:e.left+=o,right:e.right+=o,top:e.top,bottom:e.bottom})),s&&(e.top-e.bottom>u.top-u.bottom?l=u.bottom-(e.top-e.bottom-(u.top-u.bottom))/2-e.bottom:e.top>u.top?l=u.top-e.top:e.bottom<u.bottom&&(l=u.bottom-e.bottom),l&&(!n||-n.y*l>0)&&(n&&Math.abs(l)>Math.abs(n.y*n.unit)&&(l=Math.abs(n.y*n.unit)*l/Math.abs(l)),e={top:e.top+=l,bottom:e.bottom+=l,left:e.left,right:e.right})),e}function J(e,t){if(N.rotation=t||0,e.width&&e.height&&t){var n=(e.left+e.right)/2,r=(e.top+e.bottom)/2;N.viewFromCenterSizeRotation({x:n,y:r},e,t)}else N.bounds=e;C={x:(N.bounds.left+N.bounds.right)/2,y:(N.bounds.top+N.bounds.bottom)/2}}function Q(){v.size({width:b.width(),height:b.height()})}return R.left=d.transformCoordinates(R.gcs||S,_,{x:void 0!==R.left?R.left:-180,y:j}).x,R.right=d.transformCoordinates(R.gcs||S,_,{x:void 0!==R.right?R.right:180,y:j}).x,R.top=void 0!==R.top?d.transformCoordinates(R.gcs||S,_,{x:V,y:R.top}).y:R.right,R.bottom=void 0!==R.bottom?d.transformCoordinates(R.gcs||S,_,{x:V,y:R.bottom}).y:R.left,i=t.unitsPerPixel||(R.right-R.left)/256,N.viewport={width:x,height:w,left:b.offset().left,top:b.offset().top},t.center=f.normalizeCoordinates(t.center),a=void 0!==t.clampBoundsX&&t.clampBoundsX,s=void 0===t.clampBoundsY||t.clampBoundsY,l=void 0===t.clampZoom||t.clampZoom,this.unitsPerPixel=function(e,t){return e=e||0,t?(i=Math.pow(2,e)*t,v.draw(),v):Math.pow(2,-e)*i},this.animationQueue=function(e){if(void 0===e)return F;if(e!==F){if(F.length){e.length&&e[0]!==F[0]&&window.cancelAnimationFrame(F[0]);for(var t=e.length?1:0;t<F.length;t+=1)e.push(F[t])}F=e}return v},this.autoResize=function(e){return void 0===e?L:(e!==L&&(r(window).off("resize",Q),(L=e)&&r(window).on("resize",Q)),v)},this.clampBoundsX=function(e){return void 0===e?a:(e!==a&&(a=!!e,v.pan({x:0,y:0})),v)},this.clampBoundsY=function(e){return void 0===e?s:(e!==s&&(s=!!e,v.pan({x:0,y:0})),v)},this.clampZoom=function(e){return void 0===e?l:(e!==l&&(l=!!e,K(),v.zoom(A)),v)},this.allowRotation=function(e){return void 0===e?I:("function"!=typeof e&&(e=!!e),e!==I&&(I=e,v.rotation(T)),v)},this.origin=function(){return r.extend({},u)},this.camera=function(){return N},this.gcs=function(e){if(void 0===e)return _;if(e!==_){var t=v.center(void 0,void 0);_=e,K();var n=v._fix_zoom(A);n!==A&&v.zoom(n),v.center(t,void 0)}return v},this.ingcs=function(e){return void 0===e?S:(S=e,v)},this.node=function(){return b},this.zoom=function(e,t,n){if(void 0===e)return A;var r,i,o=t&&(t.mapgcs||t.geo)&&t.map,a=o;if((e=v._fix_zoom(e,n))===A)return v;if(A=e,i=v.boundsFromZoomAndCenter(e,C,T,null,n,a),v.modified(),J(i,T),r={zoomLevel:A,screenPosition:t?t.map:void 0},v.geoTrigger(h.zoom,r),o){var s=v.gcsToDisplay(t.mapgcs||t.geo,t.mapgcs?null:void 0);v.pan({x:t.map.x-s.x,y:t.map.y-s.y},n,!0)}else v.pan({x:0,y:0},n);return v},this.pan=function(e,t,n){var r={screenDelta:e};if(e.x||e.y){var i=v.unitsPerPixel(A),o=Math.sin(T),a=Math.cos(T);N.pan({x:(e.x*a- -e.y*o)*i,y:(e.x*o+-e.y*a)*i})}var s=N.bounds;if((s=Y(s,T,"limited"===n?{x:e.x,y:e.y,unit:i}:void 0,!0===n))!==N.bounds){var l=v.gcsToDisplay({x:N.bounds.left,y:N.bounds.top},null);J(s=v.boundsFromZoomAndCenter(A,{x:(s.left+s.right)/2,y:(s.top+s.bottom)/2},T,null,t,!0),T);var u=v.gcsToDisplay({x:N.bounds.left,y:N.bounds.top},null);r.screenDelta.x+=u.x-l.x,r.screenDelta.y+=u.y-l.y}return C=N.displayToWorld({x:x/2,y:w/2}),v.geoTrigger(h.pan,r),v.modified(),v},this.rotation=function(e,t,n){if(void 0===e)return T;var r=t&&t.geo&&t.map;if((e=Z(e,n))===T)return v;T=e;var i=v.boundsFromZoomAndCenter(A,C,T,null,n,!0);v.modified(),J(i,T);var o={rotation:T,screenPosition:t?t.map:void 0};if(v.geoTrigger(h.rotate,o),r){var a=v.gcsToDisplay(t.geo);v.pan({x:t.map.x-a.x,y:t.map.y-a.y},void 0,!0)}else v.pan({x:0,y:0},void 0,!0);return K(),v.zoom(A,void 0,n),v},this.center=function(e,t,n,i){var o;return void 0===e?o=r.extend({},v.worldToGcs(C,t)):(o=v.gcsToWorld(e,t),J(v.boundsFromZoomAndCenter(A,o,T,null,n,i),T),v.modified(),v.geoTrigger(h.pan,{screenDelta:{x:0,y:0}}),v)},this.createLayer=function(e,t){t=t||{},void 0!==v.autoshareRenderer()&&(t=Object.assign({autoshareRenderer:v.autoshareRenderer()},t));var n=p.createLayer(e,v,t);return n&&(v.addChild(n),v.children().forEach((function(e){e instanceof g&&e.moveToTop()})),n._update(),v.modified(),v.geoTrigger(h.layerAdd,{target:v,layer:n})),n},this.deleteLayer=function(e){return null!=e&&(e._exit(),v.removeChild(e),v.modified(),v.geoTrigger(h.layerRemove,{target:v,layer:e})),e},this.size=function(e){if(void 0===e)return{width:x,height:w};var t=v.center();x=e.width||x,w=e.height||w,K();var n=v._fix_zoom(A);return n!==A&&v.zoom(n),v.camera().viewport={width:x,height:w,left:b.offset().left,top:b.offset().top},v.center(t),v.geoTrigger(h.resize,{target:v,width:x,height:w}),v.modified(),v},this.rotatedSize=function(){if(!this.rotation())return{width:x,height:w};var e=q({x:0,y:0},{width:x,height:w},v.rotation());return{width:Math.abs(e.right-e.left),height:Math.abs(e.top-e.bottom)}},this.gcsToWorld=function(e,t){return Array.isArray(e)?e.map((function(e){return v.gcsToWorld(e,t)})):((t=null===t?_:void 0===t?S:t)!==_&&(e=d.transformCoordinates(t,_,e)),u.x||u.y||u.z?e=d.affineForward({origin:u},[e])[0]:"z"in e||(e={x:e.x,y:e.y,z:0}),e)},this.worldToGcs=function(e,t){return Array.isArray(e)?e.map((function(e){return v.worldToGcs(e,t)})):(u.x||u.y||u.z?e=d.affineInverse({origin:u},[e])[0]:"z"in e||(e={x:e.x,y:e.y,z:0}),(t=null===t?_:void 0===t?S:t)!==_&&(e=d.transformCoordinates(_,t,e)),e)},this.gcsToDisplay=function(e,t){return e=v.gcsToWorld(e,t),v.worldToDisplay(e)},this.worldToDisplay=function(e){return Array.isArray(e)?e.map((function(e){return N.worldToDisplay(e)})):N.worldToDisplay(e)},this.displayToGcs=function(e,t){return e=v.displayToWorld(e),v.worldToGcs(e,t)},this.displayToWorld=function(e){return Array.isArray(e)?e.map((function(e){return N.displayToWorld(e)})):N.displayToWorld(e)},this.draw=function(){var e,t=v.children();for(v.geoTrigger(h.draw,{target:v}),v._update(),e=0;e<t.length;e+=1)t[e].draw();return v.geoTrigger(h.drawEnd,{target:v}),v},this.fileReader=function(e,t){return void 0===e?P:("string"==typeof e?((t=t||{}).layer||(t.layer=v.createLayer("feature",r.extend({},t))),t.renderer=t.layer.renderer().api(),P=p.createFileReader(e,t)):P=e,v)},this._init=function(e){if(null==b)throw new Error("Map require DIV node");return b.data("data-geojs-map")&&r.isFunction(b.data("data-geojs-map").exit)&&b.data("data-geojs-map").exit(),b.addClass("geojs-map"),b.data("data-geojs-map",v),G(),v},this._update=function(e){var t,n=v.children();for(t=0;t<n.length;t+=1)n[t]._update(e);return v},this.exit=function(){G(!1);var e,t=v.children();for(e=t.length-1;e>=0;e-=1)t[e]._exit(),v.removeChild(t[e]);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",Q),y()},this.interactor=function(e){return void 0===e?E:(E&&E!==e&&E.destroy(),(E=e)&&(b.attr("tabindex")||b.attr("tabindex",0),E.map(v)),v)},this.zoomRange=function(e,t){return void 0===e?r.extend({},O):(void 0!==e.max&&(O.max=e.max),void 0!==e.min&&(O.min=O.origMin=e.min),K(),t||v.zoom(A),v)},this.transition=function(e,t,n){if(void 0===e)return M;if(M){var i=r.extend(!0,{},M.end);return i.center&&_!==S&&(i.center=d.transformCoordinates(_,S,i.center)),D=r.extend({},i||{},D||{},e),v}var o=v.unitsPerPixel(0);function a(e){return Math.pow(2,-(e+1))*o*w}var s={center:void 0,zoom:v.zoom(),rotation:v.rotation(),duration:1e3,ease:function(e){return e},interp:function(e,t){return function(n){var i=[];return r.each(e,(function(r){i.push(function(e,t,n){return e+(t-e)*n}(e[r],t[r],n))})),i}},done:null,zCoord:!0};function l(t){var n=M.done,r=D;if(!0===M.cancel)return v.geoTrigger(h.transitioncancel,e),n&&n({cancel:!0,source:M.cancelSource,transition:M}),M=null,void(D&&(r=D,D=null,v.transition(r,void 0,t)));if(M.start.time||(M.start.time=t,M.end.time=t+e.duration),M.time=t-M.start.time,t>=M.end.time||r){if(!r){if(M.end.center){var i=A!==v._fix_zoom(M.end.zoom);v.center(M.end.center,null,i,i)}v.zoom(M.end.zoom,M.zoomOrigin),v.rotation(Z(M.end.rotation))}return v.geoTrigger(h.transitionend,e),n&&n({next:!!r}),M=null,void(D&&(r=D,D=null,v.transition(r,void 0,t)))}var a=M.ease((t-M.start.time)/e.duration),s=M.interp(a);M.zCoord&&(s[2]=function(e){return-Math.log2(e/o/w)-1}(s[2])),v._fix_zoom(s[2],!0)===A?v.center({x:s[0],y:s[1]},null,!0,!0):(C=v.gcsToWorld({x:s[0],y:s[1]},null),v.zoom(s[2],M.zoomOrigin,!0)),v.rotation(s[3],void 0,!0),v.scheduleAnimationFrame(l)}return e.center&&(t=null===t?_:void 0===t?S:t,(e=r.extend(!0,{},e)).center=f.normalizeCoordinates(e.center),t!==_&&(e.center=d.transformCoordinates(t,_,e.center))),e=r.extend(!0,{},s,e),(M={start:{center:v.center(void 0,null),zoom:v.zoom(),rotation:v.rotation()},end:{center:e.center,zoom:v._fix_zoom(e.zoom),rotation:Z(e.rotation,void 0,!0)},ease:e.ease,zCoord:e.zCoord,done:e.done,duration:e.duration,zoomOrigin:e.zoomOrigin}).interp=e.interp([M.start.center.x,M.start.center.y,e.zCoord?a(M.start.zoom):M.start.zoom,M.start.rotation],[M.end.center?M.end.center.x:M.start.center.x,M.end.center?M.end.center.y:M.start.center.y,e.zCoord?a(M.end.zoom):M.end.zoom,M.end.rotation]),v.geoTrigger(h.transitionstart,e),h.cancelNavigation?(M=null,v.geoTrigger(h.transitionend,e),v):(h.cancelAnimation?(e.duration=0,l(0)):n?l(n):v.scheduleAnimationFrame(l),v)},this.transitionCancel=function(e){return!(!M||!0===M.cancel&&!D)&&(M.cancel=!0,M.cancelSource=e||M.cancelSource||"",D=null,!0)},this.bounds=function(e,t){var n;if(t=null===t?_:void 0===t?S:t,void 0!==e){if(t!==_){var r=d.transformCoordinates(t,_,[{x:e.left,y:e.top},{x:e.right,y:e.bottom}]);e={left:r[0].x,top:r[0].y,right:r[1].x,bottom:r[1].y}}e=Y(e,T),n=v.zoomAndCenterFromBounds(e,T,null),v.zoom(n.zoom),v.center(n.center,null)}return v.boundsFromZoomAndCenter(A,C,T,t,!0)},this.maxBounds=function(e,t){if(t=null===t?_:void 0===t?S:t,void 0===e)return{left:d.transformCoordinates(_,t,{x:R.left,y:0}).x,right:d.transformCoordinates(_,t,{x:R.right,y:0}).x,bottom:d.transformCoordinates(_,t,{x:0,y:R.bottom}).y,top:d.transformCoordinates(_,t,{x:0,y:R.top}).y};var n=((e.left||0)+(e.right||0))/2,r=((e.bottom||0)+(e.top||0))/2;return void 0!==e.left&&(R.left=d.transformCoordinates(t,_,{x:e.left,y:r}).x),void 0!==e.right&&(R.right=d.transformCoordinates(t,_,{x:e.right,y:r}).x),void 0!==e.bottom&&(R.bottom=d.transformCoordinates(t,_,{x:n,y:e.bottom}).y),void 0!==e.top&&(R.top=d.transformCoordinates(t,_,{x:n,y:e.top}).y),K(),v.zoom(A),v.pan({x:0,y:0}),v},this.zoomAndCenterFromBounds=function(e,t,n){var r,i;if((n=null===n?_:void 0===n?S:n)!==_){var o=d.transformCoordinates(n,_,[{x:e.left,y:e.top},{x:e.right,y:e.bottom}]);e={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y}}if(e.left>=e.right||e.bottom>=e.top)throw new Error("Invalid bounds provided");return i=v._fix_zoom(X(e,t)),r={x:((e=Y(e,t)).left+e.right)/2-u.x,y:(e.top+e.bottom)/2-u.y},n!==_&&(r=d.transformCoordinates(_,n,r)),{zoom:i,center:r}},this.boundsFromZoomAndCenter=function(e,t,n,r,i,o){var a,s,l,c,f,p;if(r=null===r?_:void 0===r?S:r,e=v._fix_zoom(e,i),p=v.unitsPerPixel(e),t=v.gcsToWorld(t,null),l=(a=x*p)/2,c=(s=w*p)/2,n?(t.x+=u.x,t.y+=u.y,(f=q(t,{width:a,height:s},n)).width=a,f.height=s,f=Y(f,n,void 0,o)):f=Y(f={left:t.x-l+u.x,right:t.x+l+u.x,bottom:t.y-c+u.y,top:t.y+c+u.y},0,void 0,o),r!==_){var h=d.transformCoordinates(_,r,[[f.left,f.top],[f.right,f.bottom]]);f={left:h[0][0],top:h[0][1],right:h[1][0],bottom:h[1][1]}}return f.width=a,f.height=s,f},this.discreteZoom=function(e){return void 0===e?k:(k!==(e=!!e)&&((k=e)&&v.zoom(Math.round(v.zoom())),v.interactor()&&v.interactor().options({discreteZoom:k})),v)},this.layers=this.children,this.sortedLayers=function(){return v.children().sort(U)},this.listSceneObjects=function(e){var t=[];return(e=e||v.sortedLayers()).forEach((function(e){if(t.indexOf(e)<0&&(t.push(e),e.children)){var n=e.children();n.length&&(t=t.concat(v.listSceneObjects(n)))}})),t},this.updateAttribution=function(){v.node().find(".geo-attribution").remove();var e=r("<div/>").addClass("geo-attribution").on("mousedown",(function(e){e.stopPropagation()}));return v.children().forEach((function(t){var n=t.attribution();n&&r("<span/>").addClass("geo-attribution-layer").html(n).appendTo(e)})),r("span",e).length&&e.appendTo(v.node()),v},this.screenshot=function(e,t,n,i){var o;if(!e||Array.isArray(e)||e.renderer||(t=t||e.type,n=n||e.encoderOptions,i=i||e,e=e.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(e,t,n,a)}))}o=r.when(),e?Array.isArray(e)||(e=[e]):(e=v.layers(),null!==i.attribution&&void 0!==i.attribution||(i.attribution=!0)),e=(e=e.filter((function(e){return v.layers().indexOf(e)>=0&&e.opacity()>0&&(!e.visible||e.visible())}))).sort(U);var l=document.createElement("canvas");l.width=x,l.height=w;var u=l.getContext("2d");if(!1!==i.background&&null!==i.background){var c=i.background;void 0===i.background&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height),v.node().parents().get().reverse().forEach((function(e){(c=window.getComputedStyle(e).backgroundColor)&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))})),c=window.getComputedStyle(v.node()[0]).backgroundColor),c&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))}return e.forEach((function(e){var t=e.opacity();e.node().children("canvas").each((function(){var n=r(this);o=o.then((function(){e.renderer()&&"webgl"===e.renderer().api()&&e.renderer()._renderFrame(),W(u,t,n,n[0],e.node().css("mix-blend-mode"))}))})),!e.node().children().not("canvas").length&&e.node().children().length||e.renderer()&&"webgl"===e.renderer().api()||(o=o.then((function(){return f.htmlToImage(e.node(),1).done((function(t){W(u,1,r([]),t,e.node().css("mix-blend-mode"))}))})))})),i.attribution&&v.node().find(".geo-attribution").each((function(){var e=r(this);o=o.then((function(){return f.htmlToImage(e,1).done((function(e){W(u,1,r([]),e)}))}))})),i.html&&r(i.html).each((function(){var e=r(this);o=o.then((function(){return f.htmlToImage(e,1).done((function(t){W(u,1,r([]),t,e.css("mix-blend-mode"))}))}))})),o=o.then((function(){var e=l;if("canvas"!==t)try{l=l.toDataURL(t,n)}catch(e){console.warn("Failed to convert screenshot to output",e);var i=r.Deferred();return i.reject(),i}return v.geoTrigger(h.screenshot.ready,{canvas:e,screenshot:l}),l}))},this.scheduleAnimationFrame=function(e,t){F.length||F.push(window.requestAnimationFrame(H));var n=F.indexOf(e,1);if(n>=0){if(!t)return;if(F.splice(n,1),"remove"===t)return}return F.push(e),F[0]},this._fix_zoom=function(e,t){return e=Math.round(1e6*e)/1e6,e=Math.max(Math.min(O.max,e),O.min),k&&!t&&(e=Math.round(e))<O.min&&(e=Math.ceil(O.min)),e},this.autoshareRenderer=function(e){return void 0===e?B:(B=null===e?void 0:e,v)},this._init(t),this.node().on("dragover.geo",(function(e){var t=e.originalEvent;v.fileReader()&&(t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy")})).on("drop.geo",(function(e){var t,n,r=e.originalEvent,i=v.fileReader();function o(){v.draw()}if(i)for(r.stopPropagation(),r.preventDefault(),t=0;t<r.dataTransfer.files.length;t+=1)n=r.dataTransfer.files[t],i.canRead(n)&&i.read(n,o)})),u={x:0,y:0},this.zoomRange(t,!0),A=this._fix_zoom(A),T=Z(T),this.center(r.extend({},t.center||C),void 0),null!==t.interactor&&this.interactor(t.interactor||m({discreteZoom:k})),L&&r(window).on("resize",Q),v.geoOn([h.layerAdd,h.layerRemove],v.updateAttribution),this};a.create=function(e){"use strict";var t=a(e),r=n(9105);return t&&t.zoom?(e.data=e.data||[],e.layers=e.layers||[],e.layers.forEach((function(n){n.data=n.data||e.data,n.layer=r.create(t,n)})),t):(console.warn("Could not create map."),null)},i(a,o),e.exports=a},3870:function(e,t,n){var r=n(5699),i=n(3737),o=n(4634),a=n(3345),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this);var r,s,l,u,c,d,f,p,h,m,g=n(5638),v=n(5108),y=n(7839),b=n(4634).throttle,x=n(4634).debounce,w=n(4634).actionMatch,_=n(5017),S=this,C=null,A=!1,T=!1,P=function(){};function E(e){var t=e.x,n=e.y;return Math.sqrt(t*t+n*n)}function O(){d={boundDocumentHandlers:d.boundDocumentHandlers}}function M(e,t){t=t<=0?30:t;var n=function(){var e,t,n,i;if(!r.spring.enabled)return{x:0,y:0};var o=S.map().maxBounds(void 0,null),a=S.map().gcsToDisplay({x:o.left,y:o.top},null),s=S.map().gcsToDisplay({x:o.right,y:o.bottom},null),l=r.spring.springConstant,u=S.map().node().width(),c=S.map().node().height();return e=l*Math.max(0,a.x),t=l*Math.max(0,u-s.x),n=l*Math.max(0,a.y)/2,i=l*Math.max(0,c-s.y)/2,{x:e-t,y:n-i}}(),i=E(e),o=e.x/i,a=e.y/i;return i*=Math.exp(-r.momentum.drag*t),E(n)*t+i<r.momentum.minSpeed?null:(i>0?(o*=i,a*=i):(o=0,a=0),{x:o-n.x*t,y:a-n.y*t})}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"}],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}},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(e){return(2-e)*e}}},t||{}),t&&t.actions&&(r.actions=g.extend(!0,[],t.actions)),t&&t.momentum&&t.momentum.actions&&(r.momentum.actions=g.extend(!0,[],t.momentum.actions)),t&&t.keyboard&&void 0!==t.keyboard.actions&&(r.keyboard.actions=g.extend(!0,{},t.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}},d={},f={},this._handleKeys=function(e,t,n){n&&!0===n.simulated&&(t=n);var i,o,a=r.keyboard.meta||{0:{}},s=S.map(),l=s.size(),u=e,c="",d={};for(i in a)a.hasOwnProperty(i)&&(void 0!==a[i].shift&&t.shiftKey!==!!a[i].shift||void 0!==a[i].ctrl&&t.ctrlKey!==!!a[i].ctrl||void 0!==a[i].alt&&t.altKey!==!!a[i].alt||void 0!==a[i].meta&&t.metaKey!==!!a[i].meta||(o=i));if(void 0!==o){switch(t.stopPropagation(),t.preventDefault(),e.indexOf(".")>=0&&(u=e.substr(0,e.indexOf(".")),c=e.substr(e.indexOf(".")+1)),u){case"zoom":switch(c){case"in":d.zoomDelta=[.05,.25,1][o];break;case"out":d.zoomDelta=-[.05,.25,1][o];break;default:isNaN(parseFloat(c))||(d.zoom=parseFloat(c))}break;case"pan":switch(c){case"down":d.panY=-Math.max(1,[0,.05,.5][o]*l.height);break;case"left":d.panX=Math.max(1,[0,.05,.5][o]*l.width);break;case"right":d.panX=-Math.max(1,[0,.05,.5][o]*l.width);break;case"up":d.panY=Math.max(1,[0,.05,.5][o]*l.height)}break;case"rotate":switch(c){case"ccw":d.rotationDelta=[1,5,90][o]*Math.PI/180;break;case"cw":d.rotationDelta=-[1,5,90][o]*Math.PI/180;break;default:isNaN(parseFloat(c))||(d.rotation=parseFloat(c))}}s.geoTrigger(v.keyaction,{move:d,action:e,factor:o,event:t}),d.cancel||(void 0!==d.zoom?s.zoom(d.zoom):d.zoomDelta&&s.zoom(s.zoom()+d.zoomDelta),void 0!==d.rotation?s.rotation(d.rotation):d.rotationDelta&&s.rotation(s.rotation()+d.rotationDelta),(d.panX||d.panY)&&s.pan({x:d.panX||0,y:d.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(e){var t=!1;if("mouse"===e.pointerType&&c.touchSupport&&(t=!0),"hammer.input"===e.type){if("pan"!==c.lastEventType||1===e.pointers.length)return;t=!0,c.lastEventType=null}var n=/^(.*)(start|end|move|tap)$/.exec(e.type);if(n&&3===n.length||(t=!0),t)d.boundDocumentHandlers&&c.lastEvent&&S._handleMouseUpDocument(c.lastEvent);else{e.which=n[1];var i=(new Date).valueOf();"pan"===e.which&&"pan"!==c.lastEventType&&i-c.lastTime<r.touchPanDelay||(c.lastTime=i,c.lastEventType=e.which,c.lastEvent=e,void 0===e.pageX&&void 0!==e.center&&void 0!==e.center.x&&(e.pageX=e.center.x,e.pageY=e.center.y),"start"===n[2]&&(S._handleMouseDown(e),S._setClickMaybe(!1),d.boundDocumentHandlers&&g(document).on("mousemove.geojs",S._handleMouseUpDocument)),"start"!==n[2]&&"move"!==n[2]||(d.boundDocumentHandlers?S._handleMouseMoveDocument(e):S._handleMouseMove(e)),"end"!==n[2]&&"cancel"!==n[2]||(d.boundDocumentHandlers?S._handleMouseUpDocument(e):S._handleMouseUp(e),c.lastEvent=null),"tap"!==n[2]||d.boundDocumentHandlers||(e.which=1,c.lastEventType=null,S._handleMouseDown(e),S._handleMouseUp(e),c.lastEventType=n[2]))}},this.retriggerMouseMove=function(){S.map().geoTrigger(v.mousemove,S.mouse())},this._connectEvents=function(){if(!r.map)return S;S._disconnectEvents(),p=g(r.map.node()),S._handleMouseWheel=function(){var e={};function t(t){var n,i;A||(e!==f&&(f=e={kind:"wheel",scroll:{x:0,y:0}}),t.preventDefault(),t.deltaFactor=1,1===t.originalEvent.deltaMode?t.deltaFactor=40:2===t.originalEvent.deltaMode&&(t.deltaFactor=g(window).height()),n=t.originalEvent.deltaX||0,i=t.originalEvent.deltaY||0,n=n*r.wheelScaleX*t.deltaFactor/120,i=i*r.wheelScaleY*t.deltaFactor/120,e.scroll.x+=n,e.scroll.y+=i)}function n(t){var n,i;if(e===f){if(S._getMousePosition(t),S._getMouseButton(t),S._getMouseModifiers(t),i=(w({wheel:!0},s.modifiers,r.actions)||{}).action){var o=S.map().transitionCancel("wheel."+i);switch((o|=S.cancel(y.momentum,!0))&&(s.geo=S.map().displayToGcs(s.map),s.mapgcs=S.map().displayToGcs(s.map,null)),i){case y.pan:S.map().pan({x:f.scroll.x,y:f.scroll.y},void 0,"limited");break;case y.zoom:n=-f.scroll.y,P(n,s);break;case y.rotate:S.map().rotation(S.map().rotation()+f.scroll.y*r.rotateWheelScale,s)}S.map().geoTrigger(v.actionwheel,{state:S.state(),mouse:S.mouse(),eventData:t})}f={}}}return r.throttle>0?b(r.throttle,!1,n,t):function(e){t(e),n(e)}}(),P=function(){var e,t,n,i=0,o=400;function a(o,a){var s,l=S.map();e=g.extend(!0,{},a),i+=o,void 0===n&&(t=n=l.zoom()),n+=o,l&&Math.abs(i)>=1&&r.discreteZoom&&!r.zoomAnimation.enabled&&(s=Math.round(i+l.zoom()),i=i+l.zoom()-s,l.zoom(s,e))}function s(){var o,a=S.map();a&&(r.zoomAnimation.enabled?(o=n,r.discreteZoom&&(o=Math.round(o))===t&&n!==t&&(o=t+(n>t?1:-1)),(o=Math.round(1e6*a._fix_zoom(o))/1e6)!==a.zoom()?(a.transitionCancel("debounced_zoom."+y.zoom),a.transition({zoom:o,zoomOrigin:e,duration:r.zoomAnimation.duration,ease:r.zoomAnimation.ease,done:function(e){e=e||{};var t=new RegExp("\\."+y.zoom+"$");e.next||e.cancel&&!((""+e.source).search(t)<0)||(n=void 0),r.discreteZoom&&e.cancel&&e.transition&&e.transition.end&&(""+e.source).search(t)<0&&a.zoom(e.transition.end.zoom,e.transition.end.zoomOrigin)}})):n=void 0):(o=i+a.zoom(),r.discreteZoom&&(o=Math.round(o)),a.zoom(o,e))),i=0}!0!==r.discreteZoom&&r.discreteZoom>0&&(o=r.discreteZoom);return(!0===r.discreteZoom||r.discreteZoom>0)&&!r.zoomAnimation.enabled?x(o,!1,s,a):function(e,t){(e||void 0!==n)&&(a(e,t),s())}}(),o.adjustActions(r.actions);var e={};if(["right","pan","rotate"].forEach((function(t){e[t]=r.actions.some((function(e){return e.input[t]}))})),p.on("wheel.geojs",S._handleMouseWheel),p.on("mousemove.geojs",S._handleMouseMove),p.on("mousedown.geojs",S._handleMouseDown),p.on("mouseup.geojs",S._handleMouseUp),p.on("dragstart",(function(){return!1})),e.right&&p.on("contextmenu.geojs",(function(){return!1})),r.keyboard&&r.keyboard.actions){l=a(p[0]);var t=[];for(var i in r.keyboard.actions)r.keyboard.actions.hasOwnProperty(i)&&(l.bind(r.keyboard.actions[i],function(e){return function(t,n){S._handleKeys(e,t,n)}}(i)),t=t.concat(r.keyboard.actions[i]));u=t}if(p.toggleClass("highlight-focus",!!(u&&u.length&&r.keyboard.focusHighlight)),(S.hasTouchSupport()||r.alwaysTouch)&&(e.pan||e.rotate)){var d;try{(d=n(1272))&&d.Manager||(d=void 0)}catch(e){}if(void 0!==d){var h=[],m=["hammer.input"];e.rotate&&(h.push([d.Rotate,{enable:!0}]),m=m.concat(["rotatestart","rotateend","rotatemove"])),e.pan&&(h.push([d.Pan,{direction:d.DIRECTION_ALL}]),m=m.concat(["panstart","panend","panmove"])),h.push([d.Tap,{event:"doubletap",taps:2}]),h.push([d.Tap,{event:"singletap"},void 0,["doubletap"]]),m=m.concat(["singletap"]);var _={recognizers:h,preventDefault:!0};(c={manager:new d.Manager(p[0],_),touchSupport:S.hasTouchSupport(),lastTime:0}).manager.get("doubletap").recognizeWith("singletap"),m.forEach((function(e){c.manager.on(e,S._handleTouch)}))}}return S},this._disconnectEvents=function(){return u&&(l&&l.unbind(u),u=null,l=null),c&&(c.manager.destroy(),c=null),p&&(p.off(".geojs"),p=null),S._handleMouseWheel=function(){},P=function(){},S},this.map=function(e){return void 0!==e?(r.map=e,S._connectEvents(),S):r.map},this.options=function(e){return void 0===e?g.extend({},r):(g.extend(r,e),S._connectEvents(),S)},this._getMousePosition=function(e){if(void 0!==e.pageX&&void 0!==e.pageY){var t,n,r=p.offset();t=(n=(new Date).valueOf())-s.time,s.time=n,s.deltaTime=t,s.velocity={x:(e.pageX-s.page.x)/t,y:(e.pageY-s.page.y)/t},s.page={x:e.pageX,y:e.pageY},s.map={x:e.pageX-r.left,y:e.pageY-r.top};try{s.geo=S.map().displayToGcs(s.map),s.mapgcs=S.map().displayToGcs(s.map,null)}catch(e){s.geo=s.mapgcs=null}}},this._getMouseButton=function(e){if(void 0!==e.buttons||void 0!==e.which){for(var t in s.buttons)s.buttons.hasOwnProperty(t)&&(s.buttons[t]=!1);if(void 0!==e.buttons)s.buttons.left=!!(1&e.buttons),s.buttons.right=!!(2&e.buttons),s.buttons.middle=!!(4&e.buttons);else if("mouseup"!==e.type)switch(e.which){case 1:s.buttons.left=!0;break;case 2:s.buttons.middle=!0;break;case 3:s.buttons.right=!0}!e.which||e.which>=1&&e.which<=3||(s.buttons[e.which]=!0)}},this._getMouseModifiers=function(e){s.modifiers.alt=e.altKey,s.modifiers.ctrl=e.ctrlKey,s.modifiers.meta=e.metaKey,s.modifiers.shift=e.shiftKey},this._getSelection=function(){var e=d.origin,t=S.mouse(),n=S.map(),r={},i={};return r.upperLeft={x:Math.min(e.map.x,t.map.x),y:Math.min(e.map.y,t.map.y)},r.lowerRight={x:Math.max(e.map.x,t.map.x),y:Math.max(e.map.y,t.map.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),h.data([{ul:i.upperLeft,ur:i.upperRight,ll:i.lowerLeft,lr:i.lowerRight}]),h.draw(),{display:r,gcs:i,mouse:t,origin:g.extend({},d.origin)}},this.cancel=function(e,t){var n;return(n=e?d.action===e:!!d.action)&&(t||(f={}),O()),n},this._setClickMaybe=function(e){T=e,m&&(window.clearTimeout(m),m=null)},this._handleMouseDown=function(e){var t,n;if(!(A||c&&"tap"===c.lastEventType&&(new Date).valueOf()-c.lastTime<1e3)){S._getMousePosition(e),S._getMouseButton(e),S._getMouseModifiers(e),!r.click.enabled||s.buttons.left&&!r.click.buttons.left||s.buttons.right&&!r.click.buttons.right||s.buttons.middle&&!r.click.buttons.middle||(S._setClickMaybe({x:s.page.x,y:s.page.y,buttons:g.extend({},s.buttons)}),r.click.duration>0&&(m=window.setTimeout((function(){T=!1,m=null}),r.click.duration))),t=((n=w(s.buttons,s.modifiers,r.actions))||{}).action;var i=S.map();i.transitionCancel("_handleMouseDown"+(t?"."+t:"")),S.cancel(y.momentum),s.velocity={x:0,y:0},t&&(f={kind:"move"},d={action:t,actionRecord:n,origin:g.extend(!0,{},s),initialZoom:i.zoom(),initialRotation:i.rotation(),initialEventRotation:e.rotation,delta:{x:0,y:0}},n.selectionRectangle&&(C&&(C.clear(),i.deleteLayer(C),C=null),C=i.createLayer("feature",{features:[_.capabilities.color],autoshareRenderer:!1}),(h=C.createFeature("quad",{gcs:i.gcs()})).style({opacity:.25,color:{r:.3,g:.3,b:.3}}),i.geoTrigger(v.brushstart,S._getSelection())),i.geoTrigger(v.actiondown,{state:S.state(),mouse:S.mouse(),event:e}),r.throttle>0?g(document).on("mousemove.geojs",b(r.throttle,S._handleMouseMoveDocument)):g(document).on("mousemove.geojs",S._handleMouseMoveDocument),g(document).on("mouseup.geojs",S._handleMouseUpDocument),d.boundDocumentHandlers=!0)}},this._handleMouseMove=function(e){A||d.boundDocumentHandlers||(r.click.cancelOnMove&&T&&S._setClickMaybe(!1),S._getMousePosition(e),S._getMouseButton(e),S._getMouseModifiers(e),T||S.map().geoTrigger(v.mousemove,S.mouse()))},this._handleZoomrotate=function(e){var t=Math.log2(e.scale);if(!d.zoomrotateAllowZoom&&t&&Math.abs(t)>=Math.log2(1+r.zoomrotateMinimumZoom)&&(r.zoomrotateMinimumZoom&&(d.initialZoom-=t),d.zoomrotateAllowZoom=!0),d.zoomrotateAllowZoom&&t){var n=d.initialZoom+t;S.map().zoom(n,d.origin)}var i=(e.rotation-d.initialEventRotation)*Math.PI/180;if(!d.zoomrotateAllowRotation&&i&&Math.abs(i)>=r.zoomrotateMinimumRotation&&(r.zoomrotateMinimumRotation&&(d.initialEventRotation=e.rotation,i=0),d.zoomrotateAllowRotation=!0),d.zoomrotateAllowRotation){var a=d.initialRotation+i;(i=o.wrapAngle(a-S.map().rotation()))&&(i*(d.lastRotationDelta||0)>=0||Math.abs(i)>=r.zoomrotateReverseRotation)&&(S.map().rotation(a,d.origin),d.lastRotationDelta=i)}var s=d.origin.page;if(d.initialEventGeo){var l=p.offset();(s=S.map().gcsToDisplay(d.initialEventGeo)).x+=l.left,s.y+=l.top}var u=e.pageX-s.x,c=e.pageY-s.y,f=u*u+c*c;!d.zoomrotateAllowPan&&f&&f>=r.zoomrotateMinimumPan*r.zoomrotateMinimumPan&&(r.zoomrotateMinimumPan?(u=c=0,d.initialEventGeo=S.mouse().geo):d.initialEventGeo=d.origin.geo,d.zoomrotateAllowPan=!0),d.zoomrotateAllowPan&&(u||c)&&S.map().pan({x:u,y:c})},this._handleMouseMoveDocument=function(e){var t,n,i;if(S.map()&&!A&&"move"===f.kind){if(S._getMousePosition(e),S._getMouseButton(e),S._getMouseModifiers(e),r.click.cancelOnMove)if(void 0===T.x||void 0===T.y)S._setClickMaybe(!1);else if(!0!==r.click.cancelOnMove||s.page.x===T.x&&s.page.y===T.y){Math.sqrt(Math.pow(s.page.x-T.x,2)+Math.pow(s.page.y-T.y,2))>=r.click.cancelOnMove&&S._setClickMaybe(!1)}else S._setClickMaybe(!1);if(!T)if(d.action){if(t=s.map.x-d.origin.map.x-d.delta.x,n=s.map.y-d.origin.map.y-d.delta.y,d.delta.x+=t,d.delta.y+=n,d.action===y.pan)S.map().pan({x:t,y:n},void 0,"limited");else if(d.action===y.zoom)P(-n*r.zoomScale/120,d);else if(d.action===y.rotate){var o,a;void 0===d.origin.rotation&&(o=d.origin.map.x-S.map().size().width/2,a=d.origin.map.y-S.map().size().height/2,d.origin.rotation=S.map().rotation()-Math.atan2(a,o)),o=s.map.x-S.map().size().width/2,a=s.map.y-S.map().size().height/2,S.map().rotation(d.origin.rotation+Math.atan2(a,o))}else d.action===y.zoomrotate?S._handleZoomrotate(e):d.actionRecord.selectionRectangle&&(i=S._getSelection(),S.map().geoTrigger(v.brush,i));S.map().geoTrigger(v.actionmove,{state:S.state(),mouse:S.mouse(),event:e}),e.preventDefault()}else console.log("WARNING: Invalid state in mapInteractor.")}},this._zoomFromSelection=function(e,t,n){if((e===y.zoomselect||e===y.unzoomselect)&&t.x!==n.x&&t.y!==n.y){var r,i,o=S.map(),a=o.size(),s={x:Math.abs((n.x-t.x)/a.width),y:Math.abs((n.y-t.y)/a.height)};if(e===y.zoomselect?(i=o.displayToGcs({x:(t.x+n.x)/2,y:(t.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),e===y.zoomselect)o.center(i,null);else{var l=o.gcsToDisplay(i,null);o.pan({x:(t.x+n.x)/2-l.x,y:(t.y+n.y)/2-l.y})}}},this._handleMouseUpDocument=function(e){var t,n;if(!A&&(f={},S._setClickMaybe(!1),S._getMouseButton(e),S._getMouseModifiers(e),g(document).off(".geojs"),d.boundDocumentHandlers=!1,s.buttons.right&&e.preventDefault(),d.actionRecord&&d.actionRecord.selectionRectangle&&(S._getMousePosition(e),t=S._getSelection(),C.clear(),S.map().deleteLayer(C),C=null,h=null,S.map().geoTrigger(v.brushend,t),!0!==d.actionRecord.selectionRectangle&&S.map().geoTrigger(d.actionRecord.selectionRectangle,t),S._zoomFromSelection(d.action,t.display.lowerLeft,t.display.upperRight),S.map().geoTrigger(v.actionselection,{state:S.state(),mouse:S.mouse(),event:e,lowerLeft:t.display.lowerLeft,upperRight:t.display.upperRight})),S.map().geoTrigger(v.actionup,{state:S.state(),mouse:S.mouse(),event:e}),n=d.action,O(),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,S.springBack(!0,n)}},this._handleMouseUp=function(e){A||(S._getMouseButton(e),T&&S._handleMouseClick(e))},this._handleMouseClick=function(e){d.actionRecord&&d.actionRecord.selectionRectangle&&(C.clear(),S.map().deleteLayer(C),C=null,h=null,d.action=d.actionRecord=null),S._getMouseButton(e),S._getMouseModifiers(e),S.cancel(y.pan),g(document).off(".geojs"),d.boundDocumentHandlers=!1;var t=S.mouse();t.buttonsDown=T.buttons,S._setClickMaybe(!1),S.map().geoTrigger(v.mouseclick,t)},this._handleMouseWheel=function(){},this.springBack=function(e,t){d.action!==y.momentum&&(e||(s.velocity={x:0,y:0}),d.origAction=t,d.action=y.momentum,d.origin=S.mouse(),d.momentum=S.mouse(),d.start=new Date,d.handler=function(){var e,t,n,i;if(d.action===y.momentum&&S.map()&&!S.map().transition())if(i=Math.min(d.momentum.deltaTime,30),n=d.start.valueOf(),d.start=new Date,e=M(d.momentum.velocity,d.start-n)){if((t=E(e))>r.momentum.maxSpeed&&(t=r.momentum.maxSpeed/t,e.x=e.x*t,e.y=e.y*t),isFinite(e.x)&&isFinite(e.y)||(e.x=0,e.y=0),d.momentum.velocity.x=e.x,d.momentum.velocity.y=e.y,d.origAction===y.zoom){var o=d.momentum.velocity.y*i;P(-o*r.zoomScale/120,d)}else S.map().pan({x:d.momentum.velocity.x*i,y:d.momentum.velocity.y*i},void 0,"limited");d.handler&&S.map().scheduleAnimationFrame(d.handler)}else O()},d.handler&&S.map().scheduleAnimationFrame(d.handler))},this.destroy=function(){S._disconnectEvents(),S.map()&&g(S.map().node()).removeClass("highlight-focus"),S.map(null)},this.mouse=function(){return g.extend(!0,{},s)},this.keyboard=function(e){return void 0===e?g.extend(!0,{},r.keyboard||{}):S.options({keyboard:e})},this.state=function(){return g.extend(!0,{},d)},this.pause=function(e){return void 0===e?A:(A=!!e,S)},this.addAction=function(e,t){e&&e.action&&e.input&&(o.addAction(r.actions,e,t),r.map&&r.actions.some((function(e){return e.input.right}))&&(p.off("contextmenu.geojs"),p.on("contextmenu.geojs",(function(){return!1}))))},this.hasAction=function(e,t,n){return o.hasAction(r.actions,e,t,n)},this.removeAction=function(e,t,n){var i=o.removeAction(r.actions,e,t,n);return r.map&&!r.actions.some((function(e){return e.input.right}))&&p.off("contextmenu.geojs"),i},this.simulateEvent=function(e,t){var n,r,i,o,a;if(!S.map())return S;if("keyboard"===e&&l){var s={shiftKey:t.shift||t.shiftKey||!1,ctrlKey:t.ctrl||t.ctrlKey||!1,altKey:t.alt||t.altKey||!1,metaKey:t.meta||t.metaKey||!1,toString:function(){return t.keys},stopPropagation:function(){},preventDefault:function(){},simulated:!0};l.trigger(s)}else r=t.page||{},t.map&&(i=p.offset(),r.x=t.map.x+i.left,r.y=t.map.y+i.top),"left"===t.button?(o=1,a=1):"right"===t.button?(o=3,a=2):"middle"===t.button&&(o=2,a=4),t.modifiers=t.modifiers||[],t.wheelDelta=t.wheelDelta||{},n=g.Event(e,{pageX:r.x,pageY:r.y,which:o,buttons:a,altKey:t.modifiers.indexOf("alt")>=0,ctrlKey:t.modifiers.indexOf("ctrl")>=0,metaKey:t.modifiers.indexOf("meta")>=0,shiftKey:t.modifiers.indexOf("shift")>=0,center:t.center,rotation:t.touch?t.rotation||0:t.rotation,scale:t.touch?t.scale||1:t.scale,pointers:t.pointers,pointerType:t.pointerType,originalEvent:{deltaX:t.wheelDelta.x,deltaY:t.wheelDelta.y,deltaMode:t.wheelMode,preventDefault:function(){},stopPropagation:function(){},stopImmediatePropagation:function(){}}}),t.touch&&c?S._handleTouch(n):p.trigger(n),e.indexOf(".geojs")>=0&&g(document).trigger(n)},this._connectEvents(),this};r(s,i),e.exports=s},7098:function(e,t,n){var r=n(5699),i=n(6837),o=n(2557),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(5638),i=n(6618),a=n(4634),s=n(8173),l=this,u=this._init,c=null,d=i(),f=0,p=0,h=0;return this.featureType="marker",this._updateRangeTree=function(){if(!(d.timestamp()>=l.dataTime().timestamp()&&d.timestamp()>=l.timestamp())){var t,n,r=l.style.get("radius"),i=l.style.get("strokeWidth"),o=l.style.get("strokeOffset"),a=l.style.get("scaleWithZoom");n=l.position(),f=0,p=0,h=0,t=l.data().map((function(t,s){var l=n(t,s),u=a(t,s),c=r(t,s),d=i(t,s),m=Math.sign(o(t,s)),g=c+d*(m+1)/2,v=c+d*(m-1)/2;switch(u=e.scaleMode[u]||(u>=1&&u<=3?u:0)){case e.scaleMode.stroke:v>f&&(f=v),d>h&&(h=d);break;case e.scaleMode.fill:case e.scaleMode.all:g>p&&(p=g);break;default:g>f&&(f=g)}return[l.x,l.y]})),c=new s(t),d.modified()}},this._approximateMaxRadius=function(e){l._updateRangeTree();var t=Math.pow(2,e);return Math.max(f+h*t,p*t)},this.pointSearch=function(t,n){var r,i,o,a,s=[],u=[],d=[],f=l.gcs(),p=l.style.get("radius"),h=l.style.get("strokeWidth"),m=l.style.get("strokeOffset"),g=l.style.get("scaleWithZoom");if(!(o=l.data())||!o.length)return{found:[],index:[]};l._updateRangeTree();var v=l.layer().map();n=null===n?v.gcs():void 0===n?v.ingcs():n;var y=v.gcsToDisplay(t,n),b=v.zoom(),x=Math.pow(2,b),w=this._approximateMaxRadius(b);return a=[v.displayToGcs({x:y.x-w,y:y.y-w},f),v.displayToGcs({x:y.x+w,y:y.y-w},f),v.displayToGcs({x:y.x-w,y:y.y+w},f),v.displayToGcs({x:y.x+w,y:y.y+w},f)],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=c.range(r.x,r.y,i.x,i.y)).sort((function(e,t){return e-t})),s.forEach((function(t){var n=o[t],r=p(o[t],t),i=g(o[t],t),a=m(o[t],t),s=i?h(o[t],t):0,c=r+s*(a-1)/2;r=c+s;var b,w,_,S=l.position()(n,t);switch(i=e.scaleMode[i]||(i>=1&&i<=3?i:0)){case e.scaleMode.fill:r=c*x+s;break;case e.scaleMode.stroke:r=c+s*x;break;case e.scaleMode.all:r*=x}r&&(_=r*r,(b=(S=v.gcsToDisplay(S,f)).x-y.x)*b+(w=S.y-y.y)*w<=_&&(u.push(n),d.push(t)))})),{found:u,index:d}},this.polygonSearch=function(t,n,r){var i,o,s,u,d=l.gcs(),f=[],p=[],h={},m=l.layer().map(),g=l.data(),v=l.style.get("radius"),y=l.style.get("strokeWidth"),b=l.style.get("strokeOffset"),x=l.style.get("scaleWithZoom"),w=m.zoom(),_=Math.pow(2,w),S=this._approximateMaxRadius(w);return r=null===r?m.gcs():void 0===r?m.ingcs():r,t.outer||(t={outer:t,inner:[]}),t.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((n=n||{}).partial=n.partial||!1,(t={outer:m.gcsToDisplay(t.outer,r),inner:(t.inner||[]).map((function(e){return m.gcsToDisplay(e,r)}))}).outer.forEach((function(e){o||(o={x:e.x,y:e.y},s={x:e.x,y:e.y}),e.x<o.x&&(o.x=e.x),e.x>s.x&&(s.x=e.x),e.y<o.y&&(o.y=e.y),e.y>s.y&&(s.y=e.y)})),l._updateRangeTree(),u=[m.displayToGcs({x:o.x-S,y:o.y-S},d),m.displayToGcs({x:s.x+S,y:o.y-S},d),m.displayToGcs({x:s.x+S,y:s.y+S},d),m.displayToGcs({x:o.x-S,y:s.y+S},d)],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)},s={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=c.range(o.x,o.y,s.x,s.y)).sort((function(e,t){return e-t})),i.forEach((function(r){var i=g[r],o=l.position()(i,r),s=v(g[r],r),u=x(g[r],r),c=b(g[r],r),w=u?y(g[r],r):0,S=s+w*(c-1)/2;switch(s=S+w,u=e.scaleMode[u]||(u>=1&&u<=3?u:0)){case e.scaleMode.fill:s=S*_+w;break;case e.scaleMode.stroke:s=S+w*_;break;case e.scaleMode.all:s*=_}if(s){o=m.gcsToDisplay(o,d);var C=a.distanceToPolygon2d(o,t);(C>=s||C>=0&&"center"===n.partial||C>=-s&&n.partial&&"center"!==n.partial)&&(f.push(i),p.push(r),h[r]={partial:C<s,distance:C})}})),{found:f,index:p,extra:h})},this._init=function(t){return t=r.extend(!0,{},{style:r.extend({},{radius:6.25,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:e.scaleMode.none,rotateWithMap:!1},t&&void 0===t.style?{}:t.style)},t),u.call(l,t),l},l};a.create=function(e,t){"use strict";return(t=t||{}).type="marker",i.create(e,t)},a.capabilities={feature:"marker"},a.primitiveShapes=o.primitiveShapes,a.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(e){for(var t=2;t<=a.symbols[e+"Max"];t+=1)a.symbols[e+t]=a.symbols[e+"Base"]-2+t})),a.scaleMode={none:0,fill:1,stroke:2,all:3},r(a,o),e.exports=a},9146:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),o=n(4634);t=t||{},i.call(this,t);var a=this,s=this._init,l={};return this.featureType="mesh",this.mesh=function(e,t){if(void 0===e)return l;if("string"==typeof e&&void 0===t)return l[e];if(void 0===t){var n=r.extend({},{gridWidth:function(){return e.gridHeight?Math.floor(a.data().length/e.gridHeight):Math.floor(Math.sqrt(a.data().length))},gridHeight:function(){return e.gridWidth?Math.floor(a.data().length/e.gridWidth):Math.floor(Math.sqrt(a.data().length))}},l,e);l=n}else l[e]=t;return a.modified(),a},this.mesh.get=function(e){if(void 0===e){var t,n={};for(t in l)l.hasOwnProperty(t)&&(n[t]=a.mesh.get(t));return n}return o.ensureFunction(l[e])},this.position=function(e){return void 0===e?a.style("position"):(a.style("position",e),a.dataTime().modified(),a.modified(),a)},this._createMesh=function(e,t){e=e||{},t=t||{};var n,r,i,o,s,l,u,c,d,f,p,h,m,g,v,y,b=a.data(),x=a.position(),w=a.mesh.get("elements")(b),_=a.mesh.get("elementPacking")(b),S=a.mesh.get("gridWidth")(b),C=a.mesh.get("gridHeight")(b),A=a.mesh.get("wrapLongitude")(b),T=a.mesh.get("x0")(b),P=a.mesh.get("y0")(b),E=a.mesh.get("dx")(b),O=a.mesh.get("dy")(b),M=S,D={shape:"square",elements:[],elementIndex:[]};if(w){var k=w.length&&Array.isArray(w[0]);if("square"===_||"triangle"!==_&&(!k&&!(w.length%4)&&w.length%3||k&&4===w[0].length))if(D.shape="square",k)for(n=0;n<w.length;n+=1)D.elements.push(w[n][0]),D.elements.push(w[n][1]),D.elements.push(w[n][3]),D.elements.push(w[n][2]),D.elements.push(w[n][3]),D.elements.push(w[n][1]),D.elementIndex.push(n),D.elementIndex.push(n);else for(n=i=0;n<w.length-3;n+=4,i+=1)D.elements.push(w[n]),D.elements.push(w[n+1]),D.elements.push(w[n+3]),D.elements.push(w[n+2]),D.elements.push(w[n+3]),D.elements.push(w[n+1]),D.elementIndex.push(i),D.elementIndex.push(i);else if(D.shape="triangle",k)for(n=0;n<w.length;n+=1)D.elements.push(w[n][0]),D.elements.push(w[n][1]),D.elements.push(w[n][2]),D.elementIndex.push(n);else for(D.elements=w.slice(0,w.length-w.length%3),n=i=0;n<w.length-2;n+=3,i+=1)D.elementIndex.push(i);l=b.length,c=!0}else{if(Object.keys(e).length?S*C>b.length&&(C=Math.floor(b.length/S)):Object.keys(t).length&&(S-1)*(C-1)>b.length&&(C=Math.floor(b.length/(S-1))+1),A=!(void 0!==A&&!A),!(c=null==T||null==P||!E||!O)&&A&&(T<-180||T>180||T+E*(S-1)<-180||T+E*(S-1)>180)&&E>-180&&E<180&&E*(S-1)<360.0001){for(h=[],m=[],n=0;n<S;n+=1){for(v=T+n*E;v<-180;)v+=360;for(;v>180;)v-=360;n&&Math.abs(v-h[h.length-1])>180&&(v>h[h.length-1]?(h.push(v-360),h.push(h[h.length-2]+360),m.push(n),m.push(n+1)):(h.push(v+360),h.push(h[h.length-2]-360),m.push(n),m.push(n+1)),g=n),h.push(v),m.push(n)}if(S+=2,Math.abs(Math.abs(M*E)-360)<.01){for(S+=1,v=T+M*E;v<-180;)v+=360;for(;v>180;)v-=360;h.push(v),m.push(0)}}if(l=S*C,void 0!==g)for(D.index=new Array(l),n=0;n<l;n+=1)y=n-(i=Math.floor(n/S))*S,(y+=y>g?-2:0)>=M&&(y-=M),y+=i*M,D.index[n]=y;for(i=s=0;i<C-1;i+=1,s+=1)for(n=0;n<S-1;n+=1,s+=1)n!==g&&(D.elements.push(s),D.elements.push(s+1),D.elements.push(s+S),D.elements.push(s+S+1),D.elements.push(s+S),D.elements.push(s+1),D.elementIndex.push(i*(S-1)+(m?m[n]:n)),D.elementIndex.push(i*(S-1)+(m?m[n]:n)))}D.verticesPerElement="triangle"===D.shape?3:6;var I=D.verticesPerElement;if(t.used){var R=new Array(D.elementIndex[D.elementIndex.length-1]+1);for(n=0;n<R.length;n+=1)R[n]=t.used(b[n],n);for(n=0;n<D.elementIndex.length&&R[D.elementIndex[n]];n+=1);if(n<D.elementIndex.length){for(i=n;n<D.elementIndex.length;n+=1)if(R[D.elementIndex[n]]){for(D.elementIndex[i]=D.elementIndex[n],o=0;o<3;o+=1)D.elements[3*i+o]=D.elements[3*n+o];i+=1}D.elements.splice(3*i),D.elementIndex.splice(i)}}if(e.used){for(n=0;n<l&&(s=D.index?D.index[n]:n,e.used(b[s],s));n+=1);if(n!==l){u=n;var N=new Array(l);for(i=0;i<u;i+=1)N[i]=i;if(N[u]=-1,!D.index)for(D.index=new Array(b.length),i=0;i<b.length;i+=1)D.index[i]=i;for(n=u+1;n<l;n+=1)s=D.index[n],e.used(b[s],s)?(N[n]=u,D.index[u]=D.index[n],u+=1):N[n]=-1;for(D.index.splice(u),n=o=0;n<D.elements.length;n+=I){for(i=0;i<I&&!(N[D.elements[n+i]]<0);i+=1)D.elements[o+i]=N[D.elements[n+i]];i===I&&(D.elementIndex[Math.floor(o/3)]=D.elementIndex[Math.floor(n/3)],6===I&&(D.elementIndex[Math.floor(o/3)+1]=D.elementIndex[Math.floor(n/3)+1]),o+=I)}D.elements.splice(o),D.elementIndex.splice(Math.floor(o/3)),l=u}}if(t.used&&void 0===g){var F=new Array(l),L=D.index;for(D.index=[],n=0;n<D.elements.length;n+=1)void 0===F[o=D.elements[n]]&&(F[o]=D.index.length,D.index.push(L?L[o]:o)),D.elements[n]=F[o];l=D.index.length}for(f in D.pos=new Array(3*l),e)"used"!==f&&e.hasOwnProperty(f)&&(D[f]=new Array(l));for(n=r=0;n<l;n+=1,r+=3)for(f in d=b[s=D.index?D.index[n]:n],c?(p=x(d,s),D.pos[r]=p.x,D.pos[r+1]=p.y,D.pos[r+2]=p.z||0):(D.pos[r]=void 0===g?T+E*(s%S):h[n%S],D.pos[r+1]=P+O*Math.floor(s/S),D.pos[r+2]=0,p={x:D.pos[r],y:D.pos[r+1],z:D.pos[r+2]}),e)"used"!==f&&e.hasOwnProperty(f)&&(D[f][n]=e[f](d,s,p));for(f in t)if("used"!==f&&t.hasOwnProperty(f)){var B=t[f];for(D[f]=new Array(D.elementIndex.length),n=0;n<D.elementIndex.length;n+=1)d=b[s=D.elementIndex[n]],D[f][n]=B(d,s)}return D.numVertices=l,D.numElements=D.elements.length/D.verticesPerElement,D},this._init=function(e){s.call(a,e),e=e||{};var t=r.extend({},{position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e}},e.style||{});a.mesh(e.mesh||{}),a.style(t)},this};r(o,i),e.exports=o},3737:function(e,t,n){var r=n(5699),i=n(6618),o=0,a=function e(){"use strict";if(!(this instanceof e))return new e;var t=n(4634),r=this,a=++o,s={},l=[],u=0;return this.onIdle=function(e){return u?l.push(e):e(),r},Object.defineProperty(this,"idle",{get:function(){return!u},configurable:!0}),Object.defineProperty(this,"_promises",{get:function(){return u},configurable:!0}),this.addPromise=function(e){function t(){e._geojsTracked&&e._geojsTracked[a]&&(u-=1,delete e._geojsTracked[a]),u||l.splice(0,l.length).forEach((function(e){e()}))}return e._geojsTracked||(e._geojsTracked={}),e._geojsTracked[a]||(e._geojsTracked[a]=!0,u+=1),e.always?e.always(t):e.then(t,t),r},this.removePromise=function(e){return e._geojsTracked&&e._geojsTracked[a]&&(u-=1,delete e._geojsTracked[a],u||l.splice(0,l.length).forEach((function(e){e()}))),r},this.geoOn=function(e,n){return Array.isArray(e)?(e.forEach((function(e){r.geoOn(e,n)})),r):t.isFunction(n)?(s.hasOwnProperty(e)||(s[e]=[]),s[e].push(n),r):(console.warn("Handler for "+e+" is not a function",n,r),r)},this.geoOnce=function(e,t){var n=function n(i){r.geoOff(e,n),t.call(r,i)};return r.geoOn(e,n),n},this.geoIsOn=function(e,t){return Array.isArray(e)?e.some((function(e){return r.geoIsOn(e,t)})):(s[e]||[]).some((function(e){return e===t||void 0===t}))},this.geoTrigger=function(e,t){return Array.isArray(e)?(e.forEach((function(e){r.geoTrigger(e,t)})),r):((t=t||{}).event=e,s.hasOwnProperty(e)&&s[e].forEach((function(n){try{n.call(r,t)}catch(t){console.warn("Event handler for "+e+" threw an error",t)}})),r)},this.geoOff=function(e,t){if(void 0===e&&(s={},l=[],u=0,a=++o),Array.isArray(e))return e.forEach((function(e){r.geoOff(e,t)})),r;if(t){if(Array.isArray(t))return t.forEach((function(t){r.geoOff(e,t)})),r}else s[e]=[];return s.hasOwnProperty(e)&&(s[e]=s[e].filter((function(e){return e!==t}))),r},this._exit=function(){r.geoOff()},i.call(this),this.modified(),this};r(a,i),e.exports=a},8622:function(e,t,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),l=function e(t){var i=n(4665);if(!(this instanceof e))return new e(t);void 0!==(t=t||{}).mapOpacity&&void 0===t.opacity&&((t=r.extend({},t)).opacity=t.mapOpacity),t=r.extend(!0,{},this.constructor.defaults,e.tileSources[this.constructor.defaults.source]||{},e.tileSources[t.source]||{},{name:""},t),o.call(this,t);var a=this;this.mapOpacity=this.opacity,this._getTile=function(e,t){var n=t||e;return i({index:e,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(t){if(void 0!==t)return e.tileSources[t]&&(a.url(e.tileSources[t].url),a.subdomains(e.tileSources[t].subdomains||"abc"),a.attribution(e.tileSources[t].attribution||""),a._options.maxLevel=e.tileSources[t].maxLevel||18,a._options.minLevel=e.tileSources[t].minLevel||0),a;for(var n in e.tileSources)if(e.tileSources[n].url===a.url())return n}};l.defaults=r.extend({},o.defaults,{tileOffset:function(e){var t=256*Math.pow(2,e-1);return{x:t,y:t}},url:"",source:"stamen-toner-lite"});var u='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>';l.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-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},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:u,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:u,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:u,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:u,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-layers":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager Without Layers",minLevel:0,maxLevel:18}},i(l,o),a.registerLayer("osm",l,[s.capabilities.image]),e.exports=l},6565:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n=this,i=this._init;return this.featureType="path",this.position=function(e){return void 0===e?n.style("position"):(e!==n.style("position")&&(n.style("position",e),n.dataTime().modified(),n.modified()),n)},this._init=function(e){i.call(n,e);var t=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:1,b:1},position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e}},void 0===e.style?{}:e.style);return void 0!==e.position&&(t.position=e.position),n.style(t),t.position&&n.position(t.position),n.dataTime().modified(),n},this._init(t),this};i(a,o),e.exports=a},6374:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=n(4634),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n,i=this,s=this._update,l=this._init;return this.featureType="pixelmap",this.position=function(e){return void 0===e?i.style("position"):(e!==i.style("position")&&(i.style("position",e),i.dataTime().modified(),i.modified()),i)},this.url=function(e){return void 0===e?i.style("url"):(e!==i.style("url")&&(i.m_srcImage=i.m_info=void 0,i.style("url",e),i.dataTime().modified(),i.modified()),i)},this.color=function(e){return void 0===e?i.style("color"):(e!==i.style("color")&&(i.style("color",e),i.dataTime().modified(),i.modified()),i)},this.indexModified=function(e,t){if(void 0===e){var r=n;return"clear"===t&&(n=void 0),r}return i.modified(),void 0===n&&(n=[e,e]),e<n[0]&&(n[0]=e),(t||e)>n[1]&&(n[1]=t||e),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 e in i.m_info.maxIndex=0,i.m_info.mappedColors)i.m_info.mappedColors.hasOwnProperty(e)&&(i.m_info.maxIndex=Math.max(i.m_info.maxIndex,e));return i.m_info.maxIndex}},this._computePixelmap=function(){},this._build=function(){if(i.m_srcImage)i.m_info&&i._computePixelmap();else{var e=i.style.get("url")();if(a.isReadyImage(e))i.m_srcImage=e,i._computePixelmap();else if(e){var t,n,o=r.Deferred();e instanceof Image?(i.m_srcImage=e,t=e.onload,n=e.onerror):(i.m_srcImage=new Image,e.indexOf(":")>=0&&e.indexOf("/")===e.indexOf(":")+1&&(i.m_srcImage.crossOrigin=i.style.get("crossDomain")()||"anonymous")),i.m_srcImage.onload=function(){t&&t.apply(i,arguments),i.style.get("url")()===e&&(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),e instanceof Image||(i.m_srcImage.src=e)}}return i.buildTime().modified(),i},this._init=function(e){e=e||{},l.call(i,e);var t=r.extend({},{color:function(e,t){return{r:(255&t)/255,g:(t>>8&255)/255,b:(t>>16&255)/255,a:1}},position:function(e){return e}},void 0===e.style?{}:e.style);return void 0!==e.position&&(t.position=e.position),void 0!==e.url&&(t.url=e.url),void 0!==e.color&&(t.color=e.color),i.style(t),i.dataTime().modified(),e.quadFeature&&(i.m_srcImage=!0,i._computePixelmap()),i},this};s.create=function(e,t){"use strict";return(t=t||{}).type="pixelmap",o.create(e,t)},s.capabilities={feature:"pixelmap",lookup:"pixelmap.lookup"},i(s,o),e.exports=s},809:function(e,t,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),l=n(6374),u=function e(t){var i=n(4665);if(!(this instanceof e))return new e(t);t=t||{},t=r.extend(!0,{},this.constructor.defaults,t),o.call(this,t);var a,s=this._init,l=this;return this._getTile=function(e,t){var n=t||e;return i({index:e,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(){s.apply(l,arguments);var e={quadFeature:l.features()[0]};t.style&&(e.style=t.style),t.color&&(e.color=t.color),a=l.createFeature("pixelmap",e),t.data&&a.data(t.data),l.style=a.style,l.data=a.data,l.indexModified=a.indexModified;var n=l.dataTime().modified;return l.dataTime().modified=function(){return a.dataTime().modified(),n()},["modified","geoOn","geoOff","geoOnce"].forEach((function(e){var t=l[e];l[e]=function(){return a[e].apply(this,arguments),t.apply(this,arguments)}})),l},l};u.defaults=r.extend({},o.defaults,{features:[s.capabilities.image,l.capabilities.lookup],tileOffset:function(e){var t=256*Math.pow(2,e-1);return{x:t,y:t}},url:""}),i(u,o),a.registerLayer("pixelmap",u,[s.capabilities.image]),e.exports=u},2557:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=n(6618),a=n(9808),s=n(5108),l=n(4634),u=n(8173),c=this,d=this._init,f=null,p=o(),h=this.data,m=0,g=t.clustering,v=null,y=[],b=null,x=!1;return this.featureType="point",this.clustering=function(e){return void 0===e?g:(g&&!e?(v=null,g=!1,h(y)):e&&g!==e&&(g=e,c._clusterData()),c)},this._clusterData=function(){if(g){var e=!0===g?{radius:10}:g,t=c.position(),n=c.layer().map(),i=n.gcsToDisplay(n.center(void 0,null),null),o=n.displayToGcs(i,c.gcs()),s=n.displayToGcs({x:i.x+e.radius,y:i.y},c.gcs()),u=Math.pow(Math.pow(s.y-o.y,2)+Math.pow(s.x-o.x,2),.5),d=n.zoom(),f=u*Math.pow(2,d);e=r.extend({},e,{radius:f}),v=new a(e),y.forEach((function(e,n){var r=l.normalizeCoordinates(t(e,n));r.index=n,v.addPoint(r)})),b=null,c._handleZoom(n.zoom())}},this._handleZoom=function(e){var t=Math.floor(e);if(g&&t!==b){b=t;var n=v.points(t).map((function(e){return y[e.index]}));v.clusters(t).forEach((function(e){e.__cluster=!0,e.__data=[],e.obj.each((function(t){e.__data.push(y[t.index])})),n.push(e)})),x=!0,c.data(n)}},this.position=function(e){if(void 0===e)return c.style("position");var t=l.isFunction(e);return c.style("position",(function(n,r){return null!=n&&n.__cluster?n:t?e(n,r):e})),c.dataTime().modified(),c.modified(),c},this._updateRangeTree=function(){if(!(p.timestamp()>=c.dataTime().timestamp()&&p.timestamp()>=c.timestamp())){var e,t,n=c.style.get("radius"),r=c.style.get("stroke"),i=c.style.get("strokeWidth");t=c.position(),m=0,e=c.data().map((function(e,o){var a=t(e,o);return m=Math.max(m,n(e,o)+(r(e,o)?i(e,o):0)),[a.x,a.y]})),f=new u(e),p.modified()}},this.pointSearch=function(e,t){var n,r,i,o,a,s,l=[],u=[],d=[],p=c.gcs(),h=c.style.get("fill"),g=c.style.get("stroke"),v=c.style.get("strokeWidth"),y=c.style.get("radius");return(i=c.data())&&i.length?(c._updateRangeTree(),o=c.layer().map(),a=o.gcsToDisplay(e,t),s=[o.displayToGcs({x:a.x-m,y:a.y-m},p),o.displayToGcs({x:a.x+m,y:a.y-m},p),o.displayToGcs({x:a.x-m,y:a.y+m},p),o.displayToGcs({x:a.x+m,y:a.y+m},p)],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)},(l=f.range(n.x,n.y,r.x,r.y)).sort((function(e,t){return e-t})),l.forEach((function(e){var t=i[e],n=g(i[e],e);if(n||h(i[e],e)){var r,s,l,f,m=c.position()(t,e);l=y(i[e],e),(l+=n?v(i[e],e):0)&&(f=l*l,(r=(m=o.gcsToDisplay(m,p)).x-a.x)*r+(s=m.y-a.y)*s<=f&&(u.push(t),d.push(e)))}})),{found:u,index:d}):{found:[],index:[]}},this.polygonSearch=function(e,t,n){var r,i,o,a,s=c.gcs(),u=[],d=[],p={},h=c.layer().map(),g=c.data(),v=c.style.get("fill"),y=c.style.get("stroke"),b=c.style.get("strokeWidth"),x=c.style.get("radius");return e.outer||(e={outer:e,inner:[]}),e.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((t=t||{}).partial=t.partial||!1,(e={outer:h.gcsToDisplay(e.outer,n),inner:(e.inner||[]).map((function(e){return h.gcsToDisplay(e,n)}))}).outer.forEach((function(e){i||(i={x:e.x,y:e.y},o={x:e.x,y:e.y}),e.x<i.x&&(i.x=e.x),e.x>o.x&&(o.x=e.x),e.y<i.y&&(i.y=e.y),e.y>o.y&&(o.y=e.y)})),c._updateRangeTree(),a=[h.displayToGcs({x:i.x-m,y:i.y-m},s),h.displayToGcs({x:o.x+m,y:i.y-m},s),h.displayToGcs({x:o.x+m,y:o.y+m},s),h.displayToGcs({x:i.x-m,y:o.y+m},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=f.range(i.x,i.y,o.x,o.y)).sort((function(e,t){return e-t})),r.forEach((function(n){var r=g[n],i=y(g[n],n);if(i||v(g[n],n)){var o=c.position()(r,n),a=x(g[n],n);if(a+=i?b(g[n],n):0){o=h.gcsToDisplay(o,s);var f=l.distanceToPolygon2d(o,e);(f>=a||f>=0&&"center"===t.partial||f>=-a&&t.partial&&"center"!==t.partial)&&(u.push(r),d.push(n),p[n]={partial:f<a,distance:f})}}})),{found:u,index:d,extra:p})},this.data=function(e){return void 0===e?h():(x||(y=e),g&&!x?c._clusterData():h(e),x=!1,c)},this._init=function(e){e=e||{},d.call(c,e);var t=r.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(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},origin:function(e){return e.length>=3?e.slice(0,3):[0,0,0]}},void 0===e.style?{}:e.style);return void 0!==e.position&&(t.position=e.position),c.style(t),t.position&&c.position(t.position),c.dataTime().modified(),c.geoOn(s.zoom,(function(e){c._handleZoom(e.zoomLevel)})),c},c};o.create=function(e,t){"use strict";return(t=t||{}).type="point",i.create(e,t)},o.capabilities={feature:"point",stroke:"point.stroke"},o.primitiveShapes={auto:"auto",sprite:"sprite",triangle:"triangle",square:"square"},r(o,i),e.exports=o},4343:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=n(6853),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var i,s=n(4634),l=this,u=this._init,c=this._exit,d=this.data,f=this.draw,p=this.modified,h=this.style,m=[];function g(e,t,n){var r=l.gcs(),i=l.layer().map().gcs();return e=e||l.data(),t=t||l.style.get("position"),n=n||l.style.get("polygon"),e.map((function(e,o){var s=n(e,o);if(s){var u,c,d,f,p,h,m,g,v,y;for(f=s.outer||(Array.isArray(s)?s:[]),u=new Array(f.length),p=0;p<f.length;p+=1)u[p]=t.call(l,f[p],p,e,o),h=u[p].x,m=u[p].y,p?(h<d.min.x&&(d.min.x=h),m<d.min.y&&(d.min.y=m),h>d.max.x&&(d.max.x=h),m>d.max.y&&(d.max.y=m)):d={min:{x:h,y:m},max:{x:h,y:m}};for(c=(s.inner||[]).map((function(n){f=n||[];var r=new Array(f.length);for(p=0;p<f.length;p+=1)r[p]=t.call(l,f[p],p,e,o);return r})),g=a.transformCoordinates(r,i,u),v=c.map((function(e){return a.transformCoordinates(r,i,e)})),p=0;p<g.length;p+=1)h=g[p].x,m=g[p].y,p?(h<y.min.x&&(y.min.x=h),m<y.min.y&&(y.min.y=m),h>y.max.x&&(y.max.x=h),m>y.max.y&&(y.max.y=m)):y={min:{x:h,y:m},max:{x:h,y:m}};return{outer:u,inner:c,range:d,mapouter:g,mapinner:v,maprange:y}}}))}function v(e){return s.isFunction(e)?function(t){return e(t[0],t[1],t[2],t[3])}:e}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(e){var t=d(e);return void 0!==e&&(m=g(),l._checkForStroke()),t},this.polygonCoordinates=function(){return m},this.polygon=function(e){return void 0===e?l.style("polygon"):(l.style("polygon",e),l.dataTime().modified(),l.modified(),m=g(),l)},this.position=function(e){return void 0===e?l.style("position"):(l.style("position",e),l.dataTime().modified(),l.modified(),m=g(),l)},this.pointSearch=function(e,t){var n=[],r=[],o={},u=l.data(),c=l.layer().map();t=null===t?c.gcs():void 0===t?c.ingcs():t;var d=a.transformCoordinates(t,c.gcs(),e);(m.forEach((function(e,t){s.pointInPolygon(d,e.mapouter,e.mapinner,e.maprange)&&(r.push(t),o[t]=!0,n.push(u[t]))})),i)&&i.pointSearch(e).found.forEach((function(e){e.length&&4===e[0].length&&!o[e[0][3]]&&(r.push(e[0][3]),o[e[0][3]]=!0,n.push(u[e[0][3]]))}));return{index:r,found:n}},this.polygonSearch=function(e,t,n){var r,o,u=l.data(),c=[],d=[],f={},p=e,h={},g=l.layer().map();if(n=null===n?g.gcs():void 0===n?g.ingcs():n,e.outer||(e={outer:e,inner:[]}),!u||!u.length||e.outer.length<3)return{found:d,index:c,extra:f};if((t=t||{}).partial=t.partial||!1,(e={outer:a.transformCoordinates(n,g.gcs(),e.outer),inner:(e.inner||[]).map((function(e){return a.transformCoordinates(n,g.gcs(),e)}))}).outer.forEach((function(e){r||(r={x:e.x,y:e.y},o={x:e.x,y:e.y}),e.x<r.x&&(r.x=e.x),e.x>o.x&&(o.x=e.x),e.y<r.y&&(r.y=e.y),e.y>o.y&&(o.y=e.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,l,p=-1;p<n.mapinner.length&&!l;p+=1)for(var m=p<0?n.mapouter:n.mapinner[p],g=0,v=m.length,y=v-1;g<v;y=g,g+=1){var b=s.distanceToPolygon2d(m[g],e);if(b*s.distanceToPolygon2d(m[y],e)<0){l=!0;break}if(s.crossedLineSegmentPolygon2d(m[g],m[y],e)){l=!0;break}b>0&&(a=!0)}a||l||!s.pointInPolygon(e.outer[0],n.mapouter,n.mapinner,n.maprange)||(l=!0),(!t.partial&&a&&!l||t.partial&&(a||l))&&(c.push(i),d.push(u[i]),f[i]={partial:l},h[i]=!0)}})),i){var v=i.polygonSearch(p,t);v.found.forEach((function(e,t){e.length&&4===e[0].length&&(h[e[0][3]]||(c.push(e[0][3]),h[e[0][3]]=!0,d.push(u[e[0][3]]),f[v.index[t]]={partial:!1}),v.extra[v.index[t]].partial&&(f[e[0][3]].partial=!0))}))}return{found:d,index:c,extra:f}},this.style=function(e,t){var n=h.apply(l,arguments);return void 0===e||"string"==typeof e&&void 0===t||l._checkForStroke(),n},this.style.get=h.get,this._getLoopData=function(e,t,n){var r,i=[];for(r=0;r<n.length;r+=1)i.push([n[r],r,e,t]);return i},this._checkForStroke=function(){if(!1!==h("stroke")){if(l.layer()){i||(i=l.layer().createFeature("line",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([i]));var e,t=l.style();if(s.isFunction(t.stroke)||!t.stroke){var n=l.style.get("stroke"),r=l.style.get("strokeOpacity");e=function(e){return n(e[2],e[3])?r(e[0],e[1],e[2],e[3]):0}}else e=v(t.strokeOpacity);i.style({antialiasing:v(t.antialiasing),closed:!0,lineCap:v(t.lineCap),lineJoin:v(t.lineJoin),miterLimit:v(t.miterLimit),strokeWidth:v(t.strokeWidth),strokeStyle:v(t.strokeStyle),strokeColor:v(t.strokeColor),strokeOffset:v(t.strokeOffset),strokeOpacity:e});var o=l.data(),a=l.style("position");if(o!==i._lastData||a!==i._lastPosVal){var u,c,d,f=[],p=l.style.get("position"),m=l.style.get("polygon");for(u=0;u<o.length;u+=1)(c=m(o[u],u))&&(d=c.outer||(Array.isArray(c)?c:[])).length>=2&&(f.push(l._getLoopData(o[u],u,d)),c.inner&&c.inner.forEach((function(e){e.length>=2&&f.push(l._getLoopData(o[u],u,e))})));i.position((function(e,t,n,r){return p(e[0],e[1],e[2],e[3])})),i.data(f),i._lastData=o,i._lastPosVal=a}}}else i&&l.layer()&&(l.layer().deleteFeature(i),i=null,l.dependentFeatures([]))},this.draw=function(){var e=f();return i&&i.draw(),e},this.modified=function(){var e=p();return i&&i.modified(),e},this.rdpSimplifyData=function(e,t,n,r){var i=l.layer().map(),o=i.gcs(),u=l.gcs(),c=g(e,n,r);return void 0===t&&(t=.5*i.unitsPerPixel(i.zoom())),c=c.map((function(e){return{outer:a.transformCoordinates(u,o,e.outer),inner:e.inner.map((function(e){return a.transformCoordinates(u,o,e)}))}})),e=e.map((function(e,n){var r=c[n],i={};for(var l in e)!e.hasOwnProperty(l)||Array.isArray(e)&&l>=0&&l<e.length||(i[l]=e[l]);if(r&&r.outer.length>=3)if(i.inner=r.inner.filter((function(e){return e.length>=3})),i.outer=s.rdpLineSimplify(r.outer,t,!0,i.inner),i.outer.length>=3){var d=i.inner.slice();i.inner.map((function(e,n){d[n]=i.outer;var r=s.rdpLineSimplify(e,t,!0,d);return d[n]=r,r})).filter((function(e){return e.length>=3})),i.outer=a.transformCoordinates(o,u,i.outer),i.inner=i.inner.map((function(e){return a.transformCoordinates(o,u,e)}))}else i.outer=i.inner=[];else i.outer=[];return i})),l.style("position",(function(e){return e})),l.style("polygon",(function(e){return e})),l.data(e),l},this.mouseOverOrderClosestBorder=function(e){var t=e.feature.data(),n=e.feature.layer().map(),r=a.transformCoordinates(n.ingcs(),e.feature.gcs(),e.mouse.geo),i=e.feature.polygonCoordinates(),o={};e.over.index.forEach((function(e,t){var n,a=i[e];a.outer.forEach((function(e,t){var i=a.outer[(t+1)%a.outer.length],o=s.distance2dToLineSquared(r,e,i);(void 0===n||o<n)&&(n=o)})),a.inner.forEach((function(e){e.forEach((function(t,i){var o=e[(i+1)%e.length],a=s.distance2dToLineSquared(r,t,o);(void 0===n||a<n)&&(n=a)}))})),o[e]=n})),e.over.index.sort((function(e,t){return o[e]-o[t]})).reverse(),e.over.index.forEach((function(n,r){e.over.found[r]=t[n]}))},this._exit=function(){i&&l.layer()&&(l.layer().deleteFeature(i),i=null,l.dependentFeatures([])),c()},this._init=function(e){e=e||{},u.call(l,e);var t=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:function(e){return e},position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},origin:function(e){for(var t=0;t<e.length;t+=1)if(e[t].vertices.length>=3)return e[t].vertices.slice(0,3);return[0,0,0]}},void 0===e.style?{}:e.style);void 0!==e.polygon&&(t.polygon=e.polygon),void 0!==e.position&&(t.position=e.position),l.style(t),l._checkForStroke()},this};s.create=function(e,t){"use strict";return(t=t||{}).type="polygon",o.create(e,t)},s.capabilities={feature:"polygon"},i(s,o),e.exports=s},5017:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=function e(t){"use strict";var i=n(6853),a=n(4634);if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var s,l,u=this,c=this._init,d=0,f=[],p=[];return this.featureType="quad",this._objectListStart=function(e){r.each(e,(function(e,t){t.used=!1}))},this._objectListGet=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].entry===t)return e[n].used=!0,e[n].value},this._objectListAdd=function(e,t,n){e.push({entry:t,value:n,used:!0})},this._objectListEnd=function(e){for(var t=e.length-1;t>=0;t-=1)e[t].used||e.splice(t,1)},this.pointSearch=function(e,t){var n,o,s=[],c=[],d={},f=[{},{},{},{}],p=[{},{},{},{}],h=[0,1,2,0],m=[1,2,3,1],g=u.data(),v=u.layer().map();return t=null===t?v.gcs():void 0===t?v.ingcs():t,e=i.transformCoordinates(t,v.gcs(),e),l||u._generateQuads(),r.each([l.clrQuads,l.imgQuads,l.vidQuads],(function(t,r){r.forEach((function(t,r){for(n=0;n<h.length;n+=1)f[n].x=t.pos[3*h[n]],f[n].y=t.pos[3*h[n]+1],f[n].z=t.pos[3*h[n]+2],p[n].x=t.pos[3*m[n]],p[n].y=t.pos[3*m[n]+1],p[n].z=t.pos[3*m[n]+2];(a.pointInPolygon(e,f)||a.pointInPolygon(e,p))&&(c.push(t.idx),s.push(g[t.idx]),!(o=a.pointToTriangleBasis2d(e,f[0],f[1],f[2]))||o.x+o.y>1?(o=a.pointToTriangleBasis2d(e,p[2],p[1],p[0]))&&(o.x=1-o.x):o.y=1-o.y,o&&(d[t.idx]={basis:o,_quad:t}))}))})),{index:c,found:s,extra:d}},this.position=function(e){return void 0===e?u.style("position"):(u.style("position",a.ensureFunction(e)),u.dataTime().modified(),u.modified(),u)},this._positionToQuad=function(e,t,n,o){var a=e.call(u,n,o);if(a.ll&&a.ur||a.ul&&a.lr){var s=u.gcs(),l=u.layer().map().gcs(),c={};return r.each(["ll","lr","ul","ur"],(function(e,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]=t.call(u,n,o)),s!==l&&!1!==s&&(c[r]=i.transformCoordinates(s,l,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(e,t){},this._generateQuads=function(){var e,t,n=u.position(),i=u.style.get("image"),o=u.style.get("video"),c=u.style.get("delayRenderWhenSeeking"),h=u.style.get("color"),m=u.style.get("depth"),g=u.style.get("opacity"),v=u.style.get("drawOnAsyncResourceLoaded"),y=u.style.get("previewColor"),b=u.style.get("previewImage"),x=u.data(),w=[],_=[],S=[],C=[0,0,0];return u._objectListStart(f),u._objectListStart(p),r.each(x,(function(l,x){if(x._cachedQuad)return t=x._cachedQuad.diag2,(void 0===e||x._cachedQuad.diag2&&x._cachedQuad.diag2<e)&&(C=x._cachedQuad.ll,e=x._cachedQuad.diag2),x._cachedQuad.clrquad&&w.push(x._cachedQuad.clrquad),x._cachedQuad.imgquad&&(x._cachedQuad.imageEntry&&u._objectListGet(f,x._cachedQuad.imageEntry),_.push(x._cachedQuad.imgquad)),void(x._cachedQuad.vidquad&&(x._cachedQuad.videoEntry&&u._objectListGet(p,x._cachedQuad.videoEntry),S.push(x._cachedQuad.vidquad)));var A,T,P,E,O,M,D,k,I,R,N,F,L={};if(D=u._positionToQuad(n,m,x,l),R=g.call(u,x,l),void 0!==D&&R&&!(R<0)){if(t=Math.pow(D.ll[0]-D.ur[0],2)+Math.pow(D.ll[1]-D.ur[1],2)+Math.pow(D.ll[2]-D.ur[0],2)+Math.pow(D.lr[0]-D.ur[0],2)+Math.pow(D.lr[1]-D.ur[1],2)+Math.pow(D.lr[2]-D.ur[0],2),L.diag2=t,L.ll=D.ll,(void 0===e||t&&t<e)&&(C=D.ll,e=t),D=[D.ll[0],D.ll[1],D.ll[2],D.lr[0],D.lr[1],D.lr[2],D.ul[0],D.ul[1],D.ul[2],D.ur[0],D.ur[1],D.ur[2]],A={idx:l,pos:D,opacity:R,zOffset:x.zOffset},x.reference&&(A.reference=x.reference),x.crop&&(A.crop=x.crop),I=(k=i.call(u,x,l))?null:o.call(u,x,l),k){if(L.imageEntry=k,void 0===(T=u._objectListGet(f,k))&&(k instanceof Image||k instanceof HTMLCanvasElement?T=k:(T=new Image).src=k,u._objectListAdd(f,k,T)),a.isReadyImage(T)||T instanceof HTMLCanvasElement)A.image=T;else if(N=void 0,(F=b.call(u,x,l))&&a.isReadyImage(F)?A.image=F:(N=y.call(u,x,l),A.color=a.convertColor(N),A.color&&void 0!==A.color.r&&void 0!==A.color.g&&void 0!==A.color.b?(w.push(A),L.clrquad=A):N=void 0),v.call(u,x,l))M=a.isReadyImage(T,!0)?null:r.Deferred(),E=T.onload,T.onload=function(){if(void 0!==N&&(r.inArray(A,w)>=0&&w.splice(r.inArray(A,w),1),delete L.clrquad),A.image=T,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),M&&M.resolve(),E)return E.apply(u,arguments)},O=T.onerror,T.onerror=function(){if(M&&M.reject(),O)return O.apply(u,arguments)},M&&u.layer().addPromise(M.promise());else if(void 0===N&&!A.image)return;_.push(A),L.imgquad=A}else if(I){if(L.videoEntry=I,void 0===(P=u._objectListGet(p,I))&&(I instanceof HTMLVideoElement?P=I:(P=document.createElement("video")).src=I,u._objectListAdd(p,I,P),r(P).off(".geojsvideo").on("seeking.geojsvideo canplay.geojsvideo pause.geojsvideo playing.geojsvideo",(function(e){u._checkQuadUpdate(A,e)}))),A.delayRenderWhenSeeking=c.call(u,x,l),void 0===A.delayRenderWhenSeeking&&(A.delayRenderWhenSeeking=!0),a.isReadyVideo(P))A.video=P;else if(N=y.call(u,x,l),A.color=a.convertColor(N),A.color&&void 0!==A.color.r&&void 0!==A.color.g&&void 0!==A.color.b?(w.push(A),L.clrquad=A):N=void 0,v.call(u,x,l))M=a.isReadyVideo(P,!0)?null:r.Deferred(),E=P.onloadeddata,P.onloadeddata=function(){if(void 0!==N&&(r.inArray(A,w)>=0&&w.splice(r.inArray(A,w),1),delete L.clrquad),A.video=P,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),M&&M.resolve(),E)return E.apply(u,arguments)},O=P.onerror,P.onerror=function(){if(M&&M.reject(),O)return O.apply(u,arguments)},M&&u.layer().addPromise(M.promise());else if(void 0===N&&!A.video)return;S.push(A),L.vidquad=A}else{if(A.color=a.convertColor(h.call(u,x,l)),!A.color||void 0===A.color.r||void 0===A.color.g||void 0===A.color.b)return;w.push(A),L.clrquad=A}L.clrquad&&(d+=1,L.clrquad.quadId=d),L.imgquad&&(d+=1,L.imgquad.quadId=d),L.vidquad&&(d+=1,L.vidquad.quadId=d),!1!==s&&(x._cachedQuad=L)}})),u._objectListEnd(f),u._objectListEnd(p),l={clrQuads:w,imgQuads:_,vidQuads:S,origin:new Float32Array(C)}},this.cacheUpdate=function(e){return null==e?r.each(u.data(),(function(e,t){t._cachedQuad&&delete t._cachedQuad})):(isFinite(e)&&(e=u.data()[e]),e._cachedQuad&&delete e._cachedQuad),u.modified(),u},this.video=function(e){var t,n;return isFinite(e)&&(e=u.data()[e]),e._cachedQuad?t=(e._cachedQuad.vidquad||{}).video:(l||u._generateQuads(),(n=u.data().indexOf(e))>=0&&(t=u._objectListGet(p,u.style.get("video")(e,n)))),t instanceof HTMLVideoElement?t:null},this._init=function(e){e=e||{},c.call(u,e),s=!1!==e.cacheQuads;var t=r.extend({},{color:{r:1,g:1,b:1},opacity:1,depth:0,drawOnAsyncResourceLoaded:!0,previewColor:null,previewImage:null,image:function(e){return e.image},video:function(e){return e.video},position:function(e){return e}},void 0===e.style?{}:e.style);void 0!==e.position&&(t.position=a.ensureFunction(e.position)),u.style(t),u.dataTime().modified()},u};a.create=function(e,t){"use strict";return(t=t||{}).type="quad",o.create(e,t)},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),e.exports=a},4647:function(e,t,n){var r=n(5638),i={dom:{}},o={},a={},s={},l={},u={},c={},d={},f={},p={registerFileReader:function(e,t){c[e]=t},createFileReader:function(e,t){return c.hasOwnProperty(e)?c[e](t):null},registerRenderer:function(e,t){s[e]=t},createRenderer:function(e,t,n,r){if(s.hasOwnProperty(e)){var i=s[e]({layer:t,canvas:n,options:r});return i._init(),i}return null},checkRenderer:function(e,t){if(null===e)return e;if(s.hasOwnProperty(e)){var n=s[e];if(!n.supported||n.supported())return n.apiname||e;if(!n.fallback||t)return!1;var r=p.checkRenderer(n.fallback(),!0);return!1!==r&&console.warn(e+" renderer is unavailable, using "+r+" renderer instead"),r}return!1},rendererForFeatures:function(e){var t,n,r,i,o,a,s=["webgl","canvas","svg","vtkjs",null];for(n=0;n<s.length;n+=1)if(t=s[n],!1!==p.checkRenderer(t,!0)){if(!e)return t;if(l[t]){for(a=!0,i=0;i<e.length;i+=1){if(o=null,(r=e[i]).indexOf(".")>=0&&(o=r,r=r.substr(0,r.indexOf("."))),void 0===l[t][r]){a=!1;break}if(o&&u[t][r]&&!u[t][r][o]){a=!1;break}}if(a)return t}}return console.warn('There is no renderer available for the feature list "'+(e||[]).join(", ")+'".'),!1},registerFeature:function(e,t,n,r){e in l||(l[e]={},u[e]={});var i=l[e][t];return i&&console.warn("The "+e+"."+t+" feature is already registered"),l[e][t]=n,u[e][t]=r,i},createFeature:function(e,t,n,i){var o=n.api(),a={layer:t,renderer:n};if(o in l&&e in l[o]){void 0!==i&&r.extend(!0,a,i);var s=l[o][e](a);return void 0===t.gcs&&(t.gcs=function(){return t.map().gcs()}),s}return null},registerLayerAdjustment:function(e,t,n){e in d||(d[e]={});var r=d[e][t];return r&&console.warn("The "+e+"."+t+" layer adjustment is already registered"),d[e][t]=n,r},adjustLayerForRenderer:function(e,t){var n=t.rendererName();n&&d&&d[n]&&d[n][e]&&d[n][e].apply(t)},registerLayer:function(e,t,n){o[e]=t,a[e]=n},createLayer:function(e,t,n){var i={map:t},s=null;return e in o?(n.renderer||n.features||!a||(i.features=a[e]),void 0!==n&&r.extend(!0,i,n),(s=o[e](i)).layerName=e,s._init(),s):null},registerWidget:function(e,t,n){e in i||(i[e]={});var r=i[e][t];return r&&console.warn("The "+e+"."+t+" widget is already registered"),i[e][t]=n,r},createWidget:function(e,t,n){var o={layer:t};if(e in i.dom)return void 0!==n&&r.extend(!0,o,n),i.dom[e](o);throw new Error("Cannot create unknown widget "+e)},registerAnnotation:function(e,t,n){var r=f[e];return r&&console.warn("The "+e+" annotation is already registered"),f[e]={func:t,features:n||{}},r},createAnnotation:function(e,t){if(f[e])return f[e].func(t);console.warn("The "+e+" annotation is not registered")},listAnnotations:function(){return Object.keys(f)},featuresForAnnotations:function(e){var t=[];return(Array.isArray(e)?e:Object.keys(e)).forEach((function(n){f[n]&&Object.keys(f[n].features).forEach((function(i){Array.isArray(e)||!0===e[n]||!Array.isArray(f[n].features[i])?t.push(i):e[n].forEach((function(e){r.inArray(e,f[n].features[i])>=0&&t.push(i)}))}))})),t},rendererForAnnotations:function(e){return p.rendererForFeatures(p.featuresForAnnotations(e))}};p.registries={annotations:f,features:l,featureCapabilities:u,fileReaders:c,layers:o,renderers:s,widgets:i},e.exports=p},3234:function(e,t,n){var r=n(5699),i=n(3737),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this);var n=this,r=0,o=0,a=void 0===(t=t||{}).layer?null:t.layer,s=void 0===t.canvas?null:t.canvas,l=!1;return this.layer=function(){return a},this.canvas=function(e){return void 0===e?s:(s=e,n.modified(),n)},this.map=function(){return a?a.map():null},this.initialized=function(e){return void 0===e?l:(l=e,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(e,t){return r=e,o=t,n},this._init=function(){return n},this._resize=function(e,t,r,i){return n._setWidthHeight(r,i),n},this._render=function(){return n},this};r(o,i),e.exports=o},5358:function(e,t,n){var r=n(5699),i=n(3737),o=function e(t){"use strict";if(!(this instanceof e))return new e;i.call(this,t);var n=this,r=null,o=[],a=this._exit,s=this.geoTrigger,l=this.addPromise,u=this.removePromise;return this.addPromise=function(e){return r&&r.addPromise(e),l(e),n},this.removePromise=function(e){return r&&r.removePromise(e),u(e),n},this.parent=function(e){return void 0===e?r:(r=e,n)},this.addChild=function(e){return Array.isArray(e)?(e.forEach(n.addChild),n):(e.parent(n),o.push(e),n)},this.removeChild=function(e){return Array.isArray(e)?(e.forEach(n.removeChild),n):(o=o.filter((function(t){return t!==e})),n)},this.children=function(){return o.slice()},this.draw=function(e){return n.children().forEach((function(t){t.draw(e)})),n},this.geoTrigger=function(e,t,i){var a;return a=(t=t||{}).geo||{},t.geo=a,a.stopPropagation?n:!i&&r&&a._triggeredBy!==r?(a._triggeredBy=n,r.geoTrigger(e,t),n):(s.call(n,e,t),a.stopPropagation||o.forEach((function(r){r.geoTrigger&&(a._triggeredBy=n,r.geoTrigger(e,t))})),n)},this._exit=function(){o=[],r=null,a()},this};r(o,i),e.exports=o},5381:function(e){e.exports="0e6b086c99eaaca5976d0391664d9527c4076aa3"},9851:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4745),a=function e(t){"use strict";var n=this;return this instanceof e?(o.call(this,t),this.select=function(){var e=n.renderer(),t={},r=n.nodeFeature(),i=n.linkFeatures();return t.nodes=e.select(r._svgid()),t.links=i.map((function(t){return e.select(t._svgid())})),t},this):new e(t)};r(a,o),i("svg","graph",a),e.exports=a},2878:function(e,t,n){n(5108).svg={rescale:n(8210)},e.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(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(2531).d3,i=n(2738),a=n(6618),s=n(4634);t=t||{},o.call(this,t),i.call(this);var l=this,u=this._init,c=a(),d=0,f=this._update;return this._init=function(e){return u.call(l,e),l},this._build=function(){var e,t,n=l.data()||[],i=l.style(),o=l.renderer(),a=l.position();for(f.call(l),i.fill=function(){return!1},n.forEach((function(t,n){var u,c,d=l.line()(t,n),f={};function p(e){return s.isFunction(e)?function(){return e(d[0],0,t,n)}:e}for(c in i)i.hasOwnProperty(c)&&(f[c]=p(i[c]));e=r.svg.line().x((function(e){return l.featureGcsToDisplay(e).x})).y((function(e){return l.featureGcsToDisplay(e).y})).interpolate(l.style.get("closed")(t,n)&&d.length>2?"linear-closed":"linear"),u={data:[d.map((function(e,r){return a(e,r,t,n)}))],append:"path",attributes:{d:e},id:l._svgid()+n,classes:["svgLineFeature","svgSubLine-"+n],visible:l.visible,style:f},o._drawFeatures(u)})),t=n.length;t<d;t+=1)o._removeFeature(l._svgid()+t);return d=n.length,c.modified(),l.updateTime().modified(),l},this._update=function(){return f.call(l),l.timestamp()>=c.timestamp()&&l._build(),l},this._init(t),this};r(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,i("svg","line",a,s),e.exports=a},2738:function(e,t,n){e.exports=function e(t){"use strict";var r=n(3737),i=n(1946);if(!(this instanceof r))return new e(t);var o="svg-"+i(),a=this._exit,s=this,l=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(),l()),s},this._exit=function(){s.renderer()._removeFeature(s._svgid()),a()},this}},5903:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6565),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),i=n(2531).d3,a=n(2738),s=n(6618);t=t||{},o.call(this,t),a.call(this);var l=this,u=s(),c=this._update,d={style:{}};return this._build=function(){var e,t,n=l.data()||[],o=l.style.get(),a=l.style.get("position");return c.call(l),t=function(e){var t={source:e.source,target:e.target};return i.svg.diagonal()(t)},e=[],n.forEach((function(t,r){var i,o;r<n.length-1&&(i=a(t,r),o=a(n[r+1],r+1),e.push({source:l.featureGcsToDisplay(i),target:l.featureGcsToDisplay(o)}))})),d.data=e,d.attributes={d:t},d.id=l._svgid(),d.append="path",d.classes=["svgPathFeature"],d.style=r.extend({fill:function(){return!1},fillColor:{r:0,g:0,b:0}},o),d.visible=l.visible,l.renderer()._drawFeatures(d),u.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.dataTime().timestamp()>=u.timestamp()&&l._build(),l},this._init(t),this};r(a,o),i("svg","path",a),e.exports=a},3365:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(2738),i=n(6618);t=t||{},o.call(this,t),r.call(this);var a=this,s=this._init,l=this._update,u=i(),c={};return this._init=function(e){return s.call(a,e),a},this._build=function(){var e=a.data(),t=a.style.get(),n=a.renderer(),r=a.position();return l.call(a),e||(e=[]),c.id=a._svgid(),c.data=e,c.append="circle",c.attributes={r:n._convertScale(t.radius),cx:function(e){return a.featureGcsToDisplay(r(e)).x},cy:function(e){return a.featureGcsToDisplay(r(e)).y}},c.style=t,c.classes=["svgPointFeature"],c.visible=a.visible,a.renderer()._drawFeatures(c),u.modified(),a.updateTime().modified(),a},this._update=function(){return l.call(a),a.timestamp()>=u.timestamp()&&a._build(),a},this._init(t),this};r(a,o);var s={};s[o.capabilities.stroke]=!0,i("svg","point",a,s),e.exports=a},2203:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),i=n(2531).d3,a=n(2738);o.call(this,t),a.call(this);var s,l=this,u=this._exit,c=this._init,d=this._update;return this._build=function(){if(this.position()){var e=l.renderer(),t=e.layer().map();s=l._generateQuads();var n=[];r.each(s.clrQuads,(function(e,t){n.push({type:"clr",quad:t,zIndex:t.pos[2]})})),r.each(s.imgQuads,(function(e,t){t.image&&n.push({type:"img",quad:t,zIndex:t.pos[2]})}));var o={id:l._svgid(),data:n,dataIndex:function(e){return e.quad.quadId},append:function(e){var t=this.namespaceURI,n="clr"===e.type?"polygon":"image";return t?document.createElementNS(t,n):document.createElement(n)},attributes:{fill:function(e){if("clr"===e.type)return i.rgb(255*e.quad.color.r,255*e.quad.color.g,255*e.quad.color.b);1!==e.quad.opacity&&i.select(this).style("opacity",e.quad.opacity)},height:function(e){return"clr"===e.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=t.gcsToDisplay(o,null),o=e.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(e){return"clr"===e.type?void 0:"none"},reference:function(e){return e.quad.reference},stroke:!1,transform:function(n){if("img"===n.type&&n.quad.image&&!n.svgTransform){var r,i,o,a,s=[],l=-1,u=n.quad.image.width,c=n.quad.image.height;for(o=0;o<n.quad.pos.length;o+=3){var d={x:n.quad.pos[o],y:n.quad.pos[o+1],z:n.quad.pos[o+2]};d=t.gcsToDisplay(d,null),d=e.baseToLocal(d),s.push(d)}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)>l&&(l=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]/u)<1e-6&&Math.abs(n.svgTransform[2]/c)<1e-6&&(a=n.svgTransform[0]/u,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(e){return"clr"===e.type?void 0:1},x:function(e){return"clr"===e.type?void 0:0},"xlink:href":function(e){return"clr"!==e.type&&e.quad.image?e.quad.image.src:void 0},y:function(e){return"clr"===e.type?void 0:0}},style:{fillOpacity:function(e){return"clr"===e.type?e.quad.opacity:void 0}},onlyRenderNew:!this.style("previewColor")&&!this.style("previewImage"),sortByZ:!0,visible:l.visible,classes:["svgQuadFeature"]};e._drawFeatures(o),l.buildTime().modified()}},this._update=function(){return d.call(l),(l.buildTime().timestamp()<=l.dataTime().timestamp()||l.buildTime().timestamp()<l.timestamp())&&l._build(),l},this._init=function(){c.call(l,t)},this._exit=function(){u.call(l)},l._init(t),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),e.exports=a},8210:function(e){e.exports="geo_svg_rescale"},2531:function(e,t,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function e(t){"use strict";var r=e.d3,i=n(2738),a=n(4634),s=n(5108),l=n(8210);if(!(this instanceof e))return new e(t);o.call(this,t);var u=this._exit;i.call(this,t),t=t||{};var c=this,d=null,f={},p=null,h=null,m=1,g={dx:0,dy:0,rx:0,ry:0,rotation:0},v={},y={},b=null,x=null;function w(e){return e?b.select(".group-"+e):b.select(".group-"+c._svgid())}function _(){var e=c.layer().map(),t=e.size().width,n=e.size().height;if(!t||!n)throw new Error("Map layer has size 0");c._setWidthHeight(t,n),h=Math.pow(t*t+n*n,.5),p={upperLeft:e.displayToGcs({x:0,y:0},null),lowerRight:e.displayToGcs({x:t,y:n},null),center:e.displayToGcs({x:t/2,y:n/2},null)}}return this._convertColor=function(e,t){return e=a.ensureFunction(e),t=t||function(){return!0},function(){var n="none";return t.apply(c,arguments)&&(n=e.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(e){return e=a.ensureFunction(e),function(){return e.apply(c,arguments)/m}},this._setTransform=function(){if(p||_(),d){var e,t,n,r,i,o,a=c.layer().map(),s=a.gcsToDisplay(p.upperLeft,null),l=a.gcsToDisplay(p.lowerRight,null),u=a.gcsToDisplay(p.center,null),f=w();n=Math.sqrt(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2))/h,r=a.rotation(),i=-c.width()/2,o=-c.height()/2,e=n*i+u.x,t=n*o+u.y,r||(e=Math.round(e),t=Math.round(t));var v="matrix("+[n,0,0,n,e,t].join()+")";r&&(v+=" rotate("+[180*r/Math.PI,-i,-o].join()+")"),f.attr("transform",v),m=n,g.dx=e,g.dy=t,g.rx=i,g.ry=o,g.rotation=r}},this.baseToLocal=function(e){if(e={x:(e.x-g.dx)/m,y:(e.y-g.dy)/m},g.rotation){var t=Math.sin(-g.rotation),n=Math.cos(-g.rotation),r=e.x+g.rx,i=e.y+g.ry;e={x:r*n-i*t-g.rx,y:r*t+i*n-g.ry}}return e},this.localToBase=function(e){if(g.rotation){var t=Math.sin(g.rotation),n=Math.cos(g.rotation),r=e.x+g.rx,i=e.y+g.ry;e={x:r*n-i*t-g.rx,y:r*t+i*n-g.ry}}return e={x:e.x*m+g.dx,y:e.y*m+g.dy}},this._init=function(e){if(!c.canvas()){var t;e.widget=e.widget||!1,(b="d3Parent"in e?r.select(e.d3Parent).append("svg"):r.select(c.layer().node().get(0)).append("svg")).attr("display","block");var n=(x=b.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"),e.widget||(t=e.canvas||b.append("g")),(n=x.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"),d=c.layer().sticky(),b.attr("class",c._svgid()),b.attr("width",c.layer().node().width()),b.attr("height",c.layer().node().height()),e.widget?c.canvas(b):(t.attr("class","group-"+c._svgid()),c.canvas(t))}return c._setTransform(),c},this.api=function(){return e.apiname},this.scaleFactor=function(){return m},this._resize=function(e,t,n,r){return p||_(),b.attr("width",n),b.attr("height",r),c._setTransform(),c._setWidthHeight(n,r),c.layer().geoTrigger(l,{scale:m},!0),c},this._exit=function(){f={},c.canvas().remove(),b.remove(),b=void 0,x.remove(),x=void 0,v={},y={},u()},this._definitions=function(){return x},this._drawFeatures=function(e){return f[e.id]={data:e.data,index:e.dataIndex,style:e.style,visible:e.visible,attributes:e.attributes,classes:e.classes,append:e.append,onlyRenderNew:e.onlyRenderNew,sortByZ:e.sortByZ,parentId:e.parentId},c.__render(e.id,e.parentId)},this.__render=function(e,t){var n;if(void 0===e){for(n in f)f.hasOwnProperty(n)&&c.__render(n);return c}return t?c._renderFeature(e,t):(v[e]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame)),c},this._renderFrame=function(){var e;for(e in y)c.select(e).remove(),x.selectAll("."+e).remove();y={};var t=v;for(e in v={},t)t.hasOwnProperty(e)&&c._renderFeature(e)},this._renderFeature=function(e,t){if(!f[e])return c;var n,r,i=f[e].data,o=f[e].index,a=f[e].style,s=f[e].visible,l=f[e].attributes,u=f[e].classes,d=f[e].append,p=c.select(e,t).data(i,o);return n=p.enter().append(d),p.exit().remove(),function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}(r=f[e].onlyRenderNew?n:p,l),r.attr("class",u.concat([e]).join(" ")),function(e,t){var n,r,i;function o(){return t.fill.apply(c,arguments)?null:"none"}function a(){return t.stroke.apply(c,arguments)?null:"none"}for(n in t)t.hasOwnProperty(n)&&(i=null,r=null,"strokeColor"===n?(r="stroke",i=c._convertColor(t[n],t.stroke)):"stroke"===n&&t[n]&&!t.hasOwnProperty("strokeColor")?(r="stroke",i=a):"strokeWidth"===n?(r="stroke-width",i=c._convertScale(t[n])):"strokeOpacity"===n?(r="stroke-opacity",i=t[n]):"fillColor"===n?(r="fill",i=c._convertColor(t[n],t.fill)):"fill"!==n||t.hasOwnProperty("fillColor")?"fillOpacity"===n?(r="fill-opacity",i=t[n]):"lineCap"===n?(r="stroke-linecap",i=t[n]):"lineJoin"===n?(r="stroke-linejoin",i=t[n]):"miterLimit"===n&&(r="stroke-miterlimit",i=t[n]):(r="fill",i=o),r&&e.style(r,i))}(r,a),s&&r.style("visibility",s()?"visible":"hidden"),n.size()&&f[e].sortByZ&&p.sort((function(e,t){return(e.zIndex||0)-(t.zIndex||0)})),c},this.select=function(e,t){return w(t).selectAll("."+e)},this._removeFeature=function(e){return y[e]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame),delete f[e],v[e]&&delete v[e],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(l,{scale:m},!0)})),this.layer().geoOn(s.resize,(function(e){c._resize(e.x,e.y,e.width,e.height)})),this._init(t),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(e){}return void 0!==a.d3},a.fallback=function(){return null},a.supported(),e.exports=a},21:function(e,t,n){var r=function(){"use strict";var e,t=this,n=this._init,r=this._exit,i=this._update,o=0,a=[];this._drawTile=function(n){if(e){var r=t._tileBounds(n),i=n.index.level||0,s=t._tileOffset(i),l={};l.ul=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.top-s.y},i),0),l.ll=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.bottom-s.y},i),0),l.ur=t.fromLocal(t.fromLevel({x:r.right-s.x,y:r.top-s.y},i),0),l.lr=t.fromLocal(t.fromLevel({x:r.right-s.x,y:r.bottom-s.y},i),0),l.ul.z=l.ll.z=l.ur.z=l.lr.z=i,o+=1,l.id=o,n.quadId=l.id,l.image=n.image,l.reference=n.toString(),a.push(l),e.data(a),e._update(),t.draw()}},this._remove=function(n){if(void 0!==n.quadId&&e){for(var r=0;r<a.length;r+=1)if(a[r].id===n.quadId){a.splice(r,1);break}e.data(a),e._update(),t.draw()}},this._update=function(n){return i.call(t,n),t._addBaseQuadToTiles(e,a),t},this._exit=function(){t.deleteFeature(e),e=null,a=[],r.apply(t,arguments)},this._init=function(){n.apply(t,arguments),(e=t.createFeature("quad",{previewColor:t._options.previewColor,previewImage:t._options.previewImage})).geoTrigger=void 0,e.gcs(t._options.gcs||t.map().gcs()),e.data(a),e._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("svg","tile",r),e.exports=r},1489:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(2738).call(this),this._init(t),this):new e(t)};r(a,o),i("svg","track",a),e.exports=a},1946:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";e.exports=function(){var e,n=[];for(n.length=8,e=0;e<8;e+=1)n[e]=t.charAt(Math.floor(Math.random()*t.length));return n.join("")}},3398:function(e,t,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 e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(2738),i=n(6618),s=n(2531).d3;t=t||{},o.call(this,t),r.call(this);var l=this,u=this._exit,c=this._update,d=i(),f={};function p(e,t,n){return l._svgid()+"_marker_"+t+"_"+n}function h(e,t,n,r,i){var o=l.renderer()._definitions().selectAll("g.marker-group#"+l._svgid()).data(e.length?[1]:[]);o.enter().append("g").attr("id",l._svgid).attr("class","marker-group"),o.exit().remove();var u=e.reduce((function(e,t,n){var o=a[i(t,n)],s=a[r(t,n)];return o&&e.push({data:t,dataIndex:n,head:!0}),s&&e.push({data:t,dataIndex:n,head:!1}),e}),[]),c=o.selectAll("marker.geo-vector-marker").data(u);c.enter().append("marker").append("path");var d=l.renderer();c.each((function(e){var t=s.select(this),n=e.head?a[i(e.data,e.dataIndex)]:a[r(e.data,e.dataIndex)];Object.keys(n.attrs).forEach((function(e){t.attr(e,n.attrs[e])}))})).attr("id",(function(e){return p(e.data,e.dataIndex,e.head?"head":"tail")})).style("stroke",(function(e){return d._convertColor(t)(e.data,e.dataIndex)})).style("fill",(function(e){return d._convertColor(t)(e.data,e.dataIndex)})).style("opacity",(function(e){return n(e.data,e.dataIndex)})).select("path").attr("d",(function(e){return e.head?a[i(e.data,e.dataIndex)].path:a[r(e.data,e.dataIndex)].path})),c.exit().remove()}return this._build=function(){var e,t=l.data(),n=l.style.get(),r=l.renderer(),i=l.origin(),o=l.delta(),a=l.style("scale"),s=0;function u(){return a/r.scaleFactor()}return c.call(l),t||(t=[]),e=t.map((function(e,t){var n=l.featureGcsToDisplay(i(e,t)),r=o(e,t);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=l._svgid(),f.data=t,f.append="line",f.attributes={x1:function(t,n){return e[n].x1},y1:function(t,n){return e[n].y1},x2:function(t,n){return e[n].x1+u()*e[n].dx},y2:function(t,n){return e[n].y1+u()*e[n].dy},"marker-start":function(e,t){return"url(#"+p(0,t,"tail")+")"},"marker-end":function(e,t){return"url(#"+p(0,t,"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=l.visible,h(t,n.strokeColor,n.strokeOpacity,n.originStyle,n.endStyle),l.renderer()._drawFeatures(f),d.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.timestamp()>=d.timestamp()?l._build():h(f.data,f.style.strokeColor,f.style.strokeOpacity,f.style.originStyle,f.style.endStyle),l},this._exit=function(){u.call(l),f={},h([],null,null,null,null)},this._init(t),this};s.markerConfigs=a,r(s,o),i("svg","vector",s),e.exports=s},9757:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=this,a=this._init;return this.featureType="text",this.position=function(e){return void 0===e?o.style("position"):(e!==o.style("position")&&(o.style("position",e),o.dataTime().modified(),o.modified()),o)},this.text=function(e){return void 0===e?o.style("text"):(e!==o.style("text")&&(o.style("text",e),o.dataTime().modified(),o.modified()),o)},this._init=function(e){e=e||{},a.call(o,e);var t=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(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},text:function(e){return e.text}},void 0===e.style?{}:e.style);void 0!==e.position&&(t.position=e.position),void 0!==e.text&&(t.text=e.text),o.style(t),t.position&&o.position(t.position),t.text&&o.text(t.text),o.dataTime().modified()},this._init(t),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(e,t){"use strict";return(t=t||{}).type="text",i.create(e,t)},o.capabilities={feature:"text"},r(o,i),e.exports=o},8418:function(e,t,n){var r=n(5638);e.exports=function e(t){if(!(this instanceof e))return new e(t);this._index=t.index,this._size=t.size,this._overlap=t.overlap||{x:0,y:0},this._wrap=t.wrap||{x:1,y:1},this._url=t.url,this._fetched=!1,this._queue=t.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(e,t){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(e).fail(t):this.then(e,t),this},this.catch=function(e){return this.then(void 0,e),this},this.toString=function(){return[this._index.level||0,this._index.y,this._index.x,this._index.reference||0].join("_")},this.bounds=function(e,t){var n,r,i,o;return r=(n=this.size.x*(this.index.x-e.x)-this.overlap.x-t.x)+this.size.x+2*this.overlap.x,i=(o=this.size.y*(this.index.y-e.y)-this.overlap.y-t.y)+this.size.y+2*this.overlap.y,this.overlap.x&&this.index.x===e.x&&(n+=this.overlap.x),this.overlap.y&&this.index.y===e.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(e){return r.noop(e),this}}},6244:function(e){e.exports=function e(t){return this instanceof e?(t=t||{},this._size=t.size||64,Object.defineProperty(this,"size",{get:function(){return this._size},set:function(e){for(;this._atime.length>e;)this.remove(this._atime[this._atime.length-1]);this._size=e}}),Object.defineProperty(this,"length",{get:function(){return this._atime.length}}),this._access=function(e){return this._atime.indexOf(e)},this.remove=function(e){var t="string"==typeof e?e:e.toString();return t in this._cache&&(this._atime.splice(this._access(t),1),delete this._cache[t],!0)},this.clear=function(){return this._cache={},this._atime=[],this},this.get=function(e,t){return(e="string"==typeof e?e:e.toString())in this._cache?(t||(this._atime.splice(this._access(e),1),this._atime.unshift(e)),this._cache[e]):null},this.add=function(e,t,n){this.remove(e);var r=e.toString();this._cache[r]=e,this._atime.unshift(r),n||this.purge(t)},this.purge=function(e){for(var t;this._atime.length>this.size;){t=this._atime.pop();var n=this._cache[t];e&&e(n),delete this._cache[t]}},this.clear(),this):new e(t)}},1940:function(e,t,n){var r=n(5699),i=n(3715);function o(e,t){return(e%t+t)%t}function a(e){var t,n=/\$?\{(s|S|[sS]:[^{}]+|[^-{}]-[^-{}]|([^,{}]+,)+[^,{}]+)\}/,r=e.replace(new RegExp(n,"g"),"{s}").replace(/\$?\{[xX]\}/g,"{x}").replace(/\$?\{[yY]\}/g,"{y}").replace(/\$?\{[zZ]\}/g,"{z}"),i=e.match(n);if(i)if(i[2])t=i[1].split(",");else if(":"===i[1][1])t=i[1].substr(2).split("");else if("-"===i[1][1]){t=[];for(var a=i[1].charCodeAt(0),s=i[1].charCodeAt(2),l=Math.min(a,s);l<=Math.max(a,s);l+=1)t.push(String.fromCharCode(l))}return function(e,n,i,a){return r.replace(/\{s\}/g,function(e,t,n,r){return r[o(e+t+n,r.length)]}(e,n,i,t||a)).replace(/\{x\}/g,e).replace(/\{y\}/g,n).replace(/\{z\}/g,i)}}var s=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var r=n(5638),s=n(5108),l=n(6853),u=n(6244),c=n(3705),d=n(4647).adjustLayerForRenderer,f=n(8418);if((t=r.extend(!0,{},this.constructor.defaults,t||{})).cacheSize||(t.cacheSize=t.keepLower?600:200),"string"===r.type(t.subdomains)&&(t.subdomains=t.subdomains.split("")),t.baseUrl){var p=t.baseUrl;p&&"/"!==p.charAt(p.length-1)&&(p+="/"),t.url=p+"{z}/{x}/{y}."+(t.imageFormat||"png")}t.originalUrl=t.url,"string"===r.type(t.url)&&(t.url=a(t.url));var h,m,g,v=this._init,y=this._exit,b=this.visible,x=t.queueSize||6,w=t.initialQueueSize||0,_=[],S={},C=[],A=this;this._options=r.extend(!0,{},t),this.attribution(t.attribution),this._activeTiles={},this._tileTree={},this._cache=u({size:t.cacheSize}),this._queue=t.queue||c({size:x,initialSize:w,track:t.cacheSize,needed:function(e){return this._tileLayers&&this._tileLayers.length?this._tileLayers.some((function(t){return e===t.cache.get(e.toString(),!0)})):e===A.cache.get(e.toString(),!0)}}),this._queue._tileLayers=this._queue._tileLayers||[],this._queue._tileLayers.push(A);var T={};return Object.defineProperty(this,"options",{get:function(){return r.extend({},A._options)}}),Object.defineProperty(this,"cache",{get:function(){return A._cache}}),Object.defineProperty(this,"activeTiles",{get:function(){return r.extend({},A._activeTiles)}}),Object.defineProperty(this,"queue",{get:function(){return A._queue},set:function(e){A._queue!==e&&(this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(A)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(A),1),A._queue=e,A._queue._tileLayers=A._queue._tileLayers||[],A._queue._tileLayers.push(A))}}),Object.defineProperty(this,"queueSize",{get:function(){return x},set:function(e){x=e,A._queue.size=e}}),Object.defineProperty(this,"initialQueueSize",{get:function(){return w},set:function(e){w=e||0,A._queue.initialSize=e||x}}),Object.defineProperty(this,"reference",{get:function(){return A.id()+"_"+(h||0)},set:function(e){h=e},configurable:!0}),this.tilesAtZoom=function(e){if(A._options.tilesAtZoom)return A._options.tilesAtZoom.call(A,e);var t=Math.pow(2,e);return{x:t,y:t}},this.tilesMaxBounds=function(e){return A._options.tilesMaxBounds?A._options.tilesMaxBounds.call(A,e):null},this.tileCropFromBounds=function(e){if(A._options.tilesMaxBounds){var t=e.index.level,n=A._tileBounds(e);return void 0===C[t]&&(C[t]=A.tilesMaxBounds(t)||null),C[t]&&(n.right>C[t].x||n.bottom>C[t].y)?{x:Math.max(0,Math.min(C[t].x,n.right)-n.left),y:Math.max(0,Math.min(C[t].y,n.bottom)-n.top)}:void 0}},this.isValid=function(e){return A._options.minLevel<=e.level&&e.level<=A._options.maxLevel&&(!!(A._options.wrapX||0<=e.x&&e.x<=A.tilesAtZoom(e.level).x-1)&&!!(A._options.wrapY||0<=e.y&&e.y<=A.tilesAtZoom(e.level).y-1))},this._origin=function(e){var t,n=A.toLevel(A.toLocal(A.map().origin()),e),r=A._options;return{index:t={x:Math.floor(n.x/r.tileWidth),y:Math.floor(n.y/r.tileHeight)},offset:{x:n.x-r.tileWidth*t.x,y:n.y-r.tileHeight*t.y}}},this._tileBounds=function(e){var t=A._origin(e.index.level);return e.bounds(t.index,t.offset)},this.tileAtPoint=function(e,t){var n=A._origin(t),r=A.map();e=A.displayToLevel(r.gcsToDisplay(e,null),t),isNaN(e.x)&&(e.x=0),isNaN(e.y)&&(e.y=0);var i=A._tileOffset(t);return i&&(e.x+=i.x,e.y+=i.y),{x:Math.floor(n.index.x+(n.offset.x+e.x)/A._options.tileWidth),y:Math.floor(n.index.y+(n.offset.y+e.y)/A._options.tileHeight)}},this.gcsTileBounds=function(e,t){var n=e.index?e:f({index:e,size:{x:A._options.tileWidth,y:A._options.tileHeight},url:""}),r=A._tileOffset(n.index.level),i=n.bounds({x:0,y:0},r),o=A.map(),a=o.unitsPerPixel(n.index.level),s=[{x:i.left*a,y:A._topDown()*i.top*a},{x:i.right*a,y:A._topDown()*i.bottom*a}];return(t=null===t?o.gcs():void 0===t?o.ingcs():t)!==o.gcs()&&(s=l.transformCoordinates(o.gcs(),t,s)),{left:s[0].x,top:s[0].y,right:s[1].x,bottom:s[1].y}},this._getTile=function(e,t){var n=t||e;return f({index:e,size:{x:A._options.tileWidth,y:A._options.tileHeight},queue:A._queue,url:A._options.url.call(A,n.x,n.y,n.level||0,A._options.subdomains)})},this._getTileCached=function(e,t,n){var r=A.cache.get(A._tileHash(e));return null===r&&(r=A._getTile(e,t),A.cache.add(r,A.remove,n)),r},this._tileHash=function(e){return[e.level||0,e.y,e.x,e.reference||0].join("_")},this._getTileRange=function(e,t){var n=[A.tileAtPoint({x:t.left,y:t.top},e),A.tileAtPoint({x:t.right,y:t.top},e),A.tileAtPoint({x:t.left,y:t.bottom},e),A.tileAtPoint({x:t.right,y:t.bottom},e)];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(e,t,n,i){var a,s,l,u,c,d,f,p,h,m,g,v=[],y=!1,b=A._options.keepLower?A._options.minLevel:Math.min(Math.max(e,A._options.minLevel),A._options.maxLevel);for(e<b&&(e=b),g=b;g<=e&&(c=(f=A._getTileRange(g,t)).start,d=f.end,u=A.tilesAtZoom(g),A._options.wrapX||(c.x=Math.min(Math.max(c.x,0),u.x-1),d.x=Math.min(Math.max(d.x,0),u.x-1),g===b&&A._options.keepLower&&(c.x=0,d.x=u.x-1)),A._options.wrapY||(c.y=Math.min(Math.max(c.y,0),u.y-1),d.y=Math.min(Math.max(d.y,0),u.y-1),g===b&&A._options.keepLower&&(c.y=0,d.y=u.y-1)),!(A._options.gcs&&A._options.gcs!==A.map().gcs()&&g!==b&&(d.x+1-c.x)*(d.y+1-c.y)>A.map().size().width*A.map().size().height/A._options.tileWidth/A._options.tileHeight*16));g+=1)for(a=c.x;a<=d.x;a+=1)for(s=c.y;s<=d.y;s+=1)l={level:g,x:a,y:s,reference:A.reference},p={level:g,x:a,y:s,reference:A.reference},A._options.wrapX&&(p.x=o(p.x,u.x)),A._options.wrapY&&(p.y=o(p.y,u.y)),A.isValid(p)&&(i&&v.length<_.length&&(m=_[v.length],y=y||l.level!==m.level||l.x!==m.x||l.y!==m.y),v.push({index:l,source:p}));if(i){if(!y&&v.length===_.length)return;_.splice(0,_.length),r.each(v,(function(e,t){_.push(t.index)}))}if(n){h={x:(c.x+d.x)/2,y:(c.y+d.y)/2,level:e,bottomLevel:e};for(var x=Math.max(d.x-c.x,d.y-c.y)+1;x>=1;x/=2)h.bottomLevel-=1;v.sort(A._loadMetric(h)),A._queue&&A._queue.batch(!0)}for(A.cache.size<v.length&&(console.log("Increasing cache size to "+v.length),A.cache.size=v.length),a=0;a<v.length;a+=1)v[a]=A._getTileCached(v[a].index,v[a].source,!0);return A.cache.purge(A.remove),v},this.gcs=function(e){if(void 0===e)return A._options.gcs||A.map().gcs();var t=A.gcs();return null===e?delete A._options.gcs:A._options.gcs=e,A.gcs()!==t&&(A.clear(),A.gcsFeatures(A.gcs()),A.modified(),A._update()),A},this.prefetch=function(e,t){var n;return n=A._getTiles(e,t,!0),r.when.apply(r,n.map((function(e){return e.fetch()})))},this._loadMetric=function(e){return function(t,n){var r,i,o,a,s;return t=t.index||t,n=n.index||n,t.level!==n.level?e.bottomLevel&&t.level>=e.bottomLevel!=n.level>=e.bottomLevel?t.level>=e.bottomLevel?-1:1:t.level-n.level:(s=Math.pow(2,t.level-e.level),o=(e.x+.5)*s-.5,a=(e.y+.5)*s-.5,(r=t.x-o)*r+(i=t.y-a)*i-((r=n.x-o)*r+(i=n.y-a)*i))}},this.fromLevel=function(e,t){var n=Math.pow(2,-t);return{x:e.x*n,y:e.y*n}},this.toLevel=function(e,t){var n=Math.pow(2,t);return{x:e.x*n,y:e.y*n}},this.drawTile=function(e){var t=e.toString();A._activeTiles.hasOwnProperty(t)?A._moveToTop(e):A._drawTile(e),A._activeTiles[t]=e},this._drawTile=function(e){if(null!==A.renderer())throw new Error("This draw method is not valid on renderer managed layers.");var t,n=e.index.level,i=r(A._getSubLayer(n)),o=A._tileBounds(e),a=A._options.animationDuration,s=r('<div class="geo-tile-container"/>').attr("tile-reference",e.toString());s.append(e.image),s.css({left:o.left-parseInt(i.attr("offsetx")||0,10)+"px",top:o.top-parseInt(i.attr("offsety")||0,10)+"px"}),(t=A.tileCropFromBounds(e))&&s.addClass("crop").css({width:t.x+"px",height:t.y+"px"}),a>0&&e.fadeIn(a),i.append(s),e.catch((function(){console.warn("Could not load tile at "+e.toString()),A._remove(e)}))},this.remove=function(e){var t=e.toString(),n=A._activeTiles[t];return n instanceof f&&A._remove(n),delete A._activeTiles[t],n},this._remove=function(e){e.image&&(e.image.parentElement?r(e.image.parentElement).remove():console.log("No parent element to remove "+e.toString(),e),r(e.image).remove())},this._moveToTop=function(e){r.noop(e)},this._getViewBounds=function(){var e=A.map(),t=e.zoom(),n=A._options.tileRounding(t),r=Math.pow(2,t-n),i=e.size(),o=A.displayToLevel({x:0,y:0}),a=A.displayToLevel({x:i.width,y:0}),s=A.displayToLevel({x:0,y:i.height}),l=A.displayToLevel({x:i.width,y:i.height});return{level:n,scale:r,left:Math.min(o.x,a.x,s.x,l.x),right:Math.max(o.x,a.x,s.x,l.x),top:Math.min(o.y,a.y,s.y,l.y),bottom:Math.max(o.y,a.y,s.y,l.y)}},this._purge=function(e,t,n){var r,i;if(A._updating)return A;for(i in n||(n=A._getViewBounds()),A._activeTiles)r=A._activeTiles[i],A._canPurge(r,n,e,t)&&A.remove(r);return A},this.clear=function(){var e,t=[];for(e in A._activeTiles)t.push(A.remove(e));return A._tileTree={},_=[],t},this.reset=function(){return A.clear(),A._cache.clear(),A._queue.initialSize=w,A},this.toLocal=function(e,t){var n=A.map(),r=n.unitsPerPixel(void 0===t?n.zoom():t);return{x:e.x/r,y:A._topDown()*e.y/r}},this.fromLocal=function(e,t){var n=A.map(),r=n.unitsPerPixel(void 0===t?n.zoom():t);return{x:e.x*r,y:A._topDown()*e.y*r}},this._topDown=function(){return A._options.topDown?1:-1},this._getSubLayer=function(e){if(A.canvas()){var t=A.canvas().find("div[data-tile-layer="+e.toFixed()+"]").get(0);return t||(t=r('<div class=geo-tile-layer data-tile-layer="'+e.toFixed()+'"/>').get(0),A.canvas().append(t)),t}},this._updateSubLayers=function(e,t){var n=A.canvas(),i=parseInt(n.attr("lastlevel"),10),o=parseInt(n.attr("lastoffsetx")||0,10),a=parseInt(n.attr("lastoffsety")||0,10);if(i===e&&Math.abs(o-t.left)<65536&&Math.abs(a-t.top)<65536)return{x:o,y:a};var s=A.map(),l=A._tileOffset(e),u=parseInt((t.left+t.right-s.size().width)/2+l.x,10),c=parseInt((t.top+t.bottom-s.size().height)/2+l.y,10);return n.find(".geo-tile-layer").each((function(t,n){var i=r(n),o=parseInt(i.data("tileLayer"),10);i.css("transform","scale("+Math.pow(2,e-o)+")");var a=parseInt(u/Math.pow(2,e-o),10),s=parseInt(c/Math.pow(2,e-o),10),l=a-parseInt(i.attr("offsetx")||0,10),d=s-parseInt(i.attr("offsety")||0,10);i.attr({offsetx:a,offsety:s}),i.find(".geo-tile-container").each((function(e,t){r(t).css({left:parseInt(r(t).css("left"),10)-l+"px",top:parseInt(r(t).css("top"),10)-d+"px"})}))})),n.attr({lastoffsetx:u,lastoffsety:c,lastlevel:e}),{x:u,y:c}},this._update=function(e){if(e&&e.event&&(e.event.event===s.zoom||e.event.event===s.rotate))return A;if(!A.visible())return A;var t,n=A.map(),i=n.bounds(void 0,null),o=n.zoom(),a=A._options.tileRounding(o);if(A._updateSubLayers){var l=A._getViewBounds(),u=A._updateSubLayers(a,l)||{x:0,y:0},c=A._tileOffset(a);if(null===A.renderer()){var d=Math.pow(2,o-a),f=n.rotation(),p=-c.x+-(l.left+l.right)/2+u.x,h=-c.y+-(l.bottom+l.top)/2+u.y,g=p+n.size().width/2,v=h+n.size().height/2;A.canvas().css({"transform-origin":-p+"px "+-h+"px"});var y="translate("+g+"px,"+v+"px)scale("+d+")";f&&(y+="rotate("+180*f/Math.PI+"deg)"),A.canvas().css("transform",y)}A.canvas().attr({scale:Math.pow(2,o-a),dx:-c.x+-(l.left+l.right)/2,dy:-c.y+-(l.bottom+l.top)/2,offsetx:u.x,offsety:u.y,rotation:n.rotation()})}if(void 0===(t=A._getTiles(a,i,!0,!0)))return A;if(A._tileTree={},t.forEach((function(e){if(e.fetched())delete S[e.toString()],A.drawTile(e),A._setTileTree(e);else{if(e._queued)(A._queue?A._queue.get(e):-1)>=0&&A._queue.add(e);else e.then((function(){if(!m&&e===A.cache.get(e.toString())){var t=n.zoom(),r=A._options.tileRounding(t),i=A._getViewBounds();A._canPurge(e,i,r)?A.remove(e):(A.drawTile(e),A._setTileTree(e))}})),e._queued=!0;A.addPromise(e),S[e.toString()]=e}})),r.when.apply(r,t).done((function(){var e=A.map().zoom(),t=A._options.tileRounding(e);A._purge(t,!0)})),"all"!==A._options.idleAfter)for(var b in S){var x=S[b];t.indexOf(x)<0&&(A.removePromise(x),delete S[b])}return A},this._setTileTree=function(e){if(!A._options.keepLower){var t=e.index;A._tileTree[t.level]=A._tileTree[t.level]||{},A._tileTree[t.level][t.x]=A._tileTree[t.level][t.x]||{},A._tileTree[t.level][t.x][t.y]=e}},this._getTileTree=function(e){return((A._tileTree[e.level]||{})[e.x]||{})[e.y]||null},this._isCovered=function(e){var t=e.index.level,n=e.index.x,r=e.index.y,i=[];return(i=A._getTileTree({level:t-1,x:Math.floor(n/2),y:Math.floor(r/2)}))?[i]:(i=[A._getTileTree({level:t+1,x:2*n,y:2*r}),A._getTileTree({level:t+1,x:2*n+1,y:2*r}),A._getTileTree({level:t+1,x:2*n,y:2*r+1}),A._getTileTree({level:t+1,x:2*n+1,y:2*r+1})]).every((function(e){return null!==e}))?i:null},this._outOfBounds=function(e,t){var n=A._tileOffset(e.index.level),r=1;return e.index.level!==t.level&&(r=Math.pow(2,(t.level||0)-(e.index.level||0))),(e.bottom-n.y)*r<t.top||(e.left-n.x)*r>t.right||(e.top-n.y)*r>t.bottom||(e.right-n.x)*r<t.left},this._canPurge=function(e,t,n,r){if(A._options.keepLower){if((n=n||0)<e.index.level&&e.index.level!==A._options.minLevel)return!0;if(e.index.level===A._options.minLevel&&!A._options.wrapX&&!A._options.wrapY)return!1}else if((r||A._isCovered(e))&&n!==e.index.level&&(n>=A._options.minLevel||e.index.level!==A._options.minLevel)&&(n<A._options.maxLevel||e.index.level!==A._options.maxLevel))return!0;return!!t&&A._outOfBounds(e,t)},this.displayToLevel=function(e,t){var n,r=A.map(),i=r.zoom(),o=A._options.tileRounding(i),a=r.unitsPerPixel(void 0===t?o:t);if(void 0===e){var s=r.size();e={x:s.width/2,y:s.height/2}}try{n=r.displayToGcs(e,A._options.gcs||null)}catch(e){n={x:0,y:0}}return{x:n.x/a,y:A._topDown()*n.y/a}},this.url=function(e){return void 0===e?A._options.originalUrl:(e===A._options.originalUrl||(A._options.originalUrl=e,"string"===r.type(e)&&(e=a(e)),A._options.url=e,A.reset(),A.map().draw()),A)},this.subdomains=function(e){return void 0===e?A._options.subdomains:(e&&("string"===r.type(e)&&(e=e.indexOf(",")>=0?e.split(","):e.split("")),A._options.subdomains=e,A.reset(),A.map().draw()),A)},this._tileOffset=function(e){return void 0===T[e]&&(T[e]=A._options.tileOffset(e)),T[e]},this.visible=function(e){return void 0===e?b():(A.visible()!==e&&(b(e),e&&A._update()),A)},Object.defineProperty(this,"baseQuad",{get:function(){return A._options.baseQuad},set:function(e){A._options.baseQuad=e,A._update()}}),this._addBaseQuadToTiles=function(e,t){e&&(this.baseQuad!==g&&(g&&t.splice(0,1),(g=this.baseQuad)&&(t.splice(0,0,this.baseQuad),e.cacheUpdate(0)),e.data(t)),e._update())},this._init=function(){var e;if(v.apply(A,arguments),null===A.renderer())for(e=0;e<=A._options.maxLevel;e+=1)A._getSubLayer(e);return A},this._exit=function(){return A.reset(),y.apply(A,arguments),m=!0,this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(A)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(A),1),A},d("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(e){return{x:0,y:0}},tilesMaxBounds:null,topDown:!1,keepLower:!0,idleAfter:"view",tileRounding:Math.round,attribution:"",animationDuration:0},r(s,i),e.exports=s},6618:function(e){var t=0;e.exports=function e(){"use strict";if(!(this instanceof e))return new e;var n=this,r=0;return this.modified=function(){return r=t+=1,n},this.timestamp=function(){return r},this.getMTime=this.timestamp,this}},6223:function(e,t,n){var r=n(5699),i=n(6837),o=n(4647),a=n(4634),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),s=n(6853);t=t||{},i.call(this,t);var l,u,c,d,f,p=this,h={},m={startTime:void 0!==t.startTime?t.startTime:null,endTime:void 0!==t.endTime?t.endTime:null,duration:void 0!==t.duration?t.duration:null,start:0,end:0},g=this.draw,v=this._exit,y=this._init,b=this.modified,x=this.style,w=this._update;return this.featureType="track",this._linePosition=function(e){return function(t,n,r,i){var o=m.timeFunc(t,n,r,i);return"past"===e&&o>=m.start||"current"===e&&o<m.start?m.startPosition[i]:"current"===e&&o>m.end||"future"===e&&o<m.end?m.endPosition[i]:m.positionFunc(t,n,r,i)}},this._headPosition=function(e,t){return m.endPosition[t]},this._headText=function(e,t){return m.text[t]},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(e,t,n){p.dataTime().timestamp()>=p.buildTime().timestamp()&&p._build(),t=null===t?p.layer().map().gcs():void 0===t?p.gcs():t;var r=s({source:p.gcs(),target:t}),i=p.data(),o=[],a=i.map((function(t,n){var r=m.trackFunc(t,n);if(o.push(r),!r.length)return{x:0,y:0,z:0,posidx:-1};var i,a,s,l,u=0,c=r.length-1;if(1===r.length)return{posidx:u,angidx0:u,angidx1:u};if((i=m.timeFunc(r[u],u,t,n))>=e)return{posidx:u,angidx0:u,angidx1:u+1};if((a=m.timeFunc(r[c],c,t,n))<=e)return{posidx:c,angidx0:c-1,angidx1:c};for(;c-u>1;){if(s=Math.floor((c+u)/2),(l=m.timeFunc(r[s],s,t,n))===e)return{posidx:s,angidx0:s-1,angidx1:s+1};l<e?(i=l,u=s):(a=l,c=s)}var d=(e-i)/(a-i);return{posidx0:u,posidx1:c,factor0:1-d,factor1:d,angidx0:u,angidx1:c}}));return a.forEach((function(e,t){var i,a,s;e.posidx<0||(void 0===e.posidx1?i=m.positionFunc(o[t][e.posidx],e.posidx,o[t],t):(a=r.forward(m.positionFunc(o[t][e.posidx0],e.posidx0,o[t],t),!0),s=r.forward(m.positionFunc(o[t][e.posidx1],e.posidx1,o[t],t),!0),i=r.inverse({x:a.x*e.factor0+s.x*e.factor1,y:a.y*e.factor0+s.y*e.factor1,z:(a.z||0)*e.factor0+(s.z||0)*e.factor1},!0)),e.x=i.x,e.y=i.y,e.z=i.z||0,n&&(void 0===e.posidx1&&(a=r.forward(e.angidx0===e.posidx?i:m.positionFunc(o[t][e.angidx0],e.angidx0,o[t],t),!0),s=r.forward(e.angidx1===e.posidx?i:m.positionFunc(o[t][e.angidx1],e.angidx1,o[t],t),!0)),e.angle=Math.atan2(s.y-a.y,s.x-a.x)))})),a},this._build=function(){p.buildTime().modified(),l||(l={past:p.layer().createFeature("line"),future:p.layer().createFeature("line"),current:p.layer().createFeature("line")},p.dependentFeatures([l.past,l.current,l.future]));var e=p.data();m.data=e,m.timeFunc=p.style.get("time"),m.positionFunc=p.style.get("position"),m.trackFunc=p.style.get("track"),m.textFunc=p.style.get("text"),["past","current","future"].forEach((function(t){l[t].style(p.style()).style(p[t+"Style"]()).line(p.style("track")).gcs(p.gcs()).data(e).position(p._linePosition(t))}));var t,n,r={};if(e.forEach((function(e,t){var n,i=m.trackFunc(e,t);i.length&&(n=m.timeFunc(i[0],0,e,t),(void 0===r.start||n<r.start)&&(r.start=n),i.length>1&&(n=m.timeFunc(i[i.length-1],i.length-1,e,t)),(void 0===r.end||n>r.end)&&(r.end=n))})),m.timeExtents=r,p._updateTimeRange(),m.startPosition=p.calculateTimePosition(m.start,null),m.endPosition=p.calculateTimePosition(m.end,null,!0),m.text=e.map((function(e,r){var i=m.textFunc(e,r);return t|=null==i,null==i||""===i?"":(n=!0,m.startPosition[r].posidx<0&&(i=""),i)})),t&&!c){if(!(o.registries.features[p.layer().rendererName()]||{}).marker){var i=o.rendererForFeatures(["marker"]);u=o.createLayer("feature",p.layer().map(),{renderer:i}),p.layer().addChild(u),p.layer().node().append(u.node())}c=(u||p.layer()).createFeature("marker");var a=p.dependentFeatures();a.push(c),p.dependentFeatures(a)}if(n&&!f){if(!(o.registries.features[p.layer().rendererName()]||{}).text){var s=o.rendererForFeatures(["text"]);d=o.createLayer("feature",p.layer().map(),{renderer:s}),p.layer().addChild(d),p.layer().node().append(d.node())}f=(d||p.layer()).createFeature("text");var h=p.dependentFeatures();h.push(f),p.dependentFeatures(h)}if(c){c.headData=m.endPosition,c.style(p.markerStyle()).gcs(p.gcs()).data(e).position(p._headPosition);var g=c.style.get("radius");c.style("radius",(function(e,t){return m.text[t]||m.startPosition[t].posidx<0?0:g(e,t)}))}return f&&(f.headData=m.endPosition,f.style(p.textStyle()).gcs(p.gcs()).data(e).text(p._headText).position(p._headPosition)),p},this._updateTimeAndPosition=function(){l&&(p._updateTimeRange(),m.startPosition=p.calculateTimePosition(m.start,null),m.endPosition=p.calculateTimePosition(m.end,null,!0),l.past.modified(),l.current.modified(),l.future.modified(),c&&c.modified(),f&&f.modified(),p.updateTime().modified(),p.modified())},this._update=function(){return w.call(p),(p.dataTime().timestamp()>=p.buildTime().timestamp()||p.updateTime().timestamp()<=p.timestamp())&&p._build(),p.updateTime().modified(),p},this.draw=function(){var e=g();return l&&(l.past.draw(),l.current.draw(),l.future.draw()),c&&c.draw(),f&&f.draw(),e},this.modified=function(){var e=b();return l&&(l.past.modified(),l.current.modified(),l.future.modified()),c&&c.modified(),f&&f.modified(),e},this.style=function(e,t,n){return"style"===(n=n||"style")?x(e,t):void 0===e?h[n]:"string"==typeof e&&void 0===t?(h[n]||{})[e]:(void 0===h[n]&&(h[n]={}),void 0===t?h[n]=r.extend(!0,h[n],e):h[n][e]=t,p.modified(),p)},this.style.get=x.get,["markerStyle","textStyle","pastStyle","currentStyle","futureStyle"].forEach((function(e){p[e]=function(t,n){return p.style(t,n,e)}})),this.track=function(e){return void 0===e?p.style("track"):(p.style("track",e),p.dataTime().modified(),p.modified(),p)},this.position=function(e){return void 0===e?p.style("position"):(p.style("position",e),p.dataTime().modified(),p.modified(),p)},this.time=function(e){return void 0===e?p.style("time"):(p.style("time",e),p.dataTime().modified(),p.modified(),p)},this.timeRange=function(e){if(void 0===e)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 t=!1;return void 0!==e.startTime&&e.startTime!==m.startTime&&(m.startTime=null===e.startTime?e.startTime:+e.startTime,t=!0),void 0!==e.endTime&&e.endTime!==m.endTime&&(m.endTime=null===e.endTime?e.endTime:+e.endTime,t=!0),void 0!==e.duration&&e.duration!==m.duration&&(m.duration=null===e.duration?e.duration:+e.duration,t=!0),t&&p._updateTimeAndPosition(),p},this.startTime=function(e){return void 0===e?m.startTime:(e!==m.startTime&&(m.startTime=null===e?e:+e,p._updateTimeAndPosition()),p)},this.endTime=function(e){return void 0===e?m.endTime:(e!==m.endTime&&(m.endTime=null===e?e:+e,p._updateTimeAndPosition()),p)},this.duration=function(e){return void 0===e?m.duration:(e!==m.duration&&(m.duration=null===e?e:+e,p._updateTimeAndPosition()),p)},this._mergeSearchResults=function(e,t){return e.extra=e.extra||{},t.forEach((function(t){return t.value.index.forEach((function(n,r){e.index.indexOf(n)<0&&(e.index.push(n),e.found.push(t.value.found[r]),e.where=e.where||{},t.value.extra&&t.value.extra[n]&&(e.extra[n]=t.value.extra[n]),a.isObject(e.extra[n])||(e.extra[n]={value:e.extra[n]}),e.extra[n].where=t.key)}))})),e},this.pointSearch=function(e){var t=l.current.pointSearch(e),n=l.past.pointSearch(e),r=l.future.pointSearch(e),i=c?c.pointSearch(e):{index:[]};return this._mergeSearchResults(t,[{key:"marker",value:i},{key:"past",value:n},{key:"future",value:r}])},this.polygonSearch=function(e,t){var n=l.current.polygonSearch(e,t),r=l.past.polygonSearch(e,t),i=l.future.polygonSearch(e,t),o=c?c.polygonSearch(e,t):{index:[]};return this._mergeSearchResults(n,[{key:"marker",value:o},{key:"past",value:r},{key:"future",value:i}])},this._exit=function(){l&&p.layer()&&(p.layer().deleteFeature(l.past),p.layer().deleteFeature(l.current),p.layer().deleteFeature(l.future)),l=null,(u||p.layer())&&c&&(u||p.layer()).deleteFeature(c),u&&p.layer()&&p.layer().removeChild(u),u=null,(d||p.layer())&&f&&(d||p.layer()).deleteFeature(f),d&&p.layer()&&p.layer().removeChild(d),d=null,p.dependentFeatures([]),v()},this._init=function(e){e=e||{},y.call(p,e);var t=r.extend(!0,{},{track:function(e){return e},position:function(e){return e},time:function(e,t){return void 0!==e.t?e.t:t}},void 0===e.style?{}:e.style),n=r.extend(!0,{},{rotateWithMap:!0,rotation:function(e,t){return-m.endPosition[t].angle||0}},void 0===e.markerStyle?{}:e.markerStyle),i=r.extend(!0,{},{rotateWithMap:!0,rotation:function(e,t){return void 0!==m.endPosition[t].angle?-m.endPosition[t].angle+Math.PI/2:0}},void 0===e.textStyle?{}:e.textStyle),o=r.extend(!0,{},{strokeOpacity:.25},void 0===e.pastStyle?{}:e.pastStyle),a=r.extend(!0,{},{},void 0===e.currentStyle?{}:e.currentStyle),s=r.extend(!0,{},{strokeOpacity:.25},void 0===e.futureStyle?{}:e.futureStyle);["track","position","time"].forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),p.style(t),p.markerStyle(n),p.textStyle(i),p.pastStyle(o),p.currentStyle(a),p.futureStyle(s)},this};r(s,i),e.exports=s},6853:function(e,t,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(e){r.Proj.projections.add(s(e))}));var l={},u=/^(.* |)\\+axis=e(n|s)u(| .*)$/,c=/(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/,d=function e(t){"use strict";if(!(this instanceof e))return(t=t||{}).source in l||(Object.keys(l).length>=10&&(l={}),l[t.source]={}),t.target in l[t.source]||(Object.keys(l[t.source]).length>=10&&(l[t.source]={}),l[t.source][t.target]=new e(t)),l[t.source][t.target];var n,s,u,d,f,p,h,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(e){if(!c.exec(e))return{proj:e};var t,n,r=a.mat4AsArray(),i=[];return e.split(/(\s+)/).forEach((function(e){var t=/^\+(s[1-3][1-3]|[xyz]off)=(.*)$/.exec(e);t?r[g[t[1]]]=parseFloat(t[2]):i.push(e)})),n={proj:i.join(" "),orig:e},(t=o.invert(a.mat4AsArray(),r))?(n.matrix=r,n.inverse=t):console.warn("Affine transform is not invertable and will not be used: "+e),n}function y(){var e=v(m.source()),t=v(m.target()),i=e.proj,o=t.proj;d=e.matrix,f=e.inverse,p=t.matrix,h=t.inverse,n=new r(i,o)}this.source=function(e){return void 0===e?s||"EPSG:4326":(s=e,y(),m)},this.target=function(e){return void 0===e?u||"EPSG:3857":(u=e,y(),m)},this._forward=function(e){if(d){var t=i.transformMat4(a.vec3AsArray(),[e.x,e.y,e.z||0],f);e={x:t[0],y:t[1],z:t[2]}}var r=n.forward(e,!0);if(r.z=e.z||0,p){var o=i.transformMat4(a.vec3AsArray(),[r.x,r.y,r.z],p);r={x:o[0],y:o[1],z:o[2]}}return r},this._inverse=function(e){if(p){var t=i.transformMat4(a.vec3AsArray(),[e.x,e.y,e.z||0],h);e={x:t[0],y:t[1],z:t[2]}}var r=n.inverse(e,!0);if(r.z=e.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.forward=function(e){return Array.isArray(e)?e.map(m._forward):m._forward(e)},this.inverse=function(e){return Array.isArray(e)?e.map(m._inverse):m._inverse(e)},t=t||{};try{this.source(t.source)}catch(e){console.error("Can't use transform source: "+t.source),this.source("EPSG:4326")}try{this.target(t.target)}catch(e){console.error("Can't use transform target: "+t.target),this.target("EPSG:3857")}return this};d.defs=r.defs,d.lookup=function(e){var t,i,o=n(5638),a=o.Deferred();return r.defs.hasOwnProperty(e)?a.resolve(r.defs[e]):2!==(i=e.split(":")).length||"EPSG"!==i[0].toUpperCase()?a.reject("Invalid projection code").promise():(t=i[1],o.ajax({url:"https://epsg.io/?q="+t+"&format=json"}).done((function(t){var n=(t.results||[])[0];return n&&n.proj4?(r.defs(e,n.proj4),o.when(r.defs[e])):a.reject(t).promise()})))},d.transformCoordinates=function(e,t,n,r){"use strict";if(e===t||Array.isArray(n)&&!n.length)return n;if(Array.isArray(n)&&n.length>=3&&3===r&&!a.isObject(n[0])&&!c.test(e)&&!c.test(t))return d.transformCoordinatesFlatArray3(e,t,n);if(Array.isArray(n)&&n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]){var i=e.match(u),o=t.match(u);if(i&&o&&i[1]===o[1]&&i[3]===o[3])return"z"in n[0]?n.map((function(e){return{x:+e.x,y:-e.y,z:+e.z||0}})):n.map((function(e){return{x:+e.x,y:-e.y}}))}var s,l=d({source:e,target:t});return a.isObject(n)&&"x"in n&&"y"in n?(s=l.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=l.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}]):d.transformCoordinatesArray(l,n,r)},d.transformCoordinatesArray=function(e,t,n){var r,i,o,s,l,u,c,d,f,p={};function h(){if(Array.isArray(t[0]))if(2===t[0].length)s=function(e){return+t[e][0]},l=function(e){return+t[e][1]},c=function(e,t,n){d[e]=[t,n]};else{if(3!==t[0].length)throw new Error("Invalid coordinates. Requires two or three components per array");s=function(e){return+t[e][0]},l=function(e){return+t[e][1]},u=function(e){return+t[e][2]},c=function(e,t,n,r){d[e]=[t,n,r]}}else if(2===t.length)o=2,s=function(e){return+t[e*o]},l=function(e){return+t[e*o+1]},c=function(e,t,n){d[e]=t,d[e+1]=n};else if(3===t.length)o=3,s=function(e){return+t[e*o]},l=function(e){return+t[e*o+1]},u=function(e){return+t[e*o+2]},c=function(e,t,n,r){d[e]=t,d[e+1]=n,d[e+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(e){return+t[e]},l=function(e){return+t[e+1]},2===n?c=function(e,t,n){d[e]=t,d[e+1]=n}:(u=function(e){return+t[e+2]},c=function(e,t,n,r){d[e]=t,d[e+1]=n,d[e+2]=r})}}if(u=function(){return 0},!Array.isArray(t))throw new Error("Coordinates are not valid");if((d=[]).length=t.length,i=t.length,!t.length)return d;for(Array.isArray(t[0])||a.isObject(t[0])?(o=1,Array.isArray(t[0])?h():a.isObject(t[0])&&function(){if(!(t[0]&&"x"in t[0]&&"y"in t[0]))throw new Error("Invalid coordinates");s=function(e){return+t[e].x},l=function(e){return+t[e].y},"z"in t[0]?(u=function(e){return+t[e].z},c=function(e,t,n,i){d[r]={x:t,y:n,z:i}}):c=function(e,t,n){d[e]={x:t,y:n}}}()):h(),r=0;r<i;r+=o)p.x=s(r),p.y=l(r),p.z=u(r),f=e.forward(p,!0),c(r,f.x,f.y,f.z);return d},d.transformCoordinatesFlatArray3=function(e,t,n){"use strict";var i,o=e.match(u),a=t.match(u);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,l=r.Proj(e),c=r.Proj(t),d={},f=new r(l,c);for(i=n.length-3;i>=0;i-=3)d.x=+n[i],d.y=+n[i+1],d.z=+(n[i+2]||0),s=f.forward(d,!0),n[i]=s.x,n[i+1]=s.y,n[i+2]=void 0===s.z?d.z:s.z;return n},d.affineForward=function(e,t){"use strict";var n,r=e.origin,i=e.scale||{x:1,y:1,z:1};for(n=0;n<t.length;n+=1)t[n].x=(t[n].x-r.x)*i.x,t[n].y=(t[n].y-r.y)*i.y,t[n].z=((t[n].z||0)-(r.z||0))*i.z;return t},d.affineInverse=function(e,t){"use strict";var n,r=e.origin,i=e.scale||{x:1,y:1,z:1};for(n=0;n<t.length;n+=1)t[n].x=t[n].x/i.x+r.x,t[n].y=t[n].y/i.y+r.y,t[n].z=(t[n].z||0)/i.z+(r.z||0);return t},d.sphericalDistance=function(e,t,n,i,o){if(i=i||"EPSG:4326",o=o||r.WGS84,(n=n||i)!==i){var a=d.transformCoordinates(n,i,[e,t]);e=a[0],t=a[1]}var s=e.y*Math.PI/180,l=t.y*Math.PI/180,u=(t.x-e.x)*Math.PI/180,c=Math.sin(s),f=Math.cos(s),p=Math.sin(l),h=Math.cos(l),m=Math.atan2(Math.pow(Math.pow(h*Math.sin(u),2)+Math.pow(f*p-c*h*Math.cos(u),2),.5),c*p+f*h*Math.cos(u));return o.a*m},d.vincentyDistance=function(e,t,n,i,o,a){if(i=i||"EPSG:4326",o=o||r.WGS84,a=a||100,(n=n||i)!==i){var s=d.transformCoordinates(n,i,[e,t]);e=s[0],t=s[1]}var l,u,c,f,p,h,m,g,v,y,b=o.a,x=o.b||o.a*(1-(o.f||1/o.rf)),w=o.f||(o.rf?1/o.rf:1-x/b),_=e.y*Math.PI/180,S=t.y*Math.PI/180,C=((t.x-e.x)%360+360)%360*Math.PI/180,A=Math.atan((1-w)*Math.tan(_)),T=Math.atan((1-w)*Math.tan(S)),P=Math.sin(A),E=Math.cos(A),O=Math.sin(T),M=Math.cos(T),D=C,k=C+2*Math.PI;if(_===S&&!C)return{distance:0,alpha1:0,alpha2:0};for(y=a;y>0&&Math.abs(D-k)>1e-12;y-=1)l=Math.pow(Math.pow(M*Math.sin(D),2)+Math.pow(E*O-P*M*Math.cos(D),2),.5),u=P*O+E*M*Math.cos(D),c=Math.atan2(l,u),f=E*M*Math.sin(D)/l,k=D,D=C+(1-(m=w/16*(p=1-Math.pow(f,2))*(4+w*(4-3*p))))*w*f*(c+m*l*((h=u-(p?2*P*O/p:0))+m*u*(2*Math.pow(h,2)-1)));return y?{distance:x*(1+(g=p*(b*b-x*x)/(x*x))/16384*(4096+g*(g*(320-175*g)-768)))*(c-(v=g/1024*(256+g*(g*(74-47*g)-128)))*l*(h+v/4*(u*(2*Math.pow(h,2)-1)-v/6*h*(4*l*l-3)*(4*Math.pow(h,2)-3)))),alpha1:Math.atan2(M*Math.sin(D),E*O-P*M*Math.cos(D)),alpha2:Math.atan2(E*Math.sin(D),-P*M+E*O*Math.cos(D))}:void 0},d.proj4=r,e.exports=d},3762:function(e){e.exports={}},9219:function(e,t,n){var r=n(2531).d3,i=n(9450),o=n(5699),a=n(4647).registerWidget,s=n(4634),l=n(1946);n(2352);var u=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var n=this,o=[],a=t.width||300,u=t.ticks||6,d=this._init;return this._init=function(){d();var e=n.canvas();r.select(e).attr("class","color-legend-container"),n.popup=r.select(e).append("div").attr("class","color-legend-popup"),t.categories&&n.categories(t.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 e=r.select(n.canvas()).append("div").attr("class","geojs-color-legends"),t=a;o.forEach((function(r,i){var o=e.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:t,height:"40px",viewBox:"-20 0 "+t+" 40"});"discrete"===r.type?n._drawDiscrete(a,t-40,r):"continuous"===r.type&&n._drawContinous(a,t-40,r)}))}else r.select(n.canvas()).style("display","none")},this.categories=function(e){return void 0===e?o:(o=n._prepareCategories(e),n._draw(),n)},this.addCategories=function(e){return o=o.concat(n._prepareCategories(e)),n._draw(),n},this.removeCategories=function(e){return o=o.filter((function(t){return-1===e.indexOf(t)})),n._draw(),n},this._prepareCategories=function(e){return e.forEach((function(e){e.color=e.colors.map((function(e){return s.convertColorToHex(e,!0)}))})),e},this._drawDiscrete=function(e,t,i){if(-1===["linear","log","sqrt","pow","quantile","ordinal"].indexOf(i.scale))throw new Error("unsupported scale");var o,a,l,d,f,p,h;if("ordinal"===i.scale)l=r.scale.ordinal().domain(i.domain).range(i.colors),n._renderDiscreteColors(e,i.domain,l,t,(function(e){return e})),d=r.scale.ordinal().domain(i.domain).rangeRoundBands([0,t]),f=r.svg.axis().scale(d).tickValues((function(){var e=Math.ceil(i.domain.length/u);return i.domain.filter((function(t,n){return n%e==0}))}));else if("quantile"===i.scale){o=[0,i.colors.length],p=s.range(0,i.colors.length-1),a=r.scale.quantile().domain(i.domain).range(p),l=r.scale.quantize().domain(o).range(i.colors),n._renderDiscreteColors(e,p,l,t,(function(e){return a.invertExtent(e).join(" - ")}));var m=[a.invertExtent(0)[0]];m=m.concat(p.map((function(e){return a.invertExtent(e)[1]}))),f=v(d=r.scale.ordinal().domain(m).rangePoints([0,t]))}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(),l=r.scale.quantize().domain(o).range(i.colors),p=s.range(0,i.colors.length-1);var g=Math.max.apply(null,i.domain.map((function(e){return c(e)})));n._renderDiscreteColors(e,p,l,t,(function(e){return n._popupFormatter(a.invert(e),g)+" - "+n._popupFormatter(a.invert(e+1),g)})),(h=p.slice()).push(i.colors.length),f=v(d=r.scale.ordinal().domain(h.map((function(e){return a.invert(e)}))).rangePoints([0,t]))}function v(e){return r.svg.axis().scale(e).tickFormat(r.format(".2s")).tickValues((function(){var t=Math.ceil(e.domain().length/u);return e.domain().filter((function(e,n){return n%t==0}))}))}i.endAxisLabelOnly&&f.tickValues([d.domain()[0],d.domain()[d.domain().length-1]]),n._renderAxis(e,f)},this._renderDiscreteColors=function(e,t,r,i,o){e.selectAll("rect").data(t).enter().append("rect").attr("width",i/t.length).attr("height","20px").attr("fill",(function(e){return r(e)})).attr("transform",(function(e,n){return"translate("+n*i/t.length+" ,0)"})).on("mousemove",(function(e){n._showPopup(o(e))})).on("mouseout",n._hidePopup)},this._drawContinous=function(e,t,i){var o,a,s;if(-1===["linear","log","sqrt","pow"].indexOf(i.scale))throw new Error("unsupported scale");var d=[0];for(s=1;s<i.domain.length-1;s++)d.push(t/(i.domain.length-1)*s);d.push(t),o=r.scale[i.scale]().domain(i.domain).range(d).nice(),"log"===i.scale&&i.base&&o.base(i.base),"pow"===i.scale&&i.exponent&&o.exponent(i.exponent);var f=l(),p=Math.max.apply(null,i.domain.map((function(e){return c(e)}))),h=e.append("defs").append("linearGradient").attr("id","gradient"+f);for(h.append("stop").attr("offset","0%").attr("stop-color",i.colors[0]),s=1;s<i.colors.length-1;s++)h.append("stop").attr("offset",(100/(i.colors.length-1)*s).toFixed(6)+"%").attr("stop-color",i.colors[s]);h.append("stop").attr("offset","100%").attr("stop-color",i.colors[i.colors.length-1]),e.append("rect").attr("fill","url(#gradient"+f+")").attr("width",t).attr("height","20px").on("mousemove",(function(){var e=o.invert(r.mouse(this)[0]),t=n._popupFormatter(e,p);n._showPopup(t)})).on("mouseout",n._hidePopup),a=r.svg.axis().scale(o).ticks(u,".2s"),i.endAxisLabelOnly&&a.tickValues([i.domain[0],i.domain[i.domain.length-1]]),n._renderAxis(e,a)},this._renderAxis=function(e,t){e.append("g").attr("class","axis x").attr("transform","translate(0, 20)").call((function(e){e.call(t)}))},this._popupFormatter=function(e,t){return e=parseFloat(e.toFixed(8)),t=Math.min(t,c(e)),t=Math.min(t,Math.max(3,7-Math.trunc(e).toString().length)),r.format("."+t+"f")(e)},this._showPopup=function(e){var t=r.mouse(n.canvas());n.popup.text(e);var i=n.canvas().clientWidth,o=n.popup[0][0].clientWidth;n.popup.style({left:t[0]-(t[0]+o-i>-10?o:0)+"px",top:t[1]-22+"px"}).transition().duration(200).style("opacity",1)},this._hidePopup=function(){n.popup.transition().duration(200).style("opacity",0)},this};function c(e){if(!isFinite(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;){if(!isFinite(e*t))return 0;t*=10,n++}return n}o(u,i),a("dom","colorLegend",u),e.exports=u},9450:function(e,t,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var n=this;return this._init=function(){return t.hasOwnProperty("parent")&&t.parent.addChild(n),n._createCanvas(),n._appendCanvasToParent(),n.canvas().addEventListener("mousedown",(function(e){e.stopPropagation()})),n.reposition(),n},this._createCanvas=function(){n.canvas(document.createElement(t.el||"div"))},this};i(a,r),o("dom","dom",a),e.exports=a},253:function(e,t,n){e.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(e,t,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var i=n(2531).d3,o=n(5108),a=this,s=[],l=null,u=null,c=null;this.categories=function(e){return void 0===e?s.slice():(s=e.slice().map((function(e){return"line"===e.type&&(e.style.fill=!1,e.style.stroke=!0),e})),a.draw(),a)},this.size=function(){var e,t=1,n=i.select(a.canvas()).append("text").style("opacity",1e-6);return s.forEach((function(e){n.text(e.name),t=Math.max(t,n.node().getBBox().width)})),n.remove(),e=20*(s.length+1),{width:t+50,height:e}},this.draw=function(){function e(e){e.style("fill",(function(e){return e.style.fill||void 0===e.style.fill?e.style.fillColor:"none"})).style("fill-opacity",(function(e){return void 0===e.style.fillOpacity?1:e.style.fillOpacity})).style("stroke",(function(e){return e.style.stroke||void 0===e.style.stroke?e.style.strokeColor:"none"})).style("stroke-opacity",(function(e){return void 0===e.style.strokeOpacity?1:e.style.strokeOpacity})).style("stroke-width",(function(e){return void 0===e.style.strokeWidth?1.5:e.style.strokeWidth}))}a._init(),c.attr("height",a.size().height+24).style("display",null);var t=a._scale(),n=u.selectAll("g.geo-label").data(s,(function(e){return e.name})).enter().append("g").attr("class","geo-label").attr("transform",(function(e,n){return"translate(0,"+t.y(n)+")"}));return e(n.filter((function(e){return"point"!==e.type&&"line"!==e.type})).append("rect").attr("x",0).attr("y",-6).attr("rx",5).attr("ry",5).attr("width",40).attr("height",12)),e(n.filter((function(e){return"point"===e.type})).append("circle").attr("cx",20).attr("cy",0).attr("r",6)),e(n.filter((function(e){return"line"===e.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(e){return e.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(){l||(a._createCanvas(),a._appendCanvasToParent());var e=a.size().width+24+4,t=a.size().height+24+4;l&&l.remove(),i.select(a.canvas()).attr("width",e).attr("height",t),l=i.select(a.canvas()).append("g"),u=l.append("g").attr("transform","translate("+[14,14]+")"),c=u.append("rect").attr("x",-12).attr("y",-12).attr("width",e-4).attr("height",t-4).attr("rx",3).attr("ry",3).style({stroke:"black","stroke-width":"1.5px",fill:"white","fill-opacity":.75,display:"none"}),u.on("mousedown",(function(){i.event.stopPropagation()})),u.on("mouseover",(function(){c.transition().duration(250).style("fill-opacity",1)})),u.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),e.exports=a},3362:function(e,t,n){var r=n(5638),i=n(5699),o=n(9731),a=n(4647).registerWidget;n(4129);var s=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t);var i=n(5108),a=n(6853),s=n(4634),l=n(2531).d3,u=this,c=this._exit,d=r.extend({},{scale:1,maxWidth:200,maxHeight:"left"===t.orientation||"right"===t.orientation?200:20,orientation:"bottom",strokeWidth:2,tickLength:10,units:"si",distance:function(e,t,n){return"+proj=longlat +axis=enu"===n?Math.sqrt(s.distance2dSquared(e,t)):a.sphericalDistance(e,t,n)}},t);this._init=function(){return u._createCanvas(),u._appendCanvasToParent(),u.reposition(),l.select(u.canvas()).attr({width:d.maxWidth,height:d.maxHeight}),u.geoOn(i.pan,u._update),u._render(),u},this._exit=function(){u.geoOff(i.pan,u._update),c()},this._vertical=function(){return"left"===d.orientation||"right"===d.orientation},this._scaleValue=function(t,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}],l=(r=e.unitsTable[r]||r||e.unitsTable[d.units]||d.units)[0];return r.forEach((function(e){t>=e.scale*(e.minimum||1)&&(l=e)})),o=Math.floor(Math.log(t/l.scale)/Math.log(l.basis||10)),(s=l.multiples||s).forEach((function(e){var n=l.scale*e.multiple*Math.pow(10,o);n<=t&&(i=e,a=n)})),{html:(i.multiple*Math.pow(10,o)).toFixed(Math.max(0,-o+i.digits-1))+" "+l.unit,value:a,pixels:a/t*n,power:o,multiple:i,unitRecord:l,originalValue:t,originalPixels:n}},this._render=function(){var e,t,n,i,o,a,s=l.select(u.canvas()),c=u.layer().map(),f=d.maxWidth,p=d.maxHeight,h=d.strokeWidth,m=.5*h,g=d.tickLength,v=u._vertical();if(e=(v?d.maxHeight:d.maxWidth)-h,n={x:(t={x:(t=r(s[0][0]).offset()).left+("left"===d.orientation?f-m:m),y:t.top+("top"===d.orientation?p-m:m)}).x+(v?0:e),y:t.y+(v?e:0)},(i=d.distance(c.displayToGcs(t,null),c.displayToGcs(n,null),c.gcs())*d.scale)<=0||!isFinite(i))console.warn("The distance calculated for the scale is invalid: "+i);else{switch(o=u._scaleValue(i,e),v?p=o.pixels+h:f=o.pixels+h,s.attr({width:f,height:p}),s.select("polyline").empty()&&s.append("polyline").classed("geojs-scale-widget-bar",!0).attr({fill:"none","stroke-width":h}),s.select("text").empty()&&s.append("text").classed("geojs-scale-widget-text",!0),d.orientation){case"bottom":a=[[m,g],[m,m],[f-m,m],[f-m,g]],s.select("text").attr({x:f/2,y:2*h,"text-anchor":"middle","dominant-baseline":"hanging"});break;case"top":a=[[m,p-g],[m,p-m],[f-m,p-m],[f-m,p-g]],s.select("text").attr({x:f/2,y:p-2*h,"text-anchor":"middle","dominant-baseline":"alphabetic"});break;case"left":a=[[f-g,m],[f-m,m],[f-m,p-m],[f-g,p-m]],s.select("text").attr({x:f-2*h,y:p/2,"text-anchor":"end","dominant-baseline":"middle"});break;case"right":a=[[g,m],[m,m],[m,p-m],[g,p-m]],s.select("text").attr({x:2*h,y:p/2,"text-anchor":"start","dominant-baseline":"middle"})}s.select("polyline").attr("points",a.map((function(e){return e.join(",")})).join(" ")),s.select("text").html(o.html)}},this._update=function(){u._render()},this.options=function(e,t){if(void 0===e){var n=r.extend({},d);return n.position=u.position(void 0,!0),n}return"string"==typeof e&&void 0===t?"position"===e?u.position(void 0,!0):d[e]:(void 0===t?d=r.extend(!0,d,e):d[e]=t,(e.position||"position"===e)&&u.position(e.position||t),u._render(),u)}};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(e,t,n,r){if(null!=e){if(!Array.isArray(t)){if(!(n=n||s.unitsTable)||!n[t||"si"])return;t=n[t||"si"]}var i;for(i=0;i<t.length-1&&!(e<t[i+1].scale);i+=1);if(e/=(t=t[i]).scale,!((r=Math.max(0,-Math.ceil(Math.log10(e))+(void 0===r||r<0?3:r)))>10)){var o=e.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+" "+t.unit}}},a("dom","scale",s),e.exports=s},7093:function(e,t,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var i,o,a,s,l,u,c,d=n(2531).d3,f=n(5108),p=this,h=this._exit,m=t.width||20,g=t.height||160,v=t.width?.5*t.width:10;function y(e,t,n,r,i){var o=t.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",e).attr("class","geo-glyphicon"),o}c={white:"#f4f4f4",black:"#505050"},this.size=function(){return{width:m,height:g}},this._init=function(){p._createCanvas(),p._appendCanvasToParent(),p.reposition();var e=d.select(p.canvas()),t=p.layer().map();function n(n,r){var i=o.invert(d.mouse(e.node())[1]),a=t.zoomRange();i=(1-i)*(a.max-a.min)+a.min,r?t.transition({zoom:i,ease:d.ease("cubic-in-out"),duration:500,done:p._update()}):(t.zoom(i),p._update()),n.stopPropagation()}function r(){d.select(this).attr("filter",null),u.selectAll("circle,rect,path").transition().duration(100).style("fill",(function(e){return c[e.fill]||null})).style("stroke",(function(e){return c[e.stroke]||null}))}return e.attr("width",m).attr("height",g),i=d.scale.linear().domain([-4,4]).range([0,m]),o=d.scale.linear().domain([0,1]).range([1.5*m,g-1.5*m]),e=e.append("g").classed("geo-ui-slider",!0),u=e,(a=e.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 e=t.zoom();t.transition({zoom:e+1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.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=e.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 e=t.zoom();t.transition({zoom:e-1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.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}),e.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(d.event,!0)})),l=e.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(){d.select(document).on("mousemove.geo.slider",(function(){n(d.event)})),d.select(document).on("mouseup.geo.slider",(function(){n(d.event),d.select(document).on(".geo.slider",null)})),d.event.stopPropagation()})),u.selectAll("*").on("mouseover",(function(){d.select(this).attr("filter","url(#geo-highlight)"),u.selectAll("rect,path,circle").transition().duration(100).style("fill",(function(e){return e.fill||null})).style("stroke",(function(e){return e.stroke||null}))})).on("mouseout",r),p.geoOn(f.zoom,p._update),r(),p._update(),p},this._exit=function(){p.geoOff(f.zoom,p._update),u.remove(),h()},this._update=function(e){var t=p.layer().map(),n=t.zoomRange(),r=t.zoom(),i=d.scale.linear();r=(e=e||{}).value||r,i.domain([n.min,n.max]).range([1,0]).clamp(!0),l.attr("y",o(i(r))-v/2)}};i(a,r),o("dom","slider",a),e.exports=a},9731:function(e,t,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var i=n(2531),o=this,a=this._exit,s=null;return this._init=function(){var e;return t.hasOwnProperty("parent")&&(t.parent.addChild(o),e=t.parent.canvas()),o._createCanvas(e),o.canvas().addEventListener("mousedown",(function(e){e.stopPropagation()})),o.reposition(),o},this._exit=function(){s&&s._exit(),a()},this._createCanvas=function(e){var t={layer:o.layer(),widget:!0};e&&(t.d3Parent=e),(s=i(t))._resize=function(){},o.canvas(s.canvas()[0][0])},this};i(a,r),o("dom","svg",a),e.exports=a},6408:function(e,t,n){var r=n(5699),i=n(4647).registerLayer,o=n(9105),a=function e(t){"use strict";var r=n(4647).createWidget;if(t.renderer="dom",t.sticky=!1,!(this instanceof e))return new e(t);o.call(this,t);var i=this,a=this._exit;this.createWidget=function(e,t){var n=r(e,i,t);return t&&"parent"in t||i.addChild(n),n._init(t),i.modified(),n},this.deleteWidget=function(e){return e._exit(),i.removeChild(e),i.modified(),i},this._exit=function(){i.children().forEach((function(e){i.deleteWidget(e)})),a()}};r(a,o),i("ui",a),e.exports=a},8123:function(e,t,n){var r=n(5699),i=n(5358),o=n(5638),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5108),a=this,s=this._exit,l=t.layer,u=null,c=void 0===t.position?{left:0,top:0}:t.position;if(!(void 0===t.parent||t.parent instanceof e))throw new Error("Parent must be of type geo.gui.widget");t.parent&&a.parent(t.parent),this._init=function(){return a.modified(),a},this._exit=function(){if(a.children().forEach((function(e){a.removeChild(e),e._exit()})),a.layer().geoOff(r.pan,a.repositionEvent),a.parentCanvas().removeChild&&a.canvas())try{a.parentCanvas().removeChild(a.canvas())}catch(e){}s()},this.layer=function(){return l||a.parent()&&a.parent().layer()},this._createCanvas=function(){throw new Error("Must be defined in derived classes")},this.canvas=function(e){return void 0===e?u:(u=e,a)},this._appendCanvasToParent=function(){a.parentCanvas().appendChild(a.canvas())},this.parentCanvas=function(){return a.parent()?a.parent().canvas():a.layer().canvas()},this.position=function(e,t){if(void 0!==e){a.layer().geoOff(r.pan,a.repositionEvent);var n={};for(var i in c)c.hasOwnProperty(i)&&(n[i]=null);return(c=e).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")&&!t){var s=a.layer().map().gcsToDisplay(c);return{left:s.x,top:s.y,right:null,bottom:null}}return c},this.reposition=function(e){if(e=e||a.position(),a.canvas()&&a.canvas().style)for(var t in a.canvas().style.position="absolute",e)e.hasOwnProperty(t)&&(/^\s*(-|\+)?(\d+(\.\d*)?|\d*\.\d+)([eE](-|\+)?\d+)?\s*$/.test(e[t])?a.canvas().style[t]=parseFloat(parseFloat(e[t]).toFixed(3))+"px":a.canvas().style[t]=e[t]);return a},this.repositionEvent=function(){return a.reposition()},this.isInViewport=function(){var e=a.position(),t=a.layer();return e.left>=0&&e.top>=0&&e.left<=t.width()&&e.top<=t.height()},c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&this.layer().geoOn(r.pan,a.repositionEvent)};r(a,i),e.exports=a},9808:function(e,t,n){var r=n(5638);function i(e,t,n){this._group=e,this._zoom=t,this._points=[],this._clusters=[],this._count=0,this._parent=null,this._coord=null;var r=this;(n||[]).forEach((function(e){r._add(e)}))}function o(e){var t,o,a=n(5844);for(this._opts=r.extend({maxZoom:18,radius:5},e),this._clusters={},this._points={},t=this._opts.maxZoom;t>=0;t-=1)o=this._opts.radius*Math.pow(2,-t),this._clusters[t]=new a(o),this._points[t]=new a(o);this._topClusterLevel=new i(this,-1)}i.prototype._add=function(e){var t=1;e instanceof i?(this._clusters.push(e),t=e._count):this._points.push(e),e._parent=this,this._increment(t)},i.prototype._increment=function(e){this._coord=null,this._count+=e,this._parent&&this._parent._increment(e)},i.prototype.count=function(){return this._count},i.prototype.each=function(e){var t;for(t=0;t<this._points.length;t+=1)e.call(this,this._points[t],this._zoom);for(t=0;t<this._clusters.length;t+=1)this._clusters[t].each.call(this._clusters[t],e)},i.prototype.coords=function(){var e,t={x:0,y:0};if(this._coord)return this._coord;for(e=0;e<this._points.length;e+=1)t.x+=this._points[e].x,t.y+=this._points[e].y;for(e=0;e<this._clusters.length;e+=1)t.x+=this._clusters[e].coords().x*this._clusters[e].count(),t.y+=this._clusters[e].coords().y*this._clusters[e].count();return{x:t.x/this.count(),y:t.y/this.count()}},o.prototype.addPoint=function(e){var t,n,o,a,s,l;for(t=this._opts.maxZoom;t>=0;t-=1){if(n=this._clusters[t].getNearObject(e))return void n._add(e);if(n=this._points[t].getNearObject(e)){if(o=n._parent)for(l=o._points.length-1;l>=0;l-=1)if(o._points[l]===n){o._points.splice(l,1),o._increment(-1);break}for(o||r.noop(),a=new i(this,t,[n,e]),this._clusters[t].addObject(a,a.coords()),s=a,l=t-1;l>o._zoom;l-=1)s=new i(this,l,[s]),this._clusters[l].addObject(s,s.coords());for(o._add(s),l=t;l>=0&&this._points[l].removeObject(n,n);l-=1);return}this._points[t].addObject(e,e)}this._topClusterLevel._add(e)},o.prototype.points=function(e){return e=Math.min(Math.max(Math.floor(e),0),this._opts.maxZoom-1),this._points[Math.floor(e)].contents()},o.prototype.clusters=function(e){return e=Math.min(Math.max(Math.floor(e),0),this._opts.maxZoom-1),this._clusters[Math.floor(e)].contents()},e.exports=o},7566:function(e,t,n){var r=n(8340),i=n(9552),o={maxCount:1e3,count:0,memo:{}};function a(e,t){return o.count+=1,o.count>=o.maxCount&&(o.memo={},o.count=0),o.memo[e]=t,t}var s={convertColor:function(e){if(null==e||void 0!==e.r&&void 0!==e.g&&void 0!==e.b)return e;if(void 0!==o.memo[e])return o.memo[e];var t,n=e;if("string"==typeof e){var r=e.toLowerCase();if(i.hasOwnProperty(r))e={r:i[r][0]/255,g:i[r][1]/255,b:i[r][2]/255};else if("#"===e.charAt(0))4===e.length||5===e.length?(5===e.length&&(t=parseInt(e.slice(4),16)/15),e=4352*(3840&(e=parseInt(e.slice(1,4),16)))+272*(240&e)+17*(15&e)):7!==e.length&&9!==e.length||(9===e.length&&(t=parseInt(e.slice(7),16)/255),e=parseInt(e.slice(1,7),16));else if("transparent"===r)t=e=0;else if(r.indexOf("(")>=0)for(var l=0;l<s.cssColorConversions.length;l+=1){var u=s.cssColorConversions[l].regex.exec(r);if(u)return a(n,e=s.cssColorConversions[l].process(r,u))}}return isFinite(e)&&(e={r:((16711680&e)>>16)/255,g:((65280&e)>>8)/255,b:(255&e)/255}),void 0!==t&&e&&void 0!==e.r&&(e.a=t),a(n,e)},convertColorAndOpacity:function(e,t,n){return(e=s.convertColor(e))&&void 0!==e.r&&void 0!==e.g&&void 0!==e.b||(e=s.convertColor(n||{r:0,g:0,b:0})),e&&void 0!==e.r&&void 0!==e.g&&void 0!==e.b||(e={r:0,g:0,b:0}),e={r:isFinite(e.r)&&e.r>=0?e.r<=1?+e.r:1:0,g:isFinite(e.g)&&e.g>=0?e.g<=1?+e.g:1:0,b:isFinite(e.b)&&e.b>=0?e.b<=1?+e.b:1:0,a:r.isNonNullFinite(e.a)&&e.a>=0&&e.a<1?+e.a:1},r.isNonNullFinite(t)&&t<1&&(e.a=t<=0?0:e.a*t),e},convertColorToHex:function(e,t){var n,r=s.convertColor(e);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&&t&&(r.a<1||"needed"!==t)&&(n+=(256+Math.round(255*r.a)).toString(16).slice(1)),n},convertColorToRGBA:function(e){var t=s.convertColor(e);return t||(t={r:0,g:0,b:0}),(!r.isNonNullFinite(t.a)||t.a>1)&&(t.a=1),"rgba("+Math.round(255*t.r)+", "+Math.round(255*t.g)+", "+Math.round(255*t.b)+", "+ +(+t.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(e,t){return e={r:Math.min(1,Math.max(0,+t[1]/(t[2]?100:255))),g:Math.min(1,Math.max(0,+t[3]/(t[4]?100:255))),b:Math.min(1,Math.max(0,+t[5]/(t[6]?100:255)))},t[7]&&(e.a=Math.min(1,Math.max(0,+t[8]/(t[9]?100:1)))),e}},{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(e,t){var n=function(e,t,n){return 6*(n-=Math.floor(n))<1?e+(t-e)*n*6:6*n<3?t:6*n<4?e+(t-e)*(2/3-n)*6:e},r=+t[1]/(s.cssAngleUnitsBase[t[2]]||360),i=Math.min(1,Math.max(0,+t[3]/100)),o=Math.min(1,Math.max(0,+t[4]/100)),a=o<=.5?o*(i+1):o+i-o*i,l=2*o-a;return e={r:n(l,a,r+1/3),g:n(l,a,r),b:n(l,a,r-1/3)},t[5]&&(e.a=Math.min(1,Math.max(0,+t[6]/(t[7]?100:1)))),e}}],e.exports=s},8340:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=n(5638),o=n(4252);o=o.__esModule?o.default:o;var a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",u='<svg xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"></foreignObject></svg>',c={},d=200,f=15;function p(){var e;for(e=0;e<arguments.length;e+=1)if(isFinite(arguments[e]))return arguments[e]}var h={pointInPolygon:function(e,t,n,r){return t.outer&&(n=t.inner,t=t.outer),!(t.length<3)&&(!(r&&r.min&&r.max&&(e.x<r.min.x||e.y<r.min.y||e.x>r.max.x||e.y>r.max.y))&&h.distanceToPolygon2d(e,n?{outer:t,inner:n}:t,!0)>0)},pointToTriangleBasis2d:function(e,t,n,r){var i=n.x-t.x,o=r.x-t.x,a=n.y-t.y,s=r.y-t.y,l=e.x-t.x,u=e.y-t.y,c=i*s-o*a;if(c)return{x:(l*s-u*o)/c,y:(l*-a+u*i)/c}},isReadyImage:function(e,t){return!!(e instanceof Image&&e.complete&&e.src&&(e.naturalWidth&&e.naturalHeight||t))},isReadyVideo:function(e,t){return!!(e instanceof HTMLVideoElement&&e.src&&void 0!==e.HAVE_CURRENT_DATA&&(e.videoWidth&&e.videoHeight&&e.readyState>=e.HAVE_CURRENT_DATA||t&&e.error))},isFunction:function(e){return"function"==typeof e},ensureFunction:function(e){return h.isFunction(e)?e:function(){return e}},isNonNullFinite:function(e){return isFinite(e)&&null!==e&&!1!==e&&""!==e},randomString:function(e){var t,n,r;for(e=e||8,t="",n=0;n<e;n+=1)r=Math.floor(Math.random()*l.length),t+=l.substring(r,r+1);return t},normalizeCoordinates:function(e){return e=e||{},Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:{x:p(e.x,e.longitude,e.lng,e.lon,0),y:p(e.y,e.latitude,e.lat,0),z:p(e.z,e.elevation,e.elev,e.height,0)}},range:function(e,t,n){n=n||1;for(var r=[],i=e;i<=t;i+=n)r.push(i);return r},compareArrays:function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[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(e,t,n,r,i){r=void 0===r?.2:r,i=void 0===i?.1:i;var o=e.sourceByName(t),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 l=n;return a instanceof Float32Array&&a.length&&n&&i>0&&(l=Math.floor((i+1)*n)),a=new Float32Array(l),o.setData(a),a},adjustActions:function(e){var t,n;for(n=0;n<e.length;n+=1){if(t=e[n],"string"===i.type(t.input)){var r={};r[t.input]=!0,t.input=r}if(t.modifiers||(t.modifiers={}),"string"===i.type(t.modifiers)){var o={};o[t.modifiers]=!0,t.modifiers=o}}},addAction:function(e,t,n){n?e.push(t):e.unshift(t),h.adjustActions(e)},hasAction:function(e,t,n,r){t&&t.action&&(n=t.name,r=t.owner,t=t.action);for(var i=0;i<e.length;i+=1)if(!(t&&e[i].action!==t||n&&e[i].name!==n||r&&e[i].owner!==r))return e[i];return null},removeAction:function(e,t,n,r){var o,a=0;do{(o=h.hasAction(e,t,n,r))&&(e.splice(i.inArray(o,e),1),a+=1)}while(o);return a},actionMatch:function(e,t,n){var r;if(n.some((function(n){for(var i in n.input)if(n.input.hasOwnProperty(i)&&(!1===n.input[i]&&e[i]||n.input[i]&&!e[i]))return!1;for(var o in n.modifiers)if(n.modifiers.hasOwnProperty(o)&&(!1===n.modifiers[o]&&t[o]||n.modifiers[o]&&!t[o]))return!1;return r=n,!0})))return r},pixelCoordinateParams:function(e,t,n,r,o){var a,s,l;e&&(a=(e=i(e)).innerWidth(),s=e.innerHeight()),o=o||n,l=(r=r||t)!==t||o!==n;var u=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(t/r,n/o))/Math.log(2));return{map:{node:e,ingcs:"+proj=longlat +axis=esu",gcs:"+proj=longlat +axis=enu",maxBounds:{left:0,top:0,right:t,bottom:n},unitsPerPixel:Math.pow(2,c),center:{x:t/2,y:n/2},min:u,max:c,zoom:u,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:l?function(e){var i=Math.pow(2,c-e);return{x:Math.ceil(t/r/i),y:Math.ceil(n/o/i)}}:void 0,tilesMaxBounds:l?function(e){var r=Math.pow(2,c-e);return{x:Math.floor(t/r),y:Math.floor(n/r)}}:void 0}}},centerFromPerimeter:function(e){var t,n,r,i,o,a;if(e&&e.length){if(1===e.length)return{x:e[0].x,y:e[0].y};for(t={x:0,y:0},o=0,n=e[e.length-1],a=0;a<e.length;a+=1)r=n,n=e[a],i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2)),t.x+=(n.x+r.x)*i,t.y+=(n.y+r.y)*i,o+=2*i;return t.x/=o,t.y/=o,o?t:{x:n.x,y:n.y}}},distance2dSquared:function(e,t){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r},distance2dToLineSquared:function(e,t,n){var r=n.x-t.x,i=n.y-t.y,o=r*r+i*i,a=0;return o&&(a=((e.x-t.x)*r+(e.y-t.y)*i)/o,a=Math.max(0,Math.min(1,a))),h.distance2dSquared(e,{x:t.x+a*r,y:t.y+a*i})},distanceToPolygon2d:function(e,t,n){for(var r,i,o=t.outer||t,a=!1,s=0,l=o.length,u=l-1;s<l;u=s,s+=1){var c=o[s],d=o[u];c.y>e.y!=d.y>e.y&&e.x<(d.x-c.x)*(e.y-c.y)/(d.y-c.y)+c.x&&(a=!a),i=n?1:h.distance2dToLineSquared(e,c,d),(void 0===r||i<r)&&(r=i)}return t.inner&&t.inner.forEach((function(t){var i=h.distanceToPolygon2d(e,t,n);i*i<r&&(r=i*i),i>0&&(a=!a)})),(a?1:-1)*Math.sqrt(r)},triangleTwiceSignedArea2d:function(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)},crossedLineSegmentPolygon2d:function(e,t,n){var r,i,o=n.outer||n,a=o.length;for(r=0,i=a-1;r<a;i=r,r+=1)if(h.crossedLineSegments2d(e,t,o[r],o[i]))return!0;if(n.inner)for(r=0;r<n.inner.length;r+=1)if(h.crossedLineSegmentPolygon2d(e,t,n.inner[r]))return!0;return!1},crossedLineSegments2d:function(e,t,n,r){return!(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.x<n.x&&t.x<r.x||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.y<n.y&&t.y<r.y)&&(!(e.x===n.x&&e.y===n.y||e.x===r.x&&e.y===r.y||t.x===n.x&&t.y===n.y||t.x===r.x&&t.y===r.y)&&!(h.triangleTwiceSignedArea2d(e,t,n)*h.triangleTwiceSignedArea2d(e,t,r)>0||h.triangleTwiceSignedArea2d(n,r,e)*h.triangleTwiceSignedArea2d(n,r,t)>0))},segmentCrossesLineList2d:function(e,t,n){return n.some((function(n){return n.some((function(r,i){return!!i&&h.crossedLineSegments2d(e,t,n[i-1],r)}))}))},rdpLineSimplify:function(e,t,n,r){if(e.length<=2||t<0)return e;var i,o,a,s=-1,l=t*t;if(n){for(i=1;i<e.length;i+=1)(o=h.distance2dSquared(e[0],e[i]))>s&&(s=o,a=i);return 4*s<=l?e.slice(a,a+1):(e=e.slice(a).concat(e.slice(0,a+1)),(e=h.rdpLineSimplify(e,t,!1,r)).splice(e.length-1),e)}for(i=1;i<e.length-1;i+=1)(o=h.distance2dToLineSquared(e[i],e[0],e[e.length-1]))>s&&(s=o,a=i);if(s<=l&&(!r||!h.segmentCrossesLineList2d(e[0],e[e.length-1],r)))return[e[0],e[e.length-1]];var u=e.slice(0,a+1),c=e.slice(a),d=h.rdpLineSimplify(u,t,!1,r?r.concat([c]):null),f=h.rdpLineSimplify(c,t,!1,r?r.concat([u]):null);return d.slice(0,d.length-1).concat(f)},getMinMaxValues:function(e,t,n,r){if(e.length&&(r||!i.isNumeric(t)||!i.isNumeric(n))){var o,a,s=e[0],l=e[0];for(a=e.length-1;a>0;a-=1)(o=e[a])<s&&(s=o),o>l&&(l=o);(!i.isNumeric(t)||r&&s>t)&&(t=s),(!i.isNumeric(n)||r&&l<n)&&(n=l)}return{min:t,max:n}},wrapAngle:function(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e},escapeUnicodeHTML:function(e){return e.replace(/./g,(function(e){var t=e.charCodeAt(0);return t<127?e:"&#"+t.toString(10)+";"}))},dereferenceElements:function(e){var t=[];return i("img,image",e).each((function(){var e=i(this),n=e.is("image")?"href":"src";if(e.attr(n)){var r=new Image;("http"===e.attr(n).substr(0,4)||e[0].crossOrigin)&&(r.crossOrigin=e[0].crossOrigin||"anonymous");var o=i.Deferred();r.onload=function(){var t=document.createElement("canvas");t.width=r.naturalWidth,t.height=r.naturalHeight,t.getContext("2d").drawImage(r,0,0),e.attr(n,t.toDataURL("image/png")),"data:image"!==e.attr(n).substr(0,10)&&e.remove(),o.resolve()},r.onerror=function(){e.remove(),o.resolve()},r.src=e.attr(n),t.push(o)}})),t},dereferenceCssUrlsRegex:/url\(["']?(http[^)"']+|[^:)"']+)["']?\)/g,dereferenceCssUrls:function(e,t,n,r,o){var a=[],s=[];if(e=(e=e.replace(/\/\*[^\0]*?\*\//g,"")).replace(/\r/g,"\n").replace(/\s+\n/g,"\n").replace(/\n\s+/g,"\n").replace(/\n\n+/g,"\n"),o){var l=/(^[^?#]*)\/[^?#/]*([?#]|$)/g.exec(o);o=l&&l[1]?l[1]+"/":null}e.replace(h.dereferenceCssUrlsRegex,(function(e,t){var n=a.length,r=i.Deferred(),l=new XMLHttpRequest;return a.push(r),s.push(""),/^[^/:][^:]*(\/|$)/g.exec(t)&&o&&(t=o+t),l.open("GET",t,!0),l.responseType="arraybuffer",l.onload=function(){if(200===this.status){var e,t=new Uint8Array(this.response),i=new Array(t.length);for(e=0;e<t.length;e+=1)i[e]=String.fromCharCode(t[e]);i=i.join(""),s[n]="url(data:"+l.getResponseHeader("content-type")+";base64,"+btoa(i)+")"}r.resolve()},l.onerror=r.resolve,l.send(),e})),i.when.apply(i,a).then((function(){var i=0;e=e.replace(h.dereferenceCssUrlsRegex,(function(e,t){return s[(i+=1)-1]})),void 0===r?t.text(e):t.style[r]=e,n.resolve()}))},htmlToImageSupported:function(){if(void 0===s){var e=i.Deferred(),t=i(u);t.attr({width:"10px",height:"10px","text-rendering":"optimizeLegibility"}),i("foreignObject",t).append("<div/>");var n=new Image;return n.onload=n.onerror=function(){var t=document.createElement("canvas");t.width=10,t.height=10,t.getContext("2d").drawImage(n,0,0);try{t.toDataURL(),s=!0}catch(e){console.warn("This browser does not support converting HTML to an image via SVG foreignObject. Some functionality will be limited.",e),s=!1}e.resolve(s)},n.src="data:image/svg+xml;base64,"+btoa(h.escapeUnicodeHTML((new XMLSerializer).serializeToString(t[0]))),e}return s},htmlToImage:function(e,t){var n,r=i.Deferred(),o=[h.htmlToImageSupported()],a=i(e);for(e=i(e).clone();t&&t>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(e),e=n),t-=1;i("canvas",e).remove(),i("*",e).addBack().each((function(){for(var e=this.style,t=0;t<e.length;t+=1){var n=this.style[t];if(this.style[n].match(h.dereferenceCssUrlsRegex)){var r=i.Deferred();h.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(e),o=o.concat(h.dereferenceElements(e)),i('style,link[rel="stylesheet"]').each((function(){var e=i('<style type="text/css">'),t=i.Deferred();if(i(this).is("style")){var r=i(this).text();h.dereferenceCssUrls(r,e,t)}else{var a=i(this).attr("href");i.get(a).done((function(n){h.dereferenceCssUrls(n,e,t,void 0,a)})).fail((function(n,r,i){console.warn("Failed to dereference "+a,r,i),e.remove(),t.resolve()}))}o.push(t),i("head",n).append(e)})),i.when.apply(i,o).then((function(){var e=i(u);e.attr({width:a.width()+"px",height:a.height()+"px","text-rendering":"optimizeLegibility"}),i("foreignObject",e).append(n);var t=new Image;h.htmlToImageSupported()?(t.onload=function(){r.resolve(t)},t.onerror=function(){console.warn("Failed to render html to image"),r.reject()},t.src="data:image/svg+xml;base64,"+btoa(h.escapeUnicodeHTML((new XMLSerializer).serializeToString(e[0])))):r.resolve(t)})),r},timeReport:function(e){return i.each(c,(function(e,t){t.count?(t.stddev=Math.sqrt(Math.abs((t.sum2-t.sum*t.sum/t.count)/t.count)),t.average=t.sum/t.count):(t.stddev=0,t.average=0)})),e?c[e]:c},timeFunctionStart:function(e,t){c[e]&&!t||(c[e]={count:0,sum:0,sum2:0,max:0,recent:[]}),c[e].start=window.performance.now()},timeFunctionStop:function(e){if(c[e]&&c[e].start){var t=window.performance.now()-c[e].start;c[e].start=null,c[e].sum+=t,c[e].sum2+=t*t,c[e].count+=1,c[e].max=Math.max(c[e].max,t),c[e].recent.push(t),c[e].recent.length>d&&c[e].recent.splice(0,c[e].recent.length-d)}},timeRequestAnimationFrame:function(e,t,n,r){c.requestAnimationFrame&&!t||(c.requestAnimationFrame={count:0,sum:0,sum2:0,max:0,above_threshold:0,recent:[],recentsub:[]}),n&&(f=n),r&&(d=r),e&&a?(window.requestAnimationFrame=a,a=null):e||a||(a=window.requestAnimationFrame,window.requestAnimationFrame=function(e){return a.call(window,(function(t){var n,r=c.requestAnimationFrame;r.timestamp!==t&&(r.nowDelta=window.performance.now()-t,Math.abs(r.nowDelta)<1e3&&(r.nowDelta=0),r.timestamp=t,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>d&&(r.recent.splice(0,r.recent.length-d),r.recentsub.splice(0,r.recentsub.length-d))),r.subcalls+=1,e.apply(this,arguments);var i=window.performance.now()-t;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:e.name||e})}))})},isObject:function(e){var t=r(e);return null!=e&&("object"===t||"function"===t)},radiusEarth:o.WGS84.a};e.exports=h},5844:function(e,t,n){var r=n(5638),i={};i.Util={stamp:function(e){return e._leaflet_id=e._leaflet_id||++i.Util.lastId,e._leaflet_id},lastId:0};var o=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}};o.prototype={addObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),o=this._grid,a=o[r]=o[r]||{},s=a[n]=a[n]||[],l=i.Util.stamp(e);t.obj=e,this._objectPoint[l]=t,s.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n,r,o=this._getCoord(t.x),a=this._getCoord(t.y),s=this._grid,l=s[a]=s[a]||{},u=l[o]=l[o]||[];for(delete this._objectPoint[i.Util.stamp(e)],n=0,r=u.length;n<r;n++)if(u[n]===e)return u.splice(n,1),1===r&&delete l[o],!0},eachObject:function(e,t){var n,r,i,o,a,s,l=this._grid;for(n in l)for(r in a=l[n])for(i=0,o=(s=a[r]).length;i<o;i++)e.call(t,s[i])&&(i--,o--)},getNearObject:function(e){var t,n,r,o,a,s,l,u,c=this._getCoord(e.x),d=this._getCoord(e.y),f=this._objectPoint,p=this._sqCellSize,h=null;for(t=d-1;t<=d+1;t++)if(o=this._grid[t])for(n=c-1;n<=c+1;n++)if(a=o[n])for(r=0,s=a.length;r<s;r++)l=a[r],(u=this._sqDist(f[i.Util.stamp(l)],e))<p&&(p=u,h=l);return h},contents:function(){return r.map(this._objectPoint,(function(e){return e}))},_getCoord:function(e){return Math.floor(e/this._cellSize)},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}},e.exports=o},4634:function(e,t,n){e.exports=Object.assign(n(8340),n(7566),n(9215),n(895),{DistanceGrid:n(5844),ClusterGroup:n(9808),mesh:n(9244)})},9244:function(e,t,n){e.exports={createColoredMesh:function(e,t){var r,i,o,a,s,l=n(5638),u=n(4634),c=e.mesh,d=e.style.get("value"),f=void 0!==e.style("used")?e.style.get("used"):function(e,t){return u.isNonNullFinite(d(e,t))},p={used:f,opacity:e.style.get("opacity"),value:d},h=e._createMesh(t?{}:p,t?p:{});if(h.elementValues=!!t,!h.numVertices||!h.numElements)return h;var m=c.get("stepped")(h),g=c.get("opacityRange")(h),v=c.get("rangeValues")(h);if(h.stepped=!(void 0!==m&&!m),h.colorMap=[],h.minColor=l.extend({a:c.get("minOpacity")(h)||0},u.convertColor(c.get("minColor")(h))),h.maxColor=l.extend({a:c.get("maxOpacity")(h)||0},u.convertColor(c.get("maxColor")(h))),c.get("colorRange")(h).forEach((function(e,t){h.colorMap.push(l.extend({a:g&&void 0!==g[t]?g[t]:1},u.convertColor(e)))})),r=u.getMinMaxValues(h.value,c.get("min")(h),c.get("max")(h)),h.minValue=r.min,h.maxValue=r.max,v&&h.colorMap&&(v.length===h.colorMap.length+1||!m&&v.length===h.colorMap.length)||(v=null),v)for(s=1;s<v.length;s+=1)if(v[s-1]>v[s]){v=null;break}for(v&&(h.minValue=v[0],h.maxValue=v[v.length-1]),(o=h.maxValue-h.minValue)||(h.colorMap=h.colorMap.slice(0,1),o=1,v=null),h.rangeValues=v,h.factor=(h.colorMap.length-(m?0:1))/o,a=0;a<h.value.length;a+=1)if(i=h.value[a],v&&i>=h.minValue&&i<=h.maxValue){for(s=1;s<v.length;s+=1)if(i<=v[s]){h.value[a]=s-1+(i-v[s-1])/(v[s]-v[s-1]);break}}else h.value[a]=(i-h.minValue)*h.factor;return h}}},895:function(e,t,n){var r,i,o=n(5638),a=n(2254);e.exports={},e.exports.mockWebglRenderer=function(e){"use strict";var t=n(320);if(void 0===e&&(e=!0),t._mocked)throw new Error("webgl renderer already mocked");var s={},l=function(e){s[e]=(s[e]||0)+1},u=function(e){return function(){l(e)}},c=0,d=function(e){return function(){return l(e),c+=1}},f={activeTexture:u("activeTexture"),attachShader:u("attachShader"),bindAttribLocation:u("bindAttribLocation"),bindBuffer:u("bindBuffer"),bindFramebuffer:u("bindFramebuffer"),bindTexture:u("bindTexture"),blendFuncSeparate:u("blendFuncSeparate"),bufferData:u("bufferData"),bufferSubData:u("bufferSubData"),checkFramebufferStatus:function(e){if(l("checkFramebufferStatus"),e===t.GL.FRAMEBUFFER)return t.GL.FRAMEBUFFER_COMPLETE},clear:u("clear"),clearColor:u("clearColor"),clearDepth:u("clearDepth"),compileShader:u("compileShader"),createBuffer:d("createBuffer"),createFramebuffer:u("createFramebuffer"),createProgram:d("createProgram"),createShader:d("createShader"),createTexture:d("createTexture"),deleteBuffer:u("deleteBuffer"),deleteProgram:u("deleteProgram"),deleteShader:u("deleteShader"),deleteTexture:u("deleteTexture"),detachShader:u("detachShader"),depthFunc:u("depthFunc"),disable:u("disable"),disableVertexAttribArray:u("disableVertexAttribArray"),drawArrays:u("drawArrays"),enable:u("enable"),enableVertexAttribArray:u("enableVertexAttribArray"),finish:u("finish"),getError:u("getError"),getExtension:d("getExtension"),getParameter:function(e){switch(l("getParameter"),e){case t.GL.ALIASED_POINT_SIZE_RANGE:return[1,64];case t.GL.DEPTH_BITS:return 16;case t.GL.MAX_TEXTURE_SIZE:return 4096}},getProgramParameter:function(e,n){if(l("getProgramParameter"),n===t.GL.LINK_STATUS)return!0},getShaderInfoLog:function(){return l("getShaderInfoLog"),"log"},getShaderParameter:function(e,n){if(l("getShaderParameter"),n===t.GL.COMPILE_STATUS)return!0},getSupportedExtensions:function(){return l("getSupportedExtensions"),[]},getUniformLocation:d("getUniformLocation"),isEnabled:function(e){if(l("isEnabled"),e===t.GL.BLEND)return!0},linkProgram:u("linkProgram"),pixelStorei:u("pixelStorei"),shaderSource:u("shaderSource"),texImage2D:u("texImage2D"),texParameteri:u("texParameteri"),uniform1iv:u("uniform1iv"),uniform1fv:u("uniform1fv"),uniform2fv:u("uniform2fv"),uniform3fv:u("uniform3fv"),uniform4fv:u("uniform4fv"),uniformMatrix3fv:u("uniformMatrix3fv"),uniformMatrix4fv:u("uniformMatrix4fv"),useProgram:u("useProgram"),vertexAttribPointer:u("vertexAttribPointer"),vertexAttrib3fv:u("vertexAttrib3fv"),viewport:u("viewport")};r=t.renderWindow;t.renderWindow=function e(){t.renderWindow=r;var n,i=new t.renderWindow;return t.renderWindow=e,i._setup=function(){var e,r=i.renderers(),a=i.windowSize(),s=i.windowPosition();for(n=o.extend({},t.GL,f),e=0;e<r.length;e+=1)(r[e].width()>a[0]||0===r[e].width()||r[e].height()>a[1]||0===r[e].height())&&r[e].resize(s[0],s[1],a[0],a[1]);return!0},i.context=function(){return n},i},i=a.supported,a.supported=function(){return!!e},a._maxTextureSize=4096,a._maxPointSize=64,t._mocked=!0,t.mockCounts=function(){return s}},e.exports.restoreWebglRenderer=function(){var e=n(320);e._mocked&&(e.renderWindow=r,a.supported=i,delete e._mocked,delete e.mockCounts)}},9215:function(e){var t=function(e,t,n,r,i){var o,a=0;return"boolean"!=typeof t&&(i=r,r=n,n=t,t=void 0),"function"!=typeof r&&(i=r,r=function(){}),function(){var s=this,l=+new Date-a,u=arguments;function c(){a=+new Date,n.apply(s,u)}function d(){o=void 0}r.apply(s,u),i&&!o&&c(),o&&clearTimeout(o),void 0===i&&l>e?c():!0!==t&&(o=setTimeout(i?d:c,void 0===i?e-l:e))}};e.exports={throttle:t,debounce:function(e,n,r,i){return"boolean"!=typeof n&&(i=r,r=n,n=!1),t(e,!1,r,i=i||function(){},!!n)}}},2623:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638);t=t||{},i.call(this,t);var o=this,a=this._init;this.featureType="vector",this.origin=function(e){return void 0===e?o.style("origin"):(o.style("origin",e),o.dataTime().modified(),o)},this.delta=function(e){return void 0===e?o.style("delta"):(o.style("delta",e),o.dataTime().modified(),o)},this._init=function(e){a.call(o,e);var t=r.extend({},{strokeColor:"black",strokeWidth:2,strokeOpacity:1,originStyle:"none",endStyle:"arrow",origin:{x:0,y:0,z:0},delta:function(e){return e},scale:null},void 0===e.style?{}:e.style);return void 0!==e.origin&&(t.origin=e.origin),o.style(t),o.dataTime().modified(),o}};r(o,i),e.exports=o},2978:function(e){e.exports="1.7.2"},6653:function(e,t,n){e.exports={pointFeature:n(9724),vtkjsRenderer:n(9508)}},7222:function(e,t,n){e.exports=function e(t){"use strict";if(!(this instanceof n(3737)))return new e(t);var r=this,i=this.draw;return this.draw=function(){return r.ready&&(r._update(),r.renderer()._render(),i()),r},this}},9724:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(6853),i=n(7222),a=n(9508).vtkjs,s=a.Rendering.Core.vtkActor,l=a.Common.Core.vtkDataArray,u=a.Rendering.Core.vtkGlyph3DMapper,c=a.Rendering.Core.vtkMapper,d=a.Common.DataModel.vtkPointSet,f=a.Filters.Sources.vtkSphereSource;i.call(this);var p,h,m,g,v,y=this,b=this._init,x=this._exit,w=this._update;return this._createPipeline=function(){h=d.newInstance(),(m=f.newInstance()).setThetaResolution(30),m.setPhiResolution(30);var e=u.newInstance({orient:!1,colorByArrayName:"color",scalarMode:c.ScalarMode.USE_POINT_FIELD_DATA,colorMode:c.ColorMode.DIRECT_SCALARS,scaling:!0,scaleArray:"diam",scaleMode:u.ScaleModes.SCALE_BY_MAGNITUDE});e.setInputData(h,0),e.setInputConnection(m.getOutputPort(),1),(p=s.newInstance()).setMapper(e),p.getProperty().setAmbient(1),y.renderer().contextRenderer().addActor(p)},this._init=function(){b.call(y,t),y.renderer().contextRenderer().setLayer(0),y._createPipeline()},this._build=function(){var e,t,n,i,o,a,s=y.data().length,u=new Array(3*s),c=y.data(),d=y.position(),f=y.style.get("radius"),p=y.style.get("fill"),m=y.style.get("fillColor"),b=y.style.get("fillOpacity"),x=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)),e=t=n=0;e<s;e+=1,t+=3,n+=4)i=d(c[e],e),u[t]=i.x,u[t+1]=i.y,u[t+2]=i.z||0,a=a||u[t+2],v[e]=f(c[e],e)*x*2,o=m(c[e],e),g[n]=255*o.r,g[n+1]=255*o.g,g[n+2]=255*o.b,g[n+3]=p(c[e],e)?255*b(c[e],e):0;if(u=r.transformCoordinates(y.gcs(),y.layer().map().gcs(),u,3),!a&&y.gcs()!==y.layer().map().gcs())for(e=t=0;e<s;e+=1,t+=3)u[t+2]=0;h.getPoints().setData(u,3),h.getPointData().addArray(l.newInstance({name:"color",values:g,numberOfComponents:4})),h.getPointData().addArray(l.newInstance({name:"diam",values:v})),y.buildTime().modified()},this._update=function(){if(w.call(y),y.dataTime().getMTime()>=y.buildTime().getMTime()||y.updateTime().getMTime()<y.getMTime())y._build();else{var e=y.data(),t=y.style.get("radius"),n=y.layer().map().unitsPerPixel(y.layer().map().zoom()),r=h.getPointData().getArray("diam"),i=r.getData().map((function(r,i){return t(e[i],i)*n*2}));r.setData(i),h.modified()}y.updateTime().modified()},this._exit=function(){y.renderer().contextRenderer().removeActor(p),x()},y._init(),this};r(a,o);var s={};s[o.capabilities.stroke]=!1,i("vtkjs","point",a,s),e.exports=a},9508:function(e,t,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(5240),i=n(5108),a=e.vtkjs.Rendering.Misc.vtkGenericRenderWindow,s=this,l=this._init,u=a.newInstance({background:[0,0,0,0]});u.setContainer(s.layer().node().get(0)),u.getInteractor().unbindEvents(),u.resize();var c=u.getRenderer(),d=u.getRenderWindow();return this.contextRenderer=function(){return c},this.api=function(){return e.apiname},this._init=function(){if(s.initialized())return s;l.call(s);var e=s.layer().map(),t=e.size();return s._resize(0,0,t.width,t.height),e.camera().clipbounds={near:-e.unitsPerPixel(),far:e.unitsPerPixel()},s},this._resize=function(e,t,n,r){return s._setWidthHeight(n,r),u.resize(),s._render(),s},this._render=function(){return s.layer().map().scheduleAnimationFrame(s._renderFrame,!0),s},this._renderFrame=function(){var e,t=s.layer().features();for(e=0;e<t.length;e+=1)t[e].visible()&&t[e]._update();s._updateRendererCamera(),d.render()},this._exit=function(){},this._updateRendererCamera=function(){var e=s.layer().map().camera(),t=e.view,n=e.projectionMatrix,i=r.create();r.copy(i,t);var o=r.create();r.copy(o,n),s.contextRenderer().getActiveCamera().setViewMatrix(i),s.contextRenderer().getActiveCamera().setProjectionMatrix(o)},s.layer().geoOn(i.pan,(function(e){s._render()})),s.layer().geoOn(i.parallelprojection,(function(e){})),this};a.apiname="vtkjs",r(a,o),i("vtkjs",a),a.supported=function(){delete a.vtkjs;try{a.vtkjs=n(5361)}catch(e){}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(),e.exports=a},99:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(8719),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n=this,r=null,i=this._exit,a=this.draw,s=this._update;return this.draw=function(){if(n._update(),r)for(var e=0;e<r.length;e+=1)r[e].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(e){return e._exit()})),r=null},this._exit=function(){n._wipePolygons(),i()},this._init(t),this};r(a,o),i("webgl","choropleth",a),e.exports=a},8917:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(9005),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t),n(5651).call(this,t);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(t),this};r(a,o),i("webgl","contour",a),e.exports=a},8939:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(1109),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t),n(5651).call(this,t);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(t),this};r(a,o),i("webgl","grid",a),e.exports=a},9205:function(e,t,n){e.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(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2367),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(7719).call(this),this._init(t),this):new e(t)};r(a,o),i("webgl","isoline",a),e.exports=a},5389:function(e,t,n){var r=function(){"use strict";var e=n(4647).createRenderer,t=n(5108),r=n(2254),i=n(1940),o=this,a=this._init,s=this.opacity,l=this.visible,u=this.zIndex;this.opacity=function(e){var t=s.apply(o,arguments);return void 0!==e&&o.initialized()&&o.map()._updateAutoshareRenderers(),t},this.visible=function(e){if(void 0===e)return l();var t=l(),n=l.apply(o,arguments);return t!==e&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render()),n},this.zIndex=function(e,t){var n=u.apply(o,arguments);return void 0!==e&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render(),o.map()._updateAutoshareRenderers()),n},this.switchRenderer=function(e,t){if(e instanceof r&&e!==o.renderer()){var n=o.renderer(),i=[],a=[];o.map().listSceneObjects([o]).forEach((function(e){e._cleanup&&(e._cleanup(),e._update&&a.push(e)),e.actors&&(i=i.concat(e.actors()))})),i.forEach((function(t){n.contextRenderer().removeActor(t),e.contextRenderer().addActor(t)})),o._renderer(e),o._canvas(e.canvas()),t&&(i.length||a.length)&&(n._render(),a.forEach((function(e){e._update()})),e._render())}return o},this._init=function(){var n=o.map();return n._updateAutoshareRenderers||(n._updateAutoshareRenderers=function(){var t,o,a,s=n.sortedLayers(),l=[];s.forEach((function(n){var s=n.autoshareRenderer(),u=n instanceof i;s&&n.renderer()&&n.renderer().api()===r.apiname?!t||n.opacity()!==o||"more"!==s&&(n.opacity()>0&&n.opacity()<1||u&&!a)?(n.node()[0].contains(n.renderer().canvas()[0])||(n.switchRenderer(e(r.apiname,n),!1),l.push(n.renderer())),t=n.renderer(),o=n.opacity(),a=u):(n.renderer()!==t&&(l.push(n.renderer()),n.switchRenderer(t,!1),l.push(n.renderer())),a&=u):t=null})),s.forEach((function(e){l.indexOf(e.renderer())>=0&&e._update&&e._update()})),s.forEach((function(e){l.indexOf(e.renderer())>=0&&(e.renderer()._renderFrame(),l=l.filter((function(t){return t!==e.renderer()})))})),l.forEach((function(e){e._exit()}))},n.geoOn(t.layerAdd,(function(){return n._updateAutoshareRenderers()})),n.geoOn(t.layerRemove,(function(){return n._updateAutoshareRenderers()}))),a.apply(o,arguments)}};(0,n(4647).registerLayerAdjustment)("webgl","all",r),e.exports=r},7390:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=0,s=1,l=3,u={butt:0,square:1,round:2},c={passthrough:3,miter:4,bevel:5,round:6,"miter-clip":7},d={normal:0,debug:1},f=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(320),i=n(6853),f=n(4634),p=n(7719),h=n(9162),m=n(359),g=n(916);p.call(this);var v,y,b,x,w,_,S,C,A,T,P,E=this,O=this._exit,M=void 0!==t.dynamicDraw&&t.dynamicDraw,D=this._init,k=this._update;return this.featureVertices=function(){return[[0,"corner",-1,a],[0,"near",1,s],[1,"far",-1,l],[1,"corner",1,a],[1,"near",-1,s],[0,"far",1,l]]},this.verticesPerFeature=function(){return E.featureVertices().length},this._init=function(e){var t,n=r.shaderProgram(),i=((t=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(g),t),o=function(e){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(e?m:h),t}(void 0!==((e||{}).style||{}).debug),a=r.vertexAttribute("pos"),s=r.vertexAttribute("prev"),l=r.vertexAttribute("next"),u=r.vertexAttribute("far"),c=r.vertexAttribute("flags"),d=r.vertexAttribute("strokeWidth"),f=r.vertexAttribute("strokeColor"),p=r.vertexAttribute("strokeOpacity"),A=new r.projectionUniform("projectionMatrix"),T=r.geometryData(),O=r.sourceDataP3fv({name:"pos"}),k=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Four,{name:"prev"}),I=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Five,{name:"next"}),R=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Six,{name:"far"}),N=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Seven,{name:"flags"}),F=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.One,{name:"strokeWidth"}),L=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"strokeColor"}),B=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"strokeOpacity"}),V=r.triangles();return P=new r.modelViewOriginUniform("modelViewMatrix"),x=new r.floatUniform("pixelWidth",1/E.renderer().width()),w=new r.floatUniform("aspect",E.renderer().width()/E.renderer().height()),_=new r.floatUniform("miterLimit",10),S=new r.floatUniform("antialiasing",0),C=new r.floatUniform("fixedFlags",0),D.call(E,e),b=r.material(),y=r.mapper({dynamicDraw:M}),n.addVertexAttribute(a,r.vertexAttributeKeys.Position),n.addVertexAttribute(d,r.vertexAttributeKeysIndexed.One),n.addVertexAttribute(f,r.vertexAttributeKeysIndexed.Two),n.addVertexAttribute(p,r.vertexAttributeKeysIndexed.Three),n.addVertexAttribute(s,r.vertexAttributeKeysIndexed.Four),n.addVertexAttribute(l,r.vertexAttributeKeysIndexed.Five),n.addVertexAttribute(u,r.vertexAttributeKeysIndexed.Six),n.addVertexAttribute(c,r.vertexAttributeKeysIndexed.Seven),n.addUniform(P),n.addUniform(A),n.addUniform(x),n.addUniform(w),n.addUniform(_),n.addUniform(S),n.addUniform(C),n.addShader(o),n.addShader(i),b.addAttribute(n),b.addAttribute(r.blend()),(v=r.actor()).setMaterial(b),v.setMapper(y),T.addSource(O),T.addSource(k),T.addSource(I),T.addSource(R),T.addSource(F),T.addSource(L),T.addSource(B),T.addSource(N),V.setIndices(new Uint16Array(1)),T.addPrimitive(V),T.computeBounds=function(){T.setBounds(0,0,0,0,0,0)},y.setGeometryData(T),E},this.actors=function(){return v?[v]:[]},this._build=function(){return function(e){var t,n,r,o,a,s,l,p,h,m,g,v,b,x,w,O,M,D,k,I,R,N,F,L,B,V,j,z,G,U,W,H,q,X,K,Z,Y,J,Q=E.data(),$=0,ee=[{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0},{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0}],te=ee[1],ne=E.line(),re=E.style.get("strokeWidth"),ie=E.style.get("strokeColor"),oe=E.style.get("strokeOpacity"),ae=E.style.get("lineCap"),se=E.style.get("lineJoin"),le=E.style.get("strokeOffset"),ue=E.style.get("miterLimit")(Q),ce=E.style.get("antialiasing")(Q)||0,de=E.featureVertices(),fe=de.length,pe=d[E.style.get("debug")(Q)?"debug":"normal"]||0,he=y.geometryData(),me=E.style.get("closed"),ge=!0;if(Y=f.isFunction(E.style("closed"))?void 0:me()||!1,I=f.isFunction(E.style("lineCap"))?void 0:u[ae()||"butt"],R=f.isFunction(E.style("lineJoin"))?void 0:c[se()||"miter"],D=f.isFunction(E.style("strokeColor"))?void 0:ie(),N=f.isFunction(E.style("strokeOffset"))?void 0:le()||0,k=f.isFunction(E.style("strokeOpacity"))?void 0:oe(),M=f.isFunction(E.style("strokeWidth"))?void 0:re(),void 0!==ue&&_.set(Math.max(1,Math.min(100,ue))),C.set(pe),S.set(ce),e)$=A.numSegments,J=A.closed,m=A.lineItemList,h=$*fe,ge=I!==A.lineCapVal||void 0===I||R!==A.lineJoinVal||void 0===R||N!==A.strokeOffsetVal||void 0===N;else{var ve=[],ye=E.position();for(m=new Array(Q.length),J=new Array(Q.length),n=0;n<Q.length;n+=1)if(g=ne(t=Q[n],n),m[n]=g,!(g.length<2)){for($+=g.length-1,r=0;r<g.length;r+=1)b=ye(g[r],r,t,n),ve.push(b.x),ve.push(b.y),ve.push(b.z||0),r||(w=b);g.length>2&&(void 0===Y?me(t,n):Y)?b.x!==w.x||b.y!==w.y||b.z!==w.z?($+=1,J[n]=2):J[n]=1:J[n]=0}if(ve=i.transformCoordinates(E.gcs(),E.layer().map().gcs(),ve,3),(T=new Float32Array(E.style.get("origin")(ve)))[0]||T[1]||T[2])for(n=0;n<ve.length;n+=3)ve[n]-=T[0],ve[n+1]-=T[1],ve[n+2]-=T[2];P.setOrigin(T),h=$*fe,j=f.getGeomBuffer(he,"pos",3*h),z=f.getGeomBuffer(he,"prev",3*h),G=f.getGeomBuffer(he,"next",3*h),U=f.getGeomBuffer(he,"far",3*h),he.primitive(0).numberOfIndices()!==h&&(he.primitive(0).numberOfIndices=function(){return h}),A={numSegments:$,closed:J,lineItemList:m,lineCapVal:I,lineJoinVal:R,strokeOffsetVal:N}}for(W=f.getGeomBuffer(he,"flags",h),H=f.getGeomBuffer(he,"strokeWidth",h),q=f.getGeomBuffer(he,"strokeColor",3*h),X=f.getGeomBuffer(he,"strokeOpacity",h),n=x=K=Z=0;n<Q.length;n+=1)if(!((g=m[n]).length<2))for(t=Q[n],Y=J[n],O=x,p=g.length+(2===Y?1:0),r=0;r<p;r+=1,x+=3)if(l=r,r===g.length&&(l=0,x-=3),v=g[l],r&&(te=ee[0],ee[0]=ee[1],ee[1]=te),e||(te.pos=r===l?x:O,te.prev=l?x-3:Y?O+3*(g.length-3+Y):x,te.next=r+1<g.length?x+3:Y?r!==l?O+3:O+6-3*Y:x),te.strokeWidth=void 0===M?re(v,l,t,n):M,te.strokeColor=void 0===D?ie(v,l,t,n):D,te.strokeOpacity=void 0===k?oe(v,l,t,n):k,ge&&(0!==N&&(te.strokeOffset=(void 0===N?le(v,l,t,n):N)||0,te.strokeOffset?(te.posStrokeOffset=2047&Math.round(2048+1023*Math.min(1,Math.max(-1,te.strokeOffset))),te.negStrokeOffset=2047&Math.round(2048-1023*Math.min(1,Math.max(-1,te.strokeOffset)))):te.posStrokeOffset=te.negStrokeOffset=0),Y||r&&r!==g.length-1?te.flags=void 0===R?c[se(v,l,t,n)]||c.miter:R:te.flags=void 0===I?u[ae(v,l,t,n)]||u.butt:I),r)for(o=0;o<fe;o+=1,K+=1,Z+=3)a=ee[F=de[o][0]],s=ee[1-F],e||(j[Z]=ve[a.pos],j[Z+1]=ve[a.pos+1],j[Z+2]=0,L=F?"next":"prev",B=F?"prev":"next",z[Z]=ve[a[L]],z[Z+1]=ve[a[L]+1],z[Z+2]=0,G[Z]=ve[a[B]],G[Z+1]=ve[a[B]+1],G[Z+2]=0,U[Z]=ve[s[B]],U[Z+1]=ve[s[B]+1],U[Z+2]=0),ge&&(V=F?"posStrokeOffset":"negStrokeOffset",W[K]=de[o][3]+4*a.flags+32*s.flags+256*a[V]),H[K]=a.strokeWidth,q[Z]=a.strokeColor.r,q[Z+1]=a.strokeColor.g,q[Z+2]=a.strokeColor.b,a.strokeOpacity<=0&&s.strokeOpacity<=0||a.strokeWidth<=0&&s.strokeWidth<=0?X[K]=-1:X[K]=a.strokeOpacity;e?(ge&&y.updateSourceBuffer("flags"),y.updateSourceBuffer("strokeWidth"),y.updateSourceBuffer("strokeOpacity"),y.updateSourceBuffer("strokeColor")):(y.modified(),he.boundsDirty(!0),y.boundsDirtyTimestamp().modified())}(!!(E.dataTime().timestamp()<E.buildTime().timestamp()&&A)),E.renderer().contextRenderer().hasActor(v)||E.renderer().contextRenderer().addActor(v),E.buildTime().modified(),E},this._update=function(){return k.call(E),(E.dataTime().timestamp()>=E.buildTime().timestamp()||E.updateTime().timestamp()<=E.timestamp())&&E._build(),x.set(1/E.renderer().width()),w.set(E.renderer().width()/E.renderer().height()),v.setVisible(E.visible()),v.material().setBinNumber(E.bin()),E.updateTime().modified(),E},this._exit=function(){E.renderer().contextRenderer().removeActor(v),v=null,O()},this._init(t),this};r(f,o);var p={};p[o.capabilities.basic]=!0,p[o.capabilities.multicolor]=!0,i("webgl","line",f,p),e.exports=f},8672:function(e,t,n){var r=n(5699),i=n(6618),o=n(320);var a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.texture.call(this);var n,r=i(),a=t.maxWidth||4096,s=new Uint8Array([0,0,0,0]),l=this;return this.setup=function(e){!function(e,t){if(!(t>=0&&t<=31))throw Error("[error] Texture unit "+t+" is not supported");e.m_context.activeTexture(o.GL.TEXTURE0+t)}(e,l.textureUnit()),e.m_context.deleteTexture(l.m_textureHandle),l.m_textureHandle=e.m_context.createTexture(),e.m_context.bindTexture(o.GL.TEXTURE_2D,l.m_textureHandle),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MIN_FILTER,o.GL.NEAREST),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MAG_FILTER,o.GL.NEAREST),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_S,o.GL.CLAMP_TO_EDGE),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_T,o.GL.CLAMP_TO_EDGE),e.m_context.pixelStorei(o.GL.UNPACK_ALIGNMENT,1),e.m_context.pixelStorei(o.GL.UNPACK_FLIP_Y_WEBGL,!0),e.m_context.texImage2D(o.GL.TEXTURE_2D,0,o.GL.RGBA,l.width,l.height,0,o.GL.RGBA,o.GL.UNSIGNED_BYTE,s),e.m_context.bindTexture(o.GL.TEXTURE_2D,null),r.modified()},this.colorTable=function(e){return void 0===e?n:(n=e,e.length<4&&(e=[0,0,0,0]),l.width=Math.min(a,e.length/4),l.height=Math.ceil(e.length/4/a),e instanceof Uint8Array&&e.length===l.width*l.height*4?s=e:(e.length<l.width*l.height*4&&(e=e.concat(new Array(l.width*l.height*4-e.length).fill(0))),s=new Uint8Array(e)),l.modified(),l)},this.maxWidth=function(){return a},this.colorTable(t.colorTable||[]),this};r(a,o.texture),e.exports=a},1848:function(e,t,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(7098),s=n(2254),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var i=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(5108),f=n(5573),p=n(468),h=n(2043),m=n(7981);u.call(this);var g,v,y=this,b=this._exit,x=null,w=null,_={},S=this._init,C=this._update,A=this.updateStyleFromArray;function T(e){var t,n,r,i,u,c,d,f,p,h,m,b,_,S=y.data().length,C=y._pointPolygon(0,0,1,1),A=new Array(3*S),P={},E={},O={},M={},D={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeOffset:0,strokeWidth:1,symbol:1,symbolValue:1,rotation:1,scaleWithZoom:0,rotateWithMap:0},k=y.verticesPerFeature(),I=y.data(),R=w.geometryData();for(var N in u=y.position(),D)O[N]=y.style.get(N),l.isFunction(y.style(N))||(M[N]=O[N]()),D[N]&&(P[N]=l.getGeomBuffer(R,N,k*S*D[N]));if(!e){for(t=b=0;t<S;t+=1,b+=3)i=u(I[t],t),A[b]=i.x,A[b+1]=i.y,A[b+2]=0;if(A=o.transformCoordinates(y.gcs(),y.layer().map().gcs(),A,3),(v=new Float32Array(y.style.get("origin")(A)))[0]||v[1]||v[2])for(t=b=0;t<S;t+=1,b+=3)A[b]-=v[0],A[b+1]-=v[1],A[b+2]-=v[2];g.setOrigin(v),r=l.getGeomBuffer(R,"pos",k*S*3),y._primitiveShape!==a.primitiveShapes.sprite&&(d=l.getGeomBuffer(R,"unit",k*S*2)),(c=R.primitive(0).indices())instanceof Uint16Array&&c.length===k*S||(c=new Uint16Array(k*S),R.primitive(0).setIndices(c))}for(t=p=h=m=b=0;t<S;t+=1,b+=3){if(f=I[t],!e&&y._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<C.length;n+=1,m+=1)d[m]=C[n];for(var F in D)E[F]=void 0===M[F]?O[F](f,t):M[F];for(E.scaleWithZoom=a.scaleMode[E.scaleWithZoom]||(E.scaleWithZoom>=1&&E.scaleWithZoom<=3?E.scaleWithZoom:0),E.symbolComputed=E.scaleWithZoom+(E.rotateWithMap?4:0)+16*(Math.sign(E.strokeOffset)+1)+64*E.symbol,E.symbolValue&&E.symbol>=a.symbols.arrow&&E.symbol<a.symbols.arrow+a.symbols.arrowMax&&(E.symbolValue=(_=E.symbolValue).length?((void 0===_[0]?0:Math.floor(250*Math.abs(_[0]))+1)+252*(void 0===_[1]?0:Math.floor(250*Math.abs(_[1]))+1)+252*(void 0===_[2]?0:Math.floor(250*Math.abs(_[2]))+1)*252)*(_[3]?-1:1):void 0===_?0:Math.floor(250*Math.abs(_))+1),n=0;n<k;n+=1,p+=1,h+=3)e||(r[h]=A[b],r[h+1]=A[b+1],r[h+2]=A[b+2]),P.radius[p]=E.radius,P.fillColor[h]=E.fillColor.r,P.fillColor[h+1]=E.fillColor.g,P.fillColor[h+2]=E.fillColor.b,P.fillOpacity[p]=E.fillOpacity,P.strokeColor[h]=E.strokeColor.r,P.strokeColor[h+1]=E.strokeColor.g,P.strokeColor[h+2]=E.strokeColor.b,P.strokeOpacity[p]=E.strokeOpacity,P.strokeWidth[p]=E.strokeWidth,P.symbol[p]=E.symbolComputed,P.symbolValue[p]=E.symbolValue,P.rotation[p]=E.rotation}if(y._primitiveShapeAuto){var L=y._approximateMaxRadius(y.renderer().map().zoom());if(y._primitiveShape===a.primitiveShapes.sprite&&L>s._maxPointSize||y._primitiveShape!==a.primitiveShapes.sprite&&L<=s._maxPointSize)return y._primitiveShape=L>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,y.renderer().contextRenderer().removeActor(x),x=null,y._init(!0),void T()}e?Object.keys(P).forEach((function(e){return w.updateSourceBuffer(e)})):(R.boundsDirty(!0),w.modified(),w.boundsDirtyTimestamp().modified())}return c(y,t),this.actors=function(){return x?[x]:[]},this.updateStyleFromArray=function(e,t,n){var i,o,a={fillColor:3,fillOpacity:1,radius:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbolComputed:1,symbolValueComputed:1};if("string"==typeof e){var s={};s[e]=t,e=s}return r.each(e,(function(e,t){var n,r,s,l,u,c,d,f,p,h;if(y.visible()&&x&&a[e]&&!i&&!y.clustering())if(p=a[e],l=y.data().length,h="symbolComputed"===e?"symbol":"symbolValueComputed"===e?"symbolValue":e,s=(r=x.mapper()).getSourceBuffer(h),n=y.verticesPerFeature(),s&&l&&l*n*p===s.length){switch(a[e]){case 1:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=1)s[f]=u;break;case 3:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=3)s[f]=u.r,s[f+1]=u.g,s[f+2]=u.b}r.updateSourceBuffer(h),o=!0}else i=!0;else i=!0;if(e===h){var m=y.modified;i||(y.modified=function(){}),A(e,t,!1),y.modified=m}})),n&&(y.visible()&&i?y.draw():o&&y.renderer()._render()),y},this._handleZoom=function(e){y._primitiveShapeAuto&&y._primitiveShape===a.primitiveShapes.sprite&&y._approximateMaxRadius(e)>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(e){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?m:h),r),l=function(){var e=new i.shader(i.GL.FRAGMENT_SHADER);return e.setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?p:f),e}(),u=i.material(),c=i.blend(),b=i.geometryData(),C=i.sourceDataP3fv({name:"pos"}),A={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbol:1,symbolValue:1,rotation:1},T={pixelWidth:i.GL.FLOAT,aspect:i.GL.FLOAT,zoom:i.GL.FLOAT,rotationUniform:i.GL.FLOAT},P=new i.projectionUniform("projectionMatrix");g=new i.modelViewOriginUniform("modelViewMatrix",v),y._primitiveShape===a.primitiveShapes.sprite?n=new i.points:(n=new i.triangles,A.unit=2),n.setIndices(new Uint16Array),e||S.call(y,t),w=i.mapper(),o.addVertexAttribute(i.vertexAttribute("pos"),i.vertexAttributeKeys.Position),b.addSource(C),Object.keys(A).forEach((function(e,t){o.addVertexAttribute(i.vertexAttribute(e),t+1),b.addSource(i.sourceDataAnyfv(A[e],t+1,{name:e}))})),_={},Object.keys(T).forEach((function(e){_[e]=new i.uniform(T[e],e),o.addUniform(_[e])})),o.addUniform(g),o.addUniform(P),o.addShader(l),o.addShader(s),u.addAttribute(o),u.addAttribute(c),(x=i.actor()).setMaterial(u),x.setMapper(w),b.addPrimitive(n),b.computeBounds=function(){b.setBounds(0,0,0,0,0,0)},w.setGeometryData(b),e||y.geoOn(d.zoom,(function(e){y._handleZoom(e.zoomLevel)}))},this._build=function(){return T(y.dataTime().timestamp()<y.buildTime().timestamp()),y.renderer().contextRenderer().hasActor(x)||y.renderer().contextRenderer().addActor(x),y.buildTime().modified(),y},this._update=function(){return C.call(y),(y.dataTime().timestamp()>=y.buildTime().timestamp()||y.updateTime().timestamp()<y.timestamp())&&y._build(),_.pixelWidth.set(2/y.renderer().width()),_.aspect.set(y.renderer().width()/y.renderer().height()),_.zoom.set(y.renderer().map().zoom()),_.rotationUniform.set(y.renderer().map().rotation()),x.setVisible(y.visible()),x.material().setBinNumber(y.bin()),y.updateTime().modified(),y},this._exit=function(){y.renderer().contextRenderer().removeActor(x),x=null,_={},b()},y._init(),this};i(l,a);o("webgl","marker",l,{}),e.exports=l},5651:function(e,t,n){e.exports=function(e){"use strict";e=e||{};var t=n(320),r=n(6853),i=n(4634),o=n(4351),a=n(5836);n(7719).call(this);var s,l,u=this,c=this._exit,d=null,f=null,p=null,h=null,m=null,g=null,v=null,y=null,b=void 0!==e.dynamicDraw&&e.dynamicDraw,x=this._init,w=this._update;function _(){var e=new t.shader(t.GL.VERTEX_SHADER);return e.setShaderSource(a),e}function S(){var e=new t.shader(t.GL.FRAGMENT_SHADER);return e.setShaderSource(o),e}return this.createGLMeshColored=function(e){var t,n,o,a,c,d,p,b,x,w=e.elements.length,_=[],S=f.geometryData();for(m.set([e.minColor.r,e.minColor.g,e.minColor.b,e.minColor.a]),g.set([e.maxColor.r,e.maxColor.g,e.maxColor.b,e.maxColor.a]),v.set(e.colorMap.length),y.set(e.stepped),t=-1;t<e.colorMap.length+1;t+=1)o=Math.max(0,Math.min(e.colorMap.length-1,t)),_.push(255*e.colorMap[o].r),_.push(255*e.colorMap[o].g),_.push(255*e.colorMap[o].b),_.push(255*e.colorMap[o].a);if(h.setColorTable(_),e.pos=r.transformCoordinates(u.gcs(),u.layer().map().gcs(),e.pos,3),(s=new Float32Array(u.style.get("origin")(e.pos)))[0]||s[1]||s[2])for(t=0;t<e.pos.length;t+=3)e.pos[t]-=s[0],e.pos[t+1]-=s[1],e.pos[t+2]-=s[2];for(l.setOrigin(s),d=i.getGeomBuffer(S,"pos",3*w),p=i.getGeomBuffer(S,"opacity",w),b=i.getGeomBuffer(S,"value",w),t=n=0;t<w;t+=1,n+=3)a=3*(o=e.elements[t]),d[n]=e.pos[a],d[n+1]=e.pos[a+1],d[n+2]=e.pos[a+2],c=e.elementValues?Math.floor(t/3):o,p[t]=e.opacity[c],b[t]=e.value[c];(x=S.primitive(0).indices())instanceof Uint16Array&&x.length===w||(x=new Uint16Array(w),S.primitive(0).setIndices(x)),S.boundsDirty(!0),f.modified(),f.boundsDirtyTimestamp().modified()},this._init=function(e){var n=t.blend(),r=t.shaderProgram(),i=t.material(),o=t.lookupTable(),a=t.geometryData(),s=new t.projectionUniform("projectionMatrix"),c=new t.uniform(t.GL.INT,"sampler2d"),w=_(),C=S(),A=t.vertexAttribute("pos"),T=t.vertexAttribute("value"),P=t.vertexAttribute("opacity"),E=t.sourceDataP3fv({name:"pos"}),O=t.sourceDataAnyfv(1,t.vertexAttributeKeysIndexed.One,{name:"value"}),M=t.sourceDataAnyfv(1,t.vertexAttributeKeysIndexed.Two,{name:"opacity"}),D=new t.triangles;l=new t.modelViewOriginUniform("modelViewMatrix"),x.call(u,e),f=t.mapper({dynamicDraw:b}),r.addVertexAttribute(A,t.vertexAttributeKeys.Position),r.addVertexAttribute(T,t.vertexAttributeKeysIndexed.One),r.addVertexAttribute(P,t.vertexAttributeKeysIndexed.Two),r.addUniform(l),r.addUniform(s),m=new t.uniform(t.GL.FLOAT_VEC4,"minColor"),r.addUniform(m),g=new t.uniform(t.GL.FLOAT_VEC4,"maxColor"),r.addUniform(g),v=new t.uniform(t.GL.FLOAT,"steps"),r.addUniform(v),y=new t.uniform(t.GL.BOOL,"stepped"),r.addUniform(y),r.addShader(C),r.addShader(w),r.addUniform(c),o.setTextureUnit(7),c.set(7),(p=i).addAttribute(r),p.addAttribute(n),h=o,p.addAttribute(h),(d=t.actor()).setMaterial(p),d.setMapper(f),a.addSource(E),a.addSource(O),a.addSource(M),a.addPrimitive(D),a.computeBounds=function(){a.setBounds(0,0,0,0,0,0)},f.setGeometryData(a)},this.actors=function(){return d?[d]:[]},this._update=function(){w.call(u),(u.dataTime().timestamp()>=u.buildTime().timestamp()||u.updateTime().timestamp()<=u.timestamp())&&u._build(),d.setVisible(u.visible()),d.material().setBinNumber(u.bin()),u.updateTime().modified()},this._exit=function(){u.renderer().contextRenderer().removeActor(d),c()},this}},7719:function(e,t,n){e.exports=function e(t){"use strict";if(!(this instanceof n(3737)))return new e(t);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(e,t){if(void 0===e&&!t&&null===o(void 0,!0)){var n=r.layer&&r.layer(),i=n&&n.map&&n.map(),a=i&&i.listSceneObjects()||[],s=a.indexOf(r);if(s>=0)return s}return o.apply(r,arguments)}}return this}},9685:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6374),a=n(8672),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(7719).call(this);var r,i,l,u=n(320),c=n(3953),d=this._exit,f=this;return this.pointSearch=function(e,t){if(r&&f.m_info)for(var n=r.pointSearch(e,t),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),l=Math.floor(a.y*o.height),u=document.createElement("canvas");u.width=u.height=1;var c=u.getContext("2d");c.drawImage(o,s,l,1,1,0,0,1,1);var d=c.getImageData(0,0,1,1).data,p=d[0]+256*d[1]+256*d[2]*256;return n={index:[p],found:[f.data()[p]]}}return{index:[],found:[]}},this._computePixelmap=function(){var e=f.data()||[],t=f.style.get("color"),n=f.indexModified(void 0,"clear"),o=f.dataTime().timestamp()>=f.buildTime().timestamp()||void 0===n;l||((l=a()).setTextureUnit(1),o=!0);var d,p=Math.max(1,e.length),h=l.maxWidth();p>h&&p%h&&(p+=h-p%h),o||(o=(d=l.colorTable()).length!==4*p,n[0]=Math.max(0,n[0]),n[1]=Math.min(e.length,n[1]+1)),o&&(d=new Uint8Array(4*p),n=[0,e.length]);for(var m=n[0];m<n[1];m+=1){var g=e[m],v=s.convertColor(t.call(f,g,m));d[4*m]=255*v.r,d[4*m+1]=255*v.g,d[4*m+2]=255*v.b,d[4*m+3]=void 0===v.a?255:255*v.a}f.m_info={colors:d};var y=l.colorTable();if(y&&y.length===d.length){for(var b=4*n[0];b<4*n[1]&&d[b]===y[b];b+=1);if(b===4*n[1])return}l.colorTable(d),r||(r=f.layer().createFeature("quad",{selectionAPI:!1,gcs:f.gcs(),visible:f.visible(void 0,!0)}),i=!1),i||(f.dependentFeatures([r]),r.setShader("image_fragment",c),r._hookBuild=function(e){var t=new u.uniform(u.GL.INT,"lutSampler");t.set(l.textureUnit()),e.addUniform(t);var n=new u.uniform(u.GL.INT,"lutWidth");n.set(l.width),e.addUniform(n);var r=new u.uniform(u.GL.INT,"lutHeight");r.set(l.height),e.addUniform(r)},r._hookRenderImageQuads=function(e,t){t.forEach((function(e){e.image&&e.texture&&!e.texture.nearestPixel()&&e.texture.setNearestPixel(!0)})),l.bind(e,t)},!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([])),d(),f},t.quadFeature&&(r=t.quadFeature),this._init(t),this};r(l,o);var u={};u[o.capabilities.lookup]=!0,i("webgl","pixelmap",l,u),e.exports=l},5675:function(e,t,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(2557),s=n(2254),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var i=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(1815),f=n(4900),p=n(9713),h=n(8410);u.call(this);var m,g,v=this,y=this._exit,b=null,x=null,w=null,_=null,S=void 0!==t.dynamicDraw&&t.dynamicDraw,C=this._init,A=this._update,T=this.updateStyleFromArray;function P(e){var t,n,r,i,u,c,d,f,p,h,y,w,_,S,C,A,T,E,O,M,D,k,I,R,N,F,L,B,V,j,z,G,U,W,H,q,X=v.data().length,K=v._pointPolygon(0,0,1,1),Z=new Array(3*X),Y=v.verticesPerFeature(),J=v.data(),Q=0,$=x.geometryData();if(u=v.position(),h=v.style.get("radius"),_=v.style.get("stroke"),A=v.style.get("strokeWidth"),O=v.style.get("strokeOpacity"),k=v.style.get("strokeColor"),N=v.style.get("fill"),B=v.style.get("fillOpacity"),z=v.style.get("fillColor"),!e){for(t=q=0;t<X;t+=1,q+=3)i=u(J[t],t),Z[q]=i.x,Z[q+1]=i.y,Z[q+2]=0;if(Z=o.transformCoordinates(v.gcs(),v.layer().map().gcs(),Z,3),(g=new Float32Array(v.style.get("origin")(Z)))[0]||g[1]||g[2])for(t=q=0;t<X;t+=1,q+=3)Z[q]-=g[0],Z[q+1]-=g[1],Z[q+2]-=g[2];m.setOrigin(g),r=l.getGeomBuffer($,"pos",Y*X*3),c=l.getGeomBuffer($,"unit",Y*X*2),(d=$.primitive(0).indices())instanceof Uint16Array&&d.length===Y*X||(d=new Uint16Array(Y*X),$.primitive(0).setIndices(d))}for(f=l.getGeomBuffer($,"radius",Y*X),y=l.getGeomBuffer($,"stroke",Y*X),S=l.getGeomBuffer($,"strokeWidth",Y*X),T=l.getGeomBuffer($,"strokeOpacity",Y*X),M=l.getGeomBuffer($,"strokeColor",Y*X*3),I=l.getGeomBuffer($,"fill",Y*X),F=l.getGeomBuffer($,"fillOpacity",Y*X),V=l.getGeomBuffer($,"fillColor",Y*X*3),t=U=W=H=q=0;t<X;t+=1,q+=3){if(G=J[t],!e&&v._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<K.length;n+=1,H+=1)c[H]=K[n];for(p=h(G,t),w=_(G,t)?1:0,C=A(G,t),E=O(G,t),D=k(G,t),R=N(G,t)?1:0,L=B(G,t),j=z(G,t),v._primitiveShapeAuto&&(R&&L||w&&E)&&p+(w&&E?C:0)>Q&&(Q=p+(w&&E?C:0)),n=0;n<Y;n+=1,U+=1,W+=3)e||(r[W]=Z[q],r[W+1]=Z[q+1],r[W+2]=Z[q+2]),f[U]=p,y[U]=w,S[U]=C,T[U]=E,M[W]=D.r,M[W+1]=D.g,M[W+2]=D.b,I[U]=R,F[U]=L,V[W]=j.r,V[W+1]=j.g,V[W+2]=j.b}if(v._primitiveShapeAuto&&(v._primitiveShape===a.primitiveShapes.sprite&&Q>s._maxPointSize||v._primitiveShape!==a.primitiveShapes.sprite&&Q<=s._maxPointSize))return v._primitiveShape=Q>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,v.renderer().contextRenderer().removeActor(b),b=null,v._init(!0),void P();e?(x.updateSourceBuffer("radius"),x.updateSourceBuffer("stroke"),x.updateSourceBuffer("strokeWidth"),x.updateSourceBuffer("strokeColor"),x.updateSourceBuffer("strokeOpacity"),x.updateSourceBuffer("fill"),x.updateSourceBuffer("fillColor"),x.updateSourceBuffer("fillOpacity")):($.boundsDirty(!0),x.modified(),x.boundsDirtyTimestamp().modified())}return c(v,t),this.actors=function(){return b?[b]:[]},this.updateStyleFromArray=function(e,t,n){var i,o,a={fill:"bool",fillColor:3,fillOpacity:1,radius:1,stroke:"bool",strokeColor:3,strokeOpacity:1,strokeWidth:1};if("string"==typeof e){var s={};s[e]=t,e=s}return r.each(e,(function(e,t){var n,r,s,l,u,c,d,f,p;if(v.visible()&&b&&a[e]&&!i&&!v.clustering())if(p="bool"===a[e]?1:a[e],l=v.data().length,s=(r=b.mapper()).getSourceBuffer(e),n=v.verticesPerFeature(),s&&l&&l*n*p===s.length){switch(a[e]){case 1:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=1)s[f]=u;break;case 3:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=3)s[f]=u.r,s[f+1]=u.g,s[f+2]=u.b;break;case"bool":for(c=0,f=0;c<l;c+=1)for(u=t[c]?1:0,d=0;d<n;d+=1,f+=1)s[f]=u}r.updateSourceBuffer(e),o=!0}else i=!0;else i=!0;var h=v.modified;i||(v.modified=function(){}),T(e,t,!1),v.modified=h})),n&&(v.visible()&&i?v.draw():o&&v.renderer()._render()),v},this._init=function(e){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?h:p),r),l=function(){var e=new i.shader(i.GL.FRAGMENT_SHADER);return e.setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?f:d),e}(),u=i.vertexAttribute("pos"),c=i.vertexAttribute("unit"),y=i.vertexAttribute("radius"),A=i.vertexAttribute("strokeWidth"),T=i.vertexAttribute("fillColor"),P=i.vertexAttribute("fill"),E=i.vertexAttribute("strokeColor"),O=i.vertexAttribute("stroke"),M=i.vertexAttribute("fillOpacity"),D=i.vertexAttribute("strokeOpacity"),k=new i.projectionUniform("projectionMatrix"),I=i.material(),R=i.blend(),N=i.geometryData(),F=i.sourceDataP3fv({name:"pos"}),L=i.sourceDataAnyfv(2,i.vertexAttributeKeysIndexed.One,{name:"unit"}),B=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Two,{name:"radius"}),V=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"strokeWidth"}),j=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Four,{name:"fillColor"}),z=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Five,{name:"fill"}),G=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Six,{name:"strokeColor"}),U=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Seven,{name:"stroke"}),W=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Eight,{name:"fillOpacity"}),H=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),w=new i.floatUniform("pixelWidth",2/v.renderer().width()),_=new i.floatUniform("aspect",v.renderer().width()/v.renderer().height()),e||C.call(v,t),x=i.mapper({dynamicDraw:S}),o.addVertexAttribute(u,i.vertexAttributeKeys.Position),v._primitiveShape!==a.primitiveShapes.sprite&&o.addVertexAttribute(c,i.vertexAttributeKeysIndexed.One),o.addVertexAttribute(y,i.vertexAttributeKeysIndexed.Two),o.addVertexAttribute(A,i.vertexAttributeKeysIndexed.Three),o.addVertexAttribute(T,i.vertexAttributeKeysIndexed.Four),o.addVertexAttribute(P,i.vertexAttributeKeysIndexed.Five),o.addVertexAttribute(E,i.vertexAttributeKeysIndexed.Six),o.addVertexAttribute(O,i.vertexAttributeKeysIndexed.Seven),o.addVertexAttribute(M,i.vertexAttributeKeysIndexed.Eight),o.addVertexAttribute(D,i.vertexAttributeKeysIndexed.Nine),o.addUniform(w),o.addUniform(_),o.addUniform(m),o.addUniform(k),o.addShader(l),o.addShader(s),I.addAttribute(o),I.addAttribute(R),(b=i.actor()).setMaterial(I),b.setMapper(x),N.addSource(F),N.addSource(L),N.addSource(B),N.addSource(V),N.addSource(j),N.addSource(z),N.addSource(G),N.addSource(U),N.addSource(W),N.addSource(H),N.addPrimitive(n),N.computeBounds=function(){N.setBounds(0,0,0,0,0,0)},x.setGeometryData(N)},this._build=function(){return P(v.dataTime().timestamp()<v.buildTime().timestamp()),v.renderer().contextRenderer().hasActor(b)||v.renderer().contextRenderer().addActor(b),v.buildTime().modified(),v},this._update=function(){return A.call(v),(v.dataTime().timestamp()>=v.buildTime().timestamp()||v.updateTime().timestamp()<v.timestamp())&&v._build(),w.set(2/v.renderer().width()),_.set(v.renderer().width()/v.renderer().height()),b.setVisible(v.visible()),b.material().setBinNumber(v.bin()),v.updateTime().modified(),v},this._exit=function(){v.renderer().contextRenderer().removeActor(b),b=null,y()},v._init(),this};i(l,a);var u={};u[a.capabilities.stroke]=!0,o("webgl","point",l,u),e.exports=l},9892:function(e,t,n){var r=n(2557);e.exports=function(e,t){t=t||{},e._primitiveShapeAuto=!0,e._primitiveShape=r.primitiveShapes.auto,void 0!==r.primitiveShapes[t.primitiveShape]&&(e._primitiveShape=t.primitiveShape),e._primitiveShapeAuto=e._primitiveShape===r.primitiveShapes.auto,e._primitiveShapeAuto&&(e._primitiveShape=r.primitiveShapes.sprite,e._primitiveShapeAuto=!0),e._pointPolygon=function(t,n,i,o){var a;switch(e._primitiveShape){case r.primitiveShapes.triangle:a=[t,n-2*o,t-i*Math.sqrt(3),n+o,t+i*Math.sqrt(3),n+o];break;case r.primitiveShapes.square:a=[t-i,n+o,t-i,n-o,t+i,n+o,t-i,n-o,t+i,n-o,t+i,n+o];break;default:a=[t,n]}return a},e.verticesPerFeature=function(){return e._pointPolygon(0,0,1,1).length/2},e.primitiveShape=function(t,n){if(void 0===t)return n||!e._primitiveShapeAuto?e._primitiveShape:r.primitiveShapes.auto;if(void 0!==r.primitiveShapes[t]){var i=!1;t===r.primitiveShapes.auto?(i=!e._primitiveShapeAuto,e._primitiveShapeAuto=!0):(i=e._primitiveShapeAuto||e._primitiveShape!==t,e._primitiveShapeAuto=!1,e._primitiveShape=t),i&&(e.renderer().contextRenderer().removeActor(e.actors()[0]),e._init(!0),e.dataTime().modified())}return e}}},2890:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4343),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(320),i=n(1106),a=n(6853),s=n(4634),l=n(7719),u=n(1859),c=n(5810);l.call(this);var d,f,p,h,m,g=this,v=this._exit,y=r.actor(),b=r.mapper(),x=r.material(),w=this._init,_=this._update;function S(){var e=new r.shader(r.GL.VERTEX_SHADER);return e.setShaderSource(c),e}function C(){var e=new r.shader(r.GL.FRAGMENT_SHADER);return e.setShaderSource(u),e}return this._init=function(e){var t=r.shaderProgram(),n=r.vertexAttribute("pos"),i=r.vertexAttribute("fillColor"),o=r.vertexAttribute("fillOpacity"),a=new r.projectionUniform("projectionMatrix"),s=S(),l=C(),u=r.blend(),c=r.geometryData(),d=r.sourceDataP3fv({name:"pos"}),f=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"fillColor"}),h=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"fillOpacity"}),m=r.triangles();p=new r.modelViewOriginUniform("modelViewMatrix"),t.addVertexAttribute(n,r.vertexAttributeKeys.Position),t.addVertexAttribute(i,r.vertexAttributeKeysIndexed.Two),t.addVertexAttribute(o,r.vertexAttributeKeysIndexed.Three),t.addUniform(p),t.addUniform(a),t.addShader(l),t.addShader(s),x.addAttribute(t),x.addAttribute(u),y.setMaterial(x),y.setMapper(b),c.addSource(d),c.addSource(f),c.addSource(h),c.addPrimitive(m),c.computeBounds=function(){c.setBounds(0,0,0,0,0,0)},b.setGeometryData(c),w.call(g,e)},this.actors=function(){return[y]},this._build=function(){!function(e){var t,n,r,o,l,u,c,h,m,v,y,x,w,_,S,C,A,T,P,E,O,M,D,k,I,R,N,F,L=[],B=g.gcs(),V=g.layer().map().gcs(),j=0,z=b.geometryData();for(l=g.style.get("fillColor"),u=s.isFunction(g.style("fillColor"))?void 0:l(),h=g.style.get("fillOpacity"),m=s.isFunction(g.style("fillOpacity"))?void 0:h(),v=g.style.get("fill"),y=s.isFunction(g.style("fill"))?void 0:v(),x=g.style.get("uniformPolygon"),e?(L=d.items,j=d.numPts):(n=g.style.get("position"),r=g.style.get("polygon"),g.data().forEach((function(e,t){var o,s,l,u;if((o=r(e,t))&&!((s=o.outer||(Array.isArray(o)?o:[])).length<3)){for(l=new Array(3*s.length),O=P=0;O<s.length;O+=1,P+=3)u=n(s[O],O,e,t),l[P]=u.x,l[P+1]=u.y,l[P+2]=0;l={vertices:l,dimensions:3,holes:[]},F=s,o.inner&&o.inner.forEach((function(r){if(!(r.length<3))for(F=F.concat(r),l.holes.push(P/3),O=0;O<r.length;O+=1,P+=3)u=n(r[O],O,e,t),l.vertices[P]=u.x,l.vertices[P+1]=u.y,l.vertices[P+2]=0})),l.vertices=a.transformCoordinates(B,V,l.vertices,l.dimensions),(I={triangles:i(l.vertices,l.holes,l.dimensions),vertices:l.vertices,original:F,item:e,itemIndex:t}).triangles.length&&(L.push(I),j+=I.triangles.length)}})),t=s.getGeomBuffer(z,"pos",3*j),(_=z.primitive(0).indices())instanceof Uint16Array&&_.length===j||(_=new Uint16Array(j),z.primitive(0).setIndices(_)),d={items:L,numPts:j},f=new Float32Array(g.style.get("origin")(L)),p.setOrigin(f)),o=s.getGeomBuffer(z,"fillColor",3*j),c=s.getGeomBuffer(z,"fillOpacity",j),T=P=0,S=u,A=y,D=0;D<L.length;D+=1)if(k=L[D].triangles.length,E=L[D].vertices,R=L[D].item,N=L[D].itemIndex,F=L[D].original,C=m,(w=x(R,N))&&(void 0===u&&(S=l(E[0],0,R,N)),void 0===m&&(C=h(E[0],0,R,N))),void 0===y&&(A=v(R,N)),A||(C=0),w&&e&&L[D].uniform&&L[D].color&&S.r===L[D].color.r&&S.g===L[D].color.g&&S.b===L[D].color.b&&C===L[D].opacity)T+=k,P+=3*k;else{for(O=0;O<k;O+=1,T+=1,P+=3)e&&w?(o[P]=S.r,o[P+1]=S.g,o[P+2]=S.b,c[T]=C):(M=3*L[D].triangles[O],e||(t[P]=E[M]-f[0],t[P+1]=E[M+1]-f[1],t[P+2]=E[M+2]-f[2],_[T]=O),w||void 0!==u||(S=l(F[M],M,R,N)),o[P]=S.r,o[P+1]=S.g,o[P+2]=S.b,!w&&A&&void 0===m&&(C=h(F[M],M,R,N)),c[T]=C);(w||L[D].uniform)&&(L[D].uniform=w,L[D].color=S,L[D].opacity=C)}e?(b.updateSourceBuffer("fillOpacity"),b.updateSourceBuffer("fillColor")):(b.modified(),z.boundsDirty(!0),b.boundsDirtyTimestamp().modified())}(!!(g.dataTime().timestamp()<g.buildTime().timestamp()&&d)),g.renderer().contextRenderer().hasActor(y)||(g.renderer().contextRenderer().addActor(y),h=!0),g.buildTime().modified()},this._update=function(e){g.ready&&(e&&e.mayDelay&&h?m=g.layer().map().scheduleAnimationFrame(g._update):(m&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),_.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(t),this};r(a,o),i("webgl","polygon",a),e.exports=a},2182:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=n(6618),s=16777216,l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t);var r=n(5638),i=n(320),l=n(7719),u=n(7521),c=n(5804),d=n(630),f=n(1899);l.call(this);var p,h,m,g,v,y,b,x=this,w=this._exit,_=this._update,S={},C=a(),A=a();function T(e){var t=new i.mapper({dynamicDraw:!0});return t.s_modified=t.modified,t.g_timestamp=a(),t.timestamp=t.g_timestamp.timestamp,t.modified=function(){return t.s_modified(),t.g_timestamp.modified(),t},t.s_render=t.render,t.render=e,t}return this.actors=function(){var e=[];return h&&e.push(h),m&&e.push(m),e},this._build=function(){var e,t,n,r,o,a,s,l,w;x.position()&&((b=x._generateQuads()).imgQuads.length&&!h&&(x.visible(!1),e=T(x._renderImageQuads),(h=new i.actor).setMapper(e),t=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",b.origin),n.addUniform(p),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),(w=new i.uniform(i.GL.INT,"sampler2d")).set(0),n.addUniform(w),l=x.renderer()._glContext(),(o=new i.uniform(l.FLOAT_VEC2,"crop")).set([1,1]),n.addUniform(o),(a=new i.uniform(l.FLOAT_VEC4,"cropsource")).set([0,0,0,0]),n.addUniform(a),n.addShader(i.getCachedShader(l.VERTEX_SHADER,l,c)),n.addShader(i.getCachedShader(l.FRAGMENT_SHADER,l,u)),x._hookBuild&&x._hookBuild(n),t.addAttribute(n),t.addAttribute(new i.blend),s=new i.geometryData,g=void 0,(r=new i.sourceDataT2fv).pushBack([0,0,1,0,0,1,1,1]),s.addSource(r),e.setGeometryData(s),h.setMaterial(t),x.renderer().contextRenderer().addActor(h),x.visible(!0)),b.clrQuads.length&&!m&&(x.visible(!1),e=T(x._renderColorQuads),(m=new i.actor).setMapper(e),t=new i.material,(n=new i.shaderProgram).addVertexAttribute(new i.vertexAttribute("vertexPosition"),i.vertexAttributeKeys.Position),y=new i.modelViewOriginUniform("modelViewMatrix",b.origin),n.addUniform(y),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),l=x.renderer()._glContext(),n.addUniform(new i.uniform(l.FLOAT_VEC3,"vertexColor")),n.addShader(i.getCachedShader(l.VERTEX_SHADER,l,f)),n.addShader(i.getCachedShader(l.FRAGMENT_SHADER,l,d)),t.addAttribute(n),t.addAttribute(new i.blend),s=new i.geometryData,v=void 0,e.setGeometryData(s),m.setMaterial(t),x.renderer().contextRenderer().addActor(m),x.visible(!0)),p&&p.setOrigin(b.origin),y&&y.setOrigin(b.origin),x._updateTextures(),x.buildTime().modified())},this._updateTextures=function(){var e;r.each(b.imgQuads,(function(t,n){n.image&&(n.image._texture?n.texture=n.image._texture:((e=new i.texture).setImage(n.image),n.texture=n.image._texture=e))}))},this._renderColorQuads=function(e){if(b.clrQuads.length){var t=this;(t.timestamp()>A.timestamp()||x.dataTime().timestamp()>A.timestamp()||e.m_contextChanged||!v||12*b.clrQuads.length>v.length)&&function(e){var t=e.m_context,n=!1;b.clrQuads.length&&((!v||v.length<12*b.clrQuads.length||!S.clrQuadsPosition)&&(S.clrQuadsPosition&&t.deleteBuffer(S.clrQuadsPosition),S.clrQuadsPosition=t.createBuffer(),v=new Float32Array(12*Math.max(128,2*b.clrQuads.length)),n=!0),r.each(b.clrQuads,(function(e,t){for(var n=0;n<12;n+=1)v[12*e+n]=t.pos[n]-b.origin[n%3]})),t.bindBuffer(t.ARRAY_BUFFER,S.clrQuadsPosition),n?t.bufferData(t.ARRAY_BUFFER,v,t.DYNAMIC_DRAW):t.bufferSubData(t.ARRAY_BUFFER,0,v)),A.modified()}(e),t.s_render(e,!0);var n,o,a,s=e.m_context;s.bindBuffer(s.ARRAY_BUFFER,S.clrQuadsPosition),r.each(b.clrQuads,(function(t,r){r.opacity!==n&&(n=r.opacity,s.uniform1fv(e.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,s.uniform1fv(e.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(e.m_material.shaderProgram().uniformLocation("vertexColor"),new Float32Array([a.r,a.g,a.b]))),s.bindBuffer(s.ARRAY_BUFFER,S.clrQuadsPosition),s.vertexAttribPointer(i.vertexAttributeKeys.Position,3,s.FLOAT,!1,12,12*t*4),s.enableVertexAttribArray(i.vertexAttributeKeys.Position),s.drawArrays(s.TRIANGLE_STRIP,0,4)})),s.bindBuffer(s.ARRAY_BUFFER,null),t.undoBindVertexData(e)}},this._renderImageQuads=function(e){if(b.imgQuads.length){var t=this;(t.timestamp()>C.timestamp()||x.dataTime().timestamp()>C.timestamp()||e.m_contextChanged||!g||12*b.imgQuads.length>g.length)&&function(e){var t=e.m_context,n=!1;b.imgQuads.length&&((!g||g.length<12*b.imgQuads.length||!S.imgQuadsPosition)&&(S.imgQuadsPosition&&t.deleteBuffer(S.imgQuadsPosition),S.imgQuadsPosition=t.createBuffer(),g=new Float32Array(12*Math.max(128,2*b.imgQuads.length)),n=!0),r.each(b.imgQuads,(function(e,t){for(var n=0;n<12;n+=1)g[12*e+n]=t.pos[n]-b.origin[n%3]})),t.bindBuffer(t.ARRAY_BUFFER,S.imgQuadsPosition),n?t.bufferData(t.ARRAY_BUFFER,g,t.DYNAMIC_DRAW):t.bufferSubData(t.ARRAY_BUFFER,0,g)),C.modified()}(e),t.s_render(e,!0);var n,o,a,l,u,c,d,f,p=e.m_context,h={x:1,y:1},m={x0:0,y0:0,x1:1,y1:1};x._hookRenderImageQuads&&x._hookRenderImageQuads(e,b.imgQuads),p.bindBuffer(p.ARRAY_BUFFER,S.imgQuadsPosition),r.each(b.imgQuads,(function(t,r){r.image&&(r.texture.bind(e),r.image.width*r.image.height>s&&(s=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(e.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,p.uniform1fv(e.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a=r.crop||{x:1,y:1},h&&a.x===h.x&&a.y===h.y||(h=a,p.uniform2fv(e.m_material.shaderProgram().uniformLocation("crop"),new Float32Array([h.x||1,h.y||1]))),u=r.image.width,c=r.image.height,l=r.crop||{left:0,top:0,right:u,bottom:c},m&&l.left===m.left&&l.top===m.top&&l.right===m.right&&l.bottom===m.bottom&&d===u&&f===c||(m=l,d=u,f=c,p.uniform4fv(e.m_material.shaderProgram().uniformLocation("cropsource"),new Float32Array([m.left/u,m.top/c,m.right/u,m.bottom/c]))),p.bindBuffer(p.ARRAY_BUFFER,S.imgQuadsPosition),p.vertexAttribPointer(i.vertexAttributeKeys.Position,3,p.FLOAT,!1,12,12*t*4),p.enableVertexAttribArray(i.vertexAttributeKeys.Position),p.drawArrays(p.TRIANGLE_STRIP,0,4),r.texture.undoBind(e))})),p.bindBuffer(p.ARRAY_BUFFER,null),t.undoBindVertexData(e)}},this._update=function(){_.call(x),(x.buildTime().timestamp()<=x.dataTime().timestamp()||x.updateTime().timestamp()<x.timestamp())&&x._build(),m&&(m.setVisible(x.visible()),m.material().setBinNumber(x.bin())),h&&(h.setVisible(x.visible()),h.material().setBinNumber(x.bin())),x.updateTime().modified()},this._cleanup=function(){h&&(x.renderer().contextRenderer().removeActor(h),h=null),m&&(x.renderer().contextRenderer().removeActor(m),m=null),g=void 0,v=void 0,Object.keys(S).forEach((function(e){delete S[e]})),b&&b.imgQuads&&(b.imgQuads.forEach((function(e){e.texture&&(delete e.texture,delete e.image._texture)})),x._updateTextures()),x.modified()},this.setShader=function(e,t){switch(e){case"image_vertex":c=t;break;case"image_fragment":u=t;break;case"color_vertex":f=t;break;case"color_fragment":d=t;break;default:return}return x},this._exit=function(){x._cleanup(),w.call(x)},x._init(t),this};r(l,o);var u={};u[o.capabilities.color]=!0,u[o.capabilities.image]=!0,u[o.capabilities.imageCrop]=!0,u[o.capabilities.imageFixedScale]=!1,u[o.capabilities.imageFull]=!0,u[o.capabilities.canvas]=!1,u[o.capabilities.video]=!1,i("webgl","quad",l,u),e.exports=l},7112:function(e,t,n){var r=n(4647).registerLayerAdjustment,i=n(1940),o=function(){"use strict";var e,t=n(5108),r=this,o=this._init,a=this._exit,s=this._update,l=this.visible,u=this.zIndex,c=0,d=[];this._drawTile=function(t){if(e){var n,o,a=r._tileBounds(t),s=t.index.level||0,l=r._tileOffset(s),u=r.tileCropFromBounds(t),f={},p=r.renderer().contextRenderer().m_depthBits;u&&(f.crop={x:u.x/r._options.tileWidth,y:u.y/r._options.tileHeight}),f.ul=r.fromLocal(r.fromLevel({x:a.left-l.x,y:a.top-l.y},s),0),f.ll=r.fromLocal(r.fromLevel({x:a.left-l.x,y:a.bottom-l.y},s),0),f.ur=r.fromLocal(r.fromLevel({x:a.right-l.x,y:a.top-l.y},s),0),f.lr=r.fromLocal(r.fromLevel({x:a.right-l.x,y:a.bottom-l.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(e){return e instanceof i}))).slice(o.indexOf(r)+1)).forEach((function(e){n+=e._options.keepLower?e._options.maxLevel-e._options.minLevel+1:1})),f.zOffset=n*Math.pow(2,-p)*i._zOffsetMultiple,c+=1,f.id=c,t.quadId=f.id,f.image=t.image,d.push(f),e.data(d),e._update(),r.draw()}},this._remove=function(t){if(void 0!==t.quadId&&e){for(var n=0;n<d.length;n+=1)if(d[n].id===t.quadId){d.splice(n,1);break}e.data(d),e._update(),r.draw()}},this.visible=function(t){return void 0===t?l():(r.visible()!==t&&(l(t),e&&e.visible(e.visible(void 0,!0),!0)),r)},this.zIndex=function(e,t){return void 0!==e&&r._clearQuads(),u.apply(r,arguments)},this._clearQuads=function(t){(!t||t.layer&&t.layer instanceof i)&&(r.clear(),e&&e.modified(),t&&r.draw())},this._update=function(t){return s.call(r,t),r._addBaseQuadToTiles(e,d),r},this._cleanup=function(){var e;if(r.cache&&r.cache._cache){for(var t in r.cache._cache)(e=r.cache._cache[t])._image&&e._image._texture&&delete e._image._texture;r.cache.clear()}r.clear()},this._exit=function(){var n=r.map();n.geoOff(t.layerAdd,r._clearQuads),n.geoOff(t.layerRemove,r._clearQuads),r._cleanup(),r.deleteFeature(e),e=null,d=[],a.apply(r,arguments)},this._init=function(){o.apply(r,arguments),(e=r.createFeature("quad",{previewColor:r._options.previewColor,previewImage:r._options.previewImage})).geoTrigger=void 0,e.gcs(r._options.gcs||r.map().gcs()),e.data(d),e._update();var n=r.map();n.geoOn(t.layerAdd,r._clearQuads),n.geoOn(t.layerRemove,r._clearQuads),r.geoOn(t.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),e.exports=o},506:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(7719).call(this),this._init(t),this):new e(t)};r(a,o),i("webgl","track",a),e.exports=a},2254:function(e,t,n){var r,i=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var r,i=n(5638),o=n(320),s=n(5240),l=n(4634),u=n(5108),c=this,d=null,f=null,p=!1,h=this._init,m=this._exit;return this.contextRenderer=function(){return d},this.api=function(){return e.apiname},this._init=function(){if(c.initialized())return c;h.call(c);var e=t.canvas||i(document.createElement("canvas"));if(e.addClass("webgl-canvas"),i(c.layer().node().get(0)).append(e),window.overrideContextAttributes){var n=e.get(0),r=n.getContext;n.getContext=function(e,t){if(t=t||{},window.overrideContextAttributes)for(var i in window.overrideContextAttributes)window.overrideContextAttributes.hasOwnProperty(i)&&(t[i]=window.overrideContextAttributes[i]);return r.call(n,e,t)}}(f=o.viewer(e.get(0),t.options)).init(),(d=f.renderWindow().activeRenderer()).setResetScene(!1),f.renderWindow().renderers().length>0&&d.setLayer(f.renderWindow().renderers().length),c.canvas(e);var a=c.layer().map().size();return c._resize(0,0,a.width,a.height),c},this._resize=function(e,t,n,r){var i=f.renderWindow();return e===i.windowPosition[0]&&t===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(e,t,n,r),p=!0,c._render()),c},this._render=function(){return c.layer().map().scheduleAnimationFrame(c._renderFrame,!0),c},this._renderFrame=function(){f&&(p&&(p=!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 e=new o.renderState;e.m_renderer=f,e.m_context=c._glContext(),f.exit(e),c._glContext()!==o.GL&&c._glContext().getExtension("WEBGL_lose_context")&&c._glContext().getExtension("WEBGL_lose_context").loseContext&&c._glContext().getExtension("WEBGL_lose_context").loseContext()}o.clearCachedShaders(o.GL),f=null,m()},this._updateRendererCamera=function(){var e=f.renderWindow(),t=c.layer().map(),n=t.camera(),i=t.rotation()||0,o=n.view,a=n.projectionMatrix;if(a[15])a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1,1,-.5]),a=s.translate(a,a,[0,0,n.clipbounds.far]);else{var u=n.clipbounds.near,d=n.clipbounds.far;a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1/u,1/u,-1/d])}var p=Math.PI/2,h=i%p,m=Math.min(Math.abs(h),Math.abs(h-p))<1e-5;e.renderers().forEach((function(e){var i=e.camera();if(!l.compareArrays(o,i.viewMatrix())||!l.compareArrays(a,i.projectionMatrix())||r!==t.zoom()){r=t.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 e={roundx:2/s.width,roundy:2/s.height};return e.dx=s.width%2?.5*e.roundx:0,e.dy=s.height%2?.5*e.roundy:0,e}}}))},c.layer().geoOn(u.pan,(function(e){p=!0})),c.layer().geoOn(u.parallelprojection,(function(e){var t=c.contextRenderer(),n=c.layer();if(e.geo&&e.geo._triggeredBy!==n){if(!t||!t.camera())return void console.log("Parallel projection event triggered on unconnected VGL renderer.");t.camera().setEnableParallelProjection(e.parallelProjection),p=!0}})),this};s.apiname="webgl",i(s,a),o("webgl",s),o("vgl",s),s.supported=function(){if(void 0===r){var e,t;try{(t=(e=document.createElement("canvas")).getContext("webgl")||e.getContext("experimental-webgl")).getSupportedExtensions().indexOf("WEBGL_debug_renderer_info")>=0&&(s._unmaskedRenderer=t.getParameter(t.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)),s._maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),s._maxPointSize=t.getParameter(t.ALIASED_POINT_SIZE_RANGE)[1],r=!0}catch(e){console.warn("No webGL support"),r=!1}e=void 0,t=void 0,void 0}return r},s.fallback=function(){return null},e.exports=s},9552:function(e){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},406:function(e,t,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([e.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.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,CCmfd,WAAO,CDjfP,yDAA8B,CAC9B,YAAQ,CCoeR,gCAAW,CDleX,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,4BC6cE,gBAAO,CDzcP,iCACE,UAAQ,CGhCV,aAAS,CHkCP,iBAAS,CCbG,6BAAG,CAAH,0BAAG,CARN,qBAAG,CDuBZ,MAAK,CACL,KAAI,CACJ,OAAM,CACN,QAAO,CIpDT,0BAAQ,CHmQV,SAAS,CAQH,eAAY,CACZ,WAAQ,CA5OE,6BAAG,CAAH,0BAAG,CAAH,wBAAG,CAAH,yBAAG,CARN,qBAAG,CDkCZ,iBAAW,CACb,uCACE,kBAAW,CC5BC,uCAAG,CAAH,oCAAG,CAAH,kCAAG,CAAH,mCAAG,CARN,+BAAG,CA2OhB,SAAS,CAWH,+DAAyE,CACzE,uBAAiC,CD/MzC,oBACE,iBAAS,CACT,yBExDE,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\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)\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 \"background-size\" support.\n */\n\nbackground-size()\n vendor('background-size', arguments, only: webkit moz official)\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:""}]),t.Z=a},7747:function(e,t,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([e.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:""}]),t.Z=a},1680:function(e,t,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([e.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:""}]),t.Z=a},3476:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);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)),t.push(c))}},t}},559:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;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," */"),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(a).concat([o]).join("\n")}return[t].join("\n")}},8725:function(e,t,n){var r,i;!function(){var o={version:"3.5.17"},a=[].slice,s=function(e){return a.call(e)},l=this.document;function u(e){return e&&(e.ownerDocument||e.document||e).documentElement}function c(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(e){s=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var d=this.Element.prototype,f=d.setAttribute,p=d.setAttributeNS,h=this.CSSStyleDeclaration.prototype,m=h.setProperty;d.setAttribute=function(e,t){f.call(this,e,t+"")},d.setAttributeNS=function(e,t,n){p.call(this,e,t,n+"")},h.setProperty=function(e,t,n){m.call(this,e,t+"",n)}}function g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function v(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function b(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}o.ascending=g,o.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},o.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},o.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},o.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)y(n=+e[o])&&(r+=n);else for(;++o<i;)y(n=+t.call(e,e[o],o))&&(r+=n);return r},o.mean=function(e,t){var n,r=0,i=e.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)y(n=v(e[o]))?r+=n:--a;else for(;++o<i;)y(n=v(t.call(e,e[o],o)))?r+=n:--a;if(a)return r/a},o.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},o.median=function(e,t){var n,r=[],i=e.length,a=-1;if(1===arguments.length)for(;++a<i;)y(n=v(e[a]))&&r.push(n);else for(;++a<i;)y(n=v(t.call(e,e[a],a)))&&r.push(n);if(r.length)return o.quantile(r.sort(g),.5)},o.variance=function(e,t){var n,r,i=e.length,o=0,a=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)y(n=v(e[s]))&&(a+=(r=n-o)*(n-(o+=r/++l)));else for(;++s<i;)y(n=v(t.call(e,e[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++l)));if(l>1)return a/(l-1)},o.deviation=function(){var e=o.variance.apply(this,arguments);return e?Math.sqrt(e):e};var x=b(g);function w(e){return e.length}o.bisectLeft=x.left,o.bisect=o.bisectRight=x.right,o.bisector=function(e){return b(1===e.length?function(t,n){return g(e(t),n)}:e)},o.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},o.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},o.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t<n;)i[t]=[r,r=e[++t]];return i},o.transpose=function(e){if(!(i=e.length))return[];for(var t=-1,n=o.min(e,w),r=new Array(n);++t<n;)for(var i,a=-1,s=r[t]=new Array(i);++a<i;)s[a]=e[a][t];return r},o.zip=function(){return o.transpose(arguments)},o.keys=function(e){var t=[];for(var n in e)t.push(n);return t},o.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},o.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},o.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n};var _=Math.abs;function S(e){for(var t=1;e*t%1;)t*=10;return t}function C(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function A(){this._=Object.create(null)}o.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=S(_(n)),a=-1;if(e*=o,t*=o,(n*=o)<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)<t;)i.push(r/o);return i},o.map=function(e,t){var n=new A;if(e instanceof A)e.forEach((function(e,t){n.set(e,t)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var a in e)n.set(a,e[a]);return n};function T(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function P(e){return"\0"===(e+="")[0]?e.slice(1):e}function E(e){return T(e)in this._}function O(e){return(e=T(e))in this._&&delete this._[e]}function M(){var e=[];for(var t in this._)e.push(P(t));return e}function D(){var e=0;for(var t in this._)++e;return e}function k(){for(var e in this._)return!1;return!0}function I(){this._=Object.create(null)}function R(e){return e}function N(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function F(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=L.length;n<r;++n){var i=L[n]+t;if(i in e)return i}}C(A,{has:E,get:function(e){return this._[T(e)]},set:function(e,t){return this._[T(e)]=t},remove:O,keys:M,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:P(t),value:this._[t]});return e},size:D,empty:k,forEach:function(e){for(var t in this._)e.call(this,P(t),this._[t])}}),o.nest=function(){var e,t,n={},r=[],i=[];function a(i,o,s){if(s>=r.length)return t?t.call(n,o):e?o.sort(e):o;for(var l,u,c,d,f=-1,p=o.length,h=r[s++],m=new A;++f<p;)(d=m.get(l=h(u=o[f])))?d.push(u):m.set(l,[u]);return i?(u=i(),c=function(e,t){u.set(e,a(i,t,s))}):(u={},c=function(e,t){u[e]=a(i,t,s)}),m.forEach(c),u}function s(e,t){if(t>=r.length)return e;var n=[],o=i[t++];return e.forEach((function(e,r){n.push({key:e,values:s(r,t)})})),o?n.sort((function(e,t){return o(e.key,t.key)})):n}return n.map=function(e,t){return a(t,e,0)},n.entries=function(e){return s(a(o.map,e,0),0)},n.key=function(e){return r.push(e),n},n.sortKeys=function(e){return i[r.length-1]=e,n},n.sortValues=function(t){return e=t,n},n.rollup=function(e){return t=e,n},n},o.set=function(e){var t=new I;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},C(I,{has:E,add:function(e){return this._[T(e+="")]=!0,e},remove:O,values:M,size:D,empty:k,forEach:function(e){for(var t in this._)e.call(this,P(t))}}),o.behavior={},o.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=N(e,t,t[n]);return e};var L=["webkit","ms","moz","Moz","o","O"];function B(){}function V(){}function j(e){var t=[],n=new A;function r(){for(var n,r=t,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return e}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,t=t.slice(0,o=t.indexOf(a)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function z(){o.event.preventDefault()}function G(){for(var e,t=o.event;e=t.sourceEvent;)t=e;return t}function U(e){for(var t=new V,n=0,r=arguments.length;++n<r;)t[arguments[n]]=j(t);return t.of=function(n,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=e,o.event=i,t[i.type].apply(n,r)}finally{o.event=a}}},t}o.dispatch=function(){for(var e=new V,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=j(e);return e},V.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},o.event=null,o.requote=function(e){return e.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,H={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function q(e){return H(e,Y),e}var X=function(e,t){return t.querySelector(e)},K=function(e,t){return t.querySelectorAll(e)},Z=function(e,t){var n=e.matches||e[F(e,"matchesSelector")];return Z=function(e,t){return n.call(e,t)},Z(e,t)};"function"==typeof Sizzle&&(X=function(e,t){return Sizzle(e,t)[0]||null},K=Sizzle,Z=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var Y=o.selection.prototype=[];function J(e){return"function"==typeof e?e:function(){return X(e,this)}}function Q(e){return"function"==typeof e?e:function(){return K(e,this)}}Y.select=function(e){var t,n,r,i,o=[];e=J(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,u=r.length;++l<u;)(i=r[l])?(t.push(n=e.call(i,i.__data__,l,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return q(o)},Y.selectAll=function(e){var t,n,r=[];e=Q(e);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],l=-1,u=a.length;++l<u;)(n=a[l])&&(r.push(t=s(e.call(n,n.__data__,l,i))),t.parentNode=n);return q(r)};var $="http://www.w3.org/1999/xhtml",ee={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function te(e,t){return e=o.ns.qualify(e),null==t?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof t?e.local?function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}:function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}:e.local?function(){this.setAttributeNS(e.space,e.local,t)}:function(){this.setAttribute(e,t)}}function ne(e){return e.trim().replace(/\s+/g," ")}function re(e){return new RegExp("(?:^|\\s+)"+o.requote(e)+"(?:\\s+|$)","g")}function ie(e){return(e+"").trim().split(/^|\s+/)}function oe(e,t){var n=(e=ie(e).map(ae)).length;return"function"==typeof t?function(){for(var r=-1,i=t.apply(this,arguments);++r<n;)e[r](this,i)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function ae(e){var t=re(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",ne(i+" "+e))):n.setAttribute("class",ne(i.replace(t," ")))}}function se(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function le(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function ue(e){return"function"==typeof e?e:(e=o.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,n=this.namespaceURI;return n===$&&t.documentElement.namespaceURI===$?t.createElement(e):t.createElementNS(n,e)}}function ce(){var e=this.parentNode;e&&e.removeChild(this)}function de(e){return{__data__:e}}function fe(e){return function(){return Z(this,e)}}function pe(e){return arguments.length||(e=g),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function he(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],a=0,s=o.length;a<s;a++)(i=o[a])&&t(i,a,n);return e}function me(e){return H(e,ge),e}o.ns={prefix:ee,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),ee.hasOwnProperty(n)?{space:ee[n],local:e}:e}},Y.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=o.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(te(t,e[t]));return this}return this.each(te(e,t))},Y.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=ie(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!re(e[i]).test(t))return!1;return!0}for(t in e)this.each(oe(t,e[t]));return this}return this.each(oe(e,t))},Y.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(se(n,e[n],t));return this}if(r<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(se(e,t,n))},Y.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(le(t,e[t]));return this}return this.each(le(e,t))},Y.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Y.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Y.append=function(e){return e=ue(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},Y.insert=function(e,t){return e=ue(e),t=J(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},Y.remove=function(){return this.each(ce)},Y.data=function(e,t){var n,r,i=-1,o=this.length;if(!arguments.length){for(e=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(e[i]=r.__data__);return e}function a(e,n){var r,i,o,a=e.length,c=n.length,d=Math.min(a,c),f=new Array(c),p=new Array(c),h=new Array(a);if(t){var m,g=new A,v=new Array(a);for(r=-1;++r<a;)(i=e[r])&&(g.has(m=t.call(i,i.__data__,r))?h[r]=i:g.set(m,i),v[r]=m);for(r=-1;++r<c;)(i=g.get(m=t.call(n,o=n[r],r)))?!0!==i&&(f[r]=i,i.__data__=o):p[r]=de(o),g.set(m,!0);for(r=-1;++r<a;)r in v&&!0!==g.get(v[r])&&(h[r]=e[r])}else{for(r=-1;++r<d;)i=e[r],o=n[r],i?(i.__data__=o,f[r]=i):p[r]=de(o);for(;r<c;++r)p[r]=de(n[r]);for(;r<a;++r)h[r]=e[r]}p.update=f,p.parentNode=f.parentNode=h.parentNode=e.parentNode,s.push(p),l.push(f),u.push(h)}var s=me([]),l=q([]),u=q([]);if("function"==typeof e)for(;++i<o;)a(n=this[i],e.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],e);return l.enter=function(){return s},l.exit=function(){return u},l},Y.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},Y.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=fe(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;s<l;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return q(i)},Y.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],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},Y.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Y.each=function(e){return he(this,(function(t,n,r){e.call(t,t.__data__,n,r)}))},Y.call=function(e){var t=s(arguments);return e.apply(t[0]=this,t),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},Y.size=function(){var e=0;return he(this,(function(){++e})),e};var ge=[];function ve(e){var t,n;return function(r,i,o){var a,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<l;);return a}}function ye(e,t,n){var r="__on"+e,i=e.indexOf("."),a=xe;i>0&&(e=e.slice(0,i));var l=be.get(e);function u(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}return l&&(e=l,a=we),i?t?function(){var i=a(t,s(arguments));u.call(this),this.addEventListener(e,this[r]=i,i.$=n),i._=t}:u:t?B:function(){var t,n=new RegExp("^__on([^.]+)"+o.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}o.selection.enter=me,o.selection.enter.prototype=ge,ge.append=Y.append,ge.empty=Y.empty,ge.node=Y.node,ge.call=Y.call,ge.size=Y.size,ge.select=function(e){for(var t,n,r,i,o,a=[],s=-1,l=this.length;++s<l;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)(o=i[u])?(t.push(r[u]=n=e.call(i.parentNode,o.__data__,u,s)),n.__data__=o.__data__):t.push(null)}return q(a)},ge.insert=function(e,t){return arguments.length<2&&(t=ve(this)),Y.insert.call(this,e,t)},o.select=function(e){var t;return"string"==typeof e?(t=[X(e,l)]).parentNode=l.documentElement:(t=[e]).parentNode=u(e),q([t])},o.selectAll=function(e){var t;return"string"==typeof e?(t=s(K(e,l))).parentNode=l.documentElement:(t=s(e)).parentNode=null,q([t])},Y.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(ye(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(ye(e,t,n))};var be=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function xe(e,t){return function(n){var r=o.event;o.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{o.event=r}}}function we(e,t){var n=xe(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}l&&be.forEach((function(e){"on"+e in l&&be.remove(e)}));var _e,Se=0;function Ce(e){var t=".dragsuppress-"+ ++Se,n="click"+t,r=o.select(c(e)).on("touchmove"+t,z).on("dragstart"+t,z).on("selectstart"+t,z);if(null==_e&&(_e=!("onselectstart"in e)&&F(e.style,"userSelect")),_e){var i=u(e).style,a=i[_e];i[_e]="none"}return function(e){if(r.on(t,null),_e&&(i[_e]=a),e){var o=function(){r.on(n,null)};r.on(n,(function(){z(),o()}),!0),setTimeout(o,0)}}}o.mouse=function(e){return Te(e,G())};var Ae=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Te(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Ae<0){var i=c(e);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();Ae=!(a.f||a.e),n.remove()}}return Ae?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Pe(){return o.event.changedTouches[0].identifier}o.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=G().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===n)return Te(e,r)},o.behavior.drag=function(){var e=U(i,"drag","dragstart","dragend"),t=null,n=a(B,o.mouse,c,"mousemove","mouseup"),r=a(Pe,o.touch,R,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function a(n,r,i,a,s){return function(){var l,u=this,c=o.event.target.correspondingElement||o.event.target,d=u.parentNode,f=e.of(u,arguments),p=0,h=n(),m=".drag"+(null==h?"":"-"+h),g=o.select(i(c)).on(a+m,b).on(s+m,x),v=Ce(c),y=r(d,h);function b(){var e,t,n=r(d,h);n&&(e=n[0]-y[0],t=n[1]-y[1],p|=e|t,y=n,f({type:"drag",x:n[0]+l[0],y:n[1]+l[1],dx:e,dy:t}))}function x(){r(d,h)&&(g.on(a+m,null).on(s+m,null),v(p),f({type:"dragend"}))}l=t?[(l=t.apply(u,arguments)).x-y[0],l.y-y[1]]:[0,0],f({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(t=e,i):t},o.rebind(i,e,"on")},o.touches=function(e,t){return arguments.length<2&&(t=G().touches),t?s(t).map((function(t){var n=Te(e,t);return n.identifier=t.identifier,n})):[]};var Ee=1e-6,Oe=Ee*Ee,Me=Math.PI,De=2*Me,ke=De-Ee,Ie=Me/2,Re=Me/180,Ne=180/Me;function Fe(e){return e>0?1:e<0?-1:0}function Le(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function Be(e){return e>1?0:e<-1?Me:Math.acos(e)}function Ve(e){return e>1?Ie:e<-1?-Ie:Math.asin(e)}function je(e){return((e=Math.exp(e))+1/e)/2}function ze(e){return(e=Math.sin(e/2))*e}var Ge=Math.SQRT2;o.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],u=t[2],c=s-i,d=l-o,f=c*c+d*d;if(f<Oe)r=Math.log(u/a)/Ge,n=function(e){return[i+e*c,o+e*d,a*Math.exp(Ge*e*r)]};else{var p=Math.sqrt(f),h=(u*u-a*a+4*f)/(2*a*2*p),m=(u*u-a*a-4*f)/(2*u*2*p),g=Math.log(Math.sqrt(h*h+1)-h),v=Math.log(Math.sqrt(m*m+1)-m);r=(v-g)/Ge,n=function(e){var t,n=e*r,s=je(g),l=a/(2*p)*(s*(t=Ge*n+g,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[i+l*c,o+l*d,a*s/je(Ge*n+g)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var e,t,n,r,i,a,s,u,d,f={x:0,y:0,k:1},p=[960,500],h=He,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",b="mouseup.zoom",x="touchstart.zoom",w=U(_,"zoomstart","zoom","zoomend");function _(e){e.on(v,D).on(We+".zoom",I).on("dblclick.zoom",R).on(x,k)}function S(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function C(e){f.k=Math.max(h[0],Math.min(h[1],e))}function A(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function T(e,n,r,i){e.__chart__={x:f.x,y:f.y,k:f.k},C(Math.pow(2,i)),A(t=n,r),e=o.select(e),m>0&&(e=e.transition().duration(m)),e.call(_.event)}function P(){s&&s.domain(a.range().map((function(e){return(e-f.x)/f.k})).map(a.invert)),d&&d.domain(u.range().map((function(e){return(e-f.y)/f.k})).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function O(e){P(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function M(e){--g||(e({type:"zoomend"}),t=null)}function D(){var e=this,t=w.of(e,arguments),n=0,r=o.select(c(e)).on(y,s).on(b,l),i=S(o.mouse(e)),a=Ce(e);function s(){n=1,A(o.mouse(e),i),O(t)}function l(){r.on(y,null).on(b,null),a(n),M(t)}Fs.call(e),E(t)}function k(){var e,t=this,n=w.of(t,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],d=o.select(t),p=Ce(t);function h(){var n=o.touches(t);return e=f.k,n.forEach((function(e){e.identifier in r&&(r[e.identifier]=S(e))})),n}function m(){var e=o.event.target;o.select(e).on(l,g).on(u,y),c.push(e);for(var n=o.event.changedTouches,s=0,d=n.length;s<d;++s)r[n[s].identifier]=null;var p=h(),m=Date.now();if(1===p.length){if(m-i<500){var v=p[0];T(t,v,r[v.identifier],Math.floor(Math.log(f.k)/Math.LN2)+1),z()}i=m}else if(p.length>1){v=p[0];var b=p[1],x=v[0]-b[0],w=v[1]-b[1];a=x*x+w*w}}function g(){var s,l,u,c,d=o.touches(t);Fs.call(t);for(var f=0,p=d.length;f<p;++f,c=null)if(u=d[f],c=r[u.identifier]){if(l)break;s=u,l=c}if(c){var h=(h=u[0]-s[0])*h+(h=u[1]-s[1])*h,m=a&&Math.sqrt(h/a);s=[(s[0]+u[0])/2,(s[1]+u[1])/2],l=[(l[0]+c[0])/2,(l[1]+c[1])/2],C(m*e)}i=null,A(s,l),O(n)}function y(){if(o.event.touches.length){for(var e=o.event.changedTouches,t=0,i=e.length;t<i;++t)delete r[e[t].identifier];for(var a in r)return void h()}o.selectAll(c).on(s,null),d.on(v,D).on(x,k),p(),M(n)}m(),E(n),d.on(v,null).on(x,m)}function I(){var i=w.of(this,arguments);r?clearTimeout(r):(Fs.call(this),e=S(t=n||o.mouse(this)),E(i)),r=setTimeout((function(){r=null,M(i)}),50),z(),C(Math.pow(2,.002*Ue())*f.k),A(t,e),O(i)}function R(){var e=o.mouse(this),t=Math.log(f.k)/Math.LN2;T(this,e,S(e),o.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}return We||(We="onwheel"in l?(Ue=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(Ue=function(){return o.event.wheelDelta},"mousewheel"):(Ue=function(){return-o.event.detail},"MozMousePixelScroll")),_.event=function(e){e.each((function(){var e=w.of(this,arguments),n=f;Vs?o.select(this).transition().each("start.zoom",(function(){f=this.__chart__||{x:0,y:0,k:1},E(e)})).tween("zoom:zoom",(function(){var r=p[0],i=p[1],a=t?t[0]:r/2,s=t?t[1]:i/2,l=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(t){var n=l(t),i=r/n[2];this.__chart__=f={x:a-n[0]*i,y:s-n[1]*i,k:i},O(e)}})).each("interrupt.zoom",(function(){M(e)})).each("end.zoom",(function(){M(e)})):(this.__chart__=f,E(e),O(e),M(e))}))},_.translate=function(e){return arguments.length?(f={x:+e[0],y:+e[1],k:f.k},P(),_):[f.x,f.y]},_.scale=function(e){return arguments.length?(f={x:f.x,y:f.y,k:null},C(+e),P(),_):f.k},_.scaleExtent=function(e){return arguments.length?(h=null==e?He:[+e[0],+e[1]],_):h},_.center=function(e){return arguments.length?(n=e&&[+e[0],+e[1]],_):n},_.size=function(e){return arguments.length?(p=e&&[+e[0],+e[1]],_):p},_.duration=function(e){return arguments.length?(m=+e,_):m},_.x=function(e){return arguments.length?(s=e,a=e.copy(),f={x:0,y:0,k:1},_):s},_.y=function(e){return arguments.length?(d=e,u=e.copy(),f={x:0,y:0,k:1},_):d},o.rebind(_,w,"on")};var Ue,We,He=[0,1/0];function qe(){}function Xe(e,t,n){return this instanceof Xe?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof Xe?new Xe(e.h,e.s,e.l):ht(""+e,mt,Xe):new Xe(e,t,n)}o.color=qe,qe.prototype.toString=function(){return this.rgb()+""},o.hsl=Xe;var Ke=Xe.prototype=new qe;function Ze(e,t,n){var r,i;function o(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+t):n+t-n*t),new ut(o(e+120),o(e),o(e-120))}function Ye(e,t,n){return this instanceof Ye?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof Ye?new Ye(e.h,e.c,e.l):ot(e instanceof $e?e.l:(e=gt((e=o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ye(e,t,n)}Ke.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Xe(this.h,this.s,this.l/e)},Ke.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Xe(this.h,this.s,e*this.l)},Ke.rgb=function(){return Ze(this.h,this.s,this.l)},o.hcl=Ye;var Je=Ye.prototype=new qe;function Qe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new $e(n,Math.cos(e*=Re)*t,Math.sin(e)*t)}function $e(e,t,n){return this instanceof $e?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof $e?new $e(e.l,e.a,e.b):e instanceof Ye?Qe(e.h,e.c,e.l):gt((e=ut(e)).r,e.g,e.b):new $e(e,t,n)}Je.brighter=function(e){return new Ye(this.h,this.c,Math.min(100,this.l+et*(arguments.length?e:1)))},Je.darker=function(e){return new Ye(this.h,this.c,Math.max(0,this.l-et*(arguments.length?e:1)))},Je.rgb=function(){return Qe(this.h,this.c,this.l).rgb()},o.lab=$e;var et=18,tt=.95047,nt=1.08883,rt=$e.prototype=new qe;function it(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return new ut(lt(3.2404542*(i=at(i)*tt)-1.5371385*(r=1*at(r))-.4985314*(o=at(o)*nt)),lt(-.969266*i+1.8760108*r+.041556*o),lt(.0556434*i-.2040259*r+1.0572252*o))}function ot(e,t,n){return e>0?new Ye(Math.atan2(n,t)*Ne,Math.sqrt(t*t+n*n),e):new Ye(NaN,NaN,e)}function at(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function st(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function lt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ut(e,t,n){return this instanceof ut?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ut?new ut(e.r,e.g,e.b):ht(""+e,ut,Ze):new ut(e,t,n)}function ct(e){return new ut(e>>16,e>>8&255,255&e)}function dt(e){return ct(e)+""}rt.brighter=function(e){return new $e(Math.min(100,this.l+et*(arguments.length?e:1)),this.a,this.b)},rt.darker=function(e){return new $e(Math.max(0,this.l-et*(arguments.length?e:1)),this.a,this.b)},rt.rgb=function(){return it(this.l,this.a,this.b)},o.rgb=ut;var ft=ut.prototype=new qe;function pt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ht(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.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 t(yt(i[0]),yt(i[1]),yt(i[2]))}return(o=bt.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function mt(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new Xe(r,i,l)}function gt(e,t,n){var r=st((.4124564*(e=vt(e))+.3575761*(t=vt(t))+.1804375*(n=vt(n)))/tt),i=st((.2126729*e+.7151522*t+.072175*n)/1);return $e(116*i-16,500*(r-i),200*(i-st((.0193339*e+.119192*t+.9503041*n)/nt)))}function vt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function yt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ft.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new ut(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new ut(i,i,i)},ft.darker=function(e){return new ut((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},ft.hsl=function(){return mt(this.r,this.g,this.b)},ft.toString=function(){return"#"+pt(this.r)+pt(this.g)+pt(this.b)};var bt=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 xt(e){return"function"==typeof e?e:function(){return e}}function wt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),_t(t,n,e,r)}}function _t(e,t,n,r){var i={},a=o.dispatch("beforesend","progress","load","error"),l={},u=new XMLHttpRequest,c=null;function d(){var e,t=u.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(u)||t>=200&&t<300||304===t){try{e=n.call(i,u)}catch(e){return void a.error.call(i,e)}a.load.call(i,e)}else a.error.call(i,u)}return this.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(e)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=d:u.onreadystatechange=function(){u.readyState>3&&d()},u.onprogress=function(e){var t=o.event;o.event=e;try{a.progress.call(i,u)}finally{o.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(c=e,i):c},i.response=function(e){return n=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),u.open(n,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=c&&(u.responseType=c),null!=o&&i.on("error",o).on("load",(function(e){o(null,e)})),a.beforesend.call(i,u),u.send(null==r?null:r),i},i.abort=function(){return u.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}bt.forEach((function(e,t){bt.set(e,ct(t))})),o.functor=xt,o.xhr=wt(R),o.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=_t(e,t,null==n?o:a(n),r);return i.row=function(e){return arguments.length?i.response(null==(n=e)?o:a(e)):n},i}function o(e){return i.parse(e.responseText)}function a(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var n;return i.parseRows(e,(function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i}))},i.parseRows=function(e,t){var n,i,o={},a={},s=[],l=e.length,u=0,c=0;function d(){if(u>=l)return a;if(i)return i=!1,o;var t=u;if(34===e.charCodeAt(t)){for(var n=t;n++<l;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return u=n+2,13===(s=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++u):10===s&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;u<l;){var s,c=1;if(10===(s=e.charCodeAt(u++)))i=!0;else if(13===s)i=!0,10===e.charCodeAt(u)&&(++u,++c);else if(s!==r)continue;return e.slice(t,u-c)}return e.slice(t)}for(;(n=d())!==a;){for(var f=[];n!==o&&n!==a;)f.push(n),n=d();t&&null==(f=t(f,c++))||s.push(f)}return s},i.format=function(t){if(Array.isArray(t[0]))return i.formatRows(t);var n=new I,r=[];return t.forEach((function(e){for(var t in e)n.has(t)||r.push(n.add(t))})),[r.map(l).join(e)].concat(t.map((function(t){return r.map((function(e){return l(t[e])})).join(e)}))).join("\n")},i.formatRows=function(e){return e.map(s).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var St,Ct,At,Tt,Pt=this[F(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function Et(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return Ct?Ct.n=o:St=o,Ct=o,At||(Tt=clearTimeout(Tt),At=1,Pt(Ot)),o}function Ot(){var e=Mt(),t=Dt()-e;t>24?(isFinite(t)&&(clearTimeout(Tt),Tt=setTimeout(Ot,t)),At=0):(At=1,Pt(Ot))}function Mt(){for(var e=Date.now(),t=St;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Dt(){for(var e,t=St,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:St=t.n;return Ct=e,n}function kt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}o.timer=function(){Et.apply(this,arguments)},o.timer.flush=function(){Mt(),Dt()},o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var It=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(e,t){var n=Math.pow(10,3*_(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}));function Rt(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,a=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],l=0;i>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:R;return function(e){var n=Nt.exec(e),r=n[1]||" ",s=n[2]||">",l=n[3]||"-",u=n[4]||"",c=n[5],d=+n[6],f=n[7],p=n[8],h=n[9],m=1,g="",v="",y=!1,b=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===s)&&(c=r="0",s="="),h){case"n":f=!0,h="g";break;case"%":m=100,v="%",h="f";break;case"p":m=100,v="%",h="r";break;case"b":case"o":case"x":case"X":"#"===u&&(g="0"+h.toLowerCase());case"c":b=!1;case"d":y=!0,p=0;break;case"s":m=-1,h="r"}"$"===u&&(g=i[0],v=i[1]),"r"!=h||p||(h="g"),null!=p&&("g"==h?p=Math.max(1,Math.min(21,p)):"e"!=h&&"f"!=h||(p=Math.max(0,Math.min(20,p)))),h=Ft.get(h)||Lt;var x=c&&f;return function(e){var n=v;if(y&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(m<0){var u=o.formatPrefix(e,p);e=u.scale(e),n=u.symbol+v}else e*=m;var w,_,S=(e=h(e,p)).lastIndexOf(".");if(S<0){var C=b?e.lastIndexOf("e"):-1;C<0?(w=e,_=""):(w=e.substring(0,C),_=e.substring(C))}else w=e.substring(0,S),_=t+e.substring(S+1);!c&&f&&(w=a(w,1/0));var A=g.length+w.length+_.length+(x?0:i.length),T=A<d?new Array(A=d-A+1).join(r):"";return x&&(w=a(T+w,T.length?d-_.length:1/0)),i+=g,e=w+_,("<"===s?i+e+T:">"===s?T+i+e:"^"===s?T.substring(0,A>>=1)+i+e+T.substring(A):i+(x?e:T+e))+n}}}o.formatPrefix=function(e,t){var n=0;return(e=+e)&&(e<0&&(e*=-1),t&&(e=o.round(e,kt(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),It[8+n/3]};var Nt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ft=o.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=o.round(e,kt(e,t))).toFixed(Math.max(0,Math.min(20,kt(e*(1+1e-15),t))))}});function Lt(e){return e+""}var Bt=o.time={},Vt=Date;function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}jt.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(){zt.setUTCDate.apply(this._,arguments)},setDay:function(){zt.setUTCDay.apply(this._,arguments)},setFullYear:function(){zt.setUTCFullYear.apply(this._,arguments)},setHours:function(){zt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){zt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){zt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){zt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){zt.setUTCSeconds.apply(this._,arguments)},setTime:function(){zt.setTime.apply(this._,arguments)}};var zt=Date.prototype;function Gt(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new Vt(n-1)),1),n}function o(e,n){return t(e=new Vt(+e),n),e}function a(e,r,o){var a=i(e),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;a<r;)s.push(new Date(+a)),t(a,1);return s}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=a;var s=e.utc=Ut(e);return s.floor=s,s.round=Ut(r),s.ceil=Ut(i),s.offset=Ut(o),s.range=function(e,t,n){try{Vt=jt;var r=new jt;return r._=e,a(r,t,n)}finally{Vt=Date}},e}function Ut(e){return function(t,n){try{Vt=jt;var r=new jt;return r._=t,e(r,n)._}finally{Vt=Date}}}function Wt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,l=e.months,u=e.shortMonths;function c(e){var t=e.length;function n(n){for(var r,i,o,a=[],s=-1,l=0;++s<t;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Ht[r=e.charAt(++s)])&&(r=e.charAt(++s)),(o=w[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(d(n,e,t,0)!=t.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&Vt!==jt,i=new(r?jt:Vt);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 e},n}function d(e,t,n,r){for(var i,o,a,s=0,l=t.length,u=n.length;s<l;){if(r>=u)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=_[a in Ht?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}c.utc=function(e){var t=c(e);function n(e){try{var n=new(Vt=jt);return n._=e,t(n)}finally{Vt=Date}}return n.parse=function(e){try{Vt=jt;var n=t.parse(e);return n&&n._}finally{Vt=Date}},n.toString=t.toString,n},c.multi=c.utc.multi=pn;var f=o.map(),p=Zt(a),h=Yt(a),m=Zt(s),g=Yt(s),v=Zt(l),y=Yt(l),b=Zt(u),x=Yt(u);i.forEach((function(e,t){f.set(e.toLowerCase(),t)}));var w={a:function(e){return s[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:c(t),d:function(e,t){return Kt(e.getDate(),t,2)},e:function(e,t){return Kt(e.getDate(),t,2)},H:function(e,t){return Kt(e.getHours(),t,2)},I:function(e,t){return Kt(e.getHours()%12||12,t,2)},j:function(e,t){return Kt(1+Bt.dayOfYear(e),t,3)},L:function(e,t){return Kt(e.getMilliseconds(),t,3)},m:function(e,t){return Kt(e.getMonth()+1,t,2)},M:function(e,t){return Kt(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return Kt(e.getSeconds(),t,2)},U:function(e,t){return Kt(Bt.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Kt(Bt.mondayOfYear(e),t,2)},x:c(n),X:c(r),y:function(e,t){return Kt(e.getFullYear()%100,t,2)},Y:function(e,t){return Kt(e.getFullYear()%1e4,t,4)},Z:dn,"%":function(){return"%"}},_={a:function(e,t,n){m.lastIndex=0;var r=m.exec(t.slice(n));return r?(e.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){p.lastIndex=0;var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){b.lastIndex=0;var r=b.exec(t.slice(n));return r?(e.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){v.lastIndex=0;var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,n){return d(e,w.c.toString(),t,n)},d:on,e:on,H:sn,I:sn,j:an,L:cn,m:rn,M:ln,p:function(e,t,n){var r=f.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)},S:un,U:Qt,w:Jt,W:$t,x:function(e,t,n){return d(e,w.x.toString(),t,n)},X:function(e,t,n){return d(e,w.X.toString(),t,n)},y:tn,Y:en,Z:nn,"%":fn};return c}Bt.year=Gt((function(e){return(e=Bt.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),Bt.years=Bt.year.range,Bt.years.utc=Bt.year.utc.range,Bt.day=Gt((function(e){var t=new Vt(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),Bt.days=Bt.day.range,Bt.days.utc=Bt.day.utc.range,Bt.dayOfYear=function(e){var t=Bt.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var n=Bt[e]=Gt((function(e){return(e=Bt.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var n=Bt.year(e).getDay();return Math.floor((Bt.dayOfYear(e)+(n+t)%7)/7)-(n!==t)}));Bt[e+"s"]=n.range,Bt[e+"s"].utc=n.utc.range,Bt[e+"OfYear"]=function(e){var n=Bt.year(e).getDay();return Math.floor((Bt.dayOfYear(e)+(n+t)%7)/7)}})),Bt.week=Bt.sunday,Bt.weeks=Bt.sunday.range,Bt.weeks.utc=Bt.sunday.utc.range,Bt.weekOfYear=Bt.sundayOfYear;var Ht={"-":"",_:" ",0:"0"},qt=/^\s*\d+/,Xt=/^%/;function Kt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Zt(e){return new RegExp("^(?:"+e.map(o.requote).join("|")+")","i")}function Yt(e){for(var t=new A,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Jt(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Qt(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function $t(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function en(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function tn(e,t,n){qt.lastIndex=0;var r,i=qt.exec(t.slice(n,n+2));return i?(e.y=(r=+i[0])+(r>68?1900:2e3),n+i[0].length):-1}function nn(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function rn(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function on(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function an(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function sn(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ln(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function un(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cn(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dn(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=_(t)/60|0,i=_(t)%60;return n+Kt(r,"0",2)+Kt(i,"0",2)}function fn(e,t,n){Xt.lastIndex=0;var r=Xt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pn(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}o.locale=function(e){return{numberFormat:Rt(e),timeFormat:Wt(e)}};var hn=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 mn(){}o.format=hn.numberFormat,o.geo={},mn.prototype={s:0,t:0,add:function(e){vn(e,this.t,gn),vn(gn.s,this.s,this),this.s?this.t+=gn.t:this.s=gn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var gn=new mn;function vn(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function yn(e,t){e&&xn.hasOwnProperty(e.type)&&xn[e.type](e,t)}o.geo.stream=function(e,t){e&&bn.hasOwnProperty(e.type)?bn[e.type](e,t):yn(e,t)};var bn={Feature:function(e,t){yn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)yn(n[r].geometry,t)}},xn={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){wn(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)wn(n[r],t,0)},Polygon:function(e,t){_n(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)_n(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)yn(n[r],t)}};function wn(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function _n(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)wn(e[n],t,1);t.polygonEnd()}o.geo.area=function(e){return Sn=0,o.geo.stream(e,Fn),Sn};var Sn,Cn,An,Tn,Pn,En,On,Mn,Dn,kn,In,Rn,Nn=new mn,Fn={sphere:function(){Sn+=4*Me},point:B,lineStart:B,lineEnd:B,polygonStart:function(){Nn.reset(),Fn.lineStart=Ln},polygonEnd:function(){var e=2*Nn;Sn+=e<0?4*Me+e:e,Fn.lineStart=Fn.lineEnd=Fn.point=B}};function Ln(){var e,t,n,r,i;function o(e,t){t=t*Re/2+Me/4;var o=(e*=Re)-n,a=o>=0?1:-1,s=a*o,l=Math.cos(t),u=Math.sin(t),c=i*u,d=r*l+c*Math.cos(s),f=c*a*Math.sin(s);Nn.add(Math.atan2(f,d)),n=e,r=l,i=u}Fn.point=function(a,s){Fn.point=o,n=(e=a)*Re,r=Math.cos(s=(t=s)*Re/2+Me/4),i=Math.sin(s)},Fn.lineEnd=function(){o(e,t)}}function Bn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Vn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function jn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function zn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Gn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Un(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Wn(e){return[Math.atan2(e[1],e[0]),Ve(e[2])]}function Hn(e,t){return _(e[0]-t[0])<Ee&&_(e[1]-t[1])<Ee}o.geo.bounds=function(){var e,t,n,r,i,a,s,l,u,c,d,f={point:p,lineStart:m,lineEnd:g,polygonStart:function(){f.point=v,f.lineStart=y,f.lineEnd=b,u=0,Fn.polygonStart()},polygonEnd:function(){Fn.polygonEnd(),f.point=p,f.lineStart=m,f.lineEnd=g,Nn<0?(e=-(n=180),t=-(r=90)):u>Ee?r=90:u<-Ee&&(t=-90),d[0]=e,d[1]=n}};function p(i,o){c.push(d=[e=i,n=i]),o<t&&(t=o),o>r&&(r=o)}function h(o,a){var s=Bn([o*Re,a*Re]);if(l){var u=jn(l,s),c=jn([u[1],-u[0],0],u);Un(c),c=Wn(c);var d=o-i,f=d>0?1:-1,h=c[0]*Ne*f,m=_(d)>180;if(m^(f*i<h&&h<f*o))(g=c[1]*Ne)>r&&(r=g);else if(m^(f*i<(h=(h+360)%360-180)&&h<f*o)){var g;(g=-c[1]*Ne)<t&&(t=g)}else a<t&&(t=a),a>r&&(r=a);m?o<i?x(e,o)>x(e,n)&&(n=o):x(o,n)>x(e,n)&&(e=o):n>=e?(o<e&&(e=o),o>n&&(n=o)):o>i?x(e,o)>x(e,n)&&(n=o):x(o,n)>x(e,n)&&(e=o)}else p(o,a);l=s,i=o}function m(){f.point=h}function g(){d[0]=e,d[1]=n,f.point=p,l=null}function v(e,t){if(l){var n=e-i;u+=_(n)>180?n+(n>0?360:-360):n}else a=e,s=t;Fn.point(e,t),h(e,t)}function y(){Fn.lineStart()}function b(){v(a,s),Fn.lineEnd(),_(u)>Ee&&(e=-(n=180)),d[0]=e,d[1]=n,l=null}function x(e,t){return(t-=e)<0?t+360:t}function w(e,t){return e[0]-t[0]}function S(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}return function(i){if(r=n=-(e=t=1/0),c=[],o.geo.stream(i,f),u=c.length){c.sort(w);for(var a=1,s=[m=c[0]];a<u;++a)S((p=c[a])[0],m)||S(p[1],m)?(x(m[0],p[1])>x(m[0],m[1])&&(m[1]=p[1]),x(p[0],m[1])>x(m[0],m[1])&&(m[0]=p[0])):s.push(m=p);for(var l,u,p,h=-1/0,m=(a=0,s[u=s.length-1]);a<=u;m=p,++a)p=s[a],(l=x(m[1],p[0]))>h&&(h=l,e=p[0],n=m[1])}return c=d=null,e===1/0||t===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,t],[n,r]]}}(),o.geo.centroid=function(e){Cn=An=Tn=Pn=En=On=Mn=Dn=kn=In=Rn=0,o.geo.stream(e,qn);var t=kn,n=In,r=Rn,i=t*t+n*n+r*r;return i<Oe&&(t=On,n=Mn,r=Dn,An<Ee&&(t=Tn,n=Pn,r=En),(i=t*t+n*n+r*r)<Oe)?[NaN,NaN]:[Math.atan2(n,t)*Ne,Ve(r/Math.sqrt(i))*Ne]};var qn={sphere:B,point:Xn,lineStart:Zn,lineEnd:Yn,polygonStart:function(){qn.lineStart=Jn},polygonEnd:function(){qn.lineStart=Zn}};function Xn(e,t){e*=Re;var n=Math.cos(t*=Re);Kn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Kn(e,t,n){++Cn,Tn+=(e-Tn)/Cn,Pn+=(t-Pn)/Cn,En+=(n-En)/Cn}function Zn(){var e,t,n;function r(r,i){r*=Re;var o=Math.cos(i*=Re),a=o*Math.cos(r),s=o*Math.sin(r),l=Math.sin(i),u=Math.atan2(Math.sqrt((u=t*l-n*s)*u+(u=n*a-e*l)*u+(u=e*s-t*a)*u),e*a+t*s+n*l);An+=u,On+=u*(e+(e=a)),Mn+=u*(t+(t=s)),Dn+=u*(n+(n=l)),Kn(e,t,n)}qn.point=function(i,o){i*=Re;var a=Math.cos(o*=Re);e=a*Math.cos(i),t=a*Math.sin(i),n=Math.sin(o),qn.point=r,Kn(e,t,n)}}function Yn(){qn.point=Xn}function Jn(){var e,t,n,r,i;function o(e,t){e*=Re;var o=Math.cos(t*=Re),a=o*Math.cos(e),s=o*Math.sin(e),l=Math.sin(t),u=r*l-i*s,c=i*a-n*l,d=n*s-r*a,f=Math.sqrt(u*u+c*c+d*d),p=n*a+r*s+i*l,h=f&&-Be(p)/f,m=Math.atan2(f,p);kn+=h*u,In+=h*c,Rn+=h*d,An+=m,On+=m*(n+(n=a)),Mn+=m*(r+(r=s)),Dn+=m*(i+(i=l)),Kn(n,r,i)}qn.point=function(a,s){e=a,t=s,qn.point=o,a*=Re;var l=Math.cos(s*=Re);n=l*Math.cos(a),r=l*Math.sin(a),i=Math.sin(s),Kn(n,r,i)},qn.lineEnd=function(){o(e,t),qn.lineEnd=Yn,qn.point=Xn}}function Qn(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function $n(){return!0}function er(e,t,n,r,i){var o=[],a=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(Hn(n,r)){i.lineStart();for(var s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd()}else{var l=new nr(n,e,null,!0),u=new nr(n,null,l,!1);l.o=u,o.push(l),a.push(u),l=new nr(r,e,null,!1),u=new nr(r,null,l,!0),l.o=u,o.push(l),a.push(u)}}})),a.sort(t),tr(o),tr(a),o.length){for(var s=0,l=n,u=a.length;s<u;++s)a[s].e=l=!l;for(var c,d,f=o[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(s=0,u=c.length;s<u;++s)i.point((d=c[s])[0],d[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(s=(c=p.p.z).length-1;s>=0;--s)i.point((d=c[s])[0],d[1]);else r(p.x,p.p.x,-1,i);p=p.p}c=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function tr(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function nr(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function rr(e,t,n,r){return function(i,a){var s,l=t(a),u=i.invert(r[0],r[1]),c={point:d,lineStart:p,lineEnd:h,polygonStart:function(){c.point=x,c.lineStart=w,c.lineEnd=_,s=[],m=[]},polygonEnd:function(){c.point=d,c.lineStart=p,c.lineEnd=h,s=o.merge(s);var e=function(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Nn.reset();for(var s=0,l=t.length;s<l;++s){var u=t[s],c=u.length;if(c)for(var d=u[0],f=d[0],p=d[1]/2+Me/4,h=Math.sin(p),m=Math.cos(p),g=1;;){g===c&&(g=0);var v=(e=u[g])[0],y=e[1]/2+Me/4,b=Math.sin(y),x=Math.cos(y),w=v-f,_=w>=0?1:-1,S=_*w,C=S>Me,A=h*b;if(Nn.add(Math.atan2(A*_*Math.sin(S),m*x+A*Math.cos(S))),o+=C?w+_*De:w,C^f>=n^v>=n){var T=jn(Bn(d),Bn(e));Un(T);var P=jn(i,T);Un(P);var E=(C^w>=0?-1:1)*Ve(P[2]);(r>E||r===E&&(T[0]||T[1]))&&(a+=C^w>=0?1:-1)}if(!g++)break;f=v,h=b,m=x,d=e}}return(o<-Ee||o<Ee&&Nn<-Ee)^1&a}(u,m);s.length?(b||(a.polygonStart(),b=!0),er(s,ar,e,n,a)):e&&(b||(a.polygonStart(),b=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),b&&(a.polygonEnd(),b=!1),s=m=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function d(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&a.point(t,n)}function f(e,t){var n=i(e,t);l.point(n[0],n[1])}function p(){c.point=f,l.lineStart()}function h(){c.point=d,l.lineEnd()}var m,g,v=or(),y=t(v),b=!1;function x(e,t){g.push([e,t]);var n=i(e,t);y.point(n[0],n[1])}function w(){y.lineStart(),g=[]}function _(){x(g[0][0],g[0][1]),y.lineEnd();var e,t=y.clean(),n=v.buffer(),r=n.length;if(g.pop(),m.push(g),g=null,r)if(1&t){var i,o=-1;if((r=(e=n[0]).length-1)>0){for(b||(a.polygonStart(),b=!0),a.lineStart();++o<r;)a.point((i=e[o])[0],i[1]);a.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),s.push(n.filter(ir))}return c}}function ir(e){return e.length>1}function or(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:B,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function ar(e,t){return((e=e.x)[0]<0?e[1]-Ie-Ee:Ie-e[1])-((t=t.x)[0]<0?t[1]-Ie-Ee:Ie-t[1])}var sr=rr($n,(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Me:-Me,l=_(o-n);_(l-Me)<Ee?(e.point(n,r=(r+a)/2>0?Ie:-Ie),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=Me&&(_(n-i)<Ee&&(n-=i*Ee),_(o-s)<Ee&&(o-=s*Ee),r=function(e,t,n,r){var i,o,a=Math.sin(e-n);return _(a)>Ee?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*Ie,r.point(-Me,i),r.point(0,i),r.point(Me,i),r.point(Me,0),r.point(Me,-i),r.point(0,-i),r.point(-Me,-i),r.point(-Me,0),r.point(-Me,i);else if(_(e[0]-t[0])>Ee){var o=e[0]<t[0]?Me:-Me;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-Me,-Me/2]);function lr(e){var t=Math.cos(e),n=t>0,r=_(t)>Ee;return rr(i,(function(e){var t,s,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,f){var p,h=[d,f],m=i(d,f),g=n?m?0:a(d,f):m?a(d+(d<0?Me:-Me),f):0;if(!t&&(u=l=m)&&e.lineStart(),m!==l&&(p=o(t,h),(Hn(t,p)||Hn(h,p))&&(h[0]+=Ee,h[1]+=Ee,m=i(h[0],h[1]))),m!==l)c=0,m?(e.lineStart(),p=o(h,t),e.point(p[0],p[1])):(p=o(t,h),e.point(p[0],p[1]),e.lineEnd()),t=p;else if(r&&t&&n^m){var v;g&s||!(v=o(h,t,!0))||(c=0,n?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!m||t&&Hn(t,h)||e.point(h[0],h[1]),t=h,l=m,s=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return c|(u&&l)<<1}}}),Hr(e,6*Re),n?[0,-e]:[-Me,e-Me]);function i(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e,n,r){var i=[1,0,0],o=jn(Bn(e),Bn(n)),a=Vn(o,o),s=o[0],l=a-s*s;if(!l)return!r&&e;var u=t*a/l,c=-t*s/l,d=jn(i,o),f=Gn(i,u);zn(f,Gn(o,c));var p=d,h=Vn(f,p),m=Vn(p,p),g=h*h-m*(Vn(f,f)-1);if(!(g<0)){var v=Math.sqrt(g),y=Gn(p,(-h-v)/m);if(zn(y,f),y=Wn(y),!r)return y;var b,x=e[0],w=n[0],S=e[1],C=n[1];w<x&&(b=x,x=w,w=b);var A=w-x,T=_(A-Me)<Ee;if(!T&&C<S&&(b=S,S=C,C=b),T||A<Ee?T?S+C>0^y[1]<(_(y[0]-x)<Ee?S:C):S<=y[1]&&y[1]<=C:A>Me^(x<=y[0]&&y[0]<=w)){var P=Gn(p,(-h+v)/m);return zn(P,f),[y,Wn(P)]}}}function a(t,r){var i=n?e:Me-e,o=0;return t<-i?o|=1:t>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}function ur(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,u=a.y,c=0,d=1,f=s.x-l,p=s.y-u;if(o=e-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<d&&(d=o)}else if(f>0){if(o>d)return;o>c&&(c=o)}if(o=n-l,f||!(o<0)){if(o/=f,f<0){if(o>d)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<d&&(d=o)}if(o=t-u,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<d&&(d=o)}else if(p>0){if(o>d)return;o>c&&(c=o)}if(o=r-u,p||!(o<0)){if(o/=p,p<0){if(o>d)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<d&&(d=o)}return c>0&&(i.a={x:l+c*f,y:u+c*p}),d<1&&(i.b={x:l+d*f,y:u+d*p}),i}}}}}}var cr=1e9;function dr(e,t,n,r){return function(l){var u,c,d,f,p,h,m,g,v,y,b,x=l,w=or(),_=ur(e,t,n,r),S={point:T,lineStart:function(){S.point=P,c&&c.push(d=[]);y=!0,v=!1,m=g=NaN},lineEnd:function(){u&&(P(f,p),h&&v&&w.rejoin(),u.push(w.buffer()));S.point=T,v&&l.lineEnd()},polygonStart:function(){l=w,u=[],c=[],b=!0},polygonEnd:function(){l=x,u=o.merge(u);var t=function(e){for(var t=0,n=c.length,r=e[1],i=0;i<n;++i)for(var o,a=1,s=c[i],l=s.length,u=s[0];a<l;++a)o=s[a],u[1]<=r?o[1]>r&&Le(u,o,e)>0&&++t:o[1]<=r&&Le(u,o,e)<0&&--t,u=o;return 0!==t}([e,r]),n=b&&t,i=u.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),C(null,null,1,l),l.lineEnd()),i&&er(u,a,t,C,l),l.polygonEnd()),u=c=d=null}};function C(o,a,l,u){var c=0,d=0;if(null==o||(c=i(o,l))!==(d=i(a,l))||s(o,a)<0^l>0)do{u.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+l+4)%4)!==d);else u.point(a[0],a[1])}function A(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function T(e,t){A(e,t)&&l.point(e,t)}function P(e,t){var n=A(e=Math.max(-1e9,Math.min(cr,e)),t=Math.max(-1e9,Math.min(cr,t)));if(c&&d.push([e,t]),y)f=e,p=t,h=n,y=!1,n&&(l.lineStart(),l.point(e,t));else if(n&&v)l.point(e,t);else{var r={a:{x:m,y:g},b:{x:e,y:t}};_(r)?(v||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),n||l.lineEnd(),b=!1):n&&(l.lineStart(),l.point(e,t),b=!1)}m=e,g=t,v=n}return S};function i(r,i){return _(r[0]-e)<Ee?i>0?0:3:_(r[0]-n)<Ee?i>0?2:1:_(r[1]-t)<Ee?i>0?1:0:i>0?3:2}function a(e,t){return s(e.x,t.x)}function s(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}}function fr(e){var t=0,n=Me/3,r=Lr(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Me/180,n=e[1]*Me/180):[t/Me*180,n/Me*180]},i}function pr(e,t){var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),o=Math.sqrt(i)/r;function a(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),o-n*Math.cos(e)]}return a.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/r,Ve((i-(e*e+n*n)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var e,t,n,r,i,o,a={stream:function(e){return i&&(i.valid=!1),(i=o(e)).valid=!0,i},extent:function(s){return arguments.length?(o=dr(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[e,t],[n,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return fr(pr)}).raw=pr,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 e,t,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]),l={point:function(t,n){e=[t,n]}};function u(i){var o=i[0],a=i[1];return e=null,t(o,a),e||(n(o,a),e)||r(o,a),e}return u.invert=function(e){var t=i.scale(),n=i.translate(),r=(e[0]-n[0])/t,o=(e[1]-n[1])/t;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:i).invert(e)},u.stream=function(e){var t=i.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},u.precision=function(e){return arguments.length?(i.precision(e),a.precision(e),s.precision(e),u):i.precision()},u.scale=function(e){return arguments.length?(i.scale(e),a.scale(.35*e),s.scale(e),u.translate(i.translate())):i.scale()},u.translate=function(e){if(!arguments.length)return i.translate();var o=i.scale(),c=+e[0],d=+e[1];return t=i.translate(e).clipExtent([[c-.455*o,d-.238*o],[c+.455*o,d+.238*o]]).stream(l).point,n=a.translate([c-.307*o,d+.201*o]).clipExtent([[c-.425*o+Ee,d+.12*o+Ee],[c-.214*o-Ee,d+.234*o-Ee]]).stream(l).point,r=s.translate([c-.205*o,d+.212*o]).clipExtent([[c-.214*o+Ee,d+.166*o+Ee],[c-.115*o-Ee,d+.234*o-Ee]]).stream(l).point,u},u.scale(1070)};var hr,mr,gr,vr,yr,br,xr={point:B,lineStart:B,lineEnd:B,polygonStart:function(){mr=0,xr.lineStart=wr},polygonEnd:function(){xr.lineStart=xr.lineEnd=xr.point=B,hr+=_(mr/2)}};function wr(){var e,t,n,r;function i(e,t){mr+=r*e-n*t,n=e,r=t}xr.point=function(o,a){xr.point=i,e=n=o,t=r=a},xr.lineEnd=function(){i(e,t)}}var _r={point:function(e,t){e<gr&&(gr=e);e>yr&&(yr=e);t<vr&&(vr=t);t>br&&(br=t)},lineStart:B,lineEnd:B,polygonStart:B,polygonEnd:B};function Sr(){var e=Cr(4.5),t=[],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=Cr(t),n},result:function(){if(t.length){var e=t.join("");return t=[],e}}};function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r),n.point=o}function o(e,n){t.push("L",e,",",n)}function a(){n.point=r}function s(){t.push("Z")}return n}function Cr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var Ar,Tr={point:Pr,lineStart:Er,lineEnd:Or,polygonStart:function(){Tr.lineStart=Mr},polygonEnd:function(){Tr.point=Pr,Tr.lineStart=Er,Tr.lineEnd=Or}};function Pr(e,t){Tn+=e,Pn+=t,++En}function Er(){var e,t;function n(n,r){var i=n-e,o=r-t,a=Math.sqrt(i*i+o*o);On+=a*(e+n)/2,Mn+=a*(t+r)/2,Dn+=a,Pr(e=n,t=r)}Tr.point=function(r,i){Tr.point=n,Pr(e=r,t=i)}}function Or(){Tr.point=Pr}function Mr(){var e,t,n,r;function i(e,t){var i=e-n,o=t-r,a=Math.sqrt(i*i+o*o);On+=a*(n+e)/2,Mn+=a*(r+t)/2,Dn+=a,kn+=(a=r*e-n*t)*(n+e),In+=a*(r+t),Rn+=3*a,Pr(n=e,r=t)}Tr.point=function(o,a){Tr.point=i,Pr(e=n=o,t=r=a)},Tr.lineEnd=function(){i(e,t)}}function Dr(e){var t=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(e){return t=e,n},result:B};function r(n,r){e.moveTo(n+t,r),e.arc(n,r,t,0,De)}function i(t,r){e.moveTo(t,r),n.point=o}function o(t,n){e.lineTo(t,n)}function a(){n.point=r}function s(){e.closePath()}return n}function kr(e){var t=.5,n=Math.cos(30*Re),r=16;function i(e){return(r?a:o)(e)}function o(t){return Nr(t,(function(n,r){n=e(n,r),t.point(n[0],n[1])}))}function a(t){var n,i,o,a,l,u,c,d,f,p,h,m,g={point:v,lineStart:y,lineEnd:x,polygonStart:function(){t.polygonStart(),g.lineStart=w},polygonEnd:function(){t.polygonEnd(),g.lineStart=y}};function v(n,r){n=e(n,r),t.point(n[0],n[1])}function y(){d=NaN,g.point=b,t.lineStart()}function b(n,i){var o=Bn([n,i]),a=e(n,i);s(d,f,c,p,h,m,d=a[0],f=a[1],c=n,p=o[0],h=o[1],m=o[2],r,t),t.point(d,f)}function x(){g.point=v,t.lineEnd()}function w(){y(),g.point=_,g.lineEnd=S}function _(e,t){b(n=e,t),i=d,o=f,a=p,l=h,u=m,g.point=b}function S(){s(d,f,c,p,h,m,i,o,n,a,l,u,r,t),g.lineEnd=x,x()}return g}function s(r,i,o,a,l,u,c,d,f,p,h,m,g,v){var y=c-r,b=d-i,x=y*y+b*b;if(x>4*t&&g--){var w=a+p,S=l+h,C=u+m,A=Math.sqrt(w*w+S*S+C*C),T=Math.asin(C/=A),P=_(_(C)-1)<Ee||_(o-f)<Ee?(o+f)/2:Math.atan2(S,w),E=e(P,T),O=E[0],M=E[1],D=O-r,k=M-i,I=b*D-y*k;(I*I/x>t||_((y*D+b*k)/x-.5)>.3||a*p+l*h+u*m<n)&&(s(r,i,o,a,l,u,O,M,P,w/=A,S/=A,C,g,v),v.point(O,M),s(O,M,P,w,S,C,c,d,f,p,h,m,g,v))}}return i.precision=function(e){return arguments.length?(r=(t=e*e)>0&&16,i):Math.sqrt(t)},i}function Ir(e){var t=kr((function(t,n){return e([t*Ne,n*Ne])}));return function(e){return Br(t(e))}}function Rr(e){this.stream=e}function Nr(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Fr(e){return Lr((function(){return e}))()}function Lr(e){var t,n,r,i,a,s,l=kr((function(e,n){return[(e=t(e,n))[0]*u+i,a-e[1]*u]})),u=150,c=480,d=250,f=0,p=0,h=0,m=0,g=0,v=sr,y=R,b=null,x=null;function w(e){return[(e=r(e[0]*Re,e[1]*Re))[0]*u+i,a-e[1]*u]}function _(e){return(e=r.invert((e[0]-i)/u,(a-e[1])/u))&&[e[0]*Ne,e[1]*Ne]}function S(){r=Qn(n=zr(h,m,g),t);var e=t(f,p);return i=c-e[0]*u,a=d+e[1]*u,C()}function C(){return s&&(s.valid=!1,s=null),w}return w.stream=function(e){return s&&(s.valid=!1),(s=Br(v(n,l(y(e))))).valid=!0,s},w.clipAngle=function(e){return arguments.length?(v=null==e?(b=e,sr):lr((b=+e)*Re),C()):b},w.clipExtent=function(e){return arguments.length?(x=e,y=e?dr(e[0][0],e[0][1],e[1][0],e[1][1]):R,C()):x},w.scale=function(e){return arguments.length?(u=+e,S()):u},w.translate=function(e){return arguments.length?(c=+e[0],d=+e[1],S()):[c,d]},w.center=function(e){return arguments.length?(f=e[0]%360*Re,p=e[1]%360*Re,S()):[f*Ne,p*Ne]},w.rotate=function(e){return arguments.length?(h=e[0]%360*Re,m=e[1]%360*Re,g=e.length>2?e[2]%360*Re:0,S()):[h*Ne,m*Ne,g*Ne]},o.rebind(w,l,"precision"),function(){return t=e.apply(this,arguments),w.invert=t.invert&&_,S()}}function Br(e){return Nr(e,(function(t,n){e.point(t*Re,n*Re)}))}function Vr(e,t){return[e,t]}function jr(e,t){return[e>Me?e-De:e<-Me?e+De:e,t]}function zr(e,t,n){return e?t||n?Qn(Ur(e),Wr(t,n)):Ur(e):t||n?Wr(t,n):jr}function Gr(e){return function(t,n){return[(t+=e)>Me?t-De:t<-Me?t+De:t,n]}}function Ur(e){var t=Gr(e);return t.invert=Gr(-e),t}function Wr(e,t){var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),o=Math.sin(t);function a(e,t){var a=Math.cos(t),s=Math.cos(e)*a,l=Math.sin(e)*a,u=Math.sin(t),c=u*n+s*r;return[Math.atan2(l*i-c*o,s*n-u*r),Ve(c*i+l*o)]}return a.invert=function(e,t){var a=Math.cos(t),s=Math.cos(e)*a,l=Math.sin(e)*a,u=Math.sin(t),c=u*i-l*o;return[Math.atan2(l*i+u*o,s*n+c*r),Ve(c*n-s*r)]},a}function Hr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var l=a*t;null!=i?(i=qr(n,i),o=qr(n,o),(a>0?i<o:i>o)&&(i+=a*De)):(i=e+a*De,o=e-.5*l);for(var u,c=i;a>0?c>o:c<o;c-=l)s.point((u=Wn([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],u[1])}}function qr(e,t){var n=Bn(t);n[0]-=e,Un(n);var r=Be(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Ee)%(2*Math.PI)}function Xr(e,t,n){var r=o.range(e,t-Ee,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function Kr(e,t,n){var r=o.range(e,t-Ee,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function Zr(e){return e.source}function Yr(e){return e.target}o.geo.path=function(){var e,t,n,r,i,a=4.5;function s(e){return e&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),i&&i.valid||(i=n(r)),o.geo.stream(e,i)),r.result()}function l(){return i=null,s}return s.area=function(e){return hr=0,o.geo.stream(e,n(xr)),hr},s.centroid=function(e){return Tn=Pn=En=On=Mn=Dn=kn=In=Rn=0,o.geo.stream(e,n(Tr)),Rn?[kn/Rn,In/Rn]:Dn?[On/Dn,Mn/Dn]:En?[Tn/En,Pn/En]:[NaN,NaN]},s.bounds=function(e){return yr=br=-(gr=vr=1/0),o.geo.stream(e,n(_r)),[[gr,vr],[yr,br]]},s.projection=function(t){return arguments.length?(n=(e=t)?t.stream||Ir(t):R,l()):e},s.context=function(e){return arguments.length?(r=null==(t=e)?new Sr:new Dr(e),"function"!=typeof a&&r.pointRadius(a),l()):t},s.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(r.pointRadius(+e),+e),s):a},s.projection(o.geo.albersUsa()).context(null)},o.geo.transform=function(e){return{stream:function(t){var n=new Rr(t);for(var r in e)n[r]=e[r];return n}}},Rr.prototype={point:function(e,t){this.stream.point(e,t)},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=Fr,o.geo.projectionMutator=Lr,(o.geo.equirectangular=function(){return Fr(Vr)}).raw=Vr.invert=Vr,o.geo.rotation=function(e){function t(t){return(t=e(t[0]*Re,t[1]*Re))[0]*=Ne,t[1]*=Ne,t}return e=zr(e[0]%360*Re,e[1]*Re,e.length>2?e[2]*Re:0),t.invert=function(t){return(t=e.invert(t[0]*Re,t[1]*Re))[0]*=Ne,t[1]*=Ne,t},t},jr.invert=Vr,o.geo.circle=function(){var e,t,n=[0,0],r=6;function i(){var e="function"==typeof n?n.apply(this,arguments):n,r=zr(-e[0]*Re,-e[1]*Re,0).invert,i=[];return t(null,null,1,{point:function(e,t){i.push(e=r(e,t)),e[0]*=Ne,e[1]*=Ne}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(e){return arguments.length?(n=e,i):n},i.angle=function(n){return arguments.length?(t=Hr((e=+n)*Re,r*Re),i):e},i.precision=function(n){return arguments.length?(t=Hr(e*Re,(r=+n)*Re),i):r},i.angle(90)},o.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Re,i=e[1]*Re,o=t[1]*Re,a=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},o.geo.graticule=function(){var e,t,n,r,i,a,s,l,u,c,d,f,p=10,h=p,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return o.range(Math.ceil(r/m)*m,n,m).map(d).concat(o.range(Math.ceil(l/g)*g,s,g).map(f)).concat(o.range(Math.ceil(t/p)*p,e,p).filter((function(e){return _(e%m)>Ee})).map(u)).concat(o.range(Math.ceil(a/h)*h,i,h).filter((function(e){return _(e%g)>Ee})).map(c))}return y.lines=function(){return b().map((function(e){return{type:"LineString",coordinates:e}}))},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(f(s).slice(1),d(n).reverse().slice(1),f(l).reverse().slice(1))]}},y.extent=function(e){return arguments.length?y.majorExtent(e).minorExtent(e):y.minorExtent()},y.majorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],l=+e[0][1],s=+e[1][1],r>n&&(e=r,r=n,n=e),l>s&&(e=l,l=s,s=e),y.precision(v)):[[r,l],[n,s]]},y.minorExtent=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),y.precision(v)):[[t,a],[e,i]]},y.step=function(e){return arguments.length?y.majorStep(e).minorStep(e):y.minorStep()},y.majorStep=function(e){return arguments.length?(m=+e[0],g=+e[1],y):[m,g]},y.minorStep=function(e){return arguments.length?(p=+e[0],h=+e[1],y):[p,h]},y.precision=function(o){return arguments.length?(v=+o,u=Xr(a,i,90),c=Kr(t,e,v),d=Xr(l,s,90),f=Kr(r,n,v),y):v},y.majorExtent([[-180,-90+Ee],[180,90-Ee]]).minorExtent([[-180,-80-Ee],[180,80+Ee]])},o.geo.greatArc=function(){var e,t,n=Zr,r=Yr;function i(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),t||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(e||n.apply(this,arguments),t||r.apply(this,arguments))},i.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,i):n},i.target=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(e,t){return n=e[0]*Re,r=e[1]*Re,i=t[0]*Re,o=t[1]*Re,a=Math.cos(r),s=Math.sin(r),l=Math.cos(o),u=Math.sin(o),c=a*Math.cos(n),d=a*Math.sin(n),f=l*Math.cos(i),p=l*Math.sin(i),h=2*Math.asin(Math.sqrt(ze(o-r)+a*l*ze(i-n))),m=1/Math.sin(h),(g=h?function(e){var t=Math.sin(e*=h)*m,n=Math.sin(h-e)*m,r=n*c+t*f,i=n*d+t*p,o=n*s+t*u;return[Math.atan2(i,r)*Ne,Math.atan2(o,Math.sqrt(r*r+i*i))*Ne]}:function(){return[n*Ne,r*Ne]}).distance=h,g;var n,r,i,o,a,s,l,u,c,d,f,p,h,m,g},o.geo.length=function(e){return Ar=0,o.geo.stream(e,Jr),Ar};var Jr={sphere:B,point:B,lineStart:function(){var e,t,n;function r(r,i){var o=Math.sin(i*=Re),a=Math.cos(i),s=_((r*=Re)-e),l=Math.cos(s);Ar+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=n*o-t*a*l)*s),t*o+n*a*l),e=r,t=o,n=a}Jr.point=function(i,o){e=i*Re,t=Math.sin(o*=Re),n=Math.cos(o),Jr.point=r},Jr.lineEnd=function(){Jr.point=Jr.lineEnd=B}},lineEnd:B,polygonStart:B,polygonEnd:B};function Qr(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(e*o,r*a),Math.asin(r&&n*o/r)]},n}var $r=Qr((function(e){return Math.sqrt(2/(1+e))}),(function(e){return 2*Math.asin(e/2)}));(o.geo.azimuthalEqualArea=function(){return Fr($r)}).raw=$r;var ei=Qr((function(e){var t=Math.acos(e);return t&&t/Math.sin(t)}),R);function ti(e,t){var n=Math.cos(e),r=function(e){return Math.tan(Me/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),o=n*Math.pow(r(e),i)/i;if(!i)return ii;function a(e,t){o>0?t<-Ie+Ee&&(t=-Ie+Ee):t>Ie-Ee&&(t=Ie-Ee);var n=o/Math.pow(r(t),i);return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}return a.invert=function(e,t){var n=o-t,r=Fe(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(o/r,1/i))-Ie]},a}function ni(e,t){var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(_(r)<Ee)return Vr;function o(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}return o.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-Fe(r)*Math.sqrt(e*e+n*n)]},o}(o.geo.azimuthalEquidistant=function(){return Fr(ei)}).raw=ei,(o.geo.conicConformal=function(){return fr(ti)}).raw=ti,(o.geo.conicEquidistant=function(){return fr(ni)}).raw=ni;var ri=Qr((function(e){return 1/e}),Math.atan);function ii(e,t){return[e,Math.log(Math.tan(Me/4+t/2))]}function oi(e){var t,n=Fr(e),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=Me*r(),l=i();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}(o.geo.gnomonic=function(){return Fr(ri)}).raw=ri,ii.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ie]},(o.geo.mercator=function(){return oi(ii)}).raw=ii;var ai=Qr((function(){return 1}),Math.asin);(o.geo.orthographic=function(){return Fr(ai)}).raw=ai;var si=Qr((function(e){return 1/(1+e)}),(function(e){return 2*Math.atan(e)}));function li(e,t){return[Math.log(Math.tan(Me/4+t/2)),-e]}function ui(e){return e[0]}function ci(e){return e[1]}function di(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;i++){for(;r>1&&Le(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function fi(e,t){return e[0]-t[0]||e[1]-t[1]}(o.geo.stereographic=function(){return Fr(si)}).raw=si,li.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ie]},(o.geo.transverseMercator=function(){var e=oi(li),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90])}).raw=li,o.geom={},o.geom.hull=function(e){var t=ui,n=ci;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,i=xt(t),o=xt(n),a=e.length,s=[],l=[];for(r=0;r<a;r++)s.push([+i.call(this,e[r],r),+o.call(this,e[r],r),r]);for(s.sort(fi),r=0;r<a;r++)l.push([s[r][0],-s[r][1]]);var u=di(s),c=di(l),d=c[0]===u[0],f=c[c.length-1]===u[u.length-1],p=[];for(r=u.length-1;r>=0;--r)p.push(e[s[u[r]][2]]);for(r=+d;r<c.length-f;++r)p.push(e[s[c[r]][2]]);return p}return r.x=function(e){return arguments.length?(t=e,r):t},r.y=function(e){return arguments.length?(n=e,r):n},r},o.geom.polygon=function(e){return H(e,pi),e};var pi=o.geom.polygon.prototype=[];function hi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function mi(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],u=n[1],c=t[1]-l,d=r[1]-u,f=(s*(l-u)-d*(i-o))/(d*a-s*c);return[i+f*a,l+f*c]}function gi(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}pi.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},pi.centroid=function(e){var t,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},pi.clip=function(e){for(var t,n,r,i,o,a,s=gi(e),l=-1,u=this.length-gi(this),c=this[u-1];++l<u;){for(t=e.slice(),e.length=0,i=this[l],o=t[(r=t.length-s)-1],n=-1;++n<r;)hi(a=t[n],c,i)?(hi(o,c,i)||e.push(mi(o,a,c,i)),e.push(a)):hi(o,c,i)&&e.push(mi(o,a,c,i)),o=a;s&&e.push(e[0]),c=i}return e};var vi,yi,bi,xi,wi,_i=[],Si=[];function Ci(){Ui(this),this.edge=this.site=this.circle=null}function Ai(e){var t=_i.pop()||new Ci;return t.site=e,t}function Ti(e){Ni(e),bi.remove(e),_i.push(e),Ui(e)}function Pi(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Ti(e);for(var l=o;l.circle&&_(n-l.circle.x)<Ee&&_(r-l.circle.cy)<Ee;)o=l.P,s.unshift(l),Ti(l),l=o;s.unshift(l),Ni(l);for(var u=a;u.circle&&_(n-u.circle.x)<Ee&&_(r-u.circle.cy)<Ee;)a=u.N,s.push(u),Ti(u),u=a;s.push(u),Ni(u);var c,d=s.length;for(c=1;c<d;++c)u=s[c],l=s[c-1],ji(u.edge,l.site,u.site,i);l=s[0],(u=s[d-1]).edge=Bi(l.site,u.site,null,i),Ri(l),Ri(u)}function Ei(e){for(var t,n,r,i,o=e.x,a=e.y,s=bi._;s;)if((r=Oi(s,a)-o)>Ee)s=s.L;else{if(!((i=o-Mi(s,a))>Ee)){r>-Ee?(t=s.P,n=s):i>-Ee?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Ai(e);if(bi.insert(t,l),t||n){if(t===n)return Ni(t),n=Ai(t.site),bi.insert(l,n),l.edge=n.edge=Bi(t.site,l.site),Ri(t),void Ri(n);if(n){Ni(t),Ni(n);var u=t.site,c=u.x,d=u.y,f=e.x-c,p=e.y-d,h=n.site,m=h.x-c,g=h.y-d,v=2*(f*g-p*m),y=f*f+p*p,b=m*m+g*g,x={x:(g*y-p*b)/v+c,y:(f*b-m*y)/v+d};ji(n.edge,u,h,x),l.edge=Bi(u,e,null,x),n.edge=Bi(e,h,null,x),Ri(t),Ri(n)}else l.edge=Bi(t.site,l.site)}}function Oi(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;var s=(n=a.site).x,l=n.y,u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,f=c/u;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function Mi(e,t){var n=e.N;if(n)return Oi(n,t);var r=e.site;return r.y===t?r.x:1/0}function Di(e){this.site=e,this.edges=[]}function ki(e,t){return t.angle-e.angle}function Ii(){Ui(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ri(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i.x,s=i.y,l=r.x-a,u=r.y-s,c=o.x-a,d=2*(l*(g=o.y-s)-u*c);if(!(d>=-Oe)){var f=l*l+u*u,p=c*c+g*g,h=(g*f-u*p)/d,m=(l*p-c*f)/d,g=m+s,v=Si.pop()||new Ii;v.arc=e,v.site=i,v.x=h+a,v.y=g+Math.sqrt(h*h+m*m),v.cy=g,e.circle=v;for(var y=null,b=wi._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}wi.insert(y,v),y||(xi=v)}}}}function Ni(e){var t=e.circle;t&&(t.P||(xi=t.N),wi.remove(t),Si.push(t),Ui(t),e.circle=null)}function Fi(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,a=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,d=e.r,f=c.x,p=c.y,h=d.x,m=d.y,g=(f+h)/2,v=(p+m)/2;if(m===p){if(g<a||g>=s)return;if(f>h){if(o){if(o.y>=u)return}else o={x:g,y:l};n={x:g,y:u}}else{if(o){if(o.y<l)return}else o={x:g,y:u};n={x:g,y:l}}}else if(i=v-(r=(f-h)/(m-p))*g,r<-1||r>1)if(f>h){if(o){if(o.y>=u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else if(p<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 e.a=o,e.b=n,!0}function Li(e,t){this.l=e,this.r=t,this.a=this.b=null}function Bi(e,t,n,r){var i=new Li(e,t);return vi.push(i),n&&ji(i,e,t,n),r&&ji(i,t,e,r),yi[e.i].edges.push(new zi(i,e,t)),yi[t.i].edges.push(new zi(i,t,e)),i}function Vi(e,t,n){var r=new Li(e,null);return r.a=t,r.b=n,vi.push(r),r}function ji(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function zi(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Gi(){this._=null}function Ui(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Wi(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Hi(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function qi(e){for(;e.L;)e=e.L;return e}function Xi(e,t){var n,r,i,o=e.sort(Ki).pop();for(vi=[],yi=new Array(e.length),bi=new Gi,wi=new Gi;;)if(i=xi,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(yi[o.i]=new Di(o),Ei(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;Pi(i.arc)}t&&(function(e){for(var t,n=vi,r=ur(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)(!Fi(t=n[i],e)||!r(t)||_(t.a.x-t.b.x)<Ee&&_(t.a.y-t.b.y)<Ee)&&(t.a=t.b=null,n.splice(i,1))}(t),function(e){for(var t,n,r,i,o,a,s,l,u,c,d=e[0][0],f=e[1][0],p=e[0][1],h=e[1][1],m=yi,g=m.length;g--;)if((o=m[g])&&o.prepare())for(l=(s=o.edges).length,a=0;a<l;)r=(c=s[a].end()).x,i=c.y,t=(u=s[++a%l].start()).x,n=u.y,(_(r-t)>Ee||_(i-n)>Ee)&&(s.splice(a,0,new zi(Vi(o.site,c,_(r-d)<Ee&&h-i>Ee?{x:d,y:_(t-d)<Ee?n:h}:_(i-h)<Ee&&f-r>Ee?{x:_(n-h)<Ee?t:f,y:h}:_(r-f)<Ee&&i-p>Ee?{x:f,y:_(t-f)<Ee?n:p}:_(i-p)<Ee&&r-d>Ee?{x:_(n-p)<Ee?t:d,y:p}:null),o.site,null)),++l)}(t));var a={cells:yi,edges:vi};return bi=wi=vi=yi=null,a}function Ki(e,t){return t.y-e.y||t.x-e.x}Di.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(ki),t.length},zi.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}},Gi.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=qi(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Wi(this,n),n=(e=n).U),n.C=!1,r.C=!0,Hi(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Hi(this,n),n=(e=n).U),n.C=!1,r.C=!0,Wi(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?qi(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Wi(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Hi(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Wi(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,Hi(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Wi(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,Hi(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},o.geom.voronoi=function(e){var t=ui,n=ci,r=t,i=n,o=Zi;if(e)return a(e);function a(e){var t=new Array(e.length),n=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return Xi(s(e),o).cells.forEach((function(o,s){var l=o.edges,u=o.site;(t[s]=l.length?l.map((function(e){var t=e.start();return[t.x,t.y]})):u.x>=n&&u.x<=i&&u.y>=r&&u.y<=a?[[n,a],[i,a],[i,r],[n,r]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(r(e,t)/Ee)*Ee,y:Math.round(i(e,t)/Ee)*Ee,i:t}}))}return a.links=function(e){return Xi(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},a.triangles=function(e){var t=[];return Xi(s(e)).cells.forEach((function(n,r){for(var i,o,a,s,l=n.site,u=n.edges.sort(ki),c=-1,d=u.length,f=u[d-1].edge,p=f.l===l?f.r:f.l;++c<d;)f,i=p,p=(f=u[c].edge).l===l?f.r:f.l,r<i.i&&r<p.i&&(a=i,s=p,((o=l).x-s.x)*(a.y-o.y)-(o.x-a.x)*(s.y-o.y)<0)&&t.push([e[r],e[i.i],e[p.i]])})),t},a.x=function(e){return arguments.length?(r=xt(t=e),a):t},a.y=function(e){return arguments.length?(i=xt(n=e),a):n},a.clipExtent=function(e){return arguments.length?(o=null==e?Zi:e,a):o===Zi?null:o},a.size=function(e){return arguments.length?a.clipExtent(e&&[[0,0],e]):o===Zi?null:o&&o[1]},a};var Zi=[[-1e6,-1e6],[1e6,1e6]];function Yi(e){return e.x}function Ji(e){return e.y}function Qi(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),l=t.nodes;l[0]&&Qi(e,l[0],n,r,a,s),l[1]&&Qi(e,l[1],a,r,i,s),l[2]&&Qi(e,l[2],n,s,a,o),l[3]&&Qi(e,l[3],a,s,i,o)}}function $i(e,t,n,r,i,o,a){var s,l=1/0;return function e(u,c,d,f,p){if(!(c>o||d>a||f<r||p<i)){if(h=u.point){var h,m=t-u.x,g=n-u.y,v=m*m+g*g;if(v<l){var y=Math.sqrt(l=v);r=t-y,i=n-y,o=t+y,a=n+y,s=h}}for(var b=u.nodes,x=.5*(c+f),w=.5*(d+p),_=(n>=w)<<1|t>=x,S=_+4;_<S;++_)if(u=b[3&_])switch(3&_){case 0:e(u,c,d,x,w);break;case 1:e(u,x,d,f,w);break;case 2:e(u,c,w,x,p);break;case 3:e(u,x,w,f,p)}}}(e,r,i,o,a),s}function eo(e,t){e=o.rgb(e),t=o.rgb(t);var n=e.r,r=e.g,i=e.b,a=t.r-n,s=t.g-r,l=t.b-i;return function(e){return"#"+pt(Math.round(n+a*e))+pt(Math.round(r+s*e))+pt(Math.round(i+l*e))}}function to(e,t){var n,r={},i={};for(n in e)n in t?r[n]=ao(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function no(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ro(e,t){var n,r,i,o=io.lastIndex=oo.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=io.exec(e))&&(r=oo.exec(t));)(i=r.index)>o&&(i=t.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,l.push({i:a,x:no(n,r)})),o=oo.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}o.geom.delaunay=function(e){return o.geom.voronoi().triangles(e)},o.geom.quadtree=function(e,t,n,r,i){var o,a=ui,s=ci;if(o=arguments.length)return a=Yi,s=Ji,3===o&&(i=n,r=t,n=t=0),l(e);function l(e){var l,u,c,d,f,p,h,m,g,v=xt(a),y=xt(s);if(null!=t)p=t,h=n,m=r,g=i;else if(m=g=-(p=h=1/0),u=[],c=[],f=e.length,o)for(d=0;d<f;++d)(l=e[d]).x<p&&(p=l.x),l.y<h&&(h=l.y),l.x>m&&(m=l.x),l.y>g&&(g=l.y),u.push(l.x),c.push(l.y);else for(d=0;d<f;++d){var b=+v(l=e[d],d),x=+y(l,d);b<p&&(p=b),x<h&&(h=x),b>m&&(m=b),x>g&&(g=x),u.push(b),c.push(x)}var w=m-p,S=g-h;function C(e,t,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,u=e.y;if(null!=l)if(_(l-n)+_(u-r)<.01)A(e,t,n,r,i,o,a,s);else{var c=e.point;e.x=e.y=e.point=null,A(e,c,l,u,i,o,a,s),A(e,t,n,r,i,o,a,s)}else e.x=n,e.y=r,e.point=t}else A(e,t,n,r,i,o,a,s)}function A(e,t,n,r,i,o,a,s){var l=.5*(i+a),u=.5*(o+s),c=n>=l,d=r>=u,f=d<<1|c;e.leaf=!1,c?i=l:a=l,d?o=u:s=u,C(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,i,o,a,s)}w>S?g=h+w:m=p+S;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){C(T,e,+v(e,++d),+y(e,d),p,h,m,g)},visit:function(e){Qi(e,T,p,h,m,g)},find:function(e){return $i(T,e[0],e[1],p,h,m,g)}};if(d=-1,null==t){for(;++d<f;)C(T,e[d],u[d],c[d],p,h,m,g);--d}else e.forEach(T.add);return u=c=e=l=null,T}return l.x=function(e){return arguments.length?(a=e,l):a},l.y=function(e){return arguments.length?(s=e,l):s},l.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),l):null==t?null:[[t,n],[r,i]]},l.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),l):null==t?null:[r-t,i-n]},l},o.interpolateRgb=eo,o.interpolateObject=to,o.interpolateNumber=no,o.interpolateString=ro;var io=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oo=new RegExp(io.source,"g");function ao(e,t){for(var n,r=o.interpolators.length;--r>=0&&!(n=o.interpolators[r](e,t)););return n}function so(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)r.push(ao(e[n],t[n]));for(;n<o;++n)i[n]=e[n];for(;n<a;++n)i[n]=t[n];return function(e){for(n=0;n<s;++n)i[n]=r[n](e);return i}}o.interpolate=ao,o.interpolators=[function(e,t){var n=typeof t;return("string"===n?bt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?eo:ro:t instanceof qe?eo:Array.isArray(t)?so:"object"===n&&isNaN(t)?to:no)(e,t)}],o.interpolateArray=so;var lo=function(){return R},uo=o.map({linear:lo,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return mo},cubic:function(){return go},sin:function(){return yo},exp:function(){return bo},circle:function(){return xo},elastic:function(e,t){var n;arguments.length<2&&(t=.45);arguments.length?n=t/De*Math.asin(1/e):(e=1,n=t/4);return function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*De/t)}},back:function(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}},bounce:function(){return wo}}),co=o.map({in:R,out:po,"in-out":ho,"out-in":function(e){return ho(po(e))}});function fo(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function po(e){return function(t){return 1-e(1-t)}}function ho(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function mo(e){return e*e}function go(e){return e*e*e}function vo(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function yo(e){return 1-Math.cos(e*Ie)}function bo(e){return Math.pow(2,10*(e-1))}function xo(e){return 1-Math.sqrt(1-e*e)}function wo(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function _o(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function So(e){var t,n,r,i=[e.a,e.b],o=[e.c,e.d],a=Ao(i),s=Co(i,o),l=Ao(((t=o)[0]+=(r=-s)*(n=i)[0],t[1]+=r*n[1],t))||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]))*Ne,this.translate=[e.e,e.f],this.scale=[a,l],this.skew=l?Math.atan2(s,l)*Ne:0}function Co(e,t){return e[0]*t[0]+e[1]*t[1]}function Ao(e){var t=Math.sqrt(Co(e,e));return t&&(e[0]/=t,e[1]/=t),t}o.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=uo.get(n)||lo,fo((r=co.get(r)||R)(n.apply(null,a.call(arguments,1))))},o.interpolateHcl=function(e,t){e=o.hcl(e),t=o.hcl(t);var n=e.h,r=e.c,i=e.l,a=t.h-n,s=t.c-r,l=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.c:r);isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360);return function(e){return Qe(n+a*e,r+s*e,i+l*e)+""}},o.interpolateHsl=function(e,t){e=o.hsl(e),t=o.hsl(t);var n=e.h,r=e.s,i=e.l,a=t.h-n,s=t.s-r,l=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.s:r);isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360);return function(e){return Ze(n+a*e,r+s*e,i+l*e)+""}},o.interpolateLab=function(e,t){e=o.lab(e),t=o.lab(t);var n=e.l,r=e.a,i=e.b,a=t.l-n,s=t.a-r,l=t.b-i;return function(e){return it(n+a*e,r+s*e,i+l*e)+""}},o.interpolateRound=_o,o.transform=function(e){var t=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new So(n?n.matrix:To)})(e)},So.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var To={a:1,b:0,c:0,d:1,e:0,f:0};function Po(e){return e.length?e.pop()+",":""}function Eo(e,t){var n=[],r=[];return e=o.transform(e),t=o.transform(t),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:no(e[0],t[0])},{i:i-2,x:no(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(e.translate,t.translate,n,r),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Po(n)+"rotate(",null,")")-2,x:no(e,t)})):t&&n.push(Po(n)+"rotate("+t+")")}(e.rotate,t.rotate,n,r),function(e,t,n,r){e!==t?r.push({i:n.push(Po(n)+"skewX(",null,")")-2,x:no(e,t)}):t&&n.push(Po(n)+"skewX("+t+")")}(e.skew,t.skew,n,r),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Po(n)+"scale(",null,",",null,")");r.push({i:i-4,x:no(e[0],t[0])},{i:i-2,x:no(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Po(n)+"scale("+t+")")}(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i<o;)n[(t=r[i]).i]=t.x(e);return n.join("")}}function Oo(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function Mo(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function Do(e){for(var t=e.source,n=e.target,r=function(e,t){if(e===t)return e;var n=ko(e),r=ko(t),i=n.pop(),o=r.pop(),a=null;for(;i===o;)a=i,i=n.pop(),o=r.pop();return a}(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function ko(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Io(e){e.fixed|=2}function Ro(e){e.fixed&=-7}function No(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Fo(e){e.fixed&=-5}function Lo(e,t,n){var r=0,i=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,l=-1;++l<s;)null!=(o=a[l])&&(Lo(o,t,n),e.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,r+=u*e.point.x,i+=u*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}o.interpolateTransform=Eo,o.layout={},o.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Do(e[n]));return t}},o.layout.chord=function(){var e,t,n,r,i,a,s,l={},u=0;function c(){var l,c,f,p,h,m={},g=[],v=o.range(r),y=[];for(e=[],t=[],l=0,p=-1;++p<r;){for(c=0,h=-1;++h<r;)c+=n[p][h];g.push(c),y.push(o.range(r)),l+=c}for(i&&v.sort((function(e,t){return i(g[e],g[t])})),a&&y.forEach((function(e,t){e.sort((function(e,r){return a(n[t][e],n[t][r])}))})),l=(De-u*r)/l,c=0,p=-1;++p<r;){for(f=c,h=-1;++h<r;){var b=v[p],x=y[b][h],w=n[b][x],_=c,S=c+=w*l;m[b+"-"+x]={index:b,subindex:x,startAngle:_,endAngle:S,value:w}}t[b]={index:b,startAngle:f,endAngle:c,value:g[b]},c+=u}for(p=-1;++p<r;)for(h=p-1;++h<r;){var C=m[p+"-"+h],A=m[h+"-"+p];(C.value||A.value)&&e.push(C.value<A.value?{source:A,target:C}:{source:C,target:A})}s&&d()}function d(){e.sort((function(e,t){return s((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return l.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,e=t=null,l):n},l.padding=function(n){return arguments.length?(u=n,e=t=null,l):u},l.sortGroups=function(n){return arguments.length?(i=n,e=t=null,l):i},l.sortSubgroups=function(t){return arguments.length?(a=t,e=null,l):a},l.sortChords=function(t){return arguments.length?(s=t,e&&d(),l):s},l.chords=function(){return e||c(),e},l.groups=function(){return t||c(),t},l},o.layout.force=function(){var e,t,n,r,i,a,s={},l=o.dispatch("start","tick","end"),u=[1,1],c=.9,d=Bo,f=Vo,p=-30,h=jo,m=.1,g=.64,v=[],y=[];function b(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=i-n,l=o*o+a*a;if(s*s/g<l){if(l<h){var u=t.charge/l;e.px-=o*u,e.py-=a*u}return!0}if(t.point&&l&&l<h){u=t.pointCharge/l;e.px-=o*u,e.py-=a*u}}return!t.charge}}function x(e){e.px=o.event.x,e.py=o.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return e=null,l.end({type:"end",alpha:n=0}),!0;var t,s,d,f,h,g,x,w,_,S=v.length,C=y.length;for(s=0;s<C;++s)f=(d=y[s]).source,(g=(w=(h=d.target).x-f.x)*w+(_=h.y-f.y)*_)&&(w*=g=n*i[s]*((g=Math.sqrt(g))-r[s])/g,_*=g,h.x-=w*(x=f.weight+h.weight?f.weight/(f.weight+h.weight):.5),h.y-=_*x,f.x+=w*(x=1-x),f.y+=_*x);if((x=n*m)&&(w=u[0]/2,_=u[1]/2,s=-1,x))for(;++s<S;)(d=v[s]).x+=(w-d.x)*x,d.y+=(_-d.y)*x;if(p)for(Lo(t=o.geom.quadtree(v),n,a),s=-1;++s<S;)(d=v[s]).fixed||t.visit(b(d));for(s=-1;++s<S;)(d=v[s]).fixed?(d.x=d.px,d.y=d.py):(d.x-=(d.px-(d.px=d.x))*c,d.y-=(d.py-(d.py=d.y))*c);l.tick({type:"tick",alpha:n})},s.nodes=function(e){return arguments.length?(v=e,s):v},s.links=function(e){return arguments.length?(y=e,s):y},s.size=function(e){return arguments.length?(u=e,s):u},s.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(f="function"==typeof e?e:+e,s):f},s.friction=function(e){return arguments.length?(c=+e,s):c},s.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,s):p},s.chargeDistance=function(e){return arguments.length?(h=e*e,s):Math.sqrt(h)},s.gravity=function(e){return arguments.length?(m=+e,s):m},s.theta=function(e){return arguments.length?(g=e*e,s):Math.sqrt(g)},s.alpha=function(t){return arguments.length?(t=+t,n?t>0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=Et(s.tick)),s):n},s.start=function(){var e,t,n,o=v.length,l=y.length,c=u[0],h=u[1];for(e=0;e<o;++e)(n=v[e]).index=e,n.weight=0;for(e=0;e<l;++e)"number"==typeof(n=y[e]).source&&(n.source=v[n.source]),"number"==typeof n.target&&(n.target=v[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<o;++e)n=v[e],isNaN(n.x)&&(n.x=m("x",c)),isNaN(n.y)&&(n.y=m("y",h)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof d)for(e=0;e<l;++e)r[e]=+d.call(this,y[e],e);else for(e=0;e<l;++e)r[e]=d;if(i=[],"function"==typeof f)for(e=0;e<l;++e)i[e]=+f.call(this,y[e],e);else for(e=0;e<l;++e)i[e]=f;if(a=[],"function"==typeof p)for(e=0;e<o;++e)a[e]=+p.call(this,v[e],e);else for(e=0;e<o;++e)a[e]=p;function m(n,r){if(!t){for(t=new Array(o),u=0;u<o;++u)t[u]=[];for(u=0;u<l;++u){var i=y[u];t[i.source.index].push(i.target),t[i.target.index].push(i.source)}}for(var a,s=t[e],u=-1,c=s.length;++u<c;)if(!isNaN(a=s[u][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(t||(t=o.behavior.drag().origin(R).on("dragstart.force",Io).on("drag.force",x).on("dragend.force",Ro)),!arguments.length)return t;this.on("mouseover.force",No).on("mouseout.force",Fo).call(t)},o.rebind(s,l,"on")};var Bo=20,Vo=1,jo=1/0;function zo(e,t){return o.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=Xo,e}function Go(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Uo(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(e=r.pop());)t(e)}function Wo(e){return e.children}function Ho(e){return e.value}function qo(e,t){return t.value-e.value}function Xo(e){return o.merge(e.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}o.layout.hierarchy=function(){var e=qo,t=Wo,n=Ho;function r(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(u=t.call(r,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;n&&(o.value=0),o.children=u}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return Uo(i,(function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)})),s}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(Go(e,(function(e){e.children&&(e.value=0)})),Uo(e,(function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},r},o.layout.partition=function(){var e=o.layout.hierarchy(),t=[1,1];function n(e,t,r,i){var o=e.children;if(e.x=t,e.y=e.depth*i,e.dx=r,e.dy=i,o&&(a=o.length)){var a,s,l,u=-1;for(r=e.value?r/e.value:0;++u<a;)n(s=o[u],t,l=s.value*r,i),t+=l}}function r(e){var t=e.children,n=0;if(t&&(i=t.length))for(var i,o=-1;++o<i;)n=Math.max(n,r(t[o]));return 1+n}function i(i,o){var a=e.call(this,i,o);return n(a[0],0,t[0],t[1]/r(a[0])),a}return i.size=function(e){return arguments.length?(t=e,i):t},zo(i,e)},o.layout.pie=function(){var e=Number,t=Ko,n=0,r=De,i=0;function a(s){var l,u=s.length,c=s.map((function(t,n){return+e.call(a,t,n)})),d=+("function"==typeof n?n.apply(this,arguments):n),f=("function"==typeof r?r.apply(this,arguments):r)-d,p=Math.min(Math.abs(f)/u,+("function"==typeof i?i.apply(this,arguments):i)),h=p*(f<0?-1:1),m=o.sum(c),g=m?(f-u*h)/m:0,v=o.range(u),y=[];return null!=t&&v.sort(t===Ko?function(e,t){return c[t]-c[e]}:function(e,n){return t(s[e],s[n])}),v.forEach((function(e){y[e]={data:s[e],value:l=c[e],startAngle:d,endAngle:d+=l*g+h,padAngle:p}})),y}return a.value=function(t){return arguments.length?(e=t,a):e},a.sort=function(e){return arguments.length?(t=e,a):t},a.startAngle=function(e){return arguments.length?(n=e,a):n},a.endAngle=function(e){return arguments.length?(r=e,a):r},a.padAngle=function(e){return arguments.length?(i=e,a):i},a};var Ko={};function Zo(e){return e.x}function Yo(e){return e.y}function Jo(e,t,n){e.y0=t,e.y=n}o.layout.stack=function(){var e=R,t=ea,n=ta,r=Jo,i=Zo,a=Yo;function s(l,u){if(!(p=l.length))return l;var c=l.map((function(t,n){return e.call(s,t,n)})),d=c.map((function(e){return e.map((function(e,t){return[i.call(s,e,t),a.call(s,e,t)]}))})),f=t.call(s,d,u);c=o.permute(c,f),d=o.permute(d,f);var p,h,m,g,v=n.call(s,d,u),y=c[0].length;for(m=0;m<y;++m)for(r.call(s,c[0][m],g=v[m],d[0][m][1]),h=1;h<p;++h)r.call(s,c[h][m],g+=d[h-1][m][1],d[h][m][1]);return l}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(e){return arguments.length?(t="function"==typeof e?e:Qo.get(e)||ea,s):t},s.offset=function(e){return arguments.length?(n="function"==typeof e?e:$o.get(e)||ta,s):n},s.x=function(e){return arguments.length?(i=e,s):i},s.y=function(e){return arguments.length?(a=e,s):a},s.out=function(e){return arguments.length?(r=e,s):r},s};var Qo=o.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(na),a=e.map(ra),s=o.range(r).sort((function(e,t){return i[e]-i[t]})),l=0,u=0,c=[],d=[];for(t=0;t<r;++t)n=s[t],l<u?(l+=a[n],c.push(n)):(u+=a[n],d.push(n));return d.reverse().concat(c)},reverse:function(e){return o.range(e.length).reverse()},default:ea}),$o=o.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,a=[],s=0,l=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)l[n]=(s-a[n])/2;return l},wiggle:function(e){var t,n,r,i,o,a,s,l,u,c=e.length,d=e[0],f=d.length,p=[];for(p[0]=l=u=0,n=1;n<f;++n){for(t=0,i=0;t<c;++t)i+=e[t][n][1];for(t=0,o=0,s=d[n][0]-d[n-1][0];t<c;++t){for(r=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);r<t;++r)a+=(e[r][n][1]-e[r][n-1][1])/s;o+=a*e[t][n][1]}p[n]=l-=i?o/i*s:0,l<u&&(u=l)}for(n=0;n<f;++n)p[n]-=u;return p},expand:function(e){var t,n,r,i=e.length,o=e[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:ta});function ea(e){return o.range(e.length)}function ta(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function na(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function ra(e){return e.reduce(ia,0)}function ia(e,t){return e+t[1]}function oa(e,t){return aa(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function aa(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function sa(e){return[o.min(e),o.max(e)]}function la(e,t){return e.value-t.value}function ua(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function ca(e,t){e._pack_next=t,t._pack_prev=e}function da(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function fa(e){if((t=e.children)&&(l=t.length)){var t,n,r,i,o,a,s,l,u=1/0,c=-1/0,d=1/0,f=-1/0;if(t.forEach(pa),(n=t[0]).x=-n.r,n.y=0,b(n),l>1&&((r=t[1]).x=r.r,r.y=0,b(r),l>2))for(ga(n,r,i=t[2]),b(i),ua(n,i),n._pack_prev=i,ua(i,r),r=n._pack_next,o=3;o<l;o++){ga(n,r,i=t[o]);var p=0,h=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,h++)if(da(a,i)){p=1;break}if(1==p)for(s=n._pack_prev;s!==a._pack_prev&&!da(s,i);s=s._pack_prev,m++);p?(h<m||h==m&&r.r<n.r?ca(n,r=a):ca(n=s,r),o--):(ua(n,i),r=i,b(i))}var g=(u+c)/2,v=(d+f)/2,y=0;for(o=0;o<l;o++)(i=t[o]).x-=g,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));e.r=y,t.forEach(ha)}function b(e){u=Math.min(e.x-e.r,u),c=Math.max(e.x+e.r,c),d=Math.min(e.y-e.r,d),f=Math.max(e.y+e.r,f)}}function pa(e){e._pack_next=e._pack_prev=e}function ha(e){delete e._pack_next,delete e._pack_prev}function ma(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var o=-1,a=i.length;++o<a;)ma(i[o],t,n,r)}function ga(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var a=t.r+n.r,s=i*i+o*o,l=.5+((r*=r)-(a*=a))/(2*s),u=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=e.x+l*i+u*o,n.y=e.y+l*o-u*i}else n.x=e.x+r,n.y=e.y}function va(e,t){return e.parent==t.parent?1:2}function ya(e){var t=e.children;return t.length?t[0]:e.t}function ba(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function xa(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function wa(e,t,n){return e.a.parent===t.parent?e.a:n}function _a(e){var t=e.children;return t&&t.length?_a(t[0]):e}function Sa(e){var t,n=e.children;return n&&(t=n.length)?Sa(n[t-1]):e}function Ca(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Aa(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[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 Ta(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Pa(e){return e.rangeExtent?e.rangeExtent():Ta(e.range())}function Ea(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function Oa(e,t){var n,r=0,i=e.length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Ma(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Da}o.layout.histogram=function(){var e=!0,t=Number,n=sa,r=oa;function i(i,a){for(var s,l,u=[],c=i.map(t,this),d=n.call(this,c,a),f=r.call(this,d,c,a),p=(a=-1,c.length),h=f.length-1,m=e?1:1/p;++a<h;)(s=u[a]=[]).dx=f[a+1]-(s.x=f[a]),s.y=0;if(h>0)for(a=-1;++a<p;)(l=c[a])>=d[0]&&l<=d[1]&&((s=u[o.bisect(f,l,1,h)-1]).y+=m,s.push(i[a]));return u}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=xt(e),i):n},i.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return aa(t,e)}:xt(e),i):r},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},o.layout.pack=function(){var e,t=o.layout.hierarchy().sort(la),n=0,r=[1,1];function i(i,o){var a=t.call(this,i,o),s=a[0],l=r[0],u=r[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Uo(s,(function(e){e.r=+c(e.value)})),Uo(s,fa),n){var d=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;Uo(s,(function(e){e.r+=d})),Uo(s,fa),Uo(s,(function(e){e.r-=d}))}return ma(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),a}return i.size=function(e){return arguments.length?(r=e,i):r},i.radius=function(t){return arguments.length?(e=null==t||"function"==typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(n=+e,i):n},zo(i,t)},o.layout.tree=function(){var e=o.layout.hierarchy().sort(null).value(null),t=va,n=[1,1],r=null;function i(i,o){var u=e.call(this,i,o),c=u[0],d=function(e){var t,n={A:null,children:[e]},r=[n];for(;null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:t,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(Uo(d,a),d.parent.m=-d.z,Go(d,s),r)Go(c,l);else{var f=c,p=c,h=c;Go(c,(function(e){e.x<f.x&&(f=e),e.x>p.x&&(p=e),e.depth>h.depth&&(h=e)}));var m=t(f,p)/2-f.x,g=n[0]/(p.x+t(p,f)/2+m),v=n[1]/(h.depth||1);Go(c,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return u}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n.length){!function(e){var t,n=0,r=0,i=e.children,o=i.length;for(;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,l=o.parent.children[0],u=o.m,c=a.m,d=s.m,f=l.m;s=ba(s),o=ya(o),s&&o;)l=ya(l),(a=ba(a)).a=e,(i=s.z+d-o.z-u+t(s._,o._))>0&&(xa(wa(s,e,r),e,i),u+=i,c+=i),d+=s.m,u+=o.m,f+=l.m,c+=a.m;s&&!ba(a)&&(a.t=s,a.m+=d-c),o&&!ya(l)&&(l.t=o,l.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e)?l:null,i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null==(n=e)?null:l,i):r?n:null},zo(i,e)},o.layout.cluster=function(){var e=o.layout.hierarchy().sort(null).value(null),t=va,n=[1,1],r=!1;function i(i,a){var s,l=e.call(this,i,a),u=l[0],c=0;Uo(u,(function(e){var n=e.children;n&&n.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),e.y=function(e){return 1+o.max(e,(function(e){return e.y}))}(n)):(e.x=s?c+=t(e,s):0,e.y=0,s=e)}));var d=_a(u),f=Sa(u),p=d.x-t(d,f)/2,h=f.x+t(f,d)/2;return Uo(u,r?function(e){e.x=(e.x-u.x)*n[0],e.y=(u.y-e.y)*n[1]}:function(e){e.x=(e.x-p)/(h-p)*n[0],e.y=(1-(u.y?e.y/u.y:1))*n[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e),i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null!=(n=e),i):r?n:null},zo(i,e)},o.layout.treemap=function(){var e,t=o.layout.hierarchy(),n=Math.round,r=[1,1],i=null,a=Ca,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function d(e){var t=e.children;if(t&&t.length){var n,r,i,o=a(e),s=[],u=t.slice(),f=1/0,m="slice"===l?o.dx:"dice"===l?o.dy:"slice-dice"===l?1&e.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(c(u,o.dx*o.dy/e.value),s.area=0;(i=u.length)>0;)s.push(n=u[i-1]),s.area+=n.area,"squarify"!==l||(r=p(s,m))<=f?(u.pop(),f=r):(s.area-=s.pop().area,h(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,f=1/0);s.length&&(h(s,m,o,!0),s.length=s.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var n,r=a(e),i=t.slice(),o=[];for(c(i,r.dx*r.dy/e.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(h(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);t.forEach(f)}}function p(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(n<o&&(o=n),n>i&&(i=n));return t*=t,(r*=r)?Math.max(t*i*u/r,r/(t*o*u)):1/0}function h(e,t,r,i){var o,a=-1,s=e.length,l=r.x,u=r.y,c=t?n(e.area/t):0;if(t==r.dx){for((i||c>r.dy)&&(c=r.dy);++a<s;)(o=e[a]).x=l,o.y=u,o.dy=c,l+=o.dx=Math.min(r.x+r.dx-l,c?n(o.area/c):0);o.z=!0,o.dx+=r.x+r.dx-l,r.y+=c,r.dy-=c}else{for((i||c>r.dx)&&(c=r.dx);++a<s;)(o=e[a]).x=l,o.y=u,o.dx=c,u+=o.dy=Math.min(r.y+r.dy-u,c?n(o.area/c):0);o.z=!1,o.dy+=r.y+r.dy-u,r.x+=c,r.dx-=c}}function m(n){var i=e||t(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,e&&t.revalue(o),c([o],o.dx*o.dy/o.value),(e?f:d)(o),s&&(e=i),i}return m.size=function(e){return arguments.length?(r=e,m):r},m.padding=function(e){if(!arguments.length)return i;function t(t){var n=e.call(m,t,t.depth);return null==n?Ca(t):Aa(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Aa(t,e)}var r;return a=null==(i=e)?Ca:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,m},m.round=function(e){return arguments.length?(n=e?Math.round:Number,m):n!=Number},m.sticky=function(t){return arguments.length?(s=t,e=null,m):s},m.ratio=function(e){return arguments.length?(u=e,m):u},m.mode=function(e){return arguments.length?(l=e+"",m):l},zo(m,t)},o.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=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 e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=o.random.normal.apply(o,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=o.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},o.scale={};var Da={floor:R,ceil:R};function ka(e,t,n,r){var i=[],a=[],s=0,l=Math.min(e.length,t.length)-1;for(e[l]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<=l;)i.push(n(e[s-1],e[s])),a.push(r(t[s-1],t[s]));return function(t){var n=o.bisect(e,t,1,l)-1;return a[n](i[n](t))}}function Ia(e,t,n,r){var i,o;function a(){var a=Math.min(e.length,t.length)>2?ka:Ea,l=r?Mo:Oo;return i=a(e,t,l,n),o=a(t,e,l,ao),s}function s(e){return i(e)}return s.invert=function(e){return o(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),a()):e},s.range=function(e){return arguments.length?(t=e,a()):t},s.rangeRound=function(e){return s.range(e).interpolate(_o)},s.clamp=function(e){return arguments.length?(r=e,a()):r},s.interpolate=function(e){return arguments.length?(n=e,a()):n},s.ticks=function(t){return La(e,t)},s.tickFormat=function(t,n){return Ba(e,t,n)},s.nice=function(t){return Na(e,t),a()},s.copy=function(){return Ia(e,t,n,r)},a()}function Ra(e,t){return o.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Na(e,t){return Oa(e,Ma(Fa(e,t)[2])),Oa(e,Ma(Fa(e,t)[2])),e}function Fa(e,t){null==t&&(t=10);var n=Ta(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/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 La(e,t){return o.range.apply(o,Fa(e,t))}function Ba(e,t,n){var r=Fa(e,t);if(n){var i=Nt.exec(n);if(i.shift(),"s"===i[8]){var a=o.formatPrefix(Math.max(_(r[0]),_(r[1])));return i[7]||(i[7]="."+ja(a.scale(r[2]))),i[8]="f",n=o.format(i.join("")),function(e){return n(a.scale(e))+a.symbol}}i[7]||(i[7]="."+function(e,t){var n=ja(t[2]);return e in Va?Math.abs(n-ja(Math.max(_(t[0]),_(t[1]))))+ +("e"!==e):n-2*("%"===e)}(i[8],r)),n=i.join("")}else n=",."+ja(r[2])+"f";return o.format(n)}o.scale.linear=function(){return Ia([0,1],[0,1],ao,!1)};var Va={s:1,g:1,p:1,r:1,e:1};function ja(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function za(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function s(t){return e(i(t))}return s.invert=function(t){return a(e.invert(t))},s.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),s):r},s.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),s):t},s.nice=function(){var t=Oa(r.map(i),n?Math:Ua);return e.domain(t),r=t.map(a),s},s.ticks=function(){var e=Ta(r),o=[],s=e[0],l=e[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;u<c;u++)for(var f=1;f<d;f++)o.push(a(u)*f);o.push(a(u))}else for(o.push(a(u));u++<c;)for(f=d-1;f>0;f--)o.push(a(u)*f);for(u=0;o[u]<s;u++);for(c=o.length;o[c-1]>l;c--);o=o.slice(u,c)}return o},s.tickFormat=function(e,n){if(!arguments.length)return Ga;arguments.length<2?n=Ga:"function"!=typeof n&&(n=o.format(n));var r=Math.max(1,t*e/s.ticks().length);return function(e){var o=e/a(Math.round(i(e)));return o*t<t-.5&&(o*=t),o<=r?n(e):""}},s.copy=function(){return za(e.copy(),t,n,r)},Ra(s,e)}o.scale.log=function(){return za(o.scale.linear().domain([0,1]),10,!0,[1,10])};var Ga=o.format(".0e"),Ua={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Wa(e,t,n){var r=Ha(t),i=Ha(1/t);function o(t){return e(r(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),o):n},o.ticks=function(e){return La(n,e)},o.tickFormat=function(e,t){return Ba(n,e,t)},o.nice=function(e){return o.domain(Na(n,e))},o.exponent=function(a){return arguments.length?(r=Ha(t=a),i=Ha(1/t),e.domain(n.map(r)),o):t},o.copy=function(){return Wa(e.copy(),t,n)},Ra(o,e)}function Ha(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qa(e,t){var n,r,i;function a(i){return r[((n.get(i)||("range"===t.t?n.set(i,e.push(i)):NaN))-1)%r.length]}function s(t,n){return o.range(e.length).map((function(e){return t+n*e}))}return a.domain=function(r){if(!arguments.length)return e;e=[],n=new A;for(var i,o=-1,s=r.length;++o<s;)n.has(i=r[o])||n.set(i,e.push(i));return a[t.t].apply(a,t.a)},a.range=function(e){return arguments.length?(r=e,i=0,t={t:"range",a:arguments},a):r},a.rangePoints=function(n,o){arguments.length<2&&(o=0);var l=n[0],u=n[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+o);return r=s(l+c*o/2,c),i=0,t={t:"rangePoints",a:arguments},a},a.rangeRoundPoints=function(n,o){arguments.length<2&&(o=0);var l=n[0],u=n[1],c=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+o)|0;return r=s(l+Math.round(c*o/2+(u-l-(e.length-1+o)*c)/2),c),i=0,t={t:"rangeRoundPoints",a:arguments},a},a.rangeBands=function(n,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=n[1]<n[0],c=n[u-0],d=n[1-u],f=(d-c)/(e.length-o+2*l);return r=s(c+f*l,f),u&&r.reverse(),i=f*(1-o),t={t:"rangeBands",a:arguments},a},a.rangeRoundBands=function(n,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=n[1]<n[0],c=n[u-0],d=n[1-u],f=Math.floor((d-c)/(e.length-o+2*l));return r=s(c+Math.round((d-c-(e.length-o)*f)/2),f),u&&r.reverse(),i=Math.round(f*(1-o)),t={t:"rangeRoundBands",a:arguments},a},a.rangeBand=function(){return i},a.rangeExtent=function(){return Ta(t.a[0])},a.copy=function(){return qa(e,t)},a.domain(e)}o.scale.pow=function(){return Wa(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return qa([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(Xa)},o.scale.category20=function(){return o.scale.ordinal().range(Ka)},o.scale.category20b=function(){return o.scale.ordinal().range(Za)},o.scale.category20c=function(){return o.scale.ordinal().range(Ya)};var Xa=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(dt),Ka=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(dt),Za=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(dt),Ya=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(dt);function Ja(e,t){var n;function r(){var r=0,a=t.length;for(n=[];++r<a;)n[r-1]=o.quantile(e,r/a);return i}function i(e){if(!isNaN(e=+e))return t[o.bisect(n,e)]}return i.domain=function(t){return arguments.length?(e=t.map(v).filter(y).sort(g),r()):e},i.range=function(e){return arguments.length?(t=e,r()):t},i.quantiles=function(){return n},i.invertExtent=function(r){return(r=t.indexOf(r))<0?[NaN,NaN]:[r>0?n[r-1]:e[0],r<n.length?n[r]:e[e.length-1]]},i.copy=function(){return Ja(e,t)},r()}function Qa(e,t,n){var r,i;function o(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function a(){return r=n.length/(t-e),i=n.length-1,o}return o.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],a()):[e,t]},o.range=function(e){return arguments.length?(n=e,a()):n},o.invertExtent=function(t){return[t=(t=n.indexOf(t))<0?NaN:t/r+e,t+1/r]},o.copy=function(){return Qa(e,t,n)},a()}function $a(e,t){function n(n){if(n<=n)return t[o.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return $a(e,t)},n}function es(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return La(e,t)},t.tickFormat=function(t,n){return Ba(e,t,n)},t.copy=function(){return es(e)},t}function ts(){return 0}o.scale.quantile=function(){return Ja([],[])},o.scale.quantize=function(){return Qa(0,1,[0,1])},o.scale.threshold=function(){return $a([.5],[0,1])},o.scale.identity=function(){return es([0,1])},o.svg={},o.svg.arc=function(){var e=rs,t=is,n=ts,r=ns,i=os,o=as,a=ss;function s(){var s=Math.max(0,+e.apply(this,arguments)),u=Math.max(0,+t.apply(this,arguments)),c=i.apply(this,arguments)-Ie,d=o.apply(this,arguments)-Ie,f=Math.abs(d-c),p=c>d?0:1;if(u<s&&(h=u,u=s,s=h),f>=ke)return l(u,p)+(s?l(s,1-p):"")+"Z";var h,m,g,v,y,b,x,w,_,S,C,A,T=0,P=0,E=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=r===ns?Math.sqrt(s*s+u*u):+r.apply(this,arguments),p||(P*=-1),u&&(P=Ve(g/u*Math.sin(v))),s&&(T=Ve(g/s*Math.sin(v)))),u){y=u*Math.cos(c+P),b=u*Math.sin(c+P),x=u*Math.cos(d-P),w=u*Math.sin(d-P);var O=Math.abs(d-c-2*P)<=Me?0:1;if(P&&ls(y,b,x,w)===p^O){var M=(c+d)/2;y=u*Math.cos(M),b=u*Math.sin(M),x=w=null}}else y=b=0;if(s){_=s*Math.cos(d-T),S=s*Math.sin(d-T),C=s*Math.cos(c+T),A=s*Math.sin(c+T);var D=Math.abs(c-d+2*T)<=Me?0:1;if(T&&ls(_,S,C,A)===1-p^D){var k=(c+d)/2;_=s*Math.cos(k),S=s*Math.sin(k),C=A=null}}else _=S=0;if(f>Ee&&(h=Math.min(Math.abs(u-s)/2,+n.apply(this,arguments)))>.001){m=s<u^p?0:1;var I=h,R=h;if(f<Me){var N=null==C?[_,S]:null==x?[y,b]:mi([y,b],[C,A],[x,w],[_,S]),F=y-N[0],L=b-N[1],B=x-N[0],V=w-N[1],j=1/Math.sin(Math.acos((F*B+L*V)/(Math.sqrt(F*F+L*L)*Math.sqrt(B*B+V*V)))/2),z=Math.sqrt(N[0]*N[0]+N[1]*N[1]);R=Math.min(h,(s-z)/(j-1)),I=Math.min(h,(u-z)/(j+1))}if(null!=x){var G=us(null==C?[_,S]:[C,A],[y,b],u,I,p),U=us([x,w],[_,S],u,I,p);h===I?E.push("M",G[0],"A",I,",",I," 0 0,",m," ",G[1],"A",u,",",u," 0 ",1-p^ls(G[1][0],G[1][1],U[1][0],U[1][1]),",",p," ",U[1],"A",I,",",I," 0 0,",m," ",U[0]):E.push("M",G[0],"A",I,",",I," 0 1,",m," ",U[0])}else E.push("M",y,",",b);if(null!=C){var W=us([y,b],[C,A],s,-R,p),H=us([_,S],null==x?[y,b]:[x,w],s,-R,p);h===R?E.push("L",H[0],"A",R,",",R," 0 0,",m," ",H[1],"A",s,",",s," 0 ",p^ls(H[1][0],H[1][1],W[1][0],W[1][1]),",",1-p," ",W[1],"A",R,",",R," 0 0,",m," ",W[0]):E.push("L",H[0],"A",R,",",R," 0 0,",m," ",W[0])}else E.push("L",_,",",S)}else E.push("M",y,",",b),null!=x&&E.push("A",u,",",u," 0 ",O,",",p," ",x,",",w),E.push("L",_,",",S),null!=C&&E.push("A",s,",",s," 0 ",D,",",1-p," ",C,",",A);return E.push("Z"),E.join("")}function l(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return s.innerRadius=function(t){return arguments.length?(e=xt(t),s):e},s.outerRadius=function(e){return arguments.length?(t=xt(e),s):t},s.cornerRadius=function(e){return arguments.length?(n=xt(e),s):n},s.padRadius=function(e){return arguments.length?(r=e==ns?ns:xt(e),s):r},s.startAngle=function(e){return arguments.length?(i=xt(e),s):i},s.endAngle=function(e){return arguments.length?(o=xt(e),s):o},s.padAngle=function(e){return arguments.length?(a=xt(e),s):a},s.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ie;return[Math.cos(r)*n,Math.sin(r)*n]},s};var ns="auto";function rs(e){return e.innerRadius}function is(e){return e.outerRadius}function os(e){return e.startAngle}function as(e){return e.endAngle}function ss(e){return e&&e.padAngle}function ls(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function us(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,d=e[1]+u,f=t[0]+l,p=t[1]+u,h=(c+f)/2,m=(d+p)/2,g=f-c,v=p-d,y=g*g+v*v,b=n-r,x=c*p-f*d,w=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),_=(x*v-g*w)/y,S=(-x*g-v*w)/y,C=(x*v+g*w)/y,A=(-x*g+v*w)/y,T=_-h,P=S-m,E=C-h,O=A-m;return T*T+P*P>E*E+O*O&&(_=C,S=A),[[_-l,S-u],[_*n/b,S*n/b]]}function cs(e){var t=ui,n=ci,r=$n,i=fs,o=i.key,a=.7;function s(o){var s,l=[],u=[],c=-1,d=o.length,f=xt(t),p=xt(n);function h(){l.push("M",i(e(u),a))}for(;++c<d;)r.call(this,s=o[c],c)?u.push([+f.call(this,s,c),+p.call(this,s,c)]):u.length&&(h(),u=[]);return u.length&&h(),l.length?l.join(""):null}return s.x=function(e){return arguments.length?(t=e,s):t},s.y=function(e){return arguments.length?(n=e,s):n},s.defined=function(e){return arguments.length?(r=e,s):r},s.interpolate=function(e){return arguments.length?(o="function"==typeof e?i=e:(i=ds.get(e)||fs).key,s):o},s.tension=function(e){return arguments.length?(a=e,s):a},s}o.svg.line=function(){return cs(R)};var ds=o.map({linear:fs,"linear-closed":ps,step:function(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];for(;++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")},"step-before":hs,"step-after":ms,basis:ys,"basis-open":function(e){if(e.length<4)return fs(e);var t,n=[],r=-1,i=e.length,o=[0],a=[0];for(;++r<3;)t=e[r],o.push(t[0]),a.push(t[1]);n.push(bs(_s,o)+","+bs(_s,a)),--r;for(;++r<i;)t=e[r],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Ss(n,o,a);return n.join("")},"basis-closed":function(e){var t,n,r=-1,i=e.length,o=i+4,a=[],s=[];for(;++r<4;)n=e[r%i],a.push(n[0]),s.push(n[1]);t=[bs(_s,a),",",bs(_s,s)],--r;for(;++r<o;)n=e[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Ss(t,a,s);return t.join("")},bundle:function(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],a=e[0][1],s=e[n][0]-o,l=e[n][1]-a,u=-1;++u<=n;)r=e[u],i=u/n,r[0]=t*r[0]+(1-t)*(o+i*s),r[1]=t*r[1]+(1-t)*(a+i*l);return ys(e)},cardinal:function(e,t){return e.length<3?fs(e):e[0]+gs(e,vs(e,t))},"cardinal-open":function(e,t){return e.length<4?fs(e):e[1]+gs(e.slice(1,-1),vs(e,t))},"cardinal-closed":function(e,t){return e.length<3?ps(e):e[0]+gs((e.push(e[0]),e),vs([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?fs(e):e[0]+gs(e,function(e){var t,n,r,i,o=[],a=function(e){var t=0,n=e.length-1,r=[],i=e[0],o=e[1],a=r[0]=Cs(i,o);for(;++t<n;)r[t]=(a+(a=Cs(i=o,o=e[t+1])))/2;return r[t]=a,r}(e),s=-1,l=e.length-1;for(;++s<l;)t=Cs(e[s],e[s+1]),_(t)<Ee?a[s]=a[s+1]=0:(i=(n=a[s]/t)*n+(r=a[s+1]/t)*r)>9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);s=-1;for(;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(e))}});function fs(e){return e.length>1?e.join("L"):e+"Z"}function ps(e){return e.join("L")+"Z"}function hs(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ms(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function gs(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return fs(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],a=t[0],s=a,l=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=e[1],l=2),t.length>1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++)o=e[l],s=t[u],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[l];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function vs(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],a=e[1],s=1,l=e.length;++s<l;)n=o,o=a,a=e[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function ys(e){if(e.length<3)return fs(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],a=[i,i,i,(r=e[1])[0]],s=[o,o,o,r[1]],l=[i,",",o,"L",bs(_s,a),",",bs(_s,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Ss(l,a,s);return e.pop(),l.push("L",r),l.join("")}function bs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}ds.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var xs=[0,2/3,1/3,0],ws=[0,1/3,2/3,0],_s=[0,1/6,2/3,1/6];function Ss(e,t,n){e.push("C",bs(xs,t),",",bs(xs,n),",",bs(ws,t),",",bs(ws,n),",",bs(_s,t),",",bs(_s,n))}function Cs(e,t){return(t[1]-e[1])/(t[0]-e[0])}function As(e){for(var t,n,r,i=-1,o=e.length;++i<o;)n=(t=e[i])[0],r=t[1]-Ie,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Ts(e){var t=ui,n=ui,r=0,i=ci,o=$n,a=fs,s=a.key,l=a,u="L",c=.7;function d(s){var d,f,p,h=[],m=[],g=[],v=-1,y=s.length,b=xt(t),x=xt(r),w=t===n?function(){return f}:xt(n),_=r===i?function(){return p}:xt(i);function S(){h.push("M",a(e(g),c),u,l(e(m.reverse()),c),"Z")}for(;++v<y;)o.call(this,d=s[v],v)?(m.push([f=+b.call(this,d,v),p=+x.call(this,d,v)]),g.push([+w.call(this,d,v),+_.call(this,d,v)])):m.length&&(S(),m=[],g=[]);return m.length&&S(),h.length?h.join(""):null}return d.x=function(e){return arguments.length?(t=n=e,d):n},d.x0=function(e){return arguments.length?(t=e,d):t},d.x1=function(e){return arguments.length?(n=e,d):n},d.y=function(e){return arguments.length?(r=i=e,d):i},d.y0=function(e){return arguments.length?(r=e,d):r},d.y1=function(e){return arguments.length?(i=e,d):i},d.defined=function(e){return arguments.length?(o=e,d):o},d.interpolate=function(e){return arguments.length?(s="function"==typeof e?a=e:(a=ds.get(e)||fs).key,l=a.reverse||a,u=a.closed?"M":"L",d):s},d.tension=function(e){return arguments.length?(c=e,d):c},d}function Ps(e){return e.radius}function Es(e){return[e.x,e.y]}function Os(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Ie;return[n*Math.cos(r),n*Math.sin(r)]}}function Ms(){return 64}function Ds(){return"circle"}function ks(e){var t=Math.sqrt(e/Me);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}o.svg.line.radial=function(){var e=cs(As);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},hs.reverse=ms,ms.reverse=hs,o.svg.area=function(){return Ts(R)},o.svg.area.radial=function(){var e=Ts(As);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},o.svg.chord=function(){var e=Zr,t=Yr,n=Ps,r=os,i=as;function o(n,r){var i,o,u=a(this,e,n,r),c=a(this,t,n,r);return"M"+u.p0+s(u.r,u.p1,u.a1-u.a0)+(o=c,((i=u).a0==o.a0&&i.a1==o.a1?l(u.r,u.p1,u.r,u.p0):l(u.r,u.p1,c.r,c.p0)+s(c.r,c.p1,c.a1-c.a0)+l(c.r,c.p1,u.r,u.p0))+"Z")}function a(e,t,o,a){var s=t.call(e,o,a),l=n.call(e,s,a),u=r.call(e,s,a)-Ie,c=i.call(e,s,a)-Ie;return{r:l,a0:u,a1:c,p0:[l*Math.cos(u),l*Math.sin(u)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function s(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Me)+",1 "+t}function l(e,t,n,r){return"Q 0,0 "+r}return o.radius=function(e){return arguments.length?(n=xt(e),o):n},o.source=function(t){return arguments.length?(e=xt(t),o):e},o.target=function(e){return arguments.length?(t=xt(e),o):t},o.startAngle=function(e){return arguments.length?(r=xt(e),o):r},o.endAngle=function(e){return arguments.length?(i=xt(e),o):i},o},o.svg.diagonal=function(){var e=Zr,t=Yr,n=Es;function r(r,i){var o=e.call(this,r,i),a=t.call(this,r,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(t){return arguments.length?(e=xt(t),r):e},r.target=function(e){return arguments.length?(t=xt(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},o.svg.diagonal.radial=function(){var e=o.svg.diagonal(),t=Es,n=e.projection;return e.projection=function(e){return arguments.length?n(Os(t=e)):t},e},o.svg.symbol=function(){var e=Ds,t=Ms;function n(n,r){return(Is.get(e.call(this,n,r))||ks)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=xt(t),n):e},n.size=function(e){return arguments.length?(t=xt(e),n):t},n};var Is=o.map({circle:ks,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ns)),n=t*Ns;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Rs),n=t*Rs/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Rs),n=t*Rs/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});o.svg.symbolTypes=Is.keys();var Rs=Math.sqrt(3),Ns=Math.tan(30*Re);Y.transition=function(e){for(var t,n,r=Vs||++Gs,i=Hs(e),o=[],a=js||{time:Date.now(),ease:vo,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(n=u[c])&&qs(n,c,i,r,a),t.push(n)}return Bs(o,i,r)},Y.interrupt=function(e){return this.each(null==e?Fs:Ls(Hs(e)))};var Fs=Ls(Hs());function Ls(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Bs(e,t,n){return H(e,zs),e.namespace=t,e.id=n,e}var Vs,js,zs=[],Gs=0;function Us(e,t,n,r){var i=e.id,o=e.namespace;return he(e,"function"==typeof n?function(e,a,s){e[o][i].tween.set(t,r(n.call(e,e.__data__,a,s)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function Ws(e){return null==e&&(e=""),function(){this.textContent=e}}function Hs(e){return null==e?"__transition__":"__transition_"+e+"__"}function qs(e,t,n,r,i){var o,a,s,l,u,c=e[n]||(e[n]={active:0,count:0}),d=c[r];function f(n){var i=c.active,f=c[i];for(var h in f&&(f.timer.c=null,f.timer.t=NaN,--c.count,delete c[i],f.event&&f.event.interrupt.call(e,e.__data__,f.index)),c)if(+h<r){var m=c[h];m.timer.c=null,m.timer.t=NaN,--c.count,delete c[h]}a.c=p,Et((function(){return a.c&&p(n||1)&&(a.c=null,a.t=NaN),1}),0,o),c.active=r,d.event&&d.event.start.call(e,e.__data__,t),u=[],d.tween.forEach((function(n,r){(r=r.call(e,e.__data__,t))&&u.push(r)})),l=d.ease,s=d.duration}function p(i){for(var o=i/s,a=l(o),f=u.length;f>0;)u[--f].call(e,a);if(o>=1)return d.event&&d.event.end.call(e,e.__data__,t),--c.count?delete c[r]:delete e[n],1}d||(o=i.time,a=Et((function(e){var t=d.delay;if(a.t=t+o,t<=e)return f(e-t);a.c=f}),0,o),d=c[r]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++c.count)}zs.call=Y.call,zs.empty=Y.empty,zs.node=Y.node,zs.size=Y.size,o.transition=function(e,t){return e&&e.transition?Vs?e.transition(t):e:o.selection().transition(e)},o.transition.prototype=zs,zs.select=function(e){var t,n,r,i=this.id,o=this.namespace,a=[];e=J(e);for(var s=-1,l=this.length;++s<l;){a.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(r=u[c])&&(n=e.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),qs(n,c,o,i,r[o][i]),t.push(n)):t.push(null)}return Bs(a,o,i)},zs.selectAll=function(e){var t,n,r,i,o,a=this.id,s=this.namespace,l=[];e=Q(e);for(var u=-1,c=this.length;++u<c;)for(var d=this[u],f=-1,p=d.length;++f<p;)if(r=d[f]){o=r[s][a],n=e.call(r,r.__data__,f,u),l.push(t=[]);for(var h=-1,m=n.length;++h<m;)(i=n[h])&&qs(i,h,s,a,o),t.push(i)}return Bs(l,s,a)},zs.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=fe(e));for(var i=0,o=this.length;i<o;i++){r.push(t=[]);for(var a,s=0,l=(a=this[i]).length;s<l;s++)(n=a[s])&&e.call(n,n.__data__,s,i)&&t.push(n)}return Bs(r,this.namespace,this.id)},zs.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):he(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},zs.attr=function(e,t){if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var n="transform"==e?Eo:ao,r=o.ns.qualify(e);function i(){this.removeAttribute(r)}function a(){this.removeAttributeNS(r.space,r.local)}function s(e){return null==e?i:(e+="",function(){var t,i=this.getAttribute(r);return i!==e&&(t=n(i,e),function(e){this.setAttribute(r,t(e))})})}function l(e){return null==e?a:(e+="",function(){var t,i=this.getAttributeNS(r.space,r.local);return i!==e&&(t=n(i,e),function(e){this.setAttributeNS(r.space,r.local,t(e))})})}return Us(this,"attr."+e,t,r.local?l:s)},zs.attrTween=function(e,t){var n=o.ns.qualify(e);return this.tween("attr."+e,n.local?function(e,r){var i=t.call(this,e,r,this.getAttributeNS(n.space,n.local));return i&&function(e){this.setAttributeNS(n.space,n.local,i(e))}}:function(e,r){var i=t.call(this,e,r,this.getAttribute(n));return i&&function(e){this.setAttribute(n,i(e))}})},zs.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.style(n,e[n],t);return this}n=""}function i(){this.style.removeProperty(e)}function o(t){return null==t?i:(t+="",function(){var r,i=c(this).getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=ao(i,t),function(t){this.style.setProperty(e,r(t),n)})})}return Us(this,"style."+e,t,o)},zs.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,c(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},zs.text=function(e){return Us(this,"text",e,Ws)},zs.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},zs.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=o.ease.apply(o,arguments)),he(this,(function(r){r[n][t].ease=e})))},zs.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:he(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))},zs.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:he(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},zs.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=js,a=Vs;try{Vs=n,he(this,(function(t,i,o){js=t[r][n],e.call(t,t.__data__,i,o)}))}finally{js=i,Vs=a}}else he(this,(function(i){var a=i[r][n];(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(e,t)}));return this},zs.transition=function(){for(var e,t,n,r=this.id,i=++Gs,o=this.namespace,a=[],s=0,l=this.length;s<l;s++){a.push(e=[]);for(var u,c=0,d=(u=this[s]).length;c<d;c++)(t=u[c])&&qs(t,c,o,i,{time:(n=t[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),e.push(t)}return Bs(a,o,i)},o.svg.axis=function(){var e,t=o.scale.linear(),n=Xs,r=6,i=6,a=3,l=[10],u=null;function c(s){s.each((function(){var s,c=o.select(this),d=this.__chart__||t,f=this.__chart__=t.copy(),p=null==u?f.ticks?f.ticks.apply(f,l):f.domain():u,h=null==e?f.tickFormat?f.tickFormat.apply(f,l):R:e,m=c.selectAll(".tick").data(p,f),g=m.enter().insert("g",".domain").attr("class","tick").style("opacity",Ee),v=o.transition(m.exit()).style("opacity",Ee).remove(),y=o.transition(m.order()).style("opacity",1),b=Math.max(r,0)+a,x=Pa(f),w=c.selectAll(".domain").data([0]),_=(w.enter().append("path").attr("class","domain"),o.transition(w));g.append("line"),g.append("text");var S,C,A,T,P=g.select("line"),E=y.select("line"),O=m.select("text").text(h),M=g.select("text"),D=y.select("text"),k="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(s=Zs,S="x",A="y",C="x2",T="y2",O.attr("dy",k<0?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+k*i+"V0H"+x[1]+"V"+k*i)):(s=Ys,S="y",A="x",C="y2",T="x2",O.attr("dy",".32em").style("text-anchor",k<0?"end":"start"),_.attr("d","M"+k*i+","+x[0]+"H0V"+x[1]+"H"+k*i)),P.attr(T,k*r),M.attr(A,k*b),E.attr(C,0).attr(T,k*r),D.attr(S,0).attr(A,k*b),f.rangeBand){var I=f,N=I.rangeBand()/2;d=f=function(e){return I(e)+N}}else d.rangeBand?d=f:v.call(s,f,d);g.call(s,d,f),y.call(s,f,f)}))}return c.scale=function(e){return arguments.length?(t=e,c):t},c.orient=function(e){return arguments.length?(n=e in Ks?e+"":Xs,c):n},c.ticks=function(){return arguments.length?(l=s(arguments),c):l},c.tickValues=function(e){return arguments.length?(u=e,c):u},c.tickFormat=function(t){return arguments.length?(e=t,c):e},c.tickSize=function(e){var t=arguments.length;return t?(r=+e,i=+arguments[t-1],c):r},c.innerTickSize=function(e){return arguments.length?(r=+e,c):r},c.outerTickSize=function(e){return arguments.length?(i=+e,c):i},c.tickPadding=function(e){return arguments.length?(a=+e,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var Xs="bottom",Ks={top:1,right:1,bottom:1,left:1};function Zs(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}))}function Ys(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}))}o.svg.brush=function(){var e,t,n=U(f,"brushstart","brush","brushend"),r=null,i=null,a=[0,0],s=[0,0],l=!0,u=!0,d=Qs[0];function f(e){e.each((function(){var e=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),t=e.selectAll(".background").data([0]);t.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=e.selectAll(".resize").data(d,R);n.exit().remove(),n.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return Js[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",f.empty()?"none":null);var a,s=o.transition(e),l=o.transition(t);r&&(a=Pa(r),l.attr("x",a[0]).attr("width",a[1]-a[0]),h(s)),i&&(a=Pa(i),l.attr("y",a[0]).attr("height",a[1]-a[0]),m(s)),p(s)}))}function p(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+a[+/e$/.test(e)]+","+s[+/^s/.test(e)]+")"}))}function h(e){e.select(".extent").attr("x",a[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function m(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var d,g,v=this,y=o.select(o.event.target),b=n.of(v,arguments),x=o.select(v),w=y.datum(),_=!/^(n|s)$/.test(w)&&r,S=!/^(e|w)$/.test(w)&&i,C=y.classed("extent"),A=Ce(v),T=o.mouse(v),P=o.select(c(v)).on("keydown.brush",M).on("keyup.brush",D);if(o.event.changedTouches?P.on("touchmove.brush",k).on("touchend.brush",R):P.on("mousemove.brush",k).on("mouseup.brush",R),x.interrupt().selectAll("*").interrupt(),C)T[0]=a[0]-T[0],T[1]=s[0]-T[1];else if(w){var E=+/w$/.test(w),O=+/^n/.test(w);g=[a[1-E]-T[0],s[1-O]-T[1]],T[0]=a[E],T[1]=s[O]}else o.event.altKey&&(d=T.slice());function M(){32==o.event.keyCode&&(C||(d=null,T[0]-=a[1],T[1]-=s[1],C=2),z())}function D(){32==o.event.keyCode&&2==C&&(T[0]+=a[1],T[1]+=s[1],C=0,z())}function k(){var e=o.mouse(v),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),C||(o.event.altKey?(d||(d=[(a[0]+a[1])/2,(s[0]+s[1])/2]),T[0]=a[+(e[0]<d[0])],T[1]=s[+(e[1]<d[1])]):d=null),_&&I(e,r,0)&&(h(x),t=!0),S&&I(e,i,1)&&(m(x),t=!0),t&&(p(x),b({type:"brush",mode:C?"move":"resize"}))}function I(n,r,i){var o,c,f=Pa(r),p=f[0],h=f[1],m=T[i],g=i?s:a,v=g[1]-g[0];if(C&&(p-=m,h-=v+m),o=(i?u:l)?Math.max(p,Math.min(h,n[i])):n[i],C?c=(o+=m)+v:(d&&(m=Math.max(p,Math.min(h,2*d[i]-o))),m<o?(c=o,o=m):c=m),g[0]!=o||g[1]!=c)return i?t=null:e=null,g[0]=o,g[1]=c,!0}function R(){k(),x.style("pointer-events","all").selectAll(".resize").style("display",f.empty()?"none":null),o.select("body").style("cursor",null),P.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),A(),b({type:"brushend"})}x.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",y.style("cursor")),b({type:"brushstart"}),k()}return f.event=function(r){r.each((function(){var r=n.of(this,arguments),i={x:a,y:s,i:e,j:t},l=this.__chart__||i;this.__chart__=i,Vs?o.select(this).transition().each("start.brush",(function(){e=l.i,t=l.j,a=l.x,s=l.y,r({type:"brushstart"})})).tween("brush:brush",(function(){var n=so(a,i.x),o=so(s,i.y);return e=t=null,function(e){a=i.x=n(e),s=i.y=o(e),r({type:"brush",mode:"resize"})}})).each("end.brush",(function(){e=i.i,t=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})})):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))}))},f.x=function(e){return arguments.length?(d=Qs[!(r=e)<<1|!i],f):r},f.y=function(e){return arguments.length?(d=Qs[!r<<1|!(i=e)],f):i},f.clamp=function(e){return arguments.length?(r&&i?(l=!!e[0],u=!!e[1]):r?l=!!e:i&&(u=!!e),f):r&&i?[l,u]:r?l:i?u:null},f.extent=function(n){var o,l,u,c,d;return arguments.length?(r&&(o=n[0],l=n[1],i&&(o=o[0],l=l[0]),e=[o,l],r.invert&&(o=r(o),l=r(l)),l<o&&(d=o,o=l,l=d),o==a[0]&&l==a[1]||(a=[o,l])),i&&(u=n[0],c=n[1],r&&(u=u[1],c=c[1]),t=[u,c],i.invert&&(u=i(u),c=i(c)),c<u&&(d=u,u=c,c=d),u==s[0]&&c==s[1]||(s=[u,c])),f):(r&&(e?(o=e[0],l=e[1]):(o=a[0],l=a[1],r.invert&&(o=r.invert(o),l=r.invert(l)),l<o&&(d=o,o=l,l=d))),i&&(t?(u=t[0],c=t[1]):(u=s[0],c=s[1],i.invert&&(u=i.invert(u),c=i.invert(c)),c<u&&(d=u,u=c,c=d))),r&&i?[[o,u],[l,c]]:r?[o,l]:i&&[u,c])},f.clear=function(){return f.empty()||(a=[0,0],s=[0,0],e=t=null),f},f.empty=function(){return!!r&&a[0]==a[1]||!!i&&s[0]==s[1]},o.rebind(f,n,"on")};var Js={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],$s=Bt.format=hn.timeFormat,el=$s.utc,tl=el("%Y-%m-%dT%H:%M:%S.%LZ");function nl(e){return e.toISOString()}function rl(e,t,n){function r(t){return e(t)}function i(e,n){var r=(e[1]-e[0])/n,i=o.bisect(ol,r);return i==ol.length?[t.year,Fa(e.map((function(e){return e/31536e6})),n)[2]]:i?t[r/ol[i-1]<ol[i]/r?i-1:i]:[ll,Fa(e,n)[2]]}return r.invert=function(t){return il(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(il)},r.nice=function(e,t){var n=r.domain(),o=Ta(n),a=null==e?i(o,10):"number"==typeof e&&i(o,e);function s(n){return!isNaN(n)&&!e.range(n,il(+n+1),t).length}return a&&(e=a[0],t=a[1]),r.domain(Oa(n,t>1?{floor:function(t){for(;s(t=e.floor(t));)t=il(t-1);return t},ceil:function(t){for(;s(t=e.ceil(t));)t=il(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ta(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],il(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return rl(e.copy(),t,n)},Ra(r,e)}function il(e){return new Date(e)}$s.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?nl:tl,nl.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},nl.toString=tl.toString,Bt.second=Gt((function(e){return new Vt(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))}),(function(e){return e.getSeconds()})),Bt.seconds=Bt.second.range,Bt.seconds.utc=Bt.second.utc.range,Bt.minute=Gt((function(e){return new Vt(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))}),(function(e){return e.getMinutes()})),Bt.minutes=Bt.minute.range,Bt.minutes.utc=Bt.minute.utc.range,Bt.hour=Gt((function(e){var t=e.getTimezoneOffset()/60;return new Vt(36e5*(Math.floor(e/36e5-t)+t))}),(function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))}),(function(e){return e.getHours()})),Bt.hours=Bt.hour.range,Bt.hours.utc=Bt.hour.utc.range,Bt.month=Gt((function(e){return(e=Bt.day(e)).setDate(1),e}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e){return e.getMonth()})),Bt.months=Bt.month.range,Bt.months.utc=Bt.month.utc.range;var ol=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],al=[[Bt.second,1],[Bt.second,5],[Bt.second,15],[Bt.second,30],[Bt.minute,1],[Bt.minute,5],[Bt.minute,15],[Bt.minute,30],[Bt.hour,1],[Bt.hour,3],[Bt.hour,6],[Bt.hour,12],[Bt.day,1],[Bt.day,2],[Bt.week,1],[Bt.month,1],[Bt.month,3],[Bt.year,1]],sl=$s.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",$n]]),ll={range:function(e,t,n){return o.range(Math.ceil(e/n)*n,+t,n).map(il)},floor:R,ceil:R};al.year=Bt.year,Bt.scale=function(){return rl(o.scale.linear(),al,sl)};var ul=al.map((function(e){return[e[0].utc,e[1]]})),cl=el.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",$n]]);function dl(e){return JSON.parse(e.responseText)}function fl(e){var t=l.createRange();return t.selectNode(l.body),t.createContextualFragment(e.responseText)}ul.year=Bt.year.utc,Bt.scale.utc=function(){return rl(o.scale.linear(),ul,cl)},o.text=wt((function(e){return e.responseText})),o.json=function(e,t){return _t(e,"application/json",dl,t)},o.html=function(e,t){return _t(e,"text/html",fl,t)},o.xml=wt((function(e){return e.responseXML})),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)}()},1106:function(e){"use strict";function t(e,t,o){o=o||2;var a,s,l,d,f,h,m,g=t&&t.length,v=g?t[0]*o:e.length,y=n(e,0,v,o,!0),b=[];if(!y||y.next===y.prev)return b;if(g&&(y=function(e,t,i,o){var a,s,l,d=[];for(a=0,s=t.length;a<s;a++)(l=n(e,t[a]*o,a<s-1?t[a+1]*o:e.length,o,!1))===l.next&&(l.steiner=!0),d.push(p(l));for(d.sort(u),a=0;a<d.length;a++)i=r(i=c(d[a],i),i.next);return i}(e,t,y,o)),e.length>80*o){a=l=e[0],s=d=e[1];for(var x=o;x<v;x+=o)(f=e[x])<a&&(a=f),(h=e[x+1])<s&&(s=h),f>l&&(l=f),h>d&&(d=h);m=0!==(m=Math.max(l-a,d-s))?1/m:0}return i(y,b,o,a,s,m),b}function n(e,t,n,r,i){var o,a;if(i===T(e,t,n,r)>0)for(o=t;o<n;o+=r)a=S(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=S(o,e[o],e[o+1],a);return a&&v(a,a.next)&&(C(a),a=a.next),a}function r(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(C(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function i(e,t,n,u,c,d,p){if(e){!p&&d&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=f(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,u=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<u&&(s++,r=r.nextZ);t++);for(l=u;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(e,u,c,d);for(var h,m,g=e;e.prev!==e.next;)if(h=e.prev,m=e.next,d?a(e,u,c,d):o(e))t.push(h.i/n),t.push(e.i/n),t.push(m.i/n),C(e),e=m.next,g=m.next;else if((e=m)===g){p?1===p?i(e=s(r(e),t,n),t,n,u,c,d,2):2===p&&l(e,t,n,u,c,d):i(r(e),t,n,u,c,d,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(g(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(h(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function a(e,t,n,r){var i=e.prev,o=e,a=e.next;if(g(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=f(s,l,t,n,r),p=f(u,c,t,n,r),m=e.prevZ,v=e.nextZ;m&&m.z>=d&&v&&v.z<=p;){if(m!==e.prev&&m!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;if(m=m.prevZ,v!==e.prev&&v!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;m&&m.z>=d;){if(m!==e.prev&&m!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;v&&v.z<=p;){if(v!==e.prev&&v!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function s(e,t,n){var i=e;do{var o=i.prev,a=i.next.next;!v(o,a)&&y(o,i,i.next,a)&&w(o,a)&&w(a,o)&&(t.push(o.i/n),t.push(i.i/n),t.push(a.i/n),C(i),C(i.next),i=e=a),i=i.next}while(i!==e);return r(i)}function l(e,t,n,o,a,s){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var c=_(l,u);return l=r(l,l.next),c=r(c,c.next),i(l,t,n,o,a,s),void i(c,t,n,o,a,s)}u=u.next}l=l.next}while(l!==e)}function u(e,t){return e.x-t.x}function c(e,t){var n=function(e,t){var n,r=t,i=e.x,o=e.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){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n;var l,u=n,c=n.x,f=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&h(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),w(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&d(n,r)))&&(n=r,p=l)),r=r.next}while(r!==u);return n}(e,t);if(!n)return t;var i=_(n,e),o=r(n,n.next);return r(i,i.next),t===n?o:t}function d(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function f(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function h(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&y(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(w(e,t)&&w(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.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!==e);return r}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||v(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,n,r){var i=x(g(e,t,n)),o=x(g(e,t,r)),a=x(g(n,r,e)),s=x(g(n,r,t));return i!==o&&a!==s||(!(0!==i||!b(e,n,t))||(!(0!==o||!b(e,r,t))||(!(0!==a||!b(n,e,r))||!(0!==s||!b(n,t,r)))))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function x(e){return e>0?1:e<0?-1:0}function w(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function _(e,t){var n=new A(e.i,e.x,e.y),r=new A(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function S(e,t,n,r){var i=new A(e,t,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 C(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}e.exports=t,e.exports.default=t,t.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(T(e,0,o,n));if(i)for(var s=0,l=t.length;s<l;s++){var u=t[s]*n,c=s<l-1?t[s+1]*n:e.length;a-=Math.abs(T(e,u,c,n))}var d=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,p=r[s+1]*n,h=r[s+2]*n;d+=Math.abs((e[f]-e[h])*(e[p+1]-e[f+1])-(e[f]-e[p])*(e[h+1]-e[f+1]))}return 0===a&&0===d?0:Math.abs((d-a)/a)},t.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n}},320:function(e,t,n){var r=n(6502);n(40).vgl=r,e.exports=r},40:function(e,t,n){"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return e}()},8543:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=i*u-r*c,e[2]=r*s-i*a,e[3]=s*l-o*c,e[4]=n*c-i*l,e[5]=i*o-n*s,e[6]=o*u-a*l,e[7]=r*l-n*u,e[8]=n*a-r*o,e}},4995:function(e){e.exports=function(e){var t=new Float32Array(9);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}},7186:function(e){e.exports=function(e,t){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}},1871:function(e){e.exports=function(){var e=new Float32Array(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}},3854:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+n*(a*s-u*i)+r*(l*i-o*s)}},9263:function(e){e.exports=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]+e[3]*e[3]+e[4]*e[4]+e[5]*e[5]+e[6]*e[6]+e[7]*e[7]+e[8]*e[8])}},6503:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}},3229:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}},4523:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,f=i*a,p=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[3]=c-v,e[6]=f+g,e[1]=c+v,e[4]=1-u-h,e[7]=p-m,e[2]=f-g,e[5]=p+m,e[8]=1-u-d,e}},6511:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}},8054:function(e,t,n){e.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(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=c*a-s*u,f=-c*o+s*l,p=u*o-a*l,h=n*d+r*f+i*p;return h?(h=1/h,e[0]=d*h,e[1]=(-c*r+i*u)*h,e[2]=(s*r-i*a)*h,e[3]=f*h,e[4]=(c*n-i*l)*h,e[5]=(-s*n+i*o)*h,e[6]=p*h,e[7]=(-u*n+r*l)*h,e[8]=(a*n-r*o)*h,e):null}},9063:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=n[0],p=n[1],h=n[2],m=n[3],g=n[4],v=n[5],y=n[6],b=n[7],x=n[8];return e[0]=f*r+p*a+h*u,e[1]=f*i+p*s+h*c,e[2]=f*o+p*l+h*d,e[3]=m*r+g*a+v*u,e[4]=m*i+g*s+v*c,e[5]=m*o+g*l+v*d,e[6]=y*r+b*a+x*u,e[7]=y*i+b*s+x*c,e[8]=y*o+b*l+x*d,e}},3100:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,x=n*u-o*a,w=r*l-i*s,_=r*u-o*s,S=i*u-o*l,C=c*m-d*h,A=c*g-f*h,T=c*v-p*h,P=d*g-f*m,E=d*v-p*m,O=f*v-p*g,M=y*O-b*E+x*P+w*T-_*A+S*C;return M?(M=1/M,e[0]=(s*O-l*E+u*P)*M,e[1]=(l*T-a*O-u*A)*M,e[2]=(a*E-s*T+u*C)*M,e[3]=(i*E-r*O-o*P)*M,e[4]=(n*O-i*T+o*A)*M,e[5]=(r*T-n*E-o*C)*M,e[6]=(m*S-g*_+v*w)*M,e[7]=(g*x-h*S-v*b)*M,e[8]=(h*_-m*x+v*y)*M,e):null}},5637:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=Math.sin(n),p=Math.cos(n);return e[0]=p*r+f*a,e[1]=p*i+f*s,e[2]=p*o+f*l,e[3]=p*a-f*r,e[4]=p*s-f*i,e[5]=p*l-f*o,e[6]=u,e[7]=c,e[8]=d,e}},9281:function(e){e.exports=function(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}},6224:function(e){e.exports=function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}},1078:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=n[0],p=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=f*r+p*a+u,e[7]=f*i+p*s+c,e[8]=f*o+p*l+d,e}},4879:function(e){e.exports=function(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}},316:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(f*v-p*g)-d*(l*v-u*g)+m*(l*p-u*f),e[1]=-(r*(f*v-p*g)-d*(i*v-o*g)+m*(i*p-o*f)),e[2]=r*(l*v-u*g)-s*(i*v-o*g)+m*(i*u-o*l),e[3]=-(r*(l*p-u*f)-s*(i*p-o*f)+d*(i*u-o*l)),e[4]=-(a*(f*v-p*g)-c*(l*v-u*g)+h*(l*p-u*f)),e[5]=n*(f*v-p*g)-c*(i*v-o*g)+h*(i*p-o*f),e[6]=-(n*(l*v-u*g)-a*(i*v-o*g)+h*(i*u-o*l)),e[7]=n*(l*p-u*f)-a*(i*p-o*f)+c*(i*u-o*l),e[8]=a*(d*v-p*m)-c*(s*v-u*m)+h*(s*p-u*d),e[9]=-(n*(d*v-p*m)-c*(r*v-o*m)+h*(r*p-o*d)),e[10]=n*(s*v-u*m)-a*(r*v-o*m)+h*(r*u-o*s),e[11]=-(n*(s*p-u*d)-a*(r*p-o*d)+c*(r*u-o*s)),e[12]=-(a*(d*g-f*m)-c*(s*g-l*m)+h*(s*f-l*d)),e[13]=n*(d*g-f*m)-c*(r*g-i*m)+h*(r*f-i*d),e[14]=-(n*(s*g-l*m)-a*(r*g-i*m)+h*(r*l-i*s)),e[15]=n*(s*f-l*d)-a*(r*f-i*d)+c*(r*l-i*s),e}},6232:function(e){e.exports=function(e){var t=new Float32Array(16);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}},4408:function(e){e.exports=function(e,t){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}},703:function(e){e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},3845:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],h=e[13],m=e[14],g=e[15];return(t*a-n*o)*(d*g-f*m)-(t*s-r*o)*(c*g-f*h)+(t*l-i*o)*(c*m-d*h)+(n*s-r*a)*(u*g-f*p)-(n*l-i*a)*(u*m-d*p)+(r*l-i*s)*(u*h-c*p)}},9259:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,f=i*a,p=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[1]=c+v,e[2]=f-g,e[3]=0,e[4]=c-v,e[5]=1-u-h,e[6]=p+m,e[7]=0,e[8]=f+g,e[9]=p-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8625:function(e){e.exports=function(e,t,n){var r,i,o,a=n[0],s=n[1],l=n[2],u=Math.sqrt(a*a+s*s+l*l);if(Math.abs(u)<1e-6)return null;return a*=u=1/u,s*=u,l*=u,r=Math.sin(t),i=Math.cos(t),o=1-i,e[0]=a*a*o+i,e[1]=s*a*o+l*r,e[2]=l*a*o-s*r,e[3]=0,e[4]=a*s*o-l*r,e[5]=s*s*o+i,e[6]=l*s*o+a*r,e[7]=0,e[8]=a*l*o+s*r,e[9]=s*l*o-a*r,e[10]=l*l*o+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8844:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,l=i+i,u=o+o,c=r*s,d=r*l,f=r*u,p=i*l,h=i*u,m=o*u,g=a*s,v=a*l,y=a*u;return e[0]=1-(p+m),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(c+m),e[6]=h+g,e[7]=0,e[8]=f+v,e[9]=h-g,e[10]=1-(c+p),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}},3107:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6645:function(e){e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},1:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8503:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8990:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6901:function(e){e.exports=function(e,t,n,r,i,o,a){var s=1/(n-t),l=1/(i-r),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}},1156:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},5240:function(e,t,n){e.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(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,x=n*u-o*a,w=r*l-i*s,_=r*u-o*s,S=i*u-o*l,C=c*m-d*h,A=c*g-f*h,T=c*v-p*h,P=d*g-f*m,E=d*v-p*m,O=f*v-p*g,M=y*O-b*E+x*P+w*T-_*A+S*C;if(!M)return null;return M=1/M,e[0]=(s*O-l*E+u*P)*M,e[1]=(i*E-r*O-o*P)*M,e[2]=(m*S-g*_+v*w)*M,e[3]=(f*_-d*S-p*w)*M,e[4]=(l*T-a*O-u*A)*M,e[5]=(n*O-i*T+o*A)*M,e[6]=(g*x-h*S-v*b)*M,e[7]=(c*S-f*x+p*b)*M,e[8]=(a*E-s*T+u*C)*M,e[9]=(r*T-n*E-o*C)*M,e[10]=(h*_-m*x+v*y)*M,e[11]=(d*x-c*_-p*y)*M,e[12]=(s*A-a*P-l*C)*M,e[13]=(n*P-r*A+i*C)*M,e[14]=(m*b-h*w-g*y)*M,e[15]=(c*w-d*b+f*y)*M,e}},398:function(e,t,n){var r=n(1156);e.exports=function(e,t,n,i){var o,a,s,l,u,c,d,f,p,h,m=t[0],g=t[1],v=t[2],y=i[0],b=i[1],x=i[2],w=n[0],_=n[1],S=n[2];if(Math.abs(m-w)<1e-6&&Math.abs(g-_)<1e-6&&Math.abs(v-S)<1e-6)return r(e);d=m-w,f=g-_,p=v-S,h=1/Math.sqrt(d*d+f*f+p*p),o=b*(p*=h)-x*(f*=h),a=x*(d*=h)-y*p,s=y*f-b*d,(h=Math.sqrt(o*o+a*a+s*s))?(o*=h=1/h,a*=h,s*=h):(o=0,a=0,s=0);l=f*s-p*a,u=p*o-d*s,c=d*a-f*o,(h=Math.sqrt(l*l+u*u+c*c))?(l*=h=1/h,u*=h,c*=h):(l=0,u=0,c=0);return e[0]=o,e[1]=l,e[2]=d,e[3]=0,e[4]=a,e[5]=u,e[6]=f,e[7]=0,e[8]=s,e[9]=c,e[10]=p,e[11]=0,e[12]=-(o*m+a*g+s*v),e[13]=-(l*m+u*g+c*v),e[14]=-(d*m+f*g+p*v),e[15]=1,e}},6498:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=t[9],p=t[10],h=t[11],m=t[12],g=t[13],v=t[14],y=t[15],b=n[0],x=n[1],w=n[2],_=n[3];return e[0]=b*r+x*s+w*d+_*m,e[1]=b*i+x*l+w*f+_*g,e[2]=b*o+x*u+w*p+_*v,e[3]=b*a+x*c+w*h+_*y,b=n[4],x=n[5],w=n[6],_=n[7],e[4]=b*r+x*s+w*d+_*m,e[5]=b*i+x*l+w*f+_*g,e[6]=b*o+x*u+w*p+_*v,e[7]=b*a+x*c+w*h+_*y,b=n[8],x=n[9],w=n[10],_=n[11],e[8]=b*r+x*s+w*d+_*m,e[9]=b*i+x*l+w*f+_*g,e[10]=b*o+x*u+w*p+_*v,e[11]=b*a+x*c+w*h+_*y,b=n[12],x=n[13],w=n[14],_=n[15],e[12]=b*r+x*s+w*d+_*m,e[13]=b*i+x*l+w*f+_*g,e[14]=b*o+x*u+w*p+_*v,e[15]=b*a+x*c+w*h+_*y,e}},753:function(e){e.exports=function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*u,e[15]=1,e}},2343:function(e){e.exports=function(e,t,n,r,i){var o=1/Math.tan(t/2),a=1/(r-i);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*a,e[15]=0,e}},7863:function(e){e.exports=function(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*u*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}},4175:function(e){e.exports=function(e,t,n,r){var i,o,a,s,l,u,c,d,f,p,h,m,g,v,y,b,x,w,_,S,C,A,T,P,E=r[0],O=r[1],M=r[2],D=Math.sqrt(E*E+O*O+M*M);if(Math.abs(D)<1e-6)return null;E*=D=1/D,O*=D,M*=D,i=Math.sin(n),o=Math.cos(n),a=1-o,s=t[0],l=t[1],u=t[2],c=t[3],d=t[4],f=t[5],p=t[6],h=t[7],m=t[8],g=t[9],v=t[10],y=t[11],b=E*E*a+o,x=O*E*a+M*i,w=M*E*a-O*i,_=E*O*a-M*i,S=O*O*a+o,C=M*O*a+E*i,A=E*M*a+O*i,T=O*M*a-E*i,P=M*M*a+o,e[0]=s*b+d*x+m*w,e[1]=l*b+f*x+g*w,e[2]=u*b+p*x+v*w,e[3]=c*b+h*x+y*w,e[4]=s*_+d*S+m*C,e[5]=l*_+f*S+g*C,e[6]=u*_+p*S+v*C,e[7]=c*_+h*S+y*C,e[8]=s*A+d*T+m*P,e[9]=l*A+f*T+g*P,e[10]=u*A+p*T+v*P,e[11]=c*A+h*T+y*P,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},3116:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],d=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[4]=o*i+u*r,e[5]=a*i+c*r,e[6]=s*i+d*r,e[7]=l*i+f*r,e[8]=u*i-o*r,e[9]=c*i-a*r,e[10]=d*i-s*r,e[11]=f*i-l*r,e}},6428:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],u=t[8],c=t[9],d=t[10],f=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=o*i-u*r,e[1]=a*i-c*r,e[2]=s*i-d*r,e[3]=l*i-f*r,e[8]=o*r+u*i,e[9]=a*r+c*i,e[10]=s*r+d*i,e[11]=l*r+f*i,e}},9041:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],d=t[6],f=t[7];t!==e&&(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]);return e[0]=o*i+u*r,e[1]=a*i+c*r,e[2]=s*i+d*r,e[3]=l*i+f*r,e[4]=u*i-o*r,e[5]=c*i-a*r,e[6]=d*i-s*r,e[7]=f*i-l*r,e}},1119:function(e){e.exports=function(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},6758:function(e){e.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},164:function(e){e.exports=function(e,t,n){var r,i,o,a,s,l,u,c,d,f,p,h,m=n[0],g=n[1],v=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=t[9],p=t[10],h=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=d,e[9]=f,e[10]=p,e[11]=h,e[12]=r*m+s*g+d*v+t[12],e[13]=i*m+l*g+f*v+t[13],e[14]=o*m+u*g+p*v+t[14],e[15]=a*m+c*g+h*v+t[15]);return e}},3039:function(e){e.exports=function(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},7207:function(e){e.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}},3959:function(e,t,n){e.exports=function(e,t){var n=r(e[0],e[1],e[2]),a=r(t[0],t[1],t[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(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},859:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1404:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},2002:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},9528:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}},6005:function(e,t,n){e.exports=n(6911)},6911:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}},133:function(e,t,n){e.exports=n(3274)},3274:function(e){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}},966:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2342:function(e){e.exports=1e-6},9883:function(e,t,n){e.exports=function(e,t){var n=e[0],i=e[1],o=e[2],a=t[0],s=t[1],l=t[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-l)<=r*Math.max(1,Math.abs(o),Math.abs(l))};var r=n(2342)},8259:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},7291:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},7043:function(e,t,n){e.exports=function(e,t,n,i,o,a){var s,l;t||(t=3);n||(n=0);l=i?Math.min(i*t+n,e.length):e.length;for(s=n;s<l;s+=t)r[0]=e[s],r[1]=e[s+1],r[2]=e[s+2],o(r,r,a),e[s]=r[0],e[s+1]=r[1],e[s+2]=r[2];return e};var r=n(2002)()},6534:function(e){e.exports=function(e,t,n){var r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}},5365:function(e,t,n){e.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(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}},5446:function(e,t,n){e.exports=n(172)},172:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}},6373:function(e){e.exports=function(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}},7254:function(e){e.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}},7324:function(e){e.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}},792:function(e,t,n){e.exports=n(6381)},6381:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}},9500:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}},2397:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o);return e}},2283:function(e){e.exports=function(e,t){t=t||1;var n=2*Math.random()*Math.PI,r=2*Math.random()-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}},4871:function(e){e.exports=function(e,t,n,r){var i=n[1],o=n[2],a=t[1]-i,s=t[2]-o,l=Math.sin(r),u=Math.cos(r);return e[0]=t[0],e[1]=i+a*u-s*l,e[2]=o+a*l+s*u,e}},7927:function(e){e.exports=function(e,t,n,r){var i=n[0],o=n[2],a=t[0]-i,s=t[2]-o,l=Math.sin(r),u=Math.cos(r);return e[0]=i+s*l+a*u,e[1]=t[1],e[2]=o+s*u-a*l,e}},2998:function(e){e.exports=function(e,t,n,r){var i=n[0],o=n[1],a=t[0]-i,s=t[1]-o,l=Math.sin(r),u=Math.cos(r);return e[0]=i+a*u-s*l,e[1]=o+a*l+s*u,e[2]=t[2],e}},5084:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},498:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}},6993:function(e){e.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}},6952:function(e){e.exports=function(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}},9867:function(e,t,n){e.exports=n(3440)},609:function(e,t,n){e.exports=n(5228)},3440:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}},5228:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}},3379:function(e,t,n){e.exports=n(7916)},7916:function(e){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}},932:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}},2964:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}},4516:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*o-l*i,d=u*i+l*r-a*o,f=u*o+a*i-s*r,p=-a*r-s*i-l*o;return e[0]=c*u+p*-a+d*-l-f*-s,e[1]=d*u+p*-s+f*-a-c*-l,e[2]=f*u+p*-l+c*-s-d*-a,e}},5492:function(e){e.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}},5967:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},4729:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},8922:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},3256:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(n*n+r*r+i*i+o*o)}},409:function(e){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}},3643:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},5166:function(e){e.exports=function(e,t,n,r){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}},8608:function(e,t,n){e.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(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},7358:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.sqrt(t*t+n*n+r*r+i*i)}},117:function(e){e.exports=function(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e}},6225:function(e){e.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}},8485:function(e){e.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}},4683:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}},2618:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},959:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a);return e}},9855:function(e,t,n){var r=n(959),i=n(7141);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),r(e,e),i(e,e,t),e}},7141:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}},2100:function(e){e.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}},256:function(e){e.exports=function(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}},8726:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return n*n+r*r+i*i+o*o}},3e3:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}},1250:function(e){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}},161:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}},228:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*o-l*i,d=u*i+l*r-a*o,f=u*o+a*i-s*r,p=-a*r-s*i-l*o;return e[0]=c*u+p*-a+d*-l-f*-s,e[1]=d*u+p*-s+f*-a-c*-l,e[2]=f*u+p*-l+c*-s-d*-a,e[3]=t[3],e}},1272:function(e,t,n){var r;
35
+ 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(e){return e.replace(i,"<$1></$2>")},n(8701),e.exports=r.extend({annotation:n(7800),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),util:n(4634),jQuery:r,canvas:n(7562),svg:n(2878),vtkjs:n(6653),webgl:n(9205),gui:n(253)},n(4647)),window&&!window.$&&(window.$=r),window&&!window.jQuery&&(window.jQuery=r)},5699:function(e){e.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},2367:function(e,t,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}]},l=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),l=n(6853),u=n(5108),c=n(9757);t=t||{},i.call(this,t);var d,f,p,h,m,g=this,v=this.draw,y=this._exit,b=this._init,x=this.modified,w=this._update;return this.featureType="isoline",this.contour=g.mesh,this.isoline=g.mesh,this._createIsolines=function(){var e,t=g.style.get("value"),n=void 0!==g.style("used")?g.style.get("used"):function(e,n){return a.isNonNullFinite(t(e,n))},r=!1,i=[],o=g._createMesh({used:n,value:t});return(e=g._getValueList(o)).length?(e.forEach((function(e){var t=g._isolinesForValue(o,e);t.length&&(i=i.concat(t),r=r||!!e.label)})),{lines:i,mesh:o,values:e,hasLabels:r}):{}},this._getValueList=function(e){var t,n,r,i,o,s,l,u=g.isoline,c=u.get("values")(e),d=u.get("spacing")(e),f=u.get("count")(e),p=u.get("autofit")(e),h=u.get("levels")(e);if(!e.numVertices||!e.numElements)return[];if(t=a.getMinMaxValues(e.value,u.get("min")(e),u.get("max")(e),!0),e.minValue=t.min,e.maxValue=t.max,(n=e.maxValue-e.minValue)<=0)return[];if(Array.isArray(c))c=(c=c.map((function(e,t){return{value:void 0!==e.value?e.value:e,position:t,level:e.level}}))).filter((function(t){return t.value>=e.minValue&&t.value<=e.maxValue}));else if(d||p)for(d||(r=n/(2*f/3),o=Math.floor(Math.log10(r)),s=Math.max(0,-o),d=(r=(r/=i=Math.pow(10,o))>=5?5:r>=2?2:1)*i),c=[],l=Math.ceil(e.minValue/d);l<=Math.floor(e.maxValue/d);l+=1)c.push({value:l*d,position:l,fixedDigits:s});else for(c=Array(f),l=0;l<f;l+=1)c[l]={value:e.minValue+n*(l+1)/(f+1),position:l+1};return h.length&&c.forEach((function(e,t){if(void 0===e.level){e.level=0;for(var n=0,r=h[0];n<h.length&&!(e.position%r);r*=h[n+=1])e.level=n+1}if(u.get("label")(e,e.position)){var i=u.get("labelText")(e,e.position);void 0===i&&(i=void 0!==e.fixedDigits?""+parseFloat(e.value.toFixed(e.fixedDigits)):""+e.value),i&&(e.label=i)}})),c},this._addSegment=function(e,t,n){var r,i,o,a,s,l,u=[t,n],c=e.length;for(e.push(u),i=0;i<2;i+=1){for(r=c-1;r>=0;r-=1){if(a=(o=e[r])[0],s=o[o.length-1],n[0]===a[0]&&n[1]===a[1])l=u.concat(o.slice(1));else{if(t[0]!==s[0]||t[1]!==s[1])continue;l=o.concat(u.slice(1))}e.splice(c,1),e[r]=u=l,c=r,t=u[0],n=u[u.length-1];break}if(r<0)break}return e},this._chainVertex=function(e,t,n){var r=n[0],i=n[1],o=3*r,a=3*i,s=(t.value-e.value[r])/(e.value[i]-e.value[r]),l=1-s;return{x:e.pos[o]*l+e.pos[a]*s,y:e.pos[o+1]*l+e.pos[a+1]*s,z:e.pos[o+2]*l+e.pos[a+2]*s}},this._isolinesForValue=function(e,t){var n,r,i,o,a=t.value,l=Array(e.value.length),u=[];for(n=l.length-1;n>=0;n-=1)l[n]=e.value[n]<=a?0:1;var c=e.verticesPerElement,d="square"===e.shape,f=e.elements,p=f.length;for(r=0;r<p;r+=c){if(d){if(0===(i=8*l[f[r]]+4*l[f[r+1]]+2*l[f[r+2]]+l[f[r+3]])||15===i)continue}else if(16===(i=16+4*l[f[r]]+2*l[f[r+1]]+l[f[r+2]])||23===i)continue;s[i].forEach((function(e){u=g._addSegment(u,[f[r+e.l0],f[r+e.h0]],[f[r+e.l1],f[r+e.h1]])}))}return o=u.map((function(n){var r=[];return n.forEach((function(n){var i=g._chainVertex(e,t,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=t.value,r.level=t.level,r.position=t.position,r.label=t.label,r})).filter((function(e){return e.length>1})),o},this.modified=function(){var e=x();return p&&p.modified(),m&&m.modified(),e},this.labelPositions=function(){if(g.dataTime().timestamp()>=g.buildTime().timestamp()&&g._build(),f=null,!m)return g;if(!(d&&d.hasLabels&&d.lines&&d.lines.length))return m.data([]),g;var e=g.isoline,t=e.get("labelSpacing"),n=e.get("labelOffset"),r=e.get("labelViewport")(d.mesh),i=g.gcs(),o=g.layer().map(),s=o.gcs(),u=o.rotation(),c=o.size(),p=[],h=0;return d.lines.forEach((function(e,d){if(e.label){var f,m,g,v,y,b,x,w,_,S,C,A=t(e.value,e.value.position),T=n(e.value,e.value.position)||0,P=o.gcsToDisplay(e,i),E=0;if(!(A<=0||isNaN(A))&&(h=Math.max(A,h),T=T+.5-Math.floor(T+.5),f=P.map((function(t,n){if(!e.closed&&n+1===P.length)return 0;var r=Math.sqrt(a.distance2dSquared(t,P[n+1<P.length?n+1:0]));return E+=r,r})),m=Math.floor(E/A)))for(C=l.transformCoordinates(i,s,e),v=(g=E/m)*T,y=0,b=0;b<P.length;b+=1){for(;y+f[b]>=v;)x=b+1===P.length?0:b+1,_=1-(w=(v-y)/f[b]),v+=g,r>0&&((S={x:P[b].x*_+P[x].x*w,y:P[b].y*_+P[x].y*w}).x<-r||S.x>c.width+r||S.y<-r||S.y>c.height+r)||p.push({x:C[b].x*_+C[x].x*w,y:C[b].y*_+C[x].y*w,z:C[b].z*_+C[x].z*w,line:e,rotation:Math.atan2(P[b].y-P[x].y,P[b].x-P[x].x)-u});y+=f[b]}}})),m.gcs(s),m.data(p),m.style("renderThreshold",2*h),f={zoom:o.zoom(),center:o.center(),rotation:u,size:c,labelViewport:r,maxSpacing:h,labelAutoUpdate:e.get("labelAutoUpdate")(d.mesh)},g},this.lastLabelPositions=function(){return r.extend({},f)},this._updateLabelPositions=function(){var e=f;if(!e||!e.labelAutoUpdate)return g;var t=g.layer().map(),n=t.zoom(),r=t.size(),i=!!(Math.abs(n-e.zoom)>=2);if(!i&&e.labelViewport>0){var o=Math.sqrt(a.distance2dSquared(t.gcsToDisplay(t.center()),t.gcsToDisplay(e.center)))*Math.pow(2,e.zoom-n),s=e.labelViewport/2-2*e.maxSpacing-Math.max(r.width-e.size.width,r.height-e.size.height,0);i=i||o>=s}return i&&g.labelPositions().draw(),g},this._build=function(){if((d=g._createIsolines())&&d.lines&&d.lines.length){p||(p=g.layer().createFeature("line",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{closed:function(e){return e.closed}}}),g.dependentFeatures([p]));var e=g.style();if(p.data(d.lines).style({antialiasing:e.antialiasing,lineCap:e.lineCap,lineJoin:e.lineJoin,miterLimit:e.miterLimit,strokeWidth:e.strokeWidth,strokeStyle:e.strokeStyle,strokeColor:e.strokeColor,strokeOffset:e.strokeOffset,strokeOpacity:e.strokeOpacity}),d.hasLabels){if(!m){if(!(o.registries.features[g.layer().rendererName()]||{}).text){var t=o.rendererForFeatures(["text"]);h=o.createLayer("feature",g.layer().map(),{renderer:t}),g.layer().addChild(h),g.layer().node().append(h.node())}m=(h||g.layer()).createFeature("text",{selectionAPI:!1,gcs:g.gcs(),visible:g.visible(void 0,!0),style:{text:function(e){return e.line.label}}}).geoOn(u.pan,g._updateLabelPositions)}c.usedStyles.forEach((function(t){"visible"!==t&&m.style(t,e[t])})),g.dependentFeatures([p,m])}}else p&&p.data([]);return g.buildTime().modified(),g.labelPositions(),g},this._update=function(){return w.call(g),(g.dataTime().timestamp()>=g.buildTime().timestamp()||g.updateTime().timestamp()<=g.timestamp())&&g._build(),g.updateTime().modified(),g},this.draw=function(){var e=v();return p&&p.draw(),m&&m.draw(),e},this._exit=function(){m&&((h||g.layer())&&(h||g.layer()).deleteFeature(m),h&&g.layer()&&g.layer().removeChild(h)),p&&g.layer()&&g.layer().deleteFeature(p),m=null,h=null,p=null,g.dependentFeatures([]),y()},this._init=function(t){t=t||{},b.call(g,t);var n=r.extend({},{opacity:1,value:function(e,t){return g.position()(e,t).z},rotateWithMap:!0,rotation:e.rotationFunction(),strokeWidth:function(e,t,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===t.style?{}:t.style);g.style(n),g.isoline(r.extend({},{count:15,autofit:!0,levels:[5,5],label:function(e){return e.level>=1},labelSpacing:200,labelViewport:1e4,labelAutoUpdate:!0},t.mesh||{},t.contour||{},t.isoline||{})),(t.mesh||t.contour||t.isoline)&&g.dataTime().modified()},this};l.rotationFunction=function(e,t){var n={higher:function(e){return e.rotation},lower:function(e){return e.rotation+Math.PI},map:function(e){var t=e.rotation,n=a.wrapAngle(t,!0);return(n>Math.PI/2||n<-Math.PI/2)&&(t+=Math.PI),t},screen:function(e){var n=e.rotation,r=a.wrapAngle(n+t.rotation(),!0);return(r>Math.PI/2||r<-Math.PI/2)&&(n+=Math.PI),n}};return n[e]||n.higher},r(l,i),e.exports=l},9105:function(e,t,n){var r=n(5699),i=n(5358),o=n(6837),a=n(4647).checkRenderer,s=n(4647).rendererForFeatures,l=n(4647).rendererForAnnotations,u=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r,o=n(5638),u=n(6618),c=n(3234),d=n(4647).createRenderer,f=n(4647).adjustLayerForRenderer,p=n(5108),h=this,m=this._exit,g=void 0===t.id?e.newLayerId():t.id,v=void 0===t.name?"":t.name,y=void 0===t.map?null:t.map,b=null,x=void 0===t.canvas?null:t.canvas,w=t.renderer instanceof c?t.renderer:null,_=!1,S=void 0!==t.renderer?t.renderer instanceof c?t.renderer.api():t.renderer:t.annotations?l(t.annotations):s(t.features),C=void 0===t.autoshareRenderer||t.autoshareRenderer,A=u(),T=u(),P=void 0===t.sticky||t.sticky,E=void 0===t.active||t.active,O=void 0===t.opacity?1:t.opacity,M=t.attribution||null,D=void 0===t.visible||t.visible,k=void 0===t.selectionAPI||t.selectionAPI;if(S=a(S),!y)throw new Error("Layers must be initialized on a map.");function I(){return(h.parent()||h.map()).children().filter((function(t){return t instanceof e}))}if(this.rendererName=function(){return S},this.autoshareRenderer=function(){return C},this.zIndex=function(e,t){return void 0===e?r:(t||I().reverse().forEach((function(t){t!==h&&t.zIndex()===e&&t.zIndex(e+1)})),e!==r&&(r=e,b.css("z-index",r),h.geoTrigger(p.layerMove,{layer:h})),h)},this.moveUp=function(e){var t,n,r,i,o=null;for(void 0===e&&(e=1),i=1,e<0&&(i=-1,e=-e),t=I().sort((function(e,t){return i*(e.zIndex()-t.zIndex())})),n=0;n<t.length;n+=1)if(null===o)t[n]===h&&(o=n);else{if(!(n-o<=e))break;r=h.zIndex(),h.zIndex(t[n].zIndex(),!0),t[n].zIndex(r,!0)}return h},this.moveDown=function(e){return void 0===e&&(e=1),h.moveUp(-e)},this.moveToTop=function(){return h.moveUp(I().length-1)},this.moveToBottom=function(){return h.moveDown(I().length-1)},this.sticky=function(){return P},this.active=function(e){return void 0===e?E:(E!==e&&(E=e,b.toggleClass("active",E)),h)},this.node=function(){return b},this.id=function(t){return void 0===t?g:(g=null===t?e.newLayerId():t,h.modified(),h)},this.name=function(e){return void 0===e?v:(v=e,b.attr("id",v),h.modified(),h)},this.map=function(){return y},this.renderer=function(){return w},this._renderer=function(e){return void 0===e?w:(w=e,h)},this.canvas=function(){return x},this._canvas=function(e){return void 0===e?x:(x=e,h)},this.dataTime=function(){return A},this.updateTime=function(){return T},this.initialized=function(e){return void 0!==e?(_=e,h):_},this.toLocal=function(e){return e},this.fromLocal=function(e){return e},this.attribution=function(e){return void 0!==e?(M=e,h.map().updateAttribution(),h):M},this.visible=function(e){return void 0===e?D:(D!==e&&(D=e,b.toggleClass("hidden",!D),h.modified()),h)},this.selectionAPI=function(e){return void 0===e?k:(k!==e&&(k=e),h)},this._init=function(e){if(_)return h;y.node().append(b);var n=o.extend({},t);return delete n.map,w?h._canvas(w.canvas()):null===S?(h._renderer(null),h._canvas(b)):x?h._renderer(d(S,h,x,n)):(h._renderer(d(S,h,void 0,n)),h._canvas(w.canvas())),b.toggleClass("active",h.active()),_=!0,e||(h.geoOn(p.resize,(function(e){h._update({event:e})})),h.geoOn(p.pan,(function(e){h._update({event:e})})),h.geoOn(p.rotate,(function(e){h._update({event:e})})),h.geoOn(p.zoom,(function(e){h._update({event:e})}))),h},this._exit=function(){h.geoOff(),w&&w._exit(),b.off(),b.remove(),t={},h._canvas(null),h._renderer(null),m()},this._update=function(e){return h},this.width=function(){return h.map().size().width},this.height=function(){return h.map().size().height},this.opacity=function(e){return void 0!==e?(O=e,b.css("opacity",O),h):O},(b=o(document.createElement("div"))).addClass("geojs-layer"),b.attr("renderer",S),v&&b.attr("id",v),h.opacity(O),h.visible(D),void 0===t.zIndex){var R=-1;I().forEach((function(e){void 0!==e.zIndex()&&(R=Math.max(R,e.zIndex()))})),t.zIndex=R+1}return h.zIndex(t.zIndex),f("all",h),h};u.newLayerId=function(){"use strict";var e=1;return function(){var t=e;return e+=1,t}}(),u.create=function(e,t){"use strict";if((t=t||{}).type=t.type||"feature",t.renderer=void 0===t.renderer?"webgl":t.renderer,t.renderer=a(t.renderer),!t.renderer)return console.warn("Invalid renderer"),null;var n=e.createLayer(t.type,t);return n?(t.features&&t.features.forEach((function(e){e.data=e.data||t.data,e.feature=o.create(n,e)})),n):(console.warn("Unable to create a layer"),null)},r(u,i),e.exports=u},4708:function(e,t,n){var r=n(5699),i=n(6837),o=n(6618),a=n(6853),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638);t=t||{},i.call(this,t);var l,u=this,c=this._init,d=o();return this.featureType="line",this._subfeatureStyles={lineCap:!0,lineJoin:!0,strokeColor:!0,strokeOffset:!0,strokeOpacity:!0,strokeWidth:!0},this.line=function(e){return void 0===e?u.style("line"):(u.style("line",e),u.dataTime().modified(),u.modified(),u)},this.position=function(e){return void 0===e?u.style("position"):(u.style("position",e),u.dataTime().modified(),u.modified(),u)},this._updatePointSearchInfo=function(){if(d.timestamp()>=u.dataTime().timestamp()&&d.timestamp()>=u.timestamp())return l;d.modified(),l=[];var e=u.data(),t=u.line(),n=u.style.get("strokeWidth"),r=u.position(),i=u.style.get("closed"),o=u.gcs(),s=u.layer().map().gcs();return e.forEach((function(e,u){var c,d,f,p,h,m,g,v=i(e,u),y=[];t(e,u).forEach((function(t,i){var l=r(t,i,e,u);o!==s&&(l=a.transformCoordinates(o,s,l)),void 0===m&&(m={x:l.x,y:l.y}),void 0===g&&(g={x:l.x,y:l.y}),l.x<m.x&&(m.x=l.x),l.x>g.x&&(g.x=l.x),l.y<m.y&&(m.y=l.y),l.y>g.y&&(g.y=l.y);var b=Math.ceil(n(t,i,e,u)/2)+2;(void 0===g.r||b>g.r)&&(g.r=b);var x=b*b;c&&y.push({u:l,v:c,r:f>b?f:b,r2:p>x?p:x,i:i,j:d}),c=l,d=i,f=b,p=x,!h&&v&&(h={p:l,r:b,r2:x,i:i})})),v&&h&&(c.x!==h.p.x||c.y!==h.p.y)&&y.push({u:c,v:h.p,r:f>h.r?f:h.r,r2:p>h.r2?p:h.r2,i:d,j:h.i}),y.min=m,y.max=g,l.push(y)})),l},this.pointSearch=function(e,t){var n=u.data(),r=[],i=[],o={};if(!n||!n.length||!u.layer())return{found:i,index:r,extra:o};u._updatePointSearchInfo();var c=u.layer().map();t=null===t?c.gcs():void 0===t?c.ingcs():t;var d,f,p,h,m=c.unitsPerPixel(c.zoom()),g=m*m,v=a.transformCoordinates(t,c.gcs(),e),y=u.style.get("strokeWidth"),b=u.style.get("strokeOpacity"),x=u.line();for(f=0;f<l.length;f+=1)for(h=l[f],d=null,p=0;p<h.length;p+=1)if(s.distance2dToLineSquared(v,h[p].u,h[p].v)<=h[p].r2*g&&(d||(d=x(n[f],f)),(b(d[h[p].i],h[p].i,n[f],f)>0||b(d[h[p].j],h[p].j,n[f],f)>0)&&(y(d[h[p].i],h[p].i,n[f],f)>0||y(d[h[p].j],h[p].j,n[f],f)>0))){i.push(n[f]),r.push(f),o[f]=p;break}return{found:i,index:r,extra:o}},this.polygonSearch=function(e,t,n){var r,i,o=u.data(),c=[],d=[],f={},p=u.layer().map(),h=u.style.get("strokeWidth"),m=u.style.get("strokeOpacity"),g=u.line();if(n=null===n?p.gcs():void 0===n?p.ingcs():n,e.outer||(e={outer:e,inner:[]}),!o||!o.length||e.outer.length<3)return{found:d,index:c,extra:f};(t=t||{}).partial=t.partial||!1,(e={outer:a.transformCoordinates(n,p.gcs(),e.outer),inner:(e.inner||[]).map((function(e){return a.transformCoordinates(n,p.gcs(),e)}))}).outer.forEach((function(e){r||(r={x:e.x,y:e.y},i={x:e.x,y:e.y}),e.x<r.x&&(r.x=e.x),e.x>i.x&&(i.x=e.x),e.y<r.y&&(r.y=e.y),e.y>i.y&&(i.y=e.y)})),u._updatePointSearchInfo();var v,y,b,x,w,_,S=p.unitsPerPixel(p.zoom());for(v=0;v<l.length;v+=1)if(!(!(b=l[v]).max||b.max.x<r.x-b.max.r*S||b.min.x>i.x+b.max.r*S||b.max.y<r.y-b.max.r*S||b.min.y>i.y+b.max.r*S)){var C=void 0,A=void 0,T=void 0;for(y=0;y<b.length;y+=1)if(x=b[y].u,w=b[y].v,_=b[y].r,!(x.x<r.x-_*S&&w.x<r.x-_*S||x.x>i.x+_*S&&w.x>i.x+_*S||x.y<r.y-_*S&&w.y<r.y-_*S||x.y>i.y+_*S&&w.y>i.y+_*S||(T||(T=g(o[v],v)),m(T[b[y].i],b[y].i,o[v],v)<=0&&m(T[b[y].j],b[y].j,o[v],v)<=0||h(T[b[y].i],b[y].i,o[v],v)<=0&&h(T[b[y].j],b[y].j,o[v],v)<=0))){var P=s.distanceToPolygon2d(x,e),E=s.distanceToPolygon2d(w,e);if(P>-_*S&&P<_*S||E>-_*S&&E<_&S||P*E<0){A=!0;break}if(s.crossedLineSegmentPolygon2d(x,w,e)){A=!0;break}for(var O=_*_*S*S,M=0;M<e.outer.length&&!A;M+=1)A=s.distance2dToLineSquared(e.outer[M],x,w)<O;for(var D=0;D<e.inner.length&&!A;D+=1)for(var k=0;k<e.inner[D].length&&!A;k+=1)A=s.distance2dToLineSquared(e.inner[D][k],x,w)<O;if(A)break;P>0&&(C=!0)}(!t.partial&&C&&!A||t.partial&&(C||A))&&(c.push(v),d.push(o[v]),f[v]={partial:A,segment:y<l[v].length?y:0})}return{found:d,index:c,extra:f}},this.rdpSimplifyData=function(e,t,n,r){e=e||u.data(),n=n||u.style.get("position"),r=r||u.style.get("line");var i=u.layer().map(),o=i.gcs(),l=u.gcs(),c=u.style.get("closed");return void 0===t&&(t=.5*i.unitsPerPixel(i.zoom())),e=e.map((function(e,i){var u=r(e,i),d=a.transformCoordinates(l,o,u.map((function(t,r){return n(t,r,e,i)}))),f=s.rdpLineSimplify(d,t,c(e,i),[]);for(var p in(f.length<2||2===f.length&&s.distance2dSquared(f[0],f[1])<t*t)&&(f=[]),f=a.transformCoordinates(o,l,f),e)!e.hasOwnProperty(p)||Array.isArray(e)&&p>=0&&p<e.length||(f[p]=e[p]);return f})),u.style("position",(function(e){return e})),u.style("line",(function(e){return e})),u.data(e),u},this._init=function(e){e=e||{},c.call(u,e);var t=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:.8431372549,b:0},strokeStyle:"solid",strokeOpacity:1,antialiasing:2,closed:!1,line:function(e){return e},position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},origin:function(e){return e.length>=3?e.slice(0,3):[0,0,0]}},void 0===e.style?{}:e.style);return void 0!==e.line&&(t.line=e.line),void 0!==e.position&&(t.position=e.position),u.style(t),u.dataTime().modified(),u},this._init(t),this};l.create=function(e,t){"use strict";return(t=t||{}).type="line",i.create(e,t)},l.capabilities={feature:"line",basic:"line.basic",multicolor:"line.multicolor"},r(l,i),e.exports=l},2804:function(e,t,n){var r=n(5638),i=n(5699),o=n(5358),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);if(void 0===(t=t||{}).node||null===t.node)return console.warn("map creation requires a node"),this;o.call(this,t);var i,a,s,l,u,c=n(9986),d=n(6853),f=n(4634),p=n(4647),h=n(5108),m=n(3870),g=n(6408),v=this,y=this._exit,b=r(t.node),x=t.width||b.width()||512,w=t.height||b.height()||512,_=void 0===t.gcs?"EPSG:3857":t.gcs,S=void 0===t.ingcs?"EPSG:4326":t.ingcs,C={x:0,y:0},A=void 0===t.zoom?4:t.zoom,T=t.rotation?t.rotation:0,P=null,E=null,O={min:0,max:16,origMin:0},M=null,D=null,k=!!t.discreteZoom,I="function"==typeof t.allowRotation?t.allowRotation:void 0===t.allowRotation||!!t.allowRotation,R=t.maxBounds||{},N=t.camera||c(),F=t.animationQueue||[],L=void 0===t.autoResize||t.autoResize,B=t.autoshareRenderer,V=((R.left||0)+(R.right||0))/2,j=((R.bottom||0)+(R.top||0))/2;function z(){var e;void 0!==document.hidden?e="hidden":void 0!==document.msHidden?e="msHidden":void 0!==document.webkitHidden&&(e="webkitHidden"),v.geoTrigger(document[e]?h.hidden:h.unhidden)}function G(e){var t;void 0!==document.hidden?t="visibilitychange":void 0!==document.msHidden?t="msvisibilitychange":void 0!==document.webkitHidden&&(t="webkitvisibilitychange"),document.removeEventListener(t,z),!1!==e&&document.addEventListener(t,z)}function U(e,t){var n=e.zIndex(),r=t.zIndex();if(n!==r)return n-r;var i=e.node()[0],o=t.node()[0],a=i&&i.parentNode,s=o&&o.parentNode;if(a&&s&&a===s){var l=Array.from(a.children),u=l.indexOf(i),c=l.indexOf(o);if(u>=0&&c>=0)return u-c}return a?-1:s?1:0}function W(e,t,n,r,i){e.globalAlpha=t,i&&(e.globalCompositeOperation=i);var o=n.css("transform");o&&"matrix("===o.substr(0,7)?e.setTransform.apply(e,o.substr(7,o.length-8).split(",").map(parseFloat)):e.setTransform(1,0,0,1,0,0),e.drawImage(r,0,0),e.globalCompositeOperation="source-over"}function H(){for(var e=F.splice(0,F.length),t=1;t<e.length;t+=1)try{e[t].apply(v,arguments)}catch(e){console.error(e)}}function q(e,t,n){var r=t.width/2,i=t.height/2,o=Math.sin(n),a=Math.cos(n),s={},l={},u={},c={};return s.x=e.x+-r*a- -i*o,s.y=e.y+-r*o+-i*a,l.x=e.x+r*a- -i*o,l.y=e.y+r*o+-i*a,u.x=e.x+-r*a-i*o,u.y=e.y+-r*o+i*a,c.x=e.x+r*a-i*o,c.y=e.y+r*o+i*a,{left:Math.min(s.x,l.x,u.x,c.x),right:Math.max(s.x,l.x,u.x,c.x),bottom:Math.min(s.y,l.y,u.y,c.y),top:Math.max(s.y,l.y,u.y,c.y)}}function X(e,t){void 0===t&&(t=T),e=function(e,t){return t&&(e=q({x:(e.left+e.right)/2,y:(e.top+e.bottom)/2},{width:Math.abs(e.left-e.right),height:Math.abs(e.top-e.bottom)},t)),e}(e,t);var n=function(e){var t,n,r=e.right-e.left,i=e.top-e.bottom,o=Math.abs(r/i),a=x/w;return o>a?(t=1,n=o/a):(n=1,t=a/o),{x:t,y:n}}(e);return n.y>n.x?-Math.log2(Math.abs(e.right-e.left)*n.x/(x*i)):-Math.log2(Math.abs(e.top-e.bottom)*n.y/(w*i))}function K(){O.min=l?Math.max(O.origMin,X(R)):O.origMin}function Z(e,t,n){if(!I)return 0;if(t||"function"!=typeof I||(e=I(e)),!n){var r=2*Math.PI;e=e%r+(e>=0?0:r),Math.min(Math.abs(e),Math.abs(e-r))<1e-5&&(e=0)}return e}function Y(e,t,n,i){if(!a&&!s)return e;var o,l,u=R;if(t){u=r.extend({},R);var c,d,f=Math.abs(e.right-e.left),p=Math.abs(e.top-e.bottom),h=Math.abs(Math.sin(t)),m=Math.abs(Math.cos(t));if(e.width&&e.height)c=e.width,d=e.height;else if(Math.abs(h-m)<5e-4)if(x&&w){var g=Math.abs(x/w),v=Math.pow(1+Math.pow(g,2),.5);d=(c=Math.max(f,p)/v)*g}else c=f*m,d=p*h;else c=(m*f-h*p)/(m*m-h*h),d=(m*p-h*f)/(m*m-h*h);var y=f-Math.max(m*c,h*d),b=p-Math.max(m*d,h*c);u.left-=y,u.right+=y,u.top+=b,u.bottom-=b}return i&&(u={left:u.left-(e.right-e.left)/2,right:u.right+(e.right-e.left)/2,top:u.top-(e.bottom-e.top)/2,bottom:u.bottom+(e.bottom-e.top)/2}),a&&(e.right-e.left>u.right-u.left?o=u.left-(e.right-e.left-(u.right-u.left))/2-e.left:e.left<u.left?o=u.left-e.left:e.right>u.right&&(o=u.right-e.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)),e={left:e.left+=o,right:e.right+=o,top:e.top,bottom:e.bottom})),s&&(e.top-e.bottom>u.top-u.bottom?l=u.bottom-(e.top-e.bottom-(u.top-u.bottom))/2-e.bottom:e.top>u.top?l=u.top-e.top:e.bottom<u.bottom&&(l=u.bottom-e.bottom),l&&(!n||-n.y*l>0)&&(n&&Math.abs(l)>Math.abs(n.y*n.unit)&&(l=Math.abs(n.y*n.unit)*l/Math.abs(l)),e={top:e.top+=l,bottom:e.bottom+=l,left:e.left,right:e.right})),e}function J(e,t){if(N.rotation=t||0,e.width&&e.height&&t){var n=(e.left+e.right)/2,r=(e.top+e.bottom)/2;N.viewFromCenterSizeRotation({x:n,y:r},e,t)}else N.bounds=e;C={x:(N.bounds.left+N.bounds.right)/2,y:(N.bounds.top+N.bounds.bottom)/2}}function Q(){v.size({width:b.width(),height:b.height()})}return R.left=d.transformCoordinates(R.gcs||S,_,{x:void 0!==R.left?R.left:-180,y:j}).x,R.right=d.transformCoordinates(R.gcs||S,_,{x:void 0!==R.right?R.right:180,y:j}).x,R.top=void 0!==R.top?d.transformCoordinates(R.gcs||S,_,{x:V,y:R.top}).y:R.right,R.bottom=void 0!==R.bottom?d.transformCoordinates(R.gcs||S,_,{x:V,y:R.bottom}).y:R.left,i=t.unitsPerPixel||(R.right-R.left)/256,N.viewport={width:x,height:w,left:b.offset().left,top:b.offset().top},t.center=f.normalizeCoordinates(t.center),a=void 0!==t.clampBoundsX&&t.clampBoundsX,s=void 0===t.clampBoundsY||t.clampBoundsY,l=void 0===t.clampZoom||t.clampZoom,this.unitsPerPixel=function(e,t){return e=e||0,t?(i=Math.pow(2,e)*t,v.draw(),v):Math.pow(2,-e)*i},this.animationQueue=function(e){if(void 0===e)return F;if(e!==F){if(F.length){e.length&&e[0]!==F[0]&&window.cancelAnimationFrame(F[0]);for(var t=e.length?1:0;t<F.length;t+=1)e.push(F[t])}F=e}return v},this.autoResize=function(e){return void 0===e?L:(e!==L&&(r(window).off("resize",Q),(L=e)&&r(window).on("resize",Q)),v)},this.clampBoundsX=function(e){return void 0===e?a:(e!==a&&(a=!!e,v.pan({x:0,y:0})),v)},this.clampBoundsY=function(e){return void 0===e?s:(e!==s&&(s=!!e,v.pan({x:0,y:0})),v)},this.clampZoom=function(e){return void 0===e?l:(e!==l&&(l=!!e,K(),v.zoom(A)),v)},this.allowRotation=function(e){return void 0===e?I:("function"!=typeof e&&(e=!!e),e!==I&&(I=e,v.rotation(T)),v)},this.origin=function(){return r.extend({},u)},this.camera=function(){return N},this.gcs=function(e){if(void 0===e)return _;if(e!==_){var t=v.center(void 0,void 0);_=e,K();var n=v._fix_zoom(A);n!==A&&v.zoom(n),v.center(t,void 0)}return v},this.ingcs=function(e){return void 0===e?S:(S=e,v)},this.node=function(){return b},this.zoom=function(e,t,n){if(void 0===e)return A;var r,i,o=t&&(t.mapgcs||t.geo)&&t.map,a=o;if((e=v._fix_zoom(e,n))===A)return v;if(A=e,i=v.boundsFromZoomAndCenter(e,C,T,null,n,a),v.modified(),J(i,T),r={zoomLevel:A,screenPosition:t?t.map:void 0},v.geoTrigger(h.zoom,r),o){var s=v.gcsToDisplay(t.mapgcs||t.geo,t.mapgcs?null:void 0);v.pan({x:t.map.x-s.x,y:t.map.y-s.y},n,!0)}else v.pan({x:0,y:0},n);return v},this.pan=function(e,t,n){var r={screenDelta:e};if(e.x||e.y){var i=v.unitsPerPixel(A),o=Math.sin(T),a=Math.cos(T);N.pan({x:(e.x*a- -e.y*o)*i,y:(e.x*o+-e.y*a)*i})}var s=N.bounds;if((s=Y(s,T,"limited"===n?{x:e.x,y:e.y,unit:i}:void 0,!0===n))!==N.bounds){var l=v.gcsToDisplay({x:N.bounds.left,y:N.bounds.top},null);J(s=v.boundsFromZoomAndCenter(A,{x:(s.left+s.right)/2,y:(s.top+s.bottom)/2},T,null,t,!0),T);var u=v.gcsToDisplay({x:N.bounds.left,y:N.bounds.top},null);r.screenDelta.x+=u.x-l.x,r.screenDelta.y+=u.y-l.y}return C=N.displayToWorld({x:x/2,y:w/2}),v.geoTrigger(h.pan,r),v.modified(),v},this.rotation=function(e,t,n){if(void 0===e)return T;var r=t&&t.geo&&t.map;if((e=Z(e,n))===T)return v;T=e;var i=v.boundsFromZoomAndCenter(A,C,T,null,n,!0);v.modified(),J(i,T);var o={rotation:T,screenPosition:t?t.map:void 0};if(v.geoTrigger(h.rotate,o),r){var a=v.gcsToDisplay(t.geo);v.pan({x:t.map.x-a.x,y:t.map.y-a.y},void 0,!0)}else v.pan({x:0,y:0},void 0,!0);return K(),v.zoom(A,void 0,n),v},this.center=function(e,t,n,i){var o;return void 0===e?o=r.extend({},v.worldToGcs(C,t)):(o=v.gcsToWorld(e,t),J(v.boundsFromZoomAndCenter(A,o,T,null,n,i),T),v.modified(),v.geoTrigger(h.pan,{screenDelta:{x:0,y:0}}),v)},this.createLayer=function(e,t){t=t||{},void 0!==v.autoshareRenderer()&&(t=Object.assign({autoshareRenderer:v.autoshareRenderer()},t));var n=p.createLayer(e,v,t);return n&&(v.addChild(n),v.children().forEach((function(e){e instanceof g&&e.moveToTop()})),n._update(),v.modified(),v.geoTrigger(h.layerAdd,{target:v,layer:n})),n},this.deleteLayer=function(e){return null!=e&&(e._exit(),v.removeChild(e),v.modified(),v.geoTrigger(h.layerRemove,{target:v,layer:e})),e},this.size=function(e){if(void 0===e)return{width:x,height:w};var t=v.center();x=e.width||x,w=e.height||w,K();var n=v._fix_zoom(A);return n!==A&&v.zoom(n),v.camera().viewport={width:x,height:w,left:b.offset().left,top:b.offset().top},v.center(t),v.geoTrigger(h.resize,{target:v,width:x,height:w}),v.modified(),v},this.rotatedSize=function(){if(!this.rotation())return{width:x,height:w};var e=q({x:0,y:0},{width:x,height:w},v.rotation());return{width:Math.abs(e.right-e.left),height:Math.abs(e.top-e.bottom)}},this.gcsToWorld=function(e,t){return Array.isArray(e)?e.map((function(e){return v.gcsToWorld(e,t)})):((t=null===t?_:void 0===t?S:t)!==_&&(e=d.transformCoordinates(t,_,e)),u.x||u.y||u.z?e=d.affineForward({origin:u},[e])[0]:"z"in e||(e={x:e.x,y:e.y,z:0}),e)},this.worldToGcs=function(e,t){return Array.isArray(e)?e.map((function(e){return v.worldToGcs(e,t)})):(u.x||u.y||u.z?e=d.affineInverse({origin:u},[e])[0]:"z"in e||(e={x:e.x,y:e.y,z:0}),(t=null===t?_:void 0===t?S:t)!==_&&(e=d.transformCoordinates(_,t,e)),e)},this.gcsToDisplay=function(e,t){return e=v.gcsToWorld(e,t),v.worldToDisplay(e)},this.worldToDisplay=function(e){return Array.isArray(e)?e.map((function(e){return N.worldToDisplay(e)})):N.worldToDisplay(e)},this.displayToGcs=function(e,t){return e=v.displayToWorld(e),v.worldToGcs(e,t)},this.displayToWorld=function(e){return Array.isArray(e)?e.map((function(e){return N.displayToWorld(e)})):N.displayToWorld(e)},this.draw=function(){var e,t=v.children();for(v.geoTrigger(h.draw,{target:v}),v._update(),e=0;e<t.length;e+=1)t[e].draw();return v.geoTrigger(h.drawEnd,{target:v}),v},this.fileReader=function(e,t){return void 0===e?P:("string"==typeof e?((t=t||{}).layer||(t.layer=v.createLayer("feature",r.extend({},t))),t.renderer=t.layer.renderer().api(),P=p.createFileReader(e,t)):P=e,v)},this._init=function(e){if(null==b)throw new Error("Map require DIV node");return b.data("data-geojs-map")&&r.isFunction(b.data("data-geojs-map").exit)&&b.data("data-geojs-map").exit(),b.addClass("geojs-map"),b.data("data-geojs-map",v),G(),v},this._update=function(e){var t,n=v.children();for(t=0;t<n.length;t+=1)n[t]._update(e);return v},this.exit=function(){G(!1);var e,t=v.children();for(e=t.length-1;e>=0;e-=1)t[e]._exit(),v.removeChild(t[e]);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",Q),y()},this.interactor=function(e){return void 0===e?E:(E&&E!==e&&E.destroy(),(E=e)&&(b.attr("tabindex")||b.attr("tabindex",0),E.map(v)),v)},this.zoomRange=function(e,t){return void 0===e?r.extend({},O):(void 0!==e.max&&(O.max=e.max),void 0!==e.min&&(O.min=O.origMin=e.min),K(),t||v.zoom(A),v)},this.transition=function(e,t,n){if(void 0===e)return M;if(M){var i=r.extend(!0,{},M.end);return i.center&&_!==S&&(i.center=d.transformCoordinates(_,S,i.center)),D=r.extend({},i||{},D||{},e),v}var o=v.unitsPerPixel(0);function a(e){return Math.pow(2,-(e+1))*o*w}var s={center:void 0,zoom:v.zoom(),rotation:v.rotation(),duration:1e3,ease:function(e){return e},interp:function(e,t){return function(n){var i=[];return r.each(e,(function(r){i.push(function(e,t,n){return e+(t-e)*n}(e[r],t[r],n))})),i}},done:null,zCoord:!0};function l(t){var n=M.done,r=D;if(!0===M.cancel)return v.geoTrigger(h.transitioncancel,e),n&&n({cancel:!0,source:M.cancelSource,transition:M}),M=null,void(D&&(r=D,D=null,v.transition(r,void 0,t)));if(M.start.time||(M.start.time=t,M.end.time=t+e.duration),M.time=t-M.start.time,t>=M.end.time||r){if(!r){if(M.end.center){var i=A!==v._fix_zoom(M.end.zoom);v.center(M.end.center,null,i,i)}v.zoom(M.end.zoom,M.zoomOrigin),v.rotation(Z(M.end.rotation))}return v.geoTrigger(h.transitionend,e),n&&n({next:!!r}),M=null,void(D&&(r=D,D=null,v.transition(r,void 0,t)))}var a=M.ease((t-M.start.time)/e.duration),s=M.interp(a);M.zCoord&&(s[2]=function(e){return-Math.log2(e/o/w)-1}(s[2])),v._fix_zoom(s[2],!0)===A?v.center({x:s[0],y:s[1]},null,!0,!0):(C=v.gcsToWorld({x:s[0],y:s[1]},null),v.zoom(s[2],M.zoomOrigin,!0)),v.rotation(s[3],void 0,!0),v.scheduleAnimationFrame(l)}return e.center&&(t=null===t?_:void 0===t?S:t,(e=r.extend(!0,{},e)).center=f.normalizeCoordinates(e.center),t!==_&&(e.center=d.transformCoordinates(t,_,e.center))),e=r.extend(!0,{},s,e),(M={start:{center:v.center(void 0,null),zoom:v.zoom(),rotation:v.rotation()},end:{center:e.center,zoom:v._fix_zoom(e.zoom),rotation:Z(e.rotation,void 0,!0)},ease:e.ease,zCoord:e.zCoord,done:e.done,duration:e.duration,zoomOrigin:e.zoomOrigin}).interp=e.interp([M.start.center.x,M.start.center.y,e.zCoord?a(M.start.zoom):M.start.zoom,M.start.rotation],[M.end.center?M.end.center.x:M.start.center.x,M.end.center?M.end.center.y:M.start.center.y,e.zCoord?a(M.end.zoom):M.end.zoom,M.end.rotation]),v.geoTrigger(h.transitionstart,e),h.cancelNavigation?(M=null,v.geoTrigger(h.transitionend,e),v):(h.cancelAnimation?(e.duration=0,l(0)):n?l(n):v.scheduleAnimationFrame(l),v)},this.transitionCancel=function(e){return!(!M||!0===M.cancel&&!D)&&(M.cancel=!0,M.cancelSource=e||M.cancelSource||"",D=null,!0)},this.bounds=function(e,t){var n;if(t=null===t?_:void 0===t?S:t,void 0!==e){if(t!==_){var r=d.transformCoordinates(t,_,[{x:e.left,y:e.top},{x:e.right,y:e.bottom}]);e={left:r[0].x,top:r[0].y,right:r[1].x,bottom:r[1].y}}e=Y(e,T),n=v.zoomAndCenterFromBounds(e,T,null),v.zoom(n.zoom),v.center(n.center,null)}return v.boundsFromZoomAndCenter(A,C,T,t,!0)},this.maxBounds=function(e,t){if(t=null===t?_:void 0===t?S:t,void 0===e)return{left:d.transformCoordinates(_,t,{x:R.left,y:0}).x,right:d.transformCoordinates(_,t,{x:R.right,y:0}).x,bottom:d.transformCoordinates(_,t,{x:0,y:R.bottom}).y,top:d.transformCoordinates(_,t,{x:0,y:R.top}).y};var n=((e.left||0)+(e.right||0))/2,r=((e.bottom||0)+(e.top||0))/2;return void 0!==e.left&&(R.left=d.transformCoordinates(t,_,{x:e.left,y:r}).x),void 0!==e.right&&(R.right=d.transformCoordinates(t,_,{x:e.right,y:r}).x),void 0!==e.bottom&&(R.bottom=d.transformCoordinates(t,_,{x:n,y:e.bottom}).y),void 0!==e.top&&(R.top=d.transformCoordinates(t,_,{x:n,y:e.top}).y),K(),v.zoom(A),v.pan({x:0,y:0}),v},this.zoomAndCenterFromBounds=function(e,t,n){var r,i;if((n=null===n?_:void 0===n?S:n)!==_){var o=d.transformCoordinates(n,_,[{x:e.left,y:e.top},{x:e.right,y:e.bottom}]);e={left:o[0].x,top:o[0].y,right:o[1].x,bottom:o[1].y}}if(e.left>=e.right||e.bottom>=e.top)throw new Error("Invalid bounds provided");return i=v._fix_zoom(X(e,t)),r={x:((e=Y(e,t)).left+e.right)/2-u.x,y:(e.top+e.bottom)/2-u.y},n!==_&&(r=d.transformCoordinates(_,n,r)),{zoom:i,center:r}},this.boundsFromZoomAndCenter=function(e,t,n,r,i,o){var a,s,l,c,f,p;if(r=null===r?_:void 0===r?S:r,e=v._fix_zoom(e,i),p=v.unitsPerPixel(e),t=v.gcsToWorld(t,null),l=(a=x*p)/2,c=(s=w*p)/2,n?(t.x+=u.x,t.y+=u.y,(f=q(t,{width:a,height:s},n)).width=a,f.height=s,f=Y(f,n,void 0,o)):f=Y(f={left:t.x-l+u.x,right:t.x+l+u.x,bottom:t.y-c+u.y,top:t.y+c+u.y},0,void 0,o),r!==_){var h=d.transformCoordinates(_,r,[[f.left,f.top],[f.right,f.bottom]]);f={left:h[0][0],top:h[0][1],right:h[1][0],bottom:h[1][1]}}return f.width=a,f.height=s,f},this.discreteZoom=function(e){return void 0===e?k:(k!==(e=!!e)&&((k=e)&&v.zoom(Math.round(v.zoom())),v.interactor()&&v.interactor().options({discreteZoom:k})),v)},this.layers=this.children,this.sortedLayers=function(){return v.children().sort(U)},this.listSceneObjects=function(e){var t=[];return(e=e||v.sortedLayers()).forEach((function(e){if(t.indexOf(e)<0&&(t.push(e),e.children)){var n=e.children();n.length&&(t=t.concat(v.listSceneObjects(n)))}})),t},this.updateAttribution=function(){v.node().find(".geo-attribution").remove();var e=r("<div/>").addClass("geo-attribution").on("mousedown",(function(e){e.stopPropagation()}));return v.children().forEach((function(t){var n=t.attribution();n&&r("<span/>").addClass("geo-attribution-layer").html(n).appendTo(e)})),r("span",e).length&&e.appendTo(v.node()),v},this.screenshot=function(e,t,n,i){var o;if(!e||Array.isArray(e)||e.renderer||(t=t||e.type,n=n||e.encoderOptions,i=i||e,e=e.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(e,t,n,a)}))}o=r.when(),e?Array.isArray(e)||(e=[e]):(e=v.layers(),null!==i.attribution&&void 0!==i.attribution||(i.attribution=!0)),e=(e=e.filter((function(e){return v.layers().indexOf(e)>=0&&e.opacity()>0&&(!e.visible||e.visible())}))).sort(U);var l=document.createElement("canvas");l.width=x,l.height=w;var u=l.getContext("2d");if(!1!==i.background&&null!==i.background){var c=i.background;void 0===i.background&&(u.fillStyle="white",u.fillRect(0,0,l.width,l.height),v.node().parents().get().reverse().forEach((function(e){(c=window.getComputedStyle(e).backgroundColor)&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))})),c=window.getComputedStyle(v.node()[0]).backgroundColor),c&&"transparent"!==c&&(u.fillStyle=c,u.fillRect(0,0,l.width,l.height))}return e.forEach((function(e){var t=e.opacity();e.node().children("canvas").each((function(){var n=r(this);o=o.then((function(){e.renderer()&&"webgl"===e.renderer().api()&&e.renderer()._renderFrame(),W(u,t,n,n[0],e.node().css("mix-blend-mode"))}))})),!e.node().children().not("canvas").length&&e.node().children().length||e.renderer()&&"webgl"===e.renderer().api()||(o=o.then((function(){return f.htmlToImage(e.node(),1).done((function(t){W(u,1,r([]),t,e.node().css("mix-blend-mode"))}))})))})),i.attribution&&v.node().find(".geo-attribution").each((function(){var e=r(this);o=o.then((function(){return f.htmlToImage(e,1).done((function(e){W(u,1,r([]),e)}))}))})),i.html&&r(i.html).each((function(){var e=r(this);o=o.then((function(){return f.htmlToImage(e,1).done((function(t){W(u,1,r([]),t,e.css("mix-blend-mode"))}))}))})),o=o.then((function(){var e=l;if("canvas"!==t)try{l=l.toDataURL(t,n)}catch(e){console.warn("Failed to convert screenshot to output",e);var i=r.Deferred();return i.reject(),i}return v.geoTrigger(h.screenshot.ready,{canvas:e,screenshot:l}),l}))},this.scheduleAnimationFrame=function(e,t){F.length||F.push(window.requestAnimationFrame(H));var n=F.indexOf(e,1);if(n>=0){if(!t)return;if(F.splice(n,1),"remove"===t)return}return F.push(e),F[0]},this._fix_zoom=function(e,t){return e=Math.round(1e6*e)/1e6,e=Math.max(Math.min(O.max,e),O.min),k&&!t&&(e=Math.round(e))<O.min&&(e=Math.ceil(O.min)),e},this.autoshareRenderer=function(e){return void 0===e?B:(B=null===e?void 0:e,v)},this._init(t),this.node().on("dragover.geo",(function(e){var t=e.originalEvent;v.fileReader()&&(t.stopPropagation(),t.preventDefault(),t.dataTransfer.dropEffect="copy")})).on("drop.geo",(function(e){var t,n,r=e.originalEvent,i=v.fileReader();function o(){v.draw()}if(i)for(r.stopPropagation(),r.preventDefault(),t=0;t<r.dataTransfer.files.length;t+=1)n=r.dataTransfer.files[t],i.canRead(n)&&i.read(n,o)})),u={x:0,y:0},this.zoomRange(t,!0),A=this._fix_zoom(A),T=Z(T),this.center(r.extend({},t.center||C),void 0),null!==t.interactor&&this.interactor(t.interactor||m({discreteZoom:k})),L&&r(window).on("resize",Q),v.geoOn([h.layerAdd,h.layerRemove],v.updateAttribution),this};a.create=function(e){"use strict";var t=a(e),r=n(9105);return t&&t.zoom?(e.data=e.data||[],e.layers=e.layers||[],e.layers.forEach((function(n){n.data=n.data||e.data,n.layer=r.create(t,n)})),t):(console.warn("Could not create map."),null)},i(a,o),e.exports=a},3870:function(e,t,n){var r=n(5699),i=n(3737),o=n(4634),a=n(3345),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this);var r,s,l,u,c,d,f,p,h,m,g=n(5638),v=n(5108),y=n(7839),b=n(4634).throttle,x=n(4634).debounce,w=n(4634).actionMatch,_=n(5017),S=this,C=null,A=!1,T=!1,P=function(){};function E(e){var t=e.x,n=e.y;return Math.sqrt(t*t+n*n)}function O(){d={boundDocumentHandlers:d.boundDocumentHandlers}}function M(e,t){t=t<=0?30:t;var n=function(){var e,t,n,i;if(!r.spring.enabled)return{x:0,y:0};var o=S.map().maxBounds(void 0,null),a=S.map().gcsToDisplay({x:o.left,y:o.top},null),s=S.map().gcsToDisplay({x:o.right,y:o.bottom},null),l=r.spring.springConstant,u=S.map().node().width(),c=S.map().node().height();return e=l*Math.max(0,a.x),t=l*Math.max(0,u-s.x),n=l*Math.max(0,a.y)/2,i=l*Math.max(0,c-s.y)/2,{x:e-t,y:n-i}}(),i=E(e),o=e.x/i,a=e.y/i;return i*=Math.exp(-r.momentum.drag*t),E(n)*t+i<r.momentum.minSpeed?null:(i>0?(o*=i,a*=i):(o=0,a=0),{x:o-n.x*t,y:a-n.y*t})}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"}],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}},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(e){return(2-e)*e}}},t||{}),t&&t.actions&&(r.actions=g.extend(!0,[],t.actions)),t&&t.momentum&&t.momentum.actions&&(r.momentum.actions=g.extend(!0,[],t.momentum.actions)),t&&t.keyboard&&void 0!==t.keyboard.actions&&(r.keyboard.actions=g.extend(!0,{},t.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}},d={},f={},this._handleKeys=function(e,t,n){n&&!0===n.simulated&&(t=n);var i,o,a=r.keyboard.meta||{0:{}},s=S.map(),l=s.size(),u=e,c="",d={};for(i in a)a.hasOwnProperty(i)&&(void 0!==a[i].shift&&t.shiftKey!==!!a[i].shift||void 0!==a[i].ctrl&&t.ctrlKey!==!!a[i].ctrl||void 0!==a[i].alt&&t.altKey!==!!a[i].alt||void 0!==a[i].meta&&t.metaKey!==!!a[i].meta||(o=i));if(void 0!==o){switch(t.stopPropagation(),t.preventDefault(),e.indexOf(".")>=0&&(u=e.substr(0,e.indexOf(".")),c=e.substr(e.indexOf(".")+1)),u){case"zoom":switch(c){case"in":d.zoomDelta=[.05,.25,1][o];break;case"out":d.zoomDelta=-[.05,.25,1][o];break;default:isNaN(parseFloat(c))||(d.zoom=parseFloat(c))}break;case"pan":switch(c){case"down":d.panY=-Math.max(1,[0,.05,.5][o]*l.height);break;case"left":d.panX=Math.max(1,[0,.05,.5][o]*l.width);break;case"right":d.panX=-Math.max(1,[0,.05,.5][o]*l.width);break;case"up":d.panY=Math.max(1,[0,.05,.5][o]*l.height)}break;case"rotate":switch(c){case"ccw":d.rotationDelta=[1,5,90][o]*Math.PI/180;break;case"cw":d.rotationDelta=-[1,5,90][o]*Math.PI/180;break;default:isNaN(parseFloat(c))||(d.rotation=parseFloat(c))}}s.geoTrigger(v.keyaction,{move:d,action:e,factor:o,event:t}),d.cancel||(void 0!==d.zoom?s.zoom(d.zoom):d.zoomDelta&&s.zoom(s.zoom()+d.zoomDelta),void 0!==d.rotation?s.rotation(d.rotation):d.rotationDelta&&s.rotation(s.rotation()+d.rotationDelta),(d.panX||d.panY)&&s.pan({x:d.panX||0,y:d.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(e){var t=!1;if("mouse"===e.pointerType&&c.touchSupport&&(t=!0),"hammer.input"===e.type){if("pan"!==c.lastEventType||1===e.pointers.length)return;t=!0,c.lastEventType=null}var n=/^(.*)(start|end|move|tap)$/.exec(e.type);if(n&&3===n.length||(t=!0),t)d.boundDocumentHandlers&&c.lastEvent&&S._handleMouseUpDocument(c.lastEvent);else{e.which=n[1];var i=(new Date).valueOf();"pan"===e.which&&"pan"!==c.lastEventType&&i-c.lastTime<r.touchPanDelay||(c.lastTime=i,c.lastEventType=e.which,c.lastEvent=e,void 0===e.pageX&&void 0!==e.center&&void 0!==e.center.x&&(e.pageX=e.center.x,e.pageY=e.center.y),"start"===n[2]&&(S._handleMouseDown(e),S._setClickMaybe(!1),d.boundDocumentHandlers&&g(document).on("mousemove.geojs",S._handleMouseUpDocument)),"start"!==n[2]&&"move"!==n[2]||(d.boundDocumentHandlers?S._handleMouseMoveDocument(e):S._handleMouseMove(e)),"end"!==n[2]&&"cancel"!==n[2]||(d.boundDocumentHandlers?S._handleMouseUpDocument(e):S._handleMouseUp(e),c.lastEvent=null),"tap"!==n[2]||d.boundDocumentHandlers||(e.which=1,c.lastEventType=null,S._handleMouseDown(e),S._handleMouseUp(e),c.lastEventType=n[2]))}},this.retriggerMouseMove=function(){S.map().geoTrigger(v.mousemove,S.mouse())},this._connectEvents=function(){if(!r.map)return S;S._disconnectEvents(),p=g(r.map.node()),S._handleMouseWheel=function(){var e={};function t(t){var n,i;A||(e!==f&&(f=e={kind:"wheel",scroll:{x:0,y:0}}),t.preventDefault(),t.deltaFactor=1,1===t.originalEvent.deltaMode?t.deltaFactor=40:2===t.originalEvent.deltaMode&&(t.deltaFactor=g(window).height()),n=t.originalEvent.deltaX||0,i=t.originalEvent.deltaY||0,n=n*r.wheelScaleX*t.deltaFactor/120,i=i*r.wheelScaleY*t.deltaFactor/120,e.scroll.x+=n,e.scroll.y+=i)}function n(t){var n,i;if(e===f){if(S._getMousePosition(t),S._getMouseButton(t),S._getMouseModifiers(t),i=(w({wheel:!0},s.modifiers,r.actions)||{}).action){var o=S.map().transitionCancel("wheel."+i);switch((o|=S.cancel(y.momentum,!0))&&(s.geo=S.map().displayToGcs(s.map),s.mapgcs=S.map().displayToGcs(s.map,null)),i){case y.pan:S.map().pan({x:f.scroll.x,y:f.scroll.y},void 0,"limited");break;case y.zoom:n=-f.scroll.y,P(n,s);break;case y.rotate:S.map().rotation(S.map().rotation()+f.scroll.y*r.rotateWheelScale,s)}S.map().geoTrigger(v.actionwheel,{state:S.state(),mouse:S.mouse(),eventData:t})}f={}}}return r.throttle>0?b(r.throttle,!1,n,t):function(e){t(e),n(e)}}(),P=function(){var e,t,n,i=0,o=400;function a(o,a){var s,l=S.map();e=g.extend(!0,{},a),i+=o,void 0===n&&(t=n=l.zoom()),n+=o,l&&Math.abs(i)>=1&&r.discreteZoom&&!r.zoomAnimation.enabled&&(s=Math.round(i+l.zoom()),i=i+l.zoom()-s,l.zoom(s,e))}function s(){var o,a=S.map();a&&(r.zoomAnimation.enabled?(o=n,r.discreteZoom&&(o=Math.round(o))===t&&n!==t&&(o=t+(n>t?1:-1)),(o=Math.round(1e6*a._fix_zoom(o))/1e6)!==a.zoom()?(a.transitionCancel("debounced_zoom."+y.zoom),a.transition({zoom:o,zoomOrigin:e,duration:r.zoomAnimation.duration,ease:r.zoomAnimation.ease,done:function(e){e=e||{};var t=new RegExp("\\."+y.zoom+"$");e.next||e.cancel&&!((""+e.source).search(t)<0)||(n=void 0),r.discreteZoom&&e.cancel&&e.transition&&e.transition.end&&(""+e.source).search(t)<0&&a.zoom(e.transition.end.zoom,e.transition.end.zoomOrigin)}})):n=void 0):(o=i+a.zoom(),r.discreteZoom&&(o=Math.round(o)),a.zoom(o,e))),i=0}!0!==r.discreteZoom&&r.discreteZoom>0&&(o=r.discreteZoom);return(!0===r.discreteZoom||r.discreteZoom>0)&&!r.zoomAnimation.enabled?x(o,!1,s,a):function(e,t){(e||void 0!==n)&&(a(e,t),s())}}(),o.adjustActions(r.actions);var e={};if(["right","pan","rotate"].forEach((function(t){e[t]=r.actions.some((function(e){return e.input[t]}))})),p.on("wheel.geojs",S._handleMouseWheel),p.on("mousemove.geojs",S._handleMouseMove),p.on("mousedown.geojs",S._handleMouseDown),p.on("mouseup.geojs",S._handleMouseUp),p.on("dragstart",(function(){return!1})),e.right&&p.on("contextmenu.geojs",(function(){return!1})),r.keyboard&&r.keyboard.actions){l=a(p[0]);var t=[];for(var i in r.keyboard.actions)r.keyboard.actions.hasOwnProperty(i)&&(l.bind(r.keyboard.actions[i],function(e){return function(t,n){S._handleKeys(e,t,n)}}(i)),t=t.concat(r.keyboard.actions[i]));u=t}if(p.toggleClass("highlight-focus",!!(u&&u.length&&r.keyboard.focusHighlight)),(S.hasTouchSupport()||r.alwaysTouch)&&(e.pan||e.rotate)){var d;try{(d=n(1272))&&d.Manager||(d=void 0)}catch(e){}if(void 0!==d){var h=[],m=["hammer.input"];e.rotate&&(h.push([d.Rotate,{enable:!0}]),m=m.concat(["rotatestart","rotateend","rotatemove"])),e.pan&&(h.push([d.Pan,{direction:d.DIRECTION_ALL}]),m=m.concat(["panstart","panend","panmove"])),h.push([d.Tap,{event:"doubletap",taps:2}]),h.push([d.Tap,{event:"singletap"},void 0,["doubletap"]]),m=m.concat(["singletap"]);var _={recognizers:h,preventDefault:!0};(c={manager:new d.Manager(p[0],_),touchSupport:S.hasTouchSupport(),lastTime:0}).manager.get("doubletap").recognizeWith("singletap"),m.forEach((function(e){c.manager.on(e,S._handleTouch)}))}}return S},this._disconnectEvents=function(){return u&&(l&&l.unbind(u),u=null,l=null),c&&(c.manager.destroy(),c=null),p&&(p.off(".geojs"),p=null),S._handleMouseWheel=function(){},P=function(){},S},this.map=function(e){return void 0!==e?(r.map=e,S._connectEvents(),S):r.map},this.options=function(e){return void 0===e?g.extend({},r):(g.extend(r,e),S._connectEvents(),S)},this._getMousePosition=function(e){if(void 0!==e.pageX&&void 0!==e.pageY){var t,n,r=p.offset();t=(n=(new Date).valueOf())-s.time,s.time=n,s.deltaTime=t,s.velocity={x:(e.pageX-s.page.x)/t,y:(e.pageY-s.page.y)/t},s.page={x:e.pageX,y:e.pageY},s.map={x:e.pageX-r.left,y:e.pageY-r.top};try{s.geo=S.map().displayToGcs(s.map),s.mapgcs=S.map().displayToGcs(s.map,null)}catch(e){s.geo=s.mapgcs=null}}},this._getMouseButton=function(e){if(void 0!==e.buttons||void 0!==e.which){for(var t in s.buttons)s.buttons.hasOwnProperty(t)&&(s.buttons[t]=!1);if(void 0!==e.buttons)s.buttons.left=!!(1&e.buttons),s.buttons.right=!!(2&e.buttons),s.buttons.middle=!!(4&e.buttons);else if("mouseup"!==e.type)switch(e.which){case 1:s.buttons.left=!0;break;case 2:s.buttons.middle=!0;break;case 3:s.buttons.right=!0}!e.which||e.which>=1&&e.which<=3||(s.buttons[e.which]=!0)}},this._getMouseModifiers=function(e){s.modifiers.alt=e.altKey,s.modifiers.ctrl=e.ctrlKey,s.modifiers.meta=e.metaKey,s.modifiers.shift=e.shiftKey},this._getSelection=function(){var e=d.origin,t=S.mouse(),n=S.map(),r={},i={};return r.upperLeft={x:Math.min(e.map.x,t.map.x),y:Math.min(e.map.y,t.map.y)},r.lowerRight={x:Math.max(e.map.x,t.map.x),y:Math.max(e.map.y,t.map.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),h.data([{ul:i.upperLeft,ur:i.upperRight,ll:i.lowerLeft,lr:i.lowerRight}]),h.draw(),{display:r,gcs:i,mouse:t,origin:g.extend({},d.origin)}},this.cancel=function(e,t){var n;return(n=e?d.action===e:!!d.action)&&(t||(f={}),O()),n},this._setClickMaybe=function(e){T=e,m&&(window.clearTimeout(m),m=null)},this._handleMouseDown=function(e){var t,n;if(!(A||c&&"tap"===c.lastEventType&&(new Date).valueOf()-c.lastTime<1e3)){S._getMousePosition(e),S._getMouseButton(e),S._getMouseModifiers(e),!r.click.enabled||s.buttons.left&&!r.click.buttons.left||s.buttons.right&&!r.click.buttons.right||s.buttons.middle&&!r.click.buttons.middle||(S._setClickMaybe({x:s.page.x,y:s.page.y,buttons:g.extend({},s.buttons)}),r.click.duration>0&&(m=window.setTimeout((function(){T=!1,m=null}),r.click.duration))),t=((n=w(s.buttons,s.modifiers,r.actions))||{}).action;var i=S.map();i.transitionCancel("_handleMouseDown"+(t?"."+t:"")),S.cancel(y.momentum),s.velocity={x:0,y:0},t&&(f={kind:"move"},d={action:t,actionRecord:n,origin:g.extend(!0,{},s),initialZoom:i.zoom(),initialRotation:i.rotation(),initialEventRotation:e.rotation,delta:{x:0,y:0}},n.selectionRectangle&&(C&&(C.clear(),i.deleteLayer(C),C=null),C=i.createLayer("feature",{features:[_.capabilities.color],autoshareRenderer:!1}),(h=C.createFeature("quad",{gcs:i.gcs()})).style({opacity:.25,color:{r:.3,g:.3,b:.3}}),i.geoTrigger(v.brushstart,S._getSelection())),i.geoTrigger(v.actiondown,{state:S.state(),mouse:S.mouse(),event:e}),r.throttle>0?g(document).on("mousemove.geojs",b(r.throttle,S._handleMouseMoveDocument)):g(document).on("mousemove.geojs",S._handleMouseMoveDocument),g(document).on("mouseup.geojs",S._handleMouseUpDocument),d.boundDocumentHandlers=!0)}},this._handleMouseMove=function(e){A||d.boundDocumentHandlers||(r.click.cancelOnMove&&T&&S._setClickMaybe(!1),S._getMousePosition(e),S._getMouseButton(e),S._getMouseModifiers(e),T||S.map().geoTrigger(v.mousemove,S.mouse()))},this._handleZoomrotate=function(e){var t=Math.log2(e.scale);if(!d.zoomrotateAllowZoom&&t&&Math.abs(t)>=Math.log2(1+r.zoomrotateMinimumZoom)&&(r.zoomrotateMinimumZoom&&(d.initialZoom-=t),d.zoomrotateAllowZoom=!0),d.zoomrotateAllowZoom&&t){var n=d.initialZoom+t;S.map().zoom(n,d.origin)}var i=(e.rotation-d.initialEventRotation)*Math.PI/180;if(!d.zoomrotateAllowRotation&&i&&Math.abs(i)>=r.zoomrotateMinimumRotation&&(r.zoomrotateMinimumRotation&&(d.initialEventRotation=e.rotation,i=0),d.zoomrotateAllowRotation=!0),d.zoomrotateAllowRotation){var a=d.initialRotation+i;(i=o.wrapAngle(a-S.map().rotation()))&&(i*(d.lastRotationDelta||0)>=0||Math.abs(i)>=r.zoomrotateReverseRotation)&&(S.map().rotation(a,d.origin),d.lastRotationDelta=i)}var s=d.origin.page;if(d.initialEventGeo){var l=p.offset();(s=S.map().gcsToDisplay(d.initialEventGeo)).x+=l.left,s.y+=l.top}var u=e.pageX-s.x,c=e.pageY-s.y,f=u*u+c*c;!d.zoomrotateAllowPan&&f&&f>=r.zoomrotateMinimumPan*r.zoomrotateMinimumPan&&(r.zoomrotateMinimumPan?(u=c=0,d.initialEventGeo=S.mouse().geo):d.initialEventGeo=d.origin.geo,d.zoomrotateAllowPan=!0),d.zoomrotateAllowPan&&(u||c)&&S.map().pan({x:u,y:c})},this._handleMouseMoveDocument=function(e){var t,n,i;if(S.map()&&!A&&"move"===f.kind){if(S._getMousePosition(e),S._getMouseButton(e),S._getMouseModifiers(e),r.click.cancelOnMove)if(void 0===T.x||void 0===T.y)S._setClickMaybe(!1);else if(!0!==r.click.cancelOnMove||s.page.x===T.x&&s.page.y===T.y){Math.sqrt(Math.pow(s.page.x-T.x,2)+Math.pow(s.page.y-T.y,2))>=r.click.cancelOnMove&&S._setClickMaybe(!1)}else S._setClickMaybe(!1);if(!T)if(d.action){if(t=s.map.x-d.origin.map.x-d.delta.x,n=s.map.y-d.origin.map.y-d.delta.y,d.delta.x+=t,d.delta.y+=n,d.action===y.pan)S.map().pan({x:t,y:n},void 0,"limited");else if(d.action===y.zoom)P(-n*r.zoomScale/120,d);else if(d.action===y.rotate){var o,a;void 0===d.origin.rotation&&(o=d.origin.map.x-S.map().size().width/2,a=d.origin.map.y-S.map().size().height/2,d.origin.rotation=S.map().rotation()-Math.atan2(a,o)),o=s.map.x-S.map().size().width/2,a=s.map.y-S.map().size().height/2,S.map().rotation(d.origin.rotation+Math.atan2(a,o))}else d.action===y.zoomrotate?S._handleZoomrotate(e):d.actionRecord.selectionRectangle&&(i=S._getSelection(),S.map().geoTrigger(v.brush,i));S.map().geoTrigger(v.actionmove,{state:S.state(),mouse:S.mouse(),event:e}),e.preventDefault()}else console.log("WARNING: Invalid state in mapInteractor.")}},this._zoomFromSelection=function(e,t,n){if((e===y.zoomselect||e===y.unzoomselect)&&t.x!==n.x&&t.y!==n.y){var r,i,o=S.map(),a=o.size(),s={x:Math.abs((n.x-t.x)/a.width),y:Math.abs((n.y-t.y)/a.height)};if(e===y.zoomselect?(i=o.displayToGcs({x:(t.x+n.x)/2,y:(t.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),e===y.zoomselect)o.center(i,null);else{var l=o.gcsToDisplay(i,null);o.pan({x:(t.x+n.x)/2-l.x,y:(t.y+n.y)/2-l.y})}}},this._handleMouseUpDocument=function(e){var t,n;if(!A&&(f={},S._setClickMaybe(!1),S._getMouseButton(e),S._getMouseModifiers(e),g(document).off(".geojs"),d.boundDocumentHandlers=!1,s.buttons.right&&e.preventDefault(),d.actionRecord&&d.actionRecord.selectionRectangle&&(S._getMousePosition(e),t=S._getSelection(),C.clear(),S.map().deleteLayer(C),C=null,h=null,S.map().geoTrigger(v.brushend,t),!0!==d.actionRecord.selectionRectangle&&S.map().geoTrigger(d.actionRecord.selectionRectangle,t),S._zoomFromSelection(d.action,t.display.lowerLeft,t.display.upperRight),S.map().geoTrigger(v.actionselection,{state:S.state(),mouse:S.mouse(),event:e,lowerLeft:t.display.lowerLeft,upperRight:t.display.upperRight})),S.map().geoTrigger(v.actionup,{state:S.state(),mouse:S.mouse(),event:e}),n=d.action,O(),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,S.springBack(!0,n)}},this._handleMouseUp=function(e){A||(S._getMouseButton(e),T&&S._handleMouseClick(e))},this._handleMouseClick=function(e){d.actionRecord&&d.actionRecord.selectionRectangle&&(C.clear(),S.map().deleteLayer(C),C=null,h=null,d.action=d.actionRecord=null),S._getMouseButton(e),S._getMouseModifiers(e),S.cancel(y.pan),g(document).off(".geojs"),d.boundDocumentHandlers=!1;var t=S.mouse();t.buttonsDown=T.buttons,S._setClickMaybe(!1),S.map().geoTrigger(v.mouseclick,t)},this._handleMouseWheel=function(){},this.springBack=function(e,t){d.action!==y.momentum&&(e||(s.velocity={x:0,y:0}),d.origAction=t,d.action=y.momentum,d.origin=S.mouse(),d.momentum=S.mouse(),d.start=new Date,d.handler=function(){var e,t,n,i;if(d.action===y.momentum&&S.map()&&!S.map().transition())if(i=Math.min(d.momentum.deltaTime,30),n=d.start.valueOf(),d.start=new Date,e=M(d.momentum.velocity,d.start-n)){if((t=E(e))>r.momentum.maxSpeed&&(t=r.momentum.maxSpeed/t,e.x=e.x*t,e.y=e.y*t),isFinite(e.x)&&isFinite(e.y)||(e.x=0,e.y=0),d.momentum.velocity.x=e.x,d.momentum.velocity.y=e.y,d.origAction===y.zoom){var o=d.momentum.velocity.y*i;P(-o*r.zoomScale/120,d)}else S.map().pan({x:d.momentum.velocity.x*i,y:d.momentum.velocity.y*i},void 0,"limited");d.handler&&S.map().scheduleAnimationFrame(d.handler)}else O()},d.handler&&S.map().scheduleAnimationFrame(d.handler))},this.destroy=function(){S._disconnectEvents(),S.map()&&g(S.map().node()).removeClass("highlight-focus"),S.map(null)},this.mouse=function(){return g.extend(!0,{},s)},this.keyboard=function(e){return void 0===e?g.extend(!0,{},r.keyboard||{}):S.options({keyboard:e})},this.state=function(){return g.extend(!0,{},d)},this.pause=function(e){return void 0===e?A:(A=!!e,S)},this.addAction=function(e,t){e&&e.action&&e.input&&(o.addAction(r.actions,e,t),r.map&&r.actions.some((function(e){return e.input.right}))&&(p.off("contextmenu.geojs"),p.on("contextmenu.geojs",(function(){return!1}))))},this.hasAction=function(e,t,n){return o.hasAction(r.actions,e,t,n)},this.removeAction=function(e,t,n){var i=o.removeAction(r.actions,e,t,n);return r.map&&!r.actions.some((function(e){return e.input.right}))&&p.off("contextmenu.geojs"),i},this.simulateEvent=function(e,t){var n,r,i,o,a;if(!S.map())return S;if("keyboard"===e&&l){var s={shiftKey:t.shift||t.shiftKey||!1,ctrlKey:t.ctrl||t.ctrlKey||!1,altKey:t.alt||t.altKey||!1,metaKey:t.meta||t.metaKey||!1,toString:function(){return t.keys},stopPropagation:function(){},preventDefault:function(){},simulated:!0};l.trigger(s)}else r=t.page||{},t.map&&(i=p.offset(),r.x=t.map.x+i.left,r.y=t.map.y+i.top),"left"===t.button?(o=1,a=1):"right"===t.button?(o=3,a=2):"middle"===t.button&&(o=2,a=4),t.modifiers=t.modifiers||[],t.wheelDelta=t.wheelDelta||{},n=g.Event(e,{pageX:r.x,pageY:r.y,which:o,buttons:a,altKey:t.modifiers.indexOf("alt")>=0,ctrlKey:t.modifiers.indexOf("ctrl")>=0,metaKey:t.modifiers.indexOf("meta")>=0,shiftKey:t.modifiers.indexOf("shift")>=0,center:t.center,rotation:t.touch?t.rotation||0:t.rotation,scale:t.touch?t.scale||1:t.scale,pointers:t.pointers,pointerType:t.pointerType,originalEvent:{deltaX:t.wheelDelta.x,deltaY:t.wheelDelta.y,deltaMode:t.wheelMode,preventDefault:function(){},stopPropagation:function(){},stopImmediatePropagation:function(){}}}),t.touch&&c?S._handleTouch(n):p.trigger(n),e.indexOf(".geojs")>=0&&g(document).trigger(n)},this._connectEvents(),this};r(s,i),e.exports=s},7098:function(e,t,n){var r=n(5699),i=n(6837),o=n(2557),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(5638),i=n(6618),a=n(4634),s=n(8173),l=this,u=this._init,c=null,d=i(),f=0,p=0,h=0;return this.featureType="marker",this._updateRangeTree=function(){if(!(d.timestamp()>=l.dataTime().timestamp()&&d.timestamp()>=l.timestamp())){var t,n,r=l.style.get("radius"),i=l.style.get("strokeWidth"),o=l.style.get("strokeOffset"),a=l.style.get("scaleWithZoom");n=l.position(),f=0,p=0,h=0,t=l.data().map((function(t,s){var l=n(t,s),u=a(t,s),c=r(t,s),d=i(t,s),m=Math.sign(o(t,s)),g=c+d*(m+1)/2,v=c+d*(m-1)/2;switch(u=e.scaleMode[u]||(u>=1&&u<=3?u:0)){case e.scaleMode.stroke:v>f&&(f=v),d>h&&(h=d);break;case e.scaleMode.fill:case e.scaleMode.all:g>p&&(p=g);break;default:g>f&&(f=g)}return[l.x,l.y]})),c=new s(t),d.modified()}},this._approximateMaxRadius=function(e){l._updateRangeTree();var t=Math.pow(2,e);return Math.max(f+h*t,p*t)},this.pointSearch=function(t,n){var r,i,o,a,s=[],u=[],d=[],f=l.gcs(),p=l.style.get("radius"),h=l.style.get("strokeWidth"),m=l.style.get("strokeOffset"),g=l.style.get("scaleWithZoom");if(!(o=l.data())||!o.length)return{found:[],index:[]};l._updateRangeTree();var v=l.layer().map();n=null===n?v.gcs():void 0===n?v.ingcs():n;var y=v.gcsToDisplay(t,n),b=v.zoom(),x=Math.pow(2,b),w=this._approximateMaxRadius(b);return a=[v.displayToGcs({x:y.x-w,y:y.y-w},f),v.displayToGcs({x:y.x+w,y:y.y-w},f),v.displayToGcs({x:y.x-w,y:y.y+w},f),v.displayToGcs({x:y.x+w,y:y.y+w},f)],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=c.range(r.x,r.y,i.x,i.y)).sort((function(e,t){return e-t})),s.forEach((function(t){var n=o[t],r=p(o[t],t),i=g(o[t],t),a=m(o[t],t),s=i?h(o[t],t):0,c=r+s*(a-1)/2;r=c+s;var b,w,_,S=l.position()(n,t);switch(i=e.scaleMode[i]||(i>=1&&i<=3?i:0)){case e.scaleMode.fill:r=c*x+s;break;case e.scaleMode.stroke:r=c+s*x;break;case e.scaleMode.all:r*=x}r&&(_=r*r,(b=(S=v.gcsToDisplay(S,f)).x-y.x)*b+(w=S.y-y.y)*w<=_&&(u.push(n),d.push(t)))})),{found:u,index:d}},this.polygonSearch=function(t,n,r){var i,o,s,u,d=l.gcs(),f=[],p=[],h={},m=l.layer().map(),g=l.data(),v=l.style.get("radius"),y=l.style.get("strokeWidth"),b=l.style.get("strokeOffset"),x=l.style.get("scaleWithZoom"),w=m.zoom(),_=Math.pow(2,w),S=this._approximateMaxRadius(w);return r=null===r?m.gcs():void 0===r?m.ingcs():r,t.outer||(t={outer:t,inner:[]}),t.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((n=n||{}).partial=n.partial||!1,(t={outer:m.gcsToDisplay(t.outer,r),inner:(t.inner||[]).map((function(e){return m.gcsToDisplay(e,r)}))}).outer.forEach((function(e){o||(o={x:e.x,y:e.y},s={x:e.x,y:e.y}),e.x<o.x&&(o.x=e.x),e.x>s.x&&(s.x=e.x),e.y<o.y&&(o.y=e.y),e.y>s.y&&(s.y=e.y)})),l._updateRangeTree(),u=[m.displayToGcs({x:o.x-S,y:o.y-S},d),m.displayToGcs({x:s.x+S,y:o.y-S},d),m.displayToGcs({x:s.x+S,y:s.y+S},d),m.displayToGcs({x:o.x-S,y:s.y+S},d)],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)},s={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=c.range(o.x,o.y,s.x,s.y)).sort((function(e,t){return e-t})),i.forEach((function(r){var i=g[r],o=l.position()(i,r),s=v(g[r],r),u=x(g[r],r),c=b(g[r],r),w=u?y(g[r],r):0,S=s+w*(c-1)/2;switch(s=S+w,u=e.scaleMode[u]||(u>=1&&u<=3?u:0)){case e.scaleMode.fill:s=S*_+w;break;case e.scaleMode.stroke:s=S+w*_;break;case e.scaleMode.all:s*=_}if(s){o=m.gcsToDisplay(o,d);var C=a.distanceToPolygon2d(o,t);(C>=s||C>=0&&"center"===n.partial||C>=-s&&n.partial&&"center"!==n.partial)&&(f.push(i),p.push(r),h[r]={partial:C<s,distance:C})}})),{found:f,index:p,extra:h})},this._init=function(t){return t=r.extend(!0,{},{style:r.extend({},{radius:6.25,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:e.scaleMode.none,rotateWithMap:!1},t&&void 0===t.style?{}:t.style)},t),u.call(l,t),l},l};a.create=function(e,t){"use strict";return(t=t||{}).type="marker",i.create(e,t)},a.capabilities={feature:"marker"},a.primitiveShapes=o.primitiveShapes,a.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(e){for(var t=2;t<=a.symbols[e+"Max"];t+=1)a.symbols[e+t]=a.symbols[e+"Base"]-2+t})),a.scaleMode={none:0,fill:1,stroke:2,all:3},r(a,o),e.exports=a},9146:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),o=n(4634);t=t||{},i.call(this,t);var a=this,s=this._init,l={};return this.featureType="mesh",this.mesh=function(e,t){if(void 0===e)return l;if("string"==typeof e&&void 0===t)return l[e];if(void 0===t){var n=r.extend({},{gridWidth:function(){return e.gridHeight?Math.floor(a.data().length/e.gridHeight):Math.floor(Math.sqrt(a.data().length))},gridHeight:function(){return e.gridWidth?Math.floor(a.data().length/e.gridWidth):Math.floor(Math.sqrt(a.data().length))}},l,e);l=n}else l[e]=t;return a.modified(),a},this.mesh.get=function(e){if(void 0===e){var t,n={};for(t in l)l.hasOwnProperty(t)&&(n[t]=a.mesh.get(t));return n}return o.ensureFunction(l[e])},this.position=function(e){return void 0===e?a.style("position"):(a.style("position",e),a.dataTime().modified(),a.modified(),a)},this._createMesh=function(e,t){e=e||{},t=t||{};var n,r,i,o,s,l,u,c,d,f,p,h,m,g,v,y,b=a.data(),x=a.position(),w=a.mesh.get("elements")(b),_=a.mesh.get("elementPacking")(b),S=a.mesh.get("gridWidth")(b),C=a.mesh.get("gridHeight")(b),A=a.mesh.get("wrapLongitude")(b),T=a.mesh.get("x0")(b),P=a.mesh.get("y0")(b),E=a.mesh.get("dx")(b),O=a.mesh.get("dy")(b),M=S,D={shape:"square",elements:[],elementIndex:[]};if(w){var k=w.length&&Array.isArray(w[0]);if("square"===_||"triangle"!==_&&(!k&&!(w.length%4)&&w.length%3||k&&4===w[0].length))if(D.shape="square",k)for(n=0;n<w.length;n+=1)D.elements.push(w[n][0]),D.elements.push(w[n][1]),D.elements.push(w[n][3]),D.elements.push(w[n][2]),D.elements.push(w[n][3]),D.elements.push(w[n][1]),D.elementIndex.push(n),D.elementIndex.push(n);else for(n=i=0;n<w.length-3;n+=4,i+=1)D.elements.push(w[n]),D.elements.push(w[n+1]),D.elements.push(w[n+3]),D.elements.push(w[n+2]),D.elements.push(w[n+3]),D.elements.push(w[n+1]),D.elementIndex.push(i),D.elementIndex.push(i);else if(D.shape="triangle",k)for(n=0;n<w.length;n+=1)D.elements.push(w[n][0]),D.elements.push(w[n][1]),D.elements.push(w[n][2]),D.elementIndex.push(n);else for(D.elements=w.slice(0,w.length-w.length%3),n=i=0;n<w.length-2;n+=3,i+=1)D.elementIndex.push(i);l=b.length,c=!0}else{if(Object.keys(e).length?S*C>b.length&&(C=Math.floor(b.length/S)):Object.keys(t).length&&(S-1)*(C-1)>b.length&&(C=Math.floor(b.length/(S-1))+1),A=!(void 0!==A&&!A),!(c=null==T||null==P||!E||!O)&&A&&(T<-180||T>180||T+E*(S-1)<-180||T+E*(S-1)>180)&&E>-180&&E<180&&E*(S-1)<360.0001){for(h=[],m=[],n=0;n<S;n+=1){for(v=T+n*E;v<-180;)v+=360;for(;v>180;)v-=360;n&&Math.abs(v-h[h.length-1])>180&&(v>h[h.length-1]?(h.push(v-360),h.push(h[h.length-2]+360),m.push(n),m.push(n+1)):(h.push(v+360),h.push(h[h.length-2]-360),m.push(n),m.push(n+1)),g=n),h.push(v),m.push(n)}if(S+=2,Math.abs(Math.abs(M*E)-360)<.01){for(S+=1,v=T+M*E;v<-180;)v+=360;for(;v>180;)v-=360;h.push(v),m.push(0)}}if(l=S*C,void 0!==g)for(D.index=new Array(l),n=0;n<l;n+=1)y=n-(i=Math.floor(n/S))*S,(y+=y>g?-2:0)>=M&&(y-=M),y+=i*M,D.index[n]=y;for(i=s=0;i<C-1;i+=1,s+=1)for(n=0;n<S-1;n+=1,s+=1)n!==g&&(D.elements.push(s),D.elements.push(s+1),D.elements.push(s+S),D.elements.push(s+S+1),D.elements.push(s+S),D.elements.push(s+1),D.elementIndex.push(i*(S-1)+(m?m[n]:n)),D.elementIndex.push(i*(S-1)+(m?m[n]:n)))}D.verticesPerElement="triangle"===D.shape?3:6;var I=D.verticesPerElement;if(t.used){var R=new Array(D.elementIndex[D.elementIndex.length-1]+1);for(n=0;n<R.length;n+=1)R[n]=t.used(b[n],n);for(n=0;n<D.elementIndex.length&&R[D.elementIndex[n]];n+=1);if(n<D.elementIndex.length){for(i=n;n<D.elementIndex.length;n+=1)if(R[D.elementIndex[n]]){for(D.elementIndex[i]=D.elementIndex[n],o=0;o<3;o+=1)D.elements[3*i+o]=D.elements[3*n+o];i+=1}D.elements.splice(3*i),D.elementIndex.splice(i)}}if(e.used){for(n=0;n<l&&(s=D.index?D.index[n]:n,e.used(b[s],s));n+=1);if(n!==l){u=n;var N=new Array(l);for(i=0;i<u;i+=1)N[i]=i;if(N[u]=-1,!D.index)for(D.index=new Array(b.length),i=0;i<b.length;i+=1)D.index[i]=i;for(n=u+1;n<l;n+=1)s=D.index[n],e.used(b[s],s)?(N[n]=u,D.index[u]=D.index[n],u+=1):N[n]=-1;for(D.index.splice(u),n=o=0;n<D.elements.length;n+=I){for(i=0;i<I&&!(N[D.elements[n+i]]<0);i+=1)D.elements[o+i]=N[D.elements[n+i]];i===I&&(D.elementIndex[Math.floor(o/3)]=D.elementIndex[Math.floor(n/3)],6===I&&(D.elementIndex[Math.floor(o/3)+1]=D.elementIndex[Math.floor(n/3)+1]),o+=I)}D.elements.splice(o),D.elementIndex.splice(Math.floor(o/3)),l=u}}if(t.used&&void 0===g){var F=new Array(l),L=D.index;for(D.index=[],n=0;n<D.elements.length;n+=1)void 0===F[o=D.elements[n]]&&(F[o]=D.index.length,D.index.push(L?L[o]:o)),D.elements[n]=F[o];l=D.index.length}for(f in D.pos=new Array(3*l),e)"used"!==f&&e.hasOwnProperty(f)&&(D[f]=new Array(l));for(n=r=0;n<l;n+=1,r+=3)for(f in d=b[s=D.index?D.index[n]:n],c?(p=x(d,s),D.pos[r]=p.x,D.pos[r+1]=p.y,D.pos[r+2]=p.z||0):(D.pos[r]=void 0===g?T+E*(s%S):h[n%S],D.pos[r+1]=P+O*Math.floor(s/S),D.pos[r+2]=0,p={x:D.pos[r],y:D.pos[r+1],z:D.pos[r+2]}),e)"used"!==f&&e.hasOwnProperty(f)&&(D[f][n]=e[f](d,s,p));for(f in t)if("used"!==f&&t.hasOwnProperty(f)){var B=t[f];for(D[f]=new Array(D.elementIndex.length),n=0;n<D.elementIndex.length;n+=1)d=b[s=D.elementIndex[n]],D[f][n]=B(d,s)}return D.numVertices=l,D.numElements=D.elements.length/D.verticesPerElement,D},this._init=function(e){s.call(a,e),e=e||{};var t=r.extend({},{position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e}},e.style||{});a.mesh(e.mesh||{}),a.style(t)},this};r(o,i),e.exports=o},3737:function(e,t,n){var r=n(5699),i=n(6618),o=0,a=function e(){"use strict";if(!(this instanceof e))return new e;var t=n(4634),r=this,a=++o,s={},l=[],u=0;return this.onIdle=function(e){return u?l.push(e):e(),r},Object.defineProperty(this,"idle",{get:function(){return!u},configurable:!0}),Object.defineProperty(this,"_promises",{get:function(){return u},configurable:!0}),this.addPromise=function(e){function t(){e._geojsTracked&&e._geojsTracked[a]&&(u-=1,delete e._geojsTracked[a]),u||l.splice(0,l.length).forEach((function(e){e()}))}return e._geojsTracked||(e._geojsTracked={}),e._geojsTracked[a]||(e._geojsTracked[a]=!0,u+=1),e.always?e.always(t):e.then(t,t),r},this.removePromise=function(e){return e._geojsTracked&&e._geojsTracked[a]&&(u-=1,delete e._geojsTracked[a],u||l.splice(0,l.length).forEach((function(e){e()}))),r},this.geoOn=function(e,n){return Array.isArray(e)?(e.forEach((function(e){r.geoOn(e,n)})),r):t.isFunction(n)?(s.hasOwnProperty(e)||(s[e]=[]),s[e].push(n),r):(console.warn("Handler for "+e+" is not a function",n,r),r)},this.geoOnce=function(e,t){var n=function n(i){r.geoOff(e,n),t.call(r,i)};return r.geoOn(e,n),n},this.geoIsOn=function(e,t){return Array.isArray(e)?e.some((function(e){return r.geoIsOn(e,t)})):(s[e]||[]).some((function(e){return e===t||void 0===t}))},this.geoTrigger=function(e,t){return Array.isArray(e)?(e.forEach((function(e){r.geoTrigger(e,t)})),r):((t=t||{}).event=e,s.hasOwnProperty(e)&&s[e].forEach((function(n){try{n.call(r,t)}catch(t){console.warn("Event handler for "+e+" threw an error",t)}})),r)},this.geoOff=function(e,t){if(void 0===e&&(s={},l=[],u=0,a=++o),Array.isArray(e))return e.forEach((function(e){r.geoOff(e,t)})),r;if(t){if(Array.isArray(t))return t.forEach((function(t){r.geoOff(e,t)})),r}else s[e]=[];return s.hasOwnProperty(e)&&(s[e]=s[e].filter((function(e){return e!==t}))),r},this._exit=function(){r.geoOff()},i.call(this),this.modified(),this};r(a,i),e.exports=a},8622:function(e,t,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),l=function e(t){var i=n(4665);if(!(this instanceof e))return new e(t);void 0!==(t=t||{}).mapOpacity&&void 0===t.opacity&&((t=r.extend({},t)).opacity=t.mapOpacity),t=r.extend(!0,{},this.constructor.defaults,e.tileSources[this.constructor.defaults.source]||{},e.tileSources[t.source]||{},{name:""},t),o.call(this,t);var a=this;this.mapOpacity=this.opacity,this._getTile=function(e,t){var n=t||e;return i({index:e,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(t){if(void 0!==t)return e.tileSources[t]&&(a.url(e.tileSources[t].url),a.subdomains(e.tileSources[t].subdomains||"abc"),a.attribution(e.tileSources[t].attribution||""),a._options.maxLevel=e.tileSources[t].maxLevel||18,a._options.minLevel=e.tileSources[t].minLevel||0),a;for(var n in e.tileSources)if(e.tileSources[n].url===a.url())return n}};l.defaults=r.extend({},o.defaults,{tileOffset:function(e){var t=256*Math.pow(2,e-1);return{x:t,y:t}},url:"",source:"stamen-toner-lite"});var u='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>';l.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-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},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:u,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:u,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:u,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:u,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-layers":{url:"https://{s}.basemaps.cartocdn.com/rastertiles/voyager_nolabels/{z}/{x}/{y}.png",attribution:c,name:"Carto Voyager Without Layers",minLevel:0,maxLevel:18}},i(l,o),a.registerLayer("osm",l,[s.capabilities.image]),e.exports=l},6565:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n=this,i=this._init;return this.featureType="path",this.position=function(e){return void 0===e?n.style("position"):(e!==n.style("position")&&(n.style("position",e),n.dataTime().modified(),n.modified()),n)},this._init=function(e){i.call(n,e);var t=r.extend({},{strokeWidth:1,strokeColor:{r:1,g:1,b:1},position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e}},void 0===e.style?{}:e.style);return void 0!==e.position&&(t.position=e.position),n.style(t),t.position&&n.position(t.position),n.dataTime().modified(),n},this._init(t),this};i(a,o),e.exports=a},6374:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=n(4634),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n,i=this,s=this._update,l=this._init;return this.featureType="pixelmap",this.position=function(e){return void 0===e?i.style("position"):(e!==i.style("position")&&(i.style("position",e),i.dataTime().modified(),i.modified()),i)},this.url=function(e){return void 0===e?i.style("url"):(e!==i.style("url")&&(i.m_srcImage=i.m_info=void 0,i.style("url",e),i.dataTime().modified(),i.modified()),i)},this.color=function(e){return void 0===e?i.style("color"):(e!==i.style("color")&&(i.style("color",e),i.dataTime().modified(),i.modified()),i)},this.indexModified=function(e,t){if(void 0===e){var r=n;return"clear"===t&&(n=void 0),r}return i.modified(),void 0===n&&(n=[e,e]),e<n[0]&&(n[0]=e),(t||e)>n[1]&&(n[1]=t||e),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 e in i.m_info.maxIndex=0,i.m_info.mappedColors)i.m_info.mappedColors.hasOwnProperty(e)&&(i.m_info.maxIndex=Math.max(i.m_info.maxIndex,e));return i.m_info.maxIndex}},this._computePixelmap=function(){},this._build=function(){if(i.m_srcImage)i.m_info&&i._computePixelmap();else{var e=i.style.get("url")();if(a.isReadyImage(e))i.m_srcImage=e,i._computePixelmap();else if(e){var t,n,o=r.Deferred();e instanceof Image?(i.m_srcImage=e,t=e.onload,n=e.onerror):(i.m_srcImage=new Image,e.indexOf(":")>=0&&e.indexOf("/")===e.indexOf(":")+1&&(i.m_srcImage.crossOrigin=i.style.get("crossDomain")()||"anonymous")),i.m_srcImage.onload=function(){t&&t.apply(i,arguments),i.style.get("url")()===e&&(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),e instanceof Image||(i.m_srcImage.src=e)}}return i.buildTime().modified(),i},this._init=function(e){e=e||{},l.call(i,e);var t=r.extend({},{color:function(e,t){return{r:(255&t)/255,g:(t>>8&255)/255,b:(t>>16&255)/255,a:1}},position:function(e){return e}},void 0===e.style?{}:e.style);return void 0!==e.position&&(t.position=e.position),void 0!==e.url&&(t.url=e.url),void 0!==e.color&&(t.color=e.color),i.style(t),i.dataTime().modified(),e.quadFeature&&(i.m_srcImage=!0,i._computePixelmap()),i},this};s.create=function(e,t){"use strict";return(t=t||{}).type="pixelmap",o.create(e,t)},s.capabilities={feature:"pixelmap",lookup:"pixelmap.lookup"},i(s,o),e.exports=s},809:function(e,t,n){var r=n(5638),i=n(5699),o=n(1940),a=n(4647),s=n(5017),l=n(6374),u=function e(t){var i=n(4665);if(!(this instanceof e))return new e(t);t=t||{},t=r.extend(!0,{},this.constructor.defaults,t),o.call(this,t);var a,s=this._init,l=this;return this._getTile=function(e,t){var n=t||e;return i({index:e,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(){s.apply(l,arguments);var e={quadFeature:l.features()[0]};t.style&&(e.style=t.style),t.color&&(e.color=t.color),a=l.createFeature("pixelmap",e),t.data&&a.data(t.data),l.style=a.style,l.data=a.data,l.indexModified=a.indexModified;var n=l.dataTime().modified;return l.dataTime().modified=function(){return a.dataTime().modified(),n()},["modified","geoOn","geoOff","geoOnce"].forEach((function(e){var t=l[e];l[e]=function(){return a[e].apply(this,arguments),t.apply(this,arguments)}})),l},l};u.defaults=r.extend({},o.defaults,{features:[s.capabilities.image,l.capabilities.lookup],tileOffset:function(e){var t=256*Math.pow(2,e-1);return{x:t,y:t}},url:""}),i(u,o),a.registerLayer("pixelmap",u,[s.capabilities.image]),e.exports=u},2557:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=n(6618),a=n(9808),s=n(5108),l=n(4634),u=n(8173),c=this,d=this._init,f=null,p=o(),h=this.data,m=0,g=t.clustering,v=null,y=[],b=null,x=!1;return this.featureType="point",this.clustering=function(e){return void 0===e?g:(g&&!e?(v=null,g=!1,h(y)):e&&g!==e&&(g=e,c._clusterData()),c)},this._clusterData=function(){if(g){var e=!0===g?{radius:10}:g,t=c.position(),n=c.layer().map(),i=n.gcsToDisplay(n.center(void 0,null),null),o=n.displayToGcs(i,c.gcs()),s=n.displayToGcs({x:i.x+e.radius,y:i.y},c.gcs()),u=Math.pow(Math.pow(s.y-o.y,2)+Math.pow(s.x-o.x,2),.5),d=n.zoom(),f=u*Math.pow(2,d);e=r.extend({},e,{radius:f}),v=new a(e),y.forEach((function(e,n){var r=l.normalizeCoordinates(t(e,n));r.index=n,v.addPoint(r)})),b=null,c._handleZoom(n.zoom())}},this._handleZoom=function(e){var t=Math.floor(e);if(g&&t!==b){b=t;var n=v.points(t).map((function(e){return y[e.index]}));v.clusters(t).forEach((function(e){e.__cluster=!0,e.__data=[],e.obj.each((function(t){e.__data.push(y[t.index])})),n.push(e)})),x=!0,c.data(n)}},this.position=function(e){if(void 0===e)return c.style("position");var t=l.isFunction(e);return c.style("position",(function(n,r){return null!=n&&n.__cluster?n:t?e(n,r):e})),c.dataTime().modified(),c.modified(),c},this._updateRangeTree=function(){if(!(p.timestamp()>=c.dataTime().timestamp()&&p.timestamp()>=c.timestamp())){var e,t,n=c.style.get("radius"),r=c.style.get("stroke"),i=c.style.get("strokeWidth");t=c.position(),m=0,e=c.data().map((function(e,o){var a=t(e,o);return m=Math.max(m,n(e,o)+(r(e,o)?i(e,o):0)),[a.x,a.y]})),f=new u(e),p.modified()}},this.pointSearch=function(e,t){var n,r,i,o,a,s,l=[],u=[],d=[],p=c.gcs(),h=c.style.get("fill"),g=c.style.get("stroke"),v=c.style.get("strokeWidth"),y=c.style.get("radius");return(i=c.data())&&i.length?(c._updateRangeTree(),o=c.layer().map(),a=o.gcsToDisplay(e,t),s=[o.displayToGcs({x:a.x-m,y:a.y-m},p),o.displayToGcs({x:a.x+m,y:a.y-m},p),o.displayToGcs({x:a.x-m,y:a.y+m},p),o.displayToGcs({x:a.x+m,y:a.y+m},p)],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)},(l=f.range(n.x,n.y,r.x,r.y)).sort((function(e,t){return e-t})),l.forEach((function(e){var t=i[e],n=g(i[e],e);if(n||h(i[e],e)){var r,s,l,f,m=c.position()(t,e);l=y(i[e],e),(l+=n?v(i[e],e):0)&&(f=l*l,(r=(m=o.gcsToDisplay(m,p)).x-a.x)*r+(s=m.y-a.y)*s<=f&&(u.push(t),d.push(e)))}})),{found:u,index:d}):{found:[],index:[]}},this.polygonSearch=function(e,t,n){var r,i,o,a,s=c.gcs(),u=[],d=[],p={},h=c.layer().map(),g=c.data(),v=c.style.get("fill"),y=c.style.get("stroke"),b=c.style.get("strokeWidth"),x=c.style.get("radius");return e.outer||(e={outer:e,inner:[]}),e.outer.length<3||!g||!g.length?{found:[],index:[],extra:{}}:((t=t||{}).partial=t.partial||!1,(e={outer:h.gcsToDisplay(e.outer,n),inner:(e.inner||[]).map((function(e){return h.gcsToDisplay(e,n)}))}).outer.forEach((function(e){i||(i={x:e.x,y:e.y},o={x:e.x,y:e.y}),e.x<i.x&&(i.x=e.x),e.x>o.x&&(o.x=e.x),e.y<i.y&&(i.y=e.y),e.y>o.y&&(o.y=e.y)})),c._updateRangeTree(),a=[h.displayToGcs({x:i.x-m,y:i.y-m},s),h.displayToGcs({x:o.x+m,y:i.y-m},s),h.displayToGcs({x:o.x+m,y:o.y+m},s),h.displayToGcs({x:i.x-m,y:o.y+m},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=f.range(i.x,i.y,o.x,o.y)).sort((function(e,t){return e-t})),r.forEach((function(n){var r=g[n],i=y(g[n],n);if(i||v(g[n],n)){var o=c.position()(r,n),a=x(g[n],n);if(a+=i?b(g[n],n):0){o=h.gcsToDisplay(o,s);var f=l.distanceToPolygon2d(o,e);(f>=a||f>=0&&"center"===t.partial||f>=-a&&t.partial&&"center"!==t.partial)&&(u.push(r),d.push(n),p[n]={partial:f<a,distance:f})}}})),{found:u,index:d,extra:p})},this.data=function(e){return void 0===e?h():(x||(y=e),g&&!x?c._clusterData():h(e),x=!1,c)},this._init=function(e){e=e||{},d.call(c,e);var t=r.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(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},origin:function(e){return e.length>=3?e.slice(0,3):[0,0,0]}},void 0===e.style?{}:e.style);return void 0!==e.position&&(t.position=e.position),c.style(t),t.position&&c.position(t.position),c.dataTime().modified(),c.geoOn(s.zoom,(function(e){c._handleZoom(e.zoomLevel)})),c},c};o.create=function(e,t){"use strict";return(t=t||{}).type="point",i.create(e,t)},o.capabilities={feature:"point",stroke:"point.stroke"},o.primitiveShapes={auto:"auto",sprite:"sprite",triangle:"triangle",square:"square"},r(o,i),e.exports=o},4343:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=n(6853),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var i,s=n(4634),l=this,u=this._init,c=this._exit,d=this.data,f=this.draw,p=this.modified,h=this.style,m=[];function g(e,t,n){var r=l.gcs(),i=l.layer().map().gcs();return e=e||l.data(),t=t||l.style.get("position"),n=n||l.style.get("polygon"),e.map((function(e,o){var s=n(e,o);if(s){var u,c,d,f,p,h,m,g,v,y;for(f=s.outer||(Array.isArray(s)?s:[]),u=new Array(f.length),p=0;p<f.length;p+=1)u[p]=t.call(l,f[p],p,e,o),h=u[p].x,m=u[p].y,p?(h<d.min.x&&(d.min.x=h),m<d.min.y&&(d.min.y=m),h>d.max.x&&(d.max.x=h),m>d.max.y&&(d.max.y=m)):d={min:{x:h,y:m},max:{x:h,y:m}};for(c=(s.inner||[]).map((function(n){f=n||[];var r=new Array(f.length);for(p=0;p<f.length;p+=1)r[p]=t.call(l,f[p],p,e,o);return r})),g=a.transformCoordinates(r,i,u),v=c.map((function(e){return a.transformCoordinates(r,i,e)})),p=0;p<g.length;p+=1)h=g[p].x,m=g[p].y,p?(h<y.min.x&&(y.min.x=h),m<y.min.y&&(y.min.y=m),h>y.max.x&&(y.max.x=h),m>y.max.y&&(y.max.y=m)):y={min:{x:h,y:m},max:{x:h,y:m}};return{outer:u,inner:c,range:d,mapouter:g,mapinner:v,maprange:y}}}))}function v(e){return s.isFunction(e)?function(t){return e(t[0],t[1],t[2],t[3])}:e}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(e){var t=d(e);return void 0!==e&&(m=g(),l._checkForStroke()),t},this.polygonCoordinates=function(){return m},this.polygon=function(e){return void 0===e?l.style("polygon"):(l.style("polygon",e),l.dataTime().modified(),l.modified(),m=g(),l)},this.position=function(e){return void 0===e?l.style("position"):(l.style("position",e),l.dataTime().modified(),l.modified(),m=g(),l)},this.pointSearch=function(e,t){var n=[],r=[],o={},u=l.data(),c=l.layer().map();t=null===t?c.gcs():void 0===t?c.ingcs():t;var d=a.transformCoordinates(t,c.gcs(),e);(m.forEach((function(e,t){s.pointInPolygon(d,e.mapouter,e.mapinner,e.maprange)&&(r.push(t),o[t]=!0,n.push(u[t]))})),i)&&i.pointSearch(e).found.forEach((function(e){e.length&&4===e[0].length&&!o[e[0][3]]&&(r.push(e[0][3]),o[e[0][3]]=!0,n.push(u[e[0][3]]))}));return{index:r,found:n}},this.polygonSearch=function(e,t,n){var r,o,u=l.data(),c=[],d=[],f={},p=e,h={},g=l.layer().map();if(n=null===n?g.gcs():void 0===n?g.ingcs():n,e.outer||(e={outer:e,inner:[]}),!u||!u.length||e.outer.length<3)return{found:d,index:c,extra:f};if((t=t||{}).partial=t.partial||!1,(e={outer:a.transformCoordinates(n,g.gcs(),e.outer),inner:(e.inner||[]).map((function(e){return a.transformCoordinates(n,g.gcs(),e)}))}).outer.forEach((function(e){r||(r={x:e.x,y:e.y},o={x:e.x,y:e.y}),e.x<r.x&&(r.x=e.x),e.x>o.x&&(o.x=e.x),e.y<r.y&&(r.y=e.y),e.y>o.y&&(o.y=e.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,l,p=-1;p<n.mapinner.length&&!l;p+=1)for(var m=p<0?n.mapouter:n.mapinner[p],g=0,v=m.length,y=v-1;g<v;y=g,g+=1){var b=s.distanceToPolygon2d(m[g],e);if(b*s.distanceToPolygon2d(m[y],e)<0){l=!0;break}if(s.crossedLineSegmentPolygon2d(m[g],m[y],e)){l=!0;break}b>0&&(a=!0)}a||l||!s.pointInPolygon(e.outer[0],n.mapouter,n.mapinner,n.maprange)||(l=!0),(!t.partial&&a&&!l||t.partial&&(a||l))&&(c.push(i),d.push(u[i]),f[i]={partial:l},h[i]=!0)}})),i){var v=i.polygonSearch(p,t);v.found.forEach((function(e,t){e.length&&4===e[0].length&&(h[e[0][3]]||(c.push(e[0][3]),h[e[0][3]]=!0,d.push(u[e[0][3]]),f[v.index[t]]={partial:!1}),v.extra[v.index[t]].partial&&(f[e[0][3]].partial=!0))}))}return{found:d,index:c,extra:f}},this.style=function(e,t){var n=h.apply(l,arguments);return void 0===e||"string"==typeof e&&void 0===t||l._checkForStroke(),n},this.style.get=h.get,this._getLoopData=function(e,t,n){var r,i=[];for(r=0;r<n.length;r+=1)i.push([n[r],r,e,t]);return i},this._checkForStroke=function(){if(!1!==h("stroke")){if(l.layer()){i||(i=l.layer().createFeature("line",{selectionAPI:!1,gcs:l.gcs(),visible:l.visible(void 0,!0)}),l.dependentFeatures([i]));var e,t=l.style();if(s.isFunction(t.stroke)||!t.stroke){var n=l.style.get("stroke"),r=l.style.get("strokeOpacity");e=function(e){return n(e[2],e[3])?r(e[0],e[1],e[2],e[3]):0}}else e=v(t.strokeOpacity);i.style({antialiasing:v(t.antialiasing),closed:!0,lineCap:v(t.lineCap),lineJoin:v(t.lineJoin),miterLimit:v(t.miterLimit),strokeWidth:v(t.strokeWidth),strokeStyle:v(t.strokeStyle),strokeColor:v(t.strokeColor),strokeOffset:v(t.strokeOffset),strokeOpacity:e});var o=l.data(),a=l.style("position");if(o!==i._lastData||a!==i._lastPosVal){var u,c,d,f=[],p=l.style.get("position"),m=l.style.get("polygon");for(u=0;u<o.length;u+=1)(c=m(o[u],u))&&(d=c.outer||(Array.isArray(c)?c:[])).length>=2&&(f.push(l._getLoopData(o[u],u,d)),c.inner&&c.inner.forEach((function(e){e.length>=2&&f.push(l._getLoopData(o[u],u,e))})));i.position((function(e,t,n,r){return p(e[0],e[1],e[2],e[3])})),i.data(f),i._lastData=o,i._lastPosVal=a}}}else i&&l.layer()&&(l.layer().deleteFeature(i),i=null,l.dependentFeatures([]))},this.draw=function(){var e=f();return i&&i.draw(),e},this.modified=function(){var e=p();return i&&i.modified(),e},this.rdpSimplifyData=function(e,t,n,r){var i=l.layer().map(),o=i.gcs(),u=l.gcs(),c=g(e,n,r);return void 0===t&&(t=.5*i.unitsPerPixel(i.zoom())),c=c.map((function(e){return{outer:a.transformCoordinates(u,o,e.outer),inner:e.inner.map((function(e){return a.transformCoordinates(u,o,e)}))}})),e=e.map((function(e,n){var r=c[n],i={};for(var l in e)!e.hasOwnProperty(l)||Array.isArray(e)&&l>=0&&l<e.length||(i[l]=e[l]);if(r&&r.outer.length>=3)if(i.inner=r.inner.filter((function(e){return e.length>=3})),i.outer=s.rdpLineSimplify(r.outer,t,!0,i.inner),i.outer.length>=3){var d=i.inner.slice();i.inner.map((function(e,n){d[n]=i.outer;var r=s.rdpLineSimplify(e,t,!0,d);return d[n]=r,r})).filter((function(e){return e.length>=3})),i.outer=a.transformCoordinates(o,u,i.outer),i.inner=i.inner.map((function(e){return a.transformCoordinates(o,u,e)}))}else i.outer=i.inner=[];else i.outer=[];return i})),l.style("position",(function(e){return e})),l.style("polygon",(function(e){return e})),l.data(e),l},this.mouseOverOrderClosestBorder=function(e){var t=e.feature.data(),n=e.feature.layer().map(),r=a.transformCoordinates(n.ingcs(),e.feature.gcs(),e.mouse.geo),i=e.feature.polygonCoordinates(),o={};e.over.index.forEach((function(e,t){var n,a=i[e];a.outer.forEach((function(e,t){var i=a.outer[(t+1)%a.outer.length],o=s.distance2dToLineSquared(r,e,i);(void 0===n||o<n)&&(n=o)})),a.inner.forEach((function(e){e.forEach((function(t,i){var o=e[(i+1)%e.length],a=s.distance2dToLineSquared(r,t,o);(void 0===n||a<n)&&(n=a)}))})),o[e]=n})),e.over.index.sort((function(e,t){return o[e]-o[t]})).reverse(),e.over.index.forEach((function(n,r){e.over.found[r]=t[n]}))},this._exit=function(){i&&l.layer()&&(l.layer().deleteFeature(i),i=null,l.dependentFeatures([])),c()},this._init=function(e){e=e||{},u.call(l,e);var t=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:function(e){return e},position:function(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},origin:function(e){for(var t=0;t<e.length;t+=1)if(e[t].vertices.length>=3)return e[t].vertices.slice(0,3);return[0,0,0]}},void 0===e.style?{}:e.style);void 0!==e.polygon&&(t.polygon=e.polygon),void 0!==e.position&&(t.position=e.position),l.style(t),l._checkForStroke()},this};s.create=function(e,t){"use strict";return(t=t||{}).type="polygon",o.create(e,t)},s.capabilities={feature:"polygon"},i(s,o),e.exports=s},5017:function(e,t,n){var r=n(5638),i=n(5699),o=n(6837),a=function e(t){"use strict";var i=n(6853),a=n(4634);if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var s,l,u=this,c=this._init,d=0,f=[],p=[];return this.featureType="quad",this._objectListStart=function(e){r.each(e,(function(e,t){t.used=!1}))},this._objectListGet=function(e,t){for(var n=0;n<e.length;n+=1)if(e[n].entry===t)return e[n].used=!0,e[n].value},this._objectListAdd=function(e,t,n){e.push({entry:t,value:n,used:!0})},this._objectListEnd=function(e){for(var t=e.length-1;t>=0;t-=1)e[t].used||e.splice(t,1)},this.pointSearch=function(e,t){var n,o,s=[],c=[],d={},f=[{},{},{},{}],p=[{},{},{},{}],h=[0,1,2,0],m=[1,2,3,1],g=u.data(),v=u.layer().map();return t=null===t?v.gcs():void 0===t?v.ingcs():t,e=i.transformCoordinates(t,v.gcs(),e),l||u._generateQuads(),r.each([l.clrQuads,l.imgQuads,l.vidQuads],(function(t,r){r.forEach((function(t,r){for(n=0;n<h.length;n+=1)f[n].x=t.pos[3*h[n]],f[n].y=t.pos[3*h[n]+1],f[n].z=t.pos[3*h[n]+2],p[n].x=t.pos[3*m[n]],p[n].y=t.pos[3*m[n]+1],p[n].z=t.pos[3*m[n]+2];(a.pointInPolygon(e,f)||a.pointInPolygon(e,p))&&(c.push(t.idx),s.push(g[t.idx]),!(o=a.pointToTriangleBasis2d(e,f[0],f[1],f[2]))||o.x+o.y>1?(o=a.pointToTriangleBasis2d(e,p[2],p[1],p[0]))&&(o.x=1-o.x):o.y=1-o.y,o&&(d[t.idx]={basis:o,_quad:t}))}))})),{index:c,found:s,extra:d}},this.position=function(e){return void 0===e?u.style("position"):(u.style("position",a.ensureFunction(e)),u.dataTime().modified(),u.modified(),u)},this._positionToQuad=function(e,t,n,o){var a=e.call(u,n,o);if(a.ll&&a.ur||a.ul&&a.lr){var s=u.gcs(),l=u.layer().map().gcs(),c={};return r.each(["ll","lr","ul","ur"],(function(e,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]=t.call(u,n,o)),s!==l&&!1!==s&&(c[r]=i.transformCoordinates(s,l,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(e,t){},this._generateQuads=function(){var e,t,n=u.position(),i=u.style.get("image"),o=u.style.get("video"),c=u.style.get("delayRenderWhenSeeking"),h=u.style.get("color"),m=u.style.get("depth"),g=u.style.get("opacity"),v=u.style.get("drawOnAsyncResourceLoaded"),y=u.style.get("previewColor"),b=u.style.get("previewImage"),x=u.data(),w=[],_=[],S=[],C=[0,0,0];return u._objectListStart(f),u._objectListStart(p),r.each(x,(function(l,x){if(x._cachedQuad)return t=x._cachedQuad.diag2,(void 0===e||x._cachedQuad.diag2&&x._cachedQuad.diag2<e)&&(C=x._cachedQuad.ll,e=x._cachedQuad.diag2),x._cachedQuad.clrquad&&w.push(x._cachedQuad.clrquad),x._cachedQuad.imgquad&&(x._cachedQuad.imageEntry&&u._objectListGet(f,x._cachedQuad.imageEntry),_.push(x._cachedQuad.imgquad)),void(x._cachedQuad.vidquad&&(x._cachedQuad.videoEntry&&u._objectListGet(p,x._cachedQuad.videoEntry),S.push(x._cachedQuad.vidquad)));var A,T,P,E,O,M,D,k,I,R,N,F,L={};if(D=u._positionToQuad(n,m,x,l),R=g.call(u,x,l),void 0!==D&&R&&!(R<0)){if(t=Math.pow(D.ll[0]-D.ur[0],2)+Math.pow(D.ll[1]-D.ur[1],2)+Math.pow(D.ll[2]-D.ur[0],2)+Math.pow(D.lr[0]-D.ur[0],2)+Math.pow(D.lr[1]-D.ur[1],2)+Math.pow(D.lr[2]-D.ur[0],2),L.diag2=t,L.ll=D.ll,(void 0===e||t&&t<e)&&(C=D.ll,e=t),D=[D.ll[0],D.ll[1],D.ll[2],D.lr[0],D.lr[1],D.lr[2],D.ul[0],D.ul[1],D.ul[2],D.ur[0],D.ur[1],D.ur[2]],A={idx:l,pos:D,opacity:R,zOffset:x.zOffset},x.reference&&(A.reference=x.reference),x.crop&&(A.crop=x.crop),I=(k=i.call(u,x,l))?null:o.call(u,x,l),k){if(L.imageEntry=k,void 0===(T=u._objectListGet(f,k))&&(k instanceof Image||k instanceof HTMLCanvasElement?T=k:(T=new Image).src=k,u._objectListAdd(f,k,T)),a.isReadyImage(T)||T instanceof HTMLCanvasElement)A.image=T;else if(N=void 0,(F=b.call(u,x,l))&&a.isReadyImage(F)?A.image=F:(N=y.call(u,x,l),A.color=a.convertColor(N),A.color&&void 0!==A.color.r&&void 0!==A.color.g&&void 0!==A.color.b?(w.push(A),L.clrquad=A):N=void 0),v.call(u,x,l))M=a.isReadyImage(T,!0)?null:r.Deferred(),E=T.onload,T.onload=function(){if(void 0!==N&&(r.inArray(A,w)>=0&&w.splice(r.inArray(A,w),1),delete L.clrquad),A.image=T,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),M&&M.resolve(),E)return E.apply(u,arguments)},O=T.onerror,T.onerror=function(){if(M&&M.reject(),O)return O.apply(u,arguments)},M&&u.layer().addPromise(M.promise());else if(void 0===N&&!A.image)return;_.push(A),L.imgquad=A}else if(I){if(L.videoEntry=I,void 0===(P=u._objectListGet(p,I))&&(I instanceof HTMLVideoElement?P=I:(P=document.createElement("video")).src=I,u._objectListAdd(p,I,P),r(P).off(".geojsvideo").on("seeking.geojsvideo canplay.geojsvideo pause.geojsvideo playing.geojsvideo",(function(e){u._checkQuadUpdate(A,e)}))),A.delayRenderWhenSeeking=c.call(u,x,l),void 0===A.delayRenderWhenSeeking&&(A.delayRenderWhenSeeking=!0),a.isReadyVideo(P))A.video=P;else if(N=y.call(u,x,l),A.color=a.convertColor(N),A.color&&void 0!==A.color.r&&void 0!==A.color.g&&void 0!==A.color.b?(w.push(A),L.clrquad=A):N=void 0,v.call(u,x,l))M=a.isReadyVideo(P,!0)?null:r.Deferred(),E=P.onloadeddata,P.onloadeddata=function(){if(void 0!==N&&(r.inArray(A,w)>=0&&w.splice(r.inArray(A,w),1),delete L.clrquad),A.video=P,u.dataTime().modified(),u.modified(),u._update(),u.layer().draw(),M&&M.resolve(),E)return E.apply(u,arguments)},O=P.onerror,P.onerror=function(){if(M&&M.reject(),O)return O.apply(u,arguments)},M&&u.layer().addPromise(M.promise());else if(void 0===N&&!A.video)return;S.push(A),L.vidquad=A}else{if(A.color=a.convertColor(h.call(u,x,l)),!A.color||void 0===A.color.r||void 0===A.color.g||void 0===A.color.b)return;w.push(A),L.clrquad=A}L.clrquad&&(d+=1,L.clrquad.quadId=d),L.imgquad&&(d+=1,L.imgquad.quadId=d),L.vidquad&&(d+=1,L.vidquad.quadId=d),!1!==s&&(x._cachedQuad=L)}})),u._objectListEnd(f),u._objectListEnd(p),l={clrQuads:w,imgQuads:_,vidQuads:S,origin:new Float32Array(C)}},this.cacheUpdate=function(e){return null==e?r.each(u.data(),(function(e,t){t._cachedQuad&&delete t._cachedQuad})):(isFinite(e)&&(e=u.data()[e]),e._cachedQuad&&delete e._cachedQuad),u.modified(),u},this.video=function(e){var t,n;return isFinite(e)&&(e=u.data()[e]),e._cachedQuad?t=(e._cachedQuad.vidquad||{}).video:(l||u._generateQuads(),(n=u.data().indexOf(e))>=0&&(t=u._objectListGet(p,u.style.get("video")(e,n)))),t instanceof HTMLVideoElement?t:null},this._init=function(e){e=e||{},c.call(u,e),s=!1!==e.cacheQuads;var t=r.extend({},{color:{r:1,g:1,b:1},opacity:1,depth:0,drawOnAsyncResourceLoaded:!0,previewColor:null,previewImage:null,image:function(e){return e.image},video:function(e){return e.video},position:function(e){return e}},void 0===e.style?{}:e.style);void 0!==e.position&&(t.position=a.ensureFunction(e.position)),u.style(t),u.dataTime().modified()},u};a.create=function(e,t){"use strict";return(t=t||{}).type="quad",o.create(e,t)},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),e.exports=a},4647:function(e,t,n){var r=n(5638),i={dom:{}},o={},a={},s={},l={},u={},c={},d={},f={},p={registerFileReader:function(e,t){c[e]=t},createFileReader:function(e,t){return c.hasOwnProperty(e)?c[e](t):null},registerRenderer:function(e,t){s[e]=t},createRenderer:function(e,t,n,r){if(s.hasOwnProperty(e)){var i=s[e]({layer:t,canvas:n,options:r});return i._init(),i}return null},checkRenderer:function(e,t){if(null===e)return e;if(s.hasOwnProperty(e)){var n=s[e];if(!n.supported||n.supported())return n.apiname||e;if(!n.fallback||t)return!1;var r=p.checkRenderer(n.fallback(),!0);return!1!==r&&console.warn(e+" renderer is unavailable, using "+r+" renderer instead"),r}return!1},rendererForFeatures:function(e){var t,n,r,i,o,a,s=["webgl","canvas","svg","vtkjs",null];for(n=0;n<s.length;n+=1)if(t=s[n],!1!==p.checkRenderer(t,!0)){if(!e)return t;if(l[t]){for(a=!0,i=0;i<e.length;i+=1){if(o=null,(r=e[i]).indexOf(".")>=0&&(o=r,r=r.substr(0,r.indexOf("."))),void 0===l[t][r]){a=!1;break}if(o&&u[t][r]&&!u[t][r][o]){a=!1;break}}if(a)return t}}return console.warn('There is no renderer available for the feature list "'+(e||[]).join(", ")+'".'),!1},registerFeature:function(e,t,n,r){e in l||(l[e]={},u[e]={});var i=l[e][t];return i&&console.warn("The "+e+"."+t+" feature is already registered"),l[e][t]=n,u[e][t]=r,i},createFeature:function(e,t,n,i){var o=n.api(),a={layer:t,renderer:n};if(o in l&&e in l[o]){void 0!==i&&r.extend(!0,a,i);var s=l[o][e](a);return void 0===t.gcs&&(t.gcs=function(){return t.map().gcs()}),s}return null},registerLayerAdjustment:function(e,t,n){e in d||(d[e]={});var r=d[e][t];return r&&console.warn("The "+e+"."+t+" layer adjustment is already registered"),d[e][t]=n,r},adjustLayerForRenderer:function(e,t){var n=t.rendererName();n&&d&&d[n]&&d[n][e]&&d[n][e].apply(t)},registerLayer:function(e,t,n){o[e]=t,a[e]=n},createLayer:function(e,t,n){var i={map:t},s=null;return e in o?(n.renderer||n.features||!a||(i.features=a[e]),void 0!==n&&r.extend(!0,i,n),(s=o[e](i)).layerName=e,s._init(),s):null},registerWidget:function(e,t,n){e in i||(i[e]={});var r=i[e][t];return r&&console.warn("The "+e+"."+t+" widget is already registered"),i[e][t]=n,r},createWidget:function(e,t,n){var o={layer:t};if(e in i.dom)return void 0!==n&&r.extend(!0,o,n),i.dom[e](o);throw new Error("Cannot create unknown widget "+e)},registerAnnotation:function(e,t,n){var r=f[e];return r&&console.warn("The "+e+" annotation is already registered"),f[e]={func:t,features:n||{}},r},createAnnotation:function(e,t){if(f[e])return f[e].func(t);console.warn("The "+e+" annotation is not registered")},listAnnotations:function(){return Object.keys(f)},featuresForAnnotations:function(e){var t=[];return(Array.isArray(e)?e:Object.keys(e)).forEach((function(n){f[n]&&Object.keys(f[n].features).forEach((function(i){Array.isArray(e)||!0===e[n]||!Array.isArray(f[n].features[i])?t.push(i):e[n].forEach((function(e){r.inArray(e,f[n].features[i])>=0&&t.push(i)}))}))})),t},rendererForAnnotations:function(e){return p.rendererForFeatures(p.featuresForAnnotations(e))}};p.registries={annotations:f,features:l,featureCapabilities:u,fileReaders:c,layers:o,renderers:s,widgets:i},e.exports=p},3234:function(e,t,n){var r=n(5699),i=n(3737),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this);var n=this,r=0,o=0,a=void 0===(t=t||{}).layer?null:t.layer,s=void 0===t.canvas?null:t.canvas,l=!1;return this.layer=function(){return a},this.canvas=function(e){return void 0===e?s:(s=e,n.modified(),n)},this.map=function(){return a?a.map():null},this.initialized=function(e){return void 0===e?l:(l=e,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(e,t){return r=e,o=t,n},this._init=function(){return n},this._resize=function(e,t,r,i){return n._setWidthHeight(r,i),n},this._render=function(){return n},this};r(o,i),e.exports=o},5358:function(e,t,n){var r=n(5699),i=n(3737),o=function e(t){"use strict";if(!(this instanceof e))return new e;i.call(this,t);var n=this,r=null,o=[],a=this._exit,s=this.geoTrigger,l=this.addPromise,u=this.removePromise;return this.addPromise=function(e){return r&&r.addPromise(e),l(e),n},this.removePromise=function(e){return r&&r.removePromise(e),u(e),n},this.parent=function(e){return void 0===e?r:(r=e,n)},this.addChild=function(e){return Array.isArray(e)?(e.forEach(n.addChild),n):(e.parent(n),o.push(e),n)},this.removeChild=function(e){return Array.isArray(e)?(e.forEach(n.removeChild),n):(o=o.filter((function(t){return t!==e})),n)},this.children=function(){return o.slice()},this.draw=function(e){return n.children().forEach((function(t){t.draw(e)})),n},this.geoTrigger=function(e,t,i){var a;return a=(t=t||{}).geo||{},t.geo=a,a.stopPropagation?n:!i&&r&&a._triggeredBy!==r?(a._triggeredBy=n,r.geoTrigger(e,t),n):(s.call(n,e,t),a.stopPropagation||o.forEach((function(r){r.geoTrigger&&(a._triggeredBy=n,r.geoTrigger(e,t))})),n)},this._exit=function(){o=[],r=null,a()},this};r(o,i),e.exports=o},5381:function(e){e.exports="0bc7b69498f5cc8cb411e7db7a8049eda5043a68"},9851:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4745),a=function e(t){"use strict";var n=this;return this instanceof e?(o.call(this,t),this.select=function(){var e=n.renderer(),t={},r=n.nodeFeature(),i=n.linkFeatures();return t.nodes=e.select(r._svgid()),t.links=i.map((function(t){return e.select(t._svgid())})),t},this):new e(t)};r(a,o),i("svg","graph",a),e.exports=a},2878:function(e,t,n){n(5108).svg={rescale:n(8210)},e.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(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(2531).d3,i=n(2738),a=n(6618),s=n(4634);t=t||{},o.call(this,t),i.call(this);var l=this,u=this._init,c=a(),d=0,f=this._update;return this._init=function(e){return u.call(l,e),l},this._build=function(){var e,t,n=l.data()||[],i=l.style(),o=l.renderer(),a=l.position();for(f.call(l),i.fill=function(){return!1},n.forEach((function(t,n){var u,c,d=l.line()(t,n),f={};function p(e){return s.isFunction(e)?function(){return e(d[0],0,t,n)}:e}for(c in i)i.hasOwnProperty(c)&&(f[c]=p(i[c]));e=r.svg.line().x((function(e){return l.featureGcsToDisplay(e).x})).y((function(e){return l.featureGcsToDisplay(e).y})).interpolate(l.style.get("closed")(t,n)&&d.length>2?"linear-closed":"linear"),u={data:[d.map((function(e,r){return a(e,r,t,n)}))],append:"path",attributes:{d:e},id:l._svgid()+n,classes:["svgLineFeature","svgSubLine-"+n],visible:l.visible,style:f},o._drawFeatures(u)})),t=n.length;t<d;t+=1)o._removeFeature(l._svgid()+t);return d=n.length,c.modified(),l.updateTime().modified(),l},this._update=function(){return f.call(l),l.timestamp()>=c.timestamp()&&l._build(),l},this._init(t),this};r(a,o);var s={};s[o.capabilities.basic]=!0,s[o.capabilities.multicolor]=!1,i("svg","line",a,s),e.exports=a},2738:function(e,t,n){e.exports=function e(t){"use strict";var r=n(3737),i=n(1946);if(!(this instanceof r))return new e(t);var o="svg-"+i(),a=this._exit,s=this,l=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(),l()),s},this._exit=function(){s.renderer()._removeFeature(s._svgid()),a()},this}},5903:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6565),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),i=n(2531).d3,a=n(2738),s=n(6618);t=t||{},o.call(this,t),a.call(this);var l=this,u=s(),c=this._update,d={style:{}};return this._build=function(){var e,t,n=l.data()||[],o=l.style.get(),a=l.style.get("position");return c.call(l),t=function(e){var t={source:e.source,target:e.target};return i.svg.diagonal()(t)},e=[],n.forEach((function(t,r){var i,o;r<n.length-1&&(i=a(t,r),o=a(n[r+1],r+1),e.push({source:l.featureGcsToDisplay(i),target:l.featureGcsToDisplay(o)}))})),d.data=e,d.attributes={d:t},d.id=l._svgid(),d.append="path",d.classes=["svgPathFeature"],d.style=r.extend({fill:function(){return!1},fillColor:{r:0,g:0,b:0}},o),d.visible=l.visible,l.renderer()._drawFeatures(d),u.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.dataTime().timestamp()>=u.timestamp()&&l._build(),l},this._init(t),this};r(a,o),i("svg","path",a),e.exports=a},3365:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(2738),i=n(6618);t=t||{},o.call(this,t),r.call(this);var a=this,s=this._init,l=this._update,u=i(),c={};return this._init=function(e){return s.call(a,e),a},this._build=function(){var e=a.data(),t=a.style.get(),n=a.renderer(),r=a.position();return l.call(a),e||(e=[]),c.id=a._svgid(),c.data=e,c.append="circle",c.attributes={r:n._convertScale(t.radius),cx:function(e){return a.featureGcsToDisplay(r(e)).x},cy:function(e){return a.featureGcsToDisplay(r(e)).y}},c.style=t,c.classes=["svgPointFeature"],c.visible=a.visible,a.renderer()._drawFeatures(c),u.modified(),a.updateTime().modified(),a},this._update=function(){return l.call(a),a.timestamp()>=u.timestamp()&&a._build(),a},this._init(t),this};r(a,o);var s={};s[o.capabilities.stroke]=!0,i("svg","point",a,s),e.exports=a},2203:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),i=n(2531).d3,a=n(2738);o.call(this,t),a.call(this);var s,l=this,u=this._exit,c=this._init,d=this._update;return this._build=function(){if(this.position()){var e=l.renderer(),t=e.layer().map();s=l._generateQuads();var n=[];r.each(s.clrQuads,(function(e,t){n.push({type:"clr",quad:t,zIndex:t.pos[2]})})),r.each(s.imgQuads,(function(e,t){t.image&&n.push({type:"img",quad:t,zIndex:t.pos[2]})}));var o={id:l._svgid(),data:n,dataIndex:function(e){return e.quad.quadId},append:function(e){var t=this.namespaceURI,n="clr"===e.type?"polygon":"image";return t?document.createElementNS(t,n):document.createElement(n)},attributes:{fill:function(e){if("clr"===e.type)return i.rgb(255*e.quad.color.r,255*e.quad.color.g,255*e.quad.color.b);1!==e.quad.opacity&&i.select(this).style("opacity",e.quad.opacity)},height:function(e){return"clr"===e.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=t.gcsToDisplay(o,null),o=e.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(e){return"clr"===e.type?void 0:"none"},reference:function(e){return e.quad.reference},stroke:!1,transform:function(n){if("img"===n.type&&n.quad.image&&!n.svgTransform){var r,i,o,a,s=[],l=-1,u=n.quad.image.width,c=n.quad.image.height;for(o=0;o<n.quad.pos.length;o+=3){var d={x:n.quad.pos[o],y:n.quad.pos[o+1],z:n.quad.pos[o+2]};d=t.gcsToDisplay(d,null),d=e.baseToLocal(d),s.push(d)}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)>l&&(l=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]/u)<1e-6&&Math.abs(n.svgTransform[2]/c)<1e-6&&(a=n.svgTransform[0]/u,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(e){return"clr"===e.type?void 0:1},x:function(e){return"clr"===e.type?void 0:0},"xlink:href":function(e){return"clr"!==e.type&&e.quad.image?e.quad.image.src:void 0},y:function(e){return"clr"===e.type?void 0:0}},style:{fillOpacity:function(e){return"clr"===e.type?e.quad.opacity:void 0}},onlyRenderNew:!this.style("previewColor")&&!this.style("previewImage"),sortByZ:!0,visible:l.visible,classes:["svgQuadFeature"]};e._drawFeatures(o),l.buildTime().modified()}},this._update=function(){return d.call(l),(l.buildTime().timestamp()<=l.dataTime().timestamp()||l.buildTime().timestamp()<l.timestamp())&&l._build(),l},this._init=function(){c.call(l,t)},this._exit=function(){u.call(l)},l._init(t),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),e.exports=a},8210:function(e){e.exports="geo_svg_rescale"},2531:function(e,t,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function e(t){"use strict";var r=e.d3,i=n(2738),a=n(4634),s=n(5108),l=n(8210);if(!(this instanceof e))return new e(t);o.call(this,t);var u=this._exit;i.call(this,t),t=t||{};var c=this,d=null,f={},p=null,h=null,m=1,g={dx:0,dy:0,rx:0,ry:0,rotation:0},v={},y={},b=null,x=null;function w(e){return e?b.select(".group-"+e):b.select(".group-"+c._svgid())}function _(){var e=c.layer().map(),t=e.size().width,n=e.size().height;if(!t||!n)throw new Error("Map layer has size 0");c._setWidthHeight(t,n),h=Math.pow(t*t+n*n,.5),p={upperLeft:e.displayToGcs({x:0,y:0},null),lowerRight:e.displayToGcs({x:t,y:n},null),center:e.displayToGcs({x:t/2,y:n/2},null)}}return this._convertColor=function(e,t){return e=a.ensureFunction(e),t=t||function(){return!0},function(){var n="none";return t.apply(c,arguments)&&(n=e.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(e){return e=a.ensureFunction(e),function(){return e.apply(c,arguments)/m}},this._setTransform=function(){if(p||_(),d){var e,t,n,r,i,o,a=c.layer().map(),s=a.gcsToDisplay(p.upperLeft,null),l=a.gcsToDisplay(p.lowerRight,null),u=a.gcsToDisplay(p.center,null),f=w();n=Math.sqrt(Math.pow(l.y-s.y,2)+Math.pow(l.x-s.x,2))/h,r=a.rotation(),i=-c.width()/2,o=-c.height()/2,e=n*i+u.x,t=n*o+u.y,r||(e=Math.round(e),t=Math.round(t));var v="matrix("+[n,0,0,n,e,t].join()+")";r&&(v+=" rotate("+[180*r/Math.PI,-i,-o].join()+")"),f.attr("transform",v),m=n,g.dx=e,g.dy=t,g.rx=i,g.ry=o,g.rotation=r}},this.baseToLocal=function(e){if(e={x:(e.x-g.dx)/m,y:(e.y-g.dy)/m},g.rotation){var t=Math.sin(-g.rotation),n=Math.cos(-g.rotation),r=e.x+g.rx,i=e.y+g.ry;e={x:r*n-i*t-g.rx,y:r*t+i*n-g.ry}}return e},this.localToBase=function(e){if(g.rotation){var t=Math.sin(g.rotation),n=Math.cos(g.rotation),r=e.x+g.rx,i=e.y+g.ry;e={x:r*n-i*t-g.rx,y:r*t+i*n-g.ry}}return e={x:e.x*m+g.dx,y:e.y*m+g.dy}},this._init=function(e){if(!c.canvas()){var t;e.widget=e.widget||!1,(b="d3Parent"in e?r.select(e.d3Parent).append("svg"):r.select(c.layer().node().get(0)).append("svg")).attr("display","block");var n=(x=b.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"),e.widget||(t=e.canvas||b.append("g")),(n=x.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"),d=c.layer().sticky(),b.attr("class",c._svgid()),b.attr("width",c.layer().node().width()),b.attr("height",c.layer().node().height()),e.widget?c.canvas(b):(t.attr("class","group-"+c._svgid()),c.canvas(t))}return c._setTransform(),c},this.api=function(){return e.apiname},this.scaleFactor=function(){return m},this._resize=function(e,t,n,r){return p||_(),b.attr("width",n),b.attr("height",r),c._setTransform(),c._setWidthHeight(n,r),c.layer().geoTrigger(l,{scale:m},!0),c},this._exit=function(){f={},c.canvas().remove(),b.remove(),b=void 0,x.remove(),x=void 0,v={},y={},u()},this._definitions=function(){return x},this._drawFeatures=function(e){return f[e.id]={data:e.data,index:e.dataIndex,style:e.style,visible:e.visible,attributes:e.attributes,classes:e.classes,append:e.append,onlyRenderNew:e.onlyRenderNew,sortByZ:e.sortByZ,parentId:e.parentId},c.__render(e.id,e.parentId)},this.__render=function(e,t){var n;if(void 0===e){for(n in f)f.hasOwnProperty(n)&&c.__render(n);return c}return t?c._renderFeature(e,t):(v[e]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame)),c},this._renderFrame=function(){var e;for(e in y)c.select(e).remove(),x.selectAll("."+e).remove();y={};var t=v;for(e in v={},t)t.hasOwnProperty(e)&&c._renderFeature(e)},this._renderFeature=function(e,t){if(!f[e])return c;var n,r,i=f[e].data,o=f[e].index,a=f[e].style,s=f[e].visible,l=f[e].attributes,u=f[e].classes,d=f[e].append,p=c.select(e,t).data(i,o);return n=p.enter().append(d),p.exit().remove(),function(e,t){var n;for(n in t)t.hasOwnProperty(n)&&e.attr(n,t[n])}(r=f[e].onlyRenderNew?n:p,l),r.attr("class",u.concat([e]).join(" ")),function(e,t){var n,r,i;function o(){return t.fill.apply(c,arguments)?null:"none"}function a(){return t.stroke.apply(c,arguments)?null:"none"}for(n in t)t.hasOwnProperty(n)&&(i=null,r=null,"strokeColor"===n?(r="stroke",i=c._convertColor(t[n],t.stroke)):"stroke"===n&&t[n]&&!t.hasOwnProperty("strokeColor")?(r="stroke",i=a):"strokeWidth"===n?(r="stroke-width",i=c._convertScale(t[n])):"strokeOpacity"===n?(r="stroke-opacity",i=t[n]):"fillColor"===n?(r="fill",i=c._convertColor(t[n],t.fill)):"fill"!==n||t.hasOwnProperty("fillColor")?"fillOpacity"===n?(r="fill-opacity",i=t[n]):"lineCap"===n?(r="stroke-linecap",i=t[n]):"lineJoin"===n?(r="stroke-linejoin",i=t[n]):"miterLimit"===n&&(r="stroke-miterlimit",i=t[n]):(r="fill",i=o),r&&e.style(r,i))}(r,a),s&&r.style("visibility",s()?"visible":"hidden"),n.size()&&f[e].sortByZ&&p.sort((function(e,t){return(e.zIndex||0)-(t.zIndex||0)})),c},this.select=function(e,t){return w(t).selectAll("."+e)},this._removeFeature=function(e){return y[e]=!0,c.layer().map().scheduleAnimationFrame(c._renderFrame),delete f[e],v[e]&&delete v[e],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(l,{scale:m},!0)})),this.layer().geoOn(s.resize,(function(e){c._resize(e.x,e.y,e.width,e.height)})),this._init(t),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(e){}return void 0!==a.d3},a.fallback=function(){return null},a.supported(),e.exports=a},21:function(e,t,n){var r=function(){"use strict";var e,t=this,n=this._init,r=this._exit,i=this._update,o=0,a=[];this._drawTile=function(n){if(e){var r=t._tileBounds(n),i=n.index.level||0,s=t._tileOffset(i),l={};l.ul=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.top-s.y},i),0),l.ll=t.fromLocal(t.fromLevel({x:r.left-s.x,y:r.bottom-s.y},i),0),l.ur=t.fromLocal(t.fromLevel({x:r.right-s.x,y:r.top-s.y},i),0),l.lr=t.fromLocal(t.fromLevel({x:r.right-s.x,y:r.bottom-s.y},i),0),l.ul.z=l.ll.z=l.ur.z=l.lr.z=i,o+=1,l.id=o,n.quadId=l.id,l.image=n.image,l.reference=n.toString(),a.push(l),e.data(a),e._update(),t.draw()}},this._remove=function(n){if(void 0!==n.quadId&&e){for(var r=0;r<a.length;r+=1)if(a[r].id===n.quadId){a.splice(r,1);break}e.data(a),e._update(),t.draw()}},this._update=function(n){return i.call(t,n),t._addBaseQuadToTiles(e,a),t},this._exit=function(){t.deleteFeature(e),e=null,a=[],r.apply(t,arguments)},this._init=function(){n.apply(t,arguments),(e=t.createFeature("quad",{previewColor:t._options.previewColor,previewImage:t._options.previewImage})).geoTrigger=void 0,e.gcs(t._options.gcs||t.map().gcs()),e.data(a),e._update()},this._getSubLayer=function(){},this._updateSubLayers=void 0};(0,n(4647).registerLayerAdjustment)("svg","tile",r),e.exports=r},1489:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(2738).call(this),this._init(t),this):new e(t)};r(a,o),i("svg","track",a),e.exports=a},1946:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz";e.exports=function(){var e,n=[];for(n.length=8,e=0;e<8;e+=1)n[e]=t.charAt(Math.floor(Math.random()*t.length));return n.join("")}},3398:function(e,t,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 e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(2738),i=n(6618),s=n(2531).d3;t=t||{},o.call(this,t),r.call(this);var l=this,u=this._exit,c=this._update,d=i(),f={};function p(e,t,n){return l._svgid()+"_marker_"+t+"_"+n}function h(e,t,n,r,i){var o=l.renderer()._definitions().selectAll("g.marker-group#"+l._svgid()).data(e.length?[1]:[]);o.enter().append("g").attr("id",l._svgid).attr("class","marker-group"),o.exit().remove();var u=e.reduce((function(e,t,n){var o=a[i(t,n)],s=a[r(t,n)];return o&&e.push({data:t,dataIndex:n,head:!0}),s&&e.push({data:t,dataIndex:n,head:!1}),e}),[]),c=o.selectAll("marker.geo-vector-marker").data(u);c.enter().append("marker").append("path");var d=l.renderer();c.each((function(e){var t=s.select(this),n=e.head?a[i(e.data,e.dataIndex)]:a[r(e.data,e.dataIndex)];Object.keys(n.attrs).forEach((function(e){t.attr(e,n.attrs[e])}))})).attr("id",(function(e){return p(e.data,e.dataIndex,e.head?"head":"tail")})).style("stroke",(function(e){return d._convertColor(t)(e.data,e.dataIndex)})).style("fill",(function(e){return d._convertColor(t)(e.data,e.dataIndex)})).style("opacity",(function(e){return n(e.data,e.dataIndex)})).select("path").attr("d",(function(e){return e.head?a[i(e.data,e.dataIndex)].path:a[r(e.data,e.dataIndex)].path})),c.exit().remove()}return this._build=function(){var e,t=l.data(),n=l.style.get(),r=l.renderer(),i=l.origin(),o=l.delta(),a=l.style("scale"),s=0;function u(){return a/r.scaleFactor()}return c.call(l),t||(t=[]),e=t.map((function(e,t){var n=l.featureGcsToDisplay(i(e,t)),r=o(e,t);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=l._svgid(),f.data=t,f.append="line",f.attributes={x1:function(t,n){return e[n].x1},y1:function(t,n){return e[n].y1},x2:function(t,n){return e[n].x1+u()*e[n].dx},y2:function(t,n){return e[n].y1+u()*e[n].dy},"marker-start":function(e,t){return"url(#"+p(0,t,"tail")+")"},"marker-end":function(e,t){return"url(#"+p(0,t,"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=l.visible,h(t,n.strokeColor,n.strokeOpacity,n.originStyle,n.endStyle),l.renderer()._drawFeatures(f),d.modified(),l.updateTime().modified(),l},this._update=function(){return c.call(l),l.timestamp()>=d.timestamp()?l._build():h(f.data,f.style.strokeColor,f.style.strokeOpacity,f.style.originStyle,f.style.endStyle),l},this._exit=function(){u.call(l),f={},h([],null,null,null,null)},this._init(t),this};s.markerConfigs=a,r(s,o),i("svg","vector",s),e.exports=s},9757:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5638),o=this,a=this._init;return this.featureType="text",this.position=function(e){return void 0===e?o.style("position"):(e!==o.style("position")&&(o.style("position",e),o.dataTime().modified(),o.modified()),o)},this.text=function(e){return void 0===e?o.style("text"):(e!==o.style("text")&&(o.style("text",e),o.dataTime().modified(),o.modified()),o)},this._init=function(e){e=e||{},a.call(o,e);var t=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(e){return Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:e},text:function(e){return e.text}},void 0===e.style?{}:e.style);void 0!==e.position&&(t.position=e.position),void 0!==e.text&&(t.text=e.text),o.style(t),t.position&&o.position(t.position),t.text&&o.text(t.text),o.dataTime().modified()},this._init(t),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(e,t){"use strict";return(t=t||{}).type="text",i.create(e,t)},o.capabilities={feature:"text"},r(o,i),e.exports=o},8418:function(e,t,n){var r=n(5638);e.exports=function e(t){if(!(this instanceof e))return new e(t);this._index=t.index,this._size=t.size,this._overlap=t.overlap||{x:0,y:0},this._wrap=t.wrap||{x:1,y:1},this._url=t.url,this._fetched=!1,this._queue=t.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(e,t){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(e).fail(t):this.then(e,t),this},this.catch=function(e){return this.then(void 0,e),this},this.toString=function(){return[this._index.level||0,this._index.y,this._index.x,this._index.reference||0].join("_")},this.bounds=function(e,t){var n,r,i,o;return r=(n=this.size.x*(this.index.x-e.x)-this.overlap.x-t.x)+this.size.x+2*this.overlap.x,i=(o=this.size.y*(this.index.y-e.y)-this.overlap.y-t.y)+this.size.y+2*this.overlap.y,this.overlap.x&&this.index.x===e.x&&(n+=this.overlap.x),this.overlap.y&&this.index.y===e.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(e){return r.noop(e),this}}},6244:function(e){e.exports=function e(t){return this instanceof e?(t=t||{},this._size=t.size||64,Object.defineProperty(this,"size",{get:function(){return this._size},set:function(e){for(;this._atime.length>e;)this.remove(this._atime[this._atime.length-1]);this._size=e}}),Object.defineProperty(this,"length",{get:function(){return this._atime.length}}),this._access=function(e){return this._atime.indexOf(e)},this.remove=function(e){var t="string"==typeof e?e:e.toString();return t in this._cache&&(this._atime.splice(this._access(t),1),delete this._cache[t],!0)},this.clear=function(){return this._cache={},this._atime=[],this},this.get=function(e,t){return(e="string"==typeof e?e:e.toString())in this._cache?(t||(this._atime.splice(this._access(e),1),this._atime.unshift(e)),this._cache[e]):null},this.add=function(e,t,n){this.remove(e);var r=e.toString();this._cache[r]=e,this._atime.unshift(r),n||this.purge(t)},this.purge=function(e){for(var t;this._atime.length>this.size;){t=this._atime.pop();var n=this._cache[t];e&&e(n),delete this._cache[t]}},this.clear(),this):new e(t)}},1940:function(e,t,n){var r=n(5699),i=n(3715);function o(e,t){return(e%t+t)%t}function a(e){var t,n=/\$?\{(s|S|[sS]:[^{}]+|[^-{}]-[^-{}]|([^,{}]+,)+[^,{}]+)\}/,r=e.replace(new RegExp(n,"g"),"{s}").replace(/\$?\{[xX]\}/g,"{x}").replace(/\$?\{[yY]\}/g,"{y}").replace(/\$?\{[zZ]\}/g,"{z}"),i=e.match(n);if(i)if(i[2])t=i[1].split(",");else if(":"===i[1][1])t=i[1].substr(2).split("");else if("-"===i[1][1]){t=[];for(var a=i[1].charCodeAt(0),s=i[1].charCodeAt(2),l=Math.min(a,s);l<=Math.max(a,s);l+=1)t.push(String.fromCharCode(l))}return function(e,n,i,a){return r.replace(/\{s\}/g,function(e,t,n,r){return r[o(e+t+n,r.length)]}(e,n,i,t||a)).replace(/\{x\}/g,e).replace(/\{y\}/g,n).replace(/\{z\}/g,i)}}var s=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var r=n(5638),s=n(5108),l=n(6853),u=n(6244),c=n(3705),d=n(4647).adjustLayerForRenderer,f=n(8418);if((t=r.extend(!0,{},this.constructor.defaults,t||{})).cacheSize||(t.cacheSize=t.keepLower?600:200),"string"===r.type(t.subdomains)&&(t.subdomains=t.subdomains.split("")),t.baseUrl){var p=t.baseUrl;p&&"/"!==p.charAt(p.length-1)&&(p+="/"),t.url=p+"{z}/{x}/{y}."+(t.imageFormat||"png")}t.originalUrl=t.url,"string"===r.type(t.url)&&(t.url=a(t.url));var h,m,g,v=this._init,y=this._exit,b=this.visible,x=t.queueSize||6,w=t.initialQueueSize||0,_=[],S={},C=[],A=this;this._options=r.extend(!0,{},t),this.attribution(t.attribution),this._activeTiles={},this._tileTree={},this._cache=u({size:t.cacheSize}),this._queue=t.queue||c({size:x,initialSize:w,track:t.cacheSize,needed:function(e){return this._tileLayers&&this._tileLayers.length?this._tileLayers.some((function(t){return e===t.cache.get(e.toString(),!0)})):e===A.cache.get(e.toString(),!0)}}),this._queue._tileLayers=this._queue._tileLayers||[],this._queue._tileLayers.push(A);var T={};return Object.defineProperty(this,"options",{get:function(){return r.extend({},A._options)}}),Object.defineProperty(this,"cache",{get:function(){return A._cache}}),Object.defineProperty(this,"activeTiles",{get:function(){return r.extend({},A._activeTiles)}}),Object.defineProperty(this,"queue",{get:function(){return A._queue},set:function(e){A._queue!==e&&(this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(A)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(A),1),A._queue=e,A._queue._tileLayers=A._queue._tileLayers||[],A._queue._tileLayers.push(A))}}),Object.defineProperty(this,"queueSize",{get:function(){return x},set:function(e){x=e,A._queue.size=e}}),Object.defineProperty(this,"initialQueueSize",{get:function(){return w},set:function(e){w=e||0,A._queue.initialSize=e||x}}),Object.defineProperty(this,"reference",{get:function(){return A.id()+"_"+(h||0)},set:function(e){h=e},configurable:!0}),this.tilesAtZoom=function(e){if(A._options.tilesAtZoom)return A._options.tilesAtZoom.call(A,e);var t=Math.pow(2,e);return{x:t,y:t}},this.tilesMaxBounds=function(e){return A._options.tilesMaxBounds?A._options.tilesMaxBounds.call(A,e):null},this.tileCropFromBounds=function(e){if(A._options.tilesMaxBounds){var t=e.index.level,n=A._tileBounds(e);return void 0===C[t]&&(C[t]=A.tilesMaxBounds(t)||null),C[t]&&(n.right>C[t].x||n.bottom>C[t].y)?{x:Math.max(0,Math.min(C[t].x,n.right)-n.left),y:Math.max(0,Math.min(C[t].y,n.bottom)-n.top)}:void 0}},this.isValid=function(e){return A._options.minLevel<=e.level&&e.level<=A._options.maxLevel&&(!!(A._options.wrapX||0<=e.x&&e.x<=A.tilesAtZoom(e.level).x-1)&&!!(A._options.wrapY||0<=e.y&&e.y<=A.tilesAtZoom(e.level).y-1))},this._origin=function(e){var t,n=A.toLevel(A.toLocal(A.map().origin()),e),r=A._options;return{index:t={x:Math.floor(n.x/r.tileWidth),y:Math.floor(n.y/r.tileHeight)},offset:{x:n.x-r.tileWidth*t.x,y:n.y-r.tileHeight*t.y}}},this._tileBounds=function(e){var t=A._origin(e.index.level);return e.bounds(t.index,t.offset)},this.tileAtPoint=function(e,t){var n=A._origin(t),r=A.map();e=A.displayToLevel(r.gcsToDisplay(e,null),t),isNaN(e.x)&&(e.x=0),isNaN(e.y)&&(e.y=0);var i=A._tileOffset(t);return i&&(e.x+=i.x,e.y+=i.y),{x:Math.floor(n.index.x+(n.offset.x+e.x)/A._options.tileWidth),y:Math.floor(n.index.y+(n.offset.y+e.y)/A._options.tileHeight)}},this.gcsTileBounds=function(e,t){var n=e.index?e:f({index:e,size:{x:A._options.tileWidth,y:A._options.tileHeight},url:""}),r=A._tileOffset(n.index.level),i=n.bounds({x:0,y:0},r),o=A.map(),a=o.unitsPerPixel(n.index.level),s=[{x:i.left*a,y:A._topDown()*i.top*a},{x:i.right*a,y:A._topDown()*i.bottom*a}];return(t=null===t?o.gcs():void 0===t?o.ingcs():t)!==o.gcs()&&(s=l.transformCoordinates(o.gcs(),t,s)),{left:s[0].x,top:s[0].y,right:s[1].x,bottom:s[1].y}},this._getTile=function(e,t){var n=t||e;return f({index:e,size:{x:A._options.tileWidth,y:A._options.tileHeight},queue:A._queue,url:A._options.url.call(A,n.x,n.y,n.level||0,A._options.subdomains)})},this._getTileCached=function(e,t,n){var r=A.cache.get(A._tileHash(e));return null===r&&(r=A._getTile(e,t),A.cache.add(r,A.remove,n)),r},this._tileHash=function(e){return[e.level||0,e.y,e.x,e.reference||0].join("_")},this._getTileRange=function(e,t){var n=[A.tileAtPoint({x:t.left,y:t.top},e),A.tileAtPoint({x:t.right,y:t.top},e),A.tileAtPoint({x:t.left,y:t.bottom},e),A.tileAtPoint({x:t.right,y:t.bottom},e)];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(e,t,n,i){var a,s,l,u,c,d,f,p,h,m,g,v=[],y=!1,b=A._options.keepLower?A._options.minLevel:Math.min(Math.max(e,A._options.minLevel),A._options.maxLevel);for(e<b&&(e=b),g=b;g<=e&&(c=(f=A._getTileRange(g,t)).start,d=f.end,u=A.tilesAtZoom(g),A._options.wrapX||(c.x=Math.min(Math.max(c.x,0),u.x-1),d.x=Math.min(Math.max(d.x,0),u.x-1),g===b&&A._options.keepLower&&(c.x=0,d.x=u.x-1)),A._options.wrapY||(c.y=Math.min(Math.max(c.y,0),u.y-1),d.y=Math.min(Math.max(d.y,0),u.y-1),g===b&&A._options.keepLower&&(c.y=0,d.y=u.y-1)),!(A._options.gcs&&A._options.gcs!==A.map().gcs()&&g!==b&&(d.x+1-c.x)*(d.y+1-c.y)>A.map().size().width*A.map().size().height/A._options.tileWidth/A._options.tileHeight*16));g+=1)for(a=c.x;a<=d.x;a+=1)for(s=c.y;s<=d.y;s+=1)l={level:g,x:a,y:s,reference:A.reference},p={level:g,x:a,y:s,reference:A.reference},A._options.wrapX&&(p.x=o(p.x,u.x)),A._options.wrapY&&(p.y=o(p.y,u.y)),A.isValid(p)&&(i&&v.length<_.length&&(m=_[v.length],y=y||l.level!==m.level||l.x!==m.x||l.y!==m.y),v.push({index:l,source:p}));if(i){if(!y&&v.length===_.length)return;_.splice(0,_.length),r.each(v,(function(e,t){_.push(t.index)}))}if(n){h={x:(c.x+d.x)/2,y:(c.y+d.y)/2,level:e,bottomLevel:e};for(var x=Math.max(d.x-c.x,d.y-c.y)+1;x>=1;x/=2)h.bottomLevel-=1;v.sort(A._loadMetric(h)),A._queue&&A._queue.batch(!0)}for(A.cache.size<v.length&&(console.log("Increasing cache size to "+v.length),A.cache.size=v.length),a=0;a<v.length;a+=1)v[a]=A._getTileCached(v[a].index,v[a].source,!0);return A.cache.purge(A.remove),v},this.gcs=function(e){if(void 0===e)return A._options.gcs||A.map().gcs();var t=A.gcs();return null===e?delete A._options.gcs:A._options.gcs=e,A.gcs()!==t&&(A.clear(),A.gcsFeatures(A.gcs()),A.modified(),A._update()),A},this.prefetch=function(e,t){var n;return n=A._getTiles(e,t,!0),r.when.apply(r,n.map((function(e){return e.fetch()})))},this._loadMetric=function(e){return function(t,n){var r,i,o,a,s;return t=t.index||t,n=n.index||n,t.level!==n.level?e.bottomLevel&&t.level>=e.bottomLevel!=n.level>=e.bottomLevel?t.level>=e.bottomLevel?-1:1:t.level-n.level:(s=Math.pow(2,t.level-e.level),o=(e.x+.5)*s-.5,a=(e.y+.5)*s-.5,(r=t.x-o)*r+(i=t.y-a)*i-((r=n.x-o)*r+(i=n.y-a)*i))}},this.fromLevel=function(e,t){var n=Math.pow(2,-t);return{x:e.x*n,y:e.y*n}},this.toLevel=function(e,t){var n=Math.pow(2,t);return{x:e.x*n,y:e.y*n}},this.drawTile=function(e){var t=e.toString();A._activeTiles.hasOwnProperty(t)?A._moveToTop(e):A._drawTile(e),A._activeTiles[t]=e},this._drawTile=function(e){if(null!==A.renderer())throw new Error("This draw method is not valid on renderer managed layers.");var t,n=e.index.level,i=r(A._getSubLayer(n)),o=A._tileBounds(e),a=A._options.animationDuration,s=r('<div class="geo-tile-container"/>').attr("tile-reference",e.toString());s.append(e.image),s.css({left:o.left-parseInt(i.attr("offsetx")||0,10)+"px",top:o.top-parseInt(i.attr("offsety")||0,10)+"px"}),(t=A.tileCropFromBounds(e))&&s.addClass("crop").css({width:t.x+"px",height:t.y+"px"}),a>0&&e.fadeIn(a),i.append(s),e.catch((function(){console.warn("Could not load tile at "+e.toString()),A._remove(e)}))},this.remove=function(e){var t=e.toString(),n=A._activeTiles[t];return n instanceof f&&A._remove(n),delete A._activeTiles[t],n},this._remove=function(e){e.image&&(e.image.parentElement?r(e.image.parentElement).remove():console.log("No parent element to remove "+e.toString(),e),r(e.image).remove())},this._moveToTop=function(e){r.noop(e)},this._getViewBounds=function(){var e=A.map(),t=e.zoom(),n=A._options.tileRounding(t),r=Math.pow(2,t-n),i=e.size(),o=A.displayToLevel({x:0,y:0}),a=A.displayToLevel({x:i.width,y:0}),s=A.displayToLevel({x:0,y:i.height}),l=A.displayToLevel({x:i.width,y:i.height});return{level:n,scale:r,left:Math.min(o.x,a.x,s.x,l.x),right:Math.max(o.x,a.x,s.x,l.x),top:Math.min(o.y,a.y,s.y,l.y),bottom:Math.max(o.y,a.y,s.y,l.y)}},this._purge=function(e,t,n){var r,i;if(A._updating)return A;for(i in n||(n=A._getViewBounds()),A._activeTiles)r=A._activeTiles[i],A._canPurge(r,n,e,t)&&A.remove(r);return A},this.clear=function(){var e,t=[];for(e in A._activeTiles)t.push(A.remove(e));return A._tileTree={},_=[],t},this.reset=function(){return A.clear(),A._cache.clear(),A._queue.initialSize=w,A},this.toLocal=function(e,t){var n=A.map(),r=n.unitsPerPixel(void 0===t?n.zoom():t);return{x:e.x/r,y:A._topDown()*e.y/r}},this.fromLocal=function(e,t){var n=A.map(),r=n.unitsPerPixel(void 0===t?n.zoom():t);return{x:e.x*r,y:A._topDown()*e.y*r}},this._topDown=function(){return A._options.topDown?1:-1},this._getSubLayer=function(e){if(A.canvas()){var t=A.canvas().find("div[data-tile-layer="+e.toFixed()+"]").get(0);return t||(t=r('<div class=geo-tile-layer data-tile-layer="'+e.toFixed()+'"/>').get(0),A.canvas().append(t)),t}},this._updateSubLayers=function(e,t){var n=A.canvas(),i=parseInt(n.attr("lastlevel"),10),o=parseInt(n.attr("lastoffsetx")||0,10),a=parseInt(n.attr("lastoffsety")||0,10);if(i===e&&Math.abs(o-t.left)<65536&&Math.abs(a-t.top)<65536)return{x:o,y:a};var s=A.map(),l=A._tileOffset(e),u=parseInt((t.left+t.right-s.size().width)/2+l.x,10),c=parseInt((t.top+t.bottom-s.size().height)/2+l.y,10);return n.find(".geo-tile-layer").each((function(t,n){var i=r(n),o=parseInt(i.data("tileLayer"),10);i.css("transform","scale("+Math.pow(2,e-o)+")");var a=parseInt(u/Math.pow(2,e-o),10),s=parseInt(c/Math.pow(2,e-o),10),l=a-parseInt(i.attr("offsetx")||0,10),d=s-parseInt(i.attr("offsety")||0,10);i.attr({offsetx:a,offsety:s}),i.find(".geo-tile-container").each((function(e,t){r(t).css({left:parseInt(r(t).css("left"),10)-l+"px",top:parseInt(r(t).css("top"),10)-d+"px"})}))})),n.attr({lastoffsetx:u,lastoffsety:c,lastlevel:e}),{x:u,y:c}},this._update=function(e){if(e&&e.event&&(e.event.event===s.zoom||e.event.event===s.rotate))return A;if(!A.visible())return A;var t,n=A.map(),i=n.bounds(void 0,null),o=n.zoom(),a=A._options.tileRounding(o);if(A._updateSubLayers){var l=A._getViewBounds(),u=A._updateSubLayers(a,l)||{x:0,y:0},c=A._tileOffset(a);if(null===A.renderer()){var d=Math.pow(2,o-a),f=n.rotation(),p=-c.x+-(l.left+l.right)/2+u.x,h=-c.y+-(l.bottom+l.top)/2+u.y,g=p+n.size().width/2,v=h+n.size().height/2;A.canvas().css({"transform-origin":-p+"px "+-h+"px"});var y="translate("+g+"px,"+v+"px)scale("+d+")";f&&(y+="rotate("+180*f/Math.PI+"deg)"),A.canvas().css("transform",y)}A.canvas().attr({scale:Math.pow(2,o-a),dx:-c.x+-(l.left+l.right)/2,dy:-c.y+-(l.bottom+l.top)/2,offsetx:u.x,offsety:u.y,rotation:n.rotation()})}if(void 0===(t=A._getTiles(a,i,!0,!0)))return A;if(A._tileTree={},t.forEach((function(e){if(e.fetched())delete S[e.toString()],A.drawTile(e),A._setTileTree(e);else{if(e._queued)(A._queue?A._queue.get(e):-1)>=0&&A._queue.add(e);else e.then((function(){if(!m&&e===A.cache.get(e.toString())){var t=n.zoom(),r=A._options.tileRounding(t),i=A._getViewBounds();A._canPurge(e,i,r)?A.remove(e):(A.drawTile(e),A._setTileTree(e))}})),e._queued=!0;A.addPromise(e),S[e.toString()]=e}})),r.when.apply(r,t).done((function(){var e=A.map().zoom(),t=A._options.tileRounding(e);A._purge(t,!0)})),"all"!==A._options.idleAfter)for(var b in S){var x=S[b];t.indexOf(x)<0&&(A.removePromise(x),delete S[b])}return A},this._setTileTree=function(e){if(!A._options.keepLower){var t=e.index;A._tileTree[t.level]=A._tileTree[t.level]||{},A._tileTree[t.level][t.x]=A._tileTree[t.level][t.x]||{},A._tileTree[t.level][t.x][t.y]=e}},this._getTileTree=function(e){return((A._tileTree[e.level]||{})[e.x]||{})[e.y]||null},this._isCovered=function(e){var t=e.index.level,n=e.index.x,r=e.index.y,i=[];return(i=A._getTileTree({level:t-1,x:Math.floor(n/2),y:Math.floor(r/2)}))?[i]:(i=[A._getTileTree({level:t+1,x:2*n,y:2*r}),A._getTileTree({level:t+1,x:2*n+1,y:2*r}),A._getTileTree({level:t+1,x:2*n,y:2*r+1}),A._getTileTree({level:t+1,x:2*n+1,y:2*r+1})]).every((function(e){return null!==e}))?i:null},this._outOfBounds=function(e,t){var n=A._tileOffset(e.index.level),r=1;return e.index.level!==t.level&&(r=Math.pow(2,(t.level||0)-(e.index.level||0))),(e.bottom-n.y)*r<t.top||(e.left-n.x)*r>t.right||(e.top-n.y)*r>t.bottom||(e.right-n.x)*r<t.left},this._canPurge=function(e,t,n,r){if(A._options.keepLower){if((n=n||0)<e.index.level&&e.index.level!==A._options.minLevel)return!0;if(e.index.level===A._options.minLevel&&!A._options.wrapX&&!A._options.wrapY)return!1}else if((r||A._isCovered(e))&&n!==e.index.level&&(n>=A._options.minLevel||e.index.level!==A._options.minLevel)&&(n<A._options.maxLevel||e.index.level!==A._options.maxLevel))return!0;return!!t&&A._outOfBounds(e,t)},this.displayToLevel=function(e,t){var n,r=A.map(),i=r.zoom(),o=A._options.tileRounding(i),a=r.unitsPerPixel(void 0===t?o:t);if(void 0===e){var s=r.size();e={x:s.width/2,y:s.height/2}}try{n=r.displayToGcs(e,A._options.gcs||null)}catch(e){n={x:0,y:0}}return{x:n.x/a,y:A._topDown()*n.y/a}},this.url=function(e){return void 0===e?A._options.originalUrl:(e===A._options.originalUrl||(A._options.originalUrl=e,"string"===r.type(e)&&(e=a(e)),A._options.url=e,A.reset(),A.map().draw()),A)},this.subdomains=function(e){return void 0===e?A._options.subdomains:(e&&("string"===r.type(e)&&(e=e.indexOf(",")>=0?e.split(","):e.split("")),A._options.subdomains=e,A.reset(),A.map().draw()),A)},this._tileOffset=function(e){return void 0===T[e]&&(T[e]=A._options.tileOffset(e)),T[e]},this.visible=function(e){return void 0===e?b():(A.visible()!==e&&(b(e),e&&A._update()),A)},Object.defineProperty(this,"baseQuad",{get:function(){return A._options.baseQuad},set:function(e){A._options.baseQuad=e,A._update()}}),this._addBaseQuadToTiles=function(e,t){e&&(this.baseQuad!==g&&(g&&t.splice(0,1),(g=this.baseQuad)&&(t.splice(0,0,this.baseQuad),e.cacheUpdate(0)),e.data(t)),e._update())},this._init=function(){var e;if(v.apply(A,arguments),null===A.renderer())for(e=0;e<=A._options.maxLevel;e+=1)A._getSubLayer(e);return A},this._exit=function(){return A.reset(),y.apply(A,arguments),m=!0,this._queue&&this._queue._tileLayers&&this._queue._tileLayers.indexOf(A)>=0&&this._queue._tileLayers.splice(this._queue._tileLayers.indexOf(A),1),A},d("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(e){return{x:0,y:0}},tilesMaxBounds:null,topDown:!1,keepLower:!0,idleAfter:"view",tileRounding:Math.round,attribution:"",animationDuration:0},r(s,i),e.exports=s},6618:function(e){var t=0;e.exports=function e(){"use strict";if(!(this instanceof e))return new e;var n=this,r=0;return this.modified=function(){return r=t+=1,n},this.timestamp=function(){return r},this.getMTime=this.timestamp,this}},6223:function(e,t,n){var r=n(5699),i=n(6837),o=n(4647),a=n(4634),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638),s=n(6853);t=t||{},i.call(this,t);var l,u,c,d,f,p=this,h={},m={startTime:void 0!==t.startTime?t.startTime:null,endTime:void 0!==t.endTime?t.endTime:null,duration:void 0!==t.duration?t.duration:null,start:0,end:0},g=this.draw,v=this._exit,y=this._init,b=this.modified,x=this.style,w=this._update;return this.featureType="track",this._linePosition=function(e){return function(t,n,r,i){var o=m.timeFunc(t,n,r,i);return"past"===e&&o>=m.start||"current"===e&&o<m.start?m.startPosition[i]:"current"===e&&o>m.end||"future"===e&&o<m.end?m.endPosition[i]:m.positionFunc(t,n,r,i)}},this._headPosition=function(e,t){return m.endPosition[t]},this._headText=function(e,t){return m.text[t]},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(e,t,n){p.dataTime().timestamp()>=p.buildTime().timestamp()&&p._build(),t=null===t?p.layer().map().gcs():void 0===t?p.gcs():t;var r=s({source:p.gcs(),target:t}),i=p.data(),o=[],a=i.map((function(t,n){var r=m.trackFunc(t,n);if(o.push(r),!r.length)return{x:0,y:0,z:0,posidx:-1};var i,a,s,l,u=0,c=r.length-1;if(1===r.length)return{posidx:u,angidx0:u,angidx1:u};if((i=m.timeFunc(r[u],u,t,n))>=e)return{posidx:u,angidx0:u,angidx1:u+1};if((a=m.timeFunc(r[c],c,t,n))<=e)return{posidx:c,angidx0:c-1,angidx1:c};for(;c-u>1;){if(s=Math.floor((c+u)/2),(l=m.timeFunc(r[s],s,t,n))===e)return{posidx:s,angidx0:s-1,angidx1:s+1};l<e?(i=l,u=s):(a=l,c=s)}var d=(e-i)/(a-i);return{posidx0:u,posidx1:c,factor0:1-d,factor1:d,angidx0:u,angidx1:c}}));return a.forEach((function(e,t){var i,a,s;e.posidx<0||(void 0===e.posidx1?i=m.positionFunc(o[t][e.posidx],e.posidx,o[t],t):(a=r.forward(m.positionFunc(o[t][e.posidx0],e.posidx0,o[t],t),!0),s=r.forward(m.positionFunc(o[t][e.posidx1],e.posidx1,o[t],t),!0),i=r.inverse({x:a.x*e.factor0+s.x*e.factor1,y:a.y*e.factor0+s.y*e.factor1,z:(a.z||0)*e.factor0+(s.z||0)*e.factor1},!0)),e.x=i.x,e.y=i.y,e.z=i.z||0,n&&(void 0===e.posidx1&&(a=r.forward(e.angidx0===e.posidx?i:m.positionFunc(o[t][e.angidx0],e.angidx0,o[t],t),!0),s=r.forward(e.angidx1===e.posidx?i:m.positionFunc(o[t][e.angidx1],e.angidx1,o[t],t),!0)),e.angle=Math.atan2(s.y-a.y,s.x-a.x)))})),a},this._build=function(){p.buildTime().modified(),l||(l={past:p.layer().createFeature("line"),future:p.layer().createFeature("line"),current:p.layer().createFeature("line")},p.dependentFeatures([l.past,l.current,l.future]));var e=p.data();m.data=e,m.timeFunc=p.style.get("time"),m.positionFunc=p.style.get("position"),m.trackFunc=p.style.get("track"),m.textFunc=p.style.get("text"),["past","current","future"].forEach((function(t){l[t].style(p.style()).style(p[t+"Style"]()).line(p.style("track")).gcs(p.gcs()).data(e).position(p._linePosition(t))}));var t,n,r={};if(e.forEach((function(e,t){var n,i=m.trackFunc(e,t);i.length&&(n=m.timeFunc(i[0],0,e,t),(void 0===r.start||n<r.start)&&(r.start=n),i.length>1&&(n=m.timeFunc(i[i.length-1],i.length-1,e,t)),(void 0===r.end||n>r.end)&&(r.end=n))})),m.timeExtents=r,p._updateTimeRange(),m.startPosition=p.calculateTimePosition(m.start,null),m.endPosition=p.calculateTimePosition(m.end,null,!0),m.text=e.map((function(e,r){var i=m.textFunc(e,r);return t|=null==i,null==i||""===i?"":(n=!0,m.startPosition[r].posidx<0&&(i=""),i)})),t&&!c){if(!(o.registries.features[p.layer().rendererName()]||{}).marker){var i=o.rendererForFeatures(["marker"]);u=o.createLayer("feature",p.layer().map(),{renderer:i}),p.layer().addChild(u),p.layer().node().append(u.node())}c=(u||p.layer()).createFeature("marker");var a=p.dependentFeatures();a.push(c),p.dependentFeatures(a)}if(n&&!f){if(!(o.registries.features[p.layer().rendererName()]||{}).text){var s=o.rendererForFeatures(["text"]);d=o.createLayer("feature",p.layer().map(),{renderer:s}),p.layer().addChild(d),p.layer().node().append(d.node())}f=(d||p.layer()).createFeature("text");var h=p.dependentFeatures();h.push(f),p.dependentFeatures(h)}if(c){c.headData=m.endPosition,c.style(p.markerStyle()).gcs(p.gcs()).data(e).position(p._headPosition);var g=c.style.get("radius");c.style("radius",(function(e,t){return m.text[t]||m.startPosition[t].posidx<0?0:g(e,t)}))}return f&&(f.headData=m.endPosition,f.style(p.textStyle()).gcs(p.gcs()).data(e).text(p._headText).position(p._headPosition)),p},this._updateTimeAndPosition=function(){l&&(p._updateTimeRange(),m.startPosition=p.calculateTimePosition(m.start,null),m.endPosition=p.calculateTimePosition(m.end,null,!0),l.past.modified(),l.current.modified(),l.future.modified(),c&&c.modified(),f&&f.modified(),p.updateTime().modified(),p.modified())},this._update=function(){return w.call(p),(p.dataTime().timestamp()>=p.buildTime().timestamp()||p.updateTime().timestamp()<=p.timestamp())&&p._build(),p.updateTime().modified(),p},this.draw=function(){var e=g();return l&&(l.past.draw(),l.current.draw(),l.future.draw()),c&&c.draw(),f&&f.draw(),e},this.modified=function(){var e=b();return l&&(l.past.modified(),l.current.modified(),l.future.modified()),c&&c.modified(),f&&f.modified(),e},this.style=function(e,t,n){return"style"===(n=n||"style")?x(e,t):void 0===e?h[n]:"string"==typeof e&&void 0===t?(h[n]||{})[e]:(void 0===h[n]&&(h[n]={}),void 0===t?h[n]=r.extend(!0,h[n],e):h[n][e]=t,p.modified(),p)},this.style.get=x.get,["markerStyle","textStyle","pastStyle","currentStyle","futureStyle"].forEach((function(e){p[e]=function(t,n){return p.style(t,n,e)}})),this.track=function(e){return void 0===e?p.style("track"):(p.style("track",e),p.dataTime().modified(),p.modified(),p)},this.position=function(e){return void 0===e?p.style("position"):(p.style("position",e),p.dataTime().modified(),p.modified(),p)},this.time=function(e){return void 0===e?p.style("time"):(p.style("time",e),p.dataTime().modified(),p.modified(),p)},this.timeRange=function(e){if(void 0===e)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 t=!1;return void 0!==e.startTime&&e.startTime!==m.startTime&&(m.startTime=null===e.startTime?e.startTime:+e.startTime,t=!0),void 0!==e.endTime&&e.endTime!==m.endTime&&(m.endTime=null===e.endTime?e.endTime:+e.endTime,t=!0),void 0!==e.duration&&e.duration!==m.duration&&(m.duration=null===e.duration?e.duration:+e.duration,t=!0),t&&p._updateTimeAndPosition(),p},this.startTime=function(e){return void 0===e?m.startTime:(e!==m.startTime&&(m.startTime=null===e?e:+e,p._updateTimeAndPosition()),p)},this.endTime=function(e){return void 0===e?m.endTime:(e!==m.endTime&&(m.endTime=null===e?e:+e,p._updateTimeAndPosition()),p)},this.duration=function(e){return void 0===e?m.duration:(e!==m.duration&&(m.duration=null===e?e:+e,p._updateTimeAndPosition()),p)},this._mergeSearchResults=function(e,t){return e.extra=e.extra||{},t.forEach((function(t){return t.value.index.forEach((function(n,r){e.index.indexOf(n)<0&&(e.index.push(n),e.found.push(t.value.found[r]),e.where=e.where||{},t.value.extra&&t.value.extra[n]&&(e.extra[n]=t.value.extra[n]),a.isObject(e.extra[n])||(e.extra[n]={value:e.extra[n]}),e.extra[n].where=t.key)}))})),e},this.pointSearch=function(e){var t=l.current.pointSearch(e),n=l.past.pointSearch(e),r=l.future.pointSearch(e),i=c?c.pointSearch(e):{index:[]};return this._mergeSearchResults(t,[{key:"marker",value:i},{key:"past",value:n},{key:"future",value:r}])},this.polygonSearch=function(e,t){var n=l.current.polygonSearch(e,t),r=l.past.polygonSearch(e,t),i=l.future.polygonSearch(e,t),o=c?c.polygonSearch(e,t):{index:[]};return this._mergeSearchResults(n,[{key:"marker",value:o},{key:"past",value:r},{key:"future",value:i}])},this._exit=function(){l&&p.layer()&&(p.layer().deleteFeature(l.past),p.layer().deleteFeature(l.current),p.layer().deleteFeature(l.future)),l=null,(u||p.layer())&&c&&(u||p.layer()).deleteFeature(c),u&&p.layer()&&p.layer().removeChild(u),u=null,(d||p.layer())&&f&&(d||p.layer()).deleteFeature(f),d&&p.layer()&&p.layer().removeChild(d),d=null,p.dependentFeatures([]),v()},this._init=function(e){e=e||{},y.call(p,e);var t=r.extend(!0,{},{track:function(e){return e},position:function(e){return e},time:function(e,t){return void 0!==e.t?e.t:t}},void 0===e.style?{}:e.style),n=r.extend(!0,{},{rotateWithMap:!0,rotation:function(e,t){return-m.endPosition[t].angle||0}},void 0===e.markerStyle?{}:e.markerStyle),i=r.extend(!0,{},{rotateWithMap:!0,rotation:function(e,t){return void 0!==m.endPosition[t].angle?-m.endPosition[t].angle+Math.PI/2:0}},void 0===e.textStyle?{}:e.textStyle),o=r.extend(!0,{},{strokeOpacity:.25},void 0===e.pastStyle?{}:e.pastStyle),a=r.extend(!0,{},{},void 0===e.currentStyle?{}:e.currentStyle),s=r.extend(!0,{},{strokeOpacity:.25},void 0===e.futureStyle?{}:e.futureStyle);["track","position","time"].forEach((function(n){void 0!==e[n]&&(t[n]=e[n])})),p.style(t),p.markerStyle(n),p.textStyle(i),p.pastStyle(o),p.currentStyle(a),p.futureStyle(s)},this};r(s,i),e.exports=s},6853:function(e,t,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(e){r.Proj.projections.add(s(e))}));var l={},u=/^(.* |)\\+axis=e(n|s)u(| .*)$/,c=/(^|\s)\+(s[1-3][1-3]|[xyz]off)=\S/,d=function e(t){"use strict";if(!(this instanceof e))return(t=t||{}).source in l||(Object.keys(l).length>=10&&(l={}),l[t.source]={}),t.target in l[t.source]||(Object.keys(l[t.source]).length>=10&&(l[t.source]={}),l[t.source][t.target]=new e(t)),l[t.source][t.target];var n,s,u,d,f,p,h,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(e){if(!c.exec(e))return{proj:e};var t,n,r=a.mat4AsArray(),i=[];return e.split(/(\s+)/).forEach((function(e){var t=/^\+(s[1-3][1-3]|[xyz]off)=(.*)$/.exec(e);t?r[g[t[1]]]=parseFloat(t[2]):i.push(e)})),n={proj:i.join(" "),orig:e},(t=o.invert(a.mat4AsArray(),r))?(n.matrix=r,n.inverse=t):console.warn("Affine transform is not invertable and will not be used: "+e),n}function y(){var e=v(m.source()),t=v(m.target()),i=e.proj,o=t.proj;d=e.matrix,f=e.inverse,p=t.matrix,h=t.inverse,n=new r(i,o)}this.source=function(e){return void 0===e?s||"EPSG:4326":(s=e,y(),m)},this.target=function(e){return void 0===e?u||"EPSG:3857":(u=e,y(),m)},this._forward=function(e){if(d){var t=i.transformMat4(a.vec3AsArray(),[e.x,e.y,e.z||0],f);e={x:t[0],y:t[1],z:t[2]}}var r=n.forward(e,!0);if(r.z=e.z||0,p){var o=i.transformMat4(a.vec3AsArray(),[r.x,r.y,r.z],p);r={x:o[0],y:o[1],z:o[2]}}return r},this._inverse=function(e){if(p){var t=i.transformMat4(a.vec3AsArray(),[e.x,e.y,e.z||0],h);e={x:t[0],y:t[1],z:t[2]}}var r=n.inverse(e,!0);if(r.z=e.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.forward=function(e){return Array.isArray(e)?e.map(m._forward):m._forward(e)},this.inverse=function(e){return Array.isArray(e)?e.map(m._inverse):m._inverse(e)},t=t||{};try{this.source(t.source)}catch(e){console.error("Can't use transform source: "+t.source),this.source("EPSG:4326")}try{this.target(t.target)}catch(e){console.error("Can't use transform target: "+t.target),this.target("EPSG:3857")}return this};d.defs=r.defs,d.lookup=function(e){var t,i,o=n(5638),a=o.Deferred();return r.defs.hasOwnProperty(e)?a.resolve(r.defs[e]):2!==(i=e.split(":")).length||"EPSG"!==i[0].toUpperCase()?a.reject("Invalid projection code").promise():(t=i[1],o.ajax({url:"https://epsg.io/?q="+t+"&format=json"}).done((function(t){var n=(t.results||[])[0];return n&&n.proj4?(r.defs(e,n.proj4),o.when(r.defs[e])):a.reject(t).promise()})))},d.transformCoordinates=function(e,t,n,r){"use strict";if(e===t||Array.isArray(n)&&!n.length)return n;if(Array.isArray(n)&&n.length>=3&&3===r&&!a.isObject(n[0])&&!c.test(e)&&!c.test(t))return d.transformCoordinatesFlatArray3(e,t,n);if(Array.isArray(n)&&n.length&&a.isObject(n[0])&&"x"in n[0]&&"y"in n[0]){var i=e.match(u),o=t.match(u);if(i&&o&&i[1]===o[1]&&i[3]===o[3])return"z"in n[0]?n.map((function(e){return{x:+e.x,y:-e.y,z:+e.z||0}})):n.map((function(e){return{x:+e.x,y:-e.y}}))}var s,l=d({source:e,target:t});return a.isObject(n)&&"x"in n&&"y"in n?(s=l.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=l.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}]):d.transformCoordinatesArray(l,n,r)},d.transformCoordinatesArray=function(e,t,n){var r,i,o,s,l,u,c,d,f,p={};function h(){if(Array.isArray(t[0]))if(2===t[0].length)s=function(e){return+t[e][0]},l=function(e){return+t[e][1]},c=function(e,t,n){d[e]=[t,n]};else{if(3!==t[0].length)throw new Error("Invalid coordinates. Requires two or three components per array");s=function(e){return+t[e][0]},l=function(e){return+t[e][1]},u=function(e){return+t[e][2]},c=function(e,t,n,r){d[e]=[t,n,r]}}else if(2===t.length)o=2,s=function(e){return+t[e*o]},l=function(e){return+t[e*o+1]},c=function(e,t,n){d[e]=t,d[e+1]=n};else if(3===t.length)o=3,s=function(e){return+t[e*o]},l=function(e){return+t[e*o+1]},u=function(e){return+t[e*o+2]},c=function(e,t,n,r){d[e]=t,d[e+1]=n,d[e+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(e){return+t[e]},l=function(e){return+t[e+1]},2===n?c=function(e,t,n){d[e]=t,d[e+1]=n}:(u=function(e){return+t[e+2]},c=function(e,t,n,r){d[e]=t,d[e+1]=n,d[e+2]=r})}}if(u=function(){return 0},!Array.isArray(t))throw new Error("Coordinates are not valid");if((d=[]).length=t.length,i=t.length,!t.length)return d;for(Array.isArray(t[0])||a.isObject(t[0])?(o=1,Array.isArray(t[0])?h():a.isObject(t[0])&&function(){if(!(t[0]&&"x"in t[0]&&"y"in t[0]))throw new Error("Invalid coordinates");s=function(e){return+t[e].x},l=function(e){return+t[e].y},"z"in t[0]?(u=function(e){return+t[e].z},c=function(e,t,n,i){d[r]={x:t,y:n,z:i}}):c=function(e,t,n){d[e]={x:t,y:n}}}()):h(),r=0;r<i;r+=o)p.x=s(r),p.y=l(r),p.z=u(r),f=e.forward(p,!0),c(r,f.x,f.y,f.z);return d},d.transformCoordinatesFlatArray3=function(e,t,n){"use strict";var i,o=e.match(u),a=t.match(u);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,l=r.Proj(e),c=r.Proj(t),d={},f=new r(l,c);for(i=n.length-3;i>=0;i-=3)d.x=+n[i],d.y=+n[i+1],d.z=+(n[i+2]||0),s=f.forward(d,!0),n[i]=s.x,n[i+1]=s.y,n[i+2]=void 0===s.z?d.z:s.z;return n},d.affineForward=function(e,t){"use strict";var n,r=e.origin,i=e.scale||{x:1,y:1,z:1};for(n=0;n<t.length;n+=1)t[n].x=(t[n].x-r.x)*i.x,t[n].y=(t[n].y-r.y)*i.y,t[n].z=((t[n].z||0)-(r.z||0))*i.z;return t},d.affineInverse=function(e,t){"use strict";var n,r=e.origin,i=e.scale||{x:1,y:1,z:1};for(n=0;n<t.length;n+=1)t[n].x=t[n].x/i.x+r.x,t[n].y=t[n].y/i.y+r.y,t[n].z=(t[n].z||0)/i.z+(r.z||0);return t},d.sphericalDistance=function(e,t,n,i,o){if(i=i||"EPSG:4326",o=o||r.WGS84,(n=n||i)!==i){var a=d.transformCoordinates(n,i,[e,t]);e=a[0],t=a[1]}var s=e.y*Math.PI/180,l=t.y*Math.PI/180,u=(t.x-e.x)*Math.PI/180,c=Math.sin(s),f=Math.cos(s),p=Math.sin(l),h=Math.cos(l),m=Math.atan2(Math.pow(Math.pow(h*Math.sin(u),2)+Math.pow(f*p-c*h*Math.cos(u),2),.5),c*p+f*h*Math.cos(u));return o.a*m},d.vincentyDistance=function(e,t,n,i,o,a){if(i=i||"EPSG:4326",o=o||r.WGS84,a=a||100,(n=n||i)!==i){var s=d.transformCoordinates(n,i,[e,t]);e=s[0],t=s[1]}var l,u,c,f,p,h,m,g,v,y,b=o.a,x=o.b||o.a*(1-(o.f||1/o.rf)),w=o.f||(o.rf?1/o.rf:1-x/b),_=e.y*Math.PI/180,S=t.y*Math.PI/180,C=((t.x-e.x)%360+360)%360*Math.PI/180,A=Math.atan((1-w)*Math.tan(_)),T=Math.atan((1-w)*Math.tan(S)),P=Math.sin(A),E=Math.cos(A),O=Math.sin(T),M=Math.cos(T),D=C,k=C+2*Math.PI;if(_===S&&!C)return{distance:0,alpha1:0,alpha2:0};for(y=a;y>0&&Math.abs(D-k)>1e-12;y-=1)l=Math.pow(Math.pow(M*Math.sin(D),2)+Math.pow(E*O-P*M*Math.cos(D),2),.5),u=P*O+E*M*Math.cos(D),c=Math.atan2(l,u),f=E*M*Math.sin(D)/l,k=D,D=C+(1-(m=w/16*(p=1-Math.pow(f,2))*(4+w*(4-3*p))))*w*f*(c+m*l*((h=u-(p?2*P*O/p:0))+m*u*(2*Math.pow(h,2)-1)));return y?{distance:x*(1+(g=p*(b*b-x*x)/(x*x))/16384*(4096+g*(g*(320-175*g)-768)))*(c-(v=g/1024*(256+g*(g*(74-47*g)-128)))*l*(h+v/4*(u*(2*Math.pow(h,2)-1)-v/6*h*(4*l*l-3)*(4*Math.pow(h,2)-3)))),alpha1:Math.atan2(M*Math.sin(D),E*O-P*M*Math.cos(D)),alpha2:Math.atan2(E*Math.sin(D),-P*M+E*O*Math.cos(D))}:void 0},d.proj4=r,e.exports=d},3762:function(e){e.exports={}},9219:function(e,t,n){var r=n(2531).d3,i=n(9450),o=n(5699),a=n(4647).registerWidget,s=n(4634),l=n(1946);n(2352);var u=function e(t){"use strict";if(!(this instanceof e))return new e(t);i.call(this,t);var n=this,o=[],a=t.width||300,u=t.ticks||6,d=this._init;return this._init=function(){d();var e=n.canvas();r.select(e).attr("class","color-legend-container"),n.popup=r.select(e).append("div").attr("class","color-legend-popup"),t.categories&&n.categories(t.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 e=r.select(n.canvas()).append("div").attr("class","geojs-color-legends"),t=a;o.forEach((function(r,i){var o=e.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:t,height:"40px",viewBox:"-20 0 "+t+" 40"});"discrete"===r.type?n._drawDiscrete(a,t-40,r):"continuous"===r.type&&n._drawContinous(a,t-40,r)}))}else r.select(n.canvas()).style("display","none")},this.categories=function(e){return void 0===e?o:(o=n._prepareCategories(e),n._draw(),n)},this.addCategories=function(e){return o=o.concat(n._prepareCategories(e)),n._draw(),n},this.removeCategories=function(e){return o=o.filter((function(t){return-1===e.indexOf(t)})),n._draw(),n},this._prepareCategories=function(e){return e.forEach((function(e){e.color=e.colors.map((function(e){return s.convertColorToHex(e,!0)}))})),e},this._drawDiscrete=function(e,t,i){if(-1===["linear","log","sqrt","pow","quantile","ordinal"].indexOf(i.scale))throw new Error("unsupported scale");var o,a,l,d,f,p,h;if("ordinal"===i.scale)l=r.scale.ordinal().domain(i.domain).range(i.colors),n._renderDiscreteColors(e,i.domain,l,t,(function(e){return e})),d=r.scale.ordinal().domain(i.domain).rangeRoundBands([0,t]),f=r.svg.axis().scale(d).tickValues((function(){var e=Math.ceil(i.domain.length/u);return i.domain.filter((function(t,n){return n%e==0}))}));else if("quantile"===i.scale){o=[0,i.colors.length],p=s.range(0,i.colors.length-1),a=r.scale.quantile().domain(i.domain).range(p),l=r.scale.quantize().domain(o).range(i.colors),n._renderDiscreteColors(e,p,l,t,(function(e){return a.invertExtent(e).join(" - ")}));var m=[a.invertExtent(0)[0]];m=m.concat(p.map((function(e){return a.invertExtent(e)[1]}))),f=v(d=r.scale.ordinal().domain(m).rangePoints([0,t]))}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(),l=r.scale.quantize().domain(o).range(i.colors),p=s.range(0,i.colors.length-1);var g=Math.max.apply(null,i.domain.map((function(e){return c(e)})));n._renderDiscreteColors(e,p,l,t,(function(e){return n._popupFormatter(a.invert(e),g)+" - "+n._popupFormatter(a.invert(e+1),g)})),(h=p.slice()).push(i.colors.length),f=v(d=r.scale.ordinal().domain(h.map((function(e){return a.invert(e)}))).rangePoints([0,t]))}function v(e){return r.svg.axis().scale(e).tickFormat(r.format(".2s")).tickValues((function(){var t=Math.ceil(e.domain().length/u);return e.domain().filter((function(e,n){return n%t==0}))}))}i.endAxisLabelOnly&&f.tickValues([d.domain()[0],d.domain()[d.domain().length-1]]),n._renderAxis(e,f)},this._renderDiscreteColors=function(e,t,r,i,o){e.selectAll("rect").data(t).enter().append("rect").attr("width",i/t.length).attr("height","20px").attr("fill",(function(e){return r(e)})).attr("transform",(function(e,n){return"translate("+n*i/t.length+" ,0)"})).on("mousemove",(function(e){n._showPopup(o(e))})).on("mouseout",n._hidePopup)},this._drawContinous=function(e,t,i){var o,a,s;if(-1===["linear","log","sqrt","pow"].indexOf(i.scale))throw new Error("unsupported scale");var d=[0];for(s=1;s<i.domain.length-1;s++)d.push(t/(i.domain.length-1)*s);d.push(t),o=r.scale[i.scale]().domain(i.domain).range(d).nice(),"log"===i.scale&&i.base&&o.base(i.base),"pow"===i.scale&&i.exponent&&o.exponent(i.exponent);var f=l(),p=Math.max.apply(null,i.domain.map((function(e){return c(e)}))),h=e.append("defs").append("linearGradient").attr("id","gradient"+f);for(h.append("stop").attr("offset","0%").attr("stop-color",i.colors[0]),s=1;s<i.colors.length-1;s++)h.append("stop").attr("offset",(100/(i.colors.length-1)*s).toFixed(6)+"%").attr("stop-color",i.colors[s]);h.append("stop").attr("offset","100%").attr("stop-color",i.colors[i.colors.length-1]),e.append("rect").attr("fill","url(#gradient"+f+")").attr("width",t).attr("height","20px").on("mousemove",(function(){var e=o.invert(r.mouse(this)[0]),t=n._popupFormatter(e,p);n._showPopup(t)})).on("mouseout",n._hidePopup),a=r.svg.axis().scale(o).ticks(u,".2s"),i.endAxisLabelOnly&&a.tickValues([i.domain[0],i.domain[i.domain.length-1]]),n._renderAxis(e,a)},this._renderAxis=function(e,t){e.append("g").attr("class","axis x").attr("transform","translate(0, 20)").call((function(e){e.call(t)}))},this._popupFormatter=function(e,t){return e=parseFloat(e.toFixed(8)),t=Math.min(t,c(e)),t=Math.min(t,Math.max(3,7-Math.trunc(e).toString().length)),r.format("."+t+"f")(e)},this._showPopup=function(e){var t=r.mouse(n.canvas());n.popup.text(e);var i=n.canvas().clientWidth,o=n.popup[0][0].clientWidth;n.popup.style({left:t[0]-(t[0]+o-i>-10?o:0)+"px",top:t[1]-22+"px"}).transition().duration(200).style("opacity",1)},this._hidePopup=function(){n.popup.transition().duration(200).style("opacity",0)},this};function c(e){if(!isFinite(e))return 0;for(var t=1,n=0;Math.round(e*t)/t!==e;){if(!isFinite(e*t))return 0;t*=10,n++}return n}o(u,i),a("dom","colorLegend",u),e.exports=u},9450:function(e,t,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var n=this;return this._init=function(){return t.hasOwnProperty("parent")&&t.parent.addChild(n),n._createCanvas(),n._appendCanvasToParent(),n.canvas().addEventListener("mousedown",(function(e){e.stopPropagation()})),n.reposition(),n},this._createCanvas=function(){n.canvas(document.createElement(t.el||"div"))},this};i(a,r),o("dom","dom",a),e.exports=a},253:function(e,t,n){e.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(e,t,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var i=n(2531).d3,o=n(5108),a=this,s=[],l=null,u=null,c=null;this.categories=function(e){return void 0===e?s.slice():(s=e.slice().map((function(e){return"line"===e.type&&(e.style.fill=!1,e.style.stroke=!0),e})),a.draw(),a)},this.size=function(){var e,t=1,n=i.select(a.canvas()).append("text").style("opacity",1e-6);return s.forEach((function(e){n.text(e.name),t=Math.max(t,n.node().getBBox().width)})),n.remove(),e=20*(s.length+1),{width:t+50,height:e}},this.draw=function(){function e(e){e.style("fill",(function(e){return e.style.fill||void 0===e.style.fill?e.style.fillColor:"none"})).style("fill-opacity",(function(e){return void 0===e.style.fillOpacity?1:e.style.fillOpacity})).style("stroke",(function(e){return e.style.stroke||void 0===e.style.stroke?e.style.strokeColor:"none"})).style("stroke-opacity",(function(e){return void 0===e.style.strokeOpacity?1:e.style.strokeOpacity})).style("stroke-width",(function(e){return void 0===e.style.strokeWidth?1.5:e.style.strokeWidth}))}a._init(),c.attr("height",a.size().height+24).style("display",null);var t=a._scale(),n=u.selectAll("g.geo-label").data(s,(function(e){return e.name})).enter().append("g").attr("class","geo-label").attr("transform",(function(e,n){return"translate(0,"+t.y(n)+")"}));return e(n.filter((function(e){return"point"!==e.type&&"line"!==e.type})).append("rect").attr("x",0).attr("y",-6).attr("rx",5).attr("ry",5).attr("width",40).attr("height",12)),e(n.filter((function(e){return"point"===e.type})).append("circle").attr("cx",20).attr("cy",0).attr("r",6)),e(n.filter((function(e){return"line"===e.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(e){return e.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(){l||(a._createCanvas(),a._appendCanvasToParent());var e=a.size().width+24+4,t=a.size().height+24+4;l&&l.remove(),i.select(a.canvas()).attr("width",e).attr("height",t),l=i.select(a.canvas()).append("g"),u=l.append("g").attr("transform","translate("+[14,14]+")"),c=u.append("rect").attr("x",-12).attr("y",-12).attr("width",e-4).attr("height",t-4).attr("rx",3).attr("ry",3).style({stroke:"black","stroke-width":"1.5px",fill:"white","fill-opacity":.75,display:"none"}),u.on("mousedown",(function(){i.event.stopPropagation()})),u.on("mouseover",(function(){c.transition().duration(250).style("fill-opacity",1)})),u.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),e.exports=a},3362:function(e,t,n){var r=n(5638),i=n(5699),o=n(9731),a=n(4647).registerWidget;n(4129);var s=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t);var i=n(5108),a=n(6853),s=n(4634),l=n(2531).d3,u=this,c=this._exit,d=r.extend({},{scale:1,maxWidth:200,maxHeight:"left"===t.orientation||"right"===t.orientation?200:20,orientation:"bottom",strokeWidth:2,tickLength:10,units:"si",distance:function(e,t,n){return"+proj=longlat +axis=enu"===n?Math.sqrt(s.distance2dSquared(e,t)):a.sphericalDistance(e,t,n)}},t);this._init=function(){return u._createCanvas(),u._appendCanvasToParent(),u.reposition(),l.select(u.canvas()).attr({width:d.maxWidth,height:d.maxHeight}),u.geoOn(i.pan,u._update),u._render(),u},this._exit=function(){u.geoOff(i.pan,u._update),c()},this._vertical=function(){return"left"===d.orientation||"right"===d.orientation},this._scaleValue=function(t,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}],l=(r=e.unitsTable[r]||r||e.unitsTable[d.units]||d.units)[0];return r.forEach((function(e){t>=e.scale*(e.minimum||1)&&(l=e)})),o=Math.floor(Math.log(t/l.scale)/Math.log(l.basis||10)),(s=l.multiples||s).forEach((function(e){var n=l.scale*e.multiple*Math.pow(10,o);n<=t&&(i=e,a=n)})),{html:(i.multiple*Math.pow(10,o)).toFixed(Math.max(0,-o+i.digits-1))+" "+l.unit,value:a,pixels:a/t*n,power:o,multiple:i,unitRecord:l,originalValue:t,originalPixels:n}},this._render=function(){var e,t,n,i,o,a,s=l.select(u.canvas()),c=u.layer().map(),f=d.maxWidth,p=d.maxHeight,h=d.strokeWidth,m=.5*h,g=d.tickLength,v=u._vertical();if(e=(v?d.maxHeight:d.maxWidth)-h,n={x:(t={x:(t=r(s[0][0]).offset()).left+("left"===d.orientation?f-m:m),y:t.top+("top"===d.orientation?p-m:m)}).x+(v?0:e),y:t.y+(v?e:0)},(i=d.distance(c.displayToGcs(t,null),c.displayToGcs(n,null),c.gcs())*d.scale)<=0||!isFinite(i))console.warn("The distance calculated for the scale is invalid: "+i);else{switch(o=u._scaleValue(i,e),v?p=o.pixels+h:f=o.pixels+h,s.attr({width:f,height:p}),s.select("polyline").empty()&&s.append("polyline").classed("geojs-scale-widget-bar",!0).attr({fill:"none","stroke-width":h}),s.select("text").empty()&&s.append("text").classed("geojs-scale-widget-text",!0),d.orientation){case"bottom":a=[[m,g],[m,m],[f-m,m],[f-m,g]],s.select("text").attr({x:f/2,y:2*h,"text-anchor":"middle","dominant-baseline":"hanging"});break;case"top":a=[[m,p-g],[m,p-m],[f-m,p-m],[f-m,p-g]],s.select("text").attr({x:f/2,y:p-2*h,"text-anchor":"middle","dominant-baseline":"alphabetic"});break;case"left":a=[[f-g,m],[f-m,m],[f-m,p-m],[f-g,p-m]],s.select("text").attr({x:f-2*h,y:p/2,"text-anchor":"end","dominant-baseline":"middle"});break;case"right":a=[[g,m],[m,m],[m,p-m],[g,p-m]],s.select("text").attr({x:2*h,y:p/2,"text-anchor":"start","dominant-baseline":"middle"})}s.select("polyline").attr("points",a.map((function(e){return e.join(",")})).join(" ")),s.select("text").html(o.html)}},this._update=function(){u._render()},this.options=function(e,t){if(void 0===e){var n=r.extend({},d);return n.position=u.position(void 0,!0),n}return"string"==typeof e&&void 0===t?"position"===e?u.position(void 0,!0):d[e]:(void 0===t?d=r.extend(!0,d,e):d[e]=t,(e.position||"position"===e)&&u.position(e.position||t),u._render(),u)}};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(e,t,n,r){if(null!=e){if(!Array.isArray(t)){if(!(n=n||s.unitsTable)||!n[t||"si"])return;t=n[t||"si"]}var i;for(i=0;i<t.length-1&&!(e<t[i+1].scale);i+=1);if(e/=(t=t[i]).scale,!((r=Math.max(0,-Math.ceil(Math.log10(e))+(void 0===r||r<0?3:r)))>10)){var o=e.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+" "+t.unit}}},a("dom","scale",s),e.exports=s},7093:function(e,t,n){var r=n(9731),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var i,o,a,s,l,u,c,d=n(2531).d3,f=n(5108),p=this,h=this._exit,m=t.width||20,g=t.height||160,v=t.width?.5*t.width:10;function y(e,t,n,r,i){var o=t.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",e).attr("class","geo-glyphicon"),o}c={white:"#f4f4f4",black:"#505050"},this.size=function(){return{width:m,height:g}},this._init=function(){p._createCanvas(),p._appendCanvasToParent(),p.reposition();var e=d.select(p.canvas()),t=p.layer().map();function n(n,r){var i=o.invert(d.mouse(e.node())[1]),a=t.zoomRange();i=(1-i)*(a.max-a.min)+a.min,r?t.transition({zoom:i,ease:d.ease("cubic-in-out"),duration:500,done:p._update()}):(t.zoom(i),p._update()),n.stopPropagation()}function r(){d.select(this).attr("filter",null),u.selectAll("circle,rect,path").transition().duration(100).style("fill",(function(e){return c[e.fill]||null})).style("stroke",(function(e){return c[e.stroke]||null}))}return e.attr("width",m).attr("height",g),i=d.scale.linear().domain([-4,4]).range([0,m]),o=d.scale.linear().domain([0,1]).range([1.5*m,g-1.5*m]),e=e.append("g").classed("geo-ui-slider",!0),u=e,(a=e.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 e=t.zoom();t.transition({zoom:e+1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.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=e.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 e=t.zoom();t.transition({zoom:e-1,ease:d.ease("cubic-in-out"),duration:500})})).on("mousedown",(function(){d.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}),e.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(d.event,!0)})),l=e.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(){d.select(document).on("mousemove.geo.slider",(function(){n(d.event)})),d.select(document).on("mouseup.geo.slider",(function(){n(d.event),d.select(document).on(".geo.slider",null)})),d.event.stopPropagation()})),u.selectAll("*").on("mouseover",(function(){d.select(this).attr("filter","url(#geo-highlight)"),u.selectAll("rect,path,circle").transition().duration(100).style("fill",(function(e){return e.fill||null})).style("stroke",(function(e){return e.stroke||null}))})).on("mouseout",r),p.geoOn(f.zoom,p._update),r(),p._update(),p},this._exit=function(){p.geoOff(f.zoom,p._update),u.remove(),h()},this._update=function(e){var t=p.layer().map(),n=t.zoomRange(),r=t.zoom(),i=d.scale.linear();r=(e=e||{}).value||r,i.domain([n.min,n.max]).range([1,0]).clamp(!0),l.attr("y",o(i(r))-v/2)}};i(a,r),o("dom","slider",a),e.exports=a},9731:function(e,t,n){var r=n(8123),i=n(5699),o=n(4647).registerWidget,a=function e(t){"use strict";if(!(this instanceof e))return new e(t);r.call(this,t);var i=n(2531),o=this,a=this._exit,s=null;return this._init=function(){var e;return t.hasOwnProperty("parent")&&(t.parent.addChild(o),e=t.parent.canvas()),o._createCanvas(e),o.canvas().addEventListener("mousedown",(function(e){e.stopPropagation()})),o.reposition(),o},this._exit=function(){s&&s._exit(),a()},this._createCanvas=function(e){var t={layer:o.layer(),widget:!0};e&&(t.d3Parent=e),(s=i(t))._resize=function(){},o.canvas(s.canvas()[0][0])},this};i(a,r),o("dom","svg",a),e.exports=a},6408:function(e,t,n){var r=n(5699),i=n(4647).registerLayer,o=n(9105),a=function e(t){"use strict";var r=n(4647).createWidget;if(t.renderer="dom",t.sticky=!1,!(this instanceof e))return new e(t);o.call(this,t);var i=this,a=this._exit;this.createWidget=function(e,t){var n=r(e,i,t);return t&&"parent"in t||i.addChild(n),n._init(t),i.modified(),n},this.deleteWidget=function(e){return e._exit(),i.removeChild(e),i.modified(),i},this._exit=function(){i.children().forEach((function(e){i.deleteWidget(e)})),a()}};r(a,o),i("ui",a),e.exports=a},8123:function(e,t,n){var r=n(5699),i=n(5358),o=n(5638),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},i.call(this,t);var r=n(5108),a=this,s=this._exit,l=t.layer,u=null,c=void 0===t.position?{left:0,top:0}:t.position;if(!(void 0===t.parent||t.parent instanceof e))throw new Error("Parent must be of type geo.gui.widget");t.parent&&a.parent(t.parent),this._init=function(){return a.modified(),a},this._exit=function(){if(a.children().forEach((function(e){a.removeChild(e),e._exit()})),a.layer().geoOff(r.pan,a.repositionEvent),a.parentCanvas().removeChild&&a.canvas())try{a.parentCanvas().removeChild(a.canvas())}catch(e){}s()},this.layer=function(){return l||a.parent()&&a.parent().layer()},this._createCanvas=function(){throw new Error("Must be defined in derived classes")},this.canvas=function(e){return void 0===e?u:(u=e,a)},this._appendCanvasToParent=function(){a.parentCanvas().appendChild(a.canvas())},this.parentCanvas=function(){return a.parent()?a.parent().canvas():a.layer().canvas()},this.position=function(e,t){if(void 0!==e){a.layer().geoOff(r.pan,a.repositionEvent);var n={};for(var i in c)c.hasOwnProperty(i)&&(n[i]=null);return(c=e).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")&&!t){var s=a.layer().map().gcsToDisplay(c);return{left:s.x,top:s.y,right:null,bottom:null}}return c},this.reposition=function(e){if(e=e||a.position(),a.canvas()&&a.canvas().style)for(var t in a.canvas().style.position="absolute",e)e.hasOwnProperty(t)&&(/^\s*(-|\+)?(\d+(\.\d*)?|\d*\.\d+)([eE](-|\+)?\d+)?\s*$/.test(e[t])?a.canvas().style[t]=parseFloat(parseFloat(e[t]).toFixed(3))+"px":a.canvas().style[t]=e[t]);return a},this.repositionEvent=function(){return a.reposition()},this.isInViewport=function(){var e=a.position(),t=a.layer();return e.left>=0&&e.top>=0&&e.left<=t.width()&&e.top<=t.height()},c.hasOwnProperty("x")&&c.hasOwnProperty("y")&&this.layer().geoOn(r.pan,a.repositionEvent)};r(a,i),e.exports=a},9808:function(e,t,n){var r=n(5638);function i(e,t,n){this._group=e,this._zoom=t,this._points=[],this._clusters=[],this._count=0,this._parent=null,this._coord=null;var r=this;(n||[]).forEach((function(e){r._add(e)}))}function o(e){var t,o,a=n(5844);for(this._opts=r.extend({maxZoom:18,radius:5},e),this._clusters={},this._points={},t=this._opts.maxZoom;t>=0;t-=1)o=this._opts.radius*Math.pow(2,-t),this._clusters[t]=new a(o),this._points[t]=new a(o);this._topClusterLevel=new i(this,-1)}i.prototype._add=function(e){var t=1;e instanceof i?(this._clusters.push(e),t=e._count):this._points.push(e),e._parent=this,this._increment(t)},i.prototype._increment=function(e){this._coord=null,this._count+=e,this._parent&&this._parent._increment(e)},i.prototype.count=function(){return this._count},i.prototype.each=function(e){var t;for(t=0;t<this._points.length;t+=1)e.call(this,this._points[t],this._zoom);for(t=0;t<this._clusters.length;t+=1)this._clusters[t].each.call(this._clusters[t],e)},i.prototype.coords=function(){var e,t={x:0,y:0};if(this._coord)return this._coord;for(e=0;e<this._points.length;e+=1)t.x+=this._points[e].x,t.y+=this._points[e].y;for(e=0;e<this._clusters.length;e+=1)t.x+=this._clusters[e].coords().x*this._clusters[e].count(),t.y+=this._clusters[e].coords().y*this._clusters[e].count();return{x:t.x/this.count(),y:t.y/this.count()}},o.prototype.addPoint=function(e){var t,n,o,a,s,l;for(t=this._opts.maxZoom;t>=0;t-=1){if(n=this._clusters[t].getNearObject(e))return void n._add(e);if(n=this._points[t].getNearObject(e)){if(o=n._parent)for(l=o._points.length-1;l>=0;l-=1)if(o._points[l]===n){o._points.splice(l,1),o._increment(-1);break}for(o||r.noop(),a=new i(this,t,[n,e]),this._clusters[t].addObject(a,a.coords()),s=a,l=t-1;l>o._zoom;l-=1)s=new i(this,l,[s]),this._clusters[l].addObject(s,s.coords());for(o._add(s),l=t;l>=0&&this._points[l].removeObject(n,n);l-=1);return}this._points[t].addObject(e,e)}this._topClusterLevel._add(e)},o.prototype.points=function(e){return e=Math.min(Math.max(Math.floor(e),0),this._opts.maxZoom-1),this._points[Math.floor(e)].contents()},o.prototype.clusters=function(e){return e=Math.min(Math.max(Math.floor(e),0),this._opts.maxZoom-1),this._clusters[Math.floor(e)].contents()},e.exports=o},7566:function(e,t,n){var r=n(8340),i=n(9552),o={maxCount:1e3,count:0,memo:{}};function a(e,t){return o.count+=1,o.count>=o.maxCount&&(o.memo={},o.count=0),o.memo[e]=t,t}var s={convertColor:function(e){if(null==e||void 0!==e.r&&void 0!==e.g&&void 0!==e.b)return e;if(void 0!==o.memo[e])return o.memo[e];var t,n=e;if("string"==typeof e){var r=e.toLowerCase();if(i.hasOwnProperty(r))e={r:i[r][0]/255,g:i[r][1]/255,b:i[r][2]/255};else if("#"===e.charAt(0))4===e.length||5===e.length?(5===e.length&&(t=parseInt(e.slice(4),16)/15),e=4352*(3840&(e=parseInt(e.slice(1,4),16)))+272*(240&e)+17*(15&e)):7!==e.length&&9!==e.length||(9===e.length&&(t=parseInt(e.slice(7),16)/255),e=parseInt(e.slice(1,7),16));else if("transparent"===r)t=e=0;else if(r.indexOf("(")>=0)for(var l=0;l<s.cssColorConversions.length;l+=1){var u=s.cssColorConversions[l].regex.exec(r);if(u)return a(n,e=s.cssColorConversions[l].process(r,u))}}return isFinite(e)&&(e={r:((16711680&e)>>16)/255,g:((65280&e)>>8)/255,b:(255&e)/255}),void 0!==t&&e&&void 0!==e.r&&(e.a=t),a(n,e)},convertColorAndOpacity:function(e,t,n){return(e=s.convertColor(e))&&void 0!==e.r&&void 0!==e.g&&void 0!==e.b||(e=s.convertColor(n||{r:0,g:0,b:0})),e&&void 0!==e.r&&void 0!==e.g&&void 0!==e.b||(e={r:0,g:0,b:0}),e={r:isFinite(e.r)&&e.r>=0?e.r<=1?+e.r:1:0,g:isFinite(e.g)&&e.g>=0?e.g<=1?+e.g:1:0,b:isFinite(e.b)&&e.b>=0?e.b<=1?+e.b:1:0,a:r.isNonNullFinite(e.a)&&e.a>=0&&e.a<1?+e.a:1},r.isNonNullFinite(t)&&t<1&&(e.a=t<=0?0:e.a*t),e},convertColorToHex:function(e,t){var n,r=s.convertColor(e);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&&t&&(r.a<1||"needed"!==t)&&(n+=(256+Math.round(255*r.a)).toString(16).slice(1)),n},convertColorToRGBA:function(e){var t=s.convertColor(e);return t||(t={r:0,g:0,b:0}),(!r.isNonNullFinite(t.a)||t.a>1)&&(t.a=1),"rgba("+Math.round(255*t.r)+", "+Math.round(255*t.g)+", "+Math.round(255*t.b)+", "+ +(+t.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(e,t){return e={r:Math.min(1,Math.max(0,+t[1]/(t[2]?100:255))),g:Math.min(1,Math.max(0,+t[3]/(t[4]?100:255))),b:Math.min(1,Math.max(0,+t[5]/(t[6]?100:255)))},t[7]&&(e.a=Math.min(1,Math.max(0,+t[8]/(t[9]?100:1)))),e}},{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(e,t){var n=function(e,t,n){return 6*(n-=Math.floor(n))<1?e+(t-e)*n*6:6*n<3?t:6*n<4?e+(t-e)*(2/3-n)*6:e},r=+t[1]/(s.cssAngleUnitsBase[t[2]]||360),i=Math.min(1,Math.max(0,+t[3]/100)),o=Math.min(1,Math.max(0,+t[4]/100)),a=o<=.5?o*(i+1):o+i-o*i,l=2*o-a;return e={r:n(l,a,r+1/3),g:n(l,a,r),b:n(l,a,r-1/3)},t[5]&&(e.a=Math.min(1,Math.max(0,+t[6]/(t[7]?100:1)))),e}}],e.exports=s},8340:function(e,t,n){function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var i=n(5638),o=n(4252);o=o.__esModule?o.default:o;var a,s,l="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",u='<svg xmlns="http://www.w3.org/2000/svg"><foreignObject width="100%" height="100%"></foreignObject></svg>',c={},d=200,f=15;function p(){var e;for(e=0;e<arguments.length;e+=1)if(isFinite(arguments[e]))return arguments[e]}var h={pointInPolygon:function(e,t,n,r){return t.outer&&(n=t.inner,t=t.outer),!(t.length<3)&&(!(r&&r.min&&r.max&&(e.x<r.min.x||e.y<r.min.y||e.x>r.max.x||e.y>r.max.y))&&h.distanceToPolygon2d(e,n?{outer:t,inner:n}:t,!0)>0)},pointToTriangleBasis2d:function(e,t,n,r){var i=n.x-t.x,o=r.x-t.x,a=n.y-t.y,s=r.y-t.y,l=e.x-t.x,u=e.y-t.y,c=i*s-o*a;if(c)return{x:(l*s-u*o)/c,y:(l*-a+u*i)/c}},isReadyImage:function(e,t){return!!(e instanceof Image&&e.complete&&e.src&&(e.naturalWidth&&e.naturalHeight||t))},isReadyVideo:function(e,t){return!!(e instanceof HTMLVideoElement&&e.src&&void 0!==e.HAVE_CURRENT_DATA&&(e.videoWidth&&e.videoHeight&&e.readyState>=e.HAVE_CURRENT_DATA||t&&e.error))},isFunction:function(e){return"function"==typeof e},ensureFunction:function(e){return h.isFunction(e)?e:function(){return e}},isNonNullFinite:function(e){return isFinite(e)&&null!==e&&!1!==e&&""!==e},randomString:function(e){var t,n,r;for(e=e||8,t="",n=0;n<e;n+=1)r=Math.floor(Math.random()*l.length),t+=l.substring(r,r+1);return t},normalizeCoordinates:function(e){return e=e||{},Array.isArray(e)?{x:e[0],y:e[1],z:e[2]||0}:{x:p(e.x,e.longitude,e.lng,e.lon,0),y:p(e.y,e.latitude,e.lat,0),z:p(e.z,e.elevation,e.elev,e.height,0)}},range:function(e,t,n){n=n||1;for(var r=[],i=e;i<=t;i+=n)r.push(i);return r},compareArrays:function(e,t){return e.length===t.length&&e.every((function(e,n){return e===t[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(e,t,n,r,i){r=void 0===r?.2:r,i=void 0===i?.1:i;var o=e.sourceByName(t),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 l=n;return a instanceof Float32Array&&a.length&&n&&i>0&&(l=Math.floor((i+1)*n)),a=new Float32Array(l),o.setData(a),a},adjustActions:function(e){var t,n;for(n=0;n<e.length;n+=1){if(t=e[n],"string"===i.type(t.input)){var r={};r[t.input]=!0,t.input=r}if(t.modifiers||(t.modifiers={}),"string"===i.type(t.modifiers)){var o={};o[t.modifiers]=!0,t.modifiers=o}}},addAction:function(e,t,n){n?e.push(t):e.unshift(t),h.adjustActions(e)},hasAction:function(e,t,n,r){t&&t.action&&(n=t.name,r=t.owner,t=t.action);for(var i=0;i<e.length;i+=1)if(!(t&&e[i].action!==t||n&&e[i].name!==n||r&&e[i].owner!==r))return e[i];return null},removeAction:function(e,t,n,r){var o,a=0;do{(o=h.hasAction(e,t,n,r))&&(e.splice(i.inArray(o,e),1),a+=1)}while(o);return a},actionMatch:function(e,t,n){var r;if(n.some((function(n){for(var i in n.input)if(n.input.hasOwnProperty(i)&&(!1===n.input[i]&&e[i]||n.input[i]&&!e[i]))return!1;for(var o in n.modifiers)if(n.modifiers.hasOwnProperty(o)&&(!1===n.modifiers[o]&&t[o]||n.modifiers[o]&&!t[o]))return!1;return r=n,!0})))return r},pixelCoordinateParams:function(e,t,n,r,o){var a,s,l;e&&(a=(e=i(e)).innerWidth(),s=e.innerHeight()),o=o||n,l=(r=r||t)!==t||o!==n;var u=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(t/r,n/o))/Math.log(2));return{map:{node:e,ingcs:"+proj=longlat +axis=esu",gcs:"+proj=longlat +axis=enu",maxBounds:{left:0,top:0,right:t,bottom:n},unitsPerPixel:Math.pow(2,c),center:{x:t/2,y:n/2},min:u,max:c,zoom:u,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:l?function(e){var i=Math.pow(2,c-e);return{x:Math.ceil(t/r/i),y:Math.ceil(n/o/i)}}:void 0,tilesMaxBounds:l?function(e){var r=Math.pow(2,c-e);return{x:Math.floor(t/r),y:Math.floor(n/r)}}:void 0}}},centerFromPerimeter:function(e){var t,n,r,i,o,a;if(e&&e.length){if(1===e.length)return{x:e[0].x,y:e[0].y};for(t={x:0,y:0},o=0,n=e[e.length-1],a=0;a<e.length;a+=1)r=n,n=e[a],i=Math.sqrt(Math.pow(r.x-n.x,2)+Math.pow(r.y-n.y,2)),t.x+=(n.x+r.x)*i,t.y+=(n.y+r.y)*i,o+=2*i;return t.x/=o,t.y/=o,o?t:{x:n.x,y:n.y}}},distance2dSquared:function(e,t){var n=e.x-t.x,r=e.y-t.y;return n*n+r*r},distance2dToLineSquared:function(e,t,n){var r=n.x-t.x,i=n.y-t.y,o=r*r+i*i,a=0;return o&&(a=((e.x-t.x)*r+(e.y-t.y)*i)/o,a=Math.max(0,Math.min(1,a))),h.distance2dSquared(e,{x:t.x+a*r,y:t.y+a*i})},distanceToPolygon2d:function(e,t,n){for(var r,i,o=t.outer||t,a=!1,s=0,l=o.length,u=l-1;s<l;u=s,s+=1){var c=o[s],d=o[u];c.y>e.y!=d.y>e.y&&e.x<(d.x-c.x)*(e.y-c.y)/(d.y-c.y)+c.x&&(a=!a),i=n?1:h.distance2dToLineSquared(e,c,d),(void 0===r||i<r)&&(r=i)}return t.inner&&t.inner.forEach((function(t){var i=h.distanceToPolygon2d(e,t,n);i*i<r&&(r=i*i),i>0&&(a=!a)})),(a?1:-1)*Math.sqrt(r)},triangleTwiceSignedArea2d:function(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)},crossedLineSegmentPolygon2d:function(e,t,n){var r,i,o=n.outer||n,a=o.length;for(r=0,i=a-1;r<a;i=r,r+=1)if(h.crossedLineSegments2d(e,t,o[r],o[i]))return!0;if(n.inner)for(r=0;r<n.inner.length;r+=1)if(h.crossedLineSegmentPolygon2d(e,t,n.inner[r]))return!0;return!1},crossedLineSegments2d:function(e,t,n,r){return!(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.x<n.x&&t.x<r.x||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.y<n.y&&t.y<r.y)&&(!(e.x===n.x&&e.y===n.y||e.x===r.x&&e.y===r.y||t.x===n.x&&t.y===n.y||t.x===r.x&&t.y===r.y)&&!(h.triangleTwiceSignedArea2d(e,t,n)*h.triangleTwiceSignedArea2d(e,t,r)>0||h.triangleTwiceSignedArea2d(n,r,e)*h.triangleTwiceSignedArea2d(n,r,t)>0))},segmentCrossesLineList2d:function(e,t,n){return n.some((function(n){return n.some((function(r,i){return!!i&&h.crossedLineSegments2d(e,t,n[i-1],r)}))}))},rdpLineSimplify:function(e,t,n,r){if(e.length<=2||t<0)return e;var i,o,a,s=-1,l=t*t;if(n){for(i=1;i<e.length;i+=1)(o=h.distance2dSquared(e[0],e[i]))>s&&(s=o,a=i);return 4*s<=l?e.slice(a,a+1):(e=e.slice(a).concat(e.slice(0,a+1)),(e=h.rdpLineSimplify(e,t,!1,r)).splice(e.length-1),e)}for(i=1;i<e.length-1;i+=1)(o=h.distance2dToLineSquared(e[i],e[0],e[e.length-1]))>s&&(s=o,a=i);if(s<=l&&(!r||!h.segmentCrossesLineList2d(e[0],e[e.length-1],r)))return[e[0],e[e.length-1]];var u=e.slice(0,a+1),c=e.slice(a),d=h.rdpLineSimplify(u,t,!1,r?r.concat([c]):null),f=h.rdpLineSimplify(c,t,!1,r?r.concat([u]):null);return d.slice(0,d.length-1).concat(f)},getMinMaxValues:function(e,t,n,r){if(e.length&&(r||!i.isNumeric(t)||!i.isNumeric(n))){var o,a,s=e[0],l=e[0];for(a=e.length-1;a>0;a-=1)(o=e[a])<s&&(s=o),o>l&&(l=o);(!i.isNumeric(t)||r&&s>t)&&(t=s),(!i.isNumeric(n)||r&&l<n)&&(n=l)}return{min:t,max:n}},wrapAngle:function(e){return(e%=2*Math.PI)<-Math.PI?e+=2*Math.PI:e>=Math.PI&&(e-=2*Math.PI),e},escapeUnicodeHTML:function(e){return e.replace(/./g,(function(e){var t=e.charCodeAt(0);return t<127?e:"&#"+t.toString(10)+";"}))},dereferenceElements:function(e){var t=[];return i("img,image",e).each((function(){var e=i(this),n=e.is("image")?"href":"src";if(e.attr(n)){var r=new Image;("http"===e.attr(n).substr(0,4)||e[0].crossOrigin)&&(r.crossOrigin=e[0].crossOrigin||"anonymous");var o=i.Deferred();r.onload=function(){var t=document.createElement("canvas");t.width=r.naturalWidth,t.height=r.naturalHeight,t.getContext("2d").drawImage(r,0,0),e.attr(n,t.toDataURL("image/png")),"data:image"!==e.attr(n).substr(0,10)&&e.remove(),o.resolve()},r.onerror=function(){e.remove(),o.resolve()},r.src=e.attr(n),t.push(o)}})),t},dereferenceCssUrlsRegex:/url\(["']?(http[^)"']+|[^:)"']+)["']?\)/g,dereferenceCssUrls:function(e,t,n,r,o){var a=[],s=[];if(e=(e=e.replace(/\/\*[^\0]*?\*\//g,"")).replace(/\r/g,"\n").replace(/\s+\n/g,"\n").replace(/\n\s+/g,"\n").replace(/\n\n+/g,"\n"),o){var l=/(^[^?#]*)\/[^?#/]*([?#]|$)/g.exec(o);o=l&&l[1]?l[1]+"/":null}e.replace(h.dereferenceCssUrlsRegex,(function(e,t){var n=a.length,r=i.Deferred(),l=new XMLHttpRequest;return a.push(r),s.push(""),/^[^/:][^:]*(\/|$)/g.exec(t)&&o&&(t=o+t),l.open("GET",t,!0),l.responseType="arraybuffer",l.onload=function(){if(200===this.status){var e,t=new Uint8Array(this.response),i=new Array(t.length);for(e=0;e<t.length;e+=1)i[e]=String.fromCharCode(t[e]);i=i.join(""),s[n]="url(data:"+l.getResponseHeader("content-type")+";base64,"+btoa(i)+")"}r.resolve()},l.onerror=r.resolve,l.send(),e})),i.when.apply(i,a).then((function(){var i=0;e=e.replace(h.dereferenceCssUrlsRegex,(function(e,t){return s[(i+=1)-1]})),void 0===r?t.text(e):t.style[r]=e,n.resolve()}))},htmlToImageSupported:function(){if(void 0===s){var e=i.Deferred(),t=i(u);t.attr({width:"10px",height:"10px","text-rendering":"optimizeLegibility"}),i("foreignObject",t).append("<div/>");var n=new Image;return n.onload=n.onerror=function(){var t=document.createElement("canvas");t.width=10,t.height=10,t.getContext("2d").drawImage(n,0,0);try{t.toDataURL(),s=!0}catch(e){console.warn("This browser does not support converting HTML to an image via SVG foreignObject. Some functionality will be limited.",e),s=!1}e.resolve(s)},n.src="data:image/svg+xml;base64,"+btoa(h.escapeUnicodeHTML((new XMLSerializer).serializeToString(t[0]))),e}return s},htmlToImage:function(e,t){var n,r=i.Deferred(),o=[h.htmlToImageSupported()],a=i(e);for(e=i(e).clone();t&&t>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(e),e=n),t-=1;i("canvas",e).remove(),i("*",e).addBack().each((function(){for(var e=this.style,t=0;t<e.length;t+=1){var n=this.style[t];if(this.style[n].match(h.dereferenceCssUrlsRegex)){var r=i.Deferred();h.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(e),o=o.concat(h.dereferenceElements(e)),i('style,link[rel="stylesheet"]').each((function(){var e=i('<style type="text/css">'),t=i.Deferred();if(i(this).is("style")){var r=i(this).text();h.dereferenceCssUrls(r,e,t)}else{var a=i(this).attr("href");i.get(a).done((function(n){h.dereferenceCssUrls(n,e,t,void 0,a)})).fail((function(n,r,i){console.warn("Failed to dereference "+a,r,i),e.remove(),t.resolve()}))}o.push(t),i("head",n).append(e)})),i.when.apply(i,o).then((function(){var e=i(u);e.attr({width:a.width()+"px",height:a.height()+"px","text-rendering":"optimizeLegibility"}),i("foreignObject",e).append(n);var t=new Image;h.htmlToImageSupported()?(t.onload=function(){r.resolve(t)},t.onerror=function(){console.warn("Failed to render html to image"),r.reject()},t.src="data:image/svg+xml;base64,"+btoa(h.escapeUnicodeHTML((new XMLSerializer).serializeToString(e[0])))):r.resolve(t)})),r},timeReport:function(e){return i.each(c,(function(e,t){t.count?(t.stddev=Math.sqrt(Math.abs((t.sum2-t.sum*t.sum/t.count)/t.count)),t.average=t.sum/t.count):(t.stddev=0,t.average=0)})),e?c[e]:c},timeFunctionStart:function(e,t){c[e]&&!t||(c[e]={count:0,sum:0,sum2:0,max:0,recent:[]}),c[e].start=window.performance.now()},timeFunctionStop:function(e){if(c[e]&&c[e].start){var t=window.performance.now()-c[e].start;c[e].start=null,c[e].sum+=t,c[e].sum2+=t*t,c[e].count+=1,c[e].max=Math.max(c[e].max,t),c[e].recent.push(t),c[e].recent.length>d&&c[e].recent.splice(0,c[e].recent.length-d)}},timeRequestAnimationFrame:function(e,t,n,r){c.requestAnimationFrame&&!t||(c.requestAnimationFrame={count:0,sum:0,sum2:0,max:0,above_threshold:0,recent:[],recentsub:[]}),n&&(f=n),r&&(d=r),e&&a?(window.requestAnimationFrame=a,a=null):e||a||(a=window.requestAnimationFrame,window.requestAnimationFrame=function(e){return a.call(window,(function(t){var n,r=c.requestAnimationFrame;r.timestamp!==t&&(r.nowDelta=window.performance.now()-t,Math.abs(r.nowDelta)<1e3&&(r.nowDelta=0),r.timestamp=t,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>d&&(r.recent.splice(0,r.recent.length-d),r.recentsub.splice(0,r.recentsub.length-d))),r.subcalls+=1,e.apply(this,arguments);var i=window.performance.now()-t;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:e.name||e})}))})},isObject:function(e){var t=r(e);return null!=e&&("object"===t||"function"===t)},radiusEarth:o.WGS84.a};e.exports=h},5844:function(e,t,n){var r=n(5638),i={};i.Util={stamp:function(e){return e._leaflet_id=e._leaflet_id||++i.Util.lastId,e._leaflet_id},lastId:0};var o=function(e){this._cellSize=e,this._sqCellSize=e*e,this._grid={},this._objectPoint={}};o.prototype={addObject:function(e,t){var n=this._getCoord(t.x),r=this._getCoord(t.y),o=this._grid,a=o[r]=o[r]||{},s=a[n]=a[n]||[],l=i.Util.stamp(e);t.obj=e,this._objectPoint[l]=t,s.push(e)},updateObject:function(e,t){this.removeObject(e),this.addObject(e,t)},removeObject:function(e,t){var n,r,o=this._getCoord(t.x),a=this._getCoord(t.y),s=this._grid,l=s[a]=s[a]||{},u=l[o]=l[o]||[];for(delete this._objectPoint[i.Util.stamp(e)],n=0,r=u.length;n<r;n++)if(u[n]===e)return u.splice(n,1),1===r&&delete l[o],!0},eachObject:function(e,t){var n,r,i,o,a,s,l=this._grid;for(n in l)for(r in a=l[n])for(i=0,o=(s=a[r]).length;i<o;i++)e.call(t,s[i])&&(i--,o--)},getNearObject:function(e){var t,n,r,o,a,s,l,u,c=this._getCoord(e.x),d=this._getCoord(e.y),f=this._objectPoint,p=this._sqCellSize,h=null;for(t=d-1;t<=d+1;t++)if(o=this._grid[t])for(n=c-1;n<=c+1;n++)if(a=o[n])for(r=0,s=a.length;r<s;r++)l=a[r],(u=this._sqDist(f[i.Util.stamp(l)],e))<p&&(p=u,h=l);return h},contents:function(){return r.map(this._objectPoint,(function(e){return e}))},_getCoord:function(e){return Math.floor(e/this._cellSize)},_sqDist:function(e,t){var n=t.x-e.x,r=t.y-e.y;return n*n+r*r}},e.exports=o},4634:function(e,t,n){e.exports=Object.assign(n(8340),n(7566),n(9215),n(895),{DistanceGrid:n(5844),ClusterGroup:n(9808),mesh:n(9244)})},9244:function(e,t,n){e.exports={createColoredMesh:function(e,t){var r,i,o,a,s,l=n(5638),u=n(4634),c=e.mesh,d=e.style.get("value"),f=void 0!==e.style("used")?e.style.get("used"):function(e,t){return u.isNonNullFinite(d(e,t))},p={used:f,opacity:e.style.get("opacity"),value:d},h=e._createMesh(t?{}:p,t?p:{});if(h.elementValues=!!t,!h.numVertices||!h.numElements)return h;var m=c.get("stepped")(h),g=c.get("opacityRange")(h),v=c.get("rangeValues")(h);if(h.stepped=!(void 0!==m&&!m),h.colorMap=[],h.minColor=l.extend({a:c.get("minOpacity")(h)||0},u.convertColor(c.get("minColor")(h))),h.maxColor=l.extend({a:c.get("maxOpacity")(h)||0},u.convertColor(c.get("maxColor")(h))),c.get("colorRange")(h).forEach((function(e,t){h.colorMap.push(l.extend({a:g&&void 0!==g[t]?g[t]:1},u.convertColor(e)))})),r=u.getMinMaxValues(h.value,c.get("min")(h),c.get("max")(h)),h.minValue=r.min,h.maxValue=r.max,v&&h.colorMap&&(v.length===h.colorMap.length+1||!m&&v.length===h.colorMap.length)||(v=null),v)for(s=1;s<v.length;s+=1)if(v[s-1]>v[s]){v=null;break}for(v&&(h.minValue=v[0],h.maxValue=v[v.length-1]),(o=h.maxValue-h.minValue)||(h.colorMap=h.colorMap.slice(0,1),o=1,v=null),h.rangeValues=v,h.factor=(h.colorMap.length-(m?0:1))/o,a=0;a<h.value.length;a+=1)if(i=h.value[a],v&&i>=h.minValue&&i<=h.maxValue){for(s=1;s<v.length;s+=1)if(i<=v[s]){h.value[a]=s-1+(i-v[s-1])/(v[s]-v[s-1]);break}}else h.value[a]=(i-h.minValue)*h.factor;return h}}},895:function(e,t,n){var r,i,o=n(5638),a=n(2254);e.exports={},e.exports.mockWebglRenderer=function(e){"use strict";var t=n(320);if(void 0===e&&(e=!0),t._mocked)throw new Error("webgl renderer already mocked");var s={},l=function(e){s[e]=(s[e]||0)+1},u=function(e){return function(){l(e)}},c=0,d=function(e){return function(){return l(e),c+=1}},f={activeTexture:u("activeTexture"),attachShader:u("attachShader"),bindAttribLocation:u("bindAttribLocation"),bindBuffer:u("bindBuffer"),bindFramebuffer:u("bindFramebuffer"),bindTexture:u("bindTexture"),blendFuncSeparate:u("blendFuncSeparate"),bufferData:u("bufferData"),bufferSubData:u("bufferSubData"),checkFramebufferStatus:function(e){if(l("checkFramebufferStatus"),e===t.GL.FRAMEBUFFER)return t.GL.FRAMEBUFFER_COMPLETE},clear:u("clear"),clearColor:u("clearColor"),clearDepth:u("clearDepth"),compileShader:u("compileShader"),createBuffer:d("createBuffer"),createFramebuffer:u("createFramebuffer"),createProgram:d("createProgram"),createShader:d("createShader"),createTexture:d("createTexture"),deleteBuffer:u("deleteBuffer"),deleteProgram:u("deleteProgram"),deleteShader:u("deleteShader"),deleteTexture:u("deleteTexture"),detachShader:u("detachShader"),depthFunc:u("depthFunc"),disable:u("disable"),disableVertexAttribArray:u("disableVertexAttribArray"),drawArrays:u("drawArrays"),enable:u("enable"),enableVertexAttribArray:u("enableVertexAttribArray"),finish:u("finish"),getError:u("getError"),getExtension:d("getExtension"),getParameter:function(e){switch(l("getParameter"),e){case t.GL.ALIASED_POINT_SIZE_RANGE:return[1,64];case t.GL.DEPTH_BITS:return 16;case t.GL.MAX_TEXTURE_SIZE:return 4096}},getProgramParameter:function(e,n){if(l("getProgramParameter"),n===t.GL.LINK_STATUS)return!0},getShaderInfoLog:function(){return l("getShaderInfoLog"),"log"},getShaderParameter:function(e,n){if(l("getShaderParameter"),n===t.GL.COMPILE_STATUS)return!0},getSupportedExtensions:function(){return l("getSupportedExtensions"),[]},getUniformLocation:d("getUniformLocation"),isEnabled:function(e){if(l("isEnabled"),e===t.GL.BLEND)return!0},linkProgram:u("linkProgram"),pixelStorei:u("pixelStorei"),shaderSource:u("shaderSource"),texImage2D:u("texImage2D"),texParameteri:u("texParameteri"),uniform1iv:u("uniform1iv"),uniform1fv:u("uniform1fv"),uniform2fv:u("uniform2fv"),uniform3fv:u("uniform3fv"),uniform4fv:u("uniform4fv"),uniformMatrix3fv:u("uniformMatrix3fv"),uniformMatrix4fv:u("uniformMatrix4fv"),useProgram:u("useProgram"),vertexAttribPointer:u("vertexAttribPointer"),vertexAttrib3fv:u("vertexAttrib3fv"),viewport:u("viewport")};r=t.renderWindow;t.renderWindow=function e(){t.renderWindow=r;var n,i=new t.renderWindow;return t.renderWindow=e,i._setup=function(){var e,r=i.renderers(),a=i.windowSize(),s=i.windowPosition();for(n=o.extend({},t.GL,f),e=0;e<r.length;e+=1)(r[e].width()>a[0]||0===r[e].width()||r[e].height()>a[1]||0===r[e].height())&&r[e].resize(s[0],s[1],a[0],a[1]);return!0},i.context=function(){return n},i},i=a.supported,a.supported=function(){return!!e},a._maxTextureSize=4096,a._maxPointSize=64,t._mocked=!0,t.mockCounts=function(){return s}},e.exports.restoreWebglRenderer=function(){var e=n(320);e._mocked&&(e.renderWindow=r,a.supported=i,delete e._mocked,delete e.mockCounts)}},9215:function(e){var t=function(e,t,n,r,i){var o,a=0;return"boolean"!=typeof t&&(i=r,r=n,n=t,t=void 0),"function"!=typeof r&&(i=r,r=function(){}),function(){var s=this,l=+new Date-a,u=arguments;function c(){a=+new Date,n.apply(s,u)}function d(){o=void 0}r.apply(s,u),i&&!o&&c(),o&&clearTimeout(o),void 0===i&&l>e?c():!0!==t&&(o=setTimeout(i?d:c,void 0===i?e-l:e))}};e.exports={throttle:t,debounce:function(e,n,r,i){return"boolean"!=typeof n&&(i=r,r=n,n=!1),t(e,!1,r,i=i||function(){},!!n)}}},2623:function(e,t,n){var r=n(5699),i=n(6837),o=function e(t){"use strict";if(!(this instanceof e))return new e(t);var r=n(5638);t=t||{},i.call(this,t);var o=this,a=this._init;this.featureType="vector",this.origin=function(e){return void 0===e?o.style("origin"):(o.style("origin",e),o.dataTime().modified(),o)},this.delta=function(e){return void 0===e?o.style("delta"):(o.style("delta",e),o.dataTime().modified(),o)},this._init=function(e){a.call(o,e);var t=r.extend({},{strokeColor:"black",strokeWidth:2,strokeOpacity:1,originStyle:"none",endStyle:"arrow",origin:{x:0,y:0,z:0},delta:function(e){return e},scale:null},void 0===e.style?{}:e.style);return void 0!==e.origin&&(t.origin=e.origin),o.style(t),o.dataTime().modified(),o}};r(o,i),e.exports=o},2978:function(e){e.exports="1.7.3"},6653:function(e,t,n){e.exports={pointFeature:n(9724),vtkjsRenderer:n(9508)}},7222:function(e,t,n){e.exports=function e(t){"use strict";if(!(this instanceof n(3737)))return new e(t);var r=this,i=this.draw;return this.draw=function(){return r.ready&&(r._update(),r.renderer()._render(),i()),r},this}},9724:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2557),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(6853),i=n(7222),a=n(9508).vtkjs,s=a.Rendering.Core.vtkActor,l=a.Common.Core.vtkDataArray,u=a.Rendering.Core.vtkGlyph3DMapper,c=a.Rendering.Core.vtkMapper,d=a.Common.DataModel.vtkPointSet,f=a.Filters.Sources.vtkSphereSource;i.call(this);var p,h,m,g,v,y=this,b=this._init,x=this._exit,w=this._update;return this._createPipeline=function(){h=d.newInstance(),(m=f.newInstance()).setThetaResolution(30),m.setPhiResolution(30);var e=u.newInstance({orient:!1,colorByArrayName:"color",scalarMode:c.ScalarMode.USE_POINT_FIELD_DATA,colorMode:c.ColorMode.DIRECT_SCALARS,scaling:!0,scaleArray:"diam",scaleMode:u.ScaleModes.SCALE_BY_MAGNITUDE});e.setInputData(h,0),e.setInputConnection(m.getOutputPort(),1),(p=s.newInstance()).setMapper(e),p.getProperty().setAmbient(1),y.renderer().contextRenderer().addActor(p)},this._init=function(){b.call(y,t),y.renderer().contextRenderer().setLayer(0),y._createPipeline()},this._build=function(){var e,t,n,i,o,a,s=y.data().length,u=new Array(3*s),c=y.data(),d=y.position(),f=y.style.get("radius"),p=y.style.get("fill"),m=y.style.get("fillColor"),b=y.style.get("fillOpacity"),x=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)),e=t=n=0;e<s;e+=1,t+=3,n+=4)i=d(c[e],e),u[t]=i.x,u[t+1]=i.y,u[t+2]=i.z||0,a=a||u[t+2],v[e]=f(c[e],e)*x*2,o=m(c[e],e),g[n]=255*o.r,g[n+1]=255*o.g,g[n+2]=255*o.b,g[n+3]=p(c[e],e)?255*b(c[e],e):0;if(u=r.transformCoordinates(y.gcs(),y.layer().map().gcs(),u,3),!a&&y.gcs()!==y.layer().map().gcs())for(e=t=0;e<s;e+=1,t+=3)u[t+2]=0;h.getPoints().setData(u,3),h.getPointData().addArray(l.newInstance({name:"color",values:g,numberOfComponents:4})),h.getPointData().addArray(l.newInstance({name:"diam",values:v})),y.buildTime().modified()},this._update=function(){if(w.call(y),y.dataTime().getMTime()>=y.buildTime().getMTime()||y.updateTime().getMTime()<y.getMTime())y._build();else{var e=y.data(),t=y.style.get("radius"),n=y.layer().map().unitsPerPixel(y.layer().map().zoom()),r=h.getPointData().getArray("diam"),i=r.getData().map((function(r,i){return t(e[i],i)*n*2}));r.setData(i),h.modified()}y.updateTime().modified()},this._exit=function(){y.renderer().contextRenderer().removeActor(p),x()},y._init(),this};r(a,o);var s={};s[o.capabilities.stroke]=!1,i("vtkjs","point",a,s),e.exports=a},9508:function(e,t,n){var r=n(5699),i=n(4647).registerRenderer,o=n(3234),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(5240),i=n(5108),a=e.vtkjs.Rendering.Misc.vtkGenericRenderWindow,s=this,l=this._init,u=a.newInstance({background:[0,0,0,0]});u.setContainer(s.layer().node().get(0)),u.getInteractor().unbindEvents(),u.resize();var c=u.getRenderer(),d=u.getRenderWindow();return this.contextRenderer=function(){return c},this.api=function(){return e.apiname},this._init=function(){if(s.initialized())return s;l.call(s);var e=s.layer().map(),t=e.size();return s._resize(0,0,t.width,t.height),e.camera().clipbounds={near:-e.unitsPerPixel(),far:e.unitsPerPixel()},s},this._resize=function(e,t,n,r){return s._setWidthHeight(n,r),u.resize(),s._render(),s},this._render=function(){return s.layer().map().scheduleAnimationFrame(s._renderFrame,!0),s},this._renderFrame=function(){var e,t=s.layer().features();for(e=0;e<t.length;e+=1)t[e].visible()&&t[e]._update();s._updateRendererCamera(),d.render()},this._exit=function(){},this._updateRendererCamera=function(){var e=s.layer().map().camera(),t=e.view,n=e.projectionMatrix,i=r.create();r.copy(i,t);var o=r.create();r.copy(o,n),s.contextRenderer().getActiveCamera().setViewMatrix(i),s.contextRenderer().getActiveCamera().setProjectionMatrix(o)},s.layer().geoOn(i.pan,(function(e){s._render()})),s.layer().geoOn(i.parallelprojection,(function(e){})),this};a.apiname="vtkjs",r(a,o),i("vtkjs",a),a.supported=function(){delete a.vtkjs;try{a.vtkjs=n(5361)}catch(e){}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(),e.exports=a},99:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(8719),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var n=this,r=null,i=this._exit,a=this.draw,s=this._update;return this.draw=function(){if(n._update(),r)for(var e=0;e<r.length;e+=1)r[e].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(e){return e._exit()})),r=null},this._exit=function(){n._wipePolygons(),i()},this._init(t),this};r(a,o),i("webgl","choropleth",a),e.exports=a},8917:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(9005),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t),n(5651).call(this,t);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(t),this};r(a,o),i("webgl","contour",a),e.exports=a},8939:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(1109),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t),n(5651).call(this,t);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(t),this};r(a,o),i("webgl","grid",a),e.exports=a},9205:function(e,t,n){e.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(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(2367),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(7719).call(this),this._init(t),this):new e(t)};r(a,o),i("webgl","isoline",a),e.exports=a},5389:function(e,t,n){var r=function(){"use strict";var e=n(4647).createRenderer,t=n(5108),r=n(2254),i=n(1940),o=this,a=this._init,s=this.opacity,l=this.visible,u=this.zIndex;this.opacity=function(e){var t=s.apply(o,arguments);return void 0!==e&&o.initialized()&&o.map()._updateAutoshareRenderers(),t},this.visible=function(e){if(void 0===e)return l();var t=l(),n=l.apply(o,arguments);return t!==e&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render()),n},this.zIndex=function(e,t){var n=u.apply(o,arguments);return void 0!==e&&o.initialized()&&(o.map().scheduleAnimationFrame(o._update,!0),o.renderer()._render(),o.map()._updateAutoshareRenderers()),n},this.switchRenderer=function(e,t){if(e instanceof r&&e!==o.renderer()){var n=o.renderer(),i=[],a=[];o.map().listSceneObjects([o]).forEach((function(e){e._cleanup&&(e._cleanup(),e._update&&a.push(e)),e.actors&&(i=i.concat(e.actors()))})),i.forEach((function(t){n.contextRenderer().removeActor(t),e.contextRenderer().addActor(t)})),o._renderer(e),o._canvas(e.canvas()),t&&(i.length||a.length)&&(n._render(),a.forEach((function(e){e._update()})),e._render())}return o},this._init=function(){var n=o.map();return n._updateAutoshareRenderers||(n._updateAutoshareRenderers=function(){var t,o,a,s=n.sortedLayers(),l=[];s.forEach((function(n){var s=n.autoshareRenderer(),u=n instanceof i;s&&n.renderer()&&n.renderer().api()===r.apiname?!t||n.opacity()!==o||"more"!==s&&(n.opacity()>0&&n.opacity()<1||u&&!a)?(n.node()[0].contains(n.renderer().canvas()[0])||(n.switchRenderer(e(r.apiname,n),!1),l.push(n.renderer())),t=n.renderer(),o=n.opacity(),a=u):(n.renderer()!==t&&(l.push(n.renderer()),n.switchRenderer(t,!1),l.push(n.renderer())),a&=u):t=null})),s.forEach((function(e){l.indexOf(e.renderer())>=0&&e._update&&e._update()})),s.forEach((function(e){l.indexOf(e.renderer())>=0&&(e.renderer()._renderFrame(),l=l.filter((function(t){return t!==e.renderer()})))})),l.forEach((function(e){e._exit()}))},n.geoOn(t.layerAdd,(function(){return n._updateAutoshareRenderers()})),n.geoOn(t.layerRemove,(function(){return n._updateAutoshareRenderers()}))),a.apply(o,arguments)}};(0,n(4647).registerLayerAdjustment)("webgl","all",r),e.exports=r},7390:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4708),a=0,s=1,l=3,u={butt:0,square:1,round:2},c={passthrough:3,miter:4,bevel:5,round:6,"miter-clip":7},d={normal:0,debug:1},f=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(320),i=n(6853),f=n(4634),p=n(7719),h=n(9162),m=n(359),g=n(916);p.call(this);var v,y,b,x,w,_,S,C,A,T,P,E=this,O=this._exit,M=void 0!==t.dynamicDraw&&t.dynamicDraw,D=this._init,k=this._update;return this.featureVertices=function(){return[[0,"corner",-1,a],[0,"near",1,s],[1,"far",-1,l],[1,"corner",1,a],[1,"near",-1,s],[0,"far",1,l]]},this.verticesPerFeature=function(){return E.featureVertices().length},this._init=function(e){var t,n=r.shaderProgram(),i=((t=new r.shader(r.GL.VERTEX_SHADER)).setShaderSource(g),t),o=function(e){var t=new r.shader(r.GL.FRAGMENT_SHADER);return t.setShaderSource(e?m:h),t}(void 0!==((e||{}).style||{}).debug),a=r.vertexAttribute("pos"),s=r.vertexAttribute("prev"),l=r.vertexAttribute("next"),u=r.vertexAttribute("far"),c=r.vertexAttribute("flags"),d=r.vertexAttribute("strokeWidth"),f=r.vertexAttribute("strokeColor"),p=r.vertexAttribute("strokeOpacity"),A=new r.projectionUniform("projectionMatrix"),T=r.geometryData(),O=r.sourceDataP3fv({name:"pos"}),k=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Four,{name:"prev"}),I=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Five,{name:"next"}),R=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Six,{name:"far"}),N=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Seven,{name:"flags"}),F=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.One,{name:"strokeWidth"}),L=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"strokeColor"}),B=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"strokeOpacity"}),V=r.triangles();return P=new r.modelViewOriginUniform("modelViewMatrix"),x=new r.floatUniform("pixelWidth",1/E.renderer().width()),w=new r.floatUniform("aspect",E.renderer().width()/E.renderer().height()),_=new r.floatUniform("miterLimit",10),S=new r.floatUniform("antialiasing",0),C=new r.floatUniform("fixedFlags",0),D.call(E,e),b=r.material(),y=r.mapper({dynamicDraw:M}),n.addVertexAttribute(a,r.vertexAttributeKeys.Position),n.addVertexAttribute(d,r.vertexAttributeKeysIndexed.One),n.addVertexAttribute(f,r.vertexAttributeKeysIndexed.Two),n.addVertexAttribute(p,r.vertexAttributeKeysIndexed.Three),n.addVertexAttribute(s,r.vertexAttributeKeysIndexed.Four),n.addVertexAttribute(l,r.vertexAttributeKeysIndexed.Five),n.addVertexAttribute(u,r.vertexAttributeKeysIndexed.Six),n.addVertexAttribute(c,r.vertexAttributeKeysIndexed.Seven),n.addUniform(P),n.addUniform(A),n.addUniform(x),n.addUniform(w),n.addUniform(_),n.addUniform(S),n.addUniform(C),n.addShader(o),n.addShader(i),b.addAttribute(n),b.addAttribute(r.blend()),(v=r.actor()).setMaterial(b),v.setMapper(y),T.addSource(O),T.addSource(k),T.addSource(I),T.addSource(R),T.addSource(F),T.addSource(L),T.addSource(B),T.addSource(N),V.setIndices(new Uint16Array(1)),T.addPrimitive(V),T.computeBounds=function(){T.setBounds(0,0,0,0,0,0)},y.setGeometryData(T),E},this.actors=function(){return v?[v]:[]},this._build=function(){return function(e){var t,n,r,o,a,s,l,p,h,m,g,v,b,x,w,O,M,D,k,I,R,N,F,L,B,V,j,z,G,U,W,H,q,X,K,Z,Y,J,Q=E.data(),$=0,ee=[{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0},{strokeOffset:0,posStrokeOffset:0,negStrokeOffset:0}],te=ee[1],ne=E.line(),re=E.style.get("strokeWidth"),ie=E.style.get("strokeColor"),oe=E.style.get("strokeOpacity"),ae=E.style.get("lineCap"),se=E.style.get("lineJoin"),le=E.style.get("strokeOffset"),ue=E.style.get("miterLimit")(Q),ce=E.style.get("antialiasing")(Q)||0,de=E.featureVertices(),fe=de.length,pe=d[E.style.get("debug")(Q)?"debug":"normal"]||0,he=y.geometryData(),me=E.style.get("closed"),ge=!0;if(Y=f.isFunction(E.style("closed"))?void 0:me()||!1,I=f.isFunction(E.style("lineCap"))?void 0:u[ae()||"butt"],R=f.isFunction(E.style("lineJoin"))?void 0:c[se()||"miter"],D=f.isFunction(E.style("strokeColor"))?void 0:ie(),N=f.isFunction(E.style("strokeOffset"))?void 0:le()||0,k=f.isFunction(E.style("strokeOpacity"))?void 0:oe(),M=f.isFunction(E.style("strokeWidth"))?void 0:re(),void 0!==ue&&_.set(Math.max(1,Math.min(100,ue))),C.set(pe),S.set(ce),e)$=A.numSegments,J=A.closed,m=A.lineItemList,h=$*fe,ge=I!==A.lineCapVal||void 0===I||R!==A.lineJoinVal||void 0===R||N!==A.strokeOffsetVal||void 0===N;else{var ve=[],ye=E.position();for(m=new Array(Q.length),J=new Array(Q.length),n=0;n<Q.length;n+=1)if(g=ne(t=Q[n],n),m[n]=g,!(g.length<2)){for($+=g.length-1,r=0;r<g.length;r+=1)b=ye(g[r],r,t,n),ve.push(b.x),ve.push(b.y),ve.push(b.z||0),r||(w=b);g.length>2&&(void 0===Y?me(t,n):Y)?b.x!==w.x||b.y!==w.y||b.z!==w.z?($+=1,J[n]=2):J[n]=1:J[n]=0}if(ve=i.transformCoordinates(E.gcs(),E.layer().map().gcs(),ve,3),(T=new Float32Array(E.style.get("origin")(ve)))[0]||T[1]||T[2])for(n=0;n<ve.length;n+=3)ve[n]-=T[0],ve[n+1]-=T[1],ve[n+2]-=T[2];P.setOrigin(T),h=$*fe,j=f.getGeomBuffer(he,"pos",3*h),z=f.getGeomBuffer(he,"prev",3*h),G=f.getGeomBuffer(he,"next",3*h),U=f.getGeomBuffer(he,"far",3*h),he.primitive(0).numberOfIndices()!==h&&(he.primitive(0).numberOfIndices=function(){return h}),A={numSegments:$,closed:J,lineItemList:m,lineCapVal:I,lineJoinVal:R,strokeOffsetVal:N}}for(W=f.getGeomBuffer(he,"flags",h),H=f.getGeomBuffer(he,"strokeWidth",h),q=f.getGeomBuffer(he,"strokeColor",3*h),X=f.getGeomBuffer(he,"strokeOpacity",h),n=x=K=Z=0;n<Q.length;n+=1)if(!((g=m[n]).length<2))for(t=Q[n],Y=J[n],O=x,p=g.length+(2===Y?1:0),r=0;r<p;r+=1,x+=3)if(l=r,r===g.length&&(l=0,x-=3),v=g[l],r&&(te=ee[0],ee[0]=ee[1],ee[1]=te),e||(te.pos=r===l?x:O,te.prev=l?x-3:Y?O+3*(g.length-3+Y):x,te.next=r+1<g.length?x+3:Y?r!==l?O+3:O+6-3*Y:x),te.strokeWidth=void 0===M?re(v,l,t,n):M,te.strokeColor=void 0===D?ie(v,l,t,n):D,te.strokeOpacity=void 0===k?oe(v,l,t,n):k,ge&&(0!==N&&(te.strokeOffset=(void 0===N?le(v,l,t,n):N)||0,te.strokeOffset?(te.posStrokeOffset=2047&Math.round(2048+1023*Math.min(1,Math.max(-1,te.strokeOffset))),te.negStrokeOffset=2047&Math.round(2048-1023*Math.min(1,Math.max(-1,te.strokeOffset)))):te.posStrokeOffset=te.negStrokeOffset=0),Y||r&&r!==g.length-1?te.flags=void 0===R?c[se(v,l,t,n)]||c.miter:R:te.flags=void 0===I?u[ae(v,l,t,n)]||u.butt:I),r)for(o=0;o<fe;o+=1,K+=1,Z+=3)a=ee[F=de[o][0]],s=ee[1-F],e||(j[Z]=ve[a.pos],j[Z+1]=ve[a.pos+1],j[Z+2]=0,L=F?"next":"prev",B=F?"prev":"next",z[Z]=ve[a[L]],z[Z+1]=ve[a[L]+1],z[Z+2]=0,G[Z]=ve[a[B]],G[Z+1]=ve[a[B]+1],G[Z+2]=0,U[Z]=ve[s[B]],U[Z+1]=ve[s[B]+1],U[Z+2]=0),ge&&(V=F?"posStrokeOffset":"negStrokeOffset",W[K]=de[o][3]+4*a.flags+32*s.flags+256*a[V]),H[K]=a.strokeWidth,q[Z]=a.strokeColor.r,q[Z+1]=a.strokeColor.g,q[Z+2]=a.strokeColor.b,a.strokeOpacity<=0&&s.strokeOpacity<=0||a.strokeWidth<=0&&s.strokeWidth<=0?X[K]=-1:X[K]=a.strokeOpacity;e?(ge&&y.updateSourceBuffer("flags"),y.updateSourceBuffer("strokeWidth"),y.updateSourceBuffer("strokeOpacity"),y.updateSourceBuffer("strokeColor")):(y.modified(),he.boundsDirty(!0),y.boundsDirtyTimestamp().modified())}(!!(E.dataTime().timestamp()<E.buildTime().timestamp()&&A)),E.renderer().contextRenderer().hasActor(v)||E.renderer().contextRenderer().addActor(v),E.buildTime().modified(),E},this._update=function(){return k.call(E),(E.dataTime().timestamp()>=E.buildTime().timestamp()||E.updateTime().timestamp()<=E.timestamp())&&E._build(),x.set(1/E.renderer().width()),w.set(E.renderer().width()/E.renderer().height()),v.setVisible(E.visible()),v.material().setBinNumber(E.bin()),E.updateTime().modified(),E},this._exit=function(){E.renderer().contextRenderer().removeActor(v),v=null,O()},this._init(t),this};r(f,o);var p={};p[o.capabilities.basic]=!0,p[o.capabilities.multicolor]=!0,i("webgl","line",f,p),e.exports=f},8672:function(e,t,n){var r=n(5699),i=n(6618),o=n(320);var a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.texture.call(this);var n,r=i(),a=t.maxWidth||4096,s=new Uint8Array([0,0,0,0]),l=this;return this.setup=function(e){!function(e,t){if(!(t>=0&&t<=31))throw Error("[error] Texture unit "+t+" is not supported");e.m_context.activeTexture(o.GL.TEXTURE0+t)}(e,l.textureUnit()),e.m_context.deleteTexture(l.m_textureHandle),l.m_textureHandle=e.m_context.createTexture(),e.m_context.bindTexture(o.GL.TEXTURE_2D,l.m_textureHandle),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MIN_FILTER,o.GL.NEAREST),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_MAG_FILTER,o.GL.NEAREST),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_S,o.GL.CLAMP_TO_EDGE),e.m_context.texParameteri(o.GL.TEXTURE_2D,o.GL.TEXTURE_WRAP_T,o.GL.CLAMP_TO_EDGE),e.m_context.pixelStorei(o.GL.UNPACK_ALIGNMENT,1),e.m_context.pixelStorei(o.GL.UNPACK_FLIP_Y_WEBGL,!0),e.m_context.texImage2D(o.GL.TEXTURE_2D,0,o.GL.RGBA,l.width,l.height,0,o.GL.RGBA,o.GL.UNSIGNED_BYTE,s),e.m_context.bindTexture(o.GL.TEXTURE_2D,null),r.modified()},this.colorTable=function(e){return void 0===e?n:(n=e,e.length<4&&(e=[0,0,0,0]),l.width=Math.min(a,e.length/4),l.height=Math.ceil(e.length/4/a),e instanceof Uint8Array&&e.length===l.width*l.height*4?s=e:(e.length<l.width*l.height*4&&(e=e.concat(new Array(l.width*l.height*4-e.length).fill(0))),s=new Uint8Array(e)),l.modified(),l)},this.maxWidth=function(){return a},this.colorTable(t.colorTable||[]),this};r(a,o.texture),e.exports=a},1848:function(e,t,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(7098),s=n(2254),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var i=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(5108),f=n(5573),p=n(468),h=n(2043),m=n(7981);u.call(this);var g,v,y=this,b=this._exit,x=null,w=null,_={},S=this._init,C=this._update,A=this.updateStyleFromArray;function T(e){var t,n,r,i,u,c,d,f,p,h,m,b,_,S=y.data().length,C=y._pointPolygon(0,0,1,1),A=new Array(3*S),P={},E={},O={},M={},D={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeOffset:0,strokeWidth:1,symbol:1,symbolValue:1,rotation:1,scaleWithZoom:0,rotateWithMap:0},k=y.verticesPerFeature(),I=y.data(),R=w.geometryData();for(var N in u=y.position(),D)O[N]=y.style.get(N),l.isFunction(y.style(N))||(M[N]=O[N]()),D[N]&&(P[N]=l.getGeomBuffer(R,N,k*S*D[N]));if(!e){for(t=b=0;t<S;t+=1,b+=3)i=u(I[t],t),A[b]=i.x,A[b+1]=i.y,A[b+2]=0;if(A=o.transformCoordinates(y.gcs(),y.layer().map().gcs(),A,3),(v=new Float32Array(y.style.get("origin")(A)))[0]||v[1]||v[2])for(t=b=0;t<S;t+=1,b+=3)A[b]-=v[0],A[b+1]-=v[1],A[b+2]-=v[2];g.setOrigin(v),r=l.getGeomBuffer(R,"pos",k*S*3),y._primitiveShape!==a.primitiveShapes.sprite&&(d=l.getGeomBuffer(R,"unit",k*S*2)),(c=R.primitive(0).indices())instanceof Uint16Array&&c.length===k*S||(c=new Uint16Array(k*S),R.primitive(0).setIndices(c))}for(t=p=h=m=b=0;t<S;t+=1,b+=3){if(f=I[t],!e&&y._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<C.length;n+=1,m+=1)d[m]=C[n];for(var F in D)E[F]=void 0===M[F]?O[F](f,t):M[F];for(E.scaleWithZoom=a.scaleMode[E.scaleWithZoom]||(E.scaleWithZoom>=1&&E.scaleWithZoom<=3?E.scaleWithZoom:0),E.symbolComputed=E.scaleWithZoom+(E.rotateWithMap?4:0)+16*(Math.sign(E.strokeOffset)+1)+64*E.symbol,E.symbolValue&&E.symbol>=a.symbols.arrow&&E.symbol<a.symbols.arrow+a.symbols.arrowMax&&(E.symbolValue=(_=E.symbolValue).length?((void 0===_[0]?0:Math.floor(250*Math.abs(_[0]))+1)+252*(void 0===_[1]?0:Math.floor(250*Math.abs(_[1]))+1)+252*(void 0===_[2]?0:Math.floor(250*Math.abs(_[2]))+1)*252)*(_[3]?-1:1):void 0===_?0:Math.floor(250*Math.abs(_))+1),n=0;n<k;n+=1,p+=1,h+=3)e||(r[h]=A[b],r[h+1]=A[b+1],r[h+2]=A[b+2]),P.radius[p]=E.radius,P.fillColor[h]=E.fillColor.r,P.fillColor[h+1]=E.fillColor.g,P.fillColor[h+2]=E.fillColor.b,P.fillOpacity[p]=E.fillOpacity,P.strokeColor[h]=E.strokeColor.r,P.strokeColor[h+1]=E.strokeColor.g,P.strokeColor[h+2]=E.strokeColor.b,P.strokeOpacity[p]=E.strokeOpacity,P.strokeWidth[p]=E.strokeWidth,P.symbol[p]=E.symbolComputed,P.symbolValue[p]=E.symbolValue,P.rotation[p]=E.rotation}if(y._primitiveShapeAuto){var L=y._approximateMaxRadius(y.renderer().map().zoom());if(y._primitiveShape===a.primitiveShapes.sprite&&L>s._maxPointSize||y._primitiveShape!==a.primitiveShapes.sprite&&L<=s._maxPointSize)return y._primitiveShape=L>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,y.renderer().contextRenderer().removeActor(x),x=null,y._init(!0),void T()}e?Object.keys(P).forEach((function(e){return w.updateSourceBuffer(e)})):(R.boundsDirty(!0),w.modified(),w.boundsDirtyTimestamp().modified())}return c(y,t),this.actors=function(){return x?[x]:[]},this.updateStyleFromArray=function(e,t,n){var i,o,a={fillColor:3,fillOpacity:1,radius:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbolComputed:1,symbolValueComputed:1};if("string"==typeof e){var s={};s[e]=t,e=s}return r.each(e,(function(e,t){var n,r,s,l,u,c,d,f,p,h;if(y.visible()&&x&&a[e]&&!i&&!y.clustering())if(p=a[e],l=y.data().length,h="symbolComputed"===e?"symbol":"symbolValueComputed"===e?"symbolValue":e,s=(r=x.mapper()).getSourceBuffer(h),n=y.verticesPerFeature(),s&&l&&l*n*p===s.length){switch(a[e]){case 1:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=1)s[f]=u;break;case 3:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=3)s[f]=u.r,s[f+1]=u.g,s[f+2]=u.b}r.updateSourceBuffer(h),o=!0}else i=!0;else i=!0;if(e===h){var m=y.modified;i||(y.modified=function(){}),A(e,t,!1),y.modified=m}})),n&&(y.visible()&&i?y.draw():o&&y.renderer()._render()),y},this._handleZoom=function(e){y._primitiveShapeAuto&&y._primitiveShape===a.primitiveShapes.sprite&&y._approximateMaxRadius(e)>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(e){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?m:h),r),l=function(){var e=new i.shader(i.GL.FRAGMENT_SHADER);return e.setShaderSource(y._primitiveShape===a.primitiveShapes.sprite?p:f),e}(),u=i.material(),c=i.blend(),b=i.geometryData(),C=i.sourceDataP3fv({name:"pos"}),A={radius:1,fillColor:3,fillOpacity:1,strokeColor:3,strokeOpacity:1,strokeWidth:1,symbol:1,symbolValue:1,rotation:1},T={pixelWidth:i.GL.FLOAT,aspect:i.GL.FLOAT,zoom:i.GL.FLOAT,rotationUniform:i.GL.FLOAT},P=new i.projectionUniform("projectionMatrix");g=new i.modelViewOriginUniform("modelViewMatrix",v),y._primitiveShape===a.primitiveShapes.sprite?n=new i.points:(n=new i.triangles,A.unit=2),n.setIndices(new Uint16Array),e||S.call(y,t),w=i.mapper(),o.addVertexAttribute(i.vertexAttribute("pos"),i.vertexAttributeKeys.Position),b.addSource(C),Object.keys(A).forEach((function(e,t){o.addVertexAttribute(i.vertexAttribute(e),t+1),b.addSource(i.sourceDataAnyfv(A[e],t+1,{name:e}))})),_={},Object.keys(T).forEach((function(e){_[e]=new i.uniform(T[e],e),o.addUniform(_[e])})),o.addUniform(g),o.addUniform(P),o.addShader(l),o.addShader(s),u.addAttribute(o),u.addAttribute(c),(x=i.actor()).setMaterial(u),x.setMapper(w),b.addPrimitive(n),b.computeBounds=function(){b.setBounds(0,0,0,0,0,0)},w.setGeometryData(b),e||y.geoOn(d.zoom,(function(e){y._handleZoom(e.zoomLevel)}))},this._build=function(){return T(y.dataTime().timestamp()<y.buildTime().timestamp()),y.renderer().contextRenderer().hasActor(x)||y.renderer().contextRenderer().addActor(x),y.buildTime().modified(),y},this._update=function(){return C.call(y),(y.dataTime().timestamp()>=y.buildTime().timestamp()||y.updateTime().timestamp()<y.timestamp())&&y._build(),_.pixelWidth.set(2/y.renderer().width()),_.aspect.set(y.renderer().width()/y.renderer().height()),_.zoom.set(y.renderer().map().zoom()),_.rotationUniform.set(y.renderer().map().rotation()),x.setVisible(y.visible()),x.material().setBinNumber(y.bin()),y.updateTime().modified(),y},this._exit=function(){y.renderer().contextRenderer().removeActor(x),x=null,_={},b()},y._init(),this};i(l,a);o("webgl","marker",l,{}),e.exports=l},5651:function(e,t,n){e.exports=function(e){"use strict";e=e||{};var t=n(320),r=n(6853),i=n(4634),o=n(4351),a=n(5836);n(7719).call(this);var s,l,u=this,c=this._exit,d=null,f=null,p=null,h=null,m=null,g=null,v=null,y=null,b=void 0!==e.dynamicDraw&&e.dynamicDraw,x=this._init,w=this._update;function _(){var e=new t.shader(t.GL.VERTEX_SHADER);return e.setShaderSource(a),e}function S(){var e=new t.shader(t.GL.FRAGMENT_SHADER);return e.setShaderSource(o),e}return this.createGLMeshColored=function(e){var t,n,o,a,c,d,p,b,x,w=e.elements.length,_=[],S=f.geometryData();for(m.set([e.minColor.r,e.minColor.g,e.minColor.b,e.minColor.a]),g.set([e.maxColor.r,e.maxColor.g,e.maxColor.b,e.maxColor.a]),v.set(e.colorMap.length),y.set(e.stepped),t=-1;t<e.colorMap.length+1;t+=1)o=Math.max(0,Math.min(e.colorMap.length-1,t)),_.push(255*e.colorMap[o].r),_.push(255*e.colorMap[o].g),_.push(255*e.colorMap[o].b),_.push(255*e.colorMap[o].a);if(h.setColorTable(_),e.pos=r.transformCoordinates(u.gcs(),u.layer().map().gcs(),e.pos,3),(s=new Float32Array(u.style.get("origin")(e.pos)))[0]||s[1]||s[2])for(t=0;t<e.pos.length;t+=3)e.pos[t]-=s[0],e.pos[t+1]-=s[1],e.pos[t+2]-=s[2];for(l.setOrigin(s),d=i.getGeomBuffer(S,"pos",3*w),p=i.getGeomBuffer(S,"opacity",w),b=i.getGeomBuffer(S,"value",w),t=n=0;t<w;t+=1,n+=3)a=3*(o=e.elements[t]),d[n]=e.pos[a],d[n+1]=e.pos[a+1],d[n+2]=e.pos[a+2],c=e.elementValues?Math.floor(t/3):o,p[t]=e.opacity[c],b[t]=e.value[c];(x=S.primitive(0).indices())instanceof Uint16Array&&x.length===w||(x=new Uint16Array(w),S.primitive(0).setIndices(x)),S.boundsDirty(!0),f.modified(),f.boundsDirtyTimestamp().modified()},this._init=function(e){var n=t.blend(),r=t.shaderProgram(),i=t.material(),o=t.lookupTable(),a=t.geometryData(),s=new t.projectionUniform("projectionMatrix"),c=new t.uniform(t.GL.INT,"sampler2d"),w=_(),C=S(),A=t.vertexAttribute("pos"),T=t.vertexAttribute("value"),P=t.vertexAttribute("opacity"),E=t.sourceDataP3fv({name:"pos"}),O=t.sourceDataAnyfv(1,t.vertexAttributeKeysIndexed.One,{name:"value"}),M=t.sourceDataAnyfv(1,t.vertexAttributeKeysIndexed.Two,{name:"opacity"}),D=new t.triangles;l=new t.modelViewOriginUniform("modelViewMatrix"),x.call(u,e),f=t.mapper({dynamicDraw:b}),r.addVertexAttribute(A,t.vertexAttributeKeys.Position),r.addVertexAttribute(T,t.vertexAttributeKeysIndexed.One),r.addVertexAttribute(P,t.vertexAttributeKeysIndexed.Two),r.addUniform(l),r.addUniform(s),m=new t.uniform(t.GL.FLOAT_VEC4,"minColor"),r.addUniform(m),g=new t.uniform(t.GL.FLOAT_VEC4,"maxColor"),r.addUniform(g),v=new t.uniform(t.GL.FLOAT,"steps"),r.addUniform(v),y=new t.uniform(t.GL.BOOL,"stepped"),r.addUniform(y),r.addShader(C),r.addShader(w),r.addUniform(c),o.setTextureUnit(7),c.set(7),(p=i).addAttribute(r),p.addAttribute(n),h=o,p.addAttribute(h),(d=t.actor()).setMaterial(p),d.setMapper(f),a.addSource(E),a.addSource(O),a.addSource(M),a.addPrimitive(D),a.computeBounds=function(){a.setBounds(0,0,0,0,0,0)},f.setGeometryData(a)},this.actors=function(){return d?[d]:[]},this._update=function(){w.call(u),(u.dataTime().timestamp()>=u.buildTime().timestamp()||u.updateTime().timestamp()<=u.timestamp())&&u._build(),d.setVisible(u.visible()),d.material().setBinNumber(u.bin()),u.updateTime().modified()},this._exit=function(){u.renderer().contextRenderer().removeActor(d),c()},this}},7719:function(e,t,n){e.exports=function e(t){"use strict";if(!(this instanceof n(3737)))return new e(t);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(e,t){if(void 0===e&&!t&&null===o(void 0,!0)){var n=r.layer&&r.layer(),i=n&&n.map&&n.map(),a=i&&i.listSceneObjects()||[],s=a.indexOf(r);if(s>=0)return s}return o.apply(r,arguments)}}return this}},9685:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6374),a=n(8672),s=n(4634),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t),n(7719).call(this);var r,i,l,u=n(320),c=n(3953),d=this._exit,f=this;return this.pointSearch=function(e,t){if(r&&f.m_info)for(var n=r.pointSearch(e,t),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),l=Math.floor(a.y*o.height),u=document.createElement("canvas");u.width=u.height=1;var c=u.getContext("2d");c.drawImage(o,s,l,1,1,0,0,1,1);var d=c.getImageData(0,0,1,1).data,p=d[0]+256*d[1]+256*d[2]*256;return n={index:[p],found:[f.data()[p]]}}return{index:[],found:[]}},this._computePixelmap=function(){var e=f.data()||[],t=f.style.get("color"),n=f.indexModified(void 0,"clear"),o=f.dataTime().timestamp()>=f.buildTime().timestamp()||void 0===n;l||((l=a()).setTextureUnit(1),o=!0);var d,p=Math.max(1,e.length),h=l.maxWidth();p>h&&p%h&&(p+=h-p%h),o||(o=(d=l.colorTable()).length!==4*p,n[0]=Math.max(0,n[0]),n[1]=Math.min(e.length,n[1]+1)),o&&(d=new Uint8Array(4*p),n=[0,e.length]);for(var m=n[0];m<n[1];m+=1){var g=e[m],v=s.convertColor(t.call(f,g,m));d[4*m]=255*v.r,d[4*m+1]=255*v.g,d[4*m+2]=255*v.b,d[4*m+3]=void 0===v.a?255:255*v.a}f.m_info={colors:d};var y=l.colorTable();if(y&&y.length===d.length){for(var b=4*n[0];b<4*n[1]&&d[b]===y[b];b+=1);if(b===4*n[1])return}l.colorTable(d),r||(r=f.layer().createFeature("quad",{selectionAPI:!1,gcs:f.gcs(),visible:f.visible(void 0,!0)}),i=!1),i||(f.dependentFeatures([r]),r.setShader("image_fragment",c),r._hookBuild=function(e){var t=new u.uniform(u.GL.INT,"lutSampler");t.set(l.textureUnit()),e.addUniform(t);var n=new u.uniform(u.GL.INT,"lutWidth");n.set(l.width),e.addUniform(n);var r=new u.uniform(u.GL.INT,"lutHeight");r.set(l.height),e.addUniform(r)},r._hookRenderImageQuads=function(e,t){t.forEach((function(e){e.image&&e.texture&&!e.texture.nearestPixel()&&e.texture.setNearestPixel(!0)})),l.bind(e,t)},!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([])),d(),f},t.quadFeature&&(r=t.quadFeature),this._init(t),this};r(l,o);var u={};u[o.capabilities.lookup]=!0,i("webgl","pixelmap",l,u),e.exports=l},5675:function(e,t,n){var r=n(5638),i=n(5699),o=n(4647).registerFeature,a=n(2557),s=n(2254),l=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var i=n(320),o=n(6853),l=n(4634),u=n(7719),c=n(9892),d=n(1815),f=n(4900),p=n(9713),h=n(8410);u.call(this);var m,g,v=this,y=this._exit,b=null,x=null,w=null,_=null,S=void 0!==t.dynamicDraw&&t.dynamicDraw,C=this._init,A=this._update,T=this.updateStyleFromArray;function P(e){var t,n,r,i,u,c,d,f,p,h,y,w,_,S,C,A,T,E,O,M,D,k,I,R,N,F,L,B,V,j,z,G,U,W,H,q,X=v.data().length,K=v._pointPolygon(0,0,1,1),Z=new Array(3*X),Y=v.verticesPerFeature(),J=v.data(),Q=0,$=x.geometryData();if(u=v.position(),h=v.style.get("radius"),_=v.style.get("stroke"),A=v.style.get("strokeWidth"),O=v.style.get("strokeOpacity"),k=v.style.get("strokeColor"),N=v.style.get("fill"),B=v.style.get("fillOpacity"),z=v.style.get("fillColor"),!e){for(t=q=0;t<X;t+=1,q+=3)i=u(J[t],t),Z[q]=i.x,Z[q+1]=i.y,Z[q+2]=0;if(Z=o.transformCoordinates(v.gcs(),v.layer().map().gcs(),Z,3),(g=new Float32Array(v.style.get("origin")(Z)))[0]||g[1]||g[2])for(t=q=0;t<X;t+=1,q+=3)Z[q]-=g[0],Z[q+1]-=g[1],Z[q+2]-=g[2];m.setOrigin(g),r=l.getGeomBuffer($,"pos",Y*X*3),c=l.getGeomBuffer($,"unit",Y*X*2),(d=$.primitive(0).indices())instanceof Uint16Array&&d.length===Y*X||(d=new Uint16Array(Y*X),$.primitive(0).setIndices(d))}for(f=l.getGeomBuffer($,"radius",Y*X),y=l.getGeomBuffer($,"stroke",Y*X),S=l.getGeomBuffer($,"strokeWidth",Y*X),T=l.getGeomBuffer($,"strokeOpacity",Y*X),M=l.getGeomBuffer($,"strokeColor",Y*X*3),I=l.getGeomBuffer($,"fill",Y*X),F=l.getGeomBuffer($,"fillOpacity",Y*X),V=l.getGeomBuffer($,"fillColor",Y*X*3),t=U=W=H=q=0;t<X;t+=1,q+=3){if(G=J[t],!e&&v._primitiveShape!==a.primitiveShapes.sprite)for(n=0;n<K.length;n+=1,H+=1)c[H]=K[n];for(p=h(G,t),w=_(G,t)?1:0,C=A(G,t),E=O(G,t),D=k(G,t),R=N(G,t)?1:0,L=B(G,t),j=z(G,t),v._primitiveShapeAuto&&(R&&L||w&&E)&&p+(w&&E?C:0)>Q&&(Q=p+(w&&E?C:0)),n=0;n<Y;n+=1,U+=1,W+=3)e||(r[W]=Z[q],r[W+1]=Z[q+1],r[W+2]=Z[q+2]),f[U]=p,y[U]=w,S[U]=C,T[U]=E,M[W]=D.r,M[W+1]=D.g,M[W+2]=D.b,I[U]=R,F[U]=L,V[W]=j.r,V[W+1]=j.g,V[W+2]=j.b}if(v._primitiveShapeAuto&&(v._primitiveShape===a.primitiveShapes.sprite&&Q>s._maxPointSize||v._primitiveShape!==a.primitiveShapes.sprite&&Q<=s._maxPointSize))return v._primitiveShape=Q>s._maxPointSize?a.primitiveShapes.triangle:a.primitiveShapes.sprite,v.renderer().contextRenderer().removeActor(b),b=null,v._init(!0),void P();e?(x.updateSourceBuffer("radius"),x.updateSourceBuffer("stroke"),x.updateSourceBuffer("strokeWidth"),x.updateSourceBuffer("strokeColor"),x.updateSourceBuffer("strokeOpacity"),x.updateSourceBuffer("fill"),x.updateSourceBuffer("fillColor"),x.updateSourceBuffer("fillOpacity")):($.boundsDirty(!0),x.modified(),x.boundsDirtyTimestamp().modified())}return c(v,t),this.actors=function(){return b?[b]:[]},this.updateStyleFromArray=function(e,t,n){var i,o,a={fill:"bool",fillColor:3,fillOpacity:1,radius:1,stroke:"bool",strokeColor:3,strokeOpacity:1,strokeWidth:1};if("string"==typeof e){var s={};s[e]=t,e=s}return r.each(e,(function(e,t){var n,r,s,l,u,c,d,f,p;if(v.visible()&&b&&a[e]&&!i&&!v.clustering())if(p="bool"===a[e]?1:a[e],l=v.data().length,s=(r=b.mapper()).getSourceBuffer(e),n=v.verticesPerFeature(),s&&l&&l*n*p===s.length){switch(a[e]){case 1:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=1)s[f]=u;break;case 3:for(c=0,f=0;c<l;c+=1)for(u=t[c],d=0;d<n;d+=1,f+=3)s[f]=u.r,s[f+1]=u.g,s[f+2]=u.b;break;case"bool":for(c=0,f=0;c<l;c+=1)for(u=t[c]?1:0,d=0;d<n;d+=1,f+=1)s[f]=u}r.updateSourceBuffer(e),o=!0}else i=!0;else i=!0;var h=v.modified;i||(v.modified=function(){}),T(e,t,!1),v.modified=h})),n&&(v.visible()&&i?v.draw():o&&v.renderer()._render()),v},this._init=function(e){var n,r,o=i.shaderProgram(),s=((r=new i.shader(i.GL.VERTEX_SHADER)).setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?h:p),r),l=function(){var e=new i.shader(i.GL.FRAGMENT_SHADER);return e.setShaderSource(v._primitiveShape===a.primitiveShapes.sprite?f:d),e}(),u=i.vertexAttribute("pos"),c=i.vertexAttribute("unit"),y=i.vertexAttribute("radius"),A=i.vertexAttribute("strokeWidth"),T=i.vertexAttribute("fillColor"),P=i.vertexAttribute("fill"),E=i.vertexAttribute("strokeColor"),O=i.vertexAttribute("stroke"),M=i.vertexAttribute("fillOpacity"),D=i.vertexAttribute("strokeOpacity"),k=new i.projectionUniform("projectionMatrix"),I=i.material(),R=i.blend(),N=i.geometryData(),F=i.sourceDataP3fv({name:"pos"}),L=i.sourceDataAnyfv(2,i.vertexAttributeKeysIndexed.One,{name:"unit"}),B=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Two,{name:"radius"}),V=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Three,{name:"strokeWidth"}),j=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Four,{name:"fillColor"}),z=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Five,{name:"fill"}),G=i.sourceDataAnyfv(3,i.vertexAttributeKeysIndexed.Six,{name:"strokeColor"}),U=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Seven,{name:"stroke"}),W=i.sourceDataAnyfv(1,i.vertexAttributeKeysIndexed.Eight,{name:"fillOpacity"}),H=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),w=new i.floatUniform("pixelWidth",2/v.renderer().width()),_=new i.floatUniform("aspect",v.renderer().width()/v.renderer().height()),e||C.call(v,t),x=i.mapper({dynamicDraw:S}),o.addVertexAttribute(u,i.vertexAttributeKeys.Position),v._primitiveShape!==a.primitiveShapes.sprite&&o.addVertexAttribute(c,i.vertexAttributeKeysIndexed.One),o.addVertexAttribute(y,i.vertexAttributeKeysIndexed.Two),o.addVertexAttribute(A,i.vertexAttributeKeysIndexed.Three),o.addVertexAttribute(T,i.vertexAttributeKeysIndexed.Four),o.addVertexAttribute(P,i.vertexAttributeKeysIndexed.Five),o.addVertexAttribute(E,i.vertexAttributeKeysIndexed.Six),o.addVertexAttribute(O,i.vertexAttributeKeysIndexed.Seven),o.addVertexAttribute(M,i.vertexAttributeKeysIndexed.Eight),o.addVertexAttribute(D,i.vertexAttributeKeysIndexed.Nine),o.addUniform(w),o.addUniform(_),o.addUniform(m),o.addUniform(k),o.addShader(l),o.addShader(s),I.addAttribute(o),I.addAttribute(R),(b=i.actor()).setMaterial(I),b.setMapper(x),N.addSource(F),N.addSource(L),N.addSource(B),N.addSource(V),N.addSource(j),N.addSource(z),N.addSource(G),N.addSource(U),N.addSource(W),N.addSource(H),N.addPrimitive(n),N.computeBounds=function(){N.setBounds(0,0,0,0,0,0)},x.setGeometryData(N)},this._build=function(){return P(v.dataTime().timestamp()<v.buildTime().timestamp()),v.renderer().contextRenderer().hasActor(b)||v.renderer().contextRenderer().addActor(b),v.buildTime().modified(),v},this._update=function(){return A.call(v),(v.dataTime().timestamp()>=v.buildTime().timestamp()||v.updateTime().timestamp()<v.timestamp())&&v._build(),w.set(2/v.renderer().width()),_.set(v.renderer().width()/v.renderer().height()),b.setVisible(v.visible()),b.material().setBinNumber(v.bin()),v.updateTime().modified(),v},this._exit=function(){v.renderer().contextRenderer().removeActor(b),b=null,y()},v._init(),this};i(l,a);var u={};u[a.capabilities.stroke]=!0,o("webgl","point",l,u),e.exports=l},9892:function(e,t,n){var r=n(2557);e.exports=function(e,t){t=t||{},e._primitiveShapeAuto=!0,e._primitiveShape=r.primitiveShapes.auto,void 0!==r.primitiveShapes[t.primitiveShape]&&(e._primitiveShape=t.primitiveShape),e._primitiveShapeAuto=e._primitiveShape===r.primitiveShapes.auto,e._primitiveShapeAuto&&(e._primitiveShape=r.primitiveShapes.sprite,e._primitiveShapeAuto=!0),e._pointPolygon=function(t,n,i,o){var a;switch(e._primitiveShape){case r.primitiveShapes.triangle:a=[t,n-2*o,t-i*Math.sqrt(3),n+o,t+i*Math.sqrt(3),n+o];break;case r.primitiveShapes.square:a=[t-i,n+o,t-i,n-o,t+i,n+o,t-i,n-o,t+i,n-o,t+i,n+o];break;default:a=[t,n]}return a},e.verticesPerFeature=function(){return e._pointPolygon(0,0,1,1).length/2},e.primitiveShape=function(t,n){if(void 0===t)return n||!e._primitiveShapeAuto?e._primitiveShape:r.primitiveShapes.auto;if(void 0!==r.primitiveShapes[t]){var i=!1;t===r.primitiveShapes.auto?(i=!e._primitiveShapeAuto,e._primitiveShapeAuto=!0):(i=e._primitiveShapeAuto||e._primitiveShape!==t,e._primitiveShapeAuto=!1,e._primitiveShape=t),i&&(e.renderer().contextRenderer().removeActor(e.actors()[0]),e._init(!0),e.dataTime().modified())}return e}}},2890:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(4343),a=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},o.call(this,t);var r=n(320),i=n(1106),a=n(6853),s=n(4634),l=n(7719),u=n(1859),c=n(5810);l.call(this);var d,f,p,h,m,g=this,v=this._exit,y=r.actor(),b=r.mapper(),x=r.material(),w=this._init,_=this._update;function S(){var e=new r.shader(r.GL.VERTEX_SHADER);return e.setShaderSource(c),e}function C(){var e=new r.shader(r.GL.FRAGMENT_SHADER);return e.setShaderSource(u),e}return this._init=function(e){var t=r.shaderProgram(),n=r.vertexAttribute("pos"),i=r.vertexAttribute("fillColor"),o=r.vertexAttribute("fillOpacity"),a=new r.projectionUniform("projectionMatrix"),s=S(),l=C(),u=r.blend(),c=r.geometryData(),d=r.sourceDataP3fv({name:"pos"}),f=r.sourceDataAnyfv(3,r.vertexAttributeKeysIndexed.Two,{name:"fillColor"}),h=r.sourceDataAnyfv(1,r.vertexAttributeKeysIndexed.Three,{name:"fillOpacity"}),m=r.triangles();p=new r.modelViewOriginUniform("modelViewMatrix"),t.addVertexAttribute(n,r.vertexAttributeKeys.Position),t.addVertexAttribute(i,r.vertexAttributeKeysIndexed.Two),t.addVertexAttribute(o,r.vertexAttributeKeysIndexed.Three),t.addUniform(p),t.addUniform(a),t.addShader(l),t.addShader(s),x.addAttribute(t),x.addAttribute(u),y.setMaterial(x),y.setMapper(b),c.addSource(d),c.addSource(f),c.addSource(h),c.addPrimitive(m),c.computeBounds=function(){c.setBounds(0,0,0,0,0,0)},b.setGeometryData(c),w.call(g,e)},this.actors=function(){return[y]},this._build=function(){!function(e){var t,n,r,o,l,u,c,h,m,v,y,x,w,_,S,C,A,T,P,E,O,M,D,k,I,R,N,F,L=[],B=g.gcs(),V=g.layer().map().gcs(),j=0,z=b.geometryData();for(l=g.style.get("fillColor"),u=s.isFunction(g.style("fillColor"))?void 0:l(),h=g.style.get("fillOpacity"),m=s.isFunction(g.style("fillOpacity"))?void 0:h(),v=g.style.get("fill"),y=s.isFunction(g.style("fill"))?void 0:v(),x=g.style.get("uniformPolygon"),e?(L=d.items,j=d.numPts):(n=g.style.get("position"),r=g.style.get("polygon"),g.data().forEach((function(e,t){var o,s,l,u;if((o=r(e,t))&&!((s=o.outer||(Array.isArray(o)?o:[])).length<3)){for(l=new Array(3*s.length),O=P=0;O<s.length;O+=1,P+=3)u=n(s[O],O,e,t),l[P]=u.x,l[P+1]=u.y,l[P+2]=0;l={vertices:l,dimensions:3,holes:[]},F=s,o.inner&&o.inner.forEach((function(r){if(!(r.length<3))for(F=F.concat(r),l.holes.push(P/3),O=0;O<r.length;O+=1,P+=3)u=n(r[O],O,e,t),l.vertices[P]=u.x,l.vertices[P+1]=u.y,l.vertices[P+2]=0})),l.vertices=a.transformCoordinates(B,V,l.vertices,l.dimensions),(I={triangles:i(l.vertices,l.holes,l.dimensions),vertices:l.vertices,original:F,item:e,itemIndex:t}).triangles.length&&(L.push(I),j+=I.triangles.length)}})),t=s.getGeomBuffer(z,"pos",3*j),(_=z.primitive(0).indices())instanceof Uint16Array&&_.length===j||(_=new Uint16Array(j),z.primitive(0).setIndices(_)),d={items:L,numPts:j},f=new Float32Array(g.style.get("origin")(L)),p.setOrigin(f)),o=s.getGeomBuffer(z,"fillColor",3*j),c=s.getGeomBuffer(z,"fillOpacity",j),T=P=0,S=u,A=y,D=0;D<L.length;D+=1)if(k=L[D].triangles.length,E=L[D].vertices,R=L[D].item,N=L[D].itemIndex,F=L[D].original,C=m,(w=x(R,N))&&(void 0===u&&(S=l(E[0],0,R,N)),void 0===m&&(C=h(E[0],0,R,N))),void 0===y&&(A=v(R,N)),A||(C=0),w&&e&&L[D].uniform&&L[D].color&&S.r===L[D].color.r&&S.g===L[D].color.g&&S.b===L[D].color.b&&C===L[D].opacity)T+=k,P+=3*k;else{for(O=0;O<k;O+=1,T+=1,P+=3)e&&w?(o[P]=S.r,o[P+1]=S.g,o[P+2]=S.b,c[T]=C):(M=3*L[D].triangles[O],e||(t[P]=E[M]-f[0],t[P+1]=E[M+1]-f[1],t[P+2]=E[M+2]-f[2],_[T]=O),w||void 0!==u||(S=l(F[M],M,R,N)),o[P]=S.r,o[P+1]=S.g,o[P+2]=S.b,!w&&A&&void 0===m&&(C=h(F[M],M,R,N)),c[T]=C);(w||L[D].uniform)&&(L[D].uniform=w,L[D].color=S,L[D].opacity=C)}e?(b.updateSourceBuffer("fillOpacity"),b.updateSourceBuffer("fillColor")):(b.modified(),z.boundsDirty(!0),b.boundsDirtyTimestamp().modified())}(!!(g.dataTime().timestamp()<g.buildTime().timestamp()&&d)),g.renderer().contextRenderer().hasActor(y)||(g.renderer().contextRenderer().addActor(y),h=!0),g.buildTime().modified()},this._update=function(e){g.ready&&(e&&e.mayDelay&&h?m=g.layer().map().scheduleAnimationFrame(g._update):(m&&(g.layer().map().scheduleAnimationFrame(g._update,"remove"),m=null),_.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(t),this};r(a,o),i("webgl","polygon",a),e.exports=a},2182:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(5017),a=n(6618),s=16777216,l=function e(t){"use strict";if(!(this instanceof e))return new e(t);o.call(this,t);var r=n(5638),i=n(320),l=n(7719),u=n(7521),c=n(5804),d=n(630),f=n(1899);l.call(this);var p,h,m,g,v,y,b,x=this,w=this._exit,_=this._update,S={},C=a(),A=a();function T(e){var t=new i.mapper({dynamicDraw:!0});return t.s_modified=t.modified,t.g_timestamp=a(),t.timestamp=t.g_timestamp.timestamp,t.modified=function(){return t.s_modified(),t.g_timestamp.modified(),t},t.s_render=t.render,t.render=e,t}return this.actors=function(){var e=[];return h&&e.push(h),m&&e.push(m),e},this._build=function(){var e,t,n,r,o,a,s,l,w;x.position()&&((b=x._generateQuads()).imgQuads.length&&!h&&(x.visible(!1),e=T(x._renderImageQuads),(h=new i.actor).setMapper(e),t=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",b.origin),n.addUniform(p),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),(w=new i.uniform(i.GL.INT,"sampler2d")).set(0),n.addUniform(w),l=x.renderer()._glContext(),(o=new i.uniform(l.FLOAT_VEC2,"crop")).set([1,1]),n.addUniform(o),(a=new i.uniform(l.FLOAT_VEC4,"cropsource")).set([0,0,0,0]),n.addUniform(a),n.addShader(i.getCachedShader(l.VERTEX_SHADER,l,c)),n.addShader(i.getCachedShader(l.FRAGMENT_SHADER,l,u)),x._hookBuild&&x._hookBuild(n),t.addAttribute(n),t.addAttribute(new i.blend),s=new i.geometryData,g=void 0,(r=new i.sourceDataT2fv).pushBack([0,0,1,0,0,1,1,1]),s.addSource(r),e.setGeometryData(s),h.setMaterial(t),x.renderer().contextRenderer().addActor(h),x.visible(!0)),b.clrQuads.length&&!m&&(x.visible(!1),e=T(x._renderColorQuads),(m=new i.actor).setMapper(e),t=new i.material,(n=new i.shaderProgram).addVertexAttribute(new i.vertexAttribute("vertexPosition"),i.vertexAttributeKeys.Position),y=new i.modelViewOriginUniform("modelViewMatrix",b.origin),n.addUniform(y),n.addUniform(new i.projectionUniform("projectionMatrix")),n.addUniform(new i.floatUniform("opacity",1)),n.addUniform(new i.floatUniform("zOffset",0)),l=x.renderer()._glContext(),n.addUniform(new i.uniform(l.FLOAT_VEC3,"vertexColor")),n.addShader(i.getCachedShader(l.VERTEX_SHADER,l,f)),n.addShader(i.getCachedShader(l.FRAGMENT_SHADER,l,d)),t.addAttribute(n),t.addAttribute(new i.blend),s=new i.geometryData,v=void 0,e.setGeometryData(s),m.setMaterial(t),x.renderer().contextRenderer().addActor(m),x.visible(!0)),p&&p.setOrigin(b.origin),y&&y.setOrigin(b.origin),x._updateTextures(),x.buildTime().modified())},this._updateTextures=function(){var e;r.each(b.imgQuads,(function(t,n){n.image&&(n.image._texture?n.texture=n.image._texture:((e=new i.texture).setImage(n.image),n.texture=n.image._texture=e))}))},this._renderColorQuads=function(e){if(b.clrQuads.length){var t=this;(t.timestamp()>A.timestamp()||x.dataTime().timestamp()>A.timestamp()||e.m_contextChanged||!v||12*b.clrQuads.length>v.length)&&function(e){var t=e.m_context,n=!1;b.clrQuads.length&&((!v||v.length<12*b.clrQuads.length||!S.clrQuadsPosition)&&(S.clrQuadsPosition&&t.deleteBuffer(S.clrQuadsPosition),S.clrQuadsPosition=t.createBuffer(),v=new Float32Array(12*Math.max(128,2*b.clrQuads.length)),n=!0),r.each(b.clrQuads,(function(e,t){for(var n=0;n<12;n+=1)v[12*e+n]=t.pos[n]-b.origin[n%3]})),t.bindBuffer(t.ARRAY_BUFFER,S.clrQuadsPosition),n?t.bufferData(t.ARRAY_BUFFER,v,t.DYNAMIC_DRAW):t.bufferSubData(t.ARRAY_BUFFER,0,v)),A.modified()}(e),t.s_render(e,!0);var n,o,a,s=e.m_context;s.bindBuffer(s.ARRAY_BUFFER,S.clrQuadsPosition),r.each(b.clrQuads,(function(t,r){r.opacity!==n&&(n=r.opacity,s.uniform1fv(e.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,s.uniform1fv(e.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(e.m_material.shaderProgram().uniformLocation("vertexColor"),new Float32Array([a.r,a.g,a.b]))),s.bindBuffer(s.ARRAY_BUFFER,S.clrQuadsPosition),s.vertexAttribPointer(i.vertexAttributeKeys.Position,3,s.FLOAT,!1,12,12*t*4),s.enableVertexAttribArray(i.vertexAttributeKeys.Position),s.drawArrays(s.TRIANGLE_STRIP,0,4)})),s.bindBuffer(s.ARRAY_BUFFER,null),t.undoBindVertexData(e)}},this._renderImageQuads=function(e){if(b.imgQuads.length){var t=this;(t.timestamp()>C.timestamp()||x.dataTime().timestamp()>C.timestamp()||e.m_contextChanged||!g||12*b.imgQuads.length>g.length)&&function(e){var t=e.m_context,n=!1;b.imgQuads.length&&((!g||g.length<12*b.imgQuads.length||!S.imgQuadsPosition)&&(S.imgQuadsPosition&&t.deleteBuffer(S.imgQuadsPosition),S.imgQuadsPosition=t.createBuffer(),g=new Float32Array(12*Math.max(128,2*b.imgQuads.length)),n=!0),r.each(b.imgQuads,(function(e,t){for(var n=0;n<12;n+=1)g[12*e+n]=t.pos[n]-b.origin[n%3]})),t.bindBuffer(t.ARRAY_BUFFER,S.imgQuadsPosition),n?t.bufferData(t.ARRAY_BUFFER,g,t.DYNAMIC_DRAW):t.bufferSubData(t.ARRAY_BUFFER,0,g)),C.modified()}(e),t.s_render(e,!0);var n,o,a,l,u,c,d,f,p=e.m_context,h={x:1,y:1},m={x0:0,y0:0,x1:1,y1:1};x._hookRenderImageQuads&&x._hookRenderImageQuads(e,b.imgQuads),p.bindBuffer(p.ARRAY_BUFFER,S.imgQuadsPosition),r.each(b.imgQuads,(function(t,r){r.image&&(r.texture.bind(e),r.image.width*r.image.height>s&&(s=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(e.m_material.shaderProgram().uniformLocation("opacity"),new Float32Array([n]))),(r.zOffset||0)!==o&&(o=r.zOffset||0,p.uniform1fv(e.m_material.shaderProgram().uniformLocation("zOffset"),new Float32Array([o]))),a=r.crop||{x:1,y:1},h&&a.x===h.x&&a.y===h.y||(h=a,p.uniform2fv(e.m_material.shaderProgram().uniformLocation("crop"),new Float32Array([h.x||1,h.y||1]))),u=r.image.width,c=r.image.height,l=r.crop||{left:0,top:0,right:u,bottom:c},m&&l.left===m.left&&l.top===m.top&&l.right===m.right&&l.bottom===m.bottom&&d===u&&f===c||(m=l,d=u,f=c,p.uniform4fv(e.m_material.shaderProgram().uniformLocation("cropsource"),new Float32Array([m.left/u,m.top/c,m.right/u,m.bottom/c]))),p.bindBuffer(p.ARRAY_BUFFER,S.imgQuadsPosition),p.vertexAttribPointer(i.vertexAttributeKeys.Position,3,p.FLOAT,!1,12,12*t*4),p.enableVertexAttribArray(i.vertexAttributeKeys.Position),p.drawArrays(p.TRIANGLE_STRIP,0,4),r.texture.undoBind(e))})),p.bindBuffer(p.ARRAY_BUFFER,null),t.undoBindVertexData(e)}},this._update=function(){_.call(x),(x.buildTime().timestamp()<=x.dataTime().timestamp()||x.updateTime().timestamp()<x.timestamp())&&x._build(),m&&(m.setVisible(x.visible()),m.material().setBinNumber(x.bin())),h&&(h.setVisible(x.visible()),h.material().setBinNumber(x.bin())),x.updateTime().modified()},this._cleanup=function(){h&&(x.renderer().contextRenderer().removeActor(h),h=null),m&&(x.renderer().contextRenderer().removeActor(m),m=null),g=void 0,v=void 0,Object.keys(S).forEach((function(e){delete S[e]})),b&&b.imgQuads&&(b.imgQuads.forEach((function(e){e.texture&&(delete e.texture,delete e.image._texture)})),x._updateTextures()),x.modified()},this.setShader=function(e,t){switch(e){case"image_vertex":c=t;break;case"image_fragment":u=t;break;case"color_vertex":f=t;break;case"color_fragment":d=t;break;default:return}return x},this._exit=function(){x._cleanup(),w.call(x)},x._init(t),this};r(l,o);var u={};u[o.capabilities.color]=!0,u[o.capabilities.image]=!0,u[o.capabilities.imageCrop]=!0,u[o.capabilities.imageFixedScale]=!1,u[o.capabilities.imageFull]=!0,u[o.capabilities.canvas]=!1,u[o.capabilities.video]=!1,i("webgl","quad",l,u),e.exports=l},7112:function(e,t,n){var r=n(4647).registerLayerAdjustment,i=n(1940),o=function(){"use strict";var e,t=n(5108),r=this,o=this._init,a=this._exit,s=this._update,l=this.visible,u=this.zIndex,c=0,d=[];this._drawTile=function(t){if(e){var n,o,a=r._tileBounds(t),s=t.index.level||0,l=r._tileOffset(s),u=r.tileCropFromBounds(t),f={},p=r.renderer().contextRenderer().m_depthBits;u&&(f.crop={x:u.x/r._options.tileWidth,y:u.y/r._options.tileHeight}),f.ul=r.fromLocal(r.fromLevel({x:a.left-l.x,y:a.top-l.y},s),0),f.ll=r.fromLocal(r.fromLevel({x:a.left-l.x,y:a.bottom-l.y},s),0),f.ur=r.fromLocal(r.fromLevel({x:a.right-l.x,y:a.top-l.y},s),0),f.lr=r.fromLocal(r.fromLevel({x:a.right-l.x,y:a.bottom-l.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(e){return e instanceof i}))).slice(o.indexOf(r)+1)).forEach((function(e){n+=e._options.keepLower?e._options.maxLevel-e._options.minLevel+1:1})),f.zOffset=n*Math.pow(2,-p)*i._zOffsetMultiple,c+=1,f.id=c,t.quadId=f.id,f.image=t.image,d.push(f),e.data(d),e._update(),r.draw()}},this._remove=function(t){if(void 0!==t.quadId&&e){for(var n=0;n<d.length;n+=1)if(d[n].id===t.quadId){d.splice(n,1);break}e.data(d),e._update(),r.draw()}},this.visible=function(t){return void 0===t?l():(r.visible()!==t&&(l(t),e&&e.visible(e.visible(void 0,!0),!0)),r)},this.zIndex=function(e,t){return void 0!==e&&r._clearQuads(),u.apply(r,arguments)},this._clearQuads=function(t){(!t||t.layer&&t.layer instanceof i)&&(r.clear(),e&&e.modified(),t&&r.draw())},this._update=function(t){return s.call(r,t),r._addBaseQuadToTiles(e,d),r},this._cleanup=function(){var e;if(r.cache&&r.cache._cache){for(var t in r.cache._cache)(e=r.cache._cache[t])._image&&e._image._texture&&delete e._image._texture;r.cache.clear()}r.clear()},this._exit=function(){var n=r.map();n.geoOff(t.layerAdd,r._clearQuads),n.geoOff(t.layerRemove,r._clearQuads),r._cleanup(),r.deleteFeature(e),e=null,d=[],a.apply(r,arguments)},this._init=function(){o.apply(r,arguments),(e=r.createFeature("quad",{previewColor:r._options.previewColor,previewImage:r._options.previewImage})).geoTrigger=void 0,e.gcs(r._options.gcs||r.map().gcs()),e.data(d),e._update();var n=r.map();n.geoOn(t.layerAdd,r._clearQuads),n.geoOn(t.layerRemove,r._clearQuads),r.geoOn(t.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),e.exports=o},506:function(e,t,n){var r=n(5699),i=n(4647).registerFeature,o=n(6223),a=function e(t){"use strict";return this instanceof e?(t=t||{},o.call(this,t),n(7719).call(this),this._init(t),this):new e(t)};r(a,o),i("webgl","track",a),e.exports=a},2254:function(e,t,n){var r,i=n(5699),o=n(4647).registerRenderer,a=n(3234),s=function e(t){"use strict";if(!(this instanceof e))return new e(t);t=t||{},a.call(this,t);var r,i=n(5638),o=n(320),s=n(5240),l=n(4634),u=n(5108),c=this,d=null,f=null,p=!1,h=this._init,m=this._exit;return this.contextRenderer=function(){return d},this.api=function(){return e.apiname},this._init=function(){if(c.initialized())return c;h.call(c);var e=t.canvas||i(document.createElement("canvas"));if(e.addClass("webgl-canvas"),i(c.layer().node().get(0)).append(e),window.overrideContextAttributes){var n=e.get(0),r=n.getContext;n.getContext=function(e,t){if(t=t||{},window.overrideContextAttributes)for(var i in window.overrideContextAttributes)window.overrideContextAttributes.hasOwnProperty(i)&&(t[i]=window.overrideContextAttributes[i]);return r.call(n,e,t)}}(f=o.viewer(e.get(0),t.options)).init(),(d=f.renderWindow().activeRenderer()).setResetScene(!1),f.renderWindow().renderers().length>0&&d.setLayer(f.renderWindow().renderers().length),c.canvas(e);var a=c.layer().map().size();return c._resize(0,0,a.width,a.height),c},this._resize=function(e,t,n,r){var i=f.renderWindow();return e===i.windowPosition[0]&&t===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(e,t,n,r),p=!0,c._render()),c},this._render=function(){return c.layer().map().scheduleAnimationFrame(c._renderFrame,!0),c},this._renderFrame=function(){f&&(p&&(p=!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 e=new o.renderState;e.m_renderer=f,e.m_context=c._glContext(),f.exit(e);var t=c._glContext();t!==o.GL&&t.getExtension("WEBGL_lose_context")&&t.getExtension("WEBGL_lose_context").loseContext&&t.getExtension("WEBGL_lose_context").loseContext()}o.clearCachedShaders(o.GL),f=null,m()},this._updateRendererCamera=function(){var e=f.renderWindow(),t=c.layer().map(),n=t.camera(),i=t.rotation()||0,o=n.view,a=n.projectionMatrix;if(a[15])a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1,1,-.5]),a=s.translate(a,a,[0,0,n.clipbounds.far]);else{var u=n.clipbounds.near,d=n.clipbounds.far;a=s.copy(l.mat4AsArray(),a),a=s.scale(a,a,[1/u,1/u,-1/d])}var p=Math.PI/2,h=i%p,m=Math.min(Math.abs(h),Math.abs(h-p))<1e-5;e.renderers().forEach((function(e){var i=e.camera();if(!l.compareArrays(o,i.viewMatrix())||!l.compareArrays(a,i.projectionMatrix())||r!==t.zoom()){r=t.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 e={roundx:2/s.width,roundy:2/s.height};return e.dx=s.width%2?.5*e.roundx:0,e.dy=s.height%2?.5*e.roundy:0,e}}}))},c.layer().geoOn(u.pan,(function(e){p=!0})),c.layer().geoOn(u.parallelprojection,(function(e){var t=c.contextRenderer(),n=c.layer();if(e.geo&&e.geo._triggeredBy!==n){if(!t||!t.camera())return void console.log("Parallel projection event triggered on unconnected VGL renderer.");t.camera().setEnableParallelProjection(e.parallelProjection),p=!0}})),this};s.apiname="webgl",i(s,a),o("webgl",s),o("vgl",s),s.supported=function(){if(void 0===r){var e,t;try{(t=(e=document.createElement("canvas")).getContext("webgl")||e.getContext("experimental-webgl")).getSupportedExtensions().indexOf("WEBGL_debug_renderer_info")>=0&&(s._unmaskedRenderer=t.getParameter(t.getExtension("WEBGL_debug_renderer_info").UNMASKED_RENDERER_WEBGL)),s._maxTextureSize=t.getParameter(t.MAX_TEXTURE_SIZE),s._maxPointSize=t.getParameter(t.ALIASED_POINT_SIZE_RANGE)[1],r=!0}catch(e){console.warn("No webGL support"),r=!1}e=void 0,t=void 0,void 0}return r},s.fallback=function(){return null},e.exports=s},9552:function(e){"use strict";e.exports={aliceblue:[240,248,255],antiquewhite:[250,235,215],aqua:[0,255,255],aquamarine:[127,255,212],azure:[240,255,255],beige:[245,245,220],bisque:[255,228,196],black:[0,0,0],blanchedalmond:[255,235,205],blue:[0,0,255],blueviolet:[138,43,226],brown:[165,42,42],burlywood:[222,184,135],cadetblue:[95,158,160],chartreuse:[127,255,0],chocolate:[210,105,30],coral:[255,127,80],cornflowerblue:[100,149,237],cornsilk:[255,248,220],crimson:[220,20,60],cyan:[0,255,255],darkblue:[0,0,139],darkcyan:[0,139,139],darkgoldenrod:[184,134,11],darkgray:[169,169,169],darkgreen:[0,100,0],darkgrey:[169,169,169],darkkhaki:[189,183,107],darkmagenta:[139,0,139],darkolivegreen:[85,107,47],darkorange:[255,140,0],darkorchid:[153,50,204],darkred:[139,0,0],darksalmon:[233,150,122],darkseagreen:[143,188,143],darkslateblue:[72,61,139],darkslategray:[47,79,79],darkslategrey:[47,79,79],darkturquoise:[0,206,209],darkviolet:[148,0,211],deeppink:[255,20,147],deepskyblue:[0,191,255],dimgray:[105,105,105],dimgrey:[105,105,105],dodgerblue:[30,144,255],firebrick:[178,34,34],floralwhite:[255,250,240],forestgreen:[34,139,34],fuchsia:[255,0,255],gainsboro:[220,220,220],ghostwhite:[248,248,255],gold:[255,215,0],goldenrod:[218,165,32],gray:[128,128,128],green:[0,128,0],greenyellow:[173,255,47],grey:[128,128,128],honeydew:[240,255,240],hotpink:[255,105,180],indianred:[205,92,92],indigo:[75,0,130],ivory:[255,255,240],khaki:[240,230,140],lavender:[230,230,250],lavenderblush:[255,240,245],lawngreen:[124,252,0],lemonchiffon:[255,250,205],lightblue:[173,216,230],lightcoral:[240,128,128],lightcyan:[224,255,255],lightgoldenrodyellow:[250,250,210],lightgray:[211,211,211],lightgreen:[144,238,144],lightgrey:[211,211,211],lightpink:[255,182,193],lightsalmon:[255,160,122],lightseagreen:[32,178,170],lightskyblue:[135,206,250],lightslategray:[119,136,153],lightslategrey:[119,136,153],lightsteelblue:[176,196,222],lightyellow:[255,255,224],lime:[0,255,0],limegreen:[50,205,50],linen:[250,240,230],magenta:[255,0,255],maroon:[128,0,0],mediumaquamarine:[102,205,170],mediumblue:[0,0,205],mediumorchid:[186,85,211],mediumpurple:[147,112,219],mediumseagreen:[60,179,113],mediumslateblue:[123,104,238],mediumspringgreen:[0,250,154],mediumturquoise:[72,209,204],mediumvioletred:[199,21,133],midnightblue:[25,25,112],mintcream:[245,255,250],mistyrose:[255,228,225],moccasin:[255,228,181],navajowhite:[255,222,173],navy:[0,0,128],oldlace:[253,245,230],olive:[128,128,0],olivedrab:[107,142,35],orange:[255,165,0],orangered:[255,69,0],orchid:[218,112,214],palegoldenrod:[238,232,170],palegreen:[152,251,152],paleturquoise:[175,238,238],palevioletred:[219,112,147],papayawhip:[255,239,213],peachpuff:[255,218,185],peru:[205,133,63],pink:[255,192,203],plum:[221,160,221],powderblue:[176,224,230],purple:[128,0,128],rebeccapurple:[102,51,153],red:[255,0,0],rosybrown:[188,143,143],royalblue:[65,105,225],saddlebrown:[139,69,19],salmon:[250,128,114],sandybrown:[244,164,96],seagreen:[46,139,87],seashell:[255,245,238],sienna:[160,82,45],silver:[192,192,192],skyblue:[135,206,235],slateblue:[106,90,205],slategray:[112,128,144],slategrey:[112,128,144],snow:[255,250,250],springgreen:[0,255,127],steelblue:[70,130,180],tan:[210,180,140],teal:[0,128,128],thistle:[216,191,216],tomato:[255,99,71],turquoise:[64,224,208],violet:[238,130,238],wheat:[245,222,179],white:[255,255,255],whitesmoke:[245,245,245],yellow:[255,255,0],yellowgreen:[154,205,50]}},406:function(e,t,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([e.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.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,CCmfd,WAAO,CDjfP,yDAA8B,CAC9B,YAAQ,CCoeR,gCAAW,CDleX,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,4BC6cE,gBAAO,CDzcP,iCACE,UAAQ,CGhCV,aAAS,CHkCP,iBAAS,CCbG,6BAAG,CAAH,0BAAG,CARN,qBAAG,CDuBZ,MAAK,CACL,KAAI,CACJ,OAAM,CACN,QAAO,CIpDT,0BAAQ,CHmQV,SAAS,CAQH,eAAY,CACZ,WAAQ,CA5OE,6BAAG,CAAH,0BAAG,CAAH,wBAAG,CAAH,yBAAG,CARN,qBAAG,CDkCZ,iBAAW,CACb,uCACE,kBAAW,CC5BC,uCAAG,CAAH,oCAAG,CAAH,kCAAG,CAAH,mCAAG,CARN,+BAAG,CA2OhB,SAAS,CAWH,+DAAyE,CACzE,uBAAiC,CD/MzC,oBACE,iBAAS,CACT,yBExDE,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\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)\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 \"background-size\" support.\n */\n\nbackground-size()\n vendor('background-size', arguments, only: webkit moz official)\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:""}]),t.Z=a},7747:function(e,t,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([e.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:""}]),t.Z=a},1680:function(e,t,n){"use strict";var r=n(559),i=n.n(r),o=n(3476),a=n.n(o)()(i());a.push([e.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:""}]),t.Z=a},3476:function(e){"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var n="",r=void 0!==t[5];return t[4]&&(n+="@supports (".concat(t[4],") {")),t[2]&&(n+="@media ".concat(t[2]," {")),r&&(n+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),n+=e(t),r&&(n+="}"),t[2]&&(n+="}"),t[4]&&(n+="}"),n})).join("")},t.i=function(e,n,r,i,o){"string"==typeof e&&(e=[[null,e,void 0]]);var a={};if(r)for(var s=0;s<this.length;s++){var l=this[s][0];null!=l&&(a[l]=!0)}for(var u=0;u<e.length;u++){var c=[].concat(e[u]);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)),t.push(c))}},t}},559:function(e){"use strict";e.exports=function(e){var t=e[1],n=e[3];if(!n)return t;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," */"),a=n.sources.map((function(e){return"/*# sourceURL=".concat(n.sourceRoot||"").concat(e," */")}));return[t].concat(a).concat([o]).join("\n")}return[t].join("\n")}},8725:function(e,t,n){var r,i;!function(){var o={version:"3.5.17"},a=[].slice,s=function(e){return a.call(e)},l=this.document;function u(e){return e&&(e.ownerDocument||e.document||e).documentElement}function c(e){return e&&(e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView)}if(l)try{s(l.documentElement.childNodes)[0].nodeType}catch(e){s=function(e){for(var t=e.length,n=new Array(t);t--;)n[t]=e[t];return n}}if(Date.now||(Date.now=function(){return+new Date}),l)try{l.createElement("DIV").style.setProperty("opacity",0,"")}catch(e){var d=this.Element.prototype,f=d.setAttribute,p=d.setAttributeNS,h=this.CSSStyleDeclaration.prototype,m=h.setProperty;d.setAttribute=function(e,t){f.call(this,e,t+"")},d.setAttributeNS=function(e,t,n){p.call(this,e,t,n+"")},h.setProperty=function(e,t,n){m.call(this,e,t+"",n)}}function g(e,t){return e<t?-1:e>t?1:e>=t?0:NaN}function v(e){return null===e?NaN:+e}function y(e){return!isNaN(e)}function b(e){return{left:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)<0?r=o+1:i=o}return r},right:function(t,n,r,i){for(arguments.length<3&&(r=0),arguments.length<4&&(i=t.length);r<i;){var o=r+i>>>1;e(t[o],n)>0?i=o:r=o+1}return r}}}o.ascending=g,o.descending=function(e,t){return t<e?-1:t>e?1:t>=e?0:NaN},o.min=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&n>r&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&n>r&&(n=r)}return n},o.max=function(e,t){var n,r,i=-1,o=e.length;if(1===arguments.length){for(;++i<o;)if(null!=(r=e[i])&&r>=r){n=r;break}for(;++i<o;)null!=(r=e[i])&&r>n&&(n=r)}else{for(;++i<o;)if(null!=(r=t.call(e,e[i],i))&&r>=r){n=r;break}for(;++i<o;)null!=(r=t.call(e,e[i],i))&&r>n&&(n=r)}return n},o.extent=function(e,t){var n,r,i,o=-1,a=e.length;if(1===arguments.length){for(;++o<a;)if(null!=(r=e[o])&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=e[o])&&(n>r&&(n=r),i<r&&(i=r))}else{for(;++o<a;)if(null!=(r=t.call(e,e[o],o))&&r>=r){n=i=r;break}for(;++o<a;)null!=(r=t.call(e,e[o],o))&&(n>r&&(n=r),i<r&&(i=r))}return[n,i]},o.sum=function(e,t){var n,r=0,i=e.length,o=-1;if(1===arguments.length)for(;++o<i;)y(n=+e[o])&&(r+=n);else for(;++o<i;)y(n=+t.call(e,e[o],o))&&(r+=n);return r},o.mean=function(e,t){var n,r=0,i=e.length,o=-1,a=i;if(1===arguments.length)for(;++o<i;)y(n=v(e[o]))?r+=n:--a;else for(;++o<i;)y(n=v(t.call(e,e[o],o)))?r+=n:--a;if(a)return r/a},o.quantile=function(e,t){var n=(e.length-1)*t+1,r=Math.floor(n),i=+e[r-1],o=n-r;return o?i+o*(e[r]-i):i},o.median=function(e,t){var n,r=[],i=e.length,a=-1;if(1===arguments.length)for(;++a<i;)y(n=v(e[a]))&&r.push(n);else for(;++a<i;)y(n=v(t.call(e,e[a],a)))&&r.push(n);if(r.length)return o.quantile(r.sort(g),.5)},o.variance=function(e,t){var n,r,i=e.length,o=0,a=0,s=-1,l=0;if(1===arguments.length)for(;++s<i;)y(n=v(e[s]))&&(a+=(r=n-o)*(n-(o+=r/++l)));else for(;++s<i;)y(n=v(t.call(e,e[s],s)))&&(a+=(r=n-o)*(n-(o+=r/++l)));if(l>1)return a/(l-1)},o.deviation=function(){var e=o.variance.apply(this,arguments);return e?Math.sqrt(e):e};var x=b(g);function w(e){return e.length}o.bisectLeft=x.left,o.bisect=o.bisectRight=x.right,o.bisector=function(e){return b(1===e.length?function(t,n){return g(e(t),n)}:e)},o.shuffle=function(e,t,n){(o=arguments.length)<3&&(n=e.length,o<2&&(t=0));for(var r,i,o=n-t;o;)i=Math.random()*o--|0,r=e[o+t],e[o+t]=e[i+t],e[i+t]=r;return e},o.permute=function(e,t){for(var n=t.length,r=new Array(n);n--;)r[n]=e[t[n]];return r},o.pairs=function(e){for(var t=0,n=e.length-1,r=e[0],i=new Array(n<0?0:n);t<n;)i[t]=[r,r=e[++t]];return i},o.transpose=function(e){if(!(i=e.length))return[];for(var t=-1,n=o.min(e,w),r=new Array(n);++t<n;)for(var i,a=-1,s=r[t]=new Array(i);++a<i;)s[a]=e[a][t];return r},o.zip=function(){return o.transpose(arguments)},o.keys=function(e){var t=[];for(var n in e)t.push(n);return t},o.values=function(e){var t=[];for(var n in e)t.push(e[n]);return t},o.entries=function(e){var t=[];for(var n in e)t.push({key:n,value:e[n]});return t},o.merge=function(e){for(var t,n,r,i=e.length,o=-1,a=0;++o<i;)a+=e[o].length;for(n=new Array(a);--i>=0;)for(t=(r=e[i]).length;--t>=0;)n[--a]=r[t];return n};var _=Math.abs;function S(e){for(var t=1;e*t%1;)t*=10;return t}function C(e,t){for(var n in t)Object.defineProperty(e.prototype,n,{value:t[n],enumerable:!1})}function A(){this._=Object.create(null)}o.range=function(e,t,n){if(arguments.length<3&&(n=1,arguments.length<2&&(t=e,e=0)),(t-e)/n==1/0)throw new Error("infinite range");var r,i=[],o=S(_(n)),a=-1;if(e*=o,t*=o,(n*=o)<0)for(;(r=e+n*++a)>t;)i.push(r/o);else for(;(r=e+n*++a)<t;)i.push(r/o);return i},o.map=function(e,t){var n=new A;if(e instanceof A)e.forEach((function(e,t){n.set(e,t)}));else if(Array.isArray(e)){var r,i=-1,o=e.length;if(1===arguments.length)for(;++i<o;)n.set(i,e[i]);else for(;++i<o;)n.set(t.call(e,r=e[i],i),r)}else for(var a in e)n.set(a,e[a]);return n};function T(e){return"__proto__"==(e+="")||"\0"===e[0]?"\0"+e:e}function P(e){return"\0"===(e+="")[0]?e.slice(1):e}function E(e){return T(e)in this._}function O(e){return(e=T(e))in this._&&delete this._[e]}function M(){var e=[];for(var t in this._)e.push(P(t));return e}function D(){var e=0;for(var t in this._)++e;return e}function k(){for(var e in this._)return!1;return!0}function I(){this._=Object.create(null)}function R(e){return e}function N(e,t,n){return function(){var r=n.apply(t,arguments);return r===t?e:r}}function F(e,t){if(t in e)return t;t=t.charAt(0).toUpperCase()+t.slice(1);for(var n=0,r=L.length;n<r;++n){var i=L[n]+t;if(i in e)return i}}C(A,{has:E,get:function(e){return this._[T(e)]},set:function(e,t){return this._[T(e)]=t},remove:O,keys:M,values:function(){var e=[];for(var t in this._)e.push(this._[t]);return e},entries:function(){var e=[];for(var t in this._)e.push({key:P(t),value:this._[t]});return e},size:D,empty:k,forEach:function(e){for(var t in this._)e.call(this,P(t),this._[t])}}),o.nest=function(){var e,t,n={},r=[],i=[];function a(i,o,s){if(s>=r.length)return t?t.call(n,o):e?o.sort(e):o;for(var l,u,c,d,f=-1,p=o.length,h=r[s++],m=new A;++f<p;)(d=m.get(l=h(u=o[f])))?d.push(u):m.set(l,[u]);return i?(u=i(),c=function(e,t){u.set(e,a(i,t,s))}):(u={},c=function(e,t){u[e]=a(i,t,s)}),m.forEach(c),u}function s(e,t){if(t>=r.length)return e;var n=[],o=i[t++];return e.forEach((function(e,r){n.push({key:e,values:s(r,t)})})),o?n.sort((function(e,t){return o(e.key,t.key)})):n}return n.map=function(e,t){return a(t,e,0)},n.entries=function(e){return s(a(o.map,e,0),0)},n.key=function(e){return r.push(e),n},n.sortKeys=function(e){return i[r.length-1]=e,n},n.sortValues=function(t){return e=t,n},n.rollup=function(e){return t=e,n},n},o.set=function(e){var t=new I;if(e)for(var n=0,r=e.length;n<r;++n)t.add(e[n]);return t},C(I,{has:E,add:function(e){return this._[T(e+="")]=!0,e},remove:O,values:M,size:D,empty:k,forEach:function(e){for(var t in this._)e.call(this,P(t))}}),o.behavior={},o.rebind=function(e,t){for(var n,r=1,i=arguments.length;++r<i;)e[n=arguments[r]]=N(e,t,t[n]);return e};var L=["webkit","ms","moz","Moz","o","O"];function B(){}function V(){}function j(e){var t=[],n=new A;function r(){for(var n,r=t,i=-1,o=r.length;++i<o;)(n=r[i].on)&&n.apply(this,arguments);return e}return r.on=function(r,i){var o,a=n.get(r);return arguments.length<2?a&&a.on:(a&&(a.on=null,t=t.slice(0,o=t.indexOf(a)).concat(t.slice(o+1)),n.remove(r)),i&&t.push(n.set(r,{on:i})),e)},r}function z(){o.event.preventDefault()}function G(){for(var e,t=o.event;e=t.sourceEvent;)t=e;return t}function U(e){for(var t=new V,n=0,r=arguments.length;++n<r;)t[arguments[n]]=j(t);return t.of=function(n,r){return function(i){try{var a=i.sourceEvent=o.event;i.target=e,o.event=i,t[i.type].apply(n,r)}finally{o.event=a}}},t}o.dispatch=function(){for(var e=new V,t=-1,n=arguments.length;++t<n;)e[arguments[t]]=j(e);return e},V.prototype.on=function(e,t){var n=e.indexOf("."),r="";if(n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),e)return arguments.length<2?this[e].on(r):this[e].on(r,t);if(2===arguments.length){if(null==t)for(e in this)this.hasOwnProperty(e)&&this[e].on(r,null);return this}},o.event=null,o.requote=function(e){return e.replace(W,"\\$&")};var W=/[\\\^\$\*\+\?\|\[\]\(\)\.\{\}]/g,H={}.__proto__?function(e,t){e.__proto__=t}:function(e,t){for(var n in t)e[n]=t[n]};function q(e){return H(e,Y),e}var X=function(e,t){return t.querySelector(e)},K=function(e,t){return t.querySelectorAll(e)},Z=function(e,t){var n=e.matches||e[F(e,"matchesSelector")];return Z=function(e,t){return n.call(e,t)},Z(e,t)};"function"==typeof Sizzle&&(X=function(e,t){return Sizzle(e,t)[0]||null},K=Sizzle,Z=Sizzle.matchesSelector),o.selection=function(){return o.select(l.documentElement)};var Y=o.selection.prototype=[];function J(e){return"function"==typeof e?e:function(){return X(e,this)}}function Q(e){return"function"==typeof e?e:function(){return K(e,this)}}Y.select=function(e){var t,n,r,i,o=[];e=J(e);for(var a=-1,s=this.length;++a<s;){o.push(t=[]),t.parentNode=(r=this[a]).parentNode;for(var l=-1,u=r.length;++l<u;)(i=r[l])?(t.push(n=e.call(i,i.__data__,l,a)),n&&"__data__"in i&&(n.__data__=i.__data__)):t.push(null)}return q(o)},Y.selectAll=function(e){var t,n,r=[];e=Q(e);for(var i=-1,o=this.length;++i<o;)for(var a=this[i],l=-1,u=a.length;++l<u;)(n=a[l])&&(r.push(t=s(e.call(n,n.__data__,l,i))),t.parentNode=n);return q(r)};var $="http://www.w3.org/1999/xhtml",ee={svg:"http://www.w3.org/2000/svg",xhtml:$,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function te(e,t){return e=o.ns.qualify(e),null==t?e.local?function(){this.removeAttributeNS(e.space,e.local)}:function(){this.removeAttribute(e)}:"function"==typeof t?e.local?function(){var n=t.apply(this,arguments);null==n?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,n)}:function(){var n=t.apply(this,arguments);null==n?this.removeAttribute(e):this.setAttribute(e,n)}:e.local?function(){this.setAttributeNS(e.space,e.local,t)}:function(){this.setAttribute(e,t)}}function ne(e){return e.trim().replace(/\s+/g," ")}function re(e){return new RegExp("(?:^|\\s+)"+o.requote(e)+"(?:\\s+|$)","g")}function ie(e){return(e+"").trim().split(/^|\s+/)}function oe(e,t){var n=(e=ie(e).map(ae)).length;return"function"==typeof t?function(){for(var r=-1,i=t.apply(this,arguments);++r<n;)e[r](this,i)}:function(){for(var r=-1;++r<n;)e[r](this,t)}}function ae(e){var t=re(e);return function(n,r){if(i=n.classList)return r?i.add(e):i.remove(e);var i=n.getAttribute("class")||"";r?(t.lastIndex=0,t.test(i)||n.setAttribute("class",ne(i+" "+e))):n.setAttribute("class",ne(i.replace(t," ")))}}function se(e,t,n){return null==t?function(){this.style.removeProperty(e)}:"function"==typeof t?function(){var r=t.apply(this,arguments);null==r?this.style.removeProperty(e):this.style.setProperty(e,r,n)}:function(){this.style.setProperty(e,t,n)}}function le(e,t){return null==t?function(){delete this[e]}:"function"==typeof t?function(){var n=t.apply(this,arguments);null==n?delete this[e]:this[e]=n}:function(){this[e]=t}}function ue(e){return"function"==typeof e?e:(e=o.ns.qualify(e)).local?function(){return this.ownerDocument.createElementNS(e.space,e.local)}:function(){var t=this.ownerDocument,n=this.namespaceURI;return n===$&&t.documentElement.namespaceURI===$?t.createElement(e):t.createElementNS(n,e)}}function ce(){var e=this.parentNode;e&&e.removeChild(this)}function de(e){return{__data__:e}}function fe(e){return function(){return Z(this,e)}}function pe(e){return arguments.length||(e=g),function(t,n){return t&&n?e(t.__data__,n.__data__):!t-!n}}function he(e,t){for(var n=0,r=e.length;n<r;n++)for(var i,o=e[n],a=0,s=o.length;a<s;a++)(i=o[a])&&t(i,a,n);return e}function me(e){return H(e,ge),e}o.ns={prefix:ee,qualify:function(e){var t=e.indexOf(":"),n=e;return t>=0&&"xmlns"!==(n=e.slice(0,t))&&(e=e.slice(t+1)),ee.hasOwnProperty(n)?{space:ee[n],local:e}:e}},Y.attr=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node();return(e=o.ns.qualify(e)).local?n.getAttributeNS(e.space,e.local):n.getAttribute(e)}for(t in e)this.each(te(t,e[t]));return this}return this.each(te(e,t))},Y.classed=function(e,t){if(arguments.length<2){if("string"==typeof e){var n=this.node(),r=(e=ie(e)).length,i=-1;if(t=n.classList){for(;++i<r;)if(!t.contains(e[i]))return!1}else for(t=n.getAttribute("class");++i<r;)if(!re(e[i]).test(t))return!1;return!0}for(t in e)this.each(oe(t,e[t]));return this}return this.each(oe(e,t))},Y.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.each(se(n,e[n],t));return this}if(r<2){var i=this.node();return c(i).getComputedStyle(i,null).getPropertyValue(e)}n=""}return this.each(se(e,t,n))},Y.property=function(e,t){if(arguments.length<2){if("string"==typeof e)return this.node()[e];for(t in e)this.each(le(t,e[t]));return this}return this.each(le(e,t))},Y.text=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.textContent=null==t?"":t}:null==e?function(){this.textContent=""}:function(){this.textContent=e}):this.node().textContent},Y.html=function(e){return arguments.length?this.each("function"==typeof e?function(){var t=e.apply(this,arguments);this.innerHTML=null==t?"":t}:null==e?function(){this.innerHTML=""}:function(){this.innerHTML=e}):this.node().innerHTML},Y.append=function(e){return e=ue(e),this.select((function(){return this.appendChild(e.apply(this,arguments))}))},Y.insert=function(e,t){return e=ue(e),t=J(t),this.select((function(){return this.insertBefore(e.apply(this,arguments),t.apply(this,arguments)||null)}))},Y.remove=function(){return this.each(ce)},Y.data=function(e,t){var n,r,i=-1,o=this.length;if(!arguments.length){for(e=new Array(o=(n=this[0]).length);++i<o;)(r=n[i])&&(e[i]=r.__data__);return e}function a(e,n){var r,i,o,a=e.length,c=n.length,d=Math.min(a,c),f=new Array(c),p=new Array(c),h=new Array(a);if(t){var m,g=new A,v=new Array(a);for(r=-1;++r<a;)(i=e[r])&&(g.has(m=t.call(i,i.__data__,r))?h[r]=i:g.set(m,i),v[r]=m);for(r=-1;++r<c;)(i=g.get(m=t.call(n,o=n[r],r)))?!0!==i&&(f[r]=i,i.__data__=o):p[r]=de(o),g.set(m,!0);for(r=-1;++r<a;)r in v&&!0!==g.get(v[r])&&(h[r]=e[r])}else{for(r=-1;++r<d;)i=e[r],o=n[r],i?(i.__data__=o,f[r]=i):p[r]=de(o);for(;r<c;++r)p[r]=de(n[r]);for(;r<a;++r)h[r]=e[r]}p.update=f,p.parentNode=f.parentNode=h.parentNode=e.parentNode,s.push(p),l.push(f),u.push(h)}var s=me([]),l=q([]),u=q([]);if("function"==typeof e)for(;++i<o;)a(n=this[i],e.call(n,n.parentNode.__data__,i));else for(;++i<o;)a(n=this[i],e);return l.enter=function(){return s},l.exit=function(){return u},l},Y.datum=function(e){return arguments.length?this.property("__data__",e):this.property("__data__")},Y.filter=function(e){var t,n,r,i=[];"function"!=typeof e&&(e=fe(e));for(var o=0,a=this.length;o<a;o++){i.push(t=[]),t.parentNode=(n=this[o]).parentNode;for(var s=0,l=n.length;s<l;s++)(r=n[s])&&e.call(r,r.__data__,s,o)&&t.push(r)}return q(i)},Y.order=function(){for(var e=-1,t=this.length;++e<t;)for(var n,r=this[e],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},Y.sort=function(e){e=pe.apply(this,arguments);for(var t=-1,n=this.length;++t<n;)this[t].sort(e);return this.order()},Y.each=function(e){return he(this,(function(t,n,r){e.call(t,t.__data__,n,r)}))},Y.call=function(e){var t=s(arguments);return e.apply(t[0]=this,t),this},Y.empty=function(){return!this.node()},Y.node=function(){for(var e=0,t=this.length;e<t;e++)for(var n=this[e],r=0,i=n.length;r<i;r++){var o=n[r];if(o)return o}return null},Y.size=function(){var e=0;return he(this,(function(){++e})),e};var ge=[];function ve(e){var t,n;return function(r,i,o){var a,s=e[o].update,l=s.length;for(o!=n&&(n=o,t=0),i>=t&&(t=i+1);!(a=s[t])&&++t<l;);return a}}function ye(e,t,n){var r="__on"+e,i=e.indexOf("."),a=xe;i>0&&(e=e.slice(0,i));var l=be.get(e);function u(){var t=this[r];t&&(this.removeEventListener(e,t,t.$),delete this[r])}return l&&(e=l,a=we),i?t?function(){var i=a(t,s(arguments));u.call(this),this.addEventListener(e,this[r]=i,i.$=n),i._=t}:u:t?B:function(){var t,n=new RegExp("^__on([^.]+)"+o.requote(e)+"$");for(var r in this)if(t=r.match(n)){var i=this[r];this.removeEventListener(t[1],i,i.$),delete this[r]}}}o.selection.enter=me,o.selection.enter.prototype=ge,ge.append=Y.append,ge.empty=Y.empty,ge.node=Y.node,ge.call=Y.call,ge.size=Y.size,ge.select=function(e){for(var t,n,r,i,o,a=[],s=-1,l=this.length;++s<l;){r=(i=this[s]).update,a.push(t=[]),t.parentNode=i.parentNode;for(var u=-1,c=i.length;++u<c;)(o=i[u])?(t.push(r[u]=n=e.call(i.parentNode,o.__data__,u,s)),n.__data__=o.__data__):t.push(null)}return q(a)},ge.insert=function(e,t){return arguments.length<2&&(t=ve(this)),Y.insert.call(this,e,t)},o.select=function(e){var t;return"string"==typeof e?(t=[X(e,l)]).parentNode=l.documentElement:(t=[e]).parentNode=u(e),q([t])},o.selectAll=function(e){var t;return"string"==typeof e?(t=s(K(e,l))).parentNode=l.documentElement:(t=s(e)).parentNode=null,q([t])},Y.on=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=!1),e)this.each(ye(n,e[n],t));return this}if(r<2)return(r=this.node()["__on"+e])&&r._;n=!1}return this.each(ye(e,t,n))};var be=o.map({mouseenter:"mouseover",mouseleave:"mouseout"});function xe(e,t){return function(n){var r=o.event;o.event=n,t[0]=this.__data__;try{e.apply(this,t)}finally{o.event=r}}}function we(e,t){var n=xe(e,t);return function(e){var t=this,r=e.relatedTarget;r&&(r===t||8&r.compareDocumentPosition(t))||n.call(t,e)}}l&&be.forEach((function(e){"on"+e in l&&be.remove(e)}));var _e,Se=0;function Ce(e){var t=".dragsuppress-"+ ++Se,n="click"+t,r=o.select(c(e)).on("touchmove"+t,z).on("dragstart"+t,z).on("selectstart"+t,z);if(null==_e&&(_e=!("onselectstart"in e)&&F(e.style,"userSelect")),_e){var i=u(e).style,a=i[_e];i[_e]="none"}return function(e){if(r.on(t,null),_e&&(i[_e]=a),e){var o=function(){r.on(n,null)};r.on(n,(function(){z(),o()}),!0),setTimeout(o,0)}}}o.mouse=function(e){return Te(e,G())};var Ae=this.navigator&&/WebKit/.test(this.navigator.userAgent)?-1:0;function Te(e,t){t.changedTouches&&(t=t.changedTouches[0]);var n=e.ownerSVGElement||e;if(n.createSVGPoint){var r=n.createSVGPoint();if(Ae<0){var i=c(e);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();Ae=!(a.f||a.e),n.remove()}}return Ae?(r.x=t.pageX,r.y=t.pageY):(r.x=t.clientX,r.y=t.clientY),[(r=r.matrixTransform(e.getScreenCTM().inverse())).x,r.y]}var s=e.getBoundingClientRect();return[t.clientX-s.left-e.clientLeft,t.clientY-s.top-e.clientTop]}function Pe(){return o.event.changedTouches[0].identifier}o.touch=function(e,t,n){if(arguments.length<3&&(n=t,t=G().changedTouches),t)for(var r,i=0,o=t.length;i<o;++i)if((r=t[i]).identifier===n)return Te(e,r)},o.behavior.drag=function(){var e=U(i,"drag","dragstart","dragend"),t=null,n=a(B,o.mouse,c,"mousemove","mouseup"),r=a(Pe,o.touch,R,"touchmove","touchend");function i(){this.on("mousedown.drag",n).on("touchstart.drag",r)}function a(n,r,i,a,s){return function(){var l,u=this,c=o.event.target.correspondingElement||o.event.target,d=u.parentNode,f=e.of(u,arguments),p=0,h=n(),m=".drag"+(null==h?"":"-"+h),g=o.select(i(c)).on(a+m,b).on(s+m,x),v=Ce(c),y=r(d,h);function b(){var e,t,n=r(d,h);n&&(e=n[0]-y[0],t=n[1]-y[1],p|=e|t,y=n,f({type:"drag",x:n[0]+l[0],y:n[1]+l[1],dx:e,dy:t}))}function x(){r(d,h)&&(g.on(a+m,null).on(s+m,null),v(p),f({type:"dragend"}))}l=t?[(l=t.apply(u,arguments)).x-y[0],l.y-y[1]]:[0,0],f({type:"dragstart"})}}return i.origin=function(e){return arguments.length?(t=e,i):t},o.rebind(i,e,"on")},o.touches=function(e,t){return arguments.length<2&&(t=G().touches),t?s(t).map((function(t){var n=Te(e,t);return n.identifier=t.identifier,n})):[]};var Ee=1e-6,Oe=Ee*Ee,Me=Math.PI,De=2*Me,ke=De-Ee,Ie=Me/2,Re=Me/180,Ne=180/Me;function Fe(e){return e>0?1:e<0?-1:0}function Le(e,t,n){return(t[0]-e[0])*(n[1]-e[1])-(t[1]-e[1])*(n[0]-e[0])}function Be(e){return e>1?0:e<-1?Me:Math.acos(e)}function Ve(e){return e>1?Ie:e<-1?-Ie:Math.asin(e)}function je(e){return((e=Math.exp(e))+1/e)/2}function ze(e){return(e=Math.sin(e/2))*e}var Ge=Math.SQRT2;o.interpolateZoom=function(e,t){var n,r,i=e[0],o=e[1],a=e[2],s=t[0],l=t[1],u=t[2],c=s-i,d=l-o,f=c*c+d*d;if(f<Oe)r=Math.log(u/a)/Ge,n=function(e){return[i+e*c,o+e*d,a*Math.exp(Ge*e*r)]};else{var p=Math.sqrt(f),h=(u*u-a*a+4*f)/(2*a*2*p),m=(u*u-a*a-4*f)/(2*u*2*p),g=Math.log(Math.sqrt(h*h+1)-h),v=Math.log(Math.sqrt(m*m+1)-m);r=(v-g)/Ge,n=function(e){var t,n=e*r,s=je(g),l=a/(2*p)*(s*(t=Ge*n+g,((t=Math.exp(2*t))-1)/(t+1))-function(e){return((e=Math.exp(e))-1/e)/2}(g));return[i+l*c,o+l*d,a*s/je(Ge*n+g)]}}return n.duration=1e3*r,n},o.behavior.zoom=function(){var e,t,n,r,i,a,s,u,d,f={x:0,y:0,k:1},p=[960,500],h=He,m=250,g=0,v="mousedown.zoom",y="mousemove.zoom",b="mouseup.zoom",x="touchstart.zoom",w=U(_,"zoomstart","zoom","zoomend");function _(e){e.on(v,D).on(We+".zoom",I).on("dblclick.zoom",R).on(x,k)}function S(e){return[(e[0]-f.x)/f.k,(e[1]-f.y)/f.k]}function C(e){f.k=Math.max(h[0],Math.min(h[1],e))}function A(e,t){t=function(e){return[e[0]*f.k+f.x,e[1]*f.k+f.y]}(t),f.x+=e[0]-t[0],f.y+=e[1]-t[1]}function T(e,n,r,i){e.__chart__={x:f.x,y:f.y,k:f.k},C(Math.pow(2,i)),A(t=n,r),e=o.select(e),m>0&&(e=e.transition().duration(m)),e.call(_.event)}function P(){s&&s.domain(a.range().map((function(e){return(e-f.x)/f.k})).map(a.invert)),d&&d.domain(u.range().map((function(e){return(e-f.y)/f.k})).map(u.invert))}function E(e){g++||e({type:"zoomstart"})}function O(e){P(),e({type:"zoom",scale:f.k,translate:[f.x,f.y]})}function M(e){--g||(e({type:"zoomend"}),t=null)}function D(){var e=this,t=w.of(e,arguments),n=0,r=o.select(c(e)).on(y,s).on(b,l),i=S(o.mouse(e)),a=Ce(e);function s(){n=1,A(o.mouse(e),i),O(t)}function l(){r.on(y,null).on(b,null),a(n),M(t)}Fs.call(e),E(t)}function k(){var e,t=this,n=w.of(t,arguments),r={},a=0,s=".zoom-"+o.event.changedTouches[0].identifier,l="touchmove"+s,u="touchend"+s,c=[],d=o.select(t),p=Ce(t);function h(){var n=o.touches(t);return e=f.k,n.forEach((function(e){e.identifier in r&&(r[e.identifier]=S(e))})),n}function m(){var e=o.event.target;o.select(e).on(l,g).on(u,y),c.push(e);for(var n=o.event.changedTouches,s=0,d=n.length;s<d;++s)r[n[s].identifier]=null;var p=h(),m=Date.now();if(1===p.length){if(m-i<500){var v=p[0];T(t,v,r[v.identifier],Math.floor(Math.log(f.k)/Math.LN2)+1),z()}i=m}else if(p.length>1){v=p[0];var b=p[1],x=v[0]-b[0],w=v[1]-b[1];a=x*x+w*w}}function g(){var s,l,u,c,d=o.touches(t);Fs.call(t);for(var f=0,p=d.length;f<p;++f,c=null)if(u=d[f],c=r[u.identifier]){if(l)break;s=u,l=c}if(c){var h=(h=u[0]-s[0])*h+(h=u[1]-s[1])*h,m=a&&Math.sqrt(h/a);s=[(s[0]+u[0])/2,(s[1]+u[1])/2],l=[(l[0]+c[0])/2,(l[1]+c[1])/2],C(m*e)}i=null,A(s,l),O(n)}function y(){if(o.event.touches.length){for(var e=o.event.changedTouches,t=0,i=e.length;t<i;++t)delete r[e[t].identifier];for(var a in r)return void h()}o.selectAll(c).on(s,null),d.on(v,D).on(x,k),p(),M(n)}m(),E(n),d.on(v,null).on(x,m)}function I(){var i=w.of(this,arguments);r?clearTimeout(r):(Fs.call(this),e=S(t=n||o.mouse(this)),E(i)),r=setTimeout((function(){r=null,M(i)}),50),z(),C(Math.pow(2,.002*Ue())*f.k),A(t,e),O(i)}function R(){var e=o.mouse(this),t=Math.log(f.k)/Math.LN2;T(this,e,S(e),o.event.shiftKey?Math.ceil(t)-1:Math.floor(t)+1)}return We||(We="onwheel"in l?(Ue=function(){return-o.event.deltaY*(o.event.deltaMode?120:1)},"wheel"):"onmousewheel"in l?(Ue=function(){return o.event.wheelDelta},"mousewheel"):(Ue=function(){return-o.event.detail},"MozMousePixelScroll")),_.event=function(e){e.each((function(){var e=w.of(this,arguments),n=f;Vs?o.select(this).transition().each("start.zoom",(function(){f=this.__chart__||{x:0,y:0,k:1},E(e)})).tween("zoom:zoom",(function(){var r=p[0],i=p[1],a=t?t[0]:r/2,s=t?t[1]:i/2,l=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(t){var n=l(t),i=r/n[2];this.__chart__=f={x:a-n[0]*i,y:s-n[1]*i,k:i},O(e)}})).each("interrupt.zoom",(function(){M(e)})).each("end.zoom",(function(){M(e)})):(this.__chart__=f,E(e),O(e),M(e))}))},_.translate=function(e){return arguments.length?(f={x:+e[0],y:+e[1],k:f.k},P(),_):[f.x,f.y]},_.scale=function(e){return arguments.length?(f={x:f.x,y:f.y,k:null},C(+e),P(),_):f.k},_.scaleExtent=function(e){return arguments.length?(h=null==e?He:[+e[0],+e[1]],_):h},_.center=function(e){return arguments.length?(n=e&&[+e[0],+e[1]],_):n},_.size=function(e){return arguments.length?(p=e&&[+e[0],+e[1]],_):p},_.duration=function(e){return arguments.length?(m=+e,_):m},_.x=function(e){return arguments.length?(s=e,a=e.copy(),f={x:0,y:0,k:1},_):s},_.y=function(e){return arguments.length?(d=e,u=e.copy(),f={x:0,y:0,k:1},_):d},o.rebind(_,w,"on")};var Ue,We,He=[0,1/0];function qe(){}function Xe(e,t,n){return this instanceof Xe?(this.h=+e,this.s=+t,void(this.l=+n)):arguments.length<2?e instanceof Xe?new Xe(e.h,e.s,e.l):ht(""+e,mt,Xe):new Xe(e,t,n)}o.color=qe,qe.prototype.toString=function(){return this.rgb()+""},o.hsl=Xe;var Ke=Xe.prototype=new qe;function Ze(e,t,n){var r,i;function o(e){return Math.round(255*function(e){return e>360?e-=360:e<0&&(e+=360),e<60?r+(i-r)*e/60:e<180?i:e<240?r+(i-r)*(240-e)/60:r}(e))}return e=isNaN(e)?0:(e%=360)<0?e+360:e,t=isNaN(t)||t<0?0:t>1?1:t,r=2*(n=n<0?0:n>1?1:n)-(i=n<=.5?n*(1+t):n+t-n*t),new ut(o(e+120),o(e),o(e-120))}function Ye(e,t,n){return this instanceof Ye?(this.h=+e,this.c=+t,void(this.l=+n)):arguments.length<2?e instanceof Ye?new Ye(e.h,e.c,e.l):ot(e instanceof $e?e.l:(e=gt((e=o.rgb(e)).r,e.g,e.b)).l,e.a,e.b):new Ye(e,t,n)}Ke.brighter=function(e){return e=Math.pow(.7,arguments.length?e:1),new Xe(this.h,this.s,this.l/e)},Ke.darker=function(e){return e=Math.pow(.7,arguments.length?e:1),new Xe(this.h,this.s,e*this.l)},Ke.rgb=function(){return Ze(this.h,this.s,this.l)},o.hcl=Ye;var Je=Ye.prototype=new qe;function Qe(e,t,n){return isNaN(e)&&(e=0),isNaN(t)&&(t=0),new $e(n,Math.cos(e*=Re)*t,Math.sin(e)*t)}function $e(e,t,n){return this instanceof $e?(this.l=+e,this.a=+t,void(this.b=+n)):arguments.length<2?e instanceof $e?new $e(e.l,e.a,e.b):e instanceof Ye?Qe(e.h,e.c,e.l):gt((e=ut(e)).r,e.g,e.b):new $e(e,t,n)}Je.brighter=function(e){return new Ye(this.h,this.c,Math.min(100,this.l+et*(arguments.length?e:1)))},Je.darker=function(e){return new Ye(this.h,this.c,Math.max(0,this.l-et*(arguments.length?e:1)))},Je.rgb=function(){return Qe(this.h,this.c,this.l).rgb()},o.lab=$e;var et=18,tt=.95047,nt=1.08883,rt=$e.prototype=new qe;function it(e,t,n){var r=(e+16)/116,i=r+t/500,o=r-n/200;return new ut(lt(3.2404542*(i=at(i)*tt)-1.5371385*(r=1*at(r))-.4985314*(o=at(o)*nt)),lt(-.969266*i+1.8760108*r+.041556*o),lt(.0556434*i-.2040259*r+1.0572252*o))}function ot(e,t,n){return e>0?new Ye(Math.atan2(n,t)*Ne,Math.sqrt(t*t+n*n),e):new Ye(NaN,NaN,e)}function at(e){return e>.206893034?e*e*e:(e-4/29)/7.787037}function st(e){return e>.008856?Math.pow(e,1/3):7.787037*e+4/29}function lt(e){return Math.round(255*(e<=.00304?12.92*e:1.055*Math.pow(e,1/2.4)-.055))}function ut(e,t,n){return this instanceof ut?(this.r=~~e,this.g=~~t,void(this.b=~~n)):arguments.length<2?e instanceof ut?new ut(e.r,e.g,e.b):ht(""+e,ut,Ze):new ut(e,t,n)}function ct(e){return new ut(e>>16,e>>8&255,255&e)}function dt(e){return ct(e)+""}rt.brighter=function(e){return new $e(Math.min(100,this.l+et*(arguments.length?e:1)),this.a,this.b)},rt.darker=function(e){return new $e(Math.max(0,this.l-et*(arguments.length?e:1)),this.a,this.b)},rt.rgb=function(){return it(this.l,this.a,this.b)},o.rgb=ut;var ft=ut.prototype=new qe;function pt(e){return e<16?"0"+Math.max(0,e).toString(16):Math.min(255,e).toString(16)}function ht(e,t,n){var r,i,o,a=0,s=0,l=0;if(r=/([a-z]+)\((.*)\)/.exec(e=e.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 t(yt(i[0]),yt(i[1]),yt(i[2]))}return(o=bt.get(e))?t(o.r,o.g,o.b):(null==e||"#"!==e.charAt(0)||isNaN(o=parseInt(e.slice(1),16))||(4===e.length?(a=(3840&o)>>4,a|=a>>4,s=240&o,s|=s>>4,l=15&o,l|=l<<4):7===e.length&&(a=(16711680&o)>>16,s=(65280&o)>>8,l=255&o)),t(a,s,l))}function mt(e,t,n){var r,i,o=Math.min(e/=255,t/=255,n/=255),a=Math.max(e,t,n),s=a-o,l=(a+o)/2;return s?(i=l<.5?s/(a+o):s/(2-a-o),r=e==a?(t-n)/s+(t<n?6:0):t==a?(n-e)/s+2:(e-t)/s+4,r*=60):(r=NaN,i=l>0&&l<1?0:r),new Xe(r,i,l)}function gt(e,t,n){var r=st((.4124564*(e=vt(e))+.3575761*(t=vt(t))+.1804375*(n=vt(n)))/tt),i=st((.2126729*e+.7151522*t+.072175*n)/1);return $e(116*i-16,500*(r-i),200*(i-st((.0193339*e+.119192*t+.9503041*n)/nt)))}function vt(e){return(e/=255)<=.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function yt(e){var t=parseFloat(e);return"%"===e.charAt(e.length-1)?Math.round(2.55*t):t}ft.brighter=function(e){e=Math.pow(.7,arguments.length?e:1);var t=this.r,n=this.g,r=this.b,i=30;return t||n||r?(t&&t<i&&(t=i),n&&n<i&&(n=i),r&&r<i&&(r=i),new ut(Math.min(255,t/e),Math.min(255,n/e),Math.min(255,r/e))):new ut(i,i,i)},ft.darker=function(e){return new ut((e=Math.pow(.7,arguments.length?e:1))*this.r,e*this.g,e*this.b)},ft.hsl=function(){return mt(this.r,this.g,this.b)},ft.toString=function(){return"#"+pt(this.r)+pt(this.g)+pt(this.b)};var bt=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 xt(e){return"function"==typeof e?e:function(){return e}}function wt(e){return function(t,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=null),_t(t,n,e,r)}}function _t(e,t,n,r){var i={},a=o.dispatch("beforesend","progress","load","error"),l={},u=new XMLHttpRequest,c=null;function d(){var e,t=u.status;if(!t&&function(e){var t=e.responseType;return t&&"text"!==t?e.response:e.responseText}(u)||t>=200&&t<300||304===t){try{e=n.call(i,u)}catch(e){return void a.error.call(i,e)}a.load.call(i,e)}else a.error.call(i,u)}return this.XDomainRequest&&!("withCredentials"in u)&&/^(http(s)?:)?\/\//.test(e)&&(u=new XDomainRequest),"onload"in u?u.onload=u.onerror=d:u.onreadystatechange=function(){u.readyState>3&&d()},u.onprogress=function(e){var t=o.event;o.event=e;try{a.progress.call(i,u)}finally{o.event=t}},i.header=function(e,t){return e=(e+"").toLowerCase(),arguments.length<2?l[e]:(null==t?delete l[e]:l[e]=t+"",i)},i.mimeType=function(e){return arguments.length?(t=null==e?null:e+"",i):t},i.responseType=function(e){return arguments.length?(c=e,i):c},i.response=function(e){return n=e,i},["get","post"].forEach((function(e){i[e]=function(){return i.send.apply(i,[e].concat(s(arguments)))}})),i.send=function(n,r,o){if(2===arguments.length&&"function"==typeof r&&(o=r,r=null),u.open(n,e,!0),null==t||"accept"in l||(l.accept=t+",*/*"),u.setRequestHeader)for(var s in l)u.setRequestHeader(s,l[s]);return null!=t&&u.overrideMimeType&&u.overrideMimeType(t),null!=c&&(u.responseType=c),null!=o&&i.on("error",o).on("load",(function(e){o(null,e)})),a.beforesend.call(i,u),u.send(null==r?null:r),i},i.abort=function(){return u.abort(),i},o.rebind(i,a,"on"),null==r?i:i.get(function(e){return 1===e.length?function(t,n){e(null==t?n:null)}:e}(r))}bt.forEach((function(e,t){bt.set(e,ct(t))})),o.functor=xt,o.xhr=wt(R),o.dsv=function(e,t){var n=new RegExp('["'+e+"\n]"),r=e.charCodeAt(0);function i(e,n,r){arguments.length<3&&(r=n,n=null);var i=_t(e,t,null==n?o:a(n),r);return i.row=function(e){return arguments.length?i.response(null==(n=e)?o:a(e)):n},i}function o(e){return i.parse(e.responseText)}function a(e){return function(t){return i.parse(t.responseText,e)}}function s(t){return t.map(l).join(e)}function l(e){return n.test(e)?'"'+e.replace(/\"/g,'""')+'"':e}return i.parse=function(e,t){var n;return i.parseRows(e,(function(e,r){if(n)return n(e,r-1);var i=new Function("d","return {"+e.map((function(e,t){return JSON.stringify(e)+": d["+t+"]"})).join(",")+"}");n=t?function(e,n){return t(i(e),n)}:i}))},i.parseRows=function(e,t){var n,i,o={},a={},s=[],l=e.length,u=0,c=0;function d(){if(u>=l)return a;if(i)return i=!1,o;var t=u;if(34===e.charCodeAt(t)){for(var n=t;n++<l;)if(34===e.charCodeAt(n)){if(34!==e.charCodeAt(n+1))break;++n}return u=n+2,13===(s=e.charCodeAt(n+1))?(i=!0,10===e.charCodeAt(n+2)&&++u):10===s&&(i=!0),e.slice(t+1,n).replace(/""/g,'"')}for(;u<l;){var s,c=1;if(10===(s=e.charCodeAt(u++)))i=!0;else if(13===s)i=!0,10===e.charCodeAt(u)&&(++u,++c);else if(s!==r)continue;return e.slice(t,u-c)}return e.slice(t)}for(;(n=d())!==a;){for(var f=[];n!==o&&n!==a;)f.push(n),n=d();t&&null==(f=t(f,c++))||s.push(f)}return s},i.format=function(t){if(Array.isArray(t[0]))return i.formatRows(t);var n=new I,r=[];return t.forEach((function(e){for(var t in e)n.has(t)||r.push(n.add(t))})),[r.map(l).join(e)].concat(t.map((function(t){return r.map((function(e){return l(t[e])})).join(e)}))).join("\n")},i.formatRows=function(e){return e.map(s).join("\n")},i},o.csv=o.dsv(",","text/csv"),o.tsv=o.dsv("\t","text/tab-separated-values");var St,Ct,At,Tt,Pt=this[F(this,"requestAnimationFrame")]||function(e){setTimeout(e,17)};function Et(e,t,n){var r=arguments.length;r<2&&(t=0),r<3&&(n=Date.now());var i=n+t,o={c:e,t:i,n:null};return Ct?Ct.n=o:St=o,Ct=o,At||(Tt=clearTimeout(Tt),At=1,Pt(Ot)),o}function Ot(){var e=Mt(),t=Dt()-e;t>24?(isFinite(t)&&(clearTimeout(Tt),Tt=setTimeout(Ot,t)),At=0):(At=1,Pt(Ot))}function Mt(){for(var e=Date.now(),t=St;t;)e>=t.t&&t.c(e-t.t)&&(t.c=null),t=t.n;return e}function Dt(){for(var e,t=St,n=1/0;t;)t.c?(t.t<n&&(n=t.t),t=(e=t).n):t=e?e.n=t.n:St=t.n;return Ct=e,n}function kt(e,t){return t-(e?Math.ceil(Math.log(e)/Math.LN10):1)}o.timer=function(){Et.apply(this,arguments)},o.timer.flush=function(){Mt(),Dt()},o.round=function(e,t){return t?Math.round(e*(t=Math.pow(10,t)))/t:Math.round(e)};var It=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"].map((function(e,t){var n=Math.pow(10,3*_(8-t));return{scale:t>8?function(e){return e/n}:function(e){return e*n},symbol:e}}));function Rt(e){var t=e.decimal,n=e.thousands,r=e.grouping,i=e.currency,a=r&&n?function(e,t){for(var i=e.length,o=[],a=0,s=r[0],l=0;i>0&&s>0&&(l+s+1>t&&(s=Math.max(1,t-l)),o.push(e.substring(i-=s,i+s)),!((l+=s+1)>t));)s=r[a=(a+1)%r.length];return o.reverse().join(n)}:R;return function(e){var n=Nt.exec(e),r=n[1]||" ",s=n[2]||">",l=n[3]||"-",u=n[4]||"",c=n[5],d=+n[6],f=n[7],p=n[8],h=n[9],m=1,g="",v="",y=!1,b=!0;switch(p&&(p=+p.substring(1)),(c||"0"===r&&"="===s)&&(c=r="0",s="="),h){case"n":f=!0,h="g";break;case"%":m=100,v="%",h="f";break;case"p":m=100,v="%",h="r";break;case"b":case"o":case"x":case"X":"#"===u&&(g="0"+h.toLowerCase());case"c":b=!1;case"d":y=!0,p=0;break;case"s":m=-1,h="r"}"$"===u&&(g=i[0],v=i[1]),"r"!=h||p||(h="g"),null!=p&&("g"==h?p=Math.max(1,Math.min(21,p)):"e"!=h&&"f"!=h||(p=Math.max(0,Math.min(20,p)))),h=Ft.get(h)||Lt;var x=c&&f;return function(e){var n=v;if(y&&e%1)return"";var i=e<0||0===e&&1/e<0?(e=-e,"-"):"-"===l?"":l;if(m<0){var u=o.formatPrefix(e,p);e=u.scale(e),n=u.symbol+v}else e*=m;var w,_,S=(e=h(e,p)).lastIndexOf(".");if(S<0){var C=b?e.lastIndexOf("e"):-1;C<0?(w=e,_=""):(w=e.substring(0,C),_=e.substring(C))}else w=e.substring(0,S),_=t+e.substring(S+1);!c&&f&&(w=a(w,1/0));var A=g.length+w.length+_.length+(x?0:i.length),T=A<d?new Array(A=d-A+1).join(r):"";return x&&(w=a(T+w,T.length?d-_.length:1/0)),i+=g,e=w+_,("<"===s?i+e+T:">"===s?T+i+e:"^"===s?T.substring(0,A>>=1)+i+e+T.substring(A):i+(x?e:T+e))+n}}}o.formatPrefix=function(e,t){var n=0;return(e=+e)&&(e<0&&(e*=-1),t&&(e=o.round(e,kt(e,t))),n=1+Math.floor(1e-12+Math.log(e)/Math.LN10),n=Math.max(-24,Math.min(24,3*Math.floor((n-1)/3)))),It[8+n/3]};var Nt=/(?:([^{])?([<>=^]))?([+\- ])?([$#])?(0)?(\d+)?(,)?(\.-?\d+)?([a-z%])?/i,Ft=o.map({b:function(e){return e.toString(2)},c:function(e){return String.fromCharCode(e)},o:function(e){return e.toString(8)},x:function(e){return e.toString(16)},X:function(e){return e.toString(16).toUpperCase()},g:function(e,t){return e.toPrecision(t)},e:function(e,t){return e.toExponential(t)},f:function(e,t){return e.toFixed(t)},r:function(e,t){return(e=o.round(e,kt(e,t))).toFixed(Math.max(0,Math.min(20,kt(e*(1+1e-15),t))))}});function Lt(e){return e+""}var Bt=o.time={},Vt=Date;function jt(){this._=new Date(arguments.length>1?Date.UTC.apply(this,arguments):arguments[0])}jt.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(){zt.setUTCDate.apply(this._,arguments)},setDay:function(){zt.setUTCDay.apply(this._,arguments)},setFullYear:function(){zt.setUTCFullYear.apply(this._,arguments)},setHours:function(){zt.setUTCHours.apply(this._,arguments)},setMilliseconds:function(){zt.setUTCMilliseconds.apply(this._,arguments)},setMinutes:function(){zt.setUTCMinutes.apply(this._,arguments)},setMonth:function(){zt.setUTCMonth.apply(this._,arguments)},setSeconds:function(){zt.setUTCSeconds.apply(this._,arguments)},setTime:function(){zt.setTime.apply(this._,arguments)}};var zt=Date.prototype;function Gt(e,t,n){function r(t){var n=e(t),r=o(n,1);return t-n<r-t?n:r}function i(n){return t(n=e(new Vt(n-1)),1),n}function o(e,n){return t(e=new Vt(+e),n),e}function a(e,r,o){var a=i(e),s=[];if(o>1)for(;a<r;)n(a)%o||s.push(new Date(+a)),t(a,1);else for(;a<r;)s.push(new Date(+a)),t(a,1);return s}e.floor=e,e.round=r,e.ceil=i,e.offset=o,e.range=a;var s=e.utc=Ut(e);return s.floor=s,s.round=Ut(r),s.ceil=Ut(i),s.offset=Ut(o),s.range=function(e,t,n){try{Vt=jt;var r=new jt;return r._=e,a(r,t,n)}finally{Vt=Date}},e}function Ut(e){return function(t,n){try{Vt=jt;var r=new jt;return r._=t,e(r,n)._}finally{Vt=Date}}}function Wt(e){var t=e.dateTime,n=e.date,r=e.time,i=e.periods,a=e.days,s=e.shortDays,l=e.months,u=e.shortMonths;function c(e){var t=e.length;function n(n){for(var r,i,o,a=[],s=-1,l=0;++s<t;)37===e.charCodeAt(s)&&(a.push(e.slice(l,s)),null!=(i=Ht[r=e.charAt(++s)])&&(r=e.charAt(++s)),(o=w[r])&&(r=o(n,null==i?"e"===r?" ":"0":i)),a.push(r),l=s+1);return a.push(e.slice(l,s)),a.join("")}return n.parse=function(t){var n={y:1900,m:0,d:1,H:0,M:0,S:0,L:0,Z:null};if(d(n,e,t,0)!=t.length)return null;"p"in n&&(n.H=n.H%12+12*n.p);var r=null!=n.Z&&Vt!==jt,i=new(r?jt:Vt);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 e},n}function d(e,t,n,r){for(var i,o,a,s=0,l=t.length,u=n.length;s<l;){if(r>=u)return-1;if(37===(i=t.charCodeAt(s++))){if(a=t.charAt(s++),!(o=_[a in Ht?t.charAt(s++):a])||(r=o(e,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}c.utc=function(e){var t=c(e);function n(e){try{var n=new(Vt=jt);return n._=e,t(n)}finally{Vt=Date}}return n.parse=function(e){try{Vt=jt;var n=t.parse(e);return n&&n._}finally{Vt=Date}},n.toString=t.toString,n},c.multi=c.utc.multi=pn;var f=o.map(),p=Zt(a),h=Yt(a),m=Zt(s),g=Yt(s),v=Zt(l),y=Yt(l),b=Zt(u),x=Yt(u);i.forEach((function(e,t){f.set(e.toLowerCase(),t)}));var w={a:function(e){return s[e.getDay()]},A:function(e){return a[e.getDay()]},b:function(e){return u[e.getMonth()]},B:function(e){return l[e.getMonth()]},c:c(t),d:function(e,t){return Kt(e.getDate(),t,2)},e:function(e,t){return Kt(e.getDate(),t,2)},H:function(e,t){return Kt(e.getHours(),t,2)},I:function(e,t){return Kt(e.getHours()%12||12,t,2)},j:function(e,t){return Kt(1+Bt.dayOfYear(e),t,3)},L:function(e,t){return Kt(e.getMilliseconds(),t,3)},m:function(e,t){return Kt(e.getMonth()+1,t,2)},M:function(e,t){return Kt(e.getMinutes(),t,2)},p:function(e){return i[+(e.getHours()>=12)]},S:function(e,t){return Kt(e.getSeconds(),t,2)},U:function(e,t){return Kt(Bt.sundayOfYear(e),t,2)},w:function(e){return e.getDay()},W:function(e,t){return Kt(Bt.mondayOfYear(e),t,2)},x:c(n),X:c(r),y:function(e,t){return Kt(e.getFullYear()%100,t,2)},Y:function(e,t){return Kt(e.getFullYear()%1e4,t,4)},Z:dn,"%":function(){return"%"}},_={a:function(e,t,n){m.lastIndex=0;var r=m.exec(t.slice(n));return r?(e.w=g.get(r[0].toLowerCase()),n+r[0].length):-1},A:function(e,t,n){p.lastIndex=0;var r=p.exec(t.slice(n));return r?(e.w=h.get(r[0].toLowerCase()),n+r[0].length):-1},b:function(e,t,n){b.lastIndex=0;var r=b.exec(t.slice(n));return r?(e.m=x.get(r[0].toLowerCase()),n+r[0].length):-1},B:function(e,t,n){v.lastIndex=0;var r=v.exec(t.slice(n));return r?(e.m=y.get(r[0].toLowerCase()),n+r[0].length):-1},c:function(e,t,n){return d(e,w.c.toString(),t,n)},d:on,e:on,H:sn,I:sn,j:an,L:cn,m:rn,M:ln,p:function(e,t,n){var r=f.get(t.slice(n,n+=2).toLowerCase());return null==r?-1:(e.p=r,n)},S:un,U:Qt,w:Jt,W:$t,x:function(e,t,n){return d(e,w.x.toString(),t,n)},X:function(e,t,n){return d(e,w.X.toString(),t,n)},y:tn,Y:en,Z:nn,"%":fn};return c}Bt.year=Gt((function(e){return(e=Bt.day(e)).setMonth(0,1),e}),(function(e,t){e.setFullYear(e.getFullYear()+t)}),(function(e){return e.getFullYear()})),Bt.years=Bt.year.range,Bt.years.utc=Bt.year.utc.range,Bt.day=Gt((function(e){var t=new Vt(2e3,0);return t.setFullYear(e.getFullYear(),e.getMonth(),e.getDate()),t}),(function(e,t){e.setDate(e.getDate()+t)}),(function(e){return e.getDate()-1})),Bt.days=Bt.day.range,Bt.days.utc=Bt.day.utc.range,Bt.dayOfYear=function(e){var t=Bt.year(e);return Math.floor((e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5)},["sunday","monday","tuesday","wednesday","thursday","friday","saturday"].forEach((function(e,t){t=7-t;var n=Bt[e]=Gt((function(e){return(e=Bt.day(e)).setDate(e.getDate()-(e.getDay()+t)%7),e}),(function(e,t){e.setDate(e.getDate()+7*Math.floor(t))}),(function(e){var n=Bt.year(e).getDay();return Math.floor((Bt.dayOfYear(e)+(n+t)%7)/7)-(n!==t)}));Bt[e+"s"]=n.range,Bt[e+"s"].utc=n.utc.range,Bt[e+"OfYear"]=function(e){var n=Bt.year(e).getDay();return Math.floor((Bt.dayOfYear(e)+(n+t)%7)/7)}})),Bt.week=Bt.sunday,Bt.weeks=Bt.sunday.range,Bt.weeks.utc=Bt.sunday.utc.range,Bt.weekOfYear=Bt.sundayOfYear;var Ht={"-":"",_:" ",0:"0"},qt=/^\s*\d+/,Xt=/^%/;function Kt(e,t,n){var r=e<0?"-":"",i=(r?-e:e)+"",o=i.length;return r+(o<n?new Array(n-o+1).join(t)+i:i)}function Zt(e){return new RegExp("^(?:"+e.map(o.requote).join("|")+")","i")}function Yt(e){for(var t=new A,n=-1,r=e.length;++n<r;)t.set(e[n].toLowerCase(),n);return t}function Jt(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+1));return r?(e.w=+r[0],n+r[0].length):-1}function Qt(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n));return r?(e.U=+r[0],n+r[0].length):-1}function $t(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n));return r?(e.W=+r[0],n+r[0].length):-1}function en(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+4));return r?(e.y=+r[0],n+r[0].length):-1}function tn(e,t,n){qt.lastIndex=0;var r,i=qt.exec(t.slice(n,n+2));return i?(e.y=(r=+i[0])+(r>68?1900:2e3),n+i[0].length):-1}function nn(e,t,n){return/^[+-]\d{4}$/.test(t=t.slice(n,n+5))?(e.Z=-t,n+5):-1}function rn(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.m=r[0]-1,n+r[0].length):-1}function on(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.d=+r[0],n+r[0].length):-1}function an(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+3));return r?(e.j=+r[0],n+r[0].length):-1}function sn(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.H=+r[0],n+r[0].length):-1}function ln(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.M=+r[0],n+r[0].length):-1}function un(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+2));return r?(e.S=+r[0],n+r[0].length):-1}function cn(e,t,n){qt.lastIndex=0;var r=qt.exec(t.slice(n,n+3));return r?(e.L=+r[0],n+r[0].length):-1}function dn(e){var t=e.getTimezoneOffset(),n=t>0?"-":"+",r=_(t)/60|0,i=_(t)%60;return n+Kt(r,"0",2)+Kt(i,"0",2)}function fn(e,t,n){Xt.lastIndex=0;var r=Xt.exec(t.slice(n,n+1));return r?n+r[0].length:-1}function pn(e){for(var t=e.length,n=-1;++n<t;)e[n][0]=this(e[n][0]);return function(t){for(var n=0,r=e[n];!r[1](t);)r=e[++n];return r[0](t)}}o.locale=function(e){return{numberFormat:Rt(e),timeFormat:Wt(e)}};var hn=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 mn(){}o.format=hn.numberFormat,o.geo={},mn.prototype={s:0,t:0,add:function(e){vn(e,this.t,gn),vn(gn.s,this.s,this),this.s?this.t+=gn.t:this.s=gn.t},reset:function(){this.s=this.t=0},valueOf:function(){return this.s}};var gn=new mn;function vn(e,t,n){var r=n.s=e+t,i=r-e,o=r-i;n.t=e-o+(t-i)}function yn(e,t){e&&xn.hasOwnProperty(e.type)&&xn[e.type](e,t)}o.geo.stream=function(e,t){e&&bn.hasOwnProperty(e.type)?bn[e.type](e,t):yn(e,t)};var bn={Feature:function(e,t){yn(e.geometry,t)},FeatureCollection:function(e,t){for(var n=e.features,r=-1,i=n.length;++r<i;)yn(n[r].geometry,t)}},xn={Sphere:function(e,t){t.sphere()},Point:function(e,t){e=e.coordinates,t.point(e[0],e[1],e[2])},MultiPoint:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)e=n[r],t.point(e[0],e[1],e[2])},LineString:function(e,t){wn(e.coordinates,t,0)},MultiLineString:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)wn(n[r],t,0)},Polygon:function(e,t){_n(e.coordinates,t)},MultiPolygon:function(e,t){for(var n=e.coordinates,r=-1,i=n.length;++r<i;)_n(n[r],t)},GeometryCollection:function(e,t){for(var n=e.geometries,r=-1,i=n.length;++r<i;)yn(n[r],t)}};function wn(e,t,n){var r,i=-1,o=e.length-n;for(t.lineStart();++i<o;)r=e[i],t.point(r[0],r[1],r[2]);t.lineEnd()}function _n(e,t){var n=-1,r=e.length;for(t.polygonStart();++n<r;)wn(e[n],t,1);t.polygonEnd()}o.geo.area=function(e){return Sn=0,o.geo.stream(e,Fn),Sn};var Sn,Cn,An,Tn,Pn,En,On,Mn,Dn,kn,In,Rn,Nn=new mn,Fn={sphere:function(){Sn+=4*Me},point:B,lineStart:B,lineEnd:B,polygonStart:function(){Nn.reset(),Fn.lineStart=Ln},polygonEnd:function(){var e=2*Nn;Sn+=e<0?4*Me+e:e,Fn.lineStart=Fn.lineEnd=Fn.point=B}};function Ln(){var e,t,n,r,i;function o(e,t){t=t*Re/2+Me/4;var o=(e*=Re)-n,a=o>=0?1:-1,s=a*o,l=Math.cos(t),u=Math.sin(t),c=i*u,d=r*l+c*Math.cos(s),f=c*a*Math.sin(s);Nn.add(Math.atan2(f,d)),n=e,r=l,i=u}Fn.point=function(a,s){Fn.point=o,n=(e=a)*Re,r=Math.cos(s=(t=s)*Re/2+Me/4),i=Math.sin(s)},Fn.lineEnd=function(){o(e,t)}}function Bn(e){var t=e[0],n=e[1],r=Math.cos(n);return[r*Math.cos(t),r*Math.sin(t),Math.sin(n)]}function Vn(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}function jn(e,t){return[e[1]*t[2]-e[2]*t[1],e[2]*t[0]-e[0]*t[2],e[0]*t[1]-e[1]*t[0]]}function zn(e,t){e[0]+=t[0],e[1]+=t[1],e[2]+=t[2]}function Gn(e,t){return[e[0]*t,e[1]*t,e[2]*t]}function Un(e){var t=Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]);e[0]/=t,e[1]/=t,e[2]/=t}function Wn(e){return[Math.atan2(e[1],e[0]),Ve(e[2])]}function Hn(e,t){return _(e[0]-t[0])<Ee&&_(e[1]-t[1])<Ee}o.geo.bounds=function(){var e,t,n,r,i,a,s,l,u,c,d,f={point:p,lineStart:m,lineEnd:g,polygonStart:function(){f.point=v,f.lineStart=y,f.lineEnd=b,u=0,Fn.polygonStart()},polygonEnd:function(){Fn.polygonEnd(),f.point=p,f.lineStart=m,f.lineEnd=g,Nn<0?(e=-(n=180),t=-(r=90)):u>Ee?r=90:u<-Ee&&(t=-90),d[0]=e,d[1]=n}};function p(i,o){c.push(d=[e=i,n=i]),o<t&&(t=o),o>r&&(r=o)}function h(o,a){var s=Bn([o*Re,a*Re]);if(l){var u=jn(l,s),c=jn([u[1],-u[0],0],u);Un(c),c=Wn(c);var d=o-i,f=d>0?1:-1,h=c[0]*Ne*f,m=_(d)>180;if(m^(f*i<h&&h<f*o))(g=c[1]*Ne)>r&&(r=g);else if(m^(f*i<(h=(h+360)%360-180)&&h<f*o)){var g;(g=-c[1]*Ne)<t&&(t=g)}else a<t&&(t=a),a>r&&(r=a);m?o<i?x(e,o)>x(e,n)&&(n=o):x(o,n)>x(e,n)&&(e=o):n>=e?(o<e&&(e=o),o>n&&(n=o)):o>i?x(e,o)>x(e,n)&&(n=o):x(o,n)>x(e,n)&&(e=o)}else p(o,a);l=s,i=o}function m(){f.point=h}function g(){d[0]=e,d[1]=n,f.point=p,l=null}function v(e,t){if(l){var n=e-i;u+=_(n)>180?n+(n>0?360:-360):n}else a=e,s=t;Fn.point(e,t),h(e,t)}function y(){Fn.lineStart()}function b(){v(a,s),Fn.lineEnd(),_(u)>Ee&&(e=-(n=180)),d[0]=e,d[1]=n,l=null}function x(e,t){return(t-=e)<0?t+360:t}function w(e,t){return e[0]-t[0]}function S(e,t){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}return function(i){if(r=n=-(e=t=1/0),c=[],o.geo.stream(i,f),u=c.length){c.sort(w);for(var a=1,s=[m=c[0]];a<u;++a)S((p=c[a])[0],m)||S(p[1],m)?(x(m[0],p[1])>x(m[0],m[1])&&(m[1]=p[1]),x(p[0],m[1])>x(m[0],m[1])&&(m[0]=p[0])):s.push(m=p);for(var l,u,p,h=-1/0,m=(a=0,s[u=s.length-1]);a<=u;m=p,++a)p=s[a],(l=x(m[1],p[0]))>h&&(h=l,e=p[0],n=m[1])}return c=d=null,e===1/0||t===1/0?[[NaN,NaN],[NaN,NaN]]:[[e,t],[n,r]]}}(),o.geo.centroid=function(e){Cn=An=Tn=Pn=En=On=Mn=Dn=kn=In=Rn=0,o.geo.stream(e,qn);var t=kn,n=In,r=Rn,i=t*t+n*n+r*r;return i<Oe&&(t=On,n=Mn,r=Dn,An<Ee&&(t=Tn,n=Pn,r=En),(i=t*t+n*n+r*r)<Oe)?[NaN,NaN]:[Math.atan2(n,t)*Ne,Ve(r/Math.sqrt(i))*Ne]};var qn={sphere:B,point:Xn,lineStart:Zn,lineEnd:Yn,polygonStart:function(){qn.lineStart=Jn},polygonEnd:function(){qn.lineStart=Zn}};function Xn(e,t){e*=Re;var n=Math.cos(t*=Re);Kn(n*Math.cos(e),n*Math.sin(e),Math.sin(t))}function Kn(e,t,n){++Cn,Tn+=(e-Tn)/Cn,Pn+=(t-Pn)/Cn,En+=(n-En)/Cn}function Zn(){var e,t,n;function r(r,i){r*=Re;var o=Math.cos(i*=Re),a=o*Math.cos(r),s=o*Math.sin(r),l=Math.sin(i),u=Math.atan2(Math.sqrt((u=t*l-n*s)*u+(u=n*a-e*l)*u+(u=e*s-t*a)*u),e*a+t*s+n*l);An+=u,On+=u*(e+(e=a)),Mn+=u*(t+(t=s)),Dn+=u*(n+(n=l)),Kn(e,t,n)}qn.point=function(i,o){i*=Re;var a=Math.cos(o*=Re);e=a*Math.cos(i),t=a*Math.sin(i),n=Math.sin(o),qn.point=r,Kn(e,t,n)}}function Yn(){qn.point=Xn}function Jn(){var e,t,n,r,i;function o(e,t){e*=Re;var o=Math.cos(t*=Re),a=o*Math.cos(e),s=o*Math.sin(e),l=Math.sin(t),u=r*l-i*s,c=i*a-n*l,d=n*s-r*a,f=Math.sqrt(u*u+c*c+d*d),p=n*a+r*s+i*l,h=f&&-Be(p)/f,m=Math.atan2(f,p);kn+=h*u,In+=h*c,Rn+=h*d,An+=m,On+=m*(n+(n=a)),Mn+=m*(r+(r=s)),Dn+=m*(i+(i=l)),Kn(n,r,i)}qn.point=function(a,s){e=a,t=s,qn.point=o,a*=Re;var l=Math.cos(s*=Re);n=l*Math.cos(a),r=l*Math.sin(a),i=Math.sin(s),Kn(n,r,i)},qn.lineEnd=function(){o(e,t),qn.lineEnd=Yn,qn.point=Xn}}function Qn(e,t){function n(n,r){return n=e(n,r),t(n[0],n[1])}return e.invert&&t.invert&&(n.invert=function(n,r){return(n=t.invert(n,r))&&e.invert(n[0],n[1])}),n}function $n(){return!0}function er(e,t,n,r,i){var o=[],a=[];if(e.forEach((function(e){if(!((t=e.length-1)<=0)){var t,n=e[0],r=e[t];if(Hn(n,r)){i.lineStart();for(var s=0;s<t;++s)i.point((n=e[s])[0],n[1]);i.lineEnd()}else{var l=new nr(n,e,null,!0),u=new nr(n,null,l,!1);l.o=u,o.push(l),a.push(u),l=new nr(r,e,null,!1),u=new nr(r,null,l,!0),l.o=u,o.push(l),a.push(u)}}})),a.sort(t),tr(o),tr(a),o.length){for(var s=0,l=n,u=a.length;s<u;++s)a[s].e=l=!l;for(var c,d,f=o[0];;){for(var p=f,h=!0;p.v;)if((p=p.n)===f)return;c=p.z,i.lineStart();do{if(p.v=p.o.v=!0,p.e){if(h)for(s=0,u=c.length;s<u;++s)i.point((d=c[s])[0],d[1]);else r(p.x,p.n.x,1,i);p=p.n}else{if(h)for(s=(c=p.p.z).length-1;s>=0;--s)i.point((d=c[s])[0],d[1]);else r(p.x,p.p.x,-1,i);p=p.p}c=(p=p.o).z,h=!h}while(!p.v);i.lineEnd()}}}function tr(e){if(t=e.length){for(var t,n,r=0,i=e[0];++r<t;)i.n=n=e[r],n.p=i,i=n;i.n=n=e[0],n.p=i}}function nr(e,t,n,r){this.x=e,this.z=t,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}function rr(e,t,n,r){return function(i,a){var s,l=t(a),u=i.invert(r[0],r[1]),c={point:d,lineStart:p,lineEnd:h,polygonStart:function(){c.point=x,c.lineStart=w,c.lineEnd=_,s=[],m=[]},polygonEnd:function(){c.point=d,c.lineStart=p,c.lineEnd=h,s=o.merge(s);var e=function(e,t){var n=e[0],r=e[1],i=[Math.sin(n),-Math.cos(n),0],o=0,a=0;Nn.reset();for(var s=0,l=t.length;s<l;++s){var u=t[s],c=u.length;if(c)for(var d=u[0],f=d[0],p=d[1]/2+Me/4,h=Math.sin(p),m=Math.cos(p),g=1;;){g===c&&(g=0);var v=(e=u[g])[0],y=e[1]/2+Me/4,b=Math.sin(y),x=Math.cos(y),w=v-f,_=w>=0?1:-1,S=_*w,C=S>Me,A=h*b;if(Nn.add(Math.atan2(A*_*Math.sin(S),m*x+A*Math.cos(S))),o+=C?w+_*De:w,C^f>=n^v>=n){var T=jn(Bn(d),Bn(e));Un(T);var P=jn(i,T);Un(P);var E=(C^w>=0?-1:1)*Ve(P[2]);(r>E||r===E&&(T[0]||T[1]))&&(a+=C^w>=0?1:-1)}if(!g++)break;f=v,h=b,m=x,d=e}}return(o<-Ee||o<Ee&&Nn<-Ee)^1&a}(u,m);s.length?(b||(a.polygonStart(),b=!0),er(s,ar,e,n,a)):e&&(b||(a.polygonStart(),b=!0),a.lineStart(),n(null,null,1,a),a.lineEnd()),b&&(a.polygonEnd(),b=!1),s=m=null},sphere:function(){a.polygonStart(),a.lineStart(),n(null,null,1,a),a.lineEnd(),a.polygonEnd()}};function d(t,n){var r=i(t,n);e(t=r[0],n=r[1])&&a.point(t,n)}function f(e,t){var n=i(e,t);l.point(n[0],n[1])}function p(){c.point=f,l.lineStart()}function h(){c.point=d,l.lineEnd()}var m,g,v=or(),y=t(v),b=!1;function x(e,t){g.push([e,t]);var n=i(e,t);y.point(n[0],n[1])}function w(){y.lineStart(),g=[]}function _(){x(g[0][0],g[0][1]),y.lineEnd();var e,t=y.clean(),n=v.buffer(),r=n.length;if(g.pop(),m.push(g),g=null,r)if(1&t){var i,o=-1;if((r=(e=n[0]).length-1)>0){for(b||(a.polygonStart(),b=!0),a.lineStart();++o<r;)a.point((i=e[o])[0],i[1]);a.lineEnd()}}else r>1&&2&t&&n.push(n.pop().concat(n.shift())),s.push(n.filter(ir))}return c}}function ir(e){return e.length>1}function or(){var e,t=[];return{lineStart:function(){t.push(e=[])},point:function(t,n){e.push([t,n])},lineEnd:B,buffer:function(){var n=t;return t=[],e=null,n},rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))}}}function ar(e,t){return((e=e.x)[0]<0?e[1]-Ie-Ee:Ie-e[1])-((t=t.x)[0]<0?t[1]-Ie-Ee:Ie-t[1])}var sr=rr($n,(function(e){var t,n=NaN,r=NaN,i=NaN;return{lineStart:function(){e.lineStart(),t=1},point:function(o,a){var s=o>0?Me:-Me,l=_(o-n);_(l-Me)<Ee?(e.point(n,r=(r+a)/2>0?Ie:-Ie),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),e.point(o,r),t=0):i!==s&&l>=Me&&(_(n-i)<Ee&&(n-=i*Ee),_(o-s)<Ee&&(o-=s*Ee),r=function(e,t,n,r){var i,o,a=Math.sin(e-n);return _(a)>Ee?Math.atan((Math.sin(t)*(o=Math.cos(r))*Math.sin(n)-Math.sin(r)*(i=Math.cos(t))*Math.sin(e))/(i*o*a)):(t+r)/2}(n,r,o,a),e.point(i,r),e.lineEnd(),e.lineStart(),e.point(s,r),t=0),e.point(n=o,r=a),i=s},lineEnd:function(){e.lineEnd(),n=r=NaN},clean:function(){return 2-t}}}),(function(e,t,n,r){var i;if(null==e)i=n*Ie,r.point(-Me,i),r.point(0,i),r.point(Me,i),r.point(Me,0),r.point(Me,-i),r.point(0,-i),r.point(-Me,-i),r.point(-Me,0),r.point(-Me,i);else if(_(e[0]-t[0])>Ee){var o=e[0]<t[0]?Me:-Me;i=n*o/2,r.point(-o,i),r.point(0,i),r.point(o,i)}else r.point(t[0],t[1])}),[-Me,-Me/2]);function lr(e){var t=Math.cos(e),n=t>0,r=_(t)>Ee;return rr(i,(function(e){var t,s,l,u,c;return{lineStart:function(){u=l=!1,c=1},point:function(d,f){var p,h=[d,f],m=i(d,f),g=n?m?0:a(d,f):m?a(d+(d<0?Me:-Me),f):0;if(!t&&(u=l=m)&&e.lineStart(),m!==l&&(p=o(t,h),(Hn(t,p)||Hn(h,p))&&(h[0]+=Ee,h[1]+=Ee,m=i(h[0],h[1]))),m!==l)c=0,m?(e.lineStart(),p=o(h,t),e.point(p[0],p[1])):(p=o(t,h),e.point(p[0],p[1]),e.lineEnd()),t=p;else if(r&&t&&n^m){var v;g&s||!(v=o(h,t,!0))||(c=0,n?(e.lineStart(),e.point(v[0][0],v[0][1]),e.point(v[1][0],v[1][1]),e.lineEnd()):(e.point(v[1][0],v[1][1]),e.lineEnd(),e.lineStart(),e.point(v[0][0],v[0][1])))}!m||t&&Hn(t,h)||e.point(h[0],h[1]),t=h,l=m,s=g},lineEnd:function(){l&&e.lineEnd(),t=null},clean:function(){return c|(u&&l)<<1}}}),Hr(e,6*Re),n?[0,-e]:[-Me,e-Me]);function i(e,n){return Math.cos(e)*Math.cos(n)>t}function o(e,n,r){var i=[1,0,0],o=jn(Bn(e),Bn(n)),a=Vn(o,o),s=o[0],l=a-s*s;if(!l)return!r&&e;var u=t*a/l,c=-t*s/l,d=jn(i,o),f=Gn(i,u);zn(f,Gn(o,c));var p=d,h=Vn(f,p),m=Vn(p,p),g=h*h-m*(Vn(f,f)-1);if(!(g<0)){var v=Math.sqrt(g),y=Gn(p,(-h-v)/m);if(zn(y,f),y=Wn(y),!r)return y;var b,x=e[0],w=n[0],S=e[1],C=n[1];w<x&&(b=x,x=w,w=b);var A=w-x,T=_(A-Me)<Ee;if(!T&&C<S&&(b=S,S=C,C=b),T||A<Ee?T?S+C>0^y[1]<(_(y[0]-x)<Ee?S:C):S<=y[1]&&y[1]<=C:A>Me^(x<=y[0]&&y[0]<=w)){var P=Gn(p,(-h+v)/m);return zn(P,f),[y,Wn(P)]}}}function a(t,r){var i=n?e:Me-e,o=0;return t<-i?o|=1:t>i&&(o|=2),r<-i?o|=4:r>i&&(o|=8),o}}function ur(e,t,n,r){return function(i){var o,a=i.a,s=i.b,l=a.x,u=a.y,c=0,d=1,f=s.x-l,p=s.y-u;if(o=e-l,f||!(o>0)){if(o/=f,f<0){if(o<c)return;o<d&&(d=o)}else if(f>0){if(o>d)return;o>c&&(c=o)}if(o=n-l,f||!(o<0)){if(o/=f,f<0){if(o>d)return;o>c&&(c=o)}else if(f>0){if(o<c)return;o<d&&(d=o)}if(o=t-u,p||!(o>0)){if(o/=p,p<0){if(o<c)return;o<d&&(d=o)}else if(p>0){if(o>d)return;o>c&&(c=o)}if(o=r-u,p||!(o<0)){if(o/=p,p<0){if(o>d)return;o>c&&(c=o)}else if(p>0){if(o<c)return;o<d&&(d=o)}return c>0&&(i.a={x:l+c*f,y:u+c*p}),d<1&&(i.b={x:l+d*f,y:u+d*p}),i}}}}}}var cr=1e9;function dr(e,t,n,r){return function(l){var u,c,d,f,p,h,m,g,v,y,b,x=l,w=or(),_=ur(e,t,n,r),S={point:T,lineStart:function(){S.point=P,c&&c.push(d=[]);y=!0,v=!1,m=g=NaN},lineEnd:function(){u&&(P(f,p),h&&v&&w.rejoin(),u.push(w.buffer()));S.point=T,v&&l.lineEnd()},polygonStart:function(){l=w,u=[],c=[],b=!0},polygonEnd:function(){l=x,u=o.merge(u);var t=function(e){for(var t=0,n=c.length,r=e[1],i=0;i<n;++i)for(var o,a=1,s=c[i],l=s.length,u=s[0];a<l;++a)o=s[a],u[1]<=r?o[1]>r&&Le(u,o,e)>0&&++t:o[1]<=r&&Le(u,o,e)<0&&--t,u=o;return 0!==t}([e,r]),n=b&&t,i=u.length;(n||i)&&(l.polygonStart(),n&&(l.lineStart(),C(null,null,1,l),l.lineEnd()),i&&er(u,a,t,C,l),l.polygonEnd()),u=c=d=null}};function C(o,a,l,u){var c=0,d=0;if(null==o||(c=i(o,l))!==(d=i(a,l))||s(o,a)<0^l>0)do{u.point(0===c||3===c?e:n,c>1?r:t)}while((c=(c+l+4)%4)!==d);else u.point(a[0],a[1])}function A(i,o){return e<=i&&i<=n&&t<=o&&o<=r}function T(e,t){A(e,t)&&l.point(e,t)}function P(e,t){var n=A(e=Math.max(-1e9,Math.min(cr,e)),t=Math.max(-1e9,Math.min(cr,t)));if(c&&d.push([e,t]),y)f=e,p=t,h=n,y=!1,n&&(l.lineStart(),l.point(e,t));else if(n&&v)l.point(e,t);else{var r={a:{x:m,y:g},b:{x:e,y:t}};_(r)?(v||(l.lineStart(),l.point(r.a.x,r.a.y)),l.point(r.b.x,r.b.y),n||l.lineEnd(),b=!1):n&&(l.lineStart(),l.point(e,t),b=!1)}m=e,g=t,v=n}return S};function i(r,i){return _(r[0]-e)<Ee?i>0?0:3:_(r[0]-n)<Ee?i>0?2:1:_(r[1]-t)<Ee?i>0?1:0:i>0?3:2}function a(e,t){return s(e.x,t.x)}function s(e,t){var n=i(e,1),r=i(t,1);return n!==r?n-r:0===n?t[1]-e[1]:1===n?e[0]-t[0]:2===n?e[1]-t[1]:t[0]-e[0]}}function fr(e){var t=0,n=Me/3,r=Lr(e),i=r(t,n);return i.parallels=function(e){return arguments.length?r(t=e[0]*Me/180,n=e[1]*Me/180):[t/Me*180,n/Me*180]},i}function pr(e,t){var n=Math.sin(e),r=(n+Math.sin(t))/2,i=1+n*(2*r-n),o=Math.sqrt(i)/r;function a(e,t){var n=Math.sqrt(i-2*r*Math.sin(t))/r;return[n*Math.sin(e*=r),o-n*Math.cos(e)]}return a.invert=function(e,t){var n=o-t;return[Math.atan2(e,n)/r,Ve((i-(e*e+n*n)*r*r)/(2*r))]},a}o.geo.clipExtent=function(){var e,t,n,r,i,o,a={stream:function(e){return i&&(i.valid=!1),(i=o(e)).valid=!0,i},extent:function(s){return arguments.length?(o=dr(e=+s[0][0],t=+s[0][1],n=+s[1][0],r=+s[1][1]),i&&(i.valid=!1,i=null),a):[[e,t],[n,r]]}};return a.extent([[0,0],[960,500]])},(o.geo.conicEqualArea=function(){return fr(pr)}).raw=pr,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 e,t,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]),l={point:function(t,n){e=[t,n]}};function u(i){var o=i[0],a=i[1];return e=null,t(o,a),e||(n(o,a),e)||r(o,a),e}return u.invert=function(e){var t=i.scale(),n=i.translate(),r=(e[0]-n[0])/t,o=(e[1]-n[1])/t;return(o>=.12&&o<.234&&r>=-.425&&r<-.214?a:o>=.166&&o<.234&&r>=-.214&&r<-.115?s:i).invert(e)},u.stream=function(e){var t=i.stream(e),n=a.stream(e),r=s.stream(e);return{point:function(e,i){t.point(e,i),n.point(e,i),r.point(e,i)},sphere:function(){t.sphere(),n.sphere(),r.sphere()},lineStart:function(){t.lineStart(),n.lineStart(),r.lineStart()},lineEnd:function(){t.lineEnd(),n.lineEnd(),r.lineEnd()},polygonStart:function(){t.polygonStart(),n.polygonStart(),r.polygonStart()},polygonEnd:function(){t.polygonEnd(),n.polygonEnd(),r.polygonEnd()}}},u.precision=function(e){return arguments.length?(i.precision(e),a.precision(e),s.precision(e),u):i.precision()},u.scale=function(e){return arguments.length?(i.scale(e),a.scale(.35*e),s.scale(e),u.translate(i.translate())):i.scale()},u.translate=function(e){if(!arguments.length)return i.translate();var o=i.scale(),c=+e[0],d=+e[1];return t=i.translate(e).clipExtent([[c-.455*o,d-.238*o],[c+.455*o,d+.238*o]]).stream(l).point,n=a.translate([c-.307*o,d+.201*o]).clipExtent([[c-.425*o+Ee,d+.12*o+Ee],[c-.214*o-Ee,d+.234*o-Ee]]).stream(l).point,r=s.translate([c-.205*o,d+.212*o]).clipExtent([[c-.214*o+Ee,d+.166*o+Ee],[c-.115*o-Ee,d+.234*o-Ee]]).stream(l).point,u},u.scale(1070)};var hr,mr,gr,vr,yr,br,xr={point:B,lineStart:B,lineEnd:B,polygonStart:function(){mr=0,xr.lineStart=wr},polygonEnd:function(){xr.lineStart=xr.lineEnd=xr.point=B,hr+=_(mr/2)}};function wr(){var e,t,n,r;function i(e,t){mr+=r*e-n*t,n=e,r=t}xr.point=function(o,a){xr.point=i,e=n=o,t=r=a},xr.lineEnd=function(){i(e,t)}}var _r={point:function(e,t){e<gr&&(gr=e);e>yr&&(yr=e);t<vr&&(vr=t);t>br&&(br=t)},lineStart:B,lineEnd:B,polygonStart:B,polygonEnd:B};function Sr(){var e=Cr(4.5),t=[],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=Cr(t),n},result:function(){if(t.length){var e=t.join("");return t=[],e}}};function r(n,r){t.push("M",n,",",r,e)}function i(e,r){t.push("M",e,",",r),n.point=o}function o(e,n){t.push("L",e,",",n)}function a(){n.point=r}function s(){t.push("Z")}return n}function Cr(e){return"m0,"+e+"a"+e+","+e+" 0 1,1 0,"+-2*e+"a"+e+","+e+" 0 1,1 0,"+2*e+"z"}var Ar,Tr={point:Pr,lineStart:Er,lineEnd:Or,polygonStart:function(){Tr.lineStart=Mr},polygonEnd:function(){Tr.point=Pr,Tr.lineStart=Er,Tr.lineEnd=Or}};function Pr(e,t){Tn+=e,Pn+=t,++En}function Er(){var e,t;function n(n,r){var i=n-e,o=r-t,a=Math.sqrt(i*i+o*o);On+=a*(e+n)/2,Mn+=a*(t+r)/2,Dn+=a,Pr(e=n,t=r)}Tr.point=function(r,i){Tr.point=n,Pr(e=r,t=i)}}function Or(){Tr.point=Pr}function Mr(){var e,t,n,r;function i(e,t){var i=e-n,o=t-r,a=Math.sqrt(i*i+o*o);On+=a*(n+e)/2,Mn+=a*(r+t)/2,Dn+=a,kn+=(a=r*e-n*t)*(n+e),In+=a*(r+t),Rn+=3*a,Pr(n=e,r=t)}Tr.point=function(o,a){Tr.point=i,Pr(e=n=o,t=r=a)},Tr.lineEnd=function(){i(e,t)}}function Dr(e){var t=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(e){return t=e,n},result:B};function r(n,r){e.moveTo(n+t,r),e.arc(n,r,t,0,De)}function i(t,r){e.moveTo(t,r),n.point=o}function o(t,n){e.lineTo(t,n)}function a(){n.point=r}function s(){e.closePath()}return n}function kr(e){var t=.5,n=Math.cos(30*Re),r=16;function i(e){return(r?a:o)(e)}function o(t){return Nr(t,(function(n,r){n=e(n,r),t.point(n[0],n[1])}))}function a(t){var n,i,o,a,l,u,c,d,f,p,h,m,g={point:v,lineStart:y,lineEnd:x,polygonStart:function(){t.polygonStart(),g.lineStart=w},polygonEnd:function(){t.polygonEnd(),g.lineStart=y}};function v(n,r){n=e(n,r),t.point(n[0],n[1])}function y(){d=NaN,g.point=b,t.lineStart()}function b(n,i){var o=Bn([n,i]),a=e(n,i);s(d,f,c,p,h,m,d=a[0],f=a[1],c=n,p=o[0],h=o[1],m=o[2],r,t),t.point(d,f)}function x(){g.point=v,t.lineEnd()}function w(){y(),g.point=_,g.lineEnd=S}function _(e,t){b(n=e,t),i=d,o=f,a=p,l=h,u=m,g.point=b}function S(){s(d,f,c,p,h,m,i,o,n,a,l,u,r,t),g.lineEnd=x,x()}return g}function s(r,i,o,a,l,u,c,d,f,p,h,m,g,v){var y=c-r,b=d-i,x=y*y+b*b;if(x>4*t&&g--){var w=a+p,S=l+h,C=u+m,A=Math.sqrt(w*w+S*S+C*C),T=Math.asin(C/=A),P=_(_(C)-1)<Ee||_(o-f)<Ee?(o+f)/2:Math.atan2(S,w),E=e(P,T),O=E[0],M=E[1],D=O-r,k=M-i,I=b*D-y*k;(I*I/x>t||_((y*D+b*k)/x-.5)>.3||a*p+l*h+u*m<n)&&(s(r,i,o,a,l,u,O,M,P,w/=A,S/=A,C,g,v),v.point(O,M),s(O,M,P,w,S,C,c,d,f,p,h,m,g,v))}}return i.precision=function(e){return arguments.length?(r=(t=e*e)>0&&16,i):Math.sqrt(t)},i}function Ir(e){var t=kr((function(t,n){return e([t*Ne,n*Ne])}));return function(e){return Br(t(e))}}function Rr(e){this.stream=e}function Nr(e,t){return{point:t,sphere:function(){e.sphere()},lineStart:function(){e.lineStart()},lineEnd:function(){e.lineEnd()},polygonStart:function(){e.polygonStart()},polygonEnd:function(){e.polygonEnd()}}}function Fr(e){return Lr((function(){return e}))()}function Lr(e){var t,n,r,i,a,s,l=kr((function(e,n){return[(e=t(e,n))[0]*u+i,a-e[1]*u]})),u=150,c=480,d=250,f=0,p=0,h=0,m=0,g=0,v=sr,y=R,b=null,x=null;function w(e){return[(e=r(e[0]*Re,e[1]*Re))[0]*u+i,a-e[1]*u]}function _(e){return(e=r.invert((e[0]-i)/u,(a-e[1])/u))&&[e[0]*Ne,e[1]*Ne]}function S(){r=Qn(n=zr(h,m,g),t);var e=t(f,p);return i=c-e[0]*u,a=d+e[1]*u,C()}function C(){return s&&(s.valid=!1,s=null),w}return w.stream=function(e){return s&&(s.valid=!1),(s=Br(v(n,l(y(e))))).valid=!0,s},w.clipAngle=function(e){return arguments.length?(v=null==e?(b=e,sr):lr((b=+e)*Re),C()):b},w.clipExtent=function(e){return arguments.length?(x=e,y=e?dr(e[0][0],e[0][1],e[1][0],e[1][1]):R,C()):x},w.scale=function(e){return arguments.length?(u=+e,S()):u},w.translate=function(e){return arguments.length?(c=+e[0],d=+e[1],S()):[c,d]},w.center=function(e){return arguments.length?(f=e[0]%360*Re,p=e[1]%360*Re,S()):[f*Ne,p*Ne]},w.rotate=function(e){return arguments.length?(h=e[0]%360*Re,m=e[1]%360*Re,g=e.length>2?e[2]%360*Re:0,S()):[h*Ne,m*Ne,g*Ne]},o.rebind(w,l,"precision"),function(){return t=e.apply(this,arguments),w.invert=t.invert&&_,S()}}function Br(e){return Nr(e,(function(t,n){e.point(t*Re,n*Re)}))}function Vr(e,t){return[e,t]}function jr(e,t){return[e>Me?e-De:e<-Me?e+De:e,t]}function zr(e,t,n){return e?t||n?Qn(Ur(e),Wr(t,n)):Ur(e):t||n?Wr(t,n):jr}function Gr(e){return function(t,n){return[(t+=e)>Me?t-De:t<-Me?t+De:t,n]}}function Ur(e){var t=Gr(e);return t.invert=Gr(-e),t}function Wr(e,t){var n=Math.cos(e),r=Math.sin(e),i=Math.cos(t),o=Math.sin(t);function a(e,t){var a=Math.cos(t),s=Math.cos(e)*a,l=Math.sin(e)*a,u=Math.sin(t),c=u*n+s*r;return[Math.atan2(l*i-c*o,s*n-u*r),Ve(c*i+l*o)]}return a.invert=function(e,t){var a=Math.cos(t),s=Math.cos(e)*a,l=Math.sin(e)*a,u=Math.sin(t),c=u*i-l*o;return[Math.atan2(l*i+u*o,s*n+c*r),Ve(c*n-s*r)]},a}function Hr(e,t){var n=Math.cos(e),r=Math.sin(e);return function(i,o,a,s){var l=a*t;null!=i?(i=qr(n,i),o=qr(n,o),(a>0?i<o:i>o)&&(i+=a*De)):(i=e+a*De,o=e-.5*l);for(var u,c=i;a>0?c>o:c<o;c-=l)s.point((u=Wn([n,-r*Math.cos(c),-r*Math.sin(c)]))[0],u[1])}}function qr(e,t){var n=Bn(t);n[0]-=e,Un(n);var r=Be(-n[1]);return((-n[2]<0?-r:r)+2*Math.PI-Ee)%(2*Math.PI)}function Xr(e,t,n){var r=o.range(e,t-Ee,n).concat(t);return function(e){return r.map((function(t){return[e,t]}))}}function Kr(e,t,n){var r=o.range(e,t-Ee,n).concat(t);return function(e){return r.map((function(t){return[t,e]}))}}function Zr(e){return e.source}function Yr(e){return e.target}o.geo.path=function(){var e,t,n,r,i,a=4.5;function s(e){return e&&("function"==typeof a&&r.pointRadius(+a.apply(this,arguments)),i&&i.valid||(i=n(r)),o.geo.stream(e,i)),r.result()}function l(){return i=null,s}return s.area=function(e){return hr=0,o.geo.stream(e,n(xr)),hr},s.centroid=function(e){return Tn=Pn=En=On=Mn=Dn=kn=In=Rn=0,o.geo.stream(e,n(Tr)),Rn?[kn/Rn,In/Rn]:Dn?[On/Dn,Mn/Dn]:En?[Tn/En,Pn/En]:[NaN,NaN]},s.bounds=function(e){return yr=br=-(gr=vr=1/0),o.geo.stream(e,n(_r)),[[gr,vr],[yr,br]]},s.projection=function(t){return arguments.length?(n=(e=t)?t.stream||Ir(t):R,l()):e},s.context=function(e){return arguments.length?(r=null==(t=e)?new Sr:new Dr(e),"function"!=typeof a&&r.pointRadius(a),l()):t},s.pointRadius=function(e){return arguments.length?(a="function"==typeof e?e:(r.pointRadius(+e),+e),s):a},s.projection(o.geo.albersUsa()).context(null)},o.geo.transform=function(e){return{stream:function(t){var n=new Rr(t);for(var r in e)n[r]=e[r];return n}}},Rr.prototype={point:function(e,t){this.stream.point(e,t)},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=Fr,o.geo.projectionMutator=Lr,(o.geo.equirectangular=function(){return Fr(Vr)}).raw=Vr.invert=Vr,o.geo.rotation=function(e){function t(t){return(t=e(t[0]*Re,t[1]*Re))[0]*=Ne,t[1]*=Ne,t}return e=zr(e[0]%360*Re,e[1]*Re,e.length>2?e[2]*Re:0),t.invert=function(t){return(t=e.invert(t[0]*Re,t[1]*Re))[0]*=Ne,t[1]*=Ne,t},t},jr.invert=Vr,o.geo.circle=function(){var e,t,n=[0,0],r=6;function i(){var e="function"==typeof n?n.apply(this,arguments):n,r=zr(-e[0]*Re,-e[1]*Re,0).invert,i=[];return t(null,null,1,{point:function(e,t){i.push(e=r(e,t)),e[0]*=Ne,e[1]*=Ne}}),{type:"Polygon",coordinates:[i]}}return i.origin=function(e){return arguments.length?(n=e,i):n},i.angle=function(n){return arguments.length?(t=Hr((e=+n)*Re,r*Re),i):e},i.precision=function(n){return arguments.length?(t=Hr(e*Re,(r=+n)*Re),i):r},i.angle(90)},o.geo.distance=function(e,t){var n,r=(t[0]-e[0])*Re,i=e[1]*Re,o=t[1]*Re,a=Math.sin(r),s=Math.cos(r),l=Math.sin(i),u=Math.cos(i),c=Math.sin(o),d=Math.cos(o);return Math.atan2(Math.sqrt((n=d*a)*n+(n=u*c-l*d*s)*n),l*c+u*d*s)},o.geo.graticule=function(){var e,t,n,r,i,a,s,l,u,c,d,f,p=10,h=p,m=90,g=360,v=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return o.range(Math.ceil(r/m)*m,n,m).map(d).concat(o.range(Math.ceil(l/g)*g,s,g).map(f)).concat(o.range(Math.ceil(t/p)*p,e,p).filter((function(e){return _(e%m)>Ee})).map(u)).concat(o.range(Math.ceil(a/h)*h,i,h).filter((function(e){return _(e%g)>Ee})).map(c))}return y.lines=function(){return b().map((function(e){return{type:"LineString",coordinates:e}}))},y.outline=function(){return{type:"Polygon",coordinates:[d(r).concat(f(s).slice(1),d(n).reverse().slice(1),f(l).reverse().slice(1))]}},y.extent=function(e){return arguments.length?y.majorExtent(e).minorExtent(e):y.minorExtent()},y.majorExtent=function(e){return arguments.length?(r=+e[0][0],n=+e[1][0],l=+e[0][1],s=+e[1][1],r>n&&(e=r,r=n,n=e),l>s&&(e=l,l=s,s=e),y.precision(v)):[[r,l],[n,s]]},y.minorExtent=function(n){return arguments.length?(t=+n[0][0],e=+n[1][0],a=+n[0][1],i=+n[1][1],t>e&&(n=t,t=e,e=n),a>i&&(n=a,a=i,i=n),y.precision(v)):[[t,a],[e,i]]},y.step=function(e){return arguments.length?y.majorStep(e).minorStep(e):y.minorStep()},y.majorStep=function(e){return arguments.length?(m=+e[0],g=+e[1],y):[m,g]},y.minorStep=function(e){return arguments.length?(p=+e[0],h=+e[1],y):[p,h]},y.precision=function(o){return arguments.length?(v=+o,u=Xr(a,i,90),c=Kr(t,e,v),d=Xr(l,s,90),f=Kr(r,n,v),y):v},y.majorExtent([[-180,-90+Ee],[180,90-Ee]]).minorExtent([[-180,-80-Ee],[180,80+Ee]])},o.geo.greatArc=function(){var e,t,n=Zr,r=Yr;function i(){return{type:"LineString",coordinates:[e||n.apply(this,arguments),t||r.apply(this,arguments)]}}return i.distance=function(){return o.geo.distance(e||n.apply(this,arguments),t||r.apply(this,arguments))},i.source=function(t){return arguments.length?(n=t,e="function"==typeof t?null:t,i):n},i.target=function(e){return arguments.length?(r=e,t="function"==typeof e?null:e,i):r},i.precision=function(){return arguments.length?i:0},i},o.geo.interpolate=function(e,t){return n=e[0]*Re,r=e[1]*Re,i=t[0]*Re,o=t[1]*Re,a=Math.cos(r),s=Math.sin(r),l=Math.cos(o),u=Math.sin(o),c=a*Math.cos(n),d=a*Math.sin(n),f=l*Math.cos(i),p=l*Math.sin(i),h=2*Math.asin(Math.sqrt(ze(o-r)+a*l*ze(i-n))),m=1/Math.sin(h),(g=h?function(e){var t=Math.sin(e*=h)*m,n=Math.sin(h-e)*m,r=n*c+t*f,i=n*d+t*p,o=n*s+t*u;return[Math.atan2(i,r)*Ne,Math.atan2(o,Math.sqrt(r*r+i*i))*Ne]}:function(){return[n*Ne,r*Ne]}).distance=h,g;var n,r,i,o,a,s,l,u,c,d,f,p,h,m,g},o.geo.length=function(e){return Ar=0,o.geo.stream(e,Jr),Ar};var Jr={sphere:B,point:B,lineStart:function(){var e,t,n;function r(r,i){var o=Math.sin(i*=Re),a=Math.cos(i),s=_((r*=Re)-e),l=Math.cos(s);Ar+=Math.atan2(Math.sqrt((s=a*Math.sin(s))*s+(s=n*o-t*a*l)*s),t*o+n*a*l),e=r,t=o,n=a}Jr.point=function(i,o){e=i*Re,t=Math.sin(o*=Re),n=Math.cos(o),Jr.point=r},Jr.lineEnd=function(){Jr.point=Jr.lineEnd=B}},lineEnd:B,polygonStart:B,polygonEnd:B};function Qr(e,t){function n(t,n){var r=Math.cos(t),i=Math.cos(n),o=e(r*i);return[o*i*Math.sin(t),o*Math.sin(n)]}return n.invert=function(e,n){var r=Math.sqrt(e*e+n*n),i=t(r),o=Math.sin(i),a=Math.cos(i);return[Math.atan2(e*o,r*a),Math.asin(r&&n*o/r)]},n}var $r=Qr((function(e){return Math.sqrt(2/(1+e))}),(function(e){return 2*Math.asin(e/2)}));(o.geo.azimuthalEqualArea=function(){return Fr($r)}).raw=$r;var ei=Qr((function(e){var t=Math.acos(e);return t&&t/Math.sin(t)}),R);function ti(e,t){var n=Math.cos(e),r=function(e){return Math.tan(Me/4+e/2)},i=e===t?Math.sin(e):Math.log(n/Math.cos(t))/Math.log(r(t)/r(e)),o=n*Math.pow(r(e),i)/i;if(!i)return ii;function a(e,t){o>0?t<-Ie+Ee&&(t=-Ie+Ee):t>Ie-Ee&&(t=Ie-Ee);var n=o/Math.pow(r(t),i);return[n*Math.sin(i*e),o-n*Math.cos(i*e)]}return a.invert=function(e,t){var n=o-t,r=Fe(i)*Math.sqrt(e*e+n*n);return[Math.atan2(e,n)/i,2*Math.atan(Math.pow(o/r,1/i))-Ie]},a}function ni(e,t){var n=Math.cos(e),r=e===t?Math.sin(e):(n-Math.cos(t))/(t-e),i=n/r+e;if(_(r)<Ee)return Vr;function o(e,t){var n=i-t;return[n*Math.sin(r*e),i-n*Math.cos(r*e)]}return o.invert=function(e,t){var n=i-t;return[Math.atan2(e,n)/r,i-Fe(r)*Math.sqrt(e*e+n*n)]},o}(o.geo.azimuthalEquidistant=function(){return Fr(ei)}).raw=ei,(o.geo.conicConformal=function(){return fr(ti)}).raw=ti,(o.geo.conicEquidistant=function(){return fr(ni)}).raw=ni;var ri=Qr((function(e){return 1/e}),Math.atan);function ii(e,t){return[e,Math.log(Math.tan(Me/4+t/2))]}function oi(e){var t,n=Fr(e),r=n.scale,i=n.translate,o=n.clipExtent;return n.scale=function(){var e=r.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.translate=function(){var e=i.apply(n,arguments);return e===n?t?n.clipExtent(null):n:e},n.clipExtent=function(e){var a=o.apply(n,arguments);if(a===n){if(t=null==e){var s=Me*r(),l=i();o([[l[0]-s,l[1]-s],[l[0]+s,l[1]+s]])}}else t&&(a=null);return a},n.clipExtent(null)}(o.geo.gnomonic=function(){return Fr(ri)}).raw=ri,ii.invert=function(e,t){return[e,2*Math.atan(Math.exp(t))-Ie]},(o.geo.mercator=function(){return oi(ii)}).raw=ii;var ai=Qr((function(){return 1}),Math.asin);(o.geo.orthographic=function(){return Fr(ai)}).raw=ai;var si=Qr((function(e){return 1/(1+e)}),(function(e){return 2*Math.atan(e)}));function li(e,t){return[Math.log(Math.tan(Me/4+t/2)),-e]}function ui(e){return e[0]}function ci(e){return e[1]}function di(e){for(var t=e.length,n=[0,1],r=2,i=2;i<t;i++){for(;r>1&&Le(e[n[r-2]],e[n[r-1]],e[i])<=0;)--r;n[r++]=i}return n.slice(0,r)}function fi(e,t){return e[0]-t[0]||e[1]-t[1]}(o.geo.stereographic=function(){return Fr(si)}).raw=si,li.invert=function(e,t){return[-t,2*Math.atan(Math.exp(e))-Ie]},(o.geo.transverseMercator=function(){var e=oi(li),t=e.center,n=e.rotate;return e.center=function(e){return e?t([-e[1],e[0]]):[(e=t())[1],-e[0]]},e.rotate=function(e){return e?n([e[0],e[1],e.length>2?e[2]+90:90]):[(e=n())[0],e[1],e[2]-90]},n([0,0,90])}).raw=li,o.geom={},o.geom.hull=function(e){var t=ui,n=ci;if(arguments.length)return r(e);function r(e){if(e.length<3)return[];var r,i=xt(t),o=xt(n),a=e.length,s=[],l=[];for(r=0;r<a;r++)s.push([+i.call(this,e[r],r),+o.call(this,e[r],r),r]);for(s.sort(fi),r=0;r<a;r++)l.push([s[r][0],-s[r][1]]);var u=di(s),c=di(l),d=c[0]===u[0],f=c[c.length-1]===u[u.length-1],p=[];for(r=u.length-1;r>=0;--r)p.push(e[s[u[r]][2]]);for(r=+d;r<c.length-f;++r)p.push(e[s[c[r]][2]]);return p}return r.x=function(e){return arguments.length?(t=e,r):t},r.y=function(e){return arguments.length?(n=e,r):n},r},o.geom.polygon=function(e){return H(e,pi),e};var pi=o.geom.polygon.prototype=[];function hi(e,t,n){return(n[0]-t[0])*(e[1]-t[1])<(n[1]-t[1])*(e[0]-t[0])}function mi(e,t,n,r){var i=e[0],o=n[0],a=t[0]-i,s=r[0]-o,l=e[1],u=n[1],c=t[1]-l,d=r[1]-u,f=(s*(l-u)-d*(i-o))/(d*a-s*c);return[i+f*a,l+f*c]}function gi(e){var t=e[0],n=e[e.length-1];return!(t[0]-n[0]||t[1]-n[1])}pi.area=function(){for(var e,t=-1,n=this.length,r=this[n-1],i=0;++t<n;)e=r,r=this[t],i+=e[1]*r[0]-e[0]*r[1];return.5*i},pi.centroid=function(e){var t,n,r=-1,i=this.length,o=0,a=0,s=this[i-1];for(arguments.length||(e=-1/(6*this.area()));++r<i;)t=s,s=this[r],n=t[0]*s[1]-s[0]*t[1],o+=(t[0]+s[0])*n,a+=(t[1]+s[1])*n;return[o*e,a*e]},pi.clip=function(e){for(var t,n,r,i,o,a,s=gi(e),l=-1,u=this.length-gi(this),c=this[u-1];++l<u;){for(t=e.slice(),e.length=0,i=this[l],o=t[(r=t.length-s)-1],n=-1;++n<r;)hi(a=t[n],c,i)?(hi(o,c,i)||e.push(mi(o,a,c,i)),e.push(a)):hi(o,c,i)&&e.push(mi(o,a,c,i)),o=a;s&&e.push(e[0]),c=i}return e};var vi,yi,bi,xi,wi,_i=[],Si=[];function Ci(){Ui(this),this.edge=this.site=this.circle=null}function Ai(e){var t=_i.pop()||new Ci;return t.site=e,t}function Ti(e){Ni(e),bi.remove(e),_i.push(e),Ui(e)}function Pi(e){var t=e.circle,n=t.x,r=t.cy,i={x:n,y:r},o=e.P,a=e.N,s=[e];Ti(e);for(var l=o;l.circle&&_(n-l.circle.x)<Ee&&_(r-l.circle.cy)<Ee;)o=l.P,s.unshift(l),Ti(l),l=o;s.unshift(l),Ni(l);for(var u=a;u.circle&&_(n-u.circle.x)<Ee&&_(r-u.circle.cy)<Ee;)a=u.N,s.push(u),Ti(u),u=a;s.push(u),Ni(u);var c,d=s.length;for(c=1;c<d;++c)u=s[c],l=s[c-1],ji(u.edge,l.site,u.site,i);l=s[0],(u=s[d-1]).edge=Bi(l.site,u.site,null,i),Ri(l),Ri(u)}function Ei(e){for(var t,n,r,i,o=e.x,a=e.y,s=bi._;s;)if((r=Oi(s,a)-o)>Ee)s=s.L;else{if(!((i=o-Mi(s,a))>Ee)){r>-Ee?(t=s.P,n=s):i>-Ee?(t=s,n=s.N):t=n=s;break}if(!s.R){t=s;break}s=s.R}var l=Ai(e);if(bi.insert(t,l),t||n){if(t===n)return Ni(t),n=Ai(t.site),bi.insert(l,n),l.edge=n.edge=Bi(t.site,l.site),Ri(t),void Ri(n);if(n){Ni(t),Ni(n);var u=t.site,c=u.x,d=u.y,f=e.x-c,p=e.y-d,h=n.site,m=h.x-c,g=h.y-d,v=2*(f*g-p*m),y=f*f+p*p,b=m*m+g*g,x={x:(g*y-p*b)/v+c,y:(f*b-m*y)/v+d};ji(n.edge,u,h,x),l.edge=Bi(u,e,null,x),n.edge=Bi(e,h,null,x),Ri(t),Ri(n)}else l.edge=Bi(t.site,l.site)}}function Oi(e,t){var n=e.site,r=n.x,i=n.y,o=i-t;if(!o)return r;var a=e.P;if(!a)return-1/0;var s=(n=a.site).x,l=n.y,u=l-t;if(!u)return s;var c=s-r,d=1/o-1/u,f=c/u;return d?(-f+Math.sqrt(f*f-2*d*(c*c/(-2*u)-l+u/2+i-o/2)))/d+r:(r+s)/2}function Mi(e,t){var n=e.N;if(n)return Oi(n,t);var r=e.site;return r.y===t?r.x:1/0}function Di(e){this.site=e,this.edges=[]}function ki(e,t){return t.angle-e.angle}function Ii(){Ui(this),this.x=this.y=this.arc=this.site=this.cy=null}function Ri(e){var t=e.P,n=e.N;if(t&&n){var r=t.site,i=e.site,o=n.site;if(r!==o){var a=i.x,s=i.y,l=r.x-a,u=r.y-s,c=o.x-a,d=2*(l*(g=o.y-s)-u*c);if(!(d>=-Oe)){var f=l*l+u*u,p=c*c+g*g,h=(g*f-u*p)/d,m=(l*p-c*f)/d,g=m+s,v=Si.pop()||new Ii;v.arc=e,v.site=i,v.x=h+a,v.y=g+Math.sqrt(h*h+m*m),v.cy=g,e.circle=v;for(var y=null,b=wi._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){y=b.P;break}b=b.L}else{if(!b.R){y=b;break}b=b.R}wi.insert(y,v),y||(xi=v)}}}}function Ni(e){var t=e.circle;t&&(t.P||(xi=t.N),wi.remove(t),Si.push(t),Ui(t),e.circle=null)}function Fi(e,t){var n=e.b;if(n)return!0;var r,i,o=e.a,a=t[0][0],s=t[1][0],l=t[0][1],u=t[1][1],c=e.l,d=e.r,f=c.x,p=c.y,h=d.x,m=d.y,g=(f+h)/2,v=(p+m)/2;if(m===p){if(g<a||g>=s)return;if(f>h){if(o){if(o.y>=u)return}else o={x:g,y:l};n={x:g,y:u}}else{if(o){if(o.y<l)return}else o={x:g,y:u};n={x:g,y:l}}}else if(i=v-(r=(f-h)/(m-p))*g,r<-1||r>1)if(f>h){if(o){if(o.y>=u)return}else o={x:(l-i)/r,y:l};n={x:(u-i)/r,y:u}}else{if(o){if(o.y<l)return}else o={x:(u-i)/r,y:u};n={x:(l-i)/r,y:l}}else if(p<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 e.a=o,e.b=n,!0}function Li(e,t){this.l=e,this.r=t,this.a=this.b=null}function Bi(e,t,n,r){var i=new Li(e,t);return vi.push(i),n&&ji(i,e,t,n),r&&ji(i,t,e,r),yi[e.i].edges.push(new zi(i,e,t)),yi[t.i].edges.push(new zi(i,t,e)),i}function Vi(e,t,n){var r=new Li(e,null);return r.a=t,r.b=n,vi.push(r),r}function ji(e,t,n,r){e.a||e.b?e.l===n?e.b=r:e.a=r:(e.a=r,e.l=t,e.r=n)}function zi(e,t,n){var r=e.a,i=e.b;this.edge=e,this.site=t,this.angle=n?Math.atan2(n.y-t.y,n.x-t.x):e.l===t?Math.atan2(i.x-r.x,r.y-i.y):Math.atan2(r.x-i.x,i.y-r.y)}function Gi(){this._=null}function Ui(e){e.U=e.C=e.L=e.R=e.P=e.N=null}function Wi(e,t){var n=t,r=t.R,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Hi(e,t){var n=t,r=t.L,i=n.U;i?i.L===n?i.L=r:i.R=r:e._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function qi(e){for(;e.L;)e=e.L;return e}function Xi(e,t){var n,r,i,o=e.sort(Ki).pop();for(vi=[],yi=new Array(e.length),bi=new Gi,wi=new Gi;;)if(i=xi,o&&(!i||o.y<i.y||o.y===i.y&&o.x<i.x))o.x===n&&o.y===r||(yi[o.i]=new Di(o),Ei(o),n=o.x,r=o.y),o=e.pop();else{if(!i)break;Pi(i.arc)}t&&(function(e){for(var t,n=vi,r=ur(e[0][0],e[0][1],e[1][0],e[1][1]),i=n.length;i--;)(!Fi(t=n[i],e)||!r(t)||_(t.a.x-t.b.x)<Ee&&_(t.a.y-t.b.y)<Ee)&&(t.a=t.b=null,n.splice(i,1))}(t),function(e){for(var t,n,r,i,o,a,s,l,u,c,d=e[0][0],f=e[1][0],p=e[0][1],h=e[1][1],m=yi,g=m.length;g--;)if((o=m[g])&&o.prepare())for(l=(s=o.edges).length,a=0;a<l;)r=(c=s[a].end()).x,i=c.y,t=(u=s[++a%l].start()).x,n=u.y,(_(r-t)>Ee||_(i-n)>Ee)&&(s.splice(a,0,new zi(Vi(o.site,c,_(r-d)<Ee&&h-i>Ee?{x:d,y:_(t-d)<Ee?n:h}:_(i-h)<Ee&&f-r>Ee?{x:_(n-h)<Ee?t:f,y:h}:_(r-f)<Ee&&i-p>Ee?{x:f,y:_(t-f)<Ee?n:p}:_(i-p)<Ee&&r-d>Ee?{x:_(n-p)<Ee?t:d,y:p}:null),o.site,null)),++l)}(t));var a={cells:yi,edges:vi};return bi=wi=vi=yi=null,a}function Ki(e,t){return t.y-e.y||t.x-e.x}Di.prototype.prepare=function(){for(var e,t=this.edges,n=t.length;n--;)(e=t[n].edge).b&&e.a||t.splice(n,1);return t.sort(ki),t.length},zi.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}},Gi.prototype={insert:function(e,t){var n,r,i;if(e){if(t.P=e,t.N=e.N,e.N&&(e.N.P=t),e.N=t,e.R){for(e=e.R;e.L;)e=e.L;e.L=t}else e.R=t;n=e}else this._?(e=qi(this._),t.P=null,t.N=e,e.P=e.L=t,n=e):(t.P=t.N=null,this._=t,n=null);for(t.L=t.R=null,t.U=n,t.C=!0,e=t;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.R&&(Wi(this,n),n=(e=n).U),n.C=!1,r.C=!0,Hi(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,e=r):(e===n.L&&(Hi(this,n),n=(e=n).U),n.C=!1,r.C=!0,Wi(this,r)),n=e.U;this._.C=!1},remove:function(e){e.N&&(e.N.P=e.P),e.P&&(e.P.N=e.N),e.N=e.P=null;var t,n,r,i=e.U,o=e.L,a=e.R;if(n=o?a?qi(a):o:a,i?i.L===e?i.L=n:i.R=n:this._=n,o&&a?(r=n.C,n.C=e.C,n.L=o,o.U=n,n!==a?(i=n.U,n.U=e.U,e=n.R,i.L=e,n.R=a,a.U=n):(n.U=i,i=n,e=n.R)):(r=e.C,e=n),e&&(e.U=i),!r)if(e&&e.C)e.C=!1;else{do{if(e===this._)break;if(e===i.L){if((t=i.R).C&&(t.C=!1,i.C=!0,Wi(this,i),t=i.R),t.L&&t.L.C||t.R&&t.R.C){t.R&&t.R.C||(t.L.C=!1,t.C=!0,Hi(this,t),t=i.R),t.C=i.C,i.C=t.R.C=!1,Wi(this,i),e=this._;break}}else if((t=i.L).C&&(t.C=!1,i.C=!0,Hi(this,i),t=i.L),t.L&&t.L.C||t.R&&t.R.C){t.L&&t.L.C||(t.R.C=!1,t.C=!0,Wi(this,t),t=i.L),t.C=i.C,i.C=t.L.C=!1,Hi(this,i),e=this._;break}t.C=!0,e=i,i=i.U}while(!e.C);e&&(e.C=!1)}}},o.geom.voronoi=function(e){var t=ui,n=ci,r=t,i=n,o=Zi;if(e)return a(e);function a(e){var t=new Array(e.length),n=o[0][0],r=o[0][1],i=o[1][0],a=o[1][1];return Xi(s(e),o).cells.forEach((function(o,s){var l=o.edges,u=o.site;(t[s]=l.length?l.map((function(e){var t=e.start();return[t.x,t.y]})):u.x>=n&&u.x<=i&&u.y>=r&&u.y<=a?[[n,a],[i,a],[i,r],[n,r]]:[]).point=e[s]})),t}function s(e){return e.map((function(e,t){return{x:Math.round(r(e,t)/Ee)*Ee,y:Math.round(i(e,t)/Ee)*Ee,i:t}}))}return a.links=function(e){return Xi(s(e)).edges.filter((function(e){return e.l&&e.r})).map((function(t){return{source:e[t.l.i],target:e[t.r.i]}}))},a.triangles=function(e){var t=[];return Xi(s(e)).cells.forEach((function(n,r){for(var i,o,a,s,l=n.site,u=n.edges.sort(ki),c=-1,d=u.length,f=u[d-1].edge,p=f.l===l?f.r:f.l;++c<d;)f,i=p,p=(f=u[c].edge).l===l?f.r:f.l,r<i.i&&r<p.i&&(a=i,s=p,((o=l).x-s.x)*(a.y-o.y)-(o.x-a.x)*(s.y-o.y)<0)&&t.push([e[r],e[i.i],e[p.i]])})),t},a.x=function(e){return arguments.length?(r=xt(t=e),a):t},a.y=function(e){return arguments.length?(i=xt(n=e),a):n},a.clipExtent=function(e){return arguments.length?(o=null==e?Zi:e,a):o===Zi?null:o},a.size=function(e){return arguments.length?a.clipExtent(e&&[[0,0],e]):o===Zi?null:o&&o[1]},a};var Zi=[[-1e6,-1e6],[1e6,1e6]];function Yi(e){return e.x}function Ji(e){return e.y}function Qi(e,t,n,r,i,o){if(!e(t,n,r,i,o)){var a=.5*(n+i),s=.5*(r+o),l=t.nodes;l[0]&&Qi(e,l[0],n,r,a,s),l[1]&&Qi(e,l[1],a,r,i,s),l[2]&&Qi(e,l[2],n,s,a,o),l[3]&&Qi(e,l[3],a,s,i,o)}}function $i(e,t,n,r,i,o,a){var s,l=1/0;return function e(u,c,d,f,p){if(!(c>o||d>a||f<r||p<i)){if(h=u.point){var h,m=t-u.x,g=n-u.y,v=m*m+g*g;if(v<l){var y=Math.sqrt(l=v);r=t-y,i=n-y,o=t+y,a=n+y,s=h}}for(var b=u.nodes,x=.5*(c+f),w=.5*(d+p),_=(n>=w)<<1|t>=x,S=_+4;_<S;++_)if(u=b[3&_])switch(3&_){case 0:e(u,c,d,x,w);break;case 1:e(u,x,d,f,w);break;case 2:e(u,c,w,x,p);break;case 3:e(u,x,w,f,p)}}}(e,r,i,o,a),s}function eo(e,t){e=o.rgb(e),t=o.rgb(t);var n=e.r,r=e.g,i=e.b,a=t.r-n,s=t.g-r,l=t.b-i;return function(e){return"#"+pt(Math.round(n+a*e))+pt(Math.round(r+s*e))+pt(Math.round(i+l*e))}}function to(e,t){var n,r={},i={};for(n in e)n in t?r[n]=ao(e[n],t[n]):i[n]=e[n];for(n in t)n in e||(i[n]=t[n]);return function(e){for(n in r)i[n]=r[n](e);return i}}function no(e,t){return e=+e,t=+t,function(n){return e*(1-n)+t*n}}function ro(e,t){var n,r,i,o=io.lastIndex=oo.lastIndex=0,a=-1,s=[],l=[];for(e+="",t+="";(n=io.exec(e))&&(r=oo.exec(t));)(i=r.index)>o&&(i=t.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,l.push({i:a,x:no(n,r)})),o=oo.lastIndex;return o<t.length&&(i=t.slice(o),s[a]?s[a]+=i:s[++a]=i),s.length<2?l[0]?(t=l[0].x,function(e){return t(e)+""}):function(){return t}:(t=l.length,function(e){for(var n,r=0;r<t;++r)s[(n=l[r]).i]=n.x(e);return s.join("")})}o.geom.delaunay=function(e){return o.geom.voronoi().triangles(e)},o.geom.quadtree=function(e,t,n,r,i){var o,a=ui,s=ci;if(o=arguments.length)return a=Yi,s=Ji,3===o&&(i=n,r=t,n=t=0),l(e);function l(e){var l,u,c,d,f,p,h,m,g,v=xt(a),y=xt(s);if(null!=t)p=t,h=n,m=r,g=i;else if(m=g=-(p=h=1/0),u=[],c=[],f=e.length,o)for(d=0;d<f;++d)(l=e[d]).x<p&&(p=l.x),l.y<h&&(h=l.y),l.x>m&&(m=l.x),l.y>g&&(g=l.y),u.push(l.x),c.push(l.y);else for(d=0;d<f;++d){var b=+v(l=e[d],d),x=+y(l,d);b<p&&(p=b),x<h&&(h=x),b>m&&(m=b),x>g&&(g=x),u.push(b),c.push(x)}var w=m-p,S=g-h;function C(e,t,n,r,i,o,a,s){if(!isNaN(n)&&!isNaN(r))if(e.leaf){var l=e.x,u=e.y;if(null!=l)if(_(l-n)+_(u-r)<.01)A(e,t,n,r,i,o,a,s);else{var c=e.point;e.x=e.y=e.point=null,A(e,c,l,u,i,o,a,s),A(e,t,n,r,i,o,a,s)}else e.x=n,e.y=r,e.point=t}else A(e,t,n,r,i,o,a,s)}function A(e,t,n,r,i,o,a,s){var l=.5*(i+a),u=.5*(o+s),c=n>=l,d=r>=u,f=d<<1|c;e.leaf=!1,c?i=l:a=l,d?o=u:s=u,C(e=e.nodes[f]||(e.nodes[f]={leaf:!0,nodes:[],point:null,x:null,y:null}),t,n,r,i,o,a,s)}w>S?g=h+w:m=p+S;var T={leaf:!0,nodes:[],point:null,x:null,y:null,add:function(e){C(T,e,+v(e,++d),+y(e,d),p,h,m,g)},visit:function(e){Qi(e,T,p,h,m,g)},find:function(e){return $i(T,e[0],e[1],p,h,m,g)}};if(d=-1,null==t){for(;++d<f;)C(T,e[d],u[d],c[d],p,h,m,g);--d}else e.forEach(T.add);return u=c=e=l=null,T}return l.x=function(e){return arguments.length?(a=e,l):a},l.y=function(e){return arguments.length?(s=e,l):s},l.extent=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=+e[0][0],n=+e[0][1],r=+e[1][0],i=+e[1][1]),l):null==t?null:[[t,n],[r,i]]},l.size=function(e){return arguments.length?(null==e?t=n=r=i=null:(t=n=0,r=+e[0],i=+e[1]),l):null==t?null:[r-t,i-n]},l},o.interpolateRgb=eo,o.interpolateObject=to,o.interpolateNumber=no,o.interpolateString=ro;var io=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,oo=new RegExp(io.source,"g");function ao(e,t){for(var n,r=o.interpolators.length;--r>=0&&!(n=o.interpolators[r](e,t)););return n}function so(e,t){var n,r=[],i=[],o=e.length,a=t.length,s=Math.min(e.length,t.length);for(n=0;n<s;++n)r.push(ao(e[n],t[n]));for(;n<o;++n)i[n]=e[n];for(;n<a;++n)i[n]=t[n];return function(e){for(n=0;n<s;++n)i[n]=r[n](e);return i}}o.interpolate=ao,o.interpolators=[function(e,t){var n=typeof t;return("string"===n?bt.has(t.toLowerCase())||/^(#|rgb\(|hsl\()/i.test(t)?eo:ro:t instanceof qe?eo:Array.isArray(t)?so:"object"===n&&isNaN(t)?to:no)(e,t)}],o.interpolateArray=so;var lo=function(){return R},uo=o.map({linear:lo,poly:function(e){return function(t){return Math.pow(t,e)}},quad:function(){return mo},cubic:function(){return go},sin:function(){return yo},exp:function(){return bo},circle:function(){return xo},elastic:function(e,t){var n;arguments.length<2&&(t=.45);arguments.length?n=t/De*Math.asin(1/e):(e=1,n=t/4);return function(r){return 1+e*Math.pow(2,-10*r)*Math.sin((r-n)*De/t)}},back:function(e){e||(e=1.70158);return function(t){return t*t*((e+1)*t-e)}},bounce:function(){return wo}}),co=o.map({in:R,out:po,"in-out":ho,"out-in":function(e){return ho(po(e))}});function fo(e){return function(t){return t<=0?0:t>=1?1:e(t)}}function po(e){return function(t){return 1-e(1-t)}}function ho(e){return function(t){return.5*(t<.5?e(2*t):2-e(2-2*t))}}function mo(e){return e*e}function go(e){return e*e*e}function vo(e){if(e<=0)return 0;if(e>=1)return 1;var t=e*e,n=t*e;return 4*(e<.5?n:3*(e-t)+n-.75)}function yo(e){return 1-Math.cos(e*Ie)}function bo(e){return Math.pow(2,10*(e-1))}function xo(e){return 1-Math.sqrt(1-e*e)}function wo(e){return e<1/2.75?7.5625*e*e:e<2/2.75?7.5625*(e-=1.5/2.75)*e+.75:e<2.5/2.75?7.5625*(e-=2.25/2.75)*e+.9375:7.5625*(e-=2.625/2.75)*e+.984375}function _o(e,t){return t-=e,function(n){return Math.round(e+t*n)}}function So(e){var t,n,r,i=[e.a,e.b],o=[e.c,e.d],a=Ao(i),s=Co(i,o),l=Ao(((t=o)[0]+=(r=-s)*(n=i)[0],t[1]+=r*n[1],t))||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]))*Ne,this.translate=[e.e,e.f],this.scale=[a,l],this.skew=l?Math.atan2(s,l)*Ne:0}function Co(e,t){return e[0]*t[0]+e[1]*t[1]}function Ao(e){var t=Math.sqrt(Co(e,e));return t&&(e[0]/=t,e[1]/=t),t}o.ease=function(e){var t=e.indexOf("-"),n=t>=0?e.slice(0,t):e,r=t>=0?e.slice(t+1):"in";return n=uo.get(n)||lo,fo((r=co.get(r)||R)(n.apply(null,a.call(arguments,1))))},o.interpolateHcl=function(e,t){e=o.hcl(e),t=o.hcl(t);var n=e.h,r=e.c,i=e.l,a=t.h-n,s=t.c-r,l=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.c:r);isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360);return function(e){return Qe(n+a*e,r+s*e,i+l*e)+""}},o.interpolateHsl=function(e,t){e=o.hsl(e),t=o.hsl(t);var n=e.h,r=e.s,i=e.l,a=t.h-n,s=t.s-r,l=t.l-i;isNaN(s)&&(s=0,r=isNaN(r)?t.s:r);isNaN(a)?(a=0,n=isNaN(n)?t.h:n):a>180?a-=360:a<-180&&(a+=360);return function(e){return Ze(n+a*e,r+s*e,i+l*e)+""}},o.interpolateLab=function(e,t){e=o.lab(e),t=o.lab(t);var n=e.l,r=e.a,i=e.b,a=t.l-n,s=t.a-r,l=t.b-i;return function(e){return it(n+a*e,r+s*e,i+l*e)+""}},o.interpolateRound=_o,o.transform=function(e){var t=l.createElementNS(o.ns.prefix.svg,"g");return(o.transform=function(e){if(null!=e){t.setAttribute("transform",e);var n=t.transform.baseVal.consolidate()}return new So(n?n.matrix:To)})(e)},So.prototype.toString=function(){return"translate("+this.translate+")rotate("+this.rotate+")skewX("+this.skew+")scale("+this.scale+")"};var To={a:1,b:0,c:0,d:1,e:0,f:0};function Po(e){return e.length?e.pop()+",":""}function Eo(e,t){var n=[],r=[];return e=o.transform(e),t=o.transform(t),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push("translate(",null,",",null,")");r.push({i:i-4,x:no(e[0],t[0])},{i:i-2,x:no(e[1],t[1])})}else(t[0]||t[1])&&n.push("translate("+t+")")}(e.translate,t.translate,n,r),function(e,t,n,r){e!==t?(e-t>180?t+=360:t-e>180&&(e+=360),r.push({i:n.push(Po(n)+"rotate(",null,")")-2,x:no(e,t)})):t&&n.push(Po(n)+"rotate("+t+")")}(e.rotate,t.rotate,n,r),function(e,t,n,r){e!==t?r.push({i:n.push(Po(n)+"skewX(",null,")")-2,x:no(e,t)}):t&&n.push(Po(n)+"skewX("+t+")")}(e.skew,t.skew,n,r),function(e,t,n,r){if(e[0]!==t[0]||e[1]!==t[1]){var i=n.push(Po(n)+"scale(",null,",",null,")");r.push({i:i-4,x:no(e[0],t[0])},{i:i-2,x:no(e[1],t[1])})}else 1===t[0]&&1===t[1]||n.push(Po(n)+"scale("+t+")")}(e.scale,t.scale,n,r),e=t=null,function(e){for(var t,i=-1,o=r.length;++i<o;)n[(t=r[i]).i]=t.x(e);return n.join("")}}function Oo(e,t){return t=(t-=e=+e)||1/t,function(n){return(n-e)/t}}function Mo(e,t){return t=(t-=e=+e)||1/t,function(n){return Math.max(0,Math.min(1,(n-e)/t))}}function Do(e){for(var t=e.source,n=e.target,r=function(e,t){if(e===t)return e;var n=ko(e),r=ko(t),i=n.pop(),o=r.pop(),a=null;for(;i===o;)a=i,i=n.pop(),o=r.pop();return a}(t,n),i=[t];t!==r;)t=t.parent,i.push(t);for(var o=i.length;n!==r;)i.splice(o,0,n),n=n.parent;return i}function ko(e){for(var t=[],n=e.parent;null!=n;)t.push(e),e=n,n=n.parent;return t.push(e),t}function Io(e){e.fixed|=2}function Ro(e){e.fixed&=-7}function No(e){e.fixed|=4,e.px=e.x,e.py=e.y}function Fo(e){e.fixed&=-5}function Lo(e,t,n){var r=0,i=0;if(e.charge=0,!e.leaf)for(var o,a=e.nodes,s=a.length,l=-1;++l<s;)null!=(o=a[l])&&(Lo(o,t,n),e.charge+=o.charge,r+=o.charge*o.cx,i+=o.charge*o.cy);if(e.point){e.leaf||(e.point.x+=Math.random()-.5,e.point.y+=Math.random()-.5);var u=t*n[e.point.index];e.charge+=e.pointCharge=u,r+=u*e.point.x,i+=u*e.point.y}e.cx=r/e.charge,e.cy=i/e.charge}o.interpolateTransform=Eo,o.layout={},o.layout.bundle=function(){return function(e){for(var t=[],n=-1,r=e.length;++n<r;)t.push(Do(e[n]));return t}},o.layout.chord=function(){var e,t,n,r,i,a,s,l={},u=0;function c(){var l,c,f,p,h,m={},g=[],v=o.range(r),y=[];for(e=[],t=[],l=0,p=-1;++p<r;){for(c=0,h=-1;++h<r;)c+=n[p][h];g.push(c),y.push(o.range(r)),l+=c}for(i&&v.sort((function(e,t){return i(g[e],g[t])})),a&&y.forEach((function(e,t){e.sort((function(e,r){return a(n[t][e],n[t][r])}))})),l=(De-u*r)/l,c=0,p=-1;++p<r;){for(f=c,h=-1;++h<r;){var b=v[p],x=y[b][h],w=n[b][x],_=c,S=c+=w*l;m[b+"-"+x]={index:b,subindex:x,startAngle:_,endAngle:S,value:w}}t[b]={index:b,startAngle:f,endAngle:c,value:g[b]},c+=u}for(p=-1;++p<r;)for(h=p-1;++h<r;){var C=m[p+"-"+h],A=m[h+"-"+p];(C.value||A.value)&&e.push(C.value<A.value?{source:A,target:C}:{source:C,target:A})}s&&d()}function d(){e.sort((function(e,t){return s((e.source.value+e.target.value)/2,(t.source.value+t.target.value)/2)}))}return l.matrix=function(i){return arguments.length?(r=(n=i)&&n.length,e=t=null,l):n},l.padding=function(n){return arguments.length?(u=n,e=t=null,l):u},l.sortGroups=function(n){return arguments.length?(i=n,e=t=null,l):i},l.sortSubgroups=function(t){return arguments.length?(a=t,e=null,l):a},l.sortChords=function(t){return arguments.length?(s=t,e&&d(),l):s},l.chords=function(){return e||c(),e},l.groups=function(){return t||c(),t},l},o.layout.force=function(){var e,t,n,r,i,a,s={},l=o.dispatch("start","tick","end"),u=[1,1],c=.9,d=Bo,f=Vo,p=-30,h=jo,m=.1,g=.64,v=[],y=[];function b(e){return function(t,n,r,i){if(t.point!==e){var o=t.cx-e.x,a=t.cy-e.y,s=i-n,l=o*o+a*a;if(s*s/g<l){if(l<h){var u=t.charge/l;e.px-=o*u,e.py-=a*u}return!0}if(t.point&&l&&l<h){u=t.pointCharge/l;e.px-=o*u,e.py-=a*u}}return!t.charge}}function x(e){e.px=o.event.x,e.py=o.event.y,s.resume()}return s.tick=function(){if((n*=.99)<.005)return e=null,l.end({type:"end",alpha:n=0}),!0;var t,s,d,f,h,g,x,w,_,S=v.length,C=y.length;for(s=0;s<C;++s)f=(d=y[s]).source,(g=(w=(h=d.target).x-f.x)*w+(_=h.y-f.y)*_)&&(w*=g=n*i[s]*((g=Math.sqrt(g))-r[s])/g,_*=g,h.x-=w*(x=f.weight+h.weight?f.weight/(f.weight+h.weight):.5),h.y-=_*x,f.x+=w*(x=1-x),f.y+=_*x);if((x=n*m)&&(w=u[0]/2,_=u[1]/2,s=-1,x))for(;++s<S;)(d=v[s]).x+=(w-d.x)*x,d.y+=(_-d.y)*x;if(p)for(Lo(t=o.geom.quadtree(v),n,a),s=-1;++s<S;)(d=v[s]).fixed||t.visit(b(d));for(s=-1;++s<S;)(d=v[s]).fixed?(d.x=d.px,d.y=d.py):(d.x-=(d.px-(d.px=d.x))*c,d.y-=(d.py-(d.py=d.y))*c);l.tick({type:"tick",alpha:n})},s.nodes=function(e){return arguments.length?(v=e,s):v},s.links=function(e){return arguments.length?(y=e,s):y},s.size=function(e){return arguments.length?(u=e,s):u},s.linkDistance=function(e){return arguments.length?(d="function"==typeof e?e:+e,s):d},s.distance=s.linkDistance,s.linkStrength=function(e){return arguments.length?(f="function"==typeof e?e:+e,s):f},s.friction=function(e){return arguments.length?(c=+e,s):c},s.charge=function(e){return arguments.length?(p="function"==typeof e?e:+e,s):p},s.chargeDistance=function(e){return arguments.length?(h=e*e,s):Math.sqrt(h)},s.gravity=function(e){return arguments.length?(m=+e,s):m},s.theta=function(e){return arguments.length?(g=e*e,s):Math.sqrt(g)},s.alpha=function(t){return arguments.length?(t=+t,n?t>0?n=t:(e.c=null,e.t=NaN,e=null,l.end({type:"end",alpha:n=0})):t>0&&(l.start({type:"start",alpha:n=t}),e=Et(s.tick)),s):n},s.start=function(){var e,t,n,o=v.length,l=y.length,c=u[0],h=u[1];for(e=0;e<o;++e)(n=v[e]).index=e,n.weight=0;for(e=0;e<l;++e)"number"==typeof(n=y[e]).source&&(n.source=v[n.source]),"number"==typeof n.target&&(n.target=v[n.target]),++n.source.weight,++n.target.weight;for(e=0;e<o;++e)n=v[e],isNaN(n.x)&&(n.x=m("x",c)),isNaN(n.y)&&(n.y=m("y",h)),isNaN(n.px)&&(n.px=n.x),isNaN(n.py)&&(n.py=n.y);if(r=[],"function"==typeof d)for(e=0;e<l;++e)r[e]=+d.call(this,y[e],e);else for(e=0;e<l;++e)r[e]=d;if(i=[],"function"==typeof f)for(e=0;e<l;++e)i[e]=+f.call(this,y[e],e);else for(e=0;e<l;++e)i[e]=f;if(a=[],"function"==typeof p)for(e=0;e<o;++e)a[e]=+p.call(this,v[e],e);else for(e=0;e<o;++e)a[e]=p;function m(n,r){if(!t){for(t=new Array(o),u=0;u<o;++u)t[u]=[];for(u=0;u<l;++u){var i=y[u];t[i.source.index].push(i.target),t[i.target.index].push(i.source)}}for(var a,s=t[e],u=-1,c=s.length;++u<c;)if(!isNaN(a=s[u][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(t||(t=o.behavior.drag().origin(R).on("dragstart.force",Io).on("drag.force",x).on("dragend.force",Ro)),!arguments.length)return t;this.on("mouseover.force",No).on("mouseout.force",Fo).call(t)},o.rebind(s,l,"on")};var Bo=20,Vo=1,jo=1/0;function zo(e,t){return o.rebind(e,t,"sort","children","value"),e.nodes=e,e.links=Xo,e}function Go(e,t){for(var n=[e];null!=(e=n.pop());)if(t(e),(i=e.children)&&(r=i.length))for(var r,i;--r>=0;)n.push(i[r])}function Uo(e,t){for(var n=[e],r=[];null!=(e=n.pop());)if(r.push(e),(o=e.children)&&(i=o.length))for(var i,o,a=-1;++a<i;)n.push(o[a]);for(;null!=(e=r.pop());)t(e)}function Wo(e){return e.children}function Ho(e){return e.value}function qo(e,t){return t.value-e.value}function Xo(e){return o.merge(e.map((function(e){return(e.children||[]).map((function(t){return{source:e,target:t}}))})))}o.layout.hierarchy=function(){var e=qo,t=Wo,n=Ho;function r(i){var o,a=[i],s=[];for(i.depth=0;null!=(o=a.pop());)if(s.push(o),(u=t.call(r,o,o.depth))&&(l=u.length)){for(var l,u,c;--l>=0;)a.push(c=u[l]),c.parent=o,c.depth=o.depth+1;n&&(o.value=0),o.children=u}else n&&(o.value=+n.call(r,o,o.depth)||0),delete o.children;return Uo(i,(function(t){var r,i;e&&(r=t.children)&&r.sort(e),n&&(i=t.parent)&&(i.value+=t.value)})),s}return r.sort=function(t){return arguments.length?(e=t,r):e},r.children=function(e){return arguments.length?(t=e,r):t},r.value=function(e){return arguments.length?(n=e,r):n},r.revalue=function(e){return n&&(Go(e,(function(e){e.children&&(e.value=0)})),Uo(e,(function(e){var t;e.children||(e.value=+n.call(r,e,e.depth)||0),(t=e.parent)&&(t.value+=e.value)}))),e},r},o.layout.partition=function(){var e=o.layout.hierarchy(),t=[1,1];function n(e,t,r,i){var o=e.children;if(e.x=t,e.y=e.depth*i,e.dx=r,e.dy=i,o&&(a=o.length)){var a,s,l,u=-1;for(r=e.value?r/e.value:0;++u<a;)n(s=o[u],t,l=s.value*r,i),t+=l}}function r(e){var t=e.children,n=0;if(t&&(i=t.length))for(var i,o=-1;++o<i;)n=Math.max(n,r(t[o]));return 1+n}function i(i,o){var a=e.call(this,i,o);return n(a[0],0,t[0],t[1]/r(a[0])),a}return i.size=function(e){return arguments.length?(t=e,i):t},zo(i,e)},o.layout.pie=function(){var e=Number,t=Ko,n=0,r=De,i=0;function a(s){var l,u=s.length,c=s.map((function(t,n){return+e.call(a,t,n)})),d=+("function"==typeof n?n.apply(this,arguments):n),f=("function"==typeof r?r.apply(this,arguments):r)-d,p=Math.min(Math.abs(f)/u,+("function"==typeof i?i.apply(this,arguments):i)),h=p*(f<0?-1:1),m=o.sum(c),g=m?(f-u*h)/m:0,v=o.range(u),y=[];return null!=t&&v.sort(t===Ko?function(e,t){return c[t]-c[e]}:function(e,n){return t(s[e],s[n])}),v.forEach((function(e){y[e]={data:s[e],value:l=c[e],startAngle:d,endAngle:d+=l*g+h,padAngle:p}})),y}return a.value=function(t){return arguments.length?(e=t,a):e},a.sort=function(e){return arguments.length?(t=e,a):t},a.startAngle=function(e){return arguments.length?(n=e,a):n},a.endAngle=function(e){return arguments.length?(r=e,a):r},a.padAngle=function(e){return arguments.length?(i=e,a):i},a};var Ko={};function Zo(e){return e.x}function Yo(e){return e.y}function Jo(e,t,n){e.y0=t,e.y=n}o.layout.stack=function(){var e=R,t=ea,n=ta,r=Jo,i=Zo,a=Yo;function s(l,u){if(!(p=l.length))return l;var c=l.map((function(t,n){return e.call(s,t,n)})),d=c.map((function(e){return e.map((function(e,t){return[i.call(s,e,t),a.call(s,e,t)]}))})),f=t.call(s,d,u);c=o.permute(c,f),d=o.permute(d,f);var p,h,m,g,v=n.call(s,d,u),y=c[0].length;for(m=0;m<y;++m)for(r.call(s,c[0][m],g=v[m],d[0][m][1]),h=1;h<p;++h)r.call(s,c[h][m],g+=d[h-1][m][1],d[h][m][1]);return l}return s.values=function(t){return arguments.length?(e=t,s):e},s.order=function(e){return arguments.length?(t="function"==typeof e?e:Qo.get(e)||ea,s):t},s.offset=function(e){return arguments.length?(n="function"==typeof e?e:$o.get(e)||ta,s):n},s.x=function(e){return arguments.length?(i=e,s):i},s.y=function(e){return arguments.length?(a=e,s):a},s.out=function(e){return arguments.length?(r=e,s):r},s};var Qo=o.map({"inside-out":function(e){var t,n,r=e.length,i=e.map(na),a=e.map(ra),s=o.range(r).sort((function(e,t){return i[e]-i[t]})),l=0,u=0,c=[],d=[];for(t=0;t<r;++t)n=s[t],l<u?(l+=a[n],c.push(n)):(u+=a[n],d.push(n));return d.reverse().concat(c)},reverse:function(e){return o.range(e.length).reverse()},default:ea}),$o=o.map({silhouette:function(e){var t,n,r,i=e.length,o=e[0].length,a=[],s=0,l=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];r>s&&(s=r),a.push(r)}for(n=0;n<o;++n)l[n]=(s-a[n])/2;return l},wiggle:function(e){var t,n,r,i,o,a,s,l,u,c=e.length,d=e[0],f=d.length,p=[];for(p[0]=l=u=0,n=1;n<f;++n){for(t=0,i=0;t<c;++t)i+=e[t][n][1];for(t=0,o=0,s=d[n][0]-d[n-1][0];t<c;++t){for(r=0,a=(e[t][n][1]-e[t][n-1][1])/(2*s);r<t;++r)a+=(e[r][n][1]-e[r][n-1][1])/s;o+=a*e[t][n][1]}p[n]=l-=i?o/i*s:0,l<u&&(u=l)}for(n=0;n<f;++n)p[n]-=u;return p},expand:function(e){var t,n,r,i=e.length,o=e[0].length,a=1/i,s=[];for(n=0;n<o;++n){for(t=0,r=0;t<i;t++)r+=e[t][n][1];if(r)for(t=0;t<i;t++)e[t][n][1]/=r;else for(t=0;t<i;t++)e[t][n][1]=a}for(n=0;n<o;++n)s[n]=0;return s},zero:ta});function ea(e){return o.range(e.length)}function ta(e){for(var t=-1,n=e[0].length,r=[];++t<n;)r[t]=0;return r}function na(e){for(var t,n=1,r=0,i=e[0][1],o=e.length;n<o;++n)(t=e[n][1])>i&&(r=n,i=t);return r}function ra(e){return e.reduce(ia,0)}function ia(e,t){return e+t[1]}function oa(e,t){return aa(e,Math.ceil(Math.log(t.length)/Math.LN2+1))}function aa(e,t){for(var n=-1,r=+e[0],i=(e[1]-r)/t,o=[];++n<=t;)o[n]=i*n+r;return o}function sa(e){return[o.min(e),o.max(e)]}function la(e,t){return e.value-t.value}function ua(e,t){var n=e._pack_next;e._pack_next=t,t._pack_prev=e,t._pack_next=n,n._pack_prev=t}function ca(e,t){e._pack_next=t,t._pack_prev=e}function da(e,t){var n=t.x-e.x,r=t.y-e.y,i=e.r+t.r;return.999*i*i>n*n+r*r}function fa(e){if((t=e.children)&&(l=t.length)){var t,n,r,i,o,a,s,l,u=1/0,c=-1/0,d=1/0,f=-1/0;if(t.forEach(pa),(n=t[0]).x=-n.r,n.y=0,b(n),l>1&&((r=t[1]).x=r.r,r.y=0,b(r),l>2))for(ga(n,r,i=t[2]),b(i),ua(n,i),n._pack_prev=i,ua(i,r),r=n._pack_next,o=3;o<l;o++){ga(n,r,i=t[o]);var p=0,h=1,m=1;for(a=r._pack_next;a!==r;a=a._pack_next,h++)if(da(a,i)){p=1;break}if(1==p)for(s=n._pack_prev;s!==a._pack_prev&&!da(s,i);s=s._pack_prev,m++);p?(h<m||h==m&&r.r<n.r?ca(n,r=a):ca(n=s,r),o--):(ua(n,i),r=i,b(i))}var g=(u+c)/2,v=(d+f)/2,y=0;for(o=0;o<l;o++)(i=t[o]).x-=g,i.y-=v,y=Math.max(y,i.r+Math.sqrt(i.x*i.x+i.y*i.y));e.r=y,t.forEach(ha)}function b(e){u=Math.min(e.x-e.r,u),c=Math.max(e.x+e.r,c),d=Math.min(e.y-e.r,d),f=Math.max(e.y+e.r,f)}}function pa(e){e._pack_next=e._pack_prev=e}function ha(e){delete e._pack_next,delete e._pack_prev}function ma(e,t,n,r){var i=e.children;if(e.x=t+=r*e.x,e.y=n+=r*e.y,e.r*=r,i)for(var o=-1,a=i.length;++o<a;)ma(i[o],t,n,r)}function ga(e,t,n){var r=e.r+n.r,i=t.x-e.x,o=t.y-e.y;if(r&&(i||o)){var a=t.r+n.r,s=i*i+o*o,l=.5+((r*=r)-(a*=a))/(2*s),u=Math.sqrt(Math.max(0,2*a*(r+s)-(r-=s)*r-a*a))/(2*s);n.x=e.x+l*i+u*o,n.y=e.y+l*o-u*i}else n.x=e.x+r,n.y=e.y}function va(e,t){return e.parent==t.parent?1:2}function ya(e){var t=e.children;return t.length?t[0]:e.t}function ba(e){var t,n=e.children;return(t=n.length)?n[t-1]:e.t}function xa(e,t,n){var r=n/(t.i-e.i);t.c-=r,t.s+=n,e.c+=r,t.z+=n,t.m+=n}function wa(e,t,n){return e.a.parent===t.parent?e.a:n}function _a(e){var t=e.children;return t&&t.length?_a(t[0]):e}function Sa(e){var t,n=e.children;return n&&(t=n.length)?Sa(n[t-1]):e}function Ca(e){return{x:e.x,y:e.y,dx:e.dx,dy:e.dy}}function Aa(e,t){var n=e.x+t[3],r=e.y+t[0],i=e.dx-t[1]-t[3],o=e.dy-t[0]-t[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 Ta(e){var t=e[0],n=e[e.length-1];return t<n?[t,n]:[n,t]}function Pa(e){return e.rangeExtent?e.rangeExtent():Ta(e.range())}function Ea(e,t,n,r){var i=n(e[0],e[1]),o=r(t[0],t[1]);return function(e){return o(i(e))}}function Oa(e,t){var n,r=0,i=e.length-1,o=e[r],a=e[i];return a<o&&(n=r,r=i,i=n,n=o,o=a,a=n),e[r]=t.floor(o),e[i]=t.ceil(a),e}function Ma(e){return e?{floor:function(t){return Math.floor(t/e)*e},ceil:function(t){return Math.ceil(t/e)*e}}:Da}o.layout.histogram=function(){var e=!0,t=Number,n=sa,r=oa;function i(i,a){for(var s,l,u=[],c=i.map(t,this),d=n.call(this,c,a),f=r.call(this,d,c,a),p=(a=-1,c.length),h=f.length-1,m=e?1:1/p;++a<h;)(s=u[a]=[]).dx=f[a+1]-(s.x=f[a]),s.y=0;if(h>0)for(a=-1;++a<p;)(l=c[a])>=d[0]&&l<=d[1]&&((s=u[o.bisect(f,l,1,h)-1]).y+=m,s.push(i[a]));return u}return i.value=function(e){return arguments.length?(t=e,i):t},i.range=function(e){return arguments.length?(n=xt(e),i):n},i.bins=function(e){return arguments.length?(r="number"==typeof e?function(t){return aa(t,e)}:xt(e),i):r},i.frequency=function(t){return arguments.length?(e=!!t,i):e},i},o.layout.pack=function(){var e,t=o.layout.hierarchy().sort(la),n=0,r=[1,1];function i(i,o){var a=t.call(this,i,o),s=a[0],l=r[0],u=r[1],c=null==e?Math.sqrt:"function"==typeof e?e:function(){return e};if(s.x=s.y=0,Uo(s,(function(e){e.r=+c(e.value)})),Uo(s,fa),n){var d=n*(e?1:Math.max(2*s.r/l,2*s.r/u))/2;Uo(s,(function(e){e.r+=d})),Uo(s,fa),Uo(s,(function(e){e.r-=d}))}return ma(s,l/2,u/2,e?1:1/Math.max(2*s.r/l,2*s.r/u)),a}return i.size=function(e){return arguments.length?(r=e,i):r},i.radius=function(t){return arguments.length?(e=null==t||"function"==typeof t?t:+t,i):e},i.padding=function(e){return arguments.length?(n=+e,i):n},zo(i,t)},o.layout.tree=function(){var e=o.layout.hierarchy().sort(null).value(null),t=va,n=[1,1],r=null;function i(i,o){var u=e.call(this,i,o),c=u[0],d=function(e){var t,n={A:null,children:[e]},r=[n];for(;null!=(t=r.pop());)for(var i,o=t.children,a=0,s=o.length;a<s;++a)r.push((o[a]=i={_:o[a],parent:t,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(Uo(d,a),d.parent.m=-d.z,Go(d,s),r)Go(c,l);else{var f=c,p=c,h=c;Go(c,(function(e){e.x<f.x&&(f=e),e.x>p.x&&(p=e),e.depth>h.depth&&(h=e)}));var m=t(f,p)/2-f.x,g=n[0]/(p.x+t(p,f)/2+m),v=n[1]/(h.depth||1);Go(c,(function(e){e.x=(e.x+m)*g,e.y=e.depth*v}))}return u}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n.length){!function(e){var t,n=0,r=0,i=e.children,o=i.length;for(;--o>=0;)(t=i[o]).z+=n,t.m+=n,n+=t.s+(r+=t.c)}(e);var o=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-o):e.z=o}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,o=e,a=e,s=n,l=o.parent.children[0],u=o.m,c=a.m,d=s.m,f=l.m;s=ba(s),o=ya(o),s&&o;)l=ya(l),(a=ba(a)).a=e,(i=s.z+d-o.z-u+t(s._,o._))>0&&(xa(wa(s,e,r),e,i),u+=i,c+=i),d+=s.m,u+=o.m,f+=l.m,c+=a.m;s&&!ba(a)&&(a.t=s,a.m+=d-c),o&&!ya(l)&&(l.t=o,l.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function s(e){e._.x=e.z+e.parent.m,e.m+=e.parent.m}function l(e){e.x*=n[0],e.y=e.depth*n[1]}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e)?l:null,i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null==(n=e)?null:l,i):r?n:null},zo(i,e)},o.layout.cluster=function(){var e=o.layout.hierarchy().sort(null).value(null),t=va,n=[1,1],r=!1;function i(i,a){var s,l=e.call(this,i,a),u=l[0],c=0;Uo(u,(function(e){var n=e.children;n&&n.length?(e.x=function(e){return e.reduce((function(e,t){return e+t.x}),0)/e.length}(n),e.y=function(e){return 1+o.max(e,(function(e){return e.y}))}(n)):(e.x=s?c+=t(e,s):0,e.y=0,s=e)}));var d=_a(u),f=Sa(u),p=d.x-t(d,f)/2,h=f.x+t(f,d)/2;return Uo(u,r?function(e){e.x=(e.x-u.x)*n[0],e.y=(u.y-e.y)*n[1]}:function(e){e.x=(e.x-p)/(h-p)*n[0],e.y=(1-(u.y?e.y/u.y:1))*n[1]}),l}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(e){return arguments.length?(r=null==(n=e),i):r?null:n},i.nodeSize=function(e){return arguments.length?(r=null!=(n=e),i):r?n:null},zo(i,e)},o.layout.treemap=function(){var e,t=o.layout.hierarchy(),n=Math.round,r=[1,1],i=null,a=Ca,s=!1,l="squarify",u=.5*(1+Math.sqrt(5));function c(e,t){for(var n,r,i=-1,o=e.length;++i<o;)r=(n=e[i]).value*(t<0?0:t),n.area=isNaN(r)||r<=0?0:r}function d(e){var t=e.children;if(t&&t.length){var n,r,i,o=a(e),s=[],u=t.slice(),f=1/0,m="slice"===l?o.dx:"dice"===l?o.dy:"slice-dice"===l?1&e.depth?o.dy:o.dx:Math.min(o.dx,o.dy);for(c(u,o.dx*o.dy/e.value),s.area=0;(i=u.length)>0;)s.push(n=u[i-1]),s.area+=n.area,"squarify"!==l||(r=p(s,m))<=f?(u.pop(),f=r):(s.area-=s.pop().area,h(s,m,o,!1),m=Math.min(o.dx,o.dy),s.length=s.area=0,f=1/0);s.length&&(h(s,m,o,!0),s.length=s.area=0),t.forEach(d)}}function f(e){var t=e.children;if(t&&t.length){var n,r=a(e),i=t.slice(),o=[];for(c(i,r.dx*r.dy/e.value),o.area=0;n=i.pop();)o.push(n),o.area+=n.area,null!=n.z&&(h(o,n.z?r.dx:r.dy,r,!i.length),o.length=o.area=0);t.forEach(f)}}function p(e,t){for(var n,r=e.area,i=0,o=1/0,a=-1,s=e.length;++a<s;)(n=e[a].area)&&(n<o&&(o=n),n>i&&(i=n));return t*=t,(r*=r)?Math.max(t*i*u/r,r/(t*o*u)):1/0}function h(e,t,r,i){var o,a=-1,s=e.length,l=r.x,u=r.y,c=t?n(e.area/t):0;if(t==r.dx){for((i||c>r.dy)&&(c=r.dy);++a<s;)(o=e[a]).x=l,o.y=u,o.dy=c,l+=o.dx=Math.min(r.x+r.dx-l,c?n(o.area/c):0);o.z=!0,o.dx+=r.x+r.dx-l,r.y+=c,r.dy-=c}else{for((i||c>r.dx)&&(c=r.dx);++a<s;)(o=e[a]).x=l,o.y=u,o.dx=c,u+=o.dy=Math.min(r.y+r.dy-u,c?n(o.area/c):0);o.z=!1,o.dy+=r.y+r.dy-u,r.x+=c,r.dx-=c}}function m(n){var i=e||t(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,e&&t.revalue(o),c([o],o.dx*o.dy/o.value),(e?f:d)(o),s&&(e=i),i}return m.size=function(e){return arguments.length?(r=e,m):r},m.padding=function(e){if(!arguments.length)return i;function t(t){var n=e.call(m,t,t.depth);return null==n?Ca(t):Aa(t,"number"==typeof n?[n,n,n,n]:n)}function n(t){return Aa(t,e)}var r;return a=null==(i=e)?Ca:"function"==(r=typeof e)?t:"number"===r?(e=[e,e,e,e],n):n,m},m.round=function(e){return arguments.length?(n=e?Math.round:Number,m):n!=Number},m.sticky=function(t){return arguments.length?(s=t,e=null,m):s},m.ratio=function(e){return arguments.length?(u=e,m):u},m.mode=function(e){return arguments.length?(l=e+"",m):l},zo(m,t)},o.random={normal:function(e,t){var n=arguments.length;return n<2&&(t=1),n<1&&(e=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 e+t*n*Math.sqrt(-2*Math.log(i)/i)}},logNormal:function(){var e=o.random.normal.apply(o,arguments);return function(){return Math.exp(e())}},bates:function(e){var t=o.random.irwinHall(e);return function(){return t()/e}},irwinHall:function(e){return function(){for(var t=0,n=0;n<e;n++)t+=Math.random();return t}}},o.scale={};var Da={floor:R,ceil:R};function ka(e,t,n,r){var i=[],a=[],s=0,l=Math.min(e.length,t.length)-1;for(e[l]<e[0]&&(e=e.slice().reverse(),t=t.slice().reverse());++s<=l;)i.push(n(e[s-1],e[s])),a.push(r(t[s-1],t[s]));return function(t){var n=o.bisect(e,t,1,l)-1;return a[n](i[n](t))}}function Ia(e,t,n,r){var i,o;function a(){var a=Math.min(e.length,t.length)>2?ka:Ea,l=r?Mo:Oo;return i=a(e,t,l,n),o=a(t,e,l,ao),s}function s(e){return i(e)}return s.invert=function(e){return o(e)},s.domain=function(t){return arguments.length?(e=t.map(Number),a()):e},s.range=function(e){return arguments.length?(t=e,a()):t},s.rangeRound=function(e){return s.range(e).interpolate(_o)},s.clamp=function(e){return arguments.length?(r=e,a()):r},s.interpolate=function(e){return arguments.length?(n=e,a()):n},s.ticks=function(t){return La(e,t)},s.tickFormat=function(t,n){return Ba(e,t,n)},s.nice=function(t){return Na(e,t),a()},s.copy=function(){return Ia(e,t,n,r)},a()}function Ra(e,t){return o.rebind(e,t,"range","rangeRound","interpolate","clamp")}function Na(e,t){return Oa(e,Ma(Fa(e,t)[2])),Oa(e,Ma(Fa(e,t)[2])),e}function Fa(e,t){null==t&&(t=10);var n=Ta(e),r=n[1]-n[0],i=Math.pow(10,Math.floor(Math.log(r/t)/Math.LN10)),o=t/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 La(e,t){return o.range.apply(o,Fa(e,t))}function Ba(e,t,n){var r=Fa(e,t);if(n){var i=Nt.exec(n);if(i.shift(),"s"===i[8]){var a=o.formatPrefix(Math.max(_(r[0]),_(r[1])));return i[7]||(i[7]="."+ja(a.scale(r[2]))),i[8]="f",n=o.format(i.join("")),function(e){return n(a.scale(e))+a.symbol}}i[7]||(i[7]="."+function(e,t){var n=ja(t[2]);return e in Va?Math.abs(n-ja(Math.max(_(t[0]),_(t[1]))))+ +("e"!==e):n-2*("%"===e)}(i[8],r)),n=i.join("")}else n=",."+ja(r[2])+"f";return o.format(n)}o.scale.linear=function(){return Ia([0,1],[0,1],ao,!1)};var Va={s:1,g:1,p:1,r:1,e:1};function ja(e){return-Math.floor(Math.log(e)/Math.LN10+.01)}function za(e,t,n,r){function i(e){return(n?Math.log(e<0?0:e):-Math.log(e>0?0:-e))/Math.log(t)}function a(e){return n?Math.pow(t,e):-Math.pow(t,-e)}function s(t){return e(i(t))}return s.invert=function(t){return a(e.invert(t))},s.domain=function(t){return arguments.length?(n=t[0]>=0,e.domain((r=t.map(Number)).map(i)),s):r},s.base=function(n){return arguments.length?(t=+n,e.domain(r.map(i)),s):t},s.nice=function(){var t=Oa(r.map(i),n?Math:Ua);return e.domain(t),r=t.map(a),s},s.ticks=function(){var e=Ta(r),o=[],s=e[0],l=e[1],u=Math.floor(i(s)),c=Math.ceil(i(l)),d=t%1?2:t;if(isFinite(c-u)){if(n){for(;u<c;u++)for(var f=1;f<d;f++)o.push(a(u)*f);o.push(a(u))}else for(o.push(a(u));u++<c;)for(f=d-1;f>0;f--)o.push(a(u)*f);for(u=0;o[u]<s;u++);for(c=o.length;o[c-1]>l;c--);o=o.slice(u,c)}return o},s.tickFormat=function(e,n){if(!arguments.length)return Ga;arguments.length<2?n=Ga:"function"!=typeof n&&(n=o.format(n));var r=Math.max(1,t*e/s.ticks().length);return function(e){var o=e/a(Math.round(i(e)));return o*t<t-.5&&(o*=t),o<=r?n(e):""}},s.copy=function(){return za(e.copy(),t,n,r)},Ra(s,e)}o.scale.log=function(){return za(o.scale.linear().domain([0,1]),10,!0,[1,10])};var Ga=o.format(".0e"),Ua={floor:function(e){return-Math.ceil(-e)},ceil:function(e){return-Math.floor(-e)}};function Wa(e,t,n){var r=Ha(t),i=Ha(1/t);function o(t){return e(r(t))}return o.invert=function(t){return i(e.invert(t))},o.domain=function(t){return arguments.length?(e.domain((n=t.map(Number)).map(r)),o):n},o.ticks=function(e){return La(n,e)},o.tickFormat=function(e,t){return Ba(n,e,t)},o.nice=function(e){return o.domain(Na(n,e))},o.exponent=function(a){return arguments.length?(r=Ha(t=a),i=Ha(1/t),e.domain(n.map(r)),o):t},o.copy=function(){return Wa(e.copy(),t,n)},Ra(o,e)}function Ha(e){return function(t){return t<0?-Math.pow(-t,e):Math.pow(t,e)}}function qa(e,t){var n,r,i;function a(i){return r[((n.get(i)||("range"===t.t?n.set(i,e.push(i)):NaN))-1)%r.length]}function s(t,n){return o.range(e.length).map((function(e){return t+n*e}))}return a.domain=function(r){if(!arguments.length)return e;e=[],n=new A;for(var i,o=-1,s=r.length;++o<s;)n.has(i=r[o])||n.set(i,e.push(i));return a[t.t].apply(a,t.a)},a.range=function(e){return arguments.length?(r=e,i=0,t={t:"range",a:arguments},a):r},a.rangePoints=function(n,o){arguments.length<2&&(o=0);var l=n[0],u=n[1],c=e.length<2?(l=(l+u)/2,0):(u-l)/(e.length-1+o);return r=s(l+c*o/2,c),i=0,t={t:"rangePoints",a:arguments},a},a.rangeRoundPoints=function(n,o){arguments.length<2&&(o=0);var l=n[0],u=n[1],c=e.length<2?(l=u=Math.round((l+u)/2),0):(u-l)/(e.length-1+o)|0;return r=s(l+Math.round(c*o/2+(u-l-(e.length-1+o)*c)/2),c),i=0,t={t:"rangeRoundPoints",a:arguments},a},a.rangeBands=function(n,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=n[1]<n[0],c=n[u-0],d=n[1-u],f=(d-c)/(e.length-o+2*l);return r=s(c+f*l,f),u&&r.reverse(),i=f*(1-o),t={t:"rangeBands",a:arguments},a},a.rangeRoundBands=function(n,o,l){arguments.length<2&&(o=0),arguments.length<3&&(l=o);var u=n[1]<n[0],c=n[u-0],d=n[1-u],f=Math.floor((d-c)/(e.length-o+2*l));return r=s(c+Math.round((d-c-(e.length-o)*f)/2),f),u&&r.reverse(),i=Math.round(f*(1-o)),t={t:"rangeRoundBands",a:arguments},a},a.rangeBand=function(){return i},a.rangeExtent=function(){return Ta(t.a[0])},a.copy=function(){return qa(e,t)},a.domain(e)}o.scale.pow=function(){return Wa(o.scale.linear(),1,[0,1])},o.scale.sqrt=function(){return o.scale.pow().exponent(.5)},o.scale.ordinal=function(){return qa([],{t:"range",a:[[]]})},o.scale.category10=function(){return o.scale.ordinal().range(Xa)},o.scale.category20=function(){return o.scale.ordinal().range(Ka)},o.scale.category20b=function(){return o.scale.ordinal().range(Za)},o.scale.category20c=function(){return o.scale.ordinal().range(Ya)};var Xa=[2062260,16744206,2924588,14034728,9725885,9197131,14907330,8355711,12369186,1556175].map(dt),Ka=[2062260,11454440,16744206,16759672,2924588,10018698,14034728,16750742,9725885,12955861,9197131,12885140,14907330,16234194,8355711,13092807,12369186,14408589,1556175,10410725].map(dt),Za=[3750777,5395619,7040719,10264286,6519097,9216594,11915115,13556636,9202993,12426809,15186514,15190932,8666169,11356490,14049643,15177372,8077683,10834324,13528509,14589654].map(dt),Ya=[3244733,7057110,10406625,13032431,15095053,16616764,16625259,16634018,3253076,7652470,10607003,13101504,7695281,10394312,12369372,14342891,6513507,9868950,12434877,14277081].map(dt);function Ja(e,t){var n;function r(){var r=0,a=t.length;for(n=[];++r<a;)n[r-1]=o.quantile(e,r/a);return i}function i(e){if(!isNaN(e=+e))return t[o.bisect(n,e)]}return i.domain=function(t){return arguments.length?(e=t.map(v).filter(y).sort(g),r()):e},i.range=function(e){return arguments.length?(t=e,r()):t},i.quantiles=function(){return n},i.invertExtent=function(r){return(r=t.indexOf(r))<0?[NaN,NaN]:[r>0?n[r-1]:e[0],r<n.length?n[r]:e[e.length-1]]},i.copy=function(){return Ja(e,t)},r()}function Qa(e,t,n){var r,i;function o(t){return n[Math.max(0,Math.min(i,Math.floor(r*(t-e))))]}function a(){return r=n.length/(t-e),i=n.length-1,o}return o.domain=function(n){return arguments.length?(e=+n[0],t=+n[n.length-1],a()):[e,t]},o.range=function(e){return arguments.length?(n=e,a()):n},o.invertExtent=function(t){return[t=(t=n.indexOf(t))<0?NaN:t/r+e,t+1/r]},o.copy=function(){return Qa(e,t,n)},a()}function $a(e,t){function n(n){if(n<=n)return t[o.bisect(e,n)]}return n.domain=function(t){return arguments.length?(e=t,n):e},n.range=function(e){return arguments.length?(t=e,n):t},n.invertExtent=function(n){return n=t.indexOf(n),[e[n-1],e[n]]},n.copy=function(){return $a(e,t)},n}function es(e){function t(e){return+e}return t.invert=t,t.domain=t.range=function(n){return arguments.length?(e=n.map(t),t):e},t.ticks=function(t){return La(e,t)},t.tickFormat=function(t,n){return Ba(e,t,n)},t.copy=function(){return es(e)},t}function ts(){return 0}o.scale.quantile=function(){return Ja([],[])},o.scale.quantize=function(){return Qa(0,1,[0,1])},o.scale.threshold=function(){return $a([.5],[0,1])},o.scale.identity=function(){return es([0,1])},o.svg={},o.svg.arc=function(){var e=rs,t=is,n=ts,r=ns,i=os,o=as,a=ss;function s(){var s=Math.max(0,+e.apply(this,arguments)),u=Math.max(0,+t.apply(this,arguments)),c=i.apply(this,arguments)-Ie,d=o.apply(this,arguments)-Ie,f=Math.abs(d-c),p=c>d?0:1;if(u<s&&(h=u,u=s,s=h),f>=ke)return l(u,p)+(s?l(s,1-p):"")+"Z";var h,m,g,v,y,b,x,w,_,S,C,A,T=0,P=0,E=[];if((v=(+a.apply(this,arguments)||0)/2)&&(g=r===ns?Math.sqrt(s*s+u*u):+r.apply(this,arguments),p||(P*=-1),u&&(P=Ve(g/u*Math.sin(v))),s&&(T=Ve(g/s*Math.sin(v)))),u){y=u*Math.cos(c+P),b=u*Math.sin(c+P),x=u*Math.cos(d-P),w=u*Math.sin(d-P);var O=Math.abs(d-c-2*P)<=Me?0:1;if(P&&ls(y,b,x,w)===p^O){var M=(c+d)/2;y=u*Math.cos(M),b=u*Math.sin(M),x=w=null}}else y=b=0;if(s){_=s*Math.cos(d-T),S=s*Math.sin(d-T),C=s*Math.cos(c+T),A=s*Math.sin(c+T);var D=Math.abs(c-d+2*T)<=Me?0:1;if(T&&ls(_,S,C,A)===1-p^D){var k=(c+d)/2;_=s*Math.cos(k),S=s*Math.sin(k),C=A=null}}else _=S=0;if(f>Ee&&(h=Math.min(Math.abs(u-s)/2,+n.apply(this,arguments)))>.001){m=s<u^p?0:1;var I=h,R=h;if(f<Me){var N=null==C?[_,S]:null==x?[y,b]:mi([y,b],[C,A],[x,w],[_,S]),F=y-N[0],L=b-N[1],B=x-N[0],V=w-N[1],j=1/Math.sin(Math.acos((F*B+L*V)/(Math.sqrt(F*F+L*L)*Math.sqrt(B*B+V*V)))/2),z=Math.sqrt(N[0]*N[0]+N[1]*N[1]);R=Math.min(h,(s-z)/(j-1)),I=Math.min(h,(u-z)/(j+1))}if(null!=x){var G=us(null==C?[_,S]:[C,A],[y,b],u,I,p),U=us([x,w],[_,S],u,I,p);h===I?E.push("M",G[0],"A",I,",",I," 0 0,",m," ",G[1],"A",u,",",u," 0 ",1-p^ls(G[1][0],G[1][1],U[1][0],U[1][1]),",",p," ",U[1],"A",I,",",I," 0 0,",m," ",U[0]):E.push("M",G[0],"A",I,",",I," 0 1,",m," ",U[0])}else E.push("M",y,",",b);if(null!=C){var W=us([y,b],[C,A],s,-R,p),H=us([_,S],null==x?[y,b]:[x,w],s,-R,p);h===R?E.push("L",H[0],"A",R,",",R," 0 0,",m," ",H[1],"A",s,",",s," 0 ",p^ls(H[1][0],H[1][1],W[1][0],W[1][1]),",",1-p," ",W[1],"A",R,",",R," 0 0,",m," ",W[0]):E.push("L",H[0],"A",R,",",R," 0 0,",m," ",W[0])}else E.push("L",_,",",S)}else E.push("M",y,",",b),null!=x&&E.push("A",u,",",u," 0 ",O,",",p," ",x,",",w),E.push("L",_,",",S),null!=C&&E.push("A",s,",",s," 0 ",D,",",1-p," ",C,",",A);return E.push("Z"),E.join("")}function l(e,t){return"M0,"+e+"A"+e+","+e+" 0 1,"+t+" 0,"+-e+"A"+e+","+e+" 0 1,"+t+" 0,"+e}return s.innerRadius=function(t){return arguments.length?(e=xt(t),s):e},s.outerRadius=function(e){return arguments.length?(t=xt(e),s):t},s.cornerRadius=function(e){return arguments.length?(n=xt(e),s):n},s.padRadius=function(e){return arguments.length?(r=e==ns?ns:xt(e),s):r},s.startAngle=function(e){return arguments.length?(i=xt(e),s):i},s.endAngle=function(e){return arguments.length?(o=xt(e),s):o},s.padAngle=function(e){return arguments.length?(a=xt(e),s):a},s.centroid=function(){var n=(+e.apply(this,arguments)+ +t.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +o.apply(this,arguments))/2-Ie;return[Math.cos(r)*n,Math.sin(r)*n]},s};var ns="auto";function rs(e){return e.innerRadius}function is(e){return e.outerRadius}function os(e){return e.startAngle}function as(e){return e.endAngle}function ss(e){return e&&e.padAngle}function ls(e,t,n,r){return(e-n)*t-(t-r)*e>0?0:1}function us(e,t,n,r,i){var o=e[0]-t[0],a=e[1]-t[1],s=(i?r:-r)/Math.sqrt(o*o+a*a),l=s*a,u=-s*o,c=e[0]+l,d=e[1]+u,f=t[0]+l,p=t[1]+u,h=(c+f)/2,m=(d+p)/2,g=f-c,v=p-d,y=g*g+v*v,b=n-r,x=c*p-f*d,w=(v<0?-1:1)*Math.sqrt(Math.max(0,b*b*y-x*x)),_=(x*v-g*w)/y,S=(-x*g-v*w)/y,C=(x*v+g*w)/y,A=(-x*g+v*w)/y,T=_-h,P=S-m,E=C-h,O=A-m;return T*T+P*P>E*E+O*O&&(_=C,S=A),[[_-l,S-u],[_*n/b,S*n/b]]}function cs(e){var t=ui,n=ci,r=$n,i=fs,o=i.key,a=.7;function s(o){var s,l=[],u=[],c=-1,d=o.length,f=xt(t),p=xt(n);function h(){l.push("M",i(e(u),a))}for(;++c<d;)r.call(this,s=o[c],c)?u.push([+f.call(this,s,c),+p.call(this,s,c)]):u.length&&(h(),u=[]);return u.length&&h(),l.length?l.join(""):null}return s.x=function(e){return arguments.length?(t=e,s):t},s.y=function(e){return arguments.length?(n=e,s):n},s.defined=function(e){return arguments.length?(r=e,s):r},s.interpolate=function(e){return arguments.length?(o="function"==typeof e?i=e:(i=ds.get(e)||fs).key,s):o},s.tension=function(e){return arguments.length?(a=e,s):a},s}o.svg.line=function(){return cs(R)};var ds=o.map({linear:fs,"linear-closed":ps,step:function(e){var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];for(;++t<n;)i.push("H",(r[0]+(r=e[t])[0])/2,"V",r[1]);n>1&&i.push("H",r[0]);return i.join("")},"step-before":hs,"step-after":ms,basis:ys,"basis-open":function(e){if(e.length<4)return fs(e);var t,n=[],r=-1,i=e.length,o=[0],a=[0];for(;++r<3;)t=e[r],o.push(t[0]),a.push(t[1]);n.push(bs(_s,o)+","+bs(_s,a)),--r;for(;++r<i;)t=e[r],o.shift(),o.push(t[0]),a.shift(),a.push(t[1]),Ss(n,o,a);return n.join("")},"basis-closed":function(e){var t,n,r=-1,i=e.length,o=i+4,a=[],s=[];for(;++r<4;)n=e[r%i],a.push(n[0]),s.push(n[1]);t=[bs(_s,a),",",bs(_s,s)],--r;for(;++r<o;)n=e[r%i],a.shift(),a.push(n[0]),s.shift(),s.push(n[1]),Ss(t,a,s);return t.join("")},bundle:function(e,t){var n=e.length-1;if(n)for(var r,i,o=e[0][0],a=e[0][1],s=e[n][0]-o,l=e[n][1]-a,u=-1;++u<=n;)r=e[u],i=u/n,r[0]=t*r[0]+(1-t)*(o+i*s),r[1]=t*r[1]+(1-t)*(a+i*l);return ys(e)},cardinal:function(e,t){return e.length<3?fs(e):e[0]+gs(e,vs(e,t))},"cardinal-open":function(e,t){return e.length<4?fs(e):e[1]+gs(e.slice(1,-1),vs(e,t))},"cardinal-closed":function(e,t){return e.length<3?ps(e):e[0]+gs((e.push(e[0]),e),vs([e[e.length-2]].concat(e,[e[1]]),t))},monotone:function(e){return e.length<3?fs(e):e[0]+gs(e,function(e){var t,n,r,i,o=[],a=function(e){var t=0,n=e.length-1,r=[],i=e[0],o=e[1],a=r[0]=Cs(i,o);for(;++t<n;)r[t]=(a+(a=Cs(i=o,o=e[t+1])))/2;return r[t]=a,r}(e),s=-1,l=e.length-1;for(;++s<l;)t=Cs(e[s],e[s+1]),_(t)<Ee?a[s]=a[s+1]=0:(i=(n=a[s]/t)*n+(r=a[s+1]/t)*r)>9&&(i=3*t/Math.sqrt(i),a[s]=i*n,a[s+1]=i*r);s=-1;for(;++s<=l;)i=(e[Math.min(l,s+1)][0]-e[Math.max(0,s-1)][0])/(6*(1+a[s]*a[s])),o.push([i||0,a[s]*i||0]);return o}(e))}});function fs(e){return e.length>1?e.join("L"):e+"Z"}function ps(e){return e.join("L")+"Z"}function hs(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("V",(r=e[t])[1],"H",r[0]);return i.join("")}function ms(e){for(var t=0,n=e.length,r=e[0],i=[r[0],",",r[1]];++t<n;)i.push("H",(r=e[t])[0],"V",r[1]);return i.join("")}function gs(e,t){if(t.length<1||e.length!=t.length&&e.length!=t.length+2)return fs(e);var n=e.length!=t.length,r="",i=e[0],o=e[1],a=t[0],s=a,l=1;if(n&&(r+="Q"+(o[0]-2*a[0]/3)+","+(o[1]-2*a[1]/3)+","+o[0]+","+o[1],i=e[1],l=2),t.length>1){s=t[1],o=e[l],l++,r+="C"+(i[0]+a[0])+","+(i[1]+a[1])+","+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1];for(var u=2;u<t.length;u++,l++)o=e[l],s=t[u],r+="S"+(o[0]-s[0])+","+(o[1]-s[1])+","+o[0]+","+o[1]}if(n){var c=e[l];r+="Q"+(o[0]+2*s[0]/3)+","+(o[1]+2*s[1]/3)+","+c[0]+","+c[1]}return r}function vs(e,t){for(var n,r=[],i=(1-t)/2,o=e[0],a=e[1],s=1,l=e.length;++s<l;)n=o,o=a,a=e[s],r.push([i*(a[0]-n[0]),i*(a[1]-n[1])]);return r}function ys(e){if(e.length<3)return fs(e);var t=1,n=e.length,r=e[0],i=r[0],o=r[1],a=[i,i,i,(r=e[1])[0]],s=[o,o,o,r[1]],l=[i,",",o,"L",bs(_s,a),",",bs(_s,s)];for(e.push(e[n-1]);++t<=n;)r=e[t],a.shift(),a.push(r[0]),s.shift(),s.push(r[1]),Ss(l,a,s);return e.pop(),l.push("L",r),l.join("")}function bs(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}ds.forEach((function(e,t){t.key=e,t.closed=/-closed$/.test(e)}));var xs=[0,2/3,1/3,0],ws=[0,1/3,2/3,0],_s=[0,1/6,2/3,1/6];function Ss(e,t,n){e.push("C",bs(xs,t),",",bs(xs,n),",",bs(ws,t),",",bs(ws,n),",",bs(_s,t),",",bs(_s,n))}function Cs(e,t){return(t[1]-e[1])/(t[0]-e[0])}function As(e){for(var t,n,r,i=-1,o=e.length;++i<o;)n=(t=e[i])[0],r=t[1]-Ie,t[0]=n*Math.cos(r),t[1]=n*Math.sin(r);return e}function Ts(e){var t=ui,n=ui,r=0,i=ci,o=$n,a=fs,s=a.key,l=a,u="L",c=.7;function d(s){var d,f,p,h=[],m=[],g=[],v=-1,y=s.length,b=xt(t),x=xt(r),w=t===n?function(){return f}:xt(n),_=r===i?function(){return p}:xt(i);function S(){h.push("M",a(e(g),c),u,l(e(m.reverse()),c),"Z")}for(;++v<y;)o.call(this,d=s[v],v)?(m.push([f=+b.call(this,d,v),p=+x.call(this,d,v)]),g.push([+w.call(this,d,v),+_.call(this,d,v)])):m.length&&(S(),m=[],g=[]);return m.length&&S(),h.length?h.join(""):null}return d.x=function(e){return arguments.length?(t=n=e,d):n},d.x0=function(e){return arguments.length?(t=e,d):t},d.x1=function(e){return arguments.length?(n=e,d):n},d.y=function(e){return arguments.length?(r=i=e,d):i},d.y0=function(e){return arguments.length?(r=e,d):r},d.y1=function(e){return arguments.length?(i=e,d):i},d.defined=function(e){return arguments.length?(o=e,d):o},d.interpolate=function(e){return arguments.length?(s="function"==typeof e?a=e:(a=ds.get(e)||fs).key,l=a.reverse||a,u=a.closed?"M":"L",d):s},d.tension=function(e){return arguments.length?(c=e,d):c},d}function Ps(e){return e.radius}function Es(e){return[e.x,e.y]}function Os(e){return function(){var t=e.apply(this,arguments),n=t[0],r=t[1]-Ie;return[n*Math.cos(r),n*Math.sin(r)]}}function Ms(){return 64}function Ds(){return"circle"}function ks(e){var t=Math.sqrt(e/Me);return"M0,"+t+"A"+t+","+t+" 0 1,1 0,"+-t+"A"+t+","+t+" 0 1,1 0,"+t+"Z"}o.svg.line.radial=function(){var e=cs(As);return e.radius=e.x,delete e.x,e.angle=e.y,delete e.y,e},hs.reverse=ms,ms.reverse=hs,o.svg.area=function(){return Ts(R)},o.svg.area.radial=function(){var e=Ts(As);return e.radius=e.x,delete e.x,e.innerRadius=e.x0,delete e.x0,e.outerRadius=e.x1,delete e.x1,e.angle=e.y,delete e.y,e.startAngle=e.y0,delete e.y0,e.endAngle=e.y1,delete e.y1,e},o.svg.chord=function(){var e=Zr,t=Yr,n=Ps,r=os,i=as;function o(n,r){var i,o,u=a(this,e,n,r),c=a(this,t,n,r);return"M"+u.p0+s(u.r,u.p1,u.a1-u.a0)+(o=c,((i=u).a0==o.a0&&i.a1==o.a1?l(u.r,u.p1,u.r,u.p0):l(u.r,u.p1,c.r,c.p0)+s(c.r,c.p1,c.a1-c.a0)+l(c.r,c.p1,u.r,u.p0))+"Z")}function a(e,t,o,a){var s=t.call(e,o,a),l=n.call(e,s,a),u=r.call(e,s,a)-Ie,c=i.call(e,s,a)-Ie;return{r:l,a0:u,a1:c,p0:[l*Math.cos(u),l*Math.sin(u)],p1:[l*Math.cos(c),l*Math.sin(c)]}}function s(e,t,n){return"A"+e+","+e+" 0 "+ +(n>Me)+",1 "+t}function l(e,t,n,r){return"Q 0,0 "+r}return o.radius=function(e){return arguments.length?(n=xt(e),o):n},o.source=function(t){return arguments.length?(e=xt(t),o):e},o.target=function(e){return arguments.length?(t=xt(e),o):t},o.startAngle=function(e){return arguments.length?(r=xt(e),o):r},o.endAngle=function(e){return arguments.length?(i=xt(e),o):i},o},o.svg.diagonal=function(){var e=Zr,t=Yr,n=Es;function r(r,i){var o=e.call(this,r,i),a=t.call(this,r,i),s=(o.y+a.y)/2,l=[o,{x:o.x,y:s},{x:a.x,y:s},a];return"M"+(l=l.map(n))[0]+"C"+l[1]+" "+l[2]+" "+l[3]}return r.source=function(t){return arguments.length?(e=xt(t),r):e},r.target=function(e){return arguments.length?(t=xt(e),r):t},r.projection=function(e){return arguments.length?(n=e,r):n},r},o.svg.diagonal.radial=function(){var e=o.svg.diagonal(),t=Es,n=e.projection;return e.projection=function(e){return arguments.length?n(Os(t=e)):t},e},o.svg.symbol=function(){var e=Ds,t=Ms;function n(n,r){return(Is.get(e.call(this,n,r))||ks)(t.call(this,n,r))}return n.type=function(t){return arguments.length?(e=xt(t),n):e},n.size=function(e){return arguments.length?(t=xt(e),n):t},n};var Is=o.map({circle:ks,cross:function(e){var t=Math.sqrt(e/5)/2;return"M"+-3*t+","+-t+"H"+-t+"V"+-3*t+"H"+t+"V"+-t+"H"+3*t+"V"+t+"H"+t+"V"+3*t+"H"+-t+"V"+t+"H"+-3*t+"Z"},diamond:function(e){var t=Math.sqrt(e/(2*Ns)),n=t*Ns;return"M0,"+-t+"L"+n+",0 0,"+t+" "+-n+",0Z"},square:function(e){var t=Math.sqrt(e)/2;return"M"+-t+","+-t+"L"+t+","+-t+" "+t+","+t+" "+-t+","+t+"Z"},"triangle-down":function(e){var t=Math.sqrt(e/Rs),n=t*Rs/2;return"M0,"+n+"L"+t+","+-n+" "+-t+","+-n+"Z"},"triangle-up":function(e){var t=Math.sqrt(e/Rs),n=t*Rs/2;return"M0,"+-n+"L"+t+","+n+" "+-t+","+n+"Z"}});o.svg.symbolTypes=Is.keys();var Rs=Math.sqrt(3),Ns=Math.tan(30*Re);Y.transition=function(e){for(var t,n,r=Vs||++Gs,i=Hs(e),o=[],a=js||{time:Date.now(),ease:vo,delay:0,duration:250},s=-1,l=this.length;++s<l;){o.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(n=u[c])&&qs(n,c,i,r,a),t.push(n)}return Bs(o,i,r)},Y.interrupt=function(e){return this.each(null==e?Fs:Ls(Hs(e)))};var Fs=Ls(Hs());function Ls(e){return function(){var t,n,r;(t=this[e])&&(r=t[n=t.active])&&(r.timer.c=null,r.timer.t=NaN,--t.count?delete t[n]:delete this[e],t.active+=.5,r.event&&r.event.interrupt.call(this,this.__data__,r.index))}}function Bs(e,t,n){return H(e,zs),e.namespace=t,e.id=n,e}var Vs,js,zs=[],Gs=0;function Us(e,t,n,r){var i=e.id,o=e.namespace;return he(e,"function"==typeof n?function(e,a,s){e[o][i].tween.set(t,r(n.call(e,e.__data__,a,s)))}:(n=r(n),function(e){e[o][i].tween.set(t,n)}))}function Ws(e){return null==e&&(e=""),function(){this.textContent=e}}function Hs(e){return null==e?"__transition__":"__transition_"+e+"__"}function qs(e,t,n,r,i){var o,a,s,l,u,c=e[n]||(e[n]={active:0,count:0}),d=c[r];function f(n){var i=c.active,f=c[i];for(var h in f&&(f.timer.c=null,f.timer.t=NaN,--c.count,delete c[i],f.event&&f.event.interrupt.call(e,e.__data__,f.index)),c)if(+h<r){var m=c[h];m.timer.c=null,m.timer.t=NaN,--c.count,delete c[h]}a.c=p,Et((function(){return a.c&&p(n||1)&&(a.c=null,a.t=NaN),1}),0,o),c.active=r,d.event&&d.event.start.call(e,e.__data__,t),u=[],d.tween.forEach((function(n,r){(r=r.call(e,e.__data__,t))&&u.push(r)})),l=d.ease,s=d.duration}function p(i){for(var o=i/s,a=l(o),f=u.length;f>0;)u[--f].call(e,a);if(o>=1)return d.event&&d.event.end.call(e,e.__data__,t),--c.count?delete c[r]:delete e[n],1}d||(o=i.time,a=Et((function(e){var t=d.delay;if(a.t=t+o,t<=e)return f(e-t);a.c=f}),0,o),d=c[r]={tween:new A,time:o,timer:a,delay:i.delay,duration:i.duration,ease:i.ease,index:t},i=null,++c.count)}zs.call=Y.call,zs.empty=Y.empty,zs.node=Y.node,zs.size=Y.size,o.transition=function(e,t){return e&&e.transition?Vs?e.transition(t):e:o.selection().transition(e)},o.transition.prototype=zs,zs.select=function(e){var t,n,r,i=this.id,o=this.namespace,a=[];e=J(e);for(var s=-1,l=this.length;++s<l;){a.push(t=[]);for(var u=this[s],c=-1,d=u.length;++c<d;)(r=u[c])&&(n=e.call(r,r.__data__,c,s))?("__data__"in r&&(n.__data__=r.__data__),qs(n,c,o,i,r[o][i]),t.push(n)):t.push(null)}return Bs(a,o,i)},zs.selectAll=function(e){var t,n,r,i,o,a=this.id,s=this.namespace,l=[];e=Q(e);for(var u=-1,c=this.length;++u<c;)for(var d=this[u],f=-1,p=d.length;++f<p;)if(r=d[f]){o=r[s][a],n=e.call(r,r.__data__,f,u),l.push(t=[]);for(var h=-1,m=n.length;++h<m;)(i=n[h])&&qs(i,h,s,a,o),t.push(i)}return Bs(l,s,a)},zs.filter=function(e){var t,n,r=[];"function"!=typeof e&&(e=fe(e));for(var i=0,o=this.length;i<o;i++){r.push(t=[]);for(var a,s=0,l=(a=this[i]).length;s<l;s++)(n=a[s])&&e.call(n,n.__data__,s,i)&&t.push(n)}return Bs(r,this.namespace,this.id)},zs.tween=function(e,t){var n=this.id,r=this.namespace;return arguments.length<2?this.node()[r][n].tween.get(e):he(this,null==t?function(t){t[r][n].tween.remove(e)}:function(i){i[r][n].tween.set(e,t)})},zs.attr=function(e,t){if(arguments.length<2){for(t in e)this.attr(t,e[t]);return this}var n="transform"==e?Eo:ao,r=o.ns.qualify(e);function i(){this.removeAttribute(r)}function a(){this.removeAttributeNS(r.space,r.local)}function s(e){return null==e?i:(e+="",function(){var t,i=this.getAttribute(r);return i!==e&&(t=n(i,e),function(e){this.setAttribute(r,t(e))})})}function l(e){return null==e?a:(e+="",function(){var t,i=this.getAttributeNS(r.space,r.local);return i!==e&&(t=n(i,e),function(e){this.setAttributeNS(r.space,r.local,t(e))})})}return Us(this,"attr."+e,t,r.local?l:s)},zs.attrTween=function(e,t){var n=o.ns.qualify(e);return this.tween("attr."+e,n.local?function(e,r){var i=t.call(this,e,r,this.getAttributeNS(n.space,n.local));return i&&function(e){this.setAttributeNS(n.space,n.local,i(e))}}:function(e,r){var i=t.call(this,e,r,this.getAttribute(n));return i&&function(e){this.setAttribute(n,i(e))}})},zs.style=function(e,t,n){var r=arguments.length;if(r<3){if("string"!=typeof e){for(n in r<2&&(t=""),e)this.style(n,e[n],t);return this}n=""}function i(){this.style.removeProperty(e)}function o(t){return null==t?i:(t+="",function(){var r,i=c(this).getComputedStyle(this,null).getPropertyValue(e);return i!==t&&(r=ao(i,t),function(t){this.style.setProperty(e,r(t),n)})})}return Us(this,"style."+e,t,o)},zs.styleTween=function(e,t,n){function r(r,i){var o=t.call(this,r,i,c(this).getComputedStyle(this,null).getPropertyValue(e));return o&&function(t){this.style.setProperty(e,o(t),n)}}return arguments.length<3&&(n=""),this.tween("style."+e,r)},zs.text=function(e){return Us(this,"text",e,Ws)},zs.remove=function(){var e=this.namespace;return this.each("end.transition",(function(){var t;this[e].count<2&&(t=this.parentNode)&&t.removeChild(this)}))},zs.ease=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].ease:("function"!=typeof e&&(e=o.ease.apply(o,arguments)),he(this,(function(r){r[n][t].ease=e})))},zs.delay=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].delay:he(this,"function"==typeof e?function(r,i,o){r[n][t].delay=+e.call(r,r.__data__,i,o)}:(e=+e,function(r){r[n][t].delay=e}))},zs.duration=function(e){var t=this.id,n=this.namespace;return arguments.length<1?this.node()[n][t].duration:he(this,"function"==typeof e?function(r,i,o){r[n][t].duration=Math.max(1,e.call(r,r.__data__,i,o))}:(e=Math.max(1,e),function(r){r[n][t].duration=e}))},zs.each=function(e,t){var n=this.id,r=this.namespace;if(arguments.length<2){var i=js,a=Vs;try{Vs=n,he(this,(function(t,i,o){js=t[r][n],e.call(t,t.__data__,i,o)}))}finally{js=i,Vs=a}}else he(this,(function(i){var a=i[r][n];(a.event||(a.event=o.dispatch("start","end","interrupt"))).on(e,t)}));return this},zs.transition=function(){for(var e,t,n,r=this.id,i=++Gs,o=this.namespace,a=[],s=0,l=this.length;s<l;s++){a.push(e=[]);for(var u,c=0,d=(u=this[s]).length;c<d;c++)(t=u[c])&&qs(t,c,o,i,{time:(n=t[o][r]).time,ease:n.ease,delay:n.delay+n.duration,duration:n.duration}),e.push(t)}return Bs(a,o,i)},o.svg.axis=function(){var e,t=o.scale.linear(),n=Xs,r=6,i=6,a=3,l=[10],u=null;function c(s){s.each((function(){var s,c=o.select(this),d=this.__chart__||t,f=this.__chart__=t.copy(),p=null==u?f.ticks?f.ticks.apply(f,l):f.domain():u,h=null==e?f.tickFormat?f.tickFormat.apply(f,l):R:e,m=c.selectAll(".tick").data(p,f),g=m.enter().insert("g",".domain").attr("class","tick").style("opacity",Ee),v=o.transition(m.exit()).style("opacity",Ee).remove(),y=o.transition(m.order()).style("opacity",1),b=Math.max(r,0)+a,x=Pa(f),w=c.selectAll(".domain").data([0]),_=(w.enter().append("path").attr("class","domain"),o.transition(w));g.append("line"),g.append("text");var S,C,A,T,P=g.select("line"),E=y.select("line"),O=m.select("text").text(h),M=g.select("text"),D=y.select("text"),k="top"===n||"left"===n?-1:1;if("bottom"===n||"top"===n?(s=Zs,S="x",A="y",C="x2",T="y2",O.attr("dy",k<0?"0em":".71em").style("text-anchor","middle"),_.attr("d","M"+x[0]+","+k*i+"V0H"+x[1]+"V"+k*i)):(s=Ys,S="y",A="x",C="y2",T="x2",O.attr("dy",".32em").style("text-anchor",k<0?"end":"start"),_.attr("d","M"+k*i+","+x[0]+"H0V"+x[1]+"H"+k*i)),P.attr(T,k*r),M.attr(A,k*b),E.attr(C,0).attr(T,k*r),D.attr(S,0).attr(A,k*b),f.rangeBand){var I=f,N=I.rangeBand()/2;d=f=function(e){return I(e)+N}}else d.rangeBand?d=f:v.call(s,f,d);g.call(s,d,f),y.call(s,f,f)}))}return c.scale=function(e){return arguments.length?(t=e,c):t},c.orient=function(e){return arguments.length?(n=e in Ks?e+"":Xs,c):n},c.ticks=function(){return arguments.length?(l=s(arguments),c):l},c.tickValues=function(e){return arguments.length?(u=e,c):u},c.tickFormat=function(t){return arguments.length?(e=t,c):e},c.tickSize=function(e){var t=arguments.length;return t?(r=+e,i=+arguments[t-1],c):r},c.innerTickSize=function(e){return arguments.length?(r=+e,c):r},c.outerTickSize=function(e){return arguments.length?(i=+e,c):i},c.tickPadding=function(e){return arguments.length?(a=+e,c):a},c.tickSubdivide=function(){return arguments.length&&c},c};var Xs="bottom",Ks={top:1,right:1,bottom:1,left:1};function Zs(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate("+(isFinite(r)?r:n(e))+",0)"}))}function Ys(e,t,n){e.attr("transform",(function(e){var r=t(e);return"translate(0,"+(isFinite(r)?r:n(e))+")"}))}o.svg.brush=function(){var e,t,n=U(f,"brushstart","brush","brushend"),r=null,i=null,a=[0,0],s=[0,0],l=!0,u=!0,d=Qs[0];function f(e){e.each((function(){var e=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),t=e.selectAll(".background").data([0]);t.enter().append("rect").attr("class","background").style("visibility","hidden").style("cursor","crosshair"),e.selectAll(".extent").data([0]).enter().append("rect").attr("class","extent").style("cursor","move");var n=e.selectAll(".resize").data(d,R);n.exit().remove(),n.enter().append("g").attr("class",(function(e){return"resize "+e})).style("cursor",(function(e){return Js[e]})).append("rect").attr("x",(function(e){return/[ew]$/.test(e)?-3:null})).attr("y",(function(e){return/^[ns]/.test(e)?-3:null})).attr("width",6).attr("height",6).style("visibility","hidden"),n.style("display",f.empty()?"none":null);var a,s=o.transition(e),l=o.transition(t);r&&(a=Pa(r),l.attr("x",a[0]).attr("width",a[1]-a[0]),h(s)),i&&(a=Pa(i),l.attr("y",a[0]).attr("height",a[1]-a[0]),m(s)),p(s)}))}function p(e){e.selectAll(".resize").attr("transform",(function(e){return"translate("+a[+/e$/.test(e)]+","+s[+/^s/.test(e)]+")"}))}function h(e){e.select(".extent").attr("x",a[0]),e.selectAll(".extent,.n>rect,.s>rect").attr("width",a[1]-a[0])}function m(e){e.select(".extent").attr("y",s[0]),e.selectAll(".extent,.e>rect,.w>rect").attr("height",s[1]-s[0])}function g(){var d,g,v=this,y=o.select(o.event.target),b=n.of(v,arguments),x=o.select(v),w=y.datum(),_=!/^(n|s)$/.test(w)&&r,S=!/^(e|w)$/.test(w)&&i,C=y.classed("extent"),A=Ce(v),T=o.mouse(v),P=o.select(c(v)).on("keydown.brush",M).on("keyup.brush",D);if(o.event.changedTouches?P.on("touchmove.brush",k).on("touchend.brush",R):P.on("mousemove.brush",k).on("mouseup.brush",R),x.interrupt().selectAll("*").interrupt(),C)T[0]=a[0]-T[0],T[1]=s[0]-T[1];else if(w){var E=+/w$/.test(w),O=+/^n/.test(w);g=[a[1-E]-T[0],s[1-O]-T[1]],T[0]=a[E],T[1]=s[O]}else o.event.altKey&&(d=T.slice());function M(){32==o.event.keyCode&&(C||(d=null,T[0]-=a[1],T[1]-=s[1],C=2),z())}function D(){32==o.event.keyCode&&2==C&&(T[0]+=a[1],T[1]+=s[1],C=0,z())}function k(){var e=o.mouse(v),t=!1;g&&(e[0]+=g[0],e[1]+=g[1]),C||(o.event.altKey?(d||(d=[(a[0]+a[1])/2,(s[0]+s[1])/2]),T[0]=a[+(e[0]<d[0])],T[1]=s[+(e[1]<d[1])]):d=null),_&&I(e,r,0)&&(h(x),t=!0),S&&I(e,i,1)&&(m(x),t=!0),t&&(p(x),b({type:"brush",mode:C?"move":"resize"}))}function I(n,r,i){var o,c,f=Pa(r),p=f[0],h=f[1],m=T[i],g=i?s:a,v=g[1]-g[0];if(C&&(p-=m,h-=v+m),o=(i?u:l)?Math.max(p,Math.min(h,n[i])):n[i],C?c=(o+=m)+v:(d&&(m=Math.max(p,Math.min(h,2*d[i]-o))),m<o?(c=o,o=m):c=m),g[0]!=o||g[1]!=c)return i?t=null:e=null,g[0]=o,g[1]=c,!0}function R(){k(),x.style("pointer-events","all").selectAll(".resize").style("display",f.empty()?"none":null),o.select("body").style("cursor",null),P.on("mousemove.brush",null).on("mouseup.brush",null).on("touchmove.brush",null).on("touchend.brush",null).on("keydown.brush",null).on("keyup.brush",null),A(),b({type:"brushend"})}x.style("pointer-events","none").selectAll(".resize").style("display",null),o.select("body").style("cursor",y.style("cursor")),b({type:"brushstart"}),k()}return f.event=function(r){r.each((function(){var r=n.of(this,arguments),i={x:a,y:s,i:e,j:t},l=this.__chart__||i;this.__chart__=i,Vs?o.select(this).transition().each("start.brush",(function(){e=l.i,t=l.j,a=l.x,s=l.y,r({type:"brushstart"})})).tween("brush:brush",(function(){var n=so(a,i.x),o=so(s,i.y);return e=t=null,function(e){a=i.x=n(e),s=i.y=o(e),r({type:"brush",mode:"resize"})}})).each("end.brush",(function(){e=i.i,t=i.j,r({type:"brush",mode:"resize"}),r({type:"brushend"})})):(r({type:"brushstart"}),r({type:"brush",mode:"resize"}),r({type:"brushend"}))}))},f.x=function(e){return arguments.length?(d=Qs[!(r=e)<<1|!i],f):r},f.y=function(e){return arguments.length?(d=Qs[!r<<1|!(i=e)],f):i},f.clamp=function(e){return arguments.length?(r&&i?(l=!!e[0],u=!!e[1]):r?l=!!e:i&&(u=!!e),f):r&&i?[l,u]:r?l:i?u:null},f.extent=function(n){var o,l,u,c,d;return arguments.length?(r&&(o=n[0],l=n[1],i&&(o=o[0],l=l[0]),e=[o,l],r.invert&&(o=r(o),l=r(l)),l<o&&(d=o,o=l,l=d),o==a[0]&&l==a[1]||(a=[o,l])),i&&(u=n[0],c=n[1],r&&(u=u[1],c=c[1]),t=[u,c],i.invert&&(u=i(u),c=i(c)),c<u&&(d=u,u=c,c=d),u==s[0]&&c==s[1]||(s=[u,c])),f):(r&&(e?(o=e[0],l=e[1]):(o=a[0],l=a[1],r.invert&&(o=r.invert(o),l=r.invert(l)),l<o&&(d=o,o=l,l=d))),i&&(t?(u=t[0],c=t[1]):(u=s[0],c=s[1],i.invert&&(u=i.invert(u),c=i.invert(c)),c<u&&(d=u,u=c,c=d))),r&&i?[[o,u],[l,c]]:r?[o,l]:i&&[u,c])},f.clear=function(){return f.empty()||(a=[0,0],s=[0,0],e=t=null),f},f.empty=function(){return!!r&&a[0]==a[1]||!!i&&s[0]==s[1]},o.rebind(f,n,"on")};var Js={n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},Qs=[["n","e","s","w","nw","ne","se","sw"],["e","w"],["n","s"],[]],$s=Bt.format=hn.timeFormat,el=$s.utc,tl=el("%Y-%m-%dT%H:%M:%S.%LZ");function nl(e){return e.toISOString()}function rl(e,t,n){function r(t){return e(t)}function i(e,n){var r=(e[1]-e[0])/n,i=o.bisect(ol,r);return i==ol.length?[t.year,Fa(e.map((function(e){return e/31536e6})),n)[2]]:i?t[r/ol[i-1]<ol[i]/r?i-1:i]:[ll,Fa(e,n)[2]]}return r.invert=function(t){return il(e.invert(t))},r.domain=function(t){return arguments.length?(e.domain(t),r):e.domain().map(il)},r.nice=function(e,t){var n=r.domain(),o=Ta(n),a=null==e?i(o,10):"number"==typeof e&&i(o,e);function s(n){return!isNaN(n)&&!e.range(n,il(+n+1),t).length}return a&&(e=a[0],t=a[1]),r.domain(Oa(n,t>1?{floor:function(t){for(;s(t=e.floor(t));)t=il(t-1);return t},ceil:function(t){for(;s(t=e.ceil(t));)t=il(+t+1);return t}}:e))},r.ticks=function(e,t){var n=Ta(r.domain()),o=null==e?i(n,10):"number"==typeof e?i(n,e):!e.range&&[{range:e},t];return o&&(e=o[0],t=o[1]),e.range(n[0],il(+n[1]+1),t<1?1:t)},r.tickFormat=function(){return n},r.copy=function(){return rl(e.copy(),t,n)},Ra(r,e)}function il(e){return new Date(e)}$s.iso=Date.prototype.toISOString&&+new Date("2000-01-01T00:00:00.000Z")?nl:tl,nl.parse=function(e){var t=new Date(e);return isNaN(t)?null:t},nl.toString=tl.toString,Bt.second=Gt((function(e){return new Vt(1e3*Math.floor(e/1e3))}),(function(e,t){e.setTime(e.getTime()+1e3*Math.floor(t))}),(function(e){return e.getSeconds()})),Bt.seconds=Bt.second.range,Bt.seconds.utc=Bt.second.utc.range,Bt.minute=Gt((function(e){return new Vt(6e4*Math.floor(e/6e4))}),(function(e,t){e.setTime(e.getTime()+6e4*Math.floor(t))}),(function(e){return e.getMinutes()})),Bt.minutes=Bt.minute.range,Bt.minutes.utc=Bt.minute.utc.range,Bt.hour=Gt((function(e){var t=e.getTimezoneOffset()/60;return new Vt(36e5*(Math.floor(e/36e5-t)+t))}),(function(e,t){e.setTime(e.getTime()+36e5*Math.floor(t))}),(function(e){return e.getHours()})),Bt.hours=Bt.hour.range,Bt.hours.utc=Bt.hour.utc.range,Bt.month=Gt((function(e){return(e=Bt.day(e)).setDate(1),e}),(function(e,t){e.setMonth(e.getMonth()+t)}),(function(e){return e.getMonth()})),Bt.months=Bt.month.range,Bt.months.utc=Bt.month.utc.range;var ol=[1e3,5e3,15e3,3e4,6e4,3e5,9e5,18e5,36e5,108e5,216e5,432e5,864e5,1728e5,6048e5,2592e6,7776e6,31536e6],al=[[Bt.second,1],[Bt.second,5],[Bt.second,15],[Bt.second,30],[Bt.minute,1],[Bt.minute,5],[Bt.minute,15],[Bt.minute,30],[Bt.hour,1],[Bt.hour,3],[Bt.hour,6],[Bt.hour,12],[Bt.day,1],[Bt.day,2],[Bt.week,1],[Bt.month,1],[Bt.month,3],[Bt.year,1]],sl=$s.multi([[".%L",function(e){return e.getMilliseconds()}],[":%S",function(e){return e.getSeconds()}],["%I:%M",function(e){return e.getMinutes()}],["%I %p",function(e){return e.getHours()}],["%a %d",function(e){return e.getDay()&&1!=e.getDate()}],["%b %d",function(e){return 1!=e.getDate()}],["%B",function(e){return e.getMonth()}],["%Y",$n]]),ll={range:function(e,t,n){return o.range(Math.ceil(e/n)*n,+t,n).map(il)},floor:R,ceil:R};al.year=Bt.year,Bt.scale=function(){return rl(o.scale.linear(),al,sl)};var ul=al.map((function(e){return[e[0].utc,e[1]]})),cl=el.multi([[".%L",function(e){return e.getUTCMilliseconds()}],[":%S",function(e){return e.getUTCSeconds()}],["%I:%M",function(e){return e.getUTCMinutes()}],["%I %p",function(e){return e.getUTCHours()}],["%a %d",function(e){return e.getUTCDay()&&1!=e.getUTCDate()}],["%b %d",function(e){return 1!=e.getUTCDate()}],["%B",function(e){return e.getUTCMonth()}],["%Y",$n]]);function dl(e){return JSON.parse(e.responseText)}function fl(e){var t=l.createRange();return t.selectNode(l.body),t.createContextualFragment(e.responseText)}ul.year=Bt.year.utc,Bt.scale.utc=function(){return rl(o.scale.linear(),ul,cl)},o.text=wt((function(e){return e.responseText})),o.json=function(e,t){return _t(e,"application/json",dl,t)},o.html=function(e,t){return _t(e,"text/html",fl,t)},o.xml=wt((function(e){return e.responseXML})),this.d3=o,void 0===(i="function"==typeof(r=o)?r.call(t,n,t,e):r)||(e.exports=i)}()},1106:function(e){"use strict";function t(e,t,o){o=o||2;var a,s,l,d,f,h,m,g=t&&t.length,v=g?t[0]*o:e.length,y=n(e,0,v,o,!0),b=[];if(!y||y.next===y.prev)return b;if(g&&(y=function(e,t,i,o){var a,s,l,d=[];for(a=0,s=t.length;a<s;a++)(l=n(e,t[a]*o,a<s-1?t[a+1]*o:e.length,o,!1))===l.next&&(l.steiner=!0),d.push(p(l));for(d.sort(u),a=0;a<d.length;a++)i=r(i=c(d[a],i),i.next);return i}(e,t,y,o)),e.length>80*o){a=l=e[0],s=d=e[1];for(var x=o;x<v;x+=o)(f=e[x])<a&&(a=f),(h=e[x+1])<s&&(s=h),f>l&&(l=f),h>d&&(d=h);m=0!==(m=Math.max(l-a,d-s))?1/m:0}return i(y,b,o,a,s,m),b}function n(e,t,n,r,i){var o,a;if(i===T(e,t,n,r)>0)for(o=t;o<n;o+=r)a=S(o,e[o],e[o+1],a);else for(o=n-r;o>=t;o-=r)a=S(o,e[o],e[o+1],a);return a&&v(a,a.next)&&(C(a),a=a.next),a}function r(e,t){if(!e)return e;t||(t=e);var n,r=e;do{if(n=!1,r.steiner||!v(r,r.next)&&0!==g(r.prev,r,r.next))r=r.next;else{if(C(r),(r=t=r.prev)===r.next)break;n=!0}}while(n||r!==t);return t}function i(e,t,n,u,c,d,p){if(e){!p&&d&&function(e,t,n,r){var i=e;do{null===i.z&&(i.z=f(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){var t,n,r,i,o,a,s,l,u=1;do{for(n=e,e=null,o=null,a=0;n;){for(a++,r=n,s=0,t=0;t<u&&(s++,r=r.nextZ);t++);for(l=u;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),o?o.nextZ=i:e=i,i.prevZ=o,o=i;n=r}o.nextZ=null,u*=2}while(a>1)}(i)}(e,u,c,d);for(var h,m,g=e;e.prev!==e.next;)if(h=e.prev,m=e.next,d?a(e,u,c,d):o(e))t.push(h.i/n),t.push(e.i/n),t.push(m.i/n),C(e),e=m.next,g=m.next;else if((e=m)===g){p?1===p?i(e=s(r(e),t,n),t,n,u,c,d,2):2===p&&l(e,t,n,u,c,d):i(r(e),t,n,u,c,d,1);break}}}function o(e){var t=e.prev,n=e,r=e.next;if(g(t,n,r)>=0)return!1;for(var i=e.next.next;i!==e.prev;){if(h(t.x,t.y,n.x,n.y,r.x,r.y,i.x,i.y)&&g(i.prev,i,i.next)>=0)return!1;i=i.next}return!0}function a(e,t,n,r){var i=e.prev,o=e,a=e.next;if(g(i,o,a)>=0)return!1;for(var s=i.x<o.x?i.x<a.x?i.x:a.x:o.x<a.x?o.x:a.x,l=i.y<o.y?i.y<a.y?i.y:a.y:o.y<a.y?o.y:a.y,u=i.x>o.x?i.x>a.x?i.x:a.x:o.x>a.x?o.x:a.x,c=i.y>o.y?i.y>a.y?i.y:a.y:o.y>a.y?o.y:a.y,d=f(s,l,t,n,r),p=f(u,c,t,n,r),m=e.prevZ,v=e.nextZ;m&&m.z>=d&&v&&v.z<=p;){if(m!==e.prev&&m!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;if(m=m.prevZ,v!==e.prev&&v!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}for(;m&&m.z>=d;){if(m!==e.prev&&m!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,m.x,m.y)&&g(m.prev,m,m.next)>=0)return!1;m=m.prevZ}for(;v&&v.z<=p;){if(v!==e.prev&&v!==e.next&&h(i.x,i.y,o.x,o.y,a.x,a.y,v.x,v.y)&&g(v.prev,v,v.next)>=0)return!1;v=v.nextZ}return!0}function s(e,t,n){var i=e;do{var o=i.prev,a=i.next.next;!v(o,a)&&y(o,i,i.next,a)&&w(o,a)&&w(a,o)&&(t.push(o.i/n),t.push(i.i/n),t.push(a.i/n),C(i),C(i.next),i=e=a),i=i.next}while(i!==e);return r(i)}function l(e,t,n,o,a,s){var l=e;do{for(var u=l.next.next;u!==l.prev;){if(l.i!==u.i&&m(l,u)){var c=_(l,u);return l=r(l,l.next),c=r(c,c.next),i(l,t,n,o,a,s),void i(c,t,n,o,a,s)}u=u.next}l=l.next}while(l!==e)}function u(e,t){return e.x-t.x}function c(e,t){var n=function(e,t){var n,r=t,i=e.x,o=e.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){if(a=s,s===i){if(o===r.y)return r;if(o===r.next.y)return r.next}n=r.x<r.next.x?r:r.next}}r=r.next}while(r!==t);if(!n)return null;if(i===a)return n;var l,u=n,c=n.x,f=n.y,p=1/0;r=n;do{i>=r.x&&r.x>=c&&i!==r.x&&h(o<f?i:a,o,c,f,o<f?a:i,o,r.x,r.y)&&(l=Math.abs(o-r.y)/(i-r.x),w(r,e)&&(l<p||l===p&&(r.x>n.x||r.x===n.x&&d(n,r)))&&(n=r,p=l)),r=r.next}while(r!==u);return n}(e,t);if(!n)return t;var i=_(n,e),o=r(n,n.next);return r(i,i.next),t===n?o:t}function d(e,t){return g(e.prev,e,t.prev)<0&&g(t.next,e,e.next)<0}function f(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=32767*(e-n)*i)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=32767*(t-r)*i)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function p(e){var t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function h(e,t,n,r,i,o,a,s){return(i-a)*(t-s)-(e-a)*(o-s)>=0&&(e-a)*(r-s)-(n-a)*(t-s)>=0&&(n-a)*(o-s)-(i-a)*(r-s)>=0}function m(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){var n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&y(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(w(e,t)&&w(t,e)&&function(e,t){var n=e,r=!1,i=(e.x+t.x)/2,o=(e.y+t.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!==e);return r}(e,t)&&(g(e.prev,e,t.prev)||g(e,t.prev,t))||v(e,t)&&g(e.prev,e,e.next)>0&&g(t.prev,t,t.next)>0)}function g(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function v(e,t){return e.x===t.x&&e.y===t.y}function y(e,t,n,r){var i=x(g(e,t,n)),o=x(g(e,t,r)),a=x(g(n,r,e)),s=x(g(n,r,t));return i!==o&&a!==s||(!(0!==i||!b(e,n,t))||(!(0!==o||!b(e,r,t))||(!(0!==a||!b(n,e,r))||!(0!==s||!b(n,t,r)))))}function b(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function x(e){return e>0?1:e<0?-1:0}function w(e,t){return g(e.prev,e,e.next)<0?g(e,t,e.next)>=0&&g(e,e.prev,t)>=0:g(e,t,e.prev)<0||g(e,e.next,t)<0}function _(e,t){var n=new A(e.i,e.x,e.y),r=new A(t.i,t.x,t.y),i=e.next,o=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,o.next=r,r.prev=o,r}function S(e,t,n,r){var i=new A(e,t,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 C(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function A(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function T(e,t,n,r){for(var i=0,o=t,a=n-r;o<n;o+=r)i+=(e[a]-e[o])*(e[o+1]+e[a+1]),a=o;return i}e.exports=t,e.exports.default=t,t.deviation=function(e,t,n,r){var i=t&&t.length,o=i?t[0]*n:e.length,a=Math.abs(T(e,0,o,n));if(i)for(var s=0,l=t.length;s<l;s++){var u=t[s]*n,c=s<l-1?t[s+1]*n:e.length;a-=Math.abs(T(e,u,c,n))}var d=0;for(s=0;s<r.length;s+=3){var f=r[s]*n,p=r[s+1]*n,h=r[s+2]*n;d+=Math.abs((e[f]-e[h])*(e[p+1]-e[f+1])-(e[f]-e[p])*(e[h+1]-e[f+1]))}return 0===a&&0===d?0:Math.abs((d-a)/a)},t.flatten=function(e){for(var t=e[0][0].length,n={vertices:[],holes:[],dimensions:t},r=0,i=0;i<e.length;i++){for(var o=0;o<e[i].length;o++)for(var a=0;a<t;a++)n.vertices.push(e[i][o][a]);i>0&&(r+=e[i-1].length,n.holes.push(r))}return n}},320:function(e,t,n){var r=n(6502);n(40).vgl=r,e.exports=r},40:function(e,t,n){"use strict";e.exports=function(){if("object"==typeof globalThis)return globalThis;var e;try{e=this||new Function("return this")()}catch(e){if("object"==typeof window)return window;if("object"==typeof self)return self;if(void 0!==n.g)return n.g}return e}()},8543:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8];return e[0]=a*c-s*u,e[1]=i*u-r*c,e[2]=r*s-i*a,e[3]=s*l-o*c,e[4]=n*c-i*l,e[5]=i*o-n*s,e[6]=o*u-a*l,e[7]=r*l-n*u,e[8]=n*a-r*o,e}},4995:function(e){e.exports=function(e){var t=new Float32Array(9);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}},7186:function(e){e.exports=function(e,t){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}},1871:function(e){e.exports=function(){var e=new Float32Array(9);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}},3854:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8];return t*(u*o-a*l)+n*(a*s-u*i)+r*(l*i-o*s)}},9263:function(e){e.exports=function(e){return Math.sqrt(e[0]*e[0]+e[1]*e[1]+e[2]*e[2]+e[3]*e[3]+e[4]*e[4]+e[5]*e[5]+e[6]*e[6]+e[7]*e[7]+e[8]*e[8])}},6503:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=0,e[3]=t[2],e[4]=t[3],e[5]=0,e[6]=t[4],e[7]=t[5],e[8]=1,e}},3229:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[4],e[4]=t[5],e[5]=t[6],e[6]=t[8],e[7]=t[9],e[8]=t[10],e}},4523:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,f=i*a,p=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[3]=c-v,e[6]=f+g,e[1]=c+v,e[4]=1-u-h,e[7]=p-m,e[2]=f-g,e[5]=p+m,e[8]=1-u-d,e}},6511:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=1,e[5]=0,e[6]=0,e[7]=0,e[8]=1,e}},8054:function(e,t,n){e.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(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=c*a-s*u,f=-c*o+s*l,p=u*o-a*l,h=n*d+r*f+i*p;return h?(h=1/h,e[0]=d*h,e[1]=(-c*r+i*u)*h,e[2]=(s*r-i*a)*h,e[3]=f*h,e[4]=(c*n-i*l)*h,e[5]=(-s*n+i*o)*h,e[6]=p*h,e[7]=(-u*n+r*l)*h,e[8]=(a*n-r*o)*h,e):null}},9063:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=n[0],p=n[1],h=n[2],m=n[3],g=n[4],v=n[5],y=n[6],b=n[7],x=n[8];return e[0]=f*r+p*a+h*u,e[1]=f*i+p*s+h*c,e[2]=f*o+p*l+h*d,e[3]=m*r+g*a+v*u,e[4]=m*i+g*s+v*c,e[5]=m*o+g*l+v*d,e[6]=y*r+b*a+x*u,e[7]=y*i+b*s+x*c,e[8]=y*o+b*l+x*d,e}},3100:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,x=n*u-o*a,w=r*l-i*s,_=r*u-o*s,S=i*u-o*l,C=c*m-d*h,A=c*g-f*h,T=c*v-p*h,P=d*g-f*m,E=d*v-p*m,O=f*v-p*g,M=y*O-b*E+x*P+w*T-_*A+S*C;return M?(M=1/M,e[0]=(s*O-l*E+u*P)*M,e[1]=(l*T-a*O-u*A)*M,e[2]=(a*E-s*T+u*C)*M,e[3]=(i*E-r*O-o*P)*M,e[4]=(n*O-i*T+o*A)*M,e[5]=(r*T-n*E-o*C)*M,e[6]=(m*S-g*_+v*w)*M,e[7]=(g*x-h*S-v*b)*M,e[8]=(h*_-m*x+v*y)*M,e):null}},5637:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=Math.sin(n),p=Math.cos(n);return e[0]=p*r+f*a,e[1]=p*i+f*s,e[2]=p*o+f*l,e[3]=p*a-f*r,e[4]=p*s-f*i,e[5]=p*l-f*o,e[6]=u,e[7]=c,e[8]=d,e}},9281:function(e){e.exports=function(e,t,n){var r=n[0],i=n[1];return e[0]=r*t[0],e[1]=r*t[1],e[2]=r*t[2],e[3]=i*t[3],e[4]=i*t[4],e[5]=i*t[5],e[6]=t[6],e[7]=t[7],e[8]=t[8],e}},6224:function(e){e.exports=function(e){return"mat3("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+")"}},1078:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=n[0],p=n[1];return e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=f*r+p*a+u,e[7]=f*i+p*s+c,e[8]=f*o+p*l+d,e}},4879:function(e){e.exports=function(e,t){if(e===t){var n=t[1],r=t[2],i=t[5];e[1]=t[3],e[2]=t[6],e[3]=n,e[5]=t[7],e[6]=r,e[7]=i}else e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8];return e}},316:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15];return e[0]=s*(f*v-p*g)-d*(l*v-u*g)+m*(l*p-u*f),e[1]=-(r*(f*v-p*g)-d*(i*v-o*g)+m*(i*p-o*f)),e[2]=r*(l*v-u*g)-s*(i*v-o*g)+m*(i*u-o*l),e[3]=-(r*(l*p-u*f)-s*(i*p-o*f)+d*(i*u-o*l)),e[4]=-(a*(f*v-p*g)-c*(l*v-u*g)+h*(l*p-u*f)),e[5]=n*(f*v-p*g)-c*(i*v-o*g)+h*(i*p-o*f),e[6]=-(n*(l*v-u*g)-a*(i*v-o*g)+h*(i*u-o*l)),e[7]=n*(l*p-u*f)-a*(i*p-o*f)+c*(i*u-o*l),e[8]=a*(d*v-p*m)-c*(s*v-u*m)+h*(s*p-u*d),e[9]=-(n*(d*v-p*m)-c*(r*v-o*m)+h*(r*p-o*d)),e[10]=n*(s*v-u*m)-a*(r*v-o*m)+h*(r*u-o*s),e[11]=-(n*(s*p-u*d)-a*(r*p-o*d)+c*(r*u-o*s)),e[12]=-(a*(d*g-f*m)-c*(s*g-l*m)+h*(s*f-l*d)),e[13]=n*(d*g-f*m)-c*(r*g-i*m)+h*(r*f-i*d),e[14]=-(n*(s*g-l*m)-a*(r*g-i*m)+h*(r*l-i*s)),e[15]=n*(s*f-l*d)-a*(r*f-i*d)+c*(r*l-i*s),e}},6232:function(e){e.exports=function(e){var t=new Float32Array(16);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}},4408:function(e){e.exports=function(e,t){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}},703:function(e){e.exports=function(){var e=new Float32Array(16);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},3845:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3],o=e[4],a=e[5],s=e[6],l=e[7],u=e[8],c=e[9],d=e[10],f=e[11],p=e[12],h=e[13],m=e[14],g=e[15];return(t*a-n*o)*(d*g-f*m)-(t*s-r*o)*(c*g-f*h)+(t*l-i*o)*(c*m-d*h)+(n*s-r*a)*(u*g-f*p)-(n*l-i*a)*(u*m-d*p)+(r*l-i*s)*(u*h-c*p)}},9259:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n+n,s=r+r,l=i+i,u=n*a,c=r*a,d=r*s,f=i*a,p=i*s,h=i*l,m=o*a,g=o*s,v=o*l;return e[0]=1-d-h,e[1]=c+v,e[2]=f-g,e[3]=0,e[4]=c-v,e[5]=1-u-h,e[6]=p+m,e[7]=0,e[8]=f+g,e[9]=p-m,e[10]=1-u-d,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8625:function(e){e.exports=function(e,t,n){var r,i,o,a=n[0],s=n[1],l=n[2],u=Math.sqrt(a*a+s*s+l*l);if(Math.abs(u)<1e-6)return null;return a*=u=1/u,s*=u,l*=u,r=Math.sin(t),i=Math.cos(t),o=1-i,e[0]=a*a*o+i,e[1]=s*a*o+l*r,e[2]=l*a*o-s*r,e[3]=0,e[4]=a*s*o-l*r,e[5]=s*s*o+i,e[6]=l*s*o+a*r,e[7]=0,e[8]=a*l*o+s*r,e[9]=s*l*o-a*r,e[10]=l*l*o+i,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8844:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=r+r,l=i+i,u=o+o,c=r*s,d=r*l,f=r*u,p=i*l,h=i*u,m=o*u,g=a*s,v=a*l,y=a*u;return e[0]=1-(p+m),e[1]=d+y,e[2]=f-v,e[3]=0,e[4]=d-y,e[5]=1-(c+m),e[6]=h+g,e[7]=0,e[8]=f+v,e[9]=h-g,e[10]=1-(c+p),e[11]=0,e[12]=n[0],e[13]=n[1],e[14]=n[2],e[15]=1,e}},3107:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=t[1],e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=t[2],e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6645:function(e){e.exports=function(e,t){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=t[0],e[13]=t[1],e[14]=t[2],e[15]=1,e}},1:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=r,e[6]=n,e[7]=0,e[8]=0,e[9]=-n,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8503:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=0,e[2]=-n,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=n,e[9]=0,e[10]=r,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},8990:function(e){e.exports=function(e,t){var n=Math.sin(t),r=Math.cos(t);return e[0]=r,e[1]=n,e[2]=0,e[3]=0,e[4]=-n,e[5]=r,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},6901:function(e){e.exports=function(e,t,n,r,i,o,a){var s=1/(n-t),l=1/(i-r),u=1/(o-a);return e[0]=2*o*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=2*o*l,e[6]=0,e[7]=0,e[8]=(n+t)*s,e[9]=(i+r)*l,e[10]=(a+o)*u,e[11]=-1,e[12]=0,e[13]=0,e[14]=a*o*2*u,e[15]=0,e}},1156:function(e){e.exports=function(e){return e[0]=1,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=1,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=1,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,e}},5240:function(e,t,n){e.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(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=t[4],s=t[5],l=t[6],u=t[7],c=t[8],d=t[9],f=t[10],p=t[11],h=t[12],m=t[13],g=t[14],v=t[15],y=n*s-r*a,b=n*l-i*a,x=n*u-o*a,w=r*l-i*s,_=r*u-o*s,S=i*u-o*l,C=c*m-d*h,A=c*g-f*h,T=c*v-p*h,P=d*g-f*m,E=d*v-p*m,O=f*v-p*g,M=y*O-b*E+x*P+w*T-_*A+S*C;if(!M)return null;return M=1/M,e[0]=(s*O-l*E+u*P)*M,e[1]=(i*E-r*O-o*P)*M,e[2]=(m*S-g*_+v*w)*M,e[3]=(f*_-d*S-p*w)*M,e[4]=(l*T-a*O-u*A)*M,e[5]=(n*O-i*T+o*A)*M,e[6]=(g*x-h*S-v*b)*M,e[7]=(c*S-f*x+p*b)*M,e[8]=(a*E-s*T+u*C)*M,e[9]=(r*T-n*E-o*C)*M,e[10]=(h*_-m*x+v*y)*M,e[11]=(d*x-c*_-p*y)*M,e[12]=(s*A-a*P-l*C)*M,e[13]=(n*P-r*A+i*C)*M,e[14]=(m*b-h*w-g*y)*M,e[15]=(c*w-d*b+f*y)*M,e}},398:function(e,t,n){var r=n(1156);e.exports=function(e,t,n,i){var o,a,s,l,u,c,d,f,p,h,m=t[0],g=t[1],v=t[2],y=i[0],b=i[1],x=i[2],w=n[0],_=n[1],S=n[2];if(Math.abs(m-w)<1e-6&&Math.abs(g-_)<1e-6&&Math.abs(v-S)<1e-6)return r(e);d=m-w,f=g-_,p=v-S,h=1/Math.sqrt(d*d+f*f+p*p),o=b*(p*=h)-x*(f*=h),a=x*(d*=h)-y*p,s=y*f-b*d,(h=Math.sqrt(o*o+a*a+s*s))?(o*=h=1/h,a*=h,s*=h):(o=0,a=0,s=0);l=f*s-p*a,u=p*o-d*s,c=d*a-f*o,(h=Math.sqrt(l*l+u*u+c*c))?(l*=h=1/h,u*=h,c*=h):(l=0,u=0,c=0);return e[0]=o,e[1]=l,e[2]=d,e[3]=0,e[4]=a,e[5]=u,e[6]=f,e[7]=0,e[8]=s,e[9]=c,e[10]=p,e[11]=0,e[12]=-(o*m+a*g+s*v),e[13]=-(l*m+u*g+c*v),e[14]=-(d*m+f*g+p*v),e[15]=1,e}},6498:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=t[9],p=t[10],h=t[11],m=t[12],g=t[13],v=t[14],y=t[15],b=n[0],x=n[1],w=n[2],_=n[3];return e[0]=b*r+x*s+w*d+_*m,e[1]=b*i+x*l+w*f+_*g,e[2]=b*o+x*u+w*p+_*v,e[3]=b*a+x*c+w*h+_*y,b=n[4],x=n[5],w=n[6],_=n[7],e[4]=b*r+x*s+w*d+_*m,e[5]=b*i+x*l+w*f+_*g,e[6]=b*o+x*u+w*p+_*v,e[7]=b*a+x*c+w*h+_*y,b=n[8],x=n[9],w=n[10],_=n[11],e[8]=b*r+x*s+w*d+_*m,e[9]=b*i+x*l+w*f+_*g,e[10]=b*o+x*u+w*p+_*v,e[11]=b*a+x*c+w*h+_*y,b=n[12],x=n[13],w=n[14],_=n[15],e[12]=b*r+x*s+w*d+_*m,e[13]=b*i+x*l+w*f+_*g,e[14]=b*o+x*u+w*p+_*v,e[15]=b*a+x*c+w*h+_*y,e}},753:function(e){e.exports=function(e,t,n,r,i,o,a){var s=1/(t-n),l=1/(r-i),u=1/(o-a);return e[0]=-2*s,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=-2*l,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=2*u,e[11]=0,e[12]=(t+n)*s,e[13]=(i+r)*l,e[14]=(a+o)*u,e[15]=1,e}},2343:function(e){e.exports=function(e,t,n,r,i){var o=1/Math.tan(t/2),a=1/(r-i);return e[0]=o/n,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=o,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[10]=(i+r)*a,e[11]=-1,e[12]=0,e[13]=0,e[14]=2*i*r*a,e[15]=0,e}},7863:function(e){e.exports=function(e,t,n,r){var i=Math.tan(t.upDegrees*Math.PI/180),o=Math.tan(t.downDegrees*Math.PI/180),a=Math.tan(t.leftDegrees*Math.PI/180),s=Math.tan(t.rightDegrees*Math.PI/180),l=2/(a+s),u=2/(i+o);return e[0]=l,e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[5]=u,e[6]=0,e[7]=0,e[8]=-(a-s)*l*.5,e[9]=(i-o)*u*.5,e[10]=r/(n-r),e[11]=-1,e[12]=0,e[13]=0,e[14]=r*n/(n-r),e[15]=0,e}},4175:function(e){e.exports=function(e,t,n,r){var i,o,a,s,l,u,c,d,f,p,h,m,g,v,y,b,x,w,_,S,C,A,T,P,E=r[0],O=r[1],M=r[2],D=Math.sqrt(E*E+O*O+M*M);if(Math.abs(D)<1e-6)return null;E*=D=1/D,O*=D,M*=D,i=Math.sin(n),o=Math.cos(n),a=1-o,s=t[0],l=t[1],u=t[2],c=t[3],d=t[4],f=t[5],p=t[6],h=t[7],m=t[8],g=t[9],v=t[10],y=t[11],b=E*E*a+o,x=O*E*a+M*i,w=M*E*a-O*i,_=E*O*a-M*i,S=O*O*a+o,C=M*O*a+E*i,A=E*M*a+O*i,T=O*M*a-E*i,P=M*M*a+o,e[0]=s*b+d*x+m*w,e[1]=l*b+f*x+g*w,e[2]=u*b+p*x+v*w,e[3]=c*b+h*x+y*w,e[4]=s*_+d*S+m*C,e[5]=l*_+f*S+g*C,e[6]=u*_+p*S+v*C,e[7]=c*_+h*S+y*C,e[8]=s*A+d*T+m*P,e[9]=l*A+f*T+g*P,e[10]=u*A+p*T+v*P,e[11]=c*A+h*T+y*P,t!==e&&(e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e}},3116:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[4],a=t[5],s=t[6],l=t[7],u=t[8],c=t[9],d=t[10],f=t[11];t!==e&&(e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[4]=o*i+u*r,e[5]=a*i+c*r,e[6]=s*i+d*r,e[7]=l*i+f*r,e[8]=u*i-o*r,e[9]=c*i-a*r,e[10]=d*i-s*r,e[11]=f*i-l*r,e}},6428:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],u=t[8],c=t[9],d=t[10],f=t[11];t!==e&&(e[4]=t[4],e[5]=t[5],e[6]=t[6],e[7]=t[7],e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15]);return e[0]=o*i-u*r,e[1]=a*i-c*r,e[2]=s*i-d*r,e[3]=l*i-f*r,e[8]=o*r+u*i,e[9]=a*r+c*i,e[10]=s*r+d*i,e[11]=l*r+f*i,e}},9041:function(e){e.exports=function(e,t,n){var r=Math.sin(n),i=Math.cos(n),o=t[0],a=t[1],s=t[2],l=t[3],u=t[4],c=t[5],d=t[6],f=t[7];t!==e&&(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]);return e[0]=o*i+u*r,e[1]=a*i+c*r,e[2]=s*i+d*r,e[3]=l*i+f*r,e[4]=u*i-o*r,e[5]=c*i-a*r,e[6]=d*i-s*r,e[7]=f*i-l*r,e}},1119:function(e){e.exports=function(e,t,n){var r=n[0],i=n[1],o=n[2];return e[0]=t[0]*r,e[1]=t[1]*r,e[2]=t[2]*r,e[3]=t[3]*r,e[4]=t[4]*i,e[5]=t[5]*i,e[6]=t[6]*i,e[7]=t[7]*i,e[8]=t[8]*o,e[9]=t[9]*o,e[10]=t[10]*o,e[11]=t[11]*o,e[12]=t[12],e[13]=t[13],e[14]=t[14],e[15]=t[15],e}},6758:function(e){e.exports=function(e){return"mat4("+e[0]+", "+e[1]+", "+e[2]+", "+e[3]+", "+e[4]+", "+e[5]+", "+e[6]+", "+e[7]+", "+e[8]+", "+e[9]+", "+e[10]+", "+e[11]+", "+e[12]+", "+e[13]+", "+e[14]+", "+e[15]+")"}},164:function(e){e.exports=function(e,t,n){var r,i,o,a,s,l,u,c,d,f,p,h,m=n[0],g=n[1],v=n[2];t===e?(e[12]=t[0]*m+t[4]*g+t[8]*v+t[12],e[13]=t[1]*m+t[5]*g+t[9]*v+t[13],e[14]=t[2]*m+t[6]*g+t[10]*v+t[14],e[15]=t[3]*m+t[7]*g+t[11]*v+t[15]):(r=t[0],i=t[1],o=t[2],a=t[3],s=t[4],l=t[5],u=t[6],c=t[7],d=t[8],f=t[9],p=t[10],h=t[11],e[0]=r,e[1]=i,e[2]=o,e[3]=a,e[4]=s,e[5]=l,e[6]=u,e[7]=c,e[8]=d,e[9]=f,e[10]=p,e[11]=h,e[12]=r*m+s*g+d*v+t[12],e[13]=i*m+l*g+f*v+t[13],e[14]=o*m+u*g+p*v+t[14],e[15]=a*m+c*g+h*v+t[15]);return e}},3039:function(e){e.exports=function(e,t){if(e===t){var n=t[1],r=t[2],i=t[3],o=t[6],a=t[7],s=t[11];e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=n,e[6]=t[9],e[7]=t[13],e[8]=r,e[9]=o,e[11]=t[14],e[12]=i,e[13]=a,e[14]=s}else e[0]=t[0],e[1]=t[4],e[2]=t[8],e[3]=t[12],e[4]=t[1],e[5]=t[5],e[6]=t[9],e[7]=t[13],e[8]=t[2],e[9]=t[6],e[10]=t[10],e[11]=t[14],e[12]=t[3],e[13]=t[7],e[14]=t[11],e[15]=t[15];return e}},7207:function(e){e.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e}},3959:function(e,t,n){e.exports=function(e,t){var n=r(e[0],e[1],e[2]),a=r(t[0],t[1],t[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(e){e.exports=function(e,t){return e[0]=Math.ceil(t[0]),e[1]=Math.ceil(t[1]),e[2]=Math.ceil(t[2]),e}},859:function(e){e.exports=function(e){var t=new Float32Array(3);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t}},1404:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e}},2002:function(e){e.exports=function(){var e=new Float32Array(3);return e[0]=0,e[1]=0,e[2]=0,e}},9528:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2];return e[0]=i*l-o*s,e[1]=o*a-r*l,e[2]=r*s-i*a,e}},6005:function(e,t,n){e.exports=n(6911)},6911:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return Math.sqrt(n*n+r*r+i*i)}},133:function(e,t,n){e.exports=n(3274)},3274:function(e){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e}},966:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]}},2342:function(e){e.exports=1e-6},9883:function(e,t,n){e.exports=function(e,t){var n=e[0],i=e[1],o=e[2],a=t[0],s=t[1],l=t[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-l)<=r*Math.max(1,Math.abs(o),Math.abs(l))};var r=n(2342)},8259:function(e){e.exports=function(e,t){return e[0]===t[0]&&e[1]===t[1]&&e[2]===t[2]}},7291:function(e){e.exports=function(e,t){return e[0]=Math.floor(t[0]),e[1]=Math.floor(t[1]),e[2]=Math.floor(t[2]),e}},7043:function(e,t,n){e.exports=function(e,t,n,i,o,a){var s,l;t||(t=3);n||(n=0);l=i?Math.min(i*t+n,e.length):e.length;for(s=n;s<l;s+=t)r[0]=e[s],r[1]=e[s+1],r[2]=e[s+2],o(r,r,a),e[s]=r[0],e[s+1]=r[1],e[s+2]=r[2];return e};var r=n(2002)()},6534:function(e){e.exports=function(e,t,n){var r=new Float32Array(3);return r[0]=e,r[1]=t,r[2]=n,r}},5365:function(e,t,n){e.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(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e}},5446:function(e,t,n){e.exports=n(172)},172:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2];return Math.sqrt(t*t+n*n+r*r)}},6373:function(e){e.exports=function(e,t,n,r){var i=t[0],o=t[1],a=t[2];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e}},7254:function(e){e.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e}},7324:function(e){e.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e}},792:function(e,t,n){e.exports=n(6381)},6381:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e}},9500:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e}},2397:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=n*n+r*r+i*i;o>0&&(o=1/Math.sqrt(o),e[0]=t[0]*o,e[1]=t[1]*o,e[2]=t[2]*o);return e}},2283:function(e){e.exports=function(e,t){t=t||1;var n=2*Math.random()*Math.PI,r=2*Math.random()-1,i=Math.sqrt(1-r*r)*t;return e[0]=Math.cos(n)*i,e[1]=Math.sin(n)*i,e[2]=r*t,e}},4871:function(e){e.exports=function(e,t,n,r){var i=n[1],o=n[2],a=t[1]-i,s=t[2]-o,l=Math.sin(r),u=Math.cos(r);return e[0]=t[0],e[1]=i+a*u-s*l,e[2]=o+a*l+s*u,e}},7927:function(e){e.exports=function(e,t,n,r){var i=n[0],o=n[2],a=t[0]-i,s=t[2]-o,l=Math.sin(r),u=Math.cos(r);return e[0]=i+s*l+a*u,e[1]=t[1],e[2]=o+s*u-a*l,e}},2998:function(e){e.exports=function(e,t,n,r){var i=n[0],o=n[1],a=t[0]-i,s=t[1]-o,l=Math.sin(r),u=Math.cos(r);return e[0]=i+a*u-s*l,e[1]=o+a*l+s*u,e[2]=t[2],e}},5084:function(e){e.exports=function(e,t){return e[0]=Math.round(t[0]),e[1]=Math.round(t[1]),e[2]=Math.round(t[2]),e}},498:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e}},6993:function(e){e.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e}},6952:function(e){e.exports=function(e,t,n,r){return e[0]=t,e[1]=n,e[2]=r,e}},9867:function(e,t,n){e.exports=n(3440)},609:function(e,t,n){e.exports=n(5228)},3440:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2];return n*n+r*r+i*i}},5228:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2];return t*t+n*n+r*r}},3379:function(e,t,n){e.exports=n(7916)},7916:function(e){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e}},932:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2];return e[0]=r*n[0]+i*n[3]+o*n[6],e[1]=r*n[1]+i*n[4]+o*n[7],e[2]=r*n[2]+i*n[5]+o*n[8],e}},2964:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[3]*r+n[7]*i+n[11]*o+n[15];return a=a||1,e[0]=(n[0]*r+n[4]*i+n[8]*o+n[12])/a,e[1]=(n[1]*r+n[5]*i+n[9]*o+n[13])/a,e[2]=(n[2]*r+n[6]*i+n[10]*o+n[14])/a,e}},4516:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*o-l*i,d=u*i+l*r-a*o,f=u*o+a*i-s*r,p=-a*r-s*i-l*o;return e[0]=c*u+p*-a+d*-l-f*-s,e[1]=d*u+p*-s+f*-a-c*-l,e[2]=f*u+p*-l+c*-s-d*-a,e}},5492:function(e){e.exports=function(e,t,n){return e[0]=t[0]+n[0],e[1]=t[1]+n[1],e[2]=t[2]+n[2],e[3]=t[3]+n[3],e}},5967:function(e){e.exports=function(e){var t=new Float32Array(4);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t}},4729:function(e){e.exports=function(e,t){return e[0]=t[0],e[1]=t[1],e[2]=t[2],e[3]=t[3],e}},8922:function(e){e.exports=function(){var e=new Float32Array(4);return e[0]=0,e[1]=0,e[2]=0,e[3]=0,e}},3256:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return Math.sqrt(n*n+r*r+i*i+o*o)}},409:function(e){e.exports=function(e,t,n){return e[0]=t[0]/n[0],e[1]=t[1]/n[1],e[2]=t[2]/n[2],e[3]=t[3]/n[3],e}},3643:function(e){e.exports=function(e,t){return e[0]*t[0]+e[1]*t[1]+e[2]*t[2]+e[3]*t[3]}},5166:function(e){e.exports=function(e,t,n,r){var i=new Float32Array(4);return i[0]=e,i[1]=t,i[2]=n,i[3]=r,i}},8608:function(e,t,n){e.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(e){e.exports=function(e,t){return e[0]=1/t[0],e[1]=1/t[1],e[2]=1/t[2],e[3]=1/t[3],e}},7358:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return Math.sqrt(t*t+n*n+r*r+i*i)}},117:function(e){e.exports=function(e,t,n,r){var i=t[0],o=t[1],a=t[2],s=t[3];return e[0]=i+r*(n[0]-i),e[1]=o+r*(n[1]-o),e[2]=a+r*(n[2]-a),e[3]=s+r*(n[3]-s),e}},6225:function(e){e.exports=function(e,t,n){return e[0]=Math.max(t[0],n[0]),e[1]=Math.max(t[1],n[1]),e[2]=Math.max(t[2],n[2]),e[3]=Math.max(t[3],n[3]),e}},8485:function(e){e.exports=function(e,t,n){return e[0]=Math.min(t[0],n[0]),e[1]=Math.min(t[1],n[1]),e[2]=Math.min(t[2],n[2]),e[3]=Math.min(t[3],n[3]),e}},4683:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n[0],e[1]=t[1]*n[1],e[2]=t[2]*n[2],e[3]=t[3]*n[3],e}},2618:function(e){e.exports=function(e,t){return e[0]=-t[0],e[1]=-t[1],e[2]=-t[2],e[3]=-t[3],e}},959:function(e){e.exports=function(e,t){var n=t[0],r=t[1],i=t[2],o=t[3],a=n*n+r*r+i*i+o*o;a>0&&(a=1/Math.sqrt(a),e[0]=n*a,e[1]=r*a,e[2]=i*a,e[3]=o*a);return e}},9855:function(e,t,n){var r=n(959),i=n(7141);e.exports=function(e,t){return t=t||1,e[0]=Math.random(),e[1]=Math.random(),e[2]=Math.random(),e[3]=Math.random(),r(e,e),i(e,e,t),e}},7141:function(e){e.exports=function(e,t,n){return e[0]=t[0]*n,e[1]=t[1]*n,e[2]=t[2]*n,e[3]=t[3]*n,e}},2100:function(e){e.exports=function(e,t,n,r){return e[0]=t[0]+n[0]*r,e[1]=t[1]+n[1]*r,e[2]=t[2]+n[2]*r,e[3]=t[3]+n[3]*r,e}},256:function(e){e.exports=function(e,t,n,r,i){return e[0]=t,e[1]=n,e[2]=r,e[3]=i,e}},8726:function(e){e.exports=function(e,t){var n=t[0]-e[0],r=t[1]-e[1],i=t[2]-e[2],o=t[3]-e[3];return n*n+r*r+i*i+o*o}},3e3:function(e){e.exports=function(e){var t=e[0],n=e[1],r=e[2],i=e[3];return t*t+n*n+r*r+i*i}},1250:function(e){e.exports=function(e,t,n){return e[0]=t[0]-n[0],e[1]=t[1]-n[1],e[2]=t[2]-n[2],e[3]=t[3]-n[3],e}},161:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=t[3];return e[0]=n[0]*r+n[4]*i+n[8]*o+n[12]*a,e[1]=n[1]*r+n[5]*i+n[9]*o+n[13]*a,e[2]=n[2]*r+n[6]*i+n[10]*o+n[14]*a,e[3]=n[3]*r+n[7]*i+n[11]*o+n[15]*a,e}},228:function(e){e.exports=function(e,t,n){var r=t[0],i=t[1],o=t[2],a=n[0],s=n[1],l=n[2],u=n[3],c=u*r+s*o-l*i,d=u*i+l*r-a*o,f=u*o+a*i-s*r,p=-a*r-s*i-l*o;return e[0]=c*u+p*-a+d*-l-f*-s,e[1]=d*u+p*-s+f*-a-c*-l,e[2]=f*u+p*-l+c*-s-d*-a,e[3]=t[3],e}},1272:function(e,t,n){var r;
36
36
  /*! Hammer.JS - v2.0.7 - 2016-04-22
37
37
  * http://hammerjs.github.io/
38
38
  *