From 1d2737ebc38313754b44639d7d49f2f2d834a451 Mon Sep 17 00:00:00 2001 From: Brandon Clayton <bclayton@usgs.gov> Date: Mon, 16 Dec 2024 10:43:29 -0700 Subject: [PATCH] lint fix --- .eslintrc.json | 3 +- package-lock.json | 1216 +++++++++++++++-- package.json | 1 + .../integration/dashboard/dashboard.spec.ts | 2 +- .../dev/dashboard/dev-dashboard.spec.ts | 2 +- .../integration/hazard/disagg/disagg.spec.ts | 12 +- .../hazard/static/static-hazard.spec.ts | 4 +- .../integration/source/mfd/mfd.spec.ts | 2 +- .../cypress/utils/dashboard.utils.ts | 4 +- .../cypress/utils/nshmp-template.utils.ts | 2 +- projects/nshmp-apps/jest.config.ts | 2 +- projects/nshmp-apps/src/app/app.component.ts | 2 +- .../building-code-control.component.ts | 10 +- .../components/content/content.component.ts | 2 +- .../control-panel-hazard.component.ts | 16 +- .../control-panel-input.component.ts | 8 +- .../rtgm/components/data/data.component.ts | 2 +- .../rtgm/components/plots/plots.component.ts | 2 +- .../risk-targets/risk-targets.component.ts | 2 +- .../designmaps/rtgm/services/app.service.ts | 62 +- .../nshmp-apps/src/app/dev/gmm/gmm.routes.ts | 2 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 30 +- .../components/plots/plots.component.ts | 8 +- .../services/app.service.ts | 20 +- .../control-panel/control-panel.component.ts | 16 +- .../hazard-data/hazard-data.component.ts | 6 +- .../parameter-summary.component.ts | 2 +- .../components/plots/plots.component.ts | 22 +- .../spectra-data/spectra-data.component.ts | 16 +- .../guards/dynamic-hazard-compare.guard.ts | 12 +- .../dynamic-compare/services/app.service.ts | 74 +- .../services/hazard-plots.service.ts | 48 +- .../dynamic-compare/services/math.service.ts | 2 +- .../services/spectra-plots.service.ts | 62 +- .../control-panel/control-panel.component.ts | 2 +- .../services/app.service.ts | 14 +- .../src/app/dev/math/math.routes.ts | 2 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 24 +- .../app/gmm/distance/services/app.service.ts | 18 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 16 +- .../path-parameters.component.ts | 2 +- .../site-parameters.component.ts | 4 +- .../app/gmm/magnitude/services/app.service.ts | 20 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 12 +- .../event-parameters.component.ts | 10 +- .../path-parameters.component.ts | 8 +- .../components/plots/plots.component.ts | 2 +- .../site-parameters.component.ts | 4 +- .../app/gmm/spectra/services/app.service.ts | 32 +- .../components/content/content.component.ts | 6 +- .../control-panel/control-panel.component.ts | 10 +- .../disagg-data/disagg-data.component.ts | 4 +- .../geo-disagg/geo-disagg.component.ts | 16 +- .../parameter-summary.component.ts | 2 +- .../components/plots/plots.component.ts | 2 +- .../app/hazard/disagg/services/app.service.ts | 57 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 12 +- .../parameter-summary.component.ts | 2 +- .../hazard/dynamic/services/app.service.ts | 50 +- .../control-panel/control-panel.component.ts | 10 +- .../curve-data/curve-data.component.ts | 8 +- .../parameter-summary.component.ts | 2 +- .../spectrum-data/spectrum-data.component.ts | 2 +- .../app/hazard/static/services/app.service.ts | 66 +- .../src/app/internal/aws/aws.routes.ts | 2 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 2 +- .../snack-bar/snack-bar.component.ts | 2 +- .../aws/check-haz-jobs/pipes/log.pipe.ts | 8 +- .../check-haz-jobs/services/app.service.ts | 18 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 4 +- .../haz-job-history/services/app.service.ts | 10 +- .../components/form/form.component.ts | 8 +- .../components/history/history.component.ts | 6 +- .../job-submitted/job-submitted.component.ts | 8 +- .../submit-haz-jobs/services/app.service.ts | 40 +- .../services/app.service.ts | 12 +- .../internal/shared/services/auth.service.ts | 8 +- .../control-panel/control-panel.component.ts | 10 +- .../components/data/data.component.ts | 4 +- .../parameter-summary.component.html | 2 +- .../services/app.service.ts | 10 +- projects/nshmp-apps/src/app/ncm/ncm.routes.ts | 2 +- .../components/content/content.component.ts | 10 +- .../src/app/source/mfd/app.component.ts | 2 +- .../control-panel/control-panel.component.ts | 32 +- .../mfd/components/data/data.component.ts | 8 +- .../parameter-summary.component.ts | 4 +- .../app/source/mfd/services/app.service.ts | 56 +- .../app/source/model-maps/app.component.ts | 4 +- .../control-panel/control-panel.component.ts | 66 +- .../info-popup/info-popup.component.ts | 12 +- .../components/map/map.component.ts | 8 +- .../source/model-maps/services/app.service.ts | 102 +- .../components/content/content.component.ts | 4 +- .../control-panel/control-panel.component.ts | 12 +- .../app/source/rates/services/app.service.ts | 30 +- .../interceptors/http-error.interceptor.ts | 4 +- .../src/shared/services/shared.service.ts | 2 +- 105 files changed, 1843 insertions(+), 792 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c12148440..d65e17029 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -58,7 +58,8 @@ ], "unused-imports/no-unused-imports": "error", "unused-imports/no-unused-vars": "error", - "n/no-extraneous-import": "off" + "n/no-extraneous-import": "off", + "@typescript-eslint/no-floating-promises": "off" }, "plugins": [ "simple-import-sort", diff --git a/package-lock.json b/package-lock.json index 251093145..60eba3e0c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -69,6 +69,7 @@ "@typescript-eslint/parser": "^8.18.1", "angular-http-server": "^1.12.0", "cypress": "^13.16.1", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-jsdoc": "^50.6.1", "eslint-plugin-prefer-arrow": "^1.2.3", "eslint-plugin-prettier": "^5.2.1", @@ -8352,6 +8353,13 @@ "fsevents": "~2.3.2" } }, + "node_modules/@rtsao/scc": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@rtsao/scc/-/scc-1.1.0.tgz", + "integrity": "sha512-zt6OdqaDoOnJ1ZYsCYGt9YmWzDXl4vQdKTyJev62gFhRGKdx7mcT54V9KIjg+d2wi9EXsPvAPKe7i7WjfVWB8g==", + "dev": true, + "license": "MIT" + }, "node_modules/@schematics/angular": { "version": "19.0.5", "resolved": "https://registry.npmjs.org/@schematics/angular/-/angular-19.0.5.tgz", @@ -8996,6 +9004,13 @@ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==", "license": "MIT" }, + "node_modules/@types/json5": { + "version": "0.0.29", + "resolved": "https://registry.npmjs.org/@types/json5/-/json5-0.0.29.tgz", + "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==", + "dev": true, + "license": "MIT" + }, "node_modules/@types/leaflet": { "version": "1.9.14", "resolved": "https://registry.npmjs.org/@types/leaflet/-/leaflet-1.9.14.tgz", @@ -10296,6 +10311,27 @@ "dev": true, "license": "MIT" }, + "node_modules/array-includes": { + "version": "3.1.8", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.8.tgz", + "integrity": "sha512-itaWrbYbqpGXkGhZPGUulwnhVf5Hpy1xiCFsGqyIGglbBxmG5vSjxQen3/WGOjPpNEv1RtBLKxbmVXm8HpJStQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0", + "get-intrinsic": "^1.2.4", + "is-string": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/array-normalize": { "version": "1.1.4", "resolved": "https://registry.npmjs.org/array-normalize/-/array-normalize-1.1.4.tgz", @@ -10327,6 +10363,87 @@ "node": ">=8" } }, + "node_modules/array.prototype.findlastindex": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.5.tgz", + "integrity": "sha512-zfETvRFA8o7EiNn++N5f/kaCw221hrpGsDmcpndVupkPzEc1Wuf3VgC0qby1BbHs7f5DVYjgtEU2LLh5bqeGfQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flat": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.3.3.tgz", + "integrity": "sha512-rwG/ja1neyLqCuGZ5YYrznA62D4mZXg0i1cIskIUKSiqF3Cje9/wXAls9B9s1Wa2fomMsIv8czB8jZcPmxCXFg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/array.prototype.flatmap": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.3.3.tgz", + "integrity": "sha512-Y7Wt51eKJSyi80hFrJCePGGNo5ktJCslFuboqJsbf57CCPcm5zztluPlc4/aD8sWsKvlwatezpV4U1efk8kpjg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-shim-unscopables": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/arraybuffer.prototype.slice": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.4.tgz", + "integrity": "sha512-BNoCY6SXXPQ7gF2opIP4GBE+Xw7U+pHMYKuzjgCN3GwiaIR09UUeKfheyIry77QtrCBlC0KK0q5/TER/tYh3PQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "array-buffer-byte-length": "^1.0.1", + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.6", + "is-array-buffer": "^3.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/arrify": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/arrify/-/arrify-1.0.1.tgz", @@ -11739,16 +11856,44 @@ } }, "node_modules/call-bind": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.7.tgz", - "integrity": "sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==", + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.8.tgz", + "integrity": "sha512-oKlSFMcMwpUg2ednkhQ454wfWiU/ul3CkJe/PEHcTKuiX6RpbehUiFMXu13HalGZxfUwCQzZG747YXBn1im9ww==", "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.0", "es-define-property": "^1.0.0", - "es-errors": "^1.3.0", - "function-bind": "^1.1.2", "get-intrinsic": "^1.2.4", - "set-function-length": "^1.2.1" + "set-function-length": "^1.2.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/call-bind-apply-helpers": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/call-bind-apply-helpers/-/call-bind-apply-helpers-1.0.1.tgz", + "integrity": "sha512-BhYE+WDaywFg2TBWYNXAE+8B1ATnThNBqXHP5nQu0jWJdVvY2hvkpyB3qOmtmDePiS5/BDQ8wASEWGMWRG148g==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "function-bind": "^1.1.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/call-bound": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/call-bound/-/call-bound-1.0.3.tgz", + "integrity": "sha512-YTd+6wGlNlPxSuri7Y6X8tY2dmm12UMH66RpKMhiX6rsk5wXXnYgbUcOt8kiS31/AjfoTOvCsE+w8nZQLQnzHA==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "get-intrinsic": "^1.2.6" }, "engines": { "node": ">= 0.4" @@ -13741,6 +13886,60 @@ "node": ">=12" } }, + "node_modules/data-view-buffer": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-buffer/-/data-view-buffer-1.0.1.tgz", + "integrity": "sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/data-view-byte-length/-/data-view-byte-length-1.0.1.tgz", + "integrity": "sha512-4J7wRJD3ABAzr8wP+OcIcqq2dlUKp4DVflx++hs5h5ZKydWMI6/D/fAot+yh6g2tHh8fLFTvNOaVN357NvSrOQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/data-view-byte-offset": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/data-view-byte-offset/-/data-view-byte-offset-1.0.0.tgz", + "integrity": "sha512-t/Ygsytq+R995EJ5PZlD4Cu56sWa8InXySaViRzw9apusqsOO2bQP+SbYzAhR0pFKoB+43lYy8rWban9JSuXnA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.6", + "es-errors": "^1.3.0", + "is-data-view": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/dayjs": { "version": "1.11.13", "resolved": "https://registry.npmjs.org/dayjs/-/dayjs-1.11.13.tgz", @@ -14265,6 +14464,20 @@ "node": ">= 0.8.0" } }, + "node_modules/dunder-proto": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dunder-proto/-/dunder-proto-1.0.0.tgz", + "integrity": "sha512-9+Sj30DIu+4KvHqMfLUGLFYL2PkURSYMVXJyXe92nFRvlYq5hBjLEhblKB+vkd/WVlUYMWigiY07T91Fkk0+4A==", + "license": "MIT", + "dependencies": { + "call-bind-apply-helpers": "^1.0.0", + "es-errors": "^1.3.0", + "gopd": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + } + }, "node_modules/dup": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/dup/-/dup-1.0.0.tgz", @@ -14557,14 +14770,74 @@ "is-arrayish": "^0.2.1" } }, - "node_modules/es-define-property": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.0.tgz", - "integrity": "sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==", + "node_modules/es-abstract": { + "version": "1.23.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.23.6.tgz", + "integrity": "sha512-Ifco6n3yj2tMZDWNLyloZrytt9lqqlwvS83P3HtaETR0NUOYnIULGGHpktqYGObGy+8wc1okO25p8TjemhImvA==", + "dev": true, "license": "MIT", "dependencies": { - "get-intrinsic": "^1.2.4" + "array-buffer-byte-length": "^1.0.1", + "arraybuffer.prototype.slice": "^1.0.4", + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.8", + "call-bound": "^1.0.3", + "data-view-buffer": "^1.0.1", + "data-view-byte-length": "^1.0.1", + "data-view-byte-offset": "^1.0.0", + "es-define-property": "^1.0.1", + "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", + "es-set-tostringtag": "^2.0.3", + "es-to-primitive": "^1.3.0", + "function.prototype.name": "^1.1.7", + "get-intrinsic": "^1.2.6", + "get-symbol-description": "^1.0.2", + "globalthis": "^1.0.4", + "gopd": "^1.2.0", + "has-property-descriptors": "^1.0.2", + "has-proto": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "internal-slot": "^1.1.0", + "is-array-buffer": "^3.0.4", + "is-callable": "^1.2.7", + "is-data-view": "^1.0.2", + "is-negative-zero": "^2.0.3", + "is-regex": "^1.2.1", + "is-shared-array-buffer": "^1.0.3", + "is-string": "^1.1.1", + "is-typed-array": "^1.1.13", + "is-weakref": "^1.1.0", + "math-intrinsics": "^1.0.0", + "object-inspect": "^1.13.3", + "object-keys": "^1.1.1", + "object.assign": "^4.1.5", + "regexp.prototype.flags": "^1.5.3", + "safe-array-concat": "^1.1.3", + "safe-regex-test": "^1.1.0", + "string.prototype.trim": "^1.2.10", + "string.prototype.trimend": "^1.0.9", + "string.prototype.trimstart": "^1.0.8", + "typed-array-buffer": "^1.0.2", + "typed-array-byte-length": "^1.0.1", + "typed-array-byte-offset": "^1.0.3", + "typed-array-length": "^1.0.7", + "unbox-primitive": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/es-define-property": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/es-define-property/-/es-define-property-1.0.1.tgz", + "integrity": "sha512-e3nRfgfUZ4rNGL232gUgX06QNyyez04KdjFrF+LTRoOXmrOgFKDg4BCdsjW8EnT69eqdYGmRpJwiPVYNrCaW3g==", + "license": "MIT", "engines": { "node": ">= 0.4" } @@ -14610,6 +14883,61 @@ "integrity": "sha512-MVNK56NiMrOwitFB7cqDwq0CQutbw+0BvLshJSse0MUNU+y1FC3bUS/AQg7oUng+/wKrrki7JfmwtVHkVfPLlw==", "license": "MIT" }, + "node_modules/es-object-atoms": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-object-atoms/-/es-object-atoms-1.0.0.tgz", + "integrity": "sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-set-tostringtag": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.3.tgz", + "integrity": "sha512-3T8uNMC3OQTHkFUsFq8r/BwAXLHvU/9O9mE0fBc/MY5iq/8H7ncvO947LmYA6ldWw9Uh8Yhf25zu6n7nML5QWQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "get-intrinsic": "^1.2.4", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.1" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/es-shim-unscopables": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz", + "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "hasown": "^2.0.0" + } + }, + "node_modules/es-to-primitive": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.3.0.tgz", + "integrity": "sha512-w+5mJ3GuFL+NjVtJlvydShqE1eN3h3PbI7/5LAsYJP/2qtuMXjfL2LpHSRqo4b4eSF5K/DH1JXKUAHSB2UW50g==", + "dev": true, + "license": "MIT", + "dependencies": { + "is-callable": "^1.2.7", + "is-date-object": "^1.0.5", + "is-symbol": "^1.0.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/es5-ext": { "version": "0.10.64", "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.64.tgz", @@ -14861,6 +15189,56 @@ "eslint": ">=7.0.0" } }, + "node_modules/eslint-import-resolver-node": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz", + "integrity": "sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7", + "is-core-module": "^2.13.0", + "resolve": "^1.22.4" + } + }, + "node_modules/eslint-import-resolver-node/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-module-utils": { + "version": "2.12.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.12.0.tgz", + "integrity": "sha512-wALZ0HFoytlyh/1+4wuZ9FJCD/leWHQzzrxJ8+rebyReSLk7LApMyd3WJaLVoN+D5+WIdJyDK1c6JnE65V4Zyg==", + "dev": true, + "license": "MIT", + "dependencies": { + "debug": "^3.2.7" + }, + "engines": { + "node": ">=4" + }, + "peerDependenciesMeta": { + "eslint": { + "optional": true + } + } + }, + "node_modules/eslint-module-utils/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, "node_modules/eslint-plugin-es": { "version": "4.1.0", "resolved": "https://registry.npmjs.org/eslint-plugin-es/-/eslint-plugin-es-4.1.0.tgz", @@ -14907,19 +15285,146 @@ "node": ">=4" } }, - "node_modules/eslint-plugin-jsdoc": { - "version": "50.6.1", - "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.1.tgz", - "integrity": "sha512-UWyaYi6iURdSfdVVqvfOs2vdCVz0J40O/z/HTsv2sFjdjmdlUI/qlKLOTmwbPQ2tAfQnE5F9vqx+B+poF71DBQ==", + "node_modules/eslint-plugin-import": { + "version": "2.31.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.31.0.tgz", + "integrity": "sha512-ixmkI62Rbc2/w8Vfxyh1jQRTdRTF52VxwRVHl/ykPAmqG+Nb7/kNn+byLP0LxPgI7zWA16Jt82SybJInmMia3A==", "dev": true, - "license": "BSD-3-Clause", + "license": "MIT", "dependencies": { - "@es-joy/jsdoccomment": "~0.49.0", - "are-docs-informative": "^0.0.2", - "comment-parser": "1.4.1", - "debug": "^4.3.6", - "escape-string-regexp": "^4.0.0", - "espree": "^10.1.0", + "@rtsao/scc": "^1.1.0", + "array-includes": "^3.1.8", + "array.prototype.findlastindex": "^1.2.5", + "array.prototype.flat": "^1.3.2", + "array.prototype.flatmap": "^1.3.2", + "debug": "^3.2.7", + "doctrine": "^2.1.0", + "eslint-import-resolver-node": "^0.3.9", + "eslint-module-utils": "^2.12.0", + "hasown": "^2.0.2", + "is-core-module": "^2.15.1", + "is-glob": "^4.0.3", + "minimatch": "^3.1.2", + "object.fromentries": "^2.0.8", + "object.groupby": "^1.0.3", + "object.values": "^1.2.0", + "semver": "^6.3.1", + "string.prototype.trimend": "^1.0.8", + "tsconfig-paths": "^3.15.0" + }, + "engines": { + "node": ">=4" + }, + "peerDependencies": { + "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8 || ^9" + } + }, + "node_modules/eslint-plugin-import/node_modules/brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "license": "MIT", + "dependencies": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/debug": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz", + "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.1" + } + }, + "node_modules/eslint-plugin-import/node_modules/doctrine": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-2.1.0.tgz", + "integrity": "sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "esutils": "^2.0.2" + }, + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/eslint-plugin-import/node_modules/json5": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/json5/-/json5-1.0.2.tgz", + "integrity": "sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA==", + "dev": true, + "license": "MIT", + "dependencies": { + "minimist": "^1.2.0" + }, + "bin": { + "json5": "lib/cli.js" + } + }, + "node_modules/eslint-plugin-import/node_modules/minimatch": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", + "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", + "dev": true, + "license": "ISC", + "dependencies": { + "brace-expansion": "^1.1.7" + }, + "engines": { + "node": "*" + } + }, + "node_modules/eslint-plugin-import/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/eslint-plugin-import/node_modules/strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4" + } + }, + "node_modules/eslint-plugin-import/node_modules/tsconfig-paths": { + "version": "3.15.0", + "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz", + "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/json5": "^0.0.29", + "json5": "^1.0.2", + "minimist": "^1.2.6", + "strip-bom": "^3.0.0" + } + }, + "node_modules/eslint-plugin-jsdoc": { + "version": "50.6.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-50.6.1.tgz", + "integrity": "sha512-UWyaYi6iURdSfdVVqvfOs2vdCVz0J40O/z/HTsv2sFjdjmdlUI/qlKLOTmwbPQ2tAfQnE5F9vqx+B+poF71DBQ==", + "dev": true, + "license": "BSD-3-Clause", + "dependencies": { + "@es-joy/jsdoccomment": "~0.49.0", + "are-docs-informative": "^0.0.2", + "comment-parser": "1.4.1", + "debug": "^4.3.6", + "escape-string-regexp": "^4.0.0", + "espree": "^10.1.0", "esquery": "^1.6.0", "parse-imports": "^2.1.1", "semver": "^7.6.3", @@ -16435,6 +16940,26 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/function.prototype.name": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/function.prototype.name/-/function.prototype.name-1.1.7.tgz", + "integrity": "sha512-2g4x+HqTJKM9zcJqBSpjoRmdcPFtJM60J3xJisTQSXBWka5XqyBN/2tNUgma1mztTXyDuUsEtYe5qcs7xYzYQA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "functions-have-names": "^1.2.3", + "hasown": "^2.0.2", + "is-callable": "^1.2.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/functions-have-names": { "version": "1.2.3", "resolved": "https://registry.npmjs.org/functions-have-names/-/functions-have-names-1.2.3.tgz", @@ -16489,16 +17014,21 @@ } }, "node_modules/get-intrinsic": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.4.tgz", - "integrity": "sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==", + "version": "1.2.6", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.6.tgz", + "integrity": "sha512-qxsEs+9A+u85HhllWJJFicJfPDhRmjzoYdl64aMWW9yRIJmSyxdn8IEkuIM530/7T+lv0TIHd8L6Q/ra0tEoeA==", "license": "MIT", "dependencies": { + "call-bind-apply-helpers": "^1.0.1", + "dunder-proto": "^1.0.0", + "es-define-property": "^1.0.1", "es-errors": "^1.3.0", + "es-object-atoms": "^1.0.0", "function-bind": "^1.1.2", - "has-proto": "^1.0.1", - "has-symbols": "^1.0.3", - "hasown": "^2.0.0" + "gopd": "^1.2.0", + "has-symbols": "^1.1.0", + "hasown": "^2.0.2", + "math-intrinsics": "^1.0.0" }, "engines": { "node": ">= 0.4" @@ -16532,6 +17062,24 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/get-symbol-description": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-symbol-description/-/get-symbol-description-1.0.2.tgz", + "integrity": "sha512-g0QYk1dZBxGwk+Ngc+ltRH2IBp2f7zBkBMBJZCDerh6EhlhSR6+9irMCuT/09zD6qkarHUSn529sK/yL4S27mg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/getos": { "version": "3.2.1", "resolved": "https://registry.npmjs.org/getos/-/getos-3.2.1.tgz", @@ -16734,6 +17282,23 @@ "node": ">=4" } }, + "node_modules/globalthis": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/globalthis/-/globalthis-1.0.4.tgz", + "integrity": "sha512-DpLKbNU4WylpxJykQujfCcwYWiV/Jhm50Goo0wrVILAv5jOr9d+H+UR3PhSCD2rCCEIg0uc+G+muBTwD54JhDQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "define-properties": "^1.2.1", + "gopd": "^1.0.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/globby": { "version": "11.1.0", "resolved": "https://registry.npmjs.org/globby/-/globby-11.1.0.tgz", @@ -17006,12 +17571,12 @@ } }, "node_modules/gopd": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.0.1.tgz", - "integrity": "sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/gopd/-/gopd-1.2.0.tgz", + "integrity": "sha512-ZUKRh6/kUFoAiTAtTYPZJ3hw9wNxx+BIBOijnlG9PnrJsCcSjs1wyyD6vJpaYtgnzDrKYRSqf3OO6Rfa93xsRg==", "license": "MIT", - "dependencies": { - "get-intrinsic": "^1.1.3" + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -17464,10 +18029,14 @@ } }, "node_modules/has-proto": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.0.3.tgz", - "integrity": "sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==", + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/has-proto/-/has-proto-1.2.0.tgz", + "integrity": "sha512-KIL7eQPfHQRC8+XluaIw7BHUwwqL19bQn4hzNgdr+1wXoU0KKj6rufu47lhY7KbJR2C6T6+PfyN0Ea7wkSS+qQ==", + "dev": true, "license": "MIT", + "dependencies": { + "dunder-proto": "^1.0.0" + }, "engines": { "node": ">= 0.4" }, @@ -17476,9 +18045,9 @@ } }, "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.1.0.tgz", + "integrity": "sha512-1cDNdwJ2Jaohmb3sg4OmKaMBwuC48sYni5HUw2DvsC8LjGTLK9h+eb1X6RyuOHe4hT0ULCW68iomhjUoKUqlPQ==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -18179,14 +18748,14 @@ "license": "0BSD" }, "node_modules/internal-slot": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.7.tgz", - "integrity": "sha512-NGnrKwXzSms2qUUih/ILZ5JBqNTSa1+ZmP6flaIp6KmSElgE9qdndzS3cqjrDovwFdmwsGsLdeFgB6suw+1e9g==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.1.0.tgz", + "integrity": "sha512-4gd7VpWNQNB4UKKCFFVcp1AVv+FMOgs9NKzjHKusc8jTMhd5eL1NqQqOpE0KzMds804/yHlglp3uxgluOqAPLw==", "license": "MIT", "dependencies": { "es-errors": "^1.3.0", - "hasown": "^2.0.0", - "side-channel": "^1.0.4" + "hasown": "^2.0.2", + "side-channel": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -18263,13 +18832,32 @@ "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", "license": "MIT" }, + "node_modules/is-async-function": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-async-function/-/is-async-function-2.0.0.tgz", + "integrity": "sha512-Y1JXKrfykRJGdlDwdKlLpLyMIiWqWvuSd17TvZk68PLAOGOoF4Xyav1z0Xhoi+gCYjZVeC5SI+hYFOfvXmGRCA==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-tostringtag": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-bigint": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.0.4.tgz", - "integrity": "sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-bigint/-/is-bigint-1.1.0.tgz", + "integrity": "sha512-n4ZT37wG78iz03xPRKJrHTdZbe3IicyucEtdRsV5yglwc3GyUfbAfpSeD0FJ41NbUNSt5wbhqfp1fS+BgnvDFQ==", "license": "MIT", "dependencies": { - "has-bigints": "^1.0.1" + "has-bigints": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" @@ -18288,13 +18876,13 @@ } }, "node_modules/is-boolean-object": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.1.2.tgz", - "integrity": "sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-boolean-object/-/is-boolean-object-1.2.1.tgz", + "integrity": "sha512-l9qO6eFlUETHtuihLcYOaLKByJ1f+N4kthcU9YjHy3N+B3hWv0y/2Nd0mu/7lTFnRQHTrSdXF50HQ3bl5fEnng==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18343,13 +18931,32 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-data-view": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-data-view/-/is-data-view-1.0.2.tgz", + "integrity": "sha512-RKtWF8pGmS87i2D6gqQu/l7EYRlVdfzemCJN/P3UOs//x1QE7mfhvzHIApBTRf7axvT6DMGwSwBXYCT0nfB9xw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-date-object": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.5.tgz", - "integrity": "sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.1.0.tgz", + "integrity": "sha512-PwwhEakHVKTdRNVOw+/Gyh0+MzlCl4R6qKvkhuvLtPMggI1WAHt9sOwZxQLSGpUaDnrdyDsomoRgNnCfKNSXXg==", "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18383,6 +18990,22 @@ "node": ">=0.10.0" } }, + "node_modules/is-finalizationregistry": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-finalizationregistry/-/is-finalizationregistry-1.1.0.tgz", + "integrity": "sha512-qfMdqbAQEwBw78ZyReKnlA8ezmPdb9BemzIIip/JkjaZUhitfXDkkr+3QTboW0JrSXT1QWyYShpvnNHGZ4c4yA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-finite": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", @@ -18527,6 +19150,19 @@ "integrity": "sha512-mlcHZA84t1qLSuWkt2v0I2l61PYdyQDt4aG1mLIXF5FDMm4+haBCxCPYSr/uwqQNRk1MiTizn0ypEuRAOLRAew==", "license": "MIT" }, + "node_modules/is-negative-zero": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.3.tgz", + "integrity": "sha512-5KoIu2Ngpyek75jXodFvnafB6DJgr3u8uuK0LEZJjrU19DrMD3EVERaR8sjz8CCGgpZvxPl9SuE1GMVPFHx1mw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-network-error": { "version": "1.1.0", "resolved": "https://registry.npmjs.org/is-network-error/-/is-network-error-1.1.0.tgz", @@ -18550,12 +19186,13 @@ } }, "node_modules/is-number-object": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.0.7.tgz", - "integrity": "sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-number-object/-/is-number-object-1.1.1.tgz", + "integrity": "sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==", "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18610,13 +19247,15 @@ "license": "MIT" }, "node_modules/is-regex": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.4.tgz", - "integrity": "sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.2.1.tgz", + "integrity": "sha512-MjYsKHO5O7mCsmRGxWcLWheFqN9DJ/2TmngvjKXihe6efViPqc274+Fx/4fYj/r03+ESvBdTXK0V6tA3rgez1g==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.2", - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.2", + "gopd": "^1.2.0", + "has-tostringtag": "^1.0.2", + "hasown": "^2.0.2" }, "engines": { "node": ">= 0.4" @@ -18665,12 +19304,13 @@ } }, "node_modules/is-string": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.7.tgz", - "integrity": "sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.1.1.tgz", + "integrity": "sha512-BtEeSsoaQjlSPBemMQIrY1MY0uM6vnS1g5fmufYOtnxLGUZM2178PKbhsk7Ffv58IX+ZtcvoGwccYsh0PglkAA==", "license": "MIT", "dependencies": { - "has-tostringtag": "^1.0.0" + "call-bound": "^1.0.3", + "has-tostringtag": "^1.0.2" }, "engines": { "node": ">= 0.4" @@ -18692,12 +19332,14 @@ "license": "MIT" }, "node_modules/is-symbol": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.4.tgz", - "integrity": "sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.1.1.tgz", + "integrity": "sha512-9gGx6GTtCQM73BgmHQXfDmLtfjjTUDSyoxTCbp5WtoixAhfgsDirWIcVQ/IHpvI5Vgd5i/J5F7B9cN/WlVbC/w==", "license": "MIT", "dependencies": { - "has-symbols": "^1.0.2" + "call-bound": "^1.0.2", + "has-symbols": "^1.1.0", + "safe-regex-test": "^1.1.0" }, "engines": { "node": ">= 0.4" @@ -18753,6 +19395,22 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/is-weakref": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-weakref/-/is-weakref-1.1.0.tgz", + "integrity": "sha512-SXM8Nwyys6nT5WP6pltOwKytLV7FqQ4UiibxVmW+EIosHcmCqkkjViTb5SNssDlkCiEYRP1/pdWUKVvZBmsR2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/is-weakset": { "version": "2.0.3", "resolved": "https://registry.npmjs.org/is-weakset/-/is-weakset-2.0.3.tgz", @@ -21163,6 +21821,15 @@ "integrity": "sha512-c4vLwYWyl+Ji+U43eU/G5FwxWd4ZH0ePUsFs5y0uwD9HUEFBXUQ1zUUan+78IpRD+y4pUfG0nAzNM292K7ItvA==", "license": "MIT" }, + "node_modules/math-intrinsics": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/math-intrinsics/-/math-intrinsics-1.0.0.tgz", + "integrity": "sha512-4MqMiKP90ybymYvsut0CH2g4XWbfLtmlCkXmtmdcDCxNB+mQcu1w/1+L/VD7vi/PSv7X2JYV7SCcR+jiPXnQtA==", + "license": "MIT", + "engines": { + "node": ">= 0.4" + } + }, "node_modules/math-log2": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/math-log2/-/math-log2-1.0.1.tgz", @@ -23301,6 +23968,58 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/object.fromentries": { + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.8.tgz", + "integrity": "sha512-k6E21FzySsSK5a21KRADBd/NGneRegFO5pLHfdQLpRDETUNJueLXs3WCzyQ3tFRDYgbq3KHGXfTbi2bs8WQ6rQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/object.groupby": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/object.groupby/-/object.groupby-1.0.3.tgz", + "integrity": "sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.2" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/object.values": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.2.0.tgz", + "integrity": "sha512-yBYjY9QX2hnRmZHAjG/f13MzmBzxzYgQhFrke06TTyKY5zSTEqkOeukBzIdVA3j3ulu8Qa3MbVFShV7T2RmGtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/obuf": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/obuf/-/obuf-1.1.2.tgz", @@ -25120,6 +25839,29 @@ "dev": true, "license": "Apache-2.0" }, + "node_modules/reflect.getprototypeof": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/reflect.getprototypeof/-/reflect.getprototypeof-1.0.8.tgz", + "integrity": "sha512-B5dj6usc5dkk8uFliwjwDHM8To5/QwdKz9JcBZ8Ic4G1f0YmeeJTtE/ZTdgRFPAfxZFiUaPhZ1Jcs4qeagItGQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "define-properties": "^1.2.1", + "dunder-proto": "^1.0.0", + "es-abstract": "^1.23.5", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.4", + "gopd": "^1.2.0", + "which-builtin-type": "^1.2.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/regenerate": { "version": "1.4.2", "resolved": "https://registry.npmjs.org/regenerate/-/regenerate-1.4.2.tgz", @@ -25700,6 +26442,33 @@ "tslib": "^2.1.0" } }, + "node_modules/safe-array-concat": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.3.tgz", + "integrity": "sha512-AURm5f0jYEOydBj7VQlVvDrjeFgthDdEF5H1dP+6mNpoXOMo1quQqJ4wvJDyRZ9+pO3kGWoOdmV08cSv2aJV6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "get-intrinsic": "^1.2.6", + "has-symbols": "^1.1.0", + "isarray": "^2.0.5" + }, + "engines": { + "node": ">=0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/safe-array-concat/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, "node_modules/safe-buffer": { "version": "5.2.1", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", @@ -25720,6 +26489,23 @@ ], "license": "MIT" }, + "node_modules/safe-regex-test": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.1.0.tgz", + "integrity": "sha512-x/+Cz4YrimQxQccJf5mKEbIa1NzeCRNI5Ecl/ekmlYaampdNLPalVyIcCZNNH3MvmqBugV5TMYZXv0ljslUlaw==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "is-regex": "^1.2.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -26216,15 +27002,69 @@ } }, "node_modules/side-channel": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.6.tgz", - "integrity": "sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.1.0.tgz", + "integrity": "sha512-ZX99e6tRweoUXqR+VBrslhda51Nh5MTQwou5tnUDgbtyM0dBgmhEDtWGP/xbKn6hqfPRHujUNwz5fy/wbbhnpw==", "license": "MIT", "dependencies": { - "call-bind": "^1.0.7", "es-errors": "^1.3.0", - "get-intrinsic": "^1.2.4", - "object-inspect": "^1.13.1" + "object-inspect": "^1.13.3", + "side-channel-list": "^1.0.0", + "side-channel-map": "^1.0.1", + "side-channel-weakmap": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-list": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/side-channel-list/-/side-channel-list-1.0.0.tgz", + "integrity": "sha512-FCLHtRD/gnpCiCHEiJLOwdmFP+wzCmDEkc9y7NsYxeF4u7Btsn1ZuwgwJGxImImHicJArLP4R0yX4c2KCrMrTA==", + "license": "MIT", + "dependencies": { + "es-errors": "^1.3.0", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/side-channel-map/-/side-channel-map-1.0.1.tgz", + "integrity": "sha512-VCjCNfgMsby3tTdo02nbjtM/ewra6jPHmpThenkTYh8pG9ucZ/1P8So4u4FGBek/BjpOVsDCMoLA/iuBKIFXRA==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/side-channel-weakmap": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/side-channel-weakmap/-/side-channel-weakmap-1.0.2.tgz", + "integrity": "sha512-WPS/HvHQTYnHisLo9McqBHOJk2FkHO/tlpvldyrnem4aeQp4hai3gythswg6p01oSoTl58rcpiFAjF2br2Ak2A==", + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "es-errors": "^1.3.0", + "get-intrinsic": "^1.2.5", + "object-inspect": "^1.13.3", + "side-channel-map": "^1.0.1" }, "engines": { "node": ">= 0.4" @@ -26772,6 +27612,65 @@ "node": ">=8" } }, + "node_modules/string.prototype.trim": { + "version": "1.2.10", + "resolved": "https://registry.npmjs.org/string.prototype.trim/-/string.prototype.trim-1.2.10.tgz", + "integrity": "sha512-Rs66F0P/1kedk5lyYyH9uBzuiI/kNRmwJAR9quK6VOtIpZ2G+hMZd+HQbbv25MgCA6gEffoMZYxlTod4WcdrKA==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-data-property": "^1.1.4", + "define-properties": "^1.2.1", + "es-abstract": "^1.23.5", + "es-object-atoms": "^1.0.0", + "has-property-descriptors": "^1.0.2" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimend": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.9.tgz", + "integrity": "sha512-G7Ok5C6E/j4SGfyLCloXTrngQIQU3PWtXGst3yM7Bea9FRURf1S42ZHlZZtsNque2FN2PoUhfZXYLNWwEr4dLQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.8", + "call-bound": "^1.0.2", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/string.prototype.trimstart": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.8.tgz", + "integrity": "sha512-UXSH262CSZY1tfu3G3Secr6uGLCFVPMhIqHjlgCUtCCcgihYc/xKs9djMTMUOb2j1mVSeU8EU6NWc/iQKU6Gfg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "define-properties": "^1.2.1", + "es-object-atoms": "^1.0.0" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/strip-ansi": { "version": "6.0.1", "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", @@ -27869,6 +28768,84 @@ "node": ">= 0.6" } }, + "node_modules/typed-array-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/typed-array-buffer/-/typed-array-buffer-1.0.2.tgz", + "integrity": "sha512-gEymJYKZtKXzzBzM4jqa9w6Q1Jjm7x2d+sh19AdsD4wqnMPDYyvwpsIc2Q/835kHuo3BEQ7CjelGhfTsoBb2MQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "es-errors": "^1.3.0", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + } + }, + "node_modules/typed-array-byte-length": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/typed-array-byte-length/-/typed-array-byte-length-1.0.1.tgz", + "integrity": "sha512-3iMJ9q0ao7WE9tWcaYKIptkNBuOIcZCCT0d4MRvuuH88fEoEH62IuQe0OtraD3ebQEoTRk8XCBoknUNc1Y67pw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-byte-offset": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/typed-array-byte-offset/-/typed-array-byte-offset-1.0.3.tgz", + "integrity": "sha512-GsvTyUHTriq6o/bHcTd0vM7OQ9JEdlvluu9YISaA7+KzDzPaIzEeDFNkTfhdE3MYcNhNi0vq/LlegYgIs5yPAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "available-typed-arrays": "^1.0.7", + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "has-proto": "^1.0.3", + "is-typed-array": "^1.1.13", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/typed-array-length": { + "version": "1.0.7", + "resolved": "https://registry.npmjs.org/typed-array-length/-/typed-array-length-1.0.7.tgz", + "integrity": "sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bind": "^1.0.7", + "for-each": "^0.3.3", + "gopd": "^1.0.1", + "is-typed-array": "^1.1.13", + "possible-typed-array-names": "^1.0.0", + "reflect.getprototypeof": "^1.0.6" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/typed-assert": { "version": "1.0.9", "resolved": "https://registry.npmjs.org/typed-assert/-/typed-assert-1.0.9.tgz", @@ -27918,6 +28895,25 @@ "node": ">=0.8.0" } }, + "node_modules/unbox-primitive": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/unbox-primitive/-/unbox-primitive-1.1.0.tgz", + "integrity": "sha512-nWJ91DjeOkej/TA8pXQ3myruKpKEYgqvpw9lz4OPHj/NWFNluYrjbz9j01CJ8yKQd2g4jFoOkINCTW2I5LEEyw==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.3", + "has-bigints": "^1.0.2", + "has-symbols": "^1.1.0", + "which-boxed-primitive": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, "node_modules/undici-types": { "version": "6.19.8", "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-6.19.8.tgz", @@ -29380,21 +30376,59 @@ } }, "node_modules/which-boxed-primitive": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz", - "integrity": "sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/which-boxed-primitive/-/which-boxed-primitive-1.1.1.tgz", + "integrity": "sha512-TbX3mj8n0odCBFVlY8AxkqcHASw3L60jIuF8jFP78az3C2YhmGvqbHBpAjTRH2/xqYunrJ9g1jSyjCjpoWzIAA==", "license": "MIT", "dependencies": { - "is-bigint": "^1.0.1", - "is-boolean-object": "^1.1.0", - "is-number-object": "^1.0.4", - "is-string": "^1.0.5", - "is-symbol": "^1.0.3" + "is-bigint": "^1.1.0", + "is-boolean-object": "^1.2.1", + "is-number-object": "^1.1.1", + "is-string": "^1.1.1", + "is-symbol": "^1.1.1" + }, + "engines": { + "node": ">= 0.4" }, "funding": { "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/which-builtin-type": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/which-builtin-type/-/which-builtin-type-1.2.1.tgz", + "integrity": "sha512-6iBczoX+kDQ7a3+YJBnh3T+KZRxM/iYNPXicqk66/Qfm1b93iu+yOImkg0zHbj5LNOcNv1TEADiZ0xa34B4q6Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "call-bound": "^1.0.2", + "function.prototype.name": "^1.1.6", + "has-tostringtag": "^1.0.2", + "is-async-function": "^2.0.0", + "is-date-object": "^1.1.0", + "is-finalizationregistry": "^1.1.0", + "is-generator-function": "^1.0.10", + "is-regex": "^1.2.1", + "is-weakref": "^1.0.2", + "isarray": "^2.0.5", + "which-boxed-primitive": "^1.1.0", + "which-collection": "^1.0.2", + "which-typed-array": "^1.1.16" + }, + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/which-builtin-type/node_modules/isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true, + "license": "MIT" + }, "node_modules/which-collection": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/which-collection/-/which-collection-1.0.2.tgz", @@ -29414,9 +30448,9 @@ } }, "node_modules/which-typed-array": { - "version": "1.1.15", - "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.15.tgz", - "integrity": "sha512-oV0jmFtUky6CXfkqehVvBP/LSWJ2sy4vWMioiENyJLePrBO/yKyV9OyJySfAKosh+RYkIl5zJCNZ8/4JncrpdA==", + "version": "1.1.16", + "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.16.tgz", + "integrity": "sha512-g+N+GAWiRj66DngFwHvISJd+ITsyphZvD1vChfVg6cEdnzy53GzB3oy0fUNlvhz7H7+MiqhYr26qxQShCpKTTQ==", "license": "MIT", "dependencies": { "available-typed-arrays": "^1.0.7", diff --git a/package.json b/package.json index d387b8d59..39bc5b1e9 100644 --- a/package.json +++ b/package.json @@ -93,6 +93,7 @@ "@typescript-eslint/parser": "^8.18.1", "angular-http-server": "^1.12.0", "cypress": "^13.16.1", + "eslint-plugin-import": "^2.31.0", "eslint-plugin-jsdoc": "^50.6.1", "eslint-plugin-prefer-arrow": "^1.2.3", "eslint-plugin-prettier": "^5.2.1", diff --git a/projects/nshmp-apps/cypress/integration/dashboard/dashboard.spec.ts b/projects/nshmp-apps/cypress/integration/dashboard/dashboard.spec.ts index ab5afa8fa..909100aab 100644 --- a/projects/nshmp-apps/cypress/integration/dashboard/dashboard.spec.ts +++ b/projects/nshmp-apps/cypress/integration/dashboard/dashboard.spec.ts @@ -14,7 +14,7 @@ describe('Dashboard', () => { describe('Check dashboard', () => { const nav = navigation().map(navItem => { const list = navItem.navigation.filter( - app => app.display !== 'Dashboard' + app => app.display !== 'Dashboard', ); return { ...navItem, diff --git a/projects/nshmp-apps/cypress/integration/dev/dashboard/dev-dashboard.spec.ts b/projects/nshmp-apps/cypress/integration/dev/dashboard/dev-dashboard.spec.ts index 6b93ba787..9a86dd68b 100644 --- a/projects/nshmp-apps/cypress/integration/dev/dashboard/dev-dashboard.spec.ts +++ b/projects/nshmp-apps/cypress/integration/dev/dashboard/dev-dashboard.spec.ts @@ -14,7 +14,7 @@ describe('Development Dashboard', () => { describe('Check dev dashboard', () => { const nav = devNavigation().map(navItem => { const list = navItem.navigation.filter( - app => app.display !== 'Development Dashboard' + app => app.display !== 'Development Dashboard', ); return { ...navItem, diff --git a/projects/nshmp-apps/cypress/integration/hazard/disagg/disagg.spec.ts b/projects/nshmp-apps/cypress/integration/hazard/disagg/disagg.spec.ts index 5f7e0c983..ade920cfa 100644 --- a/projects/nshmp-apps/cypress/integration/hazard/disagg/disagg.spec.ts +++ b/projects/nshmp-apps/cypress/integration/hazard/disagg/disagg.spec.ts @@ -149,41 +149,41 @@ describe('Disagg Application', () => { cy.get(returnPeriodRadioButtonSelector) .should( expected === RETURN_PERIOD ? 'have.class' : 'not.have.class', - 'mat-radio-checked' + 'mat-radio-checked', ) .find('input') .should(expected === RETURN_PERIOD ? 'be.checked' : 'not.be.checked'); cy.get(returnPeriodSelector) .should( expected === RETURN_PERIOD ? 'not.have.class' : 'have.class', - 'mat-form-field-disabled' + 'mat-form-field-disabled', ) .find('input') .should(expected === RETURN_PERIOD ? 'be.enabled' : 'be.disabled'); cy.get(commonReturnPeriodSelector).should( expected === RETURN_PERIOD ? 'not.have.class' : 'have.class', - 'mat-select-disabled' + 'mat-select-disabled', ); // IML cy.get(imlRadioButtonSelector) .should( expected === IML ? 'have.class' : 'not.have.class', - 'mat-radio-checked' + 'mat-radio-checked', ) .find('input') .should(expected === IML ? 'be.checked' : 'not.be.checked'); cy.get(imlSelector) .should( expected === IML ? 'not.have.class' : 'have.class', - 'mat-form-field-disabled' + 'mat-form-field-disabled', ) .find('input') .should(expected === IML ? 'be.enabled' : 'be.disabled'); cy.get(maxDirectionSelector) .should( expected === IML ? 'not.have.class' : 'have.class', - 'mat-checkbox-disabled' + 'mat-checkbox-disabled', ) .find('input') .should(expected === IML ? 'be.enabled' : 'be.disabled'); diff --git a/projects/nshmp-apps/cypress/integration/hazard/static/static-hazard.spec.ts b/projects/nshmp-apps/cypress/integration/hazard/static/static-hazard.spec.ts index 7d916c6d8..ef75af05c 100644 --- a/projects/nshmp-apps/cypress/integration/hazard/static/static-hazard.spec.ts +++ b/projects/nshmp-apps/cypress/integration/hazard/static/static-hazard.spec.ts @@ -78,7 +78,7 @@ describe('Static Hazard Application', () => { cy.get('plotly-plot').should('not.exist'); utils.hasExportDataTable( - 'static-hazard-curves-CONUS_2018-(-118,34).csv' + 'static-hazard-curves-CONUS_2018-(-118,34).csv', ); utils.hasDataTable(); }); @@ -101,7 +101,7 @@ describe('Static Hazard Application', () => { cy.get('plotly-plot').should('not.exist'); utils.hasExportDataTable( - 'static-hazard-spectra-CONUS_2018-(-118,34).csv' + 'static-hazard-spectra-CONUS_2018-(-118,34).csv', ); utils.hasDataTable(); }); diff --git a/projects/nshmp-apps/cypress/integration/source/mfd/mfd.spec.ts b/projects/nshmp-apps/cypress/integration/source/mfd/mfd.spec.ts index b5329f042..20da7c987 100644 --- a/projects/nshmp-apps/cypress/integration/source/mfd/mfd.spec.ts +++ b/projects/nshmp-apps/cypress/integration/source/mfd/mfd.spec.ts @@ -68,7 +68,7 @@ describe('Magnitude Frequency Distribution Application', () => { cy.get('plotly-plot').should('not.exist'); utils.hasExportDataTable( - 'mfd-active_crust-fault-gore_range_frontal.csv' + 'mfd-active_crust-fault-gore_range_frontal.csv', ); utils.hasDataTable(); }); diff --git a/projects/nshmp-apps/cypress/utils/dashboard.utils.ts b/projects/nshmp-apps/cypress/utils/dashboard.utils.ts index a9c50b9a9..3ff138217 100644 --- a/projects/nshmp-apps/cypress/utils/dashboard.utils.ts +++ b/projects/nshmp-apps/cypress/utils/dashboard.utils.ts @@ -11,7 +11,7 @@ export function hasDashboard(navList: NavigationList[]) { cy.get('.dashboard').should( 'have.css', 'background-image', - `url("${Cypress.config().baseUrl}dashboard-background.png")` + `url("${Cypress.config().baseUrl}dashboard-background.png")`, ); }); @@ -49,7 +49,7 @@ export function hasDashboard(navList: NavigationList[]) { 'https://earthquake.usgs.gov/ws/nshmp/hazard-runs/auth', { fixture: 'aws-auth.json', - } + }, ); } diff --git a/projects/nshmp-apps/cypress/utils/nshmp-template.utils.ts b/projects/nshmp-apps/cypress/utils/nshmp-template.utils.ts index a0aeb19bf..86f9982fd 100644 --- a/projects/nshmp-apps/cypress/utils/nshmp-template.utils.ts +++ b/projects/nshmp-apps/cypress/utils/nshmp-template.utils.ts @@ -93,7 +93,7 @@ export function hasNshmpTemplate(navList: NavigationList[]) { 'https://earthquake.usgs.gov/ws/nshmp/hazard-runs/auth', { fixture: 'aws-auth.json', - } + }, ); } diff --git a/projects/nshmp-apps/jest.config.ts b/projects/nshmp-apps/jest.config.ts index 2495d0033..394a5fb64 100644 --- a/projects/nshmp-apps/jest.config.ts +++ b/projects/nshmp-apps/jest.config.ts @@ -8,7 +8,7 @@ const config: Config.InitialOptions = { maxWorkers: '80%', moduleNameMapper: pathsToModuleNameMapper( {'projects/*': ['*']}, - {prefix: '<rootDir>/..'} + {prefix: '<rootDir>/..'}, ), preset: 'jest-preset-angular', reporters: ['default', 'jest-junit'], diff --git a/projects/nshmp-apps/src/app/app.component.ts b/projects/nshmp-apps/src/app/app.component.ts index 4b236ca7f..3e40ce7f3 100644 --- a/projects/nshmp-apps/src/app/app.component.ts +++ b/projects/nshmp-apps/src/app/app.component.ts @@ -27,7 +27,7 @@ export class AppComponent implements OnInit, OnDestroy { constructor( private nshmpService: NshmpService, - private http: HttpClient + private http: HttpClient, ) {} ngOnInit(): void { diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/components/building-code-control/building-code-control.component.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/components/building-code-control/building-code-control.component.ts index 666fe4b6b..187f72681 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/components/building-code-control/building-code-control.component.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/components/building-code-control/building-code-control.component.ts @@ -17,7 +17,7 @@ export class BuildingCodeControlComponent implements OnInit, OnDestroy { control: FormControl<string>; buildingCodes = computed( - () => this.service.usage()?.response.parameters.building_code.values + () => this.service.usage()?.response.parameters.building_code.values, ); parameters = computed(() => this.service.usage()?.response.parameters); @@ -35,8 +35,8 @@ export class BuildingCodeControlComponent implements OnInit, OnDestroy { if (values.buildingCode !== buildingCode) { this.service.hazardFormGroup.patchValue({buildingCode}); } - } - ) + }, + ), ); this.subs.push( @@ -47,8 +47,8 @@ export class BuildingCodeControlComponent implements OnInit, OnDestroy { if (values.buildingCode !== buildingCode) { this.service.formGroup.patchValue({buildingCode}); } - } - ) + }, + ), ); } diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/components/content/content.component.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/components/content/content.component.ts index 9de62c527..5328da61c 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/components/content/content.component.ts @@ -13,7 +13,7 @@ import {PlotsComponent} from '../plots/plots.component'; }) export class ContentComponent { hasData = computed( - () => this.service.serviceResponse()?.response !== undefined + () => this.service.serviceResponse()?.response !== undefined, ); constructor(private service: AppService) {} diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-hazard/control-panel-hazard.component.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-hazard/control-panel-hazard.component.ts index d925ed8fd..e800bea84 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-hazard/control-panel-hazard.component.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-hazard/control-panel-hazard.component.ts @@ -72,7 +72,7 @@ export class ControlPanelHazardComponent implements OnInit, OnDestroy { /** List of site class `Parameter`s */ siteClasses = computed( - () => this.service.hazardUsage()?.response?.models.siteClasses + () => this.service.hazardUsage()?.response?.models.siteClasses, ); /** List of imt `Parameter`s */ @@ -86,25 +86,27 @@ export class ControlPanelHazardComponent implements OnInit, OnDestroy { const controls = this.formGroup.controls; this.subs.push( - controls.latitude.valueChanges.subscribe(() => this.service.resetState()) + controls.latitude.valueChanges.subscribe(() => this.service.resetState()), ); this.subs.push( - controls.longitude.valueChanges.subscribe(() => this.service.resetState()) + controls.longitude.valueChanges.subscribe(() => + this.service.resetState(), + ), ); this.subs.push( - controls.model.valueChanges.subscribe(() => this.onModelChange()) + controls.model.valueChanges.subscribe(() => this.onModelChange()), ); this.subs.push( - controls.imt.valueChanges.subscribe(() => this.service.hazardToRtgm()) + controls.imt.valueChanges.subscribe(() => this.service.hazardToRtgm()), ); this.subs.push( controls.siteClass.valueChanges.subscribe(() => - this.service.hazardToRtgm() - ) + this.service.hazardToRtgm(), + ), ); } diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-input/control-panel-input.component.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-input/control-panel-input.component.ts index b4b954bbc..20225cb58 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-input/control-panel-input.component.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/components/control-panel-input/control-panel-input.component.ts @@ -42,17 +42,17 @@ export class ControlPanelInputComponent implements OnInit, OnDestroy { const controls = this.formGroup.controls; this.subs.push( - controls.afe.valueChanges.subscribe(() => this.service.resetState()) + controls.afe.valueChanges.subscribe(() => this.service.resetState()), ); this.subs.push( controls.buildingCode.valueChanges.subscribe(() => - this.service.resetState() - ) + this.service.resetState(), + ), ); this.subs.push( - controls.iml.valueChanges.subscribe(() => this.service.resetState()) + controls.iml.valueChanges.subscribe(() => this.service.resetState()), ); } diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/components/data/data.component.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/components/data/data.component.ts index 4b8184a89..0547c6493 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/components/data/data.component.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/components/data/data.component.ts @@ -73,7 +73,7 @@ export class DataComponent { private plotTable( nshmpPlot: NshmpPlot, data: Partial<PlotData>[], - addLabel = true + addLabel = true, ): PlotTable { const plot: NshmpPlot = { ...nshmpPlot, diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/components/plots/plots.component.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/components/plots/plots.component.ts index f0d58121e..e44785343 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/components/plots/plots.component.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/components/plots/plots.component.ts @@ -52,7 +52,7 @@ export class PlotsComponent implements OnInit, OnDestroy { ngOnInit(): void { this.sub = this.service.formGroup.controls.label.valueChanges.subscribe( - label => this.onLabel(label) + label => this.onLabel(label), ); } diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/components/risk-targets/risk-targets.component.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/components/risk-targets/risk-targets.component.ts index e81248504..f4e86f25d 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/components/risk-targets/risk-targets.component.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/components/risk-targets/risk-targets.component.ts @@ -16,7 +16,7 @@ import {AppService} from '../../services/app.service'; }) export class RiskTargetsComponent { riskTargets = computed( - () => this.service.serviceResponse()?.response.riskTargets + () => this.service.serviceResponse()?.response.riskTargets, ); constructor(private service: AppService) {} diff --git a/projects/nshmp-apps/src/app/designmaps/rtgm/services/app.service.ts b/projects/nshmp-apps/src/app/designmaps/rtgm/services/app.service.ts index 4f466b187..6d4adee16 100644 --- a/projects/nshmp-apps/src/app/designmaps/rtgm/services/app.service.ts +++ b/projects/nshmp-apps/src/app/designmaps/rtgm/services/app.service.ts @@ -105,7 +105,7 @@ export class AppService private nshmpService: NshmpService, private route: ActivatedRoute, private hazardService: HazardService, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -121,8 +121,8 @@ export class AppService get hazardUsage(): Signal<StaticHazardUsage> { return computed(() => this.state().hazardUsageResponses.get( - this.hazardFormGroup.getRawValue().model - ) + this.hazardFormGroup.getRawValue().model, + ), ); } @@ -133,8 +133,8 @@ export class AppService return computed(() => this.state().nshmServices.find( nshmService => - nshmService.model === this.hazardFormGroup.getRawValue().model - ) + nshmService.model === this.hazardFormGroup.getRawValue().model, + ), ); } @@ -221,7 +221,7 @@ export class AppService const values = this.hazardFormGroup.getRawValue(); const service = this.state().nshmServices.find( - nshmService => nshmService.model === values.model + nshmService => nshmService.model === values.model, ); const serviceUrl = `${service.url}${this.hazardServiceEndpoint}`; const url = `${serviceUrl}/${values.longitude}/${values.latitude}`; @@ -232,7 +232,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(hazardServiceResponse => { spinnerRef.close(); @@ -262,7 +262,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(response => { this.handleServiceResponse(response); @@ -317,15 +317,15 @@ export class AppService init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); const rtgm = this.nshmpService.callService$<RtgmUsageResponse>( - this.serviceUrl + this.serviceUrl, ); const hazard = this.hazardService.staticNshms$( `${this.nshmpWsStatic.url}${this.nshmpWsStatic.services.nshms}`, - this.hazardServiceEndpoint + this.hazardServiceEndpoint, ); forkJoin([rtgm, hazard]) @@ -333,7 +333,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(([usageResponse, nshms]) => { this.handleUsageResponse(usageResponse, nshms); @@ -382,14 +382,14 @@ export class AppService super.resetPlotSetting( plots.derivativeFragility, - defaultPlots.derivativeFragility + defaultPlots.derivativeFragility, ); super.resetPlotSetting(plots.fragility, defaultPlots.fragility); super.resetPlotSetting(plots.hazard, defaultPlots.hazard); super.resetPlotSetting(plots.hazardFragility, defaultPlots.hazardFragility); super.resetPlotSetting( plots.integralHazardFragility, - defaultPlots.integralHazardFragility + defaultPlots.integralHazardFragility, ); } @@ -439,7 +439,7 @@ export class AppService } private createDerivativeFragilityPlot( - iterations: IterationPlotData + iterations: IterationPlotData, ): NshmpPlot { const plots = this.state().plots; @@ -454,7 +454,7 @@ export class AppService private createFragilityPlot( rtgm: Rtgm, - iterations: IterationPlotData + iterations: IterationPlotData, ): NshmpPlot { const plots = this.state().plots; const {condCollapseProb} = rtgm.riskTargets; @@ -468,13 +468,13 @@ export class AppService this.linePlotData( iterations.integralHazardFragilityPlotData, condCollapseProb, - `${condCollapseProb * 100}% Conditional Probability of Collapse` + `${condCollapseProb * 100}% Conditional Probability of Collapse`, ), ...this.createFragilitySlices( condCollapseProb, rtgm.rtgmCalc.iterations, rtgm.rtgmCalc.upsampledHazCurve.imlUP, - [0, 1] + [0, 1], ), ], }, @@ -485,7 +485,7 @@ export class AppService condCollapseProb: number, iterations: RtgmIteration[], imls: number[], - yRange: number[] + yRange: number[], ): Partial<PlotData>[] { const fragilitySlices: Partial<PlotData>[] = []; const colors = this.colorScale(iterations); @@ -553,13 +553,13 @@ export class AppService this.linePlotData( [hazardPlotData], 1 / rtgm.riskTargets.UH_retPeriod, - `${percent} Probability of Exceedance in ${rtgm.riskTargets.timeHorizon_Yr} years` + `${percent} Probability of Exceedance in ${rtgm.riskTargets.timeHorizon_Yr} years`, ), ...this.createFragilitySlices( rtgm.riskTargets.condCollapseProb, rtgm.rtgmCalc.iterations, imls, - [Math.min(...afes), Math.max(...afes)] + [Math.min(...afes), Math.max(...afes)], ), ], }, @@ -568,7 +568,7 @@ export class AppService private createIntegralPlot( rtgm: Rtgm, - iterations: IterationPlotData + iterations: IterationPlotData, ): NshmpPlot { const plots = this.state().plots; const riskTargets = rtgm.riskTargets; @@ -584,7 +584,7 @@ export class AppService this.linePlotData( iterations.integralHazardFragilityPlotData, riskTargets.riskTgt_Annual, - `${percent * 100}% Probability of Collapse in ${year} years` + `${percent * 100}% Probability of Collapse in ${year} years`, ), ], }, @@ -593,7 +593,7 @@ export class AppService private createIterationPlotData( iterations: RtgmIteration[], - imls: number[] + imls: number[], ): IterationPlotData { const fragilityPlotData: Partial<PlotData>[] = []; const derivativeFragilityPlotData: Partial<PlotData>[] = []; @@ -785,7 +785,7 @@ export class AppService */ private getHazardResponseData( state: AppState, - values: RtgmHazardControlForm + values: RtgmHazardControlForm, ): StaticResponseData<HazardResponseMetadata> { const siteClass = values.siteClass; @@ -796,7 +796,7 @@ export class AppService : null; return responseData?.find( - data => data.metadata.imt.value === values.imt.toString() + data => data.metadata.imt.value === values.imt.toString(), ); } @@ -814,7 +814,7 @@ export class AppService private handleUsageResponse( usageResponse: RtgmUsageResponse, - nshms: StaticNshms + nshms: StaticNshms, ): void { this.updateState({ availableModels: nshms.models, @@ -859,13 +859,13 @@ export class AppService private linePlotData( plotData: Partial<PlotData>[], value: number, - name: string + name: string, ): Partial<PlotData> { const xMin = Math.min( - ...plotData.map(xy => Math.min(...(xy.x as number[]))) + ...plotData.map(xy => Math.min(...(xy.x as number[]))), ); const xMax = Math.max( - ...plotData.map(xy => Math.max(...(xy.x as number[]))) + ...plotData.map(xy => Math.max(...(xy.x as number[]))), ); return { @@ -915,7 +915,7 @@ export class AppService private updateUrl(): void { this.location.replaceState( apps().designMaps.rtgm.routerLink, - new HttpParams().appendAll(this.formGroup.getRawValue()).toString() + new HttpParams().appendAll(this.formGroup.getRawValue()).toString(), ); } diff --git a/projects/nshmp-apps/src/app/dev/gmm/gmm.routes.ts b/projects/nshmp-apps/src/app/dev/gmm/gmm.routes.ts index 1bd5e5e8a..42585fb39 100644 --- a/projects/nshmp-apps/src/app/dev/gmm/gmm.routes.ts +++ b/projects/nshmp-apps/src/app/dev/gmm/gmm.routes.ts @@ -13,7 +13,7 @@ const routes: Routes = [ }, loadComponent: () => import('./hanging-wall-effects/app.component').then( - com => com.AppComponent + com => com.AppComponent, ), path: 'hanging-wall-effects', }, diff --git a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/content/content.component.ts b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/content/content.component.ts index 250ef5390..97e98e8b0 100644 --- a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/content/content.component.ts @@ -35,8 +35,8 @@ export class ContentComponent { gmmUtils.plotToTable( this.service.state().plots.get(Plots.GROUND_MOTION).plotData, this.exp, - this.commonXValues - ) + this.commonXValues, + ), ); constructor(private service: AppService) {} diff --git a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts index 9b4396e82..fdffa4c00 100644 --- a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/control-panel/control-panel.component.ts @@ -65,12 +65,12 @@ export class ControlPanelComponent implements OnInit, OnDestroy { /** Whether a GMM has been selected */ gmmSelected$ = this.controls.gmmSource.valueChanges.pipe( - map(gmmSource => gmmSource?.length > 0) + map(gmmSource => gmmSource?.length > 0), ); /** Usage parameters */ parameters = computed( - () => this.service.state().usageResponse?.response?.parameters + () => this.service.state().usageResponse?.response?.parameters, ); /** Service call info state */ @@ -83,49 +83,49 @@ export class ControlPanelComponent implements OnInit, OnDestroy { MwMultiple$ = this.controls.multiSelectableParam.valueChanges.pipe( map( multiSelectableParam => - multiSelectableParam.toString() === GmmFormControlIds.MW.toString() - ) + multiSelectableParam.toString() === GmmFormControlIds.MW.toString(), + ), ); /** Whether Vs30 is multi-selectable */ vs30Multiple$ = this.controls.multiSelectableParam.valueChanges.pipe( map( multiSelectableParam => - multiSelectableParam.toString() === GmmFormControlIds.VS30.toString() - ) + multiSelectableParam.toString() === GmmFormControlIds.VS30.toString(), + ), ); subs: Subscription[] = []; constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { this.subs.push( this.formState.controls.gmmSource.valueChanges.subscribe(() => { this.onGmmSource(); - }) + }), ); this.subs.push( this.formState.controls.multiSelectableParam.valueChanges.subscribe(() => - this.onMultiSelectableParam() - ) + this.onMultiSelectableParam(), + ), ); this.subs.push( this.formState.controls.showEpistemicUncertainty.valueChanges.subscribe( - () => this.onShowEpistemicUncertainty() - ) + () => this.onShowEpistemicUncertainty(), + ), ); this.subs.push( combineLatest([ this.formState.controls.dip.valueChanges, this.formState.controls.width.valueChanges, - ]).subscribe(() => this.updatePlots()) + ]).subscribe(() => this.updatePlots()), ); this.subs.push( @@ -138,7 +138,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { this.formState.controls.z1p0.valueChanges, this.formState.controls.z2p5.valueChanges, this.formState.controls.zSed.valueChanges, - ]).subscribe(() => this.service.resetState()) + ]).subscribe(() => this.service.resetState()), ); } @@ -170,7 +170,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const supportedImts = gmmUtils.getSupportedImts( formValues.gmmSource, - this.service.state().usageResponse + this.service.state().usageResponse, ); this.service.updateState({ diff --git a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/plots/plots.component.ts b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/plots/plots.component.ts index 9813d4f6b..f667952fa 100644 --- a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/plots/plots.component.ts +++ b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/components/plots/plots.component.ts @@ -51,17 +51,17 @@ import {ParameterSummaryComponent} from '../parameter-summary/parameter-summary. export class PlotsComponent { /** Usage parameters */ private parameters = computed( - () => this.service.state().usageResponse?.response?.parameters + () => this.service.state().usageResponse?.response?.parameters, ); /** Ground motion plot */ groundMotionPlotData = computed( - () => this.service.state().plots?.get(Plots.GROUND_MOTION)?.plotData + () => this.service.state().plots?.get(Plots.GROUND_MOTION)?.plotData, ); /** Fault plot */ faultPlotData = computed( - () => this.service.state().plots?.get(Plots.FAULT)?.plotData + () => this.service.state().plots?.get(Plots.FAULT)?.plotData, ); /** Control panel form field state */ @@ -84,7 +84,7 @@ export class PlotsComponent { /** Repo metadata */ repositories = computed( - () => this.service.state().usageResponse?.metadata.repositories + () => this.service.state().usageResponse?.metadata.repositories, ); constructor(private service: AppService) {} diff --git a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/services/app.service.ts b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/services/app.service.ts index 83aed91b3..284f61b6f 100644 --- a/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/services/app.service.ts +++ b/projects/nshmp-apps/src/app/dev/gmm/hanging-wall-effects/services/app.service.ts @@ -75,7 +75,7 @@ export class AppService private formBuilder: FormBuilder, private route: ActivatedRoute, private location: LocationService, - private router: Router + private router: Router, ) { super(); this.addValidators(); @@ -145,14 +145,14 @@ export class AppService const urls = gmmUtils.serviceEndpoints( this.serviceUrl, this.formGroup.getRawValue(), - this.formGroup.getRawValue().multiSelectableParam + this.formGroup.getRawValue().multiSelectableParam, ); this.nshmpService .callServices$<GmmDistanceResponse>(urls) .pipe(catchError((error: Error) => this.nshmpService.throwError$(error))) .subscribe(serviceResponses => - this.handleServiceResponses(serviceResponses) + this.handleServiceResponses(serviceResponses), ); } @@ -195,7 +195,7 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.nshmpService @@ -230,7 +230,7 @@ export class AppService */ resetControlPanel(): void { this.formGroup.reset( - this.usageFormValues(this.state().usageResponse.response.parameters) + this.usageFormValues(this.state().usageResponse.response.parameters), ); } @@ -316,7 +316,7 @@ export class AppService */ private createFaultPlot( form: ControlPanelForm, - faultPlot: PlotlyPlot + faultPlot: PlotlyPlot, ): PlotlyPlot { const data = [this.createFaultPlotData(form)]; @@ -359,7 +359,7 @@ export class AppService * @param serviceResponses The service responses */ private handleServiceResponses( - serviceResponses: GmmDistanceResponse[] + serviceResponses: GmmDistanceResponse[], ): void { const means = serviceResponses.map(s => s.response.means); const hasLogicTree = gmmUtils.hasTree(means); @@ -435,7 +435,7 @@ export class AppService rMin: nshmpUtils.queryParseNumber(defaultValues.rMin, query?.rMin), showEpistemicUncertainty: nshmpUtils.queryParseBoolean( defaultValues.showEpistemicUncertainty, - query?.showEpistemicUncertainty + query?.showEpistemicUncertainty, ), vs30: nshmpUtils.queryParseNumber(defaultValues.vs30, query?.vs30), vs30Multi: nshmpUtils @@ -473,7 +473,7 @@ export class AppService */ private serviceResponseToPlots( state: AppState, - form: FormGroupControls<ControlPanelForm> + form: FormGroupControls<ControlPanelForm>, ): Map<string, NshmpPlot> { const plots = new Map<string, NshmpPlot>(); const groundMotionPlot = state.plots.get(Plots.GROUND_MOTION); @@ -567,7 +567,7 @@ export class AppService this.location.replaceState( devApps().gmm.hangingWallEffects.routerLink, - new HttpParams().appendAll({...query}).toString() + new HttpParams().appendAll({...query}).toString(), ); } } diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/control-panel/control-panel.component.ts index 76dfa25fe..164bb3dad 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/control-panel/control-panel.component.ts @@ -89,7 +89,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { /** List of site class `Parameter`s */ siteClasses = computed( - () => this.service.usage()?.response?.model.siteClasses + () => this.service.usage()?.response?.model.siteClasses, ); private imtSubscription = new Subscription(); @@ -102,7 +102,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { @@ -113,30 +113,30 @@ export class ControlPanelComponent implements OnInit, OnDestroy { this.modelCompareSubscription = this.formGroup.controls.modelCompare.valueChanges.subscribe( - modelCompare => this.onModelCompare(modelCompare) + modelCompare => this.onModelCompare(modelCompare), ); this.imtSubscription = this.formGroup.controls.imt.valueChanges.subscribe( - () => this.service.createPlots() + () => this.service.createPlots(), ); this.maxDirectionSubscription = this.formGroup.controls.maxDirection.valueChanges.subscribe(() => - this.service.createPlots() + this.service.createPlots(), ); this.returnPeriodSubscription = this.formGroup.controls.returnPeriod.valueChanges.subscribe(() => - this.service.createPlots() + this.service.createPlots(), ); this.truncateSubscription = this.formGroup.controls.truncate.valueChanges.subscribe(() => - this.service.createPlots() + this.service.createPlots(), ); this.vs30Subscription = this.formGroup.controls.vs30.valueChanges.subscribe( - () => this.service.resetState() + () => this.service.resetState(), ); } diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/hazard-data/hazard-data.component.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/hazard-data/hazard-data.component.ts index 6aa360a05..39d15eaf1 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/hazard-data/hazard-data.component.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/hazard-data/hazard-data.component.ts @@ -68,13 +68,13 @@ export class HazardDataComponent { data, }, }, - this.tableParams + this.tableParams, ); }); /** Hazard difference table data */ hazardDiffTableData = computed(() => - plotUtils.plotDataToTableData(this.hazardDiffPlot, this.tableParams) + plotUtils.plotDataToTableData(this.hazardDiffPlot, this.tableParams), ); /** Hazard components table data */ @@ -91,7 +91,7 @@ export class HazardDataComponent { data, }, }, - this.tableParams + this.tableParams, ); }); diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/parameter-summary/parameter-summary.component.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/parameter-summary/parameter-summary.component.ts index 89632d6dc..d9d5bb034 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/parameter-summary/parameter-summary.component.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/parameter-summary/parameter-summary.component.ts @@ -36,7 +36,7 @@ export class ParameterSummaryComponent { } return hazardUtils.siteClassesToParameters( - usage.response.model.siteClasses + usage.response.model.siteClasses, ); }); diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/plots/plots.component.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/plots/plots.component.ts index 7ae2bbf46..21c9fae9e 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/plots/plots.component.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/plots/plots.component.ts @@ -59,32 +59,32 @@ interface PlotInfo { export class PlotsComponent { /** Hazard plot data */ private hazardPlotData = computed( - () => this.service.plots().get(Plots.HAZARD).plotData + () => this.service.plots().get(Plots.HAZARD).plotData, ); /** Hazard components plot data */ private hazardComponentsPlotData = computed( - () => this.service.plots().get(Plots.HAZARD_COMPONENTS).plotData + () => this.service.plots().get(Plots.HAZARD_COMPONENTS).plotData, ); /** Hazard % diff plot data */ private hazardDiffPlotData = computed( - () => this.service.plots().get(Plots.HAZARD_DIFFERENCES).plotData + () => this.service.plots().get(Plots.HAZARD_DIFFERENCES).plotData, ); /** Spectra components plot data */ private spectraComponentsPlotData = computed( - () => this.service.plots().get(Plots.SPECTRUM_COMPONENTS).plotData + () => this.service.plots().get(Plots.SPECTRUM_COMPONENTS).plotData, ); /** Spectra % diff plot data */ private spectraDiffPlotData = computed( - () => this.service.plots().get(Plots.SPECTRUM_DIFFERENCES).plotData + () => this.service.plots().get(Plots.SPECTRUM_DIFFERENCES).plotData, ); /** Spectra plot data */ private spectraPlotData = computed( - () => this.service.plots().get(Plots.SPECTRUM).plotData + () => this.service.plots().get(Plots.SPECTRUM).plotData, ); /** Wheather both the control and settings panels are closed */ @@ -92,8 +92,8 @@ export class PlotsComponent { map( () => !this.controlsService.controlPanelIsSelected && - !this.controlsService.settingsIsSelected - ) + !this.controlsService.settingsIsSelected, + ), ); /** Wheather both the control and settings panels are opened */ @@ -101,8 +101,8 @@ export class PlotsComponent { map( () => this.controlsService.controlPanelIsSelected && - this.controlsService.settingsIsSelected - ) + this.controlsService.settingsIsSelected, + ), ); /** The plots */ @@ -132,6 +132,6 @@ export class PlotsComponent { constructor( private service: AppService, - private controlsService: AppControlsService + private controlsService: AppControlsService, ) {} } diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/spectra-data/spectra-data.component.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/spectra-data/spectra-data.component.ts index 9379a670f..9b0a6465d 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/spectra-data/spectra-data.component.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/components/spectra-data/spectra-data.component.ts @@ -89,7 +89,7 @@ export class SpectraDataComponent { availableModels: this.service.availableModels(), name: (modelInfo: Parameter, spectra: Spectra) => `${modelInfo.display} - ${sourceTypeToCapitalCase( - spectra.sourceType + spectra.sourceType, )}`, returnPeriod: this.service.formGroup.getRawValue().returnPeriod, serviceResponses: this.service.serviceResponses(), @@ -108,7 +108,7 @@ export class SpectraDataComponent { const spectraDiff = this.spectraPlotsService.spectraPercentDifference( serviceResponses, - this.service.formGroup.getRawValue().returnPeriod + this.service.formGroup.getRawValue().returnPeriod, ); return [ @@ -148,7 +148,7 @@ export class SpectraDataComponent { constructor( private service: AppService, private mathService: MathService, - private spectraPlotsService: SpectraPlotsService + private spectraPlotsService: SpectraPlotsService, ) {} /** @@ -158,10 +158,10 @@ export class SpectraDataComponent { */ spectraImtRow(serviceResponses: ServiceResponses): TableData { const spectraA = serviceResponses.modelA.spectra.find( - spectra => spectra.sourceType === SourceType.TOTAL + spectra => spectra.sourceType === SourceType.TOTAL, ); const spectraB = serviceResponses.modelB.spectra.find( - spectra => spectra.sourceType === SourceType.TOTAL + spectra => spectra.sourceType === SourceType.TOTAL, ); const imtsA = spectraA.responseSpectra.imts; @@ -179,19 +179,19 @@ export class SpectraDataComponent { * @param options The options */ serviceResponseToTableData( - options: ServiceResponseToTableDataOptions + options: ServiceResponseToTableDataOptions, ): TableData[] { return options.serviceResponse.spectra .filter(options.spectraFilter) .map(spectra => { const returnPeriodSpectra = spectra.responseSpectra.responseSpectrum.find( - spectrum => spectrum.returnPeriod === options.returnPeriod + spectrum => spectrum.returnPeriod === options.returnPeriod, ); const modelInfo = this.mathService.getModelInfo( options.serviceResponse.model, - options.availableModels + options.availableModels, ); return { diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/guards/dynamic-hazard-compare.guard.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/guards/dynamic-hazard-compare.guard.ts index 8014573d8..20def652d 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/guards/dynamic-hazard-compare.guard.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/guards/dynamic-hazard-compare.guard.ts @@ -26,7 +26,7 @@ export class DynamicHazardCompareGuard { private router: Router, private hazardService: HazardService, private spinnerService: SpinnerService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} /** @@ -54,7 +54,7 @@ export class DynamicHazardCompareGuard { } return hasComparableModels; - }) + }), ); } @@ -65,7 +65,7 @@ export class DynamicHazardCompareGuard { return this.hazardService .dynamicNshms$( `${this.nshmpHazWs.url}${this.nshmpHazWs.services.nshms}`, - this.serviceEndpoint + this.serviceEndpoint, ) .pipe( map(dynamicNshms => { @@ -74,8 +74,8 @@ export class DynamicHazardCompareGuard { dynamicNshms.nshmServices.find( service => service.project === nshmService.project && - service.model !== nshmService.model - ) + service.model !== nshmService.model, + ), ); return hasComparableModels; @@ -83,7 +83,7 @@ export class DynamicHazardCompareGuard { catchError(() => { this.spinnerService.remove(); return of(false); - }) + }), ); } } diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/app.service.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/app.service.ts index e4ff3a383..732995e81 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/app.service.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/app.service.ts @@ -75,7 +75,7 @@ export class AppService private serviceEndpoint = this.nshmpHazWs.services.curveServices.hazard; readonly formGroup = this.formBuilder.group<ControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); readonly state = signal<AppState>(this.initialState()); @@ -87,7 +87,7 @@ export class AppService private spectraPlotsService: SpectraPlotsService, private hazardService: HazardService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -113,8 +113,8 @@ export class AppService get nshmService(): Signal<NshmMetadata> { return computed(() => this.state().nshmServices.find( - nshmService => nshmService.model === this.formGroup.getRawValue().model - ) + nshmService => nshmService.model === this.formGroup.getRawValue().model, + ), ); } @@ -151,7 +151,7 @@ export class AppService */ get usageModelA(): Signal<HazardUsageResponse> { return computed(() => - this.state().usageResponses?.get(this.formGroup.getRawValue().model) + this.state().usageResponses?.get(this.formGroup.getRawValue().model), ); } @@ -161,8 +161,8 @@ export class AppService get usageModelB(): Signal<HazardUsageResponse> { return computed(() => this.state().usageResponses?.get( - this.formGroup.getRawValue().modelCompare - ) + this.formGroup.getRawValue().modelCompare, + ), ); } @@ -191,13 +191,13 @@ export class AppService const modelUrl = this.serviceCallUrl( form.model, form, - this.state().nshmServices + this.state().nshmServices, ); const modelCompareUrl = this.serviceCallUrl( form.modelCompare, form, - this.state().nshmServices + this.state().nshmServices, ); const serviceCallInfo: ServiceCallInfo = { @@ -248,7 +248,7 @@ export class AppService const gmms = usages.map(usage => usage.response.model.gmms); const imts = usages.map(usage => usage.response.model.imts); const siteClasses = this.findCommonSiteClasses( - usages.map(usage => usage.response.model.siteClasses) + usages.map(usage => usage.response.model.siteClasses), ); const usage = [...usages].shift(); @@ -268,7 +268,7 @@ export class AppService model: { bounds: usage.response.model.bounds, gmms: gmms.reduce((previous, current) => - previous.filter(gmm => current.includes(gmm)) + previous.filter(gmm => current.includes(gmm)), ), imts: this.findCommonImts(imts), name: 'Combined usage', @@ -322,7 +322,7 @@ export class AppService this.hazardService .dynamicNshms$<HazardRequestMetadata>( `${this.nshmpHazWs.url}${this.nshmpHazWs.services.nshms}`, - this.serviceEndpoint + this.serviceEndpoint, ) .pipe(catchError((error: Error) => this.nshmpService.throwError$(error))) .subscribe(({models, nshmServices, usageResponses}) => { @@ -330,7 +330,7 @@ export class AppService const serviceCallInfo: ServiceCallInfo = { ...this.state().serviceCallInfo, usage: nshmServices.map( - service => `${service.url}${this.serviceEndpoint}` + service => `${service.url}${this.serviceEndpoint}`, ), }; @@ -380,7 +380,7 @@ export class AppService const combinedUsage = this.getCombinedUsage( this.state().usageResponses, this.formGroup.getRawValue().model, - defaultComparableModel + defaultComparableModel, ); if ( @@ -442,17 +442,17 @@ export class AppService */ serviceCallUrls( formValues: ControlForm, - nshmServices: NshmMetadata[] + nshmServices: NshmMetadata[], ): string[] { const {imt, latitude, longitude, model, modelCompare, vs30} = formValues; const services = [model, modelCompare].map(model => - nshmServices.find(service => service.model === model) + nshmServices.find(service => service.model === model), ); const urls = services.map( nshmService => - `${nshmService.url}${this.serviceEndpoint}/${longitude}/${latitude}/${vs30}?imt=${imt}` + `${nshmService.url}${this.serviceEndpoint}/${longitude}/${latitude}/${vs30}?imt=${imt}`, ); return urls; @@ -491,8 +491,8 @@ export class AppService previous.filter(previousParameter => current .map(currentParameter => currentParameter.value) - .includes(previousParameter.value) - ) + .includes(previousParameter.value), + ), ); } @@ -503,7 +503,7 @@ export class AppService * @param siteClasses The site classes */ private findCommonSiteClasses( - siteClasses: Record<string, number>[] + siteClasses: Record<string, number>[], ): Record<string, number> { const allSiteClasses = siteClasses.reduce((previous, current) => ({ ...previous, @@ -532,7 +532,7 @@ export class AppService private getCombinedUsage( usageResponses: Map<string, HazardUsageResponse>, model: NshmId, - comparableModel: string | null + comparableModel: string | null, ): HazardUsageResponse { let combinedUsage = usageResponses.get(model); @@ -556,19 +556,19 @@ export class AppService const state = this.state(); const currentNshmService = state.nshmServices.find( - nshmService => nshmService.model === formValues.model + nshmService => nshmService.model === formValues.model, ); const comparableServices = state.nshmServices.filter( nshmService => nshmService.model !== currentNshmService.model && - nshmService.project === currentNshmService.project + nshmService.project === currentNshmService.project, ); return state.availableModels.filter(model => comparableServices.find( - service => service.model.toString() === model.value - ) + service => service.model.toString() === model.value, + ), ); } @@ -605,11 +605,11 @@ export class AppService */ private getSiteClass( query: string, - defaultSiteClass: NehrpSiteClass + defaultSiteClass: NehrpSiteClass, ): NehrpSiteClass { return ( Object.values(NehrpSiteClass).find( - siteClass => siteClass.toString() === query + siteClass => siteClass.toString() === query, ) ?? defaultSiteClass ); } @@ -630,14 +630,14 @@ export class AppService model: this.getModel(query.model, defaultValues.model), modelCompare: this.getModel( query.modelCompare, - defaultValues.modelCompare + defaultValues.modelCompare, ), returnPeriod: query.returnPeriod ? Number.parseInt(query.returnPeriod, 10) : defaultValues.returnPeriod, siteClass: this.getSiteClass( query.siteClass, - defaultValues.siteClass as NehrpSiteClass + defaultValues.siteClass as NehrpSiteClass, ), sourceType: null, truncate: @@ -675,7 +675,7 @@ export class AppService */ private responseSpectra( hazardResponses: HazardResponse[], - form: ControlForm + form: ControlForm, ): Spectra[] { const spectra: Spectra[] = []; const sourceTypes = [...hazardResponses] @@ -700,7 +700,7 @@ export class AppService */ private responseToPlots( state: AppState, - formGroup: FormGroupControls<ControlForm> + formGroup: FormGroupControls<ControlForm>, ): Map<string, NshmpPlot> { if ( state.serviceResponses.modelA === null || @@ -711,11 +711,11 @@ export class AppService const hazardPlots = this.hazardPlotsService.createHazardPlots( state, - formGroup + formGroup, ); const spectraPlots = this.spectraPlotsService.createSpectraPlots( state, - formGroup + formGroup, ); return new Map([...hazardPlots.entries(), ...spectraPlots.entries()]); } @@ -730,7 +730,7 @@ export class AppService private serviceCallUrl( model: NshmId, formValues: ControlForm, - nshmServices: NshmMetadata[] + nshmServices: NshmMetadata[], ): string { const {latitude, longitude, vs30} = formValues; const service = nshmServices.find(service => service.model === model); @@ -797,7 +797,7 @@ export class AppService settingsForm: plotUtils.plotSettingsToFormGroup({ config: hazardComponentsPlotData.config, layout: plotUtils.plotlyLayoutToSettings( - hazardComponentsPlotData.layout + hazardComponentsPlotData.layout, ), }), }); @@ -863,7 +863,7 @@ export class AppService settingsForm: plotUtils.plotSettingsToFormGroup({ config: spectraComponentsPlotData.config, layout: plotUtils.plotlyLayoutToSettings( - spectraComponentsPlotData.layout + spectraComponentsPlotData.layout, ), }), }); @@ -887,7 +887,7 @@ export class AppService this.location.replaceState( devApps().hazard.dynamicCompare.routerLink, - new HttpParams().appendAll({...query}).toString() + new HttpParams().appendAll({...query}).toString(), ); } } diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/hazard-plots.service.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/hazard-plots.service.ts index 67dba0653..eb813559a 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/hazard-plots.service.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/hazard-plots.service.ts @@ -90,7 +90,7 @@ export class HazardPlotsService { */ createHazardPlots( state: AppState, - formGroup: FormGroupControls<ControlForm> + formGroup: FormGroupControls<ControlForm>, ): Map<string, NshmpPlot> { const plots = new Map<string, NshmpPlot>(); @@ -102,7 +102,7 @@ export class HazardPlotsService { state.serviceResponses, state.availableModels, hazardPlot, - formGroup.getRawValue() + formGroup.getRawValue(), ); plots.set(Plots.HAZARD, { @@ -113,7 +113,7 @@ export class HazardPlotsService { const hazardCurveDifference = this.createHazardDiffPlot( state.serviceResponses, formGroup.getRawValue().imt, - hazardDiffPlot + hazardDiffPlot, ); plots.set(Plots.HAZARD_DIFFERENCES, { @@ -125,7 +125,7 @@ export class HazardPlotsService { state.serviceResponses, state.availableModels, hazardComponentsPlot, - formGroup.getRawValue() + formGroup.getRawValue(), ); plots.set(Plots.HAZARD_COMPONENTS, { @@ -146,7 +146,7 @@ export class HazardPlotsService { private createHazardDiffPlot( serviceResponses: ServiceResponses, imt: Imt, - plot: NshmpPlot + plot: NshmpPlot, ): PlotlyPlot { const data = this.createHazardDiffPlotData(serviceResponses, imt); const yValues = data.y as number[]; @@ -189,7 +189,7 @@ export class HazardPlotsService { */ private createHazardDiffPlotData( serviceResponses: ServiceResponses, - imt: Imt + imt: Imt, ): Partial<PlotData> { const {modelA, modelB} = serviceResponses; @@ -198,20 +198,20 @@ export class HazardPlotsService { const modelAData = hazardUtils.getSourceTypeData( modelAResponse.data, - sourceTypeToPascalCase(SourceType.TOTAL) + sourceTypeToPascalCase(SourceType.TOTAL), ); const modelBData = hazardUtils.getSourceTypeData( modelBResponse.data, - sourceTypeToPascalCase(SourceType.TOTAL) + sourceTypeToPascalCase(SourceType.TOTAL), ); const xValues = modelAData.values.xs.filter(x => - modelBData.values.xs.includes(x) + modelBData.values.xs.includes(x), ); const yValues = this.mathService.percentDifferences( this.filterYValues(xValues, modelAData.values), - this.filterYValues(xValues, modelBData.values) + this.filterYValues(xValues, modelBData.values), ); return { @@ -236,7 +236,7 @@ export class HazardPlotsService { serviceResponses: ServiceResponses, availableModels: Parameter[], plot: NshmpPlot, - form: ControlForm + form: ControlForm, ): PlotlyPlot { const imt = form.imt; @@ -274,7 +274,7 @@ export class HazardPlotsService { serviceResponses: ServiceResponses, availableModels: Parameter[], plot: NshmpPlot, - form: ControlForm + form: ControlForm, ): PlotlyPlot { const hazardCurveFilter = (data: HazardCurve) => data.component !== sourceTypeToPascalCase(SourceType.TOTAL); @@ -318,13 +318,13 @@ export class HazardPlotsService { const limitsA = this.hazardCurveLimits( options.serviceResponses.modelA, options.form.imt, - options.hazardCurveFilter + options.hazardCurveFilter, ); const limitsB = this.hazardCurveLimits( options.serviceResponses.modelB, options.form.imt, - options.hazardCurveFilter + options.hazardCurveFilter, ); const xMin = Math.min(limitsA.min, limitsB.min); @@ -332,7 +332,7 @@ export class HazardPlotsService { const returnPeriodData = this.createReturnPeriodPlotData( options.form.returnPeriod, - [xMin, xMax] + [xMin, xMax], ); const metadata = @@ -366,17 +366,17 @@ export class HazardPlotsService { * @param options The plot data options */ private createHazardPlotData( - options: CreateHazardPlotDataOptions + options: CreateHazardPlotDataOptions, ): Partial<PlotData>[] { const imt = options.form.imt; const hazardCurves = this.getHazardResponse( options.serviceResponse, - imt + imt, ).data.filter(data => options.hazardCurveFilter(data)); const modelInfo = this.mathService.getModelInfo( options.serviceResponse.model, - options.availableModels + options.availableModels, ); const colors = plotUtils.COLORWAY; @@ -388,7 +388,7 @@ export class HazardPlotsService { const xy = hazardUtils.updateXySequence( options.form, hazardUtils.cleanXySequence(data.values), - imt + imt, ); const plotlyData: Partial<PlotData> = { @@ -415,7 +415,7 @@ export class HazardPlotsService { */ private createReturnPeriodPlotData( returnPeriod: number, - xLimits: number[] + xLimits: number[], ): Partial<PlotData> { return { hoverinfo: 'none', @@ -452,11 +452,11 @@ export class HazardPlotsService { */ private getHazardResponse( serviceResponse: ServiceResponse, - imt: Imt + imt: Imt, ): HazardResponse { const hazardResponse = serviceResponse.hazardResponse.response.hazardCurves.find( - curves => curves.imt.value === imt.toString() + curves => curves.imt.value === imt.toString(), ); if (hazardResponse === undefined) { @@ -476,11 +476,11 @@ export class HazardPlotsService { private hazardCurveLimits( serviceResponse: ServiceResponse, imt: Imt, - hazardCurveFilter: (data: HazardCurve) => boolean + hazardCurveFilter: (data: HazardCurve) => boolean, ): NumberBounds { const hazardCurves = this.getHazardResponse( serviceResponse, - imt + imt, ).data.filter(data => hazardCurveFilter(data)); const data = hazardCurves.map(curve => curve.values); diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/math.service.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/math.service.ts index 1fa16280c..209d3a62f 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/math.service.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/math.service.ts @@ -14,7 +14,7 @@ export class MathService { */ getModelInfo(model: NshmId, availableModels: Parameter[]): Parameter { const modelInfo = availableModels.find( - service => service.value === model.toString() + service => service.value === model.toString(), ); return modelInfo; diff --git a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/spectra-plots.service.ts b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/spectra-plots.service.ts index fdb820d83..8d41f4e8b 100644 --- a/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/spectra-plots.service.ts +++ b/projects/nshmp-apps/src/app/dev/hazard/dynamic-compare/services/spectra-plots.service.ts @@ -119,7 +119,7 @@ export class SpectraPlotsService { */ createSpectraPlots( state: AppState, - formGroup: FormGroupControls<ControlForm> + formGroup: FormGroupControls<ControlForm>, ): Map<string, NshmpPlot> { const plots = new Map<string, NshmpPlot>(); @@ -131,7 +131,7 @@ export class SpectraPlotsService { state.serviceResponses, state.availableModels, formGroup.getRawValue(), - spectraPlot + spectraPlot, ); plots.set(Plots.SPECTRUM, { @@ -143,7 +143,7 @@ export class SpectraPlotsService { state.serviceResponses, state.availableModels, formGroup.getRawValue(), - spectraPlot + spectraPlot, ); plots.set(Plots.SPECTRUM_COMPONENTS, { @@ -155,7 +155,7 @@ export class SpectraPlotsService { state.serviceResponses, state.availableModels, formGroup.getRawValue(), - spectraDiffPlot + spectraDiffPlot, ); plots.set(Plots.SPECTRUM_DIFFERENCES, { @@ -168,26 +168,26 @@ export class SpectraPlotsService { spectraPercentDifference( serviceResponses: ServiceResponses, - returnPeriod: number + returnPeriod: number, ): SpectraDifference { const {modelA, modelB} = serviceResponses; const spectraA = modelA.spectra.find( - spectra => spectra.sourceType === SourceType.TOTAL + spectra => spectra.sourceType === SourceType.TOTAL, ); const spectraB = modelB.spectra.find( - spectra => spectra.sourceType === SourceType.TOTAL + spectra => spectra.sourceType === SourceType.TOTAL, ); const xValues = spectraA.responseSpectra.imts.filter(imt => - spectraB.responseSpectra.imts.includes(imt) + spectraB.responseSpectra.imts.includes(imt), ); const returnPeriodSpectraA = spectraA.responseSpectra.responseSpectrum.find( - spectra => spectra.returnPeriod === returnPeriod + spectra => spectra.returnPeriod === returnPeriod, ); const returnPeriodSpectraB = spectraB.responseSpectra.responseSpectrum.find( - spectra => spectra.returnPeriod === returnPeriod + spectra => spectra.returnPeriod === returnPeriod, ); const yValuesA = spectraA.responseSpectra.imts @@ -217,7 +217,7 @@ export class SpectraPlotsService { serviceResponses: ServiceResponses, availableModels: Parameter[], form: ControlForm, - plot: NshmpPlot + plot: NshmpPlot, ): PlotlyPlot { const spectraFilter = (spectra: Spectra) => spectra.sourceType === SourceType.TOTAL; @@ -251,7 +251,7 @@ export class SpectraPlotsService { serviceResponses: ServiceResponses, availableModels: Parameter[], form: ControlForm, - plot: NshmpPlot + plot: NshmpPlot, ): PlotlyPlot { const spectraFilter = (spectra: Spectra) => spectra.sourceType !== SourceType.TOTAL; @@ -289,12 +289,12 @@ export class SpectraPlotsService { serviceResponses: ServiceResponses, availableModels: Parameter[], form: ControlForm, - plot: NshmpPlot + plot: NshmpPlot, ): PlotlyPlot { const data = this.createSpectraDiffPlotData( serviceResponses, availableModels, - form + form, ); const yValues = data @@ -340,15 +340,15 @@ export class SpectraPlotsService { private createSpectraDiffPlotData( serviceResponses: ServiceResponses, availableModels: Parameter[], - form: ControlForm + form: ControlForm, ): Partial<PlotData>[] { const spectraA = serviceResponses.modelA.spectra.find( - spectra => spectra.sourceType === SourceType.TOTAL + spectra => spectra.sourceType === SourceType.TOTAL, ); const {imts, percentDifference} = this.spectraPercentDifference( serviceResponses, - form.returnPeriod + form.returnPeriod, ); const plotData = this.createSpectraPlotData({ @@ -379,7 +379,7 @@ export class SpectraPlotsService { plotData.forEach(data => (data.showlegend = false)); plotData.forEach( - data => (data.hovertemplate = '%{x} s, %{y} % difference') + data => (data.hovertemplate = '%{x} s, %{y} % difference'), ); return plotData; @@ -393,15 +393,15 @@ export class SpectraPlotsService { * @param options The plot data options */ private createSpectraPlotData( - options: CreateSpectraPlotDataOptions + options: CreateSpectraPlotDataOptions, ): Partial<PlotData>[] { const modelInfo = this.mathService.getModelInfo( options.serviceResponse.model, - options.availableModels + options.availableModels, ); const spectra = options.serviceResponse.spectra.filter(spectra => - options.spectraFilter(spectra) + options.spectraFilter(spectra), ); const lines: Partial<PlotData>[] = []; let count = 0; @@ -414,7 +414,7 @@ export class SpectraPlotsService { const returnPeriodSpectra = spectrum.responseSpectra.responseSpectrum.find( - s => s.returnPeriod === options.form.returnPeriod + s => s.returnPeriod === options.form.returnPeriod, ); const imts = spectrum.responseSpectra.imts; @@ -487,7 +487,7 @@ export class SpectraPlotsService { dash: options?.dash?.modelA, pgaMarker: options?.pgaMarker?.modelA, serviceResponse: modelA, - }) + }), ); lines.push( ...this.createSpectraPlotData({ @@ -496,24 +496,30 @@ export class SpectraPlotsService { dash: options?.dash?.modelB, pgaMarker: options?.pgaMarker?.modelB, serviceResponse: modelB, - }) + }), ); if (options?.pgaMarker?.modelA !== options?.pgaMarker?.modelB) { const modelAInfo = this.mathService.getModelInfo( options.serviceResponses.modelA.model, - options.availableModels + options.availableModels, ); const modelBInfo = this.mathService.getModelInfo( options.serviceResponses.modelB.model, - options.availableModels + options.availableModels, ); lines.push( - this.spectraPgaLegendEntry(modelAInfo.display, options.pgaMarker.modelA) + this.spectraPgaLegendEntry( + modelAInfo.display, + options.pgaMarker.modelA, + ), ); lines.push( - this.spectraPgaLegendEntry(modelBInfo.display, options.pgaMarker.modelB) + this.spectraPgaLegendEntry( + modelBInfo.display, + options.pgaMarker.modelB, + ), ); } else { lines.push(this.spectraPgaLegendEntry('PGA')); diff --git a/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/components/control-panel/control-panel.component.ts index 394735df8..66f1df21f 100644 --- a/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/components/control-panel/control-panel.component.ts @@ -43,7 +43,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { diff --git a/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/services/app.service.ts b/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/services/app.service.ts index 00d2d501f..47ba68a5d 100644 --- a/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/services/app.service.ts +++ b/projects/nshmp-apps/src/app/dev/math/exceedance-explorer/services/app.service.ts @@ -32,7 +32,7 @@ export class AppService { /** Control panels forms */ readonly formGroup = this.formBuilder.group<ControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); readonly state = signal<AppState>(this.initialState()); @@ -51,19 +51,19 @@ export class AppService addValidators(): void { this.boundsValidators( this.formGroup.controls.median, - this.formBounds().median + this.formBounds().median, ); this.boundsValidators(this.formGroup.controls.rate, this.formBounds().rate); this.boundsValidators( this.formGroup.controls.sigma, - this.formBounds().sigma + this.formBounds().sigma, ); this.boundsValidators( this.formGroup.controls.truncationLevel, - this.formBounds().truncationLevel + this.formBounds().truncationLevel, ); this.formGroup.controls.truncation.addValidators(control => - Validators.required(control) + Validators.required(control), ); this.formGroup.updateValueAndValidity(); } @@ -235,7 +235,7 @@ export class AppService */ private addPlotData( state: AppState, - formGroup: FormGroupControls<ControlForm> + formGroup: FormGroupControls<ControlForm>, ): Map<string, NshmpPlot> { const exceedanceData = this.calculateExceedance(formGroup.getRawValue()); const plots = new Map<string, NshmpPlot>(); @@ -280,7 +280,7 @@ export class AppService const yValues: number[] = values.truncation ? ExceedanceModel.truncationUpperOnlySequence( model, - this.exceedanceXValues() + this.exceedanceXValues(), ) : ExceedanceModel.truncationOffSequence(model, this.exceedanceXValues()); diff --git a/projects/nshmp-apps/src/app/dev/math/math.routes.ts b/projects/nshmp-apps/src/app/dev/math/math.routes.ts index d586487f0..9981b7160 100644 --- a/projects/nshmp-apps/src/app/dev/math/math.routes.ts +++ b/projects/nshmp-apps/src/app/dev/math/math.routes.ts @@ -13,7 +13,7 @@ const routes: Routes = [ }, loadComponent: () => import('./exceedance-explorer/app.component').then( - com => com.AppComponent + com => com.AppComponent, ), path: 'exceedance-explorer', }, diff --git a/projects/nshmp-apps/src/app/gmm/distance/components/content/content.component.ts b/projects/nshmp-apps/src/app/gmm/distance/components/content/content.component.ts index 93a093f44..9d6c56fa3 100644 --- a/projects/nshmp-apps/src/app/gmm/distance/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/gmm/distance/components/content/content.component.ts @@ -37,8 +37,8 @@ export class ContentComponent { gmmUtils.plotToTable( this.service.meanPlotState().plotData, this.exp, - this.commonXValues - ) + this.commonXValues, + ), ); constructor(public service: AppService) {} diff --git a/projects/nshmp-apps/src/app/gmm/distance/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/gmm/distance/components/control-panel/control-panel.component.ts index 005dc98fa..b6172a706 100644 --- a/projects/nshmp-apps/src/app/gmm/distance/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/gmm/distance/components/control-panel/control-panel.component.ts @@ -76,42 +76,42 @@ export class ControlPanelComponent implements OnInit, OnDestroy { MwMultiple$ = this.controls.multiSelectableParam.valueChanges.pipe( map( multiSelectableParam => - multiSelectableParam.toString() === GmmFormControlIds.MW.toString() - ) + multiSelectableParam.toString() === GmmFormControlIds.MW.toString(), + ), ); /** Whether Vs30 is multi-selectable */ vs30Multiple$ = this.controls.multiSelectableParam.valueChanges.pipe( map( multiSelectableParam => - multiSelectableParam.toString() === GmmFormControlIds.VS30.toString() - ) + multiSelectableParam.toString() === GmmFormControlIds.VS30.toString(), + ), ); private subs: Subscription[] = []; constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { this.subs.push( this.controls.gmmSource.valueChanges.subscribe(() => { this.onGmmSource(); - }) + }), ); this.subs.push( this.controls.multiSelectableParam.valueChanges.subscribe(() => - this.onMultiSelectableParam() - ) + this.onMultiSelectableParam(), + ), ); this.subs.push( this.controls.showEpistemicUncertainty.valueChanges.subscribe(() => - this.onShowEpistemicUncertainty() - ) + this.onShowEpistemicUncertainty(), + ), ); this.subs.push( @@ -126,7 +126,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { this.controls.z2p5.valueChanges, this.controls.zSed.valueChanges, this.controls.width.valueChanges, - ]).subscribe(() => this.service.resetState()) + ]).subscribe(() => this.service.resetState()), ); } @@ -158,7 +158,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const supportedImts = gmmUtils.getSupportedImts( formValues.gmmSource, - this.service.state().usageResponse + this.service.state().usageResponse, ); this.service.updateState({ diff --git a/projects/nshmp-apps/src/app/gmm/distance/services/app.service.ts b/projects/nshmp-apps/src/app/gmm/distance/services/app.service.ts index 1d6c721e8..f71c37dd0 100644 --- a/projects/nshmp-apps/src/app/gmm/distance/services/app.service.ts +++ b/projects/nshmp-apps/src/app/gmm/distance/services/app.service.ts @@ -70,7 +70,7 @@ export class AppService private nshmpService: NshmpService, private spinnerService: SpinnerService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -162,7 +162,7 @@ export class AppService const urls = gmmUtils.serviceEndpoints( this.serviceUrl, this.formGroup.getRawValue(), - this.formGroup.getRawValue().multiSelectableParam + this.formGroup.getRawValue().multiSelectableParam, ); this.nshmpService @@ -244,7 +244,7 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.nshmpService @@ -279,7 +279,7 @@ export class AppService */ resetControlPanel(): void { this.formGroup.reset( - this.usageFormValues(this.state().usageResponse.response.parameters) + this.usageFormValues(this.state().usageResponse.response.parameters), ); } @@ -344,7 +344,7 @@ export class AppService } private handleServiceResponses( - serviceResponses: GmmDistanceResponse[] + serviceResponses: GmmDistanceResponse[], ): void { const means = serviceResponses.map(s => s.response.means); const sigmas = serviceResponses.map(s => s.response.sigmas); @@ -414,7 +414,7 @@ export class AppService rMin: nshmpUtils.queryParseNumber(defaultValues.rMin, query?.rMin), showEpistemicUncertainty: nshmpUtils.queryParseBoolean( defaultValues.showEpistemicUncertainty, - query?.showEpistemicUncertainty + query?.showEpistemicUncertainty, ), vs30: nshmpUtils.queryParseNumber(defaultValues.vs30, query?.vs30), vs30Multi: nshmpUtils @@ -452,7 +452,7 @@ export class AppService */ private serviceResponseToPlotData( state: AppState, - form: FormGroupControls<FormControls> + form: FormGroupControls<FormControls>, ): Map<string, NshmpPlot> { if ( state.serviceResponses === null || @@ -466,7 +466,7 @@ export class AppService const meanPlot = state.plots.get(gmmUtils.PlotType.MEANS); const hoverTemplate = '%{x} km, %{y} AFE'; const title = `Ground Motion vs. Distance: ${imtToString( - formValues.imt as Imt + formValues.imt as Imt, )}`; meanPlot.settingsForm.patchValue({ @@ -531,7 +531,7 @@ export class AppService this.location.replaceState( apps().gmm.distance.routerLink, - new HttpParams().appendAll({...query}).toString() + new HttpParams().appendAll({...query}).toString(), ); } } diff --git a/projects/nshmp-apps/src/app/gmm/magnitude/components/content/content.component.ts b/projects/nshmp-apps/src/app/gmm/magnitude/components/content/content.component.ts index 71cbc4536..ef9dde0cb 100644 --- a/projects/nshmp-apps/src/app/gmm/magnitude/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/gmm/magnitude/components/content/content.component.ts @@ -44,7 +44,7 @@ export class ContentComponent { return gmmUtils.plotToTable( plot.plotData, this.medianExp, - this.commonXValues + this.commonXValues, ); }); @@ -55,7 +55,7 @@ export class ContentComponent { return gmmUtils.plotToTable( plot.plotData, this.medianExp, - this.commonXValues + this.commonXValues, ); }); diff --git a/projects/nshmp-apps/src/app/gmm/magnitude/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/gmm/magnitude/components/control-panel/control-panel.component.ts index da8349b92..28a3e1f12 100644 --- a/projects/nshmp-apps/src/app/gmm/magnitude/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/gmm/magnitude/components/control-panel/control-panel.component.ts @@ -70,30 +70,30 @@ export class ControlPanelComponent implements OnInit, OnDestroy { constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { this.subs.push( this.controls.gmmSource.valueChanges.subscribe(() => { this.onGmmSource(); - }) + }), ); this.subs.push( this.controls.multiSelectableParam.valueChanges.subscribe(() => - this.onMultiSelectableParam() - ) + this.onMultiSelectableParam(), + ), ); this.subs.push( this.controls.showEpistemicUncertainty.valueChanges.subscribe(() => - this.onShowEpistemicUncertainty() - ) + this.onShowEpistemicUncertainty(), + ), ); this.subs.push( - this.controls.imt.valueChanges.subscribe(() => this.service.resetState()) + this.controls.imt.valueChanges.subscribe(() => this.service.resetState()), ); } @@ -125,7 +125,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const supportedImts = gmmUtils.getSupportedImts( formValues.gmmSource, - this.service.state().usageResponse + this.service.state().usageResponse, ); this.service.updateState({ diff --git a/projects/nshmp-apps/src/app/gmm/magnitude/components/path-parameters/path-parameters.component.ts b/projects/nshmp-apps/src/app/gmm/magnitude/components/path-parameters/path-parameters.component.ts index 9ffd422a8..3d470d84c 100644 --- a/projects/nshmp-apps/src/app/gmm/magnitude/components/path-parameters/path-parameters.component.ts +++ b/projects/nshmp-apps/src/app/gmm/magnitude/components/path-parameters/path-parameters.component.ts @@ -31,7 +31,7 @@ export class PathParametersComponent implements OnInit, OnDestroy { ngOnInit(): void { this.distanceSubscription = this.controls.distance.valueChanges.subscribe( - () => this.service.resetState() + () => this.service.resetState(), ); } diff --git a/projects/nshmp-apps/src/app/gmm/magnitude/components/site-parameters/site-parameters.component.ts b/projects/nshmp-apps/src/app/gmm/magnitude/components/site-parameters/site-parameters.component.ts index e710c00ab..ff8185571 100644 --- a/projects/nshmp-apps/src/app/gmm/magnitude/components/site-parameters/site-parameters.component.ts +++ b/projects/nshmp-apps/src/app/gmm/magnitude/components/site-parameters/site-parameters.component.ts @@ -47,8 +47,8 @@ export class SiteParametersComponent implements OnInit, OnDestroy { vs30Multiple$ = this.controls.multiSelectableParam.valueChanges.pipe( map( multiSelectableParam => - multiSelectableParam.toString() === GmmFormControlIds.VS30.toString() - ) + multiSelectableParam.toString() === GmmFormControlIds.VS30.toString(), + ), ); private valueSubscription = new Subscription(); diff --git a/projects/nshmp-apps/src/app/gmm/magnitude/services/app.service.ts b/projects/nshmp-apps/src/app/gmm/magnitude/services/app.service.ts index f1b2fcc87..9fe90f58a 100644 --- a/projects/nshmp-apps/src/app/gmm/magnitude/services/app.service.ts +++ b/projects/nshmp-apps/src/app/gmm/magnitude/services/app.service.ts @@ -78,7 +78,7 @@ export class AppService private nshmpService: NshmpService, private spinnerService: SpinnerService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -172,7 +172,7 @@ export class AppService const urls = gmmUtils.serviceEndpoints( this.serviceUrl, this.formGroup.getRawValue(), - this.formGroup.getRawValue().multiSelectableParam + this.formGroup.getRawValue().multiSelectableParam, ); this.nshmpService @@ -297,7 +297,7 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.nshmpService @@ -332,7 +332,7 @@ export class AppService */ resetControlPanel(): void { this.formGroup.reset( - this.usageFormValues(this.state().usageResponse.response.parameters) + this.usageFormValues(this.state().usageResponse.response.parameters), ); } @@ -379,7 +379,7 @@ export class AppService } private handleServiceResponses( - serviceResponses: GmmMagnitudeResponse[] + serviceResponses: GmmMagnitudeResponse[], ): void { const means = serviceResponses.map(s => s.response.means); const sigmas = serviceResponses.map(s => s.response.sigmas); @@ -440,7 +440,7 @@ export class AppService dip: nshmpUtils.queryParseNumber(defaultValues.dip, query?.dip), distance: nshmpUtils.queryParseNumber( defaultValues.distance, - query?.distance + query?.distance, ), gmmGroupType: query?.gmmGroupType ?? defaultValues.gmmGroupType, gmmSource, @@ -453,7 +453,7 @@ export class AppService .map(mw => Number.parseFloat(mw)), showEpistemicUncertainty: nshmpUtils.queryParseBoolean( defaultValues.showEpistemicUncertainty, - query?.showEpistemicUncertainty + query?.showEpistemicUncertainty, ), step: nshmpUtils.queryParseNumber(defaultValues.step, query?.step), vs30: nshmpUtils.queryParseNumber(defaultValues.vs30, query?.vs30), @@ -491,7 +491,7 @@ export class AppService */ private serviceResponseToPlotData( state: AppState, - form: FormGroupControls<GmmMagnitudeFormControls> + form: FormGroupControls<GmmMagnitudeFormControls>, ): Map<string, NshmpPlot> { if ( state.serviceResponses === null || @@ -565,7 +565,7 @@ export class AppService this.location.replaceState( apps().gmm.magnitude.routerLink, - new HttpParams().appendAll({...query}).toString() + new HttpParams().appendAll({...query}).toString(), ); } @@ -575,7 +575,7 @@ export class AppService * @param parameters The service parameters */ private usageFormValues( - parameters: GmmMagnitudeUsageParameters + parameters: GmmMagnitudeUsageParameters, ): GmmMagnitudeFormControls { return { ...this.defaultFormValues(), diff --git a/projects/nshmp-apps/src/app/gmm/spectra/components/content/content.component.ts b/projects/nshmp-apps/src/app/gmm/spectra/components/content/content.component.ts index c52afa11e..5e2df3a62 100644 --- a/projects/nshmp-apps/src/app/gmm/spectra/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/gmm/spectra/components/content/content.component.ts @@ -48,7 +48,7 @@ export class ContentComponent { this.sigmaExp, this.commonXValues, this.padValues, - plot.xValues + plot.xValues, ); }); @@ -61,7 +61,7 @@ export class ContentComponent { this.spectraExp, this.commonXValues, this.padValues, - plot.xValues + plot.xValues, ); }); diff --git a/projects/nshmp-apps/src/app/gmm/spectra/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/gmm/spectra/components/control-panel/control-panel.component.ts index 9565fa29a..0ba7be33d 100644 --- a/projects/nshmp-apps/src/app/gmm/spectra/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/gmm/spectra/components/control-panel/control-panel.component.ts @@ -69,26 +69,26 @@ export class ControlPanelComponent implements OnInit, OnDestroy { constructor( public service: AppService, - public nshmpService: NshmpService + public nshmpService: NshmpService, ) {} ngOnInit(): void { this.subs.push( this.controls.gmmSource.valueChanges.subscribe(() => { this.onGmmSource(); - }) + }), ); this.subs.push( this.controls.multiSelectableParam.valueChanges.subscribe(() => - this.onMultiSelectableParam() - ) + this.onMultiSelectableParam(), + ), ); this.subs.push( this.controls.showEpistemicUncertainty.valueChanges.subscribe(() => - this.onShowEpistemicUncertainty() - ) + this.onShowEpistemicUncertainty(), + ), ); } diff --git a/projects/nshmp-apps/src/app/gmm/spectra/components/event-parameters/event-parameters.component.ts b/projects/nshmp-apps/src/app/gmm/spectra/components/event-parameters/event-parameters.component.ts index 39a6d995f..772d599a8 100644 --- a/projects/nshmp-apps/src/app/gmm/spectra/components/event-parameters/event-parameters.component.ts +++ b/projects/nshmp-apps/src/app/gmm/spectra/components/event-parameters/event-parameters.component.ts @@ -57,8 +57,8 @@ export class EventParametersComponent implements OnInit, OnDestroy { this.service.formGroup.controls.multiSelectableParam.valueChanges.pipe( map( multiSelectableParam => - multiSelectableParam.toString() === GmmFormControlIds.MW.toString() - ) + multiSelectableParam.toString() === GmmFormControlIds.MW.toString(), + ), ); /** Usage parameters */ @@ -77,13 +77,13 @@ export class EventParametersComponent implements OnInit, OnDestroy { this.controls.rake.valueChanges, this.controls.rakeButton.valueChanges, this.controls.zHyp.valueChanges, - ]).subscribe(() => this.service.resetState()) + ]).subscribe(() => this.service.resetState()), ); this.subs.push( this.controls.zHypCentered.valueChanges.subscribe(() => - this.onZHypCentered() - ) + this.onZHypCentered(), + ), ); } diff --git a/projects/nshmp-apps/src/app/gmm/spectra/components/path-parameters/path-parameters.component.ts b/projects/nshmp-apps/src/app/gmm/spectra/components/path-parameters/path-parameters.component.ts index a6d81730a..022a17559 100644 --- a/projects/nshmp-apps/src/app/gmm/spectra/components/path-parameters/path-parameters.component.ts +++ b/projects/nshmp-apps/src/app/gmm/spectra/components/path-parameters/path-parameters.component.ts @@ -47,14 +47,14 @@ export class PathParametersComponent implements OnInit, OnDestroy { this.subs.push( this.controls.derivePathParams.valueChanges.subscribe(() => - this.onDerivePathParams() - ) + this.onDerivePathParams(), + ), ); this.subs.push( this.controls.hangingWall.valueChanges.subscribe(() => - this.onHangingWall() - ) + this.onHangingWall(), + ), ); } diff --git a/projects/nshmp-apps/src/app/gmm/spectra/components/plots/plots.component.ts b/projects/nshmp-apps/src/app/gmm/spectra/components/plots/plots.component.ts index 088f0b562..31567a6fb 100644 --- a/projects/nshmp-apps/src/app/gmm/spectra/components/plots/plots.component.ts +++ b/projects/nshmp-apps/src/app/gmm/spectra/components/plots/plots.component.ts @@ -42,7 +42,7 @@ import {ParameterSummaryComponent} from '../parameter-summary/parameter-summary. export class PlotsComponent { /** Sigma plot data */ sigmaPlotData = computed(() => - this.filterData(this.service.sigmaPlotState().plotData) + this.filterData(this.service.sigmaPlotState().plotData), ); /** Response spectra plot data */ diff --git a/projects/nshmp-apps/src/app/gmm/spectra/components/site-parameters/site-parameters.component.ts b/projects/nshmp-apps/src/app/gmm/spectra/components/site-parameters/site-parameters.component.ts index 46eb3eacd..967fba24d 100644 --- a/projects/nshmp-apps/src/app/gmm/spectra/components/site-parameters/site-parameters.component.ts +++ b/projects/nshmp-apps/src/app/gmm/spectra/components/site-parameters/site-parameters.component.ts @@ -47,8 +47,8 @@ export class SiteParametersComponent implements OnInit, OnDestroy { vs30Multiple$ = this.controls.multiSelectableParam.valueChanges.pipe( map( multiSelectableParam => - multiSelectableParam.toString() === GmmFormControlIds.VS30.toString() - ) + multiSelectableParam.toString() === GmmFormControlIds.VS30.toString(), + ), ); private valueSubscription = new Subscription(); diff --git a/projects/nshmp-apps/src/app/gmm/spectra/services/app.service.ts b/projects/nshmp-apps/src/app/gmm/spectra/services/app.service.ts index 8ccd925cc..b8b70b2a3 100644 --- a/projects/nshmp-apps/src/app/gmm/spectra/services/app.service.ts +++ b/projects/nshmp-apps/src/app/gmm/spectra/services/app.service.ts @@ -97,7 +97,7 @@ export class AppService private nshmpService: NshmpService, private spinnerService: SpinnerService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -283,7 +283,7 @@ export class AppService const urls = gmmUtils.serviceEndpoints( this.serviceUrl, this.formGroup.getRawValue(), - this.formGroup.getRawValue().multiSelectableParam + this.formGroup.getRawValue().multiSelectableParam, ); this.nshmpService @@ -428,7 +428,7 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.nshmpService @@ -463,7 +463,7 @@ export class AppService */ resetControlPanel(): void { this.formGroup.reset( - this.usageFormValues(this.state().usageResponse.response.parameters) + this.usageFormValues(this.state().usageResponse.response.parameters), ); } @@ -570,14 +570,14 @@ export class AppService this.formGroup.patchValue({ derivePathParams: nshmpUtils.queryParseBoolean( defaultValues.derivePathParams, - query.derivePathParams + query.derivePathParams, ), dip: nshmpUtils.queryParseNumber(defaultValues.dip, query?.dip), gmmGroupType: query?.gmmGroupType ?? defaultValues.gmmGroupType, gmmSource, hangingWall: nshmpUtils.queryParseBoolean( defaultValues.hangingWall, - query?.hangingWall + query?.hangingWall, ), Mw: nshmpUtils.queryParseNumber(defaultValues.Mw, query?.Mw), MwMulti: nshmpUtils @@ -596,7 +596,7 @@ export class AppService rX: nshmpUtils.queryParseNumber(defaultValues.rX, query?.rX), showEpistemicUncertainty: nshmpUtils.queryParseBoolean( defaultValues.showEpistemicUncertainty, - query?.showEpistemicUncertainty + query?.showEpistemicUncertainty, ), vs30: nshmpUtils.queryParseNumber(defaultValues.vs30, query?.vs30), vs30Multi: nshmpUtils @@ -608,7 +608,7 @@ export class AppService zHyp: nshmpUtils.queryParseNumber(defaultValues.zHyp, query?.zHyp), zHypCentered: nshmpUtils.queryParseBoolean( defaultValues.zHypCentered, - query?.zHypCentered + query?.zHypCentered, ), zSed: nshmpUtils.queryParseNumber(defaultValues.zSed, query?.zSed), zTor: nshmpUtils.queryParseNumber(defaultValues.zTor, query?.zTor), @@ -641,14 +641,14 @@ export class AppService private plotInfo( gmmSeries: GmmSeries<SpectraData, TreeValues>[], xUnit: string, - yUnit: string + yUnit: string, ) { let hoverTemplate: string[] = []; let symbol: string[] = []; if (gmmSeries.length > 0) { hoverTemplate = gmmSeries[0].data.sa.xs.map( - () => `%{x} ${xUnit}, %{y} ${yUnit}` + () => `%{x} ${xUnit}, %{y} ${yUnit}`, ); symbol = gmmSeries[0].data.sa.xs.map(() => 'circle'); } @@ -666,7 +666,7 @@ export class AppService */ private serviceResponseToPlotData( state: AppState, - form: FormGroupControls<FormControls> + form: FormGroupControls<FormControls>, ): Map<string, SpectraPlot> { if ( state.serviceResponses === null || @@ -682,7 +682,7 @@ export class AppService const xValues = state.serviceResponses .map(serviceResponse => - serviceResponse.response.means.data.map(data => data.data.sa.xs) + serviceResponse.response.means.data.map(data => data.data.sa.xs), ) .reduce((prev, curr) => [...prev, ...curr]) .reduce((prev, curr) => { @@ -720,7 +720,7 @@ export class AppService * @param responses The spectra responses */ private toGmmResponses( - responses: GmmSpectraResponse[] + responses: GmmSpectraResponse[], ): gmmUtils.GmmResponse<SpectraData, TreeValues>[] { const gmmResponses = responses.map(serviceResponse => { const means = serviceResponse.response.means; @@ -775,7 +775,7 @@ export class AppService private updateControl( control: FormControl<number>, value: number, - disabled = false + disabled = false, ): void { const precision = 3; value = value ? Maths.round(value, precision) : value; @@ -801,7 +801,7 @@ export class AppService rJB: number; rRup: number; rX: number; - } + }, ): void { const values = form.getRawValue(); @@ -841,7 +841,7 @@ export class AppService this.location.replaceState( apps().gmm.spectra.routerLink, - new HttpParams().appendAll({...query}).toString() + new HttpParams().appendAll({...query}).toString(), ); } diff --git a/projects/nshmp-apps/src/app/hazard/disagg/components/content/content.component.ts b/projects/nshmp-apps/src/app/hazard/disagg/components/content/content.component.ts index ef23f377d..495676335 100644 --- a/projects/nshmp-apps/src/app/hazard/disagg/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/hazard/disagg/components/content/content.component.ts @@ -55,9 +55,9 @@ export class ContentComponent { const layers = serviceResponse.response.disaggs.find(disaggs => disaggs.data.find(data => data.sources.find( - source => source.latitude !== null && source.longitude !== null - ) - ) + source => source.latitude !== null && source.longitude !== null, + ), + ), ); return layers !== undefined; diff --git a/projects/nshmp-apps/src/app/hazard/disagg/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/hazard/disagg/components/control-panel/control-panel.component.ts index b690cf27b..5684b8998 100644 --- a/projects/nshmp-apps/src/app/hazard/disagg/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/hazard/disagg/components/control-panel/control-panel.component.ts @@ -95,7 +95,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { /** The site classes */ siteClasses = computed( - () => this.service.usage()?.response.model.siteClasses + () => this.service.usage()?.response.model.siteClasses, ); /** Source model info from usage */ @@ -105,7 +105,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { @@ -115,11 +115,11 @@ export class ControlPanelComponent implements OnInit, OnDestroy { controls.disaggTarget.valueChanges.subscribe(() => { this.service.onDisaggTarget(); this.service.resetState(); - }) + }), ); this.subs.push( - controls.model.valueChanges.subscribe(() => this.onModelChange()) + controls.model.valueChanges.subscribe(() => this.onModelChange()), ); this.subs.push( @@ -132,7 +132,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { controls.vs30.valueChanges, ]).subscribe(() => { this.service.resetState(); - }) + }), ); } diff --git a/projects/nshmp-apps/src/app/hazard/disagg/components/disagg-data/disagg-data.component.ts b/projects/nshmp-apps/src/app/hazard/disagg/components/disagg-data/disagg-data.component.ts index b68c0056b..1dc943d7c 100644 --- a/projects/nshmp-apps/src/app/hazard/disagg/components/disagg-data/disagg-data.component.ts +++ b/projects/nshmp-apps/src/app/hazard/disagg/components/disagg-data/disagg-data.component.ts @@ -31,7 +31,7 @@ export class DisaggDataComponent { const bins = this.service.serviceResponse().response.metadata.εbins; const binData = bins.map( - bin => data.εdata.find(data => data.εbin === bin.id)?.value ?? 0 + bin => data.εdata.find(data => data.εbin === bin.id)?.value ?? 0, ); const total = binData.reduce((a, b) => a + b, 0); @@ -41,7 +41,7 @@ export class DisaggDataComponent { epsilonKeys(): string[] { const keys = this.componentData.summary.find( - data => data.name.toLowerCase() === 'epsilon keys' + data => data.name.toLowerCase() === 'epsilon keys', ); return ['ALL_ε', ...keys.data.map(data => `${data.name}=${data.value}`)]; diff --git a/projects/nshmp-apps/src/app/hazard/disagg/components/geo-disagg/geo-disagg.component.ts b/projects/nshmp-apps/src/app/hazard/disagg/components/geo-disagg/geo-disagg.component.ts index 3ee2073aa..0670d34c4 100644 --- a/projects/nshmp-apps/src/app/hazard/disagg/components/geo-disagg/geo-disagg.component.ts +++ b/projects/nshmp-apps/src/app/hazard/disagg/components/geo-disagg/geo-disagg.component.ts @@ -116,7 +116,7 @@ export class GeoDisaggComponent { .map(data => { return data.sources .filter( - source => source.latitude !== null && source.longitude !== null + source => source.latitude !== null && source.longitude !== null, ) .map(source => { const latLng = L.latLng(source.latitude, source.longitude); @@ -125,16 +125,16 @@ export class GeoDisaggComponent { const height = source.contribution * heightFactor; const southWest = L.point( currentPoint.x - width / 2, - currentPoint.y + currentPoint.y, ); const northEast = L.point( currentPoint.x + width / 2, - currentPoint.y - height + currentPoint.y - height, ); const bounds = L.latLngBounds( this.map.containerPointToLatLng(southWest), - this.map.containerPointToLatLng(northEast) + this.map.containerPointToLatLng(northEast), ); const rect = L.rectangle(bounds, { color: 'black', @@ -151,7 +151,7 @@ export class GeoDisaggComponent { <td>${value}</td> </tr> `; - } + }, ); const popupContent = `<table> @@ -197,7 +197,7 @@ export class GeoDisaggComponent { fillOpacity: this.defaultOpacity, opacity: this.defaultOpacity, weight: 1, - }) + }), ); }); }); @@ -242,7 +242,7 @@ export class GeoDisaggComponent { const site = L.latLng( serviceResponse.request.latitude, - serviceResponse.request.longitude + serviceResponse.request.longitude, ); const siteMarker = L.marker(site, { @@ -267,7 +267,7 @@ export class GeoDisaggComponent { private onEachFeatureFaults( layer: L.GeoJSON, - feature: GeoJSON.Feature + feature: GeoJSON.Feature, ): void { const properties = Object.entries(feature.properties) .filter(([key]) => key !== 'mfd-tree' && key !== 'rate-map') diff --git a/projects/nshmp-apps/src/app/hazard/disagg/components/parameter-summary/parameter-summary.component.ts b/projects/nshmp-apps/src/app/hazard/disagg/components/parameter-summary/parameter-summary.component.ts index 23d4dc934..6a6163ba0 100644 --- a/projects/nshmp-apps/src/app/hazard/disagg/components/parameter-summary/parameter-summary.component.ts +++ b/projects/nshmp-apps/src/app/hazard/disagg/components/parameter-summary/parameter-summary.component.ts @@ -48,7 +48,7 @@ export class ParameterSummaryComponent { if (usage) { return hazardUtils.siteClassesToParameters( - usage.response.model.siteClasses + usage.response.model.siteClasses, ); } }); diff --git a/projects/nshmp-apps/src/app/hazard/disagg/components/plots/plots.component.ts b/projects/nshmp-apps/src/app/hazard/disagg/components/plots/plots.component.ts index 5feede665..51f29afb0 100644 --- a/projects/nshmp-apps/src/app/hazard/disagg/components/plots/plots.component.ts +++ b/projects/nshmp-apps/src/app/hazard/disagg/components/plots/plots.component.ts @@ -43,7 +43,7 @@ export class PlotsComponent { constructor( public service: AppService, - public templateService: NshmpTemplateService + public templateService: NshmpTemplateService, ) {} /** Print report */ diff --git a/projects/nshmp-apps/src/app/hazard/disagg/services/app.service.ts b/projects/nshmp-apps/src/app/hazard/disagg/services/app.service.ts index 551e055c9..2d00f65c7 100644 --- a/projects/nshmp-apps/src/app/hazard/disagg/services/app.service.ts +++ b/projects/nshmp-apps/src/app/hazard/disagg/services/app.service.ts @@ -74,7 +74,7 @@ export class AppService private featuresEndpoint = this.nshmpHazWs.services.curveServices.features; readonly formGroup = this.formBuilder.group<DisaggControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); readonly state = signal<AppState>(this.initialState()); @@ -86,14 +86,14 @@ export class AppService private route: ActivatedRoute, private http: HttpClient, private location: LocationService, - @Inject(LOCALE_ID) private localId: string + @Inject(LOCALE_ID) private localId: string, ) { super(); this.addValidators(); this.formGroup.controls.disaggComponent.disable(); this.formGroup.controls.disaggComponent.valueChanges.subscribe(() => - this.updateComponentData() + this.updateComponentData(), ); } @@ -128,8 +128,8 @@ export class AppService get nshmService(): Signal<NshmMetadata> { return computed(() => this.state().nshmServices.find( - nshmService => nshmService.model === this.formGroup.getRawValue().model - ) + nshmService => nshmService.model === this.formGroup.getRawValue().model, + ), ); } @@ -159,7 +159,7 @@ export class AppService */ get usage(): Signal<DisaggUsage> { return computed(() => - this.state().usageResponses?.get(this.formGroup.getRawValue().model) + this.state().usageResponses?.get(this.formGroup.getRawValue().model), ); } @@ -220,7 +220,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(([serviceResponse]) => { spinnerRef.close(); @@ -261,7 +261,7 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); const service = environment.webServices.nshmpHazWs; const endpoint = service.services.curveServices.disagg; @@ -269,13 +269,13 @@ export class AppService this.hazardService .dynamicNshms$<DisaggRequestMetadata>( `${service.url}${service.services.nshms}`, - endpoint + endpoint, ) .pipe( catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(({models, nshmServices, usageResponses}) => { spinnerRef.close(); @@ -362,7 +362,7 @@ export class AppService [this.componentDataToCSV(data, this.formGroup.getRawValue())], { type: 'text/csv;charset=utf-8;', - } + }, ); this.nshmpService.saveAs(blob, `disagg-${data.component}.csv`); @@ -375,7 +375,7 @@ export class AppService this.nshmpService.saveAs( blob, - `disagg-summary-${this.componentData().component}.txt` + `disagg-summary-${this.componentData().component}.txt`, ); } @@ -387,7 +387,7 @@ export class AppService */ saveContributions( data: DisaggComponentData, - formValues: DisaggControlForm + formValues: DisaggControlForm, ): void { const blob = new Blob([this.contributorsToCSV(data.sources, formValues)], { type: 'text/csv;charset=utf-8;', @@ -410,7 +410,7 @@ export class AppService saveSummaryReport(): void { const summaries = this.disaggData().data.map((data, index) => - this.summaryReportText(data, index === 0) + this.summaryReportText(data, index === 0), ); const blob = new Blob(summaries, { @@ -437,7 +437,7 @@ export class AppService const componentData = this.disaggData()?.data.find( disagg => - disagg.component === this.formGroup.getRawValue().disaggComponent + disagg.component === this.formGroup.getRawValue().disaggComponent, ); this.updateState({ @@ -482,13 +482,13 @@ export class AppService return this.http.get<FeaturesUsageResponse>(url).pipe( map(featureUsage => { const featureTypes = featureUsage.response.featureType.map( - feature => feature.value + feature => feature.value, ); if (featureTypes.includes(FeatureType.FAULT)) { this.callFaultsService(); } - }) + }), ); } @@ -501,12 +501,12 @@ export class AppService private componentDataToCSV( componentData: DisaggComponentData, formValues: DisaggControlForm, - showMetadata = true + showMetadata = true, ): string { const metadata = this.serviceResponse().response.metadata; const bins = metadata.εbins; const keys = componentData.summary.find( - data => data.name.toLowerCase() === 'epsilon keys' + data => data.name.toLowerCase() === 'epsilon keys', ); const headers = [ @@ -518,7 +518,7 @@ export class AppService const csv = componentData.data.map(data => { const εvalues = bins.map( - bin => data.εdata.find(data => data.εbin === bin.id)?.value ?? 0.0 + bin => data.εdata.find(data => data.εbin === bin.id)?.value ?? 0.0, ); const sum = εvalues.reduce((a, b) => a + b, 0); const values = [sum, ...εvalues] @@ -544,7 +544,7 @@ export class AppService private contributorsToCSV( sources: DisaggSource[], formValues: DisaggControlForm, - showMetadata = true + showMetadata = true, ): string { const label = 'Disaggregation Contributions'; @@ -649,7 +649,7 @@ export class AppService const usage = this.usage().response; const imt = usage.model.imts.find( - imt => imt.value === formValues.imt.toString() + imt => imt.value === formValues.imt.toString(), )?.display; const vs30 = @@ -677,7 +677,7 @@ export class AppService */ private serviceEndpoint( serviceUrl: string, - values: DisaggControlForm + values: DisaggControlForm, ): string { const pathBase = `${serviceUrl}/${values.longitude}/${values.latitude}/${values.vs30}`; const queryBase = '?out=DISAGG_DATA,GMM,SOURCE'; @@ -701,7 +701,7 @@ export class AppService private summaryReportText( componentData: DisaggComponentData, - showMetadata = true + showMetadata = true, ): string { const formValues = this.formGroup.getRawValue(); const firstLine = '*** Disaggregation of Seismic Hazard ***'; @@ -729,7 +729,7 @@ export class AppService private summaryToText( summaries: DisaggSummary[], formValues: DisaggControlForm, - showMetadata = true + showMetadata = true, ): string { const text = summaries.map(summary => { const name = summary.name; @@ -747,7 +747,8 @@ export class AppService private updateDisaggData(): void { const disaggData = this.state().serviceResponse?.response.disaggs.find( - disagg => disagg.imt.value === this.formGroup.getRawValue().imt.toString() + disagg => + disagg.imt.value === this.formGroup.getRawValue().imt.toString(), ); this.updateState({ @@ -758,13 +759,13 @@ export class AppService private updateUrl(): void { this.location.replaceState( apps().hazard.disagg.routerLink, - new HttpParams().appendAll(this.formGroup.getRawValue()).toString() + new HttpParams().appendAll(this.formGroup.getRawValue()).toString(), ); } private updateUsageUrl() { const nshmService = this.state().nshmServices.find( - nshm => nshm.model === this.formGroup.getRawValue().model + nshm => nshm.model === this.formGroup.getRawValue().model, ); this.updateState({ diff --git a/projects/nshmp-apps/src/app/hazard/dynamic/components/content/content.component.ts b/projects/nshmp-apps/src/app/hazard/dynamic/components/content/content.component.ts index 7cdd5c033..b9d56a2f7 100644 --- a/projects/nshmp-apps/src/app/hazard/dynamic/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/hazard/dynamic/components/content/content.component.ts @@ -59,13 +59,13 @@ export class ContentComponent { : label, xValueFormat: (x: number) => x.toFixed(4), yValueFormat: (y: number) => y.toExponential(4), - } + }, ); }); /** Spectra table data */ spectraTableData = computed(() => - hazardUtils.responseSpectraToTableData(this.service.responseSpectra()) + hazardUtils.responseSpectraToTableData(this.service.responseSpectra()), ); constructor(public service: AppService) {} diff --git a/projects/nshmp-apps/src/app/hazard/dynamic/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/hazard/dynamic/components/control-panel/control-panel.component.ts index 437f0839a..3a167f757 100644 --- a/projects/nshmp-apps/src/app/hazard/dynamic/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/hazard/dynamic/components/control-panel/control-panel.component.ts @@ -85,7 +85,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { /** List of site class `Parameter`s */ siteClasses = computed( - () => this.service.usage()?.response?.model.siteClasses + () => this.service.usage()?.response?.model.siteClasses, ); /** Get available source types */ @@ -96,7 +96,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { return [sourceTypeToCapitalCase(SourceType.TOTAL)]; } return serviceResponse.response.hazardCurves[0].data.map( - data => data.component + data => data.component, ); }); @@ -104,14 +104,14 @@ export class ControlPanelComponent implements OnInit, OnDestroy { constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { const controls = this.formGroup.controls; this.subs.push( - controls.model.valueChanges.subscribe(() => this.onModelChange()) + controls.model.valueChanges.subscribe(() => this.onModelChange()), ); this.subs.push( @@ -119,7 +119,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { controls.latitude.valueChanges, controls.longitude.valueChanges, controls.vs30.valueChanges, - ]).subscribe(() => this.service.resetState()) + ]).subscribe(() => this.service.resetState()), ); this.subs.push( @@ -128,7 +128,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { controls.sourceType.valueChanges, controls.maxDirection.valueChanges, controls.truncate.valueChanges, - ]).subscribe(() => this.service.createPlots()) + ]).subscribe(() => this.service.createPlots()), ); } diff --git a/projects/nshmp-apps/src/app/hazard/dynamic/components/parameter-summary/parameter-summary.component.ts b/projects/nshmp-apps/src/app/hazard/dynamic/components/parameter-summary/parameter-summary.component.ts index e9d4fb3b5..fd19d06d4 100644 --- a/projects/nshmp-apps/src/app/hazard/dynamic/components/parameter-summary/parameter-summary.component.ts +++ b/projects/nshmp-apps/src/app/hazard/dynamic/components/parameter-summary/parameter-summary.component.ts @@ -39,7 +39,7 @@ export class ParameterSummaryComponent { } return hazardUtils.siteClassesToParameters( - usage.response.model.siteClasses + usage.response.model.siteClasses, ); }); diff --git a/projects/nshmp-apps/src/app/hazard/dynamic/services/app.service.ts b/projects/nshmp-apps/src/app/hazard/dynamic/services/app.service.ts index d5e280b28..b09473bb0 100644 --- a/projects/nshmp-apps/src/app/hazard/dynamic/services/app.service.ts +++ b/projects/nshmp-apps/src/app/hazard/dynamic/services/app.service.ts @@ -70,7 +70,7 @@ export class AppService private serviceEndpoint = this.nshmpHazWs.services.curveServices.hazard; readonly formGroup = this.formBuilder.group<DynamicHazardControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); /** Application state */ @@ -82,7 +82,7 @@ export class AppService private nshmpService: NshmpService, private hazardService: HazardService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -122,8 +122,8 @@ export class AppService get nshmService(): Signal<NshmMetadata> { return computed(() => this.state().nshmServices.find( - nshmService => nshmService.model === this.formGroup.getRawValue().model - ) + nshmService => nshmService.model === this.formGroup.getRawValue().model, + ), ); } @@ -178,7 +178,7 @@ export class AppService */ get usage(): Signal<HazardUsageResponse> { return computed(() => - this.state().usageResponses?.get(this.formGroup.getRawValue().model) + this.state().usageResponses?.get(this.formGroup.getRawValue().model), ); } @@ -203,7 +203,7 @@ export class AppService const values = this.formGroup.getRawValue(); const service = this.state().nshmServices.find( - nshmService => nshmService.model === values.model + nshmService => nshmService.model === values.model, ); const serviceUrl = `${service.url}${this.serviceEndpoint}`; const url = this.createServiceEndpoint(serviceUrl, values); @@ -214,14 +214,14 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(serviceResponse => { spinnerRef.close(); const responseSpectra = hazardUtils.responseSpectra( serviceResponse.response.hazardCurves, - this.formGroup.getRawValue() + this.formGroup.getRawValue(), ); this.updateState({ @@ -258,19 +258,19 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.hazardService .dynamicNshms$<HazardRequestMetadata>( `${this.nshmpHazWs.url}${this.nshmpHazWs.services.nshms}`, - this.serviceEndpoint + this.serviceEndpoint, ) .pipe( catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(({models, nshmServices, usageResponses}) => { spinnerRef.close(); @@ -380,10 +380,10 @@ export class AppService responseData: HazardResponseData, plot: NshmpPlot, form: DynamicHazardControlForm, - returnPeriod: number + returnPeriod: number, ): PlotlyPlot { const hazardCurves = responseData.hazardCurves.filter( - response => response.imt.value !== Imt.PGV.toString() + response => response.imt.value !== Imt.PGV.toString(), ); const data = hazardCurves.map((response, index) => { @@ -391,12 +391,12 @@ export class AppService const sourceTypeData = hazardUtils.getSourceTypeData( response.data, - form.sourceType + form.sourceType, ); const xy = hazardUtils.updateXySequence( form, hazardUtils.cleanXySequence(sourceTypeData.values), - imt + imt, ); const plotlyData: Partial<PlotData> = { @@ -455,7 +455,7 @@ export class AppService private createServiceEndpoint( serviceUrl: string, - values: DynamicHazardControlForm + values: DynamicHazardControlForm, ): string { const {longitude, latitude, vs30} = values; return `${serviceUrl}/${longitude}/${latitude}/${vs30}`; @@ -524,7 +524,7 @@ export class AppService private responseSpectrumPlotData( spectra: ResponseSpectra, plot: NshmpPlot, - returnPeriodValue: number + returnPeriodValue: number, ): PlotlyPlot { if (spectra === null || spectra === undefined) { return; @@ -539,7 +539,7 @@ export class AppService const color = hazardUtils.color( iSpectra, - spectra.responseSpectrum.length + spectra.responseSpectrum.length, ); if (spectrum.returnPeriod === returnPeriodValue) { @@ -633,7 +633,7 @@ export class AppService */ private responseToPlots( state: AppState, - formGroup: FormGroupControls<DynamicHazardControlForm> + formGroup: FormGroupControls<DynamicHazardControlForm>, ): Map<string, NshmpPlot> { if (state.serviceResponse === null || state.serviceResponse === undefined) { return state.plots; @@ -649,13 +649,13 @@ export class AppService responseData, hazardPlot, formGroup.getRawValue(), - returnPeriod + returnPeriod, ); const spectrum = this.responseSpectrumPlotData( state.responseSpectra, spectrumPlot, - returnPeriod + returnPeriod, ); plots.set(HazardPlots.HAZARD, { @@ -681,12 +681,12 @@ export class AppService private returnPeriodPlotData( responseData: HazardResponseData, sourceType: string, - returnPeriod: number + returnPeriod: number, ): Partial<PlotData> { const data = responseData.hazardCurves .filter(hazard => hazard.imt.value !== Imt.PGV.toString()) .map( - hazard => hazardUtils.getSourceTypeData(hazard.data, sourceType).values + hazard => hazardUtils.getSourceTypeData(hazard.data, sourceType).values, ); const xMin = Math.min(...data.map(xy => Math.min(...xy.xs))); @@ -707,13 +707,13 @@ export class AppService private updateUrl(): void { this.location.replaceState( apps().hazard.dynamic.routerLink, - new HttpParams().appendAll(this.formGroup.getRawValue()).toString() + new HttpParams().appendAll(this.formGroup.getRawValue()).toString(), ); } private updateUsageUrl() { const nshmService = this.state().nshmServices.find( - nshm => nshm.model === this.formGroup.getRawValue().model + nshm => nshm.model === this.formGroup.getRawValue().model, ); this.updateState({ diff --git a/projects/nshmp-apps/src/app/hazard/static/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/hazard/static/components/control-panel/control-panel.component.ts index 24a18fdbc..06f719544 100644 --- a/projects/nshmp-apps/src/app/hazard/static/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/hazard/static/components/control-panel/control-panel.component.ts @@ -75,28 +75,28 @@ export class ControlPanelComponent implements OnInit, OnDestroy { /** List of site class `Parameter`s */ siteClasses = computed( - () => this.service.usage()?.response?.models.siteClasses + () => this.service.usage()?.response?.models.siteClasses, ); private subs: Subscription[] = []; constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { const controls = this.formGroup.controls; this.subs.push( - controls.model.valueChanges.subscribe(() => this.onModelChange()) + controls.model.valueChanges.subscribe(() => this.onModelChange()), ); this.subs.push( combineLatest([ controls.latitude.valueChanges, controls.longitude.valueChanges, - ]).subscribe(() => this.service.resetState()) + ]).subscribe(() => this.service.resetState()), ); this.subs.push( @@ -105,7 +105,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { controls.maxDirection.valueChanges, controls.truncate.valueChanges, controls.siteClass.valueChanges, - ]).subscribe(() => this.service.createPlots()) + ]).subscribe(() => this.service.createPlots()), ); } diff --git a/projects/nshmp-apps/src/app/hazard/static/components/curve-data/curve-data.component.ts b/projects/nshmp-apps/src/app/hazard/static/components/curve-data/curve-data.component.ts index ee9f68ec6..5b1cf2885 100644 --- a/projects/nshmp-apps/src/app/hazard/static/components/curve-data/curve-data.component.ts +++ b/projects/nshmp-apps/src/app/hazard/static/components/curve-data/curve-data.component.ts @@ -58,7 +58,7 @@ export class CurveDataComponent { this.service.plots(); return this.responseDataToTable( this.serviceResponse().response, - this.service.formGroup.getRawValue() + this.service.formGroup.getRawValue(), ); }); @@ -67,7 +67,7 @@ export class CurveDataComponent { constructor( private service: AppService, - public nshmpService: NshmpService + public nshmpService: NshmpService, ) {} /** Filename for hazard export CSV */ @@ -86,7 +86,7 @@ export class CurveDataComponent { */ private responseDataToTable( responseData: StaticResponseData<HazardResponseMetadata>[][], - form: HazardControlForm + form: HazardControlForm, ): StaticHazardCurveTable[] { return responseData.map(response => { const tableData = this.responseDataToTableData(response, form); @@ -106,7 +106,7 @@ export class CurveDataComponent { */ private responseDataToTableData( responseData: StaticResponseData<HazardResponseMetadata>[], - form: HazardControlForm + form: HazardControlForm, ): TableData[] { const tableData: TableData[] = []; responseData.forEach((response, index) => { diff --git a/projects/nshmp-apps/src/app/hazard/static/components/parameter-summary/parameter-summary.component.ts b/projects/nshmp-apps/src/app/hazard/static/components/parameter-summary/parameter-summary.component.ts index ff5c4dd92..13adebf02 100644 --- a/projects/nshmp-apps/src/app/hazard/static/components/parameter-summary/parameter-summary.component.ts +++ b/projects/nshmp-apps/src/app/hazard/static/components/parameter-summary/parameter-summary.component.ts @@ -39,7 +39,7 @@ export class ParameterSummaryComponent { } return hazardUtils.siteClassesToParameters( - usage.response.models.siteClasses + usage.response.models.siteClasses, ); }); diff --git a/projects/nshmp-apps/src/app/hazard/static/components/spectrum-data/spectrum-data.component.ts b/projects/nshmp-apps/src/app/hazard/static/components/spectrum-data/spectrum-data.component.ts index 6059b9b60..b04445bb8 100644 --- a/projects/nshmp-apps/src/app/hazard/static/components/spectrum-data/spectrum-data.component.ts +++ b/projects/nshmp-apps/src/app/hazard/static/components/spectrum-data/spectrum-data.component.ts @@ -64,7 +64,7 @@ export class SpectrumDataComponent { * @param spectra Response spectra data */ private spectraToTableData( - spectra: ResponseSpectra[] + spectra: ResponseSpectra[], ): StaticHazardCurveTable[] { return spectra.map(spectrum => { const tableData = hazardUtils diff --git a/projects/nshmp-apps/src/app/hazard/static/services/app.service.ts b/projects/nshmp-apps/src/app/hazard/static/services/app.service.ts index 8ad4b174a..37e30a7a3 100644 --- a/projects/nshmp-apps/src/app/hazard/static/services/app.service.ts +++ b/projects/nshmp-apps/src/app/hazard/static/services/app.service.ts @@ -75,7 +75,7 @@ export class AppService private serviceEndpoint = this.nshmpWsStatic.services.curveServices.hazard; readonly formGroup = this.formBuilder.group<HazardControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); /** Application state */ @@ -87,7 +87,7 @@ export class AppService private nshmpService: NshmpService, private hazardService: HazardService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -127,8 +127,8 @@ export class AppService get nshmService(): Signal<StaticNshmMetadata> { return computed(() => this.state().nshmServices.find( - nshmService => nshmService.model === this.formGroup.getRawValue().model - ) + nshmService => nshmService.model === this.formGroup.getRawValue().model, + ), ); } @@ -183,7 +183,7 @@ export class AppService */ get usage(): Signal<StaticHazardUsage> { return computed(() => - this.state().usageResponses?.get(this.formGroup.getRawValue().model) + this.state().usageResponses?.get(this.formGroup.getRawValue().model), ); } @@ -207,7 +207,7 @@ export class AppService const values = this.formGroup.getRawValue(); const service = this.state().nshmServices.find( - nshmService => nshmService.model === values.model + nshmService => nshmService.model === values.model, ); const serviceUrl = `${service.url}${this.serviceEndpoint}`; const url = this.createServiceEndpoint(serviceUrl, values); @@ -218,7 +218,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(serviceResponse => { spinnerRef.close(); @@ -226,7 +226,7 @@ export class AppService this.updateState({ responseSpectra: this.createResponseSpectra( serviceResponse, - this.formGroup + this.formGroup, ), serviceCallInfo: { ...this.state().serviceCallInfo, @@ -264,7 +264,7 @@ export class AppService services: HazardWebServices<StaticCurvesServices>, model: NshmId, longitude: number, - latitude: number + latitude: number, ): string { const service = this.staticService(services, model); return `${service.url}${services.services.hazard}/${longitude}/${latitude}`; @@ -275,19 +275,19 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.hazardService .staticNshms$( `${this.nshmpWsStatic.url}${this.nshmpWsStatic.services.nshms}`, - this.serviceEndpoint + this.serviceEndpoint, ) .pipe( catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(({models, nshmServices, usageResponses}) => { spinnerRef.close(); @@ -375,7 +375,7 @@ export class AppService */ staticHazardOnSiteClassChange( state: AppState, - formGroup: FormGroupControls<HazardControlForm> + formGroup: FormGroupControls<HazardControlForm>, ): Map<string, NshmpPlot> { if (state.serviceResponse) { return this.responseToPlots(state, formGroup); @@ -414,10 +414,10 @@ export class AppService responseData: StaticResponseData<HazardResponseMetadata>[], plot: NshmpPlot, form: HazardControlForm, - returnPeriod: number + returnPeriod: number, ): PlotlyPlot { const staticResponseData = responseData.filter( - response => response.metadata.imt.value !== Imt.PGV.toString() + response => response.metadata.imt.value !== Imt.PGV.toString(), ); let data = staticResponseData.map((response, index) => { @@ -428,7 +428,7 @@ export class AppService const xy = hazardUtils.updateXySequence( form, hazardUtils.cleanXySequence(response.data), - imt + imt, ); const plotlyData: Partial<PlotData> = { hovertemplate: '%{x} g, %{y} AFE', @@ -480,7 +480,7 @@ export class AppService */ private createResponseSpectra( serviceResponse: StaticHazardResponse, - formGroup: FormGroupControls<HazardControlForm> + formGroup: FormGroupControls<HazardControlForm>, ): ResponseSpectra[] { if (serviceResponse === null) { return []; @@ -497,7 +497,7 @@ export class AppService return serviceResponse.response.map(serviceResponse => { const hazardCurves: Map<Imt, XySequence> = this.hazardCurveMap( serviceResponse, - formGroup.getRawValue() + formGroup.getRawValue(), ); const spectra: ResponseSpectrum[] = returnPeriods.map( @@ -508,7 +508,7 @@ export class AppService returnPeriod, values: spectrum.ys, }; - } + }, ); return { @@ -521,7 +521,7 @@ export class AppService private createServiceEndpoint( serviceUrl: string, - values: HazardControlForm + values: HazardControlForm, ): string { const {longitude, latitude} = values; return `${serviceUrl}/${longitude}/${latitude}`; @@ -534,7 +534,7 @@ export class AppService */ private getResponseData( state: AppState, - formGroup: FormGroupControls<HazardControlForm> + formGroup: FormGroupControls<HazardControlForm>, ): StaticResponseData<HazardResponseMetadata>[] { const siteClass = formGroup.getRawValue().siteClass; @@ -553,7 +553,7 @@ export class AppService */ private hazardCurveMap( responseData: StaticResponseData<HazardResponseMetadata>[], - form: HazardControlForm + form: HazardControlForm, ): Map<Imt, XySequence> { const hazardCurves: Map<Imt, XySequence> = new Map(); responseData.forEach(response => { @@ -561,7 +561,7 @@ export class AppService const xy = hazardUtils.updateXySequence( form, hazardUtils.cleanXySequence(response.data), - imt + imt, ); hazardCurves.set(imt, xy); }); @@ -623,7 +623,7 @@ export class AppService responseData: StaticResponseData<HazardResponseMetadata>[], plot: NshmpPlot, form: HazardControlForm, - returnPeriodValue: number + returnPeriodValue: number, ): PlotlyPlot { const hazardCurves = this.hazardCurveMap(responseData, form); const imts: Imt[] = []; @@ -736,7 +736,7 @@ export class AppService */ private responseToPlots( state: AppState, - formGroup: FormGroupControls<HazardControlForm> + formGroup: FormGroupControls<HazardControlForm>, ): Map<string, NshmpPlot> { if (state.serviceResponse === null || state.serviceResponse === undefined) { return state.plots; @@ -752,14 +752,14 @@ export class AppService responseData, hazardPlot, formGroup.getRawValue(), - returnPeriod + returnPeriod, ); const spectrum = this.responseSpectrumPlotData( responseData, spectrumPlot, formGroup.getRawValue(), - returnPeriod + returnPeriod, ); plots.set(HazardPlots.HAZARD, { @@ -783,13 +783,13 @@ export class AppService */ private returnPeriodPlotData( plotData: Partial<PlotData>[], - returnPeriod: number + returnPeriod: number, ): Partial<PlotData> { const xMin = Math.min( - ...plotData.map(xy => Math.min(...(xy.x as number[]))) + ...plotData.map(xy => Math.min(...(xy.x as number[]))), ); const xMax = Math.max( - ...plotData.map(xy => Math.max(...(xy.x as number[]))) + ...plotData.map(xy => Math.max(...(xy.x as number[]))), ); return { @@ -812,7 +812,7 @@ export class AppService */ private staticService( services: HazardWebServices<StaticCurvesServices>, - model: NshmId + model: NshmId, ): HazardWebServiceConfig { return services.models.find(service => model === service.model); } @@ -820,13 +820,13 @@ export class AppService private updateUrl(): void { this.location.replaceState( apps().hazard.static.routerLink, - new HttpParams().appendAll(this.formGroup.getRawValue()).toString() + new HttpParams().appendAll(this.formGroup.getRawValue()).toString(), ); } private updateUsageUrl() { const nshmService = this.state().nshmServices.find( - nshm => nshm.model === this.formGroup.getRawValue().model + nshm => nshm.model === this.formGroup.getRawValue().model, ); this.updateState({ diff --git a/projects/nshmp-apps/src/app/internal/aws/aws.routes.ts b/projects/nshmp-apps/src/app/internal/aws/aws.routes.ts index e6de16c84..0dfdf714d 100644 --- a/projects/nshmp-apps/src/app/internal/aws/aws.routes.ts +++ b/projects/nshmp-apps/src/app/internal/aws/aws.routes.ts @@ -28,7 +28,7 @@ const routes: Routes = [ }, loadComponent: () => import('./terminate-haz-jobs/app.component').then( - com => com.AppComponent + com => com.AppComponent, ), path: 'terminate-haz-jobs', }, diff --git a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/content/content.component.ts b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/content/content.component.ts index 8ab4a73e0..ed7f2d562 100644 --- a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/content/content.component.ts @@ -67,7 +67,7 @@ export class ContentComponent implements OnDestroy, AfterViewInit { constructor( public templateServie: NshmpTemplateService, private service: AppService, - private snackBar: MatSnackBar + private snackBar: MatSnackBar, ) { effect( () => { @@ -78,7 +78,7 @@ export class ContentComponent implements OnDestroy, AfterViewInit { }, { allowSignalWrites: true, - } + }, ); } diff --git a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/control-panel/control-panel.component.ts index a001758e8..af369d2ad 100644 --- a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/control-panel/control-panel.component.ts @@ -35,7 +35,7 @@ export class ControlPanelComponent { constructor( public service: AppService, - public nshmpService: NshmpService + public nshmpService: NshmpService, ) {} /** diff --git a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/snack-bar/snack-bar.component.ts b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/snack-bar/snack-bar.component.ts index 7bcbe7a42..1fb833f5f 100644 --- a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/snack-bar/snack-bar.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/components/snack-bar/snack-bar.component.ts @@ -31,7 +31,7 @@ import {MatTooltip} from '@angular/material/tooltip'; export class SnackBarComponent { constructor( @Inject(MAT_SNACK_BAR_DATA) public downloadUrl: string, - private snackBar: MatSnackBar + private snackBar: MatSnackBar, ) {} /** diff --git a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/pipes/log.pipe.ts b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/pipes/log.pipe.ts index 5d840b9ca..54c36454b 100644 --- a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/pipes/log.pipe.ts +++ b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/pipes/log.pipe.ts @@ -22,23 +22,23 @@ export class LogPipe implements PipeTransform { if (value.includes(this.INFO)) { value = value.replace( new RegExp(this.INFO, 'gi'), - `<span class="text-green">${this.INFO}</span>` + `<span class="text-green">${this.INFO}</span>`, ); } else if (value.includes(this.WARNING)) { value = value.replace( new RegExp(this.WARNING, 'gi'), - `<span class="text-orange">${this.WARNING}</span>` + `<span class="text-orange">${this.WARNING}</span>`, ); } else if (value.includes(this.ERROR)) { value = value.replace( new RegExp(this.ERROR, 'gi'), - `<span class="text-red">${this.ERROR}</span>` + `<span class="text-red">${this.ERROR}</span>`, ); } else if (value.includes(this.RESULTS)) { const results = value.split(this.RESULTS).pop().trim(); value = value.replace( new RegExp(`${this.RESULTS}${results}`, 'gi'), - `<span class="text-bold">${this.RESULTS}<a href="${results}">${results}</a></span>` + `<span class="text-bold">${this.RESULTS}<a href="${results}">${results}</a></span>`, ); } diff --git a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/services/app.service.ts b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/services/app.service.ts index 6353510b4..c4af8f414 100644 --- a/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/services/app.service.ts +++ b/projects/nshmp-apps/src/app/internal/aws/check-haz-jobs/services/app.service.ts @@ -39,7 +39,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { /** Reactive form group */ readonly formGroup = this.formBuilder.group<ControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); /** Application signal state */ readonly state = signal<AppState>(this.initialState()); @@ -50,7 +50,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private nshmpService: NshmpService, private awsService: AwsService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { this.addValidators(); @@ -108,13 +108,13 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { this.awsService .callJobHistoryService<DynamoDBItem>( `${this.baseUrl}/${this.hazardJobsService}`, - this.formGroup.controls.id + this.formGroup.controls.id, ) .subscribe(jobHistoryResponse => { this.updateState({jobHistoryResponse}); this.awsService.openTerminateDialog(jobHistoryResponse, () => - this.callTerminateJobService() + this.callTerminateJobService(), ); }); } @@ -140,7 +140,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { .callService$<Response<GetLogsRequestData, GetLogsResponseData>>(url) .pipe(catchError((error: Error) => this.nshmpService.throwError$(error))) .subscribe(serviceResponse => - this.handleServiceResponse(serviceResponse, showSpinner) + this.handleServiceResponse(serviceResponse, showSpinner), ); } @@ -197,10 +197,10 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { this.awsService .callTerminateJobService( `${this.baseUrl}/${this.terminateService}`, - this.formGroup.controls.id + this.formGroup.controls.id, ) .subscribe(terminateJobResponse => - this.updateState({terminateJobResponse}) + this.updateState({terminateJobResponse}), ); } @@ -212,7 +212,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { */ private handleServiceResponse( serviceResponse: Response<GetLogsRequestData, GetLogsResponseData>, - showSpinner: boolean + showSpinner: boolean, ): void { const {autoRefresh} = this.formGroup.getRawValue(); const status = serviceResponse.response.jobStatus; @@ -245,7 +245,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { this.location.replaceState( internalApps().aws.checkHazJobs.routerLink, - new HttpParams().appendAll(query).toString() + new HttpParams().appendAll(query).toString(), ); } } diff --git a/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/content/content.component.ts b/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/content/content.component.ts index b1597244e..61c7d8939 100644 --- a/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/content/content.component.ts @@ -45,7 +45,7 @@ export class ContentComponent { /** List of results for current page */ historySliced = computed(() => - this.service.jobHistory().slice(0, this.pageSize) + this.service.jobHistory().slice(0, this.pageSize), ); constructor(public service: AppService) {} @@ -69,7 +69,7 @@ export class ContentComponent { this.historySliced = computed(() => this.service .jobHistory() - .slice(pageIndex * pageSize, (pageIndex + 1) * pageSize) + .slice(pageIndex * pageSize, (pageIndex + 1) * pageSize), ); } } diff --git a/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/control-panel/control-panel.component.ts index 5ebac4d24..fc4f64264 100644 --- a/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/haz-job-history/components/control-panel/control-panel.component.ts @@ -43,12 +43,12 @@ export class ControlPanelComponent implements OnInit, OnDestroy { constructor( public nshmpService: NshmpService, - private service: AppService + private service: AppService, ) {} ngOnInit(): void { this.filterSubscription = this.form.controls.filter.valueChanges.subscribe( - () => this.service.filterHistory() + () => this.service.filterHistory(), ); } diff --git a/projects/nshmp-apps/src/app/internal/aws/haz-job-history/services/app.service.ts b/projects/nshmp-apps/src/app/internal/aws/haz-job-history/services/app.service.ts index df579cc4d..94638d5a9 100644 --- a/projects/nshmp-apps/src/app/internal/aws/haz-job-history/services/app.service.ts +++ b/projects/nshmp-apps/src/app/internal/aws/haz-job-history/services/app.service.ts @@ -25,7 +25,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { /** Control form group */ readonly formGroup = this.formBuilder.group<ControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); /** Application state signal */ readonly state = signal<AppState>(this.initialState()); @@ -35,7 +35,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private nshmpService: NshmpService, private awsService: AwsService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { this.addValidators(); this.formGroup.valueChanges.subscribe(() => this.updateUrl()); @@ -55,7 +55,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { */ addValidators(): void { this.formGroup.controls.id.addValidators(control => - Validators.required(control) + Validators.required(control), ); this.formGroup.controls.id.updateValueAndValidity(); } @@ -111,7 +111,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { }); } else { const filteredHistory = jobHistoryResponse.response.filter( - jobInfo => jobInfo.job.jobStatus.toString() === filter + jobInfo => jobInfo.job.jobStatus.toString() === filter, ); this.updateState({filteredHistory}); @@ -173,7 +173,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { this.location.replaceState( internalApps().aws.hazJobHistory.routerLink, - new HttpParams().appendAll(query).toString() + new HttpParams().appendAll(query).toString(), ); } } diff --git a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/form/form.component.ts b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/form/form.component.ts index e088b42aa..1f257d88c 100644 --- a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/form/form.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/form/form.component.ts @@ -128,7 +128,7 @@ export class FormComponent implements OnInit, OnDestroy { constructor( public service: AppService, - private matDialog: MatDialog + private matDialog: MatDialog, ) { effect(() => { const responses = this.service.state().serviceResponses; @@ -150,13 +150,13 @@ export class FormComponent implements OnInit, OnDestroy { nshmpConfig.controls.nshmpLibSha.enable(); } else { this.form.controls.nshmpConfig.controls.nshmpLibGitUrl.patchValue( - null + null, ); nshmpConfig.controls.nshmpLibGitUrl.disable(); nshmpConfig.controls.nshmpLibSha.patchValue(null); nshmpConfig.controls.nshmpLibSha.disable(); } - } + }, ); } @@ -195,7 +195,7 @@ export class FormComponent implements OnInit, OnDestroy { importSiteFile() { this.service.uploadFiles( this.uploadSiteEl.nativeElement.files, - FileType.SITE + FileType.SITE, ); this.uploadSiteEl.nativeElement.value = ''; } diff --git a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/history/history.component.ts b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/history/history.component.ts index df2feae6d..4184586b0 100644 --- a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/history/history.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/history/history.component.ts @@ -58,14 +58,14 @@ export class HistoryComponent { constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} downloadConfiguration( serviceResponse: Response< RunNshmpHazHttpPostConfig, RunNshmpHazResponseData - > + >, ): void { const blob = new Blob([JSON.stringify(serviceResponse.request, null, 2)], { type: 'text/csv;charset=utf-8;', @@ -73,7 +73,7 @@ export class HistoryComponent { this.nshmpService.saveAs( blob, - `aws-config-${serviceResponse.response.jobId}.json` + `aws-config-${serviceResponse.response.jobId}.json`, ); } } diff --git a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/job-submitted/job-submitted.component.ts b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/job-submitted/job-submitted.component.ts index 1d72f738a..23fe3aece 100644 --- a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/job-submitted/job-submitted.component.ts +++ b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/components/job-submitted/job-submitted.component.ts @@ -42,7 +42,7 @@ export class JobSubmittedComponent { constructor( private service: AppService, private router: Router, - private location: Location + private location: Location, ) {} checkJob(response: RunNshmpHazResponseData) { @@ -50,15 +50,15 @@ export class JobSubmittedComponent { this.router.createUrlTree( [ this.location.prepareExternalUrl( - internalApps().aws.checkHazJobs.routerLink + internalApps().aws.checkHazJobs.routerLink, ), ], { queryParams: { id: response.jobId, }, - } - ) + }, + ), ); window.open(url, '_blank'); diff --git a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/services/app.service.ts b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/services/app.service.ts index 08eac8789..764fdc736 100644 --- a/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/services/app.service.ts +++ b/projects/nshmp-apps/src/app/internal/aws/submit-haz-jobs/services/app.service.ts @@ -70,7 +70,7 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { mapConfig: this.formBuilder.group(this.defaultFormValues().mapConfig), nshmpConfig: this.formBuilder.group(this.defaultFormValues().nshmpConfig), overrideNshmpLib: this.formBuilder.control( - this.defaultFormValues().overrideNshmpLib + this.defaultFormValues().overrideNshmpLib, ), }); @@ -81,7 +81,7 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { private formBuilder: FormBuilder, private nshmpService: NshmpService, private spinnerService: SpinnerService, - private http: HttpClient + private http: HttpClient, ) { this.addValidators(); this.formGroup.controls.nshmpConfig.controls.nshmpLibGitUrl.disable(); @@ -160,12 +160,12 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { Response<RunNshmpHazHttpPostConfig, RunNshmpHazResponseData> >(url, 'POST', JSON.stringify(postConfig)) .pipe( - catchError((error: Error) => this.nshmpService.throwError$(error)) - ) + catchError((error: Error) => this.nshmpService.throwError$(error)), + ), ); forkJoin(calls).subscribe(serviceResponses => - this.handleServiceResponse(serviceResponses) + this.handleServiceResponse(serviceResponses), ); } @@ -176,7 +176,7 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { clearHistory(id?: string): void { if (id) { const history = this.history().filter( - serviceResponse => serviceResponse.response.jobId !== id + serviceResponse => serviceResponse.response.jobId !== id, ); this.updateState({ history, @@ -306,7 +306,7 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { ?.sort( (a, b) => new Date(a.authored_date).getMilliseconds() - - new Date(b.authored_date).getMilliseconds() + new Date(b.authored_date).getMilliseconds(), ) .shift()?.name ?? this.defaultFormValues().nshmpConfig.modelSha ?? @@ -350,7 +350,7 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { */ initialState(): AppState { const history = JSON.parse( - localStorage.getItem(this.localStorageKey) ?? '[]' + localStorage.getItem(this.localStorageKey) ?? '[]', ) as Response<RunNshmpHazHttpPostConfig, RunNshmpHazResponseData>[]; return { @@ -405,10 +405,10 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { } private addCloudValidators( - cloudConfig: FormGroupControls<CloudConfig> + cloudConfig: FormGroupControls<CloudConfig>, ): void { cloudConfig.controls.instanceType.addValidators(control => - Validators.required(control) + Validators.required(control), ); } @@ -467,7 +467,7 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { serviceResponses: Response< RunNshmpHazHttpPostConfig, RunNshmpHazResponseData - >[] + >[], ): void { this.spinnerService.remove(); this.updateState({ @@ -562,11 +562,11 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { } else { this.formGroup.controls.nshmpConfig.controls.nshmpLibGitUrl.disable(); this.formGroup.controls.nshmpConfig.controls.nshmpLibGitUrl.patchValue( - null + null, ); this.formGroup.controls.nshmpConfig.controls.nshmpLibSha.disable(); this.formGroup.controls.nshmpConfig.controls.nshmpLibSha.patchValue( - null + null, ); this.formGroup.controls.overrideNshmpLib.patchValue(false); } @@ -614,7 +614,7 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { private setLocalStorage(): void { localStorage.setItem( this.localStorageKey, - JSON.stringify(this.state().history) + JSON.stringify(this.state().history), ); } @@ -637,18 +637,18 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { serviceResponse: Response< UploadFileRequestData, UploadFileResponseData - > + >, ) => { this.spinnerService.remove(); this.spinnerService.show('Uploading file to S3'); downloadUrl = serviceResponse.response.downloadUrl; return this.http.put( serviceResponse.response.preSignedUrl, - fileInfo.file + fileInfo.file, ); - } + }, ), - catchError((error: Error) => this.nshmpService.throwError$(error)) + catchError((error: Error) => this.nshmpService.throwError$(error)), ) .subscribe(() => { this.spinnerService.remove(); @@ -657,13 +657,13 @@ export class AppService implements AppServiceModel<AppState, RunNshmpHazForm> { switch (type) { case FileType.SITE: { this.formGroup.controls.nshmpConfig.controls.siteFileUrl.patchValue( - downloadUrl + downloadUrl, ); break; } default: { return this.nshmpService.throwError$( - new Error(`Upload file type [${fileInfo.type}] not allowed`) + new Error(`Upload file type [${fileInfo.type}] not allowed`), ); } } diff --git a/projects/nshmp-apps/src/app/internal/aws/terminate-haz-jobs/services/app.service.ts b/projects/nshmp-apps/src/app/internal/aws/terminate-haz-jobs/services/app.service.ts index 0ad70cbcd..5a0786fb3 100644 --- a/projects/nshmp-apps/src/app/internal/aws/terminate-haz-jobs/services/app.service.ts +++ b/projects/nshmp-apps/src/app/internal/aws/terminate-haz-jobs/services/app.service.ts @@ -35,7 +35,7 @@ export class AppService implements AppServiceModel<AppState, IdForm> { private nshmpService: NshmpService, private awsService: AwsService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { this.addValidators(); this.formGroup.valueChanges.subscribe(() => this.updateUrl()); @@ -75,13 +75,13 @@ export class AppService implements AppServiceModel<AppState, IdForm> { this.awsService .callJobHistoryService<DynamoDBItem>( `${this.baseUrl}/${this.jobsService}`, - this.formGroup.controls.id + this.formGroup.controls.id, ) .subscribe(jobHistoryResponse => { this.updateState({jobHistoryResponse}); this.awsService.openTerminateDialog(jobHistoryResponse, () => - this.callService() + this.callService(), ); }); } @@ -93,10 +93,10 @@ export class AppService implements AppServiceModel<AppState, IdForm> { this.awsService .callTerminateJobService( `${this.baseUrl}/${this.terminateService}`, - this.formGroup.controls.id + this.formGroup.controls.id, ) .subscribe(terminateJobResponse => - this.updateState({terminateJobResponse}) + this.updateState({terminateJobResponse}), ); } @@ -158,7 +158,7 @@ export class AppService implements AppServiceModel<AppState, IdForm> { this.location.replaceState( internalApps().aws.terminateHazJobs.routerLink, - new HttpParams().appendAll(query).toString() + new HttpParams().appendAll(query).toString(), ); } } diff --git a/projects/nshmp-apps/src/app/internal/shared/services/auth.service.ts b/projects/nshmp-apps/src/app/internal/shared/services/auth.service.ts index 504d9fe00..7a39e67e4 100644 --- a/projects/nshmp-apps/src/app/internal/shared/services/auth.service.ts +++ b/projects/nshmp-apps/src/app/internal/shared/services/auth.service.ts @@ -21,7 +21,7 @@ export class AuthService { constructor( private http: HttpClient, private spinnerService: SpinnerService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} isAuthorized() { @@ -33,7 +33,9 @@ export class AuthService { if (!response.isAuthorized) { this.nshmpService.throwError$( - new Error('Must be on USGS network to access internal applications') + new Error( + 'Must be on USGS network to access internal applications', + ), ); } @@ -42,7 +44,7 @@ export class AuthService { catchError((error: Error) => { ref.close(); return this.nshmpService.throwError$(error); - }) + }), ); } } diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/control-panel/control-panel.component.ts index 3f990609a..89484208d 100644 --- a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/control-panel/control-panel.component.ts @@ -67,16 +67,18 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const controls = this.formGroup.controls; this.subs.push( - controls.depthInc.valueChanges.subscribe(() => this.service.resetState()) + controls.depthInc.valueChanges.subscribe(() => this.service.resetState()), ); this.subs.push( - controls.depthMax.valueChanges.subscribe(() => this.service.resetState()) + controls.depthMax.valueChanges.subscribe(() => this.service.resetState()), ); this.subs.push( - controls.depthMin.valueChanges.subscribe(() => this.service.resetState()) + controls.depthMin.valueChanges.subscribe(() => this.service.resetState()), ); this.subs.push( - controls.locations.valueChanges.subscribe(() => this.service.resetState()) + controls.locations.valueChanges.subscribe(() => + this.service.resetState(), + ), ); } diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/data/data.component.ts b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/data/data.component.ts index f6c6aa94e..67d061a56 100644 --- a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/data/data.component.ts +++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/data/data.component.ts @@ -59,7 +59,7 @@ export class DataComponent { private toTableData( plot: NshmpPlot, index: number, - hideX = true + hideX = true, ): TableData[] { const data = plot.plotData.data[index]; @@ -84,7 +84,7 @@ export class DataComponent { yLabelTransform: () => (plot.plotData.layout.xaxis.title as DataTitle).text, yValueFormat: (y: number) => y.toFixed(4), - } + }, ); } } diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/parameter-summary/parameter-summary.component.html b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/parameter-summary/parameter-summary.component.html index c2f60bdc7..d683ae1c6 100644 --- a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/parameter-summary/parameter-summary.component.html +++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/components/parameter-summary/parameter-summary.component.html @@ -29,7 +29,7 @@ @for (locationForm of locations; track locationForm; let index = $index) { <mat-list-item> - <mat-icon matListItemIcon> </mat-icon> + <mat-icon matListItemIcon /> @let latitude = locationForm.value.latitude; @let longitude = locationForm.value.longitude; diff --git a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/services/app.service.ts b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/services/app.service.ts index 5cc0b5125..afb9333c6 100644 --- a/projects/nshmp-apps/src/app/ncm/geophysical-profiles/services/app.service.ts +++ b/projects/nshmp-apps/src/app/ncm/geophysical-profiles/services/app.service.ts @@ -69,7 +69,7 @@ export class AppService private spinnerService: SpinnerService, private nshmpService: NshmpService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); @@ -146,7 +146,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(serviceResponse => { this.updateState({ @@ -221,7 +221,7 @@ export class AppService this.formGroup.controls.locations.clear(); const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.nshmpService @@ -230,7 +230,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(usageResponse => { spinnerRef.close(); @@ -559,7 +559,7 @@ export class AppService depthMin: values.depthMin, location, }) - .toString() + .toString(), ); } } diff --git a/projects/nshmp-apps/src/app/ncm/ncm.routes.ts b/projects/nshmp-apps/src/app/ncm/ncm.routes.ts index c6255150f..37c484023 100644 --- a/projects/nshmp-apps/src/app/ncm/ncm.routes.ts +++ b/projects/nshmp-apps/src/app/ncm/ncm.routes.ts @@ -12,7 +12,7 @@ const routes: Routes = [ }, loadComponent: () => import('./geophysical-profiles/app.component').then( - com => com.AppComponent + com => com.AppComponent, ), path: 'geophysical-profiles', }, diff --git a/projects/nshmp-apps/src/app/services/components/content/content.component.ts b/projects/nshmp-apps/src/app/services/components/content/content.component.ts index aab18aea0..e270d108d 100644 --- a/projects/nshmp-apps/src/app/services/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/services/components/content/content.component.ts @@ -74,7 +74,7 @@ export class ContentComponent implements AfterViewInit { /** Dynamic hazard services */ dynamicHazardServices$: Observable<ServiceConfig[]> = this.hazardService .dynamicNshmService$( - `${this.nshmpHazWs.url}${this.nshmpHazWs.services.nshms}` + `${this.nshmpHazWs.url}${this.nshmpHazWs.services.nshms}`, ) .pipe( map(usage => { @@ -84,13 +84,13 @@ export class ContentComponent implements AfterViewInit { swaggerEndPoint: this.nshmpHazWs.services.curveServices.swagger, url: nshm.url, })); - }) + }), ); /** Static hazard services */ staticHazardServices$: Observable<ServiceConfig[]> = this.hazardService .staticNshmService$( - `${this.nshmpWsStatic.url}${this.nshmpWsStatic.services.nshms}` + `${this.nshmpWsStatic.url}${this.nshmpWsStatic.services.nshms}`, ) .pipe( map(usage => { @@ -102,7 +102,7 @@ export class ContentComponent implements AfterViewInit { swaggerEndPoint: nshmpWsStatic.services.curveServices.swagger, url: nshm.url, })); - }) + }), ); /** Whether sidenav is collapsed */ @@ -241,7 +241,7 @@ export class ContentComponent implements AfterViewInit { private route: ActivatedRoute, private router: Router, private hazardService: HazardService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngAfterViewInit() { diff --git a/projects/nshmp-apps/src/app/source/mfd/app.component.ts b/projects/nshmp-apps/src/app/source/mfd/app.component.ts index 9e3e3a63e..2f5dba5ef 100644 --- a/projects/nshmp-apps/src/app/source/mfd/app.component.ts +++ b/projects/nshmp-apps/src/app/source/mfd/app.component.ts @@ -52,7 +52,7 @@ export class AppComponent implements OnInit { constructor( public nshmpTemplateService: NshmpTemplateService, - public service: AppService + public service: AppService, ) {} ngOnInit(): void { diff --git a/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts index 81dc7dc61..d1f008121 100644 --- a/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/source/mfd/components/control-panel/control-panel.component.ts @@ -76,47 +76,47 @@ export class ControlPanelComponent implements OnInit, OnDestroy { /** Source trees state */ sourceTrees$ = this.formGroup.controls.source.valueChanges.pipe( map(source => - this.toSourceTrees(source, this.service.usage().response.trees) - ) + this.toSourceTrees(source, this.service.usage().response.trees), + ), ); private subs: Subscription[] = []; constructor( public service: AppService, - private nshmpService: NshmpService + private nshmpService: NshmpService, ) {} ngOnInit(): void { const controls = this.formGroup.controls; this.subs.push( - controls.model.valueChanges.subscribe(() => this.onModelChange()) + controls.model.valueChanges.subscribe(() => this.onModelChange()), ); this.subs.push( controls.sourceAsString.valueChanges.subscribe(sourceAsString => { controls.source.setValue(JSON.parse(sourceAsString) as MfdSource); this.onSourceChange(); - }) + }), ); this.subs.push( controls.sourceTree.valueChanges.subscribe(() => - this.service.resetState() - ) + this.service.resetState(), + ), ); this.subs.push( controls.cumulative.valueChanges.subscribe(() => - this.service.createPlots() - ) + this.service.createPlots(), + ), ); this.subs.push( controls.weightedMfds.valueChanges.subscribe(() => - this.service.createPlots() - ) + this.service.createPlots(), + ), ); } @@ -137,7 +137,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const defaultSource = this.service.defaultSource(trees); const defaultTreeInfo = this.service.defaultSourceTree( trees, - defaultSource + defaultSource, ); this.formGroup.patchValue({ @@ -153,7 +153,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const trees = this.service.usage().response.trees; const defaultTreeInfo = this.service.defaultSourceTree( trees, - this.formGroup.getRawValue().source + this.formGroup.getRawValue().source, ); this.formGroup.patchValue({ @@ -164,7 +164,7 @@ export class ControlPanelComponent implements OnInit, OnDestroy { toSourceValue( sourceType: SourceType, - tectonicSettings: TectonicSettings + tectonicSettings: TectonicSettings, ): string { return JSON.stringify({ sourceType, @@ -189,10 +189,10 @@ export class ControlPanelComponent implements OnInit, OnDestroy { } const settingsTree = trees.find( - tree => tree.setting === source.tectonicSettings + tree => tree.setting === source.tectonicSettings, ); const tree = settingsTree?.data?.find( - data => data.type === source.sourceType + data => data.type === source.sourceType, ); const data = tree?.data.sort((a, b) => a.name.localeCompare(b.name)); diff --git a/projects/nshmp-apps/src/app/source/mfd/components/data/data.component.ts b/projects/nshmp-apps/src/app/source/mfd/components/data/data.component.ts index 9b32147cb..3f23737e6 100644 --- a/projects/nshmp-apps/src/app/source/mfd/components/data/data.component.ts +++ b/projects/nshmp-apps/src/app/source/mfd/components/data/data.component.ts @@ -28,7 +28,7 @@ export class DataComponent { if (serviceResponse) { return this.toTableData( serviceResponse, - this.service.formGroup.getRawValue() + this.service.formGroup.getRawValue(), ); } else { return []; @@ -54,7 +54,7 @@ export class DataComponent { .findTreeInfo( this.service.usage().response.trees, values.source, - values.sourceTree + values.sourceTree, ) ?.name?.replace(/ /g, '_'); @@ -71,7 +71,7 @@ export class DataComponent { */ private toTableData( serviceResponse: SourceLogicTreesResponse, - form: ControlForm + form: ControlForm, ): TableData[] { const branches = serviceResponse.response.branches; const tree = serviceResponse.response; @@ -132,7 +132,7 @@ export class DataComponent { td: [value], th: key, }); - } + }, ); }); }); diff --git a/projects/nshmp-apps/src/app/source/mfd/components/parameter-summary/parameter-summary.component.ts b/projects/nshmp-apps/src/app/source/mfd/components/parameter-summary/parameter-summary.component.ts index 297cd79de..56a485305 100644 --- a/projects/nshmp-apps/src/app/source/mfd/components/parameter-summary/parameter-summary.component.ts +++ b/projects/nshmp-apps/src/app/source/mfd/components/parameter-summary/parameter-summary.component.ts @@ -46,10 +46,10 @@ export class ParameterSummaryComponent { const source = values.source; const settingsTree = usage.response.trees.find( - tree => tree.setting === source.tectonicSettings + tree => tree.setting === source.tectonicSettings, ); const tree = settingsTree?.data?.find( - data => data.type === source.sourceType + data => data.type === source.sourceType, ); const data = tree?.data.find(info => info.id === values.sourceTree); diff --git a/projects/nshmp-apps/src/app/source/mfd/services/app.service.ts b/projects/nshmp-apps/src/app/source/mfd/services/app.service.ts index 5a25b8a13..af7841cd4 100644 --- a/projects/nshmp-apps/src/app/source/mfd/services/app.service.ts +++ b/projects/nshmp-apps/src/app/source/mfd/services/app.service.ts @@ -99,7 +99,7 @@ export class AppService private usageEndpoint = this.nshmpHazWs.services.curveServices.trees; readonly formGroup = this.formBuilder.group<ControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); /** Application state */ @@ -111,7 +111,7 @@ export class AppService private nshmpService: NshmpService, private hazardService: HazardService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.formGroup.controls.mfdType.disable(); @@ -180,7 +180,7 @@ export class AppService */ get usage(): Signal<SourceLogicTreesUsage> { return computed(() => - this.state().usageResponses?.get(this.formGroup.getRawValue().model) + this.state().usageResponses?.get(this.formGroup.getRawValue().model), ); } @@ -200,7 +200,7 @@ export class AppService const values = this.formGroup.getRawValue(); const service = this.state().nshmServices.find( - nshmService => nshmService.model === values.model + nshmService => nshmService.model === values.model, ); const serviceUrl = `${service.url}${this.serviceEndpoint}`; const url = this.createServiceEndpoint(serviceUrl, values); @@ -211,7 +211,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(serviceResponse => { spinnerRef.close(); @@ -387,11 +387,11 @@ export class AppService */ defaultSourceTree(trees: SettingGroup[], source: MfdSource): TreeInfo { const settingsTree = [...trees].find( - tree => tree.setting === source.tectonicSettings + tree => tree.setting === source.tectonicSettings, ); const tree = settingsTree.data.find( - data => data.type === source.sourceType + data => data.type === source.sourceType, ); return [...tree.data.sort((a, b) => a.name.localeCompare(b.name))].shift(); @@ -432,19 +432,19 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.hazardService .dynamicNshms$<SourceLogicTreesMetadata>( `${this.nshmpHazWs.url}${this.nshmpHazWs.services.nshms}`, - this.usageEndpoint + this.usageEndpoint, ) .pipe( catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(({models, nshmServices, usageResponses}) => { spinnerRef.close(); @@ -540,7 +540,7 @@ export class AppService private createServiceEndpoint( serviceUrl: string, - values: ControlForm + values: ControlForm, ): string { const {sourceTree} = values; return `${serviceUrl}/${sourceTree}`; @@ -554,7 +554,7 @@ export class AppService */ private findSettingsGroup( trees: SettingGroup[], - source: MfdSource + source: MfdSource, ): SettingGroup { return trees.find(tree => tree.setting === source.tectonicSettings); } @@ -568,7 +568,7 @@ export class AppService */ private findSourceGroup( trees: SettingGroup[], - source: MfdSource + source: MfdSource, ): SourceGroup { const settingsGroup = this.findSettingsGroup(trees, source); return settingsGroup.data.find(data => data.type === source.sourceType); @@ -585,7 +585,7 @@ export class AppService const defaultSource = this.defaultSource(usage.response.trees); const defaultTreeInfo = this.defaultSourceTree( usage.response.trees, - defaultSource + defaultSource, ); const source: MfdSource = @@ -635,13 +635,13 @@ export class AppService logicTreeData: LogicTreeData, branch: SourceBranch, parent: string, - type: MfdType + type: MfdType, ): void { branch.mfds .filter(mfdBranch => mfdBranch.mfd.props.type === type) .forEach(mfdBranch => { logicTreeData.labels.push( - `Branch: ${branch.branch}<br>` + `ID: ${mfdBranch.id}<br>` + `Branch: ${branch.branch}<br>` + `ID: ${mfdBranch.id}<br>`, ); logicTreeData.parents.push(parent); @@ -651,7 +651,7 @@ export class AppService .join(''); logicTreeData.text.push( - `Weight: ${mfdBranch.weight}<br><br>` + 'Properties:' + props + `Weight: ${mfdBranch.weight}<br><br>` + 'Properties:' + props, ); }); } @@ -666,15 +666,15 @@ export class AppService private logicTreeByType( logicTreeData: LogicTreeData, branch: SourceBranch, - parent: string + parent: string, ): void { const types = new Set( - branch.mfds.map(mfdBranch => mfdBranch.mfd.props.type) + branch.mfds.map(mfdBranch => mfdBranch.mfd.props.type), ); types.forEach(type => { const typeLabel = [`Branch: ${branch.branch} <br>`, `Type: ${type}`].join( - '' + '', ); logicTreeData.labels.push(typeLabel); @@ -691,7 +691,7 @@ export class AppService * @param serviceResponse MFD service response */ private logicTreeData( - serviceResponse: SourceLogicTreesResponse + serviceResponse: SourceLogicTreesResponse, ): LogicTreeData { const tree = serviceResponse.response; const root = tree.name; @@ -726,7 +726,7 @@ export class AppService */ private responseToPlots( state: AppState, - formGroup: FormGroupControls<ControlForm> + formGroup: FormGroupControls<ControlForm>, ): Map<string, NshmpPlot> { if (state.serviceResponse === null || state.serviceResponse === undefined) { return state.plots; @@ -737,7 +737,7 @@ export class AppService const logicTreePlot = state.plots.get(Plots.LOGIC_TREE); const logicTreePlotData = this.setLogicTreePlotData( state.serviceResponse, - logicTreePlot + logicTreePlot, ); plots.set(Plots.LOGIC_TREE, { ...logicTreePlot, @@ -748,7 +748,7 @@ export class AppService const mfdPlotData = this.setMfdPlotData( state.serviceResponse, mfdPlot, - formGroup.getRawValue() + formGroup.getRawValue(), ); plots.set(Plots.MFD, { ...mfdPlot, @@ -766,7 +766,7 @@ export class AppService */ private setLogicTreePlotData( serviceResponse: SourceLogicTreesResponse, - plot: NshmpPlot + plot: NshmpPlot, ): PlotlyPlot { const {labels, parents, text} = this.logicTreeData(serviceResponse); @@ -797,7 +797,7 @@ export class AppService private setMfdPlotData( serviceResponse: SourceLogicTreesResponse, plot: NshmpPlot, - form: ControlForm + form: ControlForm, ): PlotlyPlot { const tree = serviceResponse.response; @@ -908,13 +908,13 @@ export class AppService this.location.replaceState( apps().source.mfd.routerLink, - new HttpParams().appendAll({...queryParams}).toString() + new HttpParams().appendAll({...queryParams}).toString(), ); } private updateUsageUrl() { const nshmService = this.state().nshmServices.find( - nshm => nshm.model === this.formGroup.getRawValue().model + nshm => nshm.model === this.formGroup.getRawValue().model, ); this.updateState({ diff --git a/projects/nshmp-apps/src/app/source/model-maps/app.component.ts b/projects/nshmp-apps/src/app/source/model-maps/app.component.ts index 37573aeec..5107a4f34 100644 --- a/projects/nshmp-apps/src/app/source/model-maps/app.component.ts +++ b/projects/nshmp-apps/src/app/source/model-maps/app.component.ts @@ -59,14 +59,14 @@ export class AppComponent implements OnInit, OnDestroy { constructor( public service: AppService, - private controlsService: AppControlsService + private controlsService: AppControlsService, ) {} ngOnInit() { this.service.init(); this.controlsSubscription = this.controlsService.controlsChanged.subscribe( - () => this.service.mapRedraw() + () => this.service.mapRedraw(), ); } diff --git a/projects/nshmp-apps/src/app/source/model-maps/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/source/model-maps/components/control-panel/control-panel.component.ts index 0470edd1d..c4fad8611 100644 --- a/projects/nshmp-apps/src/app/source/model-maps/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/source/model-maps/components/control-panel/control-panel.component.ts @@ -57,67 +57,67 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const controls = this.formGroup.controls; this.subs.push( - controls.model.valueChanges.subscribe(() => this.onModelChange()) + controls.model.valueChanges.subscribe(() => this.onModelChange()), ); this.subs.push( controls.hasNshmBoundaryLayer.valueChanges.subscribe(checked => - this.onNshmBoundaryToggle(checked) - ) + this.onNshmBoundaryToggle(checked), + ), ); this.subs.push( controls.hazardTileImt.valueChanges.subscribe(() => - this.createHazardLayer() - ) + this.createHazardLayer(), + ), ); this.subs.push( controls.hazardTileReturnPeriod.valueChanges.subscribe(() => - this.createHazardLayer() - ) + this.createHazardLayer(), + ), ); this.subs.push( controls.hazardTileYear.valueChanges.subscribe(() => - this.onHazardTileYear() - ) + this.onHazardTileYear(), + ), ); this.subs.push( controls.overlayOpacity.valueChanges.subscribe(() => - this.createHazardLayer() - ) + this.createHazardLayer(), + ), ); this.subs.push( controls.latestEarthquakeTime.valueChanges.subscribe(() => - this.service.callEarthquakesService() - ) + this.service.callEarthquakesService(), + ), ); this.subs.push( controls.hasTestSitesLayer.valueChanges.subscribe(checked => - this.onTestSitesToggle(checked) - ) + this.onTestSitesToggle(checked), + ), ); this.subs.push( controls.hasDecollementLayer.valueChanges.subscribe(checked => - this.onFeaturesToggle(checked, FeatureType.DECOLLEMENT) - ) + this.onFeaturesToggle(checked, FeatureType.DECOLLEMENT), + ), ); this.subs.push( controls.hasFaultSectionLayer.valueChanges.subscribe(checked => - this.onFeaturesToggle(checked, FeatureType.FAULT) - ) + this.onFeaturesToggle(checked, FeatureType.FAULT), + ), ); this.subs.push( controls.hasInterfaceSectionsLayer.valueChanges.subscribe(checked => - this.onFeaturesToggle(checked, FeatureType.INTERFACE) - ) + this.onFeaturesToggle(checked, FeatureType.INTERFACE), + ), ); this.subs.push( controls.hasZoneSourcesLayer.valueChanges.subscribe(checked => - this.onFeaturesToggle(checked, FeatureType.ZONE) - ) + this.onFeaturesToggle(checked, FeatureType.ZONE), + ), ); this.subs.push( controls.hasEarthquakesLayer.valueChanges.subscribe(checked => - this.onEartquakesToggle(checked) - ) + this.onEartquakesToggle(checked), + ), ); } @@ -171,9 +171,9 @@ export class ControlPanelComponent implements OnInit, OnDestroy { hazardLayer: this.service.createHazardLayer( this.service.findTile( this.service.hazardTiles(), - this.formGroup.getRawValue() + this.formGroup.getRawValue(), ), - this.formGroup.getRawValue().overlayOpacity + this.formGroup.getRawValue().overlayOpacity, ), }, }); @@ -184,17 +184,17 @@ export class ControlPanelComponent implements OnInit, OnDestroy { this.service .filterTilesByYear( this.service.hazardTiles(), - this.formGroup.getRawValue() + this.formGroup.getRawValue(), ) - .map(tile => tile.imt) + .map(tile => tile.imt), ); this.returnPeriods = new Set( this.service .filterTilesByImt( this.service.hazardTiles(), - this.formGroup.getRawValue() + this.formGroup.getRawValue(), ) - .map(tile => tile.returnPeriod) + .map(tile => tile.returnPeriod), ); this.createHazardLayer(); @@ -205,9 +205,9 @@ export class ControlPanelComponent implements OnInit, OnDestroy { this.service .filterTilesByRegion( this.service.hazardTiles(), - this.formGroup.getRawValue() + this.formGroup.getRawValue(), ) - .map(tile => nshmYear(tile.nshm)) + .map(tile => nshmYear(tile.nshm)), ); this.service.resetState(); } diff --git a/projects/nshmp-apps/src/app/source/model-maps/components/info-popup/info-popup.component.ts b/projects/nshmp-apps/src/app/source/model-maps/components/info-popup/info-popup.component.ts index 5ebc9ba30..147f319f9 100644 --- a/projects/nshmp-apps/src/app/source/model-maps/components/info-popup/info-popup.component.ts +++ b/projects/nshmp-apps/src/app/source/model-maps/components/info-popup/info-popup.component.ts @@ -71,21 +71,21 @@ export class InfoPopupComponent { this.getMfdParameters( this.service.formGroup.getRawValue().model, this.infoPopupData(), - this.service.treesUsageResponse() - ) + this.service.treesUsageResponse(), + ), ); /** Feature properties */ properties = computed(() => { const entries: [string, unknown][] = Object.entries( - this.infoPopupData()?.feature.properties + this.infoPopupData()?.feature.properties, ); return entries.map(([key, value]) => ({key, value})); }); earthquakeProperties = computed( - () => this.earthquakeInfoPopupData().feature.properties + () => this.earthquakeInfoPopupData().feature.properties, ); Keys = Object.keys; @@ -110,7 +110,7 @@ export class InfoPopupComponent { earthquakeDepth(): string { return this.earthquakeInfoPopupData()?.feature.geometry.coordinates[2].toFixed( - 1 + 1, ); } @@ -142,7 +142,7 @@ export class InfoPopupComponent { private getMfdParameters( model: NshmId, infoPopupData: InfoPopupData, - treesUsage: SourceLogicTreesUsage + treesUsage: SourceLogicTreesUsage, ): MfdQuery { if (infoPopupData.feature === null || infoPopupData.featureType === null) { return null; diff --git a/projects/nshmp-apps/src/app/source/model-maps/components/map/map.component.ts b/projects/nshmp-apps/src/app/source/model-maps/components/map/map.component.ts index d5ac1cd40..f9d5ad556 100644 --- a/projects/nshmp-apps/src/app/source/model-maps/components/map/map.component.ts +++ b/projects/nshmp-apps/src/app/source/model-maps/components/map/map.component.ts @@ -54,13 +54,13 @@ export class MapComponent { constructor( public service: AppService, - private zone: NgZone + private zone: NgZone, ) { effect(() => { this.onMap( this.service.map(), this.layers(), - this.formGroup.getRawValue().model + this.formGroup.getRawValue().model, ); }); } @@ -83,7 +83,7 @@ export class MapComponent { this.service.initialState().earthquakeInfoPopupData, infoPopupData: this.service.initialState().infoPopupData, }); - }) + }), ); if (!L.Browser.mobile) { @@ -135,7 +135,7 @@ export class MapComponent { private onTestSitesZoom( testSitesLayer: L.GeoJSON, zoom: number, - model: NshmId + model: NshmId, ): void { if (zoom >= this.siteZoomLevel[model]) { this.testSitesTooltipOpen(testSitesLayer); diff --git a/projects/nshmp-apps/src/app/source/model-maps/services/app.service.ts b/projects/nshmp-apps/src/app/source/model-maps/services/app.service.ts index 1ea217d2f..cb8f3a3d5 100644 --- a/projects/nshmp-apps/src/app/source/model-maps/services/app.service.ts +++ b/projects/nshmp-apps/src/app/source/model-maps/services/app.service.ts @@ -120,7 +120,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private services = this.nshmpHazWs.services.curveServices; readonly formGroup = this.formBuilder.group<ControlForm>( - this.defaultFormValues() + this.defaultFormValues(), ); /** Application state */ readonly state = signal<AppState>(this.initialState()); @@ -133,7 +133,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private http: HttpClient, private zone: NgZone, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { this.addValidators(); } @@ -203,14 +203,14 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { get nshmService(): Signal<NshmMetadata> { return computed(() => this.state().nshmServices.find( - nshm => nshm.model === this.formGroup.getRawValue().model - ) + nshm => nshm.model === this.formGroup.getRawValue().model, + ), ); } get sourceFeaturesUsage(): Signal<FeaturesUsageResponse> { return computed(() => - this.state().sourceFeaturesUsages.get(this.formGroup.getRawValue().model) + this.state().sourceFeaturesUsages.get(this.formGroup.getRawValue().model), ); } @@ -219,13 +219,13 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { */ get treesUsageResponse(): Signal<SourceLogicTreesUsage> { return computed(() => - this.state().treesUsageResponses?.get(this.formGroup.getRawValue().model) + this.state().treesUsageResponses?.get(this.formGroup.getRawValue().model), ); } addValidators(): void { this.formGroup.controls.model.addValidators(control => - Validators.required(control) + Validators.required(control), ); } @@ -241,7 +241,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { baseLayer: nshmpLeaflet.baseLayer(baseLayer), hazardLayer: this.createHazardLayer( this.findTile(this.state().hazardTiles, this.formGroup.getRawValue()), - this.formGroup.getRawValue().overlayOpacity + this.formGroup.getRawValue().overlayOpacity, ), }, }); @@ -343,7 +343,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { nshm => this.nshmpService .callService$<FeaturesUsageResponse>( - `${nshm.url}${this.services.features}` + `${nshm.url}${this.services.features}`, ) .pipe( map(sourceFeaturesUsage => { @@ -351,9 +351,9 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { nshm, sourceFeaturesUsage, }; - }) + }), ), - catchError((error: Error) => this.nshmpService.throwError$(error)) + catchError((error: Error) => this.nshmpService.throwError$(error)), ); return forkJoin(usages$).pipe( @@ -370,7 +370,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { this.resetSourceFeatureControls(); this.callService(); - }) + }), ); } @@ -385,7 +385,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { .pipe(catchError((error: Error) => this.nshmpService.throwError$(error))) .subscribe(response => { const nshmBorder = response.features.find( - feature => feature.id !== 'Extents' + feature => feature.id !== 'Extents', ); this.updateState({ @@ -555,7 +555,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { */ findTile(tiles: HazardTile[], form: ControlForm): HazardTile { return this.filterTilesByImt(tiles, form)?.find( - tile => tile.returnPeriod === form.hazardTileReturnPeriod + tile => tile.returnPeriod === form.hazardTileReturnPeriod, ); } @@ -564,20 +564,20 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.callTreesUsage() .pipe( mergeMap(() => - forkJoin([this.callFeaturesUsages$(), this.callHazardTilesUsage()]) + forkJoin([this.callFeaturesUsages$(), this.callHazardTilesUsage()]), ), catchError(error => { this.initialFormSet(); spinnerRef.close(); console.error(error); return []; - }) + }), ) .subscribe(() => { this.initialFormSet(); @@ -702,7 +702,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { sourceFeatureControl( featureType: FeatureType, featureTypes: string[], - control: AbstractControl<boolean> + control: AbstractControl<boolean>, ): void { control.setValue(false); @@ -737,7 +737,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { const hazardTilesForRegion = this.filterTilesByRegion( hazardTiles, - this.formGroup.getRawValue() + this.formGroup.getRawValue(), ); const defaultTile = [...hazardTilesForRegion].pop(); @@ -761,15 +761,15 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { ...this.layers(), hazardLayer: this.createHazardLayer( defaultTile, - this.formGroup.getRawValue().overlayOpacity + this.formGroup.getRawValue().overlayOpacity, ), }, }); this.formGroup.controls.model.setValue( - this.formGroup.getRawValue().model + this.formGroup.getRawValue().model, ); - }) + }), ); } @@ -777,7 +777,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { return this.hazardService .dynamicNshms$<SourceLogicTreesMetadata>( `${this.nshmpHazWs.url}${this.nshmsEndpoint}`, - environment.webServices.nshmpHazWs.services.curveServices.trees + environment.webServices.nshmpHazWs.services.curveServices.trees, ) .pipe( map(({models, nshmServices, usageResponses}) => { @@ -789,7 +789,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { }), catchError((error: Error) => { return this.nshmpService.throwError$(error); - }) + }), ); } @@ -838,7 +838,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { } private earthquakesToLayer( - earthquakes: GeoJSON.FeatureCollection<GeoJSON.Point> + earthquakes: GeoJSON.FeatureCollection<GeoJSON.Point>, ): L.GeoJSON { const features = earthquakes.features.filter(feature => { const coords = feature.geometry.coordinates; @@ -883,7 +883,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { }, pointToLayer: ( feature: GeoJSON.Feature<GeoJSON.Point, EarthquakeFeatureProperties>, - latlng + latlng, ) => { const layer = L.circle(latlng, { color: 'black', @@ -931,7 +931,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { */ private featureTypeToLayer( fc: GeoJSON.FeatureCollection, - featureType: FeatureType + featureType: FeatureType, ): L.GeoJSON { let color = 'red'; let weight = 2; @@ -1000,11 +1000,11 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private initialControlSet( control: FormControl<boolean>, defaultValue: boolean, - queryValue?: string + queryValue?: string, ): void { if (control.enabled) { control.patchValue( - nshmpUtils.queryParseBoolean(defaultValue, queryValue) + nshmpUtils.queryParseBoolean(defaultValue, queryValue), ); } } @@ -1021,44 +1021,44 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { this.formGroup.patchValue({ hasTestSitesLayer: nshmpUtils.queryParseBoolean( defaultValues.hasTestSitesLayer, - query?.hasTestSitesLayer + query?.hasTestSitesLayer, ), }); this.initialControlSet( controls.hasDecollementLayer, defaultValues.hasDecollementLayer, - query?.hasDecollementLayer + query?.hasDecollementLayer, ); this.initialControlSet( controls.hasEarthquakesLayer, defaultValues.hasEarthquakesLayer, - query?.hasEarthquakesLayer + query?.hasEarthquakesLayer, ); this.initialControlSet( controls.hasFaultSectionLayer, defaultValues.hasFaultSectionLayer, - query?.hasFaultSectionLayer + query?.hasFaultSectionLayer, ); this.initialControlSet( controls.hasHazardTiles, defaultValues.hasHazardTiles, - query?.hasHazardTiles + query?.hasHazardTiles, ); this.initialControlSet( controls.hasInterfaceSectionsLayer, defaultValues.hasInterfaceSectionsLayer, - query?.hasNshmBoundaryLayer + query?.hasNshmBoundaryLayer, ); this.initialControlSet( controls.hasNshmBoundaryLayer, defaultValues.hasNshmBoundaryLayer, - query?.hasNshmBoundaryLayer + query?.hasNshmBoundaryLayer, ); this.initialControlSet( controls.hasZoneSourcesLayer, defaultValues.hasZoneSourcesLayer, - query?.hasZoneSourcesLayer + query?.hasZoneSourcesLayer, ); this.formGroup.valueChanges.subscribe(() => this.updateUrl()); @@ -1074,19 +1074,19 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { /** COUNS NSHM bounds */ const conusBounds = new L.LatLngBounds( new L.LatLng(48.75, -68.8), - new L.LatLng(25.75, -124.25) + new L.LatLng(25.75, -124.25), ); const bounds: Partial<Record<NshmId, L.LatLngBounds>> = { ALASKA_2023: new L.LatLngBounds( new L.LatLng(71.3, -131.7), - new L.LatLng(51.9, -176.7) + new L.LatLng(51.9, -176.7), ), CONUS_2018: conusBounds, CONUS_2023: conusBounds, HAWAII_2021: new L.LatLngBounds( new L.LatLng(22.22, -155.06), - new L.LatLng(19.1, -160.2) + new L.LatLng(19.1, -160.2), ), }; @@ -1117,7 +1117,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private onEachFeatureSourceFeatures( layer: L.GeoJSON, feature: GeoJSON.Feature, - featureType: FeatureType + featureType: FeatureType, ): void { const popupContent = 'Select for properties'; @@ -1155,7 +1155,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private resetSourceFeatureControls(): void { const featureTypes = this.sourceFeaturesUsage().response.featureType.map( - type => type.value + type => type.value, ); const controls = this.formGroup.controls; @@ -1163,22 +1163,22 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { this.sourceFeatureControl( FeatureType.DECOLLEMENT, featureTypes, - controls.hasDecollementLayer + controls.hasDecollementLayer, ); this.sourceFeatureControl( FeatureType.FAULT, featureTypes, - controls.hasFaultSectionLayer + controls.hasFaultSectionLayer, ); this.sourceFeatureControl( FeatureType.INTERFACE, featureTypes, - controls.hasInterfaceSectionsLayer + controls.hasInterfaceSectionsLayer, ); this.sourceFeatureControl( FeatureType.ZONE, featureTypes, - controls.hasZoneSourcesLayer + controls.hasZoneSourcesLayer, ); } @@ -1201,7 +1201,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { */ private toHazardTiles(response: ArcServiceResponse): HazardTile[] { const services = response.services.filter( - service => service.name.includes('hz') || service.name.includes('pga') + service => service.name.includes('hz') || service.name.includes('pga'), ); const hazardTiles: HazardTile[] = []; @@ -1256,15 +1256,15 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { switch (region) { case 'AK': return this.nshmIdFromString( - `${nshmRegion(NshmId.ALASKA_2023)}_${year}` + `${nshmRegion(NshmId.ALASKA_2023)}_${year}`, ); case 'HI': return this.nshmIdFromString( - `${nshmRegion(NshmId.HAWAII_2021)}_${year}` + `${nshmRegion(NshmId.HAWAII_2021)}_${year}`, ); case 'US': return this.nshmIdFromString( - `${nshmRegion(NshmId.CONUS_2023)}_${year}` + `${nshmRegion(NshmId.CONUS_2023)}_${year}`, ); default: throw new Error(`Region [${region}] year [${year}] not supported`); @@ -1292,7 +1292,7 @@ export class AppService implements AppServiceModel<AppState, ControlForm> { private updateUrl(): void { this.location.replaceState( apps().source.data.routerLink, - new HttpParams().appendAll(this.formGroup.getRawValue()).toString() + new HttpParams().appendAll(this.formGroup.getRawValue()).toString(), ); } } diff --git a/projects/nshmp-apps/src/app/source/rates/components/content/content.component.ts b/projects/nshmp-apps/src/app/source/rates/components/content/content.component.ts index bd27c906a..2a6a376a2 100644 --- a/projects/nshmp-apps/src/app/source/rates/components/content/content.component.ts +++ b/projects/nshmp-apps/src/app/source/rates/components/content/content.component.ts @@ -25,7 +25,7 @@ export class ContentComponent { probabilityTableData = computed(() => plotUtils.plotDataToTableData(this.service.plots().probability, { addLabel: true, - }) + }), ); rateTableData = computed(() => @@ -33,7 +33,7 @@ export class ContentComponent { addLabel: true, yLabelTransform: () => 'Rate (1/yr)', yValueFormat: (y: number) => y.toExponential(4), - }) + }), ); constructor(private service: AppService) {} diff --git a/projects/nshmp-apps/src/app/source/rates/components/control-panel/control-panel.component.ts b/projects/nshmp-apps/src/app/source/rates/components/control-panel/control-panel.component.ts index 4f5272b8e..2cdb72325 100644 --- a/projects/nshmp-apps/src/app/source/rates/components/control-panel/control-panel.component.ts +++ b/projects/nshmp-apps/src/app/source/rates/components/control-panel/control-panel.component.ts @@ -61,19 +61,21 @@ export class ControlPanelComponent implements OnInit, OnDestroy { const controls = this.formGroup.controls; this.subs.push( - controls.model.valueChanges.subscribe(() => this.onModelChange()) + controls.model.valueChanges.subscribe(() => this.onModelChange()), ); this.subs.push( - controls.latitude.valueChanges.subscribe(() => this.service.resetState()) + controls.latitude.valueChanges.subscribe(() => this.service.resetState()), ); this.subs.push( - controls.longitude.valueChanges.subscribe(() => this.service.resetState()) + controls.longitude.valueChanges.subscribe(() => + this.service.resetState(), + ), ); this.subs.push( - controls.distance.valueChanges.subscribe(() => this.service.resetState()) + controls.distance.valueChanges.subscribe(() => this.service.resetState()), ); this.subs.push( - controls.timespan.valueChanges.subscribe(() => this.service.resetState()) + controls.timespan.valueChanges.subscribe(() => this.service.resetState()), ); } diff --git a/projects/nshmp-apps/src/app/source/rates/services/app.service.ts b/projects/nshmp-apps/src/app/source/rates/services/app.service.ts index edd7eaea3..96fb4ba27 100644 --- a/projects/nshmp-apps/src/app/source/rates/services/app.service.ts +++ b/projects/nshmp-apps/src/app/source/rates/services/app.service.ts @@ -61,7 +61,7 @@ export class AppService private spinnerService: SpinnerService, private hazardService: HazardService, private route: ActivatedRoute, - private location: LocationService + private location: LocationService, ) { super(); this.addValidators(); @@ -81,7 +81,7 @@ export class AppService return computed( () => this.state().rateResponse !== null && - this.state().probabilityResponse !== null + this.state().probabilityResponse !== null, ); } @@ -91,8 +91,8 @@ export class AppService get nshmService(): Signal<NshmMetadata> { return computed(() => this.state().nshmServices.find( - nshmService => nshmService.model === this.formGroup.getRawValue().model - ) + nshmService => nshmService.model === this.formGroup.getRawValue().model, + ), ); } @@ -115,7 +115,7 @@ export class AppService */ get usage(): Signal<ProbabilityUsage> { return computed(() => - this.state().usageResponses?.get(this.formGroup.getRawValue().model) + this.state().usageResponses?.get(this.formGroup.getRawValue().model), ); } @@ -158,7 +158,7 @@ export class AppService catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(([rateResponse, probabilityResponse]) => { this.handleServiceResponse(rateResponse, probabilityResponse); @@ -251,19 +251,19 @@ export class AppService */ init(): void { const spinnerRef = this.spinnerService.show( - SpinnerService.MESSAGE_METADATA + SpinnerService.MESSAGE_METADATA, ); this.hazardService .dynamicNshms$<ProbabilityRequestMetadata>( `${this.nshmpHazWs.url}${this.nshmpHazWs.services.nshms}`, - this.probabilityEndpoint + this.probabilityEndpoint, ) .pipe( catchError((error: Error) => { spinnerRef.close(); return this.nshmpService.throwError$(error); - }) + }), ) .subscribe(({models, nshmServices, usageResponses}) => { spinnerRef.close(); @@ -351,7 +351,7 @@ export class AppService private createPlot( plot: NshmpPlot, rateData: RateData[], - xRange: number[] + xRange: number[], ): NshmpPlot { const plotData: Partial<PlotData>[] = rateData.map((data, index) => { const xy = hazardUtils.cleanXySequence({ @@ -395,7 +395,7 @@ export class AppService */ private handleServiceResponse( rateResponse: RateResponse, - probabilityResponse: ProbabilityResponse + probabilityResponse: ProbabilityResponse, ): void { this.updateState({ probabilityResponse, @@ -448,12 +448,12 @@ export class AppService probability: this.createPlot( this.plots().probability, probabilityResponse.response.data, - this.xRange(rateData, probData, probPlot.plotData.layout.xaxis.type) + this.xRange(rateData, probData, probPlot.plotData.layout.xaxis.type), ), rate: this.createPlot( this.plots().rate, rateResponse.response.data, - this.xRange(rateData, probData, ratePlot.plotData.layout.xaxis.type) + this.xRange(rateData, probData, ratePlot.plotData.layout.xaxis.type), ), }; } @@ -464,7 +464,7 @@ export class AppService private updateUrl(): void { this.location.replaceState( apps().source.rateAndProbability.routerLink, - new HttpParams().appendAll(this.formGroup.getRawValue()).toString() + new HttpParams().appendAll(this.formGroup.getRawValue()).toString(), ); } @@ -487,7 +487,7 @@ export class AppService private xRange( rateData: RateData[], probaData: RateData[], - axisType: AxisType + axisType: AxisType, ): number[] { const x = [ ...rateData.map(data => data.xvalues), diff --git a/projects/nshmp-apps/src/shared/interceptors/http-error.interceptor.ts b/projects/nshmp-apps/src/shared/interceptors/http-error.interceptor.ts index 1de70ea45..c8ec74b82 100644 --- a/projects/nshmp-apps/src/shared/interceptors/http-error.interceptor.ts +++ b/projects/nshmp-apps/src/shared/interceptors/http-error.interceptor.ts @@ -8,7 +8,7 @@ import {catchError, Observable} from 'rxjs'; export function httpErrorInterceptor( req: HttpRequest<unknown>, - next: HttpHandlerFn + next: HttpHandlerFn, ): Observable<HttpEvent<unknown>> { return next(req).pipe( catchError(error => { @@ -20,6 +20,6 @@ export function httpErrorInterceptor( } throw error; - }) + }), ); } diff --git a/projects/nshmp-apps/src/shared/services/shared.service.ts b/projects/nshmp-apps/src/shared/services/shared.service.ts index effe8ddbc..aca94dbee 100644 --- a/projects/nshmp-apps/src/shared/services/shared.service.ts +++ b/projects/nshmp-apps/src/shared/services/shared.service.ts @@ -28,7 +28,7 @@ export class SharedService { validateNan(): ValidatorFn { return ( - control: AbstractControl<number, number> + control: AbstractControl<number, number>, ): ValidationErrors | null => { return isNaN(control.value) ? {nan: {value: control.value}} : null; }; -- GitLab