{"version":3,"sources":["webpack:///./node_modules/ol/control/MousePosition.js","webpack:///./node_modules/core-js/internals/same-value.js","webpack:///./node_modules/core-js/internals/regexp-exec-abstract.js","webpack:///./src/views/BurnMap.vue?9f41","webpack:///./node_modules/core-js/modules/es.string.search.js","webpack:///./node_modules/core-js/internals/regexp-exec.js","webpack:///./node_modules/ol/control/ScaleLine.js","webpack:///./node_modules/core-js/internals/regexp-sticky-helpers.js","webpack:///./node_modules/core-js/modules/es.regexp.exec.js","webpack:///./node_modules/ol/geom/Circle.js","webpack:///./node_modules/ol/interaction/Draw.js","webpack:///./node_modules/core-js/internals/regexp-flags.js","webpack:///./node_modules/ol-layerswitcher/dist/ol-layerswitcher.js","webpack:///./src/views/BurnMap.vue","webpack:///./node_modules/ol/OverlayPositioning.js","webpack:///./node_modules/ol/Overlay.js","webpack:///./src/mixins/searchControl.js","webpack:///./src/mixins/burnMapHelper.js","webpack:///./src/views/BurnMap.vue?f855","webpack:///./node_modules/core-js/internals/fix-regexp-well-known-symbol-logic.js"],"names":["__extends","extendStatics","d","b","Object","setPrototypeOf","__proto__","Array","p","prototype","hasOwnProperty","call","__","this","constructor","create","PROJECTION","COORDINATE_FORMAT","MousePosition","_super","opt_options","_this","options","element","document","createElement","className","undefined","render","target","addEventListener","handleProjectionChanged_","coordinateFormat","setCoordinateFormat","projection","setProjection","undefinedHTML_","undefinedHTML","renderOnMouseOut_","renderedHTML_","innerHTML","mapProjection_","transform_","getCoordinateFormat","get","getProjection","handleMouseMove","event","map","getMap","updateHTML_","getEventPixel","handleMouseOut","setMap","viewport","getViewport","listenerKeys","push","POINTERMOVE","POINTEROUT","format","set","pixel","html","coordinate","getCoordinateFromPixelInternal","userProjection","toString","mapEvent","frameState","viewState","module","exports","is","x","y","classof","regexpExec","R","S","exec","result","TypeError","fixRegExpWellKnownSymbolLogic","anObject","requireObjectCoercible","sameValue","regExpExec","SEARCH","nativeSearch","maybeCallNative","regexp","O","searcher","RegExp","String","res","done","value","rx","previousLastIndex","lastIndex","index","regexpFlags","stickyHelpers","shared","nativeExec","nativeReplace","replace","patchedExec","UPDATES_LAST_INDEX_WRONG","re1","re2","UNSUPPORTED_Y","BROKEN_CARET","NPCG_INCLUDED","PATCH","str","reCopy","match","i","re","sticky","flags","source","charsAdded","strCopy","indexOf","slice","multiline","input","length","global","arguments","UNITS_PROP","Units","DEGREES","IMPERIAL","NAUTICAL","METRIC","US","LEADING_DIGITS","DEFAULT_DPI","ScaleLine","bar","innerElement_","appendChild","viewState_","minWidth_","minWidth","renderedVisible_","renderedWidth_","handleUnitsChanged_","setUnits","units","scaleBar_","scaleBarSteps_","steps","scaleBarText_","text","dpi_","dpi","getUnits","updateElement_","setDpi","center","pointResolutionUnits","METERS","pointResolution","resolution","nominalCount","suffix","metersPerDegree","count","width","decimalCount","Math","floor","log","decimal","pow","round","isNaN","style","display","createScaleBar","toFixed","scale","scaleBarText","mapScale","getScaleForResolution","toLocaleString","scaleSteps","stepWidth","backgroundColor","createMarker","createStepText","container","join","position","top","isLast","lengthString","margin","mpu","getMetersPerUnit","inchesPerMeter","parseFloat","fails","RE","s","f","$","proto","forced","Circle","opt_radius","opt_layout","setFlatCoordinates","radius","setCenterAndRadius","clone","circle","flatCoordinates","layout","applyProperties","closestPointXY","closestPoint","minSquaredDistance","dx","dy","squaredDistance","stride","delta","getRadius","sqrt","containsXY","getRadiusSquared_","getCenter","computeExtent","extent","getType","GeometryType","CIRCLE","intersectsExtent","circleExtent","getExtent","intersectsCoordinate","bind","setCenter","changed","setLayout","offset","deflate","ii","getCoordinates","setCoordinates","coordinates","setRadius","rotate","angle","anchor","getStride","translate","deltaX","deltaY","SimpleGeometry","transform","Mode","POINT","LINE_STRING","POLYGON","DrawEventType","DRAWSTART","DRAWEND","DRAWABORT","DrawEvent","type","feature","Event","Draw","pointerOptions","stopDown","shouldHandle_","downPx_","downTimeout_","lastDragTime_","pointerType_","freehand_","source_","features_","features","snapTolerance_","snapTolerance","type_","mode_","getMode","stopClick_","stopClick","minPoints_","minPoints","maxPoints_","maxPoints","Infinity","finishCondition_","finishCondition","geometryFunction","Constructor_1","mode_1","geometry","NaN","squaredLength","Point","LineString","Polygon","concat","geometryFunction_","dragVertexDelay_","dragVertexDelay","finishCoordinate_","sketchFeature_","sketchPoint_","sketchCoords_","sketchLine_","sketchLineCoords_","squaredClickTolerance_","clickTolerance","overlay_","Vector","useSpatialIndex","wrapX","getDefaultStyleFunction","updateWhileInteracting","geometryName_","geometryName","condition_","condition","freehandCondition_","freehand","freehandCondition","ACTIVE","updateState_","getOverlay","handleEvent","originalEvent","EventType","CONTEXTMENU","preventDefault","move","MapBrowserEventType","pass","POINTERDRAG","now","Date","clearTimeout","addToDrawing_","POINTERDOWN","getPointerCount","handlePointerMove_","pointerType","DBLCLICK","handleDownEvent","startDrawing_","setTimeout","MapBrowserEvent","handleUpEvent","atFinish_","finishDrawing","abortDrawing","stopPropagation","downPx","clickPx","modifyDrawing_","createOrUpdateSketchPoint_","at","potentiallyDone","potentiallyFinishCoordinates","mode","sketchCoords","finishCoordinate","finishPixel","getPixelFromCoordinate","sketchPointGeom","getGeometry","Feature","updateSketchFeatures_","createOrUpdateCustomSketchLine_","ring","getLinearRing","sketchLineGeom","getLayout","getFlatCoordinates","setGeometry","start","getView","setGeometryName","dispatchEvent","last","pop","removeLastPoint","splice","sketchFeature","abortDrawing_","MULTI_POINT","MultiPoint","MULTI_LINE_STRING","MultiLineString","MULTI_POLYGON","MultiPolygon","addFeature","getSource","clear","appendCoordinates","newDrawing","shift","ending","extend","lineString","sketchFeatures","overlaySource","addFeatures","active","getActive","Pointer","styles","that","ignoreCase","dotAll","unicode","factory","Control","ol_Observable","LayerGroup","classCallCheck","instance","Constructor","createClass","defineProperties","props","descriptor","enumerable","configurable","writable","defineProperty","key","protoProps","staticProps","object","property","receiver","Function","desc","getOwnPropertyDescriptor","parent","getPrototypeOf","getter","inherits","subClass","superClass","possibleConstructorReturn","self","ReferenceError","CSS_PREFIX","LayerSwitcher","_Control","assign","tipLabel","collapseTipLabel","activationMode","startActive","label","collapseLabel","groupSelectStyle","getGroupSelectStyle","reverse","mapListeners","hiddenClassName","isTouchDevice_","shownClassName","button","setAttribute","panel","enableTouchScroll_","textContent","classList","add","onclick","e","evt","window","contains","hidePanel","showPanel","onmouseover","onmouseout","relatedTarget","_this2","unByKey","renderPanel","on","remove","render_event","ensureTopVisibleBaseLayerShown","firstChild","removeChild","forEachRecursive","l","_idx","_a","setGroupVisibility","setChildVisibility","ul","renderLayers_","_changedLyr","rendercomplete_event","grp","lyrs","getLayers","getArray","groups","getGroupsAndLayers","isBaseGroup","forEach","descendantVisibility","getLayersArray","state","getVisible","every","v","setVisible","group","groupVisible","groupIndeterminate","lastVisibleBaseLyr","lyr","_arr","setVisible_","filterFn","layers","_lyr","idx","arr","visible","li","lyrTitle","checkboxId","uuid","btn","toggleFold_","id","checked","indeterminate","onchange","htmlFor","_input","name","rsl","getResolution","getMaxResolution","getMinResolution","elm","renderLayer_","fn","a","c","r","random","scrollStartPos","scrollTop","touches","pageY","createEvent","autocomplete","aria-labelledby","aria-hidden","class","data-bs-dismiss","aria-label","for","ref","tabindex","href","initial-values","burnModelDefaults","validation-schema","burnModelSchema","onClickBurnModelSave","as","handleReset","burnModel","placeholder","minlength","maxlength","burnWindow","plannedAcres","modelLoading","states","fips","locality","burnStatus","priority","$event","onClickBurnModelCancel","form","disabled","isSaveBurnDisabled","onClickSuccessModalManageArea","mapStyle","search","onSearchInputClick","onSearchInputFocus","onSearchInputKeyDown","onSearchButtonClick","icon","showSearches","searches","onSearchItemClick","to","infoPopupFeatureId","infoPopupFeatureName","onClickPopupClear","onClickPopupSave","data-bs-toggle","data-bs-target","BOTTOM_LEFT","BOTTOM_CENTER","BOTTOM_RIGHT","CENTER_LEFT","CENTER_CENTER","CENTER_RIGHT","TOP_LEFT","TOP_CENTER","TOP_RIGHT","Property","ELEMENT","MAP","OFFSET","POSITION","POSITIONING","Overlay","insertFirst","stopEvent","pointerEvents","autoPan","animation","autoPanAnimation","autoPanMargin","rendered","mapPostrenderListenerKey","handleElementChanged","handleMapChanged","handleOffsetChanged","handlePositionChanged","handlePositioningChanged","setElement","setOffset","setPositioning","positioning","OverlayPositioning","setPosition","getElement","getId","getOffset","getPosition","getPositioning","MapEventType","POSTRENDER","updatePixelPosition","getOverlayContainerStopEvent","getOverlayContainer","insertBefore","childNodes","performAutoPan","panIntoView","opt_panIntoViewOptions","getTargetElement","mapRect","getRect","getSize","overlayRect","panIntoViewOptions","myMargin","offsetLeft","offsetRight","offsetTop","offsetBottom","abs","getCenterInternal","centerPx","getPixelFromCoordinateInternal","newCenterPx","panOptions","animateInternal","duration","easing","size","box","getBoundingClientRect","offsetX","left","pageXOffset","offsetY","pageYOffset","isRendered","mapSize","updateRenderedPosition","posX","posY","msTransform","getOptions","SearchControl","methods","addDrawingInteraction","drawingInteraction","DrawingInteraction","drawingVectorSource","Style","image","CircleStyle","stroke","Stroke","color","fill","Fill","onDrawStart","burnMap","addInteraction","getBurnModel","console","debug","lonLat","$store","dispatch","then","yup","required","min","max","moreThan","typeError","reverseGeocodeResult","address","Region","Subregion","getBurnModelLonLat","longitude","Number","latitude","getBurnStyle","readyToBurn","burnStyleActiveReadyToBurn","burnStyleInactive","burnStyleUnspecified","burnStyleActive","load","formLoading","loadBurnMap","loadBurnGroup","loadDrawingInteraction","moveView","loadBaseLayers","baseMapsGroup","burnMapConfig","layerGroups","find","tileLayers","layer","isArray","baseMapLayers","subLayers","subLayer","baseMapLayer","url","xyz","endpoints","TileArcGISRest","subTileLayer","TileLayer","baseMapLayerGroup","GroupLayer","title","combine","tileLayer","controls","loadControls","overlays","loadOverlays","view","loadView","Map","layerSwitcher","addControl","infoPopupClickEventKey","onClickMapInfoPopup","loadBurnStyles","inactiveBurnsLayer","loadBurns","activeBurnsLayer","burnsGroupLayer","addLayer","myBurns","myBurnConditions","wkt","WKT","wktFeatures","filter","myBurn","fields","readFeature","Geometry","dataProjection","featureProjection","setId","properties","myBurnCondition","burnAreaId","setProperties","vectorSource","VectorSource","VectorLayer","svg","IconStyle","opacity","src","btoa","mousePositionControl","searchControl","$refs","scaleBarControl","DrawBurnPointControl","optOptions","drawBurnPointButton","cancelBurnPointButton","onClickBurnPointDrawStart","onClickBurnPointDrawCancel","defaultControls","drawingVectorLayer","infoPopupOverlay","infoPopupContainer","infoPopupCloser","onClickInfoPopupClose","popupOverlay","popupContainer","popupCloser","onClickPopupClose","xMax","xMin","yMax","yMin","View","fromLonLat","zoom","burnId","setZoom","burnUnitMapConfig","values","resetForm","editBurnModal","hide","burnDate","preferredConditions","Modal","successModal","show","drawing","blur","singleClickEventKey","onClickMap","removeInteraction","toLonLat","hideSearches","forEachFeatureAtPixel","$router","params","myNewBurn","setBurnConditions","myBurnStat","myStats","weatherConditionDates","getWeatherConditionDates","weatherConditions","weatherCondition","flat","preferredCondition","preferredConditionSet","isPreferredConditionSet","preferredConditionMet","isPreferredConditionMet","burnConditions","burnConditionStartDate","startDate","burnConditionWeatherConditions","weatherConditionStartDate","valueOf","score","requiredPreferredConditionsSet","w","requiredPreferredConditionsMet","optionalPreferredConditionsSet","optionalPreferredConditionsMet","endDate","isScoreReadyToBurn","burnCondition","bc","mixins","components","VForm","VField","ErrorMessage","computed","geocodeResults","data","burnModelValidationResults","drawBurnPointButtonVisible","cancelBurnPointButtonVisible","infoPopupContent","popupContent","watch","candidates","fit","xmin","ymin","xmax","ymax","mounted","$route","query","setup","store","getters","commit","searchValue","__exports__","redefine","wellKnownSymbol","createNonEnumerableProperty","SPECIES","RegExpPrototype","REPLACE_SUPPORTS_NAMED_GROUPS","REPLACE_KEEPS_$0","REPLACE","REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE","SPLIT_WORKS_WITH_OVERWRITTEN_EXEC","originalExec","apply","split","KEY","sham","SYMBOL","DELEGATES_TO_SYMBOL","DELEGATES_TO_EXEC","execCalled","nativeRegExpMethod","nativeMethod","arg2","forceStringMethod","$exec","stringMethod","regexMethod","string","arg"],"mapp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AqB,IAAIJ,GACzB7O,EAAUvnB,EAAKo2B,EAAQ,GAAGF,IAAM,SAAUO,EAAc91B,EAAQ0B,EAAKq0B,EAAMC,GAC7E,IAAIC,EAAQj2B,EAAOX,KACnB,OAAI42B,IAAU/2B,GAAc+2B,IAAUnB,EAAgBz1B,KAChDq2B,IAAwBM,EAInB,CAAE11B,MAAM,EAAMC,MAAOs1B,EAAmB76B,KAAKgF,EAAQ0B,EAAKq0B,IAE5D,CAAEz1B,MAAM,EAAMC,MAAOu1B,EAAa96B,KAAK0G,EAAK1B,EAAQ+1B,IAEtD,CAAEz1B,MAAM,KACd,CACD00B,iBAAkBA,EAClBE,6CAA8CA,IAE5CgB,EAAetP,EAAQ,GACvBuP,EAAcvP,EAAQ,GAE1B8N,EAASt0B,OAAOtF,UAAWy6B,EAAKW,GAChCxB,EAASI,EAAiBW,EAAkB,GAAVjzB,EAG9B,SAAU4zB,EAAQC,GAAO,OAAOF,EAAYn7B,KAAKo7B,EAAQl7B,KAAMm7B,IAG/D,SAAUD,GAAU,OAAOD,EAAYn7B,KAAKo7B,EAAQl7B,QAItDs6B,GAAMZ,EAA4BE,EAAgBW,GAAS,QAAQ","file":"js/burnmap.f5a3534f.js","sourcesContent":["/**\n * @module ol/control/MousePosition\n */\nvar __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\nimport Control from './Control.js';\nimport EventType from '../pointer/EventType.js';\nimport { getChangeEventType } from '../Object.js';\nimport { get as getProjection, getTransformFromProjections, getUserProjection, identityTransform, } from '../proj.js';\nimport { listen } from '../events.js';\n/**\n * @type {string}\n */\nvar PROJECTION = 'projection';\n/**\n * @type {string}\n */\nvar COORDINATE_FORMAT = 'coordinateFormat';\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-mouse-position'] CSS class name.\n * @property {import(\"../coordinate.js\").CoordinateFormat} [coordinateFormat] Coordinate format.\n * @property {import(\"../proj.js\").ProjectionLike} [projection] Projection. Default is the view projection.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the\n * control should be re-rendered. This is called in a `requestAnimationFrame`\n * callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the\n * control to be rendered outside of the map's viewport.\n * @property {string} [undefinedHTML=' '] Markup to show when coordinates are not\n * available (e.g. when the pointer leaves the map viewport). By default, the last position\n * will be replaced with `' '` (` `) when the pointer leaves the viewport. To\n * retain the last rendered position, set this option to something falsey (like an empty\n * string `''`).\n */\n/**\n * @classdesc\n * A control to show the 2D coordinates of the mouse cursor. By default, these\n * are in the view projection, but can be in any supported projection.\n * By default the control is shown in the top right corner of the map, but this\n * can be changed by using the css selector `.ol-mouse-position`.\n *\n * On touch devices, which usually do not have a mouse cursor, the coordinates\n * of the currently touched position are shown.\n *\n * @api\n */\nvar MousePosition = /** @class */ (function (_super) {\n __extends(MousePosition, _super);\n /**\n * @param {Options=} opt_options Mouse position options.\n */\n function MousePosition(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n var element = document.createElement('div');\n element.className =\n options.className !== undefined ? options.className : 'ol-mouse-position';\n _this = _super.call(this, {\n element: element,\n render: options.render,\n target: options.target,\n }) || this;\n _this.addEventListener(getChangeEventType(PROJECTION), _this.handleProjectionChanged_);\n if (options.coordinateFormat) {\n _this.setCoordinateFormat(options.coordinateFormat);\n }\n if (options.projection) {\n _this.setProjection(options.projection);\n }\n /**\n * @private\n * @type {string}\n */\n _this.undefinedHTML_ =\n options.undefinedHTML !== undefined ? options.undefinedHTML : ' ';\n /**\n * @private\n * @type {boolean}\n */\n _this.renderOnMouseOut_ = !!_this.undefinedHTML_;\n /**\n * @private\n * @type {string}\n */\n _this.renderedHTML_ = element.innerHTML;\n /**\n * @private\n * @type {?import(\"../proj/Projection.js\").default}\n */\n _this.mapProjection_ = null;\n /**\n * @private\n * @type {?import(\"../proj.js\").TransformFunction}\n */\n _this.transform_ = null;\n return _this;\n }\n /**\n * @private\n */\n MousePosition.prototype.handleProjectionChanged_ = function () {\n this.transform_ = null;\n };\n /**\n * Return the coordinate format type used to render the current position or\n * undefined.\n * @return {import(\"../coordinate.js\").CoordinateFormat|undefined} The format to render the current\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.getCoordinateFormat = function () {\n return /** @type {import(\"../coordinate.js\").CoordinateFormat|undefined} */ (this.get(COORDINATE_FORMAT));\n };\n /**\n * Return the projection that is used to report the mouse position.\n * @return {import(\"../proj/Projection.js\").default|undefined} The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.getProjection = function () {\n return /** @type {import(\"../proj/Projection.js\").default|undefined} */ (this.get(PROJECTION));\n };\n /**\n * @param {MouseEvent} event Browser event.\n * @protected\n */\n MousePosition.prototype.handleMouseMove = function (event) {\n var map = this.getMap();\n this.updateHTML_(map.getEventPixel(event));\n };\n /**\n * @param {Event} event Browser event.\n * @protected\n */\n MousePosition.prototype.handleMouseOut = function (event) {\n this.updateHTML_(null);\n };\n /**\n * Remove the control from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n * @api\n */\n MousePosition.prototype.setMap = function (map) {\n _super.prototype.setMap.call(this, map);\n if (map) {\n var viewport = map.getViewport();\n this.listenerKeys.push(listen(viewport, EventType.POINTERMOVE, this.handleMouseMove, this));\n if (this.renderOnMouseOut_) {\n this.listenerKeys.push(listen(viewport, EventType.POINTEROUT, this.handleMouseOut, this));\n }\n }\n };\n /**\n * Set the coordinate format type used to render the current position.\n * @param {import(\"../coordinate.js\").CoordinateFormat} format The format to render the current\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.setCoordinateFormat = function (format) {\n this.set(COORDINATE_FORMAT, format);\n };\n /**\n * Set the projection that is used to report the mouse position.\n * @param {import(\"../proj.js\").ProjectionLike} projection The projection to report mouse\n * position in.\n * @observable\n * @api\n */\n MousePosition.prototype.setProjection = function (projection) {\n this.set(PROJECTION, getProjection(projection));\n };\n /**\n * @param {?import(\"../pixel.js\").Pixel} pixel Pixel.\n * @private\n */\n MousePosition.prototype.updateHTML_ = function (pixel) {\n var html = this.undefinedHTML_;\n if (pixel && this.mapProjection_) {\n if (!this.transform_) {\n var projection = this.getProjection();\n if (projection) {\n this.transform_ = getTransformFromProjections(this.mapProjection_, projection);\n }\n else {\n this.transform_ = identityTransform;\n }\n }\n var map = this.getMap();\n var coordinate = map.getCoordinateFromPixelInternal(pixel);\n if (coordinate) {\n var userProjection = getUserProjection();\n if (userProjection) {\n this.transform_ = getTransformFromProjections(this.mapProjection_, userProjection);\n }\n this.transform_(coordinate, coordinate);\n var coordinateFormat = this.getCoordinateFormat();\n if (coordinateFormat) {\n html = coordinateFormat(coordinate);\n }\n else {\n html = coordinate.toString();\n }\n }\n }\n if (!this.renderedHTML_ || html !== this.renderedHTML_) {\n this.element.innerHTML = html;\n this.renderedHTML_ = html;\n }\n };\n /**\n * Update the projection. Rendering of the coordinates is done in\n * `handleMouseMove` and `handleMouseUp`.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n MousePosition.prototype.render = function (mapEvent) {\n var frameState = mapEvent.frameState;\n if (!frameState) {\n this.mapProjection_ = null;\n }\n else {\n if (this.mapProjection_ != frameState.viewState.projection) {\n this.mapProjection_ = frameState.viewState.projection;\n this.transform_ = null;\n }\n }\n };\n return MousePosition;\n}(Control));\nexport default MousePosition;\n//# sourceMappingURL=MousePosition.js.map","// `SameValue` abstract operation\n// https://tc39.es/ecma262/#sec-samevalue\n// eslint-disable-next-line es/no-object-is -- safe\nmodule.exports = Object.is || function is(x, y) {\n // eslint-disable-next-line no-self-compare -- NaN check\n return x === y ? x !== 0 || 1 / x === 1 / y : x != x && y != y;\n};\n","var classof = require('./classof-raw');\nvar regexpExec = require('./regexp-exec');\n\n// `RegExpExec` abstract operation\n// https://tc39.es/ecma262/#sec-regexpexec\nmodule.exports = function (R, S) {\n var exec = R.exec;\n if (typeof exec === 'function') {\n var result = exec.call(R, S);\n if (typeof result !== 'object') {\n throw TypeError('RegExp exec method returned something other than an Object or null');\n }\n return result;\n }\n\n if (classof(R) !== 'RegExp') {\n throw TypeError('RegExp#exec called on incompatible receiver');\n }\n\n return regexpExec.call(R, S);\n};\n\n","export * from \"-!../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../node_modules/css-loader/dist/cjs.js??ref--8-oneOf-1-1!../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/stylePostLoader.js!../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/index.js??ref--0-1!./BurnMap.vue?vue&type=style&index=0&id=61bc13e7&lang=scss&scoped=true\"","'use strict';\nvar fixRegExpWellKnownSymbolLogic = require('../internals/fix-regexp-well-known-symbol-logic');\nvar anObject = require('../internals/an-object');\nvar requireObjectCoercible = require('../internals/require-object-coercible');\nvar sameValue = require('../internals/same-value');\nvar regExpExec = require('../internals/regexp-exec-abstract');\n\n// @@search logic\nfixRegExpWellKnownSymbolLogic('search', 1, function (SEARCH, nativeSearch, maybeCallNative) {\n return [\n // `String.prototype.search` method\n // https://tc39.es/ecma262/#sec-string.prototype.search\n function search(regexp) {\n var O = requireObjectCoercible(this);\n var searcher = regexp == undefined ? undefined : regexp[SEARCH];\n return searcher !== undefined ? searcher.call(regexp, O) : new RegExp(regexp)[SEARCH](String(O));\n },\n // `RegExp.prototype[@@search]` method\n // https://tc39.es/ecma262/#sec-regexp.prototype-@@search\n function (regexp) {\n var res = maybeCallNative(nativeSearch, regexp, this);\n if (res.done) return res.value;\n\n var rx = anObject(regexp);\n var S = String(this);\n\n var previousLastIndex = rx.lastIndex;\n if (!sameValue(previousLastIndex, 0)) rx.lastIndex = 0;\n var result = regExpExec(rx, S);\n if (!sameValue(rx.lastIndex, previousLastIndex)) rx.lastIndex = previousLastIndex;\n return result === null ? -1 : result.index;\n }\n ];\n});\n","'use strict';\n/* eslint-disable regexp/no-assertion-capturing-group, regexp/no-empty-group, regexp/no-lazy-ends -- testing */\n/* eslint-disable regexp/no-useless-quantifier -- testing */\nvar regexpFlags = require('./regexp-flags');\nvar stickyHelpers = require('./regexp-sticky-helpers');\nvar shared = require('./shared');\n\nvar nativeExec = RegExp.prototype.exec;\nvar nativeReplace = shared('native-string-replace', String.prototype.replace);\n\nvar patchedExec = nativeExec;\n\nvar UPDATES_LAST_INDEX_WRONG = (function () {\n var re1 = /a/;\n var re2 = /b*/g;\n nativeExec.call(re1, 'a');\n nativeExec.call(re2, 'a');\n return re1.lastIndex !== 0 || re2.lastIndex !== 0;\n})();\n\nvar UNSUPPORTED_Y = stickyHelpers.UNSUPPORTED_Y || stickyHelpers.BROKEN_CARET;\n\n// nonparticipating capturing group, copied from es5-shim's String#split patch.\nvar NPCG_INCLUDED = /()??/.exec('')[1] !== undefined;\n\nvar PATCH = UPDATES_LAST_INDEX_WRONG || NPCG_INCLUDED || UNSUPPORTED_Y;\n\nif (PATCH) {\n patchedExec = function exec(str) {\n var re = this;\n var lastIndex, reCopy, match, i;\n var sticky = UNSUPPORTED_Y && re.sticky;\n var flags = regexpFlags.call(re);\n var source = re.source;\n var charsAdded = 0;\n var strCopy = str;\n\n if (sticky) {\n flags = flags.replace('y', '');\n if (flags.indexOf('g') === -1) {\n flags += 'g';\n }\n\n strCopy = String(str).slice(re.lastIndex);\n // Support anchored sticky behavior.\n if (re.lastIndex > 0 && (!re.multiline || re.multiline && str[re.lastIndex - 1] !== '\\n')) {\n source = '(?: ' + source + ')';\n strCopy = ' ' + strCopy;\n charsAdded++;\n }\n // ^(? + rx + ) is needed, in combination with some str slicing, to\n // simulate the 'y' flag.\n reCopy = new RegExp('^(?:' + source + ')', flags);\n }\n\n if (NPCG_INCLUDED) {\n reCopy = new RegExp('^' + source + '$(?!\\\\s)', flags);\n }\n if (UPDATES_LAST_INDEX_WRONG) lastIndex = re.lastIndex;\n\n match = nativeExec.call(sticky ? reCopy : re, strCopy);\n\n if (sticky) {\n if (match) {\n match.input = match.input.slice(charsAdded);\n match[0] = match[0].slice(charsAdded);\n match.index = re.lastIndex;\n re.lastIndex += match[0].length;\n } else re.lastIndex = 0;\n } else if (UPDATES_LAST_INDEX_WRONG && match) {\n re.lastIndex = re.global ? match.index + match[0].length : lastIndex;\n }\n if (NPCG_INCLUDED && match && match.length > 1) {\n // Fix browsers whose `exec` methods don't consistently return `undefined`\n // for NPCG, like IE8. NOTE: This doesn' work for /(.?)?/\n nativeReplace.call(match[0], reCopy, function () {\n for (i = 1; i < arguments.length - 2; i++) {\n if (arguments[i] === undefined) match[i] = undefined;\n }\n });\n }\n\n return match;\n };\n}\n\nmodule.exports = patchedExec;\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/control/ScaleLine\n */\nimport Control from './Control.js';\nimport ProjUnits from '../proj/Units.js';\nimport { CLASS_UNSELECTABLE } from '../css.js';\nimport { METERS_PER_UNIT, getPointResolution } from '../proj.js';\nimport { assert } from '../asserts.js';\nimport { getChangeEventType } from '../Object.js';\n/**\n * @type {string}\n */\nvar UNITS_PROP = 'units';\n/**\n * Units for the scale line. Supported values are `'degrees'`, `'imperial'`,\n * `'nautical'`, `'metric'`, `'us'`.\n * @enum {string}\n */\nexport var Units = {\n DEGREES: 'degrees',\n IMPERIAL: 'imperial',\n NAUTICAL: 'nautical',\n METRIC: 'metric',\n US: 'us',\n};\n/**\n * @const\n * @type {Array}\n */\nvar LEADING_DIGITS = [1, 2, 5];\n/**\n * @const\n * @type {number}\n */\nvar DEFAULT_DPI = 25.4 / 0.28;\n/**\n * @typedef {Object} Options\n * @property {string} [className='ol-scale-line'] CSS Class name.\n * @property {number} [minWidth=64] Minimum width in pixels at the OGC default dpi. The width will be\n * adjusted to match the dpi used.\n * @property {function(import(\"../MapEvent.js\").default):void} [render] Function called when the control\n * should be re-rendered. This is called in a `requestAnimationFrame` callback.\n * @property {HTMLElement|string} [target] Specify a target if you want the control\n * to be rendered outside of the map's viewport.\n * @property {import(\"./ScaleLine.js\").Units|string} [units='metric'] Units.\n * @property {boolean} [bar=false] Render scalebars instead of a line.\n * @property {number} [steps=4] Number of steps the scalebar should use. Use even numbers\n * for best results. Only applies when `bar` is `true`.\n * @property {boolean} [text=false] Render the text scale above of the scalebar. Only applies\n * when `bar` is `true`.\n * @property {number|undefined} [dpi=undefined] dpi of output device such as printer. Only applies\n * when `bar` is `true`. If undefined the OGC default screen pixel size of 0.28mm will be assumed.\n */\n/**\n * @classdesc\n * A control displaying rough y-axis distances, calculated for the center of the\n * viewport. For conformal projections (e.g. EPSG:3857, the default view\n * projection in OpenLayers), the scale is valid for all directions.\n * No scale line will be shown when the y-axis distance of a pixel at the\n * viewport center cannot be calculated in the view projection.\n * By default the scale line will show in the bottom left portion of the map,\n * but this can be changed by using the css selector `.ol-scale-line`.\n * When specifying `bar` as `true`, a scalebar will be rendered instead\n * of a scaleline.\n *\n * @api\n */\nvar ScaleLine = /** @class */ (function (_super) {\n __extends(ScaleLine, _super);\n /**\n * @param {Options=} opt_options Scale line options.\n */\n function ScaleLine(opt_options) {\n var _this = this;\n var options = opt_options ? opt_options : {};\n var className = options.className !== undefined\n ? options.className\n : options.bar\n ? 'ol-scale-bar'\n : 'ol-scale-line';\n _this = _super.call(this, {\n element: document.createElement('div'),\n render: options.render,\n target: options.target,\n }) || this;\n /**\n * @private\n * @type {HTMLElement}\n */\n _this.innerElement_ = document.createElement('div');\n _this.innerElement_.className = className + '-inner';\n _this.element.className = className + ' ' + CLASS_UNSELECTABLE;\n _this.element.appendChild(_this.innerElement_);\n /**\n * @private\n * @type {?import(\"../View.js\").State}\n */\n _this.viewState_ = null;\n /**\n * @private\n * @type {number}\n */\n _this.minWidth_ = options.minWidth !== undefined ? options.minWidth : 64;\n /**\n * @private\n * @type {boolean}\n */\n _this.renderedVisible_ = false;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.renderedWidth_ = undefined;\n /**\n * @private\n * @type {string}\n */\n _this.renderedHTML_ = '';\n _this.addEventListener(getChangeEventType(UNITS_PROP), _this.handleUnitsChanged_);\n _this.setUnits(options.units || Units.METRIC);\n /**\n * @private\n * @type {boolean}\n */\n _this.scaleBar_ = options.bar || false;\n /**\n * @private\n * @type {number}\n */\n _this.scaleBarSteps_ = options.steps || 4;\n /**\n * @private\n * @type {boolean}\n */\n _this.scaleBarText_ = options.text || false;\n /**\n * @private\n * @type {number|undefined}\n */\n _this.dpi_ = options.dpi || undefined;\n return _this;\n }\n /**\n * Return the units to use in the scale line.\n * @return {import(\"./ScaleLine.js\").Units} The units\n * to use in the scale line.\n * @observable\n * @api\n */\n ScaleLine.prototype.getUnits = function () {\n return this.get(UNITS_PROP);\n };\n /**\n * @private\n */\n ScaleLine.prototype.handleUnitsChanged_ = function () {\n this.updateElement_();\n };\n /**\n * Set the units to use in the scale line.\n * @param {import(\"./ScaleLine.js\").Units} units The units to use in the scale line.\n * @observable\n * @api\n */\n ScaleLine.prototype.setUnits = function (units) {\n this.set(UNITS_PROP, units);\n };\n /**\n * Specify the dpi of output device such as printer.\n * @param {number|undefined} dpi The dpi of output device.\n * @api\n */\n ScaleLine.prototype.setDpi = function (dpi) {\n this.dpi_ = dpi;\n };\n /**\n * @private\n */\n ScaleLine.prototype.updateElement_ = function () {\n var viewState = this.viewState_;\n if (!viewState) {\n if (this.renderedVisible_) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n }\n return;\n }\n var center = viewState.center;\n var projection = viewState.projection;\n var units = this.getUnits();\n var pointResolutionUnits = units == Units.DEGREES ? ProjUnits.DEGREES : ProjUnits.METERS;\n var pointResolution = getPointResolution(projection, viewState.resolution, center, pointResolutionUnits);\n var minWidth = (this.minWidth_ * (this.dpi_ || DEFAULT_DPI)) / DEFAULT_DPI;\n var nominalCount = minWidth * pointResolution;\n var suffix = '';\n if (units == Units.DEGREES) {\n var metersPerDegree = METERS_PER_UNIT[ProjUnits.DEGREES];\n nominalCount *= metersPerDegree;\n if (nominalCount < metersPerDegree / 60) {\n suffix = '\\u2033'; // seconds\n pointResolution *= 3600;\n }\n else if (nominalCount < metersPerDegree) {\n suffix = '\\u2032'; // minutes\n pointResolution *= 60;\n }\n else {\n suffix = '\\u00b0'; // degrees\n }\n }\n else if (units == Units.IMPERIAL) {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution /= 0.0254;\n }\n else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.3048;\n }\n else {\n suffix = 'mi';\n pointResolution /= 1609.344;\n }\n }\n else if (units == Units.NAUTICAL) {\n pointResolution /= 1852;\n suffix = 'nm';\n }\n else if (units == Units.METRIC) {\n if (nominalCount < 0.001) {\n suffix = 'μm';\n pointResolution *= 1000000;\n }\n else if (nominalCount < 1) {\n suffix = 'mm';\n pointResolution *= 1000;\n }\n else if (nominalCount < 1000) {\n suffix = 'm';\n }\n else {\n suffix = 'km';\n pointResolution /= 1000;\n }\n }\n else if (units == Units.US) {\n if (nominalCount < 0.9144) {\n suffix = 'in';\n pointResolution *= 39.37;\n }\n else if (nominalCount < 1609.344) {\n suffix = 'ft';\n pointResolution /= 0.30480061;\n }\n else {\n suffix = 'mi';\n pointResolution /= 1609.3472;\n }\n }\n else {\n assert(false, 33); // Invalid units\n }\n var i = 3 * Math.floor(Math.log(minWidth * pointResolution) / Math.log(10));\n var count, width, decimalCount;\n while (true) {\n decimalCount = Math.floor(i / 3);\n var decimal = Math.pow(10, decimalCount);\n count = LEADING_DIGITS[((i % 3) + 3) % 3] * decimal;\n width = Math.round(count / pointResolution);\n if (isNaN(width)) {\n this.element.style.display = 'none';\n this.renderedVisible_ = false;\n return;\n }\n else if (width >= minWidth) {\n break;\n }\n ++i;\n }\n var html;\n if (this.scaleBar_) {\n html = this.createScaleBar(width, count, suffix);\n }\n else {\n html = count.toFixed(decimalCount < 0 ? -decimalCount : 0) + ' ' + suffix;\n }\n if (this.renderedHTML_ != html) {\n this.innerElement_.innerHTML = html;\n this.renderedHTML_ = html;\n }\n if (this.renderedWidth_ != width) {\n this.innerElement_.style.width = width + 'px';\n this.renderedWidth_ = width;\n }\n if (!this.renderedVisible_) {\n this.element.style.display = '';\n this.renderedVisible_ = true;\n }\n };\n /**\n * @private\n * @param {number} width The current width of the scalebar.\n * @param {number} scale The current scale.\n * @param {string} suffix The suffix to append to the scale text.\n * @returns {string} The stringified HTML of the scalebar.\n */\n ScaleLine.prototype.createScaleBar = function (width, scale, suffix) {\n var mapScale = '1 : ' + Math.round(this.getScaleForResolution()).toLocaleString();\n var scaleSteps = [];\n var stepWidth = width / this.scaleBarSteps_;\n var backgroundColor = '#ffffff';\n for (var i = 0; i < this.scaleBarSteps_; i++) {\n if (i === 0) {\n // create the first marker at position 0\n scaleSteps.push(this.createMarker('absolute', i));\n }\n scaleSteps.push('
' +\n '
' +\n '
' +\n this.createMarker('relative', i) +\n /*render text every second step, except when only 2 steps */\n (i % 2 === 0 || this.scaleBarSteps_ === 2\n ? this.createStepText(i, width, false, scale, suffix)\n : '') +\n '
');\n if (i === this.scaleBarSteps_ - 1) {\n {\n /*render text at the end */\n }\n scaleSteps.push(this.createStepText(i + 1, width, true, scale, suffix));\n }\n // switch colors of steps between black and white\n if (backgroundColor === '#ffffff') {\n backgroundColor = '#000000';\n }\n else {\n backgroundColor = '#ffffff';\n }\n }\n var scaleBarText;\n if (this.scaleBarText_) {\n scaleBarText =\n '
' +\n mapScale +\n '
';\n }\n else {\n scaleBarText = '';\n }\n var container = '
' +\n scaleBarText +\n scaleSteps.join('') +\n '
';\n return container;\n };\n /**\n * Creates a marker at given position\n * @param {string} position - The position, absolute or relative\n * @param {number} i - The iterator\n * @returns {string} The stringified div containing the marker\n */\n ScaleLine.prototype.createMarker = function (position, i) {\n var top = position === 'absolute' ? 3 : -10;\n return ('
');\n };\n /**\n * Creates the label for a marker marker at given position\n * @param {number} i - The iterator\n * @param {number} width - The width the scalebar will currently use\n * @param {boolean} isLast - Flag indicating if we add the last step text\n * @param {number} scale - The current scale for the whole scalebar\n * @param {string} suffix - The suffix for the scale\n * @returns {string} The stringified div containing the step text\n */\n ScaleLine.prototype.createStepText = function (i, width, isLast, scale, suffix) {\n var length = i === 0 ? 0 : Math.round((scale / this.scaleBarSteps_) * i * 100) / 100;\n var lengthString = length + (i === 0 ? '' : ' ' + suffix);\n var margin = i === 0 ? -3 : (width / this.scaleBarSteps_) * -1;\n var minWidth = i === 0 ? 0 : (width / this.scaleBarSteps_) * 2;\n return ('
' +\n lengthString +\n '
');\n };\n /**\n * Returns the appropriate scale for the given resolution and units.\n * @return {number} The appropriate scale.\n */\n ScaleLine.prototype.getScaleForResolution = function () {\n var resolution = getPointResolution(this.viewState_.projection, this.viewState_.resolution, this.viewState_.center);\n var dpi = this.dpi_ || DEFAULT_DPI;\n var mpu = this.viewState_.projection.getMetersPerUnit();\n var inchesPerMeter = 1000 / 25.4;\n return parseFloat(resolution.toString()) * mpu * inchesPerMeter * dpi;\n };\n /**\n * Update the scale line element.\n * @param {import(\"../MapEvent.js\").default} mapEvent Map event.\n * @override\n */\n ScaleLine.prototype.render = function (mapEvent) {\n var frameState = mapEvent.frameState;\n if (!frameState) {\n this.viewState_ = null;\n }\n else {\n this.viewState_ = frameState.viewState;\n }\n this.updateElement_();\n };\n return ScaleLine;\n}(Control));\nexport default ScaleLine;\n//# sourceMappingURL=ScaleLine.js.map","'use strict';\n\nvar fails = require('./fails');\n\n// babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError,\n// so we use an intermediate function.\nfunction RE(s, f) {\n return RegExp(s, f);\n}\n\nexports.UNSUPPORTED_Y = fails(function () {\n // babel-minify transpiles RegExp('a', 'y') -> /a/y and it causes SyntaxError\n var re = RE('a', 'y');\n re.lastIndex = 2;\n return re.exec('abcd') != null;\n});\n\nexports.BROKEN_CARET = fails(function () {\n // https://bugzilla.mozilla.org/show_bug.cgi?id=773687\n var re = RE('^r', 'gy');\n re.lastIndex = 2;\n return re.exec('str') != null;\n});\n","'use strict';\nvar $ = require('../internals/export');\nvar exec = require('../internals/regexp-exec');\n\n// `RegExp.prototype.exec` method\n// https://tc39.es/ecma262/#sec-regexp.prototype.exec\n$({ target: 'RegExp', proto: true, forced: /./.exec !== exec }, {\n exec: exec\n});\n","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/geom/Circle\n */\nimport GeometryType from './GeometryType.js';\nimport SimpleGeometry from './SimpleGeometry.js';\nimport { createOrUpdate, forEachCorner, intersects } from '../extent.js';\nimport { deflateCoordinate } from './flat/deflate.js';\nimport { rotate, translate } from './flat/transform.js';\n/**\n * @classdesc\n * Circle geometry.\n *\n * @api\n */\nvar Circle = /** @class */ (function (_super) {\n __extends(Circle, _super);\n /**\n * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n * For internal use, flat coordinates in combination with `opt_layout` and no\n * `opt_radius` are also accepted.\n * @param {number=} opt_radius Radius.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n */\n function Circle(center, opt_radius, opt_layout) {\n var _this = _super.call(this) || this;\n if (opt_layout !== undefined && opt_radius === undefined) {\n _this.setFlatCoordinates(opt_layout, center);\n }\n else {\n var radius = opt_radius ? opt_radius : 0;\n _this.setCenterAndRadius(center, radius, opt_layout);\n }\n return _this;\n }\n /**\n * Make a complete copy of the geometry.\n * @return {!Circle} Clone.\n * @api\n */\n Circle.prototype.clone = function () {\n var circle = new Circle(this.flatCoordinates.slice(), undefined, this.layout);\n circle.applyProperties(this);\n return circle;\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @param {import(\"../coordinate.js\").Coordinate} closestPoint Closest point.\n * @param {number} minSquaredDistance Minimum squared distance.\n * @return {number} Minimum squared distance.\n */\n Circle.prototype.closestPointXY = function (x, y, closestPoint, minSquaredDistance) {\n var flatCoordinates = this.flatCoordinates;\n var dx = x - flatCoordinates[0];\n var dy = y - flatCoordinates[1];\n var squaredDistance = dx * dx + dy * dy;\n if (squaredDistance < minSquaredDistance) {\n if (squaredDistance === 0) {\n for (var i = 0; i < this.stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n }\n else {\n var delta = this.getRadius() / Math.sqrt(squaredDistance);\n closestPoint[0] = flatCoordinates[0] + delta * dx;\n closestPoint[1] = flatCoordinates[1] + delta * dy;\n for (var i = 2; i < this.stride; ++i) {\n closestPoint[i] = flatCoordinates[i];\n }\n }\n closestPoint.length = this.stride;\n return squaredDistance;\n }\n else {\n return minSquaredDistance;\n }\n };\n /**\n * @param {number} x X.\n * @param {number} y Y.\n * @return {boolean} Contains (x, y).\n */\n Circle.prototype.containsXY = function (x, y) {\n var flatCoordinates = this.flatCoordinates;\n var dx = x - flatCoordinates[0];\n var dy = y - flatCoordinates[1];\n return dx * dx + dy * dy <= this.getRadiusSquared_();\n };\n /**\n * Return the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n * @return {import(\"../coordinate.js\").Coordinate} Center.\n * @api\n */\n Circle.prototype.getCenter = function () {\n return this.flatCoordinates.slice(0, this.stride);\n };\n /**\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @protected\n * @return {import(\"../extent.js\").Extent} extent Extent.\n */\n Circle.prototype.computeExtent = function (extent) {\n var flatCoordinates = this.flatCoordinates;\n var radius = flatCoordinates[this.stride] - flatCoordinates[0];\n return createOrUpdate(flatCoordinates[0] - radius, flatCoordinates[1] - radius, flatCoordinates[0] + radius, flatCoordinates[1] + radius, extent);\n };\n /**\n * Return the radius of the circle.\n * @return {number} Radius.\n * @api\n */\n Circle.prototype.getRadius = function () {\n return Math.sqrt(this.getRadiusSquared_());\n };\n /**\n * @private\n * @return {number} Radius squared.\n */\n Circle.prototype.getRadiusSquared_ = function () {\n var dx = this.flatCoordinates[this.stride] - this.flatCoordinates[0];\n var dy = this.flatCoordinates[this.stride + 1] - this.flatCoordinates[1];\n return dx * dx + dy * dy;\n };\n /**\n * Get the type of this geometry.\n * @return {import(\"./GeometryType.js\").default} Geometry type.\n * @api\n */\n Circle.prototype.getType = function () {\n return GeometryType.CIRCLE;\n };\n /**\n * Test if the geometry and the passed extent intersect.\n * @param {import(\"../extent.js\").Extent} extent Extent.\n * @return {boolean} `true` if the geometry and the extent intersect.\n * @api\n */\n Circle.prototype.intersectsExtent = function (extent) {\n var circleExtent = this.getExtent();\n if (intersects(extent, circleExtent)) {\n var center = this.getCenter();\n if (extent[0] <= center[0] && extent[2] >= center[0]) {\n return true;\n }\n if (extent[1] <= center[1] && extent[3] >= center[1]) {\n return true;\n }\n return forEachCorner(extent, this.intersectsCoordinate.bind(this));\n }\n return false;\n };\n /**\n * Set the center of the circle as {@link module:ol/coordinate~Coordinate coordinate}.\n * @param {import(\"../coordinate.js\").Coordinate} center Center.\n * @api\n */\n Circle.prototype.setCenter = function (center) {\n var stride = this.stride;\n var radius = this.flatCoordinates[stride] - this.flatCoordinates[0];\n var flatCoordinates = center.slice();\n flatCoordinates[stride] = flatCoordinates[0] + radius;\n for (var i = 1; i < stride; ++i) {\n flatCoordinates[stride + i] = center[i];\n }\n this.setFlatCoordinates(this.layout, flatCoordinates);\n this.changed();\n };\n /**\n * Set the center (as {@link module:ol/coordinate~Coordinate coordinate}) and the radius (as\n * number) of the circle.\n * @param {!import(\"../coordinate.js\").Coordinate} center Center.\n * @param {number} radius Radius.\n * @param {import(\"./GeometryLayout.js\").default=} opt_layout Layout.\n * @api\n */\n Circle.prototype.setCenterAndRadius = function (center, radius, opt_layout) {\n this.setLayout(opt_layout, center, 0);\n if (!this.flatCoordinates) {\n this.flatCoordinates = [];\n }\n /** @type {Array} */\n var flatCoordinates = this.flatCoordinates;\n var offset = deflateCoordinate(flatCoordinates, 0, center, this.stride);\n flatCoordinates[offset++] = flatCoordinates[0] + radius;\n for (var i = 1, ii = this.stride; i < ii; ++i) {\n flatCoordinates[offset++] = flatCoordinates[i];\n }\n flatCoordinates.length = offset;\n this.changed();\n };\n Circle.prototype.getCoordinates = function () {\n return null;\n };\n Circle.prototype.setCoordinates = function (coordinates, opt_layout) { };\n /**\n * Set the radius of the circle. The radius is in the units of the projection.\n * @param {number} radius Radius.\n * @api\n */\n Circle.prototype.setRadius = function (radius) {\n this.flatCoordinates[this.stride] = this.flatCoordinates[0] + radius;\n this.changed();\n };\n /**\n * Rotate the geometry around a given coordinate. This modifies the geometry\n * coordinates in place.\n * @param {number} angle Rotation angle in counter-clockwise radians.\n * @param {import(\"../coordinate.js\").Coordinate} anchor The rotation center.\n * @api\n */\n Circle.prototype.rotate = function (angle, anchor) {\n var center = this.getCenter();\n var stride = this.getStride();\n this.setCenter(rotate(center, 0, center.length, stride, angle, anchor, center));\n this.changed();\n };\n /**\n * Translate the geometry. This modifies the geometry coordinates in place. If\n * instead you want a new geometry, first `clone()` this geometry.\n * @param {number} deltaX Delta X.\n * @param {number} deltaY Delta Y.\n * @api\n */\n Circle.prototype.translate = function (deltaX, deltaY) {\n var center = this.getCenter();\n var stride = this.getStride();\n this.setCenter(translate(center, 0, center.length, stride, deltaX, deltaY, center));\n this.changed();\n };\n return Circle;\n}(SimpleGeometry));\n/**\n * Transform each coordinate of the circle from one coordinate reference system\n * to another. The geometry is modified in place.\n * If you do not want the geometry modified in place, first clone() it and\n * then use this function on the clone.\n *\n * Internally a circle is currently represented by two points: the center of\n * the circle `[cx, cy]`, and the point to the right of the circle\n * `[cx + r, cy]`. This `transform` function just transforms these two points.\n * So the resulting geometry is also a circle, and that circle does not\n * correspond to the shape that would be obtained by transforming every point\n * of the original circle.\n *\n * @param {import(\"../proj.js\").ProjectionLike} source The current projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @param {import(\"../proj.js\").ProjectionLike} destination The desired projection. Can be a\n * string identifier or a {@link module:ol/proj/Projection~Projection} object.\n * @return {Circle} This geometry. Note that original geometry is\n * modified in place.\n * @function\n * @api\n */\nCircle.prototype.transform;\nexport default Circle;\n//# sourceMappingURL=Circle.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/interaction/Draw\n */\nimport Circle from '../geom/Circle.js';\nimport Event from '../events/Event.js';\nimport EventType from '../events/EventType.js';\nimport Feature from '../Feature.js';\nimport GeometryType from '../geom/GeometryType.js';\nimport InteractionProperty from './Property.js';\nimport LineString from '../geom/LineString.js';\nimport MapBrowserEvent from '../MapBrowserEvent.js';\nimport MapBrowserEventType from '../MapBrowserEventType.js';\nimport MultiLineString from '../geom/MultiLineString.js';\nimport MultiPoint from '../geom/MultiPoint.js';\nimport MultiPolygon from '../geom/MultiPolygon.js';\nimport Point from '../geom/Point.js';\nimport PointerInteraction from './Pointer.js';\nimport Polygon, { fromCircle, makeRegular } from '../geom/Polygon.js';\nimport VectorLayer from '../layer/Vector.js';\nimport VectorSource from '../source/Vector.js';\nimport { FALSE, TRUE } from '../functions.js';\nimport { always, noModifierKeys, shiftKeyOnly } from '../events/condition.js';\nimport { boundingExtent, getBottomLeft, getBottomRight, getTopLeft, getTopRight, } from '../extent.js';\nimport { createEditingStyle } from '../style/Style.js';\nimport { fromUserCoordinate, getUserProjection } from '../proj.js';\nimport { getChangeEventType } from '../Object.js';\nimport { squaredDistance as squaredCoordinateDistance } from '../coordinate.js';\n/**\n * @typedef {Object} Options\n * @property {import(\"../geom/GeometryType.js\").default} type Geometry type of\n * the geometries being drawn with this instance.\n * @property {number} [clickTolerance=6] The maximum distance in pixels between\n * \"down\" and \"up\" for a \"up\" event to be considered a \"click\" event and\n * actually add a point/vertex to the geometry being drawn. The default of `6`\n * was chosen for the draw interaction to behave correctly on mouse as well as\n * on touch devices.\n * @property {import(\"../Collection.js\").default} [features]\n * Destination collection for the drawn features.\n * @property {VectorSource} [source] Destination source for\n * the drawn features.\n * @property {number} [dragVertexDelay=500] Delay in milliseconds after pointerdown\n * before the current vertex can be dragged to its exact position.\n * @property {number} [snapTolerance=12] Pixel distance for snapping to the\n * drawing finish. Must be greater than `0`.\n * @property {boolean} [stopClick=false] Stop click, singleclick, and\n * doubleclick events from firing during drawing.\n * @property {number} [maxPoints] The number of points that can be drawn before\n * a polygon ring or line string is finished. By default there is no\n * restriction.\n * @property {number} [minPoints] The number of points that must be drawn\n * before a polygon ring or line string can be finished. Default is `3` for\n * polygon rings and `2` for line strings.\n * @property {import(\"../events/condition.js\").Condition} [finishCondition] A function\n * that takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether the drawing can be finished. Not used when drawing\n * POINT or MULTI_POINT geometries.\n * @property {import(\"../style/Style.js\").StyleLike} [style]\n * Style for sketch features.\n * @property {GeometryFunction} [geometryFunction]\n * Function that is called when a geometry's coordinates are updated.\n * @property {string} [geometryName] Geometry name to use for features created\n * by the draw interaction.\n * @property {import(\"../events/condition.js\").Condition} [condition] A function that\n * takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and returns a\n * boolean to indicate whether that event should be handled.\n * By default {@link module:ol/events/condition~noModifierKeys}, i.e. a click,\n * adds a vertex or deactivates freehand drawing.\n * @property {boolean} [freehand=false] Operate in freehand mode for lines,\n * polygons, and circles. This makes the interaction always operate in freehand\n * mode and takes precedence over any `freehandCondition` option.\n * @property {import(\"../events/condition.js\").Condition} [freehandCondition]\n * Condition that activates freehand drawing for lines and polygons. This\n * function takes an {@link module:ol/MapBrowserEvent~MapBrowserEvent} and\n * returns a boolean to indicate whether that event should be handled. The\n * default is {@link module:ol/events/condition~shiftKeyOnly}, meaning that the\n * Shift key activates freehand drawing.\n * @property {boolean} [wrapX=false] Wrap the world horizontally on the sketch\n * overlay.\n */\n/**\n * Coordinate type when drawing points.\n * @typedef {import(\"../coordinate.js\").Coordinate} PointCoordType\n */\n/**\n * Coordinate type when drawing lines.\n * @typedef {Array} LineCoordType\n */\n/**\n * Coordinate type when drawing polygons.\n * @typedef {Array>} PolyCoordType\n */\n/**\n * Types used for drawing coordinates.\n * @typedef {PointCoordType|LineCoordType|PolyCoordType} SketchCoordType\n */\n/**\n * Function that takes an array of coordinates and an optional existing geometry\n * and a projection as arguments, and returns a geometry. The optional existing\n * geometry is the geometry that is returned when the function is called without\n * a second argument.\n * @typedef {function(!SketchCoordType, import(\"../geom/SimpleGeometry.js\").default,\n * import(\"../proj/Projection.js\").default):\n * import(\"../geom/SimpleGeometry.js\").default} GeometryFunction\n */\n/**\n * Draw mode. This collapses multi-part geometry types with their single-part\n * cousins.\n * @enum {string}\n */\nvar Mode = {\n POINT: 'Point',\n LINE_STRING: 'LineString',\n POLYGON: 'Polygon',\n CIRCLE: 'Circle',\n};\n/**\n * @enum {string}\n */\nvar DrawEventType = {\n /**\n * Triggered upon feature draw start\n * @event DrawEvent#drawstart\n * @api\n */\n DRAWSTART: 'drawstart',\n /**\n * Triggered upon feature draw end\n * @event DrawEvent#drawend\n * @api\n */\n DRAWEND: 'drawend',\n /**\n * Triggered upon feature draw abortion\n * @event DrawEvent#drawabort\n * @api\n */\n DRAWABORT: 'drawabort',\n};\n/**\n * @classdesc\n * Events emitted by {@link module:ol/interaction/Draw~Draw} instances are\n * instances of this type.\n */\nvar DrawEvent = /** @class */ (function (_super) {\n __extends(DrawEvent, _super);\n /**\n * @param {DrawEventType} type Type.\n * @param {Feature} feature The feature drawn.\n */\n function DrawEvent(type, feature) {\n var _this = _super.call(this, type) || this;\n /**\n * The feature being drawn.\n * @type {Feature}\n * @api\n */\n _this.feature = feature;\n return _this;\n }\n return DrawEvent;\n}(Event));\nexport { DrawEvent };\n/**\n * @classdesc\n * Interaction for drawing feature geometries.\n *\n * @fires DrawEvent\n * @api\n */\nvar Draw = /** @class */ (function (_super) {\n __extends(Draw, _super);\n /**\n * @param {Options} options Options.\n */\n function Draw(options) {\n var _this = this;\n var pointerOptions = /** @type {import(\"./Pointer.js\").Options} */ (options);\n if (!pointerOptions.stopDown) {\n pointerOptions.stopDown = FALSE;\n }\n _this = _super.call(this, pointerOptions) || this;\n /**\n * @type {boolean}\n * @private\n */\n _this.shouldHandle_ = false;\n /**\n * @type {import(\"../pixel.js\").Pixel}\n * @private\n */\n _this.downPx_ = null;\n /**\n * @type {?}\n * @private\n */\n _this.downTimeout_;\n /**\n * @type {number|undefined}\n * @private\n */\n _this.lastDragTime_;\n /**\n * Pointer type of the last pointermove event\n * @type {string}\n * @private\n */\n _this.pointerType_;\n /**\n * @type {boolean}\n * @private\n */\n _this.freehand_ = false;\n /**\n * Target source for drawn features.\n * @type {VectorSource}\n * @private\n */\n _this.source_ = options.source ? options.source : null;\n /**\n * Target collection for drawn features.\n * @type {import(\"../Collection.js\").default}\n * @private\n */\n _this.features_ = options.features ? options.features : null;\n /**\n * Pixel distance for snapping.\n * @type {number}\n * @private\n */\n _this.snapTolerance_ = options.snapTolerance ? options.snapTolerance : 12;\n /**\n * Geometry type.\n * @type {import(\"../geom/GeometryType.js\").default}\n * @private\n */\n _this.type_ = /** @type {import(\"../geom/GeometryType.js\").default} */ (options.type);\n /**\n * Drawing mode (derived from geometry type.\n * @type {Mode}\n * @private\n */\n _this.mode_ = getMode(_this.type_);\n /**\n * Stop click, singleclick, and doubleclick events from firing during drawing.\n * Default is `false`.\n * @type {boolean}\n * @private\n */\n _this.stopClick_ = !!options.stopClick;\n /**\n * The number of points that must be drawn before a polygon ring or line\n * string can be finished. The default is 3 for polygon rings and 2 for\n * line strings.\n * @type {number}\n * @private\n */\n _this.minPoints_ = options.minPoints\n ? options.minPoints\n : _this.mode_ === Mode.POLYGON\n ? 3\n : 2;\n /**\n * The number of points that can be drawn before a polygon ring or line string\n * is finished. The default is no restriction.\n * @type {number}\n * @private\n */\n _this.maxPoints_ =\n _this.mode_ === Mode.CIRCLE\n ? 2\n : options.maxPoints\n ? options.maxPoints\n : Infinity;\n /**\n * A function to decide if a potential finish coordinate is permissible\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n _this.finishCondition_ = options.finishCondition\n ? options.finishCondition\n : TRUE;\n var geometryFunction = options.geometryFunction;\n if (!geometryFunction) {\n var mode_1 = _this.mode_;\n if (mode_1 === Mode.CIRCLE) {\n /**\n * @param {!LineCoordType} coordinates The coordinates.\n * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = function (coordinates, geometry, projection) {\n var circle = geometry\n ? /** @type {Circle} */ (geometry)\n : new Circle([NaN, NaN]);\n var center = fromUserCoordinate(coordinates[0], projection);\n var squaredLength = squaredCoordinateDistance(center, fromUserCoordinate(coordinates[coordinates.length - 1], projection));\n circle.setCenterAndRadius(center, Math.sqrt(squaredLength));\n var userProjection = getUserProjection();\n if (userProjection) {\n circle.transform(projection, userProjection);\n }\n return circle;\n };\n }\n else {\n var Constructor_1;\n if (mode_1 === Mode.POINT) {\n Constructor_1 = Point;\n }\n else if (mode_1 === Mode.LINE_STRING) {\n Constructor_1 = LineString;\n }\n else if (mode_1 === Mode.POLYGON) {\n Constructor_1 = Polygon;\n }\n /**\n * @param {!LineCoordType} coordinates The coordinates.\n * @param {import(\"../geom/SimpleGeometry.js\").default|undefined} geometry Optional geometry.\n * @param {import(\"../proj/Projection.js\").default} projection The view projection.\n * @return {import(\"../geom/SimpleGeometry.js\").default} A geometry.\n */\n geometryFunction = function (coordinates, geometry, projection) {\n if (geometry) {\n if (mode_1 === Mode.POLYGON) {\n if (coordinates[0].length) {\n // Add a closing coordinate to match the first\n geometry.setCoordinates([\n coordinates[0].concat([coordinates[0][0]]),\n ]);\n }\n else {\n geometry.setCoordinates([]);\n }\n }\n else {\n geometry.setCoordinates(coordinates);\n }\n }\n else {\n geometry = new Constructor_1(coordinates);\n }\n return geometry;\n };\n }\n }\n /**\n * @type {GeometryFunction}\n * @private\n */\n _this.geometryFunction_ = geometryFunction;\n /**\n * @type {number}\n * @private\n */\n _this.dragVertexDelay_ =\n options.dragVertexDelay !== undefined ? options.dragVertexDelay : 500;\n /**\n * Finish coordinate for the feature (first point for polygons, last point for\n * linestrings).\n * @type {import(\"../coordinate.js\").Coordinate}\n * @private\n */\n _this.finishCoordinate_ = null;\n /**\n * Sketch feature.\n * @type {Feature}\n * @private\n */\n _this.sketchFeature_ = null;\n /**\n * Sketch point.\n * @type {Feature}\n * @private\n */\n _this.sketchPoint_ = null;\n /**\n * Sketch coordinates. Used when drawing a line or polygon.\n * @type {SketchCoordType}\n * @private\n */\n _this.sketchCoords_ = null;\n /**\n * Sketch line. Used when drawing polygon.\n * @type {Feature}\n * @private\n */\n _this.sketchLine_ = null;\n /**\n * Sketch line coordinates. Used when drawing a polygon or circle.\n * @type {LineCoordType}\n * @private\n */\n _this.sketchLineCoords_ = null;\n /**\n * Squared tolerance for handling up events. If the squared distance\n * between a down and up event is greater than this tolerance, up events\n * will not be handled.\n * @type {number}\n * @private\n */\n _this.squaredClickTolerance_ = options.clickTolerance\n ? options.clickTolerance * options.clickTolerance\n : 36;\n /**\n * Draw overlay where our sketch features are drawn.\n * @type {VectorLayer}\n * @private\n */\n _this.overlay_ = new VectorLayer({\n source: new VectorSource({\n useSpatialIndex: false,\n wrapX: options.wrapX ? options.wrapX : false,\n }),\n style: options.style ? options.style : getDefaultStyleFunction(),\n updateWhileInteracting: true,\n });\n /**\n * Name of the geometry attribute for newly created features.\n * @type {string|undefined}\n * @private\n */\n _this.geometryName_ = options.geometryName;\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n _this.condition_ = options.condition ? options.condition : noModifierKeys;\n /**\n * @private\n * @type {import(\"../events/condition.js\").Condition}\n */\n _this.freehandCondition_;\n if (options.freehand) {\n _this.freehandCondition_ = always;\n }\n else {\n _this.freehandCondition_ = options.freehandCondition\n ? options.freehandCondition\n : shiftKeyOnly;\n }\n _this.addEventListener(getChangeEventType(InteractionProperty.ACTIVE), _this.updateState_);\n return _this;\n }\n /**\n * Remove the interaction from its current map and attach it to the new map.\n * Subclasses may set up event handlers to get notified about changes to\n * the map here.\n * @param {import(\"../PluggableMap.js\").default} map Map.\n */\n Draw.prototype.setMap = function (map) {\n _super.prototype.setMap.call(this, map);\n this.updateState_();\n };\n /**\n * Get the overlay layer that this interaction renders sketch features to.\n * @return {VectorLayer} Overlay layer.\n * @api\n */\n Draw.prototype.getOverlay = function () {\n return this.overlay_;\n };\n /**\n * Handles the {@link module:ol/MapBrowserEvent map browser event} and may actually draw or finish the drawing.\n * @param {import(\"../MapBrowserEvent.js\").default} event Map browser event.\n * @return {boolean} `false` to stop event propagation.\n * @api\n */\n Draw.prototype.handleEvent = function (event) {\n if (event.originalEvent.type === EventType.CONTEXTMENU) {\n // Avoid context menu for long taps when drawing on mobile\n event.originalEvent.preventDefault();\n }\n this.freehand_ =\n this.mode_ !== Mode.POINT && this.freehandCondition_(event);\n var move = event.type === MapBrowserEventType.POINTERMOVE;\n var pass = true;\n if (!this.freehand_ &&\n this.lastDragTime_ &&\n event.type === MapBrowserEventType.POINTERDRAG) {\n var now = Date.now();\n if (now - this.lastDragTime_ >= this.dragVertexDelay_) {\n this.downPx_ = event.pixel;\n this.shouldHandle_ = !this.freehand_;\n move = true;\n }\n else {\n this.lastDragTime_ = undefined;\n }\n if (this.shouldHandle_ && this.downTimeout_ !== undefined) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n }\n if (this.freehand_ &&\n event.type === MapBrowserEventType.POINTERDRAG &&\n this.sketchFeature_ !== null) {\n this.addToDrawing_(event.coordinate);\n pass = false;\n }\n else if (this.freehand_ &&\n event.type === MapBrowserEventType.POINTERDOWN) {\n pass = false;\n }\n else if (move && this.getPointerCount() < 2) {\n pass = event.type === MapBrowserEventType.POINTERMOVE;\n if (pass && this.freehand_) {\n this.handlePointerMove_(event);\n if (this.shouldHandle_) {\n // Avoid page scrolling when freehand drawing on mobile\n event.originalEvent.preventDefault();\n }\n }\n else if (event.originalEvent.pointerType === 'mouse' ||\n (event.type === MapBrowserEventType.POINTERDRAG &&\n this.downTimeout_ === undefined)) {\n this.handlePointerMove_(event);\n }\n }\n else if (event.type === MapBrowserEventType.DBLCLICK) {\n pass = false;\n }\n return _super.prototype.handleEvent.call(this, event) && pass;\n };\n /**\n * Handle pointer down events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n */\n Draw.prototype.handleDownEvent = function (event) {\n this.shouldHandle_ = !this.freehand_;\n if (this.freehand_) {\n this.downPx_ = event.pixel;\n if (!this.finishCoordinate_) {\n this.startDrawing_(event.coordinate);\n }\n return true;\n }\n else if (this.condition_(event)) {\n this.lastDragTime_ = Date.now();\n this.downTimeout_ = setTimeout(function () {\n this.handlePointerMove_(new MapBrowserEvent(MapBrowserEventType.POINTERMOVE, event.map, event.originalEvent, false, event.frameState));\n }.bind(this), this.dragVertexDelay_);\n this.downPx_ = event.pixel;\n return true;\n }\n else {\n this.lastDragTime_ = undefined;\n return false;\n }\n };\n /**\n * Handle pointer up events.\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @return {boolean} If the event was consumed.\n */\n Draw.prototype.handleUpEvent = function (event) {\n var pass = true;\n if (this.getPointerCount() === 0) {\n if (this.downTimeout_) {\n clearTimeout(this.downTimeout_);\n this.downTimeout_ = undefined;\n }\n this.handlePointerMove_(event);\n if (this.shouldHandle_) {\n switch (true) {\n case !this.finishCoordinate_:\n this.startDrawing_(event.coordinate);\n if (this.mode_ !== Mode.POINT) {\n break;\n }\n // eslint-disable-next-line no-fallthrough\n case this.freehand_ ||\n (this.atFinish_(event.pixel) && this.finishCondition_(event)):\n this.finishDrawing();\n break;\n case !this.freehand_:\n this.addToDrawing_(event.coordinate);\n break;\n default:\n break;\n }\n pass = false;\n }\n else if (this.freehand_) {\n this.abortDrawing();\n }\n }\n if (!pass && this.stopClick_) {\n event.originalEvent.stopPropagation();\n }\n return pass;\n };\n /**\n * Handle move events.\n * @param {import(\"../MapBrowserEvent.js\").default} event A move event.\n * @private\n */\n Draw.prototype.handlePointerMove_ = function (event) {\n this.pointerType_ = event.originalEvent.pointerType;\n if (this.downPx_ &&\n ((!this.freehand_ && this.shouldHandle_) ||\n (this.freehand_ && !this.shouldHandle_))) {\n var downPx = this.downPx_;\n var clickPx = event.pixel;\n var dx = downPx[0] - clickPx[0];\n var dy = downPx[1] - clickPx[1];\n var squaredDistance = dx * dx + dy * dy;\n this.shouldHandle_ = this.freehand_\n ? squaredDistance > this.squaredClickTolerance_\n : squaredDistance <= this.squaredClickTolerance_;\n if (!this.shouldHandle_) {\n return;\n }\n }\n if (this.finishCoordinate_) {\n this.modifyDrawing_(event.coordinate);\n }\n else {\n this.createOrUpdateSketchPoint_(event);\n }\n };\n /**\n * Determine if an event is within the snapping tolerance of the start coord.\n * @param {import(\"../pixel.js\").Pixel} pixel Pixel.\n * @return {boolean} The event is within the snapping tolerance of the start.\n * @private\n */\n Draw.prototype.atFinish_ = function (pixel) {\n var at = false;\n if (this.sketchFeature_) {\n var potentiallyDone = false;\n var potentiallyFinishCoordinates = [this.finishCoordinate_];\n var mode = this.mode_;\n if (mode === Mode.POINT) {\n at = true;\n }\n else if (mode === Mode.CIRCLE) {\n at = this.sketchCoords_.length === 2;\n }\n else if (mode === Mode.LINE_STRING) {\n potentiallyDone = this.sketchCoords_.length > this.minPoints_;\n }\n else if (mode === Mode.POLYGON) {\n var sketchCoords = /** @type {PolyCoordType} */ (this.sketchCoords_);\n potentiallyDone = sketchCoords[0].length > this.minPoints_;\n potentiallyFinishCoordinates = [\n sketchCoords[0][0],\n sketchCoords[0][sketchCoords[0].length - 2],\n ];\n }\n if (potentiallyDone) {\n var map = this.getMap();\n for (var i = 0, ii = potentiallyFinishCoordinates.length; i < ii; i++) {\n var finishCoordinate = potentiallyFinishCoordinates[i];\n var finishPixel = map.getPixelFromCoordinate(finishCoordinate);\n var dx = pixel[0] - finishPixel[0];\n var dy = pixel[1] - finishPixel[1];\n var snapTolerance = this.freehand_ ? 1 : this.snapTolerance_;\n at = Math.sqrt(dx * dx + dy * dy) <= snapTolerance;\n if (at) {\n this.finishCoordinate_ = finishCoordinate;\n break;\n }\n }\n }\n }\n return at;\n };\n /**\n * @param {import(\"../MapBrowserEvent.js\").default} event Event.\n * @private\n */\n Draw.prototype.createOrUpdateSketchPoint_ = function (event) {\n var coordinates = event.coordinate.slice();\n if (!this.sketchPoint_) {\n this.sketchPoint_ = new Feature(new Point(coordinates));\n this.updateSketchFeatures_();\n }\n else {\n var sketchPointGeom = this.sketchPoint_.getGeometry();\n sketchPointGeom.setCoordinates(coordinates);\n }\n };\n /**\n * @param {import(\"../geom/Polygon.js\").default} geometry Polygon geometry.\n * @private\n */\n Draw.prototype.createOrUpdateCustomSketchLine_ = function (geometry) {\n if (!this.sketchLine_) {\n this.sketchLine_ = new Feature();\n }\n var ring = geometry.getLinearRing(0);\n var sketchLineGeom = this.sketchLine_.getGeometry();\n if (!sketchLineGeom) {\n sketchLineGeom = new LineString(ring.getFlatCoordinates(), ring.getLayout());\n this.sketchLine_.setGeometry(sketchLineGeom);\n }\n else {\n sketchLineGeom.setFlatCoordinates(ring.getLayout(), ring.getFlatCoordinates());\n sketchLineGeom.changed();\n }\n };\n /**\n * Start the drawing.\n * @param {import(\"../coordinate.js\").Coordinate} start Start coordinate.\n * @private\n */\n Draw.prototype.startDrawing_ = function (start) {\n var projection = this.getMap().getView().getProjection();\n this.finishCoordinate_ = start;\n if (this.mode_ === Mode.POINT) {\n this.sketchCoords_ = start.slice();\n }\n else if (this.mode_ === Mode.POLYGON) {\n this.sketchCoords_ = [[start.slice(), start.slice()]];\n this.sketchLineCoords_ = this.sketchCoords_[0];\n }\n else {\n this.sketchCoords_ = [start.slice(), start.slice()];\n }\n if (this.sketchLineCoords_) {\n this.sketchLine_ = new Feature(new LineString(this.sketchLineCoords_));\n }\n var geometry = this.geometryFunction_(this.sketchCoords_, undefined, projection);\n this.sketchFeature_ = new Feature();\n if (this.geometryName_) {\n this.sketchFeature_.setGeometryName(this.geometryName_);\n }\n this.sketchFeature_.setGeometry(geometry);\n this.updateSketchFeatures_();\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n };\n /**\n * Modify the drawing.\n * @param {import(\"../coordinate.js\").Coordinate} coordinate Coordinate.\n * @private\n */\n Draw.prototype.modifyDrawing_ = function (coordinate) {\n var map = this.getMap();\n var geometry = this.sketchFeature_.getGeometry();\n var projection = map.getView().getProjection();\n var coordinates, last;\n if (this.mode_ === Mode.POINT) {\n last = this.sketchCoords_;\n }\n else if (this.mode_ === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n last = coordinates[coordinates.length - 1];\n if (this.atFinish_(map.getPixelFromCoordinate(coordinate))) {\n // snap to finish\n coordinate = this.finishCoordinate_.slice();\n }\n }\n else {\n coordinates = this.sketchCoords_;\n last = coordinates[coordinates.length - 1];\n }\n last[0] = coordinate[0];\n last[1] = coordinate[1];\n this.geometryFunction_(\n /** @type {!LineCoordType} */ (this.sketchCoords_), geometry, projection);\n if (this.sketchPoint_) {\n var sketchPointGeom = this.sketchPoint_.getGeometry();\n sketchPointGeom.setCoordinates(coordinate);\n }\n if (geometry.getType() === GeometryType.POLYGON &&\n this.mode_ !== Mode.POLYGON) {\n this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n }\n else if (this.sketchLineCoords_) {\n var sketchLineGeom = this.sketchLine_.getGeometry();\n sketchLineGeom.setCoordinates(this.sketchLineCoords_);\n }\n this.updateSketchFeatures_();\n };\n /**\n * Add a new coordinate to the drawing.\n * @param {!PointCoordType} coordinate Coordinate\n * @private\n */\n Draw.prototype.addToDrawing_ = function (coordinate) {\n var geometry = this.sketchFeature_.getGeometry();\n var projection = this.getMap().getView().getProjection();\n var done;\n var coordinates;\n var mode = this.mode_;\n if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n this.finishCoordinate_ = coordinate.slice();\n coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n if (coordinates.length >= this.maxPoints_) {\n if (this.freehand_) {\n coordinates.pop();\n }\n else {\n done = true;\n }\n }\n coordinates.push(coordinate.slice());\n this.geometryFunction_(coordinates, geometry, projection);\n }\n else if (mode === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n if (coordinates.length >= this.maxPoints_) {\n if (this.freehand_) {\n coordinates.pop();\n }\n else {\n done = true;\n }\n }\n coordinates.push(coordinate.slice());\n if (done) {\n this.finishCoordinate_ = coordinates[0];\n }\n this.geometryFunction_(this.sketchCoords_, geometry, projection);\n }\n this.updateSketchFeatures_();\n if (done) {\n this.finishDrawing();\n }\n };\n /**\n * Remove last point of the feature currently being drawn. Does not do anything when\n * drawing POINT or MULTI_POINT geometries.\n * @api\n */\n Draw.prototype.removeLastPoint = function () {\n if (!this.sketchFeature_) {\n return;\n }\n var geometry = this.sketchFeature_.getGeometry();\n var projection = this.getMap().getView().getProjection();\n var coordinates;\n var mode = this.mode_;\n if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n coordinates = /** @type {LineCoordType} */ (this.sketchCoords_);\n coordinates.splice(-2, 1);\n if (coordinates.length >= 2) {\n this.finishCoordinate_ = coordinates[coordinates.length - 2].slice();\n var finishCoordinate = this.finishCoordinate_.slice();\n coordinates[coordinates.length - 1] = finishCoordinate;\n this.sketchPoint_.setGeometry(new Point(finishCoordinate));\n }\n this.geometryFunction_(coordinates, geometry, projection);\n if (geometry.getType() === GeometryType.POLYGON && this.sketchLine_) {\n this.createOrUpdateCustomSketchLine_(/** @type {Polygon} */ (geometry));\n }\n }\n else if (mode === Mode.POLYGON) {\n coordinates = /** @type {PolyCoordType} */ (this.sketchCoords_)[0];\n coordinates.splice(-2, 1);\n var sketchLineGeom = this.sketchLine_.getGeometry();\n if (coordinates.length >= 2) {\n var finishCoordinate = coordinates[coordinates.length - 2].slice();\n coordinates[coordinates.length - 1] = finishCoordinate;\n this.sketchPoint_.setGeometry(new Point(finishCoordinate));\n }\n sketchLineGeom.setCoordinates(coordinates);\n this.geometryFunction_(this.sketchCoords_, geometry, projection);\n }\n if (coordinates.length === 1) {\n this.abortDrawing();\n }\n this.updateSketchFeatures_();\n };\n /**\n * Stop drawing and add the sketch feature to the target layer.\n * The {@link module:ol/interaction/Draw~DrawEventType.DRAWEND} event is\n * dispatched before inserting the feature.\n * @api\n */\n Draw.prototype.finishDrawing = function () {\n var sketchFeature = this.abortDrawing_();\n if (!sketchFeature) {\n return;\n }\n var coordinates = this.sketchCoords_;\n var geometry = sketchFeature.getGeometry();\n var projection = this.getMap().getView().getProjection();\n if (this.mode_ === Mode.LINE_STRING) {\n // remove the redundant last point\n coordinates.pop();\n this.geometryFunction_(coordinates, geometry, projection);\n }\n else if (this.mode_ === Mode.POLYGON) {\n // remove the redundant last point in ring\n /** @type {PolyCoordType} */ (coordinates)[0].pop();\n this.geometryFunction_(coordinates, geometry, projection);\n coordinates = geometry.getCoordinates();\n }\n // cast multi-part geometries\n if (this.type_ === GeometryType.MULTI_POINT) {\n sketchFeature.setGeometry(new MultiPoint([/** @type {PointCoordType} */ (coordinates)]));\n }\n else if (this.type_ === GeometryType.MULTI_LINE_STRING) {\n sketchFeature.setGeometry(new MultiLineString([/** @type {LineCoordType} */ (coordinates)]));\n }\n else if (this.type_ === GeometryType.MULTI_POLYGON) {\n sketchFeature.setGeometry(new MultiPolygon([/** @type {PolyCoordType} */ (coordinates)]));\n }\n // First dispatch event to allow full set up of feature\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWEND, sketchFeature));\n // Then insert feature\n if (this.features_) {\n this.features_.push(sketchFeature);\n }\n if (this.source_) {\n this.source_.addFeature(sketchFeature);\n }\n };\n /**\n * Stop drawing without adding the sketch feature to the target layer.\n * @return {Feature} The sketch feature (or null if none).\n * @private\n */\n Draw.prototype.abortDrawing_ = function () {\n this.finishCoordinate_ = null;\n var sketchFeature = this.sketchFeature_;\n this.sketchFeature_ = null;\n this.sketchPoint_ = null;\n this.sketchLine_ = null;\n this.overlay_.getSource().clear(true);\n return sketchFeature;\n };\n /**\n * Stop drawing without adding the sketch feature to the target layer.\n * @api\n */\n Draw.prototype.abortDrawing = function () {\n var sketchFeature = this.abortDrawing_();\n if (sketchFeature) {\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWABORT, sketchFeature));\n }\n };\n /**\n * Append coordinates to the end of the geometry that is currently being drawn.\n * This can be used when drawing LineStrings or Polygons. Coordinates will\n * either be appended to the current LineString or the outer ring of the current\n * Polygon. If no geometry is being drawn, a new one will be created.\n * @param {!LineCoordType} coordinates Linear coordinates to be appended to\n * the coordinate array.\n * @api\n */\n Draw.prototype.appendCoordinates = function (coordinates) {\n var mode = this.mode_;\n var newDrawing = !this.sketchFeature_;\n if (newDrawing) {\n this.startDrawing_(coordinates[0]);\n }\n /** @type {LineCoordType} */\n var sketchCoords;\n if (mode === Mode.LINE_STRING || mode === Mode.CIRCLE) {\n sketchCoords = /** @type {LineCoordType} */ (this.sketchCoords_);\n }\n else if (mode === Mode.POLYGON) {\n sketchCoords =\n this.sketchCoords_ && this.sketchCoords_.length\n ? /** @type {PolyCoordType} */ (this.sketchCoords_)[0]\n : [];\n }\n else {\n return;\n }\n if (newDrawing) {\n sketchCoords.shift();\n }\n // Remove last coordinate from sketch drawing (this coordinate follows cursor position)\n sketchCoords.pop();\n // Append coordinate list\n for (var i = 0; i < coordinates.length; i++) {\n this.addToDrawing_(coordinates[i]);\n }\n var ending = coordinates[coordinates.length - 1];\n // Duplicate last coordinate for sketch drawing (cursor position)\n this.addToDrawing_(ending);\n this.modifyDrawing_(ending);\n };\n /**\n * Initiate draw mode by starting from an existing geometry which will\n * receive new additional points. This only works on features with\n * `LineString` geometries, where the interaction will extend lines by adding\n * points to the end of the coordinates array.\n * This will change the original feature, instead of drawing a copy.\n *\n * The function will dispatch a `drawstart` event.\n *\n * @param {!Feature} feature Feature to be extended.\n * @api\n */\n Draw.prototype.extend = function (feature) {\n var geometry = feature.getGeometry();\n var lineString = geometry;\n this.sketchFeature_ = feature;\n this.sketchCoords_ = lineString.getCoordinates();\n var last = this.sketchCoords_[this.sketchCoords_.length - 1];\n this.finishCoordinate_ = last.slice();\n this.sketchCoords_.push(last.slice());\n this.sketchPoint_ = new Feature(new Point(last));\n this.updateSketchFeatures_();\n this.dispatchEvent(new DrawEvent(DrawEventType.DRAWSTART, this.sketchFeature_));\n };\n /**\n * Redraw the sketch features.\n * @private\n */\n Draw.prototype.updateSketchFeatures_ = function () {\n var sketchFeatures = [];\n if (this.sketchFeature_) {\n sketchFeatures.push(this.sketchFeature_);\n }\n if (this.sketchLine_) {\n sketchFeatures.push(this.sketchLine_);\n }\n if (this.sketchPoint_) {\n sketchFeatures.push(this.sketchPoint_);\n }\n var overlaySource = this.overlay_.getSource();\n overlaySource.clear(true);\n overlaySource.addFeatures(sketchFeatures);\n };\n /**\n * @private\n */\n Draw.prototype.updateState_ = function () {\n var map = this.getMap();\n var active = this.getActive();\n if (!map || !active) {\n this.abortDrawing();\n }\n this.overlay_.setMap(active ? map : null);\n };\n return Draw;\n}(PointerInteraction));\n/**\n * @return {import(\"../style/Style.js\").StyleFunction} Styles.\n */\nfunction getDefaultStyleFunction() {\n var styles = createEditingStyle();\n return function (feature, resolution) {\n return styles[feature.getGeometry().getType()];\n };\n}\n/**\n * Create a `geometryFunction` for `type: 'Circle'` that will create a regular\n * polygon with a user specified number of sides and start angle instead of a\n * `import(\"../geom/Circle.js\").Circle` geometry.\n * @param {number=} opt_sides Number of sides of the regular polygon.\n * Default is 32.\n * @param {number=} opt_angle Angle of the first point in counter-clockwise\n * radians. 0 means East.\n * Default is the angle defined by the heading from the center of the\n * regular polygon to the current pointer position.\n * @return {GeometryFunction} Function that draws a polygon.\n * @api\n */\nexport function createRegularPolygon(opt_sides, opt_angle) {\n return function (coordinates, opt_geometry, projection) {\n var center = fromUserCoordinate(\n /** @type {LineCoordType} */ (coordinates)[0], projection);\n var end = fromUserCoordinate(\n /** @type {LineCoordType} */ (coordinates)[coordinates.length - 1], projection);\n var radius = Math.sqrt(squaredCoordinateDistance(center, end));\n var geometry = opt_geometry\n ? /** @type {Polygon} */ (opt_geometry)\n : fromCircle(new Circle(center), opt_sides);\n var angle = opt_angle;\n if (!opt_angle && opt_angle !== 0) {\n var x = end[0] - center[0];\n var y = end[1] - center[1];\n angle = Math.atan2(y, x);\n }\n makeRegular(geometry, center, radius, angle);\n var userProjection = getUserProjection();\n if (userProjection) {\n geometry.transform(projection, userProjection);\n }\n return geometry;\n };\n}\n/**\n * Create a `geometryFunction` that will create a box-shaped polygon (aligned\n * with the coordinate system axes). Use this with the draw interaction and\n * `type: 'Circle'` to return a box instead of a circle geometry.\n * @return {GeometryFunction} Function that draws a box-shaped polygon.\n * @api\n */\nexport function createBox() {\n return function (coordinates, opt_geometry, projection) {\n var extent = boundingExtent(\n /** @type {LineCoordType} */ ([\n coordinates[0],\n coordinates[coordinates.length - 1],\n ]).map(function (coordinate) {\n return fromUserCoordinate(coordinate, projection);\n }));\n var boxCoordinates = [\n [\n getBottomLeft(extent),\n getBottomRight(extent),\n getTopRight(extent),\n getTopLeft(extent),\n getBottomLeft(extent),\n ],\n ];\n var geometry = opt_geometry;\n if (geometry) {\n geometry.setCoordinates(boxCoordinates);\n }\n else {\n geometry = new Polygon(boxCoordinates);\n }\n var userProjection = getUserProjection();\n if (userProjection) {\n geometry.transform(projection, userProjection);\n }\n return geometry;\n };\n}\n/**\n * Get the drawing mode. The mode for mult-part geometries is the same as for\n * their single-part cousins.\n * @param {import(\"../geom/GeometryType.js\").default} type Geometry type.\n * @return {Mode} Drawing mode.\n */\nfunction getMode(type) {\n var mode;\n if (type === GeometryType.POINT || type === GeometryType.MULTI_POINT) {\n mode = Mode.POINT;\n }\n else if (type === GeometryType.LINE_STRING ||\n type === GeometryType.MULTI_LINE_STRING) {\n mode = Mode.LINE_STRING;\n }\n else if (type === GeometryType.POLYGON ||\n type === GeometryType.MULTI_POLYGON) {\n mode = Mode.POLYGON;\n }\n else if (type === GeometryType.CIRCLE) {\n mode = Mode.CIRCLE;\n }\n return /** @type {!Mode} */ (mode);\n}\nexport default Draw;\n//# sourceMappingURL=Draw.js.map","'use strict';\nvar anObject = require('../internals/an-object');\n\n// `RegExp.prototype.flags` getter implementation\n// https://tc39.es/ecma262/#sec-get-regexp.prototype.flags\nmodule.exports = function () {\n var that = anObject(this);\n var result = '';\n if (that.global) result += 'g';\n if (that.ignoreCase) result += 'i';\n if (that.multiline) result += 'm';\n if (that.dotAll) result += 's';\n if (that.unicode) result += 'u';\n if (that.sticky) result += 'y';\n return result;\n};\n","(function (global, factory) {\n\ttypeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('ol/control/Control'), require('ol/Observable'), require('ol/layer/Group')) :\n\ttypeof define === 'function' && define.amd ? define(['ol/control/Control', 'ol/Observable', 'ol/layer/Group'], factory) :\n\t(global.LayerSwitcher = factory(global.ol.control.Control,global.ol.Observable,global.ol.layer.Group));\n}(this, (function (Control,ol_Observable,LayerGroup) { 'use strict';\n\nControl = 'default' in Control ? Control['default'] : Control;\nLayerGroup = 'default' in LayerGroup ? LayerGroup['default'] : LayerGroup;\n\nvar classCallCheck = function (instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n};\n\nvar createClass = function () {\n function defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n }\n\n return function (Constructor, protoProps, staticProps) {\n if (protoProps) defineProperties(Constructor.prototype, protoProps);\n if (staticProps) defineProperties(Constructor, staticProps);\n return Constructor;\n };\n}();\n\n\n\n\n\n\n\nvar get = function get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n};\n\nvar inherits = function (subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function, not \" + typeof superClass);\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n};\n\n\n\n\n\n\n\n\n\n\n\nvar possibleConstructorReturn = function (self, call) {\n if (!self) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return call && (typeof call === \"object\" || typeof call === \"function\") ? call : self;\n};\n\n/**\n * @protected\n */\nvar CSS_PREFIX = 'layer-switcher-';\n/**\n * OpenLayers LayerSwitcher Control, displays a list of layers and groups\n * associated with a map which have a `title` property.\n *\n * To be shown in the LayerSwitcher panel layers must have a `title` property;\n * base map layers should have a `type` property set to `base`. Group layers\n * (`LayerGroup`) can be used to visually group layers together; a group\n * with a `fold` property set to either `'open'` or `'close'` will be displayed\n * with a toggle.\n *\n * See [BaseLayerOptions](#baselayeroptions) for a full list of LayerSwitcher\n * properties for layers (`TileLayer`, `ImageLayer`, `VectorTile` etc.) and\n * [GroupLayerOptions](#grouplayeroptions) for group layer (`LayerGroup`)\n * LayerSwitcher properties.\n *\n * Layer and group properties can either be set by adding extra properties\n * to their options when they are created or via their set method.\n *\n * Specify a `title` for a Layer by adding a `title` property to it's options object:\n * ```javascript\n * var lyr = new ol.layer.Tile({\n * // Specify a title property which will be displayed by the layer switcher\n * title: 'OpenStreetMap',\n * visible: true,\n * source: new ol.source.OSM()\n * })\n * ```\n *\n * Alternatively the properties can be set via the `set` method after a layer has been created:\n * ```javascript\n * var lyr = new ol.layer.Tile({\n * visible: true,\n * source: new ol.source.OSM()\n * })\n * // Specify a title property which will be displayed by the layer switcher\n * lyr.set('title', 'OpenStreetMap');\n * ```\n *\n * To create a LayerSwitcher and add it to a map, create a new instance then pass it to the map's [`addControl` method](https://openlayers.org/en/latest/apidoc/module-ol_PluggableMap-PluggableMap.html#addControl).\n * ```javascript\n * var layerSwitcher = new LayerSwitcher({\n * reverse: true,\n * groupSelectStyle: 'group'\n * });\n * map.addControl(layerSwitcher);\n * ```\n *\n * @constructor\n * @extends {ol/control/Control~Control}\n * @param opt_options LayerSwitcher options, see [LayerSwitcher Options](#options) and [RenderOptions](#renderoptions) which LayerSwitcher `Options` extends for more details.\n */\n\nvar LayerSwitcher = function (_Control) {\n inherits(LayerSwitcher, _Control);\n\n function LayerSwitcher(opt_options) {\n classCallCheck(this, LayerSwitcher);\n\n var options = Object.assign({}, opt_options);\n // TODO Next: Rename to showButtonTitle\n var tipLabel = options.tipLabel ? options.tipLabel : 'Legend';\n // TODO Next: Rename to hideButtonTitle\n var collapseTipLabel = options.collapseTipLabel ? options.collapseTipLabel : 'Collapse legend';\n var element = document.createElement('div');\n\n var _this = possibleConstructorReturn(this, (LayerSwitcher.__proto__ || Object.getPrototypeOf(LayerSwitcher)).call(this, { element: element, target: options.target }));\n\n _this.activationMode = options.activationMode || 'mouseover';\n _this.startActive = options.startActive === true;\n // TODO Next: Rename to showButtonContent\n var label = options.label !== undefined ? options.label : '';\n // TODO Next: Rename to hideButtonContent\n var collapseLabel = options.collapseLabel !== undefined ? options.collapseLabel : '\\xBB';\n _this.groupSelectStyle = LayerSwitcher.getGroupSelectStyle(options.groupSelectStyle);\n _this.reverse = options.reverse !== false;\n _this.mapListeners = [];\n _this.hiddenClassName = 'ol-unselectable ol-control layer-switcher';\n if (LayerSwitcher.isTouchDevice_()) {\n _this.hiddenClassName += ' touch';\n }\n _this.shownClassName = 'shown';\n element.className = _this.hiddenClassName;\n var button = document.createElement('button');\n button.setAttribute('title', tipLabel);\n button.setAttribute('aria-label', tipLabel);\n element.appendChild(button);\n _this.panel = document.createElement('div');\n _this.panel.className = 'panel';\n element.appendChild(_this.panel);\n LayerSwitcher.enableTouchScroll_(_this.panel);\n button.textContent = label;\n element.classList.add(CSS_PREFIX + 'group-select-style-' + _this.groupSelectStyle);\n element.classList.add(CSS_PREFIX + 'activation-mode-' + _this.activationMode);\n if (_this.activationMode === 'click') {\n // TODO Next: Remove in favour of layer-switcher-activation-mode-click\n element.classList.add('activationModeClick');\n if (_this.startActive) {\n button.textContent = collapseLabel;\n button.setAttribute('title', collapseTipLabel);\n button.setAttribute('aria-label', collapseTipLabel);\n }\n button.onclick = function (e) {\n var evt = e || window.event;\n if (_this.element.classList.contains(_this.shownClassName)) {\n _this.hidePanel();\n button.textContent = label;\n button.setAttribute('title', tipLabel);\n button.setAttribute('aria-label', tipLabel);\n } else {\n _this.showPanel();\n button.textContent = collapseLabel;\n button.setAttribute('title', collapseTipLabel);\n button.setAttribute('aria-label', collapseTipLabel);\n }\n evt.preventDefault();\n };\n } else {\n button.onmouseover = function () {\n _this.showPanel();\n };\n button.onclick = function (e) {\n var evt = e || window.event;\n _this.showPanel();\n evt.preventDefault();\n };\n _this.panel.onmouseout = function (evt) {\n if (!_this.panel.contains(evt.relatedTarget)) {\n _this.hidePanel();\n }\n };\n }\n return _this;\n }\n /**\n * Set the map instance the control is associated with.\n * @param map The map instance.\n */\n\n\n createClass(LayerSwitcher, [{\n key: 'setMap',\n value: function setMap(map) {\n var _this2 = this;\n\n // Clean up listeners associated with the previous map\n for (var i = 0; i < this.mapListeners.length; i++) {\n ol_Observable.unByKey(this.mapListeners[i]);\n }\n this.mapListeners.length = 0;\n // Wire up listeners etc. and store reference to new map\n get(LayerSwitcher.prototype.__proto__ || Object.getPrototypeOf(LayerSwitcher.prototype), 'setMap', this).call(this, map);\n if (map) {\n if (this.startActive) {\n this.showPanel();\n } else {\n this.renderPanel();\n }\n if (this.activationMode !== 'click') {\n this.mapListeners.push(map.on('pointerdown', function () {\n _this2.hidePanel();\n }));\n }\n }\n }\n /**\n * Show the layer panel.\n */\n\n }, {\n key: 'showPanel',\n value: function showPanel() {\n if (!this.element.classList.contains(this.shownClassName)) {\n this.element.classList.add(this.shownClassName);\n this.renderPanel();\n }\n }\n /**\n * Hide the layer panel.\n */\n\n }, {\n key: 'hidePanel',\n value: function hidePanel() {\n if (this.element.classList.contains(this.shownClassName)) {\n this.element.classList.remove(this.shownClassName);\n }\n }\n /**\n * Re-draw the layer panel to represent the current state of the layers.\n */\n\n }, {\n key: 'renderPanel',\n value: function renderPanel() {\n this.dispatchEvent('render');\n LayerSwitcher.renderPanel(this.getMap(), this.panel, {\n groupSelectStyle: this.groupSelectStyle,\n reverse: this.reverse\n });\n this.dispatchEvent('rendercomplete');\n }\n /**\n * **_[static]_** - Re-draw the layer panel to represent the current state of the layers.\n * @param map The OpenLayers Map instance to render layers for\n * @param panel The DOM Element into which the layer tree will be rendered\n * @param options Options for panel, group, and layers\n */\n\n }], [{\n key: 'renderPanel',\n value: function renderPanel(map, panel, options) {\n // Create the event.\n var render_event = new Event('render');\n // Dispatch the event.\n panel.dispatchEvent(render_event);\n options = options || {};\n options.groupSelectStyle = LayerSwitcher.getGroupSelectStyle(options.groupSelectStyle);\n LayerSwitcher.ensureTopVisibleBaseLayerShown(map, options.groupSelectStyle);\n while (panel.firstChild) {\n panel.removeChild(panel.firstChild);\n }\n // Reset indeterminate state for all layers and groups before\n // applying based on groupSelectStyle\n LayerSwitcher.forEachRecursive(map, function (l, _idx, _a) {\n l.set('indeterminate', false);\n });\n if (options.groupSelectStyle === 'children' || options.groupSelectStyle === 'none') {\n // Set visibile and indeterminate state of groups based on\n // their children's visibility\n LayerSwitcher.setGroupVisibility(map);\n } else if (options.groupSelectStyle === 'group') {\n // Set child indetermiate state based on their parent's visibility\n LayerSwitcher.setChildVisibility(map);\n }\n var ul = document.createElement('ul');\n panel.appendChild(ul);\n // passing two map arguments instead of lyr as we're passing the map as the root of the layers tree\n LayerSwitcher.renderLayers_(map, map, ul, options, function render(_changedLyr) {\n LayerSwitcher.renderPanel(map, panel, options);\n });\n // Create the event.\n var rendercomplete_event = new Event('rendercomplete');\n // Dispatch the event.\n panel.dispatchEvent(rendercomplete_event);\n }\n /**\n * **_[static]_** - Determine if a given layer group contains base layers\n * @param grp Group to test\n */\n\n }, {\n key: 'isBaseGroup',\n value: function isBaseGroup(grp) {\n if (grp instanceof LayerGroup) {\n var lyrs = grp.getLayers().getArray();\n return lyrs.length && lyrs[0].get('type') === 'base';\n } else {\n return false;\n }\n }\n }, {\n key: 'setGroupVisibility',\n value: function setGroupVisibility(map) {\n // Get a list of groups, with the deepest first\n var groups = LayerSwitcher.getGroupsAndLayers(map, function (l) {\n return l instanceof LayerGroup && !l.get('combine') && !LayerSwitcher.isBaseGroup(l);\n }).reverse();\n // console.log(groups.map(g => g.get('title')));\n groups.forEach(function (grp) {\n // TODO Can we use getLayersArray, is it public in the esm build?\n var descendantVisibility = grp.getLayersArray().map(function (l) {\n var state = l.getVisible();\n // console.log('>', l.get('title'), state);\n return state;\n });\n // console.log(descendantVisibility);\n if (descendantVisibility.every(function (v) {\n return v === true;\n })) {\n grp.setVisible(true);\n grp.set('indeterminate', false);\n } else if (descendantVisibility.every(function (v) {\n return v === false;\n })) {\n grp.setVisible(false);\n grp.set('indeterminate', false);\n } else {\n grp.setVisible(true);\n grp.set('indeterminate', true);\n }\n });\n }\n }, {\n key: 'setChildVisibility',\n value: function setChildVisibility(map) {\n // console.log('setChildVisibility');\n var groups = LayerSwitcher.getGroupsAndLayers(map, function (l) {\n return l instanceof LayerGroup && !l.get('combine') && !LayerSwitcher.isBaseGroup(l);\n });\n groups.forEach(function (grp) {\n var group = grp;\n // console.log(group.get('title'));\n var groupVisible = group.getVisible();\n var groupIndeterminate = group.get('indeterminate');\n group.getLayers().getArray().forEach(function (l) {\n l.set('indeterminate', false);\n if ((!groupVisible || groupIndeterminate) && l.getVisible()) {\n l.set('indeterminate', true);\n }\n });\n });\n }\n /**\n * Ensure only the top-most base layer is visible if more than one is visible.\n * @param map The map instance.\n * @param groupSelectStyle\n * @protected\n */\n\n }, {\n key: 'ensureTopVisibleBaseLayerShown',\n value: function ensureTopVisibleBaseLayerShown(map, groupSelectStyle) {\n var lastVisibleBaseLyr = void 0;\n LayerSwitcher.forEachRecursive(map, function (lyr, _idx, _arr) {\n if (lyr.get('type') === 'base' && lyr.getVisible()) {\n lastVisibleBaseLyr = lyr;\n }\n });\n if (lastVisibleBaseLyr) LayerSwitcher.setVisible_(map, lastVisibleBaseLyr, true, groupSelectStyle);\n }\n /**\n * **_[static]_** - Get an Array of all layers and groups displayed by the LayerSwitcher (has a `'title'` property)\n * contained by the specified map or layer group; optionally filtering via `filterFn`\n * @param grp The map or layer group for which layers are found.\n * @param filterFn Optional function used to filter the returned layers\n */\n\n }, {\n key: 'getGroupsAndLayers',\n value: function getGroupsAndLayers(grp, filterFn) {\n var layers = [];\n filterFn = filterFn || function (_lyr, _idx, _arr) {\n return true;\n };\n LayerSwitcher.forEachRecursive(grp, function (lyr, idx, arr) {\n if (lyr.get('title')) {\n if (filterFn(lyr, idx, arr)) {\n layers.push(lyr);\n }\n }\n });\n return layers;\n }\n /**\n * Toggle the visible state of a layer.\n * Takes care of hiding other layers in the same exclusive group if the layer\n * is toggle to visible.\n * @protected\n * @param map The map instance.\n * @param lyr layer whose visibility will be toggled.\n * @param visible Set whether the layer is shown\n * @param groupSelectStyle\n * @protected\n */\n\n }, {\n key: 'setVisible_',\n value: function setVisible_(map, lyr, visible, groupSelectStyle) {\n // console.log(lyr.get('title'), visible, groupSelectStyle);\n lyr.setVisible(visible);\n if (visible && lyr.get('type') === 'base') {\n // Hide all other base layers regardless of grouping\n LayerSwitcher.forEachRecursive(map, function (l, _idx, _arr) {\n if (l != lyr && l.get('type') === 'base') {\n l.setVisible(false);\n }\n });\n }\n if (lyr instanceof LayerGroup && !lyr.get('combine') && groupSelectStyle === 'children') {\n lyr.getLayers().forEach(function (l) {\n LayerSwitcher.setVisible_(map, l, lyr.getVisible(), groupSelectStyle);\n });\n }\n }\n /**\n * Render all layers that are children of a group.\n * @param map The map instance.\n * @param lyr Layer to be rendered (should have a title property).\n * @param idx Position in parent group list.\n * @param options Options for groups and layers\n * @protected\n */\n\n }, {\n key: 'renderLayer_',\n value: function renderLayer_(map, lyr, idx, options, render) {\n var li = document.createElement('li');\n var lyrTitle = lyr.get('title');\n var checkboxId = LayerSwitcher.uuid();\n var label = document.createElement('label');\n if (lyr instanceof LayerGroup && !lyr.get('combine')) {\n var isBaseGroup = LayerSwitcher.isBaseGroup(lyr);\n li.classList.add('group');\n if (isBaseGroup) {\n li.classList.add(CSS_PREFIX + 'base-group');\n }\n // Group folding\n if (lyr.get('fold')) {\n li.classList.add(CSS_PREFIX + 'fold');\n li.classList.add(CSS_PREFIX + lyr.get('fold'));\n var btn = document.createElement('button');\n btn.onclick = function (e) {\n var evt = e || window.event;\n LayerSwitcher.toggleFold_(lyr, li);\n evt.preventDefault();\n };\n li.appendChild(btn);\n }\n if (!isBaseGroup && options.groupSelectStyle != 'none') {\n var input = document.createElement('input');\n input.type = 'checkbox';\n input.id = checkboxId;\n input.checked = lyr.getVisible();\n input.indeterminate = lyr.get('indeterminate');\n input.onchange = function (e) {\n var target = e.target;\n LayerSwitcher.setVisible_(map, lyr, target.checked, options.groupSelectStyle);\n render(lyr);\n };\n li.appendChild(input);\n label.htmlFor = checkboxId;\n }\n label.innerHTML = lyrTitle;\n li.appendChild(label);\n var ul = document.createElement('ul');\n li.appendChild(ul);\n LayerSwitcher.renderLayers_(map, lyr, ul, options, render);\n } else {\n li.className = 'layer';\n var _input = document.createElement('input');\n if (lyr.get('type') === 'base') {\n _input.type = 'radio';\n _input.name = 'base';\n } else {\n _input.type = 'checkbox';\n }\n _input.id = checkboxId;\n _input.checked = lyr.get('visible');\n _input.indeterminate = lyr.get('indeterminate');\n _input.onchange = function (e) {\n var target = e.target;\n LayerSwitcher.setVisible_(map, lyr, target.checked, options.groupSelectStyle);\n render(lyr);\n };\n li.appendChild(_input);\n label.htmlFor = checkboxId;\n label.innerHTML = lyrTitle;\n var rsl = map.getView().getResolution();\n if (rsl > lyr.getMaxResolution() || rsl < lyr.getMinResolution()) {\n label.className += ' disabled';\n }\n li.appendChild(label);\n }\n return li;\n }\n /**\n * Render all layers that are children of a group.\n * @param map The map instance.\n * @param lyr Group layer whose children will be rendered.\n * @param elm DOM element that children will be appended to.\n * @param options Options for groups and layers\n * @protected\n */\n\n }, {\n key: 'renderLayers_',\n value: function renderLayers_(map, lyr, elm, options, render) {\n var lyrs = lyr.getLayers().getArray().slice();\n if (options.reverse) lyrs = lyrs.reverse();\n for (var i = 0, l; i < lyrs.length; i++) {\n l = lyrs[i];\n if (l.get('title')) {\n elm.appendChild(LayerSwitcher.renderLayer_(map, l, i, options, render));\n }\n }\n }\n /**\n * **_[static]_** - Call the supplied function for each layer in the passed layer group\n * recursing nested groups.\n * @param lyr The layer group to start iterating from.\n * @param fn Callback which will be called for each layer\n * found under `lyr`.\n */\n\n }, {\n key: 'forEachRecursive',\n value: function forEachRecursive(lyr, fn) {\n lyr.getLayers().forEach(function (lyr, idx, a) {\n fn(lyr, idx, a);\n if (lyr instanceof LayerGroup) {\n LayerSwitcher.forEachRecursive(lyr, fn);\n }\n });\n }\n /**\n * **_[static]_** - Generate a UUID\n * Adapted from http://stackoverflow.com/a/2117523/526860\n * @returns {String} UUID\n */\n\n }, {\n key: 'uuid',\n value: function uuid() {\n return 'xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx'.replace(/[xy]/g, function (c) {\n var r = Math.random() * 16 | 0,\n v = c == 'x' ? r : r & 0x3 | 0x8;\n return v.toString(16);\n });\n }\n /**\n * Apply workaround to enable scrolling of overflowing content within an\n * element. Adapted from https://gist.github.com/chrismbarr/4107472\n * @param elm Element on which to enable touch scrolling\n * @protected\n */\n\n }, {\n key: 'enableTouchScroll_',\n value: function enableTouchScroll_(elm) {\n if (LayerSwitcher.isTouchDevice_()) {\n var scrollStartPos = 0;\n elm.addEventListener('touchstart', function (event) {\n scrollStartPos = this.scrollTop + event.touches[0].pageY;\n }, false);\n elm.addEventListener('touchmove', function (event) {\n this.scrollTop = scrollStartPos - event.touches[0].pageY;\n }, false);\n }\n }\n /**\n * Determine if the current browser supports touch events. Adapted from\n * https://gist.github.com/chrismbarr/4107472\n * @returns {Boolean} True if client can have 'TouchEvent' event\n * @protected\n */\n\n }, {\n key: 'isTouchDevice_',\n value: function isTouchDevice_() {\n try {\n document.createEvent('TouchEvent');\n return true;\n } catch (e) {\n return false;\n }\n }\n /**\n * Fold/unfold layer group\n * @param lyr Layer group to fold/unfold\n * @param li List item containing layer group\n * @protected\n */\n\n }, {\n key: 'toggleFold_',\n value: function toggleFold_(lyr, li) {\n li.classList.remove(CSS_PREFIX + lyr.get('fold'));\n lyr.set('fold', lyr.get('fold') === 'open' ? 'close' : 'open');\n li.classList.add(CSS_PREFIX + lyr.get('fold'));\n }\n /**\n * If a valid groupSelectStyle value is not provided then return the default\n * @param groupSelectStyle The string to check for validity\n * @returns The value groupSelectStyle, if valid, the default otherwise\n * @protected\n */\n\n }, {\n key: 'getGroupSelectStyle',\n value: function getGroupSelectStyle(groupSelectStyle) {\n return ['none', 'children', 'group'].indexOf(groupSelectStyle) >= 0 ? groupSelectStyle : 'children';\n }\n }]);\n return LayerSwitcher;\n}(Control);\nif (window['ol'] && window['ol']['control']) {\n window['ol']['control']['LayerSwitcher'] = LayerSwitcher;\n}\n\nreturn LayerSwitcher;\n\n})));\n","\n\n\n","/**\n * @module ol/OverlayPositioning\n */\n/**\n * Overlay position: `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, `'top-right'`\n * @enum {string}\n */\nexport default {\n BOTTOM_LEFT: 'bottom-left',\n BOTTOM_CENTER: 'bottom-center',\n BOTTOM_RIGHT: 'bottom-right',\n CENTER_LEFT: 'center-left',\n CENTER_CENTER: 'center-center',\n CENTER_RIGHT: 'center-right',\n TOP_LEFT: 'top-left',\n TOP_CENTER: 'top-center',\n TOP_RIGHT: 'top-right',\n};\n//# sourceMappingURL=OverlayPositioning.js.map","var __extends = (this && this.__extends) || (function () {\n var extendStatics = function (d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n };\n return function (d, b) {\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n };\n})();\n/**\n * @module ol/Overlay\n */\nimport BaseObject, { getChangeEventType } from './Object.js';\nimport MapEventType from './MapEventType.js';\nimport OverlayPositioning from './OverlayPositioning.js';\nimport { CLASS_SELECTABLE } from './css.js';\nimport { containsExtent } from './extent.js';\nimport { listen, unlistenByKey } from './events.js';\nimport { outerHeight, outerWidth, removeChildren, removeNode } from './dom.js';\n/**\n * @typedef {Object} Options\n * @property {number|string} [id] Set the overlay id. The overlay id can be used\n * with the {@link module:ol/Map~Map#getOverlayById} method.\n * @property {HTMLElement} [element] The overlay element.\n * @property {Array} [offset=[0, 0]] Offsets in pixels used when positioning\n * the overlay. The first element in the\n * array is the horizontal offset. A positive value shifts the overlay right.\n * The second element in the array is the vertical offset. A positive value\n * shifts the overlay down.\n * @property {import(\"./coordinate.js\").Coordinate} [position] The overlay position\n * in map projection.\n * @property {import(\"./OverlayPositioning.js\").default} [positioning='top-left'] Defines how\n * the overlay is actually positioned with respect to its `position` property.\n * Possible values are `'bottom-left'`, `'bottom-center'`, `'bottom-right'`,\n * `'center-left'`, `'center-center'`, `'center-right'`, `'top-left'`,\n * `'top-center'`, and `'top-right'`.\n * @property {boolean} [stopEvent=true] Whether event propagation to the map\n * viewport should be stopped. If `true` the overlay is placed in the same\n * container as that of the controls (CSS class name\n * `ol-overlaycontainer-stopevent`); if `false` it is placed in the container\n * with CSS class name specified by the `className` property.\n * @property {boolean} [insertFirst=true] Whether the overlay is inserted first\n * in the overlay container, or appended. If the overlay is placed in the same\n * container as that of the controls (see the `stopEvent` option) you will\n * probably set `insertFirst` to `true` so the overlay is displayed below the\n * controls.\n * @property {PanIntoViewOptions|boolean} [autoPan=false] Pan the map when calling\n * `setPosition`, so that the overlay is entirely visible in the current viewport?\n * If `true` (deprecated), then `autoPanAnimation` and `autoPanMargin` will be\n * used to determine the panning parameters; if an object is supplied then other\n * parameters are ignored.\n * @property {PanOptions} [autoPanAnimation] The animation options used to pan\n * the overlay into view. This animation is only used when `autoPan` is enabled.\n * A `duration` and `easing` may be provided to customize the animation.\n * Deprecated and ignored if `autoPan` is supplied as an object.\n * @property {number} [autoPanMargin=20] The margin (in pixels) between the\n * overlay and the borders of the map when autopanning. Deprecated and ignored\n * if `autoPan` is supplied as an object.\n * @property {PanIntoViewOptions} [autoPanOptions] The options to use for the\n * autoPan. This is only used when `autoPan` is enabled and has preference over\n * the individual `autoPanMargin` and `autoPanOptions`.\n * @property {string} [className='ol-overlay-container ol-selectable'] CSS class\n * name.\n */\n/**\n * @typedef {Object} PanOptions\n * @property {number} [duration=1000] The duration of the animation in\n * milliseconds.\n * @property {function(number):number} [easing] The easing function to use. Can\n * be one from {@link module:ol/easing} or a custom function.\n * Default is {@link module:ol/easing~inAndOut}.\n */\n/**\n * @typedef {Object} PanIntoViewOptions\n * @property {PanOptions} [animation={}] The animation parameters for the pan\n * @property {number} [margin=20] The margin (in pixels) between the\n * overlay and the borders of the map when panning into view.\n */\n/**\n * @enum {string}\n * @protected\n */\nvar Property = {\n ELEMENT: 'element',\n MAP: 'map',\n OFFSET: 'offset',\n POSITION: 'position',\n POSITIONING: 'positioning',\n};\n/**\n * @classdesc\n * An element to be displayed over the map and attached to a single map\n * location. Like {@link module:ol/control/Control~Control}, Overlays are\n * visible widgets. Unlike Controls, they are not in a fixed position on the\n * screen, but are tied to a geographical coordinate, so panning the map will\n * move an Overlay but not a Control.\n *\n * Example:\n *\n * import Overlay from 'ol/Overlay';\n *\n * var popup = new Overlay({\n * element: document.getElementById('popup')\n * });\n * popup.setPosition(coordinate);\n * map.addOverlay(popup);\n *\n * @api\n */\nvar Overlay = /** @class */ (function (_super) {\n __extends(Overlay, _super);\n /**\n * @param {Options} options Overlay options.\n */\n function Overlay(options) {\n var _this = _super.call(this) || this;\n /**\n * @protected\n * @type {Options}\n */\n _this.options = options;\n /**\n * @protected\n * @type {number|string|undefined}\n */\n _this.id = options.id;\n /**\n * @protected\n * @type {boolean}\n */\n _this.insertFirst =\n options.insertFirst !== undefined ? options.insertFirst : true;\n /**\n * @protected\n * @type {boolean}\n */\n _this.stopEvent = options.stopEvent !== undefined ? options.stopEvent : true;\n /**\n * @protected\n * @type {HTMLElement}\n */\n _this.element = document.createElement('div');\n _this.element.className =\n options.className !== undefined\n ? options.className\n : 'ol-overlay-container ' + CLASS_SELECTABLE;\n _this.element.style.position = 'absolute';\n _this.element.style.pointerEvents = 'auto';\n var autoPan = options.autoPan;\n if (autoPan && 'object' !== typeof autoPan) {\n autoPan = {\n animation: options.autoPanAnimation,\n margin: options.autoPanMargin,\n };\n }\n /**\n * @protected\n * @type {PanIntoViewOptions|false}\n */\n _this.autoPan = /** @type {PanIntoViewOptions} */ (autoPan) || false;\n /**\n * @protected\n * @type {{transform_: string,\n * visible: boolean}}\n */\n _this.rendered = {\n transform_: '',\n visible: true,\n };\n /**\n * @protected\n * @type {?import(\"./events.js\").EventsKey}\n */\n _this.mapPostrenderListenerKey = null;\n _this.addEventListener(getChangeEventType(Property.ELEMENT), _this.handleElementChanged);\n _this.addEventListener(getChangeEventType(Property.MAP), _this.handleMapChanged);\n _this.addEventListener(getChangeEventType(Property.OFFSET), _this.handleOffsetChanged);\n _this.addEventListener(getChangeEventType(Property.POSITION), _this.handlePositionChanged);\n _this.addEventListener(getChangeEventType(Property.POSITIONING), _this.handlePositioningChanged);\n if (options.element !== undefined) {\n _this.setElement(options.element);\n }\n _this.setOffset(options.offset !== undefined ? options.offset : [0, 0]);\n _this.setPositioning(options.positioning !== undefined\n ? /** @type {import(\"./OverlayPositioning.js\").default} */ (options.positioning)\n : OverlayPositioning.TOP_LEFT);\n if (options.position !== undefined) {\n _this.setPosition(options.position);\n }\n return _this;\n }\n /**\n * Get the DOM element of this overlay.\n * @return {HTMLElement|undefined} The Element containing the overlay.\n * @observable\n * @api\n */\n Overlay.prototype.getElement = function () {\n return /** @type {HTMLElement|undefined} */ (this.get(Property.ELEMENT));\n };\n /**\n * Get the overlay identifier which is set on constructor.\n * @return {number|string|undefined} Id.\n * @api\n */\n Overlay.prototype.getId = function () {\n return this.id;\n };\n /**\n * Get the map associated with this overlay.\n * @return {import(\"./PluggableMap.js\").default|undefined} The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n Overlay.prototype.getMap = function () {\n return /** @type {import(\"./PluggableMap.js\").default|undefined} */ (this.get(Property.MAP));\n };\n /**\n * Get the offset of this overlay.\n * @return {Array} The offset.\n * @observable\n * @api\n */\n Overlay.prototype.getOffset = function () {\n return /** @type {Array} */ (this.get(Property.OFFSET));\n };\n /**\n * Get the current position of this overlay.\n * @return {import(\"./coordinate.js\").Coordinate|undefined} The spatial point that the overlay is\n * anchored at.\n * @observable\n * @api\n */\n Overlay.prototype.getPosition = function () {\n return /** @type {import(\"./coordinate.js\").Coordinate|undefined} */ (this.get(Property.POSITION));\n };\n /**\n * Get the current positioning of this overlay.\n * @return {import(\"./OverlayPositioning.js\").default} How the overlay is positioned\n * relative to its point on the map.\n * @observable\n * @api\n */\n Overlay.prototype.getPositioning = function () {\n return /** @type {import(\"./OverlayPositioning.js\").default} */ (this.get(Property.POSITIONING));\n };\n /**\n * @protected\n */\n Overlay.prototype.handleElementChanged = function () {\n removeChildren(this.element);\n var element = this.getElement();\n if (element) {\n this.element.appendChild(element);\n }\n };\n /**\n * @protected\n */\n Overlay.prototype.handleMapChanged = function () {\n if (this.mapPostrenderListenerKey) {\n removeNode(this.element);\n unlistenByKey(this.mapPostrenderListenerKey);\n this.mapPostrenderListenerKey = null;\n }\n var map = this.getMap();\n if (map) {\n this.mapPostrenderListenerKey = listen(map, MapEventType.POSTRENDER, this.render, this);\n this.updatePixelPosition();\n var container = this.stopEvent\n ? map.getOverlayContainerStopEvent()\n : map.getOverlayContainer();\n if (this.insertFirst) {\n container.insertBefore(this.element, container.childNodes[0] || null);\n }\n else {\n container.appendChild(this.element);\n }\n this.performAutoPan();\n }\n };\n /**\n * @protected\n */\n Overlay.prototype.render = function () {\n this.updatePixelPosition();\n };\n /**\n * @protected\n */\n Overlay.prototype.handleOffsetChanged = function () {\n this.updatePixelPosition();\n };\n /**\n * @protected\n */\n Overlay.prototype.handlePositionChanged = function () {\n this.updatePixelPosition();\n this.performAutoPan();\n };\n /**\n * @protected\n */\n Overlay.prototype.handlePositioningChanged = function () {\n this.updatePixelPosition();\n };\n /**\n * Set the DOM element to be associated with this overlay.\n * @param {HTMLElement|undefined} element The Element containing the overlay.\n * @observable\n * @api\n */\n Overlay.prototype.setElement = function (element) {\n this.set(Property.ELEMENT, element);\n };\n /**\n * Set the map to be associated with this overlay.\n * @param {import(\"./PluggableMap.js\").default|undefined} map The map that the\n * overlay is part of.\n * @observable\n * @api\n */\n Overlay.prototype.setMap = function (map) {\n this.set(Property.MAP, map);\n };\n /**\n * Set the offset for this overlay.\n * @param {Array} offset Offset.\n * @observable\n * @api\n */\n Overlay.prototype.setOffset = function (offset) {\n this.set(Property.OFFSET, offset);\n };\n /**\n * Set the position for this overlay. If the position is `undefined` the\n * overlay is hidden.\n * @param {import(\"./coordinate.js\").Coordinate|undefined} position The spatial point that the overlay\n * is anchored at.\n * @observable\n * @api\n */\n Overlay.prototype.setPosition = function (position) {\n this.set(Property.POSITION, position);\n };\n /**\n * Pan the map so that the overlay is entirely visisble in the current viewport\n * (if necessary) using the configured autoPan parameters\n * @protected\n */\n Overlay.prototype.performAutoPan = function () {\n if (this.autoPan) {\n this.panIntoView(this.autoPan);\n }\n };\n /**\n * Pan the map so that the overlay is entirely visible in the current viewport\n * (if necessary).\n * @param {PanIntoViewOptions=} opt_panIntoViewOptions Options for the pan action\n * @api\n */\n Overlay.prototype.panIntoView = function (opt_panIntoViewOptions) {\n var map = this.getMap();\n if (!map || !map.getTargetElement() || !this.get(Property.POSITION)) {\n return;\n }\n var mapRect = this.getRect(map.getTargetElement(), map.getSize());\n var element = this.getElement();\n var overlayRect = this.getRect(element, [\n outerWidth(element),\n outerHeight(element),\n ]);\n var panIntoViewOptions = opt_panIntoViewOptions || {};\n var myMargin = panIntoViewOptions.margin === undefined ? 20 : panIntoViewOptions.margin;\n if (!containsExtent(mapRect, overlayRect)) {\n // the overlay is not completely inside the viewport, so pan the map\n var offsetLeft = overlayRect[0] - mapRect[0];\n var offsetRight = mapRect[2] - overlayRect[2];\n var offsetTop = overlayRect[1] - mapRect[1];\n var offsetBottom = mapRect[3] - overlayRect[3];\n var delta = [0, 0];\n if (offsetLeft < 0) {\n // move map to the left\n delta[0] = offsetLeft - myMargin;\n }\n else if (offsetRight < 0) {\n // move map to the right\n delta[0] = Math.abs(offsetRight) + myMargin;\n }\n if (offsetTop < 0) {\n // move map up\n delta[1] = offsetTop - myMargin;\n }\n else if (offsetBottom < 0) {\n // move map down\n delta[1] = Math.abs(offsetBottom) + myMargin;\n }\n if (delta[0] !== 0 || delta[1] !== 0) {\n var center = /** @type {import(\"./coordinate.js\").Coordinate} */ (map\n .getView()\n .getCenterInternal());\n var centerPx = map.getPixelFromCoordinateInternal(center);\n if (!centerPx) {\n return;\n }\n var newCenterPx = [centerPx[0] + delta[0], centerPx[1] + delta[1]];\n var panOptions = panIntoViewOptions.animation || {};\n map.getView().animateInternal({\n center: map.getCoordinateFromPixelInternal(newCenterPx),\n duration: panOptions.duration,\n easing: panOptions.easing,\n });\n }\n }\n };\n /**\n * Get the extent of an element relative to the document\n * @param {HTMLElement} element The element.\n * @param {import(\"./size.js\").Size} size The size of the element.\n * @return {import(\"./extent.js\").Extent} The extent.\n * @protected\n */\n Overlay.prototype.getRect = function (element, size) {\n var box = element.getBoundingClientRect();\n var offsetX = box.left + window.pageXOffset;\n var offsetY = box.top + window.pageYOffset;\n return [offsetX, offsetY, offsetX + size[0], offsetY + size[1]];\n };\n /**\n * Set the positioning for this overlay.\n * @param {import(\"./OverlayPositioning.js\").default} positioning how the overlay is\n * positioned relative to its point on the map.\n * @observable\n * @api\n */\n Overlay.prototype.setPositioning = function (positioning) {\n this.set(Property.POSITIONING, positioning);\n };\n /**\n * Modify the visibility of the element.\n * @param {boolean} visible Element visibility.\n * @protected\n */\n Overlay.prototype.setVisible = function (visible) {\n if (this.rendered.visible !== visible) {\n this.element.style.display = visible ? '' : 'none';\n this.rendered.visible = visible;\n }\n };\n /**\n * Update pixel position.\n * @protected\n */\n Overlay.prototype.updatePixelPosition = function () {\n var map = this.getMap();\n var position = this.getPosition();\n if (!map || !map.isRendered() || !position) {\n this.setVisible(false);\n return;\n }\n var pixel = map.getPixelFromCoordinate(position);\n var mapSize = map.getSize();\n this.updateRenderedPosition(pixel, mapSize);\n };\n /**\n * @param {import(\"./pixel.js\").Pixel} pixel The pixel location.\n * @param {import(\"./size.js\").Size|undefined} mapSize The map size.\n * @protected\n */\n Overlay.prototype.updateRenderedPosition = function (pixel, mapSize) {\n var style = this.element.style;\n var offset = this.getOffset();\n var positioning = this.getPositioning();\n this.setVisible(true);\n var x = Math.round(pixel[0] + offset[0]) + 'px';\n var y = Math.round(pixel[1] + offset[1]) + 'px';\n var posX = '0%';\n var posY = '0%';\n if (positioning == OverlayPositioning.BOTTOM_RIGHT ||\n positioning == OverlayPositioning.CENTER_RIGHT ||\n positioning == OverlayPositioning.TOP_RIGHT) {\n posX = '-100%';\n }\n else if (positioning == OverlayPositioning.BOTTOM_CENTER ||\n positioning == OverlayPositioning.CENTER_CENTER ||\n positioning == OverlayPositioning.TOP_CENTER) {\n posX = '-50%';\n }\n if (positioning == OverlayPositioning.BOTTOM_LEFT ||\n positioning == OverlayPositioning.BOTTOM_CENTER ||\n positioning == OverlayPositioning.BOTTOM_RIGHT) {\n posY = '-100%';\n }\n else if (positioning == OverlayPositioning.CENTER_LEFT ||\n positioning == OverlayPositioning.CENTER_CENTER ||\n positioning == OverlayPositioning.CENTER_RIGHT) {\n posY = '-50%';\n }\n var transform = \"translate(\" + posX + \", \" + posY + \") translate(\" + x + \", \" + y + \")\";\n if (this.rendered.transform_ != transform) {\n this.rendered.transform_ = transform;\n style.transform = transform;\n // @ts-ignore IE9\n style.msTransform = transform;\n }\n };\n /**\n * returns the options this Overlay has been created with\n * @return {Options} overlay options\n */\n Overlay.prototype.getOptions = function () {\n return this.options;\n };\n return Overlay;\n}(BaseObject));\nexport default Overlay;\n//# sourceMappingURL=Overlay.js.map","/* eslint-disable object-curly-spacing */\nimport { Control } from 'ol/control';\n\nclass SearchControl extends Control {\n /**\n * @param {Object} [opt_options] Control options.\n */\n constructor(options) {\n super({\n element: options.element,\n target: options.target,\n });\n }\n}\n\nexport default SearchControl;\n","/* eslint-disable no-shadow */\nimport Map from 'ol/Map';\nimport { TileArcGISRest, Vector as VectorSource } from 'ol/source';\nimport { Group as GroupLayer, Tile as TileLayer, Vector as VectorLayer } from 'ol/layer';\nimport View from 'ol/View';\nimport { Control, MousePosition, ScaleLine, defaults as defaultControls } from 'ol/control';\nimport { format } from 'ol/coordinate';\nimport { toLonLat, fromLonLat } from 'ol/proj';\nimport Overlay from 'ol/Overlay';\nimport { unByKey } from 'ol/Observable';\nimport { WKT } from 'ol/format';\nimport { Circle as CircleStyle, Icon as IconStyle, Fill, Stroke, Style } from 'ol/style';\nimport { Draw as DrawingInteraction } from 'ol/interaction';\nimport LayerSwitcher from 'ol-layerswitcher';\nimport { Modal } from 'bootstrap';\nimport SearchControl from '@/mixins/searchControl';\nimport * as yup from 'yup';\n\nexport default {\n methods: {\n addDrawingInteraction() {\n this.drawingInteraction = new DrawingInteraction({\n source: this.drawingVectorSource,\n style: new Style({\n image: new CircleStyle({\n radius: 6,\n stroke: new Stroke({ color: 'gray', width: 2 }),\n fill: new Fill({ color: 'rgba(0, 0, 0, 0)' }),\n }),\n }),\n type: 'Point',\n });\n this.drawingInteraction.on('drawstart', this.onDrawStart);\n this.burnMap.addInteraction(this.drawingInteraction);\n },\n async getBurnModel() {\n console.debug('Enter getBurnModel()');\n\n this.modelLoading = true;\n\n const coordinates = [...this.lonLat];\n\n // this.reverseGeocodeResult = null;\n this.$store.dispatch('BurnArea/getReverseGeocodeResult', coordinates).then(() => {\n\n this.burnModel = {\n name: null,\n burnWindow: null,\n plannedAcres: null,\n state: null,\n locality: null,\n burnStatus: 'Active',\n priority: 'Normal',\n geometry: { type: 'Point', coordinates },\n };\n\n this.burnModelSchema = {\n name: yup.string().required('Burn name is required').min(1).max(50),\n burnWindow: (value) => {\n if (value) {\n return true;\n }\n return 'You must choose a burn window';\n },\n plannedAcres: yup.number('Required').moreThan(0).typeError('Please enter a number greater than 0'),\n // state: yup.string().required('State is required'),\n locality: yup.string().required('Locality is required'),\n };\n\n if (this.reverseGeocodeResult != null) {\n this.burnModel.state = this.reverseGeocodeResult.address.Region;\n this.burnModel.locality = this.reverseGeocodeResult.address.Subregion;\n }\n\n console.debug('this.burnModel.state: ', this.burnModel.state);\n console.debug('this.burnModel.locality: ', this.burnModel.locality);\n\n this.modelLoading = false;\n });\n\n console.debug('Exit getBurnModel()');\n },\n getBurnModelLonLat() {\n let longitude = Number(this.burnModel.geometry.coordinates[0]);\n let latitude = Number(this.burnModel.geometry.coordinates[1]);\n longitude = Math.round((longitude * 10000)) / 10000;\n latitude = Math.round((latitude * 10000)) / 10000;\n return `${longitude}, ${latitude}`;\n },\n getBurnStyle(feature) {\n const burnStatus = feature.get('burnStatus');\n const readyToBurn = feature.get('readyToBurn');\n if (burnStatus === 'Active' && !readyToBurn) {\n return this.burnStyleActive;\n }\n if (burnStatus === 'Active' && readyToBurn) {\n return this.burnStyleActiveReadyToBurn;\n }\n if (burnStatus !== 'Active') {\n return this.burnStyleInactive;\n }\n return this.burnStyleUnspecified;\n },\n isSaveBurnDisabled() {\n // console.debug('Enter isSaveBurnDisabled()');\n\n // console.debug('this.burnModel: ', this.burnModel);\n // console.debug('this.burnModelSchema:', this.burnModelSchema);\n\n if (!this.burnModel.name) return true;\n if (!this.burnModel.burnWindow) return true;\n if (!this.burnModel.plannedAcres) return true;\n if (!this.burnModel.state) return true;\n if (!this.burnModel.locality) return true;\n\n // console.debug('Exit isSaveBurnDisabled()');\n return false;\n },\n load() {\n this.formLoading = true;\n this.$store.dispatch('App/fetchBurnMapConfig').then(() => {\n this.$store.dispatch('App/fetchBurnUnitMapConfig').then(() => {\n this.loadBurnMap();\n this.loadBurnGroup();\n this.loadDrawingInteraction();\n this.moveView();\n this.formLoading = false;\n });\n });\n },\n loadBaseLayers() {\n\n const baseMapsGroup = this.burnMapConfig.layerGroups.find((e) => e.key === 'grp_basemaps');\n const tileLayers = [];\n\n baseMapsGroup.layers.forEach((layer) => {\n\n if (!Array.isArray(layer)) {\n\n const baseMapLayer = this.burnMapConfig.layers.find((e) => e.key === layer);\n\n const url = baseMapLayer.xyz.endpoints[0].url;\n const source = new TileArcGISRest({ url });\n\n const tileLayer = new TileLayer({\n title: baseMapLayer.name,\n type: 'base',\n visible: false,\n source,\n });\n\n tileLayers.push(tileLayer);\n\n } else {\n\n const baseMapLayers = [];\n const subLayers = [];\n\n layer.forEach((subLayer) => {\n\n const baseMapLayer = this.burnMapConfig.layers.find((e) => e.key === subLayer);\n\n const url = baseMapLayer.xyz.endpoints[0].url;\n const source = new TileArcGISRest({ url });\n\n const subTileLayer = new TileLayer({\n source,\n });\n\n baseMapLayers.push(baseMapLayer);\n\n subLayers.push(subTileLayer);\n });\n\n const baseMapLayerGroup = new GroupLayer({\n title: baseMapLayers[0].name,\n type: 'base',\n combine: true,\n visible: false,\n layers: subLayers,\n });\n\n tileLayers.push(baseMapLayerGroup);\n }\n\n });\n\n tileLayers.reverse();\n tileLayers[tileLayers.length - 1].set('visible', true);\n\n return new GroupLayer({\n title: 'Basemaps',\n layers: tileLayers,\n visible: true,\n });\n },\n loadBurnMap() {\n\n const controls = this.loadControls();\n const layers = this.loadBaseLayers();\n const overlays = this.loadOverlays();\n const target = 'burnMap';\n const view = this.loadView();\n\n this.burnMap = new Map({\n controls,\n layers: [layers],\n overlays,\n target,\n view,\n });\n\n this.layerSwitcher = new LayerSwitcher({\n groupSelectStyle: 'children',\n reverse: true,\n });\n\n this.burnMap.addControl(this.layerSwitcher);\n\n this.infoPopupClickEventKey = this.burnMap.on('singleclick', this.onClickMapInfoPopup);\n\n },\n loadBurnGroup() {\n this.loadBurnStyles();\n this.inactiveBurnsLayer = this.loadBurns('Inactive');\n this.activeBurnsLayer = this.loadBurns('Active');\n const burnsGroupLayer = new GroupLayer({\n title: 'My Burns',\n layers: [this.inactiveBurnsLayer, this.activeBurnsLayer],\n visible: true,\n });\n this.burnMap.addLayer(burnsGroupLayer);\n },\n loadBurns(burnStatus) {\n console.debug('Enter loadBurns()');\n\n console.debug('this.myBurns: ', this.myBurns);\n console.debug('this.myBurnConditions: ', this.myBurnConditions);\n\n const wkt = new WKT();\n const wktFeatures = [];\n\n this.myBurns.filter(\n (myBurn) => myBurn.fields.burnStatus === burnStatus,\n ).forEach((myBurn) => {\n\n const feature = wkt.readFeature(\n myBurn.fields.Geometry.wkt,\n {\n dataProjection: 'EPSG:4326',\n featureProjection: 'EPSG:3857',\n },\n );\n feature.setId(myBurn.id);\n const properties = {\n id: myBurn.id,\n name: myBurn.name,\n burnStatus: myBurn.fields.burnStatus,\n };\n const myBurnCondition = this.myBurnConditions.find((myBurnCondition) => {\n return myBurnCondition.burnAreaId === myBurn.id;\n });\n if (myBurnCondition) {\n properties.readyToBurn = myBurnCondition.readyToBurn;\n }\n feature.setProperties(properties);\n wktFeatures.push(feature);\n });\n\n const vectorSource = new VectorSource({\n features: wktFeatures,\n });\n\n console.debug('Exit loadBurns()');\n return new VectorLayer({\n title: `${burnStatus}`,\n visible: true,\n source: vectorSource,\n style: this.getBurnStyle,\n });\n },\n loadBurnStyles() {\n\n // https://stackoverflow.com/questions/37829941/use-svg-icon-as-marker-in-openlayers\n\n let svg = '';\n this.burnStyleActive = new Style({\n image: new IconStyle({\n opacity: 1,\n src: `data:image/svg+xml;base64,${window.btoa(svg)}`,\n scale: 0.05,\n }),\n });\n\n svg = '';\n this.burnStyleActiveReadyToBurn = new Style({\n image: new IconStyle({\n opacity: 1,\n src: `data:image/svg+xml;base64,${window.btoa(svg)}`,\n scale: 0.05,\n }),\n });\n\n this.burnStyleInactive = new Style({\n image: new CircleStyle({\n radius: 10,\n stroke: new Stroke({ color: 'black', width: 1 }),\n fill: new Fill({ color: 'rgba(191, 191, 191, 1.00)' }),\n }),\n });\n\n this.burnStyleUnspecified = new Style({\n image: new CircleStyle({\n radius: 10,\n stroke: new Stroke({ color: 'black', width: 1 }),\n fill: new Fill({ color: 'rgba(191, 191, 191, 0.10)' }),\n }),\n });\n\n },\n loadControls() {\n\n const mousePositionControl = new MousePosition({\n coordinateFormat: (coordinate) => {\n return format(coordinate, '{y}, {x}', 4);\n },\n projection: 'EPSG:4326',\n undefinedHTML: ' ',\n });\n\n const searchControl = new SearchControl({\n element: this.$refs.searchControl,\n });\n\n const scaleBarControl = new ScaleLine({\n units: 'us',\n bar: true,\n steps: 4,\n text: true,\n minWidth: 140,\n });\n\n const self = this;\n\n // eslint-disable-next-line\n const DrawBurnPointControl = /* @__PURE__ */(function (Control) {\n function DrawBurnPointControl(optOptions) {\n\n const options = optOptions || {};\n const drawBurnPointButton = self.$refs.drawBurnPointButton;\n const cancelBurnPointButton = self.$refs.cancelBurnPointButton;\n const element = document.createElement('div');\n\n element.className = 'ol-draw-burn-point ol-unselectable';\n element.appendChild(drawBurnPointButton);\n element.appendChild(cancelBurnPointButton);\n\n Control.call(this, {\n element,\n target: options.target,\n });\n\n drawBurnPointButton.addEventListener('click', self.onClickBurnPointDrawStart.bind(self), false);\n cancelBurnPointButton.addEventListener('click', self.onClickBurnPointDrawCancel.bind(self), false);\n }\n\n // eslint-disable-next-line\n if (Control) DrawBurnPointControl.__proto__ = Control;\n DrawBurnPointControl.prototype = Object.create(Control && Control.prototype);\n DrawBurnPointControl.prototype.constructor = DrawBurnPointControl;\n\n return DrawBurnPointControl;\n }(Control));\n\n return defaultControls().extend([\n mousePositionControl,\n searchControl,\n scaleBarControl,\n new DrawBurnPointControl(),\n ]);\n },\n loadDrawingInteraction() {\n this.drawingVectorSource = new VectorSource({ wrapX: false });\n this.drawingVectorLayer = new VectorLayer({\n source: this.drawingVectorSource,\n style: new Style({\n image: new CircleStyle({\n radius: 10,\n fill: new Fill({ color: 'cyan' }),\n stroke: new Stroke({ color: 'black', width: 1 }),\n }),\n }),\n visible: true,\n });\n this.burnMap.addLayer(this.drawingVectorLayer);\n },\n loadOverlays() {\n this.infoPopupOverlay = new Overlay({\n element: this.$refs.infoPopupContainer,\n autoPan: true,\n autoPanAnimation: {\n duration: 250,\n },\n });\n this.$refs.infoPopupCloser.onclick = this.onClickInfoPopupClose;\n this.popupOverlay = new Overlay({\n element: this.$refs.popupContainer,\n autoPan: true,\n autoPanAnimation: {\n duration: 250,\n },\n });\n this.$refs.popupCloser.onclick = this.onClickPopupClose;\n return [this.infoPopupOverlay, this.popupOverlay];\n },\n loadView() {\n const extent = this.burnMapConfig.extent;\n const center = [\n (extent.xMax + extent.xMin) / 2,\n (extent.yMax + extent.yMin) / 2,\n ];\n const view = new View({\n center: fromLonLat(center),\n zoom: 6,\n });\n return view;\n },\n moveView() {\n if (this.burnId && this.burnId !== null) {\n this.$store.dispatch('BurnArea/getBurn', this.burnId).then(() => {\n if (this.myBurn && this.myBurn !== null && this.myBurn.fields && this.myBurn.fields !== null && this.myBurn.fields.Geometry && this.myBurn.fields.Geometry !== null) {\n const geometry = this.myBurn.fields.Geometry;\n const wkt = new WKT();\n const feature = wkt.readFeature(\n geometry.wkt,\n { dataProjection: 'EPSG:4326', featureProjection: 'EPSG:3857' },\n );\n this.infoPopupFeatureId = this.myBurn.id;\n this.infoPopupFeatureName = this.myBurn.name;\n this.infoPopupOverlay.setPosition(feature.getGeometry().flatCoordinates);\n this.burnMap.getView().setCenter(feature.getGeometry().flatCoordinates);\n this.burnMap.getView().setZoom(this.burnUnitMapConfig.zoom);\n }\n });\n }\n },\n onClickBurnModelCancel() {\n console.debug('Enter onClickBurnModelCancel()');\n\n console.debug('Exit onClickBurnModelCancel()');\n },\n onClickBurnModelSave(values, { resetForm }) {\n console.debug('Enter onClickBurnModelSave()');\n\n console.debug('values: ', values);\n console.debug('this.burnModel: ', this.burnModel);\n\n this.editBurnModal.hide();\n\n const x = this.burnModel.geometry.coordinates[0];\n const y = this.burnModel.geometry.coordinates[1];\n const type = 'Point';\n const wkt = `POINT (${x} ${y})`;\n const geometry = { type, wkt };\n\n const burnModel = {\n name: this.burnModel.name,\n fields: {\n burnDate: null,\n burnStatus: this.burnModel.burnStatus,\n burnWindow: this.burnModel.burnWindow,\n geometry: this.burnModel.geometry,\n Geometry: geometry,\n state: this.burnModel.state,\n locality: this.burnModel.locality,\n plannedAcres: this.burnModel.plannedAcres,\n priority: this.burnModel.priority,\n preferredConditions: [],\n },\n };\n console.debug('burnModel: ', burnModel);\n\n this.$store.dispatch('BurnArea/postBurn', burnModel).then(() => {\n (new Modal(this.$refs.successModal)).show();\n });\n\n resetForm();\n\n console.debug('Exit onClickBurnModelSave()');\n },\n onClickBurnPointDrawStart() {\n this.drawing = true;\n this.infoPopupOverlay.setPosition(undefined);\n this.$refs.infoPopupCloser.blur();\n this.$refs.drawBurnPointButton.style.display = 'none';\n this.$refs.cancelBurnPointButton.style.display = 'block';\n this.singleClickEventKey = this.burnMap.on('singleclick', this.onClickMap);\n this.addDrawingInteraction();\n },\n onClickBurnPointDrawCancel() {\n this.drawing = false;\n unByKey(this.singleClickEventKey);\n this.burnMap.removeInteraction(this.drawingInteraction);\n this.drawingVectorSource.clear();\n this.popupOverlay.setPosition(undefined);\n this.$refs.popupCloser.blur();\n this.$refs.drawBurnPointButton.style.display = 'block';\n this.$refs.cancelBurnPointButton.style.display = 'none';\n },\n onClickMap(event) {\n this.lonLat = toLonLat(event.coordinate);\n this.popupOverlay.setPosition(event.coordinate);\n },\n onClickMapInfoPopup(event) {\n this.hideSearches();\n this.infoPopupOverlay.setPosition(undefined);\n this.$refs.infoPopupCloser.blur();\n if (!this.drawing) {\n this.burnMap.forEachFeatureAtPixel(event.pixel, (feature) => {\n this.infoPopupFeatureId = feature.get('id');\n this.infoPopupFeatureName = feature.get('name');\n this.lonLat = toLonLat(event.coordinate);\n this.infoPopupOverlay.setPosition(event.coordinate);\n });\n }\n },\n onClickInfoPopupClose() {\n this.infoPopupOverlay.setPosition(undefined);\n this.$refs.infoPopupCloser.blur();\n return false;\n },\n onClickPopupClose() {\n this.popupOverlay.setPosition(undefined);\n this.$refs.popupCloser.blur();\n return false;\n },\n onClickPopupSave() {\n\n this.drawing = false;\n unByKey(this.singleClickEventKey);\n this.burnMap.removeInteraction(this.drawingInteraction);\n this.drawingVectorSource.clear();\n\n this.popupOverlay.setPosition(undefined);\n this.$refs.popupCloser.blur();\n\n this.$refs.drawBurnPointButton.style.display = 'block';\n this.$refs.cancelBurnPointButton.style.display = 'none';\n\n this.getBurnModel();\n\n return false;\n },\n onClickPopupClear() {\n this.drawing = false;\n unByKey(this.singleClickEventKey);\n this.burnMap.removeInteraction(this.drawingInteraction);\n this.drawingVectorSource.clear();\n this.popupOverlay.setPosition(undefined);\n this.$refs.popupCloser.blur();\n this.$refs.drawBurnPointButton.style.display = 'block';\n this.$refs.cancelBurnPointButton.style.display = 'none';\n },\n onClickSuccessModalManageArea() {\n this.$router.push({ name: 'BurnArea', params: { id: this.myNewBurn.id } });\n },\n onDrawStart() {\n this.drawingVectorSource.clear();\n },\n setBurnConditions() {\n console.debug('Enter setBurnConditions()');\n\n this.myBurnConditions = [];\n\n this.myBurns.forEach((myBurn) => {\n\n const myBurnStat = this.myStats.find((e) => e.fields && e.fields.burnAreaId === myBurn.id);\n // console.debug('myBurnStat: ', myBurnStat);\n // console.debug('myBurnStat.name: ', myBurnStat.name);\n\n const weatherConditionDates = this.getWeatherConditionDates(myBurnStat);\n\n if (myBurnStat) {\n\n const weatherConditions = myBurnStat.fields.weatherConditions.map((weatherCondition) => weatherCondition.values).flat().map((e) => {\n const weatherCondition = { ...e };\n weatherCondition.preferredCondition = myBurn.fields.preferredConditions.find((p) => p.name === e.name);\n weatherCondition.preferredConditionSet = this.isPreferredConditionSet(weatherCondition.preferredCondition);\n weatherCondition.preferredConditionMet = this.isPreferredConditionMet(weatherCondition.preferredCondition, weatherCondition);\n return weatherCondition;\n });\n\n // const burnConditions = [...this.burnConditionDates].map((e) => {\n const burnConditions = weatherConditionDates.map((e) => {\n\n const burnConditionStartDate = e.startDate;\n // console.debug('burnConditionStartDate: ', burnConditionStartDate);\n\n const burnConditionWeatherConditions = weatherConditions.filter(\n (weatherCondition) => {\n const weatherConditionStartDate = weatherCondition.startDate;\n // weatherConditionStartDate = this.getGMTDate(new Date(weatherConditionStartDate));\n // console.debug('weatherConditionStartDate: ', weatherConditionStartDate);\n return new Date(weatherConditionStartDate).valueOf() === burnConditionStartDate.valueOf();\n },\n );\n // console.debug('burnConditionWeatherConditions: ', burnConditionWeatherConditions);\n\n const score = {\n requiredPreferredConditionsSet: burnConditionWeatherConditions.filter((w) => w.preferredCondition.required && w.preferredConditionSet).length,\n requiredPreferredConditionsMet: burnConditionWeatherConditions.filter((w) => w.preferredCondition.required && w.preferredConditionMet).length,\n optionalPreferredConditionsSet: burnConditionWeatherConditions.filter((w) => !w.preferredCondition.required && w.preferredConditionSet).length,\n optionalPreferredConditionsMet: burnConditionWeatherConditions.filter((w) => !w.preferredCondition.required && w.preferredConditionMet).length,\n };\n\n return {\n startDate: e.startDate,\n endDate: e.endDate,\n weatherConditions: burnConditionWeatherConditions,\n score,\n readyToBurn: this.isScoreReadyToBurn(score),\n };\n });\n // console.debug('burnConditions: ', burnConditions);\n\n const burnCondition = {\n burnAreaId: myBurn.id,\n preferredConditions: myBurn.fields.preferredConditions,\n burnConditions,\n readyToBurn: burnConditions.filter((bc) => bc.readyToBurn).length > 0,\n };\n\n this.myBurnConditions.push(burnCondition);\n }\n });\n\n console.debug('this.myBurnConditions: ', this.myBurnConditions);\n\n console.debug('Exit setBurnConditions()');\n },\n },\n};\n","import { render } from \"./BurnMap.vue?vue&type=template&id=61bc13e7&scoped=true\"\nimport script from \"./BurnMap.vue?vue&type=script&lang=js\"\nexport * from \"./BurnMap.vue?vue&type=script&lang=js\"\n\nimport \"./BurnMap.vue?vue&type=style&index=0&id=61bc13e7&lang=scss&scoped=true\"\n\nimport exportComponent from \"/codebuild/output/src139310358/src/bitbucket.org/timmonsgroup/pbp-frontend/node_modules/@vue/cli-service/node_modules/vue-loader-v16/dist/exportHelper.js\"\nconst __exports__ = /*#__PURE__*/exportComponent(script, [['render',render],['__scopeId',\"data-v-61bc13e7\"]])\n\nexport default __exports__","'use strict';\n// TODO: Remove from `core-js@4` since it's moved to entry points\nrequire('../modules/es.regexp.exec');\nvar redefine = require('../internals/redefine');\nvar regexpExec = require('../internals/regexp-exec');\nvar fails = require('../internals/fails');\nvar wellKnownSymbol = require('../internals/well-known-symbol');\nvar createNonEnumerableProperty = require('../internals/create-non-enumerable-property');\n\nvar SPECIES = wellKnownSymbol('species');\nvar RegExpPrototype = RegExp.prototype;\n\nvar REPLACE_SUPPORTS_NAMED_GROUPS = !fails(function () {\n // #replace needs built-in support for named groups.\n // #match works fine because it just return the exec results, even if it has\n // a \"grops\" property.\n var re = /./;\n re.exec = function () {\n var result = [];\n result.groups = { a: '7' };\n return result;\n };\n return ''.replace(re, '$') !== '7';\n});\n\n// IE <= 11 replaces $0 with the whole match, as if it was $&\n// https://stackoverflow.com/questions/6024666/getting-ie-to-replace-a-regex-with-the-literal-string-0\nvar REPLACE_KEEPS_$0 = (function () {\n // eslint-disable-next-line regexp/prefer-escape-replacement-dollar-char -- required for testing\n return 'a'.replace(/./, '$0') === '$0';\n})();\n\nvar REPLACE = wellKnownSymbol('replace');\n// Safari <= 13.0.3(?) substitutes nth capture where n>m with an empty string\nvar REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE = (function () {\n if (/./[REPLACE]) {\n return /./[REPLACE]('a', '$0') === '';\n }\n return false;\n})();\n\n// Chrome 51 has a buggy \"split\" implementation when RegExp#exec !== nativeExec\n// Weex JS has frozen built-in prototypes, so use try / catch wrapper\nvar SPLIT_WORKS_WITH_OVERWRITTEN_EXEC = !fails(function () {\n // eslint-disable-next-line regexp/no-empty-group -- required for testing\n var re = /(?:)/;\n var originalExec = re.exec;\n re.exec = function () { return originalExec.apply(this, arguments); };\n var result = 'ab'.split(re);\n return result.length !== 2 || result[0] !== 'a' || result[1] !== 'b';\n});\n\nmodule.exports = function (KEY, length, exec, sham) {\n var SYMBOL = wellKnownSymbol(KEY);\n\n var DELEGATES_TO_SYMBOL = !fails(function () {\n // String methods call symbol-named RegEp methods\n var O = {};\n O[SYMBOL] = function () { return 7; };\n return ''[KEY](O) != 7;\n });\n\n var DELEGATES_TO_EXEC = DELEGATES_TO_SYMBOL && !fails(function () {\n // Symbol-named RegExp methods call .exec\n var execCalled = false;\n var re = /a/;\n\n if (KEY === 'split') {\n // We can't use real regex here since it causes deoptimization\n // and serious performance degradation in V8\n // https://github.com/zloirock/core-js/issues/306\n re = {};\n // RegExp[@@split] doesn't call the regex's exec method, but first creates\n // a new one. We need to return the patched regex when creating the new one.\n re.constructor = {};\n re.constructor[SPECIES] = function () { return re; };\n re.flags = '';\n re[SYMBOL] = /./[SYMBOL];\n }\n\n re.exec = function () { execCalled = true; return null; };\n\n re[SYMBOL]('');\n return !execCalled;\n });\n\n if (\n !DELEGATES_TO_SYMBOL ||\n !DELEGATES_TO_EXEC ||\n (KEY === 'replace' && !(\n REPLACE_SUPPORTS_NAMED_GROUPS &&\n REPLACE_KEEPS_$0 &&\n !REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n )) ||\n (KEY === 'split' && !SPLIT_WORKS_WITH_OVERWRITTEN_EXEC)\n ) {\n var nativeRegExpMethod = /./[SYMBOL];\n var methods = exec(SYMBOL, ''[KEY], function (nativeMethod, regexp, str, arg2, forceStringMethod) {\n var $exec = regexp.exec;\n if ($exec === regexpExec || $exec === RegExpPrototype.exec) {\n if (DELEGATES_TO_SYMBOL && !forceStringMethod) {\n // The native String method already delegates to @@method (this\n // polyfilled function), leasing to infinite recursion.\n // We avoid it by directly calling the native @@method method.\n return { done: true, value: nativeRegExpMethod.call(regexp, str, arg2) };\n }\n return { done: true, value: nativeMethod.call(str, regexp, arg2) };\n }\n return { done: false };\n }, {\n REPLACE_KEEPS_$0: REPLACE_KEEPS_$0,\n REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE: REGEXP_REPLACE_SUBSTITUTES_UNDEFINED_CAPTURE\n });\n var stringMethod = methods[0];\n var regexMethod = methods[1];\n\n redefine(String.prototype, KEY, stringMethod);\n redefine(RegExpPrototype, SYMBOL, length == 2\n // 21.2.5.8 RegExp.prototype[@@replace](string, replaceValue)\n // 21.2.5.11 RegExp.prototype[@@split](string, limit)\n ? function (string, arg) { return regexMethod.call(string, this, arg); }\n // 21.2.5.6 RegExp.prototype[@@match](string)\n // 21.2.5.9 RegExp.prototype[@@search](string)\n : function (string) { return regexMethod.call(string, this); }\n );\n }\n\n if (sham) createNonEnumerableProperty(RegExpPrototype[SYMBOL], 'sham', true);\n};\n"],"sourceRoot":""}