@mapgis/mapbox-gl-draw-radius 16.4.0 → 17.0.0
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/package.json +24 -24
- package/dist/radius-mode.js +0 -19343
- package/dist/radius-mode.min.js +0 -8
package/dist/radius-mode.min.js
DELETED
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
"use strict";function t(t){if(t&&t.__esModule)return t;var e=Object.create(null);return t&&Object.keys(t).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:function(){return t[n]}})}})),e.default=t,Object.freeze(e)}var e=t(require("@turf/turf")),n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function r(t){var e={exports:{}};return t(e,e.exports),e.exports}var o=r((function(t,e){t.exports=function(){var t=function(t,e){var n={drag:[],click:[],mousemove:[],mousedown:[],mouseup:[],mouseout:[],keydown:[],keyup:[],touchstart:[],touchmove:[],touchend:[],tap:[]},r={on:function(t,e,r){if(void 0===n[t])throw new Error("Invalid event type: "+t);n[t].push({selector:e,fn:r})},render:function(t){e.store.featureChanged(t)}},o=function(t,o){for(var i=n[t],u=i.length;u--;){var a=i[u];if(a.selector(o)){a.fn.call(r,o)||e.store.render(),e.ui.updateMapClasses();break}}};return t.start.call(r),{render:t.render,stop:function(){t.stop&&t.stop()},trash:function(){t.trash&&(t.trash(),e.store.render())},combineFeatures:function(){t.combineFeatures&&t.combineFeatures()},uncombineFeatures:function(){t.uncombineFeatures&&t.uncombineFeatures()},drag:function(t){o("drag",t)},click:function(t){o("click",t)},mousemove:function(t){o("mousemove",t)},mousedown:function(t){o("mousedown",t)},mouseup:function(t){o("mouseup",t)},mouseout:function(t){o("mouseout",t)},keydown:function(t){o("keydown",t)},keyup:function(t){o("keyup",t)},touchstart:function(t){o("touchstart",t)},touchmove:function(t){o("touchmove",t)},touchend:function(t){o("touchend",t)},tap:function(t){o("tap",t)}}},e=6378137;function r(t){var e=0;if(t&&t.length>0){e+=Math.abs(o(t[0]));for(var n=1;n<t.length;n++)e-=Math.abs(o(t[n]))}return e}function o(t){var n,r,o,u,a,c,s=0,l=t.length;if(l>2){for(c=0;c<l;c++)c===l-2?(o=l-2,u=l-1,a=0):c===l-1?(o=l-1,u=0,a=1):(o=c,u=c+1,a=c+2),n=t[o],r=t[u],s+=(i(t[a][0])-i(n[0]))*Math.sin(i(r[1]));s=s*e*e/2}return s}function i(t){return t*Math.PI/180}var u={geometry:function t(e){var n,o=0;switch(e.type){case"Polygon":return r(e.coordinates);case"MultiPolygon":for(n=0;n<e.coordinates.length;n++)o+=r(e.coordinates[n]);return o;case"Point":case"MultiPoint":case"LineString":case"MultiLineString":return 0;case"GeometryCollection":for(n=0;n<e.geometries.length;n++)o+=t(e.geometries[n]);return o}},ring:o},a="mapboxgl-ctrl",c="mapbox-gl-draw_ctrl-draw-btn",s="mapbox-gl-draw_line",l="mapbox-gl-draw_polygon",f="mapbox-gl-draw_point",p="mapbox-gl-draw_trash",h="mapbox-gl-draw_combine",d="mapbox-gl-draw_uncombine",g="mapboxgl-ctrl-group",v="active",y="mapbox-gl-draw_boxselect",_="mapbox-gl-draw-hot",m="mapbox-gl-draw-cold",b="add",w="move",x="drag",S="pointer",M="none",C={POLYGON:"polygon",LINE:"line_string",POINT:"point"},E="Feature",I="Polygon",F="LineString",L="Point",P="FeatureCollection",k="Multi",O="MultiPoint",j="MultiLineString",A="MultiPolygon",T={DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select",STATIC:"static"},N="draw.create",D="draw.delete",R="draw.update",B="draw.selectionchange",U="draw.modechange",z="draw.actionable",$="draw.render",V="draw.combine",W="draw.uncombine",G="move",J="change_coordinates",q="feature",Z="midpoint",K="vertex",Y="true",H="false",X=["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],Q={Point:0,LineString:1,Polygon:2};function tt(t,e){var n=Q[t.geometry.type]-Q[e.geometry.type];return 0===n&&t.geometry.type===I?t.area-e.area:n}function et(t){if(this._items={},this._nums={},this._length=t?t.length:0,t)for(var e=0,n=t.length;e<n;e++)this.add(t[e]),void 0!==t[e]&&("string"==typeof t[e]?this._items[t[e]]=e:this._nums[t[e]]=e)}et.prototype.add=function(t){return this.has(t)||(this._length++,"string"==typeof t?this._items[t]=this._length:this._nums[t]=this._length),this},et.prototype.delete=function(t){return!1===this.has(t)||(this._length--,delete this._items[t],delete this._nums[t]),this},et.prototype.has=function(t){return!("string"!=typeof t&&"number"!=typeof t||void 0===this._items[t]&&void 0===this._nums[t])},et.prototype.values=function(){var t=this,e=[];return Object.keys(this._items).forEach((function(n){e.push({k:n,v:t._items[n]})})),Object.keys(this._nums).forEach((function(n){e.push({k:JSON.parse(n),v:t._nums[n]})})),e.sort((function(t,e){return t.v-e.v})).map((function(t){return t.k}))},et.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};var nt=[q,Z,K],rt={click:function(t,e,n){return ot(t,e,n,n.options.clickBuffer)},touch:function(t,e,n){return ot(t,e,n,n.options.touchBuffer)}};function ot(t,e,n,r){if(null===n.map)return[];var o=t?function(t,e){return void 0===e&&(e=0),[[t.point.x-e,t.point.y-e],[t.point.x+e,t.point.y+e]]}(t,r):e,i={};n.options.styles&&(i.layers=n.options.styles.map((function(t){return t.id})));var a=n.map.queryRenderedFeatures(o,i).filter((function(t){return-1!==nt.indexOf(t.properties.meta)})),c=new et,s=[];return a.forEach((function(t){var e=t.properties.id;c.has(e)||(c.add(e),s.push(t))})),function(t){return t.map((function(t){return t.geometry.type===I&&(t.area=u.geometry({type:E,property:{},geometry:t.geometry})),t})).sort(tt).map((function(t){return delete t.area,t}))}(s)}function it(t,e){var n=rt.click(t,null,e),r={mouse:M};return n[0]&&(r.mouse=n[0].properties.active===Y?w:S,r.feature=n[0].properties.meta),-1!==e.events.currentModeName().indexOf("draw")&&(r.mouse=b),e.ui.queueMapClasses(r),e.ui.updateMapClasses(),n[0]}function ut(t,e){var n=t.x-e.x,r=t.y-e.y;return Math.sqrt(n*n+r*r)}function at(t,e,n){void 0===n&&(n={});var r=null!=n.fineTolerance?n.fineTolerance:4,o=null!=n.grossTolerance?n.grossTolerance:12,i=null!=n.interval?n.interval:500;t.point=t.point||e.point,t.time=t.time||e.time;var u=ut(t.point,e.point);return u<r||u<o&&e.time-t.time<i}function ct(t,e,n){void 0===n&&(n={});var r=null!=n.tolerance?n.tolerance:25,o=null!=n.interval?n.interval:250;return t.point=t.point||e.point,t.time=t.time||e.time,ut(t.point,e.point)<r&&e.time-t.time<o}function st(t,e){return t(e={exports:{}},e.exports),e.exports}var lt=st((function(t){var e=t.exports=function(t,n){if(n||(n=16),void 0===t&&(t=128),t<=0)return"0";for(var r=Math.log(Math.pow(2,t))/Math.log(n),o=2;r===1/0;o*=2)r=Math.log(Math.pow(2,t/o))/Math.log(n)*o;var i=r-Math.floor(r),u="";for(o=0;o<Math.floor(r);o++)u=Math.floor(Math.random()*n).toString(n)+u;if(i){var a=Math.pow(n,i);u=Math.floor(Math.random()*a).toString(n)+u}var c=parseInt(u,n);return c!==1/0&&c>=Math.pow(2,t)?e(t,n):u};e.rack=function(t,n,r){var o=function(o){var u=0;do{if(u++>10){if(!r)throw new Error("too many ID collisions, use more bits");t+=r}var a=e(t,n)}while(Object.hasOwnProperty.call(i,a));return i[a]=o,a},i=o.hats={};return o.get=function(t){return o.hats[t]},o.set=function(t,e){return o.hats[t]=e,o},o.bits=t||128,o.base=n||16,o}})),ft=function(t,e){this.ctx=t,this.properties=e.properties||{},this.coordinates=e.geometry.coordinates,this.id=e.id||lt(),this.type=e.geometry.type};ft.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},ft.prototype.incomingCoords=function(t){this.setCoordinates(t)},ft.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},ft.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},ft.prototype.setProperty=function(t,e){this.properties[t]=e},ft.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:E,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},ft.prototype.internal=function(t){var e={id:this.id,meta:q,"meta:type":this.type,active:H,mode:t};if(this.ctx.options.userProperties)for(var n in this.properties)e["user_"+n]=this.properties[n];return{type:E,properties:e,geometry:{coordinates:this.getCoordinates(),type:this.type}}};var pt=function(t,e){ft.call(this,t,e)};(pt.prototype=Object.create(ft.prototype)).isValid=function(){return"number"==typeof this.coordinates[0]&&"number"==typeof this.coordinates[1]},pt.prototype.updateCoordinate=function(t,e,n){this.coordinates=3===arguments.length?[e,n]:[t,e],this.changed()},pt.prototype.getCoordinate=function(){return this.getCoordinates()};var ht=function(t,e){ft.call(this,t,e)};(ht.prototype=Object.create(ft.prototype)).isValid=function(){return this.coordinates.length>1},ht.prototype.addCoordinate=function(t,e,n){this.changed();var r=parseInt(t,10);this.coordinates.splice(r,0,[e,n])},ht.prototype.getCoordinate=function(t){var e=parseInt(t,10);return JSON.parse(JSON.stringify(this.coordinates[e]))},ht.prototype.removeCoordinate=function(t){this.changed(),this.coordinates.splice(parseInt(t,10),1)},ht.prototype.updateCoordinate=function(t,e,n){var r=parseInt(t,10);this.coordinates[r]=[e,n],this.changed()};var dt=function(t,e){ft.call(this,t,e),this.coordinates=this.coordinates.map((function(t){return t.slice(0,-1)}))};(dt.prototype=Object.create(ft.prototype)).isValid=function(){return 0!==this.coordinates.length&&this.coordinates.every((function(t){return t.length>2}))},dt.prototype.incomingCoords=function(t){this.coordinates=t.map((function(t){return t.slice(0,-1)})),this.changed()},dt.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},dt.prototype.addCoordinate=function(t,e,n){this.changed();var r=t.split(".").map((function(t){return parseInt(t,10)}));this.coordinates[r[0]].splice(r[1],0,[e,n])},dt.prototype.removeCoordinate=function(t){this.changed();var e=t.split(".").map((function(t){return parseInt(t,10)})),n=this.coordinates[e[0]];n&&(n.splice(e[1],1),n.length<3&&this.coordinates.splice(e[0],1))},dt.prototype.getCoordinate=function(t){var e=t.split(".").map((function(t){return parseInt(t,10)})),n=this.coordinates[e[0]];return JSON.parse(JSON.stringify(n[e[1]]))},dt.prototype.getCoordinates=function(){return this.coordinates.map((function(t){return t.concat([t[0]])}))},dt.prototype.updateCoordinate=function(t,e,n){this.changed();var r=t.split("."),o=parseInt(r[0],10),i=parseInt(r[1],10);void 0===this.coordinates[o]&&(this.coordinates[o]=[]),this.coordinates[o][i]=[e,n]};var gt={MultiPoint:pt,MultiLineString:ht,MultiPolygon:dt},vt=function(t,e,n,r,o){var i=n.split("."),u=parseInt(i[0],10),a=i[1]?i.slice(1).join("."):null;return t[u][e](a,r,o)},yt=function(t,e){if(ft.call(this,t,e),delete this.coordinates,this.model=gt[e.geometry.type],void 0===this.model)throw new TypeError(e.geometry.type+" is not a valid type");this.features=this._coordinatesToFeatures(e.geometry.coordinates)};function _t(t){this.map=t.map,this.drawConfig=JSON.parse(JSON.stringify(t.options||{})),this._ctx=t}(yt.prototype=Object.create(ft.prototype))._coordinatesToFeatures=function(t){var e=this,n=this.model.bind(this);return t.map((function(t){return new n(e.ctx,{id:lt(),type:E,properties:{},geometry:{coordinates:t,type:e.type.replace("Multi","")}})}))},yt.prototype.isValid=function(){return this.features.every((function(t){return t.isValid()}))},yt.prototype.setCoordinates=function(t){this.features=this._coordinatesToFeatures(t),this.changed()},yt.prototype.getCoordinate=function(t){return vt(this.features,"getCoordinate",t)},yt.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map((function(t){return t.type===I?t.getCoordinates():t.coordinates}))))},yt.prototype.updateCoordinate=function(t,e,n){vt(this.features,"updateCoordinate",t,e,n),this.changed()},yt.prototype.addCoordinate=function(t,e,n){vt(this.features,"addCoordinate",t,e,n),this.changed()},yt.prototype.removeCoordinate=function(t){vt(this.features,"removeCoordinate",t),this.changed()},yt.prototype.getFeatures=function(){return this.features},_t.prototype.setSelected=function(t){return this._ctx.store.setSelected(t)},_t.prototype.setSelectedCoordinates=function(t){var e=this;this._ctx.store.setSelectedCoordinates(t),t.reduce((function(t,n){return void 0===t[n.feature_id]&&(t[n.feature_id]=!0,e._ctx.store.get(n.feature_id).changed()),t}),{})},_t.prototype.getSelected=function(){return this._ctx.store.getSelected()},_t.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},_t.prototype.isSelected=function(t){return this._ctx.store.isSelected(t)},_t.prototype.getFeature=function(t){return this._ctx.store.get(t)},_t.prototype.select=function(t){return this._ctx.store.select(t)},_t.prototype.deselect=function(t){return this._ctx.store.deselect(t)},_t.prototype.deleteFeature=function(t,e){return void 0===e&&(e={}),this._ctx.store.delete(t,e)},_t.prototype.addFeature=function(t){return this._ctx.store.add(t)},_t.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},_t.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},_t.prototype.setActionableState=function(t){void 0===t&&(t={});var e={trash:t.trash||!1,combineFeatures:t.combineFeatures||!1,uncombineFeatures:t.uncombineFeatures||!1};return this._ctx.events.actionable(e)},_t.prototype.changeMode=function(t,e,n){return void 0===e&&(e={}),void 0===n&&(n={}),this._ctx.events.changeMode(t,e,n)},_t.prototype.updateUIClasses=function(t){return this._ctx.ui.queueMapClasses(t)},_t.prototype.activateUIButton=function(t){return this._ctx.ui.setActiveButton(t)},_t.prototype.featuresAt=function(t,e,n){if(void 0===n&&(n="click"),"click"!==n&&"touch"!==n)throw new Error("invalid buffer type");return rt[n](t,e,this._ctx)},_t.prototype.newFeature=function(t){var e=t.geometry.type;return e===L?new pt(this._ctx,t):e===F?new ht(this._ctx,t):e===I?new dt(this._ctx,t):new yt(this._ctx,t)},_t.prototype.isInstanceOf=function(t,e){if(t===L)return e instanceof pt;if(t===F)return e instanceof ht;if(t===I)return e instanceof dt;if("MultiFeature"===t)return e instanceof yt;throw new Error("Unknown feature class: "+t)},_t.prototype.doRender=function(t){return this._ctx.store.featureChanged(t)},_t.prototype.onSetup=function(){},_t.prototype.onDrag=function(){},_t.prototype.onClick=function(){},_t.prototype.onMouseMove=function(){},_t.prototype.onMouseDown=function(){},_t.prototype.onMouseUp=function(){},_t.prototype.onMouseOut=function(){},_t.prototype.onKeyUp=function(){},_t.prototype.onKeyDown=function(){},_t.prototype.onTouchStart=function(){},_t.prototype.onTouchMove=function(){},_t.prototype.onTouchEnd=function(){},_t.prototype.onTap=function(){},_t.prototype.onStop=function(){},_t.prototype.onTrash=function(){},_t.prototype.onCombineFeature=function(){},_t.prototype.onUncombineFeature=function(){},_t.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")};var mt={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},bt=Object.keys(mt);function wt(t){var e=Object.keys(t);return function(n,r){void 0===r&&(r={});var o={},i=e.reduce((function(e,n){return e[n]=t[n],e}),new _t(n));return{start:function(){var e=this;o=i.onSetup(r),bt.forEach((function(n){var r,u=mt[n],a=function(){return!1};t[u]&&(a=function(){return!0}),e.on(n,a,(r=u,function(t){return i[r](o,t)}))}))},stop:function(){i.onStop(o)},trash:function(){i.onTrash(o)},combineFeatures:function(){i.onCombineFeatures(o)},uncombineFeatures:function(){i.onUncombineFeatures(o)},render:function(t,e){i.toDisplayFeatures(o,t,e)}}}}function xt(t){return[].concat(t).filter((function(t){return void 0!==t}))}function St(){var t=this;if(!t.ctx.map||void 0===t.ctx.map.getSource(_))return c();var e=t.ctx.events.currentModeName();t.ctx.ui.queueMapClasses({mode:e});var n=[],r=[];t.isDirty?r=t.getAllIds():(n=t.getChangedIds().filter((function(e){return void 0!==t.get(e)})),r=t.sources.hot.filter((function(e){return e.properties.id&&-1===n.indexOf(e.properties.id)&&void 0!==t.get(e.properties.id)})).map((function(t){return t.properties.id}))),t.sources.hot=[];var o=t.sources.cold.length;t.sources.cold=t.isDirty?[]:t.sources.cold.filter((function(t){var e=t.properties.id||t.properties.parent;return-1===n.indexOf(e)}));var i=o!==t.sources.cold.length||r.length>0;function u(n,r){var o=t.get(n).internal(e);t.ctx.events.currentModeRender(o,(function(e){t.sources[r].push(e)}))}if(n.forEach((function(t){return u(t,"hot")})),r.forEach((function(t){return u(t,"cold")})),i&&t.ctx.map.getSource(m).setData({type:P,features:t.sources.cold}),t.ctx.map.getSource(_).setData({type:P,features:t.sources.hot}),t._emitSelectionChange&&(t.ctx.map.fire(B,{features:t.getSelected().map((function(t){return t.toGeoJSON()})),points:t.getSelectedCoordinates().map((function(t){return{type:E,properties:{},geometry:{type:L,coordinates:t.coordinates}}}))}),t._emitSelectionChange=!1),t._deletedFeaturesToEmit.length){var a=t._deletedFeaturesToEmit.map((function(t){return t.toGeoJSON()}));t._deletedFeaturesToEmit=[],t.ctx.map.fire(D,{features:a})}function c(){t.isDirty=!1,t.clearChangedIds()}c(),t.ctx.map.fire($,{})}function Mt(t){var e,n=this;this._features={},this._featureIds=new et,this._selectedFeatureIds=new et,this._selectedCoordinates=[],this._changedFeatureIds=new et,this._deletedFeaturesToEmit=[],this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=t,this.sources={hot:[],cold:[]},this.render=function(){e||(e=requestAnimationFrame((function(){e=null,St.call(n)})))},this.isDirty=!1}function Ct(t,e){var n=t._selectedCoordinates.filter((function(e){return t._selectedFeatureIds.has(e.feature_id)}));t._selectedCoordinates.length===n.length||e.silent||(t._emitSelectionChange=!0),t._selectedCoordinates=n}Mt.prototype.createRenderBatch=function(){var t=this,e=this.render,n=0;return this.render=function(){n++},function(){t.render=e,n>0&&t.render()}},Mt.prototype.setDirty=function(){return this.isDirty=!0,this},Mt.prototype.featureChanged=function(t){return this._changedFeatureIds.add(t),this},Mt.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},Mt.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},Mt.prototype.getAllIds=function(){return this._featureIds.values()},Mt.prototype.add=function(t){return this.featureChanged(t.id),this._features[t.id]=t,this._featureIds.add(t.id),this},Mt.prototype.delete=function(t,e){var n=this;return void 0===e&&(e={}),xt(t).forEach((function(t){n._featureIds.has(t)&&(n._featureIds.delete(t),n._selectedFeatureIds.delete(t),e.silent||-1===n._deletedFeaturesToEmit.indexOf(n._features[t])&&n._deletedFeaturesToEmit.push(n._features[t]),delete n._features[t],n.isDirty=!0)})),Ct(this,e),this},Mt.prototype.get=function(t){return this._features[t]},Mt.prototype.getAll=function(){var t=this;return Object.keys(this._features).map((function(e){return t._features[e]}))},Mt.prototype.select=function(t,e){var n=this;return void 0===e&&(e={}),xt(t).forEach((function(t){n._selectedFeatureIds.has(t)||(n._selectedFeatureIds.add(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))})),this},Mt.prototype.deselect=function(t,e){var n=this;return void 0===e&&(e={}),xt(t).forEach((function(t){n._selectedFeatureIds.has(t)&&(n._selectedFeatureIds.delete(t),n._changedFeatureIds.add(t),e.silent||(n._emitSelectionChange=!0))})),Ct(this,e),this},Mt.prototype.clearSelected=function(t){return void 0===t&&(t={}),this.deselect(this._selectedFeatureIds.values(),{silent:t.silent}),this},Mt.prototype.setSelected=function(t,e){var n=this;return void 0===e&&(e={}),t=xt(t),this.deselect(this._selectedFeatureIds.values().filter((function(e){return-1===t.indexOf(e)})),{silent:e.silent}),this.select(t.filter((function(t){return!n._selectedFeatureIds.has(t)})),{silent:e.silent}),this},Mt.prototype.setSelectedCoordinates=function(t){return this._selectedCoordinates=t,this._emitSelectionChange=!0,this},Mt.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},Mt.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},Mt.prototype.getSelected=function(){var t=this;return this._selectedFeatureIds.values().map((function(e){return t.get(e)}))},Mt.prototype.getSelectedCoordinates=function(){var t=this;return this._selectedCoordinates.map((function(e){return{coordinates:t.get(e.feature_id).getCoordinate(e.coord_path)}}))},Mt.prototype.isSelected=function(t){return this._selectedFeatureIds.has(t)},Mt.prototype.setFeatureProperty=function(t,e,n){this.get(t).setProperty(e,n),this.featureChanged(t)},Mt.prototype.storeMapConfig=function(){var t=this;X.forEach((function(e){t.ctx.map[e]&&(t._mapInitialConfig[e]=t.ctx.map[e].isEnabled())}))},Mt.prototype.restoreMapConfig=function(){var t=this;Object.keys(this._mapInitialConfig).forEach((function(e){t._mapInitialConfig[e]?t.ctx.map[e].enable():t.ctx.map[e].disable()}))},Mt.prototype.getInitialConfigValue=function(t){return void 0===this._mapInitialConfig[t]||this._mapInitialConfig[t]};var Et=function(){for(var t=arguments,e={},n=0;n<arguments.length;n++){var r=t[n];for(var o in r)It.call(r,o)&&(e[o]=r[o])}return e},It=Object.prototype.hasOwnProperty,Ft=["mode","feature","mouse"];function Lt(e){var n=null,r=null,o={onRemove:function(){return e.map.off("load",o.connect),clearInterval(r),o.removeLayers(),e.store.restoreMapConfig(),e.ui.removeButtons(),e.events.removeEventListeners(),e.ui.clearMapClasses(),e.map=null,e.container=null,e.store=null,n&&n.parentNode&&n.parentNode.removeChild(n),n=null,this},connect:function(){e.map.off("load",o.connect),clearInterval(r),o.addLayers(),e.store.storeMapConfig(),e.events.addEventListeners()},onAdd:function(i){var u=i.fire;return i.fire=function(t,e){var n=arguments;return 1===u.length&&1!==arguments.length&&(n=[Et({},{type:t},e)]),u.apply(i,n)},e.map=i,e.events=function(e){var n=Object.keys(e.options.modes).reduce((function(t,n){return t[n]=wt(e.options.modes[n]),t}),{}),r={},o={},i={},u=null,a=null;i.drag=function(t,n){n({point:t.point,time:(new Date).getTime()})?(e.ui.queueMapClasses({mouse:x}),a.drag(t)):t.originalEvent.stopPropagation()},i.mousedrag=function(t){i.drag(t,(function(t){return!at(r,t)}))},i.touchdrag=function(t){i.drag(t,(function(t){return!ct(o,t)}))},i.mousemove=function(t){if(1===(void 0!==t.originalEvent.buttons?t.originalEvent.buttons:t.originalEvent.which))return i.mousedrag(t);var n=it(t,e);t.featureTarget=n,a.mousemove(t)},i.mousedown=function(t){r={time:(new Date).getTime(),point:t.point};var n=it(t,e);t.featureTarget=n,a.mousedown(t)},i.mouseup=function(t){var n=it(t,e);t.featureTarget=n,at(r,{point:t.point,time:(new Date).getTime()})?a.click(t):a.mouseup(t)},i.mouseout=function(t){a.mouseout(t)},i.touchstart=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){o={time:(new Date).getTime(),point:t.point};var n=rt.touch(t,null,e)[0];t.featureTarget=n,a.touchstart(t)}},i.touchmove=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled)return a.touchmove(t),i.touchdrag(t)},i.touchend=function(t){if(t.originalEvent.preventDefault(),e.options.touchEnabled){var n=rt.touch(t,null,e)[0];t.featureTarget=n,ct(o,{time:(new Date).getTime(),point:t.point})?a.tap(t):a.touchend(t)}};var c=function(t){return!(8===t||46===t||t>=48&&t<=57)};function s(r,o,i){void 0===i&&(i={}),a.stop();var c=n[r];if(void 0===c)throw new Error(r+" is not valid");u=r;var s=c(e,o);a=t(s,e),i.silent||e.map.fire(U,{mode:r}),e.store.setDirty(),e.store.render()}i.keydown=function(t){"mapboxgl-canvas"===(t.srcElement||t.target).classList[0]&&(8!==t.keyCode&&46!==t.keyCode||!e.options.controls.trash?c(t.keyCode)?a.keydown(t):49===t.keyCode&&e.options.controls.point?s(T.DRAW_POINT):50===t.keyCode&&e.options.controls.line_string?s(T.DRAW_LINE_STRING):51===t.keyCode&&e.options.controls.polygon&&s(T.DRAW_POLYGON):(t.preventDefault(),a.trash()))},i.keyup=function(t){c(t.keyCode)&&a.keyup(t)},i.zoomend=function(){e.store.changeZoom()},i.data=function(t){if("style"===t.dataType){var n=e.setup,r=e.map,o=e.options,i=e.store;o.styles.some((function(t){return r.getLayer(t.id)}))||(n.addLayers(),i.setDirty(),i.render())}};var l={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start:function(){u=e.options.defaultMode,a=t(n[u](e),e)},changeMode:s,actionable:function(t){var n=!1;Object.keys(t).forEach((function(e){if(void 0===l[e])throw new Error("Invalid action type");l[e]!==t[e]&&(n=!0),l[e]=t[e]})),n&&e.map.fire(z,{actions:l})},currentModeName:function(){return u},currentModeRender:function(t,e){return a.render(t,e)},fire:function(t,e){i[t]&&i[t](e)},addEventListeners:function(){e.map.on("mousemove",i.mousemove),e.map.on("mousedown",i.mousedown),e.map.on("mouseup",i.mouseup),e.map.on("data",i.data),e.map.on("touchmove",i.touchmove),e.map.on("touchstart",i.touchstart),e.map.on("touchend",i.touchend),e.container.addEventListener("mouseout",i.mouseout),e.options.keybindings&&(e.container.addEventListener("keydown",i.keydown),e.container.addEventListener("keyup",i.keyup))},removeEventListeners:function(){e.map.off("mousemove",i.mousemove),e.map.off("mousedown",i.mousedown),e.map.off("mouseup",i.mouseup),e.map.off("data",i.data),e.map.off("touchmove",i.touchmove),e.map.off("touchstart",i.touchstart),e.map.off("touchend",i.touchend),e.container.removeEventListener("mouseout",i.mouseout),e.options.keybindings&&(e.container.removeEventListener("keydown",i.keydown),e.container.removeEventListener("keyup",i.keyup))},trash:function(t){a.trash(t)},combineFeatures:function(){a.combineFeatures()},uncombineFeatures:function(){a.uncombineFeatures()},getMode:function(){return u}}}(e),e.ui=function(t){var e={},n=null,r={mode:null,feature:null,mouse:null},o={mode:null,feature:null,mouse:null};function i(t){o=Et(o,t)}function u(){var e,n;if(t.container){var i=[],u=[];Ft.forEach((function(t){o[t]!==r[t]&&(i.push(t+"-"+r[t]),null!==o[t]&&u.push(t+"-"+o[t]))})),i.length>0&&(e=t.container.classList).remove.apply(e,i),u.length>0&&(n=t.container.classList).add.apply(n,u),r=Et(r,o)}}function y(t,e){void 0===e&&(e={});var r=document.createElement("button");return r.className=c+" "+e.className,r.setAttribute("title",e.title),e.container.appendChild(r),r.addEventListener("click",(function(r){if(r.preventDefault(),r.stopPropagation(),r.target===n)return _(),void e.onDeactivate();m(t),e.onActivate()}),!0),r}function _(){n&&(n.classList.remove(v),n=null)}function m(t){_();var r=e[t];r&&r&&"trash"!==t&&(r.classList.add(v),n=r)}return{setActiveButton:m,queueMapClasses:i,updateMapClasses:u,clearMapClasses:function(){i({mode:null,feature:null,mouse:null}),u()},addButtons:function(){var n=t.options.controls,r=document.createElement("div");return r.className=g+" "+a,n?(n[C.LINE]&&(e[C.LINE]=y(C.LINE,{container:r,className:s,title:"LineString tool "+(t.options.keybindings?"(l)":""),onActivate:function(){return t.events.changeMode(T.DRAW_LINE_STRING)},onDeactivate:function(){return t.events.trash()}})),n[C.POLYGON]&&(e[C.POLYGON]=y(C.POLYGON,{container:r,className:l,title:"Polygon tool "+(t.options.keybindings?"(p)":""),onActivate:function(){return t.events.changeMode(T.DRAW_POLYGON)},onDeactivate:function(){return t.events.trash()}})),n[C.POINT]&&(e[C.POINT]=y(C.POINT,{container:r,className:f,title:"Marker tool "+(t.options.keybindings?"(m)":""),onActivate:function(){return t.events.changeMode(T.DRAW_POINT)},onDeactivate:function(){return t.events.trash()}})),n.trash&&(e.trash=y("trash",{container:r,className:p,title:"Delete",onActivate:function(){t.events.trash()}})),n.combine_features&&(e.combine_features=y("combineFeatures",{container:r,className:h,title:"Combine",onActivate:function(){t.events.combineFeatures()}})),n.uncombine_features&&(e.uncombine_features=y("uncombineFeatures",{container:r,className:d,title:"Uncombine",onActivate:function(){t.events.uncombineFeatures()}})),r):r},removeButtons:function(){Object.keys(e).forEach((function(t){var n=e[t];n.parentNode&&n.parentNode.removeChild(n),delete e[t]}))}}}(e),e.container=i.getContainer(),e.store=new Mt(e),n=e.ui.addButtons(),e.options.boxSelect&&(i.boxZoom.disable(),i.dragPan.disable(),i.dragPan.enable()),i.loaded()?o.connect():(i.on("load",o.connect),r=setInterval((function(){i.loaded()&&o.connect()}),16)),e.events.start(),n},addLayers:function(){e.map.addSource(m,{data:{type:P,features:[]},type:"geojson"}),e.map.addSource(_,{data:{type:P,features:[]},type:"geojson"}),e.options.styles.forEach((function(t){e.map.addLayer(t)})),e.store.setDirty(!0),e.store.render()},removeLayers:function(){e.options.styles.forEach((function(t){e.map.getLayer(t.id)&&e.map.removeLayer(t.id)})),e.map.getSource(m)&&e.map.removeSource(m),e.map.getSource(_)&&e.map.removeSource(_)}};return e.setup=o,o}function Pt(t){return function(e){var n=e.featureTarget;return!!n&&!!n.properties&&n.properties.meta===t}}function kt(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===Y&&t.featureTarget.properties.meta===q}function Ot(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.active===H&&t.featureTarget.properties.meta===q}function jt(t){return void 0===t.featureTarget}function At(t){var e=t.featureTarget;return!!e&&!!e.properties&&e.properties.meta===K}function Tt(t){return!!t.originalEvent&&!0===t.originalEvent.shiftKey}function Nt(t){return 27===t.keyCode}function Dt(t){return 13===t.keyCode}var Rt=Bt;function Bt(t,e){this.x=t,this.y=e}function Ut(t,e){var n=e.getBoundingClientRect();return new Rt(t.clientX-n.left-(e.clientLeft||0),t.clientY-n.top-(e.clientTop||0))}function zt(t,e,n,r){return{type:E,properties:{meta:K,parent:t,coord_path:n,active:r?Y:H},geometry:{type:L,coordinates:e}}}function $t(t,e,n){void 0===e&&(e={}),void 0===n&&(n=null);var r,o=t.geometry,i=o.type,u=o.coordinates,a=t.properties&&t.properties.id,c=[];function s(t,n){var r="",o=null;t.forEach((function(t,i){var u=null!=n?n+"."+i:String(i),s=zt(a,t,u,l(u));if(e.midpoints&&o){var f=function(t,e,n){var r=e.geometry.coordinates,o=n.geometry.coordinates;if(r[1]>85||r[1]<-85||o[1]>85||o[1]<-85)return null;var i={lng:(r[0]+o[0])/2,lat:(r[1]+o[1])/2};return{type:E,properties:{meta:Z,parent:t,lng:i.lng,lat:i.lat,coord_path:n.properties.coord_path},geometry:{type:L,coordinates:[i.lng,i.lat]}}}(a,o,s);f&&c.push(f)}o=s;var p=JSON.stringify(t);r!==p&&c.push(s),0===i&&(r=p)}))}function l(t){return!!e.selectedPaths&&-1!==e.selectedPaths.indexOf(t)}return i===L?c.push(zt(a,u,n,l(n))):i===I?u.forEach((function(t,e){s(t,null!==n?n+"."+e:String(e))})):i===F?s(u,n):0===i.indexOf(k)&&(r=i.replace(k,""),u.forEach((function(n,o){var i={type:E,properties:t.properties,geometry:{type:r,coordinates:n}};c=c.concat($t(i,e,o))}))),c}Bt.prototype={clone:function(){return new Bt(this.x,this.y)},add:function(t){return this.clone()._add(t)},sub:function(t){return this.clone()._sub(t)},multByPoint:function(t){return this.clone()._multByPoint(t)},divByPoint:function(t){return this.clone()._divByPoint(t)},mult:function(t){return this.clone()._mult(t)},div:function(t){return this.clone()._div(t)},rotate:function(t){return this.clone()._rotate(t)},rotateAround:function(t,e){return this.clone()._rotateAround(t,e)},matMult:function(t){return this.clone()._matMult(t)},unit:function(){return this.clone()._unit()},perp:function(){return this.clone()._perp()},round:function(){return this.clone()._round()},mag:function(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals:function(t){return this.x===t.x&&this.y===t.y},dist:function(t){return Math.sqrt(this.distSqr(t))},distSqr:function(t){var e=t.x-this.x,n=t.y-this.y;return e*e+n*n},angle:function(){return Math.atan2(this.y,this.x)},angleTo:function(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith:function(t){return this.angleWithSep(t.x,t.y)},angleWithSep:function(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult:function(t){var e=t[0]*this.x+t[1]*this.y,n=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=n,this},_add:function(t){return this.x+=t.x,this.y+=t.y,this},_sub:function(t){return this.x-=t.x,this.y-=t.y,this},_mult:function(t){return this.x*=t,this.y*=t,this},_div:function(t){return this.x/=t,this.y/=t,this},_multByPoint:function(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint:function(t){return this.x/=t.x,this.y/=t.y,this},_unit:function(){return this._div(this.mag()),this},_perp:function(){var t=this.y;return this.y=this.x,this.x=-t,this},_rotate:function(t){var e=Math.cos(t),n=Math.sin(t),r=e*this.x-n*this.y,o=n*this.x+e*this.y;return this.x=r,this.y=o,this},_rotateAround:function(t,e){var n=Math.cos(t),r=Math.sin(t),o=e.x+n*(this.x-e.x)-r*(this.y-e.y),i=e.y+r*(this.x-e.x)+n*(this.y-e.y);return this.x=o,this.y=i,this},_round:function(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}},Bt.convert=function(t){return t instanceof Bt?t:Array.isArray(t)?new Bt(t[0],t[1]):t};var Vt=function(t){setTimeout((function(){t.map&&t.map.doubleClickZoom&&t._ctx&&t._ctx.store&&t._ctx.store.getInitialConfigValue&&t._ctx.store.getInitialConfigValue("doubleClickZoom")&&t.map.doubleClickZoom.enable()}),0)},Wt=function(t){setTimeout((function(){t.map&&t.map.doubleClickZoom&&t.map.doubleClickZoom.disable()}),0)},Gt=function(t){if(!t||!t.type)return null;var e=Jt[t.type];return e?"geometry"===e?{type:"FeatureCollection",features:[{type:"Feature",properties:{},geometry:t}]}:"feature"===e?{type:"FeatureCollection",features:[t]}:"featurecollection"===e?t:void 0:null},Jt={Point:"geometry",MultiPoint:"geometry",LineString:"geometry",MultiLineString:"geometry",Polygon:"geometry",MultiPolygon:"geometry",GeometryCollection:"geometry",Feature:"feature",FeatureCollection:"featurecollection"};function qt(t){switch(t&&t.type||null){case"FeatureCollection":return t.features=t.features.reduce((function(t,e){return t.concat(qt(e))}),[]),t;case"Feature":return t.geometry?qt(t.geometry).map((function(e){var n={type:"Feature",properties:JSON.parse(JSON.stringify(t.properties)),geometry:e};return void 0!==t.id&&(n.id=t.id),n})):[t];case"MultiPoint":return t.coordinates.map((function(t){return{type:"Point",coordinates:t}}));case"MultiPolygon":return t.coordinates.map((function(t){return{type:"Polygon",coordinates:t}}));case"MultiLineString":return t.coordinates.map((function(t){return{type:"LineString",coordinates:t}}));case"GeometryCollection":return t.geometries.map(qt).reduce((function(t,e){return t.concat(e)}),[]);case"Point":case"Polygon":case"LineString":return[t]}}var Zt=function(t){if(!t)return[];var e=qt(Gt(t)),n=[];return e.features.forEach((function(t){t.geometry&&(n=n.concat(function t(e){return Array.isArray(e)&&e.length&&"number"==typeof e[0]?[e]:e.reduce((function(e,n){return Array.isArray(n)&&Array.isArray(n[0])?e.concat(t(n)):(e.push(n),e)}),[])}(t.geometry.coordinates)))})),n},Kt=st((function(t){var e=t.exports=function(t){return new n(t)};function n(t){this.value=t}function r(t,e,n){var r=[],u=[],l=!0;return function t(f){var p=n?o(f):f,h={},d=!0,g={node:p,node_:f,path:[].concat(r),parent:u[u.length-1],parents:u,key:r.slice(-1)[0],isRoot:0===r.length,level:r.length,circular:null,update:function(t,e){g.isRoot||(g.parent.node[g.key]=t),g.node=t,e&&(d=!1)},delete:function(t){delete g.parent.node[g.key],t&&(d=!1)},remove:function(t){a(g.parent.node)?g.parent.node.splice(g.key,1):delete g.parent.node[g.key],t&&(d=!1)},keys:null,before:function(t){h.before=t},after:function(t){h.after=t},pre:function(t){h.pre=t},post:function(t){h.post=t},stop:function(){l=!1},block:function(){d=!1}};if(!l)return g;function v(){if("object"==typeof g.node&&null!==g.node){g.keys&&g.node_===g.node||(g.keys=i(g.node)),g.isLeaf=0==g.keys.length;for(var t=0;t<u.length;t++)if(u[t].node_===f){g.circular=u[t];break}}else g.isLeaf=!0,g.keys=null;g.notLeaf=!g.isLeaf,g.notRoot=!g.isRoot}v();var y=e.call(g,g.node);return void 0!==y&&g.update&&g.update(y),h.before&&h.before.call(g,g.node),d?("object"!=typeof g.node||null===g.node||g.circular||(u.push(g),v(),c(g.keys,(function(e,o){r.push(e),h.pre&&h.pre.call(g,g.node[e],e);var i=t(g.node[e]);n&&s.call(g.node,e)&&(g.node[e]=i.node),i.isLast=o==g.keys.length-1,i.isFirst=0==o,h.post&&h.post.call(g,i),r.pop()})),u.pop()),h.after&&h.after.call(g,g.node),g):g}(t).node}function o(t){if("object"==typeof t&&null!==t){var e;if(a(t))e=[];else if("[object Date]"===u(t))e=new Date(t.getTime?t.getTime():t);else if(function(t){return"[object RegExp]"===u(t)}(t))e=new RegExp(t);else if(function(t){return"[object Error]"===u(t)}(t))e={message:t.message};else if(function(t){return"[object Boolean]"===u(t)}(t))e=new Boolean(t);else if(function(t){return"[object Number]"===u(t)}(t))e=new Number(t);else if(function(t){return"[object String]"===u(t)}(t))e=new String(t);else if(Object.create&&Object.getPrototypeOf)e=Object.create(Object.getPrototypeOf(t));else if(t.constructor===Object)e={};else{var n=t.constructor&&t.constructor.prototype||t.__proto__||{},r=function(){};r.prototype=n,e=new r}return c(i(t),(function(n){e[n]=t[n]})),e}return t}n.prototype.get=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!s.call(e,r)){e=void 0;break}e=e[r]}return e},n.prototype.has=function(t){for(var e=this.value,n=0;n<t.length;n++){var r=t[n];if(!e||!s.call(e,r))return!1;e=e[r]}return!0},n.prototype.set=function(t,e){for(var n=this.value,r=0;r<t.length-1;r++){var o=t[r];s.call(n,o)||(n[o]={}),n=n[o]}return n[t[r]]=e,e},n.prototype.map=function(t){return r(this.value,t,!0)},n.prototype.forEach=function(t){return this.value=r(this.value,t,!1),this.value},n.prototype.reduce=function(t,e){var n=1===arguments.length,r=n?this.value:e;return this.forEach((function(e){this.isRoot&&n||(r=t.call(this,r,e))})),r},n.prototype.paths=function(){var t=[];return this.forEach((function(e){t.push(this.path)})),t},n.prototype.nodes=function(){var t=[];return this.forEach((function(e){t.push(this.node)})),t},n.prototype.clone=function(){var t=[],e=[];return function n(r){for(var u=0;u<t.length;u++)if(t[u]===r)return e[u];if("object"==typeof r&&null!==r){var a=o(r);return t.push(r),e.push(a),c(i(r),(function(t){a[t]=n(r[t])})),t.pop(),e.pop(),a}return r}(this.value)};var i=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e};function u(t){return Object.prototype.toString.call(t)}var a=Array.isArray||function(t){return"[object Array]"===Object.prototype.toString.call(t)},c=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n++)e(t[n],n,t)};c(i(n.prototype),(function(t){e[t]=function(e){var r=[].slice.call(arguments,1),o=new n(e);return o[t].apply(o,r)}}));var s=Object.hasOwnProperty||function(t,e){return e in t}})),Yt=Ht;function Ht(t){if(!(this instanceof Ht))return new Ht(t);this._bbox=t||[1/0,1/0,-1/0,-1/0],this._valid=!!t}Ht.prototype.include=function(t){return this._valid=!0,this._bbox[0]=Math.min(this._bbox[0],t[0]),this._bbox[1]=Math.min(this._bbox[1],t[1]),this._bbox[2]=Math.max(this._bbox[2],t[0]),this._bbox[3]=Math.max(this._bbox[3],t[1]),this},Ht.prototype.equals=function(t){var e;return e=t instanceof Ht?t.bbox():t,this._bbox[0]==e[0]&&this._bbox[1]==e[1]&&this._bbox[2]==e[2]&&this._bbox[3]==e[3]},Ht.prototype.center=function(t){return this._valid?[(this._bbox[0]+this._bbox[2])/2,(this._bbox[1]+this._bbox[3])/2]:null},Ht.prototype.union=function(t){var e;return this._valid=!0,e=t instanceof Ht?t.bbox():t,this._bbox[0]=Math.min(this._bbox[0],e[0]),this._bbox[1]=Math.min(this._bbox[1],e[1]),this._bbox[2]=Math.max(this._bbox[2],e[2]),this._bbox[3]=Math.max(this._bbox[3],e[3]),this},Ht.prototype.bbox=function(){return this._valid?this._bbox:null},Ht.prototype.contains=function(t){if(!t)return this._fastContains();if(!this._valid)return null;var e=t[0],n=t[1];return this._bbox[0]<=e&&this._bbox[1]<=n&&this._bbox[2]>=e&&this._bbox[3]>=n},Ht.prototype.intersect=function(t){return this._valid?(e=t instanceof Ht?t.bbox():t,!(this._bbox[0]>e[2]||this._bbox[2]<e[0]||this._bbox[3]<e[1]||this._bbox[1]>e[3])):null;var e},Ht.prototype._fastContains=function(){if(!this._valid)return new Function("return null;");var t="return "+this._bbox[0]+"<= ll[0] &&"+this._bbox[1]+"<= ll[1] &&"+this._bbox[2]+">= ll[0] &&"+this._bbox[3]+">= ll[1]";return new Function("ll",t)},Ht.prototype.polygon=function(){return this._valid?{type:"Polygon",coordinates:[[[this._bbox[0],this._bbox[1]],[this._bbox[2],this._bbox[1]],[this._bbox[2],this._bbox[3]],[this._bbox[0],this._bbox[3]],[this._bbox[0],this._bbox[1]]]]}:null};var Xt={features:["FeatureCollection"],coordinates:["Point","MultiPoint","LineString","MultiLineString","Polygon","MultiPolygon"],geometry:["Feature"],geometries:["GeometryCollection"]},Qt=Object.keys(Xt),te=function(t){return ee(t).bbox()};function ee(t){for(var e=Yt(),n=Zt(t),r=0;r<n.length;r++)e.include(n[r]);return e}function ne(t,e){var n=-90,r=90,o=-90,i=90,u=270,a=-270;t.forEach((function(t){var e=te(t),c=e[1],s=e[3],l=e[0],f=e[2];c>n&&(n=c),s<r&&(r=s),s>o&&(o=s),c<i&&(i=c),l<u&&(u=l),f>a&&(a=f)}));var c=e;return n+c.lat>85&&(c.lat=85-n),o+c.lat>90&&(c.lat=90-o),r+c.lat<-85&&(c.lat=-85-r),i+c.lat<-90&&(c.lat=-90-i),u+c.lng<=-270&&(c.lng+=360*Math.ceil(Math.abs(c.lng)/360)),a+c.lng>=270&&(c.lng-=360*Math.ceil(Math.abs(c.lng)/360)),c}function re(t,e){var n=ne(t.map((function(t){return t.toGeoJSON()})),e);t.forEach((function(t){var e,r=t.getCoordinates(),o=function(t){var e={lng:t[0]+n.lng,lat:t[1]+n.lat};return[e.lng,e.lat]},i=function(t){return t.map((function(t){return o(t)}))};t.type===L?e=o(r):t.type===F||t.type===O?e=r.map(o):t.type===I||t.type===j?e=r.map(i):t.type===A&&(e=r.map((function(t){return t.map((function(t){return i(t)}))}))),t.incomingCoords(e)}))}te.polygon=function(t){return ee(t).polygon()},te.bboxify=function(t){return Kt(t).map((function(t){t&&Qt.some((function(e){return!!t[e]&&-1!==Xt[e].indexOf(t.type)}))&&(t.bbox=ee(t).bbox(),this.update(t))}))};var oe={onSetup:function(t){var e=this,n={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initiallySelectedFeatureIds:t.featureIds||[]};return this.setSelected(n.initiallySelectedFeatureIds.filter((function(t){return void 0!==e.getFeature(t)}))),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),n},fireUpdate:function(){this.map.fire(R,{action:G,features:this.getSelected().map((function(t){return t.toGeoJSON()}))})},fireActionable:function(){var t=this,e=this.getSelected(),n=e.filter((function(e){return t.isInstanceOf("MultiFeature",e)})),r=!1;if(e.length>1){r=!0;var o=e[0].type.replace("Multi","");e.forEach((function(t){t.type.replace("Multi","")!==o&&(r=!1)}))}var i=n.length>0,u=e.length>0;this.setActionableState({combineFeatures:r,uncombineFeatures:i,trash:u})},getUniqueIds:function(t){return t.length?t.map((function(t){return t.properties.id})).filter((function(t){return void 0!==t})).reduce((function(t,e){return t.add(e),t}),new et).values():[]},stopExtendedInteractions:function(t){t.boxSelectElement&&(t.boxSelectElement.parentNode&&t.boxSelectElement.parentNode.removeChild(t.boxSelectElement),t.boxSelectElement=null),this.map.dragPan.enable(),t.boxSelecting=!1,t.canBoxSelect=!1,t.dragMoving=!1,t.canDragMove=!1},onStop:function(){Vt(this)},onMouseMove:function(t){return this.stopExtendedInteractions(t),!0},onMouseOut:function(t){return!t.dragMoving||this.fireUpdate()}};oe.onTap=oe.onClick=function(t,e){return jt(e)?this.clickAnywhere(t,e):Pt(K)(e)?this.clickOnVertex(t,e):function(t){return!!t.featureTarget&&!!t.featureTarget.properties&&t.featureTarget.properties.meta===q}(e)?this.clickOnFeature(t,e):void 0},oe.clickAnywhere=function(t){var e=this,n=this.getSelectedIds();n.length&&(this.clearSelectedFeatures(),n.forEach((function(t){return e.doRender(t)}))),Vt(this),this.stopExtendedInteractions(t)},oe.clickOnVertex=function(t,e){this.changeMode(T.DIRECT_SELECT,{featureId:e.featureTarget.properties.parent,coordPath:e.featureTarget.properties.coord_path,startPos:e.lngLat}),this.updateUIClasses({mouse:w})},oe.startOnActiveFeature=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),this.doRender(e.featureTarget.properties.id),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},oe.clickOnFeature=function(t,e){var n=this;Wt(this),this.stopExtendedInteractions(t);var r=Tt(e),o=this.getSelectedIds(),i=e.featureTarget.properties.id,u=this.isSelected(i);if(!r&&u&&this.getFeature(i).type!==L)return this.changeMode(T.DIRECT_SELECT,{featureId:i});u&&r?(this.deselect(i),this.updateUIClasses({mouse:S}),1===o.length&&Vt(this)):!u&&r?(this.select(i),this.updateUIClasses({mouse:w})):u||r||(o.forEach((function(t){return n.doRender(t)})),this.setSelected(i),this.updateUIClasses({mouse:w})),this.doRender(i)},oe.onMouseDown=function(t,e){return kt(e)?this.startOnActiveFeature(t,e):this.drawConfig.boxSelect&&function(t){return!!t.originalEvent&&!!t.originalEvent.shiftKey&&0===t.originalEvent.button}(e)?this.startBoxSelect(t,e):void 0},oe.startBoxSelect=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),t.boxSelectStartLocation=Ut(e.originalEvent,this.map.getContainer()),t.canBoxSelect=!0},oe.onTouchStart=function(t,e){if(kt(e))return this.startOnActiveFeature(t,e)},oe.onDrag=function(t,e){return t.canDragMove?this.dragMove(t,e):this.drawConfig.boxSelect&&t.canBoxSelect?this.whileBoxSelect(t,e):void 0},oe.whileBoxSelect=function(t,e){t.boxSelecting=!0,this.updateUIClasses({mouse:b}),t.boxSelectElement||(t.boxSelectElement=document.createElement("div"),t.boxSelectElement.classList.add(y),this.map.getContainer().appendChild(t.boxSelectElement));var n=Ut(e.originalEvent,this.map.getContainer()),r=Math.min(t.boxSelectStartLocation.x,n.x),o=Math.max(t.boxSelectStartLocation.x,n.x),i=Math.min(t.boxSelectStartLocation.y,n.y),u=Math.max(t.boxSelectStartLocation.y,n.y),a="translate("+r+"px, "+i+"px)";t.boxSelectElement.style.transform=a,t.boxSelectElement.style.WebkitTransform=a,t.boxSelectElement.style.width=o-r+"px",t.boxSelectElement.style.height=u-i+"px"},oe.dragMove=function(t,e){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};re(this.getSelected(),n),t.dragMoveLocation=e.lngLat},oe.onMouseUp=function(t,e){var n=this;if(t.dragMoving)this.fireUpdate();else if(t.boxSelecting){var r=[t.boxSelectStartLocation,Ut(e.originalEvent,this.map.getContainer())],o=this.featuresAt(null,r,"click"),i=this.getUniqueIds(o).filter((function(t){return!n.isSelected(t)}));i.length&&(this.select(i),i.forEach((function(t){return n.doRender(t)})),this.updateUIClasses({mouse:w}))}this.stopExtendedInteractions(t)},oe.toDisplayFeatures=function(t,e,n){e.properties.active=this.isSelected(e.properties.id)?Y:H,n(e),this.fireActionable(),e.properties.active===Y&&e.geometry.type!==L&&$t(e).forEach(n)},oe.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},oe.onCombineFeatures=function(){var t=this.getSelected();if(!(0===t.length||t.length<2)){for(var e=[],n=[],r=t[0].type.replace("Multi",""),o=0;o<t.length;o++){var i=t[o];if(i.type.replace("Multi","")!==r)return;i.type.includes("Multi")?i.getCoordinates().forEach((function(t){e.push(t)})):e.push(i.getCoordinates()),n.push(i.toGeoJSON())}if(n.length>1){var u=this.newFeature({type:E,properties:n[0].properties,geometry:{type:"Multi"+r,coordinates:e}});this.addFeature(u),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([u.id]),this.map.fire(V,{createdFeatures:[u.toGeoJSON()],deletedFeatures:n})}this.fireActionable()}},oe.onUncombineFeatures=function(){var t=this,e=this.getSelected();if(0!==e.length){for(var n=[],r=[],o=function(o){var i=e[o];t.isInstanceOf("MultiFeature",i)&&(i.getFeatures().forEach((function(e){t.addFeature(e),e.properties=i.properties,n.push(e.toGeoJSON()),t.select([e.id])})),t.deleteFeature(i.id,{silent:!0}),r.push(i.toGeoJSON()))},i=0;i<e.length;i++)o(i);n.length>1&&this.map.fire(W,{createdFeatures:n,deletedFeatures:r}),this.fireActionable()}};var ie=Pt(K),ue=Pt(Z),ae={fireUpdate:function(){this.map.fire(R,{action:J,features:this.getSelected().map((function(t){return t.toGeoJSON()}))})},fireActionable:function(t){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:t.selectedCoordPaths.length>0})},startDragging:function(t,e){this.map.dragPan.disable(),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},stopDragging:function(t){this.map.dragPan.enable(),t.dragMoving=!1,t.canDragMove=!1,t.dragMoveLocation=null},onVertex:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties,r=t.selectedCoordPaths.indexOf(n.coord_path);Tt(e)||-1!==r?Tt(e)&&-1===r&&t.selectedCoordPaths.push(n.coord_path):t.selectedCoordPaths=[n.coord_path];var o=this.pathsToCoordinates(t.featureId,t.selectedCoordPaths);this.setSelectedCoordinates(o)},onMidpoint:function(t,e){this.startDragging(t,e);var n=e.featureTarget.properties;t.feature.addCoordinate(n.coord_path,n.lng,n.lat),this.fireUpdate(),t.selectedCoordPaths=[n.coord_path]},pathsToCoordinates:function(t,e){return e.map((function(e){return{feature_id:t,coord_path:e}}))},onFeature:function(t,e){0===t.selectedCoordPaths.length?this.startDragging(t,e):this.stopDragging(t)},dragFeature:function(t,e,n){re(this.getSelected(),n),t.dragMoveLocation=e.lngLat},dragVertex:function(t,e,n){for(var r=t.selectedCoordPaths.map((function(e){return t.feature.getCoordinate(e)})),o=ne(r.map((function(t){return{type:E,properties:{},geometry:{type:L,coordinates:t}}})),n),i=0;i<r.length;i++){var u=r[i];t.feature.updateCoordinate(t.selectedCoordPaths[i],u[0]+o.lng,u[1]+o.lat)}},clickNoTarget:function(){this.changeMode(T.SIMPLE_SELECT)},clickInactive:function(){this.changeMode(T.SIMPLE_SELECT)},clickActiveFeature:function(t){t.selectedCoordPaths=[],this.clearSelectedCoordinates(),t.feature.changed()},onSetup:function(t){var e=t.featureId,n=this.getFeature(e);if(!n)throw new Error("You must provide a featureId to enter direct_select mode");if(n.type===L)throw new TypeError("direct_select mode doesn't handle point features");var r={featureId:e,feature:n,dragMoveLocation:t.startPos||null,dragMoving:!1,canDragMove:!1,selectedCoordPaths:t.coordPath?[t.coordPath]:[]};return this.setSelectedCoordinates(this.pathsToCoordinates(e,r.selectedCoordPaths)),this.setSelected(e),Wt(this),this.setActionableState({trash:!0}),r},onStop:function(){Vt(this),this.clearSelectedCoordinates()},toDisplayFeatures:function(t,e,n){t.featureId===e.properties.id?(e.properties.active=Y,n(e),$t(e,{map:this.map,midpoints:!0,selectedPaths:t.selectedCoordPaths}).forEach(n)):(e.properties.active=H,n(e)),this.fireActionable(t)},onTrash:function(t){t.selectedCoordPaths.sort((function(t,e){return e.localeCompare(t,"en",{numeric:!0})})).forEach((function(e){return t.feature.removeCoordinate(e)})),this.fireUpdate(),t.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(t),!1===t.feature.isValid()&&(this.deleteFeature([t.featureId]),this.changeMode(T.SIMPLE_SELECT,{}))},onMouseMove:function(t,e){var n=kt(e),r=ie(e),o=0===t.selectedCoordPaths.length;return n&&o||r&&!o?this.updateUIClasses({mouse:w}):this.updateUIClasses({mouse:M}),this.stopDragging(t),!0},onMouseOut:function(t){return t.dragMoving&&this.fireUpdate(),!0}};ae.onTouchStart=ae.onMouseDown=function(t,e){return ie(e)?this.onVertex(t,e):kt(e)?this.onFeature(t,e):ue(e)?this.onMidpoint(t,e):void 0},ae.onDrag=function(t,e){if(!0===t.canDragMove){t.dragMoving=!0,e.originalEvent.stopPropagation();var n={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};t.selectedCoordPaths.length>0?this.dragVertex(t,e,n):this.dragFeature(t,e,n),t.dragMoveLocation=e.lngLat}},ae.onClick=function(t,e){return jt(e)?this.clickNoTarget(t,e):kt(e)?this.clickActiveFeature(t,e):Ot(e)?this.clickInactive(t,e):void this.stopDragging(t)},ae.onTap=function(t,e){return jt(e)?this.clickNoTarget(t,e):kt(e)?this.clickActiveFeature(t,e):Ot(e)?this.clickInactive(t,e):void 0},ae.onTouchEnd=ae.onMouseUp=function(t){t.dragMoving&&this.fireUpdate(),this.stopDragging(t)};var ce={};function se(t,e){return!!t.lngLat&&t.lngLat.lng===e[0]&&t.lngLat.lat===e[1]}ce.onSetup=function(){var t=this.newFeature({type:E,properties:{},geometry:{type:L,coordinates:[]}});return this.addFeature(t),this.clearSelectedFeatures(),this.updateUIClasses({mouse:b}),this.activateUIButton(C.POINT),this.setActionableState({trash:!0}),{point:t}},ce.stopDrawingAndRemove=function(t){this.deleteFeature([t.point.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)},ce.onTap=ce.onClick=function(t,e){this.updateUIClasses({mouse:w}),t.point.updateCoordinate("",e.lngLat.lng,e.lngLat.lat),this.map.fire(N,{features:[t.point.toGeoJSON()]}),this.changeMode(T.SIMPLE_SELECT,{featureIds:[t.point.id]})},ce.onStop=function(t){this.activateUIButton(),t.point.getCoordinate().length||this.deleteFeature([t.point.id],{silent:!0})},ce.toDisplayFeatures=function(t,e,n){var r=e.properties.id===t.point.id;if(e.properties.active=r?Y:H,!r)return n(e)},ce.onTrash=ce.stopDrawingAndRemove,ce.onKeyUp=function(t,e){if(Nt(e)||Dt(e))return this.stopDrawingAndRemove(t,e)};var le={onSetup:function(){var t=this.newFeature({type:E,properties:{},geometry:{type:I,coordinates:[[]]}});return this.addFeature(t),this.clearSelectedFeatures(),Wt(this),this.updateUIClasses({mouse:b}),this.activateUIButton(C.POLYGON),this.setActionableState({trash:!0}),{polygon:t,currentVertexPosition:0}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&se(e,t.polygon.coordinates[0][t.currentVertexPosition-1]))return this.changeMode(T.SIMPLE_SELECT,{featureIds:[t.polygon.id]});this.updateUIClasses({mouse:b}),t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),t.currentVertexPosition++,t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(T.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},onMouseMove:function(t,e){t.polygon.updateCoordinate("0."+t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),At(e)&&this.updateUIClasses({mouse:S})}};le.onTap=le.onClick=function(t,e){return At(e)?this.clickOnVertex(t,e):this.clickAnywhere(t,e)},le.onKeyUp=function(t,e){Nt(e)?(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)):Dt(e)&&this.changeMode(T.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},le.onStop=function(t){this.updateUIClasses({mouse:M}),Vt(this),this.activateUIButton(),void 0!==this.getFeature(t.polygon.id)&&(t.polygon.removeCoordinate("0."+t.currentVertexPosition),t.polygon.isValid()?this.map.fire(N,{features:[t.polygon.toGeoJSON()]}):(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT,{},{silent:!0})))},le.toDisplayFeatures=function(t,e,n){var r=e.properties.id===t.polygon.id;if(e.properties.active=r?Y:H,!r)return n(e);if(0!==e.geometry.coordinates.length){var o=e.geometry.coordinates[0].length;if(!(o<3)){if(e.properties.meta=q,n(zt(t.polygon.id,e.geometry.coordinates[0][0],"0.0",!1)),o>3){var i=e.geometry.coordinates[0].length-3;n(zt(t.polygon.id,e.geometry.coordinates[0][i],"0."+i,!1))}if(o<=4){var u=[[e.geometry.coordinates[0][0][0],e.geometry.coordinates[0][0][1]],[e.geometry.coordinates[0][1][0],e.geometry.coordinates[0][1][1]]];if(n({type:E,properties:e.properties,geometry:{coordinates:u,type:F}}),3===o)return}return n(e)}}},le.onTrash=function(t){this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)};var fe={onSetup:function(t){var e,n,r=(t=t||{}).featureId,o="forward";if(r){if(!(e=this.getFeature(r)))throw new Error("Could not find a feature with the provided featureId");var i=t.from;if(i&&"Feature"===i.type&&i.geometry&&"Point"===i.geometry.type&&(i=i.geometry),i&&"Point"===i.type&&i.coordinates&&2===i.coordinates.length&&(i=i.coordinates),!i||!Array.isArray(i))throw new Error("Please use the `from` property to indicate which point to continue the line from");var u=e.coordinates.length-1;if(e.coordinates[u][0]===i[0]&&e.coordinates[u][1]===i[1])n=u+1,e.addCoordinate.apply(e,[n].concat(e.coordinates[u]));else{if(e.coordinates[0][0]!==i[0]||e.coordinates[0][1]!==i[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");o="backwards",n=0,e.addCoordinate.apply(e,[n].concat(e.coordinates[0]))}}else e=this.newFeature({type:E,properties:{},geometry:{type:F,coordinates:[]}}),n=0,this.addFeature(e);return this.clearSelectedFeatures(),Wt(this),this.updateUIClasses({mouse:b}),this.activateUIButton(C.LINE),this.setActionableState({trash:!0}),{line:e,currentVertexPosition:n,direction:o}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&se(e,t.line.coordinates[t.currentVertexPosition-1])||"backwards"===t.direction&&se(e,t.line.coordinates[t.currentVertexPosition+1]))return this.changeMode(T.SIMPLE_SELECT,{featureIds:[t.line.id]});this.updateUIClasses({mouse:b}),t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),"forward"===t.direction?(t.currentVertexPosition++,t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)):t.line.addCoordinate(0,e.lngLat.lng,e.lngLat.lat)},clickOnVertex:function(t){return this.changeMode(T.SIMPLE_SELECT,{featureIds:[t.line.id]})},onMouseMove:function(t,e){t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),At(e)&&this.updateUIClasses({mouse:S})}};fe.onTap=fe.onClick=function(t,e){if(At(e))return this.clickOnVertex(t,e);this.clickAnywhere(t,e)},fe.onKeyUp=function(t,e){Dt(e)?this.changeMode(T.SIMPLE_SELECT,{featureIds:[t.line.id]}):Nt(e)&&(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT))},fe.onStop=function(t){Vt(this),this.activateUIButton(),void 0!==this.getFeature(t.line.id)&&(t.line.removeCoordinate(""+t.currentVertexPosition),t.line.isValid()?this.map.fire(N,{features:[t.line.toGeoJSON()]}):(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT,{},{silent:!0})))},fe.onTrash=function(t){this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(T.SIMPLE_SELECT)},fe.toDisplayFeatures=function(t,e,n){var r=e.properties.id===t.line.id;if(e.properties.active=r?Y:H,!r)return n(e);e.geometry.coordinates.length<2||(e.properties.meta=q,n(zt(t.line.id,e.geometry.coordinates["forward"===t.direction?e.geometry.coordinates.length-2:1],""+("forward"===t.direction?e.geometry.coordinates.length-2:1),!1)),n(e))};var pe={simple_select:oe,direct_select:ae,draw_point:ce,draw_polygon:le,draw_line_string:fe},he={defaultMode:T.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:[{id:"gl-draw-polygon-fill-inactive",type:"fill",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],paint:{"fill-color":"#3bb2d0","fill-outline-color":"#3bb2d0","fill-opacity":.1}},{id:"gl-draw-polygon-fill-active",type:"fill",filter:["all",["==","active","true"],["==","$type","Polygon"]],paint:{"fill-color":"#fbb03b","fill-outline-color":"#fbb03b","fill-opacity":.1}},{id:"gl-draw-polygon-midpoint",type:"circle",filter:["all",["==","$type","Point"],["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-stroke-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","Polygon"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-polygon-stroke-active",type:"line",filter:["all",["==","active","true"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-line-inactive",type:"line",filter:["all",["==","active","false"],["==","$type","LineString"],["!=","mode","static"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#3bb2d0","line-width":2}},{id:"gl-draw-line-active",type:"line",filter:["all",["==","$type","LineString"],["==","active","true"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#fbb03b","line-dasharray":[.2,2],"line-width":2}},{id:"gl-draw-polygon-and-line-vertex-stroke-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-color":"#fff"}},{id:"gl-draw-polygon-and-line-vertex-inactive",type:"circle",filter:["all",["==","meta","vertex"],["==","$type","Point"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#fbb03b"}},{id:"gl-draw-point-point-stroke-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":5,"circle-opacity":1,"circle-color":"#fff"}},{id:"gl-draw-point-inactive",type:"circle",filter:["all",["==","active","false"],["==","$type","Point"],["==","meta","feature"],["!=","mode","static"]],paint:{"circle-radius":3,"circle-color":"#3bb2d0"}},{id:"gl-draw-point-stroke-active",type:"circle",filter:["all",["==","$type","Point"],["==","active","true"],["!=","meta","midpoint"]],paint:{"circle-radius":7,"circle-color":"#fff"}},{id:"gl-draw-point-active",type:"circle",filter:["all",["==","$type","Point"],["!=","meta","midpoint"],["==","active","true"]],paint:{"circle-radius":5,"circle-color":"#fbb03b"}},{id:"gl-draw-polygon-fill-static",type:"fill",filter:["all",["==","mode","static"],["==","$type","Polygon"]],paint:{"fill-color":"#404040","fill-outline-color":"#404040","fill-opacity":.1}},{id:"gl-draw-polygon-stroke-static",type:"line",filter:["all",["==","mode","static"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-line-static",type:"line",filter:["all",["==","mode","static"],["==","$type","LineString"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":"#404040","line-width":2}},{id:"gl-draw-point-static",type:"circle",filter:["all",["==","mode","static"],["==","$type","Point"]],paint:{"circle-radius":5,"circle-color":"#404040"}}],modes:pe,controls:{},userProperties:!1},de={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},ge={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function ve(t,e){return t.map((function(t){return t.source?t:Et(t,{id:t.id+"."+e,source:"hot"===e?_:m})}))}var ye=st((function(t,e){var r="[object Arguments]",o="[object Map]",i="[object Object]",u="[object Set]",a=/^\[object .+?Constructor\]$/,c=/^(?:0|[1-9]\d*)$/,s={};s["[object Float32Array]"]=s["[object Float64Array]"]=s["[object Int8Array]"]=s["[object Int16Array]"]=s["[object Int32Array]"]=s["[object Uint8Array]"]=s["[object Uint8ClampedArray]"]=s["[object Uint16Array]"]=s["[object Uint32Array]"]=!0,s[r]=s["[object Array]"]=s["[object ArrayBuffer]"]=s["[object Boolean]"]=s["[object DataView]"]=s["[object Date]"]=s["[object Error]"]=s["[object Function]"]=s[o]=s["[object Number]"]=s[i]=s["[object RegExp]"]=s[u]=s["[object String]"]=s["[object WeakMap]"]=!1;var l="object"==typeof n&&n&&n.Object===Object&&n,f="object"==typeof self&&self&&self.Object===Object&&self,p=l||f||Function("return this")(),h=e&&!e.nodeType&&e,d=h&&t&&!t.nodeType&&t,g=d&&d.exports===h,v=g&&l.process,y=function(){try{return v&&v.binding&&v.binding("util")}catch(t){}}(),_=y&&y.isTypedArray;function m(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function b(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function w(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}var x,S,M,C=Array.prototype,E=Function.prototype,I=Object.prototype,F=p["__core-js_shared__"],L=E.toString,P=I.hasOwnProperty,k=(x=/[^.]+$/.exec(F&&F.keys&&F.keys.IE_PROTO||""))?"Symbol(src)_1."+x:"",O=I.toString,j=RegExp("^"+L.call(P).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),A=g?p.Buffer:void 0,T=p.Symbol,N=p.Uint8Array,D=I.propertyIsEnumerable,R=C.splice,B=T?T.toStringTag:void 0,U=Object.getOwnPropertySymbols,z=A?A.isBuffer:void 0,$=(S=Object.keys,M=Object,function(t){return S(M(t))}),V=yt(p,"DataView"),W=yt(p,"Map"),G=yt(p,"Promise"),J=yt(p,"Set"),q=yt(p,"WeakMap"),Z=yt(Object,"create"),K=wt(V),Y=wt(W),H=wt(G),X=wt(J),Q=wt(q),tt=T?T.prototype:void 0,et=tt?tt.valueOf:void 0;function nt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function rt(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function ot(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function it(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new ot;++e<n;)this.add(t[e])}function ut(t){var e=this.__data__=new rt(t);this.size=e.size}function at(t,e){var n=Mt(t),r=!n&&St(t),o=!n&&!r&&Ct(t),i=!n&&!r&&!o&&Pt(t),u=n||r||o||i,a=u?function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}(t.length,String):[],c=a.length;for(var s in t)!e&&!P.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||bt(s,c))||a.push(s);return a}function ct(t,e){for(var n=t.length;n--;)if(xt(t[n][0],e))return n;return-1}function st(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":B&&B in Object(t)?function(t){var e=P.call(t,B),n=t[B];try{t[B]=void 0;var r=!0}catch(t){}var o=O.call(t);return r&&(e?t[B]=n:delete t[B]),o}(t):function(t){return O.call(t)}(t)}function lt(t){return Lt(t)&&st(t)==r}function ft(t,e,n,a,c){return t===e||(null==t||null==e||!Lt(t)&&!Lt(e)?t!=t&&e!=e:function(t,e,n,a,c,s){var l=Mt(t),f=Mt(e),p=l?"[object Array]":mt(t),h=f?"[object Array]":mt(e),d=(p=p==r?i:p)==i,g=(h=h==r?i:h)==i,v=p==h;if(v&&Ct(t)){if(!Ct(e))return!1;l=!0,d=!1}if(v&&!d)return s||(s=new ut),l||Pt(t)?dt(t,e,n,a,c,s):function(t,e,n,r,i,a,c){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new N(t),new N(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return xt(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case o:var s=b;case u:var l=1&r;if(s||(s=w),t.size!=e.size&&!l)return!1;var f=c.get(t);if(f)return f==e;r|=2,c.set(t,e);var p=dt(s(t),s(e),r,i,a,c);return c.delete(t),p;case"[object Symbol]":if(et)return et.call(t)==et.call(e)}return!1}(t,e,p,n,a,c,s);if(!(1&n)){var y=d&&P.call(t,"__wrapped__"),_=g&&P.call(e,"__wrapped__");if(y||_){var m=y?t.value():t,x=_?e.value():e;return s||(s=new ut),c(m,x,n,a,s)}}return!!v&&(s||(s=new ut),function(t,e,n,r,o,i){var u=1&n,a=gt(t),c=a.length;if(c!=gt(e).length&&!u)return!1;for(var s=c;s--;){var l=a[s];if(!(u?l in e:P.call(e,l)))return!1}var f=i.get(t);if(f&&i.get(e))return f==e;var p=!0;i.set(t,e),i.set(e,t);for(var h=u;++s<c;){var d=t[l=a[s]],g=e[l];if(r)var v=u?r(g,d,l,e,t,i):r(d,g,l,t,e,i);if(!(void 0===v?d===g||o(d,g,n,r,i):v)){p=!1;break}h||(h="constructor"==l)}if(p&&!h){var y=t.constructor,_=e.constructor;y==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof y&&y instanceof y&&"function"==typeof _&&_ instanceof _||(p=!1)}return i.delete(t),i.delete(e),p}(t,e,n,a,c,s))}(t,e,n,a,ft,c))}function pt(t){return!(!Ft(t)||function(t){return!!k&&k in t}(t))&&(Et(t)?j:a).test(wt(t))}function ht(t){if(n=(e=t)&&e.constructor,e!==("function"==typeof n&&n.prototype||I))return $(t);var e,n,r=[];for(var o in Object(t))P.call(t,o)&&"constructor"!=o&&r.push(o);return r}function dt(t,e,n,r,o,i){var u=1&n,a=t.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var s=i.get(t);if(s&&i.get(e))return s==e;var l=-1,f=!0,p=2&n?new it:void 0;for(i.set(t,e),i.set(e,t);++l<a;){var h=t[l],d=e[l];if(r)var g=u?r(d,h,l,e,t,i):r(h,d,l,t,e,i);if(void 0!==g){if(g)continue;f=!1;break}if(p){if(!m(e,(function(t,e){if(u=e,!p.has(u)&&(h===t||o(h,t,n,r,i)))return p.push(e);var u}))){f=!1;break}}else if(h!==d&&!o(h,d,n,r,i)){f=!1;break}}return i.delete(t),i.delete(e),f}function gt(t){return function(t,e,n){var r=e(t);return Mt(t)?r:function(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}(r,n(t))}(t,kt,_t)}function vt(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function yt(t,e){var n=function(t,e){return null==t?void 0:t[e]}(t,e);return pt(n)?n:void 0}nt.prototype.clear=function(){this.__data__=Z?Z(null):{},this.size=0},nt.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},nt.prototype.get=function(t){var e=this.__data__;if(Z){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return P.call(e,t)?e[t]:void 0},nt.prototype.has=function(t){var e=this.__data__;return Z?void 0!==e[t]:P.call(e,t)},nt.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=Z&&void 0===e?"__lodash_hash_undefined__":e,this},rt.prototype.clear=function(){this.__data__=[],this.size=0},rt.prototype.delete=function(t){var e=this.__data__,n=ct(e,t);return!(n<0||(n==e.length-1?e.pop():R.call(e,n,1),--this.size,0))},rt.prototype.get=function(t){var e=this.__data__,n=ct(e,t);return n<0?void 0:e[n][1]},rt.prototype.has=function(t){return ct(this.__data__,t)>-1},rt.prototype.set=function(t,e){var n=this.__data__,r=ct(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},ot.prototype.clear=function(){this.size=0,this.__data__={hash:new nt,map:new(W||rt),string:new nt}},ot.prototype.delete=function(t){var e=vt(this,t).delete(t);return this.size-=e?1:0,e},ot.prototype.get=function(t){return vt(this,t).get(t)},ot.prototype.has=function(t){return vt(this,t).has(t)},ot.prototype.set=function(t,e){var n=vt(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},it.prototype.add=it.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},it.prototype.has=function(t){return this.__data__.has(t)},ut.prototype.clear=function(){this.__data__=new rt,this.size=0},ut.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ut.prototype.get=function(t){return this.__data__.get(t)},ut.prototype.has=function(t){return this.__data__.has(t)},ut.prototype.set=function(t,e){var n=this.__data__;if(n instanceof rt){var r=n.__data__;if(!W||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new ot(r)}return n.set(t,e),this.size=n.size,this};var _t=U?function(t){return null==t?[]:(t=Object(t),function(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}(U(t),(function(e){return D.call(t,e)})))}:function(){return[]},mt=st;function bt(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||c.test(t))&&t>-1&&t%1==0&&t<e}function wt(t){if(null!=t){try{return L.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function xt(t,e){return t===e||t!=t&&e!=e}(V&&"[object DataView]"!=mt(new V(new ArrayBuffer(1)))||W&&mt(new W)!=o||G&&"[object Promise]"!=mt(G.resolve())||J&&mt(new J)!=u||q&&"[object WeakMap]"!=mt(new q))&&(mt=function(t){var e=st(t),n=e==i?t.constructor:void 0,r=n?wt(n):"";if(r)switch(r){case K:return"[object DataView]";case Y:return o;case H:return"[object Promise]";case X:return u;case Q:return"[object WeakMap]"}return e});var St=lt(function(){return arguments}())?lt:function(t){return Lt(t)&&P.call(t,"callee")&&!D.call(t,"callee")},Mt=Array.isArray,Ct=z||function(){return!1};function Et(t){if(!Ft(t))return!1;var e=st(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}function It(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}function Ft(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function Lt(t){return null!=t&&"object"==typeof t}var Pt=_?function(t){return function(e){return t(e)}}(_):function(t){return Lt(t)&&It(t.length)&&!!s[st(t)]};function kt(t){return null!=(e=t)&&It(e.length)&&!Et(e)?at(t):ht(t);var e}t.exports=function(t,e){return ft(t,e)}})),_e={Polygon:dt,LineString:ht,Point:pt,MultiPolygon:yt,MultiLineString:yt,MultiPoint:yt};function me(t,e){return e.modes=T,e.getFeatureIdsAt=function(e){return rt.click({point:e},null,t).map((function(t){return t.properties.id}))},e.getSelectedIds=function(){return t.store.getSelectedIds()},e.getSelected=function(){return{type:P,features:t.store.getSelectedIds().map((function(e){return t.store.get(e)})).map((function(t){return t.toGeoJSON()}))}},e.getSelectedPoints=function(){return{type:P,features:t.store.getSelectedCoordinates().map((function(t){return{type:E,properties:{},geometry:{type:L,coordinates:t.coordinates}}}))}},e.set=function(n){if(void 0===n.type||n.type!==P||!Array.isArray(n.features))throw new Error("Invalid FeatureCollection");var r=t.store.createRenderBatch(),o=t.store.getAllIds().slice(),i=e.add(n),u=new et(i);return(o=o.filter((function(t){return!u.has(t)}))).length&&e.delete(o),r(),i},e.add=function(e){var n=JSON.parse(JSON.stringify(Gt(e))).features.map((function(e){if(e.id=e.id||lt(),null===e.geometry)throw new Error("Invalid geometry: null");if(void 0===t.store.get(e.id)||t.store.get(e.id).type!==e.geometry.type){var n=_e[e.geometry.type];if(void 0===n)throw new Error("Invalid geometry type: "+e.geometry.type+".");var r=new n(t,e);t.store.add(r)}else{var o=t.store.get(e.id);o.properties=e.properties,ye(o.getCoordinates(),e.geometry.coordinates)||o.incomingCoords(e.geometry.coordinates)}return e.id}));return t.store.render(),n},e.get=function(e){var n=t.store.get(e);if(n)return n.toGeoJSON()},e.getAll=function(){return{type:P,features:t.store.getAll().map((function(t){return t.toGeoJSON()}))}},e.delete=function(n){return t.store.delete(n,{silent:!0}),e.getMode()!==T.DIRECT_SELECT||t.store.getSelectedIds().length?t.store.render():t.events.changeMode(T.SIMPLE_SELECT,void 0,{silent:!0}),e},e.deleteAll=function(){return t.store.delete(t.store.getAllIds(),{silent:!0}),e.getMode()===T.DIRECT_SELECT?t.events.changeMode(T.SIMPLE_SELECT,void 0,{silent:!0}):t.store.render(),e},e.changeMode=function(n,r){return void 0===r&&(r={}),n===T.SIMPLE_SELECT&&e.getMode()===T.SIMPLE_SELECT?(o=r.featureIds||[],i=t.store.getSelectedIds(),o.length===i.length&&JSON.stringify(o.map((function(t){return t})).sort())===JSON.stringify(i.map((function(t){return t})).sort())||(t.store.setSelected(r.featureIds,{silent:!0}),t.store.render()),e):(n===T.DIRECT_SELECT&&e.getMode()===T.DIRECT_SELECT&&r.featureId===t.store.getSelectedIds()[0]||t.events.changeMode(n,r,{silent:!0}),e);var o,i},e.getMode=function(){return t.events.getMode()},e.trash=function(){return t.events.trash({silent:!0}),e},e.combineFeatures=function(){return t.events.combineFeatures({silent:!0}),e},e.uncombineFeatures=function(){return t.events.uncombineFeatures({silent:!0}),e},e.setFeatureProperty=function(n,r,o){return t.store.setFeatureProperty(n,r,o),e},e}var be=function(t,e){var n={options:t=function(t){void 0===t&&(t={});var e=Et(t);return t.controls||(e.controls={}),!1===t.displayControlsDefault?e.controls=Et(ge,t.controls):e.controls=Et(de,t.controls),(e=Et(he,e)).styles=ve(e.styles,"cold").concat(ve(e.styles,"hot")),e}(t)};e=me(n,e),n.api=e;var r=Lt(n);return e.onAdd=r.onAdd,e.onRemove=r.onRemove,e.types=C,e.options=t,e};function we(t){be(t,this)}return we.modes=pe,we}()})),i=r((function(t){!function(e,n){t.exports?t.exports=n():e.numeral=n()}(n,(function(){var t,e,n,r,o,i={},u={},a={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},c={currentLocale:a.currentLocale,zeroFormat:a.zeroFormat,nullFormat:a.nullFormat,defaultFormat:a.defaultFormat,scalePercentBy100:a.scalePercentBy100};function s(t,e){this._input=t,this._value=e}return(t=function(n){var r,o,u,a;if(t.isNumeral(n))r=n.value();else if(0===n||void 0===n)r=0;else if(null===n||e.isNaN(n))r=null;else if("string"==typeof n)if(c.zeroFormat&&n===c.zeroFormat)r=0;else if(c.nullFormat&&n===c.nullFormat||!n.replace(/[^0-9]+/g,"").length)r=null;else{for(o in i)if((a="function"==typeof i[o].regexps.unformat?i[o].regexps.unformat():i[o].regexps.unformat)&&n.match(a)){u=i[o].unformat;break}r=(u=u||t._.stringToNumber)(n)}else r=Number(n)||null;return new s(n,r)}).version="2.0.6",t.isNumeral=function(t){return t instanceof s},t._=e={numberToFormat:function(e,n,r){var o,i,a,c,s,l,f,p,h=u[t.options.currentLocale],d=!1,g=!1,v="",y=1e12,_=1e9,m=1e6,b="",w=!1;if(e=e||0,a=Math.abs(e),t._.includes(n,"(")?(d=!0,n=n.replace(/[\(|\)]/g,"")):(t._.includes(n,"+")||t._.includes(n,"-"))&&(l=t._.includes(n,"+")?n.indexOf("+"):e<0?n.indexOf("-"):-1,n=n.replace(/[\+|\-]/g,"")),t._.includes(n,"a")&&(i=!!(i=n.match(/a(k|m|b|t)?/))&&i[1],t._.includes(n," a")&&(v=" "),n=n.replace(new RegExp(v+"a[kmbt]?"),""),a>=y&&!i||"t"===i?(v+=h.abbreviations.trillion,e/=y):a<y&&a>=_&&!i||"b"===i?(v+=h.abbreviations.billion,e/=_):a<_&&a>=m&&!i||"m"===i?(v+=h.abbreviations.million,e/=m):(a<m&&a>=1e3&&!i||"k"===i)&&(v+=h.abbreviations.thousand,e/=1e3)),t._.includes(n,"[.]")&&(g=!0,n=n.replace("[.]",".")),c=e.toString().split(".")[0],s=n.split(".")[1],f=n.indexOf(","),o=(n.split(".")[0].split(",")[0].match(/0/g)||[]).length,s?(t._.includes(s,"[")?(s=(s=s.replace("]","")).split("["),b=t._.toFixed(e,s[0].length+s[1].length,r,s[1].length)):b=t._.toFixed(e,s.length,r),c=b.split(".")[0],b=t._.includes(b,".")?h.delimiters.decimal+b.split(".")[1]:"",g&&0===Number(b.slice(1))&&(b="")):c=t._.toFixed(e,0,r),v&&!i&&Number(c)>=1e3&&v!==h.abbreviations.trillion)switch(c=String(Number(c)/1e3),v){case h.abbreviations.thousand:v=h.abbreviations.million;break;case h.abbreviations.million:v=h.abbreviations.billion;break;case h.abbreviations.billion:v=h.abbreviations.trillion}if(t._.includes(c,"-")&&(c=c.slice(1),w=!0),c.length<o)for(var x=o-c.length;x>0;x--)c="0"+c;return f>-1&&(c=c.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+h.delimiters.thousands)),0===n.indexOf(".")&&(c=""),p=c+b+(v||""),d?p=(d&&w?"(":"")+p+(d&&w?")":""):l>=0?p=0===l?(w?"-":"+")+p:p+(w?"-":"+"):w&&(p="-"+p),p},stringToNumber:function(t){var e,n,r,o=u[c.currentLocale],i=t,a={thousand:3,million:6,billion:9,trillion:12};if(c.zeroFormat&&t===c.zeroFormat)n=0;else if(c.nullFormat&&t===c.nullFormat||!t.replace(/[^0-9]+/g,"").length)n=null;else{for(e in n=1,"."!==o.delimiters.decimal&&(t=t.replace(/\./g,"").replace(o.delimiters.decimal,".")),a)if(r=new RegExp("[^a-zA-Z]"+o.abbreviations[e]+"(?:\\)|(\\"+o.currency.symbol+")?(?:\\))?)?$"),i.match(r)){n*=Math.pow(10,a[e]);break}n*=(t.split("-").length+Math.min(t.split("(").length-1,t.split(")").length-1))%2?1:-1,t=t.replace(/[^0-9\.]+/g,""),n*=Number(t)}return n},isNaN:function(t){return"number"==typeof t&&isNaN(t)},includes:function(t,e){return-1!==t.indexOf(e)},insert:function(t,e,n){return t.slice(0,n)+e+t.slice(n)},reduce:function(t,e){if(null===this)throw new TypeError("Array.prototype.reduce called on null or undefined");if("function"!=typeof e)throw new TypeError(e+" is not a function");var n,r=Object(t),o=r.length>>>0,i=0;if(3===arguments.length)n=arguments[2];else{for(;i<o&&!(i in r);)i++;if(i>=o)throw new TypeError("Reduce of empty array with no initial value");n=r[i++]}for(;i<o;i++)i in r&&(n=e(n,r[i],i,r));return n},multiplier:function(t){var e=t.toString().split(".");return e.length<2?1:Math.pow(10,e[1].length)},correctionFactor:function(){var t=Array.prototype.slice.call(arguments);return t.reduce((function(t,n){var r=e.multiplier(n);return t>r?t:r}),1)},toFixed:function(t,e,n,r){var o,i,u,a,c=t.toString().split("."),s=e-(r||0);return o=2===c.length?Math.min(Math.max(c[1].length,s),e):s,u=Math.pow(10,o),a=(n(t+"e+"+o)/u).toFixed(o),r>e-o&&(i=new RegExp("\\.?0{1,"+(r-(e-o))+"}$"),a=a.replace(i,"")),a}},t.options=c,t.formats=i,t.locales=u,t.locale=function(t){return t&&(c.currentLocale=t.toLowerCase()),c.currentLocale},t.localeData=function(t){if(!t)return u[c.currentLocale];if(t=t.toLowerCase(),!u[t])throw new Error("Unknown locale : "+t);return u[t]},t.reset=function(){for(var t in a)c[t]=a[t]},t.zeroFormat=function(t){c.zeroFormat="string"==typeof t?t:null},t.nullFormat=function(t){c.nullFormat="string"==typeof t?t:null},t.defaultFormat=function(t){c.defaultFormat="string"==typeof t?t:"0.0"},t.register=function(t,e,n){if(e=e.toLowerCase(),this[t+"s"][e])throw new TypeError(e+" "+t+" already registered.");return this[t+"s"][e]=n,n},t.validate=function(e,n){var r,o,i,u,a,c,s,l;if("string"!=typeof e&&(e+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",e)),(e=e.trim()).match(/^\d+$/))return!0;if(""===e)return!1;try{s=t.localeData(n)}catch(e){s=t.localeData(t.locale())}return i=s.currency.symbol,a=s.abbreviations,r=s.delimiters.decimal,o="."===s.delimiters.thousands?"\\.":s.delimiters.thousands,(null===(l=e.match(/^[^\d]+/))||(e=e.substr(1),l[0]===i))&&((null===(l=e.match(/[^\d]+$/))||(e=e.slice(0,-1),l[0]===a.thousand||l[0]===a.million||l[0]===a.billion||l[0]===a.trillion))&&(c=new RegExp(o+"{2}"),!e.match(/[^\d.,]/g)&&(!((u=e.split(r)).length>2)&&(u.length<2?!!u[0].match(/^\d+.*\d$/)&&!u[0].match(c):1===u[0].length?!!u[0].match(/^\d+$/)&&!u[0].match(c)&&!!u[1].match(/^\d+$/):!!u[0].match(/^\d+.*\d$/)&&!u[0].match(c)&&!!u[1].match(/^\d+$/)))))},t.fn=s.prototype={clone:function(){return t(this)},format:function(e,n){var r,o,u,a=this._value,s=e||c.defaultFormat;if(n=n||Math.round,0===a&&null!==c.zeroFormat)o=c.zeroFormat;else if(null===a&&null!==c.nullFormat)o=c.nullFormat;else{for(r in i)if(s.match(i[r].regexps.format)){u=i[r].format;break}o=(u=u||t._.numberToFormat)(a,s,n)}return o},value:function(){return this._value},input:function(){return this._input},set:function(t){return this._value=Number(t),this},add:function(t){var n=e.correctionFactor.call(null,this._value,t);return this._value=e.reduce([this._value,t],(function(t,e,r,o){return t+Math.round(n*e)}),0)/n,this},subtract:function(t){var n=e.correctionFactor.call(null,this._value,t);return this._value=e.reduce([t],(function(t,e,r,o){return t-Math.round(n*e)}),Math.round(this._value*n))/n,this},multiply:function(t){return this._value=e.reduce([this._value,t],(function(t,n,r,o){var i=e.correctionFactor(t,n);return Math.round(t*i)*Math.round(n*i)/Math.round(i*i)}),1),this},divide:function(t){return this._value=e.reduce([this._value,t],(function(t,n,r,o){var i=e.correctionFactor(t,n);return Math.round(t*i)/Math.round(n*i)})),this},difference:function(e){return Math.abs(t(this._value).subtract(e).value())}},t.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(t){var e=t%10;return 1==~~(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th"},currency:{symbol:"$"}}),t.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(e,n,r){var o,i=t._.includes(n," BPS")?" ":"";return e*=1e4,n=n.replace(/\s?BPS/,""),o=t._.numberToFormat(e,n,r),t._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"BPS"),o=o.join("")):o=o+i+"BPS",o},unformat:function(e){return+(1e-4*t._.stringToNumber(e)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},o="("+(o=(n={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(t){return n.suffixes.indexOf(t)<0}))).join("|")).replace("B","B(?!PS)")+")",t.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(o)},format:function(e,o,i){var u,a,c,s=t._.includes(o,"ib")?r:n,l=t._.includes(o," b")||t._.includes(o," ib")?" ":"";for(o=o.replace(/\s?i?b/,""),u=0;u<=s.suffixes.length;u++)if(a=Math.pow(s.base,u),c=Math.pow(s.base,u+1),null===e||0===e||e>=a&&e<c){l+=s.suffixes[u],a>0&&(e/=a);break}return t._.numberToFormat(e,o,i)+l},unformat:function(e){var o,i,u=t._.stringToNumber(e);if(u){for(o=n.suffixes.length-1;o>=0;o--){if(t._.includes(e,n.suffixes[o])){i=Math.pow(n.base,o);break}if(t._.includes(e,r.suffixes[o])){i=Math.pow(r.base,o);break}}u*=i||1}return u}}),t.register("format","currency",{regexps:{format:/(\$)/},format:function(e,n,r){var o,i,u=t.locales[t.options.currentLocale],a={before:n.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:n.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(n=n.replace(/\s?\$\s?/,""),o=t._.numberToFormat(e,n,r),e>=0?(a.before=a.before.replace(/[\-\(]/,""),a.after=a.after.replace(/[\-\)]/,"")):e<0&&!t._.includes(a.before,"-")&&!t._.includes(a.before,"(")&&(a.before="-"+a.before),i=0;i<a.before.length;i++)switch(a.before[i]){case"$":o=t._.insert(o,u.currency.symbol,i);break;case" ":o=t._.insert(o," ",i+u.currency.symbol.length-1)}for(i=a.after.length-1;i>=0;i--)switch(a.after[i]){case"$":o=i===a.after.length-1?o+u.currency.symbol:t._.insert(o,u.currency.symbol,-(a.after.length-(1+i)));break;case" ":o=i===a.after.length-1?o+" ":t._.insert(o," ",-(a.after.length-(1+i)+u.currency.symbol.length-1))}return o}}),t.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(e,n,r){var o=("number"!=typeof e||t._.isNaN(e)?"0e+0":e.toExponential()).split("e");return n=n.replace(/e[\+|\-]{1}0/,""),t._.numberToFormat(Number(o[0]),n,r)+"e"+o[1]},unformat:function(e){var n=t._.includes(e,"e+")?e.split("e+"):e.split("e-"),r=Number(n[0]),o=Number(n[1]);return o=t._.includes(e,"e-")?o*=-1:o,t._.reduce([r,Math.pow(10,o)],(function(e,n,r,o){var i=t._.correctionFactor(e,n);return e*i*(n*i)/(i*i)}),1)}}),t.register("format","ordinal",{regexps:{format:/(o)/},format:function(e,n,r){var o=t.locales[t.options.currentLocale],i=t._.includes(n," o")?" ":"";return n=n.replace(/\s?o/,""),i+=o.ordinal(e),t._.numberToFormat(e,n,r)+i}}),t.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(e,n,r){var o,i=t._.includes(n," %")?" ":"";return t.options.scalePercentBy100&&(e*=100),n=n.replace(/\s?\%/,""),o=t._.numberToFormat(e,n,r),t._.includes(o,")")?((o=o.split("")).splice(-1,0,i+"%"),o=o.join("")):o=o+i+"%",o},unformat:function(e){var n=t._.stringToNumber(e);return t.options.scalePercentBy100?.01*n:n}}),t.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(t,e,n){var r=Math.floor(t/60/60),o=Math.floor((t-60*r*60)/60),i=Math.round(t-60*r*60-60*o);return r+":"+(o<10?"0"+o:o)+":"+(i<10?"0"+i:i)},unformat:function(t){var e=t.split(":"),n=0;return 3===e.length?(n+=60*Number(e[0])*60,n+=60*Number(e[1]),n+=Number(e[2])):2===e.length&&(n+=60*Number(e[0]),n+=Number(e[1])),Number(n)}}),t}))})),u=r((function(t,e){(function(){var r,o="Expected a function",i="__lodash_hash_undefined__",u="__lodash_placeholder__",a=16,c=32,s=64,l=128,f=256,p=1/0,h=9007199254740991,d=NaN,g=4294967295,v=[["ary",l],["bind",1],["bindKey",2],["curry",8],["curryRight",a],["flip",512],["partial",c],["partialRight",s],["rearg",f]],y="[object Arguments]",_="[object Array]",m="[object Boolean]",b="[object Date]",w="[object Error]",x="[object Function]",S="[object GeneratorFunction]",M="[object Map]",C="[object Number]",E="[object Object]",I="[object Promise]",F="[object RegExp]",L="[object Set]",P="[object String]",k="[object Symbol]",O="[object WeakMap]",j="[object ArrayBuffer]",A="[object DataView]",T="[object Float32Array]",N="[object Float64Array]",D="[object Int8Array]",R="[object Int16Array]",B="[object Int32Array]",U="[object Uint8Array]",z="[object Uint8ClampedArray]",$="[object Uint16Array]",V="[object Uint32Array]",W=/\b__p \+= '';/g,G=/\b(__p \+=) '' \+/g,J=/(__e\(.*?\)|\b__t\)) \+\n'';/g,q=/&(?:amp|lt|gt|quot|#39);/g,Z=/[&<>"']/g,K=RegExp(q.source),Y=RegExp(Z.source),H=/<%-([\s\S]+?)%>/g,X=/<%([\s\S]+?)%>/g,Q=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,et=/^\w*$/,nt=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,ot=RegExp(rt.source),it=/^\s+/,ut=/\s/,at=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ct=/\{\n\/\* \[wrapped with (.+)\] \*/,st=/,? & /,lt=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,ft=/[()=,{}\[\]\/\s]/,pt=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,gt=/^[-+]0x[0-9a-f]+$/i,vt=/^0b[01]+$/i,yt=/^\[object .+?Constructor\]$/,_t=/^0o[0-7]+$/i,mt=/^(?:0|[1-9]\d*)$/,bt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,wt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,St="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",Mt="\\u2700-\\u27bf",Ct="a-z\\xdf-\\xf6\\xf8-\\xff",Et="A-Z\\xc0-\\xd6\\xd8-\\xde",It="\\ufe0e\\ufe0f",Ft="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Lt="['’]",Pt="[\\ud800-\\udfff]",kt="["+Ft+"]",Ot="["+St+"]",jt="\\d+",At="[\\u2700-\\u27bf]",Tt="["+Ct+"]",Nt="[^\\ud800-\\udfff"+Ft+jt+Mt+Ct+Et+"]",Dt="\\ud83c[\\udffb-\\udfff]",Rt="[^\\ud800-\\udfff]",Bt="(?:\\ud83c[\\udde6-\\uddff]){2}",Ut="[\\ud800-\\udbff][\\udc00-\\udfff]",zt="["+Et+"]",$t="(?:"+Tt+"|"+Nt+")",Vt="(?:"+zt+"|"+Nt+")",Wt="(?:['’](?:d|ll|m|re|s|t|ve))?",Gt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Jt="(?:"+Ot+"|"+Dt+")"+"?",qt="[\\ufe0e\\ufe0f]?",Zt=qt+Jt+("(?:\\u200d(?:"+[Rt,Bt,Ut].join("|")+")"+qt+Jt+")*"),Kt="(?:"+[At,Bt,Ut].join("|")+")"+Zt,Yt="(?:"+[Rt+Ot+"?",Ot,Bt,Ut,Pt].join("|")+")",Ht=RegExp(Lt,"g"),Xt=RegExp(Ot,"g"),Qt=RegExp(Dt+"(?="+Dt+")|"+Yt+Zt,"g"),te=RegExp([zt+"?"+Tt+"+"+Wt+"(?="+[kt,zt,"$"].join("|")+")",Vt+"+"+Gt+"(?="+[kt,zt+$t,"$"].join("|")+")",zt+"?"+$t+"+"+Wt,zt+"+"+Gt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",jt,Kt].join("|"),"g"),ee=RegExp("[\\u200d\\ud800-\\udfff"+St+It+"]"),ne=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,re=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],oe=-1,ie={};ie[T]=ie[N]=ie[D]=ie[R]=ie[B]=ie[U]=ie[z]=ie[$]=ie[V]=!0,ie[y]=ie[_]=ie[j]=ie[m]=ie[A]=ie[b]=ie[w]=ie[x]=ie[M]=ie[C]=ie[E]=ie[F]=ie[L]=ie[P]=ie[O]=!1;var ue={};ue[y]=ue[_]=ue[j]=ue[A]=ue[m]=ue[b]=ue[T]=ue[N]=ue[D]=ue[R]=ue[B]=ue[M]=ue[C]=ue[E]=ue[F]=ue[L]=ue[P]=ue[k]=ue[U]=ue[z]=ue[$]=ue[V]=!0,ue[w]=ue[x]=ue[O]=!1;var ae={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ce=parseFloat,se=parseInt,le="object"==typeof n&&n&&n.Object===Object&&n,fe="object"==typeof self&&self&&self.Object===Object&&self,pe=le||fe||Function("return this")(),he=e&&!e.nodeType&&e,de=he&&t&&!t.nodeType&&t,ge=de&&de.exports===he,ve=ge&&le.process,ye=function(){try{var t=de&&de.require&&de.require("util").types;return t||ve&&ve.binding&&ve.binding("util")}catch(t){}}(),_e=ye&&ye.isArrayBuffer,me=ye&&ye.isDate,be=ye&&ye.isMap,we=ye&&ye.isRegExp,xe=ye&&ye.isSet,Se=ye&&ye.isTypedArray;function Me(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}function Ce(t,e,n,r){for(var o=-1,i=null==t?0:t.length;++o<i;){var u=t[o];e(r,u,n(u),t)}return r}function Ee(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}function Ie(t,e){for(var n=null==t?0:t.length;n--&&!1!==e(t[n],n,t););return t}function Fe(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(!e(t[n],n,t))return!1;return!0}function Le(t,e){for(var n=-1,r=null==t?0:t.length,o=0,i=[];++n<r;){var u=t[n];e(u,n,t)&&(i[o++]=u)}return i}function Pe(t,e){return!!(null==t?0:t.length)&&Ue(t,e,0)>-1}function ke(t,e,n){for(var r=-1,o=null==t?0:t.length;++r<o;)if(n(e,t[r]))return!0;return!1}function Oe(t,e){for(var n=-1,r=null==t?0:t.length,o=Array(r);++n<r;)o[n]=e(t[n],n,t);return o}function je(t,e){for(var n=-1,r=e.length,o=t.length;++n<r;)t[o+n]=e[n];return t}function Ae(t,e,n,r){var o=-1,i=null==t?0:t.length;for(r&&i&&(n=t[++o]);++o<i;)n=e(n,t[o],o,t);return n}function Te(t,e,n,r){var o=null==t?0:t.length;for(r&&o&&(n=t[--o]);o--;)n=e(n,t[o],o,t);return n}function Ne(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}var De=We("length");function Re(t,e,n){var r;return n(t,(function(t,n,o){if(e(t,n,o))return r=n,!1})),r}function Be(t,e,n,r){for(var o=t.length,i=n+(r?1:-1);r?i--:++i<o;)if(e(t[i],i,t))return i;return-1}function Ue(t,e,n){return e==e?function(t,e,n){var r=n-1,o=t.length;for(;++r<o;)if(t[r]===e)return r;return-1}(t,e,n):Be(t,$e,n)}function ze(t,e,n,r){for(var o=n-1,i=t.length;++o<i;)if(r(t[o],e))return o;return-1}function $e(t){return t!=t}function Ve(t,e){var n=null==t?0:t.length;return n?qe(t,e)/n:d}function We(t){return function(e){return null==e?r:e[t]}}function Ge(t){return function(e){return null==t?r:t[e]}}function Je(t,e,n,r,o){return o(t,(function(t,o,i){n=r?(r=!1,t):e(n,t,o,i)})),n}function qe(t,e){for(var n,o=-1,i=t.length;++o<i;){var u=e(t[o]);u!==r&&(n=n===r?u:n+u)}return n}function Ze(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}function Ke(t){return t?t.slice(0,dn(t)+1).replace(it,""):t}function Ye(t){return function(e){return t(e)}}function He(t,e){return Oe(e,(function(e){return t[e]}))}function Xe(t,e){return t.has(e)}function Qe(t,e){for(var n=-1,r=t.length;++n<r&&Ue(e,t[n],0)>-1;);return n}function tn(t,e){for(var n=t.length;n--&&Ue(e,t[n],0)>-1;);return n}function en(t,e){for(var n=t.length,r=0;n--;)t[n]===e&&++r;return r}var nn=Ge({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),rn=Ge({"&":"&","<":"<",">":">",'"':""","'":"'"});function on(t){return"\\"+ae[t]}function un(t){return ee.test(t)}function an(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}function cn(t,e){return function(n){return t(e(n))}}function sn(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var a=t[n];a!==e&&a!==u||(t[n]=u,i[o++]=n)}return i}function ln(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}function fn(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=[t,t]})),n}function pn(t){return un(t)?function(t){var e=Qt.lastIndex=0;for(;Qt.test(t);)++e;return e}(t):De(t)}function hn(t){return un(t)?function(t){return t.match(Qt)||[]}(t):function(t){return t.split("")}(t)}function dn(t){for(var e=t.length;e--&&ut.test(t.charAt(e)););return e}var gn=Ge({"&":"&","<":"<",">":">",""":'"',"'":"'"});var vn=function t(e){var n,ut=(e=null==e?pe:vn.defaults(pe.Object(),e,vn.pick(pe,re))).Array,St=e.Date,Mt=e.Error,Ct=e.Function,Et=e.Math,It=e.Object,Ft=e.RegExp,Lt=e.String,Pt=e.TypeError,kt=ut.prototype,Ot=Ct.prototype,jt=It.prototype,At=e["__core-js_shared__"],Tt=Ot.toString,Nt=jt.hasOwnProperty,Dt=0,Rt=(n=/[^.]+$/.exec(At&&At.keys&&At.keys.IE_PROTO||""))?"Symbol(src)_1."+n:"",Bt=jt.toString,Ut=Tt.call(It),zt=pe._,$t=Ft("^"+Tt.call(Nt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Vt=ge?e.Buffer:r,Wt=e.Symbol,Gt=e.Uint8Array,Jt=Vt?Vt.allocUnsafe:r,qt=cn(It.getPrototypeOf,It),Zt=It.create,Kt=jt.propertyIsEnumerable,Yt=kt.splice,Qt=Wt?Wt.isConcatSpreadable:r,ee=Wt?Wt.iterator:r,ae=Wt?Wt.toStringTag:r,le=function(){try{var t=di(It,"defineProperty");return t({},"",{}),t}catch(t){}}(),fe=e.clearTimeout!==pe.clearTimeout&&e.clearTimeout,he=St&&St.now!==pe.Date.now&&St.now,de=e.setTimeout!==pe.setTimeout&&e.setTimeout,ve=Et.ceil,ye=Et.floor,De=It.getOwnPropertySymbols,Ge=Vt?Vt.isBuffer:r,yn=e.isFinite,_n=kt.join,mn=cn(It.keys,It),bn=Et.max,wn=Et.min,xn=St.now,Sn=e.parseInt,Mn=Et.random,Cn=kt.reverse,En=di(e,"DataView"),In=di(e,"Map"),Fn=di(e,"Promise"),Ln=di(e,"Set"),Pn=di(e,"WeakMap"),kn=di(It,"create"),On=Pn&&new Pn,jn={},An=zi(En),Tn=zi(In),Nn=zi(Fn),Dn=zi(Ln),Rn=zi(Pn),Bn=Wt?Wt.prototype:r,Un=Bn?Bn.valueOf:r,zn=Bn?Bn.toString:r;function $n(t){if(oa(t)&&!qu(t)&&!(t instanceof Jn)){if(t instanceof Gn)return t;if(Nt.call(t,"__wrapped__"))return $i(t)}return new Gn(t)}var Vn=function(){function t(){}return function(e){if(!ra(e))return{};if(Zt)return Zt(e);t.prototype=e;var n=new t;return t.prototype=r,n}}();function Wn(){}function Gn(t,e){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=r}function Jn(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=g,this.__views__=[]}function qn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Zn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Kn(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}function Yn(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new Kn;++e<n;)this.add(t[e])}function Hn(t){var e=this.__data__=new Zn(t);this.size=e.size}function Xn(t,e){var n=qu(t),r=!n&&Ju(t),o=!n&&!r&&Hu(t),i=!n&&!r&&!o&&pa(t),u=n||r||o||i,a=u?Ze(t.length,Lt):[],c=a.length;for(var s in t)!e&&!Nt.call(t,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||wi(s,c))||a.push(s);return a}function Qn(t){var e=t.length;return e?t[Yr(0,e-1)]:r}function tr(t,e){return Ri(Oo(t),sr(e,0,t.length))}function er(t){return Ri(Oo(t))}function nr(t,e,n){(n!==r&&!Vu(t[e],n)||n===r&&!(e in t))&&ar(t,e,n)}function rr(t,e,n){var o=t[e];Nt.call(t,e)&&Vu(o,n)&&(n!==r||e in t)||ar(t,e,n)}function or(t,e){for(var n=t.length;n--;)if(Vu(t[n][0],e))return n;return-1}function ir(t,e,n,r){return dr(t,(function(t,o,i){e(r,t,n(t),i)})),r}function ur(t,e){return t&&jo(e,Aa(e),t)}function ar(t,e,n){"__proto__"==e&&le?le(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function cr(t,e){for(var n=-1,o=e.length,i=ut(o),u=null==t;++n<o;)i[n]=u?r:La(t,e[n]);return i}function sr(t,e,n){return t==t&&(n!==r&&(t=t<=n?t:n),e!==r&&(t=t>=e?t:e)),t}function lr(t,e,n,o,i,u){var a,c=1&e,s=2&e,l=4&e;if(n&&(a=i?n(t,o,i,u):n(t)),a!==r)return a;if(!ra(t))return t;var f=qu(t);if(f){if(a=function(t){var e=t.length,n=new t.constructor(e);e&&"string"==typeof t[0]&&Nt.call(t,"index")&&(n.index=t.index,n.input=t.input);return n}(t),!c)return Oo(t,a)}else{var p=yi(t),h=p==x||p==S;if(Hu(t))return Eo(t,c);if(p==E||p==y||h&&!i){if(a=s||h?{}:mi(t),!c)return s?function(t,e){return jo(t,vi(t),e)}(t,function(t,e){return t&&jo(e,Ta(e),t)}(a,t)):function(t,e){return jo(t,gi(t),e)}(t,ur(a,t))}else{if(!ue[p])return i?t:{};a=function(t,e,n){var r=t.constructor;switch(e){case j:return Io(t);case m:case b:return new r(+t);case A:return function(t,e){var n=e?Io(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}(t,n);case T:case N:case D:case R:case B:case U:case z:case $:case V:return Fo(t,n);case M:return new r;case C:case P:return new r(t);case F:return function(t){var e=new t.constructor(t.source,dt.exec(t));return e.lastIndex=t.lastIndex,e}(t);case L:return new r;case k:return o=t,Un?It(Un.call(o)):{}}var o}(t,p,c)}}u||(u=new Hn);var d=u.get(t);if(d)return d;u.set(t,a),sa(t)?t.forEach((function(r){a.add(lr(r,e,n,r,t,u))})):ia(t)&&t.forEach((function(r,o){a.set(o,lr(r,e,n,o,t,u))}));var g=f?r:(l?s?ai:ui:s?Ta:Aa)(t);return Ee(g||t,(function(r,o){g&&(r=t[o=r]),rr(a,o,lr(r,e,n,o,t,u))})),a}function fr(t,e,n){var o=n.length;if(null==t)return!o;for(t=It(t);o--;){var i=n[o],u=e[i],a=t[i];if(a===r&&!(i in t)||!u(a))return!1}return!0}function pr(t,e,n){if("function"!=typeof t)throw new Pt(o);return Ai((function(){t.apply(r,n)}),e)}function hr(t,e,n,r){var o=-1,i=Pe,u=!0,a=t.length,c=[],s=e.length;if(!a)return c;n&&(e=Oe(e,Ye(n))),r?(i=ke,u=!1):e.length>=200&&(i=Xe,u=!1,e=new Yn(e));t:for(;++o<a;){var l=t[o],f=null==n?l:n(l);if(l=r||0!==l?l:0,u&&f==f){for(var p=s;p--;)if(e[p]===f)continue t;c.push(l)}else i(e,f,r)||c.push(l)}return c}$n.templateSettings={escape:H,evaluate:X,interpolate:Q,variable:"",imports:{_:$n}},$n.prototype=Wn.prototype,$n.prototype.constructor=$n,Gn.prototype=Vn(Wn.prototype),Gn.prototype.constructor=Gn,Jn.prototype=Vn(Wn.prototype),Jn.prototype.constructor=Jn,qn.prototype.clear=function(){this.__data__=kn?kn(null):{},this.size=0},qn.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},qn.prototype.get=function(t){var e=this.__data__;if(kn){var n=e[t];return n===i?r:n}return Nt.call(e,t)?e[t]:r},qn.prototype.has=function(t){var e=this.__data__;return kn?e[t]!==r:Nt.call(e,t)},qn.prototype.set=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=kn&&e===r?i:e,this},Zn.prototype.clear=function(){this.__data__=[],this.size=0},Zn.prototype.delete=function(t){var e=this.__data__,n=or(e,t);return!(n<0)&&(n==e.length-1?e.pop():Yt.call(e,n,1),--this.size,!0)},Zn.prototype.get=function(t){var e=this.__data__,n=or(e,t);return n<0?r:e[n][1]},Zn.prototype.has=function(t){return or(this.__data__,t)>-1},Zn.prototype.set=function(t,e){var n=this.__data__,r=or(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this},Kn.prototype.clear=function(){this.size=0,this.__data__={hash:new qn,map:new(In||Zn),string:new qn}},Kn.prototype.delete=function(t){var e=pi(this,t).delete(t);return this.size-=e?1:0,e},Kn.prototype.get=function(t){return pi(this,t).get(t)},Kn.prototype.has=function(t){return pi(this,t).has(t)},Kn.prototype.set=function(t,e){var n=pi(this,t),r=n.size;return n.set(t,e),this.size+=n.size==r?0:1,this},Yn.prototype.add=Yn.prototype.push=function(t){return this.__data__.set(t,i),this},Yn.prototype.has=function(t){return this.__data__.has(t)},Hn.prototype.clear=function(){this.__data__=new Zn,this.size=0},Hn.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},Hn.prototype.get=function(t){return this.__data__.get(t)},Hn.prototype.has=function(t){return this.__data__.has(t)},Hn.prototype.set=function(t,e){var n=this.__data__;if(n instanceof Zn){var r=n.__data__;if(!In||r.length<199)return r.push([t,e]),this.size=++n.size,this;n=this.__data__=new Kn(r)}return n.set(t,e),this.size=n.size,this};var dr=No(xr),gr=No(Sr,!0);function vr(t,e){var n=!0;return dr(t,(function(t,r,o){return n=!!e(t,r,o)})),n}function yr(t,e,n){for(var o=-1,i=t.length;++o<i;){var u=t[o],a=e(u);if(null!=a&&(c===r?a==a&&!fa(a):n(a,c)))var c=a,s=u}return s}function _r(t,e){var n=[];return dr(t,(function(t,r,o){e(t,r,o)&&n.push(t)})),n}function mr(t,e,n,r,o){var i=-1,u=t.length;for(n||(n=bi),o||(o=[]);++i<u;){var a=t[i];e>0&&n(a)?e>1?mr(a,e-1,n,r,o):je(o,a):r||(o[o.length]=a)}return o}var br=Do(),wr=Do(!0);function xr(t,e){return t&&br(t,e,Aa)}function Sr(t,e){return t&&wr(t,e,Aa)}function Mr(t,e){return Le(e,(function(e){return ta(t[e])}))}function Cr(t,e){for(var n=0,o=(e=xo(e,t)).length;null!=t&&n<o;)t=t[Ui(e[n++])];return n&&n==o?t:r}function Er(t,e,n){var r=e(t);return qu(t)?r:je(r,n(t))}function Ir(t){return null==t?t===r?"[object Undefined]":"[object Null]":ae&&ae in It(t)?function(t){var e=Nt.call(t,ae),n=t[ae];try{t[ae]=r;var o=!0}catch(t){}var i=Bt.call(t);o&&(e?t[ae]=n:delete t[ae]);return i}(t):function(t){return Bt.call(t)}(t)}function Fr(t,e){return t>e}function Lr(t,e){return null!=t&&Nt.call(t,e)}function Pr(t,e){return null!=t&&e in It(t)}function kr(t,e,n){for(var o=n?ke:Pe,i=t[0].length,u=t.length,a=u,c=ut(u),s=1/0,l=[];a--;){var f=t[a];a&&e&&(f=Oe(f,Ye(e))),s=wn(f.length,s),c[a]=!n&&(e||i>=120&&f.length>=120)?new Yn(a&&f):r}f=t[0];var p=-1,h=c[0];t:for(;++p<i&&l.length<s;){var d=f[p],g=e?e(d):d;if(d=n||0!==d?d:0,!(h?Xe(h,g):o(l,g,n))){for(a=u;--a;){var v=c[a];if(!(v?Xe(v,g):o(t[a],g,n)))continue t}h&&h.push(g),l.push(d)}}return l}function Or(t,e,n){var o=null==(t=Pi(t,e=xo(e,t)))?t:t[Ui(Qi(e))];return null==o?r:Me(o,t,n)}function jr(t){return oa(t)&&Ir(t)==y}function Ar(t,e,n,o,i){return t===e||(null==t||null==e||!oa(t)&&!oa(e)?t!=t&&e!=e:function(t,e,n,o,i,u){var a=qu(t),c=qu(e),s=a?_:yi(t),l=c?_:yi(e),f=(s=s==y?E:s)==E,p=(l=l==y?E:l)==E,h=s==l;if(h&&Hu(t)){if(!Hu(e))return!1;a=!0,f=!1}if(h&&!f)return u||(u=new Hn),a||pa(t)?oi(t,e,n,o,i,u):function(t,e,n,r,o,i,u){switch(n){case A:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case j:return!(t.byteLength!=e.byteLength||!i(new Gt(t),new Gt(e)));case m:case b:case C:return Vu(+t,+e);case w:return t.name==e.name&&t.message==e.message;case F:case P:return t==e+"";case M:var a=an;case L:var c=1&r;if(a||(a=ln),t.size!=e.size&&!c)return!1;var s=u.get(t);if(s)return s==e;r|=2,u.set(t,e);var l=oi(a(t),a(e),r,o,i,u);return u.delete(t),l;case k:if(Un)return Un.call(t)==Un.call(e)}return!1}(t,e,s,n,o,i,u);if(!(1&n)){var d=f&&Nt.call(t,"__wrapped__"),g=p&&Nt.call(e,"__wrapped__");if(d||g){var v=d?t.value():t,x=g?e.value():e;return u||(u=new Hn),i(v,x,n,o,u)}}if(!h)return!1;return u||(u=new Hn),function(t,e,n,o,i,u){var a=1&n,c=ui(t),s=c.length,l=ui(e).length;if(s!=l&&!a)return!1;var f=s;for(;f--;){var p=c[f];if(!(a?p in e:Nt.call(e,p)))return!1}var h=u.get(t),d=u.get(e);if(h&&d)return h==e&&d==t;var g=!0;u.set(t,e),u.set(e,t);var v=a;for(;++f<s;){var y=t[p=c[f]],_=e[p];if(o)var m=a?o(_,y,p,e,t,u):o(y,_,p,t,e,u);if(!(m===r?y===_||i(y,_,n,o,u):m)){g=!1;break}v||(v="constructor"==p)}if(g&&!v){var b=t.constructor,w=e.constructor;b==w||!("constructor"in t)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof w&&w instanceof w||(g=!1)}return u.delete(t),u.delete(e),g}(t,e,n,o,i,u)}(t,e,n,o,Ar,i))}function Tr(t,e,n,o){var i=n.length,u=i,a=!o;if(null==t)return!u;for(t=It(t);i--;){var c=n[i];if(a&&c[2]?c[1]!==t[c[0]]:!(c[0]in t))return!1}for(;++i<u;){var s=(c=n[i])[0],l=t[s],f=c[1];if(a&&c[2]){if(l===r&&!(s in t))return!1}else{var p=new Hn;if(o)var h=o(l,f,s,t,e,p);if(!(h===r?Ar(f,l,3,o,p):h))return!1}}return!0}function Nr(t){return!(!ra(t)||(e=t,Rt&&Rt in e))&&(ta(t)?$t:yt).test(zi(t));var e}function Dr(t){return"function"==typeof t?t:null==t?uc:"object"==typeof t?qu(t)?Vr(t[0],t[1]):$r(t):gc(t)}function Rr(t){if(!Ei(t))return mn(t);var e=[];for(var n in It(t))Nt.call(t,n)&&"constructor"!=n&&e.push(n);return e}function Br(t){if(!ra(t))return function(t){var e=[];if(null!=t)for(var n in It(t))e.push(n);return e}(t);var e=Ei(t),n=[];for(var r in t)("constructor"!=r||!e&&Nt.call(t,r))&&n.push(r);return n}function Ur(t,e){return t<e}function zr(t,e){var n=-1,r=Ku(t)?ut(t.length):[];return dr(t,(function(t,o,i){r[++n]=e(t,o,i)})),r}function $r(t){var e=hi(t);return 1==e.length&&e[0][2]?Fi(e[0][0],e[0][1]):function(n){return n===t||Tr(n,t,e)}}function Vr(t,e){return Si(t)&&Ii(e)?Fi(Ui(t),e):function(n){var o=La(n,t);return o===r&&o===e?Pa(n,t):Ar(e,o,3)}}function Wr(t,e,n,o,i){t!==e&&br(e,(function(u,a){if(i||(i=new Hn),ra(u))!function(t,e,n,o,i,u,a){var c=Oi(t,n),s=Oi(e,n),l=a.get(s);if(l)return void nr(t,n,l);var f=u?u(c,s,n+"",t,e,a):r,p=f===r;if(p){var h=qu(s),d=!h&&Hu(s),g=!h&&!d&&pa(s);f=s,h||d||g?qu(c)?f=c:Yu(c)?f=Oo(c):d?(p=!1,f=Eo(s,!0)):g?(p=!1,f=Fo(s,!0)):f=[]:aa(s)||Ju(s)?(f=c,Ju(c)?f=ba(c):ra(c)&&!ta(c)||(f=mi(s))):p=!1}p&&(a.set(s,f),i(f,s,o,u,a),a.delete(s));nr(t,n,f)}(t,e,a,n,Wr,o,i);else{var c=o?o(Oi(t,a),u,a+"",t,e,i):r;c===r&&(c=u),nr(t,a,c)}}),Ta)}function Gr(t,e){var n=t.length;if(n)return wi(e+=e<0?n:0,n)?t[e]:r}function Jr(t,e,n){e=e.length?Oe(e,(function(t){return qu(t)?function(e){return Cr(e,1===t.length?t[0]:t)}:t})):[uc];var r=-1;e=Oe(e,Ye(fi()));var o=zr(t,(function(t,n,o){var i=Oe(e,(function(e){return e(t)}));return{criteria:i,index:++r,value:t}}));return function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}(o,(function(t,e){return function(t,e,n){var r=-1,o=t.criteria,i=e.criteria,u=o.length,a=n.length;for(;++r<u;){var c=Lo(o[r],i[r]);if(c)return r>=a?c:c*("desc"==n[r]?-1:1)}return t.index-e.index}(t,e,n)}))}function qr(t,e,n){for(var r=-1,o=e.length,i={};++r<o;){var u=e[r],a=Cr(t,u);n(a,u)&&eo(i,xo(u,t),a)}return i}function Zr(t,e,n,r){var o=r?ze:Ue,i=-1,u=e.length,a=t;for(t===e&&(e=Oo(e)),n&&(a=Oe(t,Ye(n)));++i<u;)for(var c=0,s=e[i],l=n?n(s):s;(c=o(a,l,c,r))>-1;)a!==t&&Yt.call(a,c,1),Yt.call(t,c,1);return t}function Kr(t,e){for(var n=t?e.length:0,r=n-1;n--;){var o=e[n];if(n==r||o!==i){var i=o;wi(o)?Yt.call(t,o,1):ho(t,o)}}return t}function Yr(t,e){return t+ye(Mn()*(e-t+1))}function Hr(t,e){var n="";if(!t||e<1||e>h)return n;do{e%2&&(n+=t),(e=ye(e/2))&&(t+=t)}while(e);return n}function Xr(t,e){return Ti(Li(t,e,uc),t+"")}function Qr(t){return Qn(Va(t))}function to(t,e){var n=Va(t);return Ri(n,sr(e,0,n.length))}function eo(t,e,n,o){if(!ra(t))return t;for(var i=-1,u=(e=xo(e,t)).length,a=u-1,c=t;null!=c&&++i<u;){var s=Ui(e[i]),l=n;if("__proto__"===s||"constructor"===s||"prototype"===s)return t;if(i!=a){var f=c[s];(l=o?o(f,s,c):r)===r&&(l=ra(f)?f:wi(e[i+1])?[]:{})}rr(c,s,l),c=c[s]}return t}var no=On?function(t,e){return On.set(t,e),t}:uc,ro=le?function(t,e){return le(t,"toString",{configurable:!0,enumerable:!1,value:rc(e),writable:!0})}:uc;function oo(t){return Ri(Va(t))}function io(t,e,n){var r=-1,o=t.length;e<0&&(e=-e>o?0:o+e),(n=n>o?o:n)<0&&(n+=o),o=e>n?0:n-e>>>0,e>>>=0;for(var i=ut(o);++r<o;)i[r]=t[r+e];return i}function uo(t,e){var n;return dr(t,(function(t,r,o){return!(n=e(t,r,o))})),!!n}function ao(t,e,n){var r=0,o=null==t?r:t.length;if("number"==typeof e&&e==e&&o<=2147483647){for(;r<o;){var i=r+o>>>1,u=t[i];null!==u&&!fa(u)&&(n?u<=e:u<e)?r=i+1:o=i}return o}return co(t,e,uc,n)}function co(t,e,n,o){var i=0,u=null==t?0:t.length;if(0===u)return 0;for(var a=(e=n(e))!=e,c=null===e,s=fa(e),l=e===r;i<u;){var f=ye((i+u)/2),p=n(t[f]),h=p!==r,d=null===p,g=p==p,v=fa(p);if(a)var y=o||g;else y=l?g&&(o||h):c?g&&h&&(o||!d):s?g&&h&&!d&&(o||!v):!d&&!v&&(o?p<=e:p<e);y?i=f+1:u=f}return wn(u,4294967294)}function so(t,e){for(var n=-1,r=t.length,o=0,i=[];++n<r;){var u=t[n],a=e?e(u):u;if(!n||!Vu(a,c)){var c=a;i[o++]=0===u?0:u}}return i}function lo(t){return"number"==typeof t?t:fa(t)?d:+t}function fo(t){if("string"==typeof t)return t;if(qu(t))return Oe(t,fo)+"";if(fa(t))return zn?zn.call(t):"";var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function po(t,e,n){var r=-1,o=Pe,i=t.length,u=!0,a=[],c=a;if(n)u=!1,o=ke;else if(i>=200){var s=e?null:Xo(t);if(s)return ln(s);u=!1,o=Xe,c=new Yn}else c=e?[]:a;t:for(;++r<i;){var l=t[r],f=e?e(l):l;if(l=n||0!==l?l:0,u&&f==f){for(var p=c.length;p--;)if(c[p]===f)continue t;e&&c.push(f),a.push(l)}else o(c,f,n)||(c!==a&&c.push(f),a.push(l))}return a}function ho(t,e){return null==(t=Pi(t,e=xo(e,t)))||delete t[Ui(Qi(e))]}function go(t,e,n,r){return eo(t,e,n(Cr(t,e)),r)}function vo(t,e,n,r){for(var o=t.length,i=r?o:-1;(r?i--:++i<o)&&e(t[i],i,t););return n?io(t,r?0:i,r?i+1:o):io(t,r?i+1:0,r?o:i)}function yo(t,e){var n=t;return n instanceof Jn&&(n=n.value()),Ae(e,(function(t,e){return e.func.apply(e.thisArg,je([t],e.args))}),n)}function _o(t,e,n){var r=t.length;if(r<2)return r?po(t[0]):[];for(var o=-1,i=ut(r);++o<r;)for(var u=t[o],a=-1;++a<r;)a!=o&&(i[o]=hr(i[o]||u,t[a],e,n));return po(mr(i,1),e,n)}function mo(t,e,n){for(var o=-1,i=t.length,u=e.length,a={};++o<i;){var c=o<u?e[o]:r;n(a,t[o],c)}return a}function bo(t){return Yu(t)?t:[]}function wo(t){return"function"==typeof t?t:uc}function xo(t,e){return qu(t)?t:Si(t,e)?[t]:Bi(wa(t))}var So=Xr;function Mo(t,e,n){var o=t.length;return n=n===r?o:n,!e&&n>=o?t:io(t,e,n)}var Co=fe||function(t){return pe.clearTimeout(t)};function Eo(t,e){if(e)return t.slice();var n=t.length,r=Jt?Jt(n):new t.constructor(n);return t.copy(r),r}function Io(t){var e=new t.constructor(t.byteLength);return new Gt(e).set(new Gt(t)),e}function Fo(t,e){var n=e?Io(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function Lo(t,e){if(t!==e){var n=t!==r,o=null===t,i=t==t,u=fa(t),a=e!==r,c=null===e,s=e==e,l=fa(e);if(!c&&!l&&!u&&t>e||u&&a&&s&&!c&&!l||o&&a&&s||!n&&s||!i)return 1;if(!o&&!u&&!l&&t<e||l&&n&&i&&!o&&!u||c&&n&&i||!a&&i||!s)return-1}return 0}function Po(t,e,n,r){for(var o=-1,i=t.length,u=n.length,a=-1,c=e.length,s=bn(i-u,0),l=ut(c+s),f=!r;++a<c;)l[a]=e[a];for(;++o<u;)(f||o<i)&&(l[n[o]]=t[o]);for(;s--;)l[a++]=t[o++];return l}function ko(t,e,n,r){for(var o=-1,i=t.length,u=-1,a=n.length,c=-1,s=e.length,l=bn(i-a,0),f=ut(l+s),p=!r;++o<l;)f[o]=t[o];for(var h=o;++c<s;)f[h+c]=e[c];for(;++u<a;)(p||o<i)&&(f[h+n[u]]=t[o++]);return f}function Oo(t,e){var n=-1,r=t.length;for(e||(e=ut(r));++n<r;)e[n]=t[n];return e}function jo(t,e,n,o){var i=!n;n||(n={});for(var u=-1,a=e.length;++u<a;){var c=e[u],s=o?o(n[c],t[c],c,n,t):r;s===r&&(s=t[c]),i?ar(n,c,s):rr(n,c,s)}return n}function Ao(t,e){return function(n,r){var o=qu(n)?Ce:ir,i=e?e():{};return o(n,t,fi(r,2),i)}}function To(t){return Xr((function(e,n){var o=-1,i=n.length,u=i>1?n[i-1]:r,a=i>2?n[2]:r;for(u=t.length>3&&"function"==typeof u?(i--,u):r,a&&xi(n[0],n[1],a)&&(u=i<3?r:u,i=1),e=It(e);++o<i;){var c=n[o];c&&t(e,c,o,u)}return e}))}function No(t,e){return function(n,r){if(null==n)return n;if(!Ku(n))return t(n,r);for(var o=n.length,i=e?o:-1,u=It(n);(e?i--:++i<o)&&!1!==r(u[i],i,u););return n}}function Do(t){return function(e,n,r){for(var o=-1,i=It(e),u=r(e),a=u.length;a--;){var c=u[t?a:++o];if(!1===n(i[c],c,i))break}return e}}function Ro(t){return function(e){var n=un(e=wa(e))?hn(e):r,o=n?n[0]:e.charAt(0),i=n?Mo(n,1).join(""):e.slice(1);return o[t]()+i}}function Bo(t){return function(e){return Ae(tc(Ja(e).replace(Ht,"")),t,"")}}function Uo(t){return function(){var e=arguments;switch(e.length){case 0:return new t;case 1:return new t(e[0]);case 2:return new t(e[0],e[1]);case 3:return new t(e[0],e[1],e[2]);case 4:return new t(e[0],e[1],e[2],e[3]);case 5:return new t(e[0],e[1],e[2],e[3],e[4]);case 6:return new t(e[0],e[1],e[2],e[3],e[4],e[5]);case 7:return new t(e[0],e[1],e[2],e[3],e[4],e[5],e[6])}var n=Vn(t.prototype),r=t.apply(n,e);return ra(r)?r:n}}function zo(t){return function(e,n,o){var i=It(e);if(!Ku(e)){var u=fi(n,3);e=Aa(e),n=function(t){return u(i[t],t,i)}}var a=t(e,n,o);return a>-1?i[u?e[a]:a]:r}}function $o(t){return ii((function(e){var n=e.length,i=n,u=Gn.prototype.thru;for(t&&e.reverse();i--;){var a=e[i];if("function"!=typeof a)throw new Pt(o);if(u&&!c&&"wrapper"==si(a))var c=new Gn([],!0)}for(i=c?i:n;++i<n;){var s=si(a=e[i]),l="wrapper"==s?ci(a):r;c=l&&Mi(l[0])&&424==l[1]&&!l[4].length&&1==l[9]?c[si(l[0])].apply(c,l[3]):1==a.length&&Mi(a)?c[s]():c.thru(a)}return function(){var t=arguments,r=t[0];if(c&&1==t.length&&qu(r))return c.plant(r).value();for(var o=0,i=n?e[o].apply(this,t):r;++o<n;)i=e[o].call(this,i);return i}}))}function Vo(t,e,n,o,i,u,a,c,s,f){var p=e&l,h=1&e,d=2&e,g=24&e,v=512&e,y=d?r:Uo(t);return function r(){for(var l=arguments.length,_=ut(l),m=l;m--;)_[m]=arguments[m];if(g)var b=li(r),w=en(_,b);if(o&&(_=Po(_,o,i,g)),u&&(_=ko(_,u,a,g)),l-=w,g&&l<f){var x=sn(_,b);return Yo(t,e,Vo,r.placeholder,n,_,x,c,s,f-l)}var S=h?n:this,M=d?S[t]:t;return l=_.length,c?_=ki(_,c):v&&l>1&&_.reverse(),p&&s<l&&(_.length=s),this&&this!==pe&&this instanceof r&&(M=y||Uo(M)),M.apply(S,_)}}function Wo(t,e){return function(n,r){return function(t,e,n,r){return xr(t,(function(t,o,i){e(r,n(t),o,i)})),r}(n,t,e(r),{})}}function Go(t,e){return function(n,o){var i;if(n===r&&o===r)return e;if(n!==r&&(i=n),o!==r){if(i===r)return o;"string"==typeof n||"string"==typeof o?(n=fo(n),o=fo(o)):(n=lo(n),o=lo(o)),i=t(n,o)}return i}}function Jo(t){return ii((function(e){return e=Oe(e,Ye(fi())),Xr((function(n){var r=this;return t(e,(function(t){return Me(t,r,n)}))}))}))}function qo(t,e){var n=(e=e===r?" ":fo(e)).length;if(n<2)return n?Hr(e,t):e;var o=Hr(e,ve(t/pn(e)));return un(e)?Mo(hn(o),0,t).join(""):o.slice(0,t)}function Zo(t){return function(e,n,o){return o&&"number"!=typeof o&&xi(e,n,o)&&(n=o=r),e=va(e),n===r?(n=e,e=0):n=va(n),function(t,e,n,r){for(var o=-1,i=bn(ve((e-t)/(n||1)),0),u=ut(i);i--;)u[r?i:++o]=t,t+=n;return u}(e,n,o=o===r?e<n?1:-1:va(o),t)}}function Ko(t){return function(e,n){return"string"==typeof e&&"string"==typeof n||(e=ma(e),n=ma(n)),t(e,n)}}function Yo(t,e,n,o,i,u,a,l,f,p){var h=8&e;e|=h?c:s,4&(e&=~(h?s:c))||(e&=-4);var d=[t,e,i,h?u:r,h?a:r,h?r:u,h?r:a,l,f,p],g=n.apply(r,d);return Mi(t)&&ji(g,d),g.placeholder=o,Ni(g,t,e)}function Ho(t){var e=Et[t];return function(t,n){if(t=ma(t),(n=null==n?0:wn(ya(n),292))&&yn(t)){var r=(wa(t)+"e").split("e");return+((r=(wa(e(r[0]+"e"+(+r[1]+n)))+"e").split("e"))[0]+"e"+(+r[1]-n))}return e(t)}}var Xo=Ln&&1/ln(new Ln([,-0]))[1]==p?function(t){return new Ln(t)}:fc;function Qo(t){return function(e){var n=yi(e);return n==M?an(e):n==L?fn(e):function(t,e){return Oe(e,(function(e){return[e,t[e]]}))}(e,t(e))}}function ti(t,e,n,i,p,h,d,g){var v=2&e;if(!v&&"function"!=typeof t)throw new Pt(o);var y=i?i.length:0;if(y||(e&=-97,i=p=r),d=d===r?d:bn(ya(d),0),g=g===r?g:ya(g),y-=p?p.length:0,e&s){var _=i,m=p;i=p=r}var b=v?r:ci(t),w=[t,e,n,i,p,_,m,h,d,g];if(b&&function(t,e){var n=t[1],r=e[1],o=n|r,i=o<131,a=r==l&&8==n||r==l&&n==f&&t[7].length<=e[8]||384==r&&e[7].length<=e[8]&&8==n;if(!i&&!a)return t;1&r&&(t[2]=e[2],o|=1&n?0:4);var c=e[3];if(c){var s=t[3];t[3]=s?Po(s,c,e[4]):c,t[4]=s?sn(t[3],u):e[4]}(c=e[5])&&(s=t[5],t[5]=s?ko(s,c,e[6]):c,t[6]=s?sn(t[5],u):e[6]);(c=e[7])&&(t[7]=c);r&l&&(t[8]=null==t[8]?e[8]:wn(t[8],e[8]));null==t[9]&&(t[9]=e[9]);t[0]=e[0],t[1]=o}(w,b),t=w[0],e=w[1],n=w[2],i=w[3],p=w[4],!(g=w[9]=w[9]===r?v?0:t.length:bn(w[9]-y,0))&&24&e&&(e&=-25),e&&1!=e)x=8==e||e==a?function(t,e,n){var o=Uo(t);return function i(){for(var u=arguments.length,a=ut(u),c=u,s=li(i);c--;)a[c]=arguments[c];var l=u<3&&a[0]!==s&&a[u-1]!==s?[]:sn(a,s);return(u-=l.length)<n?Yo(t,e,Vo,i.placeholder,r,a,l,r,r,n-u):Me(this&&this!==pe&&this instanceof i?o:t,this,a)}}(t,e,g):e!=c&&33!=e||p.length?Vo.apply(r,w):function(t,e,n,r){var o=1&e,i=Uo(t);return function e(){for(var u=-1,a=arguments.length,c=-1,s=r.length,l=ut(s+a),f=this&&this!==pe&&this instanceof e?i:t;++c<s;)l[c]=r[c];for(;a--;)l[c++]=arguments[++u];return Me(f,o?n:this,l)}}(t,e,n,i);else var x=function(t,e,n){var r=1&e,o=Uo(t);return function e(){return(this&&this!==pe&&this instanceof e?o:t).apply(r?n:this,arguments)}}(t,e,n);return Ni((b?no:ji)(x,w),t,e)}function ei(t,e,n,o){return t===r||Vu(t,jt[n])&&!Nt.call(o,n)?e:t}function ni(t,e,n,o,i,u){return ra(t)&&ra(e)&&(u.set(e,t),Wr(t,e,r,ni,u),u.delete(e)),t}function ri(t){return aa(t)?r:t}function oi(t,e,n,o,i,u){var a=1&n,c=t.length,s=e.length;if(c!=s&&!(a&&s>c))return!1;var l=u.get(t),f=u.get(e);if(l&&f)return l==e&&f==t;var p=-1,h=!0,d=2&n?new Yn:r;for(u.set(t,e),u.set(e,t);++p<c;){var g=t[p],v=e[p];if(o)var y=a?o(v,g,p,e,t,u):o(g,v,p,t,e,u);if(y!==r){if(y)continue;h=!1;break}if(d){if(!Ne(e,(function(t,e){if(!Xe(d,e)&&(g===t||i(g,t,n,o,u)))return d.push(e)}))){h=!1;break}}else if(g!==v&&!i(g,v,n,o,u)){h=!1;break}}return u.delete(t),u.delete(e),h}function ii(t){return Ti(Li(t,r,Zi),t+"")}function ui(t){return Er(t,Aa,gi)}function ai(t){return Er(t,Ta,vi)}var ci=On?function(t){return On.get(t)}:fc;function si(t){for(var e=t.name+"",n=jn[e],r=Nt.call(jn,e)?n.length:0;r--;){var o=n[r],i=o.func;if(null==i||i==t)return o.name}return e}function li(t){return(Nt.call($n,"placeholder")?$n:t).placeholder}function fi(){var t=$n.iteratee||ac;return t=t===ac?Dr:t,arguments.length?t(arguments[0],arguments[1]):t}function pi(t,e){var n,r,o=t.__data__;return("string"==(r=typeof(n=e))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==n:null===n)?o["string"==typeof e?"string":"hash"]:o.map}function hi(t){for(var e=Aa(t),n=e.length;n--;){var r=e[n],o=t[r];e[n]=[r,o,Ii(o)]}return e}function di(t,e){var n=function(t,e){return null==t?r:t[e]}(t,e);return Nr(n)?n:r}var gi=De?function(t){return null==t?[]:(t=It(t),Le(De(t),(function(e){return Kt.call(t,e)})))}:_c,vi=De?function(t){for(var e=[];t;)je(e,gi(t)),t=qt(t);return e}:_c,yi=Ir;function _i(t,e,n){for(var r=-1,o=(e=xo(e,t)).length,i=!1;++r<o;){var u=Ui(e[r]);if(!(i=null!=t&&n(t,u)))break;t=t[u]}return i||++r!=o?i:!!(o=null==t?0:t.length)&&na(o)&&wi(u,o)&&(qu(t)||Ju(t))}function mi(t){return"function"!=typeof t.constructor||Ei(t)?{}:Vn(qt(t))}function bi(t){return qu(t)||Ju(t)||!!(Qt&&t&&t[Qt])}function wi(t,e){var n=typeof t;return!!(e=null==e?h:e)&&("number"==n||"symbol"!=n&&mt.test(t))&&t>-1&&t%1==0&&t<e}function xi(t,e,n){if(!ra(n))return!1;var r=typeof e;return!!("number"==r?Ku(n)&&wi(e,n.length):"string"==r&&e in n)&&Vu(n[e],t)}function Si(t,e){if(qu(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!fa(t))||(et.test(t)||!tt.test(t)||null!=e&&t in It(e))}function Mi(t){var e=si(t),n=$n[e];if("function"!=typeof n||!(e in Jn.prototype))return!1;if(t===n)return!0;var r=ci(n);return!!r&&t===r[0]}(En&&yi(new En(new ArrayBuffer(1)))!=A||In&&yi(new In)!=M||Fn&&yi(Fn.resolve())!=I||Ln&&yi(new Ln)!=L||Pn&&yi(new Pn)!=O)&&(yi=function(t){var e=Ir(t),n=e==E?t.constructor:r,o=n?zi(n):"";if(o)switch(o){case An:return A;case Tn:return M;case Nn:return I;case Dn:return L;case Rn:return O}return e});var Ci=At?ta:mc;function Ei(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||jt)}function Ii(t){return t==t&&!ra(t)}function Fi(t,e){return function(n){return null!=n&&(n[t]===e&&(e!==r||t in It(n)))}}function Li(t,e,n){return e=bn(e===r?t.length-1:e,0),function(){for(var r=arguments,o=-1,i=bn(r.length-e,0),u=ut(i);++o<i;)u[o]=r[e+o];o=-1;for(var a=ut(e+1);++o<e;)a[o]=r[o];return a[e]=n(u),Me(t,this,a)}}function Pi(t,e){return e.length<2?t:Cr(t,io(e,0,-1))}function ki(t,e){for(var n=t.length,o=wn(e.length,n),i=Oo(t);o--;){var u=e[o];t[o]=wi(u,n)?i[u]:r}return t}function Oi(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var ji=Di(no),Ai=de||function(t,e){return pe.setTimeout(t,e)},Ti=Di(ro);function Ni(t,e,n){var r=e+"";return Ti(t,function(t,e){var n=e.length;if(!n)return t;var r=n-1;return e[r]=(n>1?"& ":"")+e[r],e=e.join(n>2?", ":" "),t.replace(at,"{\n/* [wrapped with "+e+"] */\n")}(r,function(t,e){return Ee(v,(function(n){var r="_."+n[0];e&n[1]&&!Pe(t,r)&&t.push(r)})),t.sort()}(function(t){var e=t.match(ct);return e?e[1].split(st):[]}(r),n)))}function Di(t){var e=0,n=0;return function(){var o=xn(),i=16-(o-n);if(n=o,i>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(r,arguments)}}function Ri(t,e){var n=-1,o=t.length,i=o-1;for(e=e===r?o:e;++n<e;){var u=Yr(n,i),a=t[u];t[u]=t[n],t[n]=a}return t.length=e,t}var Bi=function(t){var e=Du(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(nt,(function(t,n,r,o){e.push(r?o.replace(pt,"$1"):n||t)})),e}));function Ui(t){if("string"==typeof t||fa(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function zi(t){if(null!=t){try{return Tt.call(t)}catch(t){}try{return t+""}catch(t){}}return""}function $i(t){if(t instanceof Jn)return t.clone();var e=new Gn(t.__wrapped__,t.__chain__);return e.__actions__=Oo(t.__actions__),e.__index__=t.__index__,e.__values__=t.__values__,e}var Vi=Xr((function(t,e){return Yu(t)?hr(t,mr(e,1,Yu,!0)):[]})),Wi=Xr((function(t,e){var n=Qi(e);return Yu(n)&&(n=r),Yu(t)?hr(t,mr(e,1,Yu,!0),fi(n,2)):[]})),Gi=Xr((function(t,e){var n=Qi(e);return Yu(n)&&(n=r),Yu(t)?hr(t,mr(e,1,Yu,!0),r,n):[]}));function Ji(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ya(n);return o<0&&(o=bn(r+o,0)),Be(t,fi(e,3),o)}function qi(t,e,n){var o=null==t?0:t.length;if(!o)return-1;var i=o-1;return n!==r&&(i=ya(n),i=n<0?bn(o+i,0):wn(i,o-1)),Be(t,fi(e,3),i,!0)}function Zi(t){return(null==t?0:t.length)?mr(t,1):[]}function Ki(t){return t&&t.length?t[0]:r}var Yi=Xr((function(t){var e=Oe(t,bo);return e.length&&e[0]===t[0]?kr(e):[]})),Hi=Xr((function(t){var e=Qi(t),n=Oe(t,bo);return e===Qi(n)?e=r:n.pop(),n.length&&n[0]===t[0]?kr(n,fi(e,2)):[]})),Xi=Xr((function(t){var e=Qi(t),n=Oe(t,bo);return(e="function"==typeof e?e:r)&&n.pop(),n.length&&n[0]===t[0]?kr(n,r,e):[]}));function Qi(t){var e=null==t?0:t.length;return e?t[e-1]:r}var tu=Xr(eu);function eu(t,e){return t&&t.length&&e&&e.length?Zr(t,e):t}var nu=ii((function(t,e){var n=null==t?0:t.length,r=cr(t,e);return Kr(t,Oe(e,(function(t){return wi(t,n)?+t:t})).sort(Lo)),r}));function ru(t){return null==t?t:Cn.call(t)}var ou=Xr((function(t){return po(mr(t,1,Yu,!0))})),iu=Xr((function(t){var e=Qi(t);return Yu(e)&&(e=r),po(mr(t,1,Yu,!0),fi(e,2))})),uu=Xr((function(t){var e=Qi(t);return e="function"==typeof e?e:r,po(mr(t,1,Yu,!0),r,e)}));function au(t){if(!t||!t.length)return[];var e=0;return t=Le(t,(function(t){if(Yu(t))return e=bn(t.length,e),!0})),Ze(e,(function(e){return Oe(t,We(e))}))}function cu(t,e){if(!t||!t.length)return[];var n=au(t);return null==e?n:Oe(n,(function(t){return Me(e,r,t)}))}var su=Xr((function(t,e){return Yu(t)?hr(t,e):[]})),lu=Xr((function(t){return _o(Le(t,Yu))})),fu=Xr((function(t){var e=Qi(t);return Yu(e)&&(e=r),_o(Le(t,Yu),fi(e,2))})),pu=Xr((function(t){var e=Qi(t);return e="function"==typeof e?e:r,_o(Le(t,Yu),r,e)})),hu=Xr(au);var du=Xr((function(t){var e=t.length,n=e>1?t[e-1]:r;return n="function"==typeof n?(t.pop(),n):r,cu(t,n)}));function gu(t){var e=$n(t);return e.__chain__=!0,e}function vu(t,e){return e(t)}var yu=ii((function(t){var e=t.length,n=e?t[0]:0,o=this.__wrapped__,i=function(e){return cr(e,t)};return!(e>1||this.__actions__.length)&&o instanceof Jn&&wi(n)?((o=o.slice(n,+n+(e?1:0))).__actions__.push({func:vu,args:[i],thisArg:r}),new Gn(o,this.__chain__).thru((function(t){return e&&!t.length&&t.push(r),t}))):this.thru(i)}));var _u=Ao((function(t,e,n){Nt.call(t,n)?++t[n]:ar(t,n,1)}));var mu=zo(Ji),bu=zo(qi);function wu(t,e){return(qu(t)?Ee:dr)(t,fi(e,3))}function xu(t,e){return(qu(t)?Ie:gr)(t,fi(e,3))}var Su=Ao((function(t,e,n){Nt.call(t,n)?t[n].push(e):ar(t,n,[e])}));var Mu=Xr((function(t,e,n){var r=-1,o="function"==typeof e,i=Ku(t)?ut(t.length):[];return dr(t,(function(t){i[++r]=o?Me(e,t,n):Or(t,e,n)})),i})),Cu=Ao((function(t,e,n){ar(t,n,e)}));function Eu(t,e){return(qu(t)?Oe:zr)(t,fi(e,3))}var Iu=Ao((function(t,e,n){t[n?0:1].push(e)}),(function(){return[[],[]]}));var Fu=Xr((function(t,e){if(null==t)return[];var n=e.length;return n>1&&xi(t,e[0],e[1])?e=[]:n>2&&xi(e[0],e[1],e[2])&&(e=[e[0]]),Jr(t,mr(e,1),[])})),Lu=he||function(){return pe.Date.now()};function Pu(t,e,n){return e=n?r:e,e=t&&null==e?t.length:e,ti(t,l,r,r,r,r,e)}function ku(t,e){var n;if("function"!=typeof e)throw new Pt(o);return t=ya(t),function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=r),n}}var Ou=Xr((function(t,e,n){var r=1;if(n.length){var o=sn(n,li(Ou));r|=c}return ti(t,r,e,n,o)})),ju=Xr((function(t,e,n){var r=3;if(n.length){var o=sn(n,li(ju));r|=c}return ti(e,r,t,n,o)}));function Au(t,e,n){var i,u,a,c,s,l,f=0,p=!1,h=!1,d=!0;if("function"!=typeof t)throw new Pt(o);function g(e){var n=i,o=u;return i=u=r,f=e,c=t.apply(o,n)}function v(t){return f=t,s=Ai(_,e),p?g(t):c}function y(t){var n=t-l;return l===r||n>=e||n<0||h&&t-f>=a}function _(){var t=Lu();if(y(t))return m(t);s=Ai(_,function(t){var n=e-(t-l);return h?wn(n,a-(t-f)):n}(t))}function m(t){return s=r,d&&i?g(t):(i=u=r,c)}function b(){var t=Lu(),n=y(t);if(i=arguments,u=this,l=t,n){if(s===r)return v(l);if(h)return Co(s),s=Ai(_,e),g(l)}return s===r&&(s=Ai(_,e)),c}return e=ma(e)||0,ra(n)&&(p=!!n.leading,a=(h="maxWait"in n)?bn(ma(n.maxWait)||0,e):a,d="trailing"in n?!!n.trailing:d),b.cancel=function(){s!==r&&Co(s),f=0,i=l=u=s=r},b.flush=function(){return s===r?c:m(Lu())},b}var Tu=Xr((function(t,e){return pr(t,1,e)})),Nu=Xr((function(t,e,n){return pr(t,ma(e)||0,n)}));function Du(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Pt(o);var n=function(){var r=arguments,o=e?e.apply(this,r):r[0],i=n.cache;if(i.has(o))return i.get(o);var u=t.apply(this,r);return n.cache=i.set(o,u)||i,u};return n.cache=new(Du.Cache||Kn),n}function Ru(t){if("function"!=typeof t)throw new Pt(o);return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}Du.Cache=Kn;var Bu=So((function(t,e){var n=(e=1==e.length&&qu(e[0])?Oe(e[0],Ye(fi())):Oe(mr(e,1),Ye(fi()))).length;return Xr((function(r){for(var o=-1,i=wn(r.length,n);++o<i;)r[o]=e[o].call(this,r[o]);return Me(t,this,r)}))})),Uu=Xr((function(t,e){var n=sn(e,li(Uu));return ti(t,c,r,e,n)})),zu=Xr((function(t,e){var n=sn(e,li(zu));return ti(t,s,r,e,n)})),$u=ii((function(t,e){return ti(t,f,r,r,r,e)}));function Vu(t,e){return t===e||t!=t&&e!=e}var Wu=Ko(Fr),Gu=Ko((function(t,e){return t>=e})),Ju=jr(function(){return arguments}())?jr:function(t){return oa(t)&&Nt.call(t,"callee")&&!Kt.call(t,"callee")},qu=ut.isArray,Zu=_e?Ye(_e):function(t){return oa(t)&&Ir(t)==j};function Ku(t){return null!=t&&na(t.length)&&!ta(t)}function Yu(t){return oa(t)&&Ku(t)}var Hu=Ge||mc,Xu=me?Ye(me):function(t){return oa(t)&&Ir(t)==b};function Qu(t){if(!oa(t))return!1;var e=Ir(t);return e==w||"[object DOMException]"==e||"string"==typeof t.message&&"string"==typeof t.name&&!aa(t)}function ta(t){if(!ra(t))return!1;var e=Ir(t);return e==x||e==S||"[object AsyncFunction]"==e||"[object Proxy]"==e}function ea(t){return"number"==typeof t&&t==ya(t)}function na(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function ra(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function oa(t){return null!=t&&"object"==typeof t}var ia=be?Ye(be):function(t){return oa(t)&&yi(t)==M};function ua(t){return"number"==typeof t||oa(t)&&Ir(t)==C}function aa(t){if(!oa(t)||Ir(t)!=E)return!1;var e=qt(t);if(null===e)return!0;var n=Nt.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&Tt.call(n)==Ut}var ca=we?Ye(we):function(t){return oa(t)&&Ir(t)==F};var sa=xe?Ye(xe):function(t){return oa(t)&&yi(t)==L};function la(t){return"string"==typeof t||!qu(t)&&oa(t)&&Ir(t)==P}function fa(t){return"symbol"==typeof t||oa(t)&&Ir(t)==k}var pa=Se?Ye(Se):function(t){return oa(t)&&na(t.length)&&!!ie[Ir(t)]};var ha=Ko(Ur),da=Ko((function(t,e){return t<=e}));function ga(t){if(!t)return[];if(Ku(t))return la(t)?hn(t):Oo(t);if(ee&&t[ee])return function(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}(t[ee]());var e=yi(t);return(e==M?an:e==L?ln:Va)(t)}function va(t){return t?(t=ma(t))===p||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ya(t){var e=va(t),n=e%1;return e==e?n?e-n:e:0}function _a(t){return t?sr(ya(t),0,g):0}function ma(t){if("number"==typeof t)return t;if(fa(t))return d;if(ra(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=ra(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=Ke(t);var n=vt.test(t);return n||_t.test(t)?se(t.slice(2),n?2:8):gt.test(t)?d:+t}function ba(t){return jo(t,Ta(t))}function wa(t){return null==t?"":fo(t)}var xa=To((function(t,e){if(Ei(e)||Ku(e))jo(e,Aa(e),t);else for(var n in e)Nt.call(e,n)&&rr(t,n,e[n])})),Sa=To((function(t,e){jo(e,Ta(e),t)})),Ma=To((function(t,e,n,r){jo(e,Ta(e),t,r)})),Ca=To((function(t,e,n,r){jo(e,Aa(e),t,r)})),Ea=ii(cr);var Ia=Xr((function(t,e){t=It(t);var n=-1,o=e.length,i=o>2?e[2]:r;for(i&&xi(e[0],e[1],i)&&(o=1);++n<o;)for(var u=e[n],a=Ta(u),c=-1,s=a.length;++c<s;){var l=a[c],f=t[l];(f===r||Vu(f,jt[l])&&!Nt.call(t,l))&&(t[l]=u[l])}return t})),Fa=Xr((function(t){return t.push(r,ni),Me(Da,r,t)}));function La(t,e,n){var o=null==t?r:Cr(t,e);return o===r?n:o}function Pa(t,e){return null!=t&&_i(t,e,Pr)}var ka=Wo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),t[e]=n}),rc(uc)),Oa=Wo((function(t,e,n){null!=e&&"function"!=typeof e.toString&&(e=Bt.call(e)),Nt.call(t,e)?t[e].push(n):t[e]=[n]}),fi),ja=Xr(Or);function Aa(t){return Ku(t)?Xn(t):Rr(t)}function Ta(t){return Ku(t)?Xn(t,!0):Br(t)}var Na=To((function(t,e,n){Wr(t,e,n)})),Da=To((function(t,e,n,r){Wr(t,e,n,r)})),Ra=ii((function(t,e){var n={};if(null==t)return n;var r=!1;e=Oe(e,(function(e){return e=xo(e,t),r||(r=e.length>1),e})),jo(t,ai(t),n),r&&(n=lr(n,7,ri));for(var o=e.length;o--;)ho(n,e[o]);return n}));var Ba=ii((function(t,e){return null==t?{}:function(t,e){return qr(t,e,(function(e,n){return Pa(t,n)}))}(t,e)}));function Ua(t,e){if(null==t)return{};var n=Oe(ai(t),(function(t){return[t]}));return e=fi(e),qr(t,n,(function(t,n){return e(t,n[0])}))}var za=Qo(Aa),$a=Qo(Ta);function Va(t){return null==t?[]:He(t,Aa(t))}var Wa=Bo((function(t,e,n){return e=e.toLowerCase(),t+(n?Ga(e):e)}));function Ga(t){return Qa(wa(t).toLowerCase())}function Ja(t){return(t=wa(t))&&t.replace(bt,nn).replace(Xt,"")}var qa=Bo((function(t,e,n){return t+(n?"-":"")+e.toLowerCase()})),Za=Bo((function(t,e,n){return t+(n?" ":"")+e.toLowerCase()})),Ka=Ro("toLowerCase");var Ya=Bo((function(t,e,n){return t+(n?"_":"")+e.toLowerCase()}));var Ha=Bo((function(t,e,n){return t+(n?" ":"")+Qa(e)}));var Xa=Bo((function(t,e,n){return t+(n?" ":"")+e.toUpperCase()})),Qa=Ro("toUpperCase");function tc(t,e,n){return t=wa(t),(e=n?r:e)===r?function(t){return ne.test(t)}(t)?function(t){return t.match(te)||[]}(t):function(t){return t.match(lt)||[]}(t):t.match(e)||[]}var ec=Xr((function(t,e){try{return Me(t,r,e)}catch(t){return Qu(t)?t:new Mt(t)}})),nc=ii((function(t,e){return Ee(e,(function(e){e=Ui(e),ar(t,e,Ou(t[e],t))})),t}));function rc(t){return function(){return t}}var oc=$o(),ic=$o(!0);function uc(t){return t}function ac(t){return Dr("function"==typeof t?t:lr(t,1))}var cc=Xr((function(t,e){return function(n){return Or(n,t,e)}})),sc=Xr((function(t,e){return function(n){return Or(t,n,e)}}));function lc(t,e,n){var r=Aa(e),o=Mr(e,r);null!=n||ra(e)&&(o.length||!r.length)||(n=e,e=t,t=this,o=Mr(e,Aa(e)));var i=!(ra(n)&&"chain"in n&&!n.chain),u=ta(t);return Ee(o,(function(n){var r=e[n];t[n]=r,u&&(t.prototype[n]=function(){var e=this.__chain__;if(i||e){var n=t(this.__wrapped__),o=n.__actions__=Oo(this.__actions__);return o.push({func:r,args:arguments,thisArg:t}),n.__chain__=e,n}return r.apply(t,je([this.value()],arguments))})})),t}function fc(){}var pc=Jo(Oe),hc=Jo(Fe),dc=Jo(Ne);function gc(t){return Si(t)?We(Ui(t)):function(t){return function(e){return Cr(e,t)}}(t)}var vc=Zo(),yc=Zo(!0);function _c(){return[]}function mc(){return!1}var bc=Go((function(t,e){return t+e}),0),wc=Ho("ceil"),xc=Go((function(t,e){return t/e}),1),Sc=Ho("floor");var Mc,Cc=Go((function(t,e){return t*e}),1),Ec=Ho("round"),Ic=Go((function(t,e){return t-e}),0);return $n.after=function(t,e){if("function"!=typeof e)throw new Pt(o);return t=ya(t),function(){if(--t<1)return e.apply(this,arguments)}},$n.ary=Pu,$n.assign=xa,$n.assignIn=Sa,$n.assignInWith=Ma,$n.assignWith=Ca,$n.at=Ea,$n.before=ku,$n.bind=Ou,$n.bindAll=nc,$n.bindKey=ju,$n.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return qu(t)?t:[t]},$n.chain=gu,$n.chunk=function(t,e,n){e=(n?xi(t,e,n):e===r)?1:bn(ya(e),0);var o=null==t?0:t.length;if(!o||e<1)return[];for(var i=0,u=0,a=ut(ve(o/e));i<o;)a[u++]=io(t,i,i+=e);return a},$n.compact=function(t){for(var e=-1,n=null==t?0:t.length,r=0,o=[];++e<n;){var i=t[e];i&&(o[r++]=i)}return o},$n.concat=function(){var t=arguments.length;if(!t)return[];for(var e=ut(t-1),n=arguments[0],r=t;r--;)e[r-1]=arguments[r];return je(qu(n)?Oo(n):[n],mr(e,1))},$n.cond=function(t){var e=null==t?0:t.length,n=fi();return t=e?Oe(t,(function(t){if("function"!=typeof t[1])throw new Pt(o);return[n(t[0]),t[1]]})):[],Xr((function(n){for(var r=-1;++r<e;){var o=t[r];if(Me(o[0],this,n))return Me(o[1],this,n)}}))},$n.conforms=function(t){return function(t){var e=Aa(t);return function(n){return fr(n,t,e)}}(lr(t,1))},$n.constant=rc,$n.countBy=_u,$n.create=function(t,e){var n=Vn(t);return null==e?n:ur(n,e)},$n.curry=function t(e,n,o){var i=ti(e,8,r,r,r,r,r,n=o?r:n);return i.placeholder=t.placeholder,i},$n.curryRight=function t(e,n,o){var i=ti(e,a,r,r,r,r,r,n=o?r:n);return i.placeholder=t.placeholder,i},$n.debounce=Au,$n.defaults=Ia,$n.defaultsDeep=Fa,$n.defer=Tu,$n.delay=Nu,$n.difference=Vi,$n.differenceBy=Wi,$n.differenceWith=Gi,$n.drop=function(t,e,n){var o=null==t?0:t.length;return o?io(t,(e=n||e===r?1:ya(e))<0?0:e,o):[]},$n.dropRight=function(t,e,n){var o=null==t?0:t.length;return o?io(t,0,(e=o-(e=n||e===r?1:ya(e)))<0?0:e):[]},$n.dropRightWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!0,!0):[]},$n.dropWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!0):[]},$n.fill=function(t,e,n,o){var i=null==t?0:t.length;return i?(n&&"number"!=typeof n&&xi(t,e,n)&&(n=0,o=i),function(t,e,n,o){var i=t.length;for((n=ya(n))<0&&(n=-n>i?0:i+n),(o=o===r||o>i?i:ya(o))<0&&(o+=i),o=n>o?0:_a(o);n<o;)t[n++]=e;return t}(t,e,n,o)):[]},$n.filter=function(t,e){return(qu(t)?Le:_r)(t,fi(e,3))},$n.flatMap=function(t,e){return mr(Eu(t,e),1)},$n.flatMapDeep=function(t,e){return mr(Eu(t,e),p)},$n.flatMapDepth=function(t,e,n){return n=n===r?1:ya(n),mr(Eu(t,e),n)},$n.flatten=Zi,$n.flattenDeep=function(t){return(null==t?0:t.length)?mr(t,p):[]},$n.flattenDepth=function(t,e){return(null==t?0:t.length)?mr(t,e=e===r?1:ya(e)):[]},$n.flip=function(t){return ti(t,512)},$n.flow=oc,$n.flowRight=ic,$n.fromPairs=function(t){for(var e=-1,n=null==t?0:t.length,r={};++e<n;){var o=t[e];r[o[0]]=o[1]}return r},$n.functions=function(t){return null==t?[]:Mr(t,Aa(t))},$n.functionsIn=function(t){return null==t?[]:Mr(t,Ta(t))},$n.groupBy=Su,$n.initial=function(t){return(null==t?0:t.length)?io(t,0,-1):[]},$n.intersection=Yi,$n.intersectionBy=Hi,$n.intersectionWith=Xi,$n.invert=ka,$n.invertBy=Oa,$n.invokeMap=Mu,$n.iteratee=ac,$n.keyBy=Cu,$n.keys=Aa,$n.keysIn=Ta,$n.map=Eu,$n.mapKeys=function(t,e){var n={};return e=fi(e,3),xr(t,(function(t,r,o){ar(n,e(t,r,o),t)})),n},$n.mapValues=function(t,e){var n={};return e=fi(e,3),xr(t,(function(t,r,o){ar(n,r,e(t,r,o))})),n},$n.matches=function(t){return $r(lr(t,1))},$n.matchesProperty=function(t,e){return Vr(t,lr(e,1))},$n.memoize=Du,$n.merge=Na,$n.mergeWith=Da,$n.method=cc,$n.methodOf=sc,$n.mixin=lc,$n.negate=Ru,$n.nthArg=function(t){return t=ya(t),Xr((function(e){return Gr(e,t)}))},$n.omit=Ra,$n.omitBy=function(t,e){return Ua(t,Ru(fi(e)))},$n.once=function(t){return ku(2,t)},$n.orderBy=function(t,e,n,o){return null==t?[]:(qu(e)||(e=null==e?[]:[e]),qu(n=o?r:n)||(n=null==n?[]:[n]),Jr(t,e,n))},$n.over=pc,$n.overArgs=Bu,$n.overEvery=hc,$n.overSome=dc,$n.partial=Uu,$n.partialRight=zu,$n.partition=Iu,$n.pick=Ba,$n.pickBy=Ua,$n.property=gc,$n.propertyOf=function(t){return function(e){return null==t?r:Cr(t,e)}},$n.pull=tu,$n.pullAll=eu,$n.pullAllBy=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,fi(n,2)):t},$n.pullAllWith=function(t,e,n){return t&&t.length&&e&&e.length?Zr(t,e,r,n):t},$n.pullAt=nu,$n.range=vc,$n.rangeRight=yc,$n.rearg=$u,$n.reject=function(t,e){return(qu(t)?Le:_r)(t,Ru(fi(e,3)))},$n.remove=function(t,e){var n=[];if(!t||!t.length)return n;var r=-1,o=[],i=t.length;for(e=fi(e,3);++r<i;){var u=t[r];e(u,r,t)&&(n.push(u),o.push(r))}return Kr(t,o),n},$n.rest=function(t,e){if("function"!=typeof t)throw new Pt(o);return Xr(t,e=e===r?e:ya(e))},$n.reverse=ru,$n.sampleSize=function(t,e,n){return e=(n?xi(t,e,n):e===r)?1:ya(e),(qu(t)?tr:to)(t,e)},$n.set=function(t,e,n){return null==t?t:eo(t,e,n)},$n.setWith=function(t,e,n,o){return o="function"==typeof o?o:r,null==t?t:eo(t,e,n,o)},$n.shuffle=function(t){return(qu(t)?er:oo)(t)},$n.slice=function(t,e,n){var o=null==t?0:t.length;return o?(n&&"number"!=typeof n&&xi(t,e,n)?(e=0,n=o):(e=null==e?0:ya(e),n=n===r?o:ya(n)),io(t,e,n)):[]},$n.sortBy=Fu,$n.sortedUniq=function(t){return t&&t.length?so(t):[]},$n.sortedUniqBy=function(t,e){return t&&t.length?so(t,fi(e,2)):[]},$n.split=function(t,e,n){return n&&"number"!=typeof n&&xi(t,e,n)&&(e=n=r),(n=n===r?g:n>>>0)?(t=wa(t))&&("string"==typeof e||null!=e&&!ca(e))&&!(e=fo(e))&&un(t)?Mo(hn(t),0,n):t.split(e,n):[]},$n.spread=function(t,e){if("function"!=typeof t)throw new Pt(o);return e=null==e?0:bn(ya(e),0),Xr((function(n){var r=n[e],o=Mo(n,0,e);return r&&je(o,r),Me(t,this,o)}))},$n.tail=function(t){var e=null==t?0:t.length;return e?io(t,1,e):[]},$n.take=function(t,e,n){return t&&t.length?io(t,0,(e=n||e===r?1:ya(e))<0?0:e):[]},$n.takeRight=function(t,e,n){var o=null==t?0:t.length;return o?io(t,(e=o-(e=n||e===r?1:ya(e)))<0?0:e,o):[]},$n.takeRightWhile=function(t,e){return t&&t.length?vo(t,fi(e,3),!1,!0):[]},$n.takeWhile=function(t,e){return t&&t.length?vo(t,fi(e,3)):[]},$n.tap=function(t,e){return e(t),t},$n.throttle=function(t,e,n){var r=!0,i=!0;if("function"!=typeof t)throw new Pt(o);return ra(n)&&(r="leading"in n?!!n.leading:r,i="trailing"in n?!!n.trailing:i),Au(t,e,{leading:r,maxWait:e,trailing:i})},$n.thru=vu,$n.toArray=ga,$n.toPairs=za,$n.toPairsIn=$a,$n.toPath=function(t){return qu(t)?Oe(t,Ui):fa(t)?[t]:Oo(Bi(wa(t)))},$n.toPlainObject=ba,$n.transform=function(t,e,n){var r=qu(t),o=r||Hu(t)||pa(t);if(e=fi(e,4),null==n){var i=t&&t.constructor;n=o?r?new i:[]:ra(t)&&ta(i)?Vn(qt(t)):{}}return(o?Ee:xr)(t,(function(t,r,o){return e(n,t,r,o)})),n},$n.unary=function(t){return Pu(t,1)},$n.union=ou,$n.unionBy=iu,$n.unionWith=uu,$n.uniq=function(t){return t&&t.length?po(t):[]},$n.uniqBy=function(t,e){return t&&t.length?po(t,fi(e,2)):[]},$n.uniqWith=function(t,e){return e="function"==typeof e?e:r,t&&t.length?po(t,r,e):[]},$n.unset=function(t,e){return null==t||ho(t,e)},$n.unzip=au,$n.unzipWith=cu,$n.update=function(t,e,n){return null==t?t:go(t,e,wo(n))},$n.updateWith=function(t,e,n,o){return o="function"==typeof o?o:r,null==t?t:go(t,e,wo(n),o)},$n.values=Va,$n.valuesIn=function(t){return null==t?[]:He(t,Ta(t))},$n.without=su,$n.words=tc,$n.wrap=function(t,e){return Uu(wo(e),t)},$n.xor=lu,$n.xorBy=fu,$n.xorWith=pu,$n.zip=hu,$n.zipObject=function(t,e){return mo(t||[],e||[],rr)},$n.zipObjectDeep=function(t,e){return mo(t||[],e||[],eo)},$n.zipWith=du,$n.entries=za,$n.entriesIn=$a,$n.extend=Sa,$n.extendWith=Ma,lc($n,$n),$n.add=bc,$n.attempt=ec,$n.camelCase=Wa,$n.capitalize=Ga,$n.ceil=wc,$n.clamp=function(t,e,n){return n===r&&(n=e,e=r),n!==r&&(n=(n=ma(n))==n?n:0),e!==r&&(e=(e=ma(e))==e?e:0),sr(ma(t),e,n)},$n.clone=function(t){return lr(t,4)},$n.cloneDeep=function(t){return lr(t,5)},$n.cloneDeepWith=function(t,e){return lr(t,5,e="function"==typeof e?e:r)},$n.cloneWith=function(t,e){return lr(t,4,e="function"==typeof e?e:r)},$n.conformsTo=function(t,e){return null==e||fr(t,e,Aa(e))},$n.deburr=Ja,$n.defaultTo=function(t,e){return null==t||t!=t?e:t},$n.divide=xc,$n.endsWith=function(t,e,n){t=wa(t),e=fo(e);var o=t.length,i=n=n===r?o:sr(ya(n),0,o);return(n-=e.length)>=0&&t.slice(n,i)==e},$n.eq=Vu,$n.escape=function(t){return(t=wa(t))&&Y.test(t)?t.replace(Z,rn):t},$n.escapeRegExp=function(t){return(t=wa(t))&&ot.test(t)?t.replace(rt,"\\$&"):t},$n.every=function(t,e,n){var o=qu(t)?Fe:vr;return n&&xi(t,e,n)&&(e=r),o(t,fi(e,3))},$n.find=mu,$n.findIndex=Ji,$n.findKey=function(t,e){return Re(t,fi(e,3),xr)},$n.findLast=bu,$n.findLastIndex=qi,$n.findLastKey=function(t,e){return Re(t,fi(e,3),Sr)},$n.floor=Sc,$n.forEach=wu,$n.forEachRight=xu,$n.forIn=function(t,e){return null==t?t:br(t,fi(e,3),Ta)},$n.forInRight=function(t,e){return null==t?t:wr(t,fi(e,3),Ta)},$n.forOwn=function(t,e){return t&&xr(t,fi(e,3))},$n.forOwnRight=function(t,e){return t&&Sr(t,fi(e,3))},$n.get=La,$n.gt=Wu,$n.gte=Gu,$n.has=function(t,e){return null!=t&&_i(t,e,Lr)},$n.hasIn=Pa,$n.head=Ki,$n.identity=uc,$n.includes=function(t,e,n,r){t=Ku(t)?t:Va(t),n=n&&!r?ya(n):0;var o=t.length;return n<0&&(n=bn(o+n,0)),la(t)?n<=o&&t.indexOf(e,n)>-1:!!o&&Ue(t,e,n)>-1},$n.indexOf=function(t,e,n){var r=null==t?0:t.length;if(!r)return-1;var o=null==n?0:ya(n);return o<0&&(o=bn(r+o,0)),Ue(t,e,o)},$n.inRange=function(t,e,n){return e=va(e),n===r?(n=e,e=0):n=va(n),function(t,e,n){return t>=wn(e,n)&&t<bn(e,n)}(t=ma(t),e,n)},$n.invoke=ja,$n.isArguments=Ju,$n.isArray=qu,$n.isArrayBuffer=Zu,$n.isArrayLike=Ku,$n.isArrayLikeObject=Yu,$n.isBoolean=function(t){return!0===t||!1===t||oa(t)&&Ir(t)==m},$n.isBuffer=Hu,$n.isDate=Xu,$n.isElement=function(t){return oa(t)&&1===t.nodeType&&!aa(t)},$n.isEmpty=function(t){if(null==t)return!0;if(Ku(t)&&(qu(t)||"string"==typeof t||"function"==typeof t.splice||Hu(t)||pa(t)||Ju(t)))return!t.length;var e=yi(t);if(e==M||e==L)return!t.size;if(Ei(t))return!Rr(t).length;for(var n in t)if(Nt.call(t,n))return!1;return!0},$n.isEqual=function(t,e){return Ar(t,e)},$n.isEqualWith=function(t,e,n){var o=(n="function"==typeof n?n:r)?n(t,e):r;return o===r?Ar(t,e,r,n):!!o},$n.isError=Qu,$n.isFinite=function(t){return"number"==typeof t&&yn(t)},$n.isFunction=ta,$n.isInteger=ea,$n.isLength=na,$n.isMap=ia,$n.isMatch=function(t,e){return t===e||Tr(t,e,hi(e))},$n.isMatchWith=function(t,e,n){return n="function"==typeof n?n:r,Tr(t,e,hi(e),n)},$n.isNaN=function(t){return ua(t)&&t!=+t},$n.isNative=function(t){if(Ci(t))throw new Mt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Nr(t)},$n.isNil=function(t){return null==t},$n.isNull=function(t){return null===t},$n.isNumber=ua,$n.isObject=ra,$n.isObjectLike=oa,$n.isPlainObject=aa,$n.isRegExp=ca,$n.isSafeInteger=function(t){return ea(t)&&t>=-9007199254740991&&t<=h},$n.isSet=sa,$n.isString=la,$n.isSymbol=fa,$n.isTypedArray=pa,$n.isUndefined=function(t){return t===r},$n.isWeakMap=function(t){return oa(t)&&yi(t)==O},$n.isWeakSet=function(t){return oa(t)&&"[object WeakSet]"==Ir(t)},$n.join=function(t,e){return null==t?"":_n.call(t,e)},$n.kebabCase=qa,$n.last=Qi,$n.lastIndexOf=function(t,e,n){var o=null==t?0:t.length;if(!o)return-1;var i=o;return n!==r&&(i=(i=ya(n))<0?bn(o+i,0):wn(i,o-1)),e==e?function(t,e,n){for(var r=n+1;r--;)if(t[r]===e)return r;return r}(t,e,i):Be(t,$e,i,!0)},$n.lowerCase=Za,$n.lowerFirst=Ka,$n.lt=ha,$n.lte=da,$n.max=function(t){return t&&t.length?yr(t,uc,Fr):r},$n.maxBy=function(t,e){return t&&t.length?yr(t,fi(e,2),Fr):r},$n.mean=function(t){return Ve(t,uc)},$n.meanBy=function(t,e){return Ve(t,fi(e,2))},$n.min=function(t){return t&&t.length?yr(t,uc,Ur):r},$n.minBy=function(t,e){return t&&t.length?yr(t,fi(e,2),Ur):r},$n.stubArray=_c,$n.stubFalse=mc,$n.stubObject=function(){return{}},$n.stubString=function(){return""},$n.stubTrue=function(){return!0},$n.multiply=Cc,$n.nth=function(t,e){return t&&t.length?Gr(t,ya(e)):r},$n.noConflict=function(){return pe._===this&&(pe._=zt),this},$n.noop=fc,$n.now=Lu,$n.pad=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;if(!e||r>=e)return t;var o=(e-r)/2;return qo(ye(o),n)+t+qo(ve(o),n)},$n.padEnd=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;return e&&r<e?t+qo(e-r,n):t},$n.padStart=function(t,e,n){t=wa(t);var r=(e=ya(e))?pn(t):0;return e&&r<e?qo(e-r,n)+t:t},$n.parseInt=function(t,e,n){return n||null==e?e=0:e&&(e=+e),Sn(wa(t).replace(it,""),e||0)},$n.random=function(t,e,n){if(n&&"boolean"!=typeof n&&xi(t,e,n)&&(e=n=r),n===r&&("boolean"==typeof e?(n=e,e=r):"boolean"==typeof t&&(n=t,t=r)),t===r&&e===r?(t=0,e=1):(t=va(t),e===r?(e=t,t=0):e=va(e)),t>e){var o=t;t=e,e=o}if(n||t%1||e%1){var i=Mn();return wn(t+i*(e-t+ce("1e-"+((i+"").length-1))),e)}return Yr(t,e)},$n.reduce=function(t,e,n){var r=qu(t)?Ae:Je,o=arguments.length<3;return r(t,fi(e,4),n,o,dr)},$n.reduceRight=function(t,e,n){var r=qu(t)?Te:Je,o=arguments.length<3;return r(t,fi(e,4),n,o,gr)},$n.repeat=function(t,e,n){return e=(n?xi(t,e,n):e===r)?1:ya(e),Hr(wa(t),e)},$n.replace=function(){var t=arguments,e=wa(t[0]);return t.length<3?e:e.replace(t[1],t[2])},$n.result=function(t,e,n){var o=-1,i=(e=xo(e,t)).length;for(i||(i=1,t=r);++o<i;){var u=null==t?r:t[Ui(e[o])];u===r&&(o=i,u=n),t=ta(u)?u.call(t):u}return t},$n.round=Ec,$n.runInContext=t,$n.sample=function(t){return(qu(t)?Qn:Qr)(t)},$n.size=function(t){if(null==t)return 0;if(Ku(t))return la(t)?pn(t):t.length;var e=yi(t);return e==M||e==L?t.size:Rr(t).length},$n.snakeCase=Ya,$n.some=function(t,e,n){var o=qu(t)?Ne:uo;return n&&xi(t,e,n)&&(e=r),o(t,fi(e,3))},$n.sortedIndex=function(t,e){return ao(t,e)},$n.sortedIndexBy=function(t,e,n){return co(t,e,fi(n,2))},$n.sortedIndexOf=function(t,e){var n=null==t?0:t.length;if(n){var r=ao(t,e);if(r<n&&Vu(t[r],e))return r}return-1},$n.sortedLastIndex=function(t,e){return ao(t,e,!0)},$n.sortedLastIndexBy=function(t,e,n){return co(t,e,fi(n,2),!0)},$n.sortedLastIndexOf=function(t,e){if(null==t?0:t.length){var n=ao(t,e,!0)-1;if(Vu(t[n],e))return n}return-1},$n.startCase=Ha,$n.startsWith=function(t,e,n){return t=wa(t),n=null==n?0:sr(ya(n),0,t.length),e=fo(e),t.slice(n,n+e.length)==e},$n.subtract=Ic,$n.sum=function(t){return t&&t.length?qe(t,uc):0},$n.sumBy=function(t,e){return t&&t.length?qe(t,fi(e,2)):0},$n.template=function(t,e,n){var o=$n.templateSettings;n&&xi(t,e,n)&&(e=r),t=wa(t),e=Ma({},e,o,ei);var i,u,a=Ma({},e.imports,o.imports,ei),c=Aa(a),s=He(a,c),l=0,f=e.interpolate||wt,p="__p += '",h=Ft((e.escape||wt).source+"|"+f.source+"|"+(f===Q?ht:wt).source+"|"+(e.evaluate||wt).source+"|$","g"),d="//# sourceURL="+(Nt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++oe+"]")+"\n";t.replace(h,(function(e,n,r,o,a,c){return r||(r=o),p+=t.slice(l,c).replace(xt,on),n&&(i=!0,p+="' +\n__e("+n+") +\n'"),a&&(u=!0,p+="';\n"+a+";\n__p += '"),r&&(p+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=c+e.length,e})),p+="';\n";var g=Nt.call(e,"variable")&&e.variable;if(g){if(ft.test(g))throw new Mt("Invalid `variable` option passed into `_.template`")}else p="with (obj) {\n"+p+"\n}\n";p=(u?p.replace(W,""):p).replace(G,"$1").replace(J,"$1;"),p="function("+(g||"obj")+") {\n"+(g?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(i?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+p+"return __p\n}";var v=ec((function(){return Ct(c,d+"return "+p).apply(r,s)}));if(v.source=p,Qu(v))throw v;return v},$n.times=function(t,e){if((t=ya(t))<1||t>h)return[];var n=g,r=wn(t,g);e=fi(e),t-=g;for(var o=Ze(r,e);++n<t;)e(n);return o},$n.toFinite=va,$n.toInteger=ya,$n.toLength=_a,$n.toLower=function(t){return wa(t).toLowerCase()},$n.toNumber=ma,$n.toSafeInteger=function(t){return t?sr(ya(t),-9007199254740991,h):0===t?t:0},$n.toString=wa,$n.toUpper=function(t){return wa(t).toUpperCase()},$n.trim=function(t,e,n){if((t=wa(t))&&(n||e===r))return Ke(t);if(!t||!(e=fo(e)))return t;var o=hn(t),i=hn(e);return Mo(o,Qe(o,i),tn(o,i)+1).join("")},$n.trimEnd=function(t,e,n){if((t=wa(t))&&(n||e===r))return t.slice(0,dn(t)+1);if(!t||!(e=fo(e)))return t;var o=hn(t);return Mo(o,0,tn(o,hn(e))+1).join("")},$n.trimStart=function(t,e,n){if((t=wa(t))&&(n||e===r))return t.replace(it,"");if(!t||!(e=fo(e)))return t;var o=hn(t);return Mo(o,Qe(o,hn(e))).join("")},$n.truncate=function(t,e){var n=30,o="...";if(ra(e)){var i="separator"in e?e.separator:i;n="length"in e?ya(e.length):n,o="omission"in e?fo(e.omission):o}var u=(t=wa(t)).length;if(un(t)){var a=hn(t);u=a.length}if(n>=u)return t;var c=n-pn(o);if(c<1)return o;var s=a?Mo(a,0,c).join(""):t.slice(0,c);if(i===r)return s+o;if(a&&(c+=s.length-c),ca(i)){if(t.slice(c).search(i)){var l,f=s;for(i.global||(i=Ft(i.source,wa(dt.exec(i))+"g")),i.lastIndex=0;l=i.exec(f);)var p=l.index;s=s.slice(0,p===r?c:p)}}else if(t.indexOf(fo(i),c)!=c){var h=s.lastIndexOf(i);h>-1&&(s=s.slice(0,h))}return s+o},$n.unescape=function(t){return(t=wa(t))&&K.test(t)?t.replace(q,gn):t},$n.uniqueId=function(t){var e=++Dt;return wa(t)+e},$n.upperCase=Xa,$n.upperFirst=Qa,$n.each=wu,$n.eachRight=xu,$n.first=Ki,lc($n,(Mc={},xr($n,(function(t,e){Nt.call($n.prototype,e)||(Mc[e]=t)})),Mc),{chain:!1}),$n.VERSION="4.17.21",Ee(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$n[t].placeholder=$n})),Ee(["drop","take"],(function(t,e){Jn.prototype[t]=function(n){n=n===r?1:bn(ya(n),0);var o=this.__filtered__&&!e?new Jn(this):this.clone();return o.__filtered__?o.__takeCount__=wn(n,o.__takeCount__):o.__views__.push({size:wn(n,g),type:t+(o.__dir__<0?"Right":"")}),o},Jn.prototype[t+"Right"]=function(e){return this.reverse()[t](e).reverse()}})),Ee(["filter","map","takeWhile"],(function(t,e){var n=e+1,r=1==n||3==n;Jn.prototype[t]=function(t){var e=this.clone();return e.__iteratees__.push({iteratee:fi(t,3),type:n}),e.__filtered__=e.__filtered__||r,e}})),Ee(["head","last"],(function(t,e){var n="take"+(e?"Right":"");Jn.prototype[t]=function(){return this[n](1).value()[0]}})),Ee(["initial","tail"],(function(t,e){var n="drop"+(e?"":"Right");Jn.prototype[t]=function(){return this.__filtered__?new Jn(this):this[n](1)}})),Jn.prototype.compact=function(){return this.filter(uc)},Jn.prototype.find=function(t){return this.filter(t).head()},Jn.prototype.findLast=function(t){return this.reverse().find(t)},Jn.prototype.invokeMap=Xr((function(t,e){return"function"==typeof t?new Jn(this):this.map((function(n){return Or(n,t,e)}))})),Jn.prototype.reject=function(t){return this.filter(Ru(fi(t)))},Jn.prototype.slice=function(t,e){t=ya(t);var n=this;return n.__filtered__&&(t>0||e<0)?new Jn(n):(t<0?n=n.takeRight(-t):t&&(n=n.drop(t)),e!==r&&(n=(e=ya(e))<0?n.dropRight(-e):n.take(e-t)),n)},Jn.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Jn.prototype.toArray=function(){return this.take(g)},xr(Jn.prototype,(function(t,e){var n=/^(?:filter|find|map|reject)|While$/.test(e),o=/^(?:head|last)$/.test(e),i=$n[o?"take"+("last"==e?"Right":""):e],u=o||/^find/.test(e);i&&($n.prototype[e]=function(){var e=this.__wrapped__,a=o?[1]:arguments,c=e instanceof Jn,s=a[0],l=c||qu(e),f=function(t){var e=i.apply($n,je([t],a));return o&&p?e[0]:e};l&&n&&"function"==typeof s&&1!=s.length&&(c=l=!1);var p=this.__chain__,h=!!this.__actions__.length,d=u&&!p,g=c&&!h;if(!u&&l){e=g?e:new Jn(this);var v=t.apply(e,a);return v.__actions__.push({func:vu,args:[f],thisArg:r}),new Gn(v,p)}return d&&g?t.apply(this,a):(v=this.thru(f),d?o?v.value()[0]:v.value():v)})})),Ee(["pop","push","shift","sort","splice","unshift"],(function(t){var e=kt[t],n=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);$n.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var o=this.value();return e.apply(qu(o)?o:[],t)}return this[n]((function(n){return e.apply(qu(n)?n:[],t)}))}})),xr(Jn.prototype,(function(t,e){var n=$n[e];if(n){var r=n.name+"";Nt.call(jn,r)||(jn[r]=[]),jn[r].push({name:e,func:n})}})),jn[Vo(r,2).name]=[{name:"wrapper",func:r}],Jn.prototype.clone=function(){var t=new Jn(this.__wrapped__);return t.__actions__=Oo(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Oo(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Oo(this.__views__),t},Jn.prototype.reverse=function(){if(this.__filtered__){var t=new Jn(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Jn.prototype.value=function(){var t=this.__wrapped__.value(),e=this.__dir__,n=qu(t),r=e<0,o=n?t.length:0,i=function(t,e,n){var r=-1,o=n.length;for(;++r<o;){var i=n[r],u=i.size;switch(i.type){case"drop":t+=u;break;case"dropRight":e-=u;break;case"take":e=wn(e,t+u);break;case"takeRight":t=bn(t,e-u)}}return{start:t,end:e}}(0,o,this.__views__),u=i.start,a=i.end,c=a-u,s=r?a:u-1,l=this.__iteratees__,f=l.length,p=0,h=wn(c,this.__takeCount__);if(!n||!r&&o==c&&h==c)return yo(t,this.__actions__);var d=[];t:for(;c--&&p<h;){for(var g=-1,v=t[s+=e];++g<f;){var y=l[g],_=y.iteratee,m=y.type,b=_(v);if(2==m)v=b;else if(!b){if(1==m)continue t;break t}}d[p++]=v}return d},$n.prototype.at=yu,$n.prototype.chain=function(){return gu(this)},$n.prototype.commit=function(){return new Gn(this.value(),this.__chain__)},$n.prototype.next=function(){this.__values__===r&&(this.__values__=ga(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?r:this.__values__[this.__index__++]}},$n.prototype.plant=function(t){for(var e,n=this;n instanceof Wn;){var o=$i(n);o.__index__=0,o.__values__=r,e?i.__wrapped__=o:e=o;var i=o;n=n.__wrapped__}return i.__wrapped__=t,e},$n.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof Jn){var e=t;return this.__actions__.length&&(e=new Jn(this)),(e=e.reverse()).__actions__.push({func:vu,args:[ru],thisArg:r}),new Gn(e,this.__chain__)}return this.thru(ru)},$n.prototype.toJSON=$n.prototype.valueOf=$n.prototype.value=function(){return yo(this.__wrapped__,this.__actions__)},$n.prototype.first=$n.prototype.head,ee&&($n.prototype[ee]=function(){return this}),$n}();de?((de.exports=vn)._=vn,he._=vn):pe._=vn}).call(n)})),a={centimeters:637100880,centimetres:637100880,degrees:6371008.8/111325,feet:20902260.511392,inches:6371008.8*39.37,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:6371008800,millimetres:6371008800,nauticalmiles:6371008.8/1852,radians:1,yards:6371008.8*1.0936};
|
|
2
|
-
/*! @preserve
|
|
3
|
-
* numeral.js
|
|
4
|
-
* version : 2.0.6
|
|
5
|
-
* author : Adam Draper
|
|
6
|
-
* license : MIT
|
|
7
|
-
* http://adamwdraper.github.com/Numeral-js/
|
|
8
|
-
*/function c(t,e,n){void 0===n&&(n={});var r={type:"Feature"};return(0===n.id||n.id)&&(r.id=n.id),n.bbox&&(r.bbox=n.bbox),r.properties=e||{},r.geometry=t,r}function s(t,e,n){if(void 0===n&&(n={}),t.length<2)throw new Error("coordinates must be an array of two or more positions");return c({type:"LineString",coordinates:t},e,n)}function l(t){return t%360*Math.PI/180}function f(t){if(!t)throw new Error("coord is required");if(!Array.isArray(t)){if("Feature"===t.type&&null!==t.geometry&&"Point"===t.geometry.type)return t.geometry.coordinates;if("Point"===t.type)return t.coordinates}if(Array.isArray(t)&&t.length>=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return t;throw new Error("coord must be GeoJSON Point or an Array of numbers")}function p(t,e,n){void 0===n&&(n={});var r=f(t),o=f(e),i=l(o[1]-r[1]),u=l(o[0]-r[0]),c=l(r[1]),s=l(o[1]),p=Math.pow(Math.sin(i/2),2)+Math.pow(Math.sin(u/2),2)*Math.cos(c)*Math.cos(s);return function(t,e){void 0===e&&(e="kilometers");var n=a[e];if(!n)throw new Error(e+" units is invalid");return t*n}(2*Math.atan2(Math.sqrt(p),Math.sqrt(1-p)),n.units)}function h(t,e,n){if(null!==t)for(var r,o,i,u,a,c,s,l,f=0,p=0,d=t.type,g="FeatureCollection"===d,v="Feature"===d,y=g?t.features.length:1,_=0;_<y;_++){a=(l=!!(s=g?t.features[_].geometry:v?t.geometry:t)&&"GeometryCollection"===s.type)?s.geometries.length:1;for(var m=0;m<a;m++){var b=0,w=0;if(null!==(u=l?s.geometries[m]:s)){c=u.coordinates;var x=u.type;switch(f=!n||"Polygon"!==x&&"MultiPolygon"!==x?0:1,x){case null:break;case"Point":if(!1===e(c,p,_,b,w))return!1;p++,b++;break;case"LineString":case"MultiPoint":for(r=0;r<c.length;r++){if(!1===e(c[r],p,_,b,w))return!1;p++,"MultiPoint"===x&&b++}"LineString"===x&&b++;break;case"Polygon":case"MultiLineString":for(r=0;r<c.length;r++){for(o=0;o<c[r].length-f;o++){if(!1===e(c[r][o],p,_,b,w))return!1;p++}"MultiLineString"===x&&b++,"Polygon"===x&&w++}"Polygon"===x&&b++;break;case"MultiPolygon":for(r=0;r<c.length;r++){for(w=0,o=0;o<c[r].length;o++){for(i=0;i<c[r][o].length-f;i++){if(!1===e(c[r][o][i],p,_,b,w))return!1;p++}w++}b++}break;case"GeometryCollection":for(r=0;r<u.geometries.length;r++)if(!1===h(u.geometries[r],e,n))return!1;break;default:throw new Error("Unknown Geometry Type")}}}}}function d(t,e){!function(t,e){var n,r,o,i,u,a,c,s,l,f,p=0,h="FeatureCollection"===t.type,d="Feature"===t.type,g=h?t.features.length:1;for(n=0;n<g;n++){for(a=h?t.features[n].geometry:d?t.geometry:t,s=h?t.features[n].properties:d?t.properties:{},l=h?t.features[n].bbox:d?t.bbox:void 0,f=h?t.features[n].id:d?t.id:void 0,u=(c=!!a&&"GeometryCollection"===a.type)?a.geometries.length:1,o=0;o<u;o++)if(null!==(i=c?a.geometries[o]:a))switch(i.type){case"Point":case"LineString":case"MultiPoint":case"Polygon":case"MultiLineString":case"MultiPolygon":if(!1===e(i,p,s,l,f))return!1;break;case"GeometryCollection":for(r=0;r<i.geometries.length;r++)if(!1===e(i.geometries[r],p,s,l,f))return!1;break;default:throw new Error("Unknown Geometry Type")}else if(!1===e(null,p,s,l,f))return!1;p++}}(t,(function(t,n,r,o,i){var u,a=null===t?null:t.type;switch(a){case null:case"Point":case"LineString":case"Polygon":return!1!==e(c(t,r,{bbox:o,id:i}),n,0)&&void 0}switch(a){case"MultiPoint":u="Point";break;case"MultiLineString":u="LineString";break;case"MultiPolygon":u="Polygon"}for(var s=0;s<t.coordinates.length;s++){var l=t.coordinates[s];if(!1===e(c({type:u,coordinates:l},r),n,s))return!1}}))}function g(t,e){d(t,(function(t,n,r){var o=0;if(t.geometry){var i=t.geometry.type;if("Point"!==i&&"MultiPoint"!==i){var u,a=0,c=0,l=0;return!1!==h(t,(function(i,f,p,h,d){if(void 0===u||n>a||h>c||d>l)return u=i,a=n,c=h,l=d,void(o=0);var g=s([u,i],t.properties);if(!1===e(g,n,r,d,o))return!1;o++,u=i}))&&void 0}}}))}function v(t,e){return void 0===e&&(e={}),function(t,e,n){var r=n,o=!1;return g(t,(function(t,i,u,a,c){r=!1===o&&void 0===n?t:e(r,t,i,u,a,c),o=!0})),r}(t,(function(t,n){var r=n.geometry.coordinates;return t+p(r[0],r[1],e)}),0)}const y=u.extend({},o.modes.draw_line_string);const _=t=>{setTimeout((()=>{t.map&&t.map.doubleClickZoom&&t._ctx&&t._ctx.store&&t._ctx.store.getInitialConfigValue&&t._ctx.store.getInitialConfigValue("doubleClickZoom")&&t.map.doubleClickZoom.enable()}),0)};y.onSetup=function(t){const e=o.modes.draw_line_string.onSetup.call(this,t),n=this.newFeature({type:"Feature",properties:{meta:"radius"},geometry:{type:"Polygon",coordinates:[[]]}});return this.addFeature(n),{...e,circle:n}},y.clickAnywhere=function(t,e){return 1===t.currentVertexPosition?(t.line.addCoordinate(0,e.lngLat.lng,e.lngLat.lat),this.changeMode("simple_select",{featureIds:[t.line.id]})):(this.updateUIClasses({mouse:"add"}),t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),"forward"===t.direction?(t.currentVertexPosition+=1,t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat)):t.line.addCoordinate(0,e.lngLat.lng,e.lngLat.lat),null)},y.onMouseMove=function(t,n){o.modes.draw_line_string.onMouseMove.call(this,t,n);const r=t.line.toGeoJSON(),i=r.geometry.coordinates[0],u=v(r,"kilometers"),a=this.map&&this.map.crs?this.map.crs.epsgCode:"EPSG:4326",c=function(t,n,r,o,i=64){if(o.includes("4326")){const e={latitude:t[1],longitude:t[0]},o=n,u=[],a=o/(111.32*Math.cos(e.latitude*Math.PI/180)),c=o/110.574;let s,l,f;for(let t=0;t<i;t+=1)s=t/i*(2*Math.PI),l=a*Math.cos(s),f=c*Math.sin(s),u.push([e.longitude+l,e.latitude+f]);return u.push(u[0]),{type:"Feature",geometry:{type:"Polygon",coordinates:[u]},properties:{parent:r}}}{const o={steps:64,units:"kilometers",properties:{parent:r}};return e.circle(t,n,o)}}(i,u,t.line.id,a);c.properties.meta="radius",t.circle.setCoordinates(c.geometry.coordinates)},y.onStop=function(t){_(this),this.activateUIButton(),void 0!==this.getFeature(t.line.id)&&(t.line.removeCoordinate("0"),t.line.isValid()?(t.line.toGeoJSON(),this.deleteFeature([t.line.id],{silent:!0}),this.map.fire("draw.create",{features:[t.circle.toGeoJSON()]})):(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode("simple_select",{},{silent:!0})))},y.toDisplayFeatures=function(t,e,n){const r=e.properties.id===t.line.id;if(e.properties.active=r?"true":"false",!r)return n(e);if(e.geometry.coordinates.length<2)return null;var o,u,a;e.properties.meta="feature",n((o=t.line.id,u=e.geometry.coordinates["forward"===t.direction?e.geometry.coordinates.length-2:1],a=""+("forward"===t.direction?e.geometry.coordinates.length-2:1),{type:"Feature",properties:{meta:"vertex",parent:o,coord_path:a,active:!1?"true":"false"},geometry:{type:"Point",coordinates:u}})),n(e);const c=function(t){const e=1e3*v(t);let n,r,o="m",u="0,0",a="feet",c="0,0";return n=e,e>=1e3&&(n=e/1e3,o="km",u="0.00"),r=3.28084*e,r>=5280&&(r/=5280,a="mi",c="0.00"),{metric:`${i(n).format(u)} ${o}`,standard:`${i(r).format(c)} ${a}`}}(e);return n({type:"Feature",properties:{meta:"currentPosition",radiusMetric:c.metric,radiusStandard:c.standard,parent:t.line.id},geometry:{type:"Point",coordinates:e.geometry.coordinates[1]}}),null},module.exports=y;
|