diff --git a/app/app.config.ts b/app/app.config.ts index 96ea13e..6c01951 100644 --- a/app/app.config.ts +++ b/app/app.config.ts @@ -20,7 +20,7 @@ export default defineAppConfig({ ], }, gratewizard: { - url: '/gratewizard-app/', + url: '/gratewizard?popup', popup: { width: 420, height: 720, diff --git a/app/components/admin/AdminSidebar.vue b/app/components/admin/AdminSidebar.vue index b7882e8..bb58bf1 100644 --- a/app/components/admin/AdminSidebar.vue +++ b/app/components/admin/AdminSidebar.vue @@ -37,7 +37,7 @@
- GrateWizard + grateWizard diff --git a/app/components/gratewizard/GwCRA.vue b/app/components/gratewizard/GwCRA.vue new file mode 100644 index 0000000..7966e8f --- /dev/null +++ b/app/components/gratewizard/GwCRA.vue @@ -0,0 +1,194 @@ + + + diff --git a/app/components/gratewizard/GwCRS.vue b/app/components/gratewizard/GwCRS.vue new file mode 100644 index 0000000..12fa7c4 --- /dev/null +++ b/app/components/gratewizard/GwCRS.vue @@ -0,0 +1,208 @@ + + + diff --git a/app/components/gratewizard/GwMN.vue b/app/components/gratewizard/GwMN.vue new file mode 100644 index 0000000..22d3fcc --- /dev/null +++ b/app/components/gratewizard/GwMN.vue @@ -0,0 +1,272 @@ + + + diff --git a/app/components/gratewizard/GwMap.client.vue b/app/components/gratewizard/GwMap.client.vue new file mode 100644 index 0000000..f58d10a --- /dev/null +++ b/app/components/gratewizard/GwMap.client.vue @@ -0,0 +1,146 @@ + + + + + diff --git a/app/components/gratewizard/GwPerimeterList.vue b/app/components/gratewizard/GwPerimeterList.vue new file mode 100644 index 0000000..07fa0ed --- /dev/null +++ b/app/components/gratewizard/GwPerimeterList.vue @@ -0,0 +1,40 @@ + + + diff --git a/app/components/gratewizard/GwRelations.vue b/app/components/gratewizard/GwRelations.vue new file mode 100644 index 0000000..994069d --- /dev/null +++ b/app/components/gratewizard/GwRelations.vue @@ -0,0 +1,131 @@ + + + diff --git a/app/components/gratewizard/GwTabs.vue b/app/components/gratewizard/GwTabs.vue new file mode 100644 index 0000000..3b42022 --- /dev/null +++ b/app/components/gratewizard/GwTabs.vue @@ -0,0 +1,41 @@ + + + diff --git a/app/components/home/GrateWizardTeaser.vue b/app/components/home/GrateWizardTeaser.vue index 069d4be..f0aed53 100644 --- a/app/components/home/GrateWizardTeaser.vue +++ b/app/components/home/GrateWizardTeaser.vue @@ -24,7 +24,7 @@
- + ",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom;(e||n||r)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;!this._inZoomAnimation&&(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,r=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),r.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var r=t;r>=e;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,r=this._gridClusters,o=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=s;e--){i=this._map.project(t.getLatLng(),e);var a=r[e].getNearObject(i);if(a){a._addChild(t),t.__parent=a;return}if(a=o[e].getNearObject(i)){var l=a.__parent;l&&this._removeLayer(a,!1);var h=new this._markerCluster(this,e,a,t);r[e].addObject(h,this._map.project(h._cLatLng,e)),a.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>l._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));l._addChild(u),this._removeFromGridUnclustered(a,e);return}o[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;tt?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),r=0;for(e=e||[];r=0;i--)s=l[i],n.contains(s._latlng)||r.removeLayer(s)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),r.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,t,o,function(t){r.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,e+1,i);var o=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var s=t._markers[0];this._ignoreMove=!0,s.setLatLng(s.getLatLng()),this._ignoreMove=!1,s.clusterShow&&s.clusterShow()}else t._recursively(n,i,r,function(t){t._recursivelyRemoveChildrenFromMap(n,r,e+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),o=this._zoom+1,s=n.getZoom();i.length>0&&r>o;){o++;var a=[];for(e=0;eo?this._group._map.setView(this._latlng,o):r<=s?this._group._map.setView(this._latlng,s+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,r=this._markers,o=this._childClusters,s=0,a=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t=0;i--)(n=r[i])._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,r=t._childClusters;for(i=r.length-1;i>=0;i--)(n=r[i])._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(r){r._recursivelyAnimateChildrenIn(t,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(t,e,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var o=n._markers[r];i.contains(o._latlng)&&(t&&(o._backupLatlng=o.getLatLng(),o.setLatLng(t),o.clusterHide&&o.clusterHide()),n._group._featureGroup.addLayer(o))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var r,o;this._recursively(t,e-1,i-1,function(t){for(o=t._markers.length-1;o>=0;o--)r=t._markers[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(t){for(o=t._childClusters.length-1;o>=0;o--)r=t._childClusters[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(t,e,i,n,r){var o,s,a=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),r&&l===i&&r(this)),l=0;o--)(s=a[o])._boundsNeedUpdate&&s._recalculateBounds(),t.intersects(s._bounds)&&s._recursively(t,e,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,o=r[n]=r[n]||{},s=o[i]=o[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,r=this._getCoord(e.x),o=this._getCoord(e.y),s=this._grid,a=s[o]=s[o]||{},l=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i=0;i--)n=e[i],(r=this.getDistant(n,t))>0&&(a.push(n),r>o&&(o=r,s=n));return{maxPoint:s,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,r=!1,o=!1,s=null,a=null,l=null,h=null,u=null,p=null;for(e=t.length-1;e>=0;e--){var c=t[e];(!1===i||c.lat>i)&&(s=c,i=c.lat),(!1===n||c.latr)&&(l=c,r=c.lng),(!1===o||c.lng=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,o=this._2PI/t,s=[];for(i=0,r=Math.max(r,35),s.length=t;i=0;i--)i=0;e--)t=o[e],r.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:o}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,r,o,s=this._group,a=s._map,l=s._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(i=0,s._ignoreMove=!0;i=0;i--)a=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),_&&((o=(r=n._spiderLeg)._path).style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,r,o,s,a=this,l=this._group,h=l._map,u=l._featureGroup,p=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=c.length-1;i>=0;i--)(e=c[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,s=!0,e._setPos&&(e._setPos(p),s=!1),e.clusterHide&&(e.clusterHide(),s=!1),s&&u.removeLayer(e),d&&(o=(r=(n=e._spiderLeg)._path).getTotalLength()+.1,r.style.strokeDashoffset=o,n.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout(function(){var t=0;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&t++;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:a,markers:c})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}(i)},70462,(t,e,i)=>{"use strict";(()=>{var n=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),u=(t,e,i)=>(i=null!=t?n(a(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let a of s(e))l.call(t,a)||a===i||r(t,a,{get:()=>e[a],enumerable:!(n=o(e,a))||n.enumerable});return t})(!e&&t&&t.__esModule?i:r(i,"default",{value:t,enumerable:!0}),t)),p=h((t,e)=>{e.exports=function(){this.__data__=[],this.size=0}}),c=h((t,e)=>{e.exports=function(t,e){return t===e||t!=t&&e!=e}}),d=h((t,e)=>{var i=c();e.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return -1}}),_=h((t,e)=>{var i=d(),n=Array.prototype.splice;e.exports=function(t){var e=this.__data__,r=i(e,t);return!(r<0)&&(r==e.length-1?e.pop():n.call(e,r,1),--this.size,!0)}}),f=h((t,e)=>{var i=d();e.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}}),m=h((t,e)=>{var i=d();e.exports=function(t){return i(this.__data__,t)>-1}}),g=h((t,e)=>{var i=d();e.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}}),y=h((t,e)=>{var i=p(),n=_(),r=f(),o=m(),s=g();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{var i=y();e.exports=function(){this.__data__=new i,this.size=0}}),b=h((t,e)=>{e.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}}),k=h((t,e)=>{e.exports=function(t){return this.__data__.get(t)}}),M=h((t,e)=>{e.exports=function(t){return this.__data__.has(t)}}),x=h((e,i)=>{i.exports=t.g&&t.g.Object===Object&&t.g}),w=h((t,e)=>{var i=x(),n="object"==typeof self&&self&&self.Object===Object&&self;e.exports=i||n||Function("return this")()}),C=h((t,e)=>{e.exports=w().Symbol}),P=h((t,e)=>{var i=C(),n=Object.prototype,r=n.hasOwnProperty,o=n.toString,s=i?i.toStringTag:void 0;e.exports=function(t){var e=r.call(t,s),i=t[s];try{t[s]=void 0;var n=!0}catch{}var a=o.call(t);return n&&(e?t[s]=i:delete t[s]),a}}),E=h((t,e)=>{var i=Object.prototype.toString;e.exports=function(t){return i.call(t)}}),T=h((t,e)=>{var i=C(),n=P(),r=E(),o=i?i.toStringTag:void 0;e.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):r(t)}}),S=h((t,e)=>{e.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}),B=h((t,e)=>{var i=T(),n=S();e.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}),O=h((t,e)=>{e.exports=w()["__core-js_shared__"]}),D=h((t,e)=>{var i,n=O(),r=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(t){return!!r&&r in t}}),R=h((t,e)=>{var i=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return i.call(t)}catch{}try{return t+""}catch{}}return""}}),I=h((t,e)=>{var i=B(),n=D(),r=S(),o=R(),s=/^\[object .+?Constructor\]$/,a=Object.prototype,l=Function.prototype.toString,h=a.hasOwnProperty,u=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!r(t)||n(t))&&(i(t)?u:s).test(o(t))}}),A=h((t,e)=>{e.exports=function(t,e){return t?.[e]}}),z=h((t,e)=>{var i=I(),n=A();e.exports=function(t,e){var r=n(t,e);return i(r)?r:void 0}}),N=h((t,e)=>{e.exports=z()(w(),"Map")}),j=h((t,e)=>{e.exports=z()(Object,"create")}),G=h((t,e)=>{var i=j();e.exports=function(){this.__data__=i?i(null):{},this.size=0}}),Z=h((t,e)=>{e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e}}),F=h((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(e,t)?e[t]:void 0}}),U=h((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}}),V=h((t,e)=>{var i=j();e.exports=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}}),H=h((t,e)=>{var i=G(),n=Z(),r=F(),o=U(),s=V();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{var i=H(),n=y(),r=N();e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(r||n),string:new i}}}),K=h((t,e)=>{e.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}}),W=h((t,e)=>{var i=K();e.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}}),Y=h((t,e)=>{var i=W();e.exports=function(t){var e=i(this,t).delete(t);return this.size-=!!e,e}}),X=h((t,e)=>{var i=W();e.exports=function(t){return i(this,t).get(t)}}),J=h((t,e)=>{var i=W();e.exports=function(t){return i(this,t).has(t)}}),$=h((t,e)=>{var i=W();e.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=+(n.size!=r),this}}),Q=h((t,e)=>{var i=q(),n=Y(),r=X(),o=J(),s=$();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{var i=y(),n=N(),r=Q();e.exports=function(t,e){var o=this.__data__;if(o instanceof i){var s=o.__data__;if(!n||s.length<199)return s.push([t,e]),this.size=++o.size,this;o=this.__data__=new r(s)}return o.set(t,e),this.size=o.size,this}}),te=h((t,e)=>{var i=y(),n=v(),r=b(),o=k(),s=M(),a=tt();function l(t){var e=this.__data__=new i(t);this.size=e.size}l.prototype.clear=n,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l}),ti=h((t,e)=>{var i=z();e.exports=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch{}}()}),tn=h((t,e)=>{var i=ti();e.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}}),tr=h((t,e)=>{var i=tn(),n=c();e.exports=function(t,e,r){(void 0===r||n(t[e],r))&&(void 0!==r||e in t)||i(t,e,r)}}),to=h((t,e)=>{e.exports=function(t){return function(e,i,n){for(var r=-1,o=Object(e),s=n(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===i(o[l],l,o))break}return e}}}),ts=h((t,e)=>{e.exports=to()()}),ta=h((t,e)=>{var i=w(),n="object"==typeof t&&t&&!t.nodeType&&t,r=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=r&&r.exports===n?i.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(t,e){if(e)return t.slice();var i=t.length,n=s?s(i):new t.constructor(i);return t.copy(n),n}}),tl=h((t,e)=>{e.exports=w().Uint8Array}),th=h((t,e)=>{var i=tl();e.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}}),tu=h((t,e)=>{var i=th();e.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}}),tp=h((t,e)=>{e.exports=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i{var i=S(),n=Object.create;e.exports=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}()}),td=h((t,e)=>{e.exports=function(t,e){return function(i){return t(e(i))}}}),t_=h((t,e)=>{e.exports=td()(Object.getPrototypeOf,Object)}),tf=h((t,e)=>{var i=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}}),tm=h((t,e)=>{var i=tc(),n=t_(),r=tf();e.exports=function(t){return"function"!=typeof t.constructor||r(t)?{}:i(n(t))}}),tg=h((t,e)=>{e.exports=function(t){return null!=t&&"object"==typeof t}}),ty=h((t,e)=>{var i=T(),n=tg();e.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}}),tv=h((t,e)=>{var i=ty(),n=tg(),r=Object.prototype,o=r.hasOwnProperty,s=r.propertyIsEnumerable;e.exports=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!s.call(t,"callee")}}),tL=h((t,e)=>{e.exports=Array.isArray}),tb=h((t,e)=>{e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}}),tk=h((t,e)=>{var i=B(),n=tb();e.exports=function(t){return null!=t&&n(t.length)&&!i(t)}}),tM=h((t,e)=>{var i=tk(),n=tg();e.exports=function(t){return n(t)&&i(t)}}),tx=h((t,e)=>{e.exports=function(){return!1}}),tw=h((t,e)=>{var i=w(),n=tx(),r="object"==typeof t&&t&&!t.nodeType&&t,o=r&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0;e.exports=(s?s.isBuffer:void 0)||n}),tC=h((t,e)=>{var i=T(),n=t_(),r=tg(),o=Object.prototype,s=Function.prototype.toString,a=o.hasOwnProperty,l=s.call(Object);e.exports=function(t){if(!r(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var o=a.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&s.call(o)==l}}),tP=h((t,e)=>{var i=T(),n=tb(),r=tg(),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(t){return r(t)&&n(t.length)&&!!o[i(t)]}}),tE=h((t,e)=>{e.exports=function(t){return function(e){return t(e)}}}),tT=h((t,e)=>{var i=x(),n="object"==typeof t&&t&&!t.nodeType&&t,r=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=r&&r.exports===n&&i.process;e.exports=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch{}}()}),tS=h((t,e)=>{var i=tP(),n=tE(),r=tT(),o=r&&r.isTypedArray;e.exports=o?n(o):i}),tB=h((t,e)=>{e.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}),tO=h((t,e)=>{var i=tn(),n=c(),r=Object.prototype.hasOwnProperty;e.exports=function(t,e,o){var s=t[e];r.call(t,e)&&n(s,o)&&(void 0!==o||e in t)||i(t,e,o)}}),tD=h((t,e)=>{var i=tO(),n=tn();e.exports=function(t,e,r,o){var s=!r;r||(r={});for(var a=-1,l=e.length;++a{e.exports=function(t,e){for(var i=-1,n=Array(t);++i{var i=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var n=typeof t;return!!(e=e??0x1fffffffffffff)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t{var i=tR(),n=tv(),r=tL(),o=tw(),s=tI(),a=tS(),l=Object.prototype.hasOwnProperty;e.exports=function(t,e){var h=r(t),u=!h&&n(t),p=!h&&!u&&o(t),c=!h&&!u&&!p&&a(t),d=h||u||p||c,_=d?i(t.length,String):[],f=_.length;for(var m in t)(e||l.call(t,m))&&!(d&&("length"==m||p&&("offset"==m||"parent"==m)||c&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,f)))&&_.push(m);return _}}),tz=h((t,e)=>{e.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}}),tN=h((t,e)=>{var i=S(),n=tf(),r=tz(),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!i(t))return r(t);var e=n(t),s=[];for(var a in t)"constructor"==a&&(e||!o.call(t,a))||s.push(a);return s}}),tj=h((t,e)=>{var i=tA(),n=tN(),r=tk();e.exports=function(t){return r(t)?i(t,!0):n(t)}}),tG=h((t,e)=>{var i=tD(),n=tj();e.exports=function(t){return i(t,n(t))}}),tZ=h((t,e)=>{var i=tr(),n=ta(),r=tu(),o=tp(),s=tm(),a=tv(),l=tL(),h=tM(),u=tw(),p=B(),c=S(),d=tC(),_=tS(),f=tB(),m=tG();e.exports=function(t,e,g,y,v,b,k){var M=f(t,g),x=f(e,g),w=k.get(x);if(w)return void i(t,g,w);var C=b?b(M,x,g+"",t,e,k):void 0,P=void 0===C;if(P){var E=l(x),T=!E&&u(x),S=!E&&!T&&_(x);C=x,E||T||S?l(M)?C=M:h(M)?C=o(M):T?(P=!1,C=n(x,!0)):S?(P=!1,C=r(x,!0)):C=[]:d(x)||a(x)?(C=M,a(M)?C=m(M):(!c(M)||p(M))&&(C=s(x))):P=!1}P&&(k.set(x,C),v(C,x,y,b,k),k.delete(x)),i(t,g,C)}}),tF=h((t,e)=>{var i=te(),n=tr(),r=ts(),o=tZ(),s=S(),a=tj(),l=tB();e.exports=function t(e,h,u,p,c){e!==h&&r(h,function(r,a){if(c||(c=new i),s(r))o(e,h,a,u,t,p,c);else{var d=p?p(l(e,a),r,a+"",e,h,c):void 0;void 0===d&&(d=r),n(e,a,d)}},a)}}),tU=h((t,e)=>{e.exports=function(t){return t}}),tV=h((t,e)=>{e.exports=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}}),tH=h((t,e)=>{var i=tV(),n=Math.max;e.exports=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=n(o.length-e,0),l=Array(a);++s{e.exports=function(t){return function(){return t}}}),tK=h((t,e)=>{var i=tq(),n=ti(),r=tU();e.exports=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:r}),tW=h((t,e)=>{var i=Date.now;e.exports=function(t){var e=0,n=0;return function(){var r=i(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}}),tY=h((t,e)=>{var i=tK();e.exports=tW()(i)}),tX=h((t,e)=>{var i=tU(),n=tH(),r=tY();e.exports=function(t,e){return r(n(t,e,i),t+"")}}),tJ=h((t,e)=>{var i=c(),n=tk(),r=tI(),o=S();e.exports=function(t,e,s){if(!o(s))return!1;var a=typeof e;return("number"==a?!!(n(s)&&r(e,s.length)):"string"==a&&e in s)&&i(s[e],t)}}),t$=h((t,e)=>{var i=tX(),n=tJ();e.exports=function(t){return i(function(e,i){var r=-1,o=i.length,s=o>1?i[o-1]:void 0,a=o>2?i[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&n(i[0],i[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++r{var i=tF();e.exports=t$()(function(t,e,n){i(t,e,n)})}),t0=h((t,e)=>{var i=T(),n=tg();e.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==i(t)}}),t1=h((t,e)=>{var i=tL(),n=t0(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(t,e){if(i(t))return!1;var s=typeof t;return!!("number"==s||"symbol"==s||"boolean"==s||null==t||n(t))||o.test(t)||!r.test(t)||null!=e&&t in Object(e)}}),t2=h((t,e)=>{var i=Q();function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=t.apply(this,i);return r.cache=o.set(n,s)||o,s};return r.cache=new(n.Cache||i),r}n.Cache=i,e.exports=n}),t3=h((t,e)=>{var i=t2();e.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}}),t4=h((t,e)=>{var i=t3(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g;e.exports=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n,function(t,i,n,o){e.push(n?o.replace(r,"$1"):i||t)}),e})}),t8=h((t,e)=>{e.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,r=Array(n);++i{var i=C(),n=t8(),r=tL(),o=t0(),s=1/0,a=i?i.prototype:void 0,l=a?a.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(r(e))return n(e,t)+"";if(o(e))return l?l.call(e):"";var i=e+"";return"0"==i&&1/e==-s?"-0":i}}),t6=h((t,e)=>{var i=t5();e.exports=function(t){return null==t?"":i(t)}}),t9=h((t,e)=>{var i=tL(),n=t1(),r=t4(),o=t6();e.exports=function(t,e){return i(t)?t:n(t,e)?[t]:r(o(t))}}),t7=h((t,e)=>{var i=t0(),n=1/0;e.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-n?"-0":e}}),et=h((t,e)=>{var i=t9(),n=t7();e.exports=function(t,e){e=i(e,t);for(var r=0,o=e.length;null!=t&&r{var i=et();e.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}}),ei=h((n,r)=>{var o,s;let a;o=n,s=function(){function t(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function e(t,e){return te)}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function n(t,e){r(t,0,t.children.length,e,t)}function r(t,e,i,n,r){r||(r=c(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s=e;s=t.minX&&e.maxY>=t.minY}function c(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,o,s){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var l=n+Math.ceil((r-n)/o/2)*o;(function e(i,n,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1),c=Math.max(r,Math.floor(n-l*u/a+p)),d=Math.min(o,Math.floor(n+(a-l)*u/a+p));e(i,n,c,d,s)}var _=i[n],f=r,m=o;for(t(i,r,n),s(i[o],_)>0&&t(i,r,o);fs(i[f],_);)f++;for(;s(i[m],_)>0;)m--}0===s(i[r],_)?t(i,r,m):t(i,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}})(i,l,n||0,r||i.length-1,s||e),a.push(n,l,l,r)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,i=[];if(!p(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var o=0;o=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},i.prototype._split=function(t,e){var i=t[e],r=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,r);var s=this._chooseSplitIndex(i,o,r),a=c(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,n(i,this.toBBox),n(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},i.prototype._splitRoot=function(t,e){this.data=c([t,e]),this.data.height=t.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,i){for(var n,o,s,a,h,u=1/0,p=1/0,c=e;c<=i-e;c++){var d=r(t,0,c,this.toBBox),_=r(t,c,i,this.toBBox),f=(o=void 0,s=void 0,a=void 0,o=Math.max(d.minX,_.minX),s=Math.max(d.minY,_.minY),Math.max(0,(a=Math.min(d.maxX,_.maxX))-o)*Math.max(0,Math.min(d.maxY,_.maxY)-s)),m=l(d)+l(_);f=e;d--){var _=t.children[d];o(l,t.leaf?s(_):_),u+=h(l)}return u},i.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)o(e[n],t)},i.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():n(t[e],this.toBBox)},i},"object"==typeof n&&"u">typeof r?r.exports=s():"function"==typeof define&&define.amd?void 0!==(a=s(t.r,i,e))&&t.v(a):(o=o||self).RBush=s()});Array.prototype.findIndex=Array.prototype.findIndex||function(t){if(this===null)throw TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],r=0;r>>0,n=arguments[1],r=0;r>>0;if(0===r)return!1;for(var o=0|e,s=Math.max(o>=0?o:r-Math.abs(o),0);s{if(0!==e.length){let i=Array.isArray(e)?ep(e):e;Array.isArray(i)?0!==i.length&&t.push(i):t.push(i)}return t},[])}function ec(t,e,i,n,r=!0){let o,s,a=[];for(let l=0;l1e-12;){x=Math.cos(2*f+k);let t=b*(w=Math.sin(k))*(x+b/4*((C=Math.cos(k))*(-1+2*x*x)-b/6*x*(-3+4*w*w)*(-3+4*x*x)));M=k,k=i/(r*v)+t}let P=_*w-d*C*p,E=Math.atan2(_*C+d*w*p,(1-o)*Math.sqrt(m*m+P*P)),T=o/16*g*(4+o*(4-3*g)),S=Math.atan2(w*u,d*C-_*w*p)-(1-T)*o*m*(k+T*w*(x+T*C*(-1+2*x*x)));return L.latLng(s+180*S/l,180*E/l)}(t,360*l/i+n,e),s=L.latLng(o.lng,o.lat);else{let n=t.lat+Math.cos(2*l*Math.PI/i)*e,r=t.lng+Math.sin(2*l*Math.PI/i)*e;s=L.latLng(n,r)}a.push(s)}return a}function ed(t,e,i){let n=t.latLngToContainerPoint(e),r=t.latLngToContainerPoint(i),o=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI+90;return o+360*(o<0)}function e_(t,e,i,n){let r=ed(t,e,i);return function(t,e,i){e=(e+360)%360;let n=Math.PI/180,r=180/Math.PI,{R:o}=L.CRS.Earth,s=t.lng*n,a=t.lat*n,l=e*n,h=Math.sin(a),u=Math.cos(a),p=Math.cos(i/o),c=Math.sin(i/o),d=Math.asin(h*p+u*c*Math.cos(l)),_=s+Math.atan2(Math.sin(l)*c*u,p-h*Math.sin(d)),f=(_*=r)-360,m=_<-180?_+360:_;return _=_>180?f:m,L.latLng([d*r,_])}(e,r,n)}function ef(t,e=t.getLatLngs()){return t instanceof L.Polygon?L.polygon(e).getLatLngs():L.polyline(e).getLatLngs()}function em(t,e){if(e.options.crs?.projection?.MAX_LATITUDE){let i=e.options.crs?.projection?.MAX_LATITUDE;t.lat=Math.max(Math.min(i,t.lat),-i)}return t}function eg(t){return t.options.renderer||t._map&&(t._map._getPaneRenderer(t.options.pane)||t._map.options.renderer||t._map._renderer)||t._renderer}var ey=L.Class.extend({includes:[{_globalEditModeEnabled:!1,enableGlobalEditMode(t){let e={...t};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(t=>{this._isRelevantForEdit(t)&&t.pm.enable(e)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(t=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(t)},handleLayerAdditionInGlobalEditMode(){let t=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let e in t){let i=t[e];this._isRelevantForEdit(i)&&i.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:t}){this._addedLayersEdit[L.stamp(t)]=t},_isRelevantForEdit:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowEditing},{_globalDragModeEnabled:!1,enableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},t.forEach(t=>{this._isRelevantForDrag(t)&&t.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,t.forEach(t=>{t.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let t=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let e in t){let i=t[e];this._isRelevantForDrag(i)&&i.pm.enableLayerDrag()}},_layerAddedDrag({layer:t}){this._addedLayersDrag[L.stamp(t)]=t},_isRelevantForDrag:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.draggable},{_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(t=>{this._isRelevantForRemoval(t)&&(t.pm.enabled()&&t.pm.disable(),t.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(t=>{t.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(t){let e=t.target;this._isRelevantForRemoval(e)&&!e.pm.dragging()&&(e.removeFrom(this.map.pm._getContainingLayer()),e.remove(),e instanceof L.LayerGroup?(this._fireRemoveLayerGroup(e),this._fireRemoveLayerGroup(this.map,e)):(e.pm._fireRemove(e),e.pm._fireRemove(this.map,e)))},_isRelevantForRemoval:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRemoval,handleLayerAdditionInGlobalRemovalMode(){let t=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:t}){this._addedLayersRemoval[L.stamp(t)]=t}},{_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{this._isRelevantForRotate(t)&&t.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{t.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate:t=>t.pm&&t instanceof L.Polyline&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRotation,handleLayerAdditionInGlobalRotateMode(){let t=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&i.pm.enableRotate()}},_layerAddedRotate({layer:t}){this._addedLayersRotate[L.stamp(t)]=t}},ea],initialize(t){this.map=t,this.Draw=new L.PM.Draw(t),this.Toolbar=new L.PM.Toolbar(t),this.Keyboard={_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(t){this.map=t,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),t.once("unload",this._unbindKeyListenerEvents,this)},_handleEscapeKey(t){let e=this.map.pm;return!!e.getGlobalOptions().exitModeOnEscape&&!!(e.globalDrawModeEnabled()||e.globalEditModeEnabled()||e.globalDragModeEnabled()||e.globalRemovalModeEnabled()||e.globalRotateModeEnabled()||e.globalCutModeEnabled())&&(t.preventDefault(),e.globalDrawModeEnabled()&&e.disableDraw(),e.globalEditModeEnabled()&&e.disableGlobalEditMode(),e.globalDragModeEnabled()&&e.disableGlobalDragMode(),e.globalRemovalModeEnabled()&&e.disableGlobalRemovalMode(),e.globalRotateModeEnabled()&&e.disableGlobalRotateMode(),e.globalCutModeEnabled()&&e.disableGlobalCutMode(),!0)},_handleEnterKey(t){let e=this.map.pm;if(!e.getGlobalOptions().finishOnEnter)return!1;let i=e.Draw.getActiveShape();if(!i)return!1;let n=e.Draw[i];return!!n&&!!n._finishShape&&!!this._canFinishShape(n,i)&&(t.preventDefault(),n._finishShape(),!0)},_canFinishShape(t,e){if(["Marker","CircleMarker","Text"].includes(e))return!1;if("Rectangle"===e)return void 0!==t._startMarker;if("Circle"===e)return t._centerMarker&&t._layerGroup?.hasLayer(t._centerMarker);if(t._layer&&t._layer.getLatLngs){let i=t._layer.getLatLngs();if("Line"===e)return(i.flat?i.flat():i).length>=2;if("Polygon"===e||"Cut"===e)return i.length>=3}return!1},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(t){let e="document";this.map.getContainer().contains(t.target)&&(e="map");let i={event:t,eventType:t.type,focusOn:e};this._lastEvents[t.type]=i,this._lastEvents.current=i,this.map.pm._fireKeyeventEvent(t,t.type,e),"keydown"===t.type&&("Escape"===t.key&&this._handleEscapeKey(t),"Enter"===t.key&&this._handleEnterKey(t))},_onBlur(t){t.altKey=!1;let e={event:t,eventType:t.type,focusOn:"document"};this._lastEvents[t.type]=e,this._lastEvents.current=e},getLastKeyEvent(t="current"){return this._lastEvents[t]},isShiftKeyPressed(){return this._lastEvents.current?.event.shiftKey},isAltKeyPressed(){return this._lastEvents.current?.event.altKey},isCtrlKeyPressed(){return this._lastEvents.current?.event.ctrlKey},isMetaKeyPressed(){return this._lastEvents.current?.event.metaKey},getPressedKey(){return this._lastEvents.current?.event.key}},this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0,exitModeOnEscape:!1,finishOnEnter:!1},this.Keyboard._initKeyListener(t)},setLang(t="en",e,i="en"){t=function(t,e){if(e[t=t.trim().toLowerCase()])return t;let i=t.replace(/[-_\s]/g,"_").match(/^([a-z]{2,3})(?:_([a-z]{2,3}))?$/);if(i){let t=[];for(let n of(i[2]&&t.push(`${i[1]}_${i[2]}`),t.push(i[1]),t))if(e[n])return n}return t}(t,eo);let n=L.PM.activeLang;e&&(eo[t]=(0,en.default)(eo[i],e)),L.PM.activeLang=t,this.map.pm.Toolbar.reinit(),this._fireLangChange(n,t,i,eo[t])},addControls(t){this.Toolbar.addControls(t)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(t="Polygon",e){"Poly"===t&&(t="Polygon"),this.Draw.enable(t,e)},disableDraw(t="Polygon"){"Poly"===t&&(t="Polygon"),this.Draw.disable(t)},setPathOptions(t,e={}){let i=e.ignoreShapes||[],n=e.merge||!1;this.map.pm.Draw.shapes.forEach(e=>{-1===i.indexOf(e)&&this.map.pm.Draw[e].setPathOptions(t,n)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(t){let e=(0,en.default)(this.globalOptions,t);e.editable&&(e.resizeableCircleMarker=e.editable,delete e.editable);let i=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!e.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),i=!0);let n=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!e.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),n=!0),this.map.pm.Draw.shapes.forEach(t=>{this.map.pm.Draw[t].setOptions(e)}),i&&this.map.pm.Draw.CircleMarker.enable(),n&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.setOptions(e)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=e,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.enabled()&&t.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(t){return this.Draw.Cut.enable(t)},toggleGlobalCutMode(t){return this.Draw.Cut.toggle(t)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(t=!1){let e=L.PM.Utils.findLayers(this.map);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},getGeomanDrawLayers(t=!1){let e=L.PM.Utils.findLayers(this.map).filter(t=>!0===t._drawnByGeoman);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(t){0===this._touchEventCounter&&(L.DomEvent.on(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(t){1===this._touchEventCounter&&(L.DomEvent.off(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(t){eg(this.map)._onMouseMove(this._createMouseEvent("mousemove",t))},_canvasTouchClick(t){let e="";"touchstart"===t.type||"pointerdown"===t.type?e="mousedown":("touchend"===t.type||"pointerup"===t.type||"touchcancel"===t.type||"pointercancel"===t.type)&&(e="mouseup"),e&&eg(this.map)._onClick(this._createMouseEvent(e,t))},_createMouseEvent(t,e){let i,n=e.touches[0]||e.changedTouches[0];try{i=new MouseEvent(t,{bubbles:e.bubbles,cancelable:e.cancelable,view:e.view,detail:n.detail,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,relatedTarget:e.relatedTarget})}catch{(i=document.createEvent("MouseEvents")).initMouseEvent(t,e.bubbles,e.cancelable,e.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}return i}}),ev=L.Control.extend({includes:[ea],options:{position:"topleft",disableByOtherButtons:!0},initialize(t){this._button=L.Util.extend({},this.options,t)},onAdd(t){return this._map=t,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):"edit"===this._button.tool?this._container=this._map.pm.Toolbar.editContainer:"options"===this._button.tool?this._container=this._map.pm.Toolbar.optionsContainer:"custom"===this._button.tool?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let t=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),t?t.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(t){return"boolean"==typeof t?this._button.toggleStatus=t:this._button.toggleStatus=!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(t){t&&t.preventDefault(),this._button.disabled||(this._button.onClick(t,{button:this,event:t}),this._clicked(t),this._button.afterClick(t,{button:this,event:t}))},_makeButton(t){let e=this.options.position.indexOf("right")>-1?"pos-right":"",i=L.DomUtil.create("div",`button-container ${e}`,this._container);t.title&&i.setAttribute("title",t.title);let n=L.DomUtil.create("a","leaflet-buttons-control-button",i);n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.href="#";let r=L.DomUtil.create("div",`leaflet-pm-actions-container ${e}`,i),o=t.actions,s={cancel:{text:eh("actions.cancel"),title:eh("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:eh("actions.finish"),title:eh("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:eh("actions.removeLastVertex"),title:eh("actions.removeLastVertex"),onClick(){this._map.pm.Draw[t.jsClass]._removeLastVertex()}},finish:{text:eh("actions.finish"),title:eh("actions.finish"),onClick(e){this._map.pm.Draw[t.jsClass]._finishShape(e)}}};t._preparedActions=o.map(i=>{let n="string"==typeof i?i:i.name,o;if(s[n])o=s[n];else{if(!i.text)return o;o=i}let a=L.DomUtil.create("a",`leaflet-pm-action ${e} action-${n}`,r);if(a.setAttribute("role","button"),a.setAttribute("tabindex","0"),a.href="#",o.title&&(a.title=o.title),a.innerHTML=o.text,L.DomEvent.disableClickPropagation(a),L.DomEvent.on(a,"click",L.DomEvent.stop),o._node=a,!t.disabled&&o.onClick){let e=e=>{e.preventDefault();let i="",{buttons:n}=this._map.pm.Toolbar;for(let e in n)if(n[e]._button===t){i=e;break}this._fireActionClick(o,i,t)};L.DomEvent.addListener(a,"click",e,this),L.DomEvent.addListener(a,"click",o.onClick,this),L.DomEvent.addListener(a,"click",()=>this._updateActiveAction(t))}return o}),this._updateActiveAction(t),t.toggleStatus&&L.DomUtil.addClass(i,"active");let a=L.DomUtil.create("div","control-icon",n);return t.iconUrl&&a.setAttribute("src",t.iconUrl),t.className&&L.DomUtil.addClass(a,t.className),L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"click",L.DomEvent.stop),t.disabled||(L.DomEvent.addListener(n,"click",this._onBtnClick,this),L.DomEvent.addListener(n,"click",this._triggerClick,this)),t.disabled&&(L.DomUtil.addClass(n,"pm-disabled"),n.setAttribute("aria-disabled","true")),i},_applyStyleClasses(){this._container&&(this._button.toggleStatus&&!1!==this._button.cssToggle?(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")):(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let t="",{buttons:e}=this._map.pm.Toolbar;for(let i in e)if(e[i]._button===this._button){t=i;break}this._fireButtonClick(t,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let t="pm-disabled",e=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(e,t),e.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(e,t),e.setAttribute("aria-disabled","false"))},_updateActiveAction(t){t._preparedActions?.forEach(t=>{t?._node&&(t.isActive&&t.isActive.call(this)?L.DomUtil.addClass(t._node,"active-action"):L.DomUtil.removeClass(t._node,"active-action"))})}});L.Control.PMButton=ev;var eL=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(t){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(t)},reinit(){let t=this.isVisible;this.removeControls(),this._defineButtons(),t&&this.addControls()},init(t){this.map=t,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(t){let e=`${t}Container`;return this[e]||(this[e]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${t} leaflet-bar leaflet-control`)),this[e]},getButtons(){return this.buttons},addControls(t=this.options){"u">typeof t.editPolygon&&(t.editMode=t.editPolygon),"u">typeof t.deleteLayer&&(t.removalMode=t.deleteLayer),L.Util.setOptions(this,t),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let t=this.getButtons(),e={drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"};for(let i in t){let n=t[i];L.Util.setOptions(n,{className:e[i]})}},removeControls(){let t=this.getButtons();for(let e in t)t[e].remove();this.isVisible=!1},deleteControl(t){let e=this._btnNameMapping(t);this.buttons[e]&&(this.buttons[e].remove(),delete this.buttons[e])},toggleControls(t=this.options){this.isVisible?this.removeControls():this.addControls(t)},_addButton(t,e){return this.buttons[t]=e,this.options[t]=!!this.options[t],this.buttons[t]},triggerClickOnToggledButtons(t){for(let e in this.buttons){let i=this.buttons[e];i._button.disableByOtherButtons&&i!==t&&i.toggled()&&i._triggerClick()}},toggleButton(t,e,i=!0){"editPolygon"===t&&(t="editMode"),"deleteLayer"===t&&(t="removalMode");let n=t;return i&&this.triggerClickOnToggledButtons(this.buttons[n]),!!this.buttons[n]&&this.buttons[n].toggle(e)},_defineButtons(){let t={className:"control-icon leaflet-pm-icon-marker",title:eh("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},e={title:eh("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={className:"control-icon leaflet-pm-icon-polyline",title:eh("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},n={title:eh("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},r={title:eh("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},o={title:eh("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:eh("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},a={title:eh("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},l={title:eh("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},h={title:eh("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},u={title:eh("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},p={className:"control-icon leaflet-pm-icon-text",title:eh("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(t)),this._addButton("drawPolyline",new L.Control.PMButton(i)),this._addButton("drawRectangle",new L.Control.PMButton(o)),this._addButton("drawPolygon",new L.Control.PMButton(e)),this._addButton("drawCircle",new L.Control.PMButton(n)),this._addButton("drawCircleMarker",new L.Control.PMButton(r)),this._addButton("drawText",new L.Control.PMButton(p)),this._addButton("editMode",new L.Control.PMButton(s)),this._addButton("dragMode",new L.Control.PMButton(a)),this._addButton("cutPolygon",new L.Control.PMButton(l)),this._addButton("removalMode",new L.Control.PMButton(h)),this._addButton("rotateMode",new L.Control.PMButton(u))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let t=this.getButtons(),e=[];for(let i in!1===this.options.drawControls&&(e=e.concat(Object.keys(t).filter(e=>!t[e]._button.tool))),!1===this.options.editControls&&(e=e.concat(Object.keys(t).filter(e=>"edit"===t[e]._button.tool))),!1===this.options.optionsControls&&(e=e.concat(Object.keys(t).filter(e=>"options"===t[e]._button.tool))),!1===this.options.customControls&&(e=e.concat(Object.keys(t).filter(e=>"custom"===t[e]._button.tool))),t)if(this.options[i]&&-1===e.indexOf(i)){let e=t[i]._button.tool;e||(e="draw"),t[i].setPosition(this._getBtnPosition(e)),t[i].addTo(this.map)}},_getBtnPosition(t){return this.options.positions&&this.options.positions[t]?this.options.positions[t]:this.options.position},setBlockPosition(t,e){this.options.positions[t]=e,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(t,e){if(e)"object"!=typeof e&&(e={name:e});else throw TypeError("Button has no name");let i=this._btnNameMapping(t);if(!e.name)throw TypeError("Button has no name");if(this.buttons[e.name])throw TypeError("Button with this name already exists");let n=this.map.pm.Draw.createNewDrawInstance(e.name,i);return e={...this.buttons[i]._button,...e},{drawInstance:n,control:this.createCustomControl(e)}},createCustomControl(t){if(!t.name)throw TypeError("Button has no name");if(this.buttons[t.name])throw TypeError("Button with this name already exists");t.onClick||(t.onClick=()=>{}),t.afterClick||(t.afterClick=()=>{}),!1!==t.toggle&&(t.toggle=!0),t.block&&(t.block=t.block.toLowerCase()),t.block&&"draw"!==t.block||(t.block=""),t.className?-1===t.className.indexOf("control-icon")&&(t.className=`control-icon ${t.className}`):t.className="control-icon";let e={tool:t.block,className:t.className,title:t.title||"",jsClass:t.name,onClick:t.onClick,afterClick:t.afterClick,doToggle:t.toggle,toggleStatus:!1,disableOtherButtons:t.disableOtherButtons??!0,disableByOtherButtons:t.disableByOtherButtons??!0,cssToggle:t.toggle,position:this.options.position,actions:t.actions||[],disabled:!!t.disabled};!1!==this.options[t.name]&&(this.options[t.name]=!0);let i=this._addButton(t.name,new L.Control.PMButton(e));return this.changeControlOrder(),i},controlExists(t){return!!this.getButton(t)},getButton(t){return this.getButtons()[t]},getButtonsInBlock(t){let e={};if(t)for(let i in this.getButtons()){let n=this.getButtons()[i];n._button.tool!==t&&("draw"!==t||n._button.tool)||(e[i]=n)}return e},changeControlOrder(t=[]){let e=this._shapeMapping(),i=[];t.forEach(t=>{e[t]?i.push(e[t]):i.push(t)});let n=this.getButtons(),r={};i.forEach(t=>{n[t]&&(r[t]=n[t])}),Object.keys(n).filter(t=>!n[t]._button.tool||"draw"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"edit"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"options"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"custom"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),this.map.pm.Toolbar.buttons=r,this._showHideButtons()},getControlOrder(){let t=this.getButtons(),e=[];for(let i in t)e.push(i);return e},changeActionsOfControl(t,e){let i=this._btnNameMapping(t);if(!i)throw TypeError("No name passed");if(!e)throw TypeError("No actions passed");if(!this.buttons[i])throw TypeError("Button with this name not exists");this.buttons[i]._button.actions=e,this.changeControlOrder()},setButtonDisabled(t,e){let i=this._btnNameMapping(t);e?this.buttons[i].disable():this.buttons[i].enable()},_shapeMapping:()=>({Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}),_btnNameMapping(t){let e=this._shapeMapping();return e[t]?e[t]:t}}),eb=u(tQ()),ek={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(t){t.forEach(t=>{Array.isArray(t)?this._assignEvents(t):(t.off("drag",this._handleSnapping,this),t.on("drag",this._handleSnapping,this),t.off("dragend",this._cleanupSnapping,this),t.on("dragend",this._cleanupSnapping,this))})},_cleanupSnapping(t){t&&(t.target._snapped=!1),delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(t=>{t.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(t,e=!1){let i,n,r=t.target;if(r._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),t?.originalEvent?.altKey||this._map?.pm?.Keyboard.isAltKeyPressed())return!1;if(e){if(!this._otherSnapLayers||0===this._otherSnapLayers.length)return!1;n=this._otherSnapLayers}else void 0===this._snapList&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),n=this._snapList;if(n.length<=0)return!1;let o=this._calcClosestLayer(r.getLatLng(),n);if(0===Object.keys(o).length)return!1;i=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment?o.latlng:this._checkPrioritiySnapping(o);let s=this.options.snapDistance,a={marker:r,shape:this._shape,snapLatLng:i,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(a.marker,a),this._fireSnapDrag(this._layer,a),o.distance{this._snapLatLng=i,this._fireSnap(r,a),this._fireSnap(this._layer,a)},e=this._snapLatLng||{},n=i||{};(e.lat!==n.lat||e.lng!==n.lng)&&t()}else this._snapLatLng&&(this._unsnap(a),r._snapped=!1,r._snapInfo=void 0,this._fireUnsnap(a.marker,a),this._fireUnsnap(this._layer,a));return!0},_createSnapList(){let t=[],e=[],i=this._map;i.off("layerremove",this._handleSnapLayerRemoval,this),i.on("layerremove",this._handleSnapLayerRemoval,this),i.eachLayer(i=>{if((i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&!0!==i.options.snapIgnore){if(void 0===i.options.snapIgnore&&(!L.PM.optIn&&!0===i.options.pmIgnore||L.PM.optIn&&!1!==i.options.pmIgnore))return;(i instanceof L.Circle||i instanceof L.CircleMarker)&&i.pm&&i.pm._hiddenPolyCircle?t.push(i.pm._hiddenPolyCircle):i instanceof L.ImageOverlay&&(i=L.rectangle(i.getBounds())),t.push(i);let n=L.polyline([],{color:"red",pmIgnore:!0});n._pmTempLayer=!0,e.push(n),(i instanceof L.Circle||i instanceof L.CircleMarker)&&e.push(n)}}),t=(t=(t=t.filter(t=>this._layer!==t)).filter(t=>t._latlng||t._latlngs&&eu(t._latlngs))).filter(t=>!t._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,e.push(t)}),this._snapList=t.concat(this._otherSnapLayers)):this._snapList=t,this.debugIndicatorLines=e},_handleSnapLayerRemoval({layer:t}){if(!t._leaflet_id)return;let e=this._snapList.findIndex(e=>e._leaflet_id===t._leaflet_id);e>-1&&this._snapList.splice(e,1)},_calcClosestLayer(t,e){return this._calcClosestLayers(t,e,1)[0]},_calcClosestLayers(t,e,i=1){let n=[],r={};e.forEach((e,o)=>{if(e._parentCopy&&e._parentCopy===this._layer||e.getLatLngs?.().flat(5).length<2)return;let s=this._calcLayerDistances(t,e);if(s.distance=Math.floor(s.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[o]){let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,this.debugIndicatorLines[o]=t}this.debugIndicatorLines[o].setLatLngs([t,s.latlng])}1===i&&(void 0===r.distance||s.distance-5<=r.distance)?(s.distance+5t.distance-e.distance)),-1===i&&(i=n.length);let o=this._getClosestLayerByPriority(n,i);return L.Util.isArray(o)?o:[o]},_calcLayerDistances(t,e){let i=this._map,n=e instanceof L.Marker||e instanceof L.CircleMarker,r=e instanceof L.Polygon;if(n){let n=e.getLatLng();return{latlng:{...n},distance:this._getDistance(i,n,t)}}return this._calcLatLngDistances(t,e.getLatLngs(),i,r)},_calcLatLngDistances(t,e,i,n=!1){let r,o,s,a=e=>{e.forEach((l,h)=>{if(Array.isArray(l))return void a(l);if(this.options.snapSegment){let r;r=n?h+1===e.length?0:h+1:h+1===e.length?void 0:h+1;let a=e[r];if(a){let e=this._getDistanceToSegment(i,t,l,a);(void 0===o||et._leaflet_id-e._leaflet_id);let i=this._map.pm.globalOptions.snappingOrder||[],n=0,r={};return i.concat(["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"]).forEach(t=>{r[t]||(n+=1,r[t]=n)}),t.sort(function(t,e,i="asc"){if(!e||0===Object.keys(e).length)return(t,e)=>t-e;let n=Object.keys(e),r,o=n.length-1,s={};for(;o>=0;)s[(r=n[o]).toLowerCase()]=e[r],o-=1;function a(t){return t instanceof L.Marker?"Marker":t instanceof L.Circle?"Circle":t instanceof L.CircleMarker?"CircleMarker":t instanceof L.Rectangle?"Rectangle":t instanceof L.Polygon?"Polygon":t instanceof L.Polyline?"Line":void 0}return(e,n)=>{let r,o;if("instanceofShape"===t){if(r=a(e.layer).toLowerCase(),o=a(n.layer).toLowerCase(),!r||!o)return 0}else{if(!e.hasOwnProperty(t)||!n.hasOwnProperty(t))return 0;r=e[t].toLowerCase(),o=n[t].toLowerCase()}let l=r in s?s[r]:Number.MAX_SAFE_INTEGER,h=o in s?s[o]:Number.MAX_SAFE_INTEGER,u=0;return lh&&(u=1),"desc"===i?-1*u:u}}("instanceofShape",r)),1===e?t[0]||{}:t.slice(0,e)},_checkPrioritiySnapping(t){let e=this._map,i=t.segment[0],n=t.segment[1],r=t.latlng,o=r;if(this.options.snapVertex){let t=this._getDistance(e,i,r),s=this._getDistance(e,n,r),a=tt.latLngToContainerPoint(e).distanceTo(t.latLngToContainerPoint(i))},eM=L.Class.extend({includes:[ek,ea],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(t){L.Util.setOptions(this,t),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(t){let e=new L.Icon.Default;e.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=e,this._map=t,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(t=>{this[t]=new L.PM.Draw[t](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(t,e=!1){e?this.options.pathOptions=(0,eb.default)(this.options.pathOptions,t):this.options.pathOptions=t},getShapes(){return this.shapes},getShape(){return this._shape},enable(t,e){if(!t)throw Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[t].enable(e)},disable(){this.shapes.forEach(t=>{this[t].disable()})},addControls(){this.shapes.forEach(t=>{this[t].addButton()})},getActiveShape(){let t;return this.shapes.forEach(e=>{this[e]._enabled&&(t=e)}),t},_setGlobalDrawMode(){"Cut"===this._shape?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let t=[];this._map.eachLayer(e=>{(e instanceof L.Polyline||e instanceof L.Marker||e instanceof L.Circle||e instanceof L.CircleMarker||e instanceof L.ImageOverlay)&&(e._pmTempLayer||t.push(e))}),this._enabled?t.forEach(t=>{L.PM.Utils.disablePopup(t)}):t.forEach(t=>{L.PM.Utils.enablePopup(t)})},createNewDrawInstance(t,e){let i=this._getShapeFromBtnName(e);if(this[t])throw TypeError("Draw Type already exists");if(!L.PM.Draw[i])throw TypeError(`There is no class L.PM.Draw.${i}`);return this[t]=new L.PM.Draw[i](this._map),this[t].toolbarButtonName=t,this[t]._shape=t,this.shapes.push(t),this[e]&&this[t].setOptions(this[e].options),this[t].setOptions(this[t].options),this[t]},_getShapeFromBtnName(t){let e={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return e[t]?e[t]:this[t]?this[t]._shape:t},_finishLayer(t){t.pm&&(t.pm.setOptions(this.options),t.pm._shape=this._shape,t.pm._map=this._map),this._addDrawnLayerProp(t)},_addDrawnLayerProp(t){t._drawnByGeoman=!0},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return 0===(this._map||this._layer._map).pm.getGeomanLayers().length}});eM.Marker=eM.extend({initialize(t){this._map=t,this._shape="Marker",this.toolbarButtonName="drawMarker",this._layerIsDragging=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._isTouchDevice=!(!window.matchMedia||!window.matchMedia("(pointer: coarse)").matches),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._isTouchDevice?(this._createTouchHint(),this._hintMarker=L.marker(this._map.getCenter(),{...this.options.markerStyle,opacity:0,interactive:!1}),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0):(this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.on("mousemove",this._syncHintMarker,this)),this._layer=this._hintMarker,this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._isTouchDevice?(this._removeTouchHint(),this._hintMarker=null):(this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this)),this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},isRelevantMarker:t=>t instanceof L.Marker&&t.pm&&!t._pmTempLayer&&!t.pm._initTextMarker,_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t)),this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(t){if(!t.latlng||this._layerIsDragging||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new L.Marker(e,this.options.markerStyle);this._setPane(i,"markerPane"),this._finishLayer(i),i.pm||(i.options.draggable=!1),i.addTo(this._map.pm._getContainingLayer()),i.pm&&this.options.markerEditable?i.pm.enable():i.dragging&&i.dragging.disable(),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){this.options.markerStyle?.icon&&this._hintMarker?.setIcon(this.options.markerStyle.icon)},_createTouchHint(){this.options.tooltips&&(this._touchHint=L.DomUtil.create("div","leaflet-pm-touch-hint"),this._touchHint.textContent=eh("tooltips.placeMarkerTouch"),this._map.getContainer().appendChild(this._touchHint))},_removeTouchHint(){this._touchHint&&this._touchHint.parentNode&&(this._touchHint.parentNode.removeChild(this._touchHint),this._touchHint=null)}});var ex={centimeters:0x25f96350,centimetres:0x25f96350,degrees:360/(2*Math.PI),feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,nauticalmiles:6371008.8/1852,radians:1,yards:6967335.223679999};function ew(t,e,i={}){let n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function eC(t,e,i={}){if(!t)throw Error("coordinates is required");if(!Array.isArray(t))throw Error("coordinates must be an Array");if(t.length<2)throw Error("coordinates must be at least 2 numbers long");if(!eB(t[0])||!eB(t[1]))throw Error("coordinates must contain numbers");return ew({type:"Point",coordinates:t},e,i)}function eP(t,e,i={}){if(t.length<2)throw Error("coordinates must be an array of two or more positions");return ew({type:"LineString",coordinates:t},e,i)}function eE(t,e={}){let i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function eT(t){return t%(2*Math.PI)*180/Math.PI}function eS(t){return t%360*Math.PI/180}function eB(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}var eO=function(t){let e,i,n={type:"FeatureCollection",features:[]};if("LineString"===(i="Feature"===t.type?t.geometry:t).type)e=[i.coordinates];else if("MultiLineString"===i.type)e=i.coordinates;else if("MultiPolygon"===i.type)e=[].concat(...i.coordinates);else if("Polygon"===i.type)e=i.coordinates;else throw Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return e.forEach(t=>{e.forEach(e=>{for(let i=0;i=0&&h<=1&&(d.onLine1=!0),u>=0&&u<=1&&(d.onLine2=!0),!!d.onLine1&&!!d.onLine2&&[d.x,d.y])}(t[i][0],t[i][1],t[i+1][0],t[i+1][1],e[r][0],e[r][1],e[r+1][0],e[r+1][1]);o&&n.features.push(eC([o[0],o[1]]))}})}),n};eM.Line=eM.extend({initialize(t){this._map=t,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.on(this.options.finishOn,this._finishShape,this),"dblclick"===this.options.finishOn&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintLine(){let t=this._layer.getLatLngs();if(t.length>0){let e=t[t.length-1];this._hintline.setLatLngs([e,this._hintMarker.getLatLng()])}},_syncHintMarker(t){(this._hintMarker.setLatLng(t.latlng),this.options.snappable)?(t.target=this._hintMarker,this._handleSnapping(t)):this._otherSnapLayers&&this._otherSnapLayers.length>0&&(t.target=this._hintMarker,this._handleSnapping(t,!0)),this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let e=this._layer._defaultShape().slice();e.push(this._hintMarker.getLatLng()),this._change(e)},hasSelfIntersection(){return eO(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(t,e){let i=L.polyline(this._layer.getLatLngs());t&&(e||(e=this._hintMarker.getLatLng()),i.addLatLng(e));let n=eO(i.toGeoJSON(15));this._doesSelfIntersect=n.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(n,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(t){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,t.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._layer.getLatLngs(),n=i[i.length-1];if(e.equals(i[0])||i.length>0&&e.equals(n))return void this._finishShape();this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:e,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(e);let r=this._createMarker(e);this._setTooltipText(),this._setHintLineAfterNewVertex(e),this._fireVertexAdded(r,void 0,e,"Draw"),this._change(this._layer.getLatLngs()),"snap"===this.options.finishOn&&this._hintMarker._snapped&&this._finishShape(t)},_setHintLineAfterNewVertex(t){this._hintline.setLatLngs([t,t])},_removeLastVertex(){let t=this._markers;if(t.length<=1)return void this.disable();let e=this._layer.getLatLngs(),i=t[t.length-1],{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(t,i);t.pop(),this._layerGroup.removeLayer(i);let r=t[t.length-1],o=e.indexOf(r.getLatLng());e=e.slice(0,o+1),this._layer.setLatLngs(e),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(i,n,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=1)return;let e=L.polyline(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this.options.snappable&&this._cleanupSnapping();let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),e.on("click",this._finishShape,this),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=t<=1?eh("tooltips.continueLine"):eh("tooltips.finishLine"),this._hintMarker.setTooltipContent(e)},_change(t){this._fireChange(t,"Draw")},setStyle(){this._layer?.setStyle(this.options.templineStyle),this._hintline?.setStyle(this.options.hintlineStyle)}}),eM.Polygon=eM.Line.extend({initialize(t){this._map=t,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(t){L.PM.Draw.Line.prototype.enable.call(this,t),this._layer.pm._shape="Polygon"},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),1===this._layer.getLatLngs().flat().length?(e.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(e)-1,this.options.snappable&&this._cleanupSnapping()):e.on("click",()=>1),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=t<=2?eh("tooltips.continueLine"):eh("tooltips.finishPoly"),this._hintMarker.setTooltipContent(e)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))}}),eM.Rectangle=eM.extend({initialize(t){this._map=t,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(t){if(L.Util.setOptions(this,t),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:+!!this.options.cursorMarker}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let t=0;t<2;t+=1){let t=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._styleMarkers.push(t)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeStartingMarkers(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(e),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(t=>{L.DomUtil.addClass(t._icon,"visible"),t.setLatLng(e)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(eh("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let t=this._startMarker.getLatLng();t&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([t,t]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t));let e=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(e,"Draw")},_syncRectangleSize(){let t=em(this._startMarker.getLatLng(),this._map),e=em(this._hintMarker.getLatLng(),this._map),i=L.PM.Utils._getRotatedRectangle(t,e,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(i),this.options.cursorMarker&&this._styleMarkers){let n=[];i.forEach(i=>{i.equals(t,1e-8)||i.equals(e,1e-8)||n.push(i)}),n.forEach((t,e)=>{try{this._styleMarkers[e].setLatLng(t)}catch{}})}},_findCorners(){let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.options.rectangleAngle||0,this._map)},_finishShape(t){t?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||i.equals(e))return;let n=L.rectangle([i,e],this.options.pathOptions);if(this.options.rectangleAngle){let t=L.PM.Utils._getRotatedRectangle(i,e,this.options.rectangleAngle||0,this._map);n.setLatLngs(t),n.pm&&n.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),this._fireCreate(n);let r=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(r))},setStyle(){this._layer?.setStyle(this.options.pathOptions)}}),eM.CircleMarker=eM.extend({initialize(t){this._map=t,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(t){if(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let t={};L.extend(t,this.options.templineStyle),t.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),t),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()})},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeCenterMarker(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let e=this._hintMarker.getLatLng();this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(eh("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i)},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t)),this._handleHintMarkerSnapping();let e=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(e,"Draw")},isRelevantMarker:t=>t instanceof L.CircleMarker&&!(t instanceof L.Circle)&&t.pm&&!t._pmTempLayer,_createMarker(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!t.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new this._BaseCircleClass(e,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(i),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(t){t.pm&&this.options.markerEditable&&t.pm.enable()},_finishShape(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;t?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(t.latlng);let e=this._centerMarker.getLatLng(),i=this._defaultRadius;if(this.options[this._editableOption]){let t=this._hintMarker.getLatLng();i=this._distanceCalculation(e,t),this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&(i=this.options[this._maxRadiusOption])}let n={...this.options.pathOptions,radius:i},r=new this._BaseCircleClass(e,n);this._setPane(r,"layerPane"),this._finishLayer(r),r.addTo(this._map.pm._getContainingLayer()),r.pm&&r.pm._updateHiddenPolyCircle(),this._fireCreate(r);let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_getNewDestinationOfHintMarker(){let t=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return t;let e=this._centerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&(t=e_(this._map,e,t,this._getMaxDistanceInMeter()))}return t},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){let t={};L.extend(t,this.options.templineStyle),this.options[this._editableOption]&&(t.radius=0),this._layer?.setStyle(t),this._hintline?.setStyle(this.options.hintlineStyle)},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))}}),eM.Circle=eM.CircleMarker.extend({initialize(t){this._map=t,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(t,e){return this._map.distance(t,e)}});var eD=class{constructor(t=[],e=eR){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;let t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:i}=this,n=e[t];for(;t>0;){let r=t-1>>1,o=e[r];if(i(n,o)>=0)break;e[t]=o,t=r}e[t]=n}_down(t){let{data:e,compare:i}=this,n=this.length>>1,r=e[t];for(;ti(e[s],o)&&(n=s,o=e[s]),i(o,r)>=0)break;e[t]=o,t=n}e[t]=r}};function eR(t,e){return te)}function eI(t,e){return t.p.x>e.p.x?1:t.p.xe.p.y?1:-1:1}function eA(t,e){return t.rightSweepEvent.p.x>e.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x0?(l.isLeftEndpoint=!0,a.isLeftEndpoint=!1):(a.isLeftEndpoint=!0,l.isLeftEndpoint=!1),e.push(a),e.push(l),r=o,eG+=1}}eN+=1}var eF=class{constructor(t){this.leftSweepEvent=t,this.rightSweepEvent=t.otherEvent}},eU=function(t,e){let i=new eD([],eI);return function(t,e){if("FeatureCollection"===t.type){let i=t.features;for(let t=0;t=0&&p<=1&&c>=0&&c<=1&&[i+p*(r-i),n+p*(o-n)]}(t,s);!1!==a&&i.push(a)}n.push(t)}else!1===r.isLeftEndpoint&&n.pop()}return i}(i,e)};function eV(t,e,i={}){let{removeDuplicates:n=!0,ignoreSelfIntersections:r=!0}=i,o=[];"FeatureCollection"===t.type?o=o.concat(t.features):"Feature"===t.type?o.push(t):("LineString"===t.type||"Polygon"===t.type||"MultiLineString"===t.type||"MultiPolygon"===t.type)&&o.push(ew(t)),"FeatureCollection"===e.type?o=o.concat(e.features):"Feature"===e.type?o.push(e):("LineString"===e.type||"Polygon"===e.type||"MultiLineString"===e.type||"MultiPolygon"===e.type)&&o.push(ew(e));let s=eU(eE(o),r),a=[];if(n){let t={};s.forEach(e=>{let i=e.join(",");t[i]||(t[i]=!0,a.push(e))})}else a=s;return eE(a.map(t=>eC(t)))}var eH=u(ei(),1);function eq(t,e,i){if(null!==t)for(var n,r,o,s,a,l,h,u,p=0,c=0,d=t.type,_="FeatureCollection"===d,f="Feature"===d,m=_?t.features.length:1,g=0;g{i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw Error("coord must be GeoJSON Point or an Array of numbers")}function eQ(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function e0(t){return"Feature"===t.type?t.geometry:t}function e1(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}function e2(t,e,i={}){var n=e$(t),r=e$(e),o=Math.pow(Math.sin(eS(r[1]-n[1])/2),2)+Math.pow(Math.sin(eS(r[0]-n[0])/2),2)*Math.cos(eS(n[1]))*Math.cos(eS(r[1]));return function(t,e="kilometers"){let i=ex[e];if(!i)throw Error(e+" units is invalid");return t*i}(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)),i.units)}var e3=Object.defineProperty,e4=Object.defineProperties,e8=Object.getOwnPropertyDescriptors,e5=Object.getOwnPropertySymbols,e6=Object.prototype.hasOwnProperty,e9=Object.prototype.propertyIsEnumerable,e7=(t,e,i)=>e in t?e3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,it=(t,e)=>{for(var i in e||(e={}))e6.call(e,i)&&e7(t,i,e[i]);if(e5)for(var i of e5(e))e9.call(e,i)&&e7(t,i,e[i]);return t},ie=(t,e)=>e4(t,e8(e));function ii(t,e){let[i,n,r]=t,[o,s,a]=e;return i*o+n*s+r*a}function ir(t,e){let[i,n,r]=t,[o,s,a]=e;return[n*a-r*s,r*o-i*a,i*s-n*o]}function io(t){let e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2));return[t[0]/e,t[1]/e,t[2]/e]}function is(t){let e=eS(t[1]),i=eS(t[0]);return[Math.cos(e)*Math.cos(i),Math.cos(e)*Math.sin(i),Math.sin(e)]}function ia(t,e){if(!t)throw Error("line is required");if(!e)throw Error("splitter is required");let i=e1(t),n=e1(e);if("LineString"!==i)throw Error("line must be LineString");if("FeatureCollection"===n)throw Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===n)throw Error("splitter cannot be a GeometryCollection");var r=function(t,e){if(!(null!==(i=e=e??{})&&"object"==typeof i&&!Array.isArray(i)))throw Error("options is invalid");var i,n=e.precision,r=e.coordinates,o=e.mutate;if(n=null==n||isNaN(n)?6:n,r=null==r||isNaN(r)?3:r,!t)throw Error(" is required");if("number"!=typeof n)throw Error(" must be a number");if("number"!=typeof r)throw Error(" must be a number");(!1===o||void 0===o)&&(t=JSON.parse(JSON.stringify(t)));var s=Math.pow(10,n);return eq(t,function(t){var e=t,i=s,n=r;e.length>n&&e.splice(n,e.length);for(var o=0;o{var i=t,n=e;let r=[],o=i.geometry;if(null!==o){switch(o.type){case"Polygon":r=eQ(o);break;case"LineString":r=[eQ(o)]}r.forEach(t=>{var e,r;let o;(e=t,r=i.properties,o=[],e.reduce((t,e)=>{var i,n;let s,a,l,h,u=eP([t,e],r);return i=t,n=e,s=i[0],a=i[1],u.bbox=[s<(l=n[0])?s:l,a<(h=n[1])?a:h,s>l?s:l,a>h?a:h],o.push(u),e}),o).forEach(t=>{t.id=n.length,n.push(t)})})}}),eE(e)}(t);l.load(h);var u=l.search(e);if(!u.features.length)return eE([t]);var p=iu(e,u),c=(i=function(t,i,n){var r=eQ(i)[1],s=e$(e);return n===p.id?(t.push(s),o.push(eP(t)),ip(s,r)?[s]:[s,r]):(t.push(r),t)},r=n=[s],eK(h,function(t,e){r=0===e&&void 0===n?t:i(r,t,e)}),r);return c.length>1&&o.push(eP(c)),eE(o)}function iu(t,e){if(!e.features.length)throw Error("lines must contain features");if(1===e.features.length)return e.features[0];var i,n=1/0;return eK(e,function(e){var r=function(t,e,i={}){if(!t||!e)throw Error("lines and inputPoint are required arguments");let n=e$(e),r=eC([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}),o=0,s=0,a=-1;return eW(t,function(t,l,h){a!==h&&(a=h,s=0);let u=eQ(t),p=u.length-2;for(let t=0;t0?[[...e],!0]:[[...i],!1];let a=ir(s,o);if(0===a[0]&&0===a[1]&&0===a[2])return[[...e],!0];let l=io(ir(a,s)),h=[-l[0],-l[1],-l[2]],u=ii(o,l)>ii(o,h)?l:h,p=io(s),c=ii(ir(n,u),p),d=ii(ir(u,r),p);return c>=0&&d>=0?[function(t){let[e,i,n]=t,r=eT(Math.asin(Math.min(Math.max(n,-1),1)));return[eT(Math.atan2(i,e)),r]}(u),!1]:ii(n,o)>ii(r,o)?[[...t],!1]:[[...e],!0]}(l,d,n);let g=e2(e,f,i);if(gh==u>-h?(o=h,h=e[++p]):(o=u,u=n[++c]);let d=0;if(ph==u>-h?(s=h+o,a=o-(s-h),h=e[++p]):(s=u+o,a=o-(s-u),u=n[++c]),o=s,0!==a&&(r[d++]=a);ph==u>-h?(l=(s=o+h)-o,a=o-(s-l)+(h-l),h=e[++p]):(l=(s=o+u)-o,a=o-(s-l)+(u-l),u=n[++c]),o=s,0!==a&&(r[d++]=a);for(;p=h[0]&&u[3]>=h[1]))return!1;"Polygon"===o&&(a=[a]);let l=!1;for(var h,u,p=0;p=0||o<=0&&a>=0)return 0}else if(l>=0&&s<=0||l<=0&&s>=0){if(0===(r=function(t,e,i,n,r,o){let s=(e-0)*(i-0),a=(t-0)*(n-0),l=s-a,h=Math.abs(s+a);return Math.abs(l)>=im*h?l:-function(t,e,i,n,r,o,s){let a,l,h,u,p,c,d,_,f,m,g,y,v,b,k,M,x,w,C=t-0,P=i-0,E=e-0,T=n-0;b=C*T,d=(c=0x8000001*C)-(c-C),_=C-d,f=(c=0x8000001*T)-(c-T),k=_*(m=T-f)-(b-d*f-_*f-d*m),M=E*P,d=(c=0x8000001*E)-(c-E),_=E-d,f=(c=0x8000001*P)-(c-P),g=k-(x=_*(m=P-f)-(M-d*f-_*f-d*m)),p=k-g,iv[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iv[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iv[2]=y-(w-p)+(g-p),iv[3]=w;let S=function(t,e){let i=e[0];for(let t=1;t<4;t++)i+=e[t];return i}(0,iv),B=ig*s;if(S>=B||-S>=B||(p=t-C,a=t-(C+p)+(p-0),p=i-P,h=i-(P+p)+(p-0),p=e-E,l=e-(E+p)+(p-0),p=n-T,u=n-(T+p)+(p-0),0===a&&0===l&&0===h&&0===u)||(B=iy*s+ic*Math.abs(S),(S+=C*u+T*a-(E*h+P*l))>=B||-S>=B))return S;b=a*T,d=(c=0x8000001*a)-(c-a),_=a-d,f=(c=0x8000001*T)-(c-T),k=_*(m=T-f)-(b-d*f-_*f-d*m),M=l*P,d=(c=0x8000001*l)-(c-l),_=l-d,f=(c=0x8000001*P)-(c-P),g=k-(x=_*(m=P-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let O=id(4,iv,4,iM,iL);b=C*u,d=(c=0x8000001*C)-(c-C),_=C-d,f=(c=0x8000001*u)-(c-u),k=_*(m=u-f)-(b-d*f-_*f-d*m),M=E*h,d=(c=0x8000001*E)-(c-E),_=E-d,f=(c=0x8000001*h)-(c-h),g=k-(x=_*(m=h-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let D=id(O,iL,4,iM,ib);b=a*u,d=(c=0x8000001*a)-(c-a),_=a-d,f=(c=0x8000001*u)-(c-u),k=_*(m=u-f)-(b-d*f-_*f-d*m),M=l*h,d=(c=0x8000001*l)-(c-l),_=l-d,f=(c=0x8000001*h)-(c-h),g=k-(x=_*(m=h-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let R=id(D,ib,4,iM,ik);return ik[R-1]}(t,e,i,n,0,0,h)}(o,a,s,l,0,0)))return 0;(r>0&&l>0&&s<=0||r<0&&l<=0&&s>0)&&p++}h=u,s=l,o=a}}return p%2!=0}(n,a[p]);if(0===t)return!i.ignoreBoundary;t&&(l=!0)}return l}function iw(t,e,i={}){let n=e$(t),r=eQ(e);for(let t=0;tr)return!1}else if(0!==f)return!1;return Math.abs(d)===Math.abs(_)&&0===Math.abs(d)?!n&&i[0]===t[0]&&i[1]===t[1]:n?"start"===n?Math.abs(d)>=Math.abs(_)?d>0?a0?l=Math.abs(_)?d>0?a<=o&&o0?l<=s&&s=Math.abs(_)?d>0?a0?l=Math.abs(_)?d>0?a<=o&&o<=h:h<=o&&o<=a:_>0?l<=s&&s<=u:u<=s&&s<=l}(r[t],r[t+1],n,e,typeof i.epsilon>"u"?null:i.epsilon))return!0}return!1}function iC(t,e){if("Feature"===t.type&&null===t.geometry||"Feature"===e.type&&null===e.geometry||!iP(eY(t),eY(e)))return!1;for(let i of e0(e).coordinates)for(let e of i)if(!ix(e,t))return!1;return!0}function iP(t,e){return!(t[0]>e[0]||t[2]e[1]||t[3]iC(M,{type:"Polygon",coordinates:t}));default:throw Error("feature2 "+o+" geometry not supported")}case"MultiPolygon":if("Polygon"===o){return l=i,h=n,l.coordinates.some(t=>iC({type:"Polygon",coordinates:t},h))}throw Error("feature2 "+o+" geometry not supported");default:throw Error("feature1 "+r+" geometry not supported")}},iS=u(ee()),iB=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,iO=Math.ceil,iD=Math.floor,iR="[BigNumber Error] ",iI=iR+"Number primitive has more than 15 significant digits: ",iA=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function iz(t){var e=0|t;return t>0||t===e?e:e-1}function iN(t){for(var e,i,n=1,r=t.length,o=t[0]+"";nh^i?1:-1;for(a=(l=r.length)<(h=o.length)?l:h,s=0;so[s]^i?1:-1;return l==h?0:l>h^i?1:-1}function iG(t,e,i,n){if(ti||t!==iD(t))throw Error(iR+(n||"Argument")+("number"==typeof t?ti?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function iZ(t){var e=t.c.length-1;return iz(t.e/14)==e&&t.c[e]%2!=0}function iF(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function iU(t,e,i){var n,r;if(e<0){for(r=i+".";++e;r+=i);t=r+t}else if(n=t.length,++e>n){for(r=i,e-=n;--e;r+=i);t+=r}else ey?c.c=c.e=null:t.e=10;s/=10,o++);o>y?c.c=c.e=null:(c.e=o,c.c=[t]);return}p=String(t)}else{if(!iB.test(p=String(t)))return u(c,p,a);c.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(o=p.indexOf("."))>-1&&(p=p.replace(".","")),(s=p.search(/e/i))>0?(o<0&&(o=s),o+=+p.slice(s+1),p=p.substring(0,s)):o<0&&(o=p.length)}else{if(iG(e,2,x.length,"Base"),10==e&&w)return S(c=new C(t),d+c.e+1,_);if(p=String(t),a="number"==typeof t){if(0*t!=0)return u(c,p,a,e);if(c.s=1/t<0?(p=p.slice(1),-1):1,C.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(iI+t)}else c.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(i=x.slice(0,e),o=s=0,l=p.length;si.indexOf(n=p.charAt(s))){if("."==n){if(s>o){o=l;continue}}else if(!r&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){r=!0,s=-1,o=0;continue}return u(c,String(t),a,e)}a=!1,(o=(p=h(p,e,10,c.s)).indexOf("."))>-1?p=p.replace(".",""):o=p.length}for(s=0;48===p.charCodeAt(s);s++);for(l=p.length;48===p.charCodeAt(--l););if(p=p.slice(s,++l)){if(l-=s,a&&C.DEBUG&&l>15&&(t>0x1fffffffffffff||t!==iD(t)))throw Error(iI+c.s*t);if((o=o-s-1)>y)c.c=c.e=null;else if(o=m)?iF(l,s):iU(l,s,"0");else if(o=(t=S(new C(t),e,i)).e,a=(l=iN(t.c)).length,1==n||2==n&&(e<=o||o<=f)){for(;as),l=iU(l,o,"0"),o+1>a){if(--e>0)for(l+=".";e--;l+="0");}else if((e+=o-a)>0)for(o+1==a&&(l+=".");e--;l+="0");return t.s<0&&r?"-"+l:l}function E(t,e){for(var i,n,r=1,o=new C(t[0]);r=10;r/=10,n++);return(i=n+14*i-1)>y?t.c=t.e=null:i=10;a/=10,r++);if((o=e-r)<0)o+=14,s=e,u=iD((l=p[h=0])/iA[r-s-1]%10);else if((h=iO((o+1)/14))>=p.length)if(n){for(;p.length<=h;p.push(0));l=u=0,r=1,o%=14,s=o-14+1}else break t;else{for(l=a=p[h],r=1;a>=10;a/=10,r++);o%=14,u=(s=o-14+r)<0?0:iD(l/iA[r-s-1]%10)}if(n=n||e<0||null!=p[h+1]||(s<0?l:l%iA[r-s-1]),n=i<4?(u||n)&&(0==i||i==(t.s<0?3:2)):u>5||5==u&&(4==i||n||6==i&&(o>0?s>0?l/iA[r-s]:0:p[h-1])%10&1||i==(t.s<0?8:7)),e<1||!p[0])return p.length=0,n?(e-=t.e+1,p[0]=iA[(14-e%14)%14],t.e=-e||0):p[0]=t.e=0,t;if(0==o?(p.length=h,a=1,h--):(p.length=h+1,a=iA[14-o],p[h]=s>0?iD(l/iA[r-s]%iA[s])*a:0),n)for(;;)if(0==h){for(o=1,s=p[0];s>=10;s/=10,o++);for(s=p[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,1e14==p[0]&&(p[0]=1));break}else{if(p[h]+=a,1e14!=p[h])break;p[h--]=0,a=1}for(o=p.length;0===p[--o];p.pop());}t.e>y?t.c=t.e=null:t.e=m?iF(e,i):iU(e,i,"0"),t.s<0?"-"+e:e)}return C.clone=t,C.ROUND_UP=0,C.ROUND_DOWN=1,C.ROUND_CEIL=2,C.ROUND_FLOOR=3,C.ROUND_HALF_UP=4,C.ROUND_HALF_DOWN=5,C.ROUND_HALF_EVEN=6,C.ROUND_HALF_CEIL=7,C.ROUND_HALF_FLOOR=8,C.EUCLID=9,C.config=C.set=function(t){var e,i;if(null!=t)if("object"==typeof t){if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(iG(i=t[e],0,1e9,e),d=i),t.hasOwnProperty(e="ROUNDING_MODE")&&(iG(i=t[e],0,8,e),_=i),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((i=t[e])&&i.pop?(iG(i[0],-1e9,0,e),iG(i[1],0,1e9,e),f=i[0],m=i[1]):(iG(i,-1e9,1e9,e),f=-(m=i<0?-i:i))),t.hasOwnProperty(e="RANGE"))if((i=t[e])&&i.pop)iG(i[0],-1e9,-1,e),iG(i[1],1,1e9,e),g=i[0],y=i[1];else if(iG(i,-1e9,1e9,e),i)g=-(y=i<0?-i:i);else throw Error(iR+e+" cannot be zero: "+i);if(t.hasOwnProperty(e="CRYPTO"))if(!!(i=t[e])===i)if(i)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))v=i;else throw v=!i,Error(iR+"crypto unavailable");else v=i;else throw Error(iR+e+" not true or false: "+i);if(t.hasOwnProperty(e="MODULO_MODE")&&(iG(i=t[e],0,9,e),b=i),t.hasOwnProperty(e="POW_PRECISION")&&(iG(i=t[e],0,1e9,e),k=i),t.hasOwnProperty(e="FORMAT"))if("object"==typeof(i=t[e]))M=i;else throw Error(iR+e+" not an object: "+i);if(t.hasOwnProperty(e="ALPHABET"))if("string"!=typeof(i=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(i))throw Error(iR+e+" invalid: "+i);else w="0123456789"==i.slice(0,10),x=i}else throw Error(iR+"Object expected: "+t);return{DECIMAL_PLACES:d,ROUNDING_MODE:_,EXPONENTIAL_AT:[f,m],RANGE:[g,y],CRYPTO:v,MODULO_MODE:b,POW_PRECISION:k,FORMAT:M,ALPHABET:x}},C.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!C.DEBUG)return!0;var e,i,n=t.c,r=t.e,o=t.s;t:if("[object Array]"==({}).toString.call(n)){if((1===o||-1===o)&&r>=-1e9&&r<=1e9&&r===iD(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break t}if((e=(r+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e=1e14||i!==iD(i))break t;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===o||1===o||-1===o))return!0;throw Error(iR+"Invalid BigNumber: "+t)},C.maximum=C.max=function(){return E(arguments,-1)},C.minimum=C.min=function(){return E(arguments,1)},i=0x20000000000000*Math.random()&2097151?function(){return iD(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},C.random=function(t){var e,n,r,o,s,a=0,l=[],h=new C(c);if(null==t?t=d:iG(t,0,1e9),o=iO(t/14),v)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(o*=2));a>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[a]=n[0],e[a+1]=n[1]):(l.push(s%1e14),a+=2);a=o/2}else if(crypto.randomBytes){for(e=crypto.randomBytes(o*=7);a=9e15?crypto.randomBytes(7).copy(e,a):(l.push(s%1e14),a+=7);a=o/7}else throw v=!1,Error(iR+"crypto unavailable");if(!v)for(;a=10;s/=10,a++);a<14&&(r-=14-a)}return h.e=r,h.c=l,h},C.sum=function(){for(var t=1,e=arguments,i=new C(e[0]);ti-1&&(null==s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/i|0,s[r]%=i)}return s.reverse()}return function(i,n,r,o,s){var a,h,u,p,c,f,m,g,y=i.indexOf("."),v=d,b=_;for(y>=0&&(p=k,k=0,i=i.replace(".",""),f=(g=new C(n)).pow(i.length-y),k=p,g.c=e(iU(iN(f.c),f.e,"0"),10,r,t),g.e=g.c.length),u=p=(m=e(i,n,r,s?(a=x,t):(a=t,x))).length;0==m[--p];m.pop());if(!m[0])return a.charAt(0);if(y<0?--u:(f.c=m,f.e=u,f.s=o,m=(f=l(f,g,v,b,r)).c,c=f.r,u=f.e),y=m[h=u+v+1],p=r/2,c=c||h<0||null!=m[h+1],c=b<4?(null!=y||c)&&(0==b||b==(f.s<0?3:2)):y>p||y==p&&(4==b||c||6==b&&1&m[h-1]||b==(f.s<0?8:7)),h<1||!m[0])i=c?iU(a.charAt(1),-v,a.charAt(0)):a.charAt(0);else{if(m.length=h,c)for(--r;++m[--h]>r;)m[h]=0,h||(++u,m=[1].concat(m));for(p=m.length;!m[--p];);for(y=0,i="";y<=p;i+=a.charAt(m[y++]));i=iU(i,u,a.charAt(0))}return i}}(),l=function(){function t(t,e,i){var n,r,o,s,a=0,l=t.length,h=e%1e7,u=e/1e7|0;for(t=t.slice();l--;)n=u*(o=t[l]%1e7)+(s=t[l]/1e7|0)*h,a=((r=h*o+n%1e7*1e7+a)/i|0)+(n/1e7|0)+u*s,t[l]=r%i;return a&&(t=[a].concat(t)),t}function e(t,e,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;re[r]?1:-1;break}return o}function i(t,e,i,n){for(var r=0;i--;)t[i]-=r,r=+(t[i]1;t.splice(0,1));}return function(n,r,o,s,a){var l,h,u,p,c,d,_,f,m,g,y,v,b,k,M,x,w,P=n.s==r.s?1:-1,E=n.c,T=r.c;if(!E||!E[0]||!T||!T[0])return new C(!n.s||!r.s||(E?T&&E[0]==T[0]:!T)?NaN:E&&0==E[0]||!T?0*P:P/0);for(m=(f=new C(P)).c=[],P=o+(h=n.e-r.e)+1,a||(a=1e14,h=iz(n.e/14)-iz(r.e/14),P=P/14|0),u=0;T[u]==(E[u]||0);u++);if(T[u]>(E[u]||0)&&h--,P<0)m.push(1),p=!0;else{for(k=E.length,x=T.length,u=0,P+=2,(c=iD(a/(T[0]+1)))>1&&(T=t(T,c,a),E=t(E,c,a),x=T.length,k=E.length),b=x,y=(g=E.slice(0,x)).length;y=a/2&&M++;do{if(c=0,(l=e(T,g,x,y))<0){if(v=g[0],x!=y&&(v=v*a+(g[1]||0)),(c=iD(v/M))>1)for(c>=a&&(c=a-1),_=(d=t(T,c,a)).length,y=g.length;1==e(d,g,_,y);)c--,i(d,x<_?w:T,_,a),_=d.length,l=1;else 0==c&&(l=c=1),_=(d=T.slice()).length;if(_e(T,g,x,y);)c++,i(g,x=10;P/=10,u++);S(f,o+(f.e=u+14*h-1)+1,s,p)}else f.e=h,f.r=+p;return f}}(),n=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,o=/^\.([^.]+)$/,s=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g,u=function(t,e,i,l){var h,u=i?e:e.replace(a,"");if(s.test(u))t.s=isNaN(u)?null:u<0?-1:1;else{if(!i&&(u=u.replace(n,function(t,e,i){return h="x"==(i=i.toLowerCase())?16:"b"==i?2:8,l&&l!=h?t:e}),l&&(h=l,u=u.replace(r,"$1").replace(o,"0.$1")),e!=u))return new C(u,h);if(C.DEBUG)throw Error(iR+"Not a"+(l?" base "+l:"")+" number: "+e);t.s=null}t.c=t.e=null},p.absoluteValue=p.abs=function(){var t=new C(this);return t.s<0&&(t.s=1),t},p.comparedTo=function(t,e){return ij(this,new C(t,e))},p.decimalPlaces=p.dp=function(t,e){var i,n,r;if(null!=t)return iG(t,0,1e9),null==e?e=_:iG(e,0,8),S(new C(this),t+this.e+1,e);if(!(i=this.c))return null;if(n=((r=i.length-1)-iz(this.e/14))*14,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},p.dividedBy=p.div=function(t,e){return l(this,new C(t,e),d,_)},p.dividedToIntegerBy=p.idiv=function(t,e){return l(this,new C(t,e),0,1)},p.exponentiatedBy=p.pow=function(t,e){var i,n,r,o,s,a,l,h,u,p=this;if((t=new C(t)).c&&!t.isInteger())throw Error(iR+"Exponent not an integer: "+B(t));if(null!=e&&(e=new C(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return u=new C(Math.pow(+B(p),a?t.s*(2-iZ(t)):+B(t))),e?u.mod(e):u;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new C(NaN);(n=!l&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&iZ(t)?-0:0,p.e>-1&&(o=1/o),new C(l?1/o:o);k&&(o=iO(k/14+2))}for(a?(i=new C(.5),l&&(t.s=1),h=iZ(t)):h=(r=Math.abs(+B(t)))%2,u=new C(c);;){if(h){if(!(u=u.times(p)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(e))}if(r){if(0===(r=iD(r/2)))break;h=r%2}else if(S(t=t.times(i),t.e+1,1),t.e>14)h=iZ(t);else{if(0==(r=+B(t)))break;h=r%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?u:(l&&(u=c.div(u)),e?u.mod(e):o?S(u,k,_,s):u)},p.integerValue=function(t){var e=new C(this);return null==t?t=_:iG(t,0,8),S(e,e.e+1,t)},p.isEqualTo=p.eq=function(t,e){return 0===ij(this,new C(t,e))},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(t,e){return ij(this,new C(t,e))>0},p.isGreaterThanOrEqualTo=p.gte=function(t,e){return 1===(e=ij(this,new C(t,e)))||0===e},p.isInteger=function(){return!!this.c&&iz(this.e/14)>this.c.length-2},p.isLessThan=p.lt=function(t,e){return 0>ij(this,new C(t,e))},p.isLessThanOrEqualTo=p.lte=function(t,e){return -1===(e=ij(this,new C(t,e)))||0===e},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&0==this.c[0]},p.minus=function(t,e){var i,n,r,o,s=this.s;if(e=(t=new C(t,e)).s,!s||!e)return new C(NaN);if(s!=e)return t.s=-e,this.plus(t);var a=this.e/14,l=t.e/14,h=this.c,u=t.c;if(!a||!l){if(!h||!u)return h?(t.s=-e,t):new C(u?this:NaN);if(!h[0]||!u[0])return u[0]?(t.s=-e,t):new C(h[0]?this:3==_?-0:0)}if(a=iz(a),l=iz(l),h=h.slice(),s=a-l){for((o=s<0)?(s=-s,r=h):(l=a,r=u),r.reverse(),e=s;e--;r.push(0));r.reverse()}else for(n=(o=(s=h.length)<(e=u.length))?s:e,s=e=0;e0)for(;e--;h[i++]=0);for(e=1e14-1;n>s;){if(h[--n]=0;){for(i=0,c=m[r]%1e7,d=m[r]/1e7|0,o=r+(s=l);o>r;)a=d*(h=f[--s]%1e7)+(u=f[s]/1e7|0)*c,i=((h=c*h+a%1e7*1e7+_[o]+i)/1e14|0)+(a/1e7|0)+d*u,_[o--]=h%1e14;_[o]=i}return i?++n:_.splice(0,1),T(t,_,n)},p.negated=function(){var t=new C(this);return t.s=-t.s||null,t},p.plus=function(t,e){var i,n=this.s;if(e=(t=new C(t,e)).s,!n||!e)return new C(NaN);if(n!=e)return t.s=-e,this.minus(t);var r=this.e/14,o=t.e/14,s=this.c,a=t.c;if(!r||!o){if(!s||!a)return new C(n/0);if(!s[0]||!a[0])return a[0]?t:new C(s[0]?this:0*n)}if(r=iz(r),o=iz(o),s=s.slice(),n=r-o){for(n>0?(o=r,i=a):(n=-n,i=s),i.reverse();n--;i.push(0));i.reverse()}for((n=s.length)-(e=a.length)<0&&(i=a,a=s,s=i,e=n),n=0;e;)n=(s[--e]=s[e]+a[e]+n)/1e14|0,s[e]=1e14===s[e]?0:s[e]%1e14;return n&&(s=[n].concat(s),++o),T(t,s,o)},p.precision=p.sd=function(t,e){var i,n,r;if(null!=t&&!!t!==t)return iG(t,1,1e9),null==e?e=_:iG(e,0,8),S(new C(this),t,e);if(!(i=this.c))return null;if(n=14*(r=i.length-1)+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return t&&this.e+1>n&&(n=this.e+1),n},p.shiftedBy=function(t){return iG(t,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+t)},p.squareRoot=p.sqrt=function(){var t,e,i,n,r,o=this.c,s=this.s,a=this.e,h=d+4,u=new C("0.5");if(1!==s||!o||!o[0])return new C(!s||s<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(s=Math.sqrt(+B(this)))||s==1/0?(((e=iN(o)).length+a)%2==0&&(e+="0"),s=Math.sqrt(+e),a=iz((a+1)/2)-(a<0||a%2),i=new C(e=s==1/0?"5e"+a:(e=s.toExponential()).slice(0,e.indexOf("e")+1)+a)):i=new C(s+""),i.c[0]){for((s=(a=i.e)+h)<3&&(s=0);;)if(r=i,i=u.times(r.plus(l(this,r,h,1))),iN(r.c).slice(0,s)===(e=iN(i.c)).slice(0,s))if(i.e0&&d>0){for(r=d%s||s,h=c.substr(0,r);r0&&(h+=l+c.slice(r)),p&&(h="-"+h)}n=u?h+(i.decimalSeparator||"")+((a=+i.fractionGroupSize)?u.replace(RegExp("\\d{"+a+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):u):h}return(i.prefix||"")+n+(i.suffix||"")},p.toFraction=function(t){var e,i,n,r,o,s,a,h,u,p,d,f,m=this.c;if(null!=t&&(!(a=new C(t)).isInteger()&&(a.c||1!==a.s)||a.lt(c)))throw Error(iR+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+B(a));if(!m)return new C(this);for(e=new C(c),u=i=new C(c),n=h=new C(c),f=iN(m),o=e.e=f.length-this.e-1,e.c[0]=iA[(s=o%14)<0?14+s:s],t=!t||a.comparedTo(e)>0?o>0?e:u:a,s=y,y=1/0,a=new C(f),h.c[0]=0;p=l(a,e,0,1),1!=(r=i.plus(p.times(n))).comparedTo(t);)i=n,n=r,u=h.plus(p.times(r=u)),h=r,e=a.minus(p.times(r=e)),a=r;return r=l(t.minus(i),n,0,1),h=h.plus(r.times(u)),i=i.plus(r.times(n)),h.s=u.s=this.s,o*=2,d=1>l(u,n,o,_).minus(this).abs().comparedTo(l(h,i,o,_).minus(this).abs())?[u,n]:[h,i],y=s,d},p.toNumber=function(){return+B(this)},p.toPrecision=function(t,e){return null!=t&&iG(t,1,1e9),P(this,t,e,2)},p.toString=function(t){var e,i=this,n=i.s,r=i.e;return null===r?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==t?e=r<=f||r>=m?iF(iN(i.c),r):iU(iN(i.c),r,"0"):10===t&&w?e=iU(iN((i=S(new C(i),d+r+1,_)).c),i.e,"0"):(iG(t,2,x.length,"Base"),e=h(iU(iN(i.c),r,"0"),10,t,n,!0)),n<0&&i.c[0]&&(e="-"+e)),e},p.valueOf=p.toJSON=function(){return B(this)},p._isBigNumber=!0,p[Symbol.toStringTag]="BigNumber",p[Symbol.for("nodejs.util.inspect.custom")]=p.valueOf,null!=e&&C.set(e),C}(),iH=class{key;left=null;right=null;constructor(t){this.key=t}},iq=class extends iH{constructor(t){super(t)}},iK=class{size=0;modificationCount=0;splayCount=0;splay(t){let e=this.root;if(null==e)return this.compare(t,t),-1;let i=null,n=null,r=null,o=null,s=e,a=this.compare,l;for(;;)if((l=a(s.key,t))>0){let e=s.left;if(null==e||(l=a(e.key,t))>0&&(s.left=e.right,e.right=s,null==(e=(s=e).left)))break;null==i?n=s:i.left=s,i=s,s=e}else if(l<0){let e=s.right;if(null==e||(l=a(e.key,t))<0&&(s.right=e.left,e.left=s,null==(e=(s=e).right)))break;null==r?o=s:r.right=s,r=s,s=e}else break;return null!=r&&(r.right=s.left,s.left=o),null!=i&&(i.left=s.right,s.right=n),this.root!==s&&(this.root=s,this.splayCount++),l}splayMin(t){let e=t,i=e.left;for(;null!=i;){let t=i;e.left=t.right,t.right=e,i=(e=t).left}return e}splayMax(t){let e=t,i=e.right;for(;null!=i;){let t=i;e.right=t.left,t.left=e,i=(e=t).right}return e}_delete(t){if(null==this.root||0!=this.splay(t))return null;let e=this.root,i=e,n=e.left;if(this.size--,null==n)this.root=e.right;else{let t=e.right;(e=this.splayMax(n)).right=t,this.root=e}return this.modificationCount++,i}addNewRoot(t,e){this.size++,this.modificationCount++;let i=this.root;if(null==i){this.root=t;return}e<0?(t.left=i,t.right=i.right,i.right=null):(t.right=i,t.left=i.left,i.left=null),this.root=t}_first(){let t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){let t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>te)}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},iW=class t extends iK{root=null;compare;validKey;constructor(t,e){super(),this.compare=t??this.defaultCompare(),this.validKey=e??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(let e of t)this.delete(e)}forEach(t){let e=this[Symbol.iterator](),i;for(;!(i=e.next()).done;)t(i.value,i.value,this)}add(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new iq(t),e),this}addAndReturn(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new iq(t),e),this.root.key}addAll(t){for(let e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(0>this.splay(t))return this.root.key;let e=this.root.left;if(null==e)return null;let i=e.right;for(;null!=i;)i=(e=i).right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let i=e.left;for(;null!=i;)i=(e=i).left;return e.key}retainAll(e){let i=new t(this.compare,this.validKey),n=this.modificationCount;for(let t of e){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(t)&&0==this.splay(t)&&i.add(this.root.key)}i.size!=this.size&&(this.root=i.root,this.size=i.size,this.modificationCount++)}lookup(t){return this.validKey(t)&&0==this.splay(t)?this.root.key:null}intersection(e){let i=new t(this.compare,this.validKey);for(let t of this)e.has(t)&&i.add(t);return i}difference(e){let i=new t(this.compare,this.validKey);for(let t of this)e.has(t)||i.add(t);return i}union(t){let e=this.clone();return e.addAll(t),e}clone(){let e=new t(this.compare,this.validKey);return e.size=this.size,e.root=this.copyNode(this.root),e}copyNode(t){if(null==t)return null;let e=new iq(t.key);return function t(e,i){let n,r;do{if(n=e.left,r=e.right,null!=n){let e=new iq(n.key);i.left=e,t(n,e)}if(null!=r){let t=new iq(r.key);i.right=t,e=r,i=t}}while(null!=r)}(t,e),e}toSet(){return this.clone()}entries(){return new iJ(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new iX(this.wrap())}[Symbol.toStringTag]="[object Set]"},iY=class{tree;path=[];modificationCount=null;splayCount;constructor(t){this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},iX=class extends iY{getValue(t){return t.key}},iJ=class extends iY{getValue(t){return[t.key,t.key]}},i$=t=>()=>t,iQ=t=>{let e=t?(e,i)=>i.minus(e).abs().isLessThanOrEqualTo(t):i$(!1);return(t,i)=>e(t,i)?0:t.comparedTo(i)},i0=t=>t,i1=t=>{let e;return{set:t=>{i2=i1(t)},reset:()=>i1(t),compare:iQ(t),snap:(t=>{if(t){let e=new iW(iQ(t)),i=new iW(iQ(t)),n=t=>{let n,r;return{x:(n=t.x,e.addAndReturn(n)),y:(r=t.y,i.addAndReturn(r))}};return n({x:new iV(0),y:new iV(0)}),n}return i0})(t),orient:(e=t?(e,i,n,r,o)=>e.exponentiatedBy(2).isLessThanOrEqualTo(r.minus(i).exponentiatedBy(2).plus(o.minus(n).exponentiatedBy(2)).times(t)):i$(!1),(t,i,n)=>{let r=t.x,o=t.y,s=n.x,a=n.y,l=o.minus(a).times(i.x.minus(s)).minus(r.minus(s).times(i.y.minus(a)));return e(l,r,o,s,a)?0:l.comparedTo(0)})}},i2=i1(),i3=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),i4=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;let i=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,n=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},i8=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),i5=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),i6=t=>i5(t,t).sqrt(),i9=(t,e,i)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(i.minus(t.y))),y:i},i7=(t,e,i)=>e.x.isZero()?null:{x:i,y:t.y.plus(e.y.div(e.x).times(i.minus(t.x)))},nt=class t{point;isLeft;segment;otherSE;consumedBy;static compare(e,i){let n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:na.compare(e.segment,i.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:+!!t.y.isGreaterThan(e.y)}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw Error("Tried to link already linked events");let e=t.point.events;for(let t=0,i=e.length;t{var n,r,o,s,a,l;let h,u,p,c,d=i.otherSE;e.set(i,{sine:(n=this.point,r=t.point,o=d.point,h={x:r.x.minus(n.x),y:r.y.minus(n.y)},i8(u={x:o.x.minus(n.x),y:o.y.minus(n.y)},h).div(i6(u)).div(i6(h))),cosine:(s=this.point,a=t.point,l=d.point,p={x:a.x.minus(s.x),y:a.y.minus(s.y)},i5(c={x:l.x.minus(s.x),y:l.y.minus(s.y)},p).div(i6(c)).div(i6(p)))})};return(t,n)=>{e.has(t)||i(t),e.has(n)||i(n);let{sine:r,cosine:o}=e.get(t),{sine:s,cosine:a}=e.get(n);return r.isGreaterThanOrEqualTo(0)&&s.isGreaterThanOrEqualTo(0)?o.isLessThan(a)?1:o.isGreaterThan(a)?-1:0:r.isLessThan(0)&&s.isLessThan(0)?o.isLessThan(a)?-1:+!!o.isGreaterThan(a):s.isLessThan(r)?-1:+!!s.isGreaterThan(r)}}},ne=class t{events;poly;_isExteriorRing;_enclosingRing;static factory(e){let i=[];for(let n=0,r=e.length;n0&&(t=i)}let e=t.segment.prevInResult(),i=e?e.prevInResult():null;for(;;){if(!e)return null;if(!i)return e.ringOut;if(i.ringOut!==e.ringOut)return i.ringOut?.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut?.enclosingRing();i=(e=i.prevInResult())?e.prevInResult():null}}},ni=class{exteriorRing;interiorRings;constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){let t=this.exteriorRing.getGeom();if(null===t)return null;let e=[t];for(let t=0,i=this.interiorRings.length;t=nt.comparePoints(o,s)?o:s,this.queue.delete(e.rightSE),i.push(e.rightSE);let n=e.split(t);for(let t=0,e=n.length;t0?(this.tree.delete(e),i.push(t)):(this.segments.push(e),e.prev=n)}else{if(n&&r){let t=n.getIntersection(r);if(null!==t){if(!n.isAnEndpoint(t)){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t0)return -1;let n=e.comparePoint(t.rightSE.point);return 0!==n?n:-1}if(i.isGreaterThan(n)){if(s.isLessThan(a)&&s.isLessThan(h))return -1;if(s.isGreaterThan(a)&&s.isGreaterThan(h))return 1;let i=e.comparePoint(t.leftSE.point);if(0!==i)return i;let n=t.comparePoint(e.rightSE.point);return n<0?1:n>0?-1:1}if(s.isLessThan(a))return -1;if(s.isGreaterThan(a))return 1;if(r.isLessThan(o)){let i=e.comparePoint(t.rightSE.point);if(0!==i)return i}if(r.isGreaterThan(o)){let i=t.comparePoint(e.rightSE.point);if(i<0)return 1;if(i>0)return -1}if(!r.eq(o)){let t=l.minus(s),e=r.minus(i),u=h.minus(a),p=o.minus(n);if(t.isGreaterThan(e)&&u.isLessThan(p))return 1;if(t.isLessThan(e)&&u.isGreaterThan(p))return -1}return r.isGreaterThan(o)?1:r.isLessThan(o)||l.isLessThan(h)?-1:l.isGreaterThan(h)?1:t.ide.id)}constructor(t,e,i,n){this.id=++ns,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=i,this.windings=n}static fromRing(e,i,n){let r,o,s,a=nt.comparePoints(e,i);if(a<0)r=e,o=i,s=1;else if(a>0)r=i,o=e,s=-1;else throw Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);return new t(new nt(r,!0),new nt(o,!1),[n],[s])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return i2.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let e=this.bbox(),i=t.bbox(),n=i4(e,i);if(null===n)return null;let r=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=i3(e,s)&&0===this.comparePoint(s),h=i3(i,r)&&0===t.comparePoint(r),u=i3(e,a)&&0===this.comparePoint(a),p=i3(i,o)&&0===t.comparePoint(o);if(h&&l)return p&&!u?o:!p&&u?a:null;if(h)return u&&r.x.eq(a.x)&&r.y.eq(a.y)?null:r;if(l)return p&&o.x.eq(s.x)&&o.y.eq(s.y)?null:s;if(p&&u)return null;if(p)return o;if(u)return a;let c=((t,e,i,n)=>{if(e.x.isZero())return i7(i,n,t.x);if(n.x.isZero())return i7(t,e,i.x);if(e.y.isZero())return i9(i,n,t.y);if(n.y.isZero())return i9(t,e,i.y);let r=i8(e,n);if(r.isZero())return null;let o={x:i.x.minus(t.x),y:i.y.minus(t.y)},s=i8(o,e).div(r),a=i8(o,n).div(r),l=t.x.plus(a.times(e.x)),h=i.x.plus(s.times(n.x)),u=t.y.plus(a.times(e.y)),p=i.y.plus(s.times(n.y));return{x:l.plus(h).div(2),y:u.plus(p).div(2)}})(r,this.vector(),s,t.vector());return null!==c&&i3(n,c)?i2.snap(c):null}split(e){let i=[],n=void 0!==e.events,r=new nt(e,!0),o=new nt(e,!1),s=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(r);let a=new t(r,s,this.rings.slice(),this.windings.slice());return nt.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),nt.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),o.checkForConsuming()),i}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,e=this.windings.length;t0){let t=i;i=n,n=t}if(i.prev===n){let t=i;i=n,n=t}for(let t=0,e=n.rings.length;t1===t.length&&t[0].isSubject;this._isInResult=i(t)!==i(e)}}return this._isInResult}},nl=class{poly;isExterior;segments;bbox;constructor(t,e,i){if(!Array.isArray(t)||0===t.length||(this.poly=e,this.isExterior=i,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1]))throw Error("Input geometry is not a valid Polygon or MultiPolygon");let n=i2.snap({x:new iV(t[0][0]),y:new iV(t[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let e=1,i=t.length;e{this._fireCut(e,t,e),this._fireCut(this._map,t,e),e.pm._fireEdit()}),this._editedLayers=[];let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},cut(t){let e=this._map._layers,i=t._latlngInfos||[];Object.keys(e).map(t=>e[t]).filter(t=>t.pm).filter(t=>!t._pmTempLayer).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore).filter(t=>t instanceof L.Polyline).filter(e=>e!==t).filter(t=>t.pm.options.allowCutting).filter(t=>!(this.options.layersToCut&&L.Util.isArray(this.options.layersToCut))||!(this.options.layersToCut.length>0)||this.options.layersToCut.indexOf(t)>-1).filter(t=>!this._layerGroup.hasLayer(t)).filter(e=>{try{var i,n;let r,o,s,a=!!eV(t.toGeoJSON(15),e.toGeoJSON(15)).features.length>0;return a||e instanceof L.Polyline&&!(e instanceof L.Polygon)?a:(i=t.toGeoJSON(15),n=e.toGeoJSON(15),r=nc(i),o=nc(n),s=((t,...e)=>no.run("intersection",t,e))(r.coordinates,o.coordinates),0!==s.length&&(1===s.length?!!n_(s[0]):!!nf(s)))}catch{return e instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(e=>{let n;if(e instanceof L.Polygon){let t=(n=L.polygon(e.getLatLngs())).getLatLngs();i.forEach(e=>{if(e&&e.snapInfo){let{latlng:i}=e,r=this._calcClosestLayer(i,[n]);if(r&&r.segment&&r.distance1?(0,iS.default)(t,r):t).splice(o,0,i)}}}})}else n=e;let r=this._cutLayer(t,n),o=L.geoJSON(r,e.options);1===o.getLayers().length&&([o]=o.getLayers()),this._setPane(o,"layerPane");let s=o.addTo(this._map.pm._getContainingLayer());if(s.pm.enable(e.pm.options),s.pm.disable(),e._pmTempLayer=!0,t._pmTempLayer=!0,e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),t.remove(),t.removeFrom(this._map.pm._getContainingLayer()),s.getLayers&&0===s.getLayers().length&&this._map.pm.removeLayer({target:s}),s instanceof L.LayerGroup&&s.eachLayer(t=>{this._addDrawnLayerProp(t)}),this._addDrawnLayerProp(s),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let t=this.options.layersToCut.indexOf(e);t>-1&&this.options.layersToCut.splice(t,1)}this._editedLayers.push({layer:s,originalLayer:e})})},_cutLayer(t,e){var i,n,r;let o=L.geoJSON(),s;if(e instanceof L.Polygon){let r,o,a;i=e.toGeoJSON(15),n=t.toGeoJSON(15),r=nc(i),o=nc(n),s=0===(a=((t,...e)=>no.run("difference",t,e))(r.coordinates,o.coordinates)).length?null:1===a.length?n_(a[0]):nf(a)}else{let i,n,a,l,h=((r=e)instanceof L.Polyline&&(r=r.toGeoJSON(15)),a=function t(e){return Array.isArray(e)?1+t(e[0]):-1}(n=nd(r)),l=[],a>1?n.forEach(t=>{l.push(np({type:"LineString",coordinates:t}))}):l.push(r),l);h.forEach(e=>{let i=ia(e,t.toGeoJSON(15));(i&&i.features.length>0?L.geoJSON(i):L.geoJSON(e)).getLayers().forEach(e=>{iT(t.toGeoJSON(15),e.toGeoJSON(15))||e.addTo(o)})}),s=h.length>1?(i=[],o.eachLayer(t=>{i.push(nd(t.toGeoJSON(15)))}),np({type:"MultiLineString",coordinates:i})):o.toGeoJSON(15)}return s},_change:L.Util.falseFn}),eM.Text=eM.extend({initialize(t){this._map=t,this._shape="Text",this.toolbarButtonName="drawText"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),this._hintMarker?.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarkerAfterMoving,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t))},_createMarker(t){if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),this.options.textOptions?.className){let t=this.options.textOptions.className.split(" ");this.textArea.classList.add(...t)}let i=this._createTextIcon(this.textArea),n=new L.Marker(e,{textMarker:!0,_textMarkerOverPM:!0,icon:i});if(this._setPane(n,"markerPane"),this._finishLayer(n),n.pm||(n.options.draggable=!1),n.addTo(this._map.pm._getContainingLayer()),n.pm){n.pm.textArea=this.textArea,L.setOptions(n.pm,{removeIfEmpty:this.options.textOptions?.removeIfEmpty??!0});let t=this.options.textOptions?.focusAfterDraw??!0;n.pm._createTextMarker(t),this.options.textOptions?.text&&n.pm.setText(this.options.textOptions.text)}this._fireCreate(n),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(t){this.enable(),this._hintMarker.setLatLng(t.latlng)},_createTextArea(){let t=document.createElement("textarea");return t.readOnly=!0,t.classList.add("pm-textarea","pm-disabled"),t},_createTextIcon:t=>L.divIcon({className:"pm-text-marker",html:t})});var nm=u(ee());function ng(t,e){e instanceof L.Layer&&(e=e.getLatLng());let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.project(e,i)}function ny(t,e){let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.unproject(e,i)}var nv=L.Class.extend({includes:[{enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,eg(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let t=this._getDOMElem();t&&(eg(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(t)):L.DomEvent.on(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,eg(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let t=this._getDOMElem();t&&(eg(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(t)):L.DomEvent.off(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseDown(i),!1},_simulateMouseMoveEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseMove(i),!1},_simulateMouseUpEvent(t){let e={originalEvent:t.touches?t.touches[0]:t,target:this._layer};return -1===t.type.indexOf("touch")&&(e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint)),this._dragMixinOnMouseUp(e),!1},_dragMixinOnMouseDown(t){if(t.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(t);let e=t._fromLayerSync,i=this._syncLayers("_dragMixinOnMouseDown",t);if(this._layer instanceof L.Marker&&(!this.options.snappable||e||i?this._disableSnapping():this._initSnappableMarkers()),this._layer instanceof L.CircleMarker){let t="resizeableCircleMarker";this._layer instanceof L.Circle&&(t="resizeableCircle"),!this.options.snappable||e||i?this._layer.pm.options[t]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag():this._layer.pm.options[t]||this._initSnappableMarkersDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=t.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(t){this._overwriteEventIfItComesFromMarker(t);let e=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",t),this._dragging||(this._dragging=!0,L.DomUtil.addClass(e,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=t.latlng),this._onLayerDrag(t),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(t){let e=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",t),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),!!this._dragging&&(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,e&&L.DomUtil.removeClass(e,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0)},_onLayerDrag(t){let{latlng:e}=t,i={lat:e.lat-this._tempDragCoord.lat,lng:e.lng-this._tempDragCoord.lng},n=t=>t.map(t=>{if(Array.isArray(t))return n(t);let e={lat:t.lat+i.lat,lng:t.lng+i.lng};return(t.alt||0===t.alt)&&(e.alt=t.alt),e});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let t=n([this._layer.getLatLng()]);this._layer.setLatLng(t[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let t=this._layer.getLatLng();this._layer._snapped&&(t=this._layer._orgLatLng);let e=n([t]);this._layer.setLatLng(e[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let t=n([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(t),this._fireChange(this._layer.getBounds(),"Edit")}else{let t=n(this._layer.getLatLngs());this._layer.setLatLngs(t),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=e,t.layer=this._layer,this._fireDrag(t)},addDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.addClass(t,"leaflet-pm-draggable")},removeDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_getDOMElem(){let t=null;return this._layer._path?t=this._layer._path:this._layer._renderer&&this._layer._renderer._container?t=this._layer._renderer._container:this._layer._image?t=this._layer._image:this._layer._icon&&(t=this._layer._icon),t},_overwriteEventIfItComesFromMarker(t){t.target.getLatLng&&(!t.target._radius||t.target._radius<=10)&&(t.containerPoint=this._map.mouseEventToContainerPoint(t.originalEvent),t.latlng=this._map.containerPointToLatLng(t.containerPoint))},_syncLayers(t,e){if(this.enabled())return!1;if(!e._fromLayerSync&&this._layer===e.target&&this.options.syncLayersOnDrag){e._fromLayerSync=!0;let i=[];if(L.Util.isArray(this.options.syncLayersOnDrag))i=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(t=>{t instanceof L.LayerGroup&&(i=i.concat(t.pm.getLayers(!0)))});else if(!0===this.options.syncLayersOnDrag&&this._parentLayerGroup)for(let t in this._parentLayerGroup){let e=this._parentLayerGroup[t];e.pm&&(i=e.pm.getLayers(!0))}return L.Util.isArray(i)&&i.length>0&&(i=i.filter(t=>!!t.pm).filter(t=>!!t.pm.options.draggable)).forEach(i=>{i!==this._layer&&i.pm[t]&&(i._snapped=!1,i.pm[t](e))}),i.length>0}return!1},_stopDOMImageDrag:t=>(t.preventDefault(),!1)},ek,{_onRotateStart(t){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=ng(this._map,this._rotationOriginLatLng),this._rotationStartPoint=ng(this._map,t.target.getLatLng()),this._initialRotateLatLng=ef(this._layer),this._startAngle=this.getAngle();let e=ef(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,e),this._fireRotationStart(this._map,e)},_onRotate(t){let e=ng(this._map,t.target.getLatLng()),i=this._rotationStartPoint,n=this._rotationOriginPoint,r=Math.atan2(e.y-n.y,e.x-n.x)-Math.atan2(i.y-n.y,i.x-n.x);this._layer.setLatLngs(this._rotateLayer(r,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let o=this;!function t(e,i=[],n=-1){if(n>-1&&i.push(n),L.Util.isArray(e[0]))e.forEach((e,n)=>t(e,i.slice(),n));else{let t=i.length>0?(0,nm.default)(o._markers,i):o._markers[0];e.forEach((e,i)=>{t[i].setLatLng(e)})}}(this._layer.getLatLngs());let s=ef(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(r,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let a=180*r/Math.PI,l=(a=a<0?a+360:a)+this._startAngle;this._setAngle(l),this._rotationLayer.pm._setAngle(l),this._fireRotation(this._rotationLayer,a,s),this._fireRotation(this._map,a,s),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let t=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let e=ef(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=ef(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,t,e),this._fireRotationEnd(this._map,t,e),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(t,e,i,n,r){let o=ng(r,i);return this._matrix=n.clone().rotate(t,o).flip(),function t(e,i,n){var r;let o=n.getMaxZoom();if(o===1/0&&(o=n.getZoom()),L.Util.isArray(e)){let r=[];return e.forEach(e=>{r.push(t(e,i,n))}),r}return e instanceof L.LatLng?(r=o,n.unproject(i.transform(n.project(e,r)),r)):null}(e,this._matrix,r)},_setAngle(t){t=t<0?t+360:t,this._angle=t%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let t=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),e=t.getCenter();return t.removeFrom(this._layer._map),e},enableRotate(){this.options.allowRotation?(this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&void 0===this._angle&&this.setInitAngle(ed(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0),this._rotatePoly=L.polygon(this._layer.getLatLngs(),{fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0}),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=ef(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)):this.disableRotate()},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(t){let e=this.getAngle(),i=this._layer.getLatLngs(),n=Math.PI/180*t;this._layer.setLatLngs(this._rotateLayer(n,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+t),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(n,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let r=this.getAngle()-e;r=r<0?r+360:r,this._startAngle=e,this._fireRotation(this._layer,r,i,this._layer),this._fireRotation(this._map||this._layer._map,r,i,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(t){let e=t-this.getAngle();this.rotateLayer(e)},getAngle(){return this._angle||0},setInitAngle(t){this._setAngle(t)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(t){this._rotationCenter=t,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(t)}},ea],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(t){L.Util.setOptions(this,t)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(t,e){let i=e.target,n={layer:this._layer,marker:i,event:e},r="";return"move"===t?r="moveVertexValidation":"add"===t?r="addVertexValidation":"remove"===t&&(r="removeVertexValidation"),this.options[r]&&"function"==typeof this.options[r]&&!this.options[r](n)?("move"===t&&(i._cancelDragEventChain=i.getLatLng()),!1):(i._cancelDragEventChain=null,!0)},_vertexValidationDrag:t=>!t._cancelDragEventChain||(t._latlng=t._cancelDragEventChain,t.update(),!1),_vertexValidationDragEnd:t=>!t._cancelDragEventChain||(t._cancelDragEventChain=null,!1)});nv.LayerGroup=L.Class.extend({initialize(t){this._layerGroup=t,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(t=>this._initLayer(t));let e=t=>{if(t.layer._pmTempLayer)return;this._layers=this.getLayers();let e=this._layers.filter(t=>!t.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in t.pm._parentLayerGroup));e.forEach(t=>{this._initLayer(t)}),e.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(e,100,this),this),this._layerGroup.on("layerremove",t=>{this._removeLayerFromGroup(t.target)},this);let i=t=>{t.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(i,100,this),this)},enable(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.enable(t,e)):i.pm.enable(t)})},disable(t=[]){0===t.length&&(this._layers=this.getLayers()),this._layers.forEach(e=>{e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.disable(t)):e.pm.disable()})},enabled(t=[]){return 0===t.length&&(this._layers=this.getLayers()),!!this._layers.find(e=>e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.enabled(t)):e.pm.enabled())},toggleEdit(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.toggleEdit(t,e)):i.pm.toggleEdit(t)})},_initLayer(t){let e=L.Util.stamp(this._layerGroup);t.pm._parentLayerGroup||(t.pm._parentLayerGroup={}),t.pm._parentLayerGroup[e]=this._layerGroup},_removeLayerFromGroup(t){if(t.pm&&t.pm._layerGroup){let e=L.Util.stamp(this._layerGroup);delete t.pm._layerGroup[e]}},dragging(){return this._layers=this.getLayers(),!!this._layers&&!!this._layers.find(t=>t.pm.dragging())},getOptions(){return this.options},_getMap(){return this._map||this._layers.find(t=>!!t._map)?._map||null},getLayers(t=!1,e=!0,i=!0,n=[]){let r=[];return t?this._layerGroup.getLayers().forEach(t=>{r.push(t),t instanceof L.LayerGroup&&-1===n.indexOf(t._leaflet_id)&&(n.push(t._leaflet_id),r=r.concat(t.pm.getLayers(!0,!0,!0,n)))}):r=this._layerGroup.getLayers(),i&&(r=r.filter(t=>!(t instanceof L.LayerGroup))),e&&(r=(r=(r=r.filter(t=>!!t.pm)).filter(t=>!t._pmTempLayer)).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)),r},setOptions(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this.options=t,this._layers.forEach(i=>{i.pm&&(i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.setOptions(t,e)):i.pm.setOptions(t))})}}),nv.Marker=nv.extend({_shape:"Marker",initialize(t){this._layer=t,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(t={draggable:!0}){(L.Util.setOptions(this,t),this.options.allowEditing&&this._layer._map)?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this),this._fireEnable()):this.disable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(t){let e=t.target;e.remove(),this._fireRemove(e),this._fireRemove(this._map,e)},_onDragStart(){this._map.pm.Draw.Marker._layerIsDragging=!0},_onMarkerDragEnd(){this._map.pm.Draw.Marker._layerIsDragging=!1},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)}});var nL=u(ee());nv.Line=nv.extend({includes:[{filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let t=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=t.filter((t,e,i)=>i.indexOf(t)===e)},_removeFromCache(t){let e=this.markerCache.indexOf(t);e>-1&&this.markerCache.splice(e,1)},renderLimits(t){this.markerCache.forEach(e=>{t.includes(e)?this._markerGroup.addLayer(e):this._markerGroup.removeLayer(e)})},applyLimitFilters({latlng:t={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let e=[...this._filterClosestMarkers(t)];this.renderLimits(e)},_filterClosestMarkers(t){let e=[...this.markerCache],i=this.options.limitMarkersToCount;return -1===i?e:(e.sort((e,i)=>e._latlng.distanceTo(t)-i._latlng.distanceTo(t)),e.filter((t,e)=>!(i>-1)||e{if(Array.isArray(t[0]))return t.map(i,this);let e=t.map(this._createMarker,this);return!0!==this.options.hideMiddleMarkers&&t.map((i,n)=>{let r=this.isPolygon()?(n+1)%t.length:n+1;return this._createMiddleMarker(e[n],e[r])}),e};this._markers=i(e),this.filterMarkerGroup(),t.addLayer(this._markerGroup)},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this.options.rotate?(e.on("dragstart",this._onRotateStart,this),e.on("drag",this._onRotate,this),e.on("dragend",this._onRotateEnd,this)):(e.on("click",this._onVertexClick,this),e.on("dragstart",this._onMarkerDragStart,this),e.on("move",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(e),e},_createMiddleMarker(t,e){if(!t||!e)return!1;let i=L.PM.Utils.calcMiddleLatLng(this._map,t.getLatLng(),e.getLatLng()),n=this._createMarker(i),r=L.divIcon({className:"marker-icon marker-icon-middle"});return n.setIcon(r),n.leftM=t,n.rightM=e,t._middleMarkerNext=n,e._middleMarkerPrev=n,n.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),n.on("movestart",this._onMiddleMarkerMoveStart,this),n},_onMiddleMarkerClick(t){let e=t.target;if(!this._vertexValidation("add",t))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),this._addMarker(e,e.leftM,e.rightM)},_onMiddleMarkerMoveStart(t){let e=t.target;(e.on("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidation("add",t))?(e._dragging=!0,this._addMarker(e,e.leftM,e.rightM)):e.on("move",this._onMiddleMarkerMovePrevent,this)},_onMiddleMarkerMovePrevent(t){let e=t.target;this._vertexValidationDrag(e)},_onMiddleMarkerMoveEnd(t){let e=t.target;if(e.off("move",this._onMiddleMarkerMovePrevent,this),e.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(e))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),setTimeout(()=>{delete e._dragging},100)},_addMarker(t,e,i){t.off("movestart",this._onMiddleMarkerMoveStart,this),t.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let n=t.getLatLng(),r=this._layer._latlngs;delete t.leftM,delete t.rightM;let{indexPath:o,index:s,parentPath:a}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),l=o.length>1?(0,nL.default)(r,a):r,h=o.length>1?(0,nL.default)(this._markers,a):this._markers;l.splice(s+1,0,n),h.splice(s+1,0,t),this._layer.setLatLngs(r),!0!==this.options.hideMiddleMarkers&&(this._createMiddleMarker(e,t),this._createMiddleMarker(t,i)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(t,L.PM.Utils.findDeepMarkerIndex(this._markers,t).indexPath,n),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return eO(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(t){let e=this._layer,i,n;if(i=!this.options.allowSelfIntersection&&(n=eO(this._layer.toGeoJSON(15))).features.length>0){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return i;t?this._flashLayer():(e.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(n)}else e.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return i},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(t,e){t.forEach(t=>{Array.isArray(t)?this._updateDisabledMarkerStyle(t,e):t._icon&&(e&&!this._checkMarkerAllowedToDrag(t)?L.DomUtil.addClass(t._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(t._icon,"vertexmarker-disabled"))})},_removeMarker(t){let e=t.target;if(!this._vertexValidation("remove",t))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=ef(this._layer,this._layer.getLatLngs()));let i=this._layer.getLatLngs(),{indexPath:n,index:r,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!n)return;let s=n.length>1?(0,nL.default)(i,o):i,a=n.length>1?(0,nL.default)(this._markers,o):this._markers,l=o[o.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!l&&(s.length<=2||this.isPolygon()&&s.length<=3))return void this._flashLayer();s.splice(r,1),this._layer.setLatLngs(i),this.isPolygon()&&s.length<=2&&s.splice(0,s.length);let h=!1;if(s.length<=1&&(s.splice(0,s.length),o.length>1&&n.length>1&&(i=ep(i)),this._layer.setLatLngs(i),this._initMarkers(),h=!0),eu(i)||this._layer.remove(),i=ep(i),this._layer.setLatLngs(i),this._markers=ep(this._markers),!h&&(a=n.length>1?(0,nL.default)(this._markers,o):this._markers,e._middleMarkerPrev&&(this._markerGroup.removeLayer(e._middleMarkerPrev),this._removeFromCache(e._middleMarkerPrev)),e._middleMarkerNext&&(this._markerGroup.removeLayer(e._middleMarkerNext),this._removeFromCache(e._middleMarkerNext)),this._markerGroup.removeLayer(e),this._removeFromCache(e),a)){let t,e;if(this.isPolygon()?(t=(r+1)%a.length,e=(r+(a.length-1))%a.length):(e=r-1<0?void 0:r-1,t=r+1>=a.length?void 0:r+1),t!==e){let i=a[e],n=a[t];!0!==this.options.hideMiddleMarkers&&this._createMiddleMarker(i,n)}a.splice(r,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(e,n),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(t){let e=this._layer.getLatLngs(),i=t.getLatLng(),{indexPath:n,index:r,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),s=n.length>1?(0,nL.default)(e,o):e;i.alt=s[r].alt,s.splice(r,1,i),this._layer.setLatLngs(e)},_getNeighborMarkers(t){let{indexPath:e,index:i,parentPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),r=e.length>1?(0,nL.default)(this._markers,n):this._markers,o=(i+1)%r.length,s=(i+(r.length-1))%r.length;return{prevMarker:r[s],nextMarker:r[o]}},_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),r=L.polyline([t.getLatLng(),i.getLatLng()]),o=eV(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.filter(i=>{let n=i.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(e.getLatLng())&&!r.equals(t.getLatLng())}).length,s=eV(this._layer.toGeoJSON(15),r.toGeoJSON(15)).features.filter(e=>{let n=e.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(i.getLatLng())&&!r.equals(t.getLatLng())}).length;return!(o<1&&s<1)},_onMarkerDragStart(t){let e=t.target;if(this._preventRenderingMarkers(!0),this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",t))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i),this.options.allowSelfIntersection||(this._coordsBeforeEdit=ef(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(e):this._markerAllowedToDrag=null},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e))return;let{indexPath:i,index:n,parentPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!i)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&!1===this._markerAllowedToDrag){this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),this._handleLayerStyle();return}this.updatePolygonCoordsFromMarkerDrag(e);let o=i.length>1?(0,nL.default)(this._markers,r):this._markers,s=(n+1)%o.length,a=(n+(o.length-1))%o.length,l=e.getLatLng(),h=o[a].getLatLng(),u=o[s].getLatLng();if(e._middleMarkerNext){let t=L.PM.Utils.calcMiddleLatLng(this._map,l,u);e._middleMarkerNext.setLatLng(t)}if(e._middleMarkerPrev){let t=L.PM.Utils.calcMiddleLatLng(this._map,l,h);e._middleMarkerPrev.setLatLng(t)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(this._preventRenderingMarkers(!1),!this._vertexValidationDragEnd(e))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),n=!this.options.allowSelfIntersection&&this.hasSelfIntersection();n&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(n=!1);let r=!this.options.allowSelfIntersection&&n;if(this._fireMarkerDragEnd(t,i,r),r){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(t,i);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(t){let e=t.target;if(e._dragging)return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireVertexClick(t,i)}}),nv.Polygon=nv.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),r=L.polyline([t.getLatLng(),i.getLatLng()]),o=eV(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.filter(i=>{let n=i.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(e.getLatLng())&&!r.equals(t.getLatLng())}).length,s=eV(this._layer.toGeoJSON(15),r.toGeoJSON(15)).features.filter(e=>{let n=e.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(i.getLatLng())&&!r.equals(t.getLatLng())}).length;return!(o<1&&s<1)}}),nv.Rectangle=nv.Polygon.extend({_shape:"Rectangle",_initMarkers(){let t=this._map,e=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,t.addLayer(this._markerGroup),this._markers=[],this._markers[0]=e.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((t,e)=>{let i=this._cornerMarkers.find(t=>t._index===e);i&&i.setLatLng(t)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(t,e){let i=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=t,i._index=e,i._pmTempLayer=!0,i.on("click",this._onVertexClick,this),this._markerGroup.addLayer(i),i},_addMarkerEvents(){this._markers[0].forEach(t=>{t.on("dragstart",this._onMarkerDragStart,this),t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||t.on("contextmenu",this._removeMarker,this)})},_removeMarker:()=>null,_onMarkerDragStart(t){if(!this._vertexValidation("move",t))return;let e=t.target;e._oppositeCornerLatLng=this._cornerMarkers.find(t=>t._index===(e._index+2)%4).getLatLng(),e._snapped=!1;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i)},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e)||void 0===e._index)return;this._adjustRectangleForMarkerMove(e);let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;this._cornerMarkers.forEach(t=>{delete t._oppositeCornerLatLng});let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragEnd(t,i),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(t){L.extend(t._origLatLng,t._latlng);let e=L.PM.Utils._getRotatedRectangle(t.getLatLng(),t._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(e),this._adjustAllMarkers(t),this._layer.redraw()},_adjustAllMarkers(t){let e=this._layer.getLatLngs()[0];if(e&&4!==e.length&&e.length>0)e.forEach((t,e)=>{this._cornerMarkers[e].setLatLng(t)}),this._cornerMarkers.slice(e.length).forEach(t=>{t.setLatLng(e[0])});else if(e&&e.length){let i=e.findIndex(e=>t.getLatLng().equals(e));i>-1?(this._cornerMarkers[(t._index+1)%4].setLatLng(e[(i+1)%4]),this._cornerMarkers[(t._index+2)%4].setLatLng(e[(i+2)%4]),this._cornerMarkers[(t._index+3)%4].setLatLng(e[(i+3)%4])):this._cornerMarkers.forEach(t=>{t.setLatLng(e[t._index])})}else console.error("The layer has no LatLngs")},_findCorners(){void 0===this._angle&&this.setInitAngle(ed(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.getAngle(),this._map||this)}}),nv.CircleMarker=nv.extend({_shape:"CircleMarker",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(t={draggable:!0,snappable:!0}){(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this.options.allowEditing&&this._layer._map)?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let t=this._map;this._helperLayers&&(this._helperLayers.removeFrom(t),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);let e=this._layer.getLatLng(),i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(n),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(t,e){let i=this._map.project(t),n=L.point(i.x+e,i.y);return this._map.unproject(n)},_createHintLine(t,e){let i=t.getLatLng(),n=e.getLatLng();this._hintline=L.polyline([i,n],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(t){let e=this._createMarker(t);return this.options.draggable?(L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"),e.on("move",this._moveCircle,this)):e.dragging.disable(),e},_createOuterMarker(t){let e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),e.on("click",this._onVertexClick,this),this._helperLayers.addLayer(e),e},_moveCircle(t){if(t.target._cancelDragEventChain)return;let e=this._centerMarker.getLatLng();this._layer.setLatLng(e);let i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._outerMarker._latlng=n,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let t=this._layer.getLatLng(),e=this._layer._radius,i=this._getLatLngOnCircle(t,e);this._outerMarker.setLatLng(i),this._centerMarker.setLatLng(t),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag(t){let e=t.target;e instanceof L.Marker&&!this._vertexValidationDrag(e)||this._fireMarkerDrag(t)},_onMarkerDragEnd(t){this._extedingMarkerDragEnd();let e=t.target;this._vertexValidationDragEnd(e)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(t))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let t=this._layer._map||this._map;if(t){let e=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),t,this._layer.getLatLng()),i=L.circle(this._layer.getLatLng(),this._layer.options);i.setRadius(e);let n=t&&t.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(i,200,!n).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(i,200,!n),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);return this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&(e=e_(this._map,t,e,this._getMaxDistanceInMeter(t))),e},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))},_getMinDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,t)},_getMaxDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,t)},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),nv.Circle=nv.CircleMarker.extend({_shape:"Circle",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(t){L.PM.Edit.CircleMarker.prototype.enable.call(this,t||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let t=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!t).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!t),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(t,e){return this._map.distance(t,e)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),nv.ImageOverlay=nv.extend({_shape:"ImageOverlay",initialize(t){this._layer=t,this._enabled=!1},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},enabled(){return this._enabled},enable(t={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]}}),nv.Text=nv.extend({_shape:"Text",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this.textArea){if(!this.options.allowEditing||!this._layer._map)return void this.disable();this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),document.removeEventListener("click",this._documentClickThis,{capture:!0}),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let t=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),t.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let t=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,e=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${t}px`,this.textArea.style.width=`${e}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&(this._documentClickThis=this._documentClickThis||this._documentClick.bind(this),document.addEventListener("click",this._documentClickThis,{capture:!0}))},100)},_documentClick(t){t.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(t={}){let e=this._hasFocus;this._hasFocus="focus"===t.type,!e!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(t){t&&(this.textArea.value=t),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let t=this.options.className.split(" ");this.textArea.classList.add(...t)}let t=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(t),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(t=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),!0===t&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(t){t.preventDefault()}});var nb=function(t,e,i,n,r,o){this._matrix=[t,e,i,n,r,o]};nb.init=()=>new L.PM.Matrix(1,0,0,1,0,0),nb.prototype={transform(t){return this._transform(t.clone())},_transform(t){let e=this._matrix,{x:i,y:n}=t;return t.x=e[0]*i+e[1]*n+e[4],t.y=e[2]*i+e[3]*n+e[5],t},untransform(t){let e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone(){let t=this._matrix;return new L.PM.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate(t){let e,i;return void 0===t?new L.Point(this._matrix[4],this._matrix[5]):("number"==typeof t?(e=t,i=t):(e=t.x,i=t.y),this._add(1,0,0,1,e,i))},scale(t,e){let i,n;return void 0===t?new L.Point(this._matrix[0],this._matrix[3]):(e=e||L.point(0,0),"number"==typeof t?(i=t,n=t):(i=t.x,n=t.y),this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y))},rotate(t,e){let i=Math.cos(t),n=Math.sin(t);return e=e||new L.Point(0,0),this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(t,e,i,n,r,o){let s=[[],[],[]],a=this._matrix,l=[[a[0],a[2],a[4]],[a[1],a[3],a[5]],[0,0,1]],h=[[t,i,r],[e,n,o],[0,0,1]],u;t&&t instanceof L.PM.Matrix&&(h=[[(a=t._matrix)[0],a[2],a[4]],[a[1],a[3],a[5]],[0,0,1]]);for(let t=0;t<3;t+=1)for(let e=0;e<3;e+=1){u=0;for(let i=0;i<3;i+=1)u+=l[t][i]*h[i][e];s[t][e]=u}return this._matrix=[s[0][0],s[1][0],s[0][1],s[1][1],s[0][2],s[1][2]],this}},L.PM=L.PM||{version:"2.19.2",Map:ey,Toolbar:eL,Draw:eM,Edit:nv,Utils:{calcMiddleLatLng(t,e,i){let n=t.project(e),r=t.project(i);return t.unproject(n._add(r)._divideBy(2))},findLayers(t){let e=[];return t.eachLayer(t=>{(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&e.push(t)}),e=(e=(e=e.filter(t=>!!t.pm)).filter(t=>!t._pmTempLayer)).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)},circleToPolygon(t,e=60,i=!0){let n=ec(t.getLatLng(),t.getRadius(),e,0,i),r=[];for(let t=0;t{t.fire(e,i,n)})},getAllParentGroups(t){let e=[],i=[],n=t=>{for(let r in t._eventParents)if(-1===e.indexOf(r)){e.push(r);let o=t._eventParents[r];i.push(o),n(o)}};return!t._pmLastGroupFetch||!t._pmLastGroupFetch.time||new Date().getTime()-t._pmLastGroupFetch.time>1e3?(n(t),t._pmLastGroupFetch={time:new Date().getTime(),groups:i,groupIds:e},{groupIds:e,groups:i}):{groups:t._pmLastGroupFetch.groups,groupIds:t._pmLastGroupFetch.groupIds}},createGeodesicPolygon:ec,getTranslation:eh,findDeepCoordIndex(t,e,i=!0){let n,r=t=>(o,s)=>{let a=t.concat(s);if(i){if(o.lat&&o.lat===e.lat&&o.lng===e.lng)return n=a,!0}else if(o.lat&&L.latLng(o).equals(e))return n=a,!0;return Array.isArray(o)&&o.some(r(a))};t.some(r([]));let o={};return n&&(o={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),o},findDeepMarkerIndex(t,e){let i,n=t=>(r,o)=>{let s=t.concat(o);return r._leaflet_id===e._leaflet_id?(i=s,!0):Array.isArray(r)&&r.some(n(s))};t.some(n([]));let r={};return i&&(r={indexPath:i,index:i[i.length-1],parentPath:i.slice(0,i.length-1)}),r},_getIndexFromSegment(t,e){if(e&&2===e.length){let i=this.findDeepCoordIndex(t,e[0]),n=this.findDeepCoordIndex(t,e[1]),r=Math.max(i.index,n.index);return(0===i.index||0===n.index)&&1!==r&&(r+=1),{indexA:i,indexB:n,newIndex:r,indexPath:i.indexPath,parentPath:i.parentPath}}return null},_getRotatedRectangle(t,e,i,n){let r=ng(n,t),o=ng(n,e),s=i*Math.PI/180,a=Math.cos(s),l=Math.sin(s),h=(o.x-r.x)*a+(o.y-r.y)*l,u=(o.y-r.y)*a-(o.x-r.x)*l,p=h*a+r.x,c=h*l+r.y,d=-u*l+r.x,_=u*a+r.y;return[ny(n,r),ny(n,{x:p,y:c}),ny(n,o),ny(n,{x:d,y:_})]},pxRadiusToMeterRadius(t,e,i){let n=e.project(i),r=L.point(n.x+t,n.y);return e.distance(e.unproject(r),i)}},Matrix:nb,activeLang:"en",optIn:!1,initialize(t){this.addInitHooks(t)},setOptIn(t){this.optIn=!!t},addInitHooks(){L.Map.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}),L.LayerGroup.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}),L.Marker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}),L.CircleMarker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}),L.Polyline.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}),L.Polygon.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}),L.Rectangle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}),L.Circle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}),L.ImageOverlay.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))})},reInitLayer(t){t instanceof L.LayerGroup&&t.eachLayer(t=>{this.reInitLayer(t)}),t.pm||L.PM.optIn&&!1!==t.options.pmIgnore||t.options.pmIgnore||(t instanceof L.Map?t.pm=new L.PM.Map(t):t instanceof L.Marker?t.options.textMarker?(t.pm=new L.PM.Edit.Text(t),t.pm._initTextMarker(),t.pm._createTextMarker(!1)):t.pm=new L.PM.Edit.Marker(t):t instanceof L.Circle?t.pm=new L.PM.Edit.Circle(t):t instanceof L.CircleMarker?t.pm=new L.PM.Edit.CircleMarker(t):t instanceof L.Rectangle?t.pm=new L.PM.Edit.Rectangle(t):t instanceof L.Polygon?t.pm=new L.PM.Edit.Polygon(t):t instanceof L.Polyline?t.pm=new L.PM.Edit.Line(t):t instanceof L.LayerGroup?t.pm=new L.PM.Edit.LayerGroup(t):t instanceof L.ImageOverlay&&(t.pm=new L.PM.Edit.ImageOverlay(t)))}},"1.7.1"===L.version&&L.Canvas.include({_onClick(t){let e=this._map.mouseEventToLayerPoint(t),i,n;for(let r=this._drawFirst;r;r=r.next)(i=r.layer).options.interactive&&i._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(n=i);n&&(L.DomEvent.fakeStop(t),this._fireEvent([n],t))}}),L.PM.initialize()})()},80094,t=>{"use strict";var e=t.i(43476),i=t.i(32322);t.i(15258),t.i(70462);var n=t.i(71645);function r({members:t,onPolygonChange:r,clearTrigger:o,loadPolygon:s}){let a=(0,n.useRef)(null),l=(0,n.useRef)(null),h=(0,n.useRef)(null),u=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!a.current||l.current)return;let t=i.default.map(a.current).setView([46.5,2.5],6);i.default.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap'}).addTo(t);let e=i.default.markerClusterGroup();return t.addLayer(e),t.pm&&(t.pm.addControls({position:"topleft",drawCircle:!1,drawCircleMarker:!1,drawMarker:!1,drawPolyline:!1,drawText:!1,editMode:!1,dragMode:!1,cutPolygon:!1,rotateMode:!1}),t.pm.setLang("fr")),t.on("pm:create",e=>{u.current&&t.removeLayer(u.current),u.current=e.layer,r(e.layer.getLatLngs()[0].map(t=>[t.lat,t.lng]))}),t.on("pm:remove",()=>{u.current=null,r(null)}),l.current=t,h.current=e,()=>{t.remove(),l.current=null,h.current=null}},[]),(0,n.useEffect)(()=>{o&&l.current&&u.current&&(l.current.removeLayer(u.current),u.current=null,r(null))},[o]),(0,n.useEffect)(()=>{let t=l.current;if(!t||!s)return;u.current&&(t.removeLayer(u.current),u.current=null);let e=s.coords.map(([t,e])=>i.default.latLng(t,e)),n=i.default.polygon(e,{color:"#3388ff"}).addTo(t);u.current=n,t.fitBounds(n.getBounds(),{padding:[20,20]}),r(s.coords,s.name)},[s]),(0,n.useEffect)(()=>{let e=h.current;if(!e)return;e.clearLayers();let n=t.map(t=>i.default.circleMarker([t.lat,t.lon],{radius:6,color:"#f59e0b",fillColor:"#f59e0b",fillOpacity:.7}).bindPopup(`${t.title||t.pubkey.slice(0,8)}${t.city?"
"+t.city:""}`));e.addLayers(n)},[t]),(0,e.jsx)("div",{ref:a,style:{height:"500px",width:"100%",borderRadius:"0.75rem"}})}t.s(["default",()=>r])},5618,t=>{t.n(t.i(80094))}]); \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/chunks/d34030f2c8f04cfc.js b/public/gratewizard-app/_next/static/chunks/d34030f2c8f04cfc.js deleted file mode 100644 index 3986da3..0000000 --- a/public/gratewizard-app/_next/static/chunks/d34030f2c8f04cfc.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,36969,t=>{"use strict";var o=t.i(62607).domAnimation;t.s(["default",()=>o])}]); \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/chunks/e70d31e6e69ee244.js b/public/gratewizard-app/_next/static/chunks/e70d31e6e69ee244.js deleted file mode 100644 index ef22486..0000000 --- a/public/gratewizard-app/_next/static/chunks/e70d31e6e69ee244.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,31761,c=>{c.v(s=>Promise.all(["static/chunks/d34030f2c8f04cfc.js"].map(s=>c.l(s))).then(()=>s(36969)))},17629,c=>{c.v(s=>Promise.all(["static/chunks/d3337d279a7174ed.js","static/chunks/4106ddfc45f7925e.css"].map(s=>c.l(s))).then(()=>s(5618)))}]); \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/chunks/f7eb72bed109bc88.js b/public/gratewizard-app/_next/static/chunks/f7eb72bed109bc88.js deleted file mode 100644 index cf9a92b..0000000 --- a/public/gratewizard-app/_next/static/chunks/f7eb72bed109bc88.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,32322,(t,e,i)=>{t.e,function(t){"use strict";function e(t){var e,i,n,r;for(i=1,n=arguments.length;itypeof L&&L&&L.Mixin){t=P(t)?t:[t];for(var e=0;e0?Math.floor(t):Math.ceil(t)};function F(t,e,i){return t instanceof G?t:P(t)?new G(t[0],t[1]):null==t?t:"object"==typeof t&&"x"in t&&"y"in t?new G(t.x,t.y):new G(t,e,i)}function U(t,e){if(t)for(var i=e?[t,e]:t,n=0,r=i.length;n=this.min.x&&i.x<=this.max.x&&e.y>=this.min.y&&i.y<=this.max.y},intersects:function(t){t=V(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>=e.x&&n.x<=i.x,s=r.y>=e.y&&n.y<=i.y;return o&&s},overlaps:function(t){t=V(t);var e=this.min,i=this.max,n=t.min,r=t.max,o=r.x>e.x&&n.xe.y&&n.y=n.lat&&i.lat<=r.lat&&e.lng>=n.lng&&i.lng<=r.lng},intersects:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>=e.lat&&n.lat<=i.lat,s=r.lng>=e.lng&&n.lng<=i.lng;return o&&s},overlaps:function(t){t=q(t);var e=this._southWest,i=this._northEast,n=t.getSouthWest(),r=t.getNorthEast(),o=r.lat>e.lat&&n.late.lng&&n.lngtypeof orientation||tI("mobile"),tw=!window.PointerEvent&&window.MSPointerEvent,tC=!!(window.PointerEvent||tw),tP="ontouchstart"in window||!!window.TouchEvent,tE=!window.L_NO_TOUCH&&(tP||tC),tT=(window.devicePixelRatio||window.screen.deviceXDPI/window.screen.logicalXDPI)>1,tS=function(){var t=!1;try{var e=Object.defineProperty({},"passive",{get:function(){t=!0}});window.addEventListener("testPassiveEventSupport",y,e),window.removeEventListener("testPassiveEventSupport",y,e)}catch(t){}return t}(),tB=!!document.createElement("canvas").getContext,tO=!!(document.createElementNS&&ti("svg").createSVGRect),tD=!!tO&&((u=document.createElement("div")).innerHTML="","http://www.w3.org/2000/svg"===(u.firstChild&&u.firstChild.namespaceURI)),tR=!tO&&function(){try{var t=document.createElement("div");t.innerHTML='';var e=t.firstChild;return e.style.behavior="url(#default#VML)",e&&"object"==typeof e.adj}catch(t){return!1}}();function tI(t){return navigator.userAgent.toLowerCase().indexOf(t)>=0}var tA={ie:to,ielt9:ts,edge:ta,webkit:tl,android:th,android23:tu,androidStock:tc,opera:td,chrome:t_,gecko:tf,safari:tm,phantom:tg,opera12:ty,win:tv,ie3d:tL,webkit3d:tb,gecko3d:tk,any3d:tM,mobile:tx,mobileWebkit:tx&&tl,mobileWebkit3d:tx&&tb,msPointer:tw,pointer:tC,touch:tE,touchNative:tP,mobileOpera:tx&&td,mobileGecko:tx&&tf,retina:tT,passiveEvents:tS,canvas:tB,svg:tO,vml:tR,inlineSvg:tD,mac:0===navigator.platform.indexOf("Mac"),linux:0===navigator.platform.indexOf("Linux")},tz=tA.msPointer?"MSPointerDown":"pointerdown",tN=tA.msPointer?"MSPointerMove":"pointermove",tj=tA.msPointer?"MSPointerUp":"pointerup",tG=tA.msPointer?"MSPointerCancel":"pointercancel",tZ={touchstart:tz,touchmove:tN,touchend:tj,touchcancel:tG},tF={touchstart:function(t,e){e.MSPOINTER_TYPE_TOUCH&&e.pointerType===e.MSPOINTER_TYPE_TOUCH&&ek(e),tW(t,e)},touchmove:tW,touchend:tW,touchcancel:tW},tU={},tV=!1;function tH(t){tU[t.pointerId]=t}function tq(t){tU[t.pointerId]&&(tU[t.pointerId]=t)}function tK(t){delete tU[t.pointerId]}function tW(t,e){if(e.pointerType!==(e.MSPOINTER_TYPE_MOUSE||"mouse")){for(var i in e.touches=[],tU)e.touches.push(tU[i]);e.changedTouches=[e],t(e)}}var tY=ee(["transform","webkitTransform","OTransform","MozTransform","msTransform"]),tX=ee(["webkitTransition","transition","OTransition","MozTransition","msTransition"]),tJ="webkitTransition"===tX||"OTransition"===tX?tX+"End":"transitionend";function t$(t){return"string"==typeof t?document.getElementById(t):t}function tQ(t,e){var i=t.style[e]||t.currentStyle&&t.currentStyle[e];if((!i||"auto"===i)&&document.defaultView){var n=document.defaultView.getComputedStyle(t,null);i=n?n[e]:null}return"auto"===i?null:i}function t0(t,e,i){var n=document.createElement(t);return n.className=e||"",i&&i.appendChild(n),n}function t1(t){var e=t.parentNode;e&&e.removeChild(t)}function t2(t){for(;t.firstChild;)t.removeChild(t.firstChild)}function t3(t){var e=t.parentNode;e&&e.lastChild!==t&&e.appendChild(t)}function t4(t){var e=t.parentNode;e&&e.firstChild!==t&&e.insertBefore(t,e.firstChild)}function t8(t,e){if(void 0!==t.classList)return t.classList.contains(e);var i=t7(t);return i.length>0&&RegExp("(^|\\s)"+e+"(\\s|$)").test(i)}function t5(t,e){if(void 0!==t.classList)for(var i=k(e),n=0,r=i.length;n0?2*window.devicePixelRatio:1;function eP(t){return tA.edge?t.wheelDeltaY/2:t.deltaY&&0===t.deltaMode?-t.deltaY/eC:t.deltaY&&1===t.deltaMode?-(20*t.deltaY):t.deltaY&&2===t.deltaMode?-(60*t.deltaY):t.deltaX||t.deltaZ?0:t.wheelDelta?(t.wheelDeltaY||t.wheelDelta)/2:t.detail&&32765>Math.abs(t.detail)?-(20*t.detail):t.detail?-(60*(t.detail/32765)):0}function eE(t,e){var i=e.relatedTarget;if(!i)return!0;try{for(;i&&i!==t;)i=i.parentNode}catch(t){return!1}return i!==t}var eT=j.extend({run:function(t,e,i,n){this.stop(),this._el=t,this._inProgress=!0,this._duration=i||.25,this._easeOutPower=1/Math.max(n||.5,.2),this._startPos=er(t),this._offset=e.subtract(this._startPos),this._startTime=+new Date,this.fire("start"),this._animate()},stop:function(){this._inProgress&&(this._step(!0),this._complete())},_animate:function(){this._animId=I(this._animate,this),this._step()},_step:function(t){var e=new Date-this._startTime,i=1e3*this._duration;ethis.options.maxZoom))?this.setZoom(t):this},panInsideBounds:function(t,e){this._enforcingBounds=!0;var i=this.getCenter(),n=this._limitCenter(i,this._zoom,q(t));return i.equals(n)||this.panTo(n,e),this._enforcingBounds=!1,this},panInside:function(t,e){var i=F((e=e||{}).paddingTopLeft||e.padding||[0,0]),n=F(e.paddingBottomRight||e.padding||[0,0]),r=this.project(this.getCenter()),o=this.project(t),s=this.getPixelBounds(),a=V([s.min.add(i),s.max.subtract(n)]),l=a.getSize();if(!a.contains(o)){this._enforcingBounds=!0;var h=o.subtract(a.getCenter()),u=a.extend(o).getSize().subtract(l);r.x+=h.x<0?-u.x:u.x,r.y+=h.y<0?-u.y:u.y,this.panTo(this.unproject(r),e),this._enforcingBounds=!1}return this},invalidateSize:function(t){if(!this._loaded)return this;t=e({animate:!1,pan:!0},!0===t?{animate:!0}:t);var i=this.getSize();this._sizeChanged=!0,this._lastCenter=null;var n=this.getSize(),r=i.divideBy(2).round(),o=n.divideBy(2).round(),s=r.subtract(o);return s.x||s.y?(t.animate&&t.pan?this.panBy(s):(t.pan&&this._rawPanBy(s),this.fire("move"),t.debounceMoveend?(clearTimeout(this._sizeTimer),this._sizeTimer=setTimeout(d(this.fire,this,"moveend"),200)):this.fire("moveend")),this.fire("resize",{oldSize:i,newSize:n})):this},stop:function(){return this.setZoom(this._limitZoom(this._zoom)),this.options.zoomSnap||this.fire("viewreset"),this._stop()},locate:function(t){if(t=this._locateOptions=e({timeout:1e4,watch:!1},t),!("geolocation"in navigator))return this._handleGeolocationError({code:0,message:"Geolocation not supported."}),this;var i=d(this._handleGeolocationResponse,this),n=d(this._handleGeolocationError,this);return t.watch?this._locationWatchId=navigator.geolocation.watchPosition(i,n,t):navigator.geolocation.getCurrentPosition(i,n,t),this},stopLocate:function(){return navigator.geolocation&&navigator.geolocation.clearWatch&&navigator.geolocation.clearWatch(this._locationWatchId),this._locateOptions&&(this._locateOptions.setView=!1),this},_handleGeolocationError:function(t){if(this._container._leaflet_id){var e=t.code,i=t.message||(1===e?"permission denied":2===e?"position unavailable":"timeout");this._locateOptions.setView&&!this._loaded&&this.fitWorld(),this.fire("locationerror",{code:e,message:"Geolocation error: "+i+"."})}},_handleGeolocationResponse:function(t){if(this._container._leaflet_id){var e=new K(t.coords.latitude,t.coords.longitude),i=e.toBounds(2*t.coords.accuracy),n=this._locateOptions;if(n.setView){var r=this.getBoundsZoom(i);this.setView(e,n.maxZoom?Math.min(r,n.maxZoom):r)}var o={latlng:e,bounds:i,timestamp:t.timestamp};for(var s in t.coords)"number"==typeof t.coords[s]&&(o[s]=t.coords[s]);this.fire("locationfound",o)}},addHandler:function(t,e){if(!e)return this;var i=this[t]=new e(this);return this._handlers.push(i),this.options[t]&&i.enable(),this},remove:function(){var t;if(this._initEvents(!0),this.options.maxBounds&&this.off("moveend",this._panInsideMaxBounds),this._containerId!==this._container._leaflet_id)throw Error("Map container is being reused by another instance");try{delete this._container._leaflet_id,delete this._containerId}catch(t){this._container._leaflet_id=void 0,this._containerId=void 0}for(t in void 0!==this._locationWatchId&&this.stopLocate(),this._stop(),t1(this._mapPane),this._clearControlPos&&this._clearControlPos(),this._resizeRequest&&(A(this._resizeRequest),this._resizeRequest=null),this._clearHandlers(),this._loaded&&this.fire("unload"),this._layers)this._layers[t].remove();for(t in this._panes)t1(this._panes[t]);return this._layers=[],this._panes=[],delete this._mapPane,delete this._renderer,this},createPane:function(t,e){var i=t0("div","leaflet-pane"+(t?" leaflet-"+t.replace("Pane","")+"-pane":""),e||this._mapPane);return t&&(this._panes[t]=i),i},getCenter:function(){return(this._checkIfLoaded(),this._lastCenter&&!this._moved())?this._lastCenter.clone():this.layerPointToLatLng(this._getCenterLayerPoint())},getZoom:function(){return this._zoom},getBounds:function(){var t=this.getPixelBounds();return new H(this.unproject(t.getBottomLeft()),this.unproject(t.getTopRight()))},getMinZoom:function(){return void 0===this.options.minZoom?this._layersMinZoom||0:this.options.minZoom},getMaxZoom:function(){return void 0===this.options.maxZoom?void 0===this._layersMaxZoom?1/0:this._layersMaxZoom:this.options.maxZoom},getBoundsZoom:function(t,e,i){t=q(t),i=F(i||[0,0]);var n=this.getZoom()||0,r=this.getMinZoom(),o=this.getMaxZoom(),s=t.getNorthWest(),a=t.getSouthEast(),l=this.getSize().subtract(i),h=V(this.project(a,n),this.project(s,n)).getSize(),u=tA.any3d?this.options.zoomSnap:1,p=l.x/h.x,c=l.y/h.y,d=e?Math.max(p,c):Math.min(p,c);return n=this.getScaleZoom(d,n),u&&(n=u/100*Math.round(n/(u/100)),n=e?Math.ceil(n/u)*u:Math.floor(n/u)*u),Math.max(r,Math.min(o,n))},getSize:function(){return(!this._size||this._sizeChanged)&&(this._size=new G(this._container.clientWidth||0,this._container.clientHeight||0),this._sizeChanged=!1),this._size.clone()},getPixelBounds:function(t,e){var i=this._getTopLeftPoint(t,e);return new U(i,i.add(this.getSize()))},getPixelOrigin:function(){return this._checkIfLoaded(),this._pixelOrigin},getPixelWorldBounds:function(t){return this.options.crs.getProjectedBounds(void 0===t?this.getZoom():t)},getPane:function(t){return"string"==typeof t?this._panes[t]:t},getPanes:function(){return this._panes},getContainer:function(){return this._container},getZoomScale:function(t,e){var i=this.options.crs;return e=void 0===e?this._zoom:e,i.scale(t)/i.scale(e)},getScaleZoom:function(t,e){var i=this.options.crs;e=void 0===e?this._zoom:e;var n=i.zoom(t*i.scale(e));return isNaN(n)?1/0:n},project:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.latLngToPoint(W(t),e)},unproject:function(t,e){return e=void 0===e?this._zoom:e,this.options.crs.pointToLatLng(F(t),e)},layerPointToLatLng:function(t){var e=F(t).add(this.getPixelOrigin());return this.unproject(e)},latLngToLayerPoint:function(t){return this.project(W(t))._round()._subtract(this.getPixelOrigin())},wrapLatLng:function(t){return this.options.crs.wrapLatLng(W(t))},wrapLatLngBounds:function(t){return this.options.crs.wrapLatLngBounds(q(t))},distance:function(t,e){return this.options.crs.distance(W(t),W(e))},containerPointToLayerPoint:function(t){return F(t).subtract(this._getMapPanePos())},layerPointToContainerPoint:function(t){return F(t).add(this._getMapPanePos())},containerPointToLatLng:function(t){var e=this.containerPointToLayerPoint(F(t));return this.layerPointToLatLng(e)},latLngToContainerPoint:function(t){return this.layerPointToContainerPoint(this.latLngToLayerPoint(W(t)))},mouseEventToContainerPoint:function(t){return ew(t,this._container)},mouseEventToLayerPoint:function(t){return this.containerPointToLayerPoint(this.mouseEventToContainerPoint(t))},mouseEventToLatLng:function(t){return this.layerPointToLatLng(this.mouseEventToLayerPoint(t))},_initContainer:function(t){var e=this._container=t$(t);if(e){if(e._leaflet_id)throw Error("Map container is already initialized.")}else throw Error("Map container not found.");ec(e,"scroll",this._onScroll,this),this._containerId=f(e)},_initLayout:function(){var t=this._container;this._fadeAnimated=this.options.fadeAnimation&&tA.any3d,t5(t,"leaflet-container"+(tA.touch?" leaflet-touch":"")+(tA.retina?" leaflet-retina":"")+(tA.ielt9?" leaflet-oldie":"")+(tA.safari?" leaflet-safari":"")+(this._fadeAnimated?" leaflet-fade-anim":""));var e=tQ(t,"position");"absolute"!==e&&"relative"!==e&&"fixed"!==e&&"sticky"!==e&&(t.style.position="relative"),this._initPanes(),this._initControlPos&&this._initControlPos()},_initPanes:function(){var t=this._panes={};this._paneRenderers={},this._mapPane=this.createPane("mapPane",this._container),en(this._mapPane,new G(0,0)),this.createPane("tilePane"),this.createPane("overlayPane"),this.createPane("shadowPane"),this.createPane("markerPane"),this.createPane("tooltipPane"),this.createPane("popupPane"),this.options.markerZoomAnimation||(t5(t.markerPane,"leaflet-zoom-hide"),t5(t.shadowPane,"leaflet-zoom-hide"))},_resetView:function(t,e,i){en(this._mapPane,new G(0,0));var n=!this._loaded;this._loaded=!0,e=this._limitZoom(e),this.fire("viewprereset");var r=this._zoom!==e;this._moveStart(r,i)._move(t,e)._moveEnd(r),this.fire("viewreset"),n&&this.fire("load")},_moveStart:function(t,e){return t&&this.fire("zoomstart"),e||this.fire("movestart"),this},_move:function(t,e,i,n){void 0===e&&(e=this._zoom);var r=this._zoom!==e;return this._zoom=e,this._lastCenter=t,this._pixelOrigin=this._getNewPixelOrigin(t),n?i&&i.pinch&&this.fire("zoom",i):((r||i&&i.pinch)&&this.fire("zoom",i),this.fire("move",i)),this},_moveEnd:function(t){return t&&this.fire("zoomend"),this.fire("moveend")},_stop:function(){return A(this._flyToFrame),this._panAnim&&this._panAnim.stop(),this},_rawPanBy:function(t){en(this._mapPane,this._getMapPanePos().subtract(t))},_getZoomSpan:function(){return this.getMaxZoom()-this.getMinZoom()},_panInsideMaxBounds:function(){this._enforcingBounds||this.panInsideBounds(this.options.maxBounds)},_checkIfLoaded:function(){if(!this._loaded)throw Error("Set map center and zoom first.")},_initEvents:function(t){this._targets={},this._targets[f(this._container)]=this;var e=t?e_:ec;e(this._container,"click dblclick mousedown mouseup mouseover mouseout mousemove contextmenu keypress keydown keyup",this._handleDOMEvent,this),this.options.trackResize&&e(window,"resize",this._onResize,this),tA.any3d&&this.options.transform3DLimit&&(t?this.off:this.on).call(this,"moveend",this._onMoveEnd)},_onResize:function(){A(this._resizeRequest),this._resizeRequest=I(function(){this.invalidateSize({debounceMoveend:!0})},this)},_onScroll:function(){this._container.scrollTop=0,this._container.scrollLeft=0},_onMoveEnd:function(){var t=this._getMapPanePos();Math.max(Math.abs(t.x),Math.abs(t.y))>=this.options.transform3DLimit&&this._resetView(this.getCenter(),this.getZoom())},_findEventTargets:function(t,e){for(var i,n=[],r="mouseout"===e||"mouseover"===e,o=t.target||t.srcElement,s=!1;o;){if((i=this._targets[f(o)])&&("click"===e||"preclick"===e)&&this._draggableMoved(i)){s=!0;break}if(i&&i.listens(e,!0)&&(r&&!eE(o,t)||(n.push(i),r)))break;if(o===this._container)break;o=o.parentNode}return!n.length&&!s&&!r&&this.listens(e,!0)&&(n=[this]),n},_isClickDisabled:function(t){for(;t&&t!==this._container;){if(t._leaflet_disable_click)return!0;t=t.parentNode}},_handleDOMEvent:function(t){var e=t.target||t.srcElement;if(!(!this._loaded||e._leaflet_disable_events||"click"===t.type&&this._isClickDisabled(e))){var i=t.type;"mousedown"===i&&el(e),this._fireDOMEvent(t,i)}},_mouseEvents:["click","dblclick","mouseover","mouseout","contextmenu"],_fireDOMEvent:function(t,i,n){if("click"===t.type){var r=e({},t);r.type="preclick",this._fireDOMEvent(r,r.type,n)}var o=this._findEventTargets(t,i);if(n){for(var s=[],a=0;a=Math.abs(s.x)&&1>=Math.abs(s.y)?t:this.unproject(n.add(s),e)},_limitOffset:function(t,e){if(!e)return t;var i=this.getPixelBounds(),n=new U(i.min.add(t),i.max.add(t));return t.add(this._getBoundsOffset(n,e))},_getBoundsOffset:function(t,e,i){var n=V(this.project(e.getNorthEast(),i),this.project(e.getSouthWest(),i)),r=n.min.subtract(t.min),o=n.max.subtract(t.max);return new G(this._rebound(r.x,-o.x),this._rebound(r.y,-o.y))},_rebound:function(t,e){return t+e>0?Math.round(t-e)/2:Math.max(0,Math.ceil(t))-Math.max(0,Math.floor(e))},_limitZoom:function(t){var e=this.getMinZoom(),i=this.getMaxZoom(),n=tA.any3d?this.options.zoomSnap:1;return n&&(t=Math.round(t/n)*n),Math.max(e,Math.min(i,t))},_onPanTransitionStep:function(){this.fire("move")},_onPanTransitionEnd:function(){t6(this._mapPane,"leaflet-pan-anim"),this.fire("moveend")},_tryAnimatedPan:function(t,e){var i=this._getCenterOffset(t)._trunc();return(!0===(e&&e.animate)||!!this.getSize().contains(i))&&(this.panBy(i,e),!0)},_createAnimProxy:function(){var t=this._proxy=t0("div","leaflet-proxy leaflet-zoom-animated");this._panes.mapPane.appendChild(t),this.on("zoomanim",function(t){var e=this._proxy.style[tY];ei(this._proxy,this.project(t.center,t.zoom),this.getZoomScale(t.zoom,1)),e===this._proxy.style[tY]&&this._animatingZoom&&this._onZoomTransitionEnd()},this),this.on("load moveend",this._animMoveEnd,this),this._on("unload",this._destroyAnimProxy,this)},_destroyAnimProxy:function(){t1(this._proxy),this.off("load moveend",this._animMoveEnd,this),delete this._proxy},_animMoveEnd:function(){var t=this.getCenter(),e=this.getZoom();ei(this._proxy,this.project(t,e),this.getZoomScale(e,1))},_catchTransitionEnd:function(t){this._animatingZoom&&t.propertyName.indexOf("transform")>=0&&this._onZoomTransitionEnd()},_nothingToAnimate:function(){return!this._container.getElementsByClassName("leaflet-zoom-animated").length},_tryAnimatedZoom:function(t,e,i){if(this._animatingZoom)return!0;if(i=i||{},!this._zoomAnimated||!1===i.animate||this._nothingToAnimate()||Math.abs(e-this._zoom)>this.options.zoomAnimationThreshold)return!1;var n=this.getZoomScale(e),r=this._getCenterOffset(t)._divideBy(1-1/n);return(!0===i.animate||!!this.getSize().contains(r))&&(I(function(){this._moveStart(!0,i.noMoveStart||!1)._animateZoom(t,e,!0)},this),!0)},_animateZoom:function(t,e,i,n){this._mapPane&&(i&&(this._animatingZoom=!0,this._animateToCenter=t,this._animateToZoom=e,t5(this._mapPane,"leaflet-zoom-anim")),this.fire("zoomanim",{center:t,zoom:e,noUpdate:n}),this._tempFireZoomEvent||(this._tempFireZoomEvent=this._zoom!==this._animateToZoom),this._move(this._animateToCenter,this._animateToZoom,void 0,!0),setTimeout(d(this._onZoomTransitionEnd,this),250))},_onZoomTransitionEnd:function(){this._animatingZoom&&(this._mapPane&&t6(this._mapPane,"leaflet-zoom-anim"),this._animatingZoom=!1,this._move(this._animateToCenter,this._animateToZoom,void 0,!0),this._tempFireZoomEvent&&this.fire("zoom"),delete this._tempFireZoomEvent,this.fire("move"),this._moveEnd(!0))}}),eB=z.extend({options:{position:"topright"},initialize:function(t){M(this,t)},getPosition:function(){return this.options.position},setPosition:function(t){var e=this._map;return e&&e.removeControl(this),this.options.position=t,e&&e.addControl(this),this},getContainer:function(){return this._container},addTo:function(t){this.remove(),this._map=t;var e=this._container=this.onAdd(t),i=this.getPosition(),n=t._controlCorners[i];return t5(e,"leaflet-control"),-1!==i.indexOf("bottom")?n.insertBefore(e,n.firstChild):n.appendChild(e),this._map.on("unload",this.remove,this),this},remove:function(){return this._map&&(t1(this._container),this.onRemove&&this.onRemove(this._map),this._map.off("unload",this.remove,this),this._map=null),this},_refocusOnMap:function(t){this._map&&t&&t.screenX>0&&t.screenY>0&&this._map.getContainer().focus()}}),eO=function(t){return new eB(t)};eS.include({addControl:function(t){return t.addTo(this),this},removeControl:function(t){return t.remove(),this},_initControlPos:function(){var t=this._controlCorners={},e="leaflet-",i=this._controlContainer=t0("div",e+"control-container",this._container);function n(n,r){t[n+r]=t0("div",e+n+" "+e+r,i)}n("top","left"),n("top","right"),n("bottom","left"),n("bottom","right")},_clearControlPos:function(){for(var t in this._controlCorners)t1(this._controlCorners[t]);t1(this._controlContainer),delete this._controlCorners,delete this._controlContainer}});var eD=eB.extend({options:{collapsed:!0,position:"topright",autoZIndex:!0,hideSingleBase:!1,sortLayers:!1,sortFunction:function(t,e,i,n){return i1,this._baseLayersList.style.display=t?"":"none"),this._separator.style.display=e&&t?"":"none",this},_onLayerChange:function(t){this._handlingClick||this._update();var e=this._getLayer(f(t.target)),i=e.overlay?"add"===t.type?"overlayadd":"overlayremove":"add"===t.type?"baselayerchange":null;i&&this._map.fire(i,e)},_createRadioElement:function(t,e){var i=document.createElement("div");return i.innerHTML='",i.firstChild},_addItem:function(t){var e,i=document.createElement("label"),n=this._map.hasLayer(t.layer);t.overlay?((e=document.createElement("input")).type="checkbox",e.className="leaflet-control-layers-selector",e.defaultChecked=n):e=this._createRadioElement("leaflet-base-layers_"+f(this),n),this._layerControlInputs.push(e),e.layerId=f(t.layer),ec(e,"click",this._onInputClick,this);var r=document.createElement("span");r.innerHTML=" "+t.name;var o=document.createElement("span");return i.appendChild(o),o.appendChild(e),o.appendChild(r),(t.overlay?this._overlaysList:this._baseLayersList).appendChild(i),this._checkDisabledLayers(),i},_onInputClick:function(){if(!this._preventClick){var t,e,i=this._layerControlInputs,n=[],r=[];this._handlingClick=!0;for(var o=i.length-1;o>=0;o--)t=i[o],e=this._getLayer(t.layerId).layer,t.checked?n.push(e):t.checked||r.push(e);for(o=0;o=0;r--)t=i[r],e=this._getLayer(t.layerId).layer,t.disabled=void 0!==e.options.minZoom&&ne.options.maxZoom},_expandIfNotCollapsed:function(){return this._map&&!this.options.collapsed&&this.expand(),this},_expandSafely:function(){var t=this._section;this._preventClick=!0,ec(t,"click",ek),this.expand();var e=this;setTimeout(function(){e_(t,"click",ek),e._preventClick=!1})}}),eR=eB.extend({options:{position:"topleft",zoomInText:'',zoomInTitle:"Zoom in",zoomOutText:'',zoomOutTitle:"Zoom out"},onAdd:function(t){var e="leaflet-control-zoom",i=t0("div",e+" leaflet-bar"),n=this.options;return this._zoomInButton=this._createButton(n.zoomInText,n.zoomInTitle,e+"-in",i,this._zoomIn),this._zoomOutButton=this._createButton(n.zoomOutText,n.zoomOutTitle,e+"-out",i,this._zoomOut),this._updateDisabled(),t.on("zoomend zoomlevelschange",this._updateDisabled,this),i},onRemove:function(t){t.off("zoomend zoomlevelschange",this._updateDisabled,this)},disable:function(){return this._disabled=!0,this._updateDisabled(),this},enable:function(){return this._disabled=!1,this._updateDisabled(),this},_zoomIn:function(t){!this._disabled&&this._map._zoomthis._map.getMinZoom()&&this._map.zoomOut(this._map.options.zoomDelta*(t.shiftKey?3:1))},_createButton:function(t,e,i,n,r){var o=t0("a",i,n);return o.innerHTML=t,o.href="#",o.title=e,o.setAttribute("role","button"),o.setAttribute("aria-label",e),eb(o),ec(o,"click",eM),ec(o,"click",r,this),ec(o,"click",this._refocusOnMap,this),o},_updateDisabled:function(){var t=this._map,e="leaflet-disabled";t6(this._zoomInButton,e),t6(this._zoomOutButton,e),this._zoomInButton.setAttribute("aria-disabled","false"),this._zoomOutButton.setAttribute("aria-disabled","false"),(this._disabled||t._zoom===t.getMinZoom())&&(t5(this._zoomOutButton,e),this._zoomOutButton.setAttribute("aria-disabled","true")),(this._disabled||t._zoom===t.getMaxZoom())&&(t5(this._zoomInButton,e),this._zoomInButton.setAttribute("aria-disabled","true"))}});eS.mergeOptions({zoomControl:!0}),eS.addInitHook(function(){this.options.zoomControl&&(this.zoomControl=new eR,this.addControl(this.zoomControl))});var eI=eB.extend({options:{position:"bottomleft",maxWidth:100,metric:!0,imperial:!0},onAdd:function(t){var e="leaflet-control-scale",i=t0("div",e),n=this.options;return this._addScales(n,e+"-line",i),t.on(n.updateWhenIdle?"moveend":"move",this._update,this),t.whenReady(this._update,this),i},onRemove:function(t){t.off(this.options.updateWhenIdle?"moveend":"move",this._update,this)},_addScales:function(t,e,i){t.metric&&(this._mScale=t0("div",e,i)),t.imperial&&(this._iScale=t0("div",e,i))},_update:function(){var t=this._map,e=t.getSize().y/2,i=t.distance(t.containerPointToLatLng([0,e]),t.containerPointToLatLng([this.options.maxWidth,e]));this._updateScales(i)},_updateScales:function(t){this.options.metric&&t&&this._updateMetric(t),this.options.imperial&&t&&this._updateImperial(t)},_updateMetric:function(t){var e=this._getRoundNum(t);this._updateScale(this._mScale,e<1e3?e+" m":e/1e3+" km",e/t)},_updateImperial:function(t){var e,i,n,r=3.2808399*t;r>5280?(e=r/5280,i=this._getRoundNum(e),this._updateScale(this._iScale,i+" mi",i/e)):(n=this._getRoundNum(r),this._updateScale(this._iScale,n+" ft",n/r))},_updateScale:function(t,e,i){t.style.width=Math.round(this.options.maxWidth*i)+"px",t.innerHTML=e},_getRoundNum:function(t){var e=Math.pow(10,(Math.floor(t)+"").length-1),i=t/e;return e*(i=i>=10?10:i>=5?5:i>=3?3:i>=2?2:1)}}),eA=eB.extend({options:{position:"bottomright",prefix:''+(tA.inlineSvg?' ':"")+"Leaflet"},initialize:function(t){M(this,t),this._attributions={}},onAdd:function(t){for(var e in t.attributionControl=this,this._container=t0("div","leaflet-control-attribution"),eb(this._container),t._layers)t._layers[e].getAttribution&&this.addAttribution(t._layers[e].getAttribution());return this._update(),t.on("layeradd",this._addAttribution,this),this._container},onRemove:function(t){t.off("layeradd",this._addAttribution,this)},_addAttribution:function(t){t.layer.getAttribution&&(this.addAttribution(t.layer.getAttribution()),t.layer.once("remove",function(){this.removeAttribution(t.layer.getAttribution())},this))},setPrefix:function(t){return this.options.prefix=t,this._update(),this},addAttribution:function(t){return t&&(this._attributions[t]||(this._attributions[t]=0),this._attributions[t]++,this._update()),this},removeAttribution:function(t){return t&&this._attributions[t]&&(this._attributions[t]--,this._update()),this},_update:function(){if(this._map){var t=[];for(var e in this._attributions)this._attributions[e]&&t.push(e);var i=[];this.options.prefix&&i.push(this.options.prefix),t.length&&i.push(t.join(", ")),this._container.innerHTML=i.join(' ')}}});eS.mergeOptions({attributionControl:!0}),eS.addInitHook(function(){this.options.attributionControl&&new eA().addTo(this)}),eB.Layers=eD,eB.Zoom=eR,eB.Scale=eI,eB.Attribution=eA,eO.layers=function(t,e,i){return new eD(t,e,i)},eO.zoom=function(t){return new eR(t)},eO.scale=function(t){return new eI(t)},eO.attribution=function(t){return new eA(t)};var ez=z.extend({initialize:function(t){this._map=t},enable:function(){return this._enabled||(this._enabled=!0,this.addHooks()),this},disable:function(){return this._enabled&&(this._enabled=!1,this.removeHooks()),this},enabled:function(){return!!this._enabled}});ez.addTo=function(t,e){return t.addHandler(e,this),this};var eN=tA.touch?"touchstart mousedown":"mousedown",ej=j.extend({options:{clickTolerance:3},initialize:function(t,e,i,n){M(this,n),this._element=t,this._dragStartTarget=e||t,this._preventOutline=i},enable:function(){this._enabled||(ec(this._dragStartTarget,eN,this._onDown,this),this._enabled=!0)},disable:function(){this._enabled&&(ej._dragging===this&&this.finishDrag(!0),e_(this._dragStartTarget,eN,this._onDown,this),this._enabled=!1,this._moved=!1)},_onDown:function(t){if(!(!this._enabled||(this._moved=!1,t8(this._element,"leaflet-zoom-anim")))){if(t.touches&&1!==t.touches.length){ej._dragging===this&&this.finishDrag();return}if(!ej._dragging&&!t.shiftKey&&(1===t.which||1===t.button||t.touches)&&(ej._dragging=this,this._preventOutline&&el(this._element),es(),i(),!this._moving)){this.fire("down");var e=t.touches?t.touches[0]:t,n=eu(this._element);this._startPoint=new G(e.clientX,e.clientY),this._startPos=er(this._element),this._parentScale=ep(n);var r="mousedown"===t.type;ec(document,r?"mousemove":"touchmove",this._onMove,this),ec(document,r?"mouseup":"touchend touchcancel",this._onUp,this)}}},_onMove:function(t){if(this._enabled){if(t.touches&&t.touches.length>1){this._moved=!0;return}var e=t.touches&&1===t.touches.length?t.touches[0]:t,i=new G(e.clientX,e.clientY)._subtract(this._startPoint);(i.x||i.y)&&(Math.abs(i.x)+Math.abs(i.y)typeof Uint8Array?Uint8Array:Array)(i);n[0]=n[i-1]=1,function t(e,i,n,r,o){var s,a,l,h=0;for(a=r+1;a<=o-1;a++)(l=eW(e[a],e[r],e[o],!0))>h&&(s=a,h=l);h>n&&(i[s]=1,t(e,i,n,r,s),t(e,i,n,s,o))}(t,n,e,0,i-1);var r,o=[];for(r=0;re&&(i.push(t[n]),r=n);return re.max.x&&(i|=2),t.ye.max.y&&(i|=8),i}function eW(t,e,i,n){var r,o=e.x,s=e.y,a=i.x-o,l=i.y-s,h=a*a+l*l;return h>0&&((r=((t.x-o)*a+(t.y-s)*l)/h)>1?(o=i.x,s=i.y):r>0&&(o+=a*r,s+=l*r)),a=t.x-o,l=t.y-s,n?a*a+l*l:new G(o,s)}function eY(t){return!P(t[0])||"object"!=typeof t[0][0]&&void 0!==t[0][0]}function eX(t){return console.warn("Deprecated use of _flat, please use L.LineUtil.isFlat instead."),eY(t)}function eJ(t,e){if(!t||0===t.length)throw Error("latlngs not passed");eY(t)||(console.warn("latlngs are not flat! Only the first ring will be used"),t=t[0]);var i,n,r,o,s,a,l,h,u=W([0,0]),p=q(t);p.getNorthWest().distanceTo(p.getSouthWest())*p.getNorthEast().distanceTo(p.getNorthWest())<1700&&(u=eF(t));var c=t.length,d=[];for(i=0;in){l=(o-n)/r,h=[a.x-l*(a.x-s.x),a.y-l*(a.y-s.y)];break}var f=e.unproject(F(h));return W([f.lat+u.lat,f.lng+u.lng])}var e$={project:function(t){return new G(t.lng,t.lat)},unproject:function(t){return new K(t.y,t.x)},bounds:new U([-180,-90],[180,90])},eQ={R:6378137,R_MINOR:6356752.314245179,bounds:new U([-20037508.34279,-15496570.73972],[20037508.34279,18764656.23138]),project:function(t){var e=Math.PI/180,i=this.R,n=t.lat*e,r=this.R_MINOR/i,o=Math.sqrt(1-r*r),s=o*Math.sin(n);return n=-i*Math.log(Math.max(Math.tan(Math.PI/4-n/2)/Math.pow((1-s)/(1+s),o/2),1e-10)),new G(t.lng*e*i,n)},unproject:function(t){for(var e,i=180/Math.PI,n=this.R,r=this.R_MINOR/n,o=Math.sqrt(1-r*r),s=Math.exp(-t.y/n),a=Math.PI/2-2*Math.atan(s),l=0,h=.1;l<15&&Math.abs(h)>1e-7;l++)h=Math.PI/2-2*Math.atan(s*(e=Math.pow((1-(e=o*Math.sin(a)))/(1+e),o/2)))-a,a+=h;return new K(a*i,t.x*i/n)}},e0=e({},X,{code:"EPSG:3395",projection:eQ,transformation:Q(p=.5/(Math.PI*eQ.R),.5,-p,.5)}),e1=e({},X,{code:"EPSG:4326",projection:e$,transformation:Q(1/180,1,-1/180,.5)}),e2=e({},Y,{projection:e$,transformation:Q(1,0,-1,0),scale:function(t){return Math.pow(2,t)},zoom:function(t){return Math.log(t)/Math.LN2},distance:function(t,e){var i=e.lng-t.lng,n=e.lat-t.lat;return Math.sqrt(i*i+n*n)},infinite:!0});Y.Earth=X,Y.EPSG3395=e0,Y.EPSG3857=tt,Y.EPSG900913=te,Y.EPSG4326=e1,Y.Simple=e2;var e3=j.extend({options:{pane:"overlayPane",attribution:null,bubblingMouseEvents:!0},addTo:function(t){return t.addLayer(this),this},remove:function(){return this.removeFrom(this._map||this._mapToAdd)},removeFrom:function(t){return t&&t.removeLayer(this),this},getPane:function(t){return this._map.getPane(t?this.options[t]||t:this.options.pane)},addInteractiveTarget:function(t){return this._map._targets[f(t)]=this,this},removeInteractiveTarget:function(t){return delete this._map._targets[f(t)],this},getAttribution:function(){return this.options.attribution},_layerAdd:function(t){var e=t.target;if(e.hasLayer(this)){if(this._map=e,this._zoomAnimated=e._zoomAnimated,this.getEvents){var i=this.getEvents();e.on(i,this),this.once("remove",function(){e.off(i,this)},this)}this.onAdd(e),this.fire("add"),e.fire("layeradd",{layer:this})}}});eS.include({addLayer:function(t){if(!t._layerAdd)throw Error("The provided object is not a Layer.");var e=f(t);return this._layers[e]||(this._layers[e]=t,t._mapToAdd=this,t.beforeAdd&&t.beforeAdd(this),this.whenReady(t._layerAdd,t)),this},removeLayer:function(t){var e=f(t);return this._layers[e]&&(this._loaded&&t.onRemove(this),delete this._layers[e],this._loaded&&(this.fire("layerremove",{layer:t}),t.fire("remove")),t._map=t._mapToAdd=null),this},hasLayer:function(t){return f(t)in this._layers},eachLayer:function(t,e){for(var i in this._layers)t.call(e,this._layers[i]);return this},_addLayers:function(t){t=t?P(t)?t:[t]:[];for(var e=0,i=t.length;ethis._layersMaxZoom&&this.setZoom(this._layersMaxZoom),void 0===this.options.minZoom&&this._layersMinZoom&&this.getZoom()=2&&e[0]instanceof K&&e[0].equals(e[i-1])&&e.pop(),e},_setLatLngs:function(t){ir.prototype._setLatLngs.call(this,t),eY(this._latlngs)&&(this._latlngs=[this._latlngs])},_defaultShape:function(){return eY(this._latlngs[0])?this._latlngs[0]:this._latlngs[0][0]},_clipPoints:function(){var t=this._renderer._bounds,e=this.options.weight,i=new G(e,e);if(t=new U(t.min.subtract(i),t.max.add(i)),this._parts=[],this._pxBounds&&this._pxBounds.intersects(t)){if(this.options.noClip){this._parts=this._rings;return}for(var n,r=0,o=this._rings.length;rt.y!=n.y>t.y&&t.x<(n.x-i.x)*(t.y-i.y)/(n.y-i.y)+i.x&&(h=!h);return h||ir.prototype._containsPoint.call(this,t,!0)}}),is=e8.extend({initialize:function(t,e){M(this,e),this._layers={},t&&this.addData(t)},addData:function(t){var e,i,n,r=P(t)?t:t.features;if(r){for(e=0,i=r.length;e0&&r.push(r[0].slice()),r}function id(t,i){return t.feature?e({},t.feature,{geometry:i}):i_(i)}function i_(t){return"Feature"===t.type||"FeatureCollection"===t.type?t:{type:"Feature",properties:{},geometry:t}}var im={toGeoJSON:function(t){return id(this,{type:"Point",coordinates:ip(this.getLatLng(),t)})}};function ig(t,e){return new is(t,e)}e7.include(im),ii.include(im),ie.include(im),ir.include({toGeoJSON:function(t){var e=!eY(this._latlngs),i=ic(this._latlngs,+!!e,!1,t);return id(this,{type:(e?"Multi":"")+"LineString",coordinates:i})}}),io.include({toGeoJSON:function(t){var e=!eY(this._latlngs),i=e&&!eY(this._latlngs[0]),n=ic(this._latlngs,i?2:+!!e,!0,t);return e||(n=[n]),id(this,{type:(i?"Multi":"")+"Polygon",coordinates:n})}}),e4.include({toMultiPoint:function(t){var e=[];return this.eachLayer(function(i){e.push(i.toGeoJSON(t).geometry.coordinates)}),id(this,{type:"MultiPoint",coordinates:e})},toGeoJSON:function(t){var e=this.feature&&this.feature.geometry&&this.feature.geometry.type;if("MultiPoint"===e)return this.toMultiPoint(t);var i="GeometryCollection"===e,n=[];return(this.eachLayer(function(e){if(e.toGeoJSON){var r=e.toGeoJSON(t);if(i)n.push(r.geometry);else{var o=i_(r);"FeatureCollection"===o.type?n.push.apply(n,o.features):n.push(o)}}}),i)?id(this,{geometries:n,type:"GeometryCollection"}):{type:"FeatureCollection",features:n}}});var iy=e3.extend({options:{opacity:1,alt:"",interactive:!1,crossOrigin:!1,errorOverlayUrl:"",zIndex:1,className:""},initialize:function(t,e,i){this._url=t,this._bounds=q(e),M(this,i)},onAdd:function(){!this._image&&(this._initImage(),this.options.opacity<1&&this._updateOpacity()),this.options.interactive&&(t5(this._image,"leaflet-interactive"),this.addInteractiveTarget(this._image)),this.getPane().appendChild(this._image),this._reset()},onRemove:function(){t1(this._image),this.options.interactive&&this.removeInteractiveTarget(this._image)},setOpacity:function(t){return this.options.opacity=t,this._image&&this._updateOpacity(),this},setStyle:function(t){return t.opacity&&this.setOpacity(t.opacity),this},bringToFront:function(){return this._map&&t3(this._image),this},bringToBack:function(){return this._map&&t4(this._image),this},setUrl:function(t){return this._url=t,this._image&&(this._image.src=t),this},setBounds:function(t){return this._bounds=q(t),this._map&&this._reset(),this},getEvents:function(){var t={zoom:this._reset,viewreset:this._reset};return this._zoomAnimated&&(t.zoomanim=this._animateZoom),t},setZIndex:function(t){return this.options.zIndex=t,this._updateZIndex(),this},getBounds:function(){return this._bounds},getElement:function(){return this._image},_initImage:function(){var t="IMG"===this._url.tagName,e=this._image=t?this._url:t0("img");if(t5(e,"leaflet-image-layer"),this._zoomAnimated&&t5(e,"leaflet-zoom-animated"),this.options.className&&t5(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onload=d(this.fire,this,"load"),e.onerror=d(this._overlayOnError,this,"error"),(this.options.crossOrigin||""===this.options.crossOrigin)&&(e.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),this.options.zIndex&&this._updateZIndex(),t){this._url=e.src;return}e.src=this._url,e.alt=this.options.alt},_animateZoom:function(t){var e=this._map.getZoomScale(t.zoom),i=this._map._latLngBoundsToNewLayerBounds(this._bounds,t.zoom,t.center).min;ei(this._image,i,e)},_reset:function(){var t=this._image,e=new U(this._map.latLngToLayerPoint(this._bounds.getNorthWest()),this._map.latLngToLayerPoint(this._bounds.getSouthEast())),i=e.getSize();en(t,e.min),t.style.width=i.x+"px",t.style.height=i.y+"px"},_updateOpacity:function(){et(this._image,this.options.opacity)},_updateZIndex:function(){this._image&&void 0!==this.options.zIndex&&null!==this.options.zIndex&&(this._image.style.zIndex=this.options.zIndex)},_overlayOnError:function(){this.fire("error");var t=this.options.errorOverlayUrl;t&&this._url!==t&&(this._url=t,this._image.src=t)},getCenter:function(){return this._bounds.getCenter()}}),iv=iy.extend({options:{autoplay:!0,loop:!0,keepAspectRatio:!0,muted:!1,playsInline:!0},_initImage:function(){var t="VIDEO"===this._url.tagName,e=this._image=t?this._url:t0("video");if(t5(e,"leaflet-image-layer"),this._zoomAnimated&&t5(e,"leaflet-zoom-animated"),this.options.className&&t5(e,this.options.className),e.onselectstart=y,e.onmousemove=y,e.onloadeddata=d(this.fire,this,"load"),t){for(var i=e.getElementsByTagName("source"),n=[],r=0;r0?n:[e.src];return}P(this._url)||(this._url=[this._url]),!this.options.keepAspectRatio&&Object.prototype.hasOwnProperty.call(e.style,"objectFit")&&(e.style.objectFit="fill"),e.autoplay=!!this.options.autoplay,e.loop=!!this.options.loop,e.muted=!!this.options.muted,e.playsInline=!!this.options.playsInline;for(var o=0;or?(e.height=r+"px",t5(t,o)):t6(t,o),this._containerWidth=this._container.offsetWidth},_animateZoom:function(t){var e=this._map._latLngToNewLayerPoint(this._latlng,t.zoom,t.center),i=this._getAnchor();en(this._container,e.add(i))},_adjustPan:function(){if(this.options.autoPan){if(this._map._panAnim&&this._map._panAnim.stop(),this._autopanning){this._autopanning=!1;return}var t=this._map,e=parseInt(tQ(this._container,"marginBottom"),10)||0,i=this._container.offsetHeight+e,n=this._containerWidth,r=new G(this._containerLeft,-i-this._containerBottom);r._add(er(this._container));var o=t.layerPointToContainerPoint(r),s=F(this.options.autoPanPadding),a=F(this.options.autoPanPaddingTopLeft||s),l=F(this.options.autoPanPaddingBottomRight||s),h=t.getSize(),u=0,p=0;o.x+n+l.x>h.x&&(u=o.x+n-h.x+l.x),o.x-u-a.x<0&&(u=o.x-a.x),o.y+i+l.y>h.y&&(p=o.y+i-h.y+l.y),o.y-p-a.y<0&&(p=o.y-a.y),(u||p)&&(this.options.keepInView&&(this._autopanning=!0),t.fire("autopanstart").panBy([u,p]))}},_getAnchor:function(){return F(this._source&&this._source._getPopupAnchor?this._source._getPopupAnchor():[0,0])}});eS.mergeOptions({closePopupOnClick:!0}),eS.include({openPopup:function(t,e,i){return this._initOverlay(ik,t,e,i).openOn(this),this},closePopup:function(t){return t=arguments.length?t:this._popup,t&&t.close(),this}}),e3.include({bindPopup:function(t,e){return this._popup=this._initOverlay(ik,this._popup,t,e),this._popupHandlersAdded||(this.on({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!0),this},unbindPopup:function(){return this._popup&&(this.off({click:this._openPopup,keypress:this._onKeyPress,remove:this.closePopup,move:this._movePopup}),this._popupHandlersAdded=!1,this._popup=null),this},openPopup:function(t){return this._popup&&(this instanceof e8||(this._popup._source=this),this._popup._prepareOpen(t||this._latlng)&&this._popup.openOn(this._map)),this},closePopup:function(){return this._popup&&this._popup.close(),this},togglePopup:function(){return this._popup&&this._popup.toggle(this),this},isPopupOpen:function(){return!!this._popup&&this._popup.isOpen()},setPopupContent:function(t){return this._popup&&this._popup.setContent(t),this},getPopup:function(){return this._popup},_openPopup:function(t){if(this._popup&&this._map){eM(t);var e=t.layer||t.target;if(this._popup._source===e&&!(e instanceof it))return void(this._map.hasLayer(this._popup)?this.closePopup():this.openPopup(t.latlng));this._popup._source=e,this.openPopup(t.latlng)}},_movePopup:function(t){this._popup.setLatLng(t.latlng)},_onKeyPress:function(t){13===t.originalEvent.keyCode&&this._openPopup(t)}});var iM=ib.extend({options:{pane:"tooltipPane",offset:[0,0],direction:"auto",permanent:!1,sticky:!1,opacity:.9},onAdd:function(t){ib.prototype.onAdd.call(this,t),this.setOpacity(this.options.opacity),t.fire("tooltipopen",{tooltip:this}),this._source&&(this.addEventParent(this._source),this._source.fire("tooltipopen",{tooltip:this},!0))},onRemove:function(t){ib.prototype.onRemove.call(this,t),t.fire("tooltipclose",{tooltip:this}),this._source&&(this.removeEventParent(this._source),this._source.fire("tooltipclose",{tooltip:this},!0))},getEvents:function(){var t=ib.prototype.getEvents.call(this);return this.options.permanent||(t.preclick=this.close),t},_initLayout:function(){var t="leaflet-tooltip "+(this.options.className||"")+" leaflet-zoom-"+(this._zoomAnimated?"animated":"hide");this._contentNode=this._container=t0("div",t),this._container.setAttribute("role","tooltip"),this._container.setAttribute("id","leaflet-tooltip-"+f(this))},_updateLayout:function(){},_adjustPan:function(){},_setPosition:function(t){var e,i,n=this._map,r=this._container,o=n.latLngToContainerPoint(n.getCenter()),s=n.layerPointToContainerPoint(t),a=this.options.direction,l=r.offsetWidth,h=r.offsetHeight,u=F(this.options.offset),p=this._getAnchor();"top"===a?(e=l/2,i=h):"bottom"===a?(e=l/2,i=0):("center"===a?e=l/2:"right"===a?e=0:"left"===a?e=l:s.xthis.options.maxZoom||in&&this._retainParent(r,o,s,n))},_retainChildren:function(t,e,i,n){for(var r=2*t;r<2*t+2;r++)for(var o=2*e;o<2*e+2;o++){var s=new G(r,o);s.z=i+1;var a=this._tileCoordsToKey(s),l=this._tiles[a];if(l&&l.active){l.retain=!0;continue}l&&l.loaded&&(l.retain=!0),i+1this.options.maxZoom||void 0!==this.options.minZoom&&r1)return void this._setView(t,i);for(var p=r.min.y;p<=r.max.y;p++)for(var c=r.min.x;c<=r.max.x;c++){var d=new G(c,p);if(d.z=this._tileZoom,this._isValidTile(d)){var _=this._tiles[this._tileCoordsToKey(d)];_?_.current=!0:s.push(d)}}if(s.sort(function(t,e){return t.distanceTo(o)-e.distanceTo(o)}),0!==s.length){this._loading||(this._loading=!0,this.fire("loading"));var f=document.createDocumentFragment();for(c=0;ci.max.x)||!e.wrapLat&&(t.yi.max.y))return!1}if(!this.options.bounds)return!0;var n=this._tileCoordsToBounds(t);return q(this.options.bounds).overlaps(n)},_keyToBounds:function(t){return this._tileCoordsToBounds(this._keyToTileCoords(t))},_tileCoordsToNwSe:function(t){var e=this._map,i=this.getTileSize(),n=t.scaleBy(i),r=n.add(i);return[e.unproject(n,t.z),e.unproject(r,t.z)]},_tileCoordsToBounds:function(t){var e=this._tileCoordsToNwSe(t),i=new H(e[0],e[1]);return this.options.noWrap||(i=this._map.wrapLatLngBounds(i)),i},_tileCoordsToKey:function(t){return t.x+":"+t.y+":"+t.z},_keyToTileCoords:function(t){var e=t.split(":"),i=new G(+e[0],+e[1]);return i.z=+e[2],i},_removeTile:function(t){var e=this._tiles[t];e&&(t1(e.el),delete this._tiles[t],this.fire("tileunload",{tile:e.el,coords:this._keyToTileCoords(t)}))},_initTile:function(t){t5(t,"leaflet-tile");var e=this.getTileSize();t.style.width=e.x+"px",t.style.height=e.y+"px",t.onselectstart=y,t.onmousemove=y,tA.ielt9&&this.options.opacity<1&&et(t,this.options.opacity)},_addTile:function(t,e){var i=this._getTilePos(t),n=this._tileCoordsToKey(t),r=this.createTile(this._wrapCoords(t),d(this._tileReady,this,t));this._initTile(r),this.createTile.length<2&&I(d(this._tileReady,this,t,null,r)),en(r,i),this._tiles[n]={el:r,coords:t,current:!0},e.appendChild(r),this.fire("tileloadstart",{tile:r,coords:t})},_tileReady:function(t,e,i){e&&this.fire("tileerror",{error:e,tile:i,coords:t});var n=this._tileCoordsToKey(t);(i=this._tiles[n])&&(i.loaded=+new Date,this._map._fadeAnimated?(et(i.el,0),A(this._fadeFrame),this._fadeFrame=I(this._updateOpacity,this)):(i.active=!0,this._pruneTiles()),e||(t5(i.el,"leaflet-tile-loaded"),this.fire("tileload",{tile:i.el,coords:t})),this._noTilesToLoad()&&(this._loading=!1,this.fire("load"),tA.ielt9||!this._map._fadeAnimated?I(this._pruneTiles,this):setTimeout(d(this._pruneTiles,this),250)))},_getTilePos:function(t){return t.scaleBy(this.getTileSize()).subtract(this._level.origin)},_wrapCoords:function(t){var e=new G(this._wrapX?g(t.x,this._wrapX):t.x,this._wrapY?g(t.y,this._wrapY):t.y);return e.z=t.z,e},_pxBoundsToTileRange:function(t){var e=this.getTileSize();return new U(t.min.unscaleBy(e).floor(),t.max.unscaleBy(e).ceil().subtract([1,1]))},_noTilesToLoad:function(){for(var t in this._tiles)if(!this._tiles[t].loaded)return!1;return!0}}),iC=iw.extend({options:{minZoom:0,maxZoom:18,subdomains:"abc",errorTileUrl:"",zoomOffset:0,tms:!1,zoomReverse:!1,detectRetina:!1,crossOrigin:!1,referrerPolicy:!1},initialize:function(t,e){this._url=t,(e=M(this,e)).detectRetina&&tA.retina&&e.maxZoom>0?(e.tileSize=Math.floor(e.tileSize/2),e.zoomReverse?(e.zoomOffset--,e.minZoom=Math.min(e.maxZoom,e.minZoom+1)):(e.zoomOffset++,e.maxZoom=Math.max(e.minZoom,e.maxZoom-1)),e.minZoom=Math.max(0,e.minZoom)):e.zoomReverse?e.minZoom=Math.min(e.maxZoom,e.minZoom):e.maxZoom=Math.max(e.minZoom,e.maxZoom),"string"==typeof e.subdomains&&(e.subdomains=e.subdomains.split("")),this.on("tileunload",this._onTileRemove)},setUrl:function(t,e){return this._url===t&&void 0===e&&(e=!0),this._url=t,e||this.redraw(),this},createTile:function(t,e){var i=document.createElement("img");return ec(i,"load",d(this._tileOnLoad,this,e,i)),ec(i,"error",d(this._tileOnError,this,e,i)),(this.options.crossOrigin||""===this.options.crossOrigin)&&(i.crossOrigin=!0===this.options.crossOrigin?"":this.options.crossOrigin),"string"==typeof this.options.referrerPolicy&&(i.referrerPolicy=this.options.referrerPolicy),i.alt="",i.src=this.getTileUrl(t),i},getTileUrl:function(t){var i={r:tA.retina?"@2x":"",s:this._getSubdomain(t),x:t.x,y:t.y,z:this._getZoomForUrl()};if(this._map&&!this._map.options.crs.infinite){var n=this._globalTileRange.max.y-t.y;this.options.tms&&(i.y=n),i["-y"]=n}return C(this._url,e(i,this.options))},_tileOnLoad:function(t,e){tA.ielt9?setTimeout(d(t,this,null,e),0):t(null,e)},_tileOnError:function(t,e,i){var n=this.options.errorTileUrl;n&&e.getAttribute("src")!==n&&(e.src=n),t(i,e)},_onTileRemove:function(t){t.tile.onload=null},_getZoomForUrl:function(){var t=this._tileZoom,e=this.options.maxZoom,i=this.options.zoomReverse,n=this.options.zoomOffset;return i&&(t=e-t),t+n},_getSubdomain:function(t){var e=Math.abs(t.x+t.y)%this.options.subdomains.length;return this.options.subdomains[e]},_abortLoading:function(){var t,e;for(t in this._tiles)if(this._tiles[t].coords.z!==this._tileZoom&&((e=this._tiles[t].el).onload=y,e.onerror=y,!e.complete)){e.src=T;var i=this._tiles[t].coords;t1(e),delete this._tiles[t],this.fire("tileabort",{tile:e,coords:i})}},_removeTile:function(t){var e=this._tiles[t];if(e)return e.el.setAttribute("src",T),iw.prototype._removeTile.call(this,t)},_tileReady:function(t,e,i){if(this._map&&(!i||i.getAttribute("src")!==T))return iw.prototype._tileReady.call(this,t,e,i)}});function iP(t,e){return new iC(t,e)}var iE=iC.extend({defaultWmsParams:{service:"WMS",request:"GetMap",layers:"",styles:"",format:"image/jpeg",transparent:!1,version:"1.1.1"},options:{crs:null,uppercase:!1},initialize:function(t,i){this._url=t;var n=e({},this.defaultWmsParams);for(var r in i)r in this.options||(n[r]=i[r]);var o=(i=M(this,i)).detectRetina&&tA.retina?2:1,s=this.getTileSize();n.width=s.x*o,n.height=s.y*o,this.wmsParams=n},onAdd:function(t){this._crs=this.options.crs||t.options.crs,this._wmsVersion=parseFloat(this.wmsParams.version);var e=this._wmsVersion>=1.3?"crs":"srs";this.wmsParams[e]=this._crs.code,iC.prototype.onAdd.call(this,t)},getTileUrl:function(t){var e=this._tileCoordsToNwSe(t),i=this._crs,n=V(i.project(e[0]),i.project(e[1])),r=n.min,o=n.max,s=(this._wmsVersion>=1.3&&this._crs===e1?[r.y,r.x,o.y,o.x]:[r.x,r.y,o.x,o.y]).join(","),a=iC.prototype.getTileUrl.call(this,t);return a+x(this.wmsParams,a,this.options.uppercase)+(this.options.uppercase?"&BBOX=":"&bbox=")+s},setParams:function(t,i){return e(this.wmsParams,t),i||this.redraw(),this}});iC.WMS=iE,iP.wms=function(t,e){return new iE(t,e)};var iT=e3.extend({options:{padding:.1},initialize:function(t){M(this,t),f(this),this._layers=this._layers||{}},onAdd:function(){this._container||(this._initContainer(),t5(this._container,"leaflet-zoom-animated")),this.getPane().appendChild(this._container),this._update(),this.on("update",this._updatePaths,this)},onRemove:function(){this.off("update",this._updatePaths,this),this._destroyContainer()},getEvents:function(){var t={viewreset:this._reset,zoom:this._onZoom,moveend:this._update,zoomend:this._onZoomEnd};return this._zoomAnimated&&(t.zoomanim=this._onAnimZoom),t},_onAnimZoom:function(t){this._updateTransform(t.center,t.zoom)},_onZoom:function(){this._updateTransform(this._map.getCenter(),this._map.getZoom())},_updateTransform:function(t,e){var i=this._map.getZoomScale(e,this._zoom),n=this._map.getSize().multiplyBy(.5+this.options.padding),r=this._map.project(this._center,e),o=n.multiplyBy(-i).add(r).subtract(this._map._getNewPixelOrigin(t,e));tA.any3d?ei(this._container,o,i):en(this._container,o)},_reset:function(){for(var t in this._update(),this._updateTransform(this._center,this._zoom),this._layers)this._layers[t]._reset()},_onZoomEnd:function(){for(var t in this._layers)this._layers[t]._project()},_updatePaths:function(){for(var t in this._layers)this._layers[t]._update()},_update:function(){var t=this.options.padding,e=this._map.getSize(),i=this._map.containerPointToLayerPoint(e.multiplyBy(-t)).round();this._bounds=new U(i,i.add(e.multiplyBy(1+2*t)).round()),this._center=this._map.getCenter(),this._zoom=this._map.getZoom()}}),iS=iT.extend({options:{tolerance:0},getEvents:function(){var t=iT.prototype.getEvents.call(this);return t.viewprereset=this._onViewPreReset,t},_onViewPreReset:function(){this._postponeUpdatePaths=!0},onAdd:function(){iT.prototype.onAdd.call(this),this._draw()},_initContainer:function(){var t=this._container=document.createElement("canvas");ec(t,"mousemove",this._onMouseMove,this),ec(t,"click dblclick mousedown mouseup contextmenu",this._onClick,this),ec(t,"mouseout",this._handleMouseOut,this),t._leaflet_disable_events=!0,this._ctx=t.getContext("2d")},_destroyContainer:function(){A(this._redrawRequest),delete this._ctx,t1(this._container),e_(this._container),delete this._container},_updatePaths:function(){if(!this._postponeUpdatePaths){for(var t in this._redrawBounds=null,this._layers)this._layers[t]._update();this._redraw()}},_update:function(){if(!this._map._animatingZoom||!this._bounds){iT.prototype._update.call(this);var t=this._bounds,e=this._container,i=t.getSize(),n=tA.retina?2:1;en(e,t.min),e.width=n*i.x,e.height=n*i.y,e.style.width=i.x+"px",e.style.height=i.y+"px",tA.retina&&this._ctx.scale(2,2),this._ctx.translate(-t.min.x,-t.min.y),this.fire("update")}},_reset:function(){iT.prototype._reset.call(this),this._postponeUpdatePaths&&(this._postponeUpdatePaths=!1,this._updatePaths())},_initPath:function(t){this._updateDashArray(t),this._layers[f(t)]=t;var e=t._order={layer:t,prev:this._drawLast,next:null};this._drawLast&&(this._drawLast.next=e),this._drawLast=e,this._drawFirst=this._drawFirst||this._drawLast},_addPath:function(t){this._requestRedraw(t)},_removePath:function(t){var e=t._order,i=e.next,n=e.prev;i?i.prev=n:this._drawLast=n,n?n.next=i:this._drawFirst=i,delete t._order,delete this._layers[f(t)],this._requestRedraw(t)},_updatePath:function(t){this._extendRedrawBounds(t),t._project(),t._update(),this._requestRedraw(t)},_updateStyle:function(t){this._updateDashArray(t),this._requestRedraw(t)},_updateDashArray:function(t){if("string"==typeof t.options.dashArray){var e,i,n=t.options.dashArray.split(/[, ]+/),r=[];for(i=0;i')}}catch(t){}return function(t){return document.createElement("<"+t+' xmlns="urn:schemas-microsoft.com:vml" class="lvml">')}}(),iD=tA.vml?iO:ti,iR=iT.extend({_initContainer:function(){this._container=iD("svg"),this._container.setAttribute("pointer-events","none"),this._rootGroup=iD("g"),this._container.appendChild(this._rootGroup)},_destroyContainer:function(){t1(this._container),e_(this._container),delete this._container,delete this._rootGroup,delete this._svgSize},_update:function(){if(!this._map._animatingZoom||!this._bounds){iT.prototype._update.call(this);var t=this._bounds,e=t.getSize(),i=this._container;this._svgSize&&this._svgSize.equals(e)||(this._svgSize=e,i.setAttribute("width",e.x),i.setAttribute("height",e.y)),en(i,t.min),i.setAttribute("viewBox",[t.min.x,t.min.y,e.x,e.y].join(" ")),this.fire("update")}},_initPath:function(t){var e=t._path=iD("path");t.options.className&&t5(e,t.options.className),t.options.interactive&&t5(e,"leaflet-interactive"),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){this._rootGroup||this._initContainer(),this._rootGroup.appendChild(t._path),t.addInteractiveTarget(t._path)},_removePath:function(t){t1(t._path),t.removeInteractiveTarget(t._path),delete this._layers[f(t)]},_updatePath:function(t){t._project(),t._update()},_updateStyle:function(t){var e=t._path,i=t.options;e&&(i.stroke?(e.setAttribute("stroke",i.color),e.setAttribute("stroke-opacity",i.opacity),e.setAttribute("stroke-width",i.weight),e.setAttribute("stroke-linecap",i.lineCap),e.setAttribute("stroke-linejoin",i.lineJoin),i.dashArray?e.setAttribute("stroke-dasharray",i.dashArray):e.removeAttribute("stroke-dasharray"),i.dashOffset?e.setAttribute("stroke-dashoffset",i.dashOffset):e.removeAttribute("stroke-dashoffset")):e.setAttribute("stroke","none"),i.fill?(e.setAttribute("fill",i.fillColor||i.color),e.setAttribute("fill-opacity",i.fillOpacity),e.setAttribute("fill-rule",i.fillRule||"evenodd")):e.setAttribute("fill","none"))},_updatePoly:function(t,e){this._setPath(t,tn(t._parts,e))},_updateCircle:function(t){var e=t._point,i=Math.max(Math.round(t._radius),1),n=Math.max(Math.round(t._radiusY),1)||i,r="a"+i+","+n+" 0 1,0 ",o=t._empty()?"M0 0":"M"+(e.x-i)+","+e.y+r+2*i+",0 "+r+-(2*i)+",0 ";this._setPath(t,o)},_setPath:function(t,e){t._path.setAttribute("d",e)},_bringToFront:function(t){t3(t._path)},_bringToBack:function(t){t4(t._path)}});function iI(t){return tA.svg||tA.vml?new iR(t):null}tA.vml&&iR.include({_initContainer:function(){this._container=t0("div","leaflet-vml-container")},_update:function(){this._map._animatingZoom||(iT.prototype._update.call(this),this.fire("update"))},_initPath:function(t){var e=t._container=iO("shape");t5(e,"leaflet-vml-shape "+(this.options.className||"")),e.coordsize="1 1",t._path=iO("path"),e.appendChild(t._path),this._updateStyle(t),this._layers[f(t)]=t},_addPath:function(t){var e=t._container;this._container.appendChild(e),t.options.interactive&&t.addInteractiveTarget(e)},_removePath:function(t){var e=t._container;t1(e),t.removeInteractiveTarget(e),delete this._layers[f(t)]},_updateStyle:function(t){var e=t._stroke,i=t._fill,n=t.options,r=t._container;r.stroked=!!n.stroke,r.filled=!!n.fill,n.stroke?(e||(e=t._stroke=iO("stroke")),r.appendChild(e),e.weight=n.weight+"px",e.color=n.color,e.opacity=n.opacity,n.dashArray?e.dashStyle=P(n.dashArray)?n.dashArray.join(" "):n.dashArray.replace(/( *, *)/g," "):e.dashStyle="",e.endcap=n.lineCap.replace("butt","flat"),e.joinstyle=n.lineJoin):e&&(r.removeChild(e),t._stroke=null),n.fill?(i||(i=t._fill=iO("fill")),r.appendChild(i),i.color=n.fillColor||n.color,i.opacity=n.fillOpacity):i&&(r.removeChild(i),t._fill=null)},_updateCircle:function(t){var e=t._point.round(),i=Math.round(t._radius),n=Math.round(t._radiusY||i);this._setPath(t,t._empty()?"M0 0":"AL "+e.x+","+e.y+" "+i+","+n+" 0,23592600")},_setPath:function(t,e){t._path.v=e},_bringToFront:function(t){t3(t._container)},_bringToBack:function(t){t4(t._container)}}),eS.include({getRenderer:function(t){var e=t.options.renderer||this._getPaneRenderer(t.options.pane)||this.options.renderer||this._renderer;return e||(e=this._renderer=this._createRenderer()),this.hasLayer(e)||this.addLayer(e),e},_getPaneRenderer:function(t){if("overlayPane"===t||void 0===t)return!1;var e=this._paneRenderers[t];return void 0===e&&(e=this._createRenderer({pane:t}),this._paneRenderers[t]=e),e},_createRenderer:function(t){return this.options.preferCanvas&&iB(t)||iI(t)}});var iA=io.extend({initialize:function(t,e){io.prototype.initialize.call(this,this._boundsToLatLngs(t),e)},setBounds:function(t){return this.setLatLngs(this._boundsToLatLngs(t))},_boundsToLatLngs:function(t){return[(t=q(t)).getSouthWest(),t.getNorthWest(),t.getNorthEast(),t.getSouthEast()]}});iR.create=iD,iR.pointsToPath=tn,is.geometryToLayer=ia,is.coordsToLatLng=ih,is.coordsToLatLngs=iu,is.latLngToCoords=ip,is.latLngsToCoords=ic,is.getFeature=id,is.asFeature=i_,eS.mergeOptions({boxZoom:!0});var iz=ez.extend({initialize:function(t){this._map=t,this._container=t._container,this._pane=t._panes.overlayPane,this._resetStateTimeout=0,t.on("unload",this._destroy,this)},addHooks:function(){ec(this._container,"mousedown",this._onMouseDown,this)},removeHooks:function(){e_(this._container,"mousedown",this._onMouseDown,this)},moved:function(){return this._moved},_destroy:function(){t1(this._pane),delete this._pane},_resetState:function(){this._resetStateTimeout=0,this._moved=!1},_clearDeferredResetState:function(){0!==this._resetStateTimeout&&(clearTimeout(this._resetStateTimeout),this._resetStateTimeout=0)},_onMouseDown:function(t){if(!t.shiftKey||1!==t.which&&1!==t.button)return!1;this._clearDeferredResetState(),this._resetState(),i(),es(),this._startPoint=this._map.mouseEventToContainerPoint(t),ec(document,{contextmenu:eM,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseMove:function(t){this._moved||(this._moved=!0,this._box=t0("div","leaflet-zoom-box",this._container),t5(this._container,"leaflet-crosshair"),this._map.fire("boxzoomstart")),this._point=this._map.mouseEventToContainerPoint(t);var e=new U(this._point,this._startPoint),i=e.getSize();en(this._box,e.min),this._box.style.width=i.x+"px",this._box.style.height=i.y+"px"},_finish:function(){this._moved&&(t1(this._box),t6(this._container,"leaflet-crosshair")),n(),ea(),e_(document,{contextmenu:eM,mousemove:this._onMouseMove,mouseup:this._onMouseUp,keydown:this._onKeyDown},this)},_onMouseUp:function(t){if((1===t.which||1===t.button)&&(this._finish(),this._moved)){this._clearDeferredResetState(),this._resetStateTimeout=setTimeout(d(this._resetState,this),0);var e=new H(this._map.containerPointToLatLng(this._startPoint),this._map.containerPointToLatLng(this._point));this._map.fitBounds(e).fire("boxzoomend",{boxZoomBounds:e})}},_onKeyDown:function(t){27===t.keyCode&&(this._finish(),this._clearDeferredResetState(),this._resetState())}});eS.addInitHook("addHandler","boxZoom",iz),eS.mergeOptions({doubleClickZoom:!0});var iN=ez.extend({addHooks:function(){this._map.on("dblclick",this._onDoubleClick,this)},removeHooks:function(){this._map.off("dblclick",this._onDoubleClick,this)},_onDoubleClick:function(t){var e=this._map,i=e.getZoom(),n=e.options.zoomDelta,r=t.originalEvent.shiftKey?i-n:i+n;"center"===e.options.doubleClickZoom?e.setZoom(r):e.setZoomAround(t.containerPoint,r)}});eS.addInitHook("addHandler","doubleClickZoom",iN),eS.mergeOptions({dragging:!0,inertia:!0,inertiaDeceleration:3400,inertiaMaxSpeed:1/0,easeLinearity:.2,worldCopyJump:!1,maxBoundsViscosity:0});var ij=ez.extend({addHooks:function(){if(!this._draggable){var t=this._map;this._draggable=new ej(t._mapPane,t._container),this._draggable.on({dragstart:this._onDragStart,drag:this._onDrag,dragend:this._onDragEnd},this),this._draggable.on("predrag",this._onPreDragLimit,this),t.options.worldCopyJump&&(this._draggable.on("predrag",this._onPreDragWrap,this),t.on("zoomend",this._onZoomEnd,this),t.whenReady(this._onZoomEnd,this))}t5(this._map._container,"leaflet-grab leaflet-touch-drag"),this._draggable.enable(),this._positions=[],this._times=[]},removeHooks:function(){t6(this._map._container,"leaflet-grab"),t6(this._map._container,"leaflet-touch-drag"),this._draggable.disable()},moved:function(){return this._draggable&&this._draggable._moved},moving:function(){return this._draggable&&this._draggable._moving},_onDragStart:function(){var t=this._map;if(t._stop(),this._map.options.maxBounds&&this._map.options.maxBoundsViscosity){var e=q(this._map.options.maxBounds);this._offsetLimit=V(this._map.latLngToContainerPoint(e.getNorthWest()).multiplyBy(-1),this._map.latLngToContainerPoint(e.getSouthEast()).multiplyBy(-1).add(this._map.getSize())),this._viscosity=Math.min(1,Math.max(0,this._map.options.maxBoundsViscosity))}else this._offsetLimit=null;t.fire("movestart").fire("dragstart"),t.options.inertia&&(this._positions=[],this._times=[])},_onDrag:function(t){if(this._map.options.inertia){var e=this._lastTime=+new Date,i=this._lastPos=this._draggable._absPos||this._draggable._newPos;this._positions.push(i),this._times.push(e),this._prunePositions(e)}this._map.fire("move",t).fire("drag",t)},_prunePositions:function(t){for(;this._positions.length>1&&t-this._times[0]>50;)this._positions.shift(),this._times.shift()},_onZoomEnd:function(){var t=this._map.getSize().divideBy(2),e=this._map.latLngToLayerPoint([0,0]);this._initialWorldOffset=e.subtract(t).x,this._worldWidth=this._map.getPixelWorldBounds().getSize().x},_viscousLimit:function(t,e){return t-(t-e)*this._viscosity},_onPreDragLimit:function(){if(this._viscosity&&this._offsetLimit){var t=this._draggable._newPos.subtract(this._draggable._startPos),e=this._offsetLimit;t.xe.max.x&&(t.x=this._viscousLimit(t.x,e.max.x)),t.y>e.max.y&&(t.y=this._viscousLimit(t.y,e.max.y)),this._draggable._newPos=this._draggable._startPos.add(t)}},_onPreDragWrap:function(){var t=this._worldWidth,e=Math.round(t/2),i=this._initialWorldOffset,n=this._draggable._newPos.x,r=(n-e+i)%t+e-i,o=(n+e+i)%t-e-i,s=Math.abs(r+i)0?r:-r))-e;this._delta=0,this._startTime=null,o&&("center"===t.options.scrollWheelZoom?t.setZoom(e+o):t.setZoomAround(this._lastMousePos,e+o))}});eS.addInitHook("addHandler","scrollWheelZoom",iZ),eS.mergeOptions({tapHold:tA.touchNative&&tA.safari&&tA.mobile,tapTolerance:15});var iF=ez.extend({addHooks:function(){ec(this._map._container,"touchstart",this._onDown,this)},removeHooks:function(){e_(this._map._container,"touchstart",this._onDown,this)},_onDown:function(t){if(clearTimeout(this._holdTimeout),1===t.touches.length){var e=t.touches[0];this._startPos=this._newPos=new G(e.clientX,e.clientY),this._holdTimeout=setTimeout(d(function(){this._cancel(),this._isTapValid()&&(ec(document,"touchend",ek),ec(document,"touchend touchcancel",this._cancelClickPrevent),this._simulateEvent("contextmenu",e))},this),600),ec(document,"touchend touchcancel contextmenu",this._cancel,this),ec(document,"touchmove",this._onMove,this)}},_cancelClickPrevent:function t(){e_(document,"touchend",ek),e_(document,"touchend touchcancel",t)},_cancel:function(){clearTimeout(this._holdTimeout),e_(document,"touchend touchcancel contextmenu",this._cancel,this),e_(document,"touchmove",this._onMove,this)},_onMove:function(t){var e=t.touches[0];this._newPos=new G(e.clientX,e.clientY)},_isTapValid:function(){return this._newPos.distanceTo(this._startPos)<=this._map.options.tapTolerance},_simulateEvent:function(t,e){var i=new MouseEvent(t,{bubbles:!0,cancelable:!0,view:window,screenX:e.screenX,screenY:e.screenY,clientX:e.clientX,clientY:e.clientY});i._simulated=!0,e.target.dispatchEvent(i)}});eS.addInitHook("addHandler","tapHold",iF),eS.mergeOptions({touchZoom:tA.touch,bounceAtZoomLimits:!0});var iU=ez.extend({addHooks:function(){t5(this._map._container,"leaflet-touch-zoom"),ec(this._map._container,"touchstart",this._onTouchStart,this)},removeHooks:function(){t6(this._map._container,"leaflet-touch-zoom"),e_(this._map._container,"touchstart",this._onTouchStart,this)},_onTouchStart:function(t){var e=this._map;if(t.touches&&2===t.touches.length&&!e._animatingZoom&&!this._zooming){var i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]);this._centerPoint=e.getSize()._divideBy(2),this._startLatLng=e.containerPointToLatLng(this._centerPoint),"center"!==e.options.touchZoom&&(this._pinchStartLatLng=e.containerPointToLatLng(i.add(n)._divideBy(2))),this._startDist=i.distanceTo(n),this._startZoom=e.getZoom(),this._moved=!1,this._zooming=!0,e._stop(),ec(document,"touchmove",this._onTouchMove,this),ec(document,"touchend touchcancel",this._onTouchEnd,this),ek(t)}},_onTouchMove:function(t){if(t.touches&&2===t.touches.length&&this._zooming){var e=this._map,i=e.mouseEventToContainerPoint(t.touches[0]),n=e.mouseEventToContainerPoint(t.touches[1]),r=i.distanceTo(n)/this._startDist;if(this._zoom=e.getScaleZoom(r,this._startZoom),!e.options.bounceAtZoomLimits&&(this._zoome.getMaxZoom()&&r>1)&&(this._zoom=e._limitZoom(this._zoom)),"center"===e.options.touchZoom){if(this._center=this._startLatLng,1===r)return}else{var o=i._add(n)._divideBy(2)._subtract(this._centerPoint);if(1===r&&0===o.x&&0===o.y)return;this._center=e.unproject(e.project(this._pinchStartLatLng,this._zoom).subtract(o),this._zoom)}this._moved||(e._moveStart(!0,!1),this._moved=!0),A(this._animRequest);var s=d(e._move,e,this._center,this._zoom,{pinch:!0,round:!1},void 0);this._animRequest=I(s,this,!0),ek(t)}},_onTouchEnd:function(){if(!this._moved||!this._zooming){this._zooming=!1;return}this._zooming=!1,A(this._animRequest),e_(document,"touchmove",this._onTouchMove,this),e_(document,"touchend touchcancel",this._onTouchEnd,this),this._map.options.zoomAnimation?this._map._animateZoom(this._center,this._map._limitZoom(this._zoom),!0,this._map.options.zoomSnap):this._map._resetView(this._center,this._map._limitZoom(this._zoom))}});eS.addInitHook("addHandler","touchZoom",iU),eS.BoxZoom=iz,eS.DoubleClickZoom=iN,eS.Drag=ij,eS.Keyboard=iG,eS.ScrollWheelZoom=iZ,eS.TapHold=iF,eS.TouchZoom=iU,t.Bounds=U,t.Browser=tA,t.CRS=Y,t.Canvas=iS,t.Circle=ii,t.CircleMarker=ie,t.Class=z,t.Control=eB,t.DivIcon=ix,t.DivOverlay=ib,t.DomEvent={__proto__:null,on:ec,off:e_,stopPropagation:ev,disableScrollPropagation:eL,disableClickPropagation:eb,preventDefault:ek,stop:eM,getPropagationPath:ex,getMousePosition:ew,getWheelDelta:eP,isExternalTarget:eE,addListener:ec,removeListener:e_},t.DomUtil={__proto__:null,TRANSFORM:tY,TRANSITION:tX,TRANSITION_END:tJ,get:t$,getStyle:tQ,create:t0,remove:t1,empty:t2,toFront:t3,toBack:t4,hasClass:t8,addClass:t5,removeClass:t6,setClass:t9,getClass:t7,setOpacity:et,testProp:ee,setTransform:ei,setPosition:en,getPosition:er,get disableTextSelection(){return i},get enableTextSelection(){return n},disableImageDrag:es,enableImageDrag:ea,preventOutline:el,restoreOutline:eh,getSizedParentNode:eu,getScale:ep},t.Draggable=ej,t.Evented=j,t.FeatureGroup=e8,t.GeoJSON=is,t.GridLayer=iw,t.Handler=ez,t.Icon=e5,t.ImageOverlay=iy,t.LatLng=K,t.LatLngBounds=H,t.Layer=e3,t.LayerGroup=e4,t.LineUtil={__proto__:null,simplify:eU,pointToSegmentDistance:eV,closestPointOnSegment:function(t,e,i){return eW(t,e,i)},clipSegment:eH,_getEdgeIntersection:eq,_getBitCode:eK,_sqClosestPointOnSegment:eW,isFlat:eY,_flat:eX,polylineCenter:eJ},t.Map=eS,t.Marker=e7,t.Mixin={Events:N},t.Path=it,t.Point=G,t.PolyUtil={__proto__:null,clipPolygon:eG,polygonCenter:eZ,centroid:eF},t.Polygon=io,t.Polyline=ir,t.Popup=ik,t.PosAnimation=eT,t.Projection={__proto__:null,LonLat:e$,Mercator:eQ,SphericalMercator:J},t.Rectangle=iA,t.Renderer=iT,t.SVG=iR,t.SVGOverlay=iL,t.TileLayer=iC,t.Tooltip=iM,t.Transformation=$,t.Util={__proto__:null,extend:e,create:c,bind:d,get lastId(){return _},stamp:f,throttle:m,wrapNum:g,falseFn:y,formatNum:v,trim:b,splitWords:k,setOptions:M,getParamString:x,template:C,isArray:P,indexOf:E,emptyImageUrl:T,requestFn:D,cancelFn:R,requestAnimFrame:I,cancelAnimFrame:A},t.VideoOverlay=iv,t.bind=d,t.bounds=V,t.canvas=iB,t.circle=function(t,e,i){return new ii(t,e,i)},t.circleMarker=function(t,e){return new ie(t,e)},t.control=eO,t.divIcon=function(t){return new ix(t)},t.extend=e,t.featureGroup=function(t,e){return new e8(t,e)},t.geoJSON=ig,t.geoJson=ig,t.gridLayer=function(t){return new iw(t)},t.icon=function(t){return new e5(t)},t.imageOverlay=function(t,e,i){return new iy(t,e,i)},t.latLng=W,t.latLngBounds=q,t.layerGroup=function(t,e){return new e4(t,e)},t.map=function(t,e){return new eS(t,e)},t.marker=function(t,e){return new e7(t,e)},t.point=F,t.polygon=function(t,e){return new io(t,e)},t.polyline=function(t,e){return new ir(t,e)},t.popup=function(t,e){return new ik(t,e)},t.rectangle=function(t,e){return new iA(t,e)},t.setOptions=M,t.stamp=f,t.svg=iI,t.svgOverlay=function(t,e,i){return new iL(t,e,i)},t.tileLayer=iP,t.tooltip=function(t,e){return new iM(t,e)},t.transformation=Q,t.version="1.9.4",t.videoOverlay=function(t,e,i){return new iv(t,e,i)};var iV=window.L;t.noConflict=function(){return window.L=iV,this},window.L=t}(i)},15258,(t,e,i)=>{t.e,function(t){"use strict";var e=L.MarkerClusterGroup=L.FeatureGroup.extend({options:{maxClusterRadius:80,iconCreateFunction:null,clusterPane:L.Marker.prototype.options.pane,spiderfyOnEveryZoom:!1,spiderfyOnMaxZoom:!0,showCoverageOnHover:!0,zoomToBoundsOnClick:!0,singleMarkerMode:!1,disableClusteringAtZoom:null,removeOutsideVisibleBounds:!0,animate:!0,animateAddingMarkers:!1,spiderfyShapePositions:null,spiderfyDistanceMultiplier:1,spiderLegPolylineOptions:{weight:1.5,color:"#222",opacity:.5},chunkedLoading:!1,chunkInterval:200,chunkDelay:50,chunkProgress:null,polygonOptions:{}},initialize:function(t){L.Util.setOptions(this,t),this.options.iconCreateFunction||(this.options.iconCreateFunction=this._defaultIconCreateFunction),this._featureGroup=L.featureGroup(),this._featureGroup.addEventParent(this),this._nonPointGroup=L.featureGroup(),this._nonPointGroup.addEventParent(this),this._inZoomAnimation=0,this._needsClustering=[],this._needsRemoving=[],this._currentShownBounds=null,this._queue=[],this._childMarkerEventHandlers={dragstart:this._childMarkerDragStart,move:this._childMarkerMoved,dragend:this._childMarkerDragEnd};var e=L.DomUtil.TRANSITION&&this.options.animate;L.extend(this,e?this._withAnimation:this._noAnimation),this._markerCluster=e?L.MarkerCluster:L.MarkerClusterNonAnimated},addLayer:function(t){if(t instanceof L.LayerGroup)return this.addLayers([t]);if(!t.getLatLng)return this._nonPointGroup.addLayer(t),this.fire("layeradd",{layer:t}),this;if(!this._map)return this._needsClustering.push(t),this.fire("layeradd",{layer:t}),this;if(this.hasLayer(t))return this;this._unspiderfy&&this._unspiderfy(),this._addLayer(t,this._maxZoom),this.fire("layeradd",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons();var e=t,i=this._zoom;if(t.__parent)for(;e.__parent._zoom>=i;)e=e.__parent;return this._currentShownBounds.contains(e.getLatLng())&&(this.options.animateAddingMarkers?this._animationAddLayer(t,e):this._animationAddLayerNonAnimated(t,e)),this},removeLayer:function(t){return t instanceof L.LayerGroup?this.removeLayers([t]):(t.getLatLng?this._map?t.__parent&&(this._unspiderfy&&(this._unspiderfy(),this._unspiderfyLayer(t)),this._removeLayer(t,!0),this.fire("layerremove",{layer:t}),this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),t.off(this._childMarkerEventHandlers,this),this._featureGroup.hasLayer(t)&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow())):(!this._arraySplice(this._needsClustering,t)&&this.hasLayer(t)&&this._needsRemoving.push({layer:t,latlng:t._latlng}),this.fire("layerremove",{layer:t})):(this._nonPointGroup.removeLayer(t),this.fire("layerremove",{layer:t})),this)},addLayers:function(t,e){if(!L.Util.isArray(t))return this.addLayer(t);var i,n=this._featureGroup,r=this._nonPointGroup,o=this.options.chunkedLoading,s=this.options.chunkInterval,a=this.options.chunkProgress,l=t.length,h=0,u=!0;if(this._map){var p=new Date().getTime(),c=L.bind(function(){var d=new Date().getTime();for(this._map&&this._unspiderfy&&this._unspiderfy();hs);h++){if((i=t[h])instanceof L.LayerGroup){u&&(t=t.slice(),u=!1),this._extractNonGroupLayers(i,t),l=t.length;continue}if(!i.getLatLng){r.addLayer(i),e||this.fire("layeradd",{layer:i});continue}if(!this.hasLayer(i)&&(this._addLayer(i,this._maxZoom),e||this.fire("layeradd",{layer:i}),i.__parent&&2===i.__parent.getChildCount())){var _=i.__parent.getAllChildMarkers(),f=_[0]===i?_[1]:_[0];n.removeLayer(f)}}a&&a(h,l,new Date().getTime()-p),h===l?(this._topClusterLevel._recalculateBounds(),this._refreshClustersIcons(),this._topClusterLevel._recursivelyAddChildrenToMap(null,this._zoom,this._currentShownBounds)):setTimeout(c,this.options.chunkDelay)},this);c()}else for(var d=this._needsClustering;h=0;e--)t.extend(this._needsClustering[e].getLatLng());return t.extend(this._nonPointGroup.getBounds()),t},eachLayer:function(t,e){var i,n,r,o=this._needsClustering.slice(),s=this._needsRemoving;for(this._topClusterLevel&&this._topClusterLevel.getAllChildMarkers(o),n=o.length-1;n>=0;n--){for(i=!0,r=s.length-1;r>=0;r--)if(s[r].layer===o[n]){i=!1;break}i&&t.call(e,o[n])}this._nonPointGroup.eachLayer(t,e)},getLayers:function(){var t=[];return this.eachLayer(function(e){t.push(e)}),t},getLayer:function(t){var e=null;return t=parseInt(t,10),this.eachLayer(function(i){L.stamp(i)===t&&(e=i)}),e},hasLayer:function(t){if(!t)return!1;var e,i=this._needsClustering;for(e=i.length-1;e>=0;e--)if(i[e]===t)return!0;for(e=(i=this._needsRemoving).length-1;e>=0;e--)if(i[e].layer===t)return!1;return!!(t.__parent&&t.__parent._group===this)||this._nonPointGroup.hasLayer(t)},zoomToShowLayer:function(t,e){var i=this._map;"function"!=typeof e&&(e=function(){});var n=function(){(i.hasLayer(t)||i.hasLayer(t.__parent))&&!this._inZoomAnimation&&(this._map.off("moveend",n,this),this.off("animationend",n,this),i.hasLayer(t)?e():t.__parent._icon&&(this.once("spiderfied",e,this),t.__parent.spiderfy()))};t._icon&&this._map.getBounds().contains(t.getLatLng())?e():t.__parent._zoom=0;i--)if(t[i]===e)return t.splice(i,1),!0},_removeFromGridUnclustered:function(t,e){for(var i=this._map,n=this._gridUnclustered,r=Math.floor(this._map.getMinZoom());e>=r&&n[e].removeObject(t,i.project(t.getLatLng(),e));e--);},_childMarkerDragStart:function(t){t.target.__dragStart=t.target._latlng},_childMarkerMoved:function(t){if(!this._ignoreMove&&!t.target.__dragStart){var e=t.target._popup&&t.target._popup.isOpen();this._moveChild(t.target,t.oldLatLng,t.latlng),e&&t.target.openPopup()}},_moveChild:function(t,e,i){t._latlng=e,this.removeLayer(t),t._latlng=i,this.addLayer(t)},_childMarkerDragEnd:function(t){var e=t.target.__dragStart;delete t.target.__dragStart,e&&this._moveChild(t.target,e,t.target._latlng)},_removeLayer:function(t,e,i){var n=this._gridClusters,r=this._gridUnclustered,o=this._featureGroup,s=this._map,a=Math.floor(this._map.getMinZoom());e&&this._removeFromGridUnclustered(t,this._maxZoom);var l,h=t.__parent,u=h._markers;for(this._arraySplice(u,t);h&&(h._childCount--,h._boundsNeedUpdate=!0,!(h._zoom"+e+"
",className:"marker-cluster"+i,iconSize:new L.Point(40,40)})},_bindEvents:function(){var t=this._map,e=this.options.spiderfyOnMaxZoom,i=this.options.showCoverageOnHover,n=this.options.zoomToBoundsOnClick,r=this.options.spiderfyOnEveryZoom;(e||n||r)&&this.on("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),i&&(this.on("clustermouseover",this._showCoverage,this),this.on("clustermouseout",this._hideCoverage,this),t.on("zoomend",this._hideCoverage,this))},_zoomOrSpiderfy:function(t){var e=t.layer,i=e;if("clusterkeypress"!==t.type||!t.originalEvent||13===t.originalEvent.keyCode){for(;1===i._childClusters.length;)i=i._childClusters[0];i._zoom===this._maxZoom&&i._childCount===e._childCount&&this.options.spiderfyOnMaxZoom?e.spiderfy():this.options.zoomToBoundsOnClick&&e.zoomToBounds(),this.options.spiderfyOnEveryZoom&&e.spiderfy(),t.originalEvent&&13===t.originalEvent.keyCode&&this._map._container.focus()}},_showCoverage:function(t){var e=this._map;!this._inZoomAnimation&&(this._shownPolygon&&e.removeLayer(this._shownPolygon),t.layer.getChildCount()>2&&t.layer!==this._spiderfied&&(this._shownPolygon=new L.Polygon(t.layer.getConvexHull(),this.options.polygonOptions),e.addLayer(this._shownPolygon)))},_hideCoverage:function(){this._shownPolygon&&(this._map.removeLayer(this._shownPolygon),this._shownPolygon=null)},_unbindEvents:function(){var t=this.options.spiderfyOnMaxZoom,e=this.options.showCoverageOnHover,i=this.options.zoomToBoundsOnClick,n=this.options.spiderfyOnEveryZoom,r=this._map;(t||i||n)&&this.off("clusterclick clusterkeypress",this._zoomOrSpiderfy,this),e&&(this.off("clustermouseover",this._showCoverage,this),this.off("clustermouseout",this._hideCoverage,this),r.off("zoomend",this._hideCoverage,this))},_zoomEnd:function(){this._map&&(this._mergeSplitClusters(),this._zoom=Math.round(this._map._zoom),this._currentShownBounds=this._getExpandedVisibleBounds())},_moveEnd:function(){if(!this._inZoomAnimation){var t=this._getExpandedVisibleBounds();this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),this._zoom,t),this._topClusterLevel._recursivelyAddChildrenToMap(null,Math.round(this._map._zoom),t),this._currentShownBounds=t}},_generateInitialClusters:function(){var t=Math.ceil(this._map.getMaxZoom()),e=Math.floor(this._map.getMinZoom()),i=this.options.maxClusterRadius,n=i;"function"!=typeof i&&(n=function(){return i}),null!==this.options.disableClusteringAtZoom&&(t=this.options.disableClusteringAtZoom-1),this._maxZoom=t,this._gridClusters={},this._gridUnclustered={};for(var r=t;r>=e;r--)this._gridClusters[r]=new L.DistanceGrid(n(r)),this._gridUnclustered[r]=new L.DistanceGrid(n(r));this._topClusterLevel=new this._markerCluster(this,e-1)},_addLayer:function(t,e){var i,n,r=this._gridClusters,o=this._gridUnclustered,s=Math.floor(this._map.getMinZoom());for(this.options.singleMarkerMode&&this._overrideMarkerIcon(t),t.on(this._childMarkerEventHandlers,this);e>=s;e--){i=this._map.project(t.getLatLng(),e);var a=r[e].getNearObject(i);if(a){a._addChild(t),t.__parent=a;return}if(a=o[e].getNearObject(i)){var l=a.__parent;l&&this._removeLayer(a,!1);var h=new this._markerCluster(this,e,a,t);r[e].addObject(h,this._map.project(h._cLatLng,e)),a.__parent=h,t.__parent=h;var u=h;for(n=e-1;n>l._zoom;n--)u=new this._markerCluster(this,n,u),r[n].addObject(u,this._map.project(a.getLatLng(),n));l._addChild(u),this._removeFromGridUnclustered(a,e);return}o[e].addObject(t,i)}this._topClusterLevel._addChild(t),t.__parent=this._topClusterLevel},_refreshClustersIcons:function(){this._featureGroup.eachLayer(function(t){t instanceof L.MarkerCluster&&t._iconNeedsUpdate&&t._updateIcon()})},_enqueue:function(t){this._queue.push(t),this._queueTimeout||(this._queueTimeout=setTimeout(L.bind(this._processQueue,this),300))},_processQueue:function(){for(var t=0;tt?(this._animationStart(),this._animationZoomOut(this._zoom,t)):this._moveEnd()},_getExpandedVisibleBounds:function(){return this.options.removeOutsideVisibleBounds?L.Browser.mobile?this._checkBoundsMaxLat(this._map.getBounds()):this._checkBoundsMaxLat(this._map.getBounds().pad(1)):this._mapBoundsInfinite},_checkBoundsMaxLat:function(t){var e=this._maxLat;return void 0!==e&&(t.getNorth()>=e&&(t._northEast.lat=1/0),t.getSouth()<=-e&&(t._southWest.lat=-1/0)),t},_animationAddLayerNonAnimated:function(t,e){if(e===t)this._featureGroup.addLayer(t);else if(2===e._childCount){e._addToMap();var i=e.getAllChildMarkers();this._featureGroup.removeLayer(i[0]),this._featureGroup.removeLayer(i[1])}else e._updateIcon()},_extractNonGroupLayers:function(t,e){var i,n=t.getLayers(),r=0;for(e=e||[];r=0;i--)s=l[i],n.contains(s._latlng)||r.removeLayer(s)}),this._forceLayout(),this._topClusterLevel._recursivelyBecomeVisible(n,e),r.eachLayer(function(t){t instanceof L.MarkerCluster||!t._icon||t.clusterShow()}),this._topClusterLevel._recursively(n,t,e,function(t){t._recursivelyRestoreChildPositions(e)}),this._ignoreMove=!1,this._enqueue(function(){this._topClusterLevel._recursively(n,t,o,function(t){r.removeLayer(t),t.clusterShow()}),this._animationEnd()})},_animationZoomOut:function(t,e){this._animationZoomOutSingle(this._topClusterLevel,t-1,e),this._topClusterLevel._recursivelyAddChildrenToMap(null,e,this._getExpandedVisibleBounds()),this._topClusterLevel._recursivelyRemoveChildrenFromMap(this._currentShownBounds,Math.floor(this._map.getMinZoom()),t,this._getExpandedVisibleBounds())},_animationAddLayer:function(t,e){var i=this,n=this._featureGroup;n.addLayer(t),e!==t&&(e._childCount>2?(e._updateIcon(),this._forceLayout(),this._animationStart(),t._setPos(this._map.latLngToLayerPoint(e.getLatLng())),t.clusterHide(),this._enqueue(function(){n.removeLayer(t),t.clusterShow(),i._animationEnd()})):(this._forceLayout(),i._animationStart(),i._animationZoomOutSingle(e,this._map.getMaxZoom(),this._zoom)))}},_animationZoomOutSingle:function(t,e,i){var n=this._getExpandedVisibleBounds(),r=Math.floor(this._map.getMinZoom());t._recursivelyAnimateChildrenInAndAddSelfToMap(n,r,e+1,i);var o=this;this._forceLayout(),t._recursivelyBecomeVisible(n,i),this._enqueue(function(){if(1===t._childCount){var s=t._markers[0];this._ignoreMove=!0,s.setLatLng(s.getLatLng()),this._ignoreMove=!1,s.clusterShow&&s.clusterShow()}else t._recursively(n,i,r,function(t){t._recursivelyRemoveChildrenFromMap(n,r,e+1)});o._animationEnd()})},_animationEnd:function(){this._map&&(this._map._mapPane.className=this._map._mapPane.className.replace(" leaflet-cluster-anim","")),this._inZoomAnimation--,this.fire("animationend")},_forceLayout:function(){L.Util.falseFn(document.body.offsetWidth)}}),L.markerClusterGroup=function(t){return new L.MarkerClusterGroup(t)};var i=L.MarkerCluster=L.Marker.extend({options:L.Icon.prototype.options,initialize:function(t,e,i,n){L.Marker.prototype.initialize.call(this,i?i._cLatLng||i.getLatLng():new L.LatLng(0,0),{icon:this,pane:t.options.clusterPane}),this._group=t,this._zoom=e,this._markers=[],this._childClusters=[],this._childCount=0,this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._bounds=new L.LatLngBounds,i&&this._addChild(i),n&&this._addChild(n)},getAllChildMarkers:function(t,e){t=t||[];for(var i=this._childClusters.length-1;i>=0;i--)this._childClusters[i].getAllChildMarkers(t,e);for(var n=this._markers.length-1;n>=0;n--)e&&this._markers[n].__dragStart||t.push(this._markers[n]);return t},getChildCount:function(){return this._childCount},zoomToBounds:function(t){for(var e,i=this._childClusters.slice(),n=this._group._map,r=n.getBoundsZoom(this._bounds),o=this._zoom+1,s=n.getZoom();i.length>0&&r>o;){o++;var a=[];for(e=0;eo?this._group._map.setView(this._latlng,o):r<=s?this._group._map.setView(this._latlng,s+1):this._group._map.fitBounds(this._bounds,t)},getBounds:function(){var t=new L.LatLngBounds;return t.extend(this._bounds),t},_updateIcon:function(){this._iconNeedsUpdate=!0,this._icon&&this.setIcon(this)},createIcon:function(){return this._iconNeedsUpdate&&(this._iconObj=this._group.options.iconCreateFunction(this),this._iconNeedsUpdate=!1),this._iconObj.createIcon()},createShadow:function(){return this._iconObj.createShadow()},_addChild:function(t,e){this._iconNeedsUpdate=!0,this._boundsNeedUpdate=!0,this._setClusterCenter(t),t instanceof L.MarkerCluster?(e||(this._childClusters.push(t),t.__parent=this),this._childCount+=t._childCount):(e||this._markers.push(t),this._childCount++),this.__parent&&this.__parent._addChild(t,!0)},_setClusterCenter:function(t){this._cLatLng||(this._cLatLng=t._cLatLng||t._latlng)},_resetBounds:function(){var t=this._bounds;t._southWest&&(t._southWest.lat=1/0,t._southWest.lng=1/0),t._northEast&&(t._northEast.lat=-1/0,t._northEast.lng=-1/0)},_recalculateBounds:function(){var t,e,i,n,r=this._markers,o=this._childClusters,s=0,a=0,l=this._childCount;if(0!==l){for(this._resetBounds(),t=0;t=0;i--)(n=r[i])._icon&&(n._setPos(e),n.clusterHide())},function(t){var i,n,r=t._childClusters;for(i=r.length-1;i>=0;i--)(n=r[i])._icon&&(n._setPos(e),n.clusterHide())})},_recursivelyAnimateChildrenInAndAddSelfToMap:function(t,e,i,n){this._recursively(t,n,e,function(r){r._recursivelyAnimateChildrenIn(t,r._group._map.latLngToLayerPoint(r.getLatLng()).round(),i),r._isSingleParent()&&i-1===n?(r.clusterShow(),r._recursivelyRemoveChildrenFromMap(t,e,i)):r.clusterHide(),r._addToMap()})},_recursivelyBecomeVisible:function(t,e){this._recursively(t,this._group._map.getMinZoom(),e,null,function(t){t.clusterShow()})},_recursivelyAddChildrenToMap:function(t,e,i){this._recursively(i,this._group._map.getMinZoom()-1,e,function(n){if(e!==n._zoom)for(var r=n._markers.length-1;r>=0;r--){var o=n._markers[r];i.contains(o._latlng)&&(t&&(o._backupLatlng=o.getLatLng(),o.setLatLng(t),o.clusterHide&&o.clusterHide()),n._group._featureGroup.addLayer(o))}},function(e){e._addToMap(t)})},_recursivelyRestoreChildPositions:function(t){for(var e=this._markers.length-1;e>=0;e--){var i=this._markers[e];i._backupLatlng&&(i.setLatLng(i._backupLatlng),delete i._backupLatlng)}if(t-1===this._zoom)for(var n=this._childClusters.length-1;n>=0;n--)this._childClusters[n]._restorePosition();else for(var r=this._childClusters.length-1;r>=0;r--)this._childClusters[r]._recursivelyRestoreChildPositions(t)},_restorePosition:function(){this._backupLatlng&&(this.setLatLng(this._backupLatlng),delete this._backupLatlng)},_recursivelyRemoveChildrenFromMap:function(t,e,i,n){var r,o;this._recursively(t,e-1,i-1,function(t){for(o=t._markers.length-1;o>=0;o--)r=t._markers[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())},function(t){for(o=t._childClusters.length-1;o>=0;o--)r=t._childClusters[o],n&&n.contains(r._latlng)||(t._group._featureGroup.removeLayer(r),r.clusterShow&&r.clusterShow())})},_recursively:function(t,e,i,n,r){var o,s,a=this._childClusters,l=this._zoom;if(e<=l&&(n&&n(this),r&&l===i&&r(this)),l=0;o--)(s=a[o])._boundsNeedUpdate&&s._recalculateBounds(),t.intersects(s._bounds)&&s._recursively(t,e,i,n,r)},_isSingleParent:function(){return this._childClusters.length>0&&this._childClusters[0]._childCount===this._childCount}});L.Marker.include({clusterHide:function(){var t=this.options.opacity;return this.setOpacity(0),this.options.opacity=t,this},clusterShow:function(){return this.setOpacity(this.options.opacity)}}),L.DistanceGrid=function(t){this._cellSize=t,this._sqCellSize=t*t,this._grid={},this._objectPoint={}},L.DistanceGrid.prototype={addObject:function(t,e){var i=this._getCoord(e.x),n=this._getCoord(e.y),r=this._grid,o=r[n]=r[n]||{},s=o[i]=o[i]||[],a=L.Util.stamp(t);this._objectPoint[a]=e,s.push(t)},updateObject:function(t,e){this.removeObject(t),this.addObject(t,e)},removeObject:function(t,e){var i,n,r=this._getCoord(e.x),o=this._getCoord(e.y),s=this._grid,a=s[o]=s[o]||{},l=a[r]=a[r]||[];for(delete this._objectPoint[L.Util.stamp(t)],i=0,n=l.length;i=0;i--)n=e[i],(r=this.getDistant(n,t))>0&&(a.push(n),r>o&&(o=r,s=n));return{maxPoint:s,newPoints:a}},buildConvexHull:function(t,e){var i=[],n=this.findMostDistantPointFromBaseLine(t,e);return n.maxPoint?i=(i=i.concat(this.buildConvexHull([t[0],n.maxPoint],n.newPoints))).concat(this.buildConvexHull([n.maxPoint,t[1]],n.newPoints)):[t[0]]},getConvexHull:function(t){var e,i=!1,n=!1,r=!1,o=!1,s=null,a=null,l=null,h=null,u=null,p=null;for(e=t.length-1;e>=0;e--){var c=t[e];(!1===i||c.lat>i)&&(s=c,i=c.lat),(!1===n||c.latr)&&(l=c,r=c.lng),(!1===o||c.lng=0;e--)t=i[e].getLatLng(),n.push(t);return L.QuickHull.getConvexHull(n)}}),L.MarkerCluster.include({_2PI:2*Math.PI,_circleFootSeparation:25,_circleStartAngle:0,_spiralFootSeparation:28,_spiralLengthStart:11,_spiralLengthFactor:5,_circleSpiralSwitchover:9,spiderfy:function(){if(this._group._spiderfied!==this&&!this._group._inZoomAnimation){var t,e=this.getAllChildMarkers(null,!0),i=this._group._map.latLngToLayerPoint(this._latlng);this._group._unspiderfy(),this._group._spiderfied=this,this._group.options.spiderfyShapePositions?t=this._group.options.spiderfyShapePositions(e.length,i):e.length>=this._circleSpiralSwitchover?t=this._generatePointsSpiral(e.length,i):(i.y+=10,t=this._generatePointsCircle(e.length,i)),this._animationSpiderfy(e,t)}},unspiderfy:function(t){this._group._inZoomAnimation||(this._animationUnspiderfy(t),this._group._spiderfied=null)},_generatePointsCircle:function(t,e){var i,n,r=this._group.options.spiderfyDistanceMultiplier*this._circleFootSeparation*(2+t)/this._2PI,o=this._2PI/t,s=[];for(i=0,r=Math.max(r,35),s.length=t;i=0;i--)i=0;e--)t=o[e],r.removeLayer(t),t._preSpiderfyLatlng&&(t.setLatLng(t._preSpiderfyLatlng),delete t._preSpiderfyLatlng),t.setZIndexOffset&&t.setZIndexOffset(0),t._spiderLeg&&(n.removeLayer(t._spiderLeg),delete t._spiderLeg);i.fire("unspiderfied",{cluster:this,markers:o}),i._ignoreMove=!1,i._spiderfied=null}}),L.MarkerClusterNonAnimated=L.MarkerCluster.extend({_animationSpiderfy:function(t,e){var i,n,r,o,s=this._group,a=s._map,l=s._featureGroup,h=this._group.options.spiderLegPolylineOptions;for(i=0,s._ignoreMove=!0;i=0;i--)a=u.layerPointToLatLng(e[i]),(n=t[i])._preSpiderfyLatlng=n._latlng,n.setLatLng(a),n.clusterShow&&n.clusterShow(),_&&((o=(r=n._spiderLeg)._path).style.strokeDashoffset=0,r.setStyle({opacity:m}));this.setOpacity(.3),h._ignoreMove=!1,setTimeout(function(){h._animationEnd(),h.fire("spiderfied",{cluster:l,markers:t})},200)},_animationUnspiderfy:function(t){var e,i,n,r,o,s,a=this,l=this._group,h=l._map,u=l._featureGroup,p=t?h._latLngToNewLayerPoint(this._latlng,t.zoom,t.center):h.latLngToLayerPoint(this._latlng),c=this.getAllChildMarkers(null,!0),d=L.Path.SVG;for(l._ignoreMove=!0,l._animationStart(),this.setOpacity(1),i=c.length-1;i>=0;i--)(e=c[i])._preSpiderfyLatlng&&(e.closePopup(),e.setLatLng(e._preSpiderfyLatlng),delete e._preSpiderfyLatlng,s=!0,e._setPos&&(e._setPos(p),s=!1),e.clusterHide&&(e.clusterHide(),s=!1),s&&u.removeLayer(e),d&&(o=(r=(n=e._spiderLeg)._path).getTotalLength()+.1,r.style.strokeDashoffset=o,n.setStyle({opacity:0})));l._ignoreMove=!1,setTimeout(function(){var t=0;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&t++;for(i=c.length-1;i>=0;i--)(e=c[i])._spiderLeg&&(e.clusterShow&&e.clusterShow(),e.setZIndexOffset&&e.setZIndexOffset(0),t>1&&u.removeLayer(e),h.removeLayer(e._spiderLeg),delete e._spiderLeg);l._animationEnd(),l.fire("unspiderfied",{cluster:a,markers:c})},200)}}),L.MarkerClusterGroup.include({_spiderfied:null,unspiderfy:function(){this._unspiderfy.apply(this,arguments)},_spiderfierOnAdd:function(){this._map.on("click",this._unspiderfyWrapper,this),this._map.options.zoomAnimation&&this._map.on("zoomstart",this._unspiderfyZoomStart,this),this._map.on("zoomend",this._noanimationUnspiderfy,this),L.Browser.touch||this._map.getRenderer(this)},_spiderfierOnRemove:function(){this._map.off("click",this._unspiderfyWrapper,this),this._map.off("zoomstart",this._unspiderfyZoomStart,this),this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._map.off("zoomend",this._noanimationUnspiderfy,this),this._noanimationUnspiderfy()},_unspiderfyZoomStart:function(){this._map&&this._map.on("zoomanim",this._unspiderfyZoomAnim,this)},_unspiderfyZoomAnim:function(t){L.DomUtil.hasClass(this._map._mapPane,"leaflet-touching")||(this._map.off("zoomanim",this._unspiderfyZoomAnim,this),this._unspiderfy(t))},_unspiderfyWrapper:function(){this._unspiderfy()},_unspiderfy:function(t){this._spiderfied&&this._spiderfied.unspiderfy(t)},_noanimationUnspiderfy:function(){this._spiderfied&&this._spiderfied._noanimationUnspiderfy()},_unspiderfyLayer:function(t){t._spiderLeg&&(this._featureGroup.removeLayer(t),t.clusterShow&&t.clusterShow(),t.setZIndexOffset&&t.setZIndexOffset(0),this._map.removeLayer(t._spiderLeg),delete t._spiderLeg)}}),L.MarkerClusterGroup.include({refreshClusters:function(t){return t?t instanceof L.MarkerClusterGroup?t=t._topClusterLevel.getAllChildMarkers():t instanceof L.LayerGroup?t=t._layers:t instanceof L.MarkerCluster?t=t.getAllChildMarkers():t instanceof L.Marker&&(t=[t]):t=this._topClusterLevel.getAllChildMarkers(),this._flagParentsIconsNeedUpdate(t),this._refreshClustersIcons(),this.options.singleMarkerMode&&this._refreshSingleMarkerModeMarkers(t),this},_flagParentsIconsNeedUpdate:function(t){var e,i;for(e in t)for(i=t[e].__parent;i;)i._iconNeedsUpdate=!0,i=i.__parent},_refreshSingleMarkerModeMarkers:function(t){var e,i;for(e in t)i=t[e],this.hasLayer(i)&&i.setIcon(this._overrideMarkerIcon(i))}}),L.Marker.include({refreshIconOptions:function(t,e){var i=this.options.icon;return L.setOptions(i,t),this.setIcon(i),e&&this.__parent&&this.__parent._group.refreshClusters(this),this}}),t.MarkerClusterGroup=e,t.MarkerCluster=i,Object.defineProperty(t,"__esModule",{value:!0})}(i)},70462,(t,e,i)=>{"use strict";(()=>{var n=Object.create,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyNames,a=Object.getPrototypeOf,l=Object.prototype.hasOwnProperty,h=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports),u=(t,e,i)=>(i=null!=t?n(a(t)):{},((t,e,i,n)=>{if(e&&"object"==typeof e||"function"==typeof e)for(let a of s(e))l.call(t,a)||a===i||r(t,a,{get:()=>e[a],enumerable:!(n=o(e,a))||n.enumerable});return t})(!e&&t&&t.__esModule?i:r(i,"default",{value:t,enumerable:!0}),t)),p=h((t,e)=>{e.exports=function(){this.__data__=[],this.size=0}}),c=h((t,e)=>{e.exports=function(t,e){return t===e||t!=t&&e!=e}}),d=h((t,e)=>{var i=c();e.exports=function(t,e){for(var n=t.length;n--;)if(i(t[n][0],e))return n;return -1}}),_=h((t,e)=>{var i=d(),n=Array.prototype.splice;e.exports=function(t){var e=this.__data__,r=i(e,t);return!(r<0)&&(r==e.length-1?e.pop():n.call(e,r,1),--this.size,!0)}}),f=h((t,e)=>{var i=d();e.exports=function(t){var e=this.__data__,n=i(e,t);return n<0?void 0:e[n][1]}}),m=h((t,e)=>{var i=d();e.exports=function(t){return i(this.__data__,t)>-1}}),g=h((t,e)=>{var i=d();e.exports=function(t,e){var n=this.__data__,r=i(n,t);return r<0?(++this.size,n.push([t,e])):n[r][1]=e,this}}),y=h((t,e)=>{var i=p(),n=_(),r=f(),o=m(),s=g();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{var i=y();e.exports=function(){this.__data__=new i,this.size=0}}),b=h((t,e)=>{e.exports=function(t){var e=this.__data__,i=e.delete(t);return this.size=e.size,i}}),k=h((t,e)=>{e.exports=function(t){return this.__data__.get(t)}}),M=h((t,e)=>{e.exports=function(t){return this.__data__.has(t)}}),x=h((e,i)=>{i.exports=t.g&&t.g.Object===Object&&t.g}),w=h((t,e)=>{var i=x(),n="object"==typeof self&&self&&self.Object===Object&&self;e.exports=i||n||Function("return this")()}),C=h((t,e)=>{e.exports=w().Symbol}),P=h((t,e)=>{var i=C(),n=Object.prototype,r=n.hasOwnProperty,o=n.toString,s=i?i.toStringTag:void 0;e.exports=function(t){var e=r.call(t,s),i=t[s];try{t[s]=void 0;var n=!0}catch{}var a=o.call(t);return n&&(e?t[s]=i:delete t[s]),a}}),E=h((t,e)=>{var i=Object.prototype.toString;e.exports=function(t){return i.call(t)}}),T=h((t,e)=>{var i=C(),n=P(),r=E(),o=i?i.toStringTag:void 0;e.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?n(t):r(t)}}),S=h((t,e)=>{e.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}}),B=h((t,e)=>{var i=T(),n=S();e.exports=function(t){if(!n(t))return!1;var e=i(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}}),O=h((t,e)=>{e.exports=w()["__core-js_shared__"]}),D=h((t,e)=>{var i,n=O(),r=(i=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"";e.exports=function(t){return!!r&&r in t}}),R=h((t,e)=>{var i=Function.prototype.toString;e.exports=function(t){if(null!=t){try{return i.call(t)}catch{}try{return t+""}catch{}}return""}}),I=h((t,e)=>{var i=B(),n=D(),r=S(),o=R(),s=/^\[object .+?Constructor\]$/,a=Object.prototype,l=Function.prototype.toString,h=a.hasOwnProperty,u=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");e.exports=function(t){return!(!r(t)||n(t))&&(i(t)?u:s).test(o(t))}}),A=h((t,e)=>{e.exports=function(t,e){return t?.[e]}}),z=h((t,e)=>{var i=I(),n=A();e.exports=function(t,e){var r=n(t,e);return i(r)?r:void 0}}),N=h((t,e)=>{e.exports=z()(w(),"Map")}),j=h((t,e)=>{e.exports=z()(Object,"create")}),G=h((t,e)=>{var i=j();e.exports=function(){this.__data__=i?i(null):{},this.size=0}}),Z=h((t,e)=>{e.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e}}),F=h((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(e,t)?e[t]:void 0}}),U=h((t,e)=>{var i=j(),n=Object.prototype.hasOwnProperty;e.exports=function(t){var e=this.__data__;return i?void 0!==e[t]:n.call(e,t)}}),V=h((t,e)=>{var i=j();e.exports=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this}}),H=h((t,e)=>{var i=G(),n=Z(),r=F(),o=U(),s=V();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{var i=H(),n=y(),r=N();e.exports=function(){this.size=0,this.__data__={hash:new i,map:new(r||n),string:new i}}}),K=h((t,e)=>{e.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}}),W=h((t,e)=>{var i=K();e.exports=function(t,e){var n=t.__data__;return i(e)?n["string"==typeof e?"string":"hash"]:n.map}}),Y=h((t,e)=>{var i=W();e.exports=function(t){var e=i(this,t).delete(t);return this.size-=!!e,e}}),X=h((t,e)=>{var i=W();e.exports=function(t){return i(this,t).get(t)}}),J=h((t,e)=>{var i=W();e.exports=function(t){return i(this,t).has(t)}}),$=h((t,e)=>{var i=W();e.exports=function(t,e){var n=i(this,t),r=n.size;return n.set(t,e),this.size+=+(n.size!=r),this}}),Q=h((t,e)=>{var i=q(),n=Y(),r=X(),o=J(),s=$();function a(t){var e=-1,i=null==t?0:t.length;for(this.clear();++e{var i=y(),n=N(),r=Q();e.exports=function(t,e){var o=this.__data__;if(o instanceof i){var s=o.__data__;if(!n||s.length<199)return s.push([t,e]),this.size=++o.size,this;o=this.__data__=new r(s)}return o.set(t,e),this.size=o.size,this}}),te=h((t,e)=>{var i=y(),n=v(),r=b(),o=k(),s=M(),a=tt();function l(t){var e=this.__data__=new i(t);this.size=e.size}l.prototype.clear=n,l.prototype.delete=r,l.prototype.get=o,l.prototype.has=s,l.prototype.set=a,e.exports=l}),ti=h((t,e)=>{var i=z();e.exports=function(){try{var t=i(Object,"defineProperty");return t({},"",{}),t}catch{}}()}),tn=h((t,e)=>{var i=ti();e.exports=function(t,e,n){"__proto__"==e&&i?i(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}}),tr=h((t,e)=>{var i=tn(),n=c();e.exports=function(t,e,r){(void 0===r||n(t[e],r))&&(void 0!==r||e in t)||i(t,e,r)}}),to=h((t,e)=>{e.exports=function(t){return function(e,i,n){for(var r=-1,o=Object(e),s=n(e),a=s.length;a--;){var l=s[t?a:++r];if(!1===i(o[l],l,o))break}return e}}}),ts=h((t,e)=>{e.exports=to()()}),ta=h((t,e)=>{var i=w(),n="object"==typeof t&&t&&!t.nodeType&&t,r=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=r&&r.exports===n?i.Buffer:void 0,s=o?o.allocUnsafe:void 0;e.exports=function(t,e){if(e)return t.slice();var i=t.length,n=s?s(i):new t.constructor(i);return t.copy(n),n}}),tl=h((t,e)=>{e.exports=w().Uint8Array}),th=h((t,e)=>{var i=tl();e.exports=function(t){var e=new t.constructor(t.byteLength);return new i(e).set(new i(t)),e}}),tu=h((t,e)=>{var i=th();e.exports=function(t,e){var n=e?i(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}}),tp=h((t,e)=>{e.exports=function(t,e){var i=-1,n=t.length;for(e||(e=Array(n));++i{var i=S(),n=Object.create;e.exports=function(){function t(){}return function(e){if(!i(e))return{};if(n)return n(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}()}),td=h((t,e)=>{e.exports=function(t,e){return function(i){return t(e(i))}}}),t_=h((t,e)=>{e.exports=td()(Object.getPrototypeOf,Object)}),tf=h((t,e)=>{var i=Object.prototype;e.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}}),tm=h((t,e)=>{var i=tc(),n=t_(),r=tf();e.exports=function(t){return"function"!=typeof t.constructor||r(t)?{}:i(n(t))}}),tg=h((t,e)=>{e.exports=function(t){return null!=t&&"object"==typeof t}}),ty=h((t,e)=>{var i=T(),n=tg();e.exports=function(t){return n(t)&&"[object Arguments]"==i(t)}}),tv=h((t,e)=>{var i=ty(),n=tg(),r=Object.prototype,o=r.hasOwnProperty,s=r.propertyIsEnumerable;e.exports=i(function(){return arguments}())?i:function(t){return n(t)&&o.call(t,"callee")&&!s.call(t,"callee")}}),tL=h((t,e)=>{e.exports=Array.isArray}),tb=h((t,e)=>{e.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}}),tk=h((t,e)=>{var i=B(),n=tb();e.exports=function(t){return null!=t&&n(t.length)&&!i(t)}}),tM=h((t,e)=>{var i=tk(),n=tg();e.exports=function(t){return n(t)&&i(t)}}),tx=h((t,e)=>{e.exports=function(){return!1}}),tw=h((t,e)=>{var i=w(),n=tx(),r="object"==typeof t&&t&&!t.nodeType&&t,o=r&&"object"==typeof e&&e&&!e.nodeType&&e,s=o&&o.exports===r?i.Buffer:void 0;e.exports=(s?s.isBuffer:void 0)||n}),tC=h((t,e)=>{var i=T(),n=t_(),r=tg(),o=Object.prototype,s=Function.prototype.toString,a=o.hasOwnProperty,l=s.call(Object);e.exports=function(t){if(!r(t)||"[object Object]"!=i(t))return!1;var e=n(t);if(null===e)return!0;var o=a.call(e,"constructor")&&e.constructor;return"function"==typeof o&&o instanceof o&&s.call(o)==l}}),tP=h((t,e)=>{var i=T(),n=tb(),r=tg(),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,e.exports=function(t){return r(t)&&n(t.length)&&!!o[i(t)]}}),tE=h((t,e)=>{e.exports=function(t){return function(e){return t(e)}}}),tT=h((t,e)=>{var i=x(),n="object"==typeof t&&t&&!t.nodeType&&t,r=n&&"object"==typeof e&&e&&!e.nodeType&&e,o=r&&r.exports===n&&i.process;e.exports=function(){try{return r&&r.require&&r.require("util").types||o&&o.binding&&o.binding("util")}catch{}}()}),tS=h((t,e)=>{var i=tP(),n=tE(),r=tT(),o=r&&r.isTypedArray;e.exports=o?n(o):i}),tB=h((t,e)=>{e.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}}),tO=h((t,e)=>{var i=tn(),n=c(),r=Object.prototype.hasOwnProperty;e.exports=function(t,e,o){var s=t[e];r.call(t,e)&&n(s,o)&&(void 0!==o||e in t)||i(t,e,o)}}),tD=h((t,e)=>{var i=tO(),n=tn();e.exports=function(t,e,r,o){var s=!r;r||(r={});for(var a=-1,l=e.length;++a{e.exports=function(t,e){for(var i=-1,n=Array(t);++i{var i=/^(?:0|[1-9]\d*)$/;e.exports=function(t,e){var n=typeof t;return!!(e=e??0x1fffffffffffff)&&("number"==n||"symbol"!=n&&i.test(t))&&t>-1&&t%1==0&&t{var i=tR(),n=tv(),r=tL(),o=tw(),s=tI(),a=tS(),l=Object.prototype.hasOwnProperty;e.exports=function(t,e){var h=r(t),u=!h&&n(t),p=!h&&!u&&o(t),c=!h&&!u&&!p&&a(t),d=h||u||p||c,_=d?i(t.length,String):[],f=_.length;for(var m in t)(e||l.call(t,m))&&!(d&&("length"==m||p&&("offset"==m||"parent"==m)||c&&("buffer"==m||"byteLength"==m||"byteOffset"==m)||s(m,f)))&&_.push(m);return _}}),tz=h((t,e)=>{e.exports=function(t){var e=[];if(null!=t)for(var i in Object(t))e.push(i);return e}}),tN=h((t,e)=>{var i=S(),n=tf(),r=tz(),o=Object.prototype.hasOwnProperty;e.exports=function(t){if(!i(t))return r(t);var e=n(t),s=[];for(var a in t)"constructor"==a&&(e||!o.call(t,a))||s.push(a);return s}}),tj=h((t,e)=>{var i=tA(),n=tN(),r=tk();e.exports=function(t){return r(t)?i(t,!0):n(t)}}),tG=h((t,e)=>{var i=tD(),n=tj();e.exports=function(t){return i(t,n(t))}}),tZ=h((t,e)=>{var i=tr(),n=ta(),r=tu(),o=tp(),s=tm(),a=tv(),l=tL(),h=tM(),u=tw(),p=B(),c=S(),d=tC(),_=tS(),f=tB(),m=tG();e.exports=function(t,e,g,y,v,b,k){var M=f(t,g),x=f(e,g),w=k.get(x);if(w)return void i(t,g,w);var C=b?b(M,x,g+"",t,e,k):void 0,P=void 0===C;if(P){var E=l(x),T=!E&&u(x),S=!E&&!T&&_(x);C=x,E||T||S?l(M)?C=M:h(M)?C=o(M):T?(P=!1,C=n(x,!0)):S?(P=!1,C=r(x,!0)):C=[]:d(x)||a(x)?(C=M,a(M)?C=m(M):(!c(M)||p(M))&&(C=s(x))):P=!1}P&&(k.set(x,C),v(C,x,y,b,k),k.delete(x)),i(t,g,C)}}),tF=h((t,e)=>{var i=te(),n=tr(),r=ts(),o=tZ(),s=S(),a=tj(),l=tB();e.exports=function t(e,h,u,p,c){e!==h&&r(h,function(r,a){if(c||(c=new i),s(r))o(e,h,a,u,t,p,c);else{var d=p?p(l(e,a),r,a+"",e,h,c):void 0;void 0===d&&(d=r),n(e,a,d)}},a)}}),tU=h((t,e)=>{e.exports=function(t){return t}}),tV=h((t,e)=>{e.exports=function(t,e,i){switch(i.length){case 0:return t.call(e);case 1:return t.call(e,i[0]);case 2:return t.call(e,i[0],i[1]);case 3:return t.call(e,i[0],i[1],i[2])}return t.apply(e,i)}}),tH=h((t,e)=>{var i=tV(),n=Math.max;e.exports=function(t,e,r){return e=n(void 0===e?t.length-1:e,0),function(){for(var o=arguments,s=-1,a=n(o.length-e,0),l=Array(a);++s{e.exports=function(t){return function(){return t}}}),tK=h((t,e)=>{var i=tq(),n=ti(),r=tU();e.exports=n?function(t,e){return n(t,"toString",{configurable:!0,enumerable:!1,value:i(e),writable:!0})}:r}),tW=h((t,e)=>{var i=Date.now;e.exports=function(t){var e=0,n=0;return function(){var r=i(),o=16-(r-n);if(n=r,o>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}}),tY=h((t,e)=>{var i=tK();e.exports=tW()(i)}),tX=h((t,e)=>{var i=tU(),n=tH(),r=tY();e.exports=function(t,e){return r(n(t,e,i),t+"")}}),tJ=h((t,e)=>{var i=c(),n=tk(),r=tI(),o=S();e.exports=function(t,e,s){if(!o(s))return!1;var a=typeof e;return("number"==a?!!(n(s)&&r(e,s.length)):"string"==a&&e in s)&&i(s[e],t)}}),t$=h((t,e)=>{var i=tX(),n=tJ();e.exports=function(t){return i(function(e,i){var r=-1,o=i.length,s=o>1?i[o-1]:void 0,a=o>2?i[2]:void 0;for(s=t.length>3&&"function"==typeof s?(o--,s):void 0,a&&n(i[0],i[1],a)&&(s=o<3?void 0:s,o=1),e=Object(e);++r{var i=tF();e.exports=t$()(function(t,e,n){i(t,e,n)})}),t0=h((t,e)=>{var i=T(),n=tg();e.exports=function(t){return"symbol"==typeof t||n(t)&&"[object Symbol]"==i(t)}}),t1=h((t,e)=>{var i=tL(),n=t0(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;e.exports=function(t,e){if(i(t))return!1;var s=typeof t;return!!("number"==s||"symbol"==s||"boolean"==s||null==t||n(t))||o.test(t)||!r.test(t)||null!=e&&t in Object(e)}}),t2=h((t,e)=>{var i=Q();function n(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var s=t.apply(this,i);return r.cache=o.set(n,s)||o,s};return r.cache=new(n.Cache||i),r}n.Cache=i,e.exports=n}),t3=h((t,e)=>{var i=t2();e.exports=function(t){var e=i(t,function(t){return 500===n.size&&n.clear(),t}),n=e.cache;return e}}),t4=h((t,e)=>{var i=t3(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g;e.exports=i(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n,function(t,i,n,o){e.push(n?o.replace(r,"$1"):i||t)}),e})}),t8=h((t,e)=>{e.exports=function(t,e){for(var i=-1,n=null==t?0:t.length,r=Array(n);++i{var i=C(),n=t8(),r=tL(),o=t0(),s=1/0,a=i?i.prototype:void 0,l=a?a.toString:void 0;e.exports=function t(e){if("string"==typeof e)return e;if(r(e))return n(e,t)+"";if(o(e))return l?l.call(e):"";var i=e+"";return"0"==i&&1/e==-s?"-0":i}}),t6=h((t,e)=>{var i=t5();e.exports=function(t){return null==t?"":i(t)}}),t9=h((t,e)=>{var i=tL(),n=t1(),r=t4(),o=t6();e.exports=function(t,e){return i(t)?t:n(t,e)?[t]:r(o(t))}}),t7=h((t,e)=>{var i=t0(),n=1/0;e.exports=function(t){if("string"==typeof t||i(t))return t;var e=t+"";return"0"==e&&1/t==-n?"-0":e}}),et=h((t,e)=>{var i=t9(),n=t7();e.exports=function(t,e){e=i(e,t);for(var r=0,o=e.length;null!=t&&r{var i=et();e.exports=function(t,e,n){var r=null==t?void 0:i(t,e);return void 0===r?n:r}}),ei=h((n,r)=>{var o,s;let a;o=n,s=function(){function t(t,e,i){var n=t[e];t[e]=t[i],t[i]=n}function e(t,e){return te)}var i=function(t){void 0===t&&(t=9),this._maxEntries=Math.max(4,t),this._minEntries=Math.max(2,Math.ceil(.4*this._maxEntries)),this.clear()};function n(t,e){r(t,0,t.children.length,e,t)}function r(t,e,i,n,r){r||(r=c(null)),r.minX=1/0,r.minY=1/0,r.maxX=-1/0,r.maxY=-1/0;for(var s=e;s=t.minX&&e.maxY>=t.minY}function c(t){return{children:t,height:1,leaf:!0,minX:1/0,minY:1/0,maxX:-1/0,maxY:-1/0}}function d(i,n,r,o,s){for(var a=[n,r];a.length;)if(!((r=a.pop())-(n=a.pop())<=o)){var l=n+Math.ceil((r-n)/o/2)*o;(function e(i,n,r,o,s){for(;o>r;){if(o-r>600){var a=o-r+1,l=n-r+1,h=Math.log(a),u=.5*Math.exp(2*h/3),p=.5*Math.sqrt(h*u*(a-u)/a)*(l-a/2<0?-1:1),c=Math.max(r,Math.floor(n-l*u/a+p)),d=Math.min(o,Math.floor(n+(a-l)*u/a+p));e(i,n,c,d,s)}var _=i[n],f=r,m=o;for(t(i,r,n),s(i[o],_)>0&&t(i,r,o);fs(i[f],_);)f++;for(;s(i[m],_)>0;)m--}0===s(i[r],_)?t(i,r,m):t(i,++m,o),m<=n&&(r=m+1),n<=m&&(o=m-1)}})(i,l,n||0,r||i.length-1,s||e),a.push(n,l,l,r)}}return i.prototype.all=function(){return this._all(this.data,[])},i.prototype.search=function(t){var e=this.data,i=[];if(!p(t,e))return i;for(var n=this.toBBox,r=[];e;){for(var o=0;o=0&&r[e].children.length>this._maxEntries;)this._split(r,e),e--;this._adjustParentBBoxes(n,r,e)},i.prototype._split=function(t,e){var i=t[e],r=i.children.length,o=this._minEntries;this._chooseSplitAxis(i,o,r);var s=this._chooseSplitIndex(i,o,r),a=c(i.children.splice(s,i.children.length-s));a.height=i.height,a.leaf=i.leaf,n(i,this.toBBox),n(a,this.toBBox),e?t[e-1].children.push(a):this._splitRoot(i,a)},i.prototype._splitRoot=function(t,e){this.data=c([t,e]),this.data.height=t.height+1,this.data.leaf=!1,n(this.data,this.toBBox)},i.prototype._chooseSplitIndex=function(t,e,i){for(var n,o,s,a,h,u=1/0,p=1/0,c=e;c<=i-e;c++){var d=r(t,0,c,this.toBBox),_=r(t,c,i,this.toBBox),f=(o=void 0,s=void 0,a=void 0,o=Math.max(d.minX,_.minX),s=Math.max(d.minY,_.minY),Math.max(0,(a=Math.min(d.maxX,_.maxX))-o)*Math.max(0,Math.min(d.maxY,_.maxY)-s)),m=l(d)+l(_);f=e;d--){var _=t.children[d];o(l,t.leaf?s(_):_),u+=h(l)}return u},i.prototype._adjustParentBBoxes=function(t,e,i){for(var n=i;n>=0;n--)o(e[n],t)},i.prototype._condense=function(t){for(var e=t.length-1,i=void 0;e>=0;e--)0===t[e].children.length?e>0?(i=t[e-1].children).splice(i.indexOf(t[e]),1):this.clear():n(t[e],this.toBBox)},i},"object"==typeof n&&"u">typeof r?r.exports=s():"function"==typeof define&&define.amd?void 0!==(a=s(t.r,i,e))&&t.v(a):(o=o||self).RBush=s()});Array.prototype.findIndex=Array.prototype.findIndex||function(t){if(this===null)throw TypeError("Array.prototype.findIndex called on null or undefined");if("function"!=typeof t)throw TypeError("callback must be a function");for(var e=Object(this),i=e.length>>>0,n=arguments[1],r=0;r>>0,n=arguments[1],r=0;r>>0;if(0===r)return!1;for(var o=0|e,s=Math.max(o>=0?o:r-Math.abs(o),0);s{if(0!==e.length){let i=Array.isArray(e)?ep(e):e;Array.isArray(i)?0!==i.length&&t.push(i):t.push(i)}return t},[])}function ec(t,e,i,n,r=!0){let o,s,a=[];for(let l=0;l1e-12;){x=Math.cos(2*f+k);let t=b*(w=Math.sin(k))*(x+b/4*((C=Math.cos(k))*(-1+2*x*x)-b/6*x*(-3+4*w*w)*(-3+4*x*x)));M=k,k=i/(r*v)+t}let P=_*w-d*C*p,E=Math.atan2(_*C+d*w*p,(1-o)*Math.sqrt(m*m+P*P)),T=o/16*g*(4+o*(4-3*g)),S=Math.atan2(w*u,d*C-_*w*p)-(1-T)*o*m*(k+T*w*(x+T*C*(-1+2*x*x)));return L.latLng(s+180*S/l,180*E/l)}(t,360*l/i+n,e),s=L.latLng(o.lng,o.lat);else{let n=t.lat+Math.cos(2*l*Math.PI/i)*e,r=t.lng+Math.sin(2*l*Math.PI/i)*e;s=L.latLng(n,r)}a.push(s)}return a}function ed(t,e,i){let n=t.latLngToContainerPoint(e),r=t.latLngToContainerPoint(i),o=180*Math.atan2(r.y-n.y,r.x-n.x)/Math.PI+90;return o+360*(o<0)}function e_(t,e,i,n){let r=ed(t,e,i);return function(t,e,i){e=(e+360)%360;let n=Math.PI/180,r=180/Math.PI,{R:o}=L.CRS.Earth,s=t.lng*n,a=t.lat*n,l=e*n,h=Math.sin(a),u=Math.cos(a),p=Math.cos(i/o),c=Math.sin(i/o),d=Math.asin(h*p+u*c*Math.cos(l)),_=s+Math.atan2(Math.sin(l)*c*u,p-h*Math.sin(d)),f=(_*=r)-360,m=_<-180?_+360:_;return _=_>180?f:m,L.latLng([d*r,_])}(e,r,n)}function ef(t,e=t.getLatLngs()){return t instanceof L.Polygon?L.polygon(e).getLatLngs():L.polyline(e).getLatLngs()}function em(t,e){if(e.options.crs?.projection?.MAX_LATITUDE){let i=e.options.crs?.projection?.MAX_LATITUDE;t.lat=Math.max(Math.min(i,t.lat),-i)}return t}function eg(t){return t.options.renderer||t._map&&(t._map._getPaneRenderer(t.options.pane)||t._map.options.renderer||t._map._renderer)||t._renderer}var ey=L.Class.extend({includes:[{_globalEditModeEnabled:!1,enableGlobalEditMode(t){let e={...t};this._globalEditModeEnabled=!0,this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),L.PM.Utils.findLayers(this.map).forEach(t=>{this._isRelevantForEdit(t)&&t.pm.enable(e)}),this.throttledReInitEdit||(this.throttledReInitEdit=L.Util.throttle(this.handleLayerAdditionInGlobalEditMode,100,this)),this._addedLayersEdit={},this.map.on("layeradd",this._layerAddedEdit,this),this.map.on("layeradd",this.throttledReInitEdit,this),this._fireGlobalEditModeToggled(!0)},disableGlobalEditMode(){this._globalEditModeEnabled=!1,L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.disable()}),this.map.off("layeradd",this._layerAddedEdit,this),this.map.off("layeradd",this.throttledReInitEdit,this),this.Toolbar.toggleButton("editMode",this.globalEditModeEnabled()),this._fireGlobalEditModeToggled(!1)},globalEditEnabled(){return this.globalEditModeEnabled()},globalEditModeEnabled(){return this._globalEditModeEnabled},toggleGlobalEditMode(t=this.globalOptions){this.globalEditModeEnabled()?this.disableGlobalEditMode():this.enableGlobalEditMode(t)},handleLayerAdditionInGlobalEditMode(){let t=this._addedLayersEdit;if(this._addedLayersEdit={},this.globalEditModeEnabled())for(let e in t){let i=t[e];this._isRelevantForEdit(i)&&i.pm.enable({...this.globalOptions})}},_layerAddedEdit({layer:t}){this._addedLayersEdit[L.stamp(t)]=t},_isRelevantForEdit:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowEditing},{_globalDragModeEnabled:!1,enableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!0,this._addedLayersDrag={},t.forEach(t=>{this._isRelevantForDrag(t)&&t.pm.enableLayerDrag()}),this.throttledReInitDrag||(this.throttledReInitDrag=L.Util.throttle(this.reinitGlobalDragMode,100,this)),this.map.on("layeradd",this._layerAddedDrag,this),this.map.on("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!0)},disableGlobalDragMode(){let t=L.PM.Utils.findLayers(this.map);this._globalDragModeEnabled=!1,t.forEach(t=>{t.pm.disableLayerDrag()}),this.map.off("layeradd",this._layerAddedDrag,this),this.map.off("layeradd",this.throttledReInitDrag,this),this.Toolbar.toggleButton("dragMode",this.globalDragModeEnabled()),this._fireGlobalDragModeToggled(!1)},globalDragModeEnabled(){return!!this._globalDragModeEnabled},toggleGlobalDragMode(){this.globalDragModeEnabled()?this.disableGlobalDragMode():this.enableGlobalDragMode()},reinitGlobalDragMode(){let t=this._addedLayersDrag;if(this._addedLayersDrag={},this.globalDragModeEnabled())for(let e in t){let i=t[e];this._isRelevantForDrag(i)&&i.pm.enableLayerDrag()}},_layerAddedDrag({layer:t}){this._addedLayersDrag[L.stamp(t)]=t},_isRelevantForDrag:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.draggable},{_globalRemovalModeEnabled:!1,enableGlobalRemovalMode(){this._globalRemovalModeEnabled=!0,this.map.eachLayer(t=>{this._isRelevantForRemoval(t)&&(t.pm.enabled()&&t.pm.disable(),t.on("click",this.removeLayer,this))}),this.throttledReInitRemoval||(this.throttledReInitRemoval=L.Util.throttle(this.handleLayerAdditionInGlobalRemovalMode,100,this)),this._addedLayersRemoval={},this.map.on("layeradd",this._layerAddedRemoval,this),this.map.on("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!0)},disableGlobalRemovalMode(){this._globalRemovalModeEnabled=!1,this.map.eachLayer(t=>{t.off("click",this.removeLayer,this)}),this.map.off("layeradd",this._layerAddedRemoval,this),this.map.off("layeradd",this.throttledReInitRemoval,this),this.Toolbar.toggleButton("removalMode",this.globalRemovalModeEnabled()),this._fireGlobalRemovalModeToggled(!1)},globalRemovalEnabled(){return this.globalRemovalModeEnabled()},globalRemovalModeEnabled(){return!!this._globalRemovalModeEnabled},toggleGlobalRemovalMode(){this.globalRemovalModeEnabled()?this.disableGlobalRemovalMode():this.enableGlobalRemovalMode()},removeLayer(t){let e=t.target;this._isRelevantForRemoval(e)&&!e.pm.dragging()&&(e.removeFrom(this.map.pm._getContainingLayer()),e.remove(),e instanceof L.LayerGroup?(this._fireRemoveLayerGroup(e),this._fireRemoveLayerGroup(this.map,e)):(e.pm._fireRemove(e),e.pm._fireRemove(this.map,e)))},_isRelevantForRemoval:t=>t.pm&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRemoval,handleLayerAdditionInGlobalRemovalMode(){let t=this._addedLayersRemoval;if(this._addedLayersRemoval={},this.globalRemovalModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&(i.pm.enabled()&&i.pm.disable(),i.on("click",this.removeLayer,this))}},_layerAddedRemoval({layer:t}){this._addedLayersRemoval[L.stamp(t)]=t}},{_globalRotateModeEnabled:!1,enableGlobalRotateMode(){this._globalRotateModeEnabled=!0,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{this._isRelevantForRotate(t)&&t.pm.enableRotate()}),this.throttledReInitRotate||(this.throttledReInitRotate=L.Util.throttle(this.handleLayerAdditionInGlobalRotateMode,100,this)),this._addedLayersRotate={},this.map.on("layeradd",this._layerAddedRotate,this),this.map.on("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},disableGlobalRotateMode(){this._globalRotateModeEnabled=!1,L.PM.Utils.findLayers(this.map).filter(t=>t instanceof L.Polyline).forEach(t=>{t.pm.disableRotate()}),this.map.off("layeradd",this._layerAddedRotate,this),this.map.off("layeradd",this.throttledReInitRotate,this),this.Toolbar.toggleButton("rotateMode",this.globalRotateModeEnabled()),this._fireGlobalRotateModeToggled()},globalRotateModeEnabled(){return!!this._globalRotateModeEnabled},toggleGlobalRotateMode(){this.globalRotateModeEnabled()?this.disableGlobalRotateMode():this.enableGlobalRotateMode()},_isRelevantForRotate:t=>t.pm&&t instanceof L.Polyline&&!(t instanceof L.LayerGroup)&&(!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)&&!t._pmTempLayer&&t.pm.options.allowRotation,handleLayerAdditionInGlobalRotateMode(){let t=this._addedLayersRotate;if(this._addedLayersRotate={},this.globalRotateModeEnabled())for(let e in t){let i=t[e];this._isRelevantForRemoval(i)&&i.pm.enableRotate()}},_layerAddedRotate({layer:t}){this._addedLayersRotate[L.stamp(t)]=t}},ea],initialize(t){this.map=t,this.Draw=new L.PM.Draw(t),this.Toolbar=new L.PM.Toolbar(t),this.Keyboard={_lastEvents:{keydown:void 0,keyup:void 0,current:void 0},_initKeyListener(t){this.map=t,L.DomEvent.on(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.on(window,"blur",this._onBlur,this),t.once("unload",this._unbindKeyListenerEvents,this)},_handleEscapeKey(t){let e=this.map.pm;return!!e.getGlobalOptions().exitModeOnEscape&&!!(e.globalDrawModeEnabled()||e.globalEditModeEnabled()||e.globalDragModeEnabled()||e.globalRemovalModeEnabled()||e.globalRotateModeEnabled()||e.globalCutModeEnabled())&&(t.preventDefault(),e.globalDrawModeEnabled()&&e.disableDraw(),e.globalEditModeEnabled()&&e.disableGlobalEditMode(),e.globalDragModeEnabled()&&e.disableGlobalDragMode(),e.globalRemovalModeEnabled()&&e.disableGlobalRemovalMode(),e.globalRotateModeEnabled()&&e.disableGlobalRotateMode(),e.globalCutModeEnabled()&&e.disableGlobalCutMode(),!0)},_handleEnterKey(t){let e=this.map.pm;if(!e.getGlobalOptions().finishOnEnter)return!1;let i=e.Draw.getActiveShape();if(!i)return!1;let n=e.Draw[i];return!!n&&!!n._finishShape&&!!this._canFinishShape(n,i)&&(t.preventDefault(),n._finishShape(),!0)},_canFinishShape(t,e){if(["Marker","CircleMarker","Text"].includes(e))return!1;if("Rectangle"===e)return void 0!==t._startMarker;if("Circle"===e)return t._centerMarker&&t._layerGroup?.hasLayer(t._centerMarker);if(t._layer&&t._layer.getLatLngs){let i=t._layer.getLatLngs();if("Line"===e)return(i.flat?i.flat():i).length>=2;if("Polygon"===e||"Cut"===e)return i.length>=3}return!1},_unbindKeyListenerEvents(){L.DomEvent.off(document,"keydown keyup",this._onKeyListener,this),L.DomEvent.off(window,"blur",this._onBlur,this)},_onKeyListener(t){let e="document";this.map.getContainer().contains(t.target)&&(e="map");let i={event:t,eventType:t.type,focusOn:e};this._lastEvents[t.type]=i,this._lastEvents.current=i,this.map.pm._fireKeyeventEvent(t,t.type,e),"keydown"===t.type&&("Escape"===t.key&&this._handleEscapeKey(t),"Enter"===t.key&&this._handleEnterKey(t))},_onBlur(t){t.altKey=!1;let e={event:t,eventType:t.type,focusOn:"document"};this._lastEvents[t.type]=e,this._lastEvents.current=e},getLastKeyEvent(t="current"){return this._lastEvents[t]},isShiftKeyPressed(){return this._lastEvents.current?.event.shiftKey},isAltKeyPressed(){return this._lastEvents.current?.event.altKey},isCtrlKeyPressed(){return this._lastEvents.current?.event.ctrlKey},isMetaKeyPressed(){return this._lastEvents.current?.event.metaKey},getPressedKey(){return this._lastEvents.current?.event.key}},this.globalOptions={snappable:!0,layerGroup:void 0,snappingOrder:["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"],panes:{vertexPane:"markerPane",layerPane:"overlayPane",markerPane:"markerPane"},draggable:!0,exitModeOnEscape:!1,finishOnEnter:!1},this.Keyboard._initKeyListener(t)},setLang(t="en",e,i="en"){t=function(t,e){if(e[t=t.trim().toLowerCase()])return t;let i=t.replace(/[-_\s]/g,"_").match(/^([a-z]{2,3})(?:_([a-z]{2,3}))?$/);if(i){let t=[];for(let n of(i[2]&&t.push(`${i[1]}_${i[2]}`),t.push(i[1]),t))if(e[n])return n}return t}(t,eo);let n=L.PM.activeLang;e&&(eo[t]=(0,en.default)(eo[i],e)),L.PM.activeLang=t,this.map.pm.Toolbar.reinit(),this._fireLangChange(n,t,i,eo[t])},addControls(t){this.Toolbar.addControls(t)},removeControls(){this.Toolbar.removeControls()},toggleControls(){this.Toolbar.toggleControls()},controlsVisible(){return this.Toolbar.isVisible},enableDraw(t="Polygon",e){"Poly"===t&&(t="Polygon"),this.Draw.enable(t,e)},disableDraw(t="Polygon"){"Poly"===t&&(t="Polygon"),this.Draw.disable(t)},setPathOptions(t,e={}){let i=e.ignoreShapes||[],n=e.merge||!1;this.map.pm.Draw.shapes.forEach(e=>{-1===i.indexOf(e)&&this.map.pm.Draw[e].setPathOptions(t,n)})},getGlobalOptions(){return this.globalOptions},setGlobalOptions(t){let e=(0,en.default)(this.globalOptions,t);e.editable&&(e.resizeableCircleMarker=e.editable,delete e.editable);let i=!1;this.map.pm.Draw.CircleMarker.enabled()&&!!this.map.pm.Draw.CircleMarker.options.resizeableCircleMarker!=!!e.resizeableCircleMarker&&(this.map.pm.Draw.CircleMarker.disable(),i=!0);let n=!1;this.map.pm.Draw.Circle.enabled()&&!!this.map.pm.Draw.Circle.options.resizeableCircle!=!!e.resizeableCircle&&(this.map.pm.Draw.Circle.disable(),n=!0),this.map.pm.Draw.shapes.forEach(t=>{this.map.pm.Draw[t].setOptions(e)}),i&&this.map.pm.Draw.CircleMarker.enable(),n&&this.map.pm.Draw.Circle.enable(),L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.setOptions(e)}),this.map.fire("pm:globaloptionschanged"),this.globalOptions=e,this.applyGlobalOptions()},applyGlobalOptions(){L.PM.Utils.findLayers(this.map).forEach(t=>{t.pm.enabled()&&t.pm.applyOptions()})},globalDrawModeEnabled(){return!!this.Draw.getActiveShape()},globalCutModeEnabled(){return!!this.Draw.Cut.enabled()},enableGlobalCutMode(t){return this.Draw.Cut.enable(t)},toggleGlobalCutMode(t){return this.Draw.Cut.toggle(t)},disableGlobalCutMode(){return this.Draw.Cut.disable()},getGeomanLayers(t=!1){let e=L.PM.Utils.findLayers(this.map);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},getGeomanDrawLayers(t=!1){let e=L.PM.Utils.findLayers(this.map).filter(t=>!0===t._drawnByGeoman);if(!t)return e;let i=L.featureGroup();return i._pmTempLayer=!0,e.forEach(t=>{i.addLayer(t)}),i},_getContainingLayer(){return this.globalOptions.layerGroup&&this.globalOptions.layerGroup instanceof L.LayerGroup?this.globalOptions.layerGroup:this.map},_isCRSSimple(){return this.map.options.crs===L.CRS.Simple},_touchEventCounter:0,_addTouchEvents(t){0===this._touchEventCounter&&(L.DomEvent.on(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.on(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter+=1},_removeTouchEvents(t){1===this._touchEventCounter&&(L.DomEvent.off(t,"touchmove",this._canvasTouchMove,this),L.DomEvent.off(t,"touchstart touchend touchcancel",this._canvasTouchClick,this)),this._touchEventCounter=this._touchEventCounter<=1?0:this._touchEventCounter-1},_canvasTouchMove(t){eg(this.map)._onMouseMove(this._createMouseEvent("mousemove",t))},_canvasTouchClick(t){let e="";"touchstart"===t.type||"pointerdown"===t.type?e="mousedown":("touchend"===t.type||"pointerup"===t.type||"touchcancel"===t.type||"pointercancel"===t.type)&&(e="mouseup"),e&&eg(this.map)._onClick(this._createMouseEvent(e,t))},_createMouseEvent(t,e){let i,n=e.touches[0]||e.changedTouches[0];try{i=new MouseEvent(t,{bubbles:e.bubbles,cancelable:e.cancelable,view:e.view,detail:n.detail,screenX:n.screenX,screenY:n.screenY,clientX:n.clientX,clientY:n.clientY,ctrlKey:e.ctrlKey,altKey:e.altKey,shiftKey:e.shiftKey,metaKey:e.metaKey,button:e.button,relatedTarget:e.relatedTarget})}catch{(i=document.createEvent("MouseEvents")).initMouseEvent(t,e.bubbles,e.cancelable,e.view,n.detail,n.screenX,n.screenY,n.clientX,n.clientY,e.ctrlKey,e.altKey,e.shiftKey,e.metaKey,e.button,e.relatedTarget)}return i}}),ev=L.Control.extend({includes:[ea],options:{position:"topleft",disableByOtherButtons:!0},initialize(t){this._button=L.Util.extend({},this.options,t)},onAdd(t){return this._map=t,this._map.pm.Toolbar.options.oneBlock?this._container=this._map.pm.Toolbar._createContainer(this.options.position):"edit"===this._button.tool?this._container=this._map.pm.Toolbar.editContainer:"options"===this._button.tool?this._container=this._map.pm.Toolbar.optionsContainer:"custom"===this._button.tool?this._container=this._map.pm.Toolbar.customContainer:this._container=this._map.pm.Toolbar.drawContainer,this._renderButton(),this._container},_renderButton(){let t=this.buttonsDomNode;this.buttonsDomNode=this._makeButton(this._button),t?t.replaceWith(this.buttonsDomNode):this._container.appendChild(this.buttonsDomNode)},onRemove(){return this.buttonsDomNode.remove(),this._container},getText(){return this._button.text},getIconUrl(){return this._button.iconUrl},destroy(){this._button={},this._update()},toggle(t){return"boolean"==typeof t?this._button.toggleStatus=t:this._button.toggleStatus=!this._button.toggleStatus,this._applyStyleClasses(),this._updateActiveAction(this._button),this._button.toggleStatus},toggled(){return this._button.toggleStatus},onCreate(){this.toggle(!1)},disable(){this.toggle(!1),this._button.disabled=!0,this._updateDisabled()},enable(){this._button.disabled=!1,this._updateDisabled(),this._updateActiveAction(this._button)},_triggerClick(t){t&&t.preventDefault(),this._button.disabled||(this._button.onClick(t,{button:this,event:t}),this._clicked(t),this._button.afterClick(t,{button:this,event:t}))},_makeButton(t){let e=this.options.position.indexOf("right")>-1?"pos-right":"",i=L.DomUtil.create("div",`button-container ${e}`,this._container);t.title&&i.setAttribute("title",t.title);let n=L.DomUtil.create("a","leaflet-buttons-control-button",i);n.setAttribute("role","button"),n.setAttribute("tabindex","0"),n.href="#";let r=L.DomUtil.create("div",`leaflet-pm-actions-container ${e}`,i),o=t.actions,s={cancel:{text:eh("actions.cancel"),title:eh("actions.cancel"),onClick(){this._triggerClick()}},finishMode:{text:eh("actions.finish"),title:eh("actions.finish"),onClick(){this._triggerClick()}},removeLastVertex:{text:eh("actions.removeLastVertex"),title:eh("actions.removeLastVertex"),onClick(){this._map.pm.Draw[t.jsClass]._removeLastVertex()}},finish:{text:eh("actions.finish"),title:eh("actions.finish"),onClick(e){this._map.pm.Draw[t.jsClass]._finishShape(e)}}};t._preparedActions=o.map(i=>{let n="string"==typeof i?i:i.name,o;if(s[n])o=s[n];else{if(!i.text)return o;o=i}let a=L.DomUtil.create("a",`leaflet-pm-action ${e} action-${n}`,r);if(a.setAttribute("role","button"),a.setAttribute("tabindex","0"),a.href="#",o.title&&(a.title=o.title),a.innerHTML=o.text,L.DomEvent.disableClickPropagation(a),L.DomEvent.on(a,"click",L.DomEvent.stop),o._node=a,!t.disabled&&o.onClick){let e=e=>{e.preventDefault();let i="",{buttons:n}=this._map.pm.Toolbar;for(let e in n)if(n[e]._button===t){i=e;break}this._fireActionClick(o,i,t)};L.DomEvent.addListener(a,"click",e,this),L.DomEvent.addListener(a,"click",o.onClick,this),L.DomEvent.addListener(a,"click",()=>this._updateActiveAction(t))}return o}),this._updateActiveAction(t),t.toggleStatus&&L.DomUtil.addClass(i,"active");let a=L.DomUtil.create("div","control-icon",n);return t.iconUrl&&a.setAttribute("src",t.iconUrl),t.className&&L.DomUtil.addClass(a,t.className),L.DomEvent.disableClickPropagation(n),L.DomEvent.on(n,"click",L.DomEvent.stop),t.disabled||(L.DomEvent.addListener(n,"click",this._onBtnClick,this),L.DomEvent.addListener(n,"click",this._triggerClick,this)),t.disabled&&(L.DomUtil.addClass(n,"pm-disabled"),n.setAttribute("aria-disabled","true")),i},_applyStyleClasses(){this._container&&(this._button.toggleStatus&&!1!==this._button.cssToggle?(L.DomUtil.addClass(this.buttonsDomNode,"active"),L.DomUtil.addClass(this._container,"activeChild")):(L.DomUtil.removeClass(this.buttonsDomNode,"active"),L.DomUtil.removeClass(this._container,"activeChild")))},_onBtnClick(){if(this._button.disabled)return;this._button.disableOtherButtons&&this._map.pm.Toolbar.triggerClickOnToggledButtons(this);let t="",{buttons:e}=this._map.pm.Toolbar;for(let i in e)if(e[i]._button===this._button){t=i;break}this._fireButtonClick(t,this._button)},_clicked(){this._button.doToggle&&this.toggle()},_updateDisabled(){if(!this._container)return;let t="pm-disabled",e=this.buttonsDomNode.children[0];this._button.disabled?(L.DomUtil.addClass(e,t),e.setAttribute("aria-disabled","true")):(L.DomUtil.removeClass(e,t),e.setAttribute("aria-disabled","false"))},_updateActiveAction(t){t._preparedActions?.forEach(t=>{t?._node&&(t.isActive&&t.isActive.call(this)?L.DomUtil.addClass(t._node,"active-action"):L.DomUtil.removeClass(t._node,"active-action"))})}});L.Control.PMButton=ev;var eL=L.Class.extend({options:{drawMarker:!0,drawRectangle:!0,drawPolyline:!0,drawPolygon:!0,drawCircle:!0,drawCircleMarker:!0,drawText:!0,editMode:!0,dragMode:!0,cutPolygon:!0,removalMode:!0,rotateMode:!0,snappingOption:!0,drawControls:!0,editControls:!0,optionsControls:!0,customControls:!0,oneBlock:!1,position:"topleft",positions:{draw:"",edit:"",options:"",custom:""}},customButtons:[],initialize(t){this.customButtons=[],this.options.positions={draw:"",edit:"",options:"",custom:""},this.init(t)},reinit(){let t=this.isVisible;this.removeControls(),this._defineButtons(),t&&this.addControls()},init(t){this.map=t,this.buttons={},this.isVisible=!1,this.drawContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-draw leaflet-bar leaflet-control"),this.editContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-edit leaflet-bar leaflet-control"),this.optionsContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-options leaflet-bar leaflet-control"),this.customContainer=L.DomUtil.create("div","leaflet-pm-toolbar leaflet-pm-custom leaflet-bar leaflet-control"),this._defineButtons()},_createContainer(t){let e=`${t}Container`;return this[e]||(this[e]=L.DomUtil.create("div",`leaflet-pm-toolbar leaflet-pm-${t} leaflet-bar leaflet-control`)),this[e]},getButtons(){return this.buttons},addControls(t=this.options){"u">typeof t.editPolygon&&(t.editMode=t.editPolygon),"u">typeof t.deleteLayer&&(t.removalMode=t.deleteLayer),L.Util.setOptions(this,t),this.applyIconStyle(),this.isVisible=!0,this._showHideButtons()},applyIconStyle(){let t=this.getButtons(),e={drawMarker:"control-icon leaflet-pm-icon-marker",drawPolyline:"control-icon leaflet-pm-icon-polyline",drawRectangle:"control-icon leaflet-pm-icon-rectangle",drawPolygon:"control-icon leaflet-pm-icon-polygon",drawCircle:"control-icon leaflet-pm-icon-circle",drawCircleMarker:"control-icon leaflet-pm-icon-circle-marker",editMode:"control-icon leaflet-pm-icon-edit",dragMode:"control-icon leaflet-pm-icon-drag",cutPolygon:"control-icon leaflet-pm-icon-cut",removalMode:"control-icon leaflet-pm-icon-delete",drawText:"control-icon leaflet-pm-icon-text"};for(let i in t){let n=t[i];L.Util.setOptions(n,{className:e[i]})}},removeControls(){let t=this.getButtons();for(let e in t)t[e].remove();this.isVisible=!1},deleteControl(t){let e=this._btnNameMapping(t);this.buttons[e]&&(this.buttons[e].remove(),delete this.buttons[e])},toggleControls(t=this.options){this.isVisible?this.removeControls():this.addControls(t)},_addButton(t,e){return this.buttons[t]=e,this.options[t]=!!this.options[t],this.buttons[t]},triggerClickOnToggledButtons(t){for(let e in this.buttons){let i=this.buttons[e];i._button.disableByOtherButtons&&i!==t&&i.toggled()&&i._triggerClick()}},toggleButton(t,e,i=!0){"editPolygon"===t&&(t="editMode"),"deleteLayer"===t&&(t="removalMode");let n=t;return i&&this.triggerClickOnToggledButtons(this.buttons[n]),!!this.buttons[n]&&this.buttons[n].toggle(e)},_defineButtons(){let t={className:"control-icon leaflet-pm-icon-marker",title:eh("buttonTitles.drawMarkerButton"),jsClass:"Marker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},e={title:eh("buttonTitles.drawPolyButton"),className:"control-icon leaflet-pm-icon-polygon",jsClass:"Polygon",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},i={className:"control-icon leaflet-pm-icon-polyline",title:eh("buttonTitles.drawLineButton"),jsClass:"Line",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["finish","removeLastVertex","cancel"]},n={title:eh("buttonTitles.drawCircleButton"),className:"control-icon leaflet-pm-icon-circle",jsClass:"Circle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},r={title:eh("buttonTitles.drawCircleMarkerButton"),className:"control-icon leaflet-pm-icon-circle-marker",jsClass:"CircleMarker",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},o={title:eh("buttonTitles.drawRectButton"),className:"control-icon leaflet-pm-icon-rectangle",jsClass:"Rectangle",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]},s={title:eh("buttonTitles.editButton"),className:"control-icon leaflet-pm-icon-edit",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalEditMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},a={title:eh("buttonTitles.dragButton"),className:"control-icon leaflet-pm-icon-drag",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalDragMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},l={title:eh("buttonTitles.cutButton"),className:"control-icon leaflet-pm-icon-cut",jsClass:"Cut",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle({snappable:!0,cursorMarker:!0,allowSelfIntersection:!1})},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finish","removeLastVertex","cancel"]},h={title:eh("buttonTitles.deleteButton"),className:"control-icon leaflet-pm-icon-delete",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRemovalMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},u={title:eh("buttonTitles.rotateButton"),className:"control-icon leaflet-pm-icon-rotate",onClick:()=>{},afterClick:()=>{this.map.pm.toggleGlobalRotateMode()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,tool:"edit",actions:["finishMode"]},p={className:"control-icon leaflet-pm-icon-text",title:eh("buttonTitles.drawTextButton"),jsClass:"Text",onClick:()=>{},afterClick:(t,e)=>{this.map.pm.Draw[e.button._button.jsClass].toggle()},doToggle:!0,toggleStatus:!1,disableOtherButtons:!0,position:this.options.position,actions:["cancel"]};this._addButton("drawMarker",new L.Control.PMButton(t)),this._addButton("drawPolyline",new L.Control.PMButton(i)),this._addButton("drawRectangle",new L.Control.PMButton(o)),this._addButton("drawPolygon",new L.Control.PMButton(e)),this._addButton("drawCircle",new L.Control.PMButton(n)),this._addButton("drawCircleMarker",new L.Control.PMButton(r)),this._addButton("drawText",new L.Control.PMButton(p)),this._addButton("editMode",new L.Control.PMButton(s)),this._addButton("dragMode",new L.Control.PMButton(a)),this._addButton("cutPolygon",new L.Control.PMButton(l)),this._addButton("removalMode",new L.Control.PMButton(h)),this._addButton("rotateMode",new L.Control.PMButton(u))},_showHideButtons(){if(!this.isVisible)return;this.removeControls(),this.isVisible=!0;let t=this.getButtons(),e=[];for(let i in!1===this.options.drawControls&&(e=e.concat(Object.keys(t).filter(e=>!t[e]._button.tool))),!1===this.options.editControls&&(e=e.concat(Object.keys(t).filter(e=>"edit"===t[e]._button.tool))),!1===this.options.optionsControls&&(e=e.concat(Object.keys(t).filter(e=>"options"===t[e]._button.tool))),!1===this.options.customControls&&(e=e.concat(Object.keys(t).filter(e=>"custom"===t[e]._button.tool))),t)if(this.options[i]&&-1===e.indexOf(i)){let e=t[i]._button.tool;e||(e="draw"),t[i].setPosition(this._getBtnPosition(e)),t[i].addTo(this.map)}},_getBtnPosition(t){return this.options.positions&&this.options.positions[t]?this.options.positions[t]:this.options.position},setBlockPosition(t,e){this.options.positions[t]=e,this._showHideButtons(),this.changeControlOrder()},getBlockPositions(){return this.options.positions},copyDrawControl(t,e){if(e)"object"!=typeof e&&(e={name:e});else throw TypeError("Button has no name");let i=this._btnNameMapping(t);if(!e.name)throw TypeError("Button has no name");if(this.buttons[e.name])throw TypeError("Button with this name already exists");let n=this.map.pm.Draw.createNewDrawInstance(e.name,i);return e={...this.buttons[i]._button,...e},{drawInstance:n,control:this.createCustomControl(e)}},createCustomControl(t){if(!t.name)throw TypeError("Button has no name");if(this.buttons[t.name])throw TypeError("Button with this name already exists");t.onClick||(t.onClick=()=>{}),t.afterClick||(t.afterClick=()=>{}),!1!==t.toggle&&(t.toggle=!0),t.block&&(t.block=t.block.toLowerCase()),t.block&&"draw"!==t.block||(t.block=""),t.className?-1===t.className.indexOf("control-icon")&&(t.className=`control-icon ${t.className}`):t.className="control-icon";let e={tool:t.block,className:t.className,title:t.title||"",jsClass:t.name,onClick:t.onClick,afterClick:t.afterClick,doToggle:t.toggle,toggleStatus:!1,disableOtherButtons:t.disableOtherButtons??!0,disableByOtherButtons:t.disableByOtherButtons??!0,cssToggle:t.toggle,position:this.options.position,actions:t.actions||[],disabled:!!t.disabled};!1!==this.options[t.name]&&(this.options[t.name]=!0);let i=this._addButton(t.name,new L.Control.PMButton(e));return this.changeControlOrder(),i},controlExists(t){return!!this.getButton(t)},getButton(t){return this.getButtons()[t]},getButtonsInBlock(t){let e={};if(t)for(let i in this.getButtons()){let n=this.getButtons()[i];n._button.tool!==t&&("draw"!==t||n._button.tool)||(e[i]=n)}return e},changeControlOrder(t=[]){let e=this._shapeMapping(),i=[];t.forEach(t=>{e[t]?i.push(e[t]):i.push(t)});let n=this.getButtons(),r={};i.forEach(t=>{n[t]&&(r[t]=n[t])}),Object.keys(n).filter(t=>!n[t]._button.tool||"draw"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"edit"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"options"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).filter(t=>"custom"===n[t]._button.tool).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),Object.keys(n).forEach(t=>{-1===i.indexOf(t)&&(r[t]=n[t])}),this.map.pm.Toolbar.buttons=r,this._showHideButtons()},getControlOrder(){let t=this.getButtons(),e=[];for(let i in t)e.push(i);return e},changeActionsOfControl(t,e){let i=this._btnNameMapping(t);if(!i)throw TypeError("No name passed");if(!e)throw TypeError("No actions passed");if(!this.buttons[i])throw TypeError("Button with this name not exists");this.buttons[i]._button.actions=e,this.changeControlOrder()},setButtonDisabled(t,e){let i=this._btnNameMapping(t);e?this.buttons[i].disable():this.buttons[i].enable()},_shapeMapping:()=>({Marker:"drawMarker",Circle:"drawCircle",Polygon:"drawPolygon",Rectangle:"drawRectangle",Polyline:"drawPolyline",Line:"drawPolyline",CircleMarker:"drawCircleMarker",Edit:"editMode",Drag:"dragMode",Cut:"cutPolygon",Removal:"removalMode",Rotate:"rotateMode",Text:"drawText"}),_btnNameMapping(t){let e=this._shapeMapping();return e[t]?e[t]:t}}),eb=u(tQ()),ek={_initSnappableMarkers(){this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,this._assignEvents(this._markers),this._layer.off("pm:dragstart",this._unsnap,this),this._layer.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){this._layer.off("pm:dragstart",this._unsnap,this)},_assignEvents(t){t.forEach(t=>{Array.isArray(t)?this._assignEvents(t):(t.off("drag",this._handleSnapping,this),t.on("drag",this._handleSnapping,this),t.off("dragend",this._cleanupSnapping,this),t.on("dragend",this._cleanupSnapping,this))})},_cleanupSnapping(t){t&&(t.target._snapped=!1),delete this._snapList,this.throttledList&&(this._map.off("layeradd",this.throttledList,this),this.throttledList=void 0),this._map.off("layerremove",this._handleSnapLayerRemoval,this),this.debugIndicatorLines&&this.debugIndicatorLines.forEach(t=>{t.remove()})},_handleThrottleSnapping(){this.throttledList&&this._createSnapList()},_handleSnapping(t,e=!1){let i,n,r=t.target;if(r._snapped=!1,this.throttledList||(this.throttledList=L.Util.throttle(this._handleThrottleSnapping,100,this)),t?.originalEvent?.altKey||this._map?.pm?.Keyboard.isAltKeyPressed())return!1;if(e){if(!this._otherSnapLayers||0===this._otherSnapLayers.length)return!1;n=this._otherSnapLayers}else void 0===this._snapList&&(this._createSnapList(),this._map.off("layeradd",this.throttledList,this),this._map.on("layeradd",this.throttledList,this)),n=this._snapList;if(n.length<=0)return!1;let o=this._calcClosestLayer(r.getLatLng(),n);if(0===Object.keys(o).length)return!1;i=o.layer instanceof L.Marker||o.layer instanceof L.CircleMarker||!this.options.snapSegment?o.latlng:this._checkPrioritiySnapping(o);let s=this.options.snapDistance,a={marker:r,shape:this._shape,snapLatLng:i,segment:o.segment,layer:this._layer,workingLayer:this._layer,layerInteractedWith:o.layer,distance:o.distance};if(this._fireSnapDrag(a.marker,a),this._fireSnapDrag(this._layer,a),o.distance{this._snapLatLng=i,this._fireSnap(r,a),this._fireSnap(this._layer,a)},e=this._snapLatLng||{},n=i||{};(e.lat!==n.lat||e.lng!==n.lng)&&t()}else this._snapLatLng&&(this._unsnap(a),r._snapped=!1,r._snapInfo=void 0,this._fireUnsnap(a.marker,a),this._fireUnsnap(this._layer,a));return!0},_createSnapList(){let t=[],e=[],i=this._map;i.off("layerremove",this._handleSnapLayerRemoval,this),i.on("layerremove",this._handleSnapLayerRemoval,this),i.eachLayer(i=>{if((i instanceof L.Polyline||i instanceof L.Marker||i instanceof L.CircleMarker||i instanceof L.ImageOverlay)&&!0!==i.options.snapIgnore){if(void 0===i.options.snapIgnore&&(!L.PM.optIn&&!0===i.options.pmIgnore||L.PM.optIn&&!1!==i.options.pmIgnore))return;(i instanceof L.Circle||i instanceof L.CircleMarker)&&i.pm&&i.pm._hiddenPolyCircle?t.push(i.pm._hiddenPolyCircle):i instanceof L.ImageOverlay&&(i=L.rectangle(i.getBounds())),t.push(i);let n=L.polyline([],{color:"red",pmIgnore:!0});n._pmTempLayer=!0,e.push(n),(i instanceof L.Circle||i instanceof L.CircleMarker)&&e.push(n)}}),t=(t=(t=t.filter(t=>this._layer!==t)).filter(t=>t._latlng||t._latlngs&&eu(t._latlngs))).filter(t=>!t._pmTempLayer),this._otherSnapLayers?(this._otherSnapLayers.forEach(()=>{let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,e.push(t)}),this._snapList=t.concat(this._otherSnapLayers)):this._snapList=t,this.debugIndicatorLines=e},_handleSnapLayerRemoval({layer:t}){if(!t._leaflet_id)return;let e=this._snapList.findIndex(e=>e._leaflet_id===t._leaflet_id);e>-1&&this._snapList.splice(e,1)},_calcClosestLayer(t,e){return this._calcClosestLayers(t,e,1)[0]},_calcClosestLayers(t,e,i=1){let n=[],r={};e.forEach((e,o)=>{if(e._parentCopy&&e._parentCopy===this._layer||e.getLatLngs?.().flat(5).length<2)return;let s=this._calcLayerDistances(t,e);if(s.distance=Math.floor(s.distance),this.debugIndicatorLines){if(!this.debugIndicatorLines[o]){let t=L.polyline([],{color:"red",pmIgnore:!0});t._pmTempLayer=!0,this.debugIndicatorLines[o]=t}this.debugIndicatorLines[o].setLatLngs([t,s.latlng])}1===i&&(void 0===r.distance||s.distance-5<=r.distance)?(s.distance+5t.distance-e.distance)),-1===i&&(i=n.length);let o=this._getClosestLayerByPriority(n,i);return L.Util.isArray(o)?o:[o]},_calcLayerDistances(t,e){let i=this._map,n=e instanceof L.Marker||e instanceof L.CircleMarker,r=e instanceof L.Polygon;if(n){let n=e.getLatLng();return{latlng:{...n},distance:this._getDistance(i,n,t)}}return this._calcLatLngDistances(t,e.getLatLngs(),i,r)},_calcLatLngDistances(t,e,i,n=!1){let r,o,s,a=e=>{e.forEach((l,h)=>{if(Array.isArray(l))return void a(l);if(this.options.snapSegment){let r;r=n?h+1===e.length?0:h+1:h+1===e.length?void 0:h+1;let a=e[r];if(a){let e=this._getDistanceToSegment(i,t,l,a);(void 0===o||et._leaflet_id-e._leaflet_id);let i=this._map.pm.globalOptions.snappingOrder||[],n=0,r={};return i.concat(["Marker","CircleMarker","Circle","Line","Polygon","Rectangle"]).forEach(t=>{r[t]||(n+=1,r[t]=n)}),t.sort(function(t,e,i="asc"){if(!e||0===Object.keys(e).length)return(t,e)=>t-e;let n=Object.keys(e),r,o=n.length-1,s={};for(;o>=0;)s[(r=n[o]).toLowerCase()]=e[r],o-=1;function a(t){return t instanceof L.Marker?"Marker":t instanceof L.Circle?"Circle":t instanceof L.CircleMarker?"CircleMarker":t instanceof L.Rectangle?"Rectangle":t instanceof L.Polygon?"Polygon":t instanceof L.Polyline?"Line":void 0}return(e,n)=>{let r,o;if("instanceofShape"===t){if(r=a(e.layer).toLowerCase(),o=a(n.layer).toLowerCase(),!r||!o)return 0}else{if(!e.hasOwnProperty(t)||!n.hasOwnProperty(t))return 0;r=e[t].toLowerCase(),o=n[t].toLowerCase()}let l=r in s?s[r]:Number.MAX_SAFE_INTEGER,h=o in s?s[o]:Number.MAX_SAFE_INTEGER,u=0;return lh&&(u=1),"desc"===i?-1*u:u}}("instanceofShape",r)),1===e?t[0]||{}:t.slice(0,e)},_checkPrioritiySnapping(t){let e=this._map,i=t.segment[0],n=t.segment[1],r=t.latlng,o=r;if(this.options.snapVertex){let t=this._getDistance(e,i,r),s=this._getDistance(e,n,r),a=tt.latLngToContainerPoint(e).distanceTo(t.latLngToContainerPoint(i))},eM=L.Class.extend({includes:[ek,ea],options:{snappable:!0,snapDistance:20,snapMiddle:!1,allowSelfIntersection:!0,tooltips:!0,templineStyle:{},hintlineStyle:{color:"#3388ff",dashArray:"5,5"},pathOptions:null,cursorMarker:!0,finishOn:null,markerStyle:{draggable:!0,icon:L.icon()},hideMiddleMarkers:!1,minRadiusCircle:null,maxRadiusCircle:null,minRadiusCircleMarker:null,maxRadiusCircleMarker:null,resizeableCircleMarker:!1,resizeableCircle:!0,markerEditable:!0,continueDrawing:!1,snapSegment:!0,requireSnapToFinish:!1,rectangleAngle:0,textOptions:{text:null,focusAfterDraw:null,removeIfEmpty:null,className:null},snapVertex:!0},setOptions(t){L.Util.setOptions(this,t),this.setStyle(this.options)},setStyle(){},getOptions(){return this.options},initialize(t){let e=new L.Icon.Default;e.options.tooltipAnchor=[0,0],this.options.markerStyle.icon=e,this._map=t,this.shapes=["Marker","CircleMarker","Line","Polygon","Rectangle","Circle","Cut","Text"],this.shapes.forEach(t=>{this[t]=new L.PM.Draw[t](this._map)}),this.Marker.setOptions({continueDrawing:!0}),this.CircleMarker.setOptions({continueDrawing:!0})},setPathOptions(t,e=!1){e?this.options.pathOptions=(0,eb.default)(this.options.pathOptions,t):this.options.pathOptions=t},getShapes(){return this.shapes},getShape(){return this._shape},enable(t,e){if(!t)throw Error(`Error: Please pass a shape as a parameter. Possible shapes are: ${this.getShapes().join(",")}`);this.disable(),this[t].enable(e)},disable(){this.shapes.forEach(t=>{this[t].disable()})},addControls(){this.shapes.forEach(t=>{this[t].addButton()})},getActiveShape(){let t;return this.shapes.forEach(e=>{this[e]._enabled&&(t=e)}),t},_setGlobalDrawMode(){"Cut"===this._shape?this._fireGlobalCutModeToggled():this._fireGlobalDrawModeToggled();let t=[];this._map.eachLayer(e=>{(e instanceof L.Polyline||e instanceof L.Marker||e instanceof L.Circle||e instanceof L.CircleMarker||e instanceof L.ImageOverlay)&&(e._pmTempLayer||t.push(e))}),this._enabled?t.forEach(t=>{L.PM.Utils.disablePopup(t)}):t.forEach(t=>{L.PM.Utils.enablePopup(t)})},createNewDrawInstance(t,e){let i=this._getShapeFromBtnName(e);if(this[t])throw TypeError("Draw Type already exists");if(!L.PM.Draw[i])throw TypeError(`There is no class L.PM.Draw.${i}`);return this[t]=new L.PM.Draw[i](this._map),this[t].toolbarButtonName=t,this[t]._shape=t,this.shapes.push(t),this[e]&&this[t].setOptions(this[e].options),this[t].setOptions(this[t].options),this[t]},_getShapeFromBtnName(t){let e={drawMarker:"Marker",drawCircle:"Circle",drawPolygon:"Polygon",drawPolyline:"Line",drawRectangle:"Rectangle",drawCircleMarker:"CircleMarker",editMode:"Edit",dragMode:"Drag",cutPolygon:"Cut",removalMode:"Removal",rotateMode:"Rotate",drawText:"Text"};return e[t]?e[t]:this[t]?this[t]._shape:t},_finishLayer(t){t.pm&&(t.pm.setOptions(this.options),t.pm._shape=this._shape,t.pm._map=this._map),this._addDrawnLayerProp(t)},_addDrawnLayerProp(t){t._drawnByGeoman=!0},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},_isFirstLayer(){return 0===(this._map||this._layer._map).pm.getGeomanLayers().length}});eM.Marker=eM.extend({initialize(t){this._map=t,this._shape="Marker",this.toolbarButtonName="drawMarker",this._layerIsDragging=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._isTouchDevice=!(!window.matchMedia||!window.matchMedia("(pointer: coarse)").matches),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._isTouchDevice?(this._createTouchHint(),this._hintMarker=L.marker(this._map.getCenter(),{...this.options.markerStyle,opacity:0,interactive:!1}),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0):(this._hintMarker=L.marker(this._map.getCenter(),this.options.markerStyle),this._setPane(this._hintMarker,"markerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.on("mousemove",this._syncHintMarker,this)),this._layer=this._hintMarker,this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createMarker,this),this._isTouchDevice?(this._removeTouchHint(),this._hintMarker=null):(this._hintMarker.remove(),this._map.off("mousemove",this._syncHintMarker,this)),this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()}),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},isRelevantMarker:t=>t instanceof L.Marker&&t.pm&&!t._pmTempLayer&&!t.pm._initTextMarker,_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t)),this._fireChange(this._hintMarker.getLatLng(),"Draw")},_createMarker(t){if(!t.latlng||this._layerIsDragging||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new L.Marker(e,this.options.markerStyle);this._setPane(i,"markerPane"),this._finishLayer(i),i.pm||(i.options.draggable=!1),i.addTo(this._map.pm._getContainingLayer()),i.pm&&this.options.markerEditable?i.pm.enable():i.dragging&&i.dragging.disable(),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},setStyle(){this.options.markerStyle?.icon&&this._hintMarker?.setIcon(this.options.markerStyle.icon)},_createTouchHint(){this.options.tooltips&&(this._touchHint=L.DomUtil.create("div","leaflet-pm-touch-hint"),this._touchHint.textContent=eh("tooltips.placeMarkerTouch"),this._map.getContainer().appendChild(this._touchHint))},_removeTouchHint(){this._touchHint&&this._touchHint.parentNode&&(this._touchHint.parentNode.removeChild(this._touchHint),this._touchHint=null)}});var ex={centimeters:0x25f96350,centimetres:0x25f96350,degrees:360/(2*Math.PI),feet:20902260.511392,inches:250826616.45599997,kilometers:6371.0088,kilometres:6371.0088,meters:6371008.8,metres:6371008.8,miles:3958.761333810546,millimeters:0x17bbde120,millimetres:0x17bbde120,nauticalmiles:6371008.8/1852,radians:1,yards:6967335.223679999};function ew(t,e,i={}){let n={type:"Feature"};return(0===i.id||i.id)&&(n.id=i.id),i.bbox&&(n.bbox=i.bbox),n.properties=e||{},n.geometry=t,n}function eC(t,e,i={}){if(!t)throw Error("coordinates is required");if(!Array.isArray(t))throw Error("coordinates must be an Array");if(t.length<2)throw Error("coordinates must be at least 2 numbers long");if(!eB(t[0])||!eB(t[1]))throw Error("coordinates must contain numbers");return ew({type:"Point",coordinates:t},e,i)}function eP(t,e,i={}){if(t.length<2)throw Error("coordinates must be an array of two or more positions");return ew({type:"LineString",coordinates:t},e,i)}function eE(t,e={}){let i={type:"FeatureCollection"};return e.id&&(i.id=e.id),e.bbox&&(i.bbox=e.bbox),i.features=t,i}function eT(t){return t%(2*Math.PI)*180/Math.PI}function eS(t){return t%360*Math.PI/180}function eB(t){return!isNaN(t)&&null!==t&&!Array.isArray(t)}var eO=function(t){let e,i,n={type:"FeatureCollection",features:[]};if("LineString"===(i="Feature"===t.type?t.geometry:t).type)e=[i.coordinates];else if("MultiLineString"===i.type)e=i.coordinates;else if("MultiPolygon"===i.type)e=[].concat(...i.coordinates);else if("Polygon"===i.type)e=i.coordinates;else throw Error("Input must be a LineString, MultiLineString, Polygon, or MultiPolygon Feature or Geometry");return e.forEach(t=>{e.forEach(e=>{for(let i=0;i=0&&h<=1&&(d.onLine1=!0),u>=0&&u<=1&&(d.onLine2=!0),!!d.onLine1&&!!d.onLine2&&[d.x,d.y])}(t[i][0],t[i][1],t[i+1][0],t[i+1][1],e[r][0],e[r][1],e[r+1][0],e[r+1][1]);o&&n.features.push(eC([o[0],o[1]]))}})}),n};eM.Line=eM.extend({initialize(t){this._map=t,this._shape="Line",this.toolbarButtonName="drawPolyline",this._doesSelfIntersect=!1},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._markers=[],this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.polyline([],{...this.options.templineStyle,pmIgnore:!1}),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._layerGroup.addLayer(this._layer),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._createVertex,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.on(this.options.finishOn,this._finishShape,this),"dblclick"===this.options.finishOn&&(this.tempMapDoubleClickZoomState=this._map.doubleClickZoom._enabled,this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.disable()),this._map.on("mousemove",this._syncHintMarker,this),this._hintMarker.on("move",this._syncHintLine,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this.isRed=!1,this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._createVertex,this),this._map.off("mousemove",this._syncHintMarker,this),this.options.finishOn&&"snap"!==this.options.finishOn&&this._map.off(this.options.finishOn,this._finishShape,this),this.tempMapDoubleClickZoomState&&this._map.doubleClickZoom.enable(),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintLine(){let t=this._layer.getLatLngs();if(t.length>0){let e=t[t.length-1];this._hintline.setLatLngs([e,this._hintMarker.getLatLng()])}},_syncHintMarker(t){(this._hintMarker.setLatLng(t.latlng),this.options.snappable)?(t.target=this._hintMarker,this._handleSnapping(t)):this._otherSnapLayers&&this._otherSnapLayers.length>0&&(t.target=this._hintMarker,this._handleSnapping(t,!0)),this.options.allowSelfIntersection||this._handleSelfIntersection(!0,this._hintMarker.getLatLng());let e=this._layer._defaultShape().slice();e.push(this._hintMarker.getLatLng()),this._change(e)},hasSelfIntersection(){return eO(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersection(t,e){let i=L.polyline(this._layer.getLatLngs());t&&(e||(e=this._hintMarker.getLatLng()),i.addLatLng(e));let n=eO(i.toGeoJSON(15));this._doesSelfIntersect=n.features.length>0,this._doesSelfIntersect?this.isRed||(this.isRed=!0,this._hintline.setStyle({color:"#f00000ff"}),this._fireIntersect(n,this._map,"Draw")):this._hintline.isEmpty()||(this.isRed=!1,this._hintline.setStyle(this.options.hintlineStyle))},_createVertex(t){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,t.latlng),this._doesSelfIntersect))return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._layer.getLatLngs(),n=i[i.length-1];if(e.equals(i[0])||i.length>0&&e.equals(n))return void this._finishShape();this._layer._latlngInfo=this._layer._latlngInfo||[],this._layer._latlngInfo.push({latlng:e,snapInfo:this._hintMarker._snapInfo}),this._layer.addLatLng(e);let r=this._createMarker(e);this._setTooltipText(),this._setHintLineAfterNewVertex(e),this._fireVertexAdded(r,void 0,e,"Draw"),this._change(this._layer.getLatLngs()),"snap"===this.options.finishOn&&this._hintMarker._snapped&&this._finishShape(t)},_setHintLineAfterNewVertex(t){this._hintline.setLatLngs([t,t])},_removeLastVertex(){let t=this._markers;if(t.length<=1)return void this.disable();let e=this._layer.getLatLngs(),i=t[t.length-1],{indexPath:n}=L.PM.Utils.findDeepMarkerIndex(t,i);t.pop(),this._layerGroup.removeLayer(i);let r=t[t.length-1],o=e.indexOf(r.getLatLng());e=e.slice(0,o+1),this._layer.setLatLngs(e),this._layer._latlngInfo.pop(),this._syncHintLine(),this._setTooltipText(),this._fireVertexRemoved(i,n,"Draw"),this._change(this._layer.getLatLngs())},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!1),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=1)return;let e=L.polyline(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this.options.snappable&&this._cleanupSnapping();let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),e.on("click",this._finishShape,this),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=t<=1?eh("tooltips.continueLine"):eh("tooltips.finishLine"),this._hintMarker.setTooltipContent(e)},_change(t){this._fireChange(t,"Draw")},setStyle(){this._layer?.setStyle(this.options.templineStyle),this._hintline?.setStyle(this.options.hintlineStyle)}}),eM.Polygon=eM.Line.extend({initialize(t){this._map=t,this._shape="Polygon",this.toolbarButtonName="drawPolygon"},enable(t){L.PM.Draw.Line.prototype.enable.call(this,t),this._layer.pm._shape="Polygon"},_createMarker(t){let e=new L.Marker(t,{draggable:!1,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this._layerGroup.addLayer(e),this._markers.push(e),1===this._layer.getLatLngs().flat().length?(e.on("click",this._finishShape,this),this._tempSnapLayerIndex=this._otherSnapLayers.push(e)-1,this.options.snappable&&this._cleanupSnapping()):e.on("click",()=>1),e},_setTooltipText(){let{length:t}=this._layer.getLatLngs().flat(),e="";e=t<=2?eh("tooltips.continueLine"):eh("tooltips.finishPoly"),this._hintMarker.setTooltipContent(e)},_finishShape(){if(!this.options.allowSelfIntersection&&(this._handleSelfIntersection(!0,this._layer.getLatLngs()[0]),this._doesSelfIntersect)||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;let t=this._layer.getLatLngs();if(t.length<=2)return;let e=L.polygon(t,this.options.pathOptions);this._setPane(e,"layerPane"),this._finishLayer(e),e.addTo(this._map.pm._getContainingLayer()),this._fireCreate(e),this._cleanupSnapping(),this._otherSnapLayers.splice(this._tempSnapLayerIndex,1),delete this._tempSnapLayerIndex;let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))}}),eM.Rectangle=eM.extend({initialize(t){this._map=t,this._shape="Rectangle",this.toolbarButtonName="drawRectangle"},enable(t){if(L.Util.setOptions(this,t),this._enabled=!0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=L.rectangle([[0,0],[0,0]],this.options.pathOptions),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._startMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-start-marker"}),draggable:!1,zIndexOffset:-100,opacity:+!!this.options.cursorMarker}),this._setPane(this._startMarker,"vertexPane"),this._startMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._startMarker),this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:150,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.firstVertex"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this.options.cursorMarker){this._styleMarkers=[];for(let t=0;t<2;t+=1){let t=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon rect-style-marker"}),draggable:!1,zIndexOffset:100});this._setPane(t,"vertexPane"),t._pmTempLayer=!0,this._layerGroup.addLayer(t),this._styleMarkers.push(t)}}this._map.getContainer().classList.add("geoman-draw-cursor"),this._map.on("click",this._placeStartingMarkers,this),this._map.on("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("click",this._finishShape,this),this._map.off("click",this._placeStartingMarkers,this),this._map.off("mousemove",this._syncHintMarker,this),this._map.removeLayer(this._layerGroup),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeStartingMarkers(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();L.DomUtil.addClass(this._startMarker._icon,"visible"),this._startMarker.setLatLng(e),this.options.cursorMarker&&this._styleMarkers&&this._styleMarkers.forEach(t=>{L.DomUtil.addClass(t._icon,"visible"),t.setLatLng(e)}),this._map.off("click",this._placeStartingMarkers,this),this._map.on("click",this._finishShape,this),this._hintMarker.setTooltipContent(eh("tooltips.finishRect")),this._setRectangleOrigin()},_setRectangleOrigin(){let t=this._startMarker.getLatLng();t&&(this._layerGroup.addLayer(this._layer),this._layer.setLatLngs([t,t]),this._hintMarker.on("move",this._syncRectangleSize,this))},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t));let e=this._layerGroup&&this._layerGroup.hasLayer(this._layer)?this._layer.getLatLngs():[this._hintMarker.getLatLng()];this._fireChange(e,"Draw")},_syncRectangleSize(){let t=em(this._startMarker.getLatLng(),this._map),e=em(this._hintMarker.getLatLng(),this._map),i=L.PM.Utils._getRotatedRectangle(t,e,this.options.rectangleAngle||0,this._map);if(this._layer.setLatLngs(i),this.options.cursorMarker&&this._styleMarkers){let n=[];i.forEach(i=>{i.equals(t,1e-8)||i.equals(e,1e-8)||n.push(i)}),n.forEach((t,e)=>{try{this._styleMarkers[e].setLatLng(t)}catch{}})}},_findCorners(){let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.options.rectangleAngle||0,this._map)},_finishShape(t){t?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=this._startMarker.getLatLng();if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||i.equals(e))return;let n=L.rectangle([i,e],this.options.pathOptions);if(this.options.rectangleAngle){let t=L.PM.Utils._getRotatedRectangle(i,e,this.options.rectangleAngle||0,this._map);n.setLatLngs(t),n.pm&&n.pm._setAngle(this.options.rectangleAngle||0)}this._setPane(n,"layerPane"),this._finishLayer(n),n.addTo(this._map.pm._getContainingLayer()),this._fireCreate(n);let r=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(r))},setStyle(){this._layer?.setStyle(this.options.pathOptions)}}),eM.CircleMarker=eM.extend({initialize(t){this._map=t,this._shape="CircleMarker",this.toolbarButtonName="drawCircleMarker",this._layerIsDragging=!1,this._BaseCircleClass=L.CircleMarker,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._defaultRadius=10},enable(t){if(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this._enabled=!0,this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._map.getContainer().classList.add("geoman-draw-cursor"),this.options[this._editableOption]){let t={};L.extend(t,this.options.templineStyle),t.radius=0,this._layerGroup=new L.FeatureGroup,this._layerGroup._pmTempLayer=!0,this._layerGroup.addTo(this._map),this._layer=new this._BaseCircleClass(this._map.getCenter(),t),this._setPane(this._layer,"layerPane"),this._layer._pmTempLayer=!0,this._centerMarker=L.marker(this._map.getCenter(),{icon:L.divIcon({className:"marker-icon"}),draggable:!1,zIndexOffset:100}),this._setPane(this._centerMarker,"vertexPane"),this._centerMarker._pmTempLayer=!0,this._hintMarker=L.marker(this._map.getCenter(),{zIndexOffset:110,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._layerGroup.addLayer(this._hintMarker),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.startCircle"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._hintline=L.polyline([],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._layerGroup.addLayer(this._hintline),this._map.on("click",this._placeCenterMarker,this)}else this._map.on("click",this._createMarker,this),this._hintMarker=new this._BaseCircleClass(this._map.getCenter(),{radius:this._defaultRadius,...this.options.templineStyle}),this._setPane(this._hintMarker,"layerPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this._layer=this._hintMarker,this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeCircleMarker"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip();this._map.on("mousemove",this._syncHintMarker,this),this._extendingEnable(),this._otherSnapLayers=[],this._fireDrawStart(),this._setGlobalDrawMode()},_extendingEnable(){!this.options[this._editableOption]&&this.options.markerEditable&&this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.enable()}),this._layer.bringToBack()},disable(){this._enabled&&(this._enabled=!1,this._map.getContainer().classList.remove("geoman-draw-cursor"),this.options[this._editableOption]?(this._map.off("click",this._finishShape,this),this._map.off("click",this._placeCenterMarker,this),this._map.removeLayer(this._layerGroup)):(this._map.off("click",this._createMarker,this),this._extendingDisable(),this._hintMarker.remove()),this._map.off("mousemove",this._syncHintMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},_extendingDisable(){this._map.eachLayer(t=>{this.isRelevantMarker(t)&&t.pm.disable()})},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_placeCenterMarker(t){this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng),this._layerGroup.addLayer(this._layer),this._layerGroup.addLayer(this._centerMarker);let e=this._hintMarker.getLatLng();this._centerMarker.setLatLng(e),this._map.off("click",this._placeCenterMarker,this),this._map.on("click",this._finishShape,this),this._placeCircleCenter()},_placeCircleCenter(){let t=this._centerMarker.getLatLng();t&&(this._layer.setLatLng(t),this._hintMarker.on("move",this._syncHintLine,this),this._hintMarker.on("move",this._syncCircleRadius,this),this._hintMarker.setTooltipContent(eh("tooltips.finishCircle")),this._fireCenterPlaced(),this._fireChange(this._layer.getLatLng(),"Draw"))},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._getNewDestinationOfHintMarker();this._hintline.setLatLngs([t,e])},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i)},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker()),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t)),this._handleHintMarkerSnapping();let e=this._layerGroup&&this._layerGroup.hasLayer(this._centerMarker)?this._centerMarker.getLatLng():this._hintMarker.getLatLng();this._fireChange(e,"Draw")},isRelevantMarker:t=>t instanceof L.CircleMarker&&!(t instanceof L.Circle)&&t.pm&&!t._pmTempLayer,_createMarker(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer()||!t.latlng||this._layerIsDragging)return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng(),i=new this._BaseCircleClass(e,{radius:this._defaultRadius,...this.options.pathOptions});this._setPane(i,"layerPane"),this._finishLayer(i),i.addTo(this._map.pm._getContainingLayer()),this._extendingCreateMarker(i),this._fireCreate(i),this._cleanupSnapping(),this.options.continueDrawing||this.disable()},_extendingCreateMarker(t){t.pm&&this.options.markerEditable&&t.pm.enable()},_finishShape(t){if(this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;t?.latlng&&!this._hintMarker._snapped&&this._hintMarker.setLatLng(t.latlng);let e=this._centerMarker.getLatLng(),i=this._defaultRadius;if(this.options[this._editableOption]){let t=this._hintMarker.getLatLng();i=this._distanceCalculation(e,t),this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&(i=this.options[this._maxRadiusOption])}let n={...this.options.pathOptions,radius:i},r=new this._BaseCircleClass(e,n);this._setPane(r,"layerPane"),this._finishLayer(r),r.addTo(this._map.pm._getContainingLayer()),r.pm&&r.pm._updateHiddenPolyCircle(),this._fireCreate(r);let o=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(o))},_getNewDestinationOfHintMarker(){let t=this._hintMarker.getLatLng();if(this.options[this._editableOption]){if(!this._layerGroup.hasLayer(this._centerMarker))return t;let e=this._centerMarker.getLatLng(),i=this._distanceCalculation(e,t);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&(t=e_(this._map,e,t,this._getMaxDistanceInMeter()))}return t},_getMinDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,this._centerMarker.getLatLng())},_getMaxDistanceInMeter(){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,this._centerMarker.getLatLng())},_handleHintMarkerSnapping(){if(this.options[this._editableOption]){if(this._hintMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._hintMarker.getLatLng(),i=this._distanceCalculation(t,e);this._layerGroup.hasLayer(this._centerMarker)&&(this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&this._hintMarker.setLatLng(this._hintMarker._orgLatLng))}this._hintMarker.setLatLng(this._getNewDestinationOfHintMarker())}},setStyle(){let t={};L.extend(t,this.options.templineStyle),this.options[this._editableOption]&&(t.radius=0),this._layer?.setStyle(t),this._hintline?.setStyle(this.options.hintlineStyle)},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))}}),eM.Circle=eM.CircleMarker.extend({initialize(t){this._map=t,this._shape="Circle",this.toolbarButtonName="drawCircle",this._BaseCircleClass=L.Circle,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._defaultRadius=100},_extendingEnable(){},_extendingDisable(){},_extendingCreateMarker(){},isRelevantMarker(){},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_distanceCalculation(t,e){return this._map.distance(t,e)}});var eD=class{constructor(t=[],e=eR){if(this.data=t,this.length=this.data.length,this.compare=e,this.length>0)for(let t=(this.length>>1)-1;t>=0;t--)this._down(t)}push(t){this.data.push(t),this.length++,this._up(this.length-1)}pop(){if(0===this.length)return;let t=this.data[0],e=this.data.pop();return this.length--,this.length>0&&(this.data[0]=e,this._down(0)),t}peek(){return this.data[0]}_up(t){let{data:e,compare:i}=this,n=e[t];for(;t>0;){let r=t-1>>1,o=e[r];if(i(n,o)>=0)break;e[t]=o,t=r}e[t]=n}_down(t){let{data:e,compare:i}=this,n=this.length>>1,r=e[t];for(;ti(e[s],o)&&(n=s,o=e[s]),i(o,r)>=0)break;e[t]=o,t=n}e[t]=r}};function eR(t,e){return te)}function eI(t,e){return t.p.x>e.p.x?1:t.p.xe.p.y?1:-1:1}function eA(t,e){return t.rightSweepEvent.p.x>e.rightSweepEvent.p.x?1:t.rightSweepEvent.p.x0?(l.isLeftEndpoint=!0,a.isLeftEndpoint=!1):(a.isLeftEndpoint=!0,l.isLeftEndpoint=!1),e.push(a),e.push(l),r=o,eG+=1}}eN+=1}var eF=class{constructor(t){this.leftSweepEvent=t,this.rightSweepEvent=t.otherEvent}},eU=function(t,e){let i=new eD([],eI);return function(t,e){if("FeatureCollection"===t.type){let i=t.features;for(let t=0;t=0&&p<=1&&c>=0&&c<=1&&[i+p*(r-i),n+p*(o-n)]}(t,s);!1!==a&&i.push(a)}n.push(t)}else!1===r.isLeftEndpoint&&n.pop()}return i}(i,e)};function eV(t,e,i={}){let{removeDuplicates:n=!0,ignoreSelfIntersections:r=!0}=i,o=[];"FeatureCollection"===t.type?o=o.concat(t.features):"Feature"===t.type?o.push(t):("LineString"===t.type||"Polygon"===t.type||"MultiLineString"===t.type||"MultiPolygon"===t.type)&&o.push(ew(t)),"FeatureCollection"===e.type?o=o.concat(e.features):"Feature"===e.type?o.push(e):("LineString"===e.type||"Polygon"===e.type||"MultiLineString"===e.type||"MultiPolygon"===e.type)&&o.push(ew(e));let s=eU(eE(o),r),a=[];if(n){let t={};s.forEach(e=>{let i=e.join(",");t[i]||(t[i]=!0,a.push(e))})}else a=s;return eE(a.map(t=>eC(t)))}var eH=u(ei(),1);function eq(t,e,i){if(null!==t)for(var n,r,o,s,a,l,h,u,p=0,c=0,d=t.type,_="FeatureCollection"===d,f="Feature"===d,m=_?t.features.length:1,g=0;g{i[0]>t[0]&&(i[0]=t[0]),i[1]>t[1]&&(i[1]=t[1]),i[2]=2&&!Array.isArray(t[0])&&!Array.isArray(t[1]))return[...t];throw Error("coord must be GeoJSON Point or an Array of numbers")}function eQ(t){if(Array.isArray(t))return t;if("Feature"===t.type){if(null!==t.geometry)return t.geometry.coordinates}else if(t.coordinates)return t.coordinates;throw Error("coords must be GeoJSON Feature, Geometry Object or an Array")}function e0(t){return"Feature"===t.type?t.geometry:t}function e1(t,e){return"FeatureCollection"===t.type?"FeatureCollection":"GeometryCollection"===t.type?"GeometryCollection":"Feature"===t.type&&null!==t.geometry?t.geometry.type:t.type}function e2(t,e,i={}){var n=e$(t),r=e$(e),o=Math.pow(Math.sin(eS(r[1]-n[1])/2),2)+Math.pow(Math.sin(eS(r[0]-n[0])/2),2)*Math.cos(eS(n[1]))*Math.cos(eS(r[1]));return function(t,e="kilometers"){let i=ex[e];if(!i)throw Error(e+" units is invalid");return t*i}(2*Math.atan2(Math.sqrt(o),Math.sqrt(1-o)),i.units)}var e3=Object.defineProperty,e4=Object.defineProperties,e8=Object.getOwnPropertyDescriptors,e5=Object.getOwnPropertySymbols,e6=Object.prototype.hasOwnProperty,e9=Object.prototype.propertyIsEnumerable,e7=(t,e,i)=>e in t?e3(t,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):t[e]=i,it=(t,e)=>{for(var i in e||(e={}))e6.call(e,i)&&e7(t,i,e[i]);if(e5)for(var i of e5(e))e9.call(e,i)&&e7(t,i,e[i]);return t},ie=(t,e)=>e4(t,e8(e));function ii(t,e){let[i,n,r]=t,[o,s,a]=e;return i*o+n*s+r*a}function ir(t,e){let[i,n,r]=t,[o,s,a]=e;return[n*a-r*s,r*o-i*a,i*s-n*o]}function io(t){let e=Math.sqrt(Math.pow(t[0],2)+Math.pow(t[1],2)+Math.pow(t[2],2));return[t[0]/e,t[1]/e,t[2]/e]}function is(t){let e=eS(t[1]),i=eS(t[0]);return[Math.cos(e)*Math.cos(i),Math.cos(e)*Math.sin(i),Math.sin(e)]}function ia(t,e){if(!t)throw Error("line is required");if(!e)throw Error("splitter is required");let i=e1(t),n=e1(e);if("LineString"!==i)throw Error("line must be LineString");if("FeatureCollection"===n)throw Error("splitter cannot be a FeatureCollection");if("GeometryCollection"===n)throw Error("splitter cannot be a GeometryCollection");var r=function(t,e){if(!(null!==(i=e=e??{})&&"object"==typeof i&&!Array.isArray(i)))throw Error("options is invalid");var i,n=e.precision,r=e.coordinates,o=e.mutate;if(n=null==n||isNaN(n)?6:n,r=null==r||isNaN(r)?3:r,!t)throw Error(" is required");if("number"!=typeof n)throw Error(" must be a number");if("number"!=typeof r)throw Error(" must be a number");(!1===o||void 0===o)&&(t=JSON.parse(JSON.stringify(t)));var s=Math.pow(10,n);return eq(t,function(t){var e=t,i=s,n=r;e.length>n&&e.splice(n,e.length);for(var o=0;o{var i=t,n=e;let r=[],o=i.geometry;if(null!==o){switch(o.type){case"Polygon":r=eQ(o);break;case"LineString":r=[eQ(o)]}r.forEach(t=>{var e,r;let o;(e=t,r=i.properties,o=[],e.reduce((t,e)=>{var i,n;let s,a,l,h,u=eP([t,e],r);return i=t,n=e,s=i[0],a=i[1],u.bbox=[s<(l=n[0])?s:l,a<(h=n[1])?a:h,s>l?s:l,a>h?a:h],o.push(u),e}),o).forEach(t=>{t.id=n.length,n.push(t)})})}}),eE(e)}(t);l.load(h);var u=l.search(e);if(!u.features.length)return eE([t]);var p=iu(e,u),c=(i=function(t,i,n){var r=eQ(i)[1],s=e$(e);return n===p.id?(t.push(s),o.push(eP(t)),ip(s,r)?[s]:[s,r]):(t.push(r),t)},r=n=[s],eK(h,function(t,e){r=0===e&&void 0===n?t:i(r,t,e)}),r);return c.length>1&&o.push(eP(c)),eE(o)}function iu(t,e){if(!e.features.length)throw Error("lines must contain features");if(1===e.features.length)return e.features[0];var i,n=1/0;return eK(e,function(e){var r=function(t,e,i={}){if(!t||!e)throw Error("lines and inputPoint are required arguments");let n=e$(e),r=eC([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}),o=0,s=0,a=-1;return eW(t,function(t,l,h){a!==h&&(a=h,s=0);let u=eQ(t),p=u.length-2;for(let t=0;t0?[[...e],!0]:[[...i],!1];let a=ir(s,o);if(0===a[0]&&0===a[1]&&0===a[2])return[[...e],!0];let l=io(ir(a,s)),h=[-l[0],-l[1],-l[2]],u=ii(o,l)>ii(o,h)?l:h,p=io(s),c=ii(ir(n,u),p),d=ii(ir(u,r),p);return c>=0&&d>=0?[function(t){let[e,i,n]=t,r=eT(Math.asin(Math.min(Math.max(n,-1),1)));return[eT(Math.atan2(i,e)),r]}(u),!1]:ii(n,o)>ii(r,o)?[[...t],!1]:[[...e],!0]}(l,d,n);let g=e2(e,f,i);if(gh==u>-h?(o=h,h=e[++p]):(o=u,u=n[++c]);let d=0;if(ph==u>-h?(s=h+o,a=o-(s-h),h=e[++p]):(s=u+o,a=o-(s-u),u=n[++c]),o=s,0!==a&&(r[d++]=a);ph==u>-h?(l=(s=o+h)-o,a=o-(s-l)+(h-l),h=e[++p]):(l=(s=o+u)-o,a=o-(s-l)+(u-l),u=n[++c]),o=s,0!==a&&(r[d++]=a);for(;p=h[0]&&u[3]>=h[1]))return!1;"Polygon"===o&&(a=[a]);let l=!1;for(var h,u,p=0;p=0||o<=0&&a>=0)return 0}else if(l>=0&&s<=0||l<=0&&s>=0){if(0===(r=function(t,e,i,n,r,o){let s=(e-0)*(i-0),a=(t-0)*(n-0),l=s-a,h=Math.abs(s+a);return Math.abs(l)>=im*h?l:-function(t,e,i,n,r,o,s){let a,l,h,u,p,c,d,_,f,m,g,y,v,b,k,M,x,w,C=t-0,P=i-0,E=e-0,T=n-0;b=C*T,d=(c=0x8000001*C)-(c-C),_=C-d,f=(c=0x8000001*T)-(c-T),k=_*(m=T-f)-(b-d*f-_*f-d*m),M=E*P,d=(c=0x8000001*E)-(c-E),_=E-d,f=(c=0x8000001*P)-(c-P),g=k-(x=_*(m=P-f)-(M-d*f-_*f-d*m)),p=k-g,iv[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iv[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iv[2]=y-(w-p)+(g-p),iv[3]=w;let S=function(t,e){let i=e[0];for(let t=1;t<4;t++)i+=e[t];return i}(0,iv),B=ig*s;if(S>=B||-S>=B||(p=t-C,a=t-(C+p)+(p-0),p=i-P,h=i-(P+p)+(p-0),p=e-E,l=e-(E+p)+(p-0),p=n-T,u=n-(T+p)+(p-0),0===a&&0===l&&0===h&&0===u)||(B=iy*s+ic*Math.abs(S),(S+=C*u+T*a-(E*h+P*l))>=B||-S>=B))return S;b=a*T,d=(c=0x8000001*a)-(c-a),_=a-d,f=(c=0x8000001*T)-(c-T),k=_*(m=T-f)-(b-d*f-_*f-d*m),M=l*P,d=(c=0x8000001*l)-(c-l),_=l-d,f=(c=0x8000001*P)-(c-P),g=k-(x=_*(m=P-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let O=id(4,iv,4,iM,iL);b=C*u,d=(c=0x8000001*C)-(c-C),_=C-d,f=(c=0x8000001*u)-(c-u),k=_*(m=u-f)-(b-d*f-_*f-d*m),M=E*h,d=(c=0x8000001*E)-(c-E),_=E-d,f=(c=0x8000001*h)-(c-h),g=k-(x=_*(m=h-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let D=id(O,iL,4,iM,ib);b=a*u,d=(c=0x8000001*a)-(c-a),_=a-d,f=(c=0x8000001*u)-(c-u),k=_*(m=u-f)-(b-d*f-_*f-d*m),M=l*h,d=(c=0x8000001*l)-(c-l),_=l-d,f=(c=0x8000001*h)-(c-h),g=k-(x=_*(m=h-f)-(M-d*f-_*f-d*m)),p=k-g,iM[0]=k-(g+p)+(p-x),p=(y=b+g)-b,g=(v=b-(y-p)+(g-p))-M,p=v-g,iM[1]=v-(g+p)+(p-M),p=(w=y+g)-y,iM[2]=y-(w-p)+(g-p),iM[3]=w;let R=id(D,ib,4,iM,ik);return ik[R-1]}(t,e,i,n,0,0,h)}(o,a,s,l,0,0)))return 0;(r>0&&l>0&&s<=0||r<0&&l<=0&&s>0)&&p++}h=u,s=l,o=a}}return p%2!=0}(n,a[p]);if(0===t)return!i.ignoreBoundary;t&&(l=!0)}return l}function iw(t,e,i={}){let n=e$(t),r=eQ(e);for(let t=0;tr)return!1}else if(0!==f)return!1;return Math.abs(d)===Math.abs(_)&&0===Math.abs(d)?!n&&i[0]===t[0]&&i[1]===t[1]:n?"start"===n?Math.abs(d)>=Math.abs(_)?d>0?a0?l=Math.abs(_)?d>0?a<=o&&o0?l<=s&&s=Math.abs(_)?d>0?a0?l=Math.abs(_)?d>0?a<=o&&o<=h:h<=o&&o<=a:_>0?l<=s&&s<=u:u<=s&&s<=l}(r[t],r[t+1],n,e,typeof i.epsilon>"u"?null:i.epsilon))return!0}return!1}function iC(t,e){if("Feature"===t.type&&null===t.geometry||"Feature"===e.type&&null===e.geometry||!iP(eY(t),eY(e)))return!1;for(let i of e0(e).coordinates)for(let e of i)if(!ix(e,t))return!1;return!0}function iP(t,e){return!(t[0]>e[0]||t[2]e[1]||t[3]iC(M,{type:"Polygon",coordinates:t}));default:throw Error("feature2 "+o+" geometry not supported")}case"MultiPolygon":if("Polygon"===o){return l=i,h=n,l.coordinates.some(t=>iC({type:"Polygon",coordinates:t},h))}throw Error("feature2 "+o+" geometry not supported");default:throw Error("feature1 "+r+" geometry not supported")}},iS=u(ee()),iB=/^-?(?:\d+(?:\.\d*)?|\.\d+)(?:e[+-]?\d+)?$/i,iO=Math.ceil,iD=Math.floor,iR="[BigNumber Error] ",iI=iR+"Number primitive has more than 15 significant digits: ",iA=[1,10,100,1e3,1e4,1e5,1e6,1e7,1e8,1e9,1e10,1e11,1e12,1e13];function iz(t){var e=0|t;return t>0||t===e?e:e-1}function iN(t){for(var e,i,n=1,r=t.length,o=t[0]+"";nh^i?1:-1;for(a=(l=r.length)<(h=o.length)?l:h,s=0;so[s]^i?1:-1;return l==h?0:l>h^i?1:-1}function iG(t,e,i,n){if(ti||t!==iD(t))throw Error(iR+(n||"Argument")+("number"==typeof t?ti?" out of range: ":" not an integer: ":" not a primitive number: ")+String(t))}function iZ(t){var e=t.c.length-1;return iz(t.e/14)==e&&t.c[e]%2!=0}function iF(t,e){return(t.length>1?t.charAt(0)+"."+t.slice(1):t)+(e<0?"e":"e+")+e}function iU(t,e,i){var n,r;if(e<0){for(r=i+".";++e;r+=i);t=r+t}else if(n=t.length,++e>n){for(r=i,e-=n;--e;r+=i);t+=r}else ey?c.c=c.e=null:t.e=10;s/=10,o++);o>y?c.c=c.e=null:(c.e=o,c.c=[t]);return}p=String(t)}else{if(!iB.test(p=String(t)))return u(c,p,a);c.s=45==p.charCodeAt(0)?(p=p.slice(1),-1):1}(o=p.indexOf("."))>-1&&(p=p.replace(".","")),(s=p.search(/e/i))>0?(o<0&&(o=s),o+=+p.slice(s+1),p=p.substring(0,s)):o<0&&(o=p.length)}else{if(iG(e,2,x.length,"Base"),10==e&&w)return S(c=new C(t),d+c.e+1,_);if(p=String(t),a="number"==typeof t){if(0*t!=0)return u(c,p,a,e);if(c.s=1/t<0?(p=p.slice(1),-1):1,C.DEBUG&&p.replace(/^0\.0*|\./,"").length>15)throw Error(iI+t)}else c.s=45===p.charCodeAt(0)?(p=p.slice(1),-1):1;for(i=x.slice(0,e),o=s=0,l=p.length;si.indexOf(n=p.charAt(s))){if("."==n){if(s>o){o=l;continue}}else if(!r&&(p==p.toUpperCase()&&(p=p.toLowerCase())||p==p.toLowerCase()&&(p=p.toUpperCase()))){r=!0,s=-1,o=0;continue}return u(c,String(t),a,e)}a=!1,(o=(p=h(p,e,10,c.s)).indexOf("."))>-1?p=p.replace(".",""):o=p.length}for(s=0;48===p.charCodeAt(s);s++);for(l=p.length;48===p.charCodeAt(--l););if(p=p.slice(s,++l)){if(l-=s,a&&C.DEBUG&&l>15&&(t>0x1fffffffffffff||t!==iD(t)))throw Error(iI+c.s*t);if((o=o-s-1)>y)c.c=c.e=null;else if(o=m)?iF(l,s):iU(l,s,"0");else if(o=(t=S(new C(t),e,i)).e,a=(l=iN(t.c)).length,1==n||2==n&&(e<=o||o<=f)){for(;as),l=iU(l,o,"0"),o+1>a){if(--e>0)for(l+=".";e--;l+="0");}else if((e+=o-a)>0)for(o+1==a&&(l+=".");e--;l+="0");return t.s<0&&r?"-"+l:l}function E(t,e){for(var i,n,r=1,o=new C(t[0]);r=10;r/=10,n++);return(i=n+14*i-1)>y?t.c=t.e=null:i=10;a/=10,r++);if((o=e-r)<0)o+=14,s=e,u=iD((l=p[h=0])/iA[r-s-1]%10);else if((h=iO((o+1)/14))>=p.length)if(n){for(;p.length<=h;p.push(0));l=u=0,r=1,o%=14,s=o-14+1}else break t;else{for(l=a=p[h],r=1;a>=10;a/=10,r++);o%=14,u=(s=o-14+r)<0?0:iD(l/iA[r-s-1]%10)}if(n=n||e<0||null!=p[h+1]||(s<0?l:l%iA[r-s-1]),n=i<4?(u||n)&&(0==i||i==(t.s<0?3:2)):u>5||5==u&&(4==i||n||6==i&&(o>0?s>0?l/iA[r-s]:0:p[h-1])%10&1||i==(t.s<0?8:7)),e<1||!p[0])return p.length=0,n?(e-=t.e+1,p[0]=iA[(14-e%14)%14],t.e=-e||0):p[0]=t.e=0,t;if(0==o?(p.length=h,a=1,h--):(p.length=h+1,a=iA[14-o],p[h]=s>0?iD(l/iA[r-s]%iA[s])*a:0),n)for(;;)if(0==h){for(o=1,s=p[0];s>=10;s/=10,o++);for(s=p[0]+=a,a=1;s>=10;s/=10,a++);o!=a&&(t.e++,1e14==p[0]&&(p[0]=1));break}else{if(p[h]+=a,1e14!=p[h])break;p[h--]=0,a=1}for(o=p.length;0===p[--o];p.pop());}t.e>y?t.c=t.e=null:t.e=m?iF(e,i):iU(e,i,"0"),t.s<0?"-"+e:e)}return C.clone=t,C.ROUND_UP=0,C.ROUND_DOWN=1,C.ROUND_CEIL=2,C.ROUND_FLOOR=3,C.ROUND_HALF_UP=4,C.ROUND_HALF_DOWN=5,C.ROUND_HALF_EVEN=6,C.ROUND_HALF_CEIL=7,C.ROUND_HALF_FLOOR=8,C.EUCLID=9,C.config=C.set=function(t){var e,i;if(null!=t)if("object"==typeof t){if(t.hasOwnProperty(e="DECIMAL_PLACES")&&(iG(i=t[e],0,1e9,e),d=i),t.hasOwnProperty(e="ROUNDING_MODE")&&(iG(i=t[e],0,8,e),_=i),t.hasOwnProperty(e="EXPONENTIAL_AT")&&((i=t[e])&&i.pop?(iG(i[0],-1e9,0,e),iG(i[1],0,1e9,e),f=i[0],m=i[1]):(iG(i,-1e9,1e9,e),f=-(m=i<0?-i:i))),t.hasOwnProperty(e="RANGE"))if((i=t[e])&&i.pop)iG(i[0],-1e9,-1,e),iG(i[1],1,1e9,e),g=i[0],y=i[1];else if(iG(i,-1e9,1e9,e),i)g=-(y=i<0?-i:i);else throw Error(iR+e+" cannot be zero: "+i);if(t.hasOwnProperty(e="CRYPTO"))if(!!(i=t[e])===i)if(i)if("u">typeof crypto&&crypto&&(crypto.getRandomValues||crypto.randomBytes))v=i;else throw v=!i,Error(iR+"crypto unavailable");else v=i;else throw Error(iR+e+" not true or false: "+i);if(t.hasOwnProperty(e="MODULO_MODE")&&(iG(i=t[e],0,9,e),b=i),t.hasOwnProperty(e="POW_PRECISION")&&(iG(i=t[e],0,1e9,e),k=i),t.hasOwnProperty(e="FORMAT"))if("object"==typeof(i=t[e]))M=i;else throw Error(iR+e+" not an object: "+i);if(t.hasOwnProperty(e="ALPHABET"))if("string"!=typeof(i=t[e])||/^.?$|[+\-.\s]|(.).*\1/.test(i))throw Error(iR+e+" invalid: "+i);else w="0123456789"==i.slice(0,10),x=i}else throw Error(iR+"Object expected: "+t);return{DECIMAL_PLACES:d,ROUNDING_MODE:_,EXPONENTIAL_AT:[f,m],RANGE:[g,y],CRYPTO:v,MODULO_MODE:b,POW_PRECISION:k,FORMAT:M,ALPHABET:x}},C.isBigNumber=function(t){if(!t||!0!==t._isBigNumber)return!1;if(!C.DEBUG)return!0;var e,i,n=t.c,r=t.e,o=t.s;t:if("[object Array]"==({}).toString.call(n)){if((1===o||-1===o)&&r>=-1e9&&r<=1e9&&r===iD(r)){if(0===n[0]){if(0===r&&1===n.length)return!0;break t}if((e=(r+1)%14)<1&&(e+=14),String(n[0]).length==e){for(e=0;e=1e14||i!==iD(i))break t;if(0!==i)return!0}}}else if(null===n&&null===r&&(null===o||1===o||-1===o))return!0;throw Error(iR+"Invalid BigNumber: "+t)},C.maximum=C.max=function(){return E(arguments,-1)},C.minimum=C.min=function(){return E(arguments,1)},i=0x20000000000000*Math.random()&2097151?function(){return iD(0x20000000000000*Math.random())}:function(){return(0x40000000*Math.random()|0)*8388608+(8388608*Math.random()|0)},C.random=function(t){var e,n,r,o,s,a=0,l=[],h=new C(c);if(null==t?t=d:iG(t,0,1e9),o=iO(t/14),v)if(crypto.getRandomValues){for(e=crypto.getRandomValues(new Uint32Array(o*=2));a>>11))>=9e15?(n=crypto.getRandomValues(new Uint32Array(2)),e[a]=n[0],e[a+1]=n[1]):(l.push(s%1e14),a+=2);a=o/2}else if(crypto.randomBytes){for(e=crypto.randomBytes(o*=7);a=9e15?crypto.randomBytes(7).copy(e,a):(l.push(s%1e14),a+=7);a=o/7}else throw v=!1,Error(iR+"crypto unavailable");if(!v)for(;a=10;s/=10,a++);a<14&&(r-=14-a)}return h.e=r,h.c=l,h},C.sum=function(){for(var t=1,e=arguments,i=new C(e[0]);ti-1&&(null==s[r+1]&&(s[r+1]=0),s[r+1]+=s[r]/i|0,s[r]%=i)}return s.reverse()}return function(i,n,r,o,s){var a,h,u,p,c,f,m,g,y=i.indexOf("."),v=d,b=_;for(y>=0&&(p=k,k=0,i=i.replace(".",""),f=(g=new C(n)).pow(i.length-y),k=p,g.c=e(iU(iN(f.c),f.e,"0"),10,r,t),g.e=g.c.length),u=p=(m=e(i,n,r,s?(a=x,t):(a=t,x))).length;0==m[--p];m.pop());if(!m[0])return a.charAt(0);if(y<0?--u:(f.c=m,f.e=u,f.s=o,m=(f=l(f,g,v,b,r)).c,c=f.r,u=f.e),y=m[h=u+v+1],p=r/2,c=c||h<0||null!=m[h+1],c=b<4?(null!=y||c)&&(0==b||b==(f.s<0?3:2)):y>p||y==p&&(4==b||c||6==b&&1&m[h-1]||b==(f.s<0?8:7)),h<1||!m[0])i=c?iU(a.charAt(1),-v,a.charAt(0)):a.charAt(0);else{if(m.length=h,c)for(--r;++m[--h]>r;)m[h]=0,h||(++u,m=[1].concat(m));for(p=m.length;!m[--p];);for(y=0,i="";y<=p;i+=a.charAt(m[y++]));i=iU(i,u,a.charAt(0))}return i}}(),l=function(){function t(t,e,i){var n,r,o,s,a=0,l=t.length,h=e%1e7,u=e/1e7|0;for(t=t.slice();l--;)n=u*(o=t[l]%1e7)+(s=t[l]/1e7|0)*h,a=((r=h*o+n%1e7*1e7+a)/i|0)+(n/1e7|0)+u*s,t[l]=r%i;return a&&(t=[a].concat(t)),t}function e(t,e,i,n){var r,o;if(i!=n)o=i>n?1:-1;else for(r=o=0;re[r]?1:-1;break}return o}function i(t,e,i,n){for(var r=0;i--;)t[i]-=r,r=+(t[i]1;t.splice(0,1));}return function(n,r,o,s,a){var l,h,u,p,c,d,_,f,m,g,y,v,b,k,M,x,w,P=n.s==r.s?1:-1,E=n.c,T=r.c;if(!E||!E[0]||!T||!T[0])return new C(!n.s||!r.s||(E?T&&E[0]==T[0]:!T)?NaN:E&&0==E[0]||!T?0*P:P/0);for(m=(f=new C(P)).c=[],P=o+(h=n.e-r.e)+1,a||(a=1e14,h=iz(n.e/14)-iz(r.e/14),P=P/14|0),u=0;T[u]==(E[u]||0);u++);if(T[u]>(E[u]||0)&&h--,P<0)m.push(1),p=!0;else{for(k=E.length,x=T.length,u=0,P+=2,(c=iD(a/(T[0]+1)))>1&&(T=t(T,c,a),E=t(E,c,a),x=T.length,k=E.length),b=x,y=(g=E.slice(0,x)).length;y=a/2&&M++;do{if(c=0,(l=e(T,g,x,y))<0){if(v=g[0],x!=y&&(v=v*a+(g[1]||0)),(c=iD(v/M))>1)for(c>=a&&(c=a-1),_=(d=t(T,c,a)).length,y=g.length;1==e(d,g,_,y);)c--,i(d,x<_?w:T,_,a),_=d.length,l=1;else 0==c&&(l=c=1),_=(d=T.slice()).length;if(_e(T,g,x,y);)c++,i(g,x=10;P/=10,u++);S(f,o+(f.e=u+14*h-1)+1,s,p)}else f.e=h,f.r=+p;return f}}(),n=/^(-?)0([xbo])(?=\w[\w.]*$)/i,r=/^([^.]+)\.$/,o=/^\.([^.]+)$/,s=/^-?(Infinity|NaN)$/,a=/^\s*\+(?=[\w.])|^\s+|\s+$/g,u=function(t,e,i,l){var h,u=i?e:e.replace(a,"");if(s.test(u))t.s=isNaN(u)?null:u<0?-1:1;else{if(!i&&(u=u.replace(n,function(t,e,i){return h="x"==(i=i.toLowerCase())?16:"b"==i?2:8,l&&l!=h?t:e}),l&&(h=l,u=u.replace(r,"$1").replace(o,"0.$1")),e!=u))return new C(u,h);if(C.DEBUG)throw Error(iR+"Not a"+(l?" base "+l:"")+" number: "+e);t.s=null}t.c=t.e=null},p.absoluteValue=p.abs=function(){var t=new C(this);return t.s<0&&(t.s=1),t},p.comparedTo=function(t,e){return ij(this,new C(t,e))},p.decimalPlaces=p.dp=function(t,e){var i,n,r;if(null!=t)return iG(t,0,1e9),null==e?e=_:iG(e,0,8),S(new C(this),t+this.e+1,e);if(!(i=this.c))return null;if(n=((r=i.length-1)-iz(this.e/14))*14,r=i[r])for(;r%10==0;r/=10,n--);return n<0&&(n=0),n},p.dividedBy=p.div=function(t,e){return l(this,new C(t,e),d,_)},p.dividedToIntegerBy=p.idiv=function(t,e){return l(this,new C(t,e),0,1)},p.exponentiatedBy=p.pow=function(t,e){var i,n,r,o,s,a,l,h,u,p=this;if((t=new C(t)).c&&!t.isInteger())throw Error(iR+"Exponent not an integer: "+B(t));if(null!=e&&(e=new C(e)),a=t.e>14,!p.c||!p.c[0]||1==p.c[0]&&!p.e&&1==p.c.length||!t.c||!t.c[0])return u=new C(Math.pow(+B(p),a?t.s*(2-iZ(t)):+B(t))),e?u.mod(e):u;if(l=t.s<0,e){if(e.c?!e.c[0]:!e.s)return new C(NaN);(n=!l&&p.isInteger()&&e.isInteger())&&(p=p.mod(e))}else{if(t.e>9&&(p.e>0||p.e<-1||(0==p.e?p.c[0]>1||a&&p.c[1]>=24e7:p.c[0]<8e13||a&&p.c[0]<=9999975e7)))return o=p.s<0&&iZ(t)?-0:0,p.e>-1&&(o=1/o),new C(l?1/o:o);k&&(o=iO(k/14+2))}for(a?(i=new C(.5),l&&(t.s=1),h=iZ(t)):h=(r=Math.abs(+B(t)))%2,u=new C(c);;){if(h){if(!(u=u.times(p)).c)break;o?u.c.length>o&&(u.c.length=o):n&&(u=u.mod(e))}if(r){if(0===(r=iD(r/2)))break;h=r%2}else if(S(t=t.times(i),t.e+1,1),t.e>14)h=iZ(t);else{if(0==(r=+B(t)))break;h=r%2}p=p.times(p),o?p.c&&p.c.length>o&&(p.c.length=o):n&&(p=p.mod(e))}return n?u:(l&&(u=c.div(u)),e?u.mod(e):o?S(u,k,_,s):u)},p.integerValue=function(t){var e=new C(this);return null==t?t=_:iG(t,0,8),S(e,e.e+1,t)},p.isEqualTo=p.eq=function(t,e){return 0===ij(this,new C(t,e))},p.isFinite=function(){return!!this.c},p.isGreaterThan=p.gt=function(t,e){return ij(this,new C(t,e))>0},p.isGreaterThanOrEqualTo=p.gte=function(t,e){return 1===(e=ij(this,new C(t,e)))||0===e},p.isInteger=function(){return!!this.c&&iz(this.e/14)>this.c.length-2},p.isLessThan=p.lt=function(t,e){return 0>ij(this,new C(t,e))},p.isLessThanOrEqualTo=p.lte=function(t,e){return -1===(e=ij(this,new C(t,e)))||0===e},p.isNaN=function(){return!this.s},p.isNegative=function(){return this.s<0},p.isPositive=function(){return this.s>0},p.isZero=function(){return!!this.c&&0==this.c[0]},p.minus=function(t,e){var i,n,r,o,s=this.s;if(e=(t=new C(t,e)).s,!s||!e)return new C(NaN);if(s!=e)return t.s=-e,this.plus(t);var a=this.e/14,l=t.e/14,h=this.c,u=t.c;if(!a||!l){if(!h||!u)return h?(t.s=-e,t):new C(u?this:NaN);if(!h[0]||!u[0])return u[0]?(t.s=-e,t):new C(h[0]?this:3==_?-0:0)}if(a=iz(a),l=iz(l),h=h.slice(),s=a-l){for((o=s<0)?(s=-s,r=h):(l=a,r=u),r.reverse(),e=s;e--;r.push(0));r.reverse()}else for(n=(o=(s=h.length)<(e=u.length))?s:e,s=e=0;e0)for(;e--;h[i++]=0);for(e=1e14-1;n>s;){if(h[--n]=0;){for(i=0,c=m[r]%1e7,d=m[r]/1e7|0,o=r+(s=l);o>r;)a=d*(h=f[--s]%1e7)+(u=f[s]/1e7|0)*c,i=((h=c*h+a%1e7*1e7+_[o]+i)/1e14|0)+(a/1e7|0)+d*u,_[o--]=h%1e14;_[o]=i}return i?++n:_.splice(0,1),T(t,_,n)},p.negated=function(){var t=new C(this);return t.s=-t.s||null,t},p.plus=function(t,e){var i,n=this.s;if(e=(t=new C(t,e)).s,!n||!e)return new C(NaN);if(n!=e)return t.s=-e,this.minus(t);var r=this.e/14,o=t.e/14,s=this.c,a=t.c;if(!r||!o){if(!s||!a)return new C(n/0);if(!s[0]||!a[0])return a[0]?t:new C(s[0]?this:0*n)}if(r=iz(r),o=iz(o),s=s.slice(),n=r-o){for(n>0?(o=r,i=a):(n=-n,i=s),i.reverse();n--;i.push(0));i.reverse()}for((n=s.length)-(e=a.length)<0&&(i=a,a=s,s=i,e=n),n=0;e;)n=(s[--e]=s[e]+a[e]+n)/1e14|0,s[e]=1e14===s[e]?0:s[e]%1e14;return n&&(s=[n].concat(s),++o),T(t,s,o)},p.precision=p.sd=function(t,e){var i,n,r;if(null!=t&&!!t!==t)return iG(t,1,1e9),null==e?e=_:iG(e,0,8),S(new C(this),t,e);if(!(i=this.c))return null;if(n=14*(r=i.length-1)+1,r=i[r]){for(;r%10==0;r/=10,n--);for(r=i[0];r>=10;r/=10,n++);}return t&&this.e+1>n&&(n=this.e+1),n},p.shiftedBy=function(t){return iG(t,-0x1fffffffffffff,0x1fffffffffffff),this.times("1e"+t)},p.squareRoot=p.sqrt=function(){var t,e,i,n,r,o=this.c,s=this.s,a=this.e,h=d+4,u=new C("0.5");if(1!==s||!o||!o[0])return new C(!s||s<0&&(!o||o[0])?NaN:o?this:1/0);if(0==(s=Math.sqrt(+B(this)))||s==1/0?(((e=iN(o)).length+a)%2==0&&(e+="0"),s=Math.sqrt(+e),a=iz((a+1)/2)-(a<0||a%2),i=new C(e=s==1/0?"5e"+a:(e=s.toExponential()).slice(0,e.indexOf("e")+1)+a)):i=new C(s+""),i.c[0]){for((s=(a=i.e)+h)<3&&(s=0);;)if(r=i,i=u.times(r.plus(l(this,r,h,1))),iN(r.c).slice(0,s)===(e=iN(i.c)).slice(0,s))if(i.e0&&d>0){for(r=d%s||s,h=c.substr(0,r);r0&&(h+=l+c.slice(r)),p&&(h="-"+h)}n=u?h+(i.decimalSeparator||"")+((a=+i.fractionGroupSize)?u.replace(RegExp("\\d{"+a+"}\\B","g"),"$&"+(i.fractionGroupSeparator||"")):u):h}return(i.prefix||"")+n+(i.suffix||"")},p.toFraction=function(t){var e,i,n,r,o,s,a,h,u,p,d,f,m=this.c;if(null!=t&&(!(a=new C(t)).isInteger()&&(a.c||1!==a.s)||a.lt(c)))throw Error(iR+"Argument "+(a.isInteger()?"out of range: ":"not an integer: ")+B(a));if(!m)return new C(this);for(e=new C(c),u=i=new C(c),n=h=new C(c),f=iN(m),o=e.e=f.length-this.e-1,e.c[0]=iA[(s=o%14)<0?14+s:s],t=!t||a.comparedTo(e)>0?o>0?e:u:a,s=y,y=1/0,a=new C(f),h.c[0]=0;p=l(a,e,0,1),1!=(r=i.plus(p.times(n))).comparedTo(t);)i=n,n=r,u=h.plus(p.times(r=u)),h=r,e=a.minus(p.times(r=e)),a=r;return r=l(t.minus(i),n,0,1),h=h.plus(r.times(u)),i=i.plus(r.times(n)),h.s=u.s=this.s,o*=2,d=1>l(u,n,o,_).minus(this).abs().comparedTo(l(h,i,o,_).minus(this).abs())?[u,n]:[h,i],y=s,d},p.toNumber=function(){return+B(this)},p.toPrecision=function(t,e){return null!=t&&iG(t,1,1e9),P(this,t,e,2)},p.toString=function(t){var e,i=this,n=i.s,r=i.e;return null===r?n?(e="Infinity",n<0&&(e="-"+e)):e="NaN":(null==t?e=r<=f||r>=m?iF(iN(i.c),r):iU(iN(i.c),r,"0"):10===t&&w?e=iU(iN((i=S(new C(i),d+r+1,_)).c),i.e,"0"):(iG(t,2,x.length,"Base"),e=h(iU(iN(i.c),r,"0"),10,t,n,!0)),n<0&&i.c[0]&&(e="-"+e)),e},p.valueOf=p.toJSON=function(){return B(this)},p._isBigNumber=!0,p[Symbol.toStringTag]="BigNumber",p[Symbol.for("nodejs.util.inspect.custom")]=p.valueOf,null!=e&&C.set(e),C}(),iH=class{key;left=null;right=null;constructor(t){this.key=t}},iq=class extends iH{constructor(t){super(t)}},iK=class{size=0;modificationCount=0;splayCount=0;splay(t){let e=this.root;if(null==e)return this.compare(t,t),-1;let i=null,n=null,r=null,o=null,s=e,a=this.compare,l;for(;;)if((l=a(s.key,t))>0){let e=s.left;if(null==e||(l=a(e.key,t))>0&&(s.left=e.right,e.right=s,null==(e=(s=e).left)))break;null==i?n=s:i.left=s,i=s,s=e}else if(l<0){let e=s.right;if(null==e||(l=a(e.key,t))<0&&(s.right=e.left,e.left=s,null==(e=(s=e).right)))break;null==r?o=s:r.right=s,r=s,s=e}else break;return null!=r&&(r.right=s.left,s.left=o),null!=i&&(i.left=s.right,s.right=n),this.root!==s&&(this.root=s,this.splayCount++),l}splayMin(t){let e=t,i=e.left;for(;null!=i;){let t=i;e.left=t.right,t.right=e,i=(e=t).left}return e}splayMax(t){let e=t,i=e.right;for(;null!=i;){let t=i;e.right=t.left,t.left=e,i=(e=t).right}return e}_delete(t){if(null==this.root||0!=this.splay(t))return null;let e=this.root,i=e,n=e.left;if(this.size--,null==n)this.root=e.right;else{let t=e.right;(e=this.splayMax(n)).right=t,this.root=e}return this.modificationCount++,i}addNewRoot(t,e){this.size++,this.modificationCount++;let i=this.root;if(null==i){this.root=t;return}e<0?(t.left=i,t.right=i.right,i.right=null):(t.right=i,t.left=i.left,i.left=null),this.root=t}_first(){let t=this.root;return null==t?null:(this.root=this.splayMin(t),this.root)}_last(){let t=this.root;return null==t?null:(this.root=this.splayMax(t),this.root)}clear(){this.root=null,this.size=0,this.modificationCount++}has(t){return this.validKey(t)&&0==this.splay(t)}defaultCompare(){return(t,e)=>te)}wrap(){return{getRoot:()=>this.root,setRoot:t=>{this.root=t},getSize:()=>this.size,getModificationCount:()=>this.modificationCount,getSplayCount:()=>this.splayCount,setSplayCount:t=>{this.splayCount=t},splay:t=>this.splay(t),has:t=>this.has(t)}}},iW=class t extends iK{root=null;compare;validKey;constructor(t,e){super(),this.compare=t??this.defaultCompare(),this.validKey=e??(t=>null!=t&&null!=t)}delete(t){return!!this.validKey(t)&&null!=this._delete(t)}deleteAll(t){for(let e of t)this.delete(e)}forEach(t){let e=this[Symbol.iterator](),i;for(;!(i=e.next()).done;)t(i.value,i.value,this)}add(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new iq(t),e),this}addAndReturn(t){let e=this.splay(t);return 0!=e&&this.addNewRoot(new iq(t),e),this.root.key}addAll(t){for(let e of t)this.add(e)}isEmpty(){return null==this.root}isNotEmpty(){return null!=this.root}single(){if(0==this.size)throw"Bad state: No element";if(this.size>1)throw"Bad state: Too many element";return this.root.key}first(){if(0==this.size)throw"Bad state: No element";return this._first().key}last(){if(0==this.size)throw"Bad state: No element";return this._last().key}lastBefore(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(0>this.splay(t))return this.root.key;let e=this.root.left;if(null==e)return null;let i=e.right;for(;null!=i;)i=(e=i).right;return e.key}firstAfter(t){if(null==t)throw"Invalid arguments(s)";if(null==this.root)return null;if(this.splay(t)>0)return this.root.key;let e=this.root.right;if(null==e)return null;let i=e.left;for(;null!=i;)i=(e=i).left;return e.key}retainAll(e){let i=new t(this.compare,this.validKey),n=this.modificationCount;for(let t of e){if(n!=this.modificationCount)throw"Concurrent modification during iteration.";this.validKey(t)&&0==this.splay(t)&&i.add(this.root.key)}i.size!=this.size&&(this.root=i.root,this.size=i.size,this.modificationCount++)}lookup(t){return this.validKey(t)&&0==this.splay(t)?this.root.key:null}intersection(e){let i=new t(this.compare,this.validKey);for(let t of this)e.has(t)&&i.add(t);return i}difference(e){let i=new t(this.compare,this.validKey);for(let t of this)e.has(t)||i.add(t);return i}union(t){let e=this.clone();return e.addAll(t),e}clone(){let e=new t(this.compare,this.validKey);return e.size=this.size,e.root=this.copyNode(this.root),e}copyNode(t){if(null==t)return null;let e=new iq(t.key);return function t(e,i){let n,r;do{if(n=e.left,r=e.right,null!=n){let e=new iq(n.key);i.left=e,t(n,e)}if(null!=r){let t=new iq(r.key);i.right=t,e=r,i=t}}while(null!=r)}(t,e),e}toSet(){return this.clone()}entries(){return new iJ(this.wrap())}keys(){return this[Symbol.iterator]()}values(){return this[Symbol.iterator]()}[Symbol.iterator](){return new iX(this.wrap())}[Symbol.toStringTag]="[object Set]"},iY=class{tree;path=[];modificationCount=null;splayCount;constructor(t){this.tree=t,this.splayCount=t.getSplayCount()}[Symbol.iterator](){return this}next(){return this.moveNext()?{done:!1,value:this.current()}:{done:!0,value:null}}current(){if(!this.path.length)return null;let t=this.path[this.path.length-1];return this.getValue(t)}rebuildPath(t){this.path.splice(0,this.path.length),this.tree.splay(t),this.path.push(this.tree.getRoot()),this.splayCount=this.tree.getSplayCount()}findLeftMostDescendent(t){for(;null!=t;)this.path.push(t),t=t.left}moveNext(){if(this.modificationCount!=this.tree.getModificationCount()){if(null==this.modificationCount){this.modificationCount=this.tree.getModificationCount();let t=this.tree.getRoot();for(;null!=t;)this.path.push(t),t=t.left;return this.path.length>0}throw"Concurrent modification during iteration."}if(!this.path.length)return!1;this.splayCount!=this.tree.getSplayCount()&&this.rebuildPath(this.path[this.path.length-1].key);let t=this.path[this.path.length-1],e=t.right;if(null!=e){for(;null!=e;)this.path.push(e),e=e.left;return!0}for(this.path.pop();this.path.length&&this.path[this.path.length-1].right===t;)t=this.path.pop();return this.path.length>0}},iX=class extends iY{getValue(t){return t.key}},iJ=class extends iY{getValue(t){return[t.key,t.key]}},i$=t=>()=>t,iQ=t=>{let e=t?(e,i)=>i.minus(e).abs().isLessThanOrEqualTo(t):i$(!1);return(t,i)=>e(t,i)?0:t.comparedTo(i)},i0=t=>t,i1=t=>{let e;return{set:t=>{i2=i1(t)},reset:()=>i1(t),compare:iQ(t),snap:(t=>{if(t){let e=new iW(iQ(t)),i=new iW(iQ(t)),n=t=>{let n,r;return{x:(n=t.x,e.addAndReturn(n)),y:(r=t.y,i.addAndReturn(r))}};return n({x:new iV(0),y:new iV(0)}),n}return i0})(t),orient:(e=t?(e,i,n,r,o)=>e.exponentiatedBy(2).isLessThanOrEqualTo(r.minus(i).exponentiatedBy(2).plus(o.minus(n).exponentiatedBy(2)).times(t)):i$(!1),(t,i,n)=>{let r=t.x,o=t.y,s=n.x,a=n.y,l=o.minus(a).times(i.x.minus(s)).minus(r.minus(s).times(i.y.minus(a)));return e(l,r,o,s,a)?0:l.comparedTo(0)})}},i2=i1(),i3=(t,e)=>t.ll.x.isLessThanOrEqualTo(e.x)&&e.x.isLessThanOrEqualTo(t.ur.x)&&t.ll.y.isLessThanOrEqualTo(e.y)&&e.y.isLessThanOrEqualTo(t.ur.y),i4=(t,e)=>{if(e.ur.x.isLessThan(t.ll.x)||t.ur.x.isLessThan(e.ll.x)||e.ur.y.isLessThan(t.ll.y)||t.ur.y.isLessThan(e.ll.y))return null;let i=t.ll.x.isLessThan(e.ll.x)?e.ll.x:t.ll.x,n=t.ur.x.isLessThan(e.ur.x)?t.ur.x:e.ur.x;return{ll:{x:i,y:t.ll.y.isLessThan(e.ll.y)?e.ll.y:t.ll.y},ur:{x:n,y:t.ur.y.isLessThan(e.ur.y)?t.ur.y:e.ur.y}}},i8=(t,e)=>t.x.times(e.y).minus(t.y.times(e.x)),i5=(t,e)=>t.x.times(e.x).plus(t.y.times(e.y)),i6=t=>i5(t,t).sqrt(),i9=(t,e,i)=>e.y.isZero()?null:{x:t.x.plus(e.x.div(e.y).times(i.minus(t.y))),y:i},i7=(t,e,i)=>e.x.isZero()?null:{x:i,y:t.y.plus(e.y.div(e.x).times(i.minus(t.x)))},nt=class t{point;isLeft;segment;otherSE;consumedBy;static compare(e,i){let n=t.comparePoints(e.point,i.point);return 0!==n?n:(e.point!==i.point&&e.link(i),e.isLeft!==i.isLeft?e.isLeft?1:-1:na.compare(e.segment,i.segment))}static comparePoints(t,e){return t.x.isLessThan(e.x)?-1:t.x.isGreaterThan(e.x)?1:t.y.isLessThan(e.y)?-1:+!!t.y.isGreaterThan(e.y)}constructor(t,e){void 0===t.events?t.events=[this]:t.events.push(this),this.point=t,this.isLeft=e}link(t){if(t.point===this.point)throw Error("Tried to link already linked events");let e=t.point.events;for(let t=0,i=e.length;t{var n,r,o,s,a,l;let h,u,p,c,d=i.otherSE;e.set(i,{sine:(n=this.point,r=t.point,o=d.point,h={x:r.x.minus(n.x),y:r.y.minus(n.y)},i8(u={x:o.x.minus(n.x),y:o.y.minus(n.y)},h).div(i6(u)).div(i6(h))),cosine:(s=this.point,a=t.point,l=d.point,p={x:a.x.minus(s.x),y:a.y.minus(s.y)},i5(c={x:l.x.minus(s.x),y:l.y.minus(s.y)},p).div(i6(c)).div(i6(p)))})};return(t,n)=>{e.has(t)||i(t),e.has(n)||i(n);let{sine:r,cosine:o}=e.get(t),{sine:s,cosine:a}=e.get(n);return r.isGreaterThanOrEqualTo(0)&&s.isGreaterThanOrEqualTo(0)?o.isLessThan(a)?1:o.isGreaterThan(a)?-1:0:r.isLessThan(0)&&s.isLessThan(0)?o.isLessThan(a)?-1:+!!o.isGreaterThan(a):s.isLessThan(r)?-1:+!!s.isGreaterThan(r)}}},ne=class t{events;poly;_isExteriorRing;_enclosingRing;static factory(e){let i=[];for(let n=0,r=e.length;n0&&(t=i)}let e=t.segment.prevInResult(),i=e?e.prevInResult():null;for(;;){if(!e)return null;if(!i)return e.ringOut;if(i.ringOut!==e.ringOut)return i.ringOut?.enclosingRing()!==e.ringOut?e.ringOut:e.ringOut?.enclosingRing();i=(e=i.prevInResult())?e.prevInResult():null}}},ni=class{exteriorRing;interiorRings;constructor(t){this.exteriorRing=t,t.poly=this,this.interiorRings=[]}addInterior(t){this.interiorRings.push(t),t.poly=this}getGeom(){let t=this.exteriorRing.getGeom();if(null===t)return null;let e=[t];for(let t=0,i=this.interiorRings.length;t=nt.comparePoints(o,s)?o:s,this.queue.delete(e.rightSE),i.push(e.rightSE);let n=e.split(t);for(let t=0,e=n.length;t0?(this.tree.delete(e),i.push(t)):(this.segments.push(e),e.prev=n)}else{if(n&&r){let t=n.getIntersection(r);if(null!==t){if(!n.isAnEndpoint(t)){let e=this._splitSafely(n,t);for(let t=0,n=e.length;t0)return -1;let n=e.comparePoint(t.rightSE.point);return 0!==n?n:-1}if(i.isGreaterThan(n)){if(s.isLessThan(a)&&s.isLessThan(h))return -1;if(s.isGreaterThan(a)&&s.isGreaterThan(h))return 1;let i=e.comparePoint(t.leftSE.point);if(0!==i)return i;let n=t.comparePoint(e.rightSE.point);return n<0?1:n>0?-1:1}if(s.isLessThan(a))return -1;if(s.isGreaterThan(a))return 1;if(r.isLessThan(o)){let i=e.comparePoint(t.rightSE.point);if(0!==i)return i}if(r.isGreaterThan(o)){let i=t.comparePoint(e.rightSE.point);if(i<0)return 1;if(i>0)return -1}if(!r.eq(o)){let t=l.minus(s),e=r.minus(i),u=h.minus(a),p=o.minus(n);if(t.isGreaterThan(e)&&u.isLessThan(p))return 1;if(t.isLessThan(e)&&u.isGreaterThan(p))return -1}return r.isGreaterThan(o)?1:r.isLessThan(o)||l.isLessThan(h)?-1:l.isGreaterThan(h)?1:t.ide.id)}constructor(t,e,i,n){this.id=++ns,this.leftSE=t,t.segment=this,t.otherSE=e,this.rightSE=e,e.segment=this,e.otherSE=t,this.rings=i,this.windings=n}static fromRing(e,i,n){let r,o,s,a=nt.comparePoints(e,i);if(a<0)r=e,o=i,s=1;else if(a>0)r=i,o=e,s=-1;else throw Error(`Tried to create degenerate segment at [${e.x}, ${e.y}]`);return new t(new nt(r,!0),new nt(o,!1),[n],[s])}replaceRightSE(t){this.rightSE=t,this.rightSE.segment=this,this.rightSE.otherSE=this.leftSE,this.leftSE.otherSE=this.rightSE}bbox(){let t=this.leftSE.point.y,e=this.rightSE.point.y;return{ll:{x:this.leftSE.point.x,y:t.isLessThan(e)?t:e},ur:{x:this.rightSE.point.x,y:t.isGreaterThan(e)?t:e}}}vector(){return{x:this.rightSE.point.x.minus(this.leftSE.point.x),y:this.rightSE.point.y.minus(this.leftSE.point.y)}}isAnEndpoint(t){return t.x.eq(this.leftSE.point.x)&&t.y.eq(this.leftSE.point.y)||t.x.eq(this.rightSE.point.x)&&t.y.eq(this.rightSE.point.y)}comparePoint(t){return i2.orient(this.leftSE.point,t,this.rightSE.point)}getIntersection(t){let e=this.bbox(),i=t.bbox(),n=i4(e,i);if(null===n)return null;let r=this.leftSE.point,o=this.rightSE.point,s=t.leftSE.point,a=t.rightSE.point,l=i3(e,s)&&0===this.comparePoint(s),h=i3(i,r)&&0===t.comparePoint(r),u=i3(e,a)&&0===this.comparePoint(a),p=i3(i,o)&&0===t.comparePoint(o);if(h&&l)return p&&!u?o:!p&&u?a:null;if(h)return u&&r.x.eq(a.x)&&r.y.eq(a.y)?null:r;if(l)return p&&o.x.eq(s.x)&&o.y.eq(s.y)?null:s;if(p&&u)return null;if(p)return o;if(u)return a;let c=((t,e,i,n)=>{if(e.x.isZero())return i7(i,n,t.x);if(n.x.isZero())return i7(t,e,i.x);if(e.y.isZero())return i9(i,n,t.y);if(n.y.isZero())return i9(t,e,i.y);let r=i8(e,n);if(r.isZero())return null;let o={x:i.x.minus(t.x),y:i.y.minus(t.y)},s=i8(o,e).div(r),a=i8(o,n).div(r),l=t.x.plus(a.times(e.x)),h=i.x.plus(s.times(n.x)),u=t.y.plus(a.times(e.y)),p=i.y.plus(s.times(n.y));return{x:l.plus(h).div(2),y:u.plus(p).div(2)}})(r,this.vector(),s,t.vector());return null!==c&&i3(n,c)?i2.snap(c):null}split(e){let i=[],n=void 0!==e.events,r=new nt(e,!0),o=new nt(e,!1),s=this.rightSE;this.replaceRightSE(o),i.push(o),i.push(r);let a=new t(r,s,this.rings.slice(),this.windings.slice());return nt.comparePoints(a.leftSE.point,a.rightSE.point)>0&&a.swapEvents(),nt.comparePoints(this.leftSE.point,this.rightSE.point)>0&&this.swapEvents(),n&&(r.checkForConsuming(),o.checkForConsuming()),i}swapEvents(){let t=this.rightSE;this.rightSE=this.leftSE,this.leftSE=t,this.leftSE.isLeft=!0,this.rightSE.isLeft=!1;for(let t=0,e=this.windings.length;t0){let t=i;i=n,n=t}if(i.prev===n){let t=i;i=n,n=t}for(let t=0,e=n.rings.length;t1===t.length&&t[0].isSubject;this._isInResult=i(t)!==i(e)}}return this._isInResult}},nl=class{poly;isExterior;segments;bbox;constructor(t,e,i){if(!Array.isArray(t)||0===t.length||(this.poly=e,this.isExterior=i,this.segments=[],"number"!=typeof t[0][0]||"number"!=typeof t[0][1]))throw Error("Input geometry is not a valid Polygon or MultiPolygon");let n=i2.snap({x:new iV(t[0][0]),y:new iV(t[0][1])});this.bbox={ll:{x:n.x,y:n.y},ur:{x:n.x,y:n.y}};let r=n;for(let e=1,i=t.length;e{this._fireCut(e,t,e),this._fireCut(this._map,t,e),e.pm._fireEdit()}),this._editedLayers=[];let i=this._hintMarker.getLatLng();this.disable(),this.options.continueDrawing&&(this.enable(),this._hintMarker.setLatLng(i))},cut(t){let e=this._map._layers,i=t._latlngInfos||[];Object.keys(e).map(t=>e[t]).filter(t=>t.pm).filter(t=>!t._pmTempLayer).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore).filter(t=>t instanceof L.Polyline).filter(e=>e!==t).filter(t=>t.pm.options.allowCutting).filter(t=>!(this.options.layersToCut&&L.Util.isArray(this.options.layersToCut))||!(this.options.layersToCut.length>0)||this.options.layersToCut.indexOf(t)>-1).filter(t=>!this._layerGroup.hasLayer(t)).filter(e=>{try{var i,n;let r,o,s,a=!!eV(t.toGeoJSON(15),e.toGeoJSON(15)).features.length>0;return a||e instanceof L.Polyline&&!(e instanceof L.Polygon)?a:(i=t.toGeoJSON(15),n=e.toGeoJSON(15),r=nc(i),o=nc(n),s=((t,...e)=>no.run("intersection",t,e))(r.coordinates,o.coordinates),0!==s.length&&(1===s.length?!!n_(s[0]):!!nf(s)))}catch{return e instanceof L.Polygon&&console.error("You can't cut polygons with self-intersections"),!1}}).forEach(e=>{let n;if(e instanceof L.Polygon){let t=(n=L.polygon(e.getLatLngs())).getLatLngs();i.forEach(e=>{if(e&&e.snapInfo){let{latlng:i}=e,r=this._calcClosestLayer(i,[n]);if(r&&r.segment&&r.distance1?(0,iS.default)(t,r):t).splice(o,0,i)}}}})}else n=e;let r=this._cutLayer(t,n),o=L.geoJSON(r,e.options);1===o.getLayers().length&&([o]=o.getLayers()),this._setPane(o,"layerPane");let s=o.addTo(this._map.pm._getContainingLayer());if(s.pm.enable(e.pm.options),s.pm.disable(),e._pmTempLayer=!0,t._pmTempLayer=!0,e.remove(),e.removeFrom(this._map.pm._getContainingLayer()),t.remove(),t.removeFrom(this._map.pm._getContainingLayer()),s.getLayers&&0===s.getLayers().length&&this._map.pm.removeLayer({target:s}),s instanceof L.LayerGroup&&s.eachLayer(t=>{this._addDrawnLayerProp(t)}),this._addDrawnLayerProp(s),this.options.layersToCut&&L.Util.isArray(this.options.layersToCut)&&this.options.layersToCut.length>0){let t=this.options.layersToCut.indexOf(e);t>-1&&this.options.layersToCut.splice(t,1)}this._editedLayers.push({layer:s,originalLayer:e})})},_cutLayer(t,e){var i,n,r;let o=L.geoJSON(),s;if(e instanceof L.Polygon){let r,o,a;i=e.toGeoJSON(15),n=t.toGeoJSON(15),r=nc(i),o=nc(n),s=0===(a=((t,...e)=>no.run("difference",t,e))(r.coordinates,o.coordinates)).length?null:1===a.length?n_(a[0]):nf(a)}else{let i,n,a,l,h=((r=e)instanceof L.Polyline&&(r=r.toGeoJSON(15)),a=function t(e){return Array.isArray(e)?1+t(e[0]):-1}(n=nd(r)),l=[],a>1?n.forEach(t=>{l.push(np({type:"LineString",coordinates:t}))}):l.push(r),l);h.forEach(e=>{let i=ia(e,t.toGeoJSON(15));(i&&i.features.length>0?L.geoJSON(i):L.geoJSON(e)).getLayers().forEach(e=>{iT(t.toGeoJSON(15),e.toGeoJSON(15))||e.addTo(o)})}),s=h.length>1?(i=[],o.eachLayer(t=>{i.push(nd(t.toGeoJSON(15)))}),np({type:"MultiLineString",coordinates:i})):o.toGeoJSON(15)}return s},_change:L.Util.falseFn}),eM.Text=eM.extend({initialize(t){this._map=t,this._shape="Text",this.toolbarButtonName="drawText"},enable(t){L.Util.setOptions(this,t),this._enabled=!0,this._map.on("click",this._createMarker,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!0),this._hintMarker=L.marker(this._map.getCenter(),{interactive:!1,zIndexOffset:100,icon:L.divIcon({className:"marker-icon cursor-marker"})}),this._setPane(this._hintMarker,"vertexPane"),this._hintMarker._pmTempLayer=!0,this._hintMarker.addTo(this._map),this.options.cursorMarker&&L.DomUtil.addClass(this._hintMarker._icon,"visible"),this.options.tooltips&&this._hintMarker.bindTooltip(eh("tooltips.placeText"),{permanent:!0,offset:L.point(0,10),direction:"bottom",opacity:.8}).openTooltip(),this._layer=this._hintMarker,this._map.on("mousemove",this._syncHintMarker,this),this._map.getContainer().classList.add("geoman-draw-cursor"),this._fireDrawStart(),this._setGlobalDrawMode()},disable(){this._enabled&&(this._enabled=!1,this._map.off("click",this._createMarker,this),this._hintMarker?.remove(),this._map.getContainer().classList.remove("geoman-draw-cursor"),this._map.off("mousemove",this._syncHintMarker,this),this._map.off("mousemove",this._showHintMarkerAfterMoving,this),this._map.pm.Toolbar.toggleButton(this.toolbarButtonName,!1),this.options.snappable&&this._cleanupSnapping(),this._fireDrawEnd(),this._setGlobalDrawMode())},enabled(){return this._enabled},toggle(t){this.enabled()?this.disable():this.enable(t)},_syncHintMarker(t){this._hintMarker.setLatLng(t.latlng),this.options.snappable&&(t.target=this._hintMarker,this._handleSnapping(t))},_createMarker(t){if(!t.latlng||this.options.requireSnapToFinish&&!this._hintMarker._snapped&&!this._isFirstLayer())return;this._hintMarker._snapped||this._hintMarker.setLatLng(t.latlng);let e=this._hintMarker.getLatLng();if(this.textArea=this._createTextArea(),this.options.textOptions?.className){let t=this.options.textOptions.className.split(" ");this.textArea.classList.add(...t)}let i=this._createTextIcon(this.textArea),n=new L.Marker(e,{textMarker:!0,_textMarkerOverPM:!0,icon:i});if(this._setPane(n,"markerPane"),this._finishLayer(n),n.pm||(n.options.draggable=!1),n.addTo(this._map.pm._getContainingLayer()),n.pm){n.pm.textArea=this.textArea,L.setOptions(n.pm,{removeIfEmpty:this.options.textOptions?.removeIfEmpty??!0});let t=this.options.textOptions?.focusAfterDraw??!0;n.pm._createTextMarker(t),this.options.textOptions?.text&&n.pm.setText(this.options.textOptions.text)}this._fireCreate(n),this._cleanupSnapping(),this.disable(),this.options.continueDrawing&&this._map.once("mousemove",this._showHintMarkerAfterMoving,this)},_showHintMarkerAfterMoving(t){this.enable(),this._hintMarker.setLatLng(t.latlng)},_createTextArea(){let t=document.createElement("textarea");return t.readOnly=!0,t.classList.add("pm-textarea","pm-disabled"),t},_createTextIcon:t=>L.divIcon({className:"pm-text-marker",html:t})});var nm=u(ee());function ng(t,e){e instanceof L.Layer&&(e=e.getLatLng());let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.project(e,i)}function ny(t,e){let i=t.getMaxZoom();return i===1/0&&(i=t.getZoom()),t.unproject(e,i)}var nv=L.Class.extend({includes:[{enableLayerDrag(){if(!this.options.draggable||!this._layer._map)return;this.disable(),this._layerDragEnabled=!0,this._map||(this._map=this._layer._map),(this._layer instanceof L.Marker||this._layer instanceof L.ImageOverlay)&&L.DomEvent.on(this._getDOMElem(),"dragstart",this._stopDOMImageDrag),this._layer.dragging&&this._layer.dragging.disable(),this._tempDragCoord=null,eg(this._layer)instanceof L.Canvas?(this._layer.on("mouseout",this.removeDraggingClass,this),this._layer.on("mouseover",this.addDraggingClass,this)):this.addDraggingClass(),this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!0;let t=this._getDOMElem();t&&(eg(this._layer)instanceof L.Canvas?(this._layer.on("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._addTouchEvents(t)):L.DomEvent.on(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._fireDragEnable()},disableLayerDrag(){this._layerDragEnabled=!1,eg(this._layer)instanceof L.Canvas?(this._layer.off("mouseout",this.removeDraggingClass,this),this._layer.off("mouseover",this.addDraggingClass,this)):this.removeDraggingClass(),this._originalMapDragState&&this._dragging&&this._map.dragging.enable(),this._safeToCacheDragState=!1,this._layer.dragging&&this._layer.dragging.disable();let t=this._getDOMElem();t&&(eg(this._layer)instanceof L.Canvas?(this._layer.off("touchstart mousedown",this._dragMixinOnMouseDown,this),this._map.pm._removeTouchEvents(t)):L.DomEvent.off(t,"touchstart mousedown",this._simulateMouseDownEvent,this)),this._layerDragged&&this._fireUpdate(),this._layerDragged=!1,this._fireDragDisable()},dragging(){return this._dragging},layerDragEnabled(){return!!this._layerDragEnabled},_simulateMouseDownEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseDown(i),!1},_simulateMouseMoveEvent(t){let e=t.touches?t.touches[0]:t,i={originalEvent:e,target:this._layer};return i.containerPoint=this._map.mouseEventToContainerPoint(e),i.latlng=this._map.containerPointToLatLng(i.containerPoint),this._dragMixinOnMouseMove(i),!1},_simulateMouseUpEvent(t){let e={originalEvent:t.touches?t.touches[0]:t,target:this._layer};return -1===t.type.indexOf("touch")&&(e.containerPoint=this._map.mouseEventToContainerPoint(t),e.latlng=this._map.containerPointToLatLng(e.containerPoint)),this._dragMixinOnMouseUp(e),!1},_dragMixinOnMouseDown(t){if(t.originalEvent.button>0)return;this._overwriteEventIfItComesFromMarker(t);let e=t._fromLayerSync,i=this._syncLayers("_dragMixinOnMouseDown",t);if(this._layer instanceof L.Marker&&(!this.options.snappable||e||i?this._disableSnapping():this._initSnappableMarkers()),this._layer instanceof L.CircleMarker){let t="resizeableCircleMarker";this._layer instanceof L.Circle&&(t="resizeableCircle"),!this.options.snappable||e||i?this._layer.pm.options[t]?this._layer.pm._disableSnapping():this._layer.pm._disableSnappingDrag():this._layer.pm.options[t]||this._initSnappableMarkersDrag()}this._safeToCacheDragState&&(this._originalMapDragState=this._layer._map.dragging._enabled,this._safeToCacheDragState=!1),this._tempDragCoord=t.latlng,L.DomEvent.on(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),L.DomEvent.on(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this)},_dragMixinOnMouseMove(t){this._overwriteEventIfItComesFromMarker(t);let e=this._getDOMElem();this._syncLayers("_dragMixinOnMouseMove",t),this._dragging||(this._dragging=!0,L.DomUtil.addClass(e,"leaflet-pm-dragging"),this._layer instanceof L.Marker||this._layer.bringToFront(),this._originalMapDragState&&this._map.dragging.disable(),this._fireDragStart()),this._tempDragCoord||(this._tempDragCoord=t.latlng),this._onLayerDrag(t),this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle()},_dragMixinOnMouseUp(t){let e=this._getDOMElem();return this._syncLayers("_dragMixinOnMouseUp",t),this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0,L.DomEvent.off(this._map.getContainer(),"touchmove mousemove",this._simulateMouseMoveEvent,this),L.DomEvent.off(this._map.getContainer(),"touchend mouseup",this._simulateMouseUpEvent,this),!!this._dragging&&(this._layer instanceof L.CircleMarker&&this._layer.pm._updateHiddenPolyCircle(),this._layerDragged=!0,window.setTimeout(()=>{this._dragging=!1,e&&L.DomUtil.removeClass(e,"leaflet-pm-dragging"),this._fireDragEnd(),this._fireEdit(),this._layerEdited=!0},10),!0)},_onLayerDrag(t){let{latlng:e}=t,i={lat:e.lat-this._tempDragCoord.lat,lng:e.lng-this._tempDragCoord.lng},n=t=>t.map(t=>{if(Array.isArray(t))return n(t);let e={lat:t.lat+i.lat,lng:t.lng+i.lng};return(t.alt||0===t.alt)&&(e.alt=t.alt),e});if(this._layer instanceof L.Circle&&this._layer.options.resizeableCircle||this._layer instanceof L.CircleMarker&&this._layer.options.resizeableCircleMarker){let t=n([this._layer.getLatLng()]);this._layer.setLatLng(t[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.CircleMarker||this._layer instanceof L.Marker){let t=this._layer.getLatLng();this._layer._snapped&&(t=this._layer._orgLatLng);let e=n([t]);this._layer.setLatLng(e[0]),this._fireChange(this._layer.getLatLng(),"Edit")}else if(this._layer instanceof L.ImageOverlay){let t=n([this._layer.getBounds().getNorthWest(),this._layer.getBounds().getSouthEast()]);this._layer.setBounds(t),this._fireChange(this._layer.getBounds(),"Edit")}else{let t=n(this._layer.getLatLngs());this._layer.setLatLngs(t),this._fireChange(this._layer.getLatLngs(),"Edit")}this._tempDragCoord=e,t.layer=this._layer,this._fireDrag(t)},addDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.addClass(t,"leaflet-pm-draggable")},removeDraggingClass(){let t=this._getDOMElem();t&&L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_getDOMElem(){let t=null;return this._layer._path?t=this._layer._path:this._layer._renderer&&this._layer._renderer._container?t=this._layer._renderer._container:this._layer._image?t=this._layer._image:this._layer._icon&&(t=this._layer._icon),t},_overwriteEventIfItComesFromMarker(t){t.target.getLatLng&&(!t.target._radius||t.target._radius<=10)&&(t.containerPoint=this._map.mouseEventToContainerPoint(t.originalEvent),t.latlng=this._map.containerPointToLatLng(t.containerPoint))},_syncLayers(t,e){if(this.enabled())return!1;if(!e._fromLayerSync&&this._layer===e.target&&this.options.syncLayersOnDrag){e._fromLayerSync=!0;let i=[];if(L.Util.isArray(this.options.syncLayersOnDrag))i=this.options.syncLayersOnDrag,this.options.syncLayersOnDrag.forEach(t=>{t instanceof L.LayerGroup&&(i=i.concat(t.pm.getLayers(!0)))});else if(!0===this.options.syncLayersOnDrag&&this._parentLayerGroup)for(let t in this._parentLayerGroup){let e=this._parentLayerGroup[t];e.pm&&(i=e.pm.getLayers(!0))}return L.Util.isArray(i)&&i.length>0&&(i=i.filter(t=>!!t.pm).filter(t=>!!t.pm.options.draggable)).forEach(i=>{i!==this._layer&&i.pm[t]&&(i._snapped=!1,i.pm[t](e))}),i.length>0}return!1},_stopDOMImageDrag:t=>(t.preventDefault(),!1)},ek,{_onRotateStart(t){this._preventRenderingMarkers(!0),this._rotationOriginLatLng=this._getRotationCenter().clone(),this._rotationOriginPoint=ng(this._map,this._rotationOriginLatLng),this._rotationStartPoint=ng(this._map,t.target.getLatLng()),this._initialRotateLatLng=ef(this._layer),this._startAngle=this.getAngle();let e=ef(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._fireRotationStart(this._rotationLayer,e),this._fireRotationStart(this._map,e)},_onRotate(t){let e=ng(this._map,t.target.getLatLng()),i=this._rotationStartPoint,n=this._rotationOriginPoint,r=Math.atan2(e.y-n.y,e.x-n.x)-Math.atan2(i.y-n.y,i.x-n.x);this._layer.setLatLngs(this._rotateLayer(r,this._initialRotateLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let o=this;!function t(e,i=[],n=-1){if(n>-1&&i.push(n),L.Util.isArray(e[0]))e.forEach((e,n)=>t(e,i.slice(),n));else{let t=i.length>0?(0,nm.default)(o._markers,i):o._markers[0];e.forEach((e,i)=>{t[i].setLatLng(e)})}}(this._layer.getLatLngs());let s=ef(this._rotationLayer);this._rotationLayer.setLatLngs(this._rotateLayer(r,this._rotationLayer.pm._rotateOrgLatLng,this._rotationOriginLatLng,L.PM.Matrix.init(),this._map));let a=180*r/Math.PI,l=(a=a<0?a+360:a)+this._startAngle;this._setAngle(l),this._rotationLayer.pm._setAngle(l),this._fireRotation(this._rotationLayer,a,s),this._fireRotation(this._map,a,s),this._rotationLayer.pm._fireChange(this._rotationLayer.getLatLngs(),"Rotation")},_onRotateEnd(){let t=this._startAngle;delete this._rotationOriginLatLng,delete this._rotationOriginPoint,delete this._rotationStartPoint,delete this._initialRotateLatLng,delete this._startAngle;let e=ef(this._rotationLayer,this._rotationLayer.pm._rotateOrgLatLng);this._rotationLayer.pm._rotateOrgLatLng=ef(this._rotationLayer),this._fireRotationEnd(this._rotationLayer,t,e),this._fireRotationEnd(this._map,t,e),this._rotationLayer.pm._fireEdit(this._rotationLayer,"Rotation"),this._preventRenderingMarkers(!1),this._layerRotated=!0},_rotateLayer(t,e,i,n,r){let o=ng(r,i);return this._matrix=n.clone().rotate(t,o).flip(),function t(e,i,n){var r;let o=n.getMaxZoom();if(o===1/0&&(o=n.getZoom()),L.Util.isArray(e)){let r=[];return e.forEach(e=>{r.push(t(e,i,n))}),r}return e instanceof L.LatLng?(r=o,n.unproject(i.transform(n.project(e,r)),r)):null}(e,this._matrix,r)},_setAngle(t){t=t<0?t+360:t,this._angle=t%360},_getRotationCenter(){if(this._rotationCenter)return this._rotationCenter;let t=L.polygon(this._layer.getLatLngs(),{stroke:!1,fill:!1,pmIgnore:!0}).addTo(this._layer._map),e=t.getCenter();return t.removeFrom(this._layer._map),e},enableRotate(){this.options.allowRotation?(this.rotateEnabled()&&this.disableRotate(),this._layer instanceof L.Rectangle&&void 0===this._angle&&this.setInitAngle(ed(this._layer._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0),this._rotatePoly=L.polygon(this._layer.getLatLngs(),{fill:!1,stroke:!1,pmIgnore:!1,snapIgnore:!0}),this._rotatePoly._pmTempLayer=!0,this._rotatePoly.addTo(this._layer._map),this._rotatePoly.pm._setAngle(this.getAngle()),this._rotatePoly.pm.setRotationCenter(this.getRotationCenter()),this._rotatePoly.pm.setOptions(this._layer._map.pm.getGlobalOptions()),this._rotatePoly.pm.setOptions({rotate:!0,snappable:!1,hideMiddleMarkers:!0}),this._rotatePoly.pm._rotationLayer=this._layer,this._rotatePoly.pm.enable(),this._rotateOrgLatLng=ef(this._layer),this._rotateEnabled=!0,this._layer.on("remove",this.disableRotate,this),this._fireRotationEnable(this._layer),this._fireRotationEnable(this._layer._map)):this.disableRotate()},disableRotate(){this.rotateEnabled()&&(this._rotatePoly.pm._layerRotated&&this._fireUpdate(),this._rotatePoly.pm._layerRotated=!1,this._rotatePoly.pm.disable(),this._rotatePoly.remove(),this._rotatePoly.pm.setOptions({rotate:!1}),this._rotatePoly=void 0,this._rotateOrgLatLng=void 0,this._layer.off("remove",this.disableRotate,this),this._rotateEnabled=!1,this._fireRotationDisable(this._layer),this._fireRotationDisable(this._layer._map))},rotateEnabled(){return!!this._rotateEnabled},rotateLayer(t){let e=this.getAngle(),i=this._layer.getLatLngs(),n=Math.PI/180*t;this._layer.setLatLngs(this._rotateLayer(n,this._layer.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._layer._map)),this._rotateOrgLatLng=L.polygon(this._layer.getLatLngs()).getLatLngs(),this._setAngle(this.getAngle()+t),this.rotateEnabled()&&this._rotatePoly&&this._rotatePoly.pm.enabled()&&(this._rotatePoly.setLatLngs(this._rotateLayer(n,this._rotatePoly.getLatLngs(),this._getRotationCenter(),L.PM.Matrix.init(),this._rotatePoly._map)),this._rotatePoly.pm._initMarkers());let r=this.getAngle()-e;r=r<0?r+360:r,this._startAngle=e,this._fireRotation(this._layer,r,i,this._layer),this._fireRotation(this._map||this._layer._map,r,i,this._layer),delete this._startAngle,this._fireChange(this._layer.getLatLngs(),"Rotation")},rotateLayerToAngle(t){let e=t-this.getAngle();this.rotateLayer(e)},getAngle(){return this._angle||0},setInitAngle(t){this._setAngle(t)},getRotationCenter(){return this._getRotationCenter()},setRotationCenter(t){this._rotationCenter=t,this._rotatePoly&&this._rotatePoly.pm.setRotationCenter(t)}},ea],options:{snappable:!0,snapDistance:20,allowSelfIntersection:!0,allowSelfIntersectionEdit:!1,preventMarkerRemoval:!1,removeLayerBelowMinVertexCount:!0,limitMarkersToCount:-1,hideMiddleMarkers:!1,snapSegment:!0,syncLayersOnDrag:!1,draggable:!0,allowEditing:!0,allowRemoval:!0,allowCutting:!0,allowRotation:!0,addVertexOn:"click",removeVertexOn:"contextmenu",removeVertexValidation:void 0,addVertexValidation:void 0,moveVertexValidation:void 0,resizeableCircleMarker:!1,resizeableCircle:!0,snapMiddle:!1,snapVertex:!0},setOptions(t){L.Util.setOptions(this,t)},getOptions(){return this.options},applyOptions(){},isPolygon(){return this._layer instanceof L.Polygon},getShape(){return this._shape},_setPane(t,e){"layerPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.layerPane||"overlayPane":"vertexPane"===e?t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.vertexPane||"markerPane":"markerPane"===e&&(t.options.pane=this._map.pm.globalOptions.panes&&this._map.pm.globalOptions.panes.markerPane||"markerPane")},remove(){(this._map||this._layer._map).pm.removeLayer({target:this._layer})},_vertexValidation(t,e){let i=e.target,n={layer:this._layer,marker:i,event:e},r="";return"move"===t?r="moveVertexValidation":"add"===t?r="addVertexValidation":"remove"===t&&(r="removeVertexValidation"),this.options[r]&&"function"==typeof this.options[r]&&!this.options[r](n)?("move"===t&&(i._cancelDragEventChain=i.getLatLng()),!1):(i._cancelDragEventChain=null,!0)},_vertexValidationDrag:t=>!t._cancelDragEventChain||(t._latlng=t._cancelDragEventChain,t.update(),!1),_vertexValidationDragEnd:t=>!t._cancelDragEventChain||(t._cancelDragEventChain=null,!1)});nv.LayerGroup=L.Class.extend({initialize(t){this._layerGroup=t,this._layers=this.getLayers(),this._getMap(),this._layers.forEach(t=>this._initLayer(t));let e=t=>{if(t.layer._pmTempLayer)return;this._layers=this.getLayers();let e=this._layers.filter(t=>!t.pm._parentLayerGroup||!(this._layerGroup._leaflet_id in t.pm._parentLayerGroup));e.forEach(t=>{this._initLayer(t)}),e.length>0&&this._getMap()&&this._getMap().pm.globalEditModeEnabled()&&this.enabled()&&this.enable(this.getOptions())};this._layerGroup.on("layeradd",L.Util.throttle(e,100,this),this),this._layerGroup.on("layerremove",t=>{this._removeLayerFromGroup(t.target)},this);let i=t=>{t.target._pmTempLayer||(this._layers=this.getLayers())};this._layerGroup.on("layerremove",L.Util.throttle(i,100,this),this)},enable(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.enable(t,e)):i.pm.enable(t)})},disable(t=[]){0===t.length&&(this._layers=this.getLayers()),this._layers.forEach(e=>{e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.disable(t)):e.pm.disable()})},enabled(t=[]){return 0===t.length&&(this._layers=this.getLayers()),!!this._layers.find(e=>e instanceof L.LayerGroup?-1===t.indexOf(e._leaflet_id)&&(t.push(e._leaflet_id),e.pm.enabled(t)):e.pm.enabled())},toggleEdit(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this._options=t,this._layers.forEach(i=>{i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.toggleEdit(t,e)):i.pm.toggleEdit(t)})},_initLayer(t){let e=L.Util.stamp(this._layerGroup);t.pm._parentLayerGroup||(t.pm._parentLayerGroup={}),t.pm._parentLayerGroup[e]=this._layerGroup},_removeLayerFromGroup(t){if(t.pm&&t.pm._layerGroup){let e=L.Util.stamp(this._layerGroup);delete t.pm._layerGroup[e]}},dragging(){return this._layers=this.getLayers(),!!this._layers&&!!this._layers.find(t=>t.pm.dragging())},getOptions(){return this.options},_getMap(){return this._map||this._layers.find(t=>!!t._map)?._map||null},getLayers(t=!1,e=!0,i=!0,n=[]){let r=[];return t?this._layerGroup.getLayers().forEach(t=>{r.push(t),t instanceof L.LayerGroup&&-1===n.indexOf(t._leaflet_id)&&(n.push(t._leaflet_id),r=r.concat(t.pm.getLayers(!0,!0,!0,n)))}):r=this._layerGroup.getLayers(),i&&(r=r.filter(t=>!(t instanceof L.LayerGroup))),e&&(r=(r=(r=r.filter(t=>!!t.pm)).filter(t=>!t._pmTempLayer)).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)),r},setOptions(t,e=[]){0===e.length&&(this._layers=this.getLayers()),this.options=t,this._layers.forEach(i=>{i.pm&&(i instanceof L.LayerGroup?-1===e.indexOf(i._leaflet_id)&&(e.push(i._leaflet_id),i.pm.setOptions(t,e)):i.pm.setOptions(t))})}}),nv.Marker=nv.extend({_shape:"Marker",initialize(t){this._layer=t,this._enabled=!1,this._layer.on("dragend",this._onDragEnd,this)},enable(t={draggable:!0}){(L.Util.setOptions(this,t),this.options.allowEditing&&this._layer._map)?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this),this._fireEnable()):this.disable()},disable(){this.enabled()&&(this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this._layer.off("contextmenu",this._removeMarker,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this.options.draggable?this.enableLayerDrag():this.disableLayerDrag(),this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_removeMarker(t){let e=t.target;e.remove(),this._fireRemove(e),this._fireRemove(this._map,e)},_onDragStart(){this._map.pm.Draw.Marker._layerIsDragging=!0},_onMarkerDragEnd(){this._map.pm.Draw.Marker._layerIsDragging=!1},_onDragEnd(){this._fireEdit(),this._layerEdited=!0},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)}});var nL=u(ee());nv.Line=nv.extend({includes:[{filterMarkerGroup(){this.markerCache=[],this.createCache(),this._layer.on("pm:edit",this.createCache,this),this.applyLimitFilters({}),this.throttledApplyLimitFilters||(this.throttledApplyLimitFilters=L.Util.throttle(this.applyLimitFilters,100,this)),this._layer.on("pm:disable",this._removeMarkerLimitEvents,this),this._layer.on("remove",this._removeMarkerLimitEvents,this),this.options.limitMarkersToCount>-1&&(this._layer.on("pm:vertexremoved",this._initMarkers,this),this._map.on("mousemove",this.throttledApplyLimitFilters,this))},_removeMarkerLimitEvents(){this._map.off("mousemove",this.throttledApplyLimitFilters,this),this._layer.off("pm:edit",this.createCache,this),this._layer.off("pm:disable",this._removeMarkerLimitEvents,this),this._layer.off("pm:vertexremoved",this._initMarkers,this)},createCache(){let t=[...this._markerGroup.getLayers(),...this.markerCache];this.markerCache=t.filter((t,e,i)=>i.indexOf(t)===e)},_removeFromCache(t){let e=this.markerCache.indexOf(t);e>-1&&this.markerCache.splice(e,1)},renderLimits(t){this.markerCache.forEach(e=>{t.includes(e)?this._markerGroup.addLayer(e):this._markerGroup.removeLayer(e)})},applyLimitFilters({latlng:t={lat:0,lng:0}}){if(this._preventRenderMarkers)return;let e=[...this._filterClosestMarkers(t)];this.renderLimits(e)},_filterClosestMarkers(t){let e=[...this.markerCache],i=this.options.limitMarkersToCount;return -1===i?e:(e.sort((e,i)=>e._latlng.distanceTo(t)-i._latlng.distanceTo(t)),e.filter((t,e)=>!(i>-1)||e{if(Array.isArray(t[0]))return t.map(i,this);let e=t.map(this._createMarker,this);return!0!==this.options.hideMiddleMarkers&&t.map((i,n)=>{let r=this.isPolygon()?(n+1)%t.length:n+1;return this._createMiddleMarker(e[n],e[r])}),e};this._markers=i(e),this.filterMarkerGroup(),t.addLayer(this._markerGroup)},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._pmTempLayer=!0,this.options.rotate?(e.on("dragstart",this._onRotateStart,this),e.on("drag",this._onRotate,this),e.on("dragend",this._onRotateEnd,this)):(e.on("click",this._onVertexClick,this),e.on("dragstart",this._onMarkerDragStart,this),e.on("move",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||e.on(this.options.removeVertexOn,this._removeMarker,this)),this._markerGroup.addLayer(e),e},_createMiddleMarker(t,e){if(!t||!e)return!1;let i=L.PM.Utils.calcMiddleLatLng(this._map,t.getLatLng(),e.getLatLng()),n=this._createMarker(i),r=L.divIcon({className:"marker-icon marker-icon-middle"});return n.setIcon(r),n.leftM=t,n.rightM=e,t._middleMarkerNext=n,e._middleMarkerPrev=n,n.on(this.options.addVertexOn,this._onMiddleMarkerClick,this),n.on("movestart",this._onMiddleMarkerMoveStart,this),n},_onMiddleMarkerClick(t){let e=t.target;if(!this._vertexValidation("add",t))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),this._addMarker(e,e.leftM,e.rightM)},_onMiddleMarkerMoveStart(t){let e=t.target;(e.on("moveend",this._onMiddleMarkerMoveEnd,this),this._vertexValidation("add",t))?(e._dragging=!0,this._addMarker(e,e.leftM,e.rightM)):e.on("move",this._onMiddleMarkerMovePrevent,this)},_onMiddleMarkerMovePrevent(t){let e=t.target;this._vertexValidationDrag(e)},_onMiddleMarkerMoveEnd(t){let e=t.target;if(e.off("move",this._onMiddleMarkerMovePrevent,this),e.off("moveend",this._onMiddleMarkerMoveEnd,this),!this._vertexValidationDragEnd(e))return;let i=L.divIcon({className:"marker-icon"});e.setIcon(i),setTimeout(()=>{delete e._dragging},100)},_addMarker(t,e,i){t.off("movestart",this._onMiddleMarkerMoveStart,this),t.off(this.options.addVertexOn,this._onMiddleMarkerClick,this);let n=t.getLatLng(),r=this._layer._latlngs;delete t.leftM,delete t.rightM;let{indexPath:o,index:s,parentPath:a}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),l=o.length>1?(0,nL.default)(r,a):r,h=o.length>1?(0,nL.default)(this._markers,a):this._markers;l.splice(s+1,0,n),h.splice(s+1,0,t),this._layer.setLatLngs(r),!0!==this.options.hideMiddleMarkers&&(this._createMiddleMarker(e,t),this._createMiddleMarker(t,i)),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit"),this._fireVertexAdded(t,L.PM.Utils.findDeepMarkerIndex(this._markers,t).indexPath,n),this.options.snappable&&this._initSnappableMarkers()},hasSelfIntersection(){return eO(this._layer.toGeoJSON(15)).features.length>0},_handleSelfIntersectionOnVertexRemoval(){this._handleLayerStyle(!0)&&(this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers())},_handleLayerStyle(t){let e=this._layer,i,n;if(i=!this.options.allowSelfIntersection&&(n=eO(this._layer.toGeoJSON(15))).features.length>0){if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!0),this.isRed)return i;t?this._flashLayer():(e.setStyle({color:"#f00000ff"}),this.isRed=!0),this._fireIntersect(n)}else e.setStyle({color:this.cachedColor}),this.isRed=!1,!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._updateDisabledMarkerStyle(this._markers,!1);return i},_flashLayer(){this.cachedColor||(this.cachedColor=this._layer.options.color),this._layer.setStyle({color:"#f00000ff"}),this.isRed=!0,window.setTimeout(()=>{this._layer.setStyle({color:this.cachedColor}),this.isRed=!1},200)},_updateDisabledMarkerStyle(t,e){t.forEach(t=>{Array.isArray(t)?this._updateDisabledMarkerStyle(t,e):t._icon&&(e&&!this._checkMarkerAllowedToDrag(t)?L.DomUtil.addClass(t._icon,"vertexmarker-disabled"):L.DomUtil.removeClass(t._icon,"vertexmarker-disabled"))})},_removeMarker(t){let e=t.target;if(!this._vertexValidation("remove",t))return;this.options.allowSelfIntersection||(this._coordsBeforeEdit=ef(this._layer,this._layer.getLatLngs()));let i=this._layer.getLatLngs(),{indexPath:n,index:r,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!n)return;let s=n.length>1?(0,nL.default)(i,o):i,a=n.length>1?(0,nL.default)(this._markers,o):this._markers,l=o[o.length-1]>0&&this._layer instanceof L.Polygon;if(!this.options.removeLayerBelowMinVertexCount&&!l&&(s.length<=2||this.isPolygon()&&s.length<=3))return void this._flashLayer();s.splice(r,1),this._layer.setLatLngs(i),this.isPolygon()&&s.length<=2&&s.splice(0,s.length);let h=!1;if(s.length<=1&&(s.splice(0,s.length),o.length>1&&n.length>1&&(i=ep(i)),this._layer.setLatLngs(i),this._initMarkers(),h=!0),eu(i)||this._layer.remove(),i=ep(i),this._layer.setLatLngs(i),this._markers=ep(this._markers),!h&&(a=n.length>1?(0,nL.default)(this._markers,o):this._markers,e._middleMarkerPrev&&(this._markerGroup.removeLayer(e._middleMarkerPrev),this._removeFromCache(e._middleMarkerPrev)),e._middleMarkerNext&&(this._markerGroup.removeLayer(e._middleMarkerNext),this._removeFromCache(e._middleMarkerNext)),this._markerGroup.removeLayer(e),this._removeFromCache(e),a)){let t,e;if(this.isPolygon()?(t=(r+1)%a.length,e=(r+(a.length-1))%a.length):(e=r-1<0?void 0:r-1,t=r+1>=a.length?void 0:r+1),t!==e){let i=a[e],n=a[t];!0!==this.options.hideMiddleMarkers&&this._createMiddleMarker(i,n)}a.splice(r,1)}this._fireEdit(),this._layerEdited=!0,this._fireVertexRemoved(e,n),this._fireChange(this._layer.getLatLngs(),"Edit")},updatePolygonCoordsFromMarkerDrag(t){let e=this._layer.getLatLngs(),i=t.getLatLng(),{indexPath:n,index:r,parentPath:o}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),s=n.length>1?(0,nL.default)(e,o):e;i.alt=s[r].alt,s.splice(r,1,i),this._layer.setLatLngs(e)},_getNeighborMarkers(t){let{indexPath:e,index:i,parentPath:n}=L.PM.Utils.findDeepMarkerIndex(this._markers,t),r=e.length>1?(0,nL.default)(this._markers,n):this._markers,o=(i+1)%r.length,s=(i+(r.length-1))%r.length;return{prevMarker:r[s],nextMarker:r[o]}},_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),r=L.polyline([t.getLatLng(),i.getLatLng()]),o=eV(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.filter(i=>{let n=i.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(e.getLatLng())&&!r.equals(t.getLatLng())}).length,s=eV(this._layer.toGeoJSON(15),r.toGeoJSON(15)).features.filter(e=>{let n=e.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(i.getLatLng())&&!r.equals(t.getLatLng())}).length;return!(o<1&&s<1)},_onMarkerDragStart(t){let e=t.target;if(this._preventRenderingMarkers(!0),this.cachedColor||(this.cachedColor=this._layer.options.color),!this._vertexValidation("move",t))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i),this.options.allowSelfIntersection||(this._coordsBeforeEdit=ef(this._layer,this._layer.getLatLngs())),!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()?this._markerAllowedToDrag=this._checkMarkerAllowedToDrag(e):this._markerAllowedToDrag=null},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e))return;let{indexPath:i,index:n,parentPath:r}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);if(!i)return;if(!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this.hasSelfIntersection()&&!1===this._markerAllowedToDrag){this._layer.setLatLngs(this._coordsBeforeEdit),this._initMarkers(),this._handleLayerStyle();return}this.updatePolygonCoordsFromMarkerDrag(e);let o=i.length>1?(0,nL.default)(this._markers,r):this._markers,s=(n+1)%o.length,a=(n+(o.length-1))%o.length,l=e.getLatLng(),h=o[a].getLatLng(),u=o[s].getLatLng();if(e._middleMarkerNext){let t=L.PM.Utils.calcMiddleLatLng(this._map,l,u);e._middleMarkerNext.setLatLng(t)}if(e._middleMarkerPrev){let t=L.PM.Utils.calcMiddleLatLng(this._map,l,h);e._middleMarkerPrev.setLatLng(t)}this.options.allowSelfIntersection||this._handleLayerStyle(),this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(this._preventRenderingMarkers(!1),!this._vertexValidationDragEnd(e))return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e),n=!this.options.allowSelfIntersection&&this.hasSelfIntersection();n&&this.options.allowSelfIntersectionEdit&&this._markerAllowedToDrag&&(n=!1);let r=!this.options.allowSelfIntersection&&n;if(this._fireMarkerDragEnd(t,i,r),r){this._layer.setLatLngs(this._coordsBeforeEdit),this._coordsBeforeEdit=null,this._initMarkers(),this.options.snappable&&this._initSnappableMarkers(),this._handleLayerStyle(),this._fireLayerReset(t,i);return}!this.options.allowSelfIntersection&&this.options.allowSelfIntersectionEdit&&this._handleLayerStyle(),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_onVertexClick(t){let e=t.target;if(e._dragging)return;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireVertexClick(t,i)}}),nv.Polygon=nv.Line.extend({_shape:"Polygon",_checkMarkerAllowedToDrag(t){let{prevMarker:e,nextMarker:i}=this._getNeighborMarkers(t),n=L.polyline([e.getLatLng(),t.getLatLng()]),r=L.polyline([t.getLatLng(),i.getLatLng()]),o=eV(this._layer.toGeoJSON(15),n.toGeoJSON(15)).features.filter(i=>{let n=i.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(e.getLatLng())&&!r.equals(t.getLatLng())}).length,s=eV(this._layer.toGeoJSON(15),r.toGeoJSON(15)).features.filter(e=>{let n=e.geometry.coordinates,r=L.latLng(n[1],n[0]);return!r.equals(i.getLatLng())&&!r.equals(t.getLatLng())}).length;return!(o<1&&s<1)}}),nv.Rectangle=nv.Polygon.extend({_shape:"Rectangle",_initMarkers(){let t=this._map,e=this._findCorners();this._markerGroup&&this._markerGroup.clearLayers(),this._markerGroup=new L.FeatureGroup,this._markerGroup._pmTempLayer=!0,t.addLayer(this._markerGroup),this._markers=[],this._markers[0]=e.map(this._createMarker,this),[this._cornerMarkers]=this._markers,this._layer.getLatLngs()[0].forEach((t,e)=>{let i=this._cornerMarkers.find(t=>t._index===e);i&&i.setLatLng(t)})},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping(),this._addMarkerEvents()},_createMarker(t,e){let i=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(i,"vertexPane"),i._origLatLng=t,i._index=e,i._pmTempLayer=!0,i.on("click",this._onVertexClick,this),this._markerGroup.addLayer(i),i},_addMarkerEvents(){this._markers[0].forEach(t=>{t.on("dragstart",this._onMarkerDragStart,this),t.on("drag",this._onMarkerDrag,this),t.on("dragend",this._onMarkerDragEnd,this),this.options.preventMarkerRemoval||t.on("contextmenu",this._removeMarker,this)})},_removeMarker:()=>null,_onMarkerDragStart(t){if(!this._vertexValidation("move",t))return;let e=t.target;e._oppositeCornerLatLng=this._cornerMarkers.find(t=>t._index===(e._index+2)%4).getLatLng(),e._snapped=!1;let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragStart(t,i)},_onMarkerDrag(t){let e=t.target;if(!this._vertexValidationDrag(e)||void 0===e._index)return;this._adjustRectangleForMarkerMove(e);let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDrag(t,i),this._fireChange(this._layer.getLatLngs(),"Edit")},_onMarkerDragEnd(t){let e=t.target;if(!this._vertexValidationDragEnd(e))return;this._cornerMarkers.forEach(t=>{delete t._oppositeCornerLatLng});let{indexPath:i}=L.PM.Utils.findDeepMarkerIndex(this._markers,e);this._fireMarkerDragEnd(t,i),this._fireEdit(),this._layerEdited=!0,this._fireChange(this._layer.getLatLngs(),"Edit")},_adjustRectangleForMarkerMove(t){L.extend(t._origLatLng,t._latlng);let e=L.PM.Utils._getRotatedRectangle(t.getLatLng(),t._oppositeCornerLatLng,this.getAngle(),this._map);this._layer.setLatLngs(e),this._adjustAllMarkers(t),this._layer.redraw()},_adjustAllMarkers(t){let e=this._layer.getLatLngs()[0];if(e&&4!==e.length&&e.length>0)e.forEach((t,e)=>{this._cornerMarkers[e].setLatLng(t)}),this._cornerMarkers.slice(e.length).forEach(t=>{t.setLatLng(e[0])});else if(e&&e.length){let i=e.findIndex(e=>t.getLatLng().equals(e));i>-1?(this._cornerMarkers[(t._index+1)%4].setLatLng(e[(i+1)%4]),this._cornerMarkers[(t._index+2)%4].setLatLng(e[(i+2)%4]),this._cornerMarkers[(t._index+3)%4].setLatLng(e[(i+3)%4])):this._cornerMarkers.forEach(t=>{t.setLatLng(e[t._index])})}else console.error("The layer has no LatLngs")},_findCorners(){void 0===this._angle&&this.setInitAngle(ed(this._map,this._layer.getLatLngs()[0][0],this._layer.getLatLngs()[0][1])||0);let t=this._layer.getLatLngs()[0];return L.PM.Utils._getRotatedRectangle(t[0],t[2],this.getAngle(),this._map||this)}}),nv.CircleMarker=nv.extend({_shape:"CircleMarker",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircleMarker",this._maxRadiusOption="maxRadiusCircleMarker",this._editableOption="resizeableCircleMarker",this._updateHiddenPolyCircle()},enable(t={draggable:!0,snappable:!0}){(L.Util.setOptions(this,t),this.options.editable&&(this.options.resizeableCircleMarker=this.options.editable,delete this.options.editable),this.options.allowEditing&&this._layer._map)?(this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._extendingEnable(),this._updateHiddenPolyCircle(),this._fireEnable()):this.disable()},_extendingEnable(){this._layer.on("pm:dragstart",this._onDragStart,this),this._layer.on("pm:drag",this._onMarkerDrag,this),this._layer.on("pm:dragend",this._onMarkerDragEnd,this)},disable(){this.dragging()||(this._map||(this._map=this._layer._map),this._map&&this.enabled()&&(this.layerDragEnabled()&&this.disableLayerDrag(),this._helperLayers&&(this._helperLayers.clearLayers(),this._helperLayers.removeFrom(this._map)),this.options[this._editableOption]?(this._map.off("move",this._syncMarkers,this),this._outerMarker.off("drag",this._handleOuterMarkerSnapping,this)):this._map.off("move",this._updateHiddenPolyCircle,this),this._extendingDisable(),this._layer.off("remove",this.disable,this),this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1))},_extendingDisable(){this._layer.off("contextmenu",this._removeMarker,this)},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options[this._editableOption]?(this._initMarkers(),this._map.on("move",this._syncMarkers,this),this.options.snappable?(this._initSnappableMarkers(),this._outerMarker.on("drag",this._handleOuterMarkerSnapping,this),this._outerMarker.on("move",this._syncHintLine,this),this._outerMarker.on("move",this._syncCircleRadius,this)):this._disableSnapping()):(this.options.draggable&&this.enableLayerDrag(),this._map.on("move",this._updateHiddenPolyCircle,this),this.options.snappable?this._initSnappableMarkersDrag():this._disableSnappingDrag()),this._extendingApplyOptions()},_extendingApplyOptions(){this.options.preventMarkerRemoval||this._layer.on("contextmenu",this._removeMarker,this)},_initMarkers(){let t=this._map;this._helperLayers&&(this._helperLayers.removeFrom(t),this._helperLayers.clearLayers()),this._helperLayers=new L.FeatureGroup,this._helperLayers._pmTempLayer=!0,this._helperLayers.addTo(t);let e=this._layer.getLatLng(),i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._centerMarker=this._createCenterMarker(e),this._outerMarker=this._createOuterMarker(n),this._markers=[this._centerMarker,this._outerMarker],this._createHintLine(this._centerMarker,this._outerMarker)},_getLatLngOnCircle(t,e){let i=this._map.project(t),n=L.point(i.x+e,i.y);return this._map.unproject(n)},_createHintLine(t,e){let i=t.getLatLng(),n=e.getLatLng();this._hintline=L.polyline([i,n],this.options.hintlineStyle),this._setPane(this._hintline,"layerPane"),this._hintline._pmTempLayer=!0,this._helperLayers.addLayer(this._hintline)},_createCenterMarker(t){let e=this._createMarker(t);return this.options.draggable?(L.DomUtil.addClass(e._icon,"leaflet-pm-draggable"),e.on("move",this._moveCircle,this)):e.dragging.disable(),e},_createOuterMarker(t){let e=this._createMarker(t);return e.on("drag",this._resizeCircle,this),e},_createMarker(t){let e=new L.Marker(t,{draggable:!0,icon:L.divIcon({className:"marker-icon"})});return this._setPane(e,"vertexPane"),e._origLatLng=t,e._pmTempLayer=!0,e.on("dragstart",this._onMarkerDragStart,this),e.on("drag",this._onMarkerDrag,this),e.on("dragend",this._onMarkerDragEnd,this),e.on("click",this._onVertexClick,this),this._helperLayers.addLayer(e),e},_moveCircle(t){if(t.target._cancelDragEventChain)return;let e=this._centerMarker.getLatLng();this._layer.setLatLng(e);let i=this._layer._radius,n=this._getLatLngOnCircle(e,i);this._outerMarker._latlng=n,this._outerMarker.update(),this._syncHintLine(),this._updateHiddenPolyCircle(),this._fireCenterPlaced("Edit"),this._fireChange(this._layer.getLatLng(),"Edit")},_syncMarkers(){let t=this._layer.getLatLng(),e=this._layer._radius,i=this._getLatLngOnCircle(t,e);this._outerMarker.setLatLng(i),this._centerMarker.setLatLng(t),this._syncHintLine(),this._updateHiddenPolyCircle()},_resizeCircle(){this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker()),this._syncHintLine(),this._syncCircleRadius()},_syncCircleRadius(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]?this._layer.setRadius(this.options[this._maxRadiusOption]):this._layer.setRadius(i),this._updateHiddenPolyCircle(),this._fireChange(this._layer.getLatLng(),"Edit")},_syncHintLine(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng();this._hintline.setLatLngs([t,e])},_removeMarker(){this.options[this._editableOption]&&this.disable(),this._layer.remove(),this._fireRemove(this._layer),this._fireRemove(this._map,this._layer)},_onDragStart(){this._map.pm.Draw.CircleMarker._layerIsDragging=!0},_onMarkerDragStart(t){this._vertexValidation("move",t)&&this._fireMarkerDragStart(t)},_onMarkerDrag(t){let e=t.target;e instanceof L.Marker&&!this._vertexValidationDrag(e)||this._fireMarkerDrag(t)},_onMarkerDragEnd(t){this._extedingMarkerDragEnd();let e=t.target;this._vertexValidationDragEnd(e)&&(this.options[this._editableOption]&&(this._fireEdit(),this._layerEdited=!0),this._fireMarkerDragEnd(t))},_extedingMarkerDragEnd(){this._map.pm.Draw.CircleMarker._layerIsDragging=!1},_initSnappableMarkersDrag(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnappingDrag(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_updateHiddenPolyCircle(){let t=this._layer._map||this._map;if(t){let e=L.PM.Utils.pxRadiusToMeterRadius(this._layer.getRadius(),t,this._layer.getLatLng()),i=L.circle(this._layer.getLatLng(),this._layer.options);i.setRadius(e);let n=t&&t.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(i,200,!n).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(i,200,!n),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)}},_getNewDestinationOfOuterMarker(){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);return this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&(e=e_(this._map,t,e,this._getMaxDistanceInMeter(t))),e},_handleOuterMarkerSnapping(){if(this._outerMarker._snapped){let t=this._centerMarker.getLatLng(),e=this._outerMarker.getLatLng(),i=this._distanceCalculation(t,e);this.options[this._minRadiusOption]&&ithis.options[this._maxRadiusOption]&&this._outerMarker.setLatLng(this._outerMarker._orgLatLng)}this._outerMarker.setLatLng(this._getNewDestinationOfOuterMarker())},_distanceCalculation(t,e){return this._map.project(t).distanceTo(this._map.project(e))},_getMinDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._minRadiusOption],this._map,t)},_getMaxDistanceInMeter(t){return L.PM.Utils.pxRadiusToMeterRadius(this.options[this._maxRadiusOption],this._map,t)},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),nv.Circle=nv.CircleMarker.extend({_shape:"Circle",initialize(t){this._layer=t,this._enabled=!1,this._minRadiusOption="minRadiusCircle",this._maxRadiusOption="maxRadiusCircle",this._editableOption="resizeableCircle",this._updateHiddenPolyCircle()},enable(t){L.PM.Edit.CircleMarker.prototype.enable.call(this,t||{})},_extendingEnable(){},_extendingDisable(){this._layer.off("remove",this.disable,this);let t=this._layer._path?this._layer._path:this._layer._renderer._container;L.DomUtil.removeClass(t,"leaflet-pm-draggable")},_extendingApplyOptions(){},_syncMarkers(){},_removeMarker(){},_onDragStart(){},_extedingMarkerDragEnd(){},_updateHiddenPolyCircle(){let t=this._map&&this._map.pm._isCRSSimple();this._hiddenPolyCircle?this._hiddenPolyCircle.setLatLngs(L.PM.Utils.circleToPolygon(this._layer,200,!t).getLatLngs()):this._hiddenPolyCircle=L.PM.Utils.circleToPolygon(this._layer,200,!t),this._hiddenPolyCircle._parentCopy||(this._hiddenPolyCircle._parentCopy=this._layer)},_distanceCalculation(t,e){return this._map.distance(t,e)},_getMinDistanceInMeter(){return this.options[this._minRadiusOption]},_getMaxDistanceInMeter(){return this.options[this._maxRadiusOption]},_onVertexClick(t){t.target._dragging||this._fireVertexClick(t,void 0)}}),nv.ImageOverlay=nv.extend({_shape:"ImageOverlay",initialize(t){this._layer=t,this._enabled=!1},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},enabled(){return this._enabled},enable(t={draggable:!0,snappable:!0}){if(L.Util.setOptions(this,t),this._map=this._layer._map,this._map){if(!this.options.allowEditing)return void this.disable();this.enabled()||this.disable(),this.enableLayerDrag(),this._layer.on("remove",this.disable,this),this._enabled=!0,this._otherSnapLayers=this._findCorners(),this._fireEnable()}},disable(){this._dragging||(this._map||(this._map=this._layer._map),this.disableLayerDrag(),this._layer.off("remove",this.disable,this),this.enabled()||(this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable()),this._enabled=!1)},_findCorners(){let t=this._layer.getBounds();return[t.getNorthWest(),t.getNorthEast(),t.getSouthEast(),t.getSouthWest()]}}),nv.Text=nv.extend({_shape:"Text",initialize(t){this._layer=t,this._enabled=!1},enable(t){if(L.Util.setOptions(this,t),this.textArea){if(!this.options.allowEditing||!this._layer._map)return void this.disable();this._map=this._layer._map,this.enabled()&&this.disable(),this.applyOptions(),this._safeToCacheDragState=!0,this._focusChange(),this.textArea.readOnly=!1,this.textArea.classList.remove("pm-disabled"),this._layer.on("remove",this.disable,this),L.DomEvent.on(this.textArea,"input",this._autoResize,this),L.DomEvent.on(this.textArea,"focus",this._focusChange,this),L.DomEvent.on(this.textArea,"blur",this._focusChange,this),this._layer.on("dblclick",L.DomEvent.stop),L.DomEvent.off(this.textArea,"mousedown",this._preventTextSelection),this._enabled=!0,this._fireEnable()}},disable(){if(!this.enabled())return;this._layer.off("remove",this.disable,this),L.DomEvent.off(this.textArea,"input",this._autoResize,this),L.DomEvent.off(this.textArea,"focus",this._focusChange,this),L.DomEvent.off(this.textArea,"blur",this._focusChange,this),document.removeEventListener("click",this._documentClickThis,{capture:!0}),this._focusChange(),this.textArea.readOnly=!0,this.textArea.classList.add("pm-disabled");let t=document.activeElement;this.textArea.focus(),this.textArea.selectionStart=0,this.textArea.selectionEnd=0,L.DomEvent.on(this.textArea,"mousedown",this._preventTextSelection),t.focus(),this._disableOnBlurActive=!1,this._layerEdited&&this._fireUpdate(),this._layerEdited=!1,this._fireDisable(),this._enabled=!1},enabled(){return this._enabled},toggleEdit(t){this.enabled()?this.disable():this.enable(t)},applyOptions(){this.options.snappable?this._initSnappableMarkers():this._disableSnapping()},_initSnappableMarkers(){let t=this._layer;this.options.snapDistance=this.options.snapDistance||30,this.options.snapSegment=void 0===this.options.snapSegment||this.options.snapSegment,t.off("pm:drag",this._handleSnapping,this),t.on("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.on("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this),t.on("pm:dragstart",this._unsnap,this)},_disableSnapping(){let t=this._layer;t.off("pm:drag",this._handleSnapping,this),t.off("pm:dragend",this._cleanupSnapping,this),t.off("pm:dragstart",this._unsnap,this)},_autoResize(){this.textArea.style.height="1px",this.textArea.style.width="1px";let t=this.textArea.scrollHeight>21?this.textArea.scrollHeight:21,e=this.textArea.scrollWidth>16?this.textArea.scrollWidth:16;this.textArea.style.height=`${t}px`,this.textArea.style.width=`${e}px`,this._layer.options.text=this.getText(),this._fireTextChange(this.getText())},_disableOnBlur(){this._disableOnBlurActive=!0,setTimeout(()=>{this.enabled()&&(this._documentClickThis=this._documentClickThis||this._documentClick.bind(this),document.addEventListener("click",this._documentClickThis,{capture:!0}))},100)},_documentClick(t){t.target!==this.textArea&&(this.disable(),!this.getText()&&this.options.removeIfEmpty&&this.remove())},_focusChange(t={}){let e=this._hasFocus;this._hasFocus="focus"===t.type,!e!=!this._hasFocus&&(this._hasFocus?(this._applyFocus(),this._focusText=this.getText(),this._fireTextFocus()):(this._removeFocus(),this._fireTextBlur(),this._focusText!==this.getText()&&(this._fireEdit(),this._layerEdited=!0)))},_applyFocus(){this.textArea.classList.add("pm-hasfocus"),this._map.dragging&&(this._safeToCacheDragState&&(this._originalMapDragState=this._map.dragging._enabled,this._safeToCacheDragState=!1),this._map.dragging.disable())},_removeFocus(){this._map.dragging&&(this._originalMapDragState&&this._map.dragging.enable(),this._safeToCacheDragState=!0),this.textArea.classList.remove("pm-hasfocus")},focus(){if(!this.enabled())throw TypeError("Layer is not enabled");this.textArea.focus()},blur(){if(!this.enabled())throw TypeError("Layer is not enabled");this.textArea.blur(),this._disableOnBlurActive&&this.disable()},hasFocus(){return this._hasFocus},getElement(){return this.textArea},setText(t){t&&(this.textArea.value=t),this._autoResize()},getText(){return this.textArea.value},_initTextMarker(){if(this.textArea=L.PM.Draw.Text.prototype._createTextArea.call(this),this.options.className){let t=this.options.className.split(" ");this.textArea.classList.add(...t)}let t=L.PM.Draw.Text.prototype._createTextIcon.call(this,this.textArea);this._layer.setIcon(t),this._layer.once("add",this._createTextMarker,this)},_createTextMarker(t=!1){this._layer.off("add",this._createTextMarker,this),this._layer.getElement().tabIndex=-1,this.textArea.wrap="off",this.textArea.style.overflow="hidden",this.textArea.style.height=L.DomUtil.getStyle(this.textArea,"font-size"),this.textArea.style.width="1px",this._layer.options.text&&this.setText(this._layer.options.text),this._autoResize(),!0===t&&(this.enable(),this.focus(),this._disableOnBlur())},_preventTextSelection(t){t.preventDefault()}});var nb=function(t,e,i,n,r,o){this._matrix=[t,e,i,n,r,o]};nb.init=()=>new L.PM.Matrix(1,0,0,1,0,0),nb.prototype={transform(t){return this._transform(t.clone())},_transform(t){let e=this._matrix,{x:i,y:n}=t;return t.x=e[0]*i+e[1]*n+e[4],t.y=e[2]*i+e[3]*n+e[5],t},untransform(t){let e=this._matrix;return new L.Point((t.x/e[0]-e[4])/e[0],(t.y/e[2]-e[5])/e[2])},clone(){let t=this._matrix;return new L.PM.Matrix(t[0],t[1],t[2],t[3],t[4],t[5])},translate(t){let e,i;return void 0===t?new L.Point(this._matrix[4],this._matrix[5]):("number"==typeof t?(e=t,i=t):(e=t.x,i=t.y),this._add(1,0,0,1,e,i))},scale(t,e){let i,n;return void 0===t?new L.Point(this._matrix[0],this._matrix[3]):(e=e||L.point(0,0),"number"==typeof t?(i=t,n=t):(i=t.x,n=t.y),this._add(i,0,0,n,e.x,e.y)._add(1,0,0,1,-e.x,-e.y))},rotate(t,e){let i=Math.cos(t),n=Math.sin(t);return e=e||new L.Point(0,0),this._add(i,n,-n,i,e.x,e.y)._add(1,0,0,1,-e.x,-e.y)},flip(){return this._matrix[1]*=-1,this._matrix[2]*=-1,this},_add(t,e,i,n,r,o){let s=[[],[],[]],a=this._matrix,l=[[a[0],a[2],a[4]],[a[1],a[3],a[5]],[0,0,1]],h=[[t,i,r],[e,n,o],[0,0,1]],u;t&&t instanceof L.PM.Matrix&&(h=[[(a=t._matrix)[0],a[2],a[4]],[a[1],a[3],a[5]],[0,0,1]]);for(let t=0;t<3;t+=1)for(let e=0;e<3;e+=1){u=0;for(let i=0;i<3;i+=1)u+=l[t][i]*h[i][e];s[t][e]=u}return this._matrix=[s[0][0],s[1][0],s[0][1],s[1][1],s[0][2],s[1][2]],this}},L.PM=L.PM||{version:"2.19.2",Map:ey,Toolbar:eL,Draw:eM,Edit:nv,Utils:{calcMiddleLatLng(t,e,i){let n=t.project(e),r=t.project(i);return t.unproject(n._add(r)._divideBy(2))},findLayers(t){let e=[];return t.eachLayer(t=>{(t instanceof L.Polyline||t instanceof L.Marker||t instanceof L.Circle||t instanceof L.CircleMarker||t instanceof L.ImageOverlay)&&e.push(t)}),e=(e=(e=e.filter(t=>!!t.pm)).filter(t=>!t._pmTempLayer)).filter(t=>!L.PM.optIn&&!t.options.pmIgnore||L.PM.optIn&&!1===t.options.pmIgnore)},circleToPolygon(t,e=60,i=!0){let n=ec(t.getLatLng(),t.getRadius(),e,0,i),r=[];for(let t=0;t{t.fire(e,i,n)})},getAllParentGroups(t){let e=[],i=[],n=t=>{for(let r in t._eventParents)if(-1===e.indexOf(r)){e.push(r);let o=t._eventParents[r];i.push(o),n(o)}};return!t._pmLastGroupFetch||!t._pmLastGroupFetch.time||new Date().getTime()-t._pmLastGroupFetch.time>1e3?(n(t),t._pmLastGroupFetch={time:new Date().getTime(),groups:i,groupIds:e},{groupIds:e,groups:i}):{groups:t._pmLastGroupFetch.groups,groupIds:t._pmLastGroupFetch.groupIds}},createGeodesicPolygon:ec,getTranslation:eh,findDeepCoordIndex(t,e,i=!0){let n,r=t=>(o,s)=>{let a=t.concat(s);if(i){if(o.lat&&o.lat===e.lat&&o.lng===e.lng)return n=a,!0}else if(o.lat&&L.latLng(o).equals(e))return n=a,!0;return Array.isArray(o)&&o.some(r(a))};t.some(r([]));let o={};return n&&(o={indexPath:n,index:n[n.length-1],parentPath:n.slice(0,n.length-1)}),o},findDeepMarkerIndex(t,e){let i,n=t=>(r,o)=>{let s=t.concat(o);return r._leaflet_id===e._leaflet_id?(i=s,!0):Array.isArray(r)&&r.some(n(s))};t.some(n([]));let r={};return i&&(r={indexPath:i,index:i[i.length-1],parentPath:i.slice(0,i.length-1)}),r},_getIndexFromSegment(t,e){if(e&&2===e.length){let i=this.findDeepCoordIndex(t,e[0]),n=this.findDeepCoordIndex(t,e[1]),r=Math.max(i.index,n.index);return(0===i.index||0===n.index)&&1!==r&&(r+=1),{indexA:i,indexB:n,newIndex:r,indexPath:i.indexPath,parentPath:i.parentPath}}return null},_getRotatedRectangle(t,e,i,n){let r=ng(n,t),o=ng(n,e),s=i*Math.PI/180,a=Math.cos(s),l=Math.sin(s),h=(o.x-r.x)*a+(o.y-r.y)*l,u=(o.y-r.y)*a-(o.x-r.x)*l,p=h*a+r.x,c=h*l+r.y,d=-u*l+r.x,_=u*a+r.y;return[ny(n,r),ny(n,{x:p,y:c}),ny(n,o),ny(n,{x:d,y:_})]},pxRadiusToMeterRadius(t,e,i){let n=e.project(i),r=L.point(n.x+t,n.y);return e.distance(e.unproject(r),i)}},Matrix:nb,activeLang:"en",optIn:!1,initialize(t){this.addInitHooks(t)},setOptIn(t){this.optIn=!!t},addInitHooks(){L.Map.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Map(this)):this.options.pmIgnore||(this.pm=new L.PM.Map(this)),this.pm&&this.pm.setGlobalOptions({})}),L.LayerGroup.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.LayerGroup(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.LayerGroup(this))}),L.Marker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this)):this.options.pmIgnore||(this.options.textMarker?(this.pm=new L.PM.Edit.Text(this),this.options._textMarkerOverPM||this.pm._initTextMarker(),delete this.options._textMarkerOverPM):this.pm=new L.PM.Edit.Marker(this))}),L.CircleMarker.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.CircleMarker(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.CircleMarker(this))}),L.Polyline.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Line(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Line(this))}),L.Polygon.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Polygon(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Polygon(this))}),L.Rectangle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Rectangle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Rectangle(this))}),L.Circle.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.Circle(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.Circle(this))}),L.ImageOverlay.addInitHook(function(){this.pm=void 0,L.PM.optIn?!1===this.options.pmIgnore&&(this.pm=new L.PM.Edit.ImageOverlay(this)):this.options.pmIgnore||(this.pm=new L.PM.Edit.ImageOverlay(this))})},reInitLayer(t){t instanceof L.LayerGroup&&t.eachLayer(t=>{this.reInitLayer(t)}),t.pm||L.PM.optIn&&!1!==t.options.pmIgnore||t.options.pmIgnore||(t instanceof L.Map?t.pm=new L.PM.Map(t):t instanceof L.Marker?t.options.textMarker?(t.pm=new L.PM.Edit.Text(t),t.pm._initTextMarker(),t.pm._createTextMarker(!1)):t.pm=new L.PM.Edit.Marker(t):t instanceof L.Circle?t.pm=new L.PM.Edit.Circle(t):t instanceof L.CircleMarker?t.pm=new L.PM.Edit.CircleMarker(t):t instanceof L.Rectangle?t.pm=new L.PM.Edit.Rectangle(t):t instanceof L.Polygon?t.pm=new L.PM.Edit.Polygon(t):t instanceof L.Polyline?t.pm=new L.PM.Edit.Line(t):t instanceof L.LayerGroup?t.pm=new L.PM.Edit.LayerGroup(t):t instanceof L.ImageOverlay&&(t.pm=new L.PM.Edit.ImageOverlay(t)))}},"1.7.1"===L.version&&L.Canvas.include({_onClick(t){let e=this._map.mouseEventToLayerPoint(t),i,n;for(let r=this._drawFirst;r;r=r.next)(i=r.layer).options.interactive&&i._containsPoint(e)&&("click"!==t.type&&"preclick"!==t.type||!this._map._draggableMoved(i))&&(n=i);n&&(L.DomEvent.fakeStop(t),this._fireEvent([n],t))}}),L.PM.initialize()})()},80094,t=>{"use strict";var e=t.i(43476),i=t.i(32322);t.i(15258),t.i(70462);var n=t.i(71645);function r({members:t,onPolygonChange:r,clearTrigger:o,loadPolygon:s}){let a=(0,n.useRef)(null),l=(0,n.useRef)(null),h=(0,n.useRef)(null),u=(0,n.useRef)(null);return(0,n.useEffect)(()=>{if(!a.current||l.current)return;let t=i.default.map(a.current).setView([46.5,2.5],6);i.default.tileLayer("https://tile.openstreetmap.org/{z}/{x}/{y}.png",{attribution:'© OpenStreetMap'}).addTo(t);let e=i.default.markerClusterGroup();return t.addLayer(e),t.pm&&(t.pm.addControls({position:"topleft",drawCircle:!1,drawCircleMarker:!1,drawMarker:!1,drawPolyline:!1,drawText:!1,editMode:!1,dragMode:!1,cutPolygon:!1,rotateMode:!1,removalMode:!1}),t.pm.setLang("fr")),t.on("pm:create",e=>{u.current&&t.removeLayer(u.current),u.current=e.layer,r(e.layer.getLatLngs()[0].map(t=>[t.lat,t.lng]))}),t.on("pm:remove",()=>{u.current=null,r(null)}),l.current=t,h.current=e,()=>{t.remove(),l.current=null,h.current=null}},[]),(0,n.useEffect)(()=>{let t=l.current;if(o&&t){if(u.current){let e=t.getCenter(),i=t.getZoom();t.removeLayer(u.current),u.current=null,t.setView(e,i,{animate:!1})}t.pm&&t.pm.disableDraw()}},[o]),(0,n.useEffect)(()=>{let t=l.current;if(!t||!s)return;u.current&&(t.removeLayer(u.current),u.current=null);let e=s.coords.map(([t,e])=>i.default.latLng(t,e)),n=i.default.polygon(e,{color:"#3388ff"}).addTo(t);u.current=n,t.fitBounds(n.getBounds(),{padding:[20,20]}),r(s.coords,s.name)},[s]),(0,n.useEffect)(()=>{let e=h.current;if(!e)return;e.clearLayers();let n=t.map(t=>i.default.circleMarker([t.lat,t.lon],{radius:6,color:"#f59e0b",fillColor:"#f59e0b",fillOpacity:.7}).bindPopup(`${t.title||t.pubkey.slice(0,8)}${t.city?"
"+t.city:""}`));e.addLayers(n)},[t]),(0,e.jsx)("div",{ref:a,style:{height:"500px",width:"100%",borderRadius:"0.75rem"}})}t.s(["default",()=>r])},5618,t=>{t.n(t.i(80094))}]); \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/chunks/ffaecfd52c45f81a.js b/public/gratewizard-app/_next/static/chunks/ffaecfd52c45f81a.js deleted file mode 100644 index f861565..0000000 --- a/public/gratewizard-app/_next/static/chunks/ffaecfd52c45f81a.js +++ /dev/null @@ -1 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,72846,42824,e=>{"use strict";function t(e){return"object"==typeof e&&null!==e}function i(e){return t(e)&&"offsetHeight"in e}e.s(["isObject",()=>t],42824),e.s(["isHTMLElement",()=>i],72846)},85983,e=>{"use strict";function t(e){return null!==e&&"object"==typeof e&&"function"==typeof e.start}e.s(["isAnimationControls",()=>t])},32525,6840,e=>{"use strict";function t(e){return"string"==typeof e||Array.isArray(e)}e.s(["isVariantLabel",()=>t],32525);let i=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],s=["initial",...i];e.s(["variantPriorityOrder",()=>i,"variantProps",()=>s],6840)},87576,e=>{"use strict";var t=e.i(85983),i=e.i(32525),s=e.i(6840);function n(e){return(0,t.isAnimationControls)(e.animate)||s.variantProps.some(t=>(0,i.isVariantLabel)(e[t]))}function r(e){return!!(n(e)||e.variants)}e.s(["isControllingVariants",()=>n,"isVariantNode",()=>r])},83411,e=>{"use strict";let t=e=>!!(e&&e.getVelocity);e.s(["isMotionValue",()=>t])},57788,e=>{"use strict";let t=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],i=new Set(t);e.s(["transformPropOrder",()=>t,"transformProps",()=>i])},19928,e=>{"use strict";let t=e=>t=>"string"==typeof t&&t.startsWith(e),i=t("--"),s=t("var(--"),n=e=>!!s(e)&&r.test(e.split("/*")[0].trim()),r=/var\(--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)$/iu;function a(e){return"string"==typeof e&&e.split("/*")[0].includes("var(--")}e.s(["containsCSSVariable",()=>a,"isCSSVariableName",()=>i,"isCSSVariableToken",()=>n])},65091,e=>{"use strict";let t=e=>({test:t=>"string"==typeof t&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),i=t("deg"),s=t("%"),n=t("px"),r=t("vh"),a=t("vw"),o={...s,parse:e=>s.parse(e)/100,transform:e=>s.transform(100*e)};e.s(["degrees",()=>i,"percent",()=>s,"progressPercentage",()=>o,"px",()=>n,"vh",()=>r,"vw",()=>a])},91018,e=>{"use strict";var t=e.i(65091);function i(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}let s={correct:(e,s)=>{if(!s.target)return e;if("string"==typeof e)if(!t.px.test(e))return e;else e=parseFloat(e);let n=i(e,s.target.x),r=i(e,s.target.y);return`${n}% ${r}%`}};e.s(["correctBorderRadius",()=>s])},76959,e=>{"use strict";let t=(e,t,i)=>i>t?t:it])},63011,76307,60720,30677,98106,66820,e=>{"use strict";var t=e.i(76959);let i={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},s={...i,transform:e=>(0,t.clamp)(0,1,e)},n={...i,default:1};e.s(["alpha",()=>s,"number",()=>i,"scale",()=>n],76307);let r=e=>Math.round(1e5*e)/1e5;e.s(["sanitize",()=>r],60720);let a=/-?(?:\d+(?:\.\d+)?|\.\d+)/gu;e.s(["floatRegex",()=>a],30677);let o=/^(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))$/iu,l=(e,t)=>i=>!!("string"==typeof i&&o.test(i)&&i.startsWith(e)||t&&null!=i&&Object.prototype.hasOwnProperty.call(i,t)),u=(e,t,i)=>s=>{if("string"!=typeof s)return s;let[n,r,o,l]=s.match(a);return{[e]:parseFloat(n),[t]:parseFloat(r),[i]:parseFloat(o),alpha:void 0!==l?parseFloat(l):1}};e.s(["isColorString",()=>l,"splitColor",()=>u],98106);let h={...i,transform:e=>Math.round((0,t.clamp)(0,255,e))},c={test:l("rgb","red"),parse:u("red","green","blue"),transform:({red:e,green:t,blue:i,alpha:n=1})=>"rgba("+h.transform(e)+", "+h.transform(t)+", "+h.transform(i)+", "+r(s.transform(n))+")"};e.s(["rgba",()=>c],66820);let d={test:l("#"),parse:function(e){let t="",i="",s="",n="";return e.length>5?(t=e.substring(1,3),i=e.substring(3,5),s=e.substring(5,7),n=e.substring(7,9)):(t=e.substring(1,2),i=e.substring(2,3),s=e.substring(3,4),n=e.substring(4,5),t+=t,i+=i,s+=s,n+=n),{red:parseInt(t,16),green:parseInt(i,16),blue:parseInt(s,16),alpha:n?parseInt(n,16)/255:1}},transform:c.transform};e.s(["hex",()=>d],63011)},69577,95767,79444,e=>{"use strict";var t=e.i(63011),i=e.i(76307),s=e.i(65091),n=e.i(60720),r=e.i(98106);let a={test:(0,r.isColorString)("hsl","hue"),parse:(0,r.splitColor)("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:r,alpha:a=1})=>"hsla("+Math.round(e)+", "+s.percent.transform((0,n.sanitize)(t))+", "+s.percent.transform((0,n.sanitize)(r))+", "+(0,n.sanitize)(i.alpha.transform(a))+")"};e.s(["hsla",()=>a],95767);var o=e.i(66820);let l={test:e=>o.rgba.test(e)||t.hex.test(e)||a.test(e),parse:e=>o.rgba.test(e)?o.rgba.parse(e):a.test(e)?a.parse(e):t.hex.parse(e),transform:e=>"string"==typeof e?e:e.hasOwnProperty("red")?o.rgba.transform(e):a.transform(e),getAnimatableNone:e=>{let t=l.parse(e);return t.alpha=0,l.transform(t)}};e.s(["color",()=>l],79444);let u=/(?:#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\))/giu;var h=e.i(30677);let c="number",d="color",p=/var\s*\(\s*--(?:[\w-]+\s*|[\w-]+\s*,(?:\s*[^)(\s]|\s*\((?:[^)(]|\([^)(]*\))*\))+\s*)\)|#[\da-f]{3,8}|(?:rgb|hsl)a?\((?:-?[\d.]+%?[,\s]+){2}-?[\d.]+%?\s*(?:[,/]\s*)?(?:\b\d+(?:\.\d+)?|\.\d+)?%?\)|-?(?:\d+(?:\.\d+)?|\.\d+)/giu;function m(e){let t=e.toString(),i=[],s={color:[],number:[],var:[]},n=[],r=0,a=t.replace(p,e=>(l.test(e)?(s.color.push(r),n.push(d),i.push(l.parse(e))):e.startsWith("var(")?(s.var.push(r),n.push("var"),i.push(e)):(s.number.push(r),n.push(c),i.push(parseFloat(e))),++r,"${}")).split("${}");return{values:i,split:a,indexes:s,types:n}}function f(e){return m(e).values}function v(e){let{split:t,types:i}=m(e),s=t.length;return e=>{let r="";for(let a=0;a"number"==typeof e?0:l.test(e)?l.getAnimatableNone(e):e,y={test:function(e){return isNaN(e)&&"string"==typeof e&&(e.match(h.floatRegex)?.length||0)+(e.match(u)?.length||0)>0},parse:f,createTransformer:v,getAnimatableNone:function(e){let t=f(e);return v(e)(t.map(g))}};e.s(["analyseComplexValue",()=>m,"complex",()=>y],69577)},706,e=>{"use strict";let t=(e,t,i)=>e+(t-e)*i;e.s(["mixNumber",()=>t])},30789,24463,e=>{"use strict";var t=e.i(57788);e.i(19928);var i=e.i(91018),s=e.i(69577),n=e.i(706);let r={borderRadius:{...i.correctBorderRadius,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:i.correctBorderRadius,borderTopRightRadius:i.correctBorderRadius,borderBottomLeftRadius:i.correctBorderRadius,borderBottomRightRadius:i.correctBorderRadius,boxShadow:{correct:(e,{treeScale:t,projectionDelta:i})=>{let r=s.complex.parse(e);if(r.length>5)return e;let a=s.complex.createTransformer(e),o=+("number"!=typeof r[0]),l=i.x.scale*t.x,u=i.y.scale*t.y;r[0+o]/=l,r[1+o]/=u;let h=(0,n.mixNumber)(l,u,.5);return"number"==typeof r[2+o]&&(r[2+o]/=h),"number"==typeof r[3+o]&&(r[3+o]/=h),a(r)}}};function a(e,{layout:i,layoutId:s}){return t.transformProps.has(e)||e.startsWith("origin")||(i||void 0!==s)&&(!!r[e]||"opacity"===e)}e.s(["scaleCorrectors",()=>r],24463),e.s(["isForcedMotionValue",()=>a],30789)},46124,e=>{"use strict";let t=(e,t)=>t&&"number"==typeof e?t.transform(e):e;e.s(["getValueAsType",()=>t])},34929,e=>{"use strict";var t=e.i(76307);let i={...t.number,transform:Math.round};var s=e.i(65091);let n={rotate:s.degrees,rotateX:s.degrees,rotateY:s.degrees,rotateZ:s.degrees,scale:t.scale,scaleX:t.scale,scaleY:t.scale,scaleZ:t.scale,skew:s.degrees,skewX:s.degrees,skewY:s.degrees,distance:s.px,translateX:s.px,translateY:s.px,translateZ:s.px,x:s.px,y:s.px,z:s.px,perspective:s.px,transformPerspective:s.px,opacity:t.alpha,originX:s.progressPercentage,originY:s.progressPercentage,originZ:s.px},r={borderWidth:s.px,borderTopWidth:s.px,borderRightWidth:s.px,borderBottomWidth:s.px,borderLeftWidth:s.px,borderRadius:s.px,borderTopLeftRadius:s.px,borderTopRightRadius:s.px,borderBottomRightRadius:s.px,borderBottomLeftRadius:s.px,width:s.px,maxWidth:s.px,height:s.px,maxHeight:s.px,top:s.px,right:s.px,bottom:s.px,left:s.px,inset:s.px,insetBlock:s.px,insetBlockStart:s.px,insetBlockEnd:s.px,insetInline:s.px,insetInlineStart:s.px,insetInlineEnd:s.px,padding:s.px,paddingTop:s.px,paddingRight:s.px,paddingBottom:s.px,paddingLeft:s.px,paddingBlock:s.px,paddingBlockStart:s.px,paddingBlockEnd:s.px,paddingInline:s.px,paddingInlineStart:s.px,paddingInlineEnd:s.px,margin:s.px,marginTop:s.px,marginRight:s.px,marginBottom:s.px,marginLeft:s.px,marginBlock:s.px,marginBlockStart:s.px,marginBlockEnd:s.px,marginInline:s.px,marginInlineStart:s.px,marginInlineEnd:s.px,fontSize:s.px,backgroundPositionX:s.px,backgroundPositionY:s.px,...n,zIndex:i,fillOpacity:t.alpha,strokeOpacity:t.alpha,numOctaves:i};e.s(["numberValueTypes",()=>r],34929)},81261,44947,e=>{"use strict";var t=e.i(46124),i=e.i(34929),s=e.i(57788),n=e.i(19928);let r={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},a=s.transformPropOrder.length;function o(e,o,l){let{style:u,vars:h,transformOrigin:c}=e,d=!1,p=!1;for(let e in o){let r=o[e];if(s.transformProps.has(e)){d=!0;continue}if((0,n.isCSSVariableName)(e)){h[e]=r;continue}{let s=(0,t.getValueAsType)(r,i.numberValueTypes[e]);e.startsWith("origin")?(p=!0,c[e]=s):u[e]=s}}if(!o.transform&&(d||l?u.transform=function(e,n,o){let l="",u=!0;for(let h=0;ho],44947);let l={offset:"stroke-dashoffset",array:"stroke-dasharray"},u={offset:"strokeDashoffset",array:"strokeDasharray"},h=["offsetDistance","offsetPath","offsetRotate","offsetAnchor"];function c(e,{attrX:t,attrY:i,attrScale:s,pathLength:n,pathSpacing:r=1,pathOffset:a=0,...c},d,p,m){if(o(e,c,p),d){e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox);return}e.attrs=e.style,e.style={};let{attrs:f,style:v}=e;for(let e of(f.transform&&(v.transform=f.transform,delete f.transform),(v.transform||f.transformOrigin)&&(v.transformOrigin=f.transformOrigin??"50% 50%",delete f.transformOrigin),v.transform&&(v.transformBox=m?.transformBox??"fill-box",delete f.transformBox),h))void 0!==f[e]&&(v[e]=f[e],delete f[e]);void 0!==t&&(f.x=t),void 0!==i&&(f.y=i),void 0!==s&&(f.scale=s),void 0!==n&&function(e,t,i=1,s=0,n=!0){e.pathLength=1;let r=n?l:u;e[r.offset]=`${-s}`,e[r.array]=`${t} ${i}`}(f,n,r,a,!1)}e.s(["buildSVGAttrs",()=>c],81261)},99951,e=>{"use strict";let t=e=>"string"==typeof e&&"svg"===e.toLowerCase();e.s(["isSVGTag",()=>t])},44966,e=>{"use strict";let t=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function i(e){if("string"!=typeof e||e.includes("-"));else if(t.indexOf(e)>-1||/[A-Z]/u.test(e))return!0;return!1}e.s(["isSVGComponent",()=>i],44966)},84049,e=>{"use strict";var t=e.i(83411),i=e.i(30789);function s(e,s,n){let r=e.style,a=s?.style,o={};if(!r)return o;for(let s in r)((0,t.isMotionValue)(r[s])||a&&(0,t.isMotionValue)(a[s])||(0,i.isForcedMotionValue)(s,e)||n?.getValue(s)?.liveStyle!==void 0)&&(o[s]=r[s]);return o}e.s(["scrapeMotionValuesFromProps",()=>s])},86579,e=>{"use strict";function t(e){let t=[{},{}];return e?.values.forEach((e,i)=>{t[0][i]=e.get(),t[1][i]=e.getVelocity()}),t}function i(e,i,s,n){if("function"==typeof i){let[r,a]=t(n);i=i(void 0!==s?s:e.custom,r,a)}if("string"==typeof i&&(i=e.variants&&e.variants[i]),"function"==typeof i){let[r,a]=t(n);i=i(void 0!==s?s:e.custom,r,a)}return i}e.s(["resolveVariantFromProps",()=>i])},67926,e=>{"use strict";var t=e.i(83411),i=e.i(57788),s=e.i(84049);function n(e,n,r){let a=(0,s.scrapeMotionValuesFromProps)(e,n,r);for(let s in e)((0,t.isMotionValue)(e[s])||(0,t.isMotionValue)(n[s]))&&(a[-1!==i.transformPropOrder.indexOf(s)?"attr"+s.charAt(0).toUpperCase()+s.substring(1):s]=e[s]);return a}e.s(["scrapeMotionValuesFromProps",()=>n])},63074,e=>{"use strict";let t=e=>1e3*e,i=e=>e/1e3;e.s(["millisecondsToSeconds",()=>i,"secondsToMilliseconds",()=>t])},72590,e=>{"use strict";let t=e=>/^-?(?:\d+(?:\.\d+)?|\.\d+)$/u.test(e);e.s(["isNumericalString",()=>t])},47507,e=>{"use strict";let t=e=>/^0[^.\s]+$/u.test(e);e.s(["isZeroValueString",()=>t])},70596,33887,e=>{"use strict";function t(e,t){-1===e.indexOf(t)&&e.push(t)}function i(e,t){let i=e.indexOf(t);i>-1&&e.splice(i,1)}e.s(["addUniqueItem",()=>t,"removeItem",()=>i],33887);class s{constructor(){this.subscriptions=[]}add(e){return t(this.subscriptions,e),()=>i(this.subscriptions,e)}notify(e,t,i){let s=this.subscriptions.length;if(s)if(1===s)this.subscriptions[0](e,t,i);else for(let n=0;ns],70596)},11485,81296,44493,e=>{"use strict";function t(e){for(let t=1;tt],11485);let i=e=>180*e/Math.PI,s=e=>r(i(Math.atan2(e[1],e[0]))),n={x:4,y:5,translateX:4,translateY:5,scaleX:0,scaleY:3,scale:e=>(Math.abs(e[0])+Math.abs(e[3]))/2,rotate:s,rotateZ:s,skewX:e=>i(Math.atan(e[1])),skewY:e=>i(Math.atan(e[2])),skew:e=>(Math.abs(e[1])+Math.abs(e[2]))/2},r=e=>((e%=360)<0&&(e+=360),e),a=e=>Math.sqrt(e[0]*e[0]+e[1]*e[1]),o=e=>Math.sqrt(e[4]*e[4]+e[5]*e[5]),l={x:12,y:13,z:14,translateX:12,translateY:13,translateZ:14,scaleX:a,scaleY:o,scale:e=>(a(e)+o(e))/2,rotateX:e=>r(i(Math.atan2(e[6],e[5]))),rotateY:e=>r(i(Math.atan2(-e[2],e[0]))),rotateZ:s,rotate:s,skewX:e=>i(Math.atan(e[4])),skewY:e=>i(Math.atan(e[1])),skew:e=>(Math.abs(e[1])+Math.abs(e[4]))/2};function u(e){return+!!e.includes("scale")}function h(e,t){let i,s;if(!e||"none"===e)return u(t);let r=e.match(/^matrix3d\(([-\d.e\s,]+)\)$/u);if(r)i=l,s=r;else{let t=e.match(/^matrix\(([-\d.e\s,]+)\)$/u);i=n,s=t}if(!s)return u(t);let a=i[t],o=s[1].split(",").map(d);return"function"==typeof a?a(o):o[a]}let c=(e,t)=>{let{transform:i="none"}=getComputedStyle(e);return h(i,t)};function d(e){return parseFloat(e.trim())}e.s(["defaultTransformValue",()=>u,"parseValueFromTransform",()=>h,"readTransformValue",()=>c],81296);var p=e.i(57788),m=e.i(76307),f=e.i(65091);let v=e=>e===m.number||e===f.px,g=new Set(["x","y","z"]),y=p.transformPropOrder.filter(e=>!g.has(e));function b(e){let t=[];return y.forEach(i=>{let s=e.getValue(i);void 0!==s&&(t.push([i,s.get()]),s.set(+!!i.startsWith("scale")))}),t}let T={width:({x:e},{paddingLeft:t="0",paddingRight:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),height:({y:e},{paddingTop:t="0",paddingBottom:i="0"})=>e.max-e.min-parseFloat(t)-parseFloat(i),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:(e,{transform:t})=>h(t,"x"),y:(e,{transform:t})=>h(t,"y")};T.translateX=T.x,T.translateY=T.y,e.s(["isNumOrPxType",()=>v,"positionalValues",()=>T,"removeNonTranslationalTransform",()=>b],44493)},60830,e=>{"use strict";let t=e=>e;e.s(["noop",()=>t])},46791,e=>{"use strict";let t={};e.s(["MotionGlobalConfig",()=>t])},87022,80248,51571,e=>{"use strict";var t=e.i(60830),i=e.i(46791);let s=["setup","read","resolveKeyframes","preUpdate","update","preRender","render","postRender"],n={value:null,addProjectionMetrics:null};function r(e,t){let r=!1,a=!0,o={delta:0,timestamp:0,isProcessing:!1},l=()=>r=!0,u=s.reduce((e,i)=>(e[i]=function(e,t){let i=new Set,s=new Set,r=!1,a=!1,o=new WeakSet,l={delta:0,timestamp:0,isProcessing:!1},u=0;function h(t){o.has(t)&&(c.schedule(t),e()),u++,t(l)}let c={schedule:(e,t=!1,n=!1)=>{let a=n&&r?i:s;return t&&o.add(e),a.has(e)||a.add(e),e},cancel:e=>{s.delete(e),o.delete(e)},process:e=>{if(l=e,r){a=!0;return}r=!0,[i,s]=[s,i],i.forEach(h),t&&n.value&&n.value.frameloop[t].push(u),u=0,i.clear(),r=!1,a&&(a=!1,c.process(e))}};return c}(l,t?i:void 0),e),{}),{setup:h,read:c,resolveKeyframes:d,preUpdate:p,update:m,preRender:f,render:v,postRender:g}=u,y=()=>{let s=i.MotionGlobalConfig.useManualTiming?o.timestamp:performance.now();r=!1,i.MotionGlobalConfig.useManualTiming||(o.delta=a?1e3/60:Math.max(Math.min(s-o.timestamp,40),1)),o.timestamp=s,o.isProcessing=!0,h.process(o),c.process(o),d.process(o),p.process(o),m.process(o),f.process(o),v.process(o),g.process(o),o.isProcessing=!1,r&&t&&(a=!1,e(y))};return{schedule:s.reduce((t,i)=>{let s=u[i];return t[i]=(t,i=!1,n=!1)=>(!r&&(r=!0,a=!0,o.isProcessing||e(y)),s.schedule(t,i,n)),t},{}),cancel:e=>{for(let t=0;tn],80248),e.s(["createRenderBatcher",()=>r],51571);let{schedule:a,cancel:o,state:l,steps:u}=r("u">typeof requestAnimationFrame?requestAnimationFrame:t.noop,!0);e.s(["cancelFrame",()=>o,"frame",()=>a,"frameData",()=>l,"frameSteps",()=>u],87022)},21012,e=>{"use strict";var t=e.i(11485),i=e.i(44493),s=e.i(87022);let n=new Set,r=!1,a=!1,o=!1;function l(){if(a){let e=Array.from(n).filter(e=>e.needsMeasurement),t=new Set(e.map(e=>e.element)),s=new Map;t.forEach(e=>{let t=(0,i.removeNonTranslationalTransform)(e);t.length&&(s.set(e,t),e.render())}),e.forEach(e=>e.measureInitialState()),t.forEach(e=>{e.render();let t=s.get(e);t&&t.forEach(([t,i])=>{e.getValue(t)?.set(i)})}),e.forEach(e=>e.measureEndState()),e.forEach(e=>{void 0!==e.suspendedScrollY&&window.scrollTo(0,e.suspendedScrollY)})}a=!1,r=!1,n.forEach(e=>e.complete(o)),n.clear()}function u(){n.forEach(e=>{e.readKeyframes(),e.needsMeasurement&&(a=!0)})}function h(){o=!0,u(),l(),o=!1}class c{constructor(e,t,i,s,n,r=!1){this.state="pending",this.isAsync=!1,this.needsMeasurement=!1,this.unresolvedKeyframes=[...e],this.onComplete=t,this.name=i,this.motionValue=s,this.element=n,this.isAsync=r}scheduleResolve(){this.state="scheduled",this.isAsync?(n.add(this),r||(r=!0,s.frame.read(u),s.frame.resolveKeyframes(l))):(this.readKeyframes(),this.complete())}readKeyframes(){let{unresolvedKeyframes:e,name:i,element:s,motionValue:n}=this;if(null===e[0]){let t=n?.get(),r=e[e.length-1];if(void 0!==t)e[0]=t;else if(s&&i){let t=s.readValue(i,r);null!=t&&(e[0]=t)}void 0===e[0]&&(e[0]=r),n&&void 0===t&&n.set(e[0])}(0,t.fillWildcards)(e)}setFinalKeyframe(){}measureInitialState(){}renderEndStyles(){}measureEndState(){}complete(e=!1){this.state="complete",this.onComplete(this.unresolvedKeyframes,this.finalKeyframe,e),n.delete(this)}cancel(){"scheduled"===this.state&&(n.delete(this),this.state="pending")}resume(){"pending"===this.state&&this.scheduleResolve()}}e.s(["KeyframeResolver",()=>c,"flushKeyframeResolvers",()=>h])},65566,e=>{"use strict";var t=e.i(47167);let i=()=>{},s=()=>{};t.default,e.s(["invariant",()=>s,"warning",()=>i],65566)},94581,60900,86902,30551,e=>{"use strict";function t(e,t,i){t.startsWith("--")?e.style.setProperty(t,i):e.style[t]=i}function i(e){let t;return()=>(void 0===t&&(t=e()),t)}e.s(["setStyle",()=>t],94581),e.s(["memo",()=>i],60900);let s={};function n(e,t){let n=i(e);return()=>s[t]??n()}e.s(["memoSupports",()=>n],86902);let r=n(()=>void 0!==window.ScrollTimeline,"scrollTimeline");e.s(["supportsScrollTimeline",()=>r],30551)},14229,e=>{"use strict";let t=e=>null!==e;function i(e,{repeat:s,repeatType:n="loop"},r,a=1){let o=e.filter(t),l=a<0||s&&"loop"!==n&&s%2==1?0:o.length-1;return l&&void 0!==r?r:o[l]}e.s(["getFinalKeyframe",()=>i])},79294,e=>{"use strict";class t{constructor(){this.updateFinished()}get finished(){return this._finished}updateFinished(){this._finished=new Promise(e=>{this.resolve=e})}notifyFinished(){this.resolve()}then(e,t){return this.finished.then(e,t)}}e.s(["WithPromise",()=>t])},4169,e=>{"use strict";let t={layout:0,mainThread:0,waapi:0};e.s(["activeAnimations",()=>t])},60855,e=>{"use strict";let t=e=>Array.isArray(e)&&"number"==typeof e[0];e.s(["isBezierDefinition",()=>t])},53396,e=>{"use strict";let t=(0,e.i(86902).memoSupports)(()=>{try{document.createElement("div").animate({opacity:0},{easing:"linear(0, 1)"})}catch(e){return!1}return!0},"linearEasing");e.s(["supportsLinearEasing",()=>t])},56512,e=>{"use strict";let t=(e,t,i=10)=>{let s="",n=Math.max(Math.round(t/i),2);for(let t=0;tt])},68e3,97307,e=>{"use strict";var t=e.i(65566),i=e.i(63074),s=e.i(60830),n=e.i(94581),r=e.i(30551),a=e.i(14229),o=e.i(79294),l=e.i(4169),u=e.i(80248),h=e.i(60855),c=e.i(53396),d=e.i(56512);let p=([e,t,i,s])=>`cubic-bezier(${e}, ${t}, ${i}, ${s})`,m={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:p([0,.65,.55,1]),circOut:p([.55,0,1,.45]),backIn:p([.31,.01,.66,-.59]),backOut:p([.33,1.53,.69,.99])};function f(e){return"function"==typeof e&&"applyToOptions"in e}e.s(["isGenerator",()=>f],97307);class v extends o.WithPromise{constructor(e){if(super(),this.finishedTime=null,this.isStopped=!1,this.manualStartTime=null,!e)return;const{element:i,name:s,keyframes:r,pseudoElement:o,allowFlatten:v=!1,finalKeyframe:g,onComplete:y}=e;this.isPseudoElement=!!o,this.allowFlatten=v,this.options=e,(0,t.invariant)("string"!=typeof e.type,'Mini animate() doesn\'t support "type" as a string.',"mini-spring");const b=function({type:e,...t}){return f(e)&&(0,c.supportsLinearEasing)()?e.applyToOptions(t):(t.duration??(t.duration=300),t.ease??(t.ease="easeOut"),t)}(e);this.animation=function(e,t,i,{delay:s=0,duration:n=300,repeat:r=0,repeatType:a="loop",ease:o="easeOut",times:f}={},v){let g={[t]:i};f&&(g.offset=f);let y=function e(t,i){if(t)return"function"==typeof t?(0,c.supportsLinearEasing)()?(0,d.generateLinearEasing)(t,i):"ease-out":(0,h.isBezierDefinition)(t)?p(t):Array.isArray(t)?t.map(t=>e(t,i)||m.easeOut):m[t]}(o,n);Array.isArray(y)&&(g.easing=y),u.statsBuffer.value&&l.activeAnimations.waapi++;let b={delay:s,duration:n,easing:Array.isArray(y)?"linear":y,fill:"both",iterations:r+1,direction:"reverse"===a?"alternate":"normal"};v&&(b.pseudoElement=v);let T=e.animate(g,b);return u.statsBuffer.value&&T.finished.finally(()=>{l.activeAnimations.waapi--}),T}(i,s,r,b,o),!1===b.autoplay&&this.animation.pause(),this.animation.onfinish=()=>{if(this.finishedTime=this.time,!o){let e=(0,a.getFinalKeyframe)(r,this.options,g,this.speed);this.updateMotionValue?this.updateMotionValue(e):(0,n.setStyle)(i,s,e),this.animation.cancel()}y?.(),this.notifyFinished()}}play(){this.isStopped||(this.manualStartTime=null,this.animation.play(),"finished"===this.state&&this.updateFinished())}pause(){this.animation.pause()}complete(){this.animation.finish?.()}cancel(){try{this.animation.cancel()}catch(e){}}stop(){if(this.isStopped)return;this.isStopped=!0;let{state:e}=this;"idle"!==e&&"finished"!==e&&(this.updateMotionValue?this.updateMotionValue():this.commitStyles(),this.isPseudoElement||this.cancel())}commitStyles(){let e=this.options?.element;!this.isPseudoElement&&e?.isConnected&&this.animation.commitStyles?.()}get duration(){let e=this.animation.effect?.getComputedTiming?.().duration||0;return(0,i.millisecondsToSeconds)(Number(e))}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+(0,i.millisecondsToSeconds)(e)}get time(){return(0,i.millisecondsToSeconds)(Number(this.animation.currentTime)||0)}set time(e){this.manualStartTime=null,this.finishedTime=null,this.animation.currentTime=(0,i.secondsToMilliseconds)(e)}get speed(){return this.animation.playbackRate}set speed(e){e<0&&(this.finishedTime=null),this.animation.playbackRate=e}get state(){return null!==this.finishedTime?"finished":this.animation.playState}get startTime(){return this.manualStartTime??Number(this.animation.startTime)}set startTime(e){this.manualStartTime=this.animation.startTime=e}attachTimeline({timeline:e,observe:t}){return(this.allowFlatten&&this.animation.effect?.updateTiming({easing:"linear"}),this.animation.onfinish=null,e&&(0,r.supportsScrollTimeline)())?(this.animation.timeline=e,s.noop):t(this)}}e.s(["NativeAnimation",()=>v],68e3)},62118,60140,e=>{"use strict";let t=new Set(["opacity","clipPath","filter","transform"]);e.s(["acceleratedValues",()=>t],62118);let{schedule:i}=(0,e.i(51571).createRenderBatcher)(queueMicrotask,!1);e.s(["microtask",()=>i],60140)},96173,e=>{"use strict";let t;var i=e.i(46791),s=e.i(87022);function n(){t=void 0}let r={now:()=>(void 0===t&&r.set(s.frameData.isProcessing||i.MotionGlobalConfig.useManualTiming?s.frameData.timestamp:performance.now()),t),set:e=>{t=e,queueMicrotask(n)}};e.s(["time",()=>r])},30162,e=>{"use strict";let t=()=>({translate:0,scale:1,origin:0,originPoint:0}),i=()=>({x:t(),y:t()}),s=()=>({min:0,max:0}),n=()=>({x:s(),y:s()});e.s(["createBox",()=>n,"createDelta",()=>i])},25791,e=>{"use strict";function t(e,t){return t?1e3/t*e:0}e.s(["velocityPerSecond",()=>t])},86427,e=>{"use strict";let t;var i=e.i(70596),s=e.i(25791),n=e.i(96173),r=e.i(87022);class a{constructor(e,t={}){this.canTrackVelocity=null,this.events={},this.updateAndNotify=e=>{let t=n.time.now();if(this.updatedAt!==t&&this.setPrevFrameValue(),this.prev=this.current,this.setCurrent(e),this.current!==this.prev&&(this.events.change?.notify(this.current),this.dependents))for(let e of this.dependents)e.dirty()},this.hasAnimated=!1,this.setCurrent(e),this.owner=t.owner}setCurrent(e){this.current=e,this.updatedAt=n.time.now(),null===this.canTrackVelocity&&void 0!==e&&(this.canTrackVelocity=!isNaN(parseFloat(this.current)))}setPrevFrameValue(e=this.current){this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new i.SubscriptionManager);let s=this.events[e].add(t);return"change"===e?()=>{s(),r.frame.read(()=>{this.events.change.getSize()||this.stop()})}:s}clearListeners(){for(let e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e){this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e)}setWithVelocity(e,t,i){this.set(t),this.prev=void 0,this.prevFrameValue=e,this.prevUpdatedAt=this.updatedAt-i}jump(e,t=!0){this.updateAndNotify(e),this.prev=e,this.prevUpdatedAt=this.prevFrameValue=void 0,t&&this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}dirty(){this.events.change?.notify(this.current)}addDependent(e){this.dependents||(this.dependents=new Set),this.dependents.add(e)}removeDependent(e){this.dependents&&this.dependents.delete(e)}get(){return t&&t.push(this),this.current}getPrevious(){return this.prev}getVelocity(){let e=n.time.now();if(!this.canTrackVelocity||void 0===this.prevFrameValue||e-this.updatedAt>30)return 0;let t=Math.min(this.updatedAt-this.prevUpdatedAt,30);return(0,s.velocityPerSecond)(parseFloat(this.current)-parseFloat(this.prevFrameValue),t)}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.dependents?.clear(),this.events.destroy?.notify(),this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function o(e,t){return new a(e,t)}e.s(["motionValue",()=>o])},8792,19991,e=>{"use strict";var t=e.i(69577),i=e.i(30677);let s=new Set(["brightness","contrast","saturate","opacity"]);function n(e){let[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;let[r]=n.match(i.floatRegex)||[];if(!r)return e;let a=n.replace(r,""),o=+!!s.has(t);return r!==n&&(o*=100),t+"("+o+a+")"}let r=/\b([a-z-]*)\(.*?\)/gu,a={...t.complex,getAnimatableNone:e=>{let t=e.match(r);return t?t.map(n).join(" "):e}};e.s(["filter",()=>a],8792);let o={...t.complex,getAnimatableNone:e=>{let i=t.complex.parse(e);return t.complex.createTransformer(e)(i.map(e=>"number"==typeof e?0:"object"==typeof e?{...e,alpha:1}:e))}};e.s(["mask",()=>o],19991)},3973,e=>{"use strict";var t=e.i(79444),i=e.i(8792),s=e.i(19991);let n={...e.i(34929).numberValueTypes,color:t.color,backgroundColor:t.color,outlineColor:t.color,fill:t.color,stroke:t.color,borderColor:t.color,borderTopColor:t.color,borderRightColor:t.color,borderBottomColor:t.color,borderLeftColor:t.color,filter:i.filter,WebkitFilter:i.filter,mask:s.mask,WebkitMask:s.mask},r=e=>n[e];e.s(["getDefaultValueType",()=>r])},75554,e=>{"use strict";var t=e.i(69577),i=e.i(8792),s=e.i(19991),n=e.i(3973);let r=new Set([i.filter,s.mask]);function a(e,i){let s=(0,n.getDefaultValueType)(e);return r.has(s)||(s=t.complex),s.getAnimatableNone?s.getAnimatableNone(i):void 0}e.s(["getAnimatableNone",()=>a])},77942,84061,e=>{"use strict";var t=e.i(76307),i=e.i(65091);let s=e=>t=>t.test(e);e.s(["testValueType",()=>s],84061);let n=[t.number,i.px,i.percent,i.degrees,i.vw,i.vh,{test:e=>"auto"===e,parse:e=>e}],r=e=>n.find(s(e));e.s(["dimensionValueTypes",()=>n,"findDimensionValueType",()=>r],77942)},66538,72094,e=>{"use strict";var t=e.i(79444),i=e.i(69577),s=e.i(77942),n=e.i(84061);let r=[...s.dimensionValueTypes,t.color,i.complex],a=e=>r.find((0,n.testValueType)(e));e.s(["findValueType",()=>a],66538);let o=new WeakMap;e.s(["visualElementStore",()=>o],72094)},17218,e=>{"use strict";e.i(47167);var t=e.i(63074),i=e.i(72590),s=e.i(47507),n=e.i(70596),r=e.i(21012),a=e.i(68e3),o=e.i(62118),l=e.i(60140),u=e.i(96173),h=e.i(30162),c=e.i(86427),d=e.i(69577),p=e.i(75554),m=e.i(66538),f=e.i(83411),v=e.i(72094),g=e.i(87576),y=e.i(57788);let b={current:null},T={current:!1},x="u">typeof window;var V=e.i(86579),S=e.i(87022);let w=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],A={};function M(e){A=e}function C(){return A}class k{scrapeMotionValuesFromProps(e,t,i){return{}}constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:s,skipAnimations:n,blockInitialAnimation:a,visualState:o},l={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.shouldSkipAnimations=!1,this.values=new Map,this.KeyframeResolver=r.KeyframeResolver,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.hasBeenMounted=!1,this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.renderScheduledAt=0,this.scheduleRender=()=>{let e=u.time.now();this.renderScheduledAtthis.bindToMotionValue(t,e)),"never"===this.reducedMotionConfig?this.shouldReduceMotion=!1:"always"===this.reducedMotionConfig?this.shouldReduceMotion=!0:(T.current||function(){if(T.current=!0,x)if(window.matchMedia){let e=window.matchMedia("(prefers-reduced-motion)"),t=()=>b.current=e.matches;e.addEventListener("change",t),t()}else b.current=!1}(),this.shouldReduceMotion=b.current),this.shouldSkipAnimations=this.skipAnimationsConfig??!1,this.parent?.addChild(this),this.update(this.props,this.presenceContext),this.hasBeenMounted=!0}unmount(){for(let e in this.projection&&this.projection.unmount(),(0,S.cancelFrame)(this.notifyUpdate),(0,S.cancelFrame)(this.render),this.valueSubscriptions.forEach(e=>e()),this.valueSubscriptions.clear(),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent?.removeChild(this),this.events)this.events[e].clear();for(let e in this.features){let t=this.features[e];t&&(t.unmount(),t.isMounted=!1)}this.current=null}addChild(e){this.children.add(e),this.enteringChildren??(this.enteringChildren=new Set),this.enteringChildren.add(e)}removeChild(e){this.children.delete(e),this.enteringChildren&&this.enteringChildren.delete(e)}bindToMotionValue(e,i){let s;if(this.valueSubscriptions.has(e)&&this.valueSubscriptions.get(e)(),i.accelerate&&o.acceleratedValues.has(e)&&this.current instanceof HTMLElement){let{factory:s,keyframes:n,times:r,ease:o,duration:l}=i.accelerate,u=new a.NativeAnimation({element:this.current,name:e,keyframes:n,times:r,ease:o,duration:(0,t.secondsToMilliseconds)(l)}),h=s(u);this.valueSubscriptions.set(e,()=>{h(),u.cancel()});return}let n=y.transformProps.has(e);n&&this.onBindTransform&&this.onBindTransform();let r=i.on("change",t=>{this.latestValues[e]=t,this.props.onUpdate&&S.frame.preRender(this.notifyUpdate),n&&this.projection&&(this.projection.isTransformDirty=!0),this.scheduleRender()});"u">typeof window&&window.MotionCheckAppearSync&&(s=window.MotionCheckAppearSync(this,e,i)),this.valueSubscriptions.set(e,()=>{r(),s&&s(),i.owner&&i.stop()})}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}updateFeatures(){let e="animation";for(e in A){let t=A[e];if(!t)continue;let{isEnabled:i,Feature:s}=t;if(!this.features[e]&&s&&i(this.props)&&(this.features[e]=new s(this)),this.features[e]){let t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}}triggerBuild(){this.build(this.renderState,this.latestValues,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):(0,h.createBox)()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;tt.variantChildren.delete(e)}addValue(e,t){let i=this.values.get(e);t!==i&&(i&&this.removeValue(e),this.bindToMotionValue(e,t),this.values.set(e,t),this.latestValues[e]=t.get())}removeValue(e){this.values.delete(e);let t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return void 0===i&&void 0!==t&&(i=(0,c.motionValue)(null===t?void 0:t,{owner:this}),this.addValue(e,i)),i}readValue(e,t){let n=void 0===this.latestValues[e]&&this.current?this.getBaseTargetFromProps(this.props,e)??this.readValueFromInstance(this.current,e,this.options):this.latestValues[e];return null!=n&&("string"==typeof n&&((0,i.isNumericalString)(n)||(0,s.isZeroValueString)(n))?n=parseFloat(n):!(0,m.findValueType)(n)&&d.complex.test(t)&&(n=(0,p.getAnimatableNone)(e,t)),this.setBaseTarget(e,(0,f.isMotionValue)(n)?n.get():n)),(0,f.isMotionValue)(n)?n.get():n}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){let t,{initial:i}=this.props;if("string"==typeof i||"object"==typeof i){let s=(0,V.resolveVariantFromProps)(this.props,i,this.presenceContext?.custom);s&&(t=s[e])}if(i&&void 0!==t)return t;let s=this.getBaseTargetFromProps(this.props,e);return void 0===s||(0,f.isMotionValue)(s)?void 0!==this.initialValues[e]&&void 0===t?void 0:this.baseTarget[e]:s}on(e,t){return this.events[e]||(this.events[e]=new n.SubscriptionManager),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}scheduleRenderMicrotask(){l.microtask.render(this.render)}}e.s(["VisualElement",()=>k,"getFeatureDefinitions",()=>C,"setFeatureDefinitions",()=>M],17218)},35043,93787,e=>{"use strict";function t(e){return e.replace(/([A-Z])/g,e=>`-${e.toLowerCase()}`)}e.s(["camelToDash",()=>t],93787);let i="data-"+t("framerAppearId");e.s(["optimizedAppearDataAttribute",()=>i],35043)},53034,e=>{"use strict";function t(e,t){if(e?.inherit&&t){let{inherit:i,...s}=e;return{...t,...s}}return e}e.s(["resolveTransition",()=>t])},42098,e=>{"use strict";class t{constructor(e){this.isMounted=!1,this.node=e}update(){}}e.s(["Feature",()=>t])},53689,27677,77777,35636,e=>{"use strict";function t({top:e,left:t,right:i,bottom:s}){return{x:{min:t,max:i},y:{min:e,max:s}}}function i({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}function s(e,t){if(!t)return e;let i=t({x:e.left,y:e.top}),s=t({x:e.right,y:e.bottom});return{top:i.y,left:i.x,bottom:s.y,right:s.x}}e.s(["convertBoundingBoxToBox",()=>t,"convertBoxToBoundingBox",()=>i,"transformBoxPoints",()=>s],27677);var n=e.i(706);function r(e){return void 0===e||1===e}function a({scale:e,scaleX:t,scaleY:i}){return!r(e)||!r(t)||!r(i)}function o(e){return a(e)||l(e)||e.z||e.rotate||e.rotateX||e.rotateY||e.skewX||e.skewY}function l(e){var t,i;return(t=e.x)&&"0%"!==t||(i=e.y)&&"0%"!==i}function u(e,t,i){return i+t*(e-i)}function h(e,t,i,s,n){return void 0!==n&&(e=s+n*(e-s)),s+i*(e-s)+t}function c(e,t=0,i=1,s,n){e.min=h(e.min,t,i,s,n),e.max=h(e.max,t,i,s,n)}function d(e,{x:t,y:i}){c(e.x,t.translate,t.scale,t.originPoint),c(e.y,i.translate,i.scale,i.originPoint)}function p(e,t,i,s=!1){let n,r,a=i.length;if(a){t.x=t.y=1;for(let l=0;l.999999999999&&(t.x=1),t.y<1.0000000000001&&t.y>.999999999999&&(t.y=1)}}function m(e,t){e.min=e.min+t,e.max=e.max+t}function f(e,t,i,s,r=.5){let a=(0,n.mixNumber)(e.min,e.max,r);c(e,t,i,a,s)}function v(e,t){f(e.x,t.x,t.scaleX,t.scale,t.originX),f(e.y,t.y,t.scaleY,t.scale,t.originY)}function g(e,i){return t(s(e.getBoundingClientRect(),i))}function y(e,t,i){let s=g(e,i),{scroll:n}=t;return n&&(m(s.x,n.offset.x),m(s.y,n.offset.y)),s}e.s(["has2DTranslate",()=>l,"hasScale",()=>a,"hasTransform",()=>o],77777),e.s(["applyBoxDelta",()=>d,"applyTreeDeltas",()=>p,"scalePoint",()=>u,"transformBox",()=>v,"translateAxis",()=>m],35636),e.s(["measurePageBox",()=>y,"measureViewportBox",()=>g],53689)},80538,e=>{"use strict";var t=e.i(46791),i=e.i(83411);function s(e,s){let n=e.getValue("willChange");if((0,i.isMotionValue)(n)&&n.add)return n.add(s);if(!n&&t.MotionGlobalConfig.WillChange){let i=new t.MotionGlobalConfig.WillChange("auto");e.addValue("willChange",i),i.add(s)}}e.s(["addValueToWillChange",()=>s],80538)},38638,e=>{"use strict";let t=(e,t)=>i=>t(e(i)),i=(...e)=>e.reduce(t);e.s(["pipe",()=>i])},48393,8618,e=>{"use strict";function t(e,t,i){return(i<0&&(i+=1),i>1&&(i-=1),i<1/6)?e+(t-e)*6*i:i<.5?t:i<2/3?e+(t-e)*(2/3-i)*6:e}function i({hue:e,saturation:i,lightness:s,alpha:n}){e/=360,s/=100;let r=0,a=0,o=0;if(i/=100){let n=s<.5?s*(1+i):s+i-s*i,l=2*s-n;r=t(l,n,e+1/3),a=t(l,n,e),o=t(l,n,e-1/3)}else r=a=o=s;return{red:Math.round(255*r),green:Math.round(255*a),blue:Math.round(255*o),alpha:n}}function s(e,t){return i=>i>0?t:e}e.s(["hslaToRgba",()=>i],48393),e.s(["mixImmediate",()=>s],8618)},3163,69308,e=>{"use strict";var t=e.i(38638),i=e.i(65566),s=e.i(19928),n=e.i(79444),r=e.i(69577),a=e.i(63011),o=e.i(95767),l=e.i(48393),u=e.i(66820),h=e.i(8618),c=e.i(706);let d=(e,t,i)=>{let s=e*e,n=i*(t*t-s)+s;return n<0?0:Math.sqrt(n)},p=[a.hex,u.rgba,o.hsla];function m(e){let t=p.find(t=>t.test(e));if((0,i.warning)(!!t,`'${e}' is not an animatable color. Use the equivalent color code instead.`,"color-not-animatable"),!t)return!1;let s=t.parse(e);return t===o.hsla&&(s=(0,l.hslaToRgba)(s)),s}let f=(e,t)=>{let i=m(e),s=m(t);if(!i||!s)return(0,h.mixImmediate)(e,t);let n={...i};return e=>(n.red=d(i.red,s.red,e),n.green=d(i.green,s.green,e),n.blue=d(i.blue,s.blue,e),n.alpha=(0,c.mixNumber)(i.alpha,s.alpha,e),u.rgba.transform(n))},v=new Set(["none","hidden"]);function g(e,t){return i=>(0,c.mixNumber)(e,t,i)}function y(e){return"number"==typeof e?g:"string"==typeof e?(0,s.isCSSVariableToken)(e)?h.mixImmediate:n.color.test(e)?f:x:Array.isArray(e)?b:"object"==typeof e?n.color.test(e)?f:T:h.mixImmediate}function b(e,t){let i=[...e],s=i.length,n=e.map((e,i)=>y(e)(e,t[i]));return e=>{for(let t=0;t{for(let t in s)i[t]=s[t](e);return i}}let x=(e,s)=>{let n=r.complex.createTransformer(s),a=(0,r.analyseComplexValue)(e),o=(0,r.analyseComplexValue)(s);if(!(a.indexes.var.length===o.indexes.var.length&&a.indexes.color.length===o.indexes.color.length&&a.indexes.number.length>=o.indexes.number.length))return(0,i.warning)(!0,`Complex values '${e}' and '${s}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`,"complex-values-different"),(0,h.mixImmediate)(e,s);if(v.has(e)&&!o.values.length||v.has(s)&&!a.values.length)return v.has(e)?t=>t<=0?e:s:t=>t>=1?s:e;return(0,t.pipe)(b(function(e,t){let i=[],s={color:0,var:0,number:0};for(let n=0;nV],3163);var S=e.i(96173),w=e.i(87022);let A=e=>{let t=({timestamp:t})=>e(t);return{start:(e=!0)=>w.frame.update(t,e),stop:()=>(0,w.cancelFrame)(t),now:()=>w.frameData.isProcessing?w.frameData.timestamp:S.time.now()}};e.s(["frameloopDriver",()=>A],69308)},29462,66857,73431,40254,37025,93544,41980,78047,91559,e=>{"use strict";var t=e.i(63074),i=e.i(76959),s=e.i(56512);function n(e){let t=0,i=e.next(t);for(;!i.done&&t<2e4;)t+=50,i=e.next(t);return t>=2e4?1/0:t}e.s(["calcGeneratorDuration",()=>n,"maxGeneratorDuration",()=>2e4],66857);var r=e.i(25791);function a(e,t,i){let s=Math.max(t-5,0);return(0,r.velocityPerSecond)(i-e(s),t-s)}let o=.01,l=2,u=.005,h=.5;var c=e.i(65566);function d(e,t){return e*Math.sqrt(1-t*t)}let p=["duration","bounce"],m=["stiffness","damping","mass"];function f(e,t){return t.some(t=>void 0!==e[t])}function v(e=.3,r=.3){let g,y="object"!=typeof e?{visualDuration:e,keyframes:[0,1],bounce:r}:e,{restSpeed:b,restDelta:T}=y,x=y.keyframes[0],V=y.keyframes[y.keyframes.length-1],S={done:!1,value:x},{stiffness:w,damping:A,mass:M,duration:C,velocity:k,isResolvedFromDuration:P}=function(e){let s={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!f(e,m)&&f(e,p))if(e.visualDuration){let t=2*Math.PI/(1.2*e.visualDuration),n=t*t,r=2*(0,i.clamp)(.05,1,1-(e.bounce||0))*Math.sqrt(n);s={...s,mass:1,stiffness:n,damping:r}}else{let n=function({duration:e=800,bounce:s=.3,velocity:n=0,mass:r=1}){let a,o;(0,c.warning)(e<=(0,t.secondsToMilliseconds)(10),"Spring duration must be 10 seconds or less","spring-duration-limit");let l=1-s;l=(0,i.clamp)(.05,1,l),e=(0,i.clamp)(.01,10,(0,t.millisecondsToSeconds)(e)),l<1?(a=t=>{let i=t*l,s=i*e;return .001-(i-n)/d(t,l)*Math.exp(-s)},o=t=>{let i=t*l*e,s=Math.pow(l,2)*Math.pow(t,2)*e,r=Math.exp(-i),o=d(Math.pow(t,2),l);return(i*n+n-s)*r*(-a(t)+.001>0?-1:1)/o}):(a=t=>-.001+Math.exp(-t*e)*((t-n)*e+1),o=t=>e*e*(n-t)*Math.exp(-t*e));let u=function(e,t,i){let s=i;for(let i=1;i<12;i++)s-=e(s)/t(s);return s}(a,o,5/e);if(e=(0,t.secondsToMilliseconds)(e),isNaN(u))return{stiffness:100,damping:10,duration:e};{let t=Math.pow(u,2)*r;return{stiffness:t,damping:2*l*Math.sqrt(r*t),duration:e}}}(e);(s={...s,...n,mass:1}).isResolvedFromDuration=!0}return s}({...y,velocity:-(0,t.millisecondsToSeconds)(y.velocity||0)}),E=k||0,F=A/(2*Math.sqrt(w*M)),O=V-x,I=(0,t.millisecondsToSeconds)(Math.sqrt(w/M)),R=5>Math.abs(O);if(b||(b=R?o:l),T||(T=R?u:h),F<1){let e=d(I,F);g=t=>V-Math.exp(-F*I*t)*((E+F*I*O)/e*Math.sin(e*t)+O*Math.cos(e*t))}else if(1===F)g=e=>V-Math.exp(-I*e)*(O+(E+I*O)*e);else{let e=I*Math.sqrt(F*F-1);g=t=>{let i=Math.exp(-F*I*t),s=Math.min(e*t,300);return V-i*((E+F*I*O)*Math.sinh(s)+e*O*Math.cosh(s))/e}}let B={calculatedDuration:P&&C||null,next:e=>{let i=g(e);if(P)S.done=e>=C;else{let s=0===e?E:0;F<1&&(s=0===e?(0,t.secondsToMilliseconds)(E):a(g,e,i));let n=Math.abs(V-i)<=T;S.done=Math.abs(s)<=b&&n}return S.value=S.done?V:i,S},toString:()=>{let e=Math.min(n(B),2e4),t=(0,s.generateLinearEasing)(t=>B.next(e*t).value,e,30);return e+"ms "+t},toTransition:()=>{}};return B}function g({keyframes:e,velocity:t=0,power:i=.8,timeConstant:s=325,bounceDamping:n=10,bounceStiffness:r=500,modifyTarget:o,min:l,max:u,restDelta:h=.5,restSpeed:c}){let d,p,m=e[0],f={done:!1,value:m},g=i*t,y=m+g,b=void 0===o?y:o(y);b!==y&&(g=b-m);let T=e=>-g*Math.exp(-e/s),x=e=>b+T(e),V=e=>{let t=T(e),i=x(e);f.done=Math.abs(t)<=h,f.value=f.done?b:i},S=e=>{let t;if(t=f.value,void 0!==l&&tu){var i;d=e,p=v({keyframes:[f.value,(i=f.value,void 0===l?u:void 0===u||Math.abs(l-i){let t=!1;return(p||void 0!==d||(t=!0,V(e),S(e)),void 0!==d&&e>=d)?p.next(e-d):(t||V(e),f)}}}v.applyToOptions=e=>{let i=function(e,i=100,s){let r=s({...e,keyframes:[0,i]}),a=Math.min(n(r),2e4);return{type:"keyframes",ease:e=>r.next(a*e).value/i,duration:(0,t.millisecondsToSeconds)(a)}}(e,100,v);return e.ease=i.ease,e.duration=(0,t.secondsToMilliseconds)(i.duration),e.type="keyframes",e},e.s(["spring",()=>v],73431),e.s(["inertia",()=>g],29462);var y=e.i(60830);let b=(e,t,i)=>(((1-3*i+3*t)*e+(3*i-6*t))*e+3*t)*e;function T(e,t,i,s){return e===t&&i===s?y.noop:n=>0===n||1===n?n:b(function(e,t,i,s,n){let r,a,o=0;do(r=b(a=t+(i-t)/2,s,n)-e)>0?i=a:t=a;while(Math.abs(r)>1e-7&&++o<12)return a}(n,0,1,e,i),t,s)}e.s(["cubicBezier",()=>T],40254);let x=T(.42,0,1,1),V=T(0,0,.58,1),S=T(.42,0,.58,1);e.s(["easeIn",()=>x,"easeInOut",()=>S,"easeOut",()=>V],37025);let w=e=>Array.isArray(e)&&"number"!=typeof e[0];e.s(["isEasingArray",()=>w],93544);let A=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,M=e=>t=>1-e(1-t),C=T(.33,1.53,.69,.99),k=M(C),P=A(k);e.s(["backIn",()=>k,"backInOut",()=>P,"backOut",()=>C],41980);let E=e=>(e*=2)<1?.5*k(e):.5*(2-Math.pow(2,-10*(e-1)));e.s(["anticipate",()=>E],78047);let F=e=>1-Math.sin(Math.acos(e)),O=M(F),I=A(F);e.s(["circIn",()=>F,"circInOut",()=>I,"circOut",()=>O],91559)},68514,83920,e=>{"use strict";var t=e.i(37025),i=e.i(93544),s=e.i(65566),n=e.i(60830),r=e.i(78047),a=e.i(41980),o=e.i(91559),l=e.i(40254),u=e.i(60855);let h={linear:n.noop,easeIn:t.easeIn,easeInOut:t.easeInOut,easeOut:t.easeOut,circIn:o.circIn,circInOut:o.circInOut,circOut:o.circOut,backIn:a.backIn,backInOut:a.backInOut,backOut:a.backOut,anticipate:r.anticipate},c=e=>{if((0,u.isBezierDefinition)(e)){(0,s.invariant)(4===e.length,"Cubic bezier arrays must contain four numerical values.","cubic-bezier-length");let[t,i,n,r]=e;return(0,l.cubicBezier)(t,i,n,r)}return"string"==typeof e?((0,s.invariant)(void 0!==h[e],`Invalid easing type '${e}'`,"invalid-easing-type"),h[e]):e};var d=e.i(76959),p=e.i(46791),m=e.i(38638);let f=(e,t,i)=>{let s=t-e;return 0===s?1:(i-e)/s};e.s(["progress",()=>f],83920);var v=e.i(3163),g=e.i(706);function y({duration:e=300,keyframes:r,times:a,ease:o="easeInOut"}){var l;let u,h=(0,i.isEasingArray)(o)?o.map(c):c(o),y={done:!1,value:r[0]},b=function(e,t,{clamp:i=!0,ease:r,mixer:a}={}){let o=e.length;if((0,s.invariant)(o===t.length,"Both input and output ranges must be the same length","range-length"),1===o)return()=>t[0];if(2===o&&t[0]===t[1])return()=>t[1];let l=e[0]===e[1];e[0]>e[o-1]&&(e=[...e].reverse(),t=[...t].reverse());let u=function(e,t,i){let s=[],r=i||p.MotionGlobalConfig.mix||v.mix,a=e.length-1;for(let i=0;i{if(l&&i1)for(;sc((0,d.clamp)(e[0],e[o-1],t)):c}((l=a&&a.length===r.length?a:(!function(e,t){let i=e[e.length-1];for(let s=1;s<=t;s++){let n=f(0,t,s);e.push((0,g.mixNumber)(i,1,n))}}(u=[0],r.length-1),u),l.map(t=>t*e)),r,{ease:Array.isArray(h)?h:r.map(()=>h||t.easeInOut).splice(0,r.length-1)});return{calculatedDuration:e,next:t=>(y.value=b(t),y.done=t>=e,y)}}e.s(["keyframes",()=>y],68514)},44573,e=>{"use strict";var t=e.i(29462),i=e.i(68514),s=e.i(73431);let n={decay:t.inertia,inertia:t.inertia,tween:i.keyframes,keyframes:i.keyframes,spring:s.spring};function r(e){"string"==typeof e.type&&(e.type=n[e.type])}e.s(["replaceTransitionType",()=>r])},83352,e=>{"use strict";var t=e.i(38638),i=e.i(76959),s=e.i(63074),n=e.i(96173),r=e.i(4169),a=e.i(3163),o=e.i(69308),l=e.i(29462),u=e.i(68514),h=e.i(66857),c=e.i(14229),d=e.i(44573),p=e.i(79294);let m=e=>e/100;class f extends p.WithPromise{constructor(e){super(),this.state="idle",this.startTime=null,this.isStopped=!1,this.currentTime=0,this.holdTime=null,this.playbackSpeed=1,this.stop=()=>{let{motionValue:e}=this.options;e&&e.updatedAt!==n.time.now()&&this.tick(n.time.now()),this.isStopped=!0,"idle"!==this.state&&(this.teardown(),this.options.onStop?.())},r.activeAnimations.mainThread++,this.options=e,this.initAnimation(),this.play(),!1===e.autoplay&&this.pause()}initAnimation(){let{options:e}=this;(0,d.replaceTransitionType)(e);let{type:i=u.keyframes,repeat:s=0,repeatDelay:n=0,repeatType:r,velocity:o=0}=e,{keyframes:l}=e,c=i||u.keyframes;c!==u.keyframes&&"number"!=typeof l[0]&&(this.mixKeyframes=(0,t.pipe)(m,(0,a.mix)(l[0],l[1])),l=[0,100]);let p=c({...e,keyframes:l});"mirror"===r&&(this.mirroredGenerator=c({...e,keyframes:[...l].reverse(),velocity:-o})),null===p.calculatedDuration&&(p.calculatedDuration=(0,h.calcGeneratorDuration)(p));let{calculatedDuration:f}=p;this.calculatedDuration=f,this.resolvedDuration=f+n,this.totalDuration=this.resolvedDuration*(s+1)-n,this.generator=p}updateTime(e){let t=Math.round(e-this.startTime)*this.playbackSpeed;null!==this.holdTime?this.currentTime=this.holdTime:this.currentTime=t}tick(e,t=!1){let{generator:s,totalDuration:n,mixKeyframes:r,mirroredGenerator:a,resolvedDuration:o,calculatedDuration:u}=this;if(null===this.startTime)return s.next(0);let{delay:h=0,keyframes:d,repeat:p,repeatType:m,repeatDelay:f,type:v,onUpdate:g,finalKeyframe:y}=this.options;this.speed>0?this.startTime=Math.min(this.startTime,e):this.speed<0&&(this.startTime=Math.min(e-n/this.speed,this.startTime)),t?this.currentTime=e:this.updateTime(e);let b=this.currentTime-h*(this.playbackSpeed>=0?1:-1),T=this.playbackSpeed>=0?b<0:b>n;this.currentTime=Math.max(b,0),"finished"===this.state&&null===this.holdTime&&(this.currentTime=n);let x=this.currentTime,V=s;if(p){let e=Math.min(this.currentTime,n)/o,t=Math.floor(e),s=e%1;!s&&e>=1&&(s=1),1===s&&t--,(t=Math.min(t,p+1))%2&&("reverse"===m?(s=1-s,f&&(s-=f/o)):"mirror"===m&&(V=a)),x=(0,i.clamp)(0,1,s)*o}let S=T?{done:!1,value:d[0]}:V.next(x);r&&(S.value=r(S.value));let{done:w}=S;T||null===u||(w=this.playbackSpeed>=0?this.currentTime>=n:this.currentTime<=0);let A=null===this.holdTime&&("finished"===this.state||"running"===this.state&&w);return A&&v!==l.inertia&&(S.value=(0,c.getFinalKeyframe)(d,this.options,y,this.speed)),g&&g(S.value),A&&this.finish(),S}then(e,t){return this.finished.then(e,t)}get duration(){return(0,s.millisecondsToSeconds)(this.calculatedDuration)}get iterationDuration(){let{delay:e=0}=this.options||{};return this.duration+(0,s.millisecondsToSeconds)(e)}get time(){return(0,s.millisecondsToSeconds)(this.currentTime)}set time(e){e=(0,s.secondsToMilliseconds)(e),this.currentTime=e,null===this.startTime||null!==this.holdTime||0===this.playbackSpeed?this.holdTime=e:this.driver&&(this.startTime=this.driver.now()-e/this.playbackSpeed),this.driver?.start(!1)}get speed(){return this.playbackSpeed}set speed(e){this.updateTime(n.time.now());let t=this.playbackSpeed!==e;this.playbackSpeed=e,t&&(this.time=(0,s.millisecondsToSeconds)(this.currentTime))}play(){if(this.isStopped)return;let{driver:e=o.frameloopDriver,startTime:t}=this.options;this.driver||(this.driver=e(e=>this.tick(e))),this.options.onPlay?.();let i=this.driver.now();"finished"===this.state?(this.updateFinished(),this.startTime=i):null!==this.holdTime?this.startTime=i-this.holdTime:this.startTime||(this.startTime=t??i),"finished"===this.state&&this.speed<0&&(this.startTime+=this.calculatedDuration),this.holdTime=null,this.state="running",this.driver.start()}pause(){this.state="paused",this.updateTime(n.time.now()),this.holdTime=this.currentTime}complete(){"running"!==this.state&&this.play(),this.state="finished",this.holdTime=null}finish(){this.notifyFinished(),this.teardown(),this.state="finished",this.options.onComplete?.()}cancel(){this.holdTime=null,this.startTime=0,this.tick(0),this.teardown(),this.options.onCancel?.()}teardown(){this.state="idle",this.stopDriver(),this.startTime=this.holdTime=null,r.activeAnimations.mainThread--}stopDriver(){this.driver&&(this.driver.stop(),this.driver=void 0)}sample(e){return this.startTime=0,this.tick(e,!0)}attachTimeline(e){return this.options.allowFlatten&&(this.options.type="keyframes",this.options.ease="linear",this.initAnimation()),this.driver?.stop(),e.observe(this)}}e.s(["JSAnimation",()=>f])},42062,43116,e=>{"use strict";var t=e.i(46791),i=e.i(60830),s=e.i(96173),n=e.i(83352),r=e.i(14229),a=e.i(21012),o=e.i(76959),l=e.i(68e3),u=e.i(44573),h=e.i(78047),c=e.i(41980),d=e.i(91559);let p={anticipate:h.anticipate,backInOut:c.backInOut,circInOut:d.circInOut};class m extends l.NativeAnimation{constructor(e){!function(e){"string"==typeof e.ease&&e.ease in p&&(e.ease=p[e.ease])}(e),(0,u.replaceTransitionType)(e),super(e),void 0!==e.startTime&&(this.startTime=e.startTime),this.options=e}updateMotionValue(e){let{motionValue:t,onUpdate:i,onComplete:r,element:a,...l}=this.options;if(!t)return;if(void 0!==e)return void t.set(e);let u=new n.JSAnimation({...l,autoplay:!1}),h=Math.max(10,s.time.now()-this.startTime),c=(0,o.clamp)(0,10,h-10);t.setWithVelocity(u.sample(Math.max(0,h-c)).value,u.sample(h).value,c),u.stop()}}var f=e.i(65566),v=e.i(97307),g=e.i(69577);let y=(e,t)=>"zIndex"!==t&&!!("number"==typeof e||Array.isArray(e)||"string"==typeof e&&(g.complex.test(e)||"0"===e)&&!e.startsWith("url("));function b(e){e.duration=0,e.type="keyframes"}e.s(["makeAnimationInstant",()=>b],43116);var T=e.i(79294),x=e.i(60900);let V=new Set(["opacity","clipPath","filter","transform"]),S=(0,x.memo)(()=>Object.hasOwnProperty.call(Element.prototype,"animate"));class w extends T.WithPromise{constructor({autoplay:e=!0,delay:t=0,type:i="keyframes",repeat:n=0,repeatDelay:r=0,repeatType:o="loop",keyframes:l,name:u,motionValue:h,element:c,...d}){super(),this.stop=()=>{this._animation&&(this._animation.stop(),this.stopTimeline?.()),this.keyframeResolver?.cancel()},this.createdAt=s.time.now();const p={autoplay:e,delay:t,type:i,repeat:n,repeatDelay:r,repeatType:o,name:u,motionValue:h,element:c,...d},m=c?.KeyframeResolver||a.KeyframeResolver;this.keyframeResolver=new m(l,(e,t,i)=>this.onKeyframesResolved(e,t,p,!i),u,h,c),this.keyframeResolver?.scheduleResolve()}onKeyframesResolved(e,a,o,l){this.keyframeResolver=void 0;let{name:u,type:h,velocity:c,delay:d,isHandoff:p,onUpdate:g}=o;this.resolvedAt=s.time.now(),!function(e,t,i,s){let n=e[0];if(null===n)return!1;if("display"===t||"visibility"===t)return!0;let r=e[e.length-1],a=y(n,t),o=y(r,t);return(0,f.warning)(a===o,`You are trying to animate ${t} from "${n}" to "${r}". "${a?r:n}" is not an animatable value.`,"value-not-animatable"),!!a&&!!o&&(function(e){let t=e[0];if(1===e.length)return!0;for(let i=0;i40?this.resolvedAt:this.createdAt:void 0,finalKeyframe:a,...o,keyframes:e},x=!p&&function(e){let{motionValue:t,name:i,repeatDelay:s,repeatType:n,damping:r,type:a}=e;if(!(t?.owner?.current instanceof HTMLElement))return!1;let{onUpdate:o,transformTemplate:l}=t.owner.getProps();return S()&&i&&V.has(i)&&("transform"!==i||!l)&&!o&&!s&&"mirror"!==n&&0!==r&&"inertia"!==a}(T),w=T.motionValue?.owner?.current,A=x?new m({...T,element:w}):new n.JSAnimation(T);A.finished.then(()=>{this.notifyFinished()}).catch(i.noop),this.pendingTimeline&&(this.stopTimeline=A.attachTimeline(this.pendingTimeline),this.pendingTimeline=void 0),this._animation=A}get finished(){return this._animation?this.animation.finished:this._finished}then(e,t){return this.finished.finally(e).then(()=>{})}get animation(){return this._animation||(this.keyframeResolver?.resume(),(0,a.flushKeyframeResolvers)()),this._animation}get duration(){return this.animation.duration}get iterationDuration(){return this.animation.iterationDuration}get time(){return this.animation.time}set time(e){this.animation.time=e}get speed(){return this.animation.speed}get state(){return this.animation.state}set speed(e){this.animation.speed=e}get startTime(){return this.animation.startTime}attachTimeline(e){return this._animation?this.stopTimeline=this.animation.attachTimeline(e):this.pendingTimeline=e,()=>this.stop()}play(){this.animation.play()}pause(){this.animation.pause()}complete(){this.animation.complete()}cancel(){this._animation&&this.animation.cancel(),this.keyframeResolver?.cancel()}}e.s(["AsyncMotionValueAnimation",()=>w],42062)},87333,e=>{"use strict";var t=e.i(53034);function i(e,i){let s=e?.[i]??e?.default??e;return s!==e?(0,t.resolveTransition)(s,e):s}e.s(["getValueTransition",()=>i])},39011,e=>{"use strict";var t=e.i(63074),i=e.i(46791),s=e.i(42062),n=e.i(83352),r=e.i(87333),a=e.i(43116),o=e.i(57788);let l={type:"spring",stiffness:500,damping:25,restSpeed:10},u={type:"keyframes",duration:.8},h={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},c=e=>null!==e;var d=e.i(87022);let p=(e,p,m,f={},v,g)=>y=>{let b=(0,r.getValueTransition)(f,e)||{},T=b.delay||f.delay||0,{elapsed:x=0}=f;x-=(0,t.secondsToMilliseconds)(T);let V={keyframes:Array.isArray(m)?m:[null,m],ease:"easeOut",velocity:p.getVelocity(),...b,delay:-x,onUpdate:e=>{p.set(e),b.onUpdate&&b.onUpdate(e)},onComplete:()=>{y(),b.onComplete&&b.onComplete()},name:e,motionValue:p,element:g?void 0:v};!function({when:e,delay:t,delayChildren:i,staggerChildren:s,staggerDirection:n,repeat:r,repeatType:a,repeatDelay:o,from:l,elapsed:u,...h}){return!!Object.keys(h).length}(b)&&Object.assign(V,((e,{keyframes:t})=>t.length>2?u:o.transformProps.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:l:h)(e,V)),V.duration&&(V.duration=(0,t.secondsToMilliseconds)(V.duration)),V.repeatDelay&&(V.repeatDelay=(0,t.secondsToMilliseconds)(V.repeatDelay)),void 0!==V.from&&(V.keyframes[0]=V.from);let S=!1;if(!1!==V.type&&(0!==V.duration||V.repeatDelay)||((0,a.makeAnimationInstant)(V),0===V.delay&&(S=!0)),(i.MotionGlobalConfig.instantAnimations||i.MotionGlobalConfig.skipAnimations||v?.shouldSkipAnimations)&&(S=!0,(0,a.makeAnimationInstant)(V),V.delay=0),V.allowFlatten=!b.type&&!b.ease,S&&!g&&void 0!==p.get()){let e=function(e,{repeat:t,repeatType:i="loop"},s){let n=e.filter(c),r=t&&"loop"!==i&&t%2==1?0:n.length-1;return n[r]}(V.keyframes,b);if(void 0!==e)return void d.frame.update(()=>{V.onUpdate(e),V.onComplete()})}return b.isSync?new n.JSAnimation(V):new s.AsyncMotionValueAnimation(V)};e.s(["animateMotionValue",()=>p],39011)},19880,e=>{"use strict";let t=new Set(["BUTTON","INPUT","SELECT","TEXTAREA","A"]);function i(e){return t.has(e.tagName)||!0===e.isContentEditable}let s=new Set(["INPUT","SELECT","TEXTAREA"]);function n(e){return s.has(e.tagName)||!0===e.isContentEditable}e.s(["isElementKeyboardAccessible",()=>i,"isElementTextInput",()=>n])},82774,e=>{"use strict";function t(e,i,s,n={passive:!0}){return e.addEventListener(i,s,n),()=>e.removeEventListener(i,s)}e.s(["addDomEvent",()=>t])},39676,49652,e=>{"use strict";let t={x:!1,y:!1};function i(){return t.x||t.y}function s(e,t,i){if(null==e)return[];if(e instanceof EventTarget)return[e];if("string"==typeof e){let s=document;t&&(s=t.current);let n=i?.[e]??s.querySelectorAll(e);return n?Array.from(n):[]}return Array.from(e).filter(e=>null!=e)}e.s(["isDragActive",()=>i,"isDragging",()=>t],39676),e.s(["resolveElements",()=>s],49652)},65536,41327,e=>{"use strict";let t=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function i(e){return{point:{x:e.pageX,y:e.pageY}}}e.s(["isPrimaryPointer",()=>t],41327);let s=e=>s=>t(s)&&e(s,i(s));e.s(["addPointerInfo",()=>s,"extractEventInfo",()=>i],65536)},16896,e=>{"use strict";var t=e.i(35043);function i(e){return e.props[t.optimizedAppearDataAttribute]}e.s(["getOptimisedAppearId",()=>i])},18812,e=>{"use strict";var t=e.i(86579);function i(e,i,s){let n=e.getProps();return(0,t.resolveVariantFromProps)(n,i,void 0!==s?s:n.custom,e)}e.s(["resolveVariant",()=>i])},64440,e=>{"use strict";let t=new Set(["width","height","top","left","right","bottom",...e.i(57788).transformPropOrder]);e.s(["positionalKeys",()=>t])},47834,73615,e=>{"use strict";var t=e.i(86427),i=e.i(18812);let s=e=>Array.isArray(e);function n(e,n){let{transitionEnd:r={},transition:a={},...o}=(0,i.resolveVariant)(e,n)||{};for(let i in o={...o,...r}){var l;let n=s(l=o[i])?l[l.length-1]||0:l;e.hasValue(i)?e.getValue(i).set(n):e.addValue(i,(0,t.motionValue)(n))}}e.s(["isKeyframesTarget",()=>s],73615),e.s(["setTarget",()=>n],47834)},76859,35384,e=>{"use strict";var t=e.i(18812),i=e.i(87333),s=e.i(53034),n=e.i(64440),r=e.i(47834),a=e.i(80538),o=e.i(16896),l=e.i(39011),u=e.i(87022);function h(e,t,{delay:c=0,transitionOverride:d,type:p}={}){let{transition:m,transitionEnd:f,...v}=t,g=e.getDefaultTransition();m=m?(0,s.resolveTransition)(m,g):g;let y=m?.reduceMotion;d&&(m=d);let b=[],T=p&&e.animationState&&e.animationState.getState()[p];for(let t in v){let s=e.getValue(t,e.latestValues[t]??null),r=v[t];if(void 0===r||T&&function({protectedKeys:e,needsAnimating:t},i){let s=e.hasOwnProperty(i)&&!0!==t[i];return t[i]=!1,s}(T,t))continue;let h={delay:c,...(0,i.getValueTransition)(m||{},t)},d=s.get();if(void 0!==d&&!s.isAnimating&&!Array.isArray(r)&&r===d&&!h.velocity)continue;let p=!1;if(window.MotionHandoffAnimation){let i=(0,o.getOptimisedAppearId)(e);if(i){let e=window.MotionHandoffAnimation(i,t,u.frame);null!==e&&(h.startTime=e,p=!0)}}(0,a.addValueToWillChange)(e,t);let f=y??e.shouldReduceMotion;s.start((0,l.animateMotionValue)(t,s,r,f&&n.positionalKeys.has(t)?{type:!1}:h,e,p));let g=s.animation;g&&b.push(g)}if(f){let t=()=>u.frame.update(()=>{f&&(0,r.setTarget)(e,f)});b.length?Promise.all(b).then(t):t()}return b}function c(e,t,i,s=0,n=1){let r=Array.from(e).sort((e,t)=>e.sortNodePosition(t)).indexOf(t),a=e.size,o=(a-1)*s;return"function"==typeof i?i(r,a):1===n?r*s:o-r*s}function d(e,i,s={}){let n=(0,t.resolveVariant)(e,i,"exit"===s.type?e.presenceContext?.custom:void 0),{transition:r=e.getDefaultTransition()||{}}=n||{};s.transitionOverride&&(r=s.transitionOverride);let a=n?()=>Promise.all(h(e,n,s)):()=>Promise.resolve(),o=e.variantChildren&&e.variantChildren.size?(t=0)=>{let{delayChildren:n=0,staggerChildren:a,staggerDirection:o}=r;return function(e,t,i=0,s=0,n=0,r=1,a){let o=[];for(let l of e.variantChildren)l.notify("AnimationStart",t),o.push(d(l,t,{...a,delay:i+("function"==typeof s?0:s)+c(e.variantChildren,l,s,n,r)}).then(()=>l.notify("AnimationComplete",t)));return Promise.all(o)}(e,i,t,n,a,o,s)}:()=>Promise.resolve(),{when:l}=r;if(!l)return Promise.all([a(),o(s.delay)]);{let[e,t]="beforeChildren"===l?[a,o]:[o,a];return e().then(()=>t())}}function p(e,i,s={}){let n;if(e.notify("AnimationStart",i),Array.isArray(i))n=Promise.all(i.map(t=>d(e,t,s)));else if("string"==typeof i)n=d(e,i,s);else{let r="function"==typeof i?(0,t.resolveVariant)(e,i,s.custom):i;n=Promise.all(h(e,r,s))}return n.then(()=>{e.notify("AnimationComplete",i)})}e.s(["calcChildStagger",()=>c],35384),e.s(["animateVisualElement",()=>p],76859)},94562,e=>{"use strict";var t=e.i(32525),i=e.i(6840);let s=i.variantProps.length;e.s(["getVariantContext",()=>function e(n){if(!n)return;if(!n.isControllingVariants){let t=n.parent&&e(n.parent)||{};return void 0!==n.props.initial&&(t.initial=n.props.initial),t}let r={};for(let e=0;e{"use strict";var t=e.i(42098),i=e.i(76859),s=e.i(35384),n=e.i(94562),r=e.i(85983),a=e.i(73615),o=e.i(32525),l=e.i(18812);function u(e,t){if(!Array.isArray(t))return!1;let i=t.length;if(i!==e.length)return!1;for(let s=0;sPromise.all(t.map(({animation:t,options:s})=>(0,i.animateVisualElement)(e,t,s))),h=m(),p=!0,f=t=>(i,s)=>{let n=(0,l.resolveVariant)(e,s,"exit"===t?e.presenceContext?.custom:void 0);if(n){let{transition:e,transitionEnd:t,...s}=n;i={...i,...s,...t}}return i};function v(i){let{props:m}=e,v=(0,n.getVariantContext)(e.parent)||{},g=[],y=new Set,b={},T=1/0;for(let t=0;tT&&w,P=!1,E=Array.isArray(S)?S:[S],F=E.reduce(f(n),{});!1===A&&(F={});let{prevResolvedValues:O={}}=d,I={...O,...F},R=t=>{k=!0,y.has(t)&&(P=!0,y.delete(t)),d.needsAnimating[t]=!0;let i=e.getValue(t);i&&(i.liveStyle=!1)};for(let e in I){let t=F[e],i=O[e];if(!b.hasOwnProperty(e))((0,a.isKeyframesTarget)(t)&&(0,a.isKeyframesTarget)(i)?u(t,i):t===i)?void 0!==t&&y.has(e)?R(e):d.protectedKeys[e]=!0:null!=t?R(e):y.add(e)}d.prevProp=S,d.prevResolvedValues=F,d.isActive&&(b={...b,...F}),p&&e.blockInitialAnimation&&(k=!1);let B=M&&C,D=!B||P;k&&D&&g.push(...E.map(t=>{let i={type:n};if("string"==typeof t&&p&&!B&&e.manuallyAnimateOnMount&&e.parent){let{parent:n}=e,r=(0,l.resolveVariant)(n,t);if(n.enteringChildren&&r){let{delayChildren:t}=r.transition||{};i.delay=(0,s.calcChildStagger)(n.enteringChildren,e,t)}}return{animation:t,options:i}}))}if(y.size){let t={};if("boolean"!=typeof m.initial){let i=(0,l.resolveVariant)(e,Array.isArray(m.initial)?m.initial[0]:m.initial);i&&i.transition&&(t.transition=i.transition)}y.forEach(i=>{let s=e.getBaseTarget(i),n=e.getValue(i);n&&(n.liveStyle=!0),t[i]=s??null}),g.push({animation:t})}let S=!!g.length;return p&&(!1===m.initial||m.initial===m.animate)&&!e.manuallyAnimateOnMount&&(S=!1),p=!1,S?t(g):Promise.resolve()}return{animateChanges:v,setActive:function(t,i){if(h[t].isActive===i)return Promise.resolve();e.variantChildren?.forEach(e=>e.animationState?.setActive(t,i)),h[t].isActive=i;let s=v(t);for(let e in h)h[e].protectedKeys={};return s},setAnimateFunction:function(i){t=i(e)},getState:()=>h,reset:()=>{h=m()}}}(e))}updateAnimationControlsSubscription(){let{animate:e}=this.node.getProps();(0,r.isAnimationControls)(e)&&(this.unmountControls=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){let{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){this.node.animationState.reset(),this.unmountControls?.()}}var v=t;let g=0;class y extends v.Feature{constructor(){super(...arguments),this.id=g++}update(){if(!this.node.presenceContext)return;let{isPresent:e,onExitComplete:t}=this.node.presenceContext,{isPresent:i}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===i)return;let s=this.node.animationState.setActive("exit",!e);t&&!e&&s.then(()=>{t(this.id)})}mount(){let{register:e,onExitComplete:t}=this.node.presenceContext||{};t&&t(this.id),e&&(this.unmount=e(this.id))}unmount(){}}let b={animation:{Feature:f},exit:{Feature:y}};e.s(["animations",()=>b],23070)},8648,73089,e=>{"use strict";var t=e.i(39676),i=e.i(49652);function s(e,t){let s=(0,i.resolveElements)(e),n=new AbortController;return[s,{passive:!0,...t,signal:n.signal},()=>n.abort()]}function n(e,i,r={}){let[a,o,l]=s(e,r);return a.forEach(e=>{let s,n=!1,r=!1,a=t=>{s&&(s(t),s=void 0),e.removeEventListener("pointerleave",u)},l=e=>{n=!1,window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",l),r&&(r=!1,a(e))},u=e=>{if("touch"!==e.pointerType){if(n){r=!0;return}a(e)}};e.addEventListener("pointerenter",n=>{if("touch"===n.pointerType||(0,t.isDragActive)())return;r=!1;let a=i(e,n);"function"==typeof a&&(s=a,e.addEventListener("pointerleave",u,o))},o),e.addEventListener("pointerdown",()=>{n=!0,window.addEventListener("pointerup",l,o),window.addEventListener("pointercancel",l,o)},o)}),l}e.s(["setupGesture",()=>s],73089),e.s(["hover",()=>n],8648)},57512,e=>{"use strict";var t=e.i(42098),i=e.i(8648),s=e.i(87022),n=e.i(65536);function r(e,t,i){let{props:r}=e;e.animationState&&r.whileHover&&e.animationState.setActive("whileHover","Start"===i);let a=r["onHover"+i];a&&s.frame.postRender(()=>a(t,(0,n.extractEventInfo)(t)))}class a extends t.Feature{mount(){let{current:e}=this.node;e&&(this.unmount=(0,i.hover)(e,(e,t)=>(r(this.node,t,"Start"),e=>r(this.node,e,"End"))))}unmount(){}}e.s(["HoverGesture",()=>a])},99642,e=>{"use strict";var t=e.i(42098),i=e.i(82774),s=e.i(38638);class n extends t.Feature{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=(0,s.pipe)((0,i.addDomEvent)(this.node.current,"focus",()=>this.onFocus()),(0,i.addDomEvent)(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}e.s(["FocusGesture",()=>n])},60863,e=>{"use strict";let t=(e,i)=>!!i&&(e===i||t(e,i.parentElement));e.s(["isNodeOrChild",()=>t])},8149,e=>{"use strict";var t=e.i(57512),i=e.i(99642),s=e.i(42098),n=e.i(72846),r=e.i(39676),a=e.i(60863),o=e.i(41327),l=e.i(73089),u=e.i(19880);let h=new WeakSet;function c(e){return t=>{"Enter"===t.key&&e(t)}}function d(e,t){e.dispatchEvent(new PointerEvent("pointer"+t,{isPrimary:!0,bubbles:!0}))}function p(e){return(0,o.isPrimaryPointer)(e)&&!(0,r.isDragActive)()}let m=new WeakSet;var f=e.i(87022),v=e.i(65536);function g(e,t,i){let{props:s}=e;if(e.current instanceof HTMLButtonElement&&e.current.disabled)return;e.animationState&&s.whileTap&&e.animationState.setActive("whileTap","Start"===i);let n=s["onTap"+("End"===i?"":i)];n&&f.frame.postRender(()=>n(t,(0,v.extractEventInfo)(t)))}class y extends s.Feature{mount(){let{current:e}=this.node;if(!e)return;let{globalTapTarget:t,propagate:i}=this.node.props;this.unmount=function(e,t,i={}){let[s,r,o]=(0,l.setupGesture)(e,i),f=e=>{let s=e.currentTarget;if(!p(e)||m.has(e))return;h.add(s),i.stopPropagation&&m.add(e);let n=t(s,e),o=(e,t)=>{window.removeEventListener("pointerup",l),window.removeEventListener("pointercancel",u),h.has(s)&&h.delete(s),p(e)&&"function"==typeof n&&n(e,{success:t})},l=e=>{o(e,s===window||s===document||i.useGlobalTarget||(0,a.isNodeOrChild)(s,e.target))},u=e=>{o(e,!1)};window.addEventListener("pointerup",l,r),window.addEventListener("pointercancel",u,r)};return s.forEach(e=>{(i.useGlobalTarget?window:e).addEventListener("pointerdown",f,r),(0,n.isHTMLElement)(e)&&(e.addEventListener("focus",e=>((e,t)=>{let i=e.currentTarget;if(!i)return;let s=c(()=>{if(h.has(i))return;d(i,"down");let e=c(()=>{d(i,"up")});i.addEventListener("keyup",e,t),i.addEventListener("blur",()=>d(i,"cancel"),t)});i.addEventListener("keydown",s,t),i.addEventListener("blur",()=>i.removeEventListener("keydown",s),t)})(e,r)),(0,u.isElementKeyboardAccessible)(e)||e.hasAttribute("tabindex")||(e.tabIndex=0))}),o}(e,(e,t)=>(g(this.node,t,"Start"),(e,{success:t})=>g(this.node,e,t?"End":"Cancel")),{useGlobalTarget:t,stopPropagation:i?.tap===!1})}unmount(){}}var b=s;let T=new WeakMap,x=new WeakMap,V=e=>{let t=T.get(e.target);t&&t(e)},S=e=>{e.forEach(V)},w={some:0,all:1};class A extends b.Feature{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){var e;let t;this.unmount();let{viewport:i={}}=this.node.getProps(),{root:s,margin:n,amount:r="some",once:a}=i,o={root:s?s.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:w[r]},l=e=>{let{isIntersecting:t}=e;if(this.isInView===t||(this.isInView=t,a&&!t&&this.hasEnteredView))return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);let{onViewportEnter:i,onViewportLeave:s}=this.node.getProps(),n=t?i:s;n&&n(e)};return e=this.node.current,t=function({root:e,...t}){let i=e||document;x.has(i)||x.set(i,{});let s=x.get(i),n=JSON.stringify(t);return s[n]||(s[n]=new IntersectionObserver(S,{root:e,...t})),s[n]}(o),T.set(e,l),t.observe(e),()=>{T.delete(e),t.unobserve(e)}}mount(){this.startObserver()}update(){if("u"e[i]!==t[i]}(e,t))&&this.startObserver()}unmount(){}}let M={inView:{Feature:A},tap:{Feature:y},focus:{Feature:i.FocusGesture},hover:{Feature:t.HoverGesture}};e.s(["gestureAnimations",()=>M],8149)},84015,e=>{"use strict";var t=e.i(65566),i=e.i(72590),s=e.i(19928);let n=/^var\(--(?:([\w-]+)|([\w-]+), ?([a-zA-Z\d ()%#.,-]+))\)/u;e.s(["getVariableValue",()=>function e(r,a,o=1){(0,t.invariant)(o<=4,`Max CSS variable fallback depth detected in property "${r}". This may indicate a circular fallback dependency.`,"max-css-var-depth");let[l,u]=function(e){let t=n.exec(e);if(!t)return[,];let[,i,s,r]=t;return[`--${i??s}`,r]}(r);if(!l)return;let h=window.getComputedStyle(a).getPropertyValue(l);if(h){let e=h.trim();return(0,i.isNumericalString)(e)?parseFloat(e):e}return(0,s.isCSSVariableToken)(u)?e(u,a,o+1):u}])},86871,e=>{"use strict";var t=e.i(47507);function i(e){return"number"==typeof e?0===e:null===e||"none"===e||"0"===e||(0,t.isZeroValueString)(e)}e.s(["isNone",()=>i])},46436,e=>{"use strict";var t=e.i(64440),i=e.i(77942),s=e.i(84015),n=e.i(19928),r=e.i(21012),a=e.i(86871),o=e.i(69577),l=e.i(75554);let u=new Set(["auto","none","0"]);var h=e.i(44493);class c extends r.KeyframeResolver{constructor(e,t,i,s,n){super(e,t,i,s,n,!0)}readKeyframes(){let{unresolvedKeyframes:e,element:r,name:a}=this;if(!r||!r.current)return;super.readKeyframes();for(let t=0;t{e.getValue(t).set(i)}),this.resolveNoneKeyframes()}}e.s(["DOMKeyframesResolver",()=>c],46436)},94978,e=>{"use strict";var t=e.i(83411),i=e.i(46436),s=e.i(17218);class n extends s.VisualElement{constructor(){super(...arguments),this.KeyframeResolver=i.DOMKeyframesResolver}sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){let i=e.style;return i?i[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);let{children:e}=this.props;(0,t.isMotionValue)(e)&&(this.childSubscription=e.on("change",e=>{this.current&&(this.current.textContent=`${e}`)}))}}e.s(["DOMVisualElement",()=>n])},38698,e=>{"use strict";let t=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);e.s(["camelCaseAttributes",()=>t])},88826,49095,e=>{"use strict";var t=e.i(93787);function i(e,{style:t,vars:i},s,n){let r,a=e.style;for(r in t)a[r]=t[r];for(r in n?.applyProjectionStyles(a,s),i)a.setProperty(r,i[r])}e.s(["renderHTML",()=>i],49095);var s=e.i(38698);function n(e,n,r,a){for(let r in i(e,n,void 0,a),n.attrs)e.setAttribute(s.camelCaseAttributes.has(r)?r:(0,t.camelToDash)(r),n.attrs[r])}e.s(["renderSVG",()=>n],88826)},75737,e=>{"use strict";var t=e.i(57788),i=e.i(3973),s=e.i(30162),n=e.i(94978),r=e.i(93787),a=e.i(81261),o=e.i(38698),l=e.i(99951),u=e.i(88826),h=e.i(67926);class c extends n.DOMVisualElement{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1,this.measureInstanceViewportBox=s.createBox}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,s){if(t.transformProps.has(s)){let e=(0,i.getDefaultValueType)(s);return e&&e.default||0}return s=o.camelCaseAttributes.has(s)?s:(0,r.camelToDash)(s),e.getAttribute(s)}scrapeMotionValuesFromProps(e,t,i){return(0,h.scrapeMotionValuesFromProps)(e,t,i)}build(e,t,i){(0,a.buildSVGAttrs)(e,t,this.isSVGTag,i.transformTemplate,i.style)}renderInstance(e,t,i,s){(0,u.renderSVG)(e,t,i,s)}mount(e){this.isSVGTag=(0,l.isSVGTag)(e.tagName),super.mount(e)}}e.s(["SVGVisualElement",()=>c])},86783,e=>{"use strict";var t=e.i(19928),i=e.i(57788),s=e.i(81296),n=e.i(53689),r=e.i(94978),a=e.i(44947),o=e.i(49095),l=e.i(84049);class u extends r.DOMVisualElement{constructor(){super(...arguments),this.type="html",this.renderInstance=o.renderHTML}readValueFromInstance(e,n){if(i.transformProps.has(n))return this.projection?.isProjecting?(0,s.defaultTransformValue)(n):(0,s.readTransformValue)(e,n);{let i=window.getComputedStyle(e),s=((0,t.isCSSVariableName)(n)?i.getPropertyValue(n):i[n])||0;return"string"==typeof s?s.trim():s}}measureInstanceViewportBox(e,{transformPagePoint:t}){return(0,n.measureViewportBox)(e,t)}build(e,t,i){(0,a.buildHTMLStyles)(e,t,i.transformTemplate)}scrapeMotionValuesFromProps(e,t,i){return(0,l.scrapeMotionValuesFromProps)(e,t,i)}}e.s(["HTMLVisualElement",()=>u])},62607,e=>{"use strict";var t=e.i(23070),i=e.i(8149),s=e.i(75737),n=e.i(86783),r=e.i(71645),a=e.i(44966);let o={renderer:(e,t)=>t.isSVG??(0,a.isSVGComponent)(e)?new s.SVGVisualElement(t):new n.HTMLVisualElement(t,{allowProjection:e!==r.Fragment}),...t.animations,...i.gestureAnimations};e.s(["domAnimation",()=>o],62607)}]); \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/chunks/turbopack-82a5ed0dfe22bb7c.js b/public/gratewizard-app/_next/static/chunks/turbopack-82a5ed0dfe22bb7c.js deleted file mode 100644 index 939e614..0000000 --- a/public/gratewizard-app/_next/static/chunks/turbopack-82a5ed0dfe22bb7c.js +++ /dev/null @@ -1,4 +0,0 @@ -(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,{otherChunks:["static/chunks/bec549170201933d.js","static/chunks/11fe75a1468250d6.js","static/chunks/00fa1a548821ad29.js"],runtimeModuleIds:[94553]}]),(()=>{let e;if(!Array.isArray(globalThis.TURBOPACK))return;let t="/gratewizard-app/_next/",r=(self.TURBOPACK_CHUNK_SUFFIX??document?.currentScript?.getAttribute?.("src")?.replace(/^(.*(?=\?)|^.*$)/,""))||"",n=new WeakMap;function o(e,t){this.m=e,this.e=t}let l=o.prototype,i=Object.prototype.hasOwnProperty,s="u">typeof Symbol&&Symbol.toStringTag;function u(e,t,r){i.call(e,t)||Object.defineProperty(e,t,r)}function a(e,t){let r=e[t];return r||(r=c(t),e[t]=r),r}function c(e){return{exports:{},error:void 0,id:e,namespaceObject:void 0}}function f(e,t){u(e,"__esModule",{value:!0}),s&&u(e,s,{value:"Module"});let r=0;for(;rObject.getPrototypeOf(e):e=>e.__proto__,h=[null,p({}),p([]),p(p)];function d(e,t,r){let n=[],o=-1;for(let t=e;("object"==typeof t||"function"==typeof t)&&!h.includes(t);t=p(t))for(let r of Object.getOwnPropertyNames(t))n.push(r,function(e,t){return()=>e[t]}(e,r)),-1===o&&"default"===r&&(o=n.length-1);return r&&o>=0||(o>=0?n.splice(o,1,0,e):n.push("default",0,e)),f(t,n),t}function m(e){let t=B(e,this.m);if(t.namespaceObject)return t.namespaceObject;let r=t.exports;return t.namespaceObject=d(r,"function"==typeof r?function(...e){return r.apply(this,e)}:Object.create(null),r&&r.__esModule)}function b(e){let t=e.indexOf("#");-1!==t&&(e=e.substring(0,t));let r=e.indexOf("?");return -1!==r&&(e=e.substring(0,r)),e}function y(){let e,t;return{promise:new Promise((r,n)=>{t=n,e=r}),resolve:e,reject:t}}l.i=m,l.A=function(e){return this.r(e)(m.bind(this))},l.t="function"==typeof require?require:function(){throw Error("Unexpected use of runtime require")},l.r=function(e){return B(e,this.m).exports},l.f=function(e){function t(t){if(t=b(t),i.call(e,t))return e[t].module();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r}return t.keys=()=>Object.keys(e),t.resolve=t=>{if(t=b(t),i.call(e,t))return e[t].id();let r=Error(`Cannot find module '${t}'`);throw r.code="MODULE_NOT_FOUND",r},t.import=async e=>await t(e),t};let O=Symbol("turbopack queues"),g=Symbol("turbopack exports"),w=Symbol("turbopack error");function C(e){e&&1!==e.status&&(e.status=1,e.forEach(e=>e.queueCount--),e.forEach(e=>e.queueCount--?e.queueCount++:e()))}l.a=function(e,t){let r=this.m,n=t?Object.assign([],{status:-1}):void 0,o=new Set,{resolve:l,reject:i,promise:s}=y(),u=Object.assign(s,{[g]:r.exports,[O]:e=>{n&&e(n),o.forEach(e),u.catch(()=>{})}}),a={get:()=>u,set(e){e!==u&&(u[g]=e)}};Object.defineProperty(r,"exports",a),Object.defineProperty(r,"namespaceObject",a),e(function(e){let t=e.map(e=>{if(null!==e&&"object"==typeof e){if(O in e)return e;if(null!=e&&"object"==typeof e&&"then"in e&&"function"==typeof e.then){let t=Object.assign([],{status:0}),r={[g]:{},[O]:e=>e(t)};return e.then(e=>{r[g]=e,C(t)},e=>{r[w]=e,C(t)}),r}}return{[g]:e,[O]:()=>{}}}),r=()=>t.map(e=>{if(e[w])throw e[w];return e[g]}),{promise:l,resolve:i}=y(),s=Object.assign(()=>i(r),{queueCount:0});function u(e){e!==n&&!o.has(e)&&(o.add(e),e&&0===e.status&&(s.queueCount++,e.push(s)))}return t.map(e=>e[O](u)),s.queueCount?l:r()},function(e){e?i(u[w]=e):l(u[g]),C(n)}),n&&-1===n.status&&(n.status=0)};let U=function(e){let t=new URL(e,"x:/"),r={};for(let e in t)r[e]=t[e];for(let t in r.href=e,r.pathname=e.replace(/[?#].*/,""),r.origin=r.protocol="",r.toString=r.toJSON=(...t)=>e,r)Object.defineProperty(this,t,{enumerable:!0,configurable:!0,value:r[t]})};function R(e,t){throw Error(`Invariant: ${t(e)}`)}U.prototype=URL.prototype,l.U=U,l.z=function(e){throw Error("dynamic usage of require is not supported")},l.g=globalThis;let j=o.prototype;var _,k=((_=k||{})[_.Runtime=0]="Runtime",_[_.Parent=1]="Parent",_[_.Update=2]="Update",_);let v=new Map;l.M=v;let $=new Map,P=new Map;async function S(e,t,r){let n;if("string"==typeof r)return E(e,t,K(r));let o=r.included||[],l=o.map(e=>!!v.has(e)||$.get(e));if(l.length>0&&l.every(e=>e))return void await Promise.all(l);let i=r.moduleChunks||[],s=i.map(e=>P.get(e)).filter(e=>e);if(s.length>0){if(s.length===i.length)return void await Promise.all(s);let r=new Set;for(let e of i)P.has(e)||r.add(e);for(let n of r){let r=E(e,t,K(n));P.set(n,r),s.push(r)}n=Promise.all(s)}else{for(let o of(n=E(e,t,K(r.path)),i))P.has(o)||P.set(o,n)}for(let e of o)$.has(e)||$.set(e,n);await n}j.l=function(e){return S(1,this.m.id,e)};let T=Promise.resolve(void 0),A=new WeakMap;function E(t,r,n){let o=e.loadChunkCached(t,n),l=A.get(o);if(void 0===l){let e=A.set.bind(A,o,T);l=o.then(e).catch(e=>{let o;switch(t){case 0:o=`as a runtime dependency of chunk ${r}`;break;case 1:o=`from module ${r}`;break;case 2:o="from an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}let l=Error(`Failed to load chunk ${n} ${o}${e?`: ${e}`:""}`,e?{cause:e}:void 0);throw l.name="ChunkLoadError",l}),A.set(o,l)}return l}function K(e){return`${t}${e.split("/").map(e=>encodeURIComponent(e)).join("/")}${r}`}j.L=function(e){return E(1,this.m.id,e)},j.R=function(e){let t=this.r(e);return t?.default??t},j.P=function(e){return`/ROOT/${e??""}`},j.b=function(e){let t=new Blob([`self.TURBOPACK_WORKER_LOCATION = ${JSON.stringify(location.origin)}; -self.TURBOPACK_CHUNK_SUFFIX = ${JSON.stringify(r)}; -self.TURBOPACK_NEXT_CHUNK_URLS = ${JSON.stringify(e.reverse().map(K),null,2)}; -importScripts(...self.TURBOPACK_NEXT_CHUNK_URLS.map(c => self.TURBOPACK_WORKER_LOCATION + c).reverse());`],{type:"text/javascript"});return URL.createObjectURL(t)};let x=/\.js(?:\?[^#]*)?(?:#.*)?$/,N=/\.css(?:\?[^#]*)?(?:#.*)?$/;function M(e){return N.test(e)}l.w=function(t,r,n){return e.loadWebAssembly(1,this.m.id,t,r,n)},l.u=function(t,r){return e.loadWebAssemblyModule(1,this.m.id,t,r)};let L={};l.c=L;let B=(e,t)=>{let r=L[e];if(r){if(r.error)throw r.error;return r}return q(e,k.Parent,t.id)};function q(e,t,r){let n=v.get(e);if("function"!=typeof n)throw Error(function(e,t,r){let n;switch(t){case 0:n=`as a runtime entry of chunk ${r}`;break;case 1:n=`because it was required from module ${r}`;break;case 2:n="because of an HMR update";break;default:R(t,e=>`Unknown source type: ${e}`)}return`Module ${e} was instantiated ${n}, but the module factory is not available.`}(e,t,r));let l=c(e),i=l.exports;L[e]=l;let s=new o(l,i);try{n(s,l,i)}catch(e){throw l.error=e,e}return l.namespaceObject&&l.exports!==l.namespaceObject&&d(l.exports,l.namespaceObject),l}function I(r){let n,o=function(e){if("string"==typeof e)return e;let r=decodeURIComponent(("u">typeof TURBOPACK_NEXT_CHUNK_URLS?TURBOPACK_NEXT_CHUNK_URLS.pop():e.getAttribute("src")).replace(/[?#].*$/,""));return r.startsWith(t)?r.slice(t.length):r}(r[0]);return 2===r.length?n=r[1]:(n=void 0,!function(e,t,r,n){let o=1;for(;o{r=e,n=t}),resolve:()=>{t.resolved=!0,r()},reject:n},W.set(e,t)}return t}e={async registerChunk(e,t){if(H(K(e)).resolve(),null!=t){for(let e of t.otherChunks)H(K("string"==typeof e?e:e.path));if(await Promise.all(t.otherChunks.map(t=>S(0,e,t))),t.runtimeModuleIds.length>0)for(let r of t.runtimeModuleIds)!function(e,t){let r=L[t];if(r){if(r.error)throw r.error;return}q(t,k.Runtime,e)}(e,r)}},loadChunkCached:(e,t)=>(function(e,t){let r=H(t);if(r.loadingStarted)return r.promise;if(e===k.Runtime)return r.loadingStarted=!0,M(t)&&r.resolve(),r.promise;if("function"==typeof importScripts)if(M(t));else if(x.test(t))self.TURBOPACK_NEXT_CHUNK_URLS.push(t),importScripts(TURBOPACK_WORKER_LOCATION+t);else throw Error(`can't infer type of chunk from URL ${t} in worker`);else{let e=decodeURI(t);if(M(t))if(document.querySelectorAll(`link[rel=stylesheet][href="${t}"],link[rel=stylesheet][href^="${t}?"],link[rel=stylesheet][href="${e}"],link[rel=stylesheet][href^="${e}?"]`).length>0)r.resolve();else{let e=document.createElement("link");e.rel="stylesheet",e.href=t,e.onerror=()=>{r.reject()},e.onload=()=>{r.resolve()},document.head.appendChild(e)}else if(x.test(t)){let n=document.querySelectorAll(`script[src="${t}"],script[src^="${t}?"],script[src="${e}"],script[src^="${e}?"]`);if(n.length>0)for(let e of Array.from(n))e.addEventListener("error",()=>{r.reject()});else{let e=document.createElement("script");e.src=t,e.onerror=()=>{r.reject()},document.head.appendChild(e)}}else throw Error(`can't infer type of chunk from URL ${t}`)}return r.loadingStarted=!0,r.promise})(e,t),async loadWebAssembly(e,t,r,n,o){let l=fetch(K(r)),{instance:i}=await WebAssembly.instantiateStreaming(l,o);return i.exports},async loadWebAssemblyModule(e,t,r,n){let o=fetch(K(r));return await WebAssembly.compileStreaming(o)}};let F=globalThis.TURBOPACK;globalThis.TURBOPACK={push:I},F.forEach(I)})(); \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_buildManifest.js b/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_buildManifest.js deleted file mode 100644 index 94ca914..0000000 --- a/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_buildManifest.js +++ /dev/null @@ -1,11 +0,0 @@ -self.__BUILD_MANIFEST = { - "__rewrites": { - "afterFiles": [], - "beforeFiles": [], - "fallback": [] - }, - "sortedPages": [ - "/_app", - "/_error" - ] -};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_clientMiddlewareManifest.json b/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_clientMiddlewareManifest.json deleted file mode 100644 index 0637a08..0000000 --- a/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_clientMiddlewareManifest.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_ssgManifest.js b/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_ssgManifest.js deleted file mode 100644 index 5b3ff59..0000000 --- a/public/gratewizard-app/_next/static/fI5fsSsRuXuoPI3x2JgpJ/_ssgManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/media/1bffadaabf893a1e-s.7cd81963.woff2 b/public/gratewizard-app/_next/static/media/1bffadaabf893a1e-s.7cd81963.woff2 deleted file mode 100644 index 57da6f8..0000000 Binary files a/public/gratewizard-app/_next/static/media/1bffadaabf893a1e-s.7cd81963.woff2 and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/2bbe8d2671613f1f-s.76dcb0b2.woff2 b/public/gratewizard-app/_next/static/media/2bbe8d2671613f1f-s.76dcb0b2.woff2 deleted file mode 100644 index 072229b..0000000 Binary files a/public/gratewizard-app/_next/static/media/2bbe8d2671613f1f-s.76dcb0b2.woff2 and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/2c55a0e60120577a-s.2a48534a.woff2 b/public/gratewizard-app/_next/static/media/2c55a0e60120577a-s.2a48534a.woff2 deleted file mode 100644 index 2cd45ed..0000000 Binary files a/public/gratewizard-app/_next/static/media/2c55a0e60120577a-s.2a48534a.woff2 and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/5476f68d60460930-s.c995e352.woff2 b/public/gratewizard-app/_next/static/media/5476f68d60460930-s.c995e352.woff2 deleted file mode 100644 index 9c71603..0000000 Binary files a/public/gratewizard-app/_next/static/media/5476f68d60460930-s.c995e352.woff2 and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2 b/public/gratewizard-app/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2 deleted file mode 100644 index 91dc3e8..0000000 Binary files a/public/gratewizard-app/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2 and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/9c72aa0f40e4eef8-s.18a48cbc.woff2 b/public/gratewizard-app/_next/static/media/9c72aa0f40e4eef8-s.18a48cbc.woff2 deleted file mode 100644 index bc0e0ab..0000000 Binary files a/public/gratewizard-app/_next/static/media/9c72aa0f40e4eef8-s.18a48cbc.woff2 and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/ad66f9afd8947f86-s.7a40eb73.woff2 b/public/gratewizard-app/_next/static/media/ad66f9afd8947f86-s.7a40eb73.woff2 deleted file mode 100644 index b6dd1fa..0000000 Binary files a/public/gratewizard-app/_next/static/media/ad66f9afd8947f86-s.7a40eb73.woff2 and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/favicon.0b3bf435.ico b/public/gratewizard-app/_next/static/media/favicon.0b3bf435.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/public/gratewizard-app/_next/static/media/favicon.0b3bf435.ico and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/layers-2x.793209de.png b/public/gratewizard-app/_next/static/media/layers-2x.793209de.png deleted file mode 100644 index 200c333..0000000 Binary files a/public/gratewizard-app/_next/static/media/layers-2x.793209de.png and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/layers.78ca0acf.png b/public/gratewizard-app/_next/static/media/layers.78ca0acf.png deleted file mode 100644 index 1a72e57..0000000 Binary files a/public/gratewizard-app/_next/static/media/layers.78ca0acf.png and /dev/null differ diff --git a/public/gratewizard-app/_next/static/media/marker-icon.b9f7ac13.png b/public/gratewizard-app/_next/static/media/marker-icon.b9f7ac13.png deleted file mode 100644 index 950edf2..0000000 Binary files a/public/gratewizard-app/_next/static/media/marker-icon.b9f7ac13.png and /dev/null differ diff --git a/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_buildManifest.js b/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_buildManifest.js deleted file mode 100644 index 94ca914..0000000 --- a/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_buildManifest.js +++ /dev/null @@ -1,11 +0,0 @@ -self.__BUILD_MANIFEST = { - "__rewrites": { - "afterFiles": [], - "beforeFiles": [], - "fallback": [] - }, - "sortedPages": [ - "/_app", - "/_error" - ] -};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_clientMiddlewareManifest.json b/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_clientMiddlewareManifest.json deleted file mode 100644 index 0637a08..0000000 --- a/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_clientMiddlewareManifest.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_ssgManifest.js b/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_ssgManifest.js deleted file mode 100644 index 5b3ff59..0000000 --- a/public/gratewizard-app/_next/static/qdiAZtzGemrTuAwJHoG52/_ssgManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_buildManifest.js b/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_buildManifest.js deleted file mode 100644 index 94ca914..0000000 --- a/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_buildManifest.js +++ /dev/null @@ -1,11 +0,0 @@ -self.__BUILD_MANIFEST = { - "__rewrites": { - "afterFiles": [], - "beforeFiles": [], - "fallback": [] - }, - "sortedPages": [ - "/_app", - "/_error" - ] -};self.__BUILD_MANIFEST_CB && self.__BUILD_MANIFEST_CB() \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_clientMiddlewareManifest.json b/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_clientMiddlewareManifest.json deleted file mode 100644 index 0637a08..0000000 --- a/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_clientMiddlewareManifest.json +++ /dev/null @@ -1 +0,0 @@ -[] \ No newline at end of file diff --git a/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_ssgManifest.js b/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_ssgManifest.js deleted file mode 100644 index 5b3ff59..0000000 --- a/public/gratewizard-app/_next/static/tQNTgSJP1wy4fIG0G3OL3/_ssgManifest.js +++ /dev/null @@ -1 +0,0 @@ -self.__SSG_MANIFEST=new Set([]);self.__SSG_MANIFEST_CB&&self.__SSG_MANIFEST_CB() \ No newline at end of file diff --git a/public/gratewizard-app/_not-found.html b/public/gratewizard-app/_not-found.html deleted file mode 100644 index dd76b3c..0000000 --- a/public/gratewizard-app/_not-found.html +++ /dev/null @@ -1 +0,0 @@ -404: This page could not be found.GrateWizard

404

This page could not be found.

\ No newline at end of file diff --git a/public/gratewizard-app/_not-found.txt b/public/gratewizard-app/_not-found.txt deleted file mode 100644 index 387b59f..0000000 --- a/public/gratewizard-app/_not-found.txt +++ /dev/null @@ -1,15 +0,0 @@ -1:"$Sreact.fragment" -2:I[39756,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -3:I[37457,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -4:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"OutletBoundary"] -5:"$Sreact.suspense" -7:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"ViewportBoundary"] -9:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"MetadataBoundary"] -b:I[68027,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -:HL["/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","style"] -0:{"P":null,"b":"qdiAZtzGemrTuAwJHoG52","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"className":"antialiased","lang":"fr","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},[["$","div","l",{"className":"inset-0 absolute justify-center items-center flex h-full w-full text-center","style":{"background":"inherit"},"children":["$","div",null,{"className":"h-4 w-28 flex relative","children":[["$","span",null,{"className":"animate-grow mr-8 left-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-growReverse mr-0 right-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}]]}]}],[],[]],false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":"$L8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$La"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$b","$undefined"],"S":true} -8:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -c:I[27201,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"IconMark"] -6:null -a:[["$","title","0",{"children":"GrateWizard"}],["$","meta","1",{"name":"description","content":"Calculateur de coefficients relatifs pour une économie du don"}],["$","link","2",{"rel":"icon","href":"/gratewizard-app/favicon.ico?favicon.0b3bf435.ico","sizes":"256x256","type":"image/x-icon"}],["$","$Lc","3",{}]] diff --git a/public/gratewizard-app/_not-found/__next._full.txt b/public/gratewizard-app/_not-found/__next._full.txt deleted file mode 100644 index 387b59f..0000000 --- a/public/gratewizard-app/_not-found/__next._full.txt +++ /dev/null @@ -1,15 +0,0 @@ -1:"$Sreact.fragment" -2:I[39756,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -3:I[37457,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -4:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"OutletBoundary"] -5:"$Sreact.suspense" -7:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"ViewportBoundary"] -9:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"MetadataBoundary"] -b:I[68027,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -:HL["/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","style"] -0:{"P":null,"b":"qdiAZtzGemrTuAwJHoG52","c":["","_not-found"],"q":"","i":false,"f":[[["",{"children":["/_not-found",{"children":["__PAGE__",{}]}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"className":"antialiased","lang":"fr","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":"$undefined","forbidden":"$undefined","unauthorized":"$undefined"}]]}],{"children":[["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:style","children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:1:props:style","children":404}],["$","div",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:style","children":["$","h2",null,{"style":"$0:f:0:1:0:props:children:1:props:children:props:children:props:notFound:0:1:props:children:props:children:2:props:children:props:style","children":"This page could not be found."}]}]]}]}]],null,["$","$L4",null,{"children":["$","$5",null,{"name":"Next.MetadataOutlet","children":"$@6"}]}]]}],{},null,false,false]},null,false,false]},[["$","div","l",{"className":"inset-0 absolute justify-center items-center flex h-full w-full text-center","style":{"background":"inherit"},"children":["$","div",null,{"className":"h-4 w-28 flex relative","children":[["$","span",null,{"className":"animate-grow mr-8 left-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-growReverse mr-0 right-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}]]}]}],[],[]],false,false],["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L7",null,{"children":"$L8"}],["$","div",null,{"hidden":true,"children":["$","$L9",null,{"children":["$","$5",null,{"name":"Next.Metadata","children":"$La"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$b","$undefined"],"S":true} -8:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -c:I[27201,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"IconMark"] -6:null -a:[["$","title","0",{"children":"GrateWizard"}],["$","meta","1",{"name":"description","content":"Calculateur de coefficients relatifs pour une économie du don"}],["$","link","2",{"rel":"icon","href":"/gratewizard-app/favicon.ico?favicon.0b3bf435.ico","sizes":"256x256","type":"image/x-icon"}],["$","$Lc","3",{}]] diff --git a/public/gratewizard-app/_not-found/__next._head.txt b/public/gratewizard-app/_not-found/__next._head.txt deleted file mode 100644 index 710a300..0000000 --- a/public/gratewizard-app/_not-found/__next._head.txt +++ /dev/null @@ -1,6 +0,0 @@ -1:"$Sreact.fragment" -2:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"ViewportBoundary"] -3:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"MetadataBoundary"] -4:"$Sreact.suspense" -5:I[27201,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"IconMark"] -0:{"buildId":"qdiAZtzGemrTuAwJHoG52","rsc":["$","$1","h",{"children":[["$","meta",null,{"name":"robots","content":"noindex"}],["$","$L2",null,{"children":[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]]}],["$","div",null,{"hidden":true,"children":["$","$L3",null,{"children":["$","$4",null,{"name":"Next.Metadata","children":[["$","title","0",{"children":"GrateWizard"}],["$","meta","1",{"name":"description","content":"Calculateur de coefficients relatifs pour une économie du don"}],["$","link","2",{"rel":"icon","href":"/gratewizard-app/favicon.ico?favicon.0b3bf435.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L5","3",{}]]}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],"loading":null,"isPartial":false} diff --git a/public/gratewizard-app/_not-found/__next._index.txt b/public/gratewizard-app/_not-found/__next._index.txt deleted file mode 100644 index b1aa42f..0000000 --- a/public/gratewizard-app/_not-found/__next._index.txt +++ /dev/null @@ -1,6 +0,0 @@ -1:"$Sreact.fragment" -2:I[39756,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -3:I[37457,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -:HL["/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","style"] -0:{"buildId":"qdiAZtzGemrTuAwJHoG52","rsc":["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","precedence":"next"}],["$","link","1",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","precedence":"next"}]],["$","html",null,{"className":"antialiased","lang":"fr","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}],"notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]]}]}]}]]}],"loading":[["$","div","l",{"className":"inset-0 absolute justify-center items-center flex h-full w-full text-center","style":{"background":"inherit"},"children":["$","div",null,{"className":"h-4 w-28 flex relative","children":[["$","span",null,{"className":"animate-grow mr-8 left-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-growReverse mr-0 right-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}]]}]}],[],[]],"isPartial":false} diff --git a/public/gratewizard-app/_not-found/__next._not-found.__PAGE__.txt b/public/gratewizard-app/_not-found/__next._not-found.__PAGE__.txt deleted file mode 100644 index 5188f2c..0000000 --- a/public/gratewizard-app/_not-found/__next._not-found.__PAGE__.txt +++ /dev/null @@ -1,5 +0,0 @@ -1:"$Sreact.fragment" -2:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"OutletBoundary"] -3:"$Sreact.suspense" -0:{"buildId":"qdiAZtzGemrTuAwJHoG52","rsc":["$","$1","c",{"children":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],null,["$","$L2",null,{"children":["$","$3",null,{"name":"Next.MetadataOutlet","children":"$@4"}]}]]}],"loading":null,"isPartial":false} -4:null diff --git a/public/gratewizard-app/_not-found/__next._not-found.txt b/public/gratewizard-app/_not-found/__next._not-found.txt deleted file mode 100644 index 5ca507a..0000000 --- a/public/gratewizard-app/_not-found/__next._not-found.txt +++ /dev/null @@ -1,4 +0,0 @@ -1:"$Sreact.fragment" -2:I[39756,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -3:I[37457,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -0:{"buildId":"qdiAZtzGemrTuAwJHoG52","rsc":["$","$1","c",{"children":[null,["$","$L2",null,{"parallelRouterKey":"children","template":["$","$L3",null,{}]}]]}],"loading":null,"isPartial":false} diff --git a/public/gratewizard-app/_not-found/__next._tree.txt b/public/gratewizard-app/_not-found/__next._tree.txt deleted file mode 100644 index a703aa2..0000000 --- a/public/gratewizard-app/_not-found/__next._tree.txt +++ /dev/null @@ -1,3 +0,0 @@ -:HL["/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","style"] -0:{"buildId":"qdiAZtzGemrTuAwJHoG52","tree":{"name":"","paramType":null,"paramKey":"","hasRuntimePrefetch":false,"slots":{"children":{"name":"/_not-found","paramType":null,"paramKey":"/_not-found","hasRuntimePrefetch":false,"slots":{"children":{"name":"__PAGE__","paramType":null,"paramKey":"__PAGE__","hasRuntimePrefetch":false,"slots":null,"isRootLayout":false}},"isRootLayout":false}},"isRootLayout":true},"staleTime":300} diff --git a/public/gratewizard-app/favicon.ico b/public/gratewizard-app/favicon.ico deleted file mode 100644 index 718d6fe..0000000 Binary files a/public/gratewizard-app/favicon.ico and /dev/null differ diff --git a/public/gratewizard-app/index.html b/public/gratewizard-app/index.html deleted file mode 100644 index 1aa4756..0000000 --- a/public/gratewizard-app/index.html +++ /dev/null @@ -1 +0,0 @@ -GrateWizard
\ No newline at end of file diff --git a/public/gratewizard-app/index.txt b/public/gratewizard-app/index.txt deleted file mode 100644 index 894e786..0000000 --- a/public/gratewizard-app/index.txt +++ /dev/null @@ -1,20 +0,0 @@ -1:"$Sreact.fragment" -2:I[39756,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -3:I[37457,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"default"] -4:I[47257,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"ClientPageRoot"] -5:I[31713,["/gratewizard-app/_next/static/chunks/8b5fadbc8bf897a0.js","/gratewizard-app/_next/static/chunks/093aca5759c9b5bd.js","/gratewizard-app/_next/static/chunks/ffaecfd52c45f81a.js"],"default"] -8:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"OutletBoundary"] -9:"$Sreact.suspense" -b:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"ViewportBoundary"] -d:I[97367,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"MetadataBoundary"] -f:I[68027,[],"default"] -:HL["/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","style"] -:HL["/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","style"] -:HL["/gratewizard-app/_next/static/media/83afe278b6a6bb3c-s.p.3a6ba036.woff2","font",{"crossOrigin":"","type":"font/woff2"}] -0:{"P":null,"b":"qdiAZtzGemrTuAwJHoG52","c":["",""],"q":"","i":false,"f":[[["",{"children":["__PAGE__",{}]},"$undefined","$undefined",true],[["$","$1","c",{"children":[[["$","link","0",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/4e20891f2fd03463.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}],["$","link","1",{"rel":"stylesheet","href":"/gratewizard-app/_next/static/chunks/6aa743261c1ef51d.css","precedence":"next","crossOrigin":"$undefined","nonce":"$undefined"}]],["$","html",null,{"className":"antialiased","lang":"fr","children":["$","body",null,{"className":"inter_5972bc34-module__OU16Qa__className","children":["$","$L2",null,{"parallelRouterKey":"children","error":"$undefined","errorStyles":"$undefined","errorScripts":"$undefined","template":["$","$L3",null,{}],"templateStyles":"$undefined","templateScripts":"$undefined","notFound":[[["$","title",null,{"children":"404: This page could not be found."}],["$","div",null,{"style":{"fontFamily":"system-ui,\"Segoe UI\",Roboto,Helvetica,Arial,sans-serif,\"Apple Color Emoji\",\"Segoe UI Emoji\"","height":"100vh","textAlign":"center","display":"flex","flexDirection":"column","alignItems":"center","justifyContent":"center"},"children":["$","div",null,{"children":[["$","style",null,{"dangerouslySetInnerHTML":{"__html":"body{color:#000;background:#fff;margin:0}.next-error-h1{border-right:1px solid rgba(0,0,0,.3)}@media (prefers-color-scheme:dark){body{color:#fff;background:#000}.next-error-h1{border-right:1px solid rgba(255,255,255,.3)}}"}}],["$","h1",null,{"className":"next-error-h1","style":{"display":"inline-block","margin":"0 20px 0 0","padding":"0 23px 0 0","fontSize":24,"fontWeight":500,"verticalAlign":"top","lineHeight":"49px"},"children":404}],["$","div",null,{"style":{"display":"inline-block"},"children":["$","h2",null,{"style":{"fontSize":14,"fontWeight":400,"lineHeight":"49px","margin":0},"children":"This page could not be found."}]}]]}]}]],[]],"forbidden":"$undefined","unauthorized":"$undefined"}]}]}]]}],{"children":[["$","$1","c",{"children":[["$","$L4",null,{"Component":"$5","serverProvidedParams":{"searchParams":{},"params":{},"promises":["$@6","$@7"]}}],[["$","script","script-0",{"src":"/gratewizard-app/_next/static/chunks/8b5fadbc8bf897a0.js","async":true,"nonce":"$undefined"}],["$","script","script-1",{"src":"/gratewizard-app/_next/static/chunks/093aca5759c9b5bd.js","async":true,"nonce":"$undefined"}],["$","script","script-2",{"src":"/gratewizard-app/_next/static/chunks/ffaecfd52c45f81a.js","async":true,"nonce":"$undefined"}]],["$","$L8",null,{"children":["$","$9",null,{"name":"Next.MetadataOutlet","children":"$@a"}]}]]}],{},null,false,false]},[["$","div","l",{"className":"inset-0 absolute justify-center items-center flex h-full w-full text-center","style":{"background":"inherit"},"children":["$","div",null,{"className":"h-4 w-28 flex relative","children":[["$","span",null,{"className":"animate-grow mr-8 left-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-move mr-[30px] h-4 w-4 rounded-full bg-primary"}],["$","span",null,{"className":"animate-growReverse mr-0 right-0 top-0 absolute h-4 w-4 rounded-full bg-primary"}]]}]}],[],[]],false,false],["$","$1","h",{"children":[null,["$","$Lb",null,{"children":"$Lc"}],["$","div",null,{"hidden":true,"children":["$","$Ld",null,{"children":["$","$9",null,{"name":"Next.Metadata","children":"$Le"}]}]}],["$","meta",null,{"name":"next-size-adjust","content":""}]]}],false]],"m":"$undefined","G":["$f",[]],"S":true} -6:{} -7:"$0:f:0:1:1:children:0:props:children:0:props:serverProvidedParams:params" -c:[["$","meta","0",{"charSet":"utf-8"}],["$","meta","1",{"name":"viewport","content":"width=device-width, initial-scale=1"}]] -10:I[27201,["/gratewizard-app/_next/static/chunks/4392189f08a7af14.js"],"IconMark"] -a:null -e:[["$","title","0",{"children":"GrateWizard"}],["$","meta","1",{"name":"description","content":"Calculateur de coefficients relatifs pour une économie du don"}],["$","link","2",{"rel":"icon","href":"/gratewizard-app/favicon.ico?favicon.0b3bf435.ico","sizes":"256x256","type":"image/x-icon"}],["$","$L10","3",{}]] diff --git a/public/gratewizard-app/next.svg b/public/gratewizard-app/next.svg deleted file mode 100644 index 5174b28..0000000 --- a/public/gratewizard-app/next.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/public/gratewizard-app/vercel.svg b/public/gratewizard-app/vercel.svg deleted file mode 100644 index d2f8422..0000000 --- a/public/gratewizard-app/vercel.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/site/pages/gratewizard.yml b/site/pages/gratewizard.yml index 143a17f..ca69553 100644 --- a/site/pages/gratewizard.yml +++ b/site/pages/gratewizard.yml @@ -1,8 +1,8 @@ kicker: Prochain projet -title: GrateWizard +title: grateWizard description: Un outil de calcul de coefficients relatifs pour estimer les valeurs dans une économie du don. meta: - title: GrateWizard — Coefficients relatifs + title: grateWizard — Coefficients relatifs features: - icon: clock title: Ancienneté @@ -15,8 +15,8 @@ features: title: Moyenne (M / N) description: Obtenir l'indicateur M/N dans un bassin de vie ou un périmètre qui fait sens pour vous. - icon: heart-handshake - title: Prix juste + title: Évaluation juste description: La formule P' = (1-d) × P + d × P × ratio permet de doser la part du don dans chaque échange. cta: note: Le prototype est disponible en tant qu'application autonome. - label: Lancer GrateWizard + label: Lancer grateWizard diff --git a/site/pages/home.yml b/site/pages/home.yml index a00f6a1..2798204 100644 --- a/site/pages/home.yml +++ b/site/pages/home.yml @@ -9,7 +9,7 @@ hero: label: En savoir plus sur le projet to: /a-propos book: - kicker: Le livre + kicker: Modèle économique title: Une économie du don — enfin concevable description: Un livre et quelques chansons pour une proposition de modèle économique fondé sur le don. Le livre est accompagné de chansons qui le racontent, un peu autrement. @@ -22,17 +22,16 @@ bookPresentation: kicker: Le livre title: Une économie du don — enfin concevable description: - - Ce livre explore les fondements d'une économie fondée sur le don. À travers 11 chapitres, il déploie une vision où - la richesse se mesure à ce que l'on donne, pas à ce que l'on accumule. - - Chaque chapitre est accompagné d'une chanson qui en prolonge le propos, créant une expérience de lecture unique et - immersive. + - Ce livre explore les fondements d'une économie fondée sur le don. + - Chaque chapitre est accompagné d'une chanson qui en prolonge le propos, créant une invitation inédite et + immersive à la lecture. cta: - label: Découvrir le sommaire + label: Sommaire to: /lire songs: kicker: Les chansons title: 9 chansons qui racontent le livre - description: Chaque chanson est un prolongement musical d'un ou deux chapitres. Écoutez-les en lisant, ou savourez-les librement. + description: Chaque chanson est un prolongement musical d'un ou deux chapitres. cta: label: Voir toutes les chansons to: /ecouter @@ -42,17 +41,16 @@ cooperative: title: Une plateforme coopérative description: - Le Librodrome est le premier pas vers une plateforme de productions collectives. Un espace où les créateurs, - lecteurs et auditeurs contribuent ensemble à faire émerger des oeuvres nouvelles. - - Ce projet est ouvert. Chaque contribution enrichit l'ensemble. Rejoignez-nous pour construire ensemble l'économie - du don. + producteurs et personnes mobilisées, contribuent ensemble à faire émerger des projets de production. + - Ce projet est ouvert. Chaque contribution enrichit l'ensemble. Rejoignez-nous pour construire une autonomie collective à l'échelle des bassins de vie. cta: label: En savoir plus to: /a-propos grateWizardTeaser: - kicker: Prochain projet - title: GrateWizard + kicker: Estimer les valeurs en DU - Les coefficients relatifs + title: grateWizard description: Une webapp pour calculer des coefficients relatifs et estimer les valeurs dans une économie du don. - Comparez l'ancienneté, la quantité ou la moyenne pour fixer un prix juste. + Relatif à la moyenne, à l'ancienneté, au solde net, au volume. cta: launch: Lancer l'appli more: diff --git a/site/site.yml b/site/site.yml index 0914337..4e1c978 100644 --- a/site/site.yml +++ b/site/site.yml @@ -17,7 +17,7 @@ footer: - label: Mentions légales to: /mentions-legales gratewizard: - url: /gratewizard-app/ + url: /gratewizard?popup popup: width: 420 height: 720