(self.webpackChunkfindagrave_frontend=self.webpackChunkfindagrave_frontend||[]).push([[3751,7975],{49778(t,e,o){var n=o(67628);function r(t){var e=0;if(t&&t.length>0){e+=Math.abs(i(t[0]));for(var o=1;o2){for(c=0;cn.J1});var n=o(39708)},60771(t,e,o){"use strict";o.d(e,{A:()=>f}),o.dn(f);var n=o(32017),r=o(8186),i=o(64348),s=o(49058),a=o(11790),c=o(23466),u=o(8665),l=o(60454),d=o(7518),p=o(23982),h=o(6260);const g={Polygon:l.A,LineString:d.A,Point:p.A,MultiPolygon:h.A,MultiLineString:h.A,MultiPoint:h.A};function f(t,e){e.modes=c.nI;const o=void 0===t.options.suppressAPIEvents||!!t.options.suppressAPIEvents;return e.getFeatureIdsAt=function(e){return s.A.click({point:e},null,t).map(t=>t.properties.id)},e.getSelectedIds=function(){return t.store.getSelectedIds()},e.getSelected=function(){return{type:c.zH.FEATURE_COLLECTION,features:t.store.getSelectedIds().map(e=>t.store.get(e)).map(t=>t.toGeoJSON())}},e.getSelectedPoints=function(){return{type:c.zH.FEATURE_COLLECTION,features:t.store.getSelectedCoordinates().map(t=>({type:c.zH.FEATURE,properties:{},geometry:{type:c.zH.POINT,coordinates:t.coordinates}}))}},e.set=function(o){if(void 0===o.type||o.type!==c.zH.FEATURE_COLLECTION||!Array.isArray(o.features))throw new Error("Invalid FeatureCollection");const n=t.store.createRenderBatch();let r=t.store.getAllIds().slice();const i=e.add(o),s=new u.A(i);return r=r.filter(t=>!s.has(t)),r.length&&e.delete(r),n(),i},e.add=function(e){const s=JSON.parse(JSON.stringify(r(e))).features.map(e=>{if(e.id=e.id||(0,i.n)(),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){const n=g[e.geometry.type];if(void 0===n)throw new Error(`Invalid geometry type: ${e.geometry.type}.`);const r=new n(t,e);t.store.add(r,{silent:o})}else{const r=t.store.get(e.id),i=r.properties;r.properties=e.properties,n(i,e.properties)||t.store.featureChanged(r.id,{silent:o}),n(r.getCoordinates(),e.geometry.coordinates)||r.incomingCoords(e.geometry.coordinates)}return e.id});return t.store.render(),s},e.get=function(e){const o=t.store.get(e);if(o)return o.toGeoJSON()},e.getAll=function(){return{type:c.zH.FEATURE_COLLECTION,features:t.store.getAll().map(t=>t.toGeoJSON())}},e.delete=function(n){return t.store.delete(n,{silent:o}),e.getMode()!==c.nI.DIRECT_SELECT||t.store.getSelectedIds().length?t.store.render():t.events.changeMode(c.nI.SIMPLE_SELECT,void 0,{silent:o}),e},e.deleteAll=function(){return t.store.delete(t.store.getAllIds(),{silent:o}),e.getMode()===c.nI.DIRECT_SELECT?t.events.changeMode(c.nI.SIMPLE_SELECT,void 0,{silent:o}):t.store.render(),e},e.changeMode=function(n,r={}){return n===c.nI.SIMPLE_SELECT&&e.getMode()===c.nI.SIMPLE_SELECT?((0,a.A)(r.featureIds||[],t.store.getSelectedIds())||(t.store.setSelected(r.featureIds,{silent:o}),t.store.render()),e):(n===c.nI.DIRECT_SELECT&&e.getMode()===c.nI.DIRECT_SELECT&&r.featureId===t.store.getSelectedIds()[0]||t.events.changeMode(n,r,{silent:o}),e)},e.getMode=function(){return t.events.getMode()},e.trash=function(){return t.events.trash({silent:o}),e},e.combineFeatures=function(){return t.events.combineFeatures({silent:o}),e},e.uncombineFeatures=function(){return t.events.uncombineFeatures({silent:o}),e},e.setFeatureProperty=function(n,r,i){return t.store.setFeatureProperty(n,r,i,{silent:o}),e},e}},23466(t,e,o){"use strict";o.r(e);o.d(e,["AZ",0,{CREATE:"draw.create",DELETE:"draw.delete",UPDATE:"draw.update",SELECTION_CHANGE:"draw.selectionchange",MODE_CHANGE:"draw.modechange",ACTIONABLE:"draw.actionable",RENDER:"draw.render",COMBINE_FEATURES:"draw.combine",UNCOMBINE_FEATURES:"draw.uncombine"},"J3",0,{MOVE:"move",CHANGE_PROPERTIES:"change_properties",CHANGE_COORDINATES:"change_coordinates"},"Ly",0,{CANVAS:"mapboxgl-canvas",CONTROL_BASE:"mapboxgl-ctrl",CONTROL_PREFIX:"mapboxgl-ctrl-",CONTROL_BUTTON:"mapbox-gl-draw_ctrl-draw-btn",CONTROL_BUTTON_LINE:"mapbox-gl-draw_line",CONTROL_BUTTON_POLYGON:"mapbox-gl-draw_polygon",CONTROL_BUTTON_POINT:"mapbox-gl-draw_point",CONTROL_BUTTON_TRASH:"mapbox-gl-draw_trash",CONTROL_BUTTON_COMBINE_FEATURES:"mapbox-gl-draw_combine",CONTROL_BUTTON_UNCOMBINE_FEATURES:"mapbox-gl-draw_uncombine",CONTROL_GROUP:"mapboxgl-ctrl-group",ATTRIBUTION:"mapboxgl-ctrl-attrib",ACTIVE_BUTTON:"active",BOX_SELECT:"mapbox-gl-draw_boxselect"},"Pv",0,-85,"Tf",0,270,"Tj",0,{HOT:"mapbox-gl-draw-hot",COLD:"mapbox-gl-draw-cold"},"VN",0,85,"gK",0,{POLYGON:"polygon",LINE:"line_string",POINT:"point"},"jc",0,-270,"kZ",0,{ADD:"add",MOVE:"move",DRAG:"drag",POINTER:"pointer",NONE:"none"},"l4",0,{ACTIVE:"true",INACTIVE:"false"},"mI",0,{FEATURE:"feature",MIDPOINT:"midpoint",VERTEX:"vertex"},"nI",0,{DRAW_LINE_STRING:"draw_line_string",DRAW_POLYGON:"draw_polygon",DRAW_POINT:"draw_point",SIMPLE_SELECT:"simple_select",DIRECT_SELECT:"direct_select"},"rW",0,90,"xu",0,-90,"yi",0,["scrollZoom","boxZoom","dragRotate","dragPan","keyboard","doubleClickZoom","touchZoomRotate"],"zH",0,{FEATURE:"Feature",POLYGON:"Polygon",LINE_STRING:"LineString",POINT:"Point",FEATURE_COLLECTION:"FeatureCollection",MULTI_PREFIX:"Multi",MULTI_POINT:"MultiPoint",MULTI_LINE_STRING:"MultiLineString",MULTI_POLYGON:"MultiPolygon"}])},9906(t,e,o){"use strict";var n=o(64348),r=o(23466);const i=function(t,e){this.ctx=t,this.properties=e.properties||{},this.coordinates=e.geometry.coordinates,this.id=e.id||(0,n.n)(),this.type=e.geometry.type};i.prototype.changed=function(){this.ctx.store.featureChanged(this.id)},i.prototype.incomingCoords=function(t){this.setCoordinates(t)},i.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},i.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.coordinates))},i.prototype.setProperty=function(t,e){this.properties[t]=e},i.prototype.toGeoJSON=function(){return JSON.parse(JSON.stringify({id:this.id,type:r.zH.FEATURE,properties:this.properties,geometry:{coordinates:this.getCoordinates(),type:this.type}}))},i.prototype.internal=function(t){const e={id:this.id,meta:r.mI.FEATURE,"meta:type":this.type,active:r.l4.INACTIVE,mode:t};if(this.ctx.options.userProperties)for(const t in this.properties)e[`user_${t}`]=this.properties[t];return{type:r.zH.FEATURE,properties:e,geometry:{coordinates:this.getCoordinates(),type:this.type}}};const s=i;o.d(e,["A",0,s])},7518(t,e,o){"use strict";var n=o(9906);const r=function(t,e){n.A.call(this,t,e)};(r.prototype=Object.create(n.A.prototype)).isValid=function(){return this.coordinates.length>1},r.prototype.addCoordinate=function(t,e,o){this.changed();const n=parseInt(t,10);this.coordinates.splice(n,0,[e,o])},r.prototype.getCoordinate=function(t){const e=parseInt(t,10);return JSON.parse(JSON.stringify(this.coordinates[e]))},r.prototype.removeCoordinate=function(t){this.changed(),this.coordinates.splice(parseInt(t,10),1)},r.prototype.updateCoordinate=function(t,e,o){const n=parseInt(t,10);this.coordinates[n]=[e,o],this.changed()};const i=r;o.d(e,["A",0,i])},6260(t,e,o){"use strict";var n=o(64348),r=o(9906),i=o(23466),s=o(23982),a=o(7518),c=o(60454);const u={MultiPoint:s.A,MultiLineString:a.A,MultiPolygon:c.A},l=(t,e,o,n,r)=>{const i=o.split("."),s=parseInt(i[0],10),a=i[1]?i.slice(1).join("."):null;return t[s][e](a,n,r)},d=function(t,e){if(r.A.call(this,t,e),delete this.coordinates,this.model=u[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)};(d.prototype=Object.create(r.A.prototype))._coordinatesToFeatures=function(t){const e=this.model.bind(this);return t.map(t=>new e(this.ctx,{id:(0,n.n)(),type:i.zH.FEATURE,properties:{},geometry:{coordinates:t,type:this.type.replace("Multi","")}}))},d.prototype.isValid=function(){return this.features.every(t=>t.isValid())},d.prototype.setCoordinates=function(t){this.features=this._coordinatesToFeatures(t),this.changed()},d.prototype.getCoordinate=function(t){return l(this.features,"getCoordinate",t)},d.prototype.getCoordinates=function(){return JSON.parse(JSON.stringify(this.features.map(t=>t.type===i.zH.POLYGON?t.getCoordinates():t.coordinates)))},d.prototype.updateCoordinate=function(t,e,o){l(this.features,"updateCoordinate",t,e,o),this.changed()},d.prototype.addCoordinate=function(t,e,o){l(this.features,"addCoordinate",t,e,o),this.changed()},d.prototype.removeCoordinate=function(t){l(this.features,"removeCoordinate",t),this.changed()},d.prototype.getFeatures=function(){return this.features};const p=d;o.d(e,["A",0,p])},23982(t,e,o){"use strict";var n=o(9906);const r=function(t,e){n.A.call(this,t,e)};(r.prototype=Object.create(n.A.prototype)).isValid=function(){return"number"==typeof this.coordinates[0]&&"number"==typeof this.coordinates[1]},r.prototype.updateCoordinate=function(t,e,o){this.coordinates=3===arguments.length?[e,o]:[t,e],this.changed()},r.prototype.getCoordinate=function(){return this.getCoordinates()};const i=r;o.d(e,["A",0,i])},60454(t,e,o){"use strict";var n=o(9906);const r=function(t,e){n.A.call(this,t,e),this.coordinates=this.coordinates.map(t=>t.slice(0,-1))};(r.prototype=Object.create(n.A.prototype)).isValid=function(){return 0!==this.coordinates.length&&this.coordinates.every(t=>t.length>2)},r.prototype.incomingCoords=function(t){this.coordinates=t.map(t=>t.slice(0,-1)),this.changed()},r.prototype.setCoordinates=function(t){this.coordinates=t,this.changed()},r.prototype.addCoordinate=function(t,e,o){this.changed();const n=t.split(".").map(t=>parseInt(t,10));this.coordinates[n[0]].splice(n[1],0,[e,o])},r.prototype.removeCoordinate=function(t){this.changed();const e=t.split(".").map(t=>parseInt(t,10)),o=this.coordinates[e[0]];o&&(o.splice(e[1],1),o.length<3&&this.coordinates.splice(e[0],1))},r.prototype.getCoordinate=function(t){const e=t.split(".").map(t=>parseInt(t,10)),o=this.coordinates[e[0]];return JSON.parse(JSON.stringify(o[e[1]]))},r.prototype.getCoordinates=function(){return this.coordinates.map(t=>t.concat([t[0]]))},r.prototype.updateCoordinate=function(t,e,o){this.changed();const n=t.split("."),r=parseInt(n[0],10),i=parseInt(n[1],10);void 0===this.coordinates[r]&&(this.coordinates[r]=[]),this.coordinates[r][i]=[e,o]};const i=r;o.d(e,["A",0,i])},10727(t,e,o){"use strict";o.r(e),o.d(e,{isActiveFeature:()=>s,isBackspaceKey:()=>g,isDeleteKey:()=>f,isDigit1Key:()=>y,isDigit2Key:()=>m,isDigit3Key:()=>E,isDigitKey:()=>I,isEnterKey:()=>h,isEscapeKey:()=>p,isFeature:()=>u,isInactiveFeature:()=>a,isOfMetaType:()=>r,isShiftDown:()=>d,isShiftMousedown:()=>i,isTrue:()=>T,isVertex:()=>l,noTarget:()=>c});var n=o(23466);function r(t){return function(e){const o=e.featureTarget;return!!o&&(!!o.properties&&o.properties.meta===t)}}function i(t){return!!t.originalEvent&&(!!t.originalEvent.shiftKey&&0===t.originalEvent.button)}function s(t){return!!t.featureTarget&&(!!t.featureTarget.properties&&(t.featureTarget.properties.active===n.l4.ACTIVE&&t.featureTarget.properties.meta===n.mI.FEATURE))}function a(t){return!!t.featureTarget&&(!!t.featureTarget.properties&&(t.featureTarget.properties.active===n.l4.INACTIVE&&t.featureTarget.properties.meta===n.mI.FEATURE))}function c(t){return void 0===t.featureTarget}function u(t){return!!t.featureTarget&&(!!t.featureTarget.properties&&t.featureTarget.properties.meta===n.mI.FEATURE)}function l(t){const e=t.featureTarget;return!!e&&(!!e.properties&&e.properties.meta===n.mI.VERTEX)}function d(t){return!!t.originalEvent&&!0===t.originalEvent.shiftKey}function p(t){return"Escape"===t.key||27===t.keyCode}function h(t){return"Enter"===t.key||13===t.keyCode}function g(t){return"Backspace"===t.key||8===t.keyCode}function f(t){return"Delete"===t.key||46===t.keyCode}function y(t){return"1"===t.key||49===t.keyCode}function m(t){return"2"===t.key||50===t.keyCode}function E(t){return"3"===t.key||51===t.keyCode}function I(t){const e=t.key||String.fromCharCode(t.keyCode);return e>="0"&&e<="9"}function T(){return!0}},31343(t,e,o){"use strict";o.d(e,{A:()=>l}),o.dn(l);var n=o(23466);const{xu:r,rW:i,Pv:s,VN:a,jc:c,Tf:u}=n;function l(t,e){let o=r,n=i,l=r,d=i,p=u,h=c;t.forEach(t=>{const e=function(t){const e={Point:0,LineString:1,Polygon:2,MultiPoint:1,MultiLineString:2,MultiPolygon:3}[t.geometry.type],o=[t.geometry.coordinates].flat(e),n=o.map(t=>t[0]),r=o.map(t=>t[1]),i=t=>Math.min.apply(null,t),s=t=>Math.max.apply(null,t);return[i(n),i(r),s(n),s(r)]}(t),r=e[1],i=e[3],s=e[0],a=e[2];r>o&&(o=r),il&&(l=i),rh&&(h=a)});const g=e;return o+g.lat>a&&(g.lat=a-o),l+g.lat>i&&(g.lat=i-l),n+g.lat=u&&(g.lng-=360*Math.ceil(Math.abs(g.lng)/360)),g}},73578(t,e,o){"use strict";o.d(e,{A:()=>i}),o.dn(i);var n=o(23466),r=o(39218);function i(t,e,o){const i=e.geometry.coordinates,s=o.geometry.coordinates;if(i[1]>n.VN||i[1]n.VN||s[1]Number(t.toFixed(8)),l=(t,e)=>(t+e)/2,d=(0,r.toWgs84)([l(a[0],c[0]),l(a[1],c[1])]),p=[u(d[0]),u(d[1])];return{type:n.zH.FEATURE,properties:{meta:n.mI.MIDPOINT,parent:t,lng:p[0],lat:p[1],coord_path:o.properties.coord_path},geometry:{type:n.zH.POINT,coordinates:p}}}},75313(t,e,o){"use strict";var n=o(39452),r=o(73578),i=o(23466);const s=function t(e,o={},s=null){const{type:a,coordinates:c}=e.geometry,u=e.properties&&e.properties.id;let l=[];function d(t,e){let i="",s=null;t.forEach((t,a)=>{const c=null!=e?`${e}.${a}`:String(a),d=(0,n.A)(u,t,c,p(c));if(o.midpoints&&s){const t=(0,r.A)(u,s,d);t&&l.push(t)}s=d;const h=JSON.stringify(t);i!==h&&l.push(d),0===a&&(i=h)})}function p(t){return!!o.selectedPaths&&-1!==o.selectedPaths.indexOf(t)}return a===i.zH.POINT?l.push((0,n.A)(u,c,s,p(s))):a===i.zH.POLYGON?c.forEach((t,e)=>{d(t,null!==s?`${s}.${e}`:String(e))}):a===i.zH.LINE_STRING?d(c,s):0===a.indexOf(i.zH.MULTI_PREFIX)&&function(){const n=a.replace(i.zH.MULTI_PREFIX,"");c.forEach((r,s)=>{const a={type:i.zH.FEATURE,properties:e.properties,geometry:{type:n,coordinates:r}};l=l.concat(t(a,o,s))})}(),l};o.d(e,["A",0,s])},39452(t,e,o){"use strict";o.d(e,{A:()=>r}),o.dn(r);var n=o(23466);function r(t,e,o,r){return{type:n.zH.FEATURE,properties:{meta:n.mI.VERTEX,parent:t,coord_path:o,active:r?n.l4.ACTIVE:n.l4.INACTIVE},geometry:{type:n.zH.POINT,coordinates:e}}}},36895(t,e,o){"use strict";const n={enable(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)},disable(t){setTimeout(()=>{t.map&&t.map.doubleClickZoom&&t.map.doubleClickZoom.disable()},0)}};o.d(e,["A",0,n])},18025(t,e,o){"use strict";function n(t,e){const o=t.x-e.x,n=t.y-e.y;return Math.sqrt(o*o+n*n)}o.d(e,{A:()=>n}),o.dn(n)},49058(t,e,o){"use strict";var n=o(95045),r=o(97689),i=o(23466),s=o(8665);const a=[i.mI.FEATURE,i.mI.MIDPOINT,i.mI.VERTEX],c={click:function(t,e,o){return u(t,e,o,o.options.clickBuffer)},touch:function(t,e,o){return u(t,e,o,o.options.touchBuffer)}};function u(t,e,o,i){if(null===o.map)return[];const c=t?(0,r.A)(t,i):e,u={};o.options.styles&&(u.layers=o.options.styles.map(t=>t.id).filter(t=>null!=o.map.getLayer(t)));const l=o.map.queryRenderedFeatures(c,u).filter(t=>-1!==a.indexOf(t.properties.meta)),d=new s.A,p=[];return l.forEach(t=>{const e=t.properties.id;d.has(e)||(d.add(e),p.push(t))}),(0,n.A)(p)}o.d(e,["A",0,c])},79257(t,e,o){"use strict";o.d(e,{A:()=>i});var n=o(49058),r=o(23466);function i(t,e){const o=n.A.click(t,null,e),i={mouse:r.kZ.NONE};return o[0]&&(i.mouse=o[0].properties.active===r.l4.ACTIVE?r.kZ.MOVE:r.kZ.POINTER,i.feature=o[0].properties.meta),-1!==e.events.currentModeName().indexOf("draw")&&(i.mouse=r.kZ.ADD),e.ui.queueMapClasses(i),e.ui.updateMapClasses(),o[0]}},64348(t,e,o){"use strict";o.d(e,{n:()=>r});const n=((t,e=21)=>(o=e)=>{let n="",r=0|o;for(;r-- >0;)n+=t[Math.random()*t.length|0];return n})("0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz",32);function r(){return n()}},38935(t,e,o){"use strict";o.r(e),o.d(e,{Dq:()=>s.A,JU:()=>h.A,O7:()=>E.A,OI:()=>C.A,RL:()=>T.A,Yo:()=>g.Ay,Z$:()=>f.A,a4:()=>u.A,eE:()=>I.A,hr:()=>p.A,hz:()=>a.A,lR:()=>l.A,nb:()=>r.A,oO:()=>y.A,pd:()=>c.A,q7:()=>n,uW:()=>d.A,w4:()=>v.A,z:()=>m.A,zB:()=>i.A});var n=o(10727),r=o(31343),i=o(73578),s=o(75313),a=o(39452),c=o(36895),u=o(18025),l=o(49058),d=o(79257),p=o(86240),h=o(72374),g=o(62345),f=o(97689),y=o(13707),m=o(82318),E=o(95045),I=o(8665),T=o(11790),v=o(16746),C=o(99260)},86240(t,e,o){"use strict";o.d(e,{A:()=>r});var n=o(18025);function r(t,e,o={}){const r=null!=o.fineTolerance?o.fineTolerance:4,i=null!=o.grossTolerance?o.grossTolerance:12,s=null!=o.interval?o.interval:500;t.point=t.point||e.point,t.time=t.time||e.time;const a=(0,n.A)(t.point,e.point);return ar});var n=o(18025);function r(t,e,o={}){const r=null!=o.tolerance?o.tolerance:25,i=null!=o.interval?o.interval:250;t.point=t.point||e.point,t.time=t.time||e.time;return(0,n.A)(t.point,e.point)i}),o.dn(i);var n=o(31343),r=o(23466);function i(t,e){const o=(0,n.A)(t.map(t=>t.toGeoJSON()),e);t.forEach(t=>{const e=t.getCoordinates(),n=t=>{const e={lng:t[0]+o.lng,lat:t[1]+o.lat};return[e.lng,e.lat]},i=t=>t.map(t=>n(t)),s=t=>t.map(t=>i(t));let a;t.type===r.zH.POINT?a=n(e):t.type===r.zH.LINE_STRING||t.type===r.zH.MULTI_POINT?a=e.map(n):t.type===r.zH.POLYGON||t.type===r.zH.MULTI_LINE_STRING?a=e.map(i):t.type===r.zH.MULTI_POLYGON&&(a=e.map(s)),t.incomingCoords(a)})}},95045(t,e,o){"use strict";var n=o(49778),r=o(23466);const i={Point:0,LineString:1,MultiLineString:1,Polygon:2};function s(t,e){const o=i[t.geometry.type]-i[e.geometry.type];return 0===o&&t.geometry.type===r.zH.POLYGON?t.area-e.area:o}const a=function(t){return t.map(t=>(t.geometry.type===r.zH.POLYGON&&(t.area=n.geometry({type:r.zH.FEATURE,property:{},geometry:t.geometry})),t)).sort(s).map(t=>(delete t.area,t))};o.d(e,["A",0,a])},8665(t,e,o){"use strict";function n(t){if(this._items={},this._nums={},this._length=t?t.length:0,t)for(let e=0,o=t.length;e{t.push({k:e,v:this._items[e]})}),Object.keys(this._nums).forEach(e=>{t.push({k:JSON.parse(e),v:this._nums[e]})}),t.sort((t,e)=>t.v-e.v).map(t=>t.k)},n.prototype.clear=function(){return this._length=0,this._items={},this._nums={},this};const r=n;o.d(e,["A",0,r])},11790(t,e,o){"use strict";function n(t,e){return t.length===e.length&&JSON.stringify(t.map(t=>t).sort())===JSON.stringify(e.map(t=>t).sort())}o.d(e,{A:()=>n}),o.dn(n)},16746(t,e,o){"use strict";const n="#3bb2d0",r="#fbb03b",i="#fff",s=[{id:"gl-draw-polygon-fill",type:"fill",filter:["all",["==","$type","Polygon"]],paint:{"fill-color":["case",["==",["get","active"],"true"],r,n],"fill-opacity":.1}},{id:"gl-draw-lines",type:"line",filter:["any",["==","$type","LineString"],["==","$type","Polygon"]],layout:{"line-cap":"round","line-join":"round"},paint:{"line-color":["case",["==",["get","active"],"true"],r,n],"line-dasharray":["case",["==",["get","active"],"true"],[.2,2],[2,0]],"line-width":2}},{id:"gl-draw-point-outer",type:"circle",filter:["all",["==","$type","Point"],["==","meta","feature"]],paint:{"circle-radius":["case",["==",["get","active"],"true"],7,5],"circle-color":i}},{id:"gl-draw-point-inner",type:"circle",filter:["all",["==","$type","Point"],["==","meta","feature"]],paint:{"circle-radius":["case",["==",["get","active"],"true"],5,3],"circle-color":["case",["==",["get","active"],"true"],r,n]}},{id:"gl-draw-vertex-outer",type:"circle",filter:["all",["==","$type","Point"],["==","meta","vertex"],["!=","mode","simple_select"]],paint:{"circle-radius":["case",["==",["get","active"],"true"],7,5],"circle-color":i}},{id:"gl-draw-vertex-inner",type:"circle",filter:["all",["==","$type","Point"],["==","meta","vertex"],["!=","mode","simple_select"]],paint:{"circle-radius":["case",["==",["get","active"],"true"],5,3],"circle-color":r}},{id:"gl-draw-midpoint",type:"circle",filter:["all",["==","meta","midpoint"]],paint:{"circle-radius":3,"circle-color":r}}];o.d(e,["A",0,s])},99260(t,e,o){"use strict";const n=function(t){return[].concat(t).filter(t=>void 0!==t)};o.d(e,["A",0,n])},21246(t,e,o){"use strict";o.d(e,{A:()=>O});var n=o(10727);function r(t,e){this.x=t,this.y=e}r.prototype={clone(){return new r(this.x,this.y)},add(t){return this.clone()._add(t)},sub(t){return this.clone()._sub(t)},multByPoint(t){return this.clone()._multByPoint(t)},divByPoint(t){return this.clone()._divByPoint(t)},mult(t){return this.clone()._mult(t)},div(t){return this.clone()._div(t)},rotate(t){return this.clone()._rotate(t)},rotateAround(t,e){return this.clone()._rotateAround(t,e)},matMult(t){return this.clone()._matMult(t)},unit(){return this.clone()._unit()},perp(){return this.clone()._perp()},round(){return this.clone()._round()},mag(){return Math.sqrt(this.x*this.x+this.y*this.y)},equals(t){return this.x===t.x&&this.y===t.y},dist(t){return Math.sqrt(this.distSqr(t))},distSqr(t){const e=t.x-this.x,o=t.y-this.y;return e*e+o*o},angle(){return Math.atan2(this.y,this.x)},angleTo(t){return Math.atan2(this.y-t.y,this.x-t.x)},angleWith(t){return this.angleWithSep(t.x,t.y)},angleWithSep(t,e){return Math.atan2(this.x*e-this.y*t,this.x*t+this.y*e)},_matMult(t){const e=t[0]*this.x+t[1]*this.y,o=t[2]*this.x+t[3]*this.y;return this.x=e,this.y=o,this},_add(t){return this.x+=t.x,this.y+=t.y,this},_sub(t){return this.x-=t.x,this.y-=t.y,this},_mult(t){return this.x*=t,this.y*=t,this},_div(t){return this.x/=t,this.y/=t,this},_multByPoint(t){return this.x*=t.x,this.y*=t.y,this},_divByPoint(t){return this.x/=t.x,this.y/=t.y,this},_unit(){return this._div(this.mag()),this},_perp(){const t=this.y;return this.y=this.x,this.x=-t,this},_rotate(t){const e=Math.cos(t),o=Math.sin(t),n=e*this.x-o*this.y,r=o*this.x+e*this.y;return this.x=n,this.y=r,this},_rotateAround(t,e){const o=Math.cos(t),n=Math.sin(t),r=e.x+o*(this.x-e.x)-n*(this.y-e.y),i=e.y+n*(this.x-e.x)+o*(this.y-e.y);return this.x=r,this.y=i,this},_round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this},constructor:r},r.convert=function(t){if(t instanceof r)return t;if(Array.isArray(t))return new r(+t[0],+t[1]);if(void 0!==t.x&&void 0!==t.y)return new r(+t.x,+t.y);throw new Error("Expected [x, y] or {x, y} point format")};const i=function(t,e){const o=e.getBoundingClientRect();return new r(t.clientX-o.left-(e.clientLeft||0),t.clientY-o.top-(e.clientTop||0))};var s=o(75313),a=o(8665),c=o(36895),u=o(82318),l=o(23466);const d={onSetup:function(t){const e={dragMoveLocation:null,boxSelectStartLocation:null,boxSelectElement:void 0,boxSelecting:!1,canBoxSelect:!1,dragMoving:!1,canDragMove:!1,initialDragPanState:this.map.dragPan.isEnabled(),initiallySelectedFeatureIds:t.featureIds||[]};return this.setSelected(e.initiallySelectedFeatureIds.filter(t=>void 0!==this.getFeature(t))),this.fireActionable(),this.setActionableState({combineFeatures:!0,uncombineFeatures:!0,trash:!0}),e},fireUpdate:function(){this.fire(l.AZ.UPDATE,{action:l.J3.MOVE,features:this.getSelected().map(t=>t.toGeoJSON())})},fireActionable:function(){const t=this.getSelected(),e=t.filter(t=>this.isInstanceOf("MultiFeature",t));let o=!1;if(t.length>1){o=!0;const e=t[0].type.replace("Multi","");t.forEach(t=>{t.type.replace("Multi","")!==e&&(o=!1)})}const n=e.length>0,r=t.length>0;this.setActionableState({combineFeatures:o,uncombineFeatures:n,trash:r})},getUniqueIds:function(t){if(!t.length)return[];return t.map(t=>t.properties.id).filter(t=>void 0!==t).reduce((t,e)=>(t.add(e),t),new a.A).values()},stopExtendedInteractions:function(t){t.boxSelectElement&&(t.boxSelectElement.parentNode&&t.boxSelectElement.parentNode.removeChild(t.boxSelectElement),t.boxSelectElement=null),(t.canDragMove||t.canBoxSelect)&&!0===t.initialDragPanState&&this.map.dragPan.enable(),t.boxSelecting=!1,t.canBoxSelect=!1,t.dragMoving=!1,t.canDragMove=!1},onStop:function(){c.A.enable(this)},onMouseMove:function(t,e){return n.isFeature(e)&&t.dragMoving&&this.fireUpdate(),this.stopExtendedInteractions(t),!0},onMouseOut:function(t){return!t.dragMoving||this.fireUpdate()}};d.onTap=d.onClick=function(t,e){return n.noTarget(e)?this.clickAnywhere(t,e):n.isOfMetaType(l.mI.VERTEX)(e)?this.clickOnVertex(t,e):n.isFeature(e)?this.clickOnFeature(t,e):void 0},d.clickAnywhere=function(t){const e=this.getSelectedIds();e.length&&(this.clearSelectedFeatures(),e.forEach(t=>this.doRender(t))),c.A.enable(this),this.stopExtendedInteractions(t)},d.clickOnVertex=function(t,e){this.changeMode(l.nI.DIRECT_SELECT,{featureId:e.featureTarget.properties.parent,coordPath:e.featureTarget.properties.coord_path,startPos:e.lngLat}),this.updateUIClasses({mouse:l.kZ.MOVE})},d.startOnActiveFeature=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),this.doRender(e.featureTarget.properties.id),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},d.clickOnFeature=function(t,e){c.A.disable(this),this.stopExtendedInteractions(t);const o=n.isShiftDown(e),r=this.getSelectedIds(),i=e.featureTarget.properties.id,s=this.isSelected(i);if(!o&&s&&this.getFeature(i).type!==l.zH.POINT)return this.changeMode(l.nI.DIRECT_SELECT,{featureId:i});s&&o?(this.deselect(i),this.updateUIClasses({mouse:l.kZ.POINTER}),1===r.length&&c.A.enable(this)):!s&&o?(this.select(i),this.updateUIClasses({mouse:l.kZ.MOVE})):s||o||(r.forEach(t=>this.doRender(t)),this.setSelected(i),this.updateUIClasses({mouse:l.kZ.MOVE})),this.doRender(i)},d.onMouseDown=function(t,e){return t.initialDragPanState=this.map.dragPan.isEnabled(),n.isActiveFeature(e)?this.startOnActiveFeature(t,e):this.drawConfig.boxSelect&&n.isShiftMousedown(e)?this.startBoxSelect(t,e):void 0},d.startBoxSelect=function(t,e){this.stopExtendedInteractions(t),this.map.dragPan.disable(),t.boxSelectStartLocation=i(e.originalEvent,this.map.getContainer()),t.canBoxSelect=!0},d.onTouchStart=function(t,e){if(n.isActiveFeature(e))return this.startOnActiveFeature(t,e)},d.onDrag=function(t,e){return t.canDragMove?this.dragMove(t,e):this.drawConfig.boxSelect&&t.canBoxSelect?this.whileBoxSelect(t,e):void 0},d.whileBoxSelect=function(t,e){t.boxSelecting=!0,this.updateUIClasses({mouse:l.kZ.ADD}),t.boxSelectElement||(t.boxSelectElement=document.createElement("div"),t.boxSelectElement.classList.add(l.Ly.BOX_SELECT),this.map.getContainer().appendChild(t.boxSelectElement));const o=i(e.originalEvent,this.map.getContainer()),n=Math.min(t.boxSelectStartLocation.x,o.x),r=Math.max(t.boxSelectStartLocation.x,o.x),s=Math.min(t.boxSelectStartLocation.y,o.y),a=Math.max(t.boxSelectStartLocation.y,o.y),c=`translate(${n}px, ${s}px)`;t.boxSelectElement.style.transform=c,t.boxSelectElement.style.WebkitTransform=c,t.boxSelectElement.style.width=r-n+"px",t.boxSelectElement.style.height=a-s+"px"},d.dragMove=function(t,e){t.dragMoving=!0,e.originalEvent.stopPropagation();const o={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};(0,u.A)(this.getSelected(),o),t.dragMoveLocation=e.lngLat},d.onTouchEnd=d.onMouseUp=function(t,e){if(t.dragMoving)this.fireUpdate();else if(t.boxSelecting){const o=[t.boxSelectStartLocation,i(e.originalEvent,this.map.getContainer())],n=this.featuresAt(null,o,"click"),r=this.getUniqueIds(n).filter(t=>!this.isSelected(t));r.length&&(this.select(r),r.forEach(t=>this.doRender(t)),this.updateUIClasses({mouse:l.kZ.MOVE}))}this.stopExtendedInteractions(t)},d.toDisplayFeatures=function(t,e,o){e.properties.active=this.isSelected(e.properties.id)?l.l4.ACTIVE:l.l4.INACTIVE,o(e),this.fireActionable(),e.properties.active===l.l4.ACTIVE&&e.geometry.type!==l.zH.POINT&&(0,s.A)(e).forEach(o)},d.onTrash=function(){this.deleteFeature(this.getSelectedIds()),this.fireActionable()},d.onCombineFeatures=function(){const t=this.getSelected();if(0===t.length||t.length<2)return;const e=[],o=[],n=t[0].type.replace("Multi","");for(let r=0;r{e.push(t)}):e.push(i.getCoordinates()),o.push(i.toGeoJSON())}if(o.length>1){const t=this.newFeature({type:l.zH.FEATURE,properties:o[0].properties,geometry:{type:`Multi${n}`,coordinates:e}});this.addFeature(t),this.deleteFeature(this.getSelectedIds(),{silent:!0}),this.setSelected([t.id]),this.fire(l.AZ.COMBINE_FEATURES,{createdFeatures:[t.toGeoJSON()],deletedFeatures:o})}this.fireActionable()},d.onUncombineFeatures=function(){const t=this.getSelected();if(0===t.length)return;const e=[],o=[];for(let n=0;n{this.addFeature(t),t.properties=r.properties,e.push(t.toGeoJSON()),this.select([t.id])}),this.deleteFeature(r.id,{silent:!0}),o.push(r.toGeoJSON()))}e.length>1&&this.fire(l.AZ.UNCOMBINE_FEATURES,{createdFeatures:e,deletedFeatures:o}),this.fireActionable()};const p=d;var h=o(31343);const g=(0,n.isOfMetaType)(l.mI.VERTEX),f=(0,n.isOfMetaType)(l.mI.MIDPOINT),y={fireUpdate:function(){this.fire(l.AZ.UPDATE,{action:l.J3.CHANGE_COORDINATES,features:this.getSelected().map(t=>t.toGeoJSON())})},fireActionable:function(t){this.setActionableState({combineFeatures:!1,uncombineFeatures:!1,trash:t.selectedCoordPaths.length>0})},startDragging:function(t,e){null==t.initialDragPanState&&(t.initialDragPanState=this.map.dragPan.isEnabled()),this.map.dragPan.disable(),t.canDragMove=!0,t.dragMoveLocation=e.lngLat},stopDragging:function(t){t.canDragMove&&!0===t.initialDragPanState&&this.map.dragPan.enable(),t.initialDragPanState=null,t.dragMoving=!1,t.canDragMove=!1,t.dragMoveLocation=null},onVertex:function(t,e){this.startDragging(t,e);const o=e.featureTarget.properties,r=t.selectedCoordPaths.indexOf(o.coord_path);(0,n.isShiftDown)(e)||-1!==r?(0,n.isShiftDown)(e)&&-1===r&&t.selectedCoordPaths.push(o.coord_path):t.selectedCoordPaths=[o.coord_path];const i=this.pathsToCoordinates(t.featureId,t.selectedCoordPaths);this.setSelectedCoordinates(i)},onMidpoint:function(t,e){this.startDragging(t,e);const o=e.featureTarget.properties;t.feature.addCoordinate(o.coord_path,o.lng,o.lat),this.fireUpdate(),t.selectedCoordPaths=[o.coord_path]},pathsToCoordinates:function(t,e){return e.map(e=>({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,o){(0,u.A)(this.getSelected(),o),t.dragMoveLocation=e.lngLat},dragVertex:function(t,e,o){const n=t.selectedCoordPaths.map(e=>t.feature.getCoordinate(e)),r=n.map(t=>({type:l.zH.FEATURE,properties:{},geometry:{type:l.zH.POINT,coordinates:t}})),i=(0,h.A)(r,o);for(let e=0;ee.localeCompare(t,"en",{numeric:!0})).forEach(e=>t.feature.removeCoordinate(e)),this.fireUpdate(),t.selectedCoordPaths=[],this.clearSelectedCoordinates(),this.fireActionable(t),!1===t.feature.isValid()&&(this.deleteFeature([t.featureId]),this.changeMode(l.nI.SIMPLE_SELECT,{}))},onMouseMove:function(t,e){const o=(0,n.isActiveFeature)(e),r=g(e),i=f(e),s=0===t.selectedCoordPaths.length;o&&s||r&&!s?this.updateUIClasses({mouse:l.kZ.MOVE}):this.updateUIClasses({mouse:l.kZ.NONE});return(r||o||i)&&t.dragMoving&&this.fireUpdate(),this.stopDragging(t),!0},onMouseOut:function(t){return t.dragMoving&&this.fireUpdate(),!0}};y.onTouchStart=y.onMouseDown=function(t,e){return g(e)?this.onVertex(t,e):(0,n.isActiveFeature)(e)?this.onFeature(t,e):f(e)?this.onMidpoint(t,e):void 0},y.onDrag=function(t,e){if(!0!==t.canDragMove)return;t.dragMoving=!0,e.originalEvent.stopPropagation();const o={lng:e.lngLat.lng-t.dragMoveLocation.lng,lat:e.lngLat.lat-t.dragMoveLocation.lat};t.selectedCoordPaths.length>0?this.dragVertex(t,e,o):this.dragFeature(t,e,o),t.dragMoveLocation=e.lngLat},y.onClick=function(t,e){return(0,n.noTarget)(e)?this.clickNoTarget(t,e):(0,n.isActiveFeature)(e)?this.clickActiveFeature(t,e):(0,n.isInactiveFeature)(e)?this.clickInactive(t,e):void this.stopDragging(t)},y.onTap=function(t,e){return(0,n.noTarget)(e)?this.clickNoTarget(t,e):(0,n.isActiveFeature)(e)?this.clickActiveFeature(t,e):(0,n.isInactiveFeature)(e)?this.clickInactive(t,e):void 0},y.onTouchEnd=y.onMouseUp=function(t){t.dragMoving&&this.fireUpdate(),this.stopDragging(t)};const m=y,E={onSetup:function(){const t=this.newFeature({type:l.zH.FEATURE,properties:{},geometry:{type:l.zH.POINT,coordinates:[]}});return this.addFeature(t),this.clearSelectedFeatures(),this.updateUIClasses({mouse:l.kZ.ADD}),this.activateUIButton(l.gK.POINT),this.setActionableState({trash:!0}),{point:t}},stopDrawingAndRemove:function(t){this.deleteFeature([t.point.id],{silent:!0}),this.changeMode(l.nI.SIMPLE_SELECT)}};E.onTap=E.onClick=function(t,e){this.updateUIClasses({mouse:l.kZ.MOVE}),t.point.updateCoordinate("",e.lngLat.lng,e.lngLat.lat),this.fire(l.AZ.CREATE,{features:[t.point.toGeoJSON()]}),this.changeMode(l.nI.SIMPLE_SELECT,{featureIds:[t.point.id]})},E.onStop=function(t){this.activateUIButton(),t.point.getCoordinate().length||this.deleteFeature([t.point.id],{silent:!0})},E.toDisplayFeatures=function(t,e,o){const n=e.properties.id===t.point.id;if(e.properties.active=n?l.l4.ACTIVE:l.l4.INACTIVE,!n)return o(e)},E.onTrash=E.stopDrawingAndRemove,E.onKeyUp=function(t,e){if(n.isEscapeKey(e)||n.isEnterKey(e))return this.stopDrawingAndRemove(t,e)};const I=E;var T=o(72374),v=o(39452);const C={onSetup:function(){const t=this.newFeature({type:l.zH.FEATURE,properties:{},geometry:{type:l.zH.POLYGON,coordinates:[[]]}});return this.addFeature(t),this.clearSelectedFeatures(),c.A.disable(this),this.updateUIClasses({mouse:l.kZ.ADD}),this.activateUIButton(l.gK.POLYGON),this.setActionableState({trash:!0}),{polygon:t,currentVertexPosition:0}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&(0,T.A)(e,t.polygon.coordinates[0][t.currentVertexPosition-1]))return this.changeMode(l.nI.SIMPLE_SELECT,{featureIds:[t.polygon.id]});this.updateUIClasses({mouse:l.kZ.ADD}),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(l.nI.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},onMouseMove:function(t,e){t.polygon.updateCoordinate(`0.${t.currentVertexPosition}`,e.lngLat.lng,e.lngLat.lat),n.isVertex(e)&&this.updateUIClasses({mouse:l.kZ.POINTER})}};C.onTap=C.onClick=function(t,e){return n.isVertex(e)?this.clickOnVertex(t,e):this.clickAnywhere(t,e)},C.onKeyUp=function(t,e){n.isEscapeKey(e)?(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(l.nI.SIMPLE_SELECT)):n.isEnterKey(e)&&this.changeMode(l.nI.SIMPLE_SELECT,{featureIds:[t.polygon.id]})},C.onStop=function(t){this.updateUIClasses({mouse:l.kZ.NONE}),c.A.enable(this),this.activateUIButton(),void 0!==this.getFeature(t.polygon.id)&&(t.polygon.removeCoordinate(`0.${t.currentVertexPosition}`),t.polygon.isValid()?this.fire(l.AZ.CREATE,{features:[t.polygon.toGeoJSON()]}):(this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(l.nI.SIMPLE_SELECT,{},{silent:!0})))},C.toDisplayFeatures=function(t,e,o){const n=e.properties.id===t.polygon.id;if(e.properties.active=n?l.l4.ACTIVE:l.l4.INACTIVE,!n)return o(e);if(0===e.geometry.coordinates.length)return;const r=e.geometry.coordinates[0].length;if(!(r<3)){if(e.properties.meta=l.mI.FEATURE,o((0,v.A)(t.polygon.id,e.geometry.coordinates[0][0],"0.0",!1)),r>3){const n=e.geometry.coordinates[0].length-3;o((0,v.A)(t.polygon.id,e.geometry.coordinates[0][n],`0.${n}`,!1))}if(r<=4){const t=[[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(o({type:l.zH.FEATURE,properties:e.properties,geometry:{coordinates:t,type:l.zH.LINE_STRING}}),3===r)return}return o(e)}},C.onTrash=function(t){this.deleteFeature([t.polygon.id],{silent:!0}),this.changeMode(l.nI.SIMPLE_SELECT)};const A=C,S={onSetup:function(t){const e=(t=t||{}).featureId;let o,n,r="forward";if(e){if(o=this.getFeature(e),!o)throw new Error("Could not find a feature with the provided featureId");let 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");const s=o.coordinates.length-1;if(o.coordinates[s][0]===i[0]&&o.coordinates[s][1]===i[1])n=s+1,o.addCoordinate(n,...o.coordinates[s]);else{if(o.coordinates[0][0]!==i[0]||o.coordinates[0][1]!==i[1])throw new Error("`from` should match the point at either the start or the end of the provided LineString");r="backwards",n=0,o.addCoordinate(n,...o.coordinates[0])}}else o=this.newFeature({type:l.zH.FEATURE,properties:{},geometry:{type:l.zH.LINE_STRING,coordinates:[]}}),n=0,this.addFeature(o);return this.clearSelectedFeatures(),c.A.disable(this),this.updateUIClasses({mouse:l.kZ.ADD}),this.activateUIButton(l.gK.LINE),this.setActionableState({trash:!0}),{line:o,currentVertexPosition:n,direction:r}},clickAnywhere:function(t,e){if(t.currentVertexPosition>0&&(0,T.A)(e,t.line.coordinates[t.currentVertexPosition-1])||"backwards"===t.direction&&(0,T.A)(e,t.line.coordinates[t.currentVertexPosition+1]))return this.changeMode(l.nI.SIMPLE_SELECT,{featureIds:[t.line.id]});this.updateUIClasses({mouse:l.kZ.ADD}),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(l.nI.SIMPLE_SELECT,{featureIds:[t.line.id]})},onMouseMove:function(t,e){t.line.updateCoordinate(t.currentVertexPosition,e.lngLat.lng,e.lngLat.lat),n.isVertex(e)&&this.updateUIClasses({mouse:l.kZ.POINTER})}};S.onTap=S.onClick=function(t,e){if(n.isVertex(e))return this.clickOnVertex(t,e);this.clickAnywhere(t,e)},S.onKeyUp=function(t,e){n.isEnterKey(e)?this.changeMode(l.nI.SIMPLE_SELECT,{featureIds:[t.line.id]}):n.isEscapeKey(e)&&(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(l.nI.SIMPLE_SELECT))},S.onStop=function(t){c.A.enable(this),this.activateUIButton(),void 0!==this.getFeature(t.line.id)&&(t.line.removeCoordinate(`${t.currentVertexPosition}`),t.line.isValid()?this.fire(l.AZ.CREATE,{features:[t.line.toGeoJSON()]}):(this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(l.nI.SIMPLE_SELECT,{},{silent:!0})))},S.onTrash=function(t){this.deleteFeature([t.line.id],{silent:!0}),this.changeMode(l.nI.SIMPLE_SELECT)},S.toDisplayFeatures=function(t,e,o){const n=e.properties.id===t.line.id;if(e.properties.active=n?l.l4.ACTIVE:l.l4.INACTIVE,!n)return o(e);e.geometry.coordinates.length<2||(e.properties.meta=l.mI.FEATURE,o((0,v.A)(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)),o(e))};const O={simple_select:p,direct_select:m,draw_point:I,draw_polygon:A,draw_line_string:S}},76349(t,e,o){"use strict";o.d(e,{A:()=>l}),o.dn(l);var n=o(23466),r=o(16746),i=o(21246);const s={defaultMode:n.nI.SIMPLE_SELECT,keybindings:!0,touchEnabled:!0,clickBuffer:2,touchBuffer:25,boxSelect:!0,displayControlsDefault:!0,styles:r.A,modes:i.A,controls:{},userProperties:!1,suppressAPIEvents:!0},a={point:!0,line_string:!0,polygon:!0,trash:!0,combine_features:!0,uncombine_features:!0},c={point:!1,line_string:!1,polygon:!1,trash:!1,combine_features:!1,uncombine_features:!1};function u(t,e){return t.map(t=>t.source?t:Object.assign({},t,{id:`${t.id}.${e}`,source:"hot"===e?n.Tj.HOT:n.Tj.COLD}))}function l(t={}){let e=Object.assign({},t);return t.controls||(e.controls={}),!1===t.displayControlsDefault?e.controls=Object.assign({},c,t.controls):e.controls=Object.assign({},a,t.controls),e=Object.assign({},s,e),e.styles=u(e.styles,"cold").concat(u(e.styles,"hot")),e}},61327(t,e,o){"use strict";o.d(e,{A:()=>M});var n=o(23466),r=o(10727),i=o(49058),s=o(79257),a=o(86240),c=o(62345),u=o(13707),l=o(23982),d=o(7518),p=o(60454),h=o(6260);function g(t){this.map=t.map,this.drawConfig=JSON.parse(JSON.stringify(t.options||{})),this._ctx=t}g.prototype.setSelected=function(t){return this._ctx.store.setSelected(t)},g.prototype.setSelectedCoordinates=function(t){this._ctx.store.setSelectedCoordinates(t),t.reduce((t,e)=>(void 0===t[e.feature_id]&&(t[e.feature_id]=!0,this._ctx.store.get(e.feature_id).changed()),t),{})},g.prototype.getSelected=function(){return this._ctx.store.getSelected()},g.prototype.getSelectedIds=function(){return this._ctx.store.getSelectedIds()},g.prototype.isSelected=function(t){return this._ctx.store.isSelected(t)},g.prototype.getFeature=function(t){return this._ctx.store.get(t)},g.prototype.select=function(t){return this._ctx.store.select(t)},g.prototype.deselect=function(t){return this._ctx.store.deselect(t)},g.prototype.deleteFeature=function(t,e={}){return this._ctx.store.delete(t,e)},g.prototype.addFeature=function(t,e={}){return this._ctx.store.add(t,e)},g.prototype.clearSelectedFeatures=function(){return this._ctx.store.clearSelected()},g.prototype.clearSelectedCoordinates=function(){return this._ctx.store.clearSelectedCoordinates()},g.prototype.setActionableState=function(t={}){const e={trash:t.trash||!1,combineFeatures:t.combineFeatures||!1,uncombineFeatures:t.uncombineFeatures||!1};return this._ctx.events.actionable(e)},g.prototype.changeMode=function(t,e={},o={}){return this._ctx.events.changeMode(t,e,o)},g.prototype.fire=function(t,e){return this._ctx.events.fire(t,e)},g.prototype.updateUIClasses=function(t){return this._ctx.ui.queueMapClasses(t)},g.prototype.activateUIButton=function(t){return this._ctx.ui.setActiveButton(t)},g.prototype.featuresAt=function(t,e,o="click"){if("click"!==o&&"touch"!==o)throw new Error("invalid buffer type");return i.A[o](t,e,this._ctx)},g.prototype.newFeature=function(t){const e=t.geometry.type;return e===n.zH.POINT?new l.A(this._ctx,t):e===n.zH.LINE_STRING?new d.A(this._ctx,t):e===n.zH.POLYGON?new p.A(this._ctx,t):new h.A(this._ctx,t)},g.prototype.isInstanceOf=function(t,e){if(t===n.zH.POINT)return e instanceof l.A;if(t===n.zH.LINE_STRING)return e instanceof d.A;if(t===n.zH.POLYGON)return e instanceof p.A;if("MultiFeature"===t)return e instanceof h.A;throw new Error(`Unknown feature class: ${t}`)},g.prototype.doRender=function(t){return this._ctx.store.featureChanged(t)};const f=g;g.prototype.onSetup=function(){},g.prototype.onDrag=function(){},g.prototype.onClick=function(){},g.prototype.onMouseMove=function(){},g.prototype.onMouseDown=function(){},g.prototype.onMouseUp=function(){},g.prototype.onMouseOut=function(){},g.prototype.onKeyUp=function(){},g.prototype.onKeyDown=function(){},g.prototype.onTouchStart=function(){},g.prototype.onTouchMove=function(){},g.prototype.onTouchEnd=function(){},g.prototype.onTap=function(){},g.prototype.onStop=function(){},g.prototype.onTrash=function(){},g.prototype.onCombineFeature=function(){},g.prototype.onUncombineFeature=function(){},g.prototype.toDisplayFeatures=function(){throw new Error("You must overwrite toDisplayFeatures")},o.dn(E);const y={drag:"onDrag",click:"onClick",mousemove:"onMouseMove",mousedown:"onMouseDown",mouseup:"onMouseUp",mouseout:"onMouseOut",keyup:"onKeyUp",keydown:"onKeyDown",touchstart:"onTouchStart",touchmove:"onTouchMove",touchend:"onTouchEnd",tap:"onTap"},m=Object.keys(y);function E(t){const e=Object.keys(t);return function(o,n={}){let r={};const i=e.reduce((e,o)=>(e[o]=t[o],e),new f(o));return{start(){r=i.onSetup(n),m.forEach(e=>{const o=y[e];let n=()=>!1;var s;t[o]&&(n=()=>!0),this.on(e,n,(s=o,t=>i[s](r,t)))})},stop(){i.onStop(r)},trash(){i.onTrash(r)},combineFeatures(){i.onCombineFeatures(r)},uncombineFeatures(){i.onUncombineFeatures(r)},render(t,e){i.toDisplayFeatures(r,t,e)}}}}function I(t){const e=Object.keys(t.options.modes).reduce((e,o)=>(e[o]=E(t.options.modes[o]),e),{});let o={},l={};const d={};let p=null,h=null;d.drag=function(e,o){o({point:e.point,time:(new Date).getTime()})?(t.ui.queueMapClasses({mouse:n.kZ.DRAG}),h.drag(e)):e.originalEvent.stopPropagation()},d.mousedrag=function(t){d.drag(t,t=>!(0,a.A)(o,t))},d.touchdrag=function(t){d.drag(t,t=>!(0,c.Ay)(l,t))},d.mousemove=function(e){if(1===(void 0!==e.originalEvent.buttons?e.originalEvent.buttons:e.originalEvent.which))return d.mousedrag(e);const o=(0,s.A)(e,t);e.featureTarget=o,h.mousemove(e)},d.mousedown=function(e){o={time:(new Date).getTime(),point:e.point};const n=(0,s.A)(e,t);e.featureTarget=n,h.mousedown(e)},d.mouseup=function(e){const n=(0,s.A)(e,t);e.featureTarget=n,(0,a.A)(o,{point:e.point,time:(new Date).getTime()})?h.click(e):h.mouseup(e)},d.mouseout=function(t){h.mouseout(t)},d.touchstart=function(e){if(!t.options.touchEnabled)return;l={time:(new Date).getTime(),point:e.point};const o=i.A.touch(e,null,t)[0];e.featureTarget=o,h.touchstart(e)},d.touchmove=function(e){if(t.options.touchEnabled)return h.touchmove(e),d.touchdrag(e)},d.touchend=function(e){if(e.originalEvent.preventDefault(),!t.options.touchEnabled)return;const o=i.A.touch(e,null,t)[0];e.featureTarget=o,(0,c.Ay)(l,{time:(new Date).getTime(),point:e.point})?h.tap(e):h.touchend(e)};const g=t=>{const e=r.isBackspaceKey(t),o=r.isDeleteKey(t),n=r.isDigitKey(t);return!(e||o||n)};function f(o,r,i={}){h.stop();const s=e[o];if(void 0===s)throw new Error(`${o} is not valid`);p=o;const a=s(t,r);h=(0,u.A)(a,t),i.silent||t.map.fire(n.AZ.MODE_CHANGE,{mode:o}),t.store.setDirty(),t.store.render()}d.keydown=function(e){(e.srcElement||e.target).classList.contains(n.Ly.CANVAS)&&((r.isBackspaceKey(e)||r.isDeleteKey(e))&&t.options.controls.trash?(e.preventDefault(),h.trash()):g(e)?h.keydown(e):r.isDigit1Key(e)&&t.options.controls.point?f(n.nI.DRAW_POINT):r.isDigit2Key(e)&&t.options.controls.line_string?f(n.nI.DRAW_LINE_STRING):r.isDigit3Key(e)&&t.options.controls.polygon&&f(n.nI.DRAW_POLYGON))},d.keyup=function(t){g(t)&&h.keyup(t)},d.zoomend=function(){t.store.changeZoom()},d.data=function(e){if("style"===e.dataType){const{setup:e,map:o,options:n,store:r}=t;n.styles.some(t=>o.getLayer(t.id))||(e.addLayers(),r.setDirty(),r.render())}};const y={trash:!1,combineFeatures:!1,uncombineFeatures:!1};return{start(){p=t.options.defaultMode,h=(0,u.A)(e[p](t),t)},changeMode:f,actionable:function(e){let o=!1;Object.keys(e).forEach(t=>{if(void 0===y[t])throw new Error("Invalid action type");y[t]!==e[t]&&(o=!0),y[t]=e[t]}),o&&t.map.fire(n.AZ.ACTIONABLE,{actions:y})},currentModeName:()=>p,currentModeRender:(t,e)=>h.render(t,e),fire(e,o){t.map&&t.map.fire(e,o)},addEventListeners(){t.map.on("mousemove",d.mousemove),t.map.on("mousedown",d.mousedown),t.map.on("mouseup",d.mouseup),t.map.on("data",d.data),t.map.on("touchmove",d.touchmove),t.map.on("touchstart",d.touchstart),t.map.on("touchend",d.touchend),t.container.addEventListener("mouseout",d.mouseout),t.options.keybindings&&(t.container.addEventListener("keydown",d.keydown),t.container.addEventListener("keyup",d.keyup))},removeEventListeners(){t.map.off("mousemove",d.mousemove),t.map.off("mousedown",d.mousedown),t.map.off("mouseup",d.mouseup),t.map.off("data",d.data),t.map.off("touchmove",d.touchmove),t.map.off("touchstart",d.touchstart),t.map.off("touchend",d.touchend),t.container.removeEventListener("mouseout",d.mouseout),t.options.keybindings&&(t.container.removeEventListener("keydown",d.keydown),t.container.removeEventListener("keyup",d.keyup))},trash(t){h.trash(t)},combineFeatures(){h.combineFeatures()},uncombineFeatures(){h.uncombineFeatures()},getMode:()=>p}}o.dn(I);var T=o(99260),v=o(8665);function C(){const t=this;if(!(t.ctx.map&&void 0!==t.ctx.map.getSource(n.Tj.HOT)))return c();const e=t.ctx.events.currentModeName();t.ctx.ui.queueMapClasses({mode:e});let o=[],r=[];t.isDirty?r=t.getAllIds():(o=t.getChangedIds().filter(e=>void 0!==t.get(e)),r=t.sources.hot.filter(e=>e.properties.id&&-1===o.indexOf(e.properties.id)&&void 0!==t.get(e.properties.id)).map(t=>t.properties.id)),t.sources.hot=[];const i=t.sources.cold.length;t.sources.cold=t.isDirty?[]:t.sources.cold.filter(t=>{const e=t.properties.id||t.properties.parent;return-1===o.indexOf(e)});const s=i!==t.sources.cold.length||r.length>0;function a(o,n){const r=t.get(o).internal(e);t.ctx.events.currentModeRender(r,o=>{o.properties.mode=e,t.sources[n].push(o)})}function c(){t.isDirty=!1,t.clearChangedIds()}o.forEach(t=>a(t,"hot")),r.forEach(t=>a(t,"cold")),s&&t.ctx.map.getSource(n.Tj.COLD).setData({type:n.zH.FEATURE_COLLECTION,features:t.sources.cold}),t.ctx.map.getSource(n.Tj.HOT).setData({type:n.zH.FEATURE_COLLECTION,features:t.sources.hot}),c()}function A(t){let e;this._features={},this._featureIds=new v.A,this._selectedFeatureIds=new v.A,this._selectedCoordinates=[],this._changedFeatureIds=new v.A,this._emitSelectionChange=!1,this._mapInitialConfig={},this.ctx=t,this.sources={hot:[],cold:[]},this.render=()=>{e||(e=requestAnimationFrame(()=>{e=null,C.call(this),this._emitSelectionChange&&(this.ctx.events.fire(n.AZ.SELECTION_CHANGE,{features:this.getSelected().map(t=>t.toGeoJSON()),points:this.getSelectedCoordinates().map(t=>({type:n.zH.FEATURE,properties:{},geometry:{type:n.zH.POINT,coordinates:t.coordinates}}))}),this._emitSelectionChange=!1),this.ctx.events.fire(n.AZ.RENDER,{})}))},this.isDirty=!1}function S(t,e={}){const o=t._selectedCoordinates.filter(e=>t._selectedFeatureIds.has(e.feature_id));t._selectedCoordinates.length===o.length||e.silent||(t._emitSelectionChange=!0),t._selectedCoordinates=o}A.prototype.createRenderBatch=function(){const t=this.render;let e=0;return this.render=function(){e++},()=>{this.render=t,e>0&&this.render()}},A.prototype.setDirty=function(){return this.isDirty=!0,this},A.prototype.featureCreated=function(t,e={}){this._changedFeatureIds.add(t);if(!0!==(null!=e.silent?e.silent:this.ctx.options.suppressAPIEvents)){const e=this.get(t);this.ctx.events.fire(n.AZ.CREATE,{features:[e.toGeoJSON()]})}return this},A.prototype.featureChanged=function(t,e={}){this._changedFeatureIds.add(t);return!0!==(null!=e.silent?e.silent:this.ctx.options.suppressAPIEvents)&&this.ctx.events.fire(n.AZ.UPDATE,{action:e.action?e.action:n.J3.CHANGE_COORDINATES,features:[this.get(t).toGeoJSON()]}),this},A.prototype.getChangedIds=function(){return this._changedFeatureIds.values()},A.prototype.clearChangedIds=function(){return this._changedFeatureIds.clear(),this},A.prototype.getAllIds=function(){return this._featureIds.values()},A.prototype.add=function(t,e={}){return this._features[t.id]=t,this._featureIds.add(t.id),this.featureCreated(t.id,{silent:e.silent}),this},A.prototype.delete=function(t,e={}){const o=[];return(0,T.A)(t).forEach(t=>{this._featureIds.has(t)&&(this._featureIds.delete(t),this._selectedFeatureIds.delete(t),e.silent||-1===o.indexOf(this._features[t])&&o.push(this._features[t].toGeoJSON()),delete this._features[t],this.isDirty=!0)}),o.length&&this.ctx.events.fire(n.AZ.DELETE,{features:o}),S(this,e),this},A.prototype.get=function(t){return this._features[t]},A.prototype.getAll=function(){return Object.keys(this._features).map(t=>this._features[t])},A.prototype.select=function(t,e={}){return(0,T.A)(t).forEach(t=>{this._selectedFeatureIds.has(t)||(this._selectedFeatureIds.add(t),this._changedFeatureIds.add(t),e.silent||(this._emitSelectionChange=!0))}),this},A.prototype.deselect=function(t,e={}){return(0,T.A)(t).forEach(t=>{this._selectedFeatureIds.has(t)&&(this._selectedFeatureIds.delete(t),this._changedFeatureIds.add(t),e.silent||(this._emitSelectionChange=!0))}),S(this,e),this},A.prototype.clearSelected=function(t={}){return this.deselect(this._selectedFeatureIds.values(),{silent:t.silent}),this},A.prototype.setSelected=function(t,e={}){return t=(0,T.A)(t),this.deselect(this._selectedFeatureIds.values().filter(e=>-1===t.indexOf(e)),{silent:e.silent}),this.select(t.filter(t=>!this._selectedFeatureIds.has(t)),{silent:e.silent}),this},A.prototype.setSelectedCoordinates=function(t){return this._selectedCoordinates=t,this._emitSelectionChange=!0,this},A.prototype.clearSelectedCoordinates=function(){return this._selectedCoordinates=[],this._emitSelectionChange=!0,this},A.prototype.getSelectedIds=function(){return this._selectedFeatureIds.values()},A.prototype.getSelected=function(){return this.getSelectedIds().map(t=>this.get(t))},A.prototype.getSelectedCoordinates=function(){return this._selectedCoordinates.map(t=>({coordinates:this.get(t.feature_id).getCoordinate(t.coord_path)}))},A.prototype.isSelected=function(t){return this._selectedFeatureIds.has(t)},A.prototype.setFeatureProperty=function(t,e,o,r={}){this.get(t).setProperty(e,o),this.featureChanged(t,{silent:r.silent,action:n.J3.CHANGE_PROPERTIES})},A.prototype.storeMapConfig=function(){n.yi.forEach(t=>{this.ctx.map[t]&&(this._mapInitialConfig[t]=this.ctx.map[t].isEnabled())})},A.prototype.restoreMapConfig=function(){Object.keys(this._mapInitialConfig).forEach(t=>{this._mapInitialConfig[t]?this.ctx.map[t].enable():this.ctx.map[t].disable()})},A.prototype.getInitialConfigValue=function(t){return void 0===this._mapInitialConfig[t]||this._mapInitialConfig[t]},o.dn(_);const O=["mode","feature","mouse"];function _(t){const e={};let o=null,r={mode:null,feature:null,mouse:null},i={mode:null,feature:null,mouse:null};function s(t){i=Object.assign(i,t)}function a(){if(!t.container)return;const e=[],o=[];O.forEach(t=>{i[t]!==r[t]&&(e.push(`${t}-${r[t]}`),null!==i[t]&&o.push(`${t}-${i[t]}`))}),e.length>0&&t.container.classList.remove(...e),o.length>0&&t.container.classList.add(...o),r=Object.assign(r,i)}function c(t,e={}){const r=document.createElement("button");return r.className=`${n.Ly.CONTROL_BUTTON} ${e.className}`,r.setAttribute("title",e.title),e.container.appendChild(r),r.addEventListener("click",n=>{n.preventDefault(),n.stopPropagation();if(n.target===o)return u(),void e.onDeactivate();l(t),e.onActivate()},!0),r}function u(){o&&(o.classList.remove(n.Ly.ACTIVE_BUTTON),o=null)}function l(t){u();const r=e[t];r&&r&&"trash"!==t&&(r.classList.add(n.Ly.ACTIVE_BUTTON),o=r)}return{setActiveButton:l,queueMapClasses:s,updateMapClasses:a,clearMapClasses:function(){s({mode:null,feature:null,mouse:null}),a()},addButtons:function(){const o=t.options.controls,r=document.createElement("div");return r.className=`${n.Ly.CONTROL_GROUP} ${n.Ly.CONTROL_BASE}`,o?(o[n.gK.POINT]&&(e[n.gK.POINT]=c(n.gK.POINT,{container:r,className:n.Ly.CONTROL_BUTTON_POINT,title:"Marker tool "+(t.options.keybindings?"(1)":""),onActivate:()=>t.events.changeMode(n.nI.DRAW_POINT),onDeactivate:()=>t.events.trash()})),o[n.gK.LINE]&&(e[n.gK.LINE]=c(n.gK.LINE,{container:r,className:n.Ly.CONTROL_BUTTON_LINE,title:"LineString tool "+(t.options.keybindings?"(2)":""),onActivate:()=>t.events.changeMode(n.nI.DRAW_LINE_STRING),onDeactivate:()=>t.events.trash()})),o[n.gK.POLYGON]&&(e[n.gK.POLYGON]=c(n.gK.POLYGON,{container:r,className:n.Ly.CONTROL_BUTTON_POLYGON,title:"Polygon tool "+(t.options.keybindings?"(3)":""),onActivate:()=>t.events.changeMode(n.nI.DRAW_POLYGON),onDeactivate:()=>t.events.trash()})),o.trash&&(e.trash=c("trash",{container:r,className:n.Ly.CONTROL_BUTTON_TRASH,title:"Delete",onActivate:()=>{t.events.trash()}})),o.combine_features&&(e.combine_features=c("combineFeatures",{container:r,className:n.Ly.CONTROL_BUTTON_COMBINE_FEATURES,title:"Combine",onActivate:()=>{t.events.combineFeatures()}})),o.uncombine_features&&(e.uncombine_features=c("uncombineFeatures",{container:r,className:n.Ly.CONTROL_BUTTON_UNCOMBINE_FEATURES,title:"Uncombine",onActivate:()=>{t.events.uncombineFeatures()}})),r):r},removeButtons:function(){Object.keys(e).forEach(t=>{const o=e[t];o.parentNode&&o.parentNode.removeChild(o),delete e[t]})}}}function M(t){let e=null,o=null;const r={onRemove(){return t.map.off("load",r.connect),clearInterval(o),r.removeLayers(),t.store.restoreMapConfig(),t.ui.removeButtons(),t.events.removeEventListeners(),t.ui.clearMapClasses(),t.boxZoomInitial&&t.map.boxZoom.enable(),t.map=null,t.container=null,t.store=null,e&&e.parentNode&&e.parentNode.removeChild(e),e=null,this},connect(){t.map.off("load",r.connect),clearInterval(o),r.addLayers(),t.store.storeMapConfig(),t.events.addEventListeners()},onAdd(n){if(t.map=n,t.events=I(t),t.ui=_(t),t.container=n.getContainer(),t.store=new A(t),e=t.ui.addButtons(),t.options.boxSelect){t.boxZoomInitial=n.boxZoom.isEnabled(),n.boxZoom.disable();const e=n.dragPan.isEnabled();n.dragPan.disable(),n.dragPan.enable(),e||n.dragPan.disable()}return n.loaded()?r.connect():(n.on("load",r.connect),o=setInterval(()=>{n.loaded()&&r.connect()},16)),t.events.start(),e},addLayers(){t.map.addSource(n.Tj.COLD,{data:{type:n.zH.FEATURE_COLLECTION,features:[]},type:"geojson"}),t.map.addSource(n.Tj.HOT,{data:{type:n.zH.FEATURE_COLLECTION,features:[]},type:"geojson"}),t.options.styles.forEach(e=>{t.map.addLayer(e)}),t.store.setDirty(!0),t.store.render()},removeLayers(){t.options.styles.forEach(e=>{t.map.getLayer(e.id)&&t.map.removeLayer(e.id)}),t.map.getSource(n.Tj.COLD)&&t.map.removeSource(n.Tj.COLD),t.map.getSource(n.Tj.HOT)&&t.map.removeSource(n.Tj.HOT)}};return t.setup=r,r}o.dn(M)},17480(t,e,o){"use strict";o.d(e,{I:()=>i});var n=o(42165),r=o(80278);function i(t,e,o={}){var i=(0,n.getCoord)(t),s=(0,n.getCoord)(e),a=(0,r.degreesToRadians)(s[1]-i[1]),c=(0,r.degreesToRadians)(s[0]-i[0]),u=(0,r.degreesToRadians)(i[1]),l=(0,r.degreesToRadians)(s[1]),d=Math.pow(Math.sin(a/2),2)+Math.pow(Math.sin(c/2),2)*Math.cos(u)*Math.cos(l);return(0,r.radiansToLength)(2*Math.atan2(Math.sqrt(d),Math.sqrt(1-d)),o.units)}},67927(t,e,o){"use strict";o.d(e,{W:()=>y});var n=o(17480),r=o(25850),i=o(80278),s=o(42165),a=Object.defineProperty,c=Object.defineProperties,u=Object.getOwnPropertyDescriptors,l=Object.getOwnPropertySymbols,d=Object.prototype.hasOwnProperty,p=Object.prototype.propertyIsEnumerable,h=(t,e,o)=>e in t?a(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,g=(t,e)=>{for(var o in e||(e={}))d.call(e,o)&&h(t,o,e[o]);if(l)for(var o of l(e))p.call(e,o)&&h(t,o,e[o]);return t},f=(t,e)=>c(t,u(e));function y(t,e,o={}){if(!t||!e)throw new Error("lines and inputPoint are required arguments");const a=(0,s.getCoord)(e);let c=(0,i.point)([1/0,1/0],{lineStringIndex:-1,segmentIndex:-1,totalDistance:-1,lineDistance:-1,segmentDistance:-1,pointDistance:1/0,multiFeatureIndex:-1,index:-1,location:-1,dist:1/0}),u=0,l=0,d=-1;return(0,r.flattenEach)(t,function(t,r,p){d!==p&&(d=p,l=0);const h=(0,s.getCoords)(t);for(let t=0;t0?[[...e],!0]:[[...o],!1];const a=E(s,i);if(0===a[0]&&0===a[1]&&0===a[2])return[[...e],!0];const c=I(E(a,s)),u=[-c[0],-c[1],-c[2]],l=m(i,c)>m(i,u)?c:u,d=I(s),p=m(E(n,l),d),h=m(E(l,r),d);return p>=0&&h>=0?[v(l),!1]:m(n,i)>m(r,i)?[[...t],!1]:[[...e],!0]}}}]); //# sourceMappingURL=3751.3ae50db94b801b0d4d07.js.map