all these changes

This commit is contained in:
Jake Kasper
2026-04-09 13:19:47 -05:00
parent e83a51a051
commit 65315f36d1
39102 changed files with 7932979 additions and 567 deletions

20
frontend/node_modules/@turf/rhumb-distance/LICENSE generated vendored Normal file
View File

@@ -0,0 +1,20 @@
The MIT License (MIT)
Copyright (c) 2017 TurfJS
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

67
frontend/node_modules/@turf/rhumb-distance/README.md generated vendored Normal file
View File

@@ -0,0 +1,67 @@
# @turf/rhumb-distance
<!-- Generated by documentation.js. Update this documentation by updating the source code. -->
## rhumbDistance
Calculates the distance along a rhumb line between two [points][1] in degrees, radians,
miles, or kilometers.
**Parameters**
- `from` **[Coord][2]** origin point
- `to` **[Coord][2]** destination point
- `options` **[Object][3]?** Optional parameters
- `options.units` **[string][4]** can be degrees, radians, miles, or kilometers (optional, default `"kilometers"`)
**Examples**
```javascript
var from = turf.point([-75.343, 39.984]);
var to = turf.point([-75.534, 39.123]);
var options = {units: 'miles'};
var distance = turf.rhumbDistance(from, to, options);
//addToMap
var addToMap = [from, to];
from.properties.distance = distance;
to.properties.distance = distance;
```
Returns **[number][5]** distance between the two points
[1]: https://tools.ietf.org/html/rfc7946#section-3.1.2
[2]: https://tools.ietf.org/html/rfc7946#section-3.1.1
[3]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Object
[4]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/String
[5]: https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Number
<!-- This file is automatically generated. Please don't edit it directly:
if you find an error, edit the source file (likely index.js), and re-run
./scripts/generate-readmes in the turf project. -->
---
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.
### Installation
Install this module individually:
```sh
$ npm install @turf/rhumb-distance
```
Or install the Turf module that includes it as a function:
```sh
$ npm install @turf/turf
```

84
frontend/node_modules/@turf/rhumb-distance/dist/es/index.js generated vendored Executable file
View File

@@ -0,0 +1,84 @@
// https://en.wikipedia.org/wiki/Rhumb_line
import { convertLength, earthRadius } from "@turf/helpers";
import { getCoord } from "@turf/invariant";
/**
* Calculates the distance along a rhumb line between two {@link Point|points} in degrees, radians,
* miles, or kilometers.
*
* @name rhumbDistance
* @param {Coord} from origin point
* @param {Coord} to destination point
* @param {Object} [options] Optional parameters
* @param {string} [options.units="kilometers"] can be degrees, radians, miles, or kilometers
* @returns {number} distance between the two points
* @example
* var from = turf.point([-75.343, 39.984]);
* var to = turf.point([-75.534, 39.123]);
* var options = {units: 'miles'};
*
* var distance = turf.rhumbDistance(from, to, options);
*
* //addToMap
* var addToMap = [from, to];
* from.properties.distance = distance;
* to.properties.distance = distance;
*/
function rhumbDistance(from, to, options) {
if (options === void 0) { options = {}; }
var origin = getCoord(from);
var destination = getCoord(to);
// compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
// solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
destination[0] +=
destination[0] - origin[0] > 180
? -360
: origin[0] - destination[0] > 180
? 360
: 0;
var distanceInMeters = calculateRhumbDistance(origin, destination);
var distance = convertLength(distanceInMeters, "meters", options.units);
return distance;
}
/**
* Returns the distance travelling from this point to destination point along a rhumb line.
* Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
*
* @private
* @param {Array<number>} origin point.
* @param {Array<number>} destination point.
* @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).
* @returns {number} Distance in km between this point and destination point (same units as radius).
*
* @example
* var p1 = new LatLon(51.127, 1.338);
* var p2 = new LatLon(50.964, 1.853);
* var d = p1.distanceTo(p2); // 40.31 km
*/
function calculateRhumbDistance(origin, destination, radius) {
// φ => phi
// λ => lambda
// ψ => psi
// Δ => Delta
// δ => delta
// θ => theta
radius = radius === undefined ? earthRadius : Number(radius);
// see www.edwilliams.org/avform.htm#Rhumb
var R = radius;
var phi1 = (origin[1] * Math.PI) / 180;
var phi2 = (destination[1] * Math.PI) / 180;
var DeltaPhi = phi2 - phi1;
var DeltaLambda = (Math.abs(destination[0] - origin[0]) * Math.PI) / 180;
// if dLon over 180° take shorter rhumb line across the anti-meridian:
if (DeltaLambda > Math.PI) {
DeltaLambda -= 2 * Math.PI;
}
// on Mercator projection, longitude distances shrink by latitude; q is the 'stretch factor'
// q becomes ill-conditioned along E-W line (0/0); use empirical tolerance to avoid it
var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1);
// distance is pythagoras on 'stretched' Mercator projection
var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda); // angular distance in radians
var dist = delta * R;
return dist;
}
export default rhumbDistance;

View File

@@ -0,0 +1 @@
{"type":"module"}

View File

@@ -0,0 +1,27 @@
import { Coord, Units } from "@turf/helpers";
/**
* Calculates the distance along a rhumb line between two {@link Point|points} in degrees, radians,
* miles, or kilometers.
*
* @name rhumbDistance
* @param {Coord} from origin point
* @param {Coord} to destination point
* @param {Object} [options] Optional parameters
* @param {string} [options.units="kilometers"] can be degrees, radians, miles, or kilometers
* @returns {number} distance between the two points
* @example
* var from = turf.point([-75.343, 39.984]);
* var to = turf.point([-75.534, 39.123]);
* var options = {units: 'miles'};
*
* var distance = turf.rhumbDistance(from, to, options);
*
* //addToMap
* var addToMap = [from, to];
* from.properties.distance = distance;
* to.properties.distance = distance;
*/
declare function rhumbDistance(from: Coord, to: Coord, options?: {
units?: Units;
}): number;
export default rhumbDistance;

86
frontend/node_modules/@turf/rhumb-distance/dist/js/index.js generated vendored Executable file
View File

@@ -0,0 +1,86 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
// https://en.wikipedia.org/wiki/Rhumb_line
var helpers_1 = require("@turf/helpers");
var invariant_1 = require("@turf/invariant");
/**
* Calculates the distance along a rhumb line between two {@link Point|points} in degrees, radians,
* miles, or kilometers.
*
* @name rhumbDistance
* @param {Coord} from origin point
* @param {Coord} to destination point
* @param {Object} [options] Optional parameters
* @param {string} [options.units="kilometers"] can be degrees, radians, miles, or kilometers
* @returns {number} distance between the two points
* @example
* var from = turf.point([-75.343, 39.984]);
* var to = turf.point([-75.534, 39.123]);
* var options = {units: 'miles'};
*
* var distance = turf.rhumbDistance(from, to, options);
*
* //addToMap
* var addToMap = [from, to];
* from.properties.distance = distance;
* to.properties.distance = distance;
*/
function rhumbDistance(from, to, options) {
if (options === void 0) { options = {}; }
var origin = invariant_1.getCoord(from);
var destination = invariant_1.getCoord(to);
// compensate the crossing of the 180th meridian (https://macwright.org/2016/09/26/the-180th-meridian.html)
// solution from https://github.com/mapbox/mapbox-gl-js/issues/3250#issuecomment-294887678
destination[0] +=
destination[0] - origin[0] > 180
? -360
: origin[0] - destination[0] > 180
? 360
: 0;
var distanceInMeters = calculateRhumbDistance(origin, destination);
var distance = helpers_1.convertLength(distanceInMeters, "meters", options.units);
return distance;
}
/**
* Returns the distance travelling from this point to destination point along a rhumb line.
* Adapted from Geodesy: https://github.com/chrisveness/geodesy/blob/master/latlon-spherical.js
*
* @private
* @param {Array<number>} origin point.
* @param {Array<number>} destination point.
* @param {number} [radius=6371e3] - (Mean) radius of earth (defaults to radius in metres).
* @returns {number} Distance in km between this point and destination point (same units as radius).
*
* @example
* var p1 = new LatLon(51.127, 1.338);
* var p2 = new LatLon(50.964, 1.853);
* var d = p1.distanceTo(p2); // 40.31 km
*/
function calculateRhumbDistance(origin, destination, radius) {
// φ => phi
// λ => lambda
// ψ => psi
// Δ => Delta
// δ => delta
// θ => theta
radius = radius === undefined ? helpers_1.earthRadius : Number(radius);
// see www.edwilliams.org/avform.htm#Rhumb
var R = radius;
var phi1 = (origin[1] * Math.PI) / 180;
var phi2 = (destination[1] * Math.PI) / 180;
var DeltaPhi = phi2 - phi1;
var DeltaLambda = (Math.abs(destination[0] - origin[0]) * Math.PI) / 180;
// if dLon over 180° take shorter rhumb line across the anti-meridian:
if (DeltaLambda > Math.PI) {
DeltaLambda -= 2 * Math.PI;
}
// on Mercator projection, longitude distances shrink by latitude; q is the 'stretch factor'
// q becomes ill-conditioned along E-W line (0/0); use empirical tolerance to avoid it
var DeltaPsi = Math.log(Math.tan(phi2 / 2 + Math.PI / 4) / Math.tan(phi1 / 2 + Math.PI / 4));
var q = Math.abs(DeltaPsi) > 10e-12 ? DeltaPhi / DeltaPsi : Math.cos(phi1);
// distance is pythagoras on 'stretched' Mercator projection
var delta = Math.sqrt(DeltaPhi * DeltaPhi + q * q * DeltaLambda * DeltaLambda); // angular distance in radians
var dist = delta * R;
return dist;
}
exports.default = rhumbDistance;

View File

@@ -0,0 +1,73 @@
{
"name": "@turf/rhumb-distance",
"version": "6.5.0",
"description": "turf rhumb-distance module",
"author": "Turf Authors",
"contributors": [
"Chris Veness <@chrisveness>",
"Stefano Borghi <@stebogit>",
"Denis Carriere <@DenisCarriere>"
],
"license": "MIT",
"bugs": {
"url": "https://github.com/Turfjs/turf/issues"
},
"homepage": "https://github.com/Turfjs/turf",
"repository": {
"type": "git",
"url": "git://github.com/Turfjs/turf.git"
},
"funding": "https://opencollective.com/turf",
"publishConfig": {
"access": "public"
},
"keywords": [
"turf",
"distance",
"rhumb line",
"rhumb",
"loxodrome",
"miles",
"km"
],
"main": "dist/js/index.js",
"module": "dist/es/index.js",
"exports": {
"./package.json": "./package.json",
".": {
"import": "./dist/es/index.js",
"require": "./dist/js/index.js"
}
},
"types": "dist/js/index.d.ts",
"sideEffects": false,
"files": [
"dist"
],
"scripts": {
"bench": "ts-node bench.js",
"build": "npm-run-all build:*",
"build:es": "tsc --outDir dist/es --module esnext --declaration false && echo '{\"type\":\"module\"}' > dist/es/package.json",
"build:js": "tsc",
"docs": "node ../../scripts/generate-readmes",
"test": "npm-run-all test:*",
"test:tape": "ts-node -r esm test.js"
},
"devDependencies": {
"@turf/distance": "^6.5.0",
"@types/tape": "*",
"benchmark": "*",
"load-json-file": "*",
"npm-run-all": "*",
"tape": "*",
"ts-node": "*",
"tslint": "*",
"typescript": "*",
"write-json-file": "*"
},
"dependencies": {
"@turf/helpers": "^6.5.0",
"@turf/invariant": "^6.5.0"
},
"gitHead": "5375941072b90d489389db22b43bfe809d5e451e"
}