{ "version": 3, "sources": ["src/app/danger-sources/models/danger-source.model.ts", "src/app/danger-sources/models/danger-source-variant.model.ts", "src/app/danger-sources/danger-sources.service.ts"], "sourcesContent": ["import { RegionStatus, DangerRating } from \"app/enums/enums\";\nimport { PolygonObject } from \"./polygon-object.model\";\n\nexport class DangerSourceModel implements PolygonObject {\n id: string;\n creationDate: Date;\n title: string;\n description: string;\n\n static createFromJson(json) {\n const dangerSource = new DangerSourceModel();\n dangerSource.id = json.id;\n dangerSource.creationDate = json.creationDate;\n dangerSource.title = json.title;\n dangerSource.description = json.description;\n\n return dangerSource;\n }\n\n constructor(dangerSource?: DangerSourceModel) {\n if (dangerSource) {\n this.creationDate = dangerSource.creationDate;\n this.title = dangerSource.title;\n this.description = dangerSource.description;\n } else {\n this.creationDate = new Date();\n this.title = \"\";\n this.description = \"\";\n }\n }\n\n getAllRegions(): string[] {\n throw new Error(\"Method not implemented.\");\n }\n getRegionsByStatus(status: RegionStatus): string[] {\n return this.getAllRegions();\n }\n getForenoonDangerRatingAbove(): DangerRating {\n return DangerRating.missing;\n }\n getAfternoonDangerRatingAbove(): DangerRating {\n return DangerRating.missing;\n }\n getForenoonDangerRatingBelow(): DangerRating {\n return DangerRating.missing;\n }\n getAfternoonDangerRatingBelow(): DangerRating {\n return DangerRating.missing;\n }\n}\n", "import { Aspect, AvalancheProblem, AvalancheType, DangerRating, RegionStatus, Tendency } from \"../../enums/enums\";\nimport { MatrixInformationModel } from \"../../models/matrix-information.model\";\nimport { DangerSourceModel } from \"./danger-source.model\";\nimport { PolygonObject } from \"./polygon-object.model\";\n\nexport enum DangerSourceVariantStatus {\n active = \"active\",\n dormant = \"dormant\",\n inactive = \"inactive\",\n}\n\nexport enum DangerSourceVariantType {\n forecast = \"forecast\",\n analysis = \"analysis\",\n}\n\nexport enum Daytime {\n evening = \"evening\",\n first_night_half = \"first_night_half\",\n second_night_half = \"second_night_half\",\n morning = \"morning\",\n forenoon = \"forenoon\",\n afternoon = \"afternoon\",\n}\n\nexport enum SlopeGradient {\n moderately_steep = \"moderately_steep\",\n steep = \"steep\",\n very_steep = \"very_steep\",\n extremely_steep = \"extremely_steep\",\n}\n\nexport enum Probability {\n likely = \"likely\",\n possible = \"possible\",\n unlikely = \"unlikely\",\n}\n\nexport enum DangerSign {\n shooting_cracks = \"shooting_cracks\",\n whumpfing = \"whumpfing\",\n fresh_avalanches = \"fresh_avalanches\",\n}\n\nexport enum GlidingSnowActivity {\n low = \"low\",\n medium = \"medium\",\n high = \"high\",\n}\n\nexport enum GrainShape {\n PP = \"PP\",\n MM = \"MM\",\n DF = \"DF\",\n RG = \"RG\",\n FC = \"FC\",\n DH = \"DH\",\n SH = \"SH\",\n MF = \"MF\",\n IF = \"IF\",\n PPco = \"PPco\",\n PPnd = \"PPnd\",\n PPpl = \"PPpl\",\n PPsd = \"PPsd\",\n PPir = \"PPir\",\n PPgp = \"PPgp\",\n PPhl = \"PPhl\",\n PPip = \"PPip\",\n PPrm = \"PPrm\",\n MMrp = \"MMrp\",\n MMci = \"MMci\",\n DFdc = \"DFdc\",\n DFbk = \"DFbk\",\n RGsr = \"RGsr\",\n RGlr = \"RGlr\",\n RGwp = \"RGwp\",\n RGxf = \"RGxf\",\n FCso = \"FCso\",\n FCsf = \"FCsf\",\n FCxr = \"FCxr\",\n DHcp = \"DHcp\",\n DHpr = \"DHpr\",\n DHch = \"DHch\",\n DHla = \"DHla\",\n DHxr = \"DHxr\",\n SHsu = \"SHsu\",\n SHcv = \"SHcv\",\n SHxr = \"SHxr\",\n MFcl = \"MFcl\",\n MFpc = \"MFpc\",\n MFsl = \"MFsl\",\n MFcr = \"MFcr\",\n IFil = \"IFil\",\n IFic = \"IFic\",\n IFbi = \"IFbi\",\n IFrc = \"IFrc\",\n IFsc = \"IFsc\",\n}\n\nexport enum HandHardness {\n fist = \"fist\",\n four_fingers = \"four_fingers\",\n one_finger = \"one_finger\",\n pencil = \"pencil\",\n knife = \"knife\",\n ice = \"ice\",\n}\n\nexport enum Characteristic {\n low = \"low\",\n medium = \"medium\",\n high = \"high\",\n very_high = \"very_high\",\n}\n\nexport enum Distribution {\n isolated = \"isolated\",\n specific = \"specific\",\n widespread = \"widespread\",\n}\n\nexport enum Thickness {\n thick = \"thick\",\n thin = \"thin\",\n}\n\nexport enum SnowpackPosition {\n upper = \"upper\",\n middle = \"middle\",\n lower = \"lower\",\n ground = \"ground\",\n}\n\nexport enum WeakLayerCrust {\n yes = \"yes\",\n partly = \"partly\",\n no = \"no\",\n}\n\nexport enum CreationProcess {\n radiation_recrystallization = \"radiation_recrystallization\",\n diurnal_recrystallization = \"diurnal_recrystallization\",\n melt_layer_recrystallization = \"melt_layer_recrystallization\",\n surface_hoar_formation = \"surface_hoar_formation\",\n}\n\nexport enum Recognizability {\n very_easy = \"very_easy\",\n easy = \"easy\",\n hard = \"hard\",\n very_hard = \"very_hard\",\n}\n\nexport enum TerrainType {\n gullies = \"gullies\",\n bowls = \"bowls\",\n pass_areas = \"pass_areas\",\n ridge_lines = \"ridge_lines\",\n adjacent_to_ridge_lines = \"adjacent_to_ridge_lines\",\n distant_from_ridge_lines = \"distant_from_ridge_lines\",\n slope_discontinuities = \"slope_discontinuities\",\n convex_terrain = \"convex_terrain\",\n concave_terrain = \"concave_terrain\",\n steep_terrain = \"steep_terrain\",\n very_steep_terrain = \"very_steep_terrain\",\n open_terrain = \"open_terrain\",\n forest = \"forest\",\n}\n\nexport enum Wetness {\n wet = \"wet\",\n moist = \"moist\",\n dry = \"dry\",\n}\n\nexport class DangerSourceVariantModel implements PolygonObject {\n id: string;\n comment: string;\n\n originalDangerSourceVariantId: string;\n forecastDangerSourceVariantId: string;\n dangerSource: DangerSourceModel;\n creationDate: Date;\n updateDate: Date;\n validFrom: Date;\n validUntil: Date;\n dangerSourceVariantStatus: DangerSourceVariantStatus;\n dangerSourceVariantType: DangerSourceVariantType;\n ownerRegion: string;\n regions: string[];\n hasDaytimeDependency: boolean | undefined;\n avalancheType: AvalancheType;\n aspects: Aspect[];\n elevationHigh: number | undefined;\n treelineHigh: boolean | undefined;\n elevationLow: number | undefined;\n treelineLow: boolean | undefined;\n dangerIncreaseWithElevation: boolean | undefined;\n highestDangerAspect: Aspect;\n dangerPeak: Daytime;\n slopeGradient: SlopeGradient;\n runoutIntoGreen: boolean | undefined;\n naturalRelease: Probability;\n dangerSigns: DangerSign[];\n eawsMatrixInformation: MatrixInformationModel;\n\n /** --------------------- */\n /** GLIDE SNOW AVALANCHES */\n /** --------------------- */\n glidingSnowActivity: GlidingSnowActivity;\n glidingSnowActivityValue: number | undefined;\n snowHeightUpperLimit: number | undefined;\n snowHeightLowerLimit: number | undefined;\n snowHeightAverage: number | undefined;\n zeroDegreeIsotherm: boolean | undefined;\n\n /** --------------- */\n /** SLAB AVALANCHES */\n /** --------------- */\n slabGrainShape: GrainShape;\n slabThicknessUpperLimit: number | undefined;\n slabThicknessLowerLimit: number | undefined;\n slabHandHardnessUpperLimit: HandHardness;\n slabHandHardnessLowerLimit: HandHardness;\n slabHardnessProfile: Tendency;\n slabEnergyTransferPotential: Characteristic;\n slabDistribution: Distribution;\n weakLayerGrainShape: GrainShape;\n weakLayerGrainSizeUpperLimit: number | undefined;\n weakLayerGrainSizeLowerLimit: number | undefined;\n weakLayerPersistent: boolean | undefined;\n weakLayerThickness: Thickness;\n weakLayerStrength: Characteristic;\n weakLayerWet: boolean | undefined;\n weakLayerCrustAbove: WeakLayerCrust;\n weakLayerCrustBelow: WeakLayerCrust;\n weakLayerPosition: SnowpackPosition;\n weakLayerCreation: CreationProcess;\n weakLayerDistribution: Distribution;\n dangerSpotRecognizability: Recognizability;\n remoteTriggering: boolean | undefined;\n terrainTypes: TerrainType[];\n\n /** --------------------- */\n /** LOOSE SNOW AVALANCHES */\n /** --------------------- */\n looseSnowGrainShape: GrainShape;\n looseSnowMoisture: Wetness;\n\n static createFromJson(json) {\n const variant = new DangerSourceVariantModel();\n\n variant.id = json.id;\n variant.comment = json.comment;\n variant.originalDangerSourceVariantId = json.originalDangerSourceVariantId;\n variant.forecastDangerSourceVariantId = json.forecastDangerSourceVariantId;\n variant.dangerSource = DangerSourceModel.createFromJson(json.dangerSource);\n variant.creationDate = json.creationDate;\n variant.updateDate = json.updateDate;\n variant.validFrom = json.validFrom;\n variant.validUntil = json.validUntil;\n variant.dangerSourceVariantStatus = json.dangerSourceVariantStatus;\n variant.dangerSourceVariantType = json.dangerSourceVariantType;\n variant.ownerRegion = json.ownerRegion;\n variant.regions = json.regions;\n variant.hasDaytimeDependency = json.hasDaytimeDependency;\n variant.avalancheType = json.avalancheType;\n variant.aspects = json.aspects;\n variant.elevationHigh = json.elevationHigh;\n variant.treelineHigh = json.treelineHigh;\n variant.elevationLow = json.elevationLow;\n variant.treelineLow = json.treelineLow;\n variant.dangerIncreaseWithElevation = json.dangerIncreaseWithElevation;\n variant.highestDangerAspect = json.highestDangerAspect;\n variant.dangerPeak = json.dangerPeak;\n variant.slopeGradient = json.slopeGradient;\n variant.runoutIntoGreen = json.runoutIntoGreen;\n variant.naturalRelease = json.naturalRelease;\n variant.dangerSigns = json.dangerSigns;\n variant.eawsMatrixInformation = MatrixInformationModel.createFromJson(json.eawsMatrixInformation);\n variant.glidingSnowActivity = json.glidingSnowActivity;\n variant.glidingSnowActivityValue = json.glidingSnowActivityValue;\n variant.snowHeightUpperLimit = json.snowHeightUpperLimit;\n variant.snowHeightLowerLimit = json.snowHeightLowerLimit;\n variant.snowHeightAverage = json.snowHeightAverage;\n variant.zeroDegreeIsotherm = json.zeroDegreeIsotherm;\n variant.slabGrainShape = json.slabGrainShape;\n variant.slabThicknessUpperLimit = json.slabThicknessUpperLimit;\n variant.slabThicknessLowerLimit = json.slabThicknessLowerLimit;\n variant.slabHandHardnessUpperLimit = json.slabHandHardnessUpperLimit;\n variant.slabHandHardnessLowerLimit = json.slabHandHardnessLowerLimit;\n variant.slabHardnessProfile = json.slabHardnessProfile;\n variant.slabEnergyTransferPotential = json.slabEnergyTransferPotential;\n variant.slabDistribution = json.slabDistribution;\n variant.weakLayerGrainShape = json.weakLayerGrainShape;\n variant.weakLayerGrainSizeUpperLimit = json.weakLayerGrainSizeUpperLimit;\n variant.weakLayerGrainSizeLowerLimit = json.weakLayerGrainSizeLowerLimit;\n variant.weakLayerPersistent = json.weakLayerPersistent;\n variant.weakLayerThickness = json.weakLayerThickness;\n variant.weakLayerStrength = json.weakLayerStrength;\n variant.weakLayerWet = json.weakLayerWet;\n variant.weakLayerCrustAbove = json.weakLayerCrustAbove;\n variant.weakLayerCrustBelow = json.weakLayerCrustBelow;\n variant.weakLayerPosition = json.weakLayerPosition;\n variant.weakLayerCreation = json.weakLayerCreation;\n variant.weakLayerDistribution = json.weakLayerDistribution;\n variant.dangerSpotRecognizability = json.dangerSpotRecognizability;\n variant.remoteTriggering = json.remoteTriggering;\n variant.terrainTypes = json.terrainTypes;\n variant.looseSnowGrainShape = json.looseSnowGrainShape;\n variant.looseSnowMoisture = json.looseSnowMoisture;\n\n return variant;\n }\n\n constructor(variant?: DangerSourceVariantModel) {\n if (variant) {\n if (variant.originalDangerSourceVariantId) {\n this.originalDangerSourceVariantId = variant.originalDangerSourceVariantId;\n } else if (variant.id) {\n this.originalDangerSourceVariantId = variant.id;\n }\n this.comment = variant.comment;\n this.dangerSource = DangerSourceModel.createFromJson(variant.dangerSource);\n this.creationDate = new Date(variant.creationDate);\n this.updateDate = new Date(variant.updateDate);\n this.validFrom = variant.validFrom;\n this.validUntil = variant.validUntil;\n this.dangerSourceVariantStatus = variant.dangerSourceVariantStatus;\n this.dangerSourceVariantType = variant.dangerSourceVariantType;\n this.ownerRegion = variant.ownerRegion;\n this.regions = variant.regions;\n this.hasDaytimeDependency = variant.hasDaytimeDependency;\n this.avalancheType = variant.avalancheType;\n this.aspects = variant.aspects;\n this.elevationHigh = variant.elevationHigh;\n this.treelineHigh = variant.treelineHigh;\n this.elevationLow = variant.elevationLow;\n this.treelineLow = variant.treelineLow;\n this.dangerIncreaseWithElevation = variant.dangerIncreaseWithElevation;\n this.highestDangerAspect = variant.highestDangerAspect;\n this.dangerPeak = variant.dangerPeak;\n this.slopeGradient = variant.slopeGradient;\n this.runoutIntoGreen = variant.runoutIntoGreen;\n this.naturalRelease = variant.naturalRelease;\n this.dangerSigns = variant.dangerSigns;\n this.eawsMatrixInformation = new MatrixInformationModel(variant.eawsMatrixInformation);\n this.glidingSnowActivity = variant.glidingSnowActivity;\n this.glidingSnowActivityValue = variant.glidingSnowActivityValue;\n this.snowHeightUpperLimit = variant.snowHeightUpperLimit;\n this.snowHeightLowerLimit = variant.snowHeightLowerLimit;\n this.snowHeightAverage = variant.snowHeightAverage;\n this.zeroDegreeIsotherm = variant.zeroDegreeIsotherm;\n this.slabGrainShape = variant.slabGrainShape;\n this.slabThicknessUpperLimit = variant.slabThicknessUpperLimit;\n this.slabThicknessLowerLimit = variant.slabThicknessLowerLimit;\n this.slabHandHardnessUpperLimit = variant.slabHandHardnessUpperLimit;\n this.slabHandHardnessLowerLimit = variant.slabHandHardnessLowerLimit;\n this.slabHardnessProfile = variant.slabHardnessProfile;\n this.slabEnergyTransferPotential = variant.slabEnergyTransferPotential;\n this.slabDistribution = variant.slabDistribution;\n this.weakLayerGrainShape = variant.weakLayerGrainShape;\n this.weakLayerGrainSizeUpperLimit = variant.weakLayerGrainSizeUpperLimit;\n this.weakLayerGrainSizeLowerLimit = variant.weakLayerGrainSizeLowerLimit;\n this.weakLayerPersistent = variant.weakLayerPersistent;\n this.weakLayerThickness = variant.weakLayerThickness;\n this.weakLayerStrength = variant.weakLayerStrength;\n this.weakLayerWet = variant.weakLayerWet;\n this.weakLayerCrustAbove = variant.weakLayerCrustAbove;\n this.weakLayerCrustBelow = variant.weakLayerCrustBelow;\n this.weakLayerPosition = variant.weakLayerPosition;\n this.weakLayerCreation = variant.weakLayerCreation;\n this.weakLayerDistribution = variant.weakLayerDistribution;\n this.dangerSpotRecognizability = variant.dangerSpotRecognizability;\n this.remoteTriggering = variant.remoteTriggering;\n this.terrainTypes = variant.terrainTypes;\n this.looseSnowGrainShape = variant.looseSnowGrainShape;\n this.looseSnowMoisture = variant.looseSnowMoisture;\n } else {\n this.creationDate = new Date();\n this.updateDate = new Date();\n this.dangerSourceVariantStatus = DangerSourceVariantStatus.active;\n this.regions = new Array();\n this.hasDaytimeDependency = false;\n this.aspects = new Array();\n this.dangerSigns = new Array();\n this.eawsMatrixInformation = new MatrixInformationModel();\n this.terrainTypes = new Array();\n }\n }\n\n getAllRegions(): string[] {\n return this.regions;\n }\n\n getRegionsByStatus(status: RegionStatus): string[] {\n if (status == RegionStatus.saved) {\n return this.regions;\n } else {\n return [];\n }\n }\n\n getForenoonDangerRatingAbove(): DangerRating {\n // only valid below\n /*\n if (!(this.treelineLow || this.elevationLow) && (this.treelineHigh || this.elevationHigh)) {\n return undefined;\n }\n */\n\n if (this.hasDaytimeDependency) {\n if (this.dangerPeak !== Daytime.afternoon) {\n return this.eawsMatrixInformation.dangerRating;\n } else {\n return DangerRating.low;\n }\n } else {\n return this.eawsMatrixInformation.dangerRating;\n }\n }\n\n getAfternoonDangerRatingAbove(): DangerRating {\n // only valid below\n /*\n if (!(this.treelineLow || this.elevationLow) && (this.treelineHigh || this.elevationHigh)) {\n return undefined;\n }\n */\n\n if (this.hasDaytimeDependency) {\n if (this.dangerPeak !== Daytime.afternoon) {\n return DangerRating.low;\n } else {\n return this.eawsMatrixInformation.dangerRating;\n }\n } else {\n return this.eawsMatrixInformation.dangerRating;\n }\n }\n\n getForenoonDangerRatingBelow(): DangerRating {\n // only valid above\n /*\n if (!(this.treelineHigh || this.elevationHigh) && (this.treelineLow || this.elevationLow)) {\n return undefined;\n }\n */\n\n if (this.hasDaytimeDependency) {\n if (this.dangerPeak !== Daytime.afternoon) {\n return this.eawsMatrixInformation.dangerRating;\n } else {\n return DangerRating.low;\n }\n } else {\n return this.eawsMatrixInformation.dangerRating;\n }\n }\n\n getAfternoonDangerRatingBelow(): DangerRating {\n // only valid above\n /*\n if (!(this.treelineHigh || this.elevationHigh) && (this.treelineLow || this.elevationLow)) {\n return undefined;\n }\n */\n\n if (this.hasDaytimeDependency) {\n if (this.dangerPeak !== Daytime.afternoon) {\n return DangerRating.low;\n } else {\n return this.eawsMatrixInformation.dangerRating;\n }\n } else {\n return this.eawsMatrixInformation.dangerRating;\n }\n }\n\n updateDangerRating() {}\n\n getAvalancheProblem(): AvalancheProblem {\n switch (this.avalancheType) {\n case AvalancheType.slab:\n switch (this.slabGrainShape) {\n case GrainShape.PP:\n case GrainShape.DF:\n case GrainShape.RG:\n case GrainShape.FC:\n if (this.weakLayerPersistent) {\n switch (this.dangerSpotRecognizability) {\n case Recognizability.very_easy:\n case Recognizability.easy:\n return AvalancheProblem.wind_slab;\n case Recognizability.hard:\n case Recognizability.very_hard:\n return AvalancheProblem.persistent_weak_layers;\n default:\n return undefined;\n }\n } else {\n switch (this.dangerSpotRecognizability) {\n case Recognizability.very_easy:\n case Recognizability.easy:\n return AvalancheProblem.wind_slab;\n case Recognizability.hard:\n case Recognizability.very_hard:\n return AvalancheProblem.new_snow;\n default:\n return undefined;\n }\n }\n case GrainShape.MF:\n return AvalancheProblem.wet_snow;\n case GrainShape.MFcr:\n if (this.weakLayerPersistent) {\n return AvalancheProblem.persistent_weak_layers;\n } else {\n return AvalancheProblem.wet_snow;\n }\n default:\n return undefined;\n }\n case AvalancheType.loose:\n switch (this.looseSnowGrainShape) {\n case GrainShape.PP:\n case GrainShape.DF:\n return AvalancheProblem.new_snow;\n case GrainShape.MF:\n return AvalancheProblem.wet_snow;\n case GrainShape.FC:\n case GrainShape.DH:\n case GrainShape.SH:\n return undefined;\n default:\n return undefined;\n }\n case AvalancheType.glide:\n return AvalancheProblem.gliding_snow;\n default:\n return undefined;\n }\n }\n\n compareTo(other: DangerSourceVariantModel): number {\n if (this.eawsMatrixInformation.dangerRating < other.eawsMatrixInformation.dangerRating) {\n return -1;\n } else if (this.eawsMatrixInformation.dangerRating > other.eawsMatrixInformation.dangerRating) {\n return 1;\n } else {\n if (this.eawsMatrixInformation.snowpackStabilityValue < other.eawsMatrixInformation.snowpackStabilityValue) {\n return -1;\n } else if (\n this.eawsMatrixInformation.snowpackStabilityValue > other.eawsMatrixInformation.snowpackStabilityValue\n ) {\n return 1;\n } else {\n if (this.eawsMatrixInformation.avalancheSizeValue < other.eawsMatrixInformation.avalancheSizeValue) {\n return -1;\n } else if (this.eawsMatrixInformation.avalancheSizeValue > other.eawsMatrixInformation.avalancheSizeValue) {\n return 1;\n } else {\n return 0;\n }\n }\n }\n }\n}\n", "import { Injectable, inject } from \"@angular/core\";\nimport { HttpClient, HttpHeaders } from \"@angular/common/http\";\nimport { Observable } from \"rxjs\";\nimport { ConstantsService } from \"../providers/constants-service/constants.service\";\nimport { AuthenticationService } from \"../providers/authentication-service/authentication.service\";\nimport { DangerSourceModel } from \"./models/danger-source.model\";\nimport { DangerSourceVariantModel, DangerSourceVariantType } from \"./models/danger-source-variant.model\";\nimport { JsonArray } from \"protomaps-leaflet\";\n\n@Injectable()\nexport class DangerSourcesService {\n http = inject(HttpClient);\n private constantsService = inject(ConstantsService);\n private authenticationService = inject(AuthenticationService);\n\n private activeDate: [Date, Date];\n private isEditable: boolean;\n private isReadOnly: boolean;\n\n public forecastStatusMap: Map;\n public analysisStatusMap: Map;\n\n public dates: [Date, Date][];\n\n constructor() {\n this.init();\n }\n\n init({ days } = { days: 10 }) {\n this.dates = [];\n this.isEditable = false;\n this.isReadOnly = false;\n\n const startDate = new Date();\n startDate.setDate(startDate.getDate() - 7);\n startDate.setHours(0, 0, 0, 0);\n\n const endDate = new Date();\n endDate.setDate(endDate.getDate() + 3);\n endDate.setHours(0, 0, 0, 0);\n\n for (let i = 0; i <= days; i++) {\n const date = new Date(endDate.valueOf());\n date.setDate(endDate.getDate() - i);\n this.dates.push(this.getValidFromUntil(date));\n }\n this.loadStatus();\n }\n\n public loadStatus() {\n const startDate = this.dates[this.dates.length - 1];\n const endDate = this.dates[0];\n this.forecastStatusMap = new Map();\n this.analysisStatusMap = new Map();\n this.getStatus(this.authenticationService.getActiveRegionId(), startDate, endDate).subscribe(\n (data) => {\n for (let i = (data as JsonArray).length - 1; i >= 0; i--) {\n this.forecastStatusMap.set(new Date(data[i].date).getTime(), data[i].forecast);\n this.analysisStatusMap.set(new Date(data[i].date).getTime(), data[i].analysis);\n }\n },\n () => {\n console.error(\"Danger source variants status could not be loaded!\");\n },\n );\n }\n\n hasDangerSourceVariants(date: [Date, Date]): Observable {\n return new Observable((observer) => {\n this.getStatus(this.authenticationService.getActiveRegionId(), date, date).subscribe({\n next: (data) => {\n observer.next(data[0].forecast || data[0].analysis);\n observer.complete();\n },\n error: () => {\n console.error(\"Danger source variants status could not be loaded!\");\n observer.next(false);\n observer.complete();\n },\n });\n });\n }\n\n getStatus(region: string, startDate: [Date, Date], endDate: [Date, Date]) {\n const url =\n this.constantsService.getServerUrl() +\n \"danger-sources/status?\" +\n this.constantsService\n .createSearchParams([\n [\"startDate\", this.constantsService.getISOStringWithTimezoneOffset(startDate[0])],\n [\"endDate\", this.constantsService.getISOStringWithTimezoneOffset(endDate[0])],\n [\"region\", region],\n ])\n .toString();\n return this.http.get(url);\n }\n\n getActiveDate(): [Date, Date] {\n return this.activeDate;\n }\n\n setActiveDate(date: [Date, Date]) {\n this.activeDate = date;\n }\n\n getValidFromUntil(date: Date): [Date, Date] {\n const validFrom = new Date(date);\n validFrom.setTime(validFrom.getTime() - 7 * 60 * 60 * 1000);\n const validUntil = new Date(date);\n validUntil.setTime(validUntil.getTime() + 17 * 60 * 60 * 1000);\n return [validFrom, validUntil];\n }\n\n hasBeenPublished5PM(date: [Date, Date]): boolean {\n // date[0] = validFrom = 17:00 = published at\n const published = date[0];\n return Date.now() >= published.getTime();\n }\n\n /**\n * Returns a date that's offset from the activeDate by a given amount.\n *\n * @param offset - Number of days to offset. Can be positive (future) or negative (past).\n * @returns Date offset from the activeDate or null if not found or out of bounds.\n */\n private getDateOffset(offset: number): [Date, Date] | null {\n if (!this.activeDate) {\n return null;\n }\n\n const index = this.dates.findIndex((d) => d[0].getTime() === this.activeDate[0].getTime());\n\n if (index === -1 || index + offset < 0 || index + offset >= this.dates.length) {\n return null;\n }\n\n return this.dates[index + offset];\n }\n\n getNextDate(): [Date, Date] | null {\n return this.getDateOffset(1);\n }\n\n getPreviousDate(): [Date, Date] | null {\n return this.getDateOffset(-1);\n }\n\n getIsEditable(): boolean {\n return this.isEditable && !this.isReadOnly;\n }\n\n setIsEditable(isEditable: boolean) {\n this.isEditable = isEditable;\n }\n\n getIsReadOnly(): boolean {\n return this.isReadOnly;\n }\n\n setIsReadOnly(isReadOnly: boolean) {\n this.isReadOnly = isReadOnly;\n }\n\n getDangerSourceVariantType() {\n if (this.hasBeenPublished5PM(this.activeDate)) {\n return DangerSourceVariantType.analysis;\n } else {\n return DangerSourceVariantType.forecast;\n }\n }\n\n loadDangerSources(date: [Date, Date], regions: string[]): Observable {\n const url =\n this.constantsService.getServerUrl() +\n \"danger-sources?\" +\n this.constantsService\n .createSearchParams([\n [\"date\", date ? this.constantsService.getISOStringWithTimezoneOffset(date[0]) : \"\"],\n [\"regions\", regions],\n ])\n .toString();\n return this.http.get(url);\n }\n\n updateDangerSource(dangerSource: DangerSourceModel) {\n const url = this.constantsService.getServerUrl() + \"danger-sources/\" + dangerSource.id;\n const body = JSON.stringify(dangerSource);\n return this.http.post(url, body);\n }\n\n loadDangerSourceVariants(\n date: [Date, Date],\n regions: string[],\n dangerSourceId?: string,\n ): Observable {\n let url;\n if (dangerSourceId && dangerSourceId !== \"\") {\n url =\n this.constantsService.getServerUrl() +\n \"danger-sources/\" +\n dangerSourceId +\n \"/edit?\" +\n this.constantsService\n .createSearchParams([\n [\"date\", this.constantsService.getISOStringWithTimezoneOffset(date[0])],\n [\"regions\", regions],\n ])\n .toString();\n } else {\n url =\n this.constantsService.getServerUrl() +\n \"danger-sources/edit?\" +\n this.constantsService\n .createSearchParams([\n [\"date\", this.constantsService.getISOStringWithTimezoneOffset(date[0])],\n [\"regions\", regions],\n ])\n .toString();\n }\n return this.http.get(url);\n }\n\n createDangerSourceVariant(\n dangerSourceVariant: DangerSourceVariantModel,\n date: [Date, Date],\n ): Observable {\n const url =\n this.constantsService.getServerUrl() +\n \"danger-sources/variants?\" +\n this.constantsService\n .createSearchParams([\n [\"date\", this.constantsService.getISOStringWithTimezoneOffset(date[0])],\n [\"region\", this.authenticationService.getActiveRegionId()],\n ])\n .toString();\n const body = JSON.stringify(dangerSourceVariant);\n return this.http.put(url, body);\n }\n\n updateDangerSourceVariant(\n dangerSourceVariant: DangerSourceVariantModel,\n date: [Date, Date],\n ): Observable {\n // check if danger source has ID\n const url =\n this.constantsService.getServerUrl() +\n \"danger-sources/variants/\" +\n dangerSourceVariant.id +\n \"?\" +\n this.constantsService.createSearchParams([\n [\"date\", this.constantsService.getISOStringWithTimezoneOffset(date[0])],\n [\"region\", this.authenticationService.getActiveRegionId()],\n ]);\n const body = JSON.stringify(dangerSourceVariant);\n return this.http.post(url, body);\n }\n\n deleteDangerSourceVariant(\n variant: DangerSourceVariantModel,\n date: [Date, Date],\n ): Observable {\n // check if variant has ID\n const url =\n this.constantsService.getServerUrl() +\n \"danger-sources/variants/\" +\n variant.id +\n \"?\" +\n this.constantsService\n .createSearchParams([\n [\"date\", this.constantsService.getISOStringWithTimezoneOffset(date[0])],\n [\"region\", this.authenticationService.getActiveRegionId()],\n ])\n .toString();\n return this.http.delete(url);\n }\n\n saveVariants(variants: DangerSourceVariantModel[], date: [Date, Date]) {\n const url =\n this.constantsService.getServerUrl() +\n \"danger-sources?\" +\n this.constantsService\n .createSearchParams([\n [\"date\", this.constantsService.getISOStringWithTimezoneOffset(date[0])],\n [\"region\", this.authenticationService.getActiveRegionId()],\n ])\n .toString();\n const body = JSON.stringify(variants);\n return this.http.post(url, body);\n }\n}\n"], "mappings": "sHAGM,IAAOA,EAAP,MAAOA,CAAiB,CAM5B,OAAOC,eAAeC,EAAI,CACxB,IAAMC,EAAe,IAAIH,EACzBG,OAAAA,EAAaC,GAAKF,EAAKE,GACvBD,EAAa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,EAClC,2BACA2C,EAAQZ,GACR,IACA,KAAKzE,iBACF2C,mBAAmB,CAClB,CAAC,OAAQ,KAAK3C,iBAAiB4C,+BAA+B5B,EAAK,CAAC,CAAC,CAAC,EACtE,CAAC,SAAU,KAAKd,sBAAsBwB,kBAAiB,CAAE,CAAC,CAC3D,EACAmB,SAAQ,EACb,OAAO,KAAKhD,KAAKyF,OAAmC7C,CAAG,CACzD,CAEA8C,aAAaC,EAAsCxE,EAAkB,CACnE,IAAMyB,EACJ,KAAKzC,iBAAiB0C,aAAY,EAClC,kBACA,KAAK1C,iBACF2C,mBAAmB,CAClB,CAAC,OAAQ,KAAK3C,iBAAiB4C,+BAA+B5B,EAAK,CAAC,CAAC,CAAC,EACtE,CAAC,SAAU,KAAKd,sBAAsBwB,kBAAiB,CAAE,CAAC,CAC3D,EACAmB,SAAQ,EACP6B,EAAOC,KAAKC,UAAUY,CAAQ,EACpC,OAAO,KAAK3F,KAAKgF,KAAKpC,EAAKiC,CAAI,CACjC,iDAtRW/E,EAAoB,CAAA,iCAApBA,EAAoB8F,QAApB9F,EAAoB+F,SAAA,CAAA,CAAA,SAApB/F,CAAoB,GAAA", "names": ["DangerSourceModel", "createFromJson", "json", "dangerSource", "id", "creationDate", "title", "description", "constructor", "Date", "getAllRegions", "Error", "getRegionsByStatus", "status", "getForenoonDangerRatingAbove", "DangerRating", "missing", "getAfternoonDangerRatingAbove", "getForenoonDangerRatingBelow", "getAfternoonDangerRatingBelow", "DangerSourceVariantStatus", "DangerSourceVariantType", "Daytime", "SlopeGradient", "Probability", "DangerSign", "GlidingSnowActivity", "GrainShape", "HandHardness", "Characteristic", "Distribution", "Thickness", "SnowpackPosition", "WeakLayerCrust", "CreationProcess", "Recognizability", "TerrainType", "Wetness", "DangerSourceVariantModel", "createFromJson", "json", "variant", "id", "comment", "originalDangerSourceVariantId", "forecastDangerSourceVariantId", "dangerSource", "DangerSourceModel", "creationDate", "updateDate", "validFrom", "validUntil", "dangerSourceVariantStatus", "dangerSourceVariantType", "ownerRegion", "regions", "hasDaytimeDependency", "avalancheType", "aspects", "elevationHigh", "treelineHigh", "elevationLow", "treelineLow", "dangerIncreaseWithElevation", "highestDangerAspect", "dangerPeak", "slopeGradient", "runoutIntoGreen", "naturalRelease", "dangerSigns", "eawsMatrixInformation", "MatrixInformationModel", "glidingSnowActivity", "glidingSnowActivityValue", "snowHeightUpperLimit", "snowHeightLowerLimit", "snowHeightAverage", "zeroDegreeIsotherm", "slabGrainShape", "slabThicknessUpperLimit", "slabThicknessLowerLimit", "slabHandHardnessUpperLimit", "slabHandHardnessLowerLimit", "slabHardnessProfile", "slabEnergyTransferPotential", "slabDistribution", "weakLayerGrainShape", "weakLayerGrainSizeUpperLimit", "weakLayerGrainSizeLowerLimit", "weakLayerPersistent", "weakLayerThickness", "weakLayerStrength", "weakLayerWet", "weakLayerCrustAbove", "weakLayerCrustBelow", "weakLayerPosition", "weakLayerCreation", "weakLayerDistribution", "dangerSpotRecognizability", "remoteTriggering", "terrainTypes", "looseSnowGrainShape", "looseSnowMoisture", "constructor", "Date", "active", "Array", "getAllRegions", "getRegionsByStatus", "status", "RegionStatus", "saved", "getForenoonDangerRatingAbove", "afternoon", "dangerRating", "DangerRating", "low", "getAfternoonDangerRatingAbove", "getForenoonDangerRatingBelow", "getAfternoonDangerRatingBelow", "updateDangerRating", "getAvalancheProblem", "AvalancheType", "slab", "PP", "DF", "RG", "FC", "very_easy", "easy", "AvalancheProblem", "wind_slab", "hard", "very_hard", "persistent_weak_layers", "new_snow", "MF", "wet_snow", "MFcr", "loose", "DH", "SH", "glide", "gliding_snow", "compareTo", "other", "snowpackStabilityValue", "avalancheSizeValue", "DangerSourcesService", "constructor", "http", "inject", "HttpClient", "constantsService", "ConstantsService", "authenticationService", "AuthenticationService", "init", "days", "dates", "isEditable", "isReadOnly", "startDate", "Date", "setDate", "getDate", "setHours", "endDate", "i", "date", "valueOf", "push", "getValidFromUntil", "loadStatus", "length", "forecastStatusMap", "Map", "analysisStatusMap", "getStatus", "getActiveRegionId", "subscribe", "data", "set", "getTime", "forecast", "analysis", "console", "error", "hasDangerSourceVariants", "Observable", "observer", "next", "complete", "region", "url", "getServerUrl", "createSearchParams", "getISOStringWithTimezoneOffset", "toString", "get", "getActiveDate", "activeDate", "setActiveDate", "validFrom", "setTime", "validUntil", "hasBeenPublished5PM", "published", "now", "getDateOffset", "offset", "index", "findIndex", "d", "getNextDate", "getPreviousDate", "getIsEditable", "setIsEditable", "getIsReadOnly", "setIsReadOnly", "getDangerSourceVariantType", "DangerSourceVariantType", "loadDangerSources", "regions", "updateDangerSource", "dangerSource", "id", "body", "JSON", "stringify", "post", "loadDangerSourceVariants", "dangerSourceId", "createDangerSourceVariant", "dangerSourceVariant", "put", "updateDangerSourceVariant", "deleteDangerSourceVariant", "variant", "delete", "saveVariants", "variants", "factory", "\u0275fac"] }