diff --git a/benchmarks/stores.ts b/benchmarks/stores.ts index b209a624..6fa4e4db 100644 --- a/benchmarks/stores.ts +++ b/benchmarks/stores.ts @@ -1,5 +1,5 @@ -import { Database } from 'bun:sqlite'; -// import { S2FileStore } from '../src/dataStore/file'; +// import { Database } from 'bun:sqlite'; +import { S2FileStore } from '../src/dataStore/file'; import { S2MMapStore } from '../src/dataStore/mmap'; // import { open } from 'lmdb'; import tmp from 'tmp'; @@ -7,11 +7,11 @@ import tmp from 'tmp'; tmp.setGracefulCleanup(); const dir = tmp.dirSync({ prefix: 'store_benchmarks' }); -// const TEST_SIZE = 1_000_000; const TEST_SIZE = 100_000; -const mmapStore = new S2MMapStore<{ a: number }>(`${dir.name}/mmap`, false, false); -// const fileStore = new S2FileStore<{ a: number }>(`${dir.name}/file`, false, false); +/// ---------------------------------------------- + +const mmapStore = new S2MMapStore<{ a: number }>(`${dir.name}/mmap`); const mmapAddStart = Bun.nanoseconds(); for (let i = 0; i < TEST_SIZE; i++) { @@ -25,14 +25,14 @@ console.info('mmap Add time: ', mmapAddSeconds); // lets sort: const mmapSortStart = Bun.nanoseconds(); -await mmapStore.switchToReadState(); +await mmapStore.sort(); const mmapSortEnd = Bun.nanoseconds(); const mmapSortSeconds = (mmapSortEnd - mmapSortStart) / 1_000_000_000; console.info('mmap Sort time: ', mmapSortSeconds); // query const mmapQueryStart = Bun.nanoseconds(); -const mmapRes = mmapStore.get(22, 1); +const mmapRes = await mmapStore.get(22, 1); const mmapQueryEnd = Bun.nanoseconds(); const mmapQuerySeconds = (mmapQueryEnd - mmapQueryStart) / 1_000_000_000; console.info('mmap Query time: ', mmapQuerySeconds, mmapRes); @@ -41,20 +41,35 @@ console.info('mmap total time: ', mmapAddSeconds + mmapSortSeconds + mmapQuerySe /// ---------------------------------------------- -// const fileAddStart = Bun.nanoseconds(); -// for (let i = 0; i < 10_000; i++) fileStore.set(i, { a: i }); -// const fileAddEnd = Bun.nanoseconds(); -// const fileAddSeconds = (fileAddEnd - fileAddStart) / 1_000_000_000; -// console.info('file Add time: ', fileAddSeconds); +const fileStore = new S2FileStore<{ a: number }>(`${dir.name}/file`); + +const fileAddStart = Bun.nanoseconds(); +for (let i = 0; i < TEST_SIZE; i++) { + const rand = getRandomInt(0, TEST_SIZE); + fileStore.set(rand, { a: rand }); +} +fileStore.set(22, { a: 22 }); +const fileAddEnd = Bun.nanoseconds(); +const fileAddSeconds = (fileAddEnd - fileAddStart) / 1_000_000_000; +console.info('file Add time: ', fileAddSeconds); + +// lets sort: +const fileSortStart = Bun.nanoseconds(); +await fileStore.sort(); +const fileSortEnd = Bun.nanoseconds(); +const fileSortSeconds = (fileSortEnd - fileSortStart) / 1_000_000_000; +console.info('file Sort time: ', fileSortSeconds); + +// query +const fileQueryStart = Bun.nanoseconds(); +const fileRes = await fileStore.get(22, 1); +const fileQueryEnd = Bun.nanoseconds(); +const fileQuerySeconds = (fileQueryEnd - fileQueryStart) / 1_000_000_000; +console.info('file Query time: ', fileQuerySeconds, fileRes); -// // lets sort: -// const fileSortStart = Bun.nanoseconds(); -// fileStore.has(0); -// const fileSortEnd = Bun.nanoseconds(); -// const fileSortSeconds = (fileSortEnd - fileSortStart) / 1_000_000_000; -// console.info('file Sort time: ', fileSortSeconds); +console.info('file total time: ', fileAddSeconds + fileSortSeconds + fileQuerySeconds); -// console.info('file total time: ', fileAddSeconds + fileSortSeconds); +fileStore.close(); /// ---------------------------------------------- @@ -81,35 +96,35 @@ console.info('mmap total time: ', mmapAddSeconds + mmapSortSeconds + mmapQuerySe /// ---------------------------------------------- -const db = new Database(`${dir.name}/sqlite.db`); -db.exec(` - CREATE TABLE IF NOT EXISTS data ( - hi INTEGER NOT NULL, - lo INTEGER NOT NULL, - value BLOB NOT NULL - ); - CREATE INDEX IF NOT EXISTS idx_hi_lo ON data (hi, lo); -`); - -// Adding data as BLOB to SQLite -const sqliteAddStart = Bun.nanoseconds(); -const insert = db.prepare('INSERT INTO data (hi, lo, value) VALUES (?, ?, ?)'); -for (let i = 0; i < TEST_SIZE; i++) { - const rand = getRandomInt(0, TEST_SIZE); - insert.run(0, rand, Buffer.from(JSON.stringify({ a: rand }))); // Storing Buffer as BLOB -} -const sqliteAddEnd = Bun.nanoseconds(); -const sqliteAddSeconds = (sqliteAddEnd - sqliteAddStart) / 1_000_000_000; -console.info('SQLite Add time: ', sqliteAddSeconds); - -// Let's perform a simple lookup to simulate a query -const sqliteQueryStart = Bun.nanoseconds(); -const res = db.prepare('SELECT * FROM data WHERE hi = ? AND lo = ?').get(0, 22); // Query the first entry -const sqliteQueryEnd = Bun.nanoseconds(); -const sqliteQuerySeconds = (sqliteQueryEnd - sqliteQueryStart) / 1_000_000_000; -console.info('SQLite Query time: ', sqliteQuerySeconds, res); - -console.info('SQLite total time: ', sqliteAddSeconds + sqliteQuerySeconds); +// const db = new Database(`${dir.name}/sqlite.db`); +// db.exec(` +// CREATE TABLE IF NOT EXISTS data ( +// hi INTEGER NOT NULL, +// lo INTEGER NOT NULL, +// value BLOB NOT NULL +// ); +// CREATE INDEX IF NOT EXISTS idx_hi_lo ON data (hi, lo); +// `); + +// // Adding data as BLOB to SQLite +// const sqliteAddStart = Bun.nanoseconds(); +// const insert = db.prepare('INSERT INTO data (hi, lo, value) VALUES (?, ?, ?)'); +// for (let i = 0; i < TEST_SIZE; i++) { +// const rand = getRandomInt(0, TEST_SIZE); +// insert.run(0, rand, Buffer.from(JSON.stringify({ a: rand }))); // Storing Buffer as BLOB +// } +// const sqliteAddEnd = Bun.nanoseconds(); +// const sqliteAddSeconds = (sqliteAddEnd - sqliteAddStart) / 1_000_000_000; +// console.info('SQLite Add time: ', sqliteAddSeconds); + +// // Let's perform a simple lookup to simulate a query +// const sqliteQueryStart = Bun.nanoseconds(); +// const res = db.prepare('SELECT * FROM data WHERE hi = ? AND lo = ?').get(0, 22); // Query the first entry +// const sqliteQueryEnd = Bun.nanoseconds(); +// const sqliteQuerySeconds = (sqliteQueryEnd - sqliteQueryStart) / 1_000_000_000; +// console.info('SQLite Query time: ', sqliteQuerySeconds, res); + +// console.info('SQLite total time: ', sqliteAddSeconds + sqliteQuerySeconds); /** * Generate a random whole number between two given values. diff --git a/bun.lockb b/bun.lockb index 008a64f6..f54d8435 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/package.json b/package.json index 2054e57b..4d4fa5ab 100755 --- a/package.json +++ b/package.json @@ -63,16 +63,16 @@ "homepage": "https://github.com/Open-S2/s2-tools#readme", "devDependencies": { "@skypack/package-check": "^0.2.2", - "@types/bun": "^1.1.9", + "@types/bun": "^1.1.10", "@types/node": "^22.5.5", "@types/tmp": "^0.2.6", - "eslint": "^9.10.0", + "eslint": "^9.11.1", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-jsdoc": "^50.2.3", + "eslint-plugin-jsdoc": "^50.3.0", "eslint-plugin-prettier": "^5.2.1", "eslint-plugin-tsdoc": "^0.3.0", "geotiff": "^2.1.3", - "lmdb": "^3.1.2", + "lmdb": "^3.1.3", "nextafter": "^1.0.0", "prettier": "^3.3.3", "robust-orientation": "^1.2.1", @@ -80,11 +80,10 @@ "typedoc": "^0.26.7", "typedoc-plugin-coverage": "^3.3.0", "typescript": "^5.6.2", - "typescript-eslint": "^8.5.0" + "typescript-eslint": "^8.7.0" }, "dependencies": { "earclip": "^1.1.0", - "latest": "^0.2.0", "open-vector-tile": "^1.3.0", "s2-tilejson": "^1.6.0", "s2json-spec": "^1.5.5", diff --git a/proj4js-master/.github/workflows/build-and-test.yml b/proj4js-master/.github/workflows/build-and-test.yml deleted file mode 100644 index b1ce32d7..00000000 --- a/proj4js-master/.github/workflows/build-and-test.yml +++ /dev/null @@ -1,31 +0,0 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - -name: Node.js CI - -on: - push: - branches: [ "master" ] - pull_request: - branches: [ "master" ] - -jobs: - build: - - runs-on: ubuntu-latest - - strategy: - matrix: - node-version: [14.x, 16.x, 18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ - - steps: - - uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test diff --git a/proj4js-master/.gitignore b/proj4js-master/.gitignore deleted file mode 100644 index e7af7c18..00000000 --- a/proj4js-master/.gitignore +++ /dev/null @@ -1,7 +0,0 @@ -*~ -node_modules -.c9revisions -coverage -projs.js -.DS_STORE -dist diff --git a/proj4js-master/.jshintrc b/proj4js-master/.jshintrc deleted file mode 100644 index 86a6e6fa..00000000 --- a/proj4js-master/.jshintrc +++ /dev/null @@ -1,12 +0,0 @@ -{ - "esversion": 6, - "curly": true, - "eqeqeq": true, - "latedef": "nofunc", - "undef": true, - "unused": true, - "trailing": true, - "indent": 2, - "browser": true, - "node": true -} \ No newline at end of file diff --git a/proj4js-master/.npmignore b/proj4js-master/.npmignore deleted file mode 100644 index f085fab8..00000000 --- a/proj4js-master/.npmignore +++ /dev/null @@ -1,3 +0,0 @@ -*~ -.c9revisions -coverage diff --git a/proj4js-master/AUTHORS b/proj4js-master/AUTHORS deleted file mode 100644 index 1d39107a..00000000 --- a/proj4js-master/AUTHORS +++ /dev/null @@ -1,25 +0,0 @@ -Mike Adair -Richard Greenwood -Calvin Metcalf -Richard Marsden (http://www.winwaed.com) -#credit for -#src/projCode/gnom.js -#src/projCode/cea.js -T. Mittan -#credit for -#src/projCode/eqdc.js -#src/projCode/equi.js -#src/projCode/merc.js -#src/projCode/mill.js -#src/projCode/omerc.js -#src/projCode/ortho.js -#src/projCode/poly.js -#src/projCode/poly.js -D. Steinwand -#credit for -#src/projCode/merc.js -#src/projCode/laea.js -#src/projCode/moll.js -S. Nelson -#credit for -#src/projCode/moll.js \ No newline at end of file diff --git a/proj4js-master/Gruntfile.js b/proj4js-master/Gruntfile.js deleted file mode 100644 index 20f38993..00000000 --- a/proj4js-master/Gruntfile.js +++ /dev/null @@ -1,128 +0,0 @@ -var json = require('rollup-plugin-json'); -var nodeResolve = require('rollup-plugin-node-resolve'); -var replace = require('rollup-plugin-replace'); -var pkg = require('./package.json'); - -var projs = [ - 'tmerc', - 'etmerc', - 'utm', - 'sterea', - 'stere', - 'somerc', - 'omerc', - 'lcc', - 'krovak', - 'cass', - 'laea', - 'aea', - 'gnom', - 'cea', - 'eqc', - 'poly', - 'nzmg', - 'mill', - 'sinu', - 'moll', - 'eqdc', - 'vandg', - 'aeqd', - 'ortho', - 'qsc', - 'robin', - 'geocent', - 'tpers', - 'geos', - 'eqearth', - 'bonne' -]; -module.exports = function (grunt) { - grunt.initConfig({ - pkg: grunt.file.readJSON('package.json'), - connect: { - server: { - options: { - port: process.env.PORT || 8080, - base: '.' - } - } - }, - mocha_phantomjs: { - all: { - options: { - reporter: "dot", - urls: [ //my ide requries process.env.IP and PORT - "http://" + (process.env.IP || "127.0.0.1") + ":" + (process.env.PORT || "8080") + "/test/amd.html", - "http://" + (process.env.IP || "127.0.0.1") + ":" + (process.env.PORT || "8080") + "/test/opt.html" - ] - } - } - }, - jshint: { - options: { - jshintrc: "./.jshintrc" - }, - all: ['./lib/*.js', './lib/*/*.js'] - }, - rollup: { - options: { - format: "umd", - moduleName: "proj4", - plugins: [ - replace({ - __VERSION__: pkg.version - }), - json(), - nodeResolve() - ] - }, - files: { - dest: './dist/proj4-src.js', - src: './lib/index.js', - }, - }, - uglify: { - options: { - report: 'gzip', - mangle:{ - reserved: ['proj4','Projection','Point'] - }, - }, - all: { - src: 'dist/proj4-src.js', - dest: 'dist/proj4.js' - } - } - }); - grunt.loadNpmTasks('grunt-rollup'); - grunt.loadNpmTasks('grunt-contrib-uglify'); - grunt.loadNpmTasks('grunt-contrib-jshint'); - grunt.loadNpmTasks('grunt-contrib-connect'); - grunt.loadNpmTasks('grunt-mocha-phantomjs'); - grunt.registerTask('custom',function(){ - grunt.task.run('rollup', 'uglify'); - var projections = this.args; - if(projections[0]==='default'){ - grunt.file.write('./projs.js','export default function(){}'); - return; - } - if(projections[0]==='all'){ - projections = projs; - } - grunt.file.write('./projs.js',[ - projections.map(function(proj) { - return "import " + proj + " from './lib/projections/" + proj + "';"; - }).join("\n"), - "export default function(proj4){", - projections.map(function(proj) { - return " proj4.Proj.projections.add(" + proj + ");" - }).join("\n"), - "}" - ].join("\n")); - }); - grunt.registerTask('build',function(){ - var args = this.args.length?this.args[0].split(','):['default']; - grunt.task.run('jshint', 'custom:'+args.join(':')); - }); - grunt.registerTask('default', ['build:all', 'connect','mocha_phantomjs']); -}; diff --git a/proj4js-master/LICENSE.md b/proj4js-master/LICENSE.md deleted file mode 100644 index d1d91072..00000000 --- a/proj4js-master/LICENSE.md +++ /dev/null @@ -1,29 +0,0 @@ -## Proj4js -- Javascript reprojection library. - -Authors: -- Mike Adair madairATdmsolutions.ca -- Richard Greenwood richATgreenwoodmap.com -- Didier Richard didier.richardATign.fr -- Stephen Irons stephen.ironsATclear.net.nz -- Olivier Terral oterralATgmail.com -- Calvin Metcalf cmetcalfATappgeo.com - -Copyright (c) 2014, Mike Adair, Richard Greenwood, Didier Richard, Stephen Irons, Olivier Terral and Calvin Metcalf - - 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._ diff --git a/proj4js-master/PUBLISHING.md b/proj4js-master/PUBLISHING.md deleted file mode 100644 index c8e969a7..00000000 --- a/proj4js-master/PUBLISHING.md +++ /dev/null @@ -1,22 +0,0 @@ -Publishing -=== - -Make sure you have the latest from the main branch: - - git pull origin master - -Use `tin` to update the version number in the `package.json`, `component.json` & `bower.json`. - - tin -v x.y.z - -Then run the publish script - - ./publish.sh - -afterwards don't forget to update the versions to be a prerelease of the next version, so if you just published 1.1.1 then: - - tin -v 1.1.2-alpha - npm install - git add package.json package-lock.json component.json bower.json - git commit -m 'update version to 1.1.2-alpha' - git push origin master diff --git a/proj4js-master/README.md b/proj4js-master/README.md deleted file mode 100644 index 1736641b..00000000 --- a/proj4js-master/README.md +++ /dev/null @@ -1,196 +0,0 @@ -# PROJ4JS ![Build Status](https://github.com/proj4js/proj4js/actions/workflows/build-and-test.yml/badge.svg) - -Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations. -Originally a port of [PROJ](https://proj.org/) ([then known as PROJ.4](https://proj.org/faq.html#what-happened-to-proj-4)) and GCTCP C ([Archive](https://web.archive.org/web/20130523091752/http://edcftp.cr.usgs.gov/pub/software/gctpc/)) it is -a part of the [MetaCRS](https://trac.osgeo.org/metacrs/wiki) group of projects. - -## Installing - -Depending on your preferences - -```bash -npm install proj4 -bower install proj4 -component install proj4js/proj4js -``` - -or just manually grab the file `proj4.js` from the [latest release](https://github.com/proj4js/proj4js/releases)'s `dist/` folder. - -If you do not want to download anything, Proj4js is also hosted on [cdnjs](https://www.cdnjs.com/libraries/proj4js) for direct use in your browser applications. - -## Using - -The basic signature is: - -```javascript -proj4([fromProjection, ]toProjection[, coordinates]) -``` - -Projections can be proj or wkt strings. - -Wkt strings must be in form of [version 1](https://docs.ogc.org/is/18-010r7/18-010r7.html#196) (earlier than 2015). Have a look at the [wkt-parser](https://github.com/proj4js/wkt-parser) for more info, or use proj strings instead. - -Coordinates may be an object of the form `{x:x,y:y}` or an array of the form `[x,y]`. - -When all 3 arguments are given, the result is that the coordinates are transformed from projection1 to projection 2. And returned in the same format that they were given in. - -```javascript -var firstProjection = 'PROJCS["NAD83 / Massachusetts Mainland",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","26986"],AXIS["X",EAST],AXIS["Y",NORTH]]'; -var secondProjection = "+proj=gnom +lat_0=90 +lon_0=0 +x_0=6300000 +y_0=6300000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"; -//I'm not going to redefine those two in latter examples. -proj4(firstProjection,secondProjection,[-122.305887, 58.9465872]); -// [-2690575.447893817, 36622916.8071244564] -``` - -The library can also parse coordinates provided with an elevation and measure, again as an object of the form `{x:x,y:y,z:z,m:m}` or an array of the form `[x,y,z,m]`. - -```javascript -proj4(firstProjection,secondProjection,[-122.305887, 58.9465872,10]); -// [-2690575.447893817, 36622916.8071244564, 10] -``` - -If only 1 projection is given then it is assumed that it is being projected *from* WGS84 (fromProjection is WGS84). - -```javascript -proj4(firstProjection,[-71,41]); -// [242075.00535055372, 750123.32090043] -``` - -If no coordinates are given an object with two methods is returned, its methods are `forward` which projects from the first projection to the second and `inverse` which projects from the second to the first. - -```javascript -proj4(firstProjection,secondProjection).forward([-122.305887, 58.9465872]); -// [-2690575.447893817, 36622916.8071244564] -proj4(secondProjection,firstProjection).inverse([-122.305887, 58.9465872]); -// [-2690575.447893817, 36622916.8071244564] -``` - -And as above if only one projection is given, it's assumed to be coming from wgs84: - -```javascript -proj4(firstProjection).forward([-71,41]); -// [242075.00535055372, 750123.32090043] -proj4(firstProjection).inverse([242075.00535055372, 750123.32090043]); -// [-71, 40.99999999999986] -``` -Note: The generation of the floating point value `40.99999999999986` in this example represents the fact that some variance in precision is involved in any conversion between one coordinate reference system and another. - -## Named Projections - -If you prefer to define a projection as a string and reference it that way, you may use the proj4.defs method which can be called 2 ways, with a name and projection: - -```js -proj4.defs('WGS84', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"); -``` - -or with an array - -```js -proj4.defs([ - [ - 'EPSG:4326', - '+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees'], - [ - 'EPSG:4269', - '+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees' - ] -]); -``` - -you can then do - -```js -proj4('EPSG:4326'); -``` - -instead of writing out the whole proj definition, by default proj4 has the following projections predefined: - -- 'EPSG:4326', which has the following alias - - 'WGS84' -- 'EPSG:4269' -- 'EPSG:3857', which has the following aliases - - 'EPSG:3785' - - 'GOOGLE' - - 'EPSG:900913' - - 'EPSG:102113' - -Defined projections can also be accessed through the proj4.defs function (`proj4.defs('EPSG:4326')`). - -proj4.defs can also be used to define a named alias: - -```javascript -proj4.defs('urn:x-ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326')); -``` - -## Axis order - -By default, proj4 uses `[x,y]` axis order for projected (cartesian) coordinate systems and `[x=longitude,y=latitude]` for geographic coordinates. To enforce the axis order of the provided proj or wkt string, use the -```javascript -proj4(fromProjection, toProjection).forward(coordinate, enforceAxis); -proj4(fromProjection, toProjection).inverse(coordinate, enforceAxis); -``` -signatures with `enforceAxis` set to `true`: -```javascript -proj4('+proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees +axis=neu', firstProjection).forward([41, -71], true); -// [242075.00535055372, 750123.32090043] -proj4('+proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees +axis=neu', firstProjection).inverse([242075.00535055372, 750123.32090043], true); -//[40.99999999999986, -71] -//the floating points to answer your question -``` - -## Grid Based Datum Adjustments - -To use `+nadgrids=` in a proj definition, first read your NTv2 `.gsb` file (e.g. from https://github.com/OSGeo/proj-datumgrid) into an ArrayBuffer, then pass it to `proj4.nadgrid`. E.g: - -```javascript -const buffer = fs.readFileSync('ntv2.gsb').buffer -proj4.nadgrid('key', buffer); -``` - -then use the given key in your definition, e.g. `+nadgrids=@key,null`. See [Grid Based Datum Adjustments](https://proj.org/usage/transformation.html?highlight=nadgrids#grid-based-datum-adjustments). - -## TypeScript - -TypeScript implementation was added to the [DefinitelyTyped repository](https://github.com/DefinitelyTyped/DefinitelyTyped). - -```bash -$ npm install --save @types/proj4 -``` - -## Developing -To set up build tools make sure you have node and grunt-cli installed and then run `npm install`. - -To do the complete build and browser tests run - -```bash -node_modules/.bin/grunt -``` - -To run node tests run - -```bash -npm test -``` - -To run node tests with coverage run - -```bash -npm test --coverage -``` - -To create a build with only default projections (latlon and Mercator) run - -```bash -node_modules/.bin/grunt build -``` - -To create a build with only custom projections include a comma separated list of projections codes (the file name in 'lib/projections' without the '.js') after a colon, e.g. - -```bash -node_modules/.bin/grunt build:tmerc -#includes transverse Mercator -node_modules/.bin/grunt build:lcc -#includes lambert conformal conic -node_modules/.bin/grunt build:omerc,moll -#includes oblique Mercator and Mollweide -``` diff --git a/proj4js-master/REFERENCES.md b/proj4js-master/REFERENCES.md deleted file mode 100644 index 114fda43..00000000 --- a/proj4js-master/REFERENCES.md +++ /dev/null @@ -1,33 +0,0 @@ -1. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological Survey - Professional Paper 1395 (Supersedes USGS Bulletin 1532), - United States Government Printing Office, Washington D.C., 1987. - Accessed: 2016-05-09. https://pubs.er.usgs.gov/publication/pp1395 -2. Snyder, John P. and Voxland, Philip M., "An Album of Map Projections", - U.S. Geological Survey Professional Paper 1453 , - United State Government Printing Office, Washington D.C., 1989. - Accessed: 2016-05-09. https://pubs.er.usgs.gov/publication/pp1453 -3. "Cartographic Projection Procedures for the UNIX Environment- - A User's Manual" by Gerald I. Evenden, - USGS Open File Report 90-284 and Release 4 Interim Reports (2003). - Accessed: 2016-06-09. http://www2.bren.ucsb.edu/~frew/ESM264/private/proj_manual.pdf -4. Snyder, John P., "Flattening the Earth - - Two Thousand Years of Map Projections", Univ. Chicago Press, 1993 -5. Wolfram Mathworld "Gnomonic Projection" - http://mathworld.wolfram.com/GnomonicProjection.html - Accessed: 12th November 2009 -6. "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, - The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. -7. Snyder, John P., "Map Projections--A Working Manual", U.S. Geological - Survey Professional Paper 1395 (Supersedes USGS Bulletin 1532), United - State Government Printing Office, Washington D.C., 1987. - Access date 2016-05-09. https://pubs.er.usgs.gov/publication/pp1395 -8. "Software Documentation for GCTP General Cartographic Transformation - Package", U.S. Geological Survey National Mapping Division, May 1982. -9. Department of Land and Survey Technical Circular 1973/32 - http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf -10. OSG Technical Report 4.1 - http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf -11. Formules et constantes pour le Calcul pour la - projection cylindrique conforme à axe oblique et pour la transformation entre - des systèmes de référence. - http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf diff --git a/proj4js-master/bower.json b/proj4js-master/bower.json deleted file mode 100644 index d45cfdcb..00000000 --- a/proj4js-master/bower.json +++ /dev/null @@ -1,24 +0,0 @@ -{ - "name": "proj4", - "version": "2.12.2-alpha", - "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.", - "homepage": "https://github.com/proj4js/proj4js", - "main": "dist/proj4.js", - "keywords": [ - "gis", - "projections", - "geospatial", - "transform", - "datum" - ], - "license": "MIT", - "ignore": [ - "**/.*", - "node_modules", - "bower_components", - "test", - "tests", - "almond", - "src" - ] -} diff --git a/proj4js-master/bun.lockb b/proj4js-master/bun.lockb deleted file mode 100755 index b10468f9..00000000 Binary files a/proj4js-master/bun.lockb and /dev/null differ diff --git a/proj4js-master/changelog.md b/proj4js-master/changelog.md deleted file mode 100644 index 7901d495..00000000 --- a/proj4js-master/changelog.md +++ /dev/null @@ -1,21 +0,0 @@ -Change log -=== -- 2.2.1: Documentation fixes and added proj4.defs('name') as an alias for proj4.defs['name']; - -- 2.1.4: dist folder is added back in after accidentally omitting it in 2.1.1 - -- 2.1.3: skipped as issues with the dist folder are ironed out. - -- 2.1.2: added sensible defaults for false eastings/northings - -- 2.1.1: tweaks to how we publish it, fixes related to errors with the OSGB36 and Reseau National Belge 1972 datums, we took the first steps towards depreciating the proj4.Point class. - -- 2.1.0: targeted builds for projections are now supported, and internally projection creation is more modular. - -- 2.0.3: mgrs is broken out into it's own module loaded via npm. - -- 2.0.2: module common is broken up into a collection of smaller modules. - -- 2.0.1: fix typo in eqc projection. - -- 2.0.0: we start the change log. \ No newline at end of file diff --git a/proj4js-master/component.json b/proj4js-master/component.json deleted file mode 100644 index e917cefa..00000000 --- a/proj4js-master/component.json +++ /dev/null @@ -1,17 +0,0 @@ -{ - "name": "proj4", - "version": "2.12.2-alpha", - "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.", - "repo": "proj4js/proj4js", - "keywords": [ - "projections", - "proj4", - "transform", - "crs" - ], - "license": "MIT", - "main": "dist/proj4.js", - "scripts": [ - "dist/proj4.js" - ] -} diff --git a/proj4js-master/lib/Point.js b/proj4js-master/lib/Point.js deleted file mode 100644 index 91b12ab4..00000000 --- a/proj4js-master/lib/Point.js +++ /dev/null @@ -1,34 +0,0 @@ -import {toPoint, forward} from 'mgrs'; - -function Point(x, y, z) { - if (!(this instanceof Point)) { - return new Point(x, y, z); - } - if (Array.isArray(x)) { - this.x = x[0]; - this.y = x[1]; - this.z = x[2] || 0.0; - } else if(typeof x === 'object') { - this.x = x.x; - this.y = x.y; - this.z = x.z || 0.0; - } else if (typeof x === 'string' && typeof y === 'undefined') { - var coords = x.split(','); - this.x = parseFloat(coords[0], 10); - this.y = parseFloat(coords[1], 10); - this.z = parseFloat(coords[2], 10) || 0.0; - } else { - this.x = x; - this.y = y; - this.z = z || 0.0; - } - console.warn('proj4.Point will be removed in version 3, use proj4.toPoint'); -} - -Point.fromMGRS = function(mgrsStr) { - return new Point(toPoint(mgrsStr)); -}; -Point.prototype.toMGRS = function(accuracy) { - return forward([this.x, this.y], accuracy); -}; -export default Point; diff --git a/proj4js-master/lib/Proj.js b/proj4js-master/lib/Proj.js deleted file mode 100644 index 885f4bb5..00000000 --- a/proj4js-master/lib/Proj.js +++ /dev/null @@ -1,75 +0,0 @@ -import parseCode from './parseCode'; -import extend from './extend'; -import projections from './projections'; -import {sphere as dc_sphere, eccentricity as dc_eccentricity} from './deriveConstants'; -import Datum from './constants/Datum'; -import datum from './datum'; -import match from './match'; -import {getNadgrids} from "./nadgrid"; - -function Projection(srsCode,callback) { - if (!(this instanceof Projection)) { - return new Projection(srsCode); - } - callback = callback || function(error){ - if(error){ - throw error; - } - }; - var json = parseCode(srsCode); - // console.log('json', json) - if(typeof json !== 'object'){ - callback('Could not parse to valid json: ' + srsCode); - return; - } - var ourProj = Projection.projections.get(json.projName); - if(!ourProj){ - callback('Could not get projection name from: ' + srsCode); - return; - } - if (json.datumCode && json.datumCode !== 'none') { - var datumDef = match(Datum, json.datumCode); - if (datumDef) { - json.datum_params = json.datum_params || (datumDef.towgs84 ? datumDef.towgs84.split(',') : null); - json.ellps = datumDef.ellipse; - json.datumName = datumDef.datumName ? datumDef.datumName : json.datumCode; - } - } - json.k0 = json.k0 || 1.0; - json.axis = json.axis || 'enu'; - json.ellps = json.ellps || 'wgs84'; - json.lat1 = json.lat1 || json.lat0; // Lambert_Conformal_Conic_1SP, for example, needs this - - var sphere_ = dc_sphere(json.a, json.b, json.rf, json.ellps, json.sphere); - var ecc = dc_eccentricity(sphere_.a, sphere_.b, sphere_.rf, json.R_A); - var nadgrids = getNadgrids(json.nadgrids); - var datumObj = json.datum || datum(json.datumCode, json.datum_params, sphere_.a, sphere_.b, ecc.es, ecc.ep2, - nadgrids); - - extend(this, json); // transfer everything over from the projection because we don't know what we'll need - extend(this, ourProj); // transfer all the methods from the projection - - // copy the 4 things over we calculated in deriveConstants.sphere - this.a = sphere_.a; - this.b = sphere_.b; - this.rf = sphere_.rf; - this.sphere = sphere_.sphere; - - // copy the 3 things we calculated in deriveConstants.eccentricity - this.es = ecc.es; - this.e = ecc.e; - this.ep2 = ecc.ep2; - - // add in the datum object - this.datum = datumObj; - - // init the projection - this.init(); - - // legecy callback from back in the day when it went to spatialreference.org - callback(null, this); - -} -Projection.projections = projections; -Projection.projections.start(); -export default Projection; diff --git a/proj4js-master/lib/adjust_axis.js b/proj4js-master/lib/adjust_axis.js deleted file mode 100644 index f36c895c..00000000 --- a/proj4js-master/lib/adjust_axis.js +++ /dev/null @@ -1,61 +0,0 @@ -export default function(crs, denorm, point) { - var xin = point.x, - yin = point.y, - zin = point.z || 0.0; - var v, t, i; - var out = {}; - for (i = 0; i < 3; i++) { - if (denorm && i === 2 && point.z === undefined) { - continue; - } - if (i === 0) { - v = xin; - if ("ew".indexOf(crs.axis[i]) !== -1) { - t = 'x'; - } else { - t = 'y'; - } - - } - else if (i === 1) { - v = yin; - if ("ns".indexOf(crs.axis[i]) !== -1) { - t = 'y'; - } else { - t = 'x'; - } - } - else { - v = zin; - t = 'z'; - } - switch (crs.axis[i]) { - case 'e': - out[t] = v; - break; - case 'w': - out[t] = -v; - break; - case 'n': - out[t] = v; - break; - case 's': - out[t] = -v; - break; - case 'u': - if (point[t] !== undefined) { - out.z = v; - } - break; - case 'd': - if (point[t] !== undefined) { - out.z = -v; - } - break; - default: - //console.log("ERROR: unknow axis ("+crs.axis[i]+") - check definition of "+crs.projName); - return null; - } - } - return out; -} diff --git a/proj4js-master/lib/checkSanity.js b/proj4js-master/lib/checkSanity.js deleted file mode 100644 index d2bdf1d1..00000000 --- a/proj4js-master/lib/checkSanity.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function (point) { - checkCoord(point.x); - checkCoord(point.y); -} -function checkCoord(num) { - if (typeof Number.isFinite === 'function') { - if (Number.isFinite(num)) { - return; - } - throw new TypeError('coordinates must be finite numbers'); - } - if (typeof num !== 'number' || num !== num || !isFinite(num)) { - throw new TypeError('coordinates must be finite numbers'); - } -} diff --git a/proj4js-master/lib/common/acosh.js b/proj4js-master/lib/common/acosh.js deleted file mode 100644 index 4997f3cd..00000000 --- a/proj4js-master/lib/common/acosh.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return 2 * Math.log(Math.sqrt((x + 1) / 2) + Math.sqrt((x - 1) / 2)); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/adjust_lat.js b/proj4js-master/lib/common/adjust_lat.js deleted file mode 100644 index be4c6678..00000000 --- a/proj4js-master/lib/common/adjust_lat.js +++ /dev/null @@ -1,6 +0,0 @@ -import {HALF_PI} from '../constants/values'; -import sign from './sign'; - -export default function(x) { - return (Math.abs(x) < HALF_PI) ? x : (x - (sign(x) * Math.PI)); -} diff --git a/proj4js-master/lib/common/adjust_lon.js b/proj4js-master/lib/common/adjust_lon.js deleted file mode 100644 index e2f60a3c..00000000 --- a/proj4js-master/lib/common/adjust_lon.js +++ /dev/null @@ -1,7 +0,0 @@ - -import {TWO_PI, SPI} from '../constants/values'; -import sign from './sign'; - -export default function(x) { - return (Math.abs(x) <= SPI) ? x : (x - (sign(x) * TWO_PI)); -} diff --git a/proj4js-master/lib/common/adjust_zone.js b/proj4js-master/lib/common/adjust_zone.js deleted file mode 100644 index 49d457b9..00000000 --- a/proj4js-master/lib/common/adjust_zone.js +++ /dev/null @@ -1,14 +0,0 @@ -import adjust_lon from './adjust_lon'; - -export default function(zone, lon) { - if (zone === undefined) { - zone = Math.floor((adjust_lon(lon) + Math.PI) * 30 / Math.PI) + 1; - - if (zone < 0) { - return 0; - } else if (zone > 60) { - return 60; - } - } - return zone; -} diff --git a/proj4js-master/lib/common/asinh.js b/proj4js-master/lib/common/asinh.js deleted file mode 100644 index 51627eea..00000000 --- a/proj4js-master/lib/common/asinh.js +++ /dev/null @@ -1,4 +0,0 @@ -export default function(x) { - var s = (x >= 0 ? 1 : -1); - return s * (Math.log(Math.abs(x) + Math.sqrt(x * x + 1))); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/asinhy.js b/proj4js-master/lib/common/asinhy.js deleted file mode 100644 index a153f170..00000000 --- a/proj4js-master/lib/common/asinhy.js +++ /dev/null @@ -1,9 +0,0 @@ -import hypot from './hypot'; -import log1py from './log1py'; - -export default function(x) { - var y = Math.abs(x); - y = log1py(y * (1 + y / (hypot(1, y) + 1))); - - return x < 0 ? -y : y; -} diff --git a/proj4js-master/lib/common/asinz.js b/proj4js-master/lib/common/asinz.js deleted file mode 100644 index 8f27ed69..00000000 --- a/proj4js-master/lib/common/asinz.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function(x) { - if (Math.abs(x) > 1) { - x = (x > 1) ? 1 : -1; - } - return Math.asin(x); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/atanh.js b/proj4js-master/lib/common/atanh.js deleted file mode 100644 index 2b082dc4..00000000 --- a/proj4js-master/lib/common/atanh.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return Math.log((x - 1) / (x + 1)) / 2; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/clens.js b/proj4js-master/lib/common/clens.js deleted file mode 100644 index 79ece524..00000000 --- a/proj4js-master/lib/common/clens.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function(pp, arg_r) { - var r = 2 * Math.cos(arg_r); - var i = pp.length - 1; - var hr1 = pp[i]; - var hr2 = 0; - var hr; - - while (--i >= 0) { - hr = -hr2 + r * hr1 + pp[i]; - hr2 = hr1; - hr1 = hr; - } - - return Math.sin(arg_r) * hr; -} diff --git a/proj4js-master/lib/common/clens_cmplx.js b/proj4js-master/lib/common/clens_cmplx.js deleted file mode 100644 index d149d8c8..00000000 --- a/proj4js-master/lib/common/clens_cmplx.js +++ /dev/null @@ -1,32 +0,0 @@ -import sinh from './sinh'; -import cosh from './cosh'; - -export default function(pp, arg_r, arg_i) { - var sin_arg_r = Math.sin(arg_r); - var cos_arg_r = Math.cos(arg_r); - var sinh_arg_i = sinh(arg_i); - var cosh_arg_i = cosh(arg_i); - var r = 2 * cos_arg_r * cosh_arg_i; - var i = -2 * sin_arg_r * sinh_arg_i; - var j = pp.length - 1; - var hr = pp[j]; - var hi1 = 0; - var hr1 = 0; - var hi = 0; - var hr2; - var hi2; - - while (--j >= 0) { - hr2 = hr1; - hi2 = hi1; - hr1 = hr; - hi1 = hi; - hr = -hr2 + r * hr1 - i * hi1 + pp[j]; - hi = -hi2 + i * hr1 + r * hi1; - } - - r = sin_arg_r * cosh_arg_i; - i = cos_arg_r * sinh_arg_i; - - return [r * hr - i * hi, r * hi + i * hr]; -} diff --git a/proj4js-master/lib/common/cosh.js b/proj4js-master/lib/common/cosh.js deleted file mode 100644 index 8b5174eb..00000000 --- a/proj4js-master/lib/common/cosh.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - var r = Math.exp(x); - r = (r + 1 / r) / 2; - return r; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/e0fn.js b/proj4js-master/lib/common/e0fn.js deleted file mode 100644 index 33501ac6..00000000 --- a/proj4js-master/lib/common/e0fn.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return (1 - 0.25 * x * (1 + x / 16 * (3 + 1.25 * x))); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/e1fn.js b/proj4js-master/lib/common/e1fn.js deleted file mode 100644 index c4c85002..00000000 --- a/proj4js-master/lib/common/e1fn.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return (0.375 * x * (1 + 0.25 * x * (1 + 0.46875 * x))); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/e2fn.js b/proj4js-master/lib/common/e2fn.js deleted file mode 100644 index 55539a70..00000000 --- a/proj4js-master/lib/common/e2fn.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return (0.05859375 * x * x * (1 + 0.75 * x)); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/e3fn.js b/proj4js-master/lib/common/e3fn.js deleted file mode 100644 index 6010428c..00000000 --- a/proj4js-master/lib/common/e3fn.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return (x * x * x * (35 / 3072)); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/fL.js b/proj4js-master/lib/common/fL.js deleted file mode 100644 index 8440cd57..00000000 --- a/proj4js-master/lib/common/fL.js +++ /dev/null @@ -1,5 +0,0 @@ -import {HALF_PI} from '../constants/values'; - -export default function(x, L) { - return 2 * Math.atan(x * Math.exp(L)) - HALF_PI; -} diff --git a/proj4js-master/lib/common/gN.js b/proj4js-master/lib/common/gN.js deleted file mode 100644 index 29bd5f05..00000000 --- a/proj4js-master/lib/common/gN.js +++ /dev/null @@ -1,4 +0,0 @@ -export default function(a, e, sinphi) { - var temp = e * sinphi; - return a / Math.sqrt(1 - temp * temp); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/gatg.js b/proj4js-master/lib/common/gatg.js deleted file mode 100644 index 597f196d..00000000 --- a/proj4js-master/lib/common/gatg.js +++ /dev/null @@ -1,15 +0,0 @@ -export default function(pp, B) { - var cos_2B = 2 * Math.cos(2 * B); - var i = pp.length - 1; - var h1 = pp[i]; - var h2 = 0; - var h; - - while (--i >= 0) { - h = -h2 + cos_2B * h1 + pp[i]; - h2 = h1; - h1 = h; - } - - return (B + h * Math.sin(2 * B)); -} diff --git a/proj4js-master/lib/common/hypot.js b/proj4js-master/lib/common/hypot.js deleted file mode 100644 index 7b210a79..00000000 --- a/proj4js-master/lib/common/hypot.js +++ /dev/null @@ -1,8 +0,0 @@ -export default function(x, y) { - x = Math.abs(x); - y = Math.abs(y); - var a = Math.max(x, y); - var b = Math.min(x, y) / (a ? a : 1); - - return a * Math.sqrt(1 + Math.pow(b, 2)); -} diff --git a/proj4js-master/lib/common/imlfn.js b/proj4js-master/lib/common/imlfn.js deleted file mode 100644 index 70859dc2..00000000 --- a/proj4js-master/lib/common/imlfn.js +++ /dev/null @@ -1,16 +0,0 @@ -export default function(ml, e0, e1, e2, e3) { - var phi; - var dphi; - - phi = ml / e0; - for (var i = 0; i < 15; i++) { - dphi = (ml - (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi))) / (e0 - 2 * e1 * Math.cos(2 * phi) + 4 * e2 * Math.cos(4 * phi) - 6 * e3 * Math.cos(6 * phi)); - phi += dphi; - if (Math.abs(dphi) <= 0.0000000001) { - return phi; - } - } - - //..reportError("IMLFN-CONV:Latitude failed to converge after 15 iterations"); - return NaN; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/invlatiso.js b/proj4js-master/lib/common/invlatiso.js deleted file mode 100644 index 1417f381..00000000 --- a/proj4js-master/lib/common/invlatiso.js +++ /dev/null @@ -1,13 +0,0 @@ -import fL from './fL'; - -export default function(eccent, ts) { - var phi = fL(1, ts); - var Iphi = 0; - var con = 0; - do { - Iphi = phi; - con = eccent * Math.sin(Iphi); - phi = fL(Math.exp(eccent * Math.log((1 + con) / (1 - con)) / 2), ts); - } while (Math.abs(phi - Iphi) > 1.0e-12); - return phi; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/iqsfnz.js b/proj4js-master/lib/common/iqsfnz.js deleted file mode 100644 index 6231355d..00000000 --- a/proj4js-master/lib/common/iqsfnz.js +++ /dev/null @@ -1,32 +0,0 @@ -import {HALF_PI} from '../constants/values'; - -export default function(eccent, q) { - var temp = 1 - (1 - eccent * eccent) / (2 * eccent) * Math.log((1 - eccent) / (1 + eccent)); - if (Math.abs(Math.abs(q) - temp) < 1.0E-6) { - if (q < 0) { - return (-1 * HALF_PI); - } - else { - return HALF_PI; - } - } - //var phi = 0.5* q/(1-eccent*eccent); - var phi = Math.asin(0.5 * q); - var dphi; - var sin_phi; - var cos_phi; - var con; - for (var i = 0; i < 30; i++) { - sin_phi = Math.sin(phi); - cos_phi = Math.cos(phi); - con = eccent * sin_phi; - dphi = Math.pow(1 - con * con, 2) / (2 * cos_phi) * (q / (1 - eccent * eccent) - sin_phi / (1 - con * con) + 0.5 / eccent * Math.log((1 - con) / (1 + con))); - phi += dphi; - if (Math.abs(dphi) <= 0.0000000001) { - return phi; - } - } - - //console.log("IQSFN-CONV:Latitude failed to converge after 30 iterations"); - return NaN; -} diff --git a/proj4js-master/lib/common/latiso.js b/proj4js-master/lib/common/latiso.js deleted file mode 100644 index 61e0b09d..00000000 --- a/proj4js-master/lib/common/latiso.js +++ /dev/null @@ -1,16 +0,0 @@ -import {HALF_PI} from '../constants/values'; - -export default function(eccent, phi, sinphi) { - if (Math.abs(phi) > HALF_PI) { - return Number.NaN; - } - if (phi === HALF_PI) { - return Number.POSITIVE_INFINITY; - } - if (phi === -1 * HALF_PI) { - return Number.NEGATIVE_INFINITY; - } - - var con = eccent * sinphi; - return Math.log(Math.tan((HALF_PI + phi) / 2)) + eccent * Math.log((1 - con) / (1 + con)) / 2; -} diff --git a/proj4js-master/lib/common/log1py.js b/proj4js-master/lib/common/log1py.js deleted file mode 100644 index ad63730b..00000000 --- a/proj4js-master/lib/common/log1py.js +++ /dev/null @@ -1,6 +0,0 @@ -export default function(x) { - var y = 1 + x; - var z = y - 1; - - return z === 0 ? x : x * Math.log(y) / z; -} diff --git a/proj4js-master/lib/common/mlfn.js b/proj4js-master/lib/common/mlfn.js deleted file mode 100644 index 53dc3d2e..00000000 --- a/proj4js-master/lib/common/mlfn.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(e0, e1, e2, e3, phi) { - return (e0 * phi - e1 * Math.sin(2 * phi) + e2 * Math.sin(4 * phi) - e3 * Math.sin(6 * phi)); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/msfnz.js b/proj4js-master/lib/common/msfnz.js deleted file mode 100644 index 433f3470..00000000 --- a/proj4js-master/lib/common/msfnz.js +++ /dev/null @@ -1,4 +0,0 @@ -export default function(eccent, sinphi, cosphi) { - var con = eccent * sinphi; - return cosphi / (Math.sqrt(1 - con * con)); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/phi2z.js b/proj4js-master/lib/common/phi2z.js deleted file mode 100644 index 3c70422e..00000000 --- a/proj4js-master/lib/common/phi2z.js +++ /dev/null @@ -1,17 +0,0 @@ -import {HALF_PI} from '../constants/values'; - -export default function(eccent, ts) { - var eccnth = 0.5 * eccent; - var con, dphi; - var phi = HALF_PI - 2 * Math.atan(ts); - for (var i = 0; i <= 15; i++) { - con = eccent * Math.sin(phi); - dphi = HALF_PI - 2 * Math.atan(ts * (Math.pow(((1 - con) / (1 + con)), eccnth))) - phi; - phi += dphi; - if (Math.abs(dphi) <= 0.0000000001) { - return phi; - } - } - //console.log("phi2z has NoConvergence"); - return -9999; -} diff --git a/proj4js-master/lib/common/pj_enfn.js b/proj4js-master/lib/common/pj_enfn.js deleted file mode 100644 index 5d9be385..00000000 --- a/proj4js-master/lib/common/pj_enfn.js +++ /dev/null @@ -1,24 +0,0 @@ -var C00 = 1; -var C02 = 0.25; -var C04 = 0.046875; -var C06 = 0.01953125; -var C08 = 0.01068115234375; -var C22 = 0.75; -var C44 = 0.46875; -var C46 = 0.01302083333333333333; -var C48 = 0.00712076822916666666; -var C66 = 0.36458333333333333333; -var C68 = 0.00569661458333333333; -var C88 = 0.3076171875; - -export default function(es) { - var en = []; - en[0] = C00 - es * (C02 + es * (C04 + es * (C06 + es * C08))); - en[1] = es * (C22 - es * (C04 + es * (C06 + es * C08))); - var t = es * es; - en[2] = t * (C44 - es * (C46 + es * C48)); - t *= es; - en[3] = t * (C66 - es * C68); - en[4] = t * es * C88; - return en; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/pj_inv_mlfn.js b/proj4js-master/lib/common/pj_inv_mlfn.js deleted file mode 100644 index 9b4d5077..00000000 --- a/proj4js-master/lib/common/pj_inv_mlfn.js +++ /dev/null @@ -1,23 +0,0 @@ -import pj_mlfn from "./pj_mlfn"; -import {EPSLN} from '../constants/values'; - -var MAX_ITER = 20; - -export default function(arg, es, en) { - console.log('pjInvMlfn', arg, es, en); - var k = 1 / (1 - es); - var phi = arg; - for (var i = MAX_ITER; i; --i) { /* rarely goes over 2 iterations */ - var s = Math.sin(phi); - var t = 1 - es * s * s; - //t = this.pj_mlfn(phi, s, Math.cos(phi), en) - arg; - //phi -= t * (t * Math.sqrt(t)) * k; - t = (pj_mlfn(phi, s, Math.cos(phi), en) - arg) * (t * Math.sqrt(t)) * k; - phi -= t; - if (Math.abs(t) < EPSLN) { - return phi; - } - } - //..reportError("cass:pj_inv_mlfn: Convergence error"); - return phi; -} diff --git a/proj4js-master/lib/common/pj_mlfn.js b/proj4js-master/lib/common/pj_mlfn.js deleted file mode 100644 index 6e898c3d..00000000 --- a/proj4js-master/lib/common/pj_mlfn.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(phi, sphi, cphi, en) { - cphi *= sphi; - sphi *= sphi; - return (en[0] * phi - cphi * (en[1] + sphi * (en[2] + sphi * (en[3] + sphi * en[4])))); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/qsfnz.js b/proj4js-master/lib/common/qsfnz.js deleted file mode 100644 index 6afb50a3..00000000 --- a/proj4js-master/lib/common/qsfnz.js +++ /dev/null @@ -1,10 +0,0 @@ -export default function(eccent, sinphi) { - var con; - if (eccent > 1.0e-7) { - con = eccent * sinphi; - return ((1 - eccent * eccent) * (sinphi / (1 - con * con) - (0.5 / eccent) * Math.log((1 - con) / (1 + con)))); - } - else { - return (2 * sinphi); - } -} \ No newline at end of file diff --git a/proj4js-master/lib/common/sign.js b/proj4js-master/lib/common/sign.js deleted file mode 100644 index c97da629..00000000 --- a/proj4js-master/lib/common/sign.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(x) { - return x<0 ? -1 : 1; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/sinh.js b/proj4js-master/lib/common/sinh.js deleted file mode 100644 index db3fe4d2..00000000 --- a/proj4js-master/lib/common/sinh.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - var r = Math.exp(x); - r = (r - 1 / r) / 2; - return r; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/srat.js b/proj4js-master/lib/common/srat.js deleted file mode 100644 index 171b6279..00000000 --- a/proj4js-master/lib/common/srat.js +++ /dev/null @@ -1,3 +0,0 @@ -export default function(esinp, exp) { - return (Math.pow((1 - esinp) / (1 + esinp), exp)); -} \ No newline at end of file diff --git a/proj4js-master/lib/common/tanh.js b/proj4js-master/lib/common/tanh.js deleted file mode 100644 index 782414a2..00000000 --- a/proj4js-master/lib/common/tanh.js +++ /dev/null @@ -1,5 +0,0 @@ -export default function(x) { - var r = Math.exp(x); - r = (r - 1 / r) / (r + 1 / r); - return r; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/toPoint.js b/proj4js-master/lib/common/toPoint.js deleted file mode 100644 index 7226892e..00000000 --- a/proj4js-master/lib/common/toPoint.js +++ /dev/null @@ -1,13 +0,0 @@ -export default function (array){ - var out = { - x: array[0], - y: array[1] - }; - if (array.length>2) { - out.z = array[2]; - } - if (array.length>3) { - out.m = array[3]; - } - return out; -} \ No newline at end of file diff --git a/proj4js-master/lib/common/tsfnz.js b/proj4js-master/lib/common/tsfnz.js deleted file mode 100644 index 6702d852..00000000 --- a/proj4js-master/lib/common/tsfnz.js +++ /dev/null @@ -1,8 +0,0 @@ -import {HALF_PI} from '../constants/values'; - -export default function(eccent, phi, sinphi) { - var con = eccent * sinphi; - var com = 0.5 * eccent; - con = Math.pow(((1 - con) / (1 + con)), com); - return (Math.tan(0.5 * (HALF_PI - phi)) / con); -} diff --git a/proj4js-master/lib/constants/Datum.js b/proj4js-master/lib/constants/Datum.js deleted file mode 100644 index 38aa246c..00000000 --- a/proj4js-master/lib/constants/Datum.js +++ /dev/null @@ -1,109 +0,0 @@ -var exports = {}; -export {exports as default}; -exports.wgs84 = { - towgs84: "0,0,0", - ellipse: "WGS84", - datumName: "WGS84" -}; - -exports.ch1903 = { - towgs84: "674.374,15.056,405.346", - ellipse: "bessel", - datumName: "swiss" -}; - -exports.ggrs87 = { - towgs84: "-199.87,74.79,246.62", - ellipse: "GRS80", - datumName: "Greek_Geodetic_Reference_System_1987" -}; - -exports.nad83 = { - towgs84: "0,0,0", - ellipse: "GRS80", - datumName: "North_American_Datum_1983" -}; - -exports.nad27 = { - nadgrids: "@conus,@alaska,@ntv2_0.gsb,@ntv1_can.dat", - ellipse: "clrk66", - datumName: "North_American_Datum_1927" -}; - -exports.potsdam = { - towgs84: "598.1,73.7,418.2,0.202,0.045,-2.455,6.7", - ellipse: "bessel", - datumName: "Potsdam Rauenberg 1950 DHDN" -}; - -exports.carthage = { - towgs84: "-263.0,6.0,431.0", - ellipse: "clark80", - datumName: "Carthage 1934 Tunisia" -}; - -exports.hermannskogel = { - towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232", - ellipse: "bessel", - datumName: "Hermannskogel" -}; - -exports.militargeographische_institut = { - towgs84: "577.326,90.129,463.919,5.137,1.474,5.297,2.4232", - ellipse: "bessel", - datumName: "Militar-Geographische Institut" -}; - -exports.osni52 = { - towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", - ellipse: "airy", - datumName: "Irish National" -}; - -exports.ire65 = { - towgs84: "482.530,-130.596,564.557,-1.042,-0.214,-0.631,8.15", - ellipse: "mod_airy", - datumName: "Ireland 1965" -}; - -exports.rassadiran = { - towgs84: "-133.63,-157.5,-158.62", - ellipse: "intl", - datumName: "Rassadiran" -}; - -exports.nzgd49 = { - towgs84: "59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993", - ellipse: "intl", - datumName: "New Zealand Geodetic Datum 1949" -}; - -exports.osgb36 = { - towgs84: "446.448,-125.157,542.060,0.1502,0.2470,0.8421,-20.4894", - ellipse: "airy", - datumName: "Airy 1830" -}; - -exports.s_jtsk = { - towgs84: "589,76,480", - ellipse: 'bessel', - datumName: 'S-JTSK (Ferro)' -}; - -exports.beduaram = { - towgs84: '-106,-87,188', - ellipse: 'clrk80', - datumName: 'Beduaram' -}; - -exports.gunung_segara = { - towgs84: '-403,684,41', - ellipse: 'bessel', - datumName: 'Gunung Segara Jakarta' -}; - -exports.rnb72 = { - towgs84: "106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1", - ellipse: "intl", - datumName: "Reseau National Belge 1972" -}; diff --git a/proj4js-master/lib/constants/Ellipsoid.js b/proj4js-master/lib/constants/Ellipsoid.js deleted file mode 100644 index 6e5fba10..00000000 --- a/proj4js-master/lib/constants/Ellipsoid.js +++ /dev/null @@ -1,266 +0,0 @@ -var exports = {}; -export {exports as default}; -exports.MERIT = { - a: 6378137.0, - rf: 298.257, - ellipseName: "MERIT 1983" -}; - -exports.SGS85 = { - a: 6378136.0, - rf: 298.257, - ellipseName: "Soviet Geodetic System 85" -}; - -exports.GRS80 = { - a: 6378137.0, - rf: 298.257222101, - ellipseName: "GRS 1980(IUGG, 1980)" -}; - -exports.IAU76 = { - a: 6378140.0, - rf: 298.257, - ellipseName: "IAU 1976" -}; - -exports.airy = { - a: 6377563.396, - b: 6356256.910, - ellipseName: "Airy 1830" -}; - -exports.APL4 = { - a: 6378137, - rf: 298.25, - ellipseName: "Appl. Physics. 1965" -}; - -exports.NWL9D = { - a: 6378145.0, - rf: 298.25, - ellipseName: "Naval Weapons Lab., 1965" -}; - -exports.mod_airy = { - a: 6377340.189, - b: 6356034.446, - ellipseName: "Modified Airy" -}; - -exports.andrae = { - a: 6377104.43, - rf: 300.0, - ellipseName: "Andrae 1876 (Den., Iclnd.)" -}; - -exports.aust_SA = { - a: 6378160.0, - rf: 298.25, - ellipseName: "Australian Natl & S. Amer. 1969" -}; - -exports.GRS67 = { - a: 6378160.0, - rf: 298.2471674270, - ellipseName: "GRS 67(IUGG 1967)" -}; - -exports.bessel = { - a: 6377397.155, - rf: 299.1528128, - ellipseName: "Bessel 1841" -}; - -exports.bess_nam = { - a: 6377483.865, - rf: 299.1528128, - ellipseName: "Bessel 1841 (Namibia)" -}; - -exports.clrk66 = { - a: 6378206.4, - b: 6356583.8, - ellipseName: "Clarke 1866" -}; - -exports.clrk80 = { - a: 6378249.145, - rf: 293.4663, - ellipseName: "Clarke 1880 mod." -}; - -exports.clrk80ign = { - a: 6378249.2, - b: 6356515, - rf: 293.4660213, - ellipseName: "Clarke 1880 (IGN)" -}; - -exports.clrk58 = { - a: 6378293.645208759, - rf: 294.2606763692654, - ellipseName: "Clarke 1858" -}; - -exports.CPM = { - a: 6375738.7, - rf: 334.29, - ellipseName: "Comm. des Poids et Mesures 1799" -}; - -exports.delmbr = { - a: 6376428.0, - rf: 311.5, - ellipseName: "Delambre 1810 (Belgium)" -}; - -exports.engelis = { - a: 6378136.05, - rf: 298.2566, - ellipseName: "Engelis 1985" -}; - -exports.evrst30 = { - a: 6377276.345, - rf: 300.8017, - ellipseName: "Everest 1830" -}; - -exports.evrst48 = { - a: 6377304.063, - rf: 300.8017, - ellipseName: "Everest 1948" -}; - -exports.evrst56 = { - a: 6377301.243, - rf: 300.8017, - ellipseName: "Everest 1956" -}; - -exports.evrst69 = { - a: 6377295.664, - rf: 300.8017, - ellipseName: "Everest 1969" -}; - -exports.evrstSS = { - a: 6377298.556, - rf: 300.8017, - ellipseName: "Everest (Sabah & Sarawak)" -}; - -exports.fschr60 = { - a: 6378166.0, - rf: 298.3, - ellipseName: "Fischer (Mercury Datum) 1960" -}; - -exports.fschr60m = { - a: 6378155.0, - rf: 298.3, - ellipseName: "Fischer 1960" -}; - -exports.fschr68 = { - a: 6378150.0, - rf: 298.3, - ellipseName: "Fischer 1968" -}; - -exports.helmert = { - a: 6378200.0, - rf: 298.3, - ellipseName: "Helmert 1906" -}; - -exports.hough = { - a: 6378270.0, - rf: 297.0, - ellipseName: "Hough" -}; - -exports.intl = { - a: 6378388.0, - rf: 297.0, - ellipseName: "International 1909 (Hayford)" -}; - -exports.kaula = { - a: 6378163.0, - rf: 298.24, - ellipseName: "Kaula 1961" -}; - -exports.lerch = { - a: 6378139.0, - rf: 298.257, - ellipseName: "Lerch 1979" -}; - -exports.mprts = { - a: 6397300.0, - rf: 191.0, - ellipseName: "Maupertius 1738" -}; - -exports.new_intl = { - a: 6378157.5, - b: 6356772.2, - ellipseName: "New International 1967" -}; - -exports.plessis = { - a: 6376523.0, - rf: 6355863.0, - ellipseName: "Plessis 1817 (France)" -}; - -exports.krass = { - a: 6378245.0, - rf: 298.3, - ellipseName: "Krassovsky, 1942" -}; - -exports.SEasia = { - a: 6378155.0, - b: 6356773.3205, - ellipseName: "Southeast Asia" -}; - -exports.walbeck = { - a: 6376896.0, - b: 6355834.8467, - ellipseName: "Walbeck" -}; - -exports.WGS60 = { - a: 6378165.0, - rf: 298.3, - ellipseName: "WGS 60" -}; - -exports.WGS66 = { - a: 6378145.0, - rf: 298.25, - ellipseName: "WGS 66" -}; - -exports.WGS7 = { - a: 6378135.0, - rf: 298.26, - ellipseName: "WGS 72" -}; - -export var WGS84 = exports.WGS84 = { - a: 6378137.0, - rf: 298.257223563, - ellipseName: "WGS 84" -}; - -exports.sphere = { - a: 6370997.0, - b: 6370997.0, - ellipseName: "Normal Sphere (r=6370997)" -}; diff --git a/proj4js-master/lib/constants/PrimeMeridian.js b/proj4js-master/lib/constants/PrimeMeridian.js deleted file mode 100644 index 8e81d50d..00000000 --- a/proj4js-master/lib/constants/PrimeMeridian.js +++ /dev/null @@ -1,16 +0,0 @@ -var exports = {}; -export {exports as default}; - -exports.greenwich = 0.0; //"0dE", -exports.lisbon = -9.131906111111; //"9d07'54.862\"W", -exports.paris = 2.337229166667; //"2d20'14.025\"E", -exports.bogota = -74.080916666667; //"74d04'51.3\"W", -exports.madrid = -3.687938888889; //"3d41'16.58\"W", -exports.rome = 12.452333333333; //"12d27'8.4\"E", -exports.bern = 7.439583333333; //"7d26'22.5\"E", -exports.jakarta = 106.807719444444; //"106d48'27.79\"E", -exports.ferro = -17.666666666667; //"17d40'W", -exports.brussels = 4.367975; //"4d22'4.71\"E", -exports.stockholm = 18.058277777778; //"18d3'29.8\"E", -exports.athens = 23.7163375; //"23d42'58.815\"E", -exports.oslo = 10.722916666667; //"10d43'22.5\"E" diff --git a/proj4js-master/lib/constants/units.js b/proj4js-master/lib/constants/units.js deleted file mode 100644 index 39ed6f81..00000000 --- a/proj4js-master/lib/constants/units.js +++ /dev/null @@ -1,4 +0,0 @@ -export default { - ft: {to_meter: 0.3048}, - 'us-ft': {to_meter: 1200 / 3937} -}; diff --git a/proj4js-master/lib/constants/values.js b/proj4js-master/lib/constants/values.js deleted file mode 100644 index df4335e4..00000000 --- a/proj4js-master/lib/constants/values.js +++ /dev/null @@ -1,29 +0,0 @@ -export var PJD_3PARAM = 1; -export var PJD_7PARAM = 2; -export var PJD_GRIDSHIFT = 3; -export var PJD_WGS84 = 4; // WGS84 or equivalent -export var PJD_NODATUM = 5; // WGS84 or equivalent -export var SRS_WGS84_SEMIMAJOR = 6378137.0; // only used in grid shift transforms -export var SRS_WGS84_SEMIMINOR = 6356752.314; // only used in grid shift transforms -export var SRS_WGS84_ESQUARED = 0.0066943799901413165; // only used in grid shift transforms -export var SEC_TO_RAD = 4.84813681109535993589914102357e-6; -export var HALF_PI = Math.PI / 2; -// ellipoid pj_set_ell.c -export var SIXTH = 0.1666666666666666667; -/* 1/6 */ -export var RA4 = 0.04722222222222222222; -/* 17/360 */ -export var RA6 = 0.02215608465608465608; -export var EPSLN = 1.0e-10; -// you'd think you could use Number.EPSILON above but that makes -// Mollweide get into an infinate loop. - -export var D2R = 0.01745329251994329577; -export var R2D = 57.29577951308232088; -export var FORTPI = Math.PI/4; -export var TWO_PI = Math.PI * 2; -// SPI is slightly greater than Math.PI, so values that exceed the -180..180 -// degree range by a tiny amount don't get wrapped. This prevents points that -// have drifted from their original location along the 180th meridian (due to -// floating point error) from changing their sign. -export var SPI = 3.14159265359; diff --git a/proj4js-master/lib/core.js b/proj4js-master/lib/core.js deleted file mode 100644 index 823b05bf..00000000 --- a/proj4js-master/lib/core.js +++ /dev/null @@ -1,86 +0,0 @@ -import proj from './Proj'; -import transform from './transform'; -var wgs84 = proj('WGS84'); - -function transformer(from, to, coords, enforceAxis) { - var transformedArray, out, keys; - if (Array.isArray(coords)) { - transformedArray = transform(from, to, coords, enforceAxis) || {x: NaN, y: NaN}; - if (coords.length > 2) { - if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) { - if (typeof transformedArray.z === 'number') { - return [transformedArray.x, transformedArray.y, transformedArray.z].concat(coords.slice(3)); - } else { - return [transformedArray.x, transformedArray.y, coords[2]].concat(coords.slice(3)); - } - } else { - return [transformedArray.x, transformedArray.y].concat(coords.slice(2)); - } - } else { - return [transformedArray.x, transformedArray.y]; - } - } else { - out = transform(from, to, coords, enforceAxis); - keys = Object.keys(coords); - if (keys.length === 2) { - return out; - } - keys.forEach(function (key) { - if ((typeof from.name !== 'undefined' && from.name === 'geocent') || (typeof to.name !== 'undefined' && to.name === 'geocent')) { - if (key === 'x' || key === 'y' || key === 'z') { - return; - } - } else { - if (key === 'x' || key === 'y') { - return; - } - } - out[key] = coords[key]; - }); - return out; - } -} - -function checkProj(item) { - if (item instanceof proj) { - return item; - } - if (item.oProj) { - return item.oProj; - } - return proj(item); -} - -function proj4(fromProj, toProj, coord) { - fromProj = checkProj(fromProj); - var single = false; - var obj; - if (typeof toProj === 'undefined') { - toProj = fromProj; - fromProj = wgs84; - single = true; - } else if (typeof toProj.x !== 'undefined' || Array.isArray(toProj)) { - coord = toProj; - toProj = fromProj; - fromProj = wgs84; - single = true; - } - toProj = checkProj(toProj); - if (coord) { - return transformer(fromProj, toProj, coord); - } else { - obj = { - forward: function (coords, enforceAxis) { - return transformer(fromProj, toProj, coords, enforceAxis); - }, - inverse: function (coords, enforceAxis) { - return transformer(toProj, fromProj, coords, enforceAxis); - } - }; - if (single) { - obj.oProj = toProj; - } - return obj; - } -} -export default proj4; \ No newline at end of file diff --git a/proj4js-master/lib/datum.js b/proj4js-master/lib/datum.js deleted file mode 100644 index 9d82f526..00000000 --- a/proj4js-master/lib/datum.js +++ /dev/null @@ -1,39 +0,0 @@ -import {PJD_3PARAM, PJD_7PARAM, PJD_GRIDSHIFT, PJD_WGS84, PJD_NODATUM, SEC_TO_RAD} from './constants/values'; - -function datum(datumCode, datum_params, a, b, es, ep2, nadgrids) { - var out = {}; - - if (datumCode === undefined || datumCode === 'none') { - out.datum_type = PJD_NODATUM; - } else { - out.datum_type = PJD_WGS84; - } - - if (datum_params) { - out.datum_params = datum_params.map(parseFloat); - if (out.datum_params[0] !== 0 || out.datum_params[1] !== 0 || out.datum_params[2] !== 0) { - out.datum_type = PJD_3PARAM; - } - if (out.datum_params.length > 3) { - if (out.datum_params[3] !== 0 || out.datum_params[4] !== 0 || out.datum_params[5] !== 0 || out.datum_params[6] !== 0) { - out.datum_type = PJD_7PARAM; - out.datum_params[3] *= SEC_TO_RAD; - out.datum_params[4] *= SEC_TO_RAD; - out.datum_params[5] *= SEC_TO_RAD; - out.datum_params[6] = (out.datum_params[6] / 1000000.0) + 1.0; - } - } - } - - if (nadgrids) { - out.datum_type = PJD_GRIDSHIFT; - out.grids = nadgrids; - } - out.a = a; //datum object also uses these values - out.b = b; - out.es = es; - out.ep2 = ep2; - return out; -} - -export default datum; diff --git a/proj4js-master/lib/datumUtils.js b/proj4js-master/lib/datumUtils.js deleted file mode 100644 index a064db7c..00000000 --- a/proj4js-master/lib/datumUtils.js +++ /dev/null @@ -1,247 +0,0 @@ -'use strict'; -import {PJD_3PARAM, PJD_7PARAM, HALF_PI} from './constants/values'; -export function compareDatums(source, dest) { - if (source.datum_type !== dest.datum_type) { - return false; // false, datums are not equal - } else if (source.a !== dest.a || Math.abs(source.es - dest.es) > 0.000000000050) { - // the tolerance for es is to ensure that GRS80 and WGS84 - // are considered identical - return false; - } else if (source.datum_type === PJD_3PARAM) { - return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2]); - } else if (source.datum_type === PJD_7PARAM) { - return (source.datum_params[0] === dest.datum_params[0] && source.datum_params[1] === dest.datum_params[1] && source.datum_params[2] === dest.datum_params[2] && source.datum_params[3] === dest.datum_params[3] && source.datum_params[4] === dest.datum_params[4] && source.datum_params[5] === dest.datum_params[5] && source.datum_params[6] === dest.datum_params[6]); - } else { - return true; // datums are equal - } -} // cs_compare_datums() - -/* - * The function Convert_Geodetic_To_Geocentric converts geodetic coordinates - * (latitude, longitude, and height) to geocentric coordinates (X, Y, Z), - * according to the current ellipsoid parameters. - * - * Latitude : Geodetic latitude in radians (input) - * Longitude : Geodetic longitude in radians (input) - * Height : Geodetic height, in meters (input) - * X : Calculated Geocentric X coordinate, in meters (output) - * Y : Calculated Geocentric Y coordinate, in meters (output) - * Z : Calculated Geocentric Z coordinate, in meters (output) - * - */ -export function geodeticToGeocentric(p, es, a) { - var Longitude = p.x; - var Latitude = p.y; - var Height = p.z ? p.z : 0; //Z value not always supplied - - var Rn; /* Earth radius at location */ - var Sin_Lat; /* Math.sin(Latitude) */ - var Sin2_Lat; /* Square of Math.sin(Latitude) */ - var Cos_Lat; /* Math.cos(Latitude) */ - - /* - ** Don't blow up if Latitude is just a little out of the value - ** range as it may just be a rounding issue. Also removed longitude - ** test, it should be wrapped by Math.cos() and Math.sin(). NFW for PROJ.4, Sep/2001. - */ - if (Latitude < -HALF_PI && Latitude > -1.001 * HALF_PI) { - Latitude = -HALF_PI; - } else if (Latitude > HALF_PI && Latitude < 1.001 * HALF_PI) { - Latitude = HALF_PI; - } else if (Latitude < -HALF_PI) { - /* Latitude out of range */ - //..reportError('geocent:lat out of range:' + Latitude); - return { x: -Infinity, y: -Infinity, z: p.z }; - } else if (Latitude > HALF_PI) { - /* Latitude out of range */ - return { x: Infinity, y: Infinity, z: p.z }; - } - - if (Longitude > Math.PI) { - Longitude -= (2 * Math.PI); - } - Sin_Lat = Math.sin(Latitude); - Cos_Lat = Math.cos(Latitude); - Sin2_Lat = Sin_Lat * Sin_Lat; - Rn = a / (Math.sqrt(1.0e0 - es * Sin2_Lat)); - return { - x: (Rn + Height) * Cos_Lat * Math.cos(Longitude), - y: (Rn + Height) * Cos_Lat * Math.sin(Longitude), - z: ((Rn * (1 - es)) + Height) * Sin_Lat - }; -} // cs_geodetic_to_geocentric() - -export function geocentricToGeodetic(p, es, a, b) { - console.log('geocentricToGeodetic', p, es, a, b) - /* local defintions and variables */ - /* end-criterium of loop, accuracy of sin(Latitude) */ - var genau = 1e-12; - var genau2 = (genau * genau); - var maxiter = 30; - - var P; /* distance between semi-minor axis and location */ - var RR; /* distance between center and location */ - var CT; /* sin of geocentric latitude */ - var ST; /* cos of geocentric latitude */ - var RX; - var RK; - var RN; /* Earth radius at location */ - var CPHI0; /* cos of start or old geodetic latitude in iterations */ - var SPHI0; /* sin of start or old geodetic latitude in iterations */ - var CPHI; /* cos of searched geodetic latitude */ - var SPHI; /* sin of searched geodetic latitude */ - var SDPHI; /* end-criterium: addition-theorem of sin(Latitude(iter)-Latitude(iter-1)) */ - var iter; /* # of continous iteration, max. 30 is always enough (s.a.) */ - - var X = p.x; - var Y = p.y; - var Z = p.z ? p.z : 0.0; //Z value not always supplied - var Longitude; - var Latitude; - var Height; - - P = Math.sqrt(X * X + Y * Y); - RR = Math.sqrt(X * X + Y * Y + Z * Z); - - /* special cases for latitude and longitude */ - if (P / a < genau) { - - /* special case, if P=0. (X=0., Y=0.) */ - Longitude = 0.0; - - /* if (X,Y,Z)=(0.,0.,0.) then Height becomes semi-minor axis - * of ellipsoid (=center of mass), Latitude becomes PI/2 */ - if (RR / a < genau) { - Latitude = HALF_PI; - Height = -b; - return { - x: p.x, - y: p.y, - z: p.z - }; - } - } else { - /* ellipsoidal (geodetic) longitude - * interval: -PI < Longitude <= +PI */ - Longitude = Math.atan2(Y, X); - } - - /* -------------------------------------------------------------- - * Following iterative algorithm was developped by - * "Institut for Erdmessung", University of Hannover, July 1988. - * Internet: www.ife.uni-hannover.de - * Iterative computation of CPHI,SPHI and Height. - * Iteration of CPHI and SPHI to 10**-12 radian resp. - * 2*10**-7 arcsec. - * -------------------------------------------------------------- - */ - CT = Z / RR; - ST = P / RR; - RX = 1.0 / Math.sqrt(1.0 - es * (2.0 - es) * ST * ST); - CPHI0 = ST * (1.0 - es) * RX; - SPHI0 = CT * RX; - iter = 0; - - /* loop to find sin(Latitude) resp. Latitude - * until |sin(Latitude(iter)-Latitude(iter-1))| < genau */ - do { - iter++; - RN = a / Math.sqrt(1.0 - es * SPHI0 * SPHI0); - - /* ellipsoidal (geodetic) height */ - Height = P * CPHI0 + Z * SPHI0 - RN * (1.0 - es * SPHI0 * SPHI0); - - RK = es * RN / (RN + Height); - RX = 1.0 / Math.sqrt(1.0 - RK * (2.0 - RK) * ST * ST); - CPHI = ST * (1.0 - RK) * RX; - SPHI = CT * RX; - SDPHI = SPHI * CPHI0 - CPHI * SPHI0; - CPHI0 = CPHI; - SPHI0 = SPHI; - } - while (SDPHI * SDPHI > genau2 && iter < maxiter); - - /* ellipsoidal (geodetic) latitude */ - Latitude = Math.atan(SPHI / Math.abs(CPHI)); - console.log('LATITUDE A 1', SPHI, CPHI, Latitude); - return { - x: Longitude, - y: Latitude, - z: Height - }; -} // cs_geocentric_to_geodetic() - -/****************************************************************/ -// pj_geocentic_to_wgs84( p ) -// p = point to transform in geocentric coordinates (x,y,z) - - -/** point object, nothing fancy, just allows values to be - passed back and forth by reference rather than by value. - Other point classes may be used as long as they have - x and y properties, which will get modified in the transform method. -*/ -export function geocentricToWgs84(p, datum_type, datum_params) { - - if (datum_type === PJD_3PARAM) { - // if( x[io] === HUGE_VAL ) - // continue; - return { - x: p.x + datum_params[0], - y: p.y + datum_params[1], - z: p.z + datum_params[2], - }; - } else if (datum_type === PJD_7PARAM) { - var Dx_BF = datum_params[0]; - var Dy_BF = datum_params[1]; - var Dz_BF = datum_params[2]; - var Rx_BF = datum_params[3]; - var Ry_BF = datum_params[4]; - var Rz_BF = datum_params[5]; - var M_BF = datum_params[6]; - // if( x[io] === HUGE_VAL ) - // continue; - return { - x: M_BF * (p.x - Rz_BF * p.y + Ry_BF * p.z) + Dx_BF, - y: M_BF * (Rz_BF * p.x + p.y - Rx_BF * p.z) + Dy_BF, - z: M_BF * (-Ry_BF * p.x + Rx_BF * p.y + p.z) + Dz_BF - }; - } -} // cs_geocentric_to_wgs84 - -/****************************************************************/ -// pj_geocentic_from_wgs84() -// coordinate system definition, -// point to transform in geocentric coordinates (x,y,z) -export function geocentricFromWgs84(p, datum_type, datum_params) { - - if (datum_type === PJD_3PARAM) { - //if( x[io] === HUGE_VAL ) - // continue; - return { - x: p.x - datum_params[0], - y: p.y - datum_params[1], - z: p.z - datum_params[2], - }; - - } else if (datum_type === PJD_7PARAM) { - var Dx_BF = datum_params[0]; - var Dy_BF = datum_params[1]; - var Dz_BF = datum_params[2]; - var Rx_BF = datum_params[3]; - var Ry_BF = datum_params[4]; - var Rz_BF = datum_params[5]; - var M_BF = datum_params[6]; - var x_tmp = (p.x - Dx_BF) / M_BF; - var y_tmp = (p.y - Dy_BF) / M_BF; - var z_tmp = (p.z - Dz_BF) / M_BF; - //if( x[io] === HUGE_VAL ) - // continue; - - return { - x: x_tmp + Rz_BF * y_tmp - Ry_BF * z_tmp, - y: -Rz_BF * x_tmp + y_tmp + Rx_BF * z_tmp, - z: Ry_BF * x_tmp - Rx_BF * y_tmp + z_tmp - }; - } //cs_geocentric_from_wgs84() -} diff --git a/proj4js-master/lib/datum_transform.js b/proj4js-master/lib/datum_transform.js deleted file mode 100644 index 37c39641..00000000 --- a/proj4js-master/lib/datum_transform.js +++ /dev/null @@ -1,201 +0,0 @@ -import { - PJD_3PARAM, - PJD_7PARAM, - PJD_GRIDSHIFT, - PJD_NODATUM, - R2D, - SRS_WGS84_ESQUARED, - SRS_WGS84_SEMIMAJOR, SRS_WGS84_SEMIMINOR -} from './constants/values'; - -import {geodeticToGeocentric, geocentricToGeodetic, geocentricToWgs84, geocentricFromWgs84, compareDatums} from './datumUtils'; -import adjust_lon from "./common/adjust_lon"; -function checkParams(type) { - return (type === PJD_3PARAM || type === PJD_7PARAM); -} - -export default function(source, dest, point) { - // Short cut if the datums are identical. - if (compareDatums(source, dest)) { - return point; // in this case, zero is sucess, - // whereas cs_compare_datums returns 1 to indicate TRUE - // confusing, should fix this - } - - // Explicitly skip datum transform by setting 'datum=none' as parameter for either source or dest - if (source.datum_type === PJD_NODATUM || dest.datum_type === PJD_NODATUM) { - return point; - } - - // If this datum requires grid shifts, then apply it to geodetic coordinates. - var source_a = source.a; - var source_es = source.es; - if (source.datum_type === PJD_GRIDSHIFT) { - var gridShiftCode = applyGridShift(source, false, point); - if (gridShiftCode !== 0) { - return undefined; - } - source_a = SRS_WGS84_SEMIMAJOR; - source_es = SRS_WGS84_ESQUARED; - } - - var dest_a = dest.a; - var dest_b = dest.b; - var dest_es = dest.es; - if (dest.datum_type === PJD_GRIDSHIFT) { - dest_a = SRS_WGS84_SEMIMAJOR; - dest_b = SRS_WGS84_SEMIMINOR; - dest_es = SRS_WGS84_ESQUARED; - } - - // Do we need to go through geocentric coordinates? - if (source_es === dest_es && source_a === dest_a && !checkParams(source.datum_type) && !checkParams(dest.datum_type)) { - return point; - } - - // Convert to geocentric coordinates. - point = geodeticToGeocentric(point, source_es, source_a); - console.log('DATUM 1 A: ', point) - // Convert between datums - console.log('source.datum_params', source.datum_params) - if (checkParams(source.datum_type)) { - point = geocentricToWgs84(point, source.datum_type, source.datum_params); - } - console.log('DATUM 1 B: ', point) - if (checkParams(dest.datum_type)) { - point = geocentricFromWgs84(point, dest.datum_type, dest.datum_params); - } - console.log('DATUM 1 C: ', point) - point = geocentricToGeodetic(point, dest_es, dest_a, dest_b); - console.log('DATUM 1 D: ', point) - - if (dest.datum_type === PJD_GRIDSHIFT) { - var destGridShiftResult = applyGridShift(dest, true, point); - if (destGridShiftResult !== 0) { - return undefined; - } - } - - return point; -} - -export function applyGridShift(source, inverse, point) { - if (source.grids === null || source.grids.length === 0) { - console.log('Grid shift grids not found'); - return -1; - } - var input = {x: -point.x, y: point.y}; - var output = {x: Number.NaN, y: Number.NaN}; - var onlyMandatoryGrids = false; - var attemptedGrids = []; - outer: - for (var i = 0; i < source.grids.length; i++) { - var grid = source.grids[i]; - attemptedGrids.push(grid.name); - if (grid.isNull) { - output = input; - break; - } - onlyMandatoryGrids = grid.mandatory; - if (grid.grid === null) { - if (grid.mandatory) { - console.log("Unable to find mandatory grid '" + grid.name + "'"); - return -1; - } - continue; - } - var subgrids = grid.grid.subgrids; - for (var j = 0, jj = subgrids.length; j < jj; j++) { - var subgrid = subgrids[j]; - // skip tables that don't match our point at all - var epsilon = (Math.abs(subgrid.del[1]) + Math.abs(subgrid.del[0])) / 10000.0; - var minX = subgrid.ll[0] - epsilon; - var minY = subgrid.ll[1] - epsilon; - var maxX = subgrid.ll[0] + (subgrid.lim[0] - 1) * subgrid.del[0] + epsilon; - var maxY = subgrid.ll[1] + (subgrid.lim[1] - 1) * subgrid.del[1] + epsilon; - if (minY > input.y || minX > input.x || maxY < input.y || maxX < input.x ) { - continue; - } - output = applySubgridShift(input, inverse, subgrid); - if (!isNaN(output.x)) { - break outer; - } - } - } - if (isNaN(output.x)) { - console.log("Failed to find a grid shift table for location '"+ - -input.x * R2D + " " + input.y * R2D + " tried: '" + attemptedGrids + "'"); - return -1; - } - point.x = -output.x; - point.y = output.y; - return 0; -} - -function applySubgridShift(pin, inverse, ct) { - var val = {x: Number.NaN, y: Number.NaN}; - if (isNaN(pin.x)) { return val; } - var tb = {x: pin.x, y: pin.y}; - tb.x -= ct.ll[0]; - tb.y -= ct.ll[1]; - tb.x = adjust_lon(tb.x - Math.PI) + Math.PI; - var t = nadInterpolate(tb, ct); - if (inverse) { - if (isNaN(t.x)) { - return val; - } - t.x = tb.x - t.x; - t.y = tb.y - t.y; - var i = 9, tol = 1e-12; - var dif, del; - do { - del = nadInterpolate(t, ct); - if (isNaN(del.x)) { - console.log("Inverse grid shift iteration failed, presumably at grid edge. Using first approximation."); - break; - } - dif = {x: tb.x - (del.x + t.x), y: tb.y - (del.y + t.y)}; - t.x += dif.x; - t.y += dif.y; - } while (i-- && Math.abs(dif.x) > tol && Math.abs(dif.y) > tol); - if (i < 0) { - console.log("Inverse grid shift iterator failed to converge."); - return val; - } - val.x = adjust_lon(t.x + ct.ll[0]); - val.y = t.y + ct.ll[1]; - } else { - if (!isNaN(t.x)) { - val.x = pin.x + t.x; - val.y = pin.y + t.y; - } - } - return val; -} - -function nadInterpolate(pin, ct) { - var t = {x: pin.x / ct.del[0], y: pin.y / ct.del[1]}; - var indx = {x: Math.floor(t.x), y: Math.floor(t.y)}; - var frct = {x: t.x - 1.0 * indx.x, y: t.y - 1.0 * indx.y}; - var val= {x: Number.NaN, y: Number.NaN}; - var inx; - if (indx.x < 0 || indx.x >= ct.lim[0]) { - return val; - } - if (indx.y < 0 || indx.y >= ct.lim[1]) { - return val; - } - inx = (indx.y * ct.lim[0]) + indx.x; - var f00 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; - inx++; - var f10= {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; - inx += ct.lim[0]; - var f11 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; - inx--; - var f01 = {x: ct.cvs[inx][0], y: ct.cvs[inx][1]}; - var m11 = frct.x * frct.y, m10 = frct.x * (1.0 - frct.y), - m00 = (1.0 - frct.x) * (1.0 - frct.y), m01 = (1.0 - frct.x) * frct.y; - val.x = (m00 * f00.x + m10 * f10.x + m01 * f01.x + m11 * f11.x); - val.y = (m00 * f00.y + m10 * f10.y + m01 * f01.y + m11 * f11.y); - return val; -} diff --git a/proj4js-master/lib/defs.js b/proj4js-master/lib/defs.js deleted file mode 100644 index 6655c800..00000000 --- a/proj4js-master/lib/defs.js +++ /dev/null @@ -1,55 +0,0 @@ -import globals from './global'; -import parseProj from './projString'; -import wkt from 'wkt-parser'; - -function defs(name) { - /*global console*/ - var that = this; - if (arguments.length === 2) { - var def = arguments[1]; - if (typeof def === 'string') { - if (def.charAt(0) === '+') { - defs[name] = parseProj(arguments[1]); - } - else { - defs[name] = wkt(arguments[1]); - } - } else { - defs[name] = def; - } - } - else if (arguments.length === 1) { - if (Array.isArray(name)) { - return name.map(function(v) { - if (Array.isArray(v)) { - defs.apply(that, v); - } - else { - defs(v); - } - }); - } - else if (typeof name === 'string') { - if (name in defs) { - return defs[name]; - } - } - else if ('EPSG' in name) { - defs['EPSG:' + name.EPSG] = name; - } - else if ('ESRI' in name) { - defs['ESRI:' + name.ESRI] = name; - } - else if ('IAU2000' in name) { - defs['IAU2000:' + name.IAU2000] = name; - } - else { - console.log(name); - } - return; - } - - -} -globals(defs); -export default defs; diff --git a/proj4js-master/lib/deriveConstants.js b/proj4js-master/lib/deriveConstants.js deleted file mode 100644 index fd8b382a..00000000 --- a/proj4js-master/lib/deriveConstants.js +++ /dev/null @@ -1,48 +0,0 @@ -import {SIXTH, RA4, RA6, EPSLN} from './constants/values'; -import {default as Ellipsoid, WGS84} from './constants/Ellipsoid'; -import match from './match'; - -export function eccentricity(a, b, rf, R_A) { - var a2 = a * a; // used in geocentric - var b2 = b * b; // used in geocentric - var es = (a2 - b2) / a2; // e ^ 2 - var e = 0; - if (R_A) { - a *= 1 - es * (SIXTH + es * (RA4 + es * RA6)); - a2 = a * a; - es = 0; - } else { - e = Math.sqrt(es); // eccentricity - } - var ep2 = (a2 - b2) / b2; // used in geocentric - return { - es: es, - e: e, - ep2: ep2 - }; -} -export function sphere(a, b, rf, ellps, sphere) { - if (!a) { // do we have an ellipsoid? - var ellipse = match(Ellipsoid, ellps); - if (!ellipse) { - ellipse = WGS84; - } - a = ellipse.a; - b = ellipse.b; - rf = ellipse.rf; - } - - if (rf && !b) { - b = (1.0 - 1.0 / rf) * a; - } - if (rf === 0 || Math.abs(a - b) < EPSLN) { - sphere = true; - b = a; - } - return { - a: a, - b: b, - rf: rf, - sphere: sphere - }; -} diff --git a/proj4js-master/lib/extend.js b/proj4js-master/lib/extend.js deleted file mode 100644 index bcd759f9..00000000 --- a/proj4js-master/lib/extend.js +++ /dev/null @@ -1,14 +0,0 @@ -export default function(destination, source) { - destination = destination || {}; - var value, property; - if (!source) { - return destination; - } - for (property in source) { - value = source[property]; - if (value !== undefined) { - destination[property] = value; - } - } - return destination; -} diff --git a/proj4js-master/lib/global.js b/proj4js-master/lib/global.js deleted file mode 100644 index 476a131a..00000000 --- a/proj4js-master/lib/global.js +++ /dev/null @@ -1,11 +0,0 @@ -export default function(defs) { - defs('EPSG:4326', "+title=WGS 84 (long/lat) +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees"); - defs('EPSG:4269', "+title=NAD83 (long/lat) +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees"); - defs('EPSG:3857', "+title=WGS 84 / Pseudo-Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"); - - defs.WGS84 = defs['EPSG:4326']; - defs['EPSG:3785'] = defs['EPSG:3857']; // maintain backward compat, official code is 3857 - defs.GOOGLE = defs['EPSG:3857']; - defs['EPSG:900913'] = defs['EPSG:3857']; - defs['EPSG:102113'] = defs['EPSG:3857']; -} diff --git a/proj4js-master/lib/includedProjections.js b/proj4js-master/lib/includedProjections.js deleted file mode 100644 index 17cb595c..00000000 --- a/proj4js-master/lib/includedProjections.js +++ /dev/null @@ -1,71 +0,0 @@ -import tmerc from "./projections/tmerc"; -import utm from "./projections/utm"; -import sterea from "./projections/sterea"; -import stere from "./projections/stere"; -import somerc from "./projections/somerc"; -import omerc from "./projections/omerc"; -import lcc from "./projections/lcc"; -import krovak from "./projections/krovak"; -import cass from "./projections/cass"; -import laea from "./projections/laea"; -import aea from "./projections/aea"; -import gnom from "./projections/gnom"; -import cea from "./projections/cea"; -import eqc from "./projections/eqc"; -import poly from "./projections/poly"; -import nzmg from "./projections/nzmg"; -import mill from "./projections/mill"; -import sinu from "./projections/sinu"; -import moll from "./projections/moll"; -import eqdc from "./projections/eqdc"; -import vandg from "./projections/vandg"; -import aegd from "./projections/aeqd"; -import etmerc from './projections/etmerc'; -import qsc from './projections/qsc'; -import robin from './projections/robin'; -import geocent from './projections/geocent'; -import tpers from './projections/tpers'; -import geos from './projections/geos'; -import eqearth from "./projections/eqearth"; -import bonne from "./projections/bonne"; -import gstmerc from "./projections/gstmerc"; - -var projs = [ - tmerc, - utm, - sterea, - stere, - somerc, - omerc, - lcc, - krovak, - cass, - laea, - aea, - gnom, - cea, - eqc, - poly, - nzmg, - mill, - sinu, - moll, - eqdc, - vandg, - aegd, - etmerc, - qsc, - robin, - geocent, - tpers, - geos, - eqearth, - bonne, - gstmerc -]; - -export default function (proj4) { - projs.forEach(function (proj) { - proj4.Proj.projections.add(proj); - }); -} \ No newline at end of file diff --git a/proj4js-master/lib/index.js b/proj4js-master/lib/index.js deleted file mode 100644 index bb5ec0bf..00000000 --- a/proj4js-master/lib/index.js +++ /dev/null @@ -1,22 +0,0 @@ -import proj4 from './core'; -import Proj from "./Proj"; -import Point from "./Point"; -import common from "./common/toPoint"; -import defs from "./defs"; -import nadgrid from "./nadgrid"; -import transform from "./transform"; -import mgrs from "mgrs"; -import includedProjections from "../projs"; - -proj4.defaultDatum = 'WGS84'; //default datum -proj4.Proj = Proj; -proj4.WGS84 = new proj4.Proj('WGS84'); -proj4.Point = Point; -proj4.toPoint = common; -proj4.defs = defs; -proj4.nadgrid = nadgrid; -proj4.transform = transform; -proj4.mgrs = mgrs; -proj4.version = '__VERSION__'; -includedProjections(proj4); -export default proj4; diff --git a/proj4js-master/lib/match.js b/proj4js-master/lib/match.js deleted file mode 100644 index 595e1667..00000000 --- a/proj4js-master/lib/match.js +++ /dev/null @@ -1,17 +0,0 @@ -var ignoredChar = /[\s_\-\/\(\)]/g; -export default function match(obj, key) { - if (obj[key]) { - return obj[key]; - } - var keys = Object.keys(obj); - var lkey = key.toLowerCase().replace(ignoredChar, ''); - var i = -1; - var testkey, processedKey; - while (++i < keys.length) { - testkey = keys[i]; - processedKey = testkey.toLowerCase().replace(ignoredChar, ''); - if (processedKey === lkey) { - return obj[testkey]; - } - } -} diff --git a/proj4js-master/lib/nadgrid.js b/proj4js-master/lib/nadgrid.js deleted file mode 100644 index 1924ef06..00000000 --- a/proj4js-master/lib/nadgrid.js +++ /dev/null @@ -1,140 +0,0 @@ -/** - * Resources for details of NTv2 file formats: - * - https://web.archive.org/web/20140127204822if_/http://www.mgs.gov.on.ca:80/stdprodconsume/groups/content/@mgs/@iandit/documents/resourcelist/stel02_047447.pdf - * - http://mimaka.com/help/gs/html/004_NTV2%20Data%20Format.htm - */ - -var loadedNadgrids = {}; - -/** - * Load a binary NTv2 file (.gsb) to a key that can be used in a proj string like +nadgrids=. Pass the NTv2 file - * as an ArrayBuffer. - */ -export default function nadgrid(key, data) { - var view = new DataView(data); - var isLittleEndian = detectLittleEndian(view); - var header = readHeader(view, isLittleEndian); - var subgrids = readSubgrids(view, header, isLittleEndian); - var nadgrid = {header: header, subgrids: subgrids}; - loadedNadgrids[key] = nadgrid; - return nadgrid; -} - -/** - * Given a proj4 value for nadgrids, return an array of loaded grids - */ -export function getNadgrids(nadgrids) { - // Format details: http://proj.maptools.org/gen_parms.html - if (nadgrids === undefined) { return null; } - var grids = nadgrids.split(','); - return grids.map(parseNadgridString); -} - -function parseNadgridString(value) { - if (value.length === 0) { - return null; - } - var optional = value[0] === '@'; - if (optional) { - value = value.slice(1); - } - if (value === 'null') { - return {name: 'null', mandatory: !optional, grid: null, isNull: true}; - } - return { - name: value, - mandatory: !optional, - grid: loadedNadgrids[value] || null, - isNull: false - }; -} - -function secondsToRadians(seconds) { - return (seconds / 3600) * Math.PI / 180; -} - -function detectLittleEndian(view) { - var nFields = view.getInt32(8, false); - if (nFields === 11) { - return false; - } - nFields = view.getInt32(8, true); - if (nFields !== 11) { - console.warn('Failed to detect nadgrid endian-ness, defaulting to little-endian'); - } - return true; -} - -function readHeader(view, isLittleEndian) { - return { - nFields: view.getInt32(8, isLittleEndian), - nSubgridFields: view.getInt32(24, isLittleEndian), - nSubgrids: view.getInt32(40, isLittleEndian), - shiftType: decodeString(view, 56, 56 + 8).trim(), - fromSemiMajorAxis: view.getFloat64(120, isLittleEndian), - fromSemiMinorAxis: view.getFloat64(136, isLittleEndian), - toSemiMajorAxis: view.getFloat64(152, isLittleEndian), - toSemiMinorAxis: view.getFloat64(168, isLittleEndian), - }; -} - -function decodeString(view, start, end) { - return String.fromCharCode.apply(null, new Uint8Array(view.buffer.slice(start, end))); -} - -function readSubgrids(view, header, isLittleEndian) { - var gridOffset = 176; - var grids = []; - for (var i = 0; i < header.nSubgrids; i++) { - var subHeader = readGridHeader(view, gridOffset, isLittleEndian); - var nodes = readGridNodes(view, gridOffset, subHeader, isLittleEndian); - var lngColumnCount = Math.round( - 1 + (subHeader.upperLongitude - subHeader.lowerLongitude) / subHeader.longitudeInterval); - var latColumnCount = Math.round( - 1 + (subHeader.upperLatitude - subHeader.lowerLatitude) / subHeader.latitudeInterval); - // Proj4 operates on radians whereas the coordinates are in seconds in the grid - grids.push({ - ll: [secondsToRadians(subHeader.lowerLongitude), secondsToRadians(subHeader.lowerLatitude)], - del: [secondsToRadians(subHeader.longitudeInterval), secondsToRadians(subHeader.latitudeInterval)], - lim: [lngColumnCount, latColumnCount], - count: subHeader.gridNodeCount, - cvs: mapNodes(nodes) - }); - gridOffset += 176 + subHeader.gridNodeCount * 16; - } - return grids; -} - -function mapNodes(nodes) { - return nodes.map(function (r) {return [secondsToRadians(r.longitudeShift), secondsToRadians(r.latitudeShift)];}); -} - -function readGridHeader(view, offset, isLittleEndian) { - return { - name: decodeString(view, offset + 8, offset + 16).trim(), - parent: decodeString(view, offset + 24, offset + 24 + 8).trim(), - lowerLatitude: view.getFloat64(offset + 72, isLittleEndian), - upperLatitude: view.getFloat64(offset + 88, isLittleEndian), - lowerLongitude: view.getFloat64(offset + 104, isLittleEndian), - upperLongitude: view.getFloat64(offset + 120, isLittleEndian), - latitudeInterval: view.getFloat64(offset + 136, isLittleEndian), - longitudeInterval: view.getFloat64(offset + 152, isLittleEndian), - gridNodeCount: view.getInt32(offset + 168, isLittleEndian) - }; -} - -function readGridNodes(view, offset, gridHeader, isLittleEndian) { - var nodesOffset = offset + 176; - var gridRecordLength = 16; - var gridShiftRecords = []; - for (var i = 0; i < gridHeader.gridNodeCount; i++) { - var record = { - latitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength, isLittleEndian), - longitudeShift: view.getFloat32(nodesOffset + i * gridRecordLength + 4, isLittleEndian), - latitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 8, isLittleEndian), - longitudeAccuracy: view.getFloat32(nodesOffset + i * gridRecordLength + 12, isLittleEndian), - }; - gridShiftRecords.push(record); - } - return gridShiftRecords; -} diff --git a/proj4js-master/lib/parseCode.js b/proj4js-master/lib/parseCode.js deleted file mode 100644 index 6d2f95fe..00000000 --- a/proj4js-master/lib/parseCode.js +++ /dev/null @@ -1,62 +0,0 @@ -import defs from './defs'; -import wkt from 'wkt-parser'; -import projStr from './projString'; -import match from './match'; -function testObj(code){ - return typeof code === 'string'; -} -function testDef(code){ - return code in defs; -} -var codeWords = ['PROJECTEDCRS', 'PROJCRS', 'GEOGCS','GEOCCS','PROJCS','LOCAL_CS', 'GEODCRS', 'GEODETICCRS', 'GEODETICDATUM', 'ENGCRS', 'ENGINEERINGCRS']; -function testWKT(code){ - return codeWords.some(function (word) { - return code.indexOf(word) > -1; - }); -} -var codes = ['3857', '900913', '3785', '102113']; -function checkMercator(item) { - var auth = match(item, 'authority'); - if (!auth) { - return; - } - var code = match(auth, 'epsg'); - return code && codes.indexOf(code) > -1; -} -function checkProjStr(item) { - var ext = match(item, 'extension'); - if (!ext) { - return; - } - return match(ext, 'proj4'); -} -function testProj(code){ - return code[0] === '+'; -} -function parse(code){ - if (testObj(code)) { - //check to see if this is a WKT string - if (testDef(code)) { - return defs[code]; - } - if (testWKT(code)) { - var out = wkt(code); - // test of spetial case, due to this being a very common and often malformed - if (checkMercator(out)) { - return defs['EPSG:3857']; - } - var maybeProjStr = checkProjStr(out); - if (maybeProjStr) { - return projStr(maybeProjStr); - } - return out; - } - if (testProj(code)) { - return projStr(code); - } - }else{ - return code; - } -} - -export default parse; diff --git a/proj4js-master/lib/projString.js b/proj4js-master/lib/projString.js deleted file mode 100644 index 53e96730..00000000 --- a/proj4js-master/lib/projString.js +++ /dev/null @@ -1,145 +0,0 @@ -import {D2R} from './constants/values'; -import PrimeMeridian from './constants/PrimeMeridian'; -import units from './constants/units'; -import match from './match'; - -export default function(defData) { - var self = {}; - var paramObj = defData.split('+').map(function(v) { - return v.trim(); - }).filter(function(a) { - return a; - }).reduce(function(p, a) { - var split = a.split('='); - split.push(true); - p[split[0].toLowerCase()] = split[1]; - return p; - }, {}); - var paramName, paramVal, paramOutname; - var params = { - proj: 'projName', - datum: 'datumCode', - rf: function(v) { - self.rf = parseFloat(v); - }, - lat_0: function(v) { - self.lat0 = v * D2R; - }, - lat_1: function(v) { - self.lat1 = v * D2R; - }, - lat_2: function(v) { - self.lat2 = v * D2R; - }, - lat_ts: function(v) { - self.lat_ts = v * D2R; - }, - lon_0: function(v) { - self.long0 = v * D2R; - }, - lon_1: function(v) { - self.long1 = v * D2R; - }, - lon_2: function(v) { - self.long2 = v * D2R; - }, - alpha: function(v) { - self.alpha = parseFloat(v) * D2R; - }, - gamma: function(v) { - self.rectified_grid_angle = parseFloat(v); - }, - lonc: function(v) { - self.longc = v * D2R; - }, - x_0: function(v) { - self.x0 = parseFloat(v); - }, - y_0: function(v) { - self.y0 = parseFloat(v); - }, - k_0: function(v) { - self.k0 = parseFloat(v); - }, - k: function(v) { - self.k0 = parseFloat(v); - }, - a: function(v) { - self.a = parseFloat(v); - }, - b: function(v) { - self.b = parseFloat(v); - }, - r: function(v) { - self.a = self.b = parseFloat(v); - }, - r_a: function() { - self.R_A = true; - }, - zone: function(v) { - self.zone = parseInt(v, 10); - }, - south: function() { - self.utmSouth = true; - }, - towgs84: function(v) { - self.datum_params = v.split(",").map(function(a) { - return parseFloat(a); - }); - }, - to_meter: function(v) { - self.to_meter = parseFloat(v); - }, - units: function(v) { - self.units = v; - var unit = match(units, v); - if (unit) { - self.to_meter = unit.to_meter; - } - }, - from_greenwich: function(v) { - self.from_greenwich = v * D2R; - }, - pm: function(v) { - var pm = match(PrimeMeridian, v); - self.from_greenwich = (pm ? pm : parseFloat(v)) * D2R; - }, - nadgrids: function(v) { - if (v === '@null') { - self.datumCode = 'none'; - } - else { - self.nadgrids = v; - } - }, - axis: function(v) { - var legalAxis = "ewnsud"; - if (v.length === 3 && legalAxis.indexOf(v.substr(0, 1)) !== -1 && legalAxis.indexOf(v.substr(1, 1)) !== -1 && legalAxis.indexOf(v.substr(2, 1)) !== -1) { - self.axis = v; - } - }, - approx: function() { - self.approx = true; - } - }; - for (paramName in paramObj) { - paramVal = paramObj[paramName]; - if (paramName in params) { - paramOutname = params[paramName]; - if (typeof paramOutname === 'function') { - paramOutname(paramVal); - } - else { - self[paramOutname] = paramVal; - } - } - else { - self[paramName] = paramVal; - } - } - if(typeof self.datumCode === 'string' && self.datumCode !== "WGS84"){ - self.datumCode = self.datumCode.toLowerCase(); - } - - return self; -} diff --git a/proj4js-master/lib/projections.js b/proj4js-master/lib/projections.js deleted file mode 100644 index 6667b447..00000000 --- a/proj4js-master/lib/projections.js +++ /dev/null @@ -1,39 +0,0 @@ -import merc from "./projections/merc"; -import longlat from "./projections/longlat"; -var projs = [merc, longlat]; -var names = {}; -var projStore = []; - -function add(proj, i) { - var len = projStore.length; - if (!proj.names) { - console.log(i); - return true; - } - projStore[len] = proj; - proj.names.forEach(function(n) { - names[n.toLowerCase()] = len; - }); - return this; -} - -export {add}; - -export function get(name) { - if (!name) { - return false; - } - var n = name.toLowerCase(); - if (typeof names[n] !== 'undefined' && projStore[names[n]]) { - return projStore[names[n]]; - } -} - -export function start() { - projs.forEach(add); -} -export default { - start: start, - add: add, - get: get -}; diff --git a/proj4js-master/lib/projections/aea.js b/proj4js-master/lib/projections/aea.js deleted file mode 100644 index 4cfbc970..00000000 --- a/proj4js-master/lib/projections/aea.js +++ /dev/null @@ -1,129 +0,0 @@ -import msfnz from '../common/msfnz'; -import qsfnz from '../common/qsfnz'; -import adjust_lon from '../common/adjust_lon'; -import asinz from '../common/asinz'; -import {EPSLN} from '../constants/values'; - -export function init() { - - if (Math.abs(this.lat1 + this.lat2) < EPSLN) { - return; - } - this.temp = this.b / this.a; - this.es = 1 - Math.pow(this.temp, 2); - this.e3 = Math.sqrt(this.es); - - this.sin_po = Math.sin(this.lat1); - this.cos_po = Math.cos(this.lat1); - this.t1 = this.sin_po; - this.con = this.sin_po; - this.ms1 = msfnz(this.e3, this.sin_po, this.cos_po); - this.qs1 = qsfnz(this.e3, this.sin_po); - - this.sin_po = Math.sin(this.lat2); - this.cos_po = Math.cos(this.lat2); - this.t2 = this.sin_po; - this.ms2 = msfnz(this.e3, this.sin_po, this.cos_po); - this.qs2 = qsfnz(this.e3, this.sin_po); - - this.sin_po = Math.sin(this.lat0); - this.cos_po = Math.cos(this.lat0); - this.t3 = this.sin_po; - this.qs0 = qsfnz(this.e3, this.sin_po); - - if (Math.abs(this.lat1 - this.lat2) > EPSLN) { - this.ns0 = (this.ms1 * this.ms1 - this.ms2 * this.ms2) / (this.qs2 - this.qs1); - } - else { - this.ns0 = this.con; - } - this.c = this.ms1 * this.ms1 + this.ns0 * this.qs1; - this.rh = this.a * Math.sqrt(this.c - this.ns0 * this.qs0) / this.ns0; -} - -/* Albers Conical Equal Area forward equations--mapping lat,long to x,y - -------------------------------------------------------------------*/ -export function forward(p) { - - var lon = p.x; - var lat = p.y; - - this.sin_phi = Math.sin(lat); - this.cos_phi = Math.cos(lat); - - var qs = qsfnz(this.e3, this.sin_phi); - var rh1 = this.a * Math.sqrt(this.c - this.ns0 * qs) / this.ns0; - var theta = this.ns0 * adjust_lon(lon - this.long0); - var x = rh1 * Math.sin(theta) + this.x0; - var y = this.rh - rh1 * Math.cos(theta) + this.y0; - - p.x = x; - p.y = y; - return p; -} - -export function inverse(p) { - var rh1, qs, con, theta, lon, lat; - - p.x -= this.x0; - p.y = this.rh - p.y + this.y0; - if (this.ns0 >= 0) { - rh1 = Math.sqrt(p.x * p.x + p.y * p.y); - con = 1; - } - else { - rh1 = -Math.sqrt(p.x * p.x + p.y * p.y); - con = -1; - } - theta = 0; - if (rh1 !== 0) { - theta = Math.atan2(con * p.x, con * p.y); - } - con = rh1 * this.ns0 / this.a; - if (this.sphere) { - lat = Math.asin((this.c - con * con) / (2 * this.ns0)); - } - else { - qs = (this.c - con * con) / this.ns0; - lat = this.phi1z(this.e3, qs); - } - - lon = adjust_lon(theta / this.ns0 + this.long0); - p.x = lon; - p.y = lat; - return p; -} - -/* Function to compute phi1, the latitude for the inverse of the - Albers Conical Equal-Area projection. --------------------------------------------*/ -export function phi1z(eccent, qs) { - var sinphi, cosphi, con, com, dphi; - var phi = asinz(0.5 * qs); - if (eccent < EPSLN) { - return phi; - } - - var eccnts = eccent * eccent; - for (var i = 1; i <= 25; i++) { - sinphi = Math.sin(phi); - cosphi = Math.cos(phi); - con = eccent * sinphi; - com = 1 - con * con; - dphi = 0.5 * com * com / cosphi * (qs / (1 - eccnts) - sinphi / com + 0.5 / eccent * Math.log((1 - con) / (1 + con))); - phi = phi + dphi; - if (Math.abs(dphi) <= 1e-7) { - return phi; - } - } - return null; -} - -export var names = ["Albers_Conic_Equal_Area", "Albers", "aea"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names, - phi1z: phi1z -}; diff --git a/proj4js-master/lib/projections/aeqd.js b/proj4js-master/lib/projections/aeqd.js deleted file mode 100644 index 1a60c9df..00000000 --- a/proj4js-master/lib/projections/aeqd.js +++ /dev/null @@ -1,208 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; -import {HALF_PI, EPSLN} from '../constants/values'; - -import mlfn from '../common/mlfn'; -import e0fn from '../common/e0fn'; -import e1fn from '../common/e1fn'; -import e2fn from '../common/e2fn'; -import e3fn from '../common/e3fn'; -import gN from '../common/gN'; -import asinz from '../common/asinz'; -import imlfn from '../common/imlfn'; - - - -export function init() { - this.sin_p12 = Math.sin(this.lat0); - this.cos_p12 = Math.cos(this.lat0); -} - -export function forward(p) { - var lon = p.x; - var lat = p.y; - var sinphi = Math.sin(p.y); - var cosphi = Math.cos(p.y); - var dlon = adjust_lon(lon - this.long0); - var e0, e1, e2, e3, Mlp, Ml, tanphi, Nl1, Nl, psi, Az, G, H, GH, Hs, c, kp, cos_c, s, s2, s3, s4, s5; - if (this.sphere) { - if (Math.abs(this.sin_p12 - 1) <= EPSLN) { - //North Pole case - p.x = this.x0 + this.a * (HALF_PI - lat) * Math.sin(dlon); - p.y = this.y0 - this.a * (HALF_PI - lat) * Math.cos(dlon); - return p; - } - else if (Math.abs(this.sin_p12 + 1) <= EPSLN) { - //South Pole case - p.x = this.x0 + this.a * (HALF_PI + lat) * Math.sin(dlon); - p.y = this.y0 + this.a * (HALF_PI + lat) * Math.cos(dlon); - return p; - } - else { - //default case - cos_c = this.sin_p12 * sinphi + this.cos_p12 * cosphi * Math.cos(dlon); - c = Math.acos(cos_c); - kp = c ? c / Math.sin(c) : 1; - p.x = this.x0 + this.a * kp * cosphi * Math.sin(dlon); - p.y = this.y0 + this.a * kp * (this.cos_p12 * sinphi - this.sin_p12 * cosphi * Math.cos(dlon)); - return p; - } - } - else { - e0 = e0fn(this.es); - e1 = e1fn(this.es); - e2 = e2fn(this.es); - e3 = e3fn(this.es); - if (Math.abs(this.sin_p12 - 1) <= EPSLN) { - //North Pole case - Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); - Ml = this.a * mlfn(e0, e1, e2, e3, lat); - p.x = this.x0 + (Mlp - Ml) * Math.sin(dlon); - p.y = this.y0 - (Mlp - Ml) * Math.cos(dlon); - return p; - } - else if (Math.abs(this.sin_p12 + 1) <= EPSLN) { - //South Pole case - Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); - Ml = this.a * mlfn(e0, e1, e2, e3, lat); - p.x = this.x0 + (Mlp + Ml) * Math.sin(dlon); - p.y = this.y0 + (Mlp + Ml) * Math.cos(dlon); - return p; - } - else { - //Default case - tanphi = sinphi / cosphi; - Nl1 = gN(this.a, this.e, this.sin_p12); - Nl = gN(this.a, this.e, sinphi); - psi = Math.atan((1 - this.es) * tanphi + this.es * Nl1 * this.sin_p12 / (Nl * cosphi)); - Az = Math.atan2(Math.sin(dlon), this.cos_p12 * Math.tan(psi) - this.sin_p12 * Math.cos(dlon)); - if (Az === 0) { - s = Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi)); - } - else if (Math.abs(Math.abs(Az) - Math.PI) <= EPSLN) { - s = -Math.asin(this.cos_p12 * Math.sin(psi) - this.sin_p12 * Math.cos(psi)); - } - else { - s = Math.asin(Math.sin(dlon) * Math.cos(psi) / Math.sin(Az)); - } - G = this.e * this.sin_p12 / Math.sqrt(1 - this.es); - H = this.e * this.cos_p12 * Math.cos(Az) / Math.sqrt(1 - this.es); - GH = G * H; - Hs = H * H; - s2 = s * s; - s3 = s2 * s; - s4 = s3 * s; - s5 = s4 * s; - c = Nl1 * s * (1 - s2 * Hs * (1 - Hs) / 6 + s3 / 8 * GH * (1 - 2 * Hs) + s4 / 120 * (Hs * (4 - 7 * Hs) - 3 * G * G * (1 - 7 * Hs)) - s5 / 48 * GH); - p.x = this.x0 + c * Math.sin(Az); - p.y = this.y0 + c * Math.cos(Az); - return p; - } - } - - -} - -export function inverse(p) { - p.x -= this.x0; - p.y -= this.y0; - var rh, z, sinz, cosz, lon, lat, con, e0, e1, e2, e3, Mlp, M, N1, psi, Az, cosAz, tmp, A, B, D, Ee, F, sinpsi; - if (this.sphere) { - rh = Math.sqrt(p.x * p.x + p.y * p.y); - if (rh > (2 * HALF_PI * this.a)) { - return; - } - z = rh / this.a; - - sinz = Math.sin(z); - cosz = Math.cos(z); - - lon = this.long0; - if (Math.abs(rh) <= EPSLN) { - lat = this.lat0; - } - else { - lat = asinz(cosz * this.sin_p12 + (p.y * sinz * this.cos_p12) / rh); - con = Math.abs(this.lat0) - HALF_PI; - if (Math.abs(con) <= EPSLN) { - if (this.lat0 >= 0) { - lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y)); - } - else { - lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y)); - } - } - else { - /*con = cosz - this.sin_p12 * Math.sin(lat); - if ((Math.abs(con) < EPSLN) && (Math.abs(p.x) < EPSLN)) { - //no-op, just keep the lon value as is - } else { - var temp = Math.atan2((p.x * sinz * this.cos_p12), (con * rh)); - lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz * this.cos_p12), (con * rh))); - }*/ - lon = adjust_lon(this.long0 + Math.atan2(p.x * sinz, rh * this.cos_p12 * cosz - p.y * this.sin_p12 * sinz)); - } - } - - p.x = lon; - p.y = lat; - return p; - } - else { - e0 = e0fn(this.es); - e1 = e1fn(this.es); - e2 = e2fn(this.es); - e3 = e3fn(this.es); - if (Math.abs(this.sin_p12 - 1) <= EPSLN) { - //North pole case - Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); - rh = Math.sqrt(p.x * p.x + p.y * p.y); - M = Mlp - rh; - lat = imlfn(M / this.a, e0, e1, e2, e3); - lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y)); - p.x = lon; - p.y = lat; - return p; - } - else if (Math.abs(this.sin_p12 + 1) <= EPSLN) { - //South pole case - Mlp = this.a * mlfn(e0, e1, e2, e3, HALF_PI); - rh = Math.sqrt(p.x * p.x + p.y * p.y); - M = rh - Mlp; - - lat = imlfn(M / this.a, e0, e1, e2, e3); - lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y)); - p.x = lon; - p.y = lat; - return p; - } - else { - //default case - rh = Math.sqrt(p.x * p.x + p.y * p.y); - Az = Math.atan2(p.x, p.y); - N1 = gN(this.a, this.e, this.sin_p12); - cosAz = Math.cos(Az); - tmp = this.e * this.cos_p12 * cosAz; - A = -tmp * tmp / (1 - this.es); - B = 3 * this.es * (1 - A) * this.sin_p12 * this.cos_p12 * cosAz / (1 - this.es); - D = rh / N1; - Ee = D - A * (1 + A) * Math.pow(D, 3) / 6 - B * (1 + 3 * A) * Math.pow(D, 4) / 24; - F = 1 - A * Ee * Ee / 2 - D * Ee * Ee * Ee / 6; - psi = Math.asin(this.sin_p12 * Math.cos(Ee) + this.cos_p12 * Math.sin(Ee) * cosAz); - lon = adjust_lon(this.long0 + Math.asin(Math.sin(Az) * Math.sin(Ee) / Math.cos(psi))); - sinpsi = Math.sin(psi); - lat = Math.atan2((sinpsi - this.es * F * this.sin_p12) * Math.tan(psi), sinpsi * (1 - this.es)); - p.x = lon; - p.y = lat; - return p; - } - } - -} - -export var names = ["Azimuthal_Equidistant", "aeqd"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/bonne.js b/proj4js-master/lib/projections/bonne.js deleted file mode 100644 index 90b4343f..00000000 --- a/proj4js-master/lib/projections/bonne.js +++ /dev/null @@ -1,114 +0,0 @@ -import adjust_lat from "../common/adjust_lat"; -import adjust_lon from "../common/adjust_lon"; -import hypot from "../common/hypot"; -import pj_enfn from "../common/pj_enfn"; -import pj_inv_mlfn from "../common/pj_inv_mlfn"; -import pj_mlfn from "../common/pj_mlfn"; -import { HALF_PI } from "../constants/values"; - -var EPS10 = 1e-10; - -export function init() { - var c; - - this.phi1 = this.lat1; - if (Math.abs(this.phi1) < EPS10) { - throw new Error(); - } - console.log('BONNE INIT', this) - if (this.es) { - this.en = pj_enfn(this.es); - this.m1 = pj_mlfn(this.phi1, this.am1 = Math.sin(this.phi1), - c = Math.cos(this.phi1), this.en); - this.am1 = c / (Math.sqrt(1 - this.es * this.am1 * this.am1) * this.am1); - this.inverse = e_inv; - this.forward = e_fwd; - } else { - if (Math.abs(this.phi1) + EPS10 >= HALF_PI) { - this.cphi1 = 0; - } - else { - this.cphi1 = 1 / Math.tan(this.phi1); - } - this.inverse = s_inv; - this.forward = s_fwd; - } -} - -function e_fwd(p) { - var lam = adjust_lon(p.x - (this.long0 || 0)); - var phi = p.y; - var rh, E, c; - rh = this.am1 + this.m1 - pj_mlfn(phi, E = Math.sin(phi), c = Math.cos(phi), this.en); - E = c * lam / (rh * Math.sqrt(1 - this.es * E * E)); - p.x = rh * Math.sin(E); - p.y = this.am1 - rh * Math.cos(E); - - p.x = this.a * p.x + (this.x0 || 0); - p.y = this.a * p.y + (this.y0 || 0); - return p; -} - -function e_inv(p) { - p.x = (p.x - (this.x0 || 0)) / this.a; - p.y = (p.y - (this.y0 || 0)) / this.a; - - var s, rh, lam, phi; - rh = hypot(p.x, p.y = this.am1 - p.y); - phi = pj_inv_mlfn(this.am1 + this.m1 - rh, this.es, this.en); - if ((s = Math.abs(phi)) < HALF_PI) { - s = Math.sin(phi); - lam = rh * Math.atan2(p.x, p.y) * Math.sqrt(1 - this.es * s * s) / Math.cos(phi); - } else if (Math.abs(s - HALF_PI) <= EPS10) { - lam = 0; - } - else { - throw new Error(); - } - p.x = adjust_lon(lam + (this.long0 || 0)); - p.y = adjust_lat(phi); - return p; -} - -function s_fwd(p) { - var lam = adjust_lon(p.x - (this.long0 || 0)); - var phi = p.y; - var E, rh; - rh = this.cphi1 + this.phi1 - phi; - if (Math.abs(rh) > EPS10) { - p.x = rh * Math.sin(E = lam * Math.cos(phi) / rh); - p.y = this.cphi1 - rh * Math.cos(E); - } else { - p.x = p.y = 0; - } - - p.x = this.a * p.x + (this.x0 || 0); - p.y = this.a * p.y + (this.y0 || 0); - return p; -} - -function s_inv(p) { - p.x = (p.x - (this.x0 || 0)) / this.a; - p.y = (p.y - (this.y0 || 0)) / this.a; - - var lam, phi; - var rh = hypot(p.x, p.y = this.cphi1 - p.y); - phi = this.cphi1 + this.phi1 - rh; - if (Math.abs(phi) > HALF_PI) { - throw new Error(); - } - if (Math.abs(Math.abs(phi) - HALF_PI) <= EPS10) { - lam = 0; - } else { - lam = rh * Math.atan2(p.x, p.y) / Math.cos(phi); - } - p.x = adjust_lon(lam + (this.long0 || 0)); - p.y = adjust_lat(phi); - return p; -} - -export var names = ["bonne", "Bonne (Werner lat_1=90)"]; -export default { - init: init, - names: names -}; \ No newline at end of file diff --git a/proj4js-master/lib/projections/cass.js b/proj4js-master/lib/projections/cass.js deleted file mode 100644 index 74f4d388..00000000 --- a/proj4js-master/lib/projections/cass.js +++ /dev/null @@ -1,108 +0,0 @@ -import mlfn from '../common/mlfn'; -import e0fn from '../common/e0fn'; -import e1fn from '../common/e1fn'; -import e2fn from '../common/e2fn'; -import e3fn from '../common/e3fn'; -import gN from '../common/gN'; -import adjust_lon from '../common/adjust_lon'; -import adjust_lat from '../common/adjust_lat'; -import imlfn from '../common/imlfn'; -import {HALF_PI, EPSLN} from '../constants/values'; - -export function init() { - if (!this.sphere) { - this.e0 = e0fn(this.es); - this.e1 = e1fn(this.es); - this.e2 = e2fn(this.es); - this.e3 = e3fn(this.es); - this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); - } -} - -/* Cassini forward equations--mapping lat,long to x,y - -----------------------------------------------------------------------*/ -export function forward(p) { - - /* Forward equations - -----------------*/ - var x, y; - var lam = p.x; - var phi = p.y; - lam = adjust_lon(lam - this.long0); - - if (this.sphere) { - x = this.a * Math.asin(Math.cos(phi) * Math.sin(lam)); - y = this.a * (Math.atan2(Math.tan(phi), Math.cos(lam)) - this.lat0); - } - else { - //ellipsoid - var sinphi = Math.sin(phi); - var cosphi = Math.cos(phi); - var nl = gN(this.a, this.e, sinphi); - var tl = Math.tan(phi) * Math.tan(phi); - var al = lam * Math.cos(phi); - var asq = al * al; - var cl = this.es * cosphi * cosphi / (1 - this.es); - var ml = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi); - - x = nl * al * (1 - asq * tl * (1 / 6 - (8 - tl + 8 * cl) * asq / 120)); - y = ml - this.ml0 + nl * sinphi / cosphi * asq * (0.5 + (5 - tl + 6 * cl) * asq / 24); - - - } - - p.x = x + this.x0; - p.y = y + this.y0; - return p; -} - -/* Inverse equations - -----------------*/ -export function inverse(p) { - p.x -= this.x0; - p.y -= this.y0; - var x = p.x / this.a; - var y = p.y / this.a; - var phi, lam; - - if (this.sphere) { - var dd = y + this.lat0; - phi = Math.asin(Math.sin(dd) * Math.cos(x)); - lam = Math.atan2(Math.tan(x), Math.cos(dd)); - } - else { - /* ellipsoid */ - var ml1 = this.ml0 / this.a + y; - var phi1 = imlfn(ml1, this.e0, this.e1, this.e2, this.e3); - if (Math.abs(Math.abs(phi1) - HALF_PI) <= EPSLN) { - p.x = this.long0; - p.y = HALF_PI; - if (y < 0) { - p.y *= -1; - } - return p; - } - var nl1 = gN(this.a, this.e, Math.sin(phi1)); - - var rl1 = nl1 * nl1 * nl1 / this.a / this.a * (1 - this.es); - var tl1 = Math.pow(Math.tan(phi1), 2); - var dl = x * this.a / nl1; - var dsq = dl * dl; - phi = phi1 - nl1 * Math.tan(phi1) / rl1 * dl * dl * (0.5 - (1 + 3 * tl1) * dl * dl / 24); - lam = dl * (1 - dsq * (tl1 / 3 + (1 + 3 * tl1) * tl1 * dsq / 15)) / Math.cos(phi1); - - } - - p.x = adjust_lon(lam + this.long0); - p.y = adjust_lat(phi); - return p; - -} - -export var names = ["Cassini", "Cassini_Soldner", "cass"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/cea.js b/proj4js-master/lib/projections/cea.js deleted file mode 100644 index 68fc2adb..00000000 --- a/proj4js-master/lib/projections/cea.js +++ /dev/null @@ -1,70 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; -import qsfnz from '../common/qsfnz'; -import msfnz from '../common/msfnz'; -import iqsfnz from '../common/iqsfnz'; - -/* - reference: - "Cartographic Projection Procedures for the UNIX Environment- - A User's Manual" by Gerald I. Evenden, - USGS Open File Report 90-284and Release 4 Interim Reports (2003) -*/ -export function init() { - //no-op - if (!this.sphere) { - this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)); - } -} - -/* Cylindrical Equal Area forward equations--mapping lat,long to x,y - ------------------------------------------------------------*/ -export function forward(p) { - var lon = p.x; - var lat = p.y; - var x, y; - /* Forward equations - -----------------*/ - var dlon = adjust_lon(lon - this.long0); - if (this.sphere) { - x = this.x0 + this.a * dlon * Math.cos(this.lat_ts); - y = this.y0 + this.a * Math.sin(lat) / Math.cos(this.lat_ts); - } - else { - var qs = qsfnz(this.e, Math.sin(lat)); - x = this.x0 + this.a * this.k0 * dlon; - y = this.y0 + this.a * qs * 0.5 / this.k0; - } - - p.x = x; - p.y = y; - return p; -} - -/* Cylindrical Equal Area inverse equations--mapping x,y to lat/long - ------------------------------------------------------------*/ -export function inverse(p) { - p.x -= this.x0; - p.y -= this.y0; - var lon, lat; - - if (this.sphere) { - lon = adjust_lon(this.long0 + (p.x / this.a) / Math.cos(this.lat_ts)); - lat = Math.asin((p.y / this.a) * Math.cos(this.lat_ts)); - } - else { - lat = iqsfnz(this.e, 2 * p.y * this.k0 / this.a); - lon = adjust_lon(this.long0 + p.x / (this.a * this.k0)); - } - - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["cea"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/eqc.js b/proj4js-master/lib/projections/eqc.js deleted file mode 100644 index 44513280..00000000 --- a/proj4js-master/lib/projections/eqc.js +++ /dev/null @@ -1,48 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; -import adjust_lat from '../common/adjust_lat'; - -export function init() { - - this.x0 = this.x0 || 0; - this.y0 = this.y0 || 0; - this.lat0 = this.lat0 || 0; - this.long0 = this.long0 || 0; - this.lat_ts = this.lat_ts || 0; - this.title = this.title || "Equidistant Cylindrical (Plate Carre)"; - - this.rc = Math.cos(this.lat_ts); -} - -// forward equations--mapping lat,long to x,y -// ----------------------------------------------------------------- -export function forward(p) { - - var lon = p.x; - var lat = p.y; - - var dlon = adjust_lon(lon - this.long0); - var dlat = adjust_lat(lat - this.lat0); - p.x = this.x0 + (this.a * dlon * this.rc); - p.y = this.y0 + (this.a * dlat); - return p; -} - -// inverse equations--mapping x,y to lat/long -// ----------------------------------------------------------------- -export function inverse(p) { - - var x = p.x; - var y = p.y; - - p.x = adjust_lon(this.long0 + ((x - this.x0) / (this.a * this.rc))); - p.y = adjust_lat(this.lat0 + ((y - this.y0) / (this.a))); - return p; -} - -export var names = ["Equirectangular", "Equidistant_Cylindrical", "eqc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/eqdc.js b/proj4js-master/lib/projections/eqdc.js deleted file mode 100644 index fcf03e1d..00000000 --- a/proj4js-master/lib/projections/eqdc.js +++ /dev/null @@ -1,117 +0,0 @@ -import e0fn from '../common/e0fn'; -import e1fn from '../common/e1fn'; -import e2fn from '../common/e2fn'; -import e3fn from '../common/e3fn'; -import msfnz from '../common/msfnz'; -import mlfn from '../common/mlfn'; -import adjust_lon from '../common/adjust_lon'; -import adjust_lat from '../common/adjust_lat'; -import imlfn from '../common/imlfn'; -import {EPSLN} from '../constants/values'; - -export function init() { - - /* Place parameters in static storage for common use - -------------------------------------------------*/ - // Standard Parallels cannot be equal and on opposite sides of the equator - if (Math.abs(this.lat1 + this.lat2) < EPSLN) { - return; - } - this.lat2 = this.lat2 || this.lat1; - this.temp = this.b / this.a; - this.es = 1 - Math.pow(this.temp, 2); - this.e = Math.sqrt(this.es); - this.e0 = e0fn(this.es); - this.e1 = e1fn(this.es); - this.e2 = e2fn(this.es); - this.e3 = e3fn(this.es); - - this.sinphi = Math.sin(this.lat1); - this.cosphi = Math.cos(this.lat1); - - this.ms1 = msfnz(this.e, this.sinphi, this.cosphi); - this.ml1 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat1); - - if (Math.abs(this.lat1 - this.lat2) < EPSLN) { - this.ns = this.sinphi; - } - else { - this.sinphi = Math.sin(this.lat2); - this.cosphi = Math.cos(this.lat2); - this.ms2 = msfnz(this.e, this.sinphi, this.cosphi); - this.ml2 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat2); - this.ns = (this.ms1 - this.ms2) / (this.ml2 - this.ml1); - } - this.g = this.ml1 + this.ms1 / this.ns; - this.ml0 = mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); - this.rh = this.a * (this.g - this.ml0); -} - -/* Equidistant Conic forward equations--mapping lat,long to x,y - -----------------------------------------------------------*/ -export function forward(p) { - var lon = p.x; - var lat = p.y; - var rh1; - - /* Forward equations - -----------------*/ - if (this.sphere) { - rh1 = this.a * (this.g - lat); - } - else { - var ml = mlfn(this.e0, this.e1, this.e2, this.e3, lat); - rh1 = this.a * (this.g - ml); - } - var theta = this.ns * adjust_lon(lon - this.long0); - var x = this.x0 + rh1 * Math.sin(theta); - var y = this.y0 + this.rh - rh1 * Math.cos(theta); - p.x = x; - p.y = y; - return p; -} - -/* Inverse equations - -----------------*/ -export function inverse(p) { - p.x -= this.x0; - p.y = this.rh - p.y + this.y0; - var con, rh1, lat, lon; - if (this.ns >= 0) { - rh1 = Math.sqrt(p.x * p.x + p.y * p.y); - con = 1; - } - else { - rh1 = -Math.sqrt(p.x * p.x + p.y * p.y); - con = -1; - } - var theta = 0; - if (rh1 !== 0) { - theta = Math.atan2(con * p.x, con * p.y); - } - - if (this.sphere) { - lon = adjust_lon(this.long0 + theta / this.ns); - lat = adjust_lat(this.g - rh1 / this.a); - p.x = lon; - p.y = lat; - return p; - } - else { - var ml = this.g - rh1 / this.a; - lat = imlfn(ml, this.e0, this.e1, this.e2, this.e3); - lon = adjust_lon(this.long0 + theta / this.ns); - p.x = lon; - p.y = lat; - return p; - } - -} - -export var names = ["Equidistant_Conic", "eqdc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/eqearth.js b/proj4js-master/lib/projections/eqearth.js deleted file mode 100644 index e407e1b1..00000000 --- a/proj4js-master/lib/projections/eqearth.js +++ /dev/null @@ -1,93 +0,0 @@ -/** - * Copyright 2018 Bernie Jenny, Monash University, Melbourne, Australia. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * - * Equal Earth is a projection inspired by the Robinson projection, but unlike - * the Robinson projection retains the relative size of areas. The projection - * was designed in 2018 by Bojan Savric, Tom Patterson and Bernhard Jenny. - * - * Publication: - * Bojan Savric, Tom Patterson & Bernhard Jenny (2018). The Equal Earth map - * projection, International Journal of Geographical Information Science, - * DOI: 10.1080/13658816.2018.1504949 - * - * Code released August 2018 - * Ported to JavaScript and adapted for mapshaper-proj by Matthew Bloch August 2018 - * Modified for proj4js by Andreas Hocevar by Andreas Hocevar March 2024 - */ - -import adjust_lon from "../common/adjust_lon"; - -var A1 = 1.340264, - A2 = -0.081106, - A3 = 0.000893, - A4 = 0.003796, - M = Math.sqrt(3) / 2.0; - -export function init() { - this.es = 0; - this.long0 = this.long0 !== undefined ? this.long0 : 0; -} - -export function forward(p) { - var lam = adjust_lon(p.x - this.long0); - var phi = p.y; - var paramLat = Math.asin(M * Math.sin(phi)), - paramLatSq = paramLat * paramLat, - paramLatPow6 = paramLatSq * paramLatSq * paramLatSq; - p.x = lam * Math.cos(paramLat) / - (M * (A1 + 3 * A2 * paramLatSq + paramLatPow6 * (7 * A3 + 9 * A4 * paramLatSq))); - p.y = paramLat * (A1 + A2 * paramLatSq + paramLatPow6 * (A3 + A4 * paramLatSq)); - - p.x = this.a * p.x + this.x0; - p.y = this.a * p.y + this.y0; - return p; -} - -export function inverse(p) { - p.x = (p.x - this.x0) / this.a; - p.y = (p.y - this.y0) / this.a; - - var EPS = 1e-9, - NITER = 12, - paramLat = p.y, - paramLatSq, paramLatPow6, fy, fpy, dlat, i; - - for (i = 0; i < NITER; ++i) { - paramLatSq = paramLat * paramLat; - paramLatPow6 = paramLatSq * paramLatSq * paramLatSq; - fy = paramLat * (A1 + A2 * paramLatSq + paramLatPow6 * (A3 + A4 * paramLatSq)) - p.y; - fpy = A1 + 3 * A2 * paramLatSq + paramLatPow6 * (7 * A3 + 9 * A4 * paramLatSq); - paramLat -= dlat = fy / fpy; - if (Math.abs(dlat) < EPS) { - break; - } - } - paramLatSq = paramLat * paramLat; - paramLatPow6 = paramLatSq * paramLatSq * paramLatSq; - p.x = M * p.x * (A1 + 3 * A2 * paramLatSq + paramLatPow6 * (7 * A3 + 9 * A4 * paramLatSq)) / - Math.cos(paramLat); - p.y = Math.asin(Math.sin(paramLat) / M); - - p.x = adjust_lon(p.x + this.long0); - return p; -} - -export var names = ["eqearth", "Equal Earth", "Equal_Earth"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; \ No newline at end of file diff --git a/proj4js-master/lib/projections/equi.js b/proj4js-master/lib/projections/equi.js deleted file mode 100644 index f91a522a..00000000 --- a/proj4js-master/lib/projections/equi.js +++ /dev/null @@ -1,48 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; - -export function init() { - this.x0 = this.x0 || 0; - this.y0 = this.y0 || 0; - this.lat0 = this.lat0 || 0; - this.long0 = this.long0 || 0; - ///this.t2; -} - -/* Equirectangular forward equations--mapping lat,long to x,y - ---------------------------------------------------------*/ -export function forward(p) { - - var lon = p.x; - var lat = p.y; - - var dlon = adjust_lon(lon - this.long0); - var x = this.x0 + this.a * dlon * Math.cos(this.lat0); - var y = this.y0 + this.a * lat; - - this.t1 = x; - this.t2 = Math.cos(this.lat0); - p.x = x; - p.y = y; - return p; -} - -/* Equirectangular inverse equations--mapping x,y to lat/long - ---------------------------------------------------------*/ -export function inverse(p) { - - p.x -= this.x0; - p.y -= this.y0; - var lat = p.y / this.a; - - var lon = adjust_lon(this.long0 + p.x / (this.a * Math.cos(this.lat0))); - p.x = lon; - p.y = lat; -} - -export var names = ["equi"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/etmerc.js b/proj4js-master/lib/projections/etmerc.js deleted file mode 100644 index 0d32f5bc..00000000 --- a/proj4js-master/lib/projections/etmerc.js +++ /dev/null @@ -1,172 +0,0 @@ -// Heavily based on this etmerc projection implementation -// https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/etmerc.js - -import tmerc from '../projections/tmerc'; -import sinh from '../common/sinh'; -import hypot from '../common/hypot'; -import asinhy from '../common/asinhy'; -import gatg from '../common/gatg'; -import clens from '../common/clens'; -import clens_cmplx from '../common/clens_cmplx'; -import adjust_lon from '../common/adjust_lon'; - -export function init() { - if (!this.approx && (isNaN(this.es) || this.es <= 0)) { - throw new Error('Incorrect elliptical usage. Try using the +approx option in the proj string, or PROJECTION["Fast_Transverse_Mercator"] in the WKT.'); - } - if (this.approx) { - // When '+approx' is set, use tmerc instead - tmerc.init.apply(this); - this.forward = tmerc.forward; - this.inverse = tmerc.inverse; - } - - this.x0 = this.x0 !== undefined ? this.x0 : 0; - this.y0 = this.y0 !== undefined ? this.y0 : 0; - this.long0 = this.long0 !== undefined ? this.long0 : 0; - this.lat0 = this.lat0 !== undefined ? this.lat0 : 0; - - this.cgb = []; - this.cbg = []; - this.utg = []; - this.gtu = []; - - var f = this.es / (1 + Math.sqrt(1 - this.es)); - var n = f / (2 - f); - var np = n; - - this.cgb[0] = n * (2 + n * (-2 / 3 + n * (-2 + n * (116 / 45 + n * (26 / 45 + n * (-2854 / 675 )))))); - this.cbg[0] = n * (-2 + n * ( 2 / 3 + n * ( 4 / 3 + n * (-82 / 45 + n * (32 / 45 + n * (4642 / 4725)))))); - - np = np * n; - this.cgb[1] = np * (7 / 3 + n * (-8 / 5 + n * (-227 / 45 + n * (2704 / 315 + n * (2323 / 945))))); - this.cbg[1] = np * (5 / 3 + n * (-16 / 15 + n * ( -13 / 9 + n * (904 / 315 + n * (-1522 / 945))))); - - np = np * n; - this.cgb[2] = np * (56 / 15 + n * (-136 / 35 + n * (-1262 / 105 + n * (73814 / 2835)))); - this.cbg[2] = np * (-26 / 15 + n * (34 / 21 + n * (8 / 5 + n * (-12686 / 2835)))); - - np = np * n; - this.cgb[3] = np * (4279 / 630 + n * (-332 / 35 + n * (-399572 / 14175))); - this.cbg[3] = np * (1237 / 630 + n * (-12 / 5 + n * ( -24832 / 14175))); - - np = np * n; - this.cgb[4] = np * (4174 / 315 + n * (-144838 / 6237)); - this.cbg[4] = np * (-734 / 315 + n * (109598 / 31185)); - - np = np * n; - this.cgb[5] = np * (601676 / 22275); - this.cbg[5] = np * (444337 / 155925); - - np = Math.pow(n, 2); - this.Qn = this.k0 / (1 + n) * (1 + np * (1 / 4 + np * (1 / 64 + np / 256))); - - this.utg[0] = n * (-0.5 + n * ( 2 / 3 + n * (-37 / 96 + n * ( 1 / 360 + n * (81 / 512 + n * (-96199 / 604800)))))); - this.gtu[0] = n * (0.5 + n * (-2 / 3 + n * (5 / 16 + n * (41 / 180 + n * (-127 / 288 + n * (7891 / 37800)))))); - - this.utg[1] = np * (-1 / 48 + n * (-1 / 15 + n * (437 / 1440 + n * (-46 / 105 + n * (1118711 / 3870720))))); - this.gtu[1] = np * (13 / 48 + n * (-3 / 5 + n * (557 / 1440 + n * (281 / 630 + n * (-1983433 / 1935360))))); - - np = np * n; - this.utg[2] = np * (-17 / 480 + n * (37 / 840 + n * (209 / 4480 + n * (-5569 / 90720 )))); - this.gtu[2] = np * (61 / 240 + n * (-103 / 140 + n * (15061 / 26880 + n * (167603 / 181440)))); - - np = np * n; - this.utg[3] = np * (-4397 / 161280 + n * (11 / 504 + n * (830251 / 7257600))); - this.gtu[3] = np * (49561 / 161280 + n * (-179 / 168 + n * (6601661 / 7257600))); - - np = np * n; - this.utg[4] = np * (-4583 / 161280 + n * (108847 / 3991680)); - this.gtu[4] = np * (34729 / 80640 + n * (-3418889 / 1995840)); - - np = np * n; - this.utg[5] = np * (-20648693 / 638668800); - this.gtu[5] = np * (212378941 / 319334400); - - var Z = gatg(this.cbg, this.lat0); - this.Zb = -this.Qn * (Z + clens(this.gtu, 2 * Z)); -} - -export function forward(p) { - var Ce = adjust_lon(p.x - this.long0); - var Cn = p.y; - - Cn = gatg(this.cbg, Cn); - var sin_Cn = Math.sin(Cn); - var cos_Cn = Math.cos(Cn); - var sin_Ce = Math.sin(Ce); - var cos_Ce = Math.cos(Ce); - - Cn = Math.atan2(sin_Cn, cos_Ce * cos_Cn); - Ce = Math.atan2(sin_Ce * cos_Cn, hypot(sin_Cn, cos_Cn * cos_Ce)); - Ce = asinhy(Math.tan(Ce)); - - var tmp = clens_cmplx(this.gtu, 2 * Cn, 2 * Ce); - - Cn = Cn + tmp[0]; - Ce = Ce + tmp[1]; - - var x; - var y; - - if (Math.abs(Ce) <= 2.623395162778) { - x = this.a * (this.Qn * Ce) + this.x0; - y = this.a * (this.Qn * Cn + this.Zb) + this.y0; - } - else { - x = Infinity; - y = Infinity; - } - - p.x = x; - p.y = y; - - return p; -} - -export function inverse(p) { - var Ce = (p.x - this.x0) * (1 / this.a); - var Cn = (p.y - this.y0) * (1 / this.a); - - Cn = (Cn - this.Zb) / this.Qn; - Ce = Ce / this.Qn; - - var lon; - var lat; - - if (Math.abs(Ce) <= 2.623395162778) { - var tmp = clens_cmplx(this.utg, 2 * Cn, 2 * Ce); - - Cn = Cn + tmp[0]; - Ce = Ce + tmp[1]; - Ce = Math.atan(sinh(Ce)); - - var sin_Cn = Math.sin(Cn); - var cos_Cn = Math.cos(Cn); - var sin_Ce = Math.sin(Ce); - var cos_Ce = Math.cos(Ce); - - Cn = Math.atan2(sin_Cn * cos_Ce, hypot(sin_Ce, cos_Ce * cos_Cn)); - Ce = Math.atan2(sin_Ce, cos_Ce * cos_Cn); - - lon = adjust_lon(Ce + this.long0); - lat = gatg(this.cgb, Cn); - } - else { - lon = Infinity; - lat = Infinity; - } - - p.x = lon; - p.y = lat; - - return p; -} - -export var names = ["Extended_Transverse_Mercator", "Extended Transverse Mercator", "etmerc", "Transverse_Mercator", "Transverse Mercator", "Gauss Kruger", "Gauss_Kruger", "tmerc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/gauss.js b/proj4js-master/lib/projections/gauss.js deleted file mode 100644 index df237975..00000000 --- a/proj4js-master/lib/projections/gauss.js +++ /dev/null @@ -1,52 +0,0 @@ -import srat from '../common/srat'; -var MAX_ITER = 20; -import {HALF_PI, FORTPI} from '../constants/values'; - -export function init() { - var sphi = Math.sin(this.lat0); - var cphi = Math.cos(this.lat0); - cphi *= cphi; - this.rc = Math.sqrt(1 - this.es) / (1 - this.es * sphi * sphi); - this.C = Math.sqrt(1 + this.es * cphi * cphi / (1 - this.es)); - this.phic0 = Math.asin(sphi / this.C); - this.ratexp = 0.5 * this.C * this.e; - this.K = Math.tan(0.5 * this.phic0 + FORTPI) / (Math.pow(Math.tan(0.5 * this.lat0 + FORTPI), this.C) * srat(this.e * sphi, this.ratexp)); -} - -export function forward(p) { - var lon = p.x; - var lat = p.y; - - p.y = 2 * Math.atan(this.K * Math.pow(Math.tan(0.5 * lat + FORTPI), this.C) * srat(this.e * Math.sin(lat), this.ratexp)) - HALF_PI; - p.x = this.C * lon; - return p; -} - -export function inverse(p) { - var DEL_TOL = 1e-14; - var lon = p.x / this.C; - var lat = p.y; - var num = Math.pow(Math.tan(0.5 * lat + FORTPI) / this.K, 1 / this.C); - for (var i = MAX_ITER; i > 0; --i) { - lat = 2 * Math.atan(num * srat(this.e * Math.sin(p.y), - 0.5 * this.e)) - HALF_PI; - if (Math.abs(lat - p.y) < DEL_TOL) { - break; - } - p.y = lat; - } - /* convergence failed */ - if (!i) { - return null; - } - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["gauss"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/geocent.js b/proj4js-master/lib/projections/geocent.js deleted file mode 100644 index 8ceadf88..00000000 --- a/proj4js-master/lib/projections/geocent.js +++ /dev/null @@ -1,27 +0,0 @@ -import { - geodeticToGeocentric, - geocentricToGeodetic -} from '../datumUtils'; - -export function init() { - this.name = 'geocent'; - -} - -export function forward(p) { - var point = geodeticToGeocentric(p, this.es, this.a); - return point; -} - -export function inverse(p) { - var point = geocentricToGeodetic(p, this.es, this.a, this.b); - return point; -} - -export var names = ["Geocentric", 'geocentric', "geocent", "Geocent"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; \ No newline at end of file diff --git a/proj4js-master/lib/projections/geos.js b/proj4js-master/lib/projections/geos.js deleted file mode 100644 index 5c11a435..00000000 --- a/proj4js-master/lib/projections/geos.js +++ /dev/null @@ -1,160 +0,0 @@ -import hypot from '../common/hypot'; - -export function init() { - this.flip_axis = (this.sweep === 'x' ? 1 : 0); - this.h = Number(this.h); - this.radius_g_1 = this.h / this.a; - - if (this.radius_g_1 <= 0 || this.radius_g_1 > 1e10) { - throw new Error(); - } - - this.radius_g = 1.0 + this.radius_g_1; - this.C = this.radius_g * this.radius_g - 1.0; - - if (this.es !== 0.0) { - var one_es = 1.0 - this.es; - var rone_es = 1 / one_es; - - this.radius_p = Math.sqrt(one_es); - this.radius_p2 = one_es; - this.radius_p_inv2 = rone_es; - - this.shape = 'ellipse'; // Use as a condition in the forward and inverse functions. - } else { - this.radius_p = 1.0; - this.radius_p2 = 1.0; - this.radius_p_inv2 = 1.0; - - this.shape = 'sphere'; // Use as a condition in the forward and inverse functions. - } - - if (!this.title) { - this.title = "Geostationary Satellite View"; - } -} - -function forward(p) { - var lon = p.x; - var lat = p.y; - var tmp, v_x, v_y, v_z; - lon = lon - this.long0; - - if (this.shape === 'ellipse') { - lat = Math.atan(this.radius_p2 * Math.tan(lat)); - var r = this.radius_p / hypot(this.radius_p * Math.cos(lat), Math.sin(lat)); - - v_x = r * Math.cos(lon) * Math.cos(lat); - v_y = r * Math.sin(lon) * Math.cos(lat); - v_z = r * Math.sin(lat); - - if (((this.radius_g - v_x) * v_x - v_y * v_y - v_z * v_z * this.radius_p_inv2) < 0.0) { - console.log('HEHREHREHRHERHEHRHERH ERRRROOOOOORRRRR!!!!!!!') - p.x = Number.NaN; - p.y = Number.NaN; - return p; - } - - tmp = this.radius_g - v_x; - if (this.flip_axis) { - p.x = this.radius_g_1 * Math.atan(v_y / hypot(v_z, tmp)); - p.y = this.radius_g_1 * Math.atan(v_z / tmp); - } else { - p.x = this.radius_g_1 * Math.atan(v_y / tmp); - p.y = this.radius_g_1 * Math.atan(v_z / hypot(v_y, tmp)); - } - } else if (this.shape === 'sphere') { - tmp = Math.cos(lat); - v_x = Math.cos(lon) * tmp; - v_y = Math.sin(lon) * tmp; - v_z = Math.sin(lat); - tmp = this.radius_g - v_x; - - if (this.flip_axis) { - p.x = this.radius_g_1 * Math.atan(v_y / hypot(v_z, tmp)); - p.y = this.radius_g_1 * Math.atan(v_z / tmp); - } else { - p.x = this.radius_g_1 * Math.atan(v_y / tmp); - p.y = this.radius_g_1 * Math.atan(v_z / hypot(v_y, tmp)); - } - } - p.x = p.x * this.a; - p.y = p.y * this.a; - return p; -} - -function inverse(p) { - var v_x = -1.0; - var v_y = 0.0; - var v_z = 0.0; - var a, b, det, k; - - p.x = p.x / this.a; - p.y = p.y / this.a; - - if (this.shape === 'ellipse') { - if (this.flip_axis) { - v_z = Math.tan(p.y / this.radius_g_1); - v_y = Math.tan(p.x / this.radius_g_1) * hypot(1.0, v_z); - } else { - v_y = Math.tan(p.x / this.radius_g_1); - v_z = Math.tan(p.y / this.radius_g_1) * hypot(1.0, v_y); - } - - var v_zp = v_z / this.radius_p; - a = v_y * v_y + v_zp * v_zp + v_x * v_x; - b = 2 * this.radius_g * v_x; - det = (b * b) - 4 * a * this.C; - - if (det < 0.0) { - p.x = Number.NaN; - p.y = Number.NaN; - return p; - } - - k = (-b - Math.sqrt(det)) / (2.0 * a); - v_x = this.radius_g + k * v_x; - v_y *= k; - v_z *= k; - - p.x = Math.atan2(v_y, v_x); - p.y = Math.atan(v_z * Math.cos(p.x) / v_x); - p.y = Math.atan(this.radius_p_inv2 * Math.tan(p.y)); - } else if (this.shape === 'sphere') { - if (this.flip_axis) { - v_z = Math.tan(p.y / this.radius_g_1); - v_y = Math.tan(p.x / this.radius_g_1) * Math.sqrt(1.0 + v_z * v_z); - } else { - v_y = Math.tan(p.x / this.radius_g_1); - v_z = Math.tan(p.y / this.radius_g_1) * Math.sqrt(1.0 + v_y * v_y); - } - - a = v_y * v_y + v_z * v_z + v_x * v_x; - b = 2 * this.radius_g * v_x; - det = (b * b) - 4 * a * this.C; - if (det < 0.0) { - p.x = Number.NaN; - p.y = Number.NaN; - return p; - } - - k = (-b - Math.sqrt(det)) / (2.0 * a); - v_x = this.radius_g + k * v_x; - v_y *= k; - v_z *= k; - - p.x = Math.atan2(v_y, v_x); - p.y = Math.atan(v_z * Math.cos(p.x) / v_x); - } - p.x = p.x + this.long0; - return p; -} - -export var names = ["Geostationary Satellite View", "Geostationary_Satellite", "geos"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names, -}; - diff --git a/proj4js-master/lib/projections/gnom.js b/proj4js-master/lib/projections/gnom.js deleted file mode 100644 index 066cff86..00000000 --- a/proj4js-master/lib/projections/gnom.js +++ /dev/null @@ -1,104 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; -import asinz from '../common/asinz'; -import {EPSLN} from '../constants/values'; - -/* - reference: - Wolfram Mathworld "Gnomonic Projection" - http://mathworld.wolfram.com/GnomonicProjection.html - Accessed: 12th November 2009 - */ -export function init() { - - /* Place parameters in static storage for common use - -------------------------------------------------*/ - this.sin_p14 = Math.sin(this.lat0); - this.cos_p14 = Math.cos(this.lat0); - // Approximation for projecting points to the horizon (infinity) - this.infinity_dist = 1000 * this.a; - this.rc = 1; -} - -/* Gnomonic forward equations--mapping lat,long to x,y - ---------------------------------------------------*/ -export function forward(p) { - var sinphi, cosphi; /* sin and cos value */ - var dlon; /* delta longitude value */ - var coslon; /* cos of longitude */ - var ksp; /* scale factor */ - var g; - var x, y; - var lon = p.x; - var lat = p.y; - /* Forward equations - -----------------*/ - dlon = adjust_lon(lon - this.long0); - - sinphi = Math.sin(lat); - cosphi = Math.cos(lat); - - coslon = Math.cos(dlon); - g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon; - ksp = 1; - if ((g > 0) || (Math.abs(g) <= EPSLN)) { - x = this.x0 + this.a * ksp * cosphi * Math.sin(dlon) / g; - y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon) / g; - } - else { - - // Point is in the opposing hemisphere and is unprojectable - // We still need to return a reasonable point, so we project - // to infinity, on a bearing - // equivalent to the northern hemisphere equivalent - // This is a reasonable approximation for short shapes and lines that - // straddle the horizon. - - x = this.x0 + this.infinity_dist * cosphi * Math.sin(dlon); - y = this.y0 + this.infinity_dist * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon); - - } - p.x = x; - p.y = y; - return p; -} - -export function inverse(p) { - var rh; /* Rho */ - var sinc, cosc; - var c; - var lon, lat; - - /* Inverse equations - -----------------*/ - p.x = (p.x - this.x0) / this.a; - p.y = (p.y - this.y0) / this.a; - - p.x /= this.k0; - p.y /= this.k0; - - if ((rh = Math.sqrt(p.x * p.x + p.y * p.y))) { - c = Math.atan2(rh, this.rc); - sinc = Math.sin(c); - cosc = Math.cos(c); - - lat = asinz(cosc * this.sin_p14 + (p.y * sinc * this.cos_p14) / rh); - lon = Math.atan2(p.x * sinc, rh * this.cos_p14 * cosc - p.y * this.sin_p14 * sinc); - lon = adjust_lon(this.long0 + lon); - } - else { - lat = this.phic0; - lon = 0; - } - - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["gnom"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/gstmerc.js b/proj4js-master/lib/projections/gstmerc.js deleted file mode 100644 index 763dc68a..00000000 --- a/proj4js-master/lib/projections/gstmerc.js +++ /dev/null @@ -1,63 +0,0 @@ -import latiso from '../common/latiso'; -import sinh from '../common/sinh'; -import cosh from '../common/cosh'; -import invlatiso from '../common/invlatiso'; - -export function init() { - - // array of: a, b, lon0, lat0, k0, x0, y0 - var temp = this.b / this.a; - this.e = Math.sqrt(1 - temp * temp); - this.lc = this.long0; - this.rs = Math.sqrt(1 + this.e * this.e * Math.pow(Math.cos(this.lat0), 4) / (1 - this.e * this.e)); - var sinz = Math.sin(this.lat0); - var pc = Math.asin(sinz / this.rs); - var sinzpc = Math.sin(pc); - this.cp = latiso(0, pc, sinzpc) - this.rs * latiso(this.e, this.lat0, sinz); - this.n2 = this.k0 * this.a * Math.sqrt(1 - this.e * this.e) / (1 - this.e * this.e * sinz * sinz); - this.xs = this.x0; - this.ys = this.y0 - this.n2 * pc; - - if (!this.title) { - this.title = "Gauss Schreiber transverse mercator"; - } -} - -// forward equations--mapping lat,long to x,y -// ----------------------------------------------------------------- -export function forward(p) { - - var lon = p.x; - var lat = p.y; - - var L = this.rs * (lon - this.lc); - var Ls = this.cp + (this.rs * latiso(this.e, lat, Math.sin(lat))); - var lat1 = Math.asin(Math.sin(L) / cosh(Ls)); - var Ls1 = latiso(0, lat1, Math.sin(lat1)); - p.x = this.xs + (this.n2 * Ls1); - p.y = this.ys + (this.n2 * Math.atan(sinh(Ls) / Math.cos(L))); - return p; -} - -// inverse equations--mapping x,y to lat/long -// ----------------------------------------------------------------- -export function inverse(p) { - - var x = p.x; - var y = p.y; - - var L = Math.atan(sinh((x - this.xs) / this.n2) / Math.cos((y - this.ys) / this.n2)); - var lat1 = Math.asin(Math.sin((y - this.ys) / this.n2) / cosh((x - this.xs) / this.n2)); - var LC = latiso(0, lat1, Math.sin(lat1)); - p.x = this.lc + L / this.rs; - p.y = invlatiso(this.e, (LC - this.cp) / this.rs); - return p; -} - -export var names = ["gstmerg", "gstmerc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/krovak.js b/proj4js-master/lib/projections/krovak.js deleted file mode 100644 index 620cf7d9..00000000 --- a/proj4js-master/lib/projections/krovak.js +++ /dev/null @@ -1,106 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; - -export function init() { - this.a = 6377397.155; - this.es = 0.006674372230614; - this.e = Math.sqrt(this.es); - if (!this.lat0) { - this.lat0 = 0.863937979737193; - } - if (!this.long0) { - this.long0 = 0.7417649320975901 - 0.308341501185665; - } - /* if scale not set default to 0.9999 */ - if (!this.k0) { - this.k0 = 0.9999; - } - this.s45 = 0.785398163397448; /* 45 */ - this.s90 = 2 * this.s45; - this.fi0 = this.lat0; - this.e2 = this.es; - this.e = Math.sqrt(this.e2); - this.alfa = Math.sqrt(1 + (this.e2 * Math.pow(Math.cos(this.fi0), 4)) / (1 - this.e2)); - this.uq = 1.04216856380474; - this.u0 = Math.asin(Math.sin(this.fi0) / this.alfa); - this.g = Math.pow((1 + this.e * Math.sin(this.fi0)) / (1 - this.e * Math.sin(this.fi0)), this.alfa * this.e / 2); - this.k = Math.tan(this.u0 / 2 + this.s45) / Math.pow(Math.tan(this.fi0 / 2 + this.s45), this.alfa) * this.g; - this.k1 = this.k0; - this.n0 = this.a * Math.sqrt(1 - this.e2) / (1 - this.e2 * Math.pow(Math.sin(this.fi0), 2)); - this.s0 = 1.37008346281555; - this.n = Math.sin(this.s0); - this.ro0 = this.k1 * this.n0 / Math.tan(this.s0); - this.ad = this.s90 - this.uq; -} - -/* ellipsoid */ -/* calculate xy from lat/lon */ -/* Constants, identical to inverse transform function */ -export function forward(p) { - var gfi, u, deltav, s, d, eps, ro; - var lon = p.x; - var lat = p.y; - var delta_lon = adjust_lon(lon - this.long0); - /* Transformation */ - gfi = Math.pow(((1 + this.e * Math.sin(lat)) / (1 - this.e * Math.sin(lat))), (this.alfa * this.e / 2)); - u = 2 * (Math.atan(this.k * Math.pow(Math.tan(lat / 2 + this.s45), this.alfa) / gfi) - this.s45); - deltav = -delta_lon * this.alfa; - s = Math.asin(Math.cos(this.ad) * Math.sin(u) + Math.sin(this.ad) * Math.cos(u) * Math.cos(deltav)); - d = Math.asin(Math.cos(u) * Math.sin(deltav) / Math.cos(s)); - eps = this.n * d; - ro = this.ro0 * Math.pow(Math.tan(this.s0 / 2 + this.s45), this.n) / Math.pow(Math.tan(s / 2 + this.s45), this.n); - p.y = ro * Math.cos(eps) / 1; - p.x = ro * Math.sin(eps) / 1; - - if (!this.czech) { - p.y *= -1; - p.x *= -1; - } - return (p); -} - -/* calculate lat/lon from xy */ -export function inverse(p) { - var u, deltav, s, d, eps, ro, fi1; - var ok; - - /* Transformation */ - /* revert y, x*/ - var tmp = p.x; - p.x = p.y; - p.y = tmp; - if (!this.czech) { - p.y *= -1; - p.x *= -1; - } - ro = Math.sqrt(p.x * p.x + p.y * p.y); - eps = Math.atan2(p.y, p.x); - d = eps / Math.sin(this.s0); - s = 2 * (Math.atan(Math.pow(this.ro0 / ro, 1 / this.n) * Math.tan(this.s0 / 2 + this.s45)) - this.s45); - u = Math.asin(Math.cos(this.ad) * Math.sin(s) - Math.sin(this.ad) * Math.cos(s) * Math.cos(d)); - deltav = Math.asin(Math.cos(s) * Math.sin(d) / Math.cos(u)); - p.x = this.long0 - deltav / this.alfa; - fi1 = u; - ok = 0; - var iter = 0; - do { - p.y = 2 * (Math.atan(Math.pow(this.k, - 1 / this.alfa) * Math.pow(Math.tan(u / 2 + this.s45), 1 / this.alfa) * Math.pow((1 + this.e * Math.sin(fi1)) / (1 - this.e * Math.sin(fi1)), this.e / 2)) - this.s45); - if (Math.abs(fi1 - p.y) < 0.0000000001) { - ok = 1; - } - fi1 = p.y; - iter += 1; - } while (ok === 0 && iter < 15); - if (iter >= 15) { - return null; - } - - return (p); -} - -export var names = ["Krovak", "krovak"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/laea.js b/proj4js-master/lib/projections/laea.js deleted file mode 100644 index b3f6a51f..00000000 --- a/proj4js-master/lib/projections/laea.js +++ /dev/null @@ -1,298 +0,0 @@ - -import {HALF_PI, EPSLN, FORTPI} from '../constants/values'; - -import qsfnz from '../common/qsfnz'; -import adjust_lon from '../common/adjust_lon'; - -/* - reference - "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, - The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. - */ - -export var S_POLE = 1; - -export var N_POLE = 2; -export var EQUIT = 3; -export var OBLIQ = 4; - -/* Initialize the Lambert Azimuthal Equal Area projection - ------------------------------------------------------*/ -export function init() { - var t = Math.abs(this.lat0); - if (Math.abs(t - HALF_PI) < EPSLN) { - this.mode = this.lat0 < 0 ? this.S_POLE : this.N_POLE; - } - else if (Math.abs(t) < EPSLN) { - this.mode = this.EQUIT; - } - else { - this.mode = this.OBLIQ; - } - if (this.es > 0) { - var sinphi; - - this.qp = qsfnz(this.e, 1); - this.mmf = 0.5 / (1 - this.es); - this.apa = authset(this.es); - switch (this.mode) { - case this.N_POLE: - this.dd = 1; - break; - case this.S_POLE: - this.dd = 1; - break; - case this.EQUIT: - this.rq = Math.sqrt(0.5 * this.qp); - this.dd = 1 / this.rq; - this.xmf = 1; - this.ymf = 0.5 * this.qp; - break; - case this.OBLIQ: - this.rq = Math.sqrt(0.5 * this.qp); - sinphi = Math.sin(this.lat0); - this.sinb1 = qsfnz(this.e, sinphi) / this.qp; - this.cosb1 = Math.sqrt(1 - this.sinb1 * this.sinb1); - this.dd = Math.cos(this.lat0) / (Math.sqrt(1 - this.es * sinphi * sinphi) * this.rq * this.cosb1); - this.ymf = (this.xmf = this.rq) / this.dd; - this.xmf *= this.dd; - break; - } - } - else { - if (this.mode === this.OBLIQ) { - this.sinph0 = Math.sin(this.lat0); - this.cosph0 = Math.cos(this.lat0); - } - } -} - -/* Lambert Azimuthal Equal Area forward equations--mapping lat,long to x,y - -----------------------------------------------------------------------*/ -export function forward(p) { - - /* Forward equations - -----------------*/ - var x, y, coslam, sinlam, sinphi, q, sinb, cosb, b, cosphi; - var lam = p.x; - var phi = p.y; - - lam = adjust_lon(lam - this.long0); - if (this.sphere) { - sinphi = Math.sin(phi); - cosphi = Math.cos(phi); - coslam = Math.cos(lam); - if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { - y = (this.mode === this.EQUIT) ? 1 + cosphi * coslam : 1 + this.sinph0 * sinphi + this.cosph0 * cosphi * coslam; - if (y <= EPSLN) { - return null; - } - y = Math.sqrt(2 / y); - x = y * cosphi * Math.sin(lam); - y *= (this.mode === this.EQUIT) ? sinphi : this.cosph0 * sinphi - this.sinph0 * cosphi * coslam; - } - else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { - if (this.mode === this.N_POLE) { - coslam = -coslam; - } - if (Math.abs(phi + this.lat0) < EPSLN) { - return null; - } - y = FORTPI - phi * 0.5; - y = 2 * ((this.mode === this.S_POLE) ? Math.cos(y) : Math.sin(y)); - x = y * Math.sin(lam); - y *= coslam; - } - } - else { - sinb = 0; - cosb = 0; - b = 0; - coslam = Math.cos(lam); - sinlam = Math.sin(lam); - sinphi = Math.sin(phi); - q = qsfnz(this.e, sinphi); - if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { - sinb = q / this.qp; - cosb = Math.sqrt(1 - sinb * sinb); - } - switch (this.mode) { - case this.OBLIQ: - b = 1 + this.sinb1 * sinb + this.cosb1 * cosb * coslam; - break; - case this.EQUIT: - b = 1 + cosb * coslam; - break; - case this.N_POLE: - b = HALF_PI + phi; - q = this.qp - q; - break; - case this.S_POLE: - b = phi - HALF_PI; - q = this.qp + q; - break; - } - if (Math.abs(b) < EPSLN) { - return null; - } - switch (this.mode) { - case this.OBLIQ: - case this.EQUIT: - b = Math.sqrt(2 / b); - if (this.mode === this.OBLIQ) { - y = this.ymf * b * (this.cosb1 * sinb - this.sinb1 * cosb * coslam); - } - else { - y = (b = Math.sqrt(2 / (1 + cosb * coslam))) * sinb * this.ymf; - } - x = this.xmf * b * cosb * sinlam; - break; - case this.N_POLE: - case this.S_POLE: - if (q >= 0) { - x = (b = Math.sqrt(q)) * sinlam; - y = coslam * ((this.mode === this.S_POLE) ? b : -b); - } - else { - x = y = 0; - } - break; - } - } - - p.x = this.a * x + this.x0; - p.y = this.a * y + this.y0; - return p; -} - -/* Inverse equations - -----------------*/ -export function inverse(p) { - p.x -= this.x0; - p.y -= this.y0; - var x = p.x / this.a; - var y = p.y / this.a; - var lam, phi, cCe, sCe, q, rho, ab; - if (this.sphere) { - var cosz = 0, - rh, sinz = 0; - - rh = Math.sqrt(x * x + y * y); - phi = rh * 0.5; - if (phi > 1) { - return null; - } - phi = 2 * Math.asin(phi); - if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { - sinz = Math.sin(phi); - cosz = Math.cos(phi); - } - switch (this.mode) { - case this.EQUIT: - phi = (Math.abs(rh) <= EPSLN) ? 0 : Math.asin(y * sinz / rh); - x *= sinz; - y = cosz * rh; - break; - case this.OBLIQ: - phi = (Math.abs(rh) <= EPSLN) ? this.lat0 : Math.asin(cosz * this.sinph0 + y * sinz * this.cosph0 / rh); - x *= sinz * this.cosph0; - y = (cosz - Math.sin(phi) * this.sinph0) * rh; - break; - case this.N_POLE: - y = -y; - phi = HALF_PI - phi; - break; - case this.S_POLE: - phi -= HALF_PI; - break; - } - lam = (y === 0 && (this.mode === this.EQUIT || this.mode === this.OBLIQ)) ? 0 : Math.atan2(x, y); - } - else { - ab = 0; - if (this.mode === this.OBLIQ || this.mode === this.EQUIT) { - x /= this.dd; - y *= this.dd; - rho = Math.sqrt(x * x + y * y); - if (rho < EPSLN) { - p.x = this.long0; - p.y = this.lat0; - return p; - } - sCe = 2 * Math.asin(0.5 * rho / this.rq); - cCe = Math.cos(sCe); - x *= (sCe = Math.sin(sCe)); - if (this.mode === this.OBLIQ) { - ab = cCe * this.sinb1 + y * sCe * this.cosb1 / rho; - q = this.qp * ab; - y = rho * this.cosb1 * cCe - y * this.sinb1 * sCe; - } - else { - ab = y * sCe / rho; - q = this.qp * ab; - y = rho * cCe; - } - } - else if (this.mode === this.N_POLE || this.mode === this.S_POLE) { - if (this.mode === this.N_POLE) { - y = -y; - } - q = (x * x + y * y); - if (!q) { - p.x = this.long0; - p.y = this.lat0; - return p; - } - ab = 1 - q / this.qp; - if (this.mode === this.S_POLE) { - ab = -ab; - } - } - lam = Math.atan2(x, y); - phi = authlat(Math.asin(ab), this.apa); - } - - p.x = adjust_lon(this.long0 + lam); - p.y = phi; - return p; -} - -/* determine latitude from authalic latitude */ -var P00 = 0.33333333333333333333; - -var P01 = 0.17222222222222222222; -var P02 = 0.10257936507936507936; -var P10 = 0.06388888888888888888; -var P11 = 0.06640211640211640211; -var P20 = 0.01641501294219154443; - -function authset(es) { - var t; - var APA = []; - APA[0] = es * P00; - t = es * es; - APA[0] += t * P01; - APA[1] = t * P10; - t *= es; - APA[0] += t * P02; - APA[1] += t * P11; - APA[2] = t * P20; - return APA; -} - -function authlat(beta, APA) { - var t = beta + beta; - return (beta + APA[0] * Math.sin(t) + APA[1] * Math.sin(t + t) + APA[2] * Math.sin(t + t + t)); -} - -export var names = ["Lambert Azimuthal Equal Area", "Lambert_Azimuthal_Equal_Area", "laea"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names, - S_POLE: S_POLE, - N_POLE: N_POLE, - EQUIT: EQUIT, - OBLIQ: OBLIQ -}; diff --git a/proj4js-master/lib/projections/lcc.js b/proj4js-master/lib/projections/lcc.js deleted file mode 100644 index bb92b3f4..00000000 --- a/proj4js-master/lib/projections/lcc.js +++ /dev/null @@ -1,150 +0,0 @@ -import msfnz from '../common/msfnz'; -import tsfnz from '../common/tsfnz'; -import sign from '../common/sign'; -import adjust_lon from '../common/adjust_lon'; -import phi2z from '../common/phi2z'; -import {HALF_PI, EPSLN} from '../constants/values'; -export function init() { - - //double lat0; /* the reference latitude */ - //double long0; /* the reference longitude */ - //double lat1; /* first standard parallel */ - //double lat2; /* second standard parallel */ - //double r_maj; /* major axis */ - //double r_min; /* minor axis */ - //double false_east; /* x offset in meters */ - //double false_north; /* y offset in meters */ - - //the above value can be set with proj4.defs - //example: proj4.defs("EPSG:2154","+proj=lcc +lat_1=49 +lat_2=44 +lat_0=46.5 +lon_0=3 +x_0=700000 +y_0=6600000 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs"); - - if (!this.lat2) { - this.lat2 = this.lat1; - } //if lat2 is not defined - if (!this.k0) { - this.k0 = 1; - } - this.x0 = this.x0 || 0; - this.y0 = this.y0 || 0; - // Standard Parallels cannot be equal and on opposite sides of the equator - if (Math.abs(this.lat1 + this.lat2) < EPSLN) { - return; - } - - var temp = this.b / this.a; - this.e = Math.sqrt(1 - temp * temp); - - var sin1 = Math.sin(this.lat1); - var cos1 = Math.cos(this.lat1); - var ms1 = msfnz(this.e, sin1, cos1); - var ts1 = tsfnz(this.e, this.lat1, sin1); - - var sin2 = Math.sin(this.lat2); - var cos2 = Math.cos(this.lat2); - var ms2 = msfnz(this.e, sin2, cos2); - var ts2 = tsfnz(this.e, this.lat2, sin2); - - var ts0 = tsfnz(this.e, this.lat0, Math.sin(this.lat0)); - - if (Math.abs(this.lat1 - this.lat2) > EPSLN) { - this.ns = Math.log(ms1 / ms2) / Math.log(ts1 / ts2); - } - else { - this.ns = sin1; - } - if (isNaN(this.ns)) { - this.ns = sin1; - } - this.f0 = ms1 / (this.ns * Math.pow(ts1, this.ns)); - this.rh = this.a * this.f0 * Math.pow(ts0, this.ns); - if (!this.title) { - this.title = "Lambert Conformal Conic"; - } -} - -// Lambert Conformal conic forward equations--mapping lat,long to x,y -// ----------------------------------------------------------------- -export function forward(p) { - - var lon = p.x; - var lat = p.y; - - // singular cases : - if (Math.abs(2 * Math.abs(lat) - Math.PI) <= EPSLN) { - lat = sign(lat) * (HALF_PI - 2 * EPSLN); - } - - var con = Math.abs(Math.abs(lat) - HALF_PI); - var ts, rh1; - if (con > EPSLN) { - ts = tsfnz(this.e, lat, Math.sin(lat)); - rh1 = this.a * this.f0 * Math.pow(ts, this.ns); - } - else { - con = lat * this.ns; - if (con <= 0) { - return null; - } - rh1 = 0; - } - var theta = this.ns * adjust_lon(lon - this.long0); - p.x = this.k0 * (rh1 * Math.sin(theta)) + this.x0; - p.y = this.k0 * (this.rh - rh1 * Math.cos(theta)) + this.y0; - - return p; -} - -// Lambert Conformal Conic inverse equations--mapping x,y to lat/long -// ----------------------------------------------------------------- -export function inverse(p) { - - var rh1, con, ts; - var lat, lon; - var x = (p.x - this.x0) / this.k0; - var y = (this.rh - (p.y - this.y0) / this.k0); - if (this.ns > 0) { - rh1 = Math.sqrt(x * x + y * y); - con = 1; - } - else { - rh1 = -Math.sqrt(x * x + y * y); - con = -1; - } - var theta = 0; - if (rh1 !== 0) { - theta = Math.atan2((con * x), (con * y)); - } - if ((rh1 !== 0) || (this.ns > 0)) { - con = 1 / this.ns; - ts = Math.pow((rh1 / (this.a * this.f0)), con); - lat = phi2z(this.e, ts); - if (lat === -9999) { - return null; - } - } - else { - lat = -HALF_PI; - } - lon = adjust_lon(theta / this.ns + this.long0); - - p.x = lon; - p.y = lat; - return p; -} - -export var names = [ - "Lambert Tangential Conformal Conic Projection", - "Lambert_Conformal_Conic", - "Lambert_Conformal_Conic_1SP", - "Lambert_Conformal_Conic_2SP", - "lcc", - "Lambert Conic Conformal (1SP)", - "Lambert Conic Conformal (2SP)" -]; - -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/longlat.js b/proj4js-master/lib/projections/longlat.js deleted file mode 100644 index 7e66e7d0..00000000 --- a/proj4js-master/lib/projections/longlat.js +++ /dev/null @@ -1,16 +0,0 @@ -export function init() { - //no-op for longlat -} - -function identity(pt) { - return pt; -} -export {identity as forward}; -export {identity as inverse}; -export var names = ["longlat", "identity"]; -export default { - init: init, - forward: identity, - inverse: identity, - names: names -}; diff --git a/proj4js-master/lib/projections/merc.js b/proj4js-master/lib/projections/merc.js deleted file mode 100644 index 0117b2c7..00000000 --- a/proj4js-master/lib/projections/merc.js +++ /dev/null @@ -1,101 +0,0 @@ -import msfnz from '../common/msfnz'; - -import adjust_lon from '../common/adjust_lon'; -import tsfnz from '../common/tsfnz'; -import phi2z from '../common/phi2z'; -import {FORTPI, R2D, EPSLN, HALF_PI} from '../constants/values'; -export function init() { - // console.log('INIIIIIIIIIIIIIIIIT', this) - var con = this.b / this.a; - this.es = 1 - con * con; - if(!('x0' in this)){ - this.x0 = 0; - } - if(!('y0' in this)){ - this.y0 = 0; - } - this.e = Math.sqrt(this.es); - if (this.lat_ts) { - if (this.sphere) { - this.k0 = Math.cos(this.lat_ts); - } - else { - this.k0 = msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)); - } - } - else { - if (!this.k0) { - if (this.k) { - this.k0 = this.k; - } - else { - this.k0 = 1; - } - } - } -} - -/* Mercator forward equations--mapping lat,long to x,y - --------------------------------------------------*/ - -export function forward(p) { - var lon = p.x; - var lat = p.y; - // convert to radians - if (lat * R2D > 90 && lat * R2D < -90 && lon * R2D > 180 && lon * R2D < -180) { - return null; - } - - var x, y; - if (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN) { - return null; - } - else { - if (this.sphere) { - x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0); - y = this.y0 + this.a * this.k0 * Math.log(Math.tan(FORTPI + 0.5 * lat)); - } - else { - var sinphi = Math.sin(lat); - var ts = tsfnz(this.e, lat, sinphi); - x = this.x0 + this.a * this.k0 * adjust_lon(lon - this.long0); - y = this.y0 - this.a * this.k0 * Math.log(ts); - } - p.x = x; - p.y = y; - return p; - } -} - -/* Mercator inverse equations--mapping x,y to lat/long - --------------------------------------------------*/ -export function inverse(p) { - - var x = p.x - this.x0; - var y = p.y - this.y0; - var lon, lat; - - if (this.sphere) { - lat = HALF_PI - 2 * Math.atan(Math.exp(-y / (this.a * this.k0))); - } - else { - var ts = Math.exp(-y / (this.a * this.k0)); - lat = phi2z(this.e, ts); - if (lat === -9999) { - return null; - } - } - lon = adjust_lon(this.long0 + x / (this.a * this.k0)); - - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["Mercator", "Popular Visualisation Pseudo Mercator", "Mercator_1SP", "Mercator_Auxiliary_Sphere", "merc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/mill.js b/proj4js-master/lib/projections/mill.js deleted file mode 100644 index 3d6ff0d6..00000000 --- a/proj4js-master/lib/projections/mill.js +++ /dev/null @@ -1,52 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; - -/* - reference - "New Equal-Area Map Projections for Noncircular Regions", John P. Snyder, - The American Cartographer, Vol 15, No. 4, October 1988, pp. 341-355. - */ - - -/* Initialize the Miller Cylindrical projection - -------------------------------------------*/ -export function init() { - //no-op -} - -/* Miller Cylindrical forward equations--mapping lat,long to x,y - ------------------------------------------------------------*/ -export function forward(p) { - var lon = p.x; - var lat = p.y; - /* Forward equations - -----------------*/ - var dlon = adjust_lon(lon - this.long0); - var x = this.x0 + this.a * dlon; - var y = this.y0 + this.a * Math.log(Math.tan((Math.PI / 4) + (lat / 2.5))) * 1.25; - - p.x = x; - p.y = y; - return p; -} - -/* Miller Cylindrical inverse equations--mapping x,y to lat/long - ------------------------------------------------------------*/ -export function inverse(p) { - p.x -= this.x0; - p.y -= this.y0; - - var lon = adjust_lon(this.long0 + p.x / this.a); - var lat = 2.5 * (Math.atan(Math.exp(0.8 * p.y / this.a)) - Math.PI / 4); - - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["Miller_Cylindrical", "mill"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/moll.js b/proj4js-master/lib/projections/moll.js deleted file mode 100644 index faa2e51e..00000000 --- a/proj4js-master/lib/projections/moll.js +++ /dev/null @@ -1,83 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; -export function init() {} -import {EPSLN} from '../constants/values'; -/* Mollweide forward equations--mapping lat,long to x,y - ----------------------------------------------------*/ -export function forward(p) { - - /* Forward equations - -----------------*/ - var lon = p.x; - var lat = p.y; - - var delta_lon = adjust_lon(lon - this.long0); - var theta = lat; - var con = Math.PI * Math.sin(lat); - - /* Iterate using the Newton-Raphson method to find theta - -----------------------------------------------------*/ - while (true) { - var delta_theta = -(theta + Math.sin(theta) - con) / (1 + Math.cos(theta)); - theta += delta_theta; - if (Math.abs(delta_theta) < EPSLN) { - break; - } - } - theta /= 2; - - /* If the latitude is 90 deg, force the x coordinate to be "0 + false easting" - this is done here because of precision problems with "cos(theta)" - --------------------------------------------------------------------------*/ - if (Math.PI / 2 - Math.abs(lat) < EPSLN) { - delta_lon = 0; - } - var x = 0.900316316158 * this.a * delta_lon * Math.cos(theta) + this.x0; - var y = 1.4142135623731 * this.a * Math.sin(theta) + this.y0; - - p.x = x; - p.y = y; - return p; -} - -export function inverse(p) { - var theta; - var arg; - - /* Inverse equations - -----------------*/ - p.x -= this.x0; - p.y -= this.y0; - arg = p.y / (1.4142135623731 * this.a); - - /* Because of division by zero problems, 'arg' can not be 1. Therefore - a number very close to one is used instead. - -------------------------------------------------------------------*/ - if (Math.abs(arg) > 0.999999999999) { - arg = 0.999999999999; - } - theta = Math.asin(arg); - var lon = adjust_lon(this.long0 + (p.x / (0.900316316158 * this.a * Math.cos(theta)))); - if (lon < (-Math.PI)) { - lon = -Math.PI; - } - if (lon > Math.PI) { - lon = Math.PI; - } - arg = (2 * theta + Math.sin(2 * theta)) / Math.PI; - if (Math.abs(arg) > 1) { - arg = 1; - } - var lat = Math.asin(arg); - - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["Mollweide", "moll"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/nzmg.js b/proj4js-master/lib/projections/nzmg.js deleted file mode 100644 index be0741d7..00000000 --- a/proj4js-master/lib/projections/nzmg.js +++ /dev/null @@ -1,226 +0,0 @@ -import {SEC_TO_RAD} from '../constants/values'; - -/* - reference - Department of Land and Survey Technical Circular 1973/32 - http://www.linz.govt.nz/docs/miscellaneous/nz-map-definition.pdf - OSG Technical Report 4.1 - http://www.linz.govt.nz/docs/miscellaneous/nzmg.pdf - */ - -/** - * iterations: Number of iterations to refine inverse transform. - * 0 -> km accuracy - * 1 -> m accuracy -- suitable for most mapping applications - * 2 -> mm accuracy - */ -export var iterations = 1; - -export function init() { - this.A = []; - this.A[1] = 0.6399175073; - this.A[2] = -0.1358797613; - this.A[3] = 0.063294409; - this.A[4] = -0.02526853; - this.A[5] = 0.0117879; - this.A[6] = -0.0055161; - this.A[7] = 0.0026906; - this.A[8] = -0.001333; - this.A[9] = 0.00067; - this.A[10] = -0.00034; - - this.B_re = []; - this.B_im = []; - this.B_re[1] = 0.7557853228; - this.B_im[1] = 0; - this.B_re[2] = 0.249204646; - this.B_im[2] = 0.003371507; - this.B_re[3] = -0.001541739; - this.B_im[3] = 0.041058560; - this.B_re[4] = -0.10162907; - this.B_im[4] = 0.01727609; - this.B_re[5] = -0.26623489; - this.B_im[5] = -0.36249218; - this.B_re[6] = -0.6870983; - this.B_im[6] = -1.1651967; - - this.C_re = []; - this.C_im = []; - this.C_re[1] = 1.3231270439; - this.C_im[1] = 0; - this.C_re[2] = -0.577245789; - this.C_im[2] = -0.007809598; - this.C_re[3] = 0.508307513; - this.C_im[3] = -0.112208952; - this.C_re[4] = -0.15094762; - this.C_im[4] = 0.18200602; - this.C_re[5] = 1.01418179; - this.C_im[5] = 1.64497696; - this.C_re[6] = 1.9660549; - this.C_im[6] = 2.5127645; - - this.D = []; - this.D[1] = 1.5627014243; - this.D[2] = 0.5185406398; - this.D[3] = -0.03333098; - this.D[4] = -0.1052906; - this.D[5] = -0.0368594; - this.D[6] = 0.007317; - this.D[7] = 0.01220; - this.D[8] = 0.00394; - this.D[9] = -0.0013; -} - -/** - New Zealand Map Grid Forward - long/lat to x/y - long/lat in radians - */ -export function forward(p) { - var n; - var lon = p.x; - var lat = p.y; - - var delta_lat = lat - this.lat0; - var delta_lon = lon - this.long0; - - // 1. Calculate d_phi and d_psi ... // and d_lambda - // For this algorithm, delta_latitude is in seconds of arc x 10-5, so we need to scale to those units. Longitude is radians. - var d_phi = delta_lat / SEC_TO_RAD * 1E-5; - var d_lambda = delta_lon; - var d_phi_n = 1; // d_phi^0 - - var d_psi = 0; - for (n = 1; n <= 10; n++) { - d_phi_n = d_phi_n * d_phi; - d_psi = d_psi + this.A[n] * d_phi_n; - } - - // 2. Calculate theta - var th_re = d_psi; - var th_im = d_lambda; - - // 3. Calculate z - var th_n_re = 1; - var th_n_im = 0; // theta^0 - var th_n_re1; - var th_n_im1; - - var z_re = 0; - var z_im = 0; - for (n = 1; n <= 6; n++) { - th_n_re1 = th_n_re * th_re - th_n_im * th_im; - th_n_im1 = th_n_im * th_re + th_n_re * th_im; - th_n_re = th_n_re1; - th_n_im = th_n_im1; - z_re = z_re + this.B_re[n] * th_n_re - this.B_im[n] * th_n_im; - z_im = z_im + this.B_im[n] * th_n_re + this.B_re[n] * th_n_im; - } - - // 4. Calculate easting and northing - p.x = (z_im * this.a) + this.x0; - p.y = (z_re * this.a) + this.y0; - - return p; -} - -/** - New Zealand Map Grid Inverse - x/y to long/lat - */ -export function inverse(p) { - var n; - var x = p.x; - var y = p.y; - - var delta_x = x - this.x0; - var delta_y = y - this.y0; - - // 1. Calculate z - var z_re = delta_y / this.a; - var z_im = delta_x / this.a; - - // 2a. Calculate theta - first approximation gives km accuracy - var z_n_re = 1; - var z_n_im = 0; // z^0 - var z_n_re1; - var z_n_im1; - - var th_re = 0; - var th_im = 0; - for (n = 1; n <= 6; n++) { - z_n_re1 = z_n_re * z_re - z_n_im * z_im; - z_n_im1 = z_n_im * z_re + z_n_re * z_im; - z_n_re = z_n_re1; - z_n_im = z_n_im1; - th_re = th_re + this.C_re[n] * z_n_re - this.C_im[n] * z_n_im; - th_im = th_im + this.C_im[n] * z_n_re + this.C_re[n] * z_n_im; - } - - // 2b. Iterate to refine the accuracy of the calculation - // 0 iterations gives km accuracy - // 1 iteration gives m accuracy -- good enough for most mapping applications - // 2 iterations bives mm accuracy - for (var i = 0; i < this.iterations; i++) { - var th_n_re = th_re; - var th_n_im = th_im; - var th_n_re1; - var th_n_im1; - - var num_re = z_re; - var num_im = z_im; - for (n = 2; n <= 6; n++) { - th_n_re1 = th_n_re * th_re - th_n_im * th_im; - th_n_im1 = th_n_im * th_re + th_n_re * th_im; - th_n_re = th_n_re1; - th_n_im = th_n_im1; - num_re = num_re + (n - 1) * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im); - num_im = num_im + (n - 1) * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im); - } - - th_n_re = 1; - th_n_im = 0; - var den_re = this.B_re[1]; - var den_im = this.B_im[1]; - for (n = 2; n <= 6; n++) { - th_n_re1 = th_n_re * th_re - th_n_im * th_im; - th_n_im1 = th_n_im * th_re + th_n_re * th_im; - th_n_re = th_n_re1; - th_n_im = th_n_im1; - den_re = den_re + n * (this.B_re[n] * th_n_re - this.B_im[n] * th_n_im); - den_im = den_im + n * (this.B_im[n] * th_n_re + this.B_re[n] * th_n_im); - } - - // Complex division - var den2 = den_re * den_re + den_im * den_im; - th_re = (num_re * den_re + num_im * den_im) / den2; - th_im = (num_im * den_re - num_re * den_im) / den2; - } - - // 3. Calculate d_phi ... // and d_lambda - var d_psi = th_re; - var d_lambda = th_im; - var d_psi_n = 1; // d_psi^0 - - var d_phi = 0; - for (n = 1; n <= 9; n++) { - d_psi_n = d_psi_n * d_psi; - d_phi = d_phi + this.D[n] * d_psi_n; - } - - // 4. Calculate latitude and longitude - // d_phi is calcuated in second of arc * 10^-5, so we need to scale back to radians. d_lambda is in radians. - var lat = this.lat0 + (d_phi * SEC_TO_RAD * 1E5); - var lon = this.long0 + d_lambda; - - p.x = lon; - p.y = lat; - - return p; -} - -export var names = ["New_Zealand_Map_Grid", "nzmg"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/omerc.js b/proj4js-master/lib/projections/omerc.js deleted file mode 100644 index 72627bf9..00000000 --- a/proj4js-master/lib/projections/omerc.js +++ /dev/null @@ -1,244 +0,0 @@ -import tsfnz from '../common/tsfnz'; -import adjust_lon from '../common/adjust_lon'; -import phi2z from '../common/phi2z'; -import { D2R, EPSLN, HALF_PI, TWO_PI, FORTPI } from '../constants/values'; - -var TOL = 1e-7; - -function isTypeA(P) { - var typeAProjections = ['Hotine_Oblique_Mercator','Hotine_Oblique_Mercator_Azimuth_Natural_Origin']; - var projectionName = typeof P.PROJECTION === "object" ? Object.keys(P.PROJECTION)[0] : P.PROJECTION; - - return 'no_uoff' in P || 'no_off' in P || typeAProjections.indexOf(projectionName) !== -1; -} - - -/* Initialize the Oblique Mercator projection - ------------------------------------------*/ -export function init() { - var con, com, cosph0, D, F, H, L, sinph0, p, J, gamma = 0, - gamma0, lamc = 0, lam1 = 0, lam2 = 0, phi1 = 0, phi2 = 0, alpha_c = 0, AB; - - // only Type A uses the no_off or no_uoff property - // https://github.com/OSGeo/proj.4/issues/104 - this.no_off = isTypeA(this); - this.no_rot = 'no_rot' in this; - - var alp = false; - if ("alpha" in this) { - alp = true; - } - - var gam = false; - if ("rectified_grid_angle" in this) { - gam = true; - } - - if (alp) { - alpha_c = this.alpha; - } - - if (gam) { - gamma = (this.rectified_grid_angle * D2R); - } - console.log('GAMMA START', gamma) - - if (alp || gam) { - lamc = this.longc; - } else { - lam1 = this.long1; - phi1 = this.lat1; - lam2 = this.long2; - phi2 = this.lat2; - - if (Math.abs(phi1 - phi2) <= TOL || (con = Math.abs(phi1)) <= TOL || - Math.abs(con - HALF_PI) <= TOL || Math.abs(Math.abs(this.lat0) - HALF_PI) <= TOL || - Math.abs(Math.abs(phi2) - HALF_PI) <= TOL) { - throw new Error(); - } - } - - var one_es = 1.0 - this.es; - com = Math.sqrt(one_es); - - if (Math.abs(this.lat0) > EPSLN) { - sinph0 = Math.sin(this.lat0); - cosph0 = Math.cos(this.lat0); - con = 1 - this.es * sinph0 * sinph0; - this.B = cosph0 * cosph0; - this.B = Math.sqrt(1 + this.es * this.B * this.B / one_es); - this.A = this.B * this.k0 * com / con; - D = this.B * com / (cosph0 * Math.sqrt(con)); - F = D * D -1; - - if (F <= 0) { - F = 0; - } else { - F = Math.sqrt(F); - if (this.lat0 < 0) { - F = -F; - } - } - - this.E = F += D; - this.E *= Math.pow(tsfnz(this.e, this.lat0, sinph0), this.B); - } else { - this.B = 1 / com; - this.A = this.k0; - this.E = D = F = 1; - } - - if (alp || gam) { - if (alp) { - gamma0 = Math.asin(Math.sin(alpha_c) / D); - if (!gam) { - gamma = alpha_c; - } - } else { - gamma0 = gamma; - alpha_c = Math.asin(D * Math.sin(gamma0)); - } - this.lam0 = lamc - Math.asin(0.5 * (F - 1 / F) * Math.tan(gamma0)) / this.B; - } else { - H = Math.pow(tsfnz(this.e, phi1, Math.sin(phi1)), this.B); - L = Math.pow(tsfnz(this.e, phi2, Math.sin(phi2)), this.B); - F = this.E / H; - p = (L - H) / (L + H); - J = this.E * this.E; - J = (J - L * H) / (J + L * H); - con = lam1 - lam2; - - if (con < -Math.pi) { - lam2 -=TWO_PI; - } else if (con > Math.pi) { - lam2 += TWO_PI; - } - - this.lam0 = adjust_lon(0.5 * (lam1 + lam2) - Math.atan(J * Math.tan(0.5 * this.B * (lam1 - lam2)) / p) / this.B); - gamma0 = Math.atan(2 * Math.sin(this.B * adjust_lon(lam1 - this.lam0)) / (F - 1 / F)); - gamma = alpha_c = Math.asin(D * Math.sin(gamma0)); - } - - console.log('gamma', gamma) - - this.singam = Math.sin(gamma0); - this.cosgam = Math.cos(gamma0); - this.sinrot = Math.sin(gamma); - this.cosrot = Math.cos(gamma); - - this.rB = 1 / this.B; - this.ArB = this.A * this.rB; - this.BrA = 1 / this.ArB; - AB = this.A * this.B; - - if (this.no_off) { - this.u_0 = 0; - } else { - this.u_0 = Math.abs(this.ArB * Math.atan(Math.sqrt(D * D - 1) / Math.cos(alpha_c))); - - if (this.lat0 < 0) { - this.u_0 = - this.u_0; - } - } - - F = 0.5 * gamma0; - this.v_pole_n = this.ArB * Math.log(Math.tan(FORTPI - F)); - this.v_pole_s = this.ArB * Math.log(Math.tan(FORTPI + F)); -} - - -/* Oblique Mercator forward equations--mapping lat,long to x,y - ----------------------------------------------------------*/ -export function forward(p) { - var coords = {}; - var S, T, U, V, W, temp, u, v; - p.x = p.x - this.lam0; - - if (Math.abs(Math.abs(p.y) - HALF_PI) > EPSLN) { - W = this.E / Math.pow(tsfnz(this.e, p.y, Math.sin(p.y)), this.B); - - temp = 1 / W; - S = 0.5 * (W - temp); - T = 0.5 * (W + temp); - V = Math.sin(this.B * p.x); - U = (S * this.singam - V * this.cosgam) / T; - - if (Math.abs(Math.abs(U) - 1.0) < EPSLN) { - throw new Error(); - } - - v = 0.5 * this.ArB * Math.log((1 - U)/(1 + U)); - temp = Math.cos(this.B * p.x); - - if (Math.abs(temp) < TOL) { - u = this.A * p.x; - } else { - u = this.ArB * Math.atan2((S * this.cosgam + V * this.singam), temp); - } - } else { - v = p.y > 0 ? this.v_pole_n : this.v_pole_s; - u = this.ArB * p.y; - } - - if (this.no_rot) { - coords.x = u; - coords.y = v; - } else { - u -= this.u_0; - coords.x = v * this.cosrot + u * this.sinrot; - coords.y = u * this.cosrot - v * this.sinrot; - } - - coords.x = (this.a * coords.x + this.x0); - coords.y = (this.a * coords.y + this.y0); - - return coords; -} - -export function inverse(p) { - var u, v, Qp, Sp, Tp, Vp, Up; - var coords = {}; - - p.x = (p.x - this.x0) * (1.0 / this.a); - p.y = (p.y - this.y0) * (1.0 / this.a); - - if (this.no_rot) { - v = p.y; - u = p.x; - } else { - v = p.x * this.cosrot - p.y * this.sinrot; - u = p.y * this.cosrot + p.x * this.sinrot + this.u_0; - } - - Qp = Math.exp(-this.BrA * v); - Sp = 0.5 * (Qp - 1 / Qp); - Tp = 0.5 * (Qp + 1 / Qp); - Vp = Math.sin(this.BrA * u); - Up = (Vp * this.cosgam + Sp * this.singam) / Tp; - - if (Math.abs(Math.abs(Up) - 1) < EPSLN) { - coords.x = 0; - coords.y = Up < 0 ? -HALF_PI : HALF_PI; - } else { - coords.y = this.E / Math.sqrt((1 + Up) / (1 - Up)); - coords.y = phi2z(this.e, Math.pow(coords.y, 1 / this.B)); - - if (coords.y === Infinity) { - throw new Error(); - } - - coords.x = -this.rB * Math.atan2((Sp * this.cosgam - Vp * this.singam), Math.cos(this.BrA * u)); - } - - coords.x += this.lam0; - - return coords; -} - -export var names = ["Hotine_Oblique_Mercator", "Hotine Oblique Mercator", "Hotine_Oblique_Mercator_Azimuth_Natural_Origin", "Hotine_Oblique_Mercator_Two_Point_Natural_Origin", "Hotine_Oblique_Mercator_Azimuth_Center", "Oblique_Mercator", "omerc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/ortho.js b/proj4js-master/lib/projections/ortho.js deleted file mode 100644 index ed9f32e2..00000000 --- a/proj4js-master/lib/projections/ortho.js +++ /dev/null @@ -1,91 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; -import asinz from '../common/asinz'; -import {EPSLN, HALF_PI} from '../constants/values'; - -export function init() { - //double temp; /* temporary variable */ - - /* Place parameters in static storage for common use - -------------------------------------------------*/ - this.sin_p14 = Math.sin(this.lat0); - this.cos_p14 = Math.cos(this.lat0); -} - -/* Orthographic forward equations--mapping lat,long to x,y - ---------------------------------------------------*/ -export function forward(p) { - var sinphi, cosphi; /* sin and cos value */ - var dlon; /* delta longitude value */ - var coslon; /* cos of longitude */ - var ksp; /* scale factor */ - var g, x, y; - var lon = p.x; - var lat = p.y; - /* Forward equations - -----------------*/ - dlon = adjust_lon(lon - this.long0); - - sinphi = Math.sin(lat); - cosphi = Math.cos(lat); - - coslon = Math.cos(dlon); - g = this.sin_p14 * sinphi + this.cos_p14 * cosphi * coslon; - ksp = 1; - if ((g > 0) || (Math.abs(g) <= EPSLN)) { - x = this.a * ksp * cosphi * Math.sin(dlon); - y = this.y0 + this.a * ksp * (this.cos_p14 * sinphi - this.sin_p14 * cosphi * coslon); - } - p.x = x; - p.y = y; - return p; -} - -export function inverse(p) { - var rh; /* height above ellipsoid */ - var z; /* angle */ - var sinz, cosz; /* sin of z and cos of z */ - var con; - var lon, lat; - /* Inverse equations - -----------------*/ - p.x -= this.x0; - p.y -= this.y0; - rh = Math.sqrt(p.x * p.x + p.y * p.y); - z = asinz(rh / this.a); - - sinz = Math.sin(z); - cosz = Math.cos(z); - - lon = this.long0; - if (Math.abs(rh) <= EPSLN) { - lat = this.lat0; - p.x = lon; - p.y = lat; - return p; - } - lat = asinz(cosz * this.sin_p14 + (p.y * sinz * this.cos_p14) / rh); - con = Math.abs(this.lat0) - HALF_PI; - if (Math.abs(con) <= EPSLN) { - if (this.lat0 >= 0) { - lon = adjust_lon(this.long0 + Math.atan2(p.x, - p.y)); - } - else { - lon = adjust_lon(this.long0 - Math.atan2(-p.x, p.y)); - } - p.x = lon; - p.y = lat; - return p; - } - lon = adjust_lon(this.long0 + Math.atan2((p.x * sinz), rh * this.cos_p14 * cosz - p.y * this.sin_p14 * sinz)); - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["ortho"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/poly.js b/proj4js-master/lib/projections/poly.js deleted file mode 100644 index be6f77bf..00000000 --- a/proj4js-master/lib/projections/poly.js +++ /dev/null @@ -1,135 +0,0 @@ -import e0fn from '../common/e0fn'; -import e1fn from '../common/e1fn'; -import e2fn from '../common/e2fn'; -import e3fn from '../common/e3fn'; -import adjust_lon from '../common/adjust_lon'; -import adjust_lat from '../common/adjust_lat'; -import mlfn from '../common/mlfn'; -import {EPSLN} from '../constants/values'; - -import gN from '../common/gN'; -var MAX_ITER = 20; - -export function init() { - /* Place parameters in static storage for common use - -------------------------------------------------*/ - this.temp = this.b / this.a; - this.es = 1 - Math.pow(this.temp, 2); // devait etre dans tmerc.js mais n y est pas donc je commente sinon retour de valeurs nulles - this.e = Math.sqrt(this.es); - this.e0 = e0fn(this.es); - this.e1 = e1fn(this.es); - this.e2 = e2fn(this.es); - this.e3 = e3fn(this.es); - this.ml0 = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, this.lat0); //si que des zeros le calcul ne se fait pas -} - -/* Polyconic forward equations--mapping lat,long to x,y - ---------------------------------------------------*/ -export function forward(p) { - var lon = p.x; - var lat = p.y; - var x, y, el; - var dlon = adjust_lon(lon - this.long0); - el = dlon * Math.sin(lat); - if (this.sphere) { - if (Math.abs(lat) <= EPSLN) { - x = this.a * dlon; - y = -1 * this.a * this.lat0; - } - else { - x = this.a * Math.sin(el) / Math.tan(lat); - y = this.a * (adjust_lat(lat - this.lat0) + (1 - Math.cos(el)) / Math.tan(lat)); - } - } - else { - if (Math.abs(lat) <= EPSLN) { - x = this.a * dlon; - y = -1 * this.ml0; - } - else { - var nl = gN(this.a, this.e, Math.sin(lat)) / Math.tan(lat); - x = nl * Math.sin(el); - y = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, lat) - this.ml0 + nl * (1 - Math.cos(el)); - } - - } - p.x = x + this.x0; - p.y = y + this.y0; - return p; -} - -/* Inverse equations - -----------------*/ -export function inverse(p) { - var lon, lat, x, y, i; - var al, bl; - var phi, dphi; - x = p.x - this.x0; - y = p.y - this.y0; - - if (this.sphere) { - if (Math.abs(y + this.a * this.lat0) <= EPSLN) { - lon = adjust_lon(x / this.a + this.long0); - lat = 0; - } - else { - al = this.lat0 + y / this.a; - bl = x * x / this.a / this.a + al * al; - phi = al; - var tanphi; - for (i = MAX_ITER; i; --i) { - tanphi = Math.tan(phi); - dphi = -1 * (al * (phi * tanphi + 1) - phi - 0.5 * (phi * phi + bl) * tanphi) / ((phi - al) / tanphi - 1); - phi += dphi; - if (Math.abs(dphi) <= EPSLN) { - lat = phi; - break; - } - } - lon = adjust_lon(this.long0 + (Math.asin(x * Math.tan(phi) / this.a)) / Math.sin(lat)); - } - } - else { - if (Math.abs(y + this.ml0) <= EPSLN) { - lat = 0; - lon = adjust_lon(this.long0 + x / this.a); - } - else { - - al = (this.ml0 + y) / this.a; - bl = x * x / this.a / this.a + al * al; - phi = al; - var cl, mln, mlnp, ma; - var con; - for (i = MAX_ITER; i; --i) { - con = this.e * Math.sin(phi); - cl = Math.sqrt(1 - con * con) * Math.tan(phi); - mln = this.a * mlfn(this.e0, this.e1, this.e2, this.e3, phi); - mlnp = this.e0 - 2 * this.e1 * Math.cos(2 * phi) + 4 * this.e2 * Math.cos(4 * phi) - 6 * this.e3 * Math.cos(6 * phi); - ma = mln / this.a; - dphi = (al * (cl * ma + 1) - ma - 0.5 * cl * (ma * ma + bl)) / (this.es * Math.sin(2 * phi) * (ma * ma + bl - 2 * al * ma) / (4 * cl) + (al - ma) * (cl * mlnp - 2 / Math.sin(2 * phi)) - mlnp); - phi -= dphi; - if (Math.abs(dphi) <= EPSLN) { - lat = phi; - break; - } - } - - //lat=phi4z(this.e,this.e0,this.e1,this.e2,this.e3,al,bl,0,0); - cl = Math.sqrt(1 - this.es * Math.pow(Math.sin(lat), 2)) * Math.tan(lat); - lon = adjust_lon(this.long0 + Math.asin(x * cl / this.a) / Math.sin(lat)); - } - } - - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["Polyconic", "poly"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/qsc.js b/proj4js-master/lib/projections/qsc.js deleted file mode 100644 index 2ce4bf6c..00000000 --- a/proj4js-master/lib/projections/qsc.js +++ /dev/null @@ -1,368 +0,0 @@ -// QSC projection rewritten from the original PROJ4 -// https://github.com/OSGeo/proj.4/blob/master/src/PJ_qsc.c - -import {EPSLN, TWO_PI, SPI, HALF_PI, FORTPI} from '../constants/values'; - -/* constants */ -var FACE_ENUM = { - FRONT: 1, - RIGHT: 2, - BACK: 3, - LEFT: 4, - TOP: 5, - BOTTOM: 6 -}; - -var AREA_ENUM = { - AREA_0: 1, - AREA_1: 2, - AREA_2: 3, - AREA_3: 4 -}; - -export function init() { - - this.x0 = this.x0 || 0; - this.y0 = this.y0 || 0; - this.lat0 = this.lat0 || 0; - this.long0 = this.long0 || 0; - this.lat_ts = this.lat_ts || 0; - this.title = this.title || "Quadrilateralized Spherical Cube"; - - /* Determine the cube face from the center of projection. */ - if (this.lat0 >= HALF_PI - FORTPI / 2.0) { - this.face = FACE_ENUM.TOP; - } else if (this.lat0 <= -(HALF_PI - FORTPI / 2.0)) { - this.face = FACE_ENUM.BOTTOM; - } else if (Math.abs(this.long0) <= FORTPI) { - this.face = FACE_ENUM.FRONT; - } else if (Math.abs(this.long0) <= HALF_PI + FORTPI) { - this.face = this.long0 > 0.0 ? FACE_ENUM.RIGHT : FACE_ENUM.LEFT; - } else { - this.face = FACE_ENUM.BACK; - } - - /* Fill in useful values for the ellipsoid <-> sphere shift - * described in [LK12]. */ - if (this.es !== 0) { - this.one_minus_f = 1 - (this.a - this.b) / this.a; - this.one_minus_f_squared = this.one_minus_f * this.one_minus_f; - } -} - -// QSC forward equations--mapping lat,long to x,y -// ----------------------------------------------------------------- -export function forward(p) { - var xy = {x: 0, y: 0}; - var lat, lon; - var theta, phi; - var t, mu; - /* nu; */ - var area = {value: 0}; - - // move lon according to projection's lon - p.x -= this.long0; - - /* Convert the geodetic latitude to a geocentric latitude. - * This corresponds to the shift from the ellipsoid to the sphere - * described in [LK12]. */ - if (this.es !== 0) {//if (P->es != 0) { - lat = Math.atan(this.one_minus_f_squared * Math.tan(p.y)); - } else { - lat = p.y; - } - - /* Convert the input lat, lon into theta, phi as used by QSC. - * This depends on the cube face and the area on it. - * For the top and bottom face, we can compute theta and phi - * directly from phi, lam. For the other faces, we must use - * unit sphere cartesian coordinates as an intermediate step. */ - lon = p.x; //lon = lp.lam; - if (this.face === FACE_ENUM.TOP) { - phi = HALF_PI - lat; - if (lon >= FORTPI && lon <= HALF_PI + FORTPI) { - area.value = AREA_ENUM.AREA_0; - theta = lon - HALF_PI; - } else if (lon > HALF_PI + FORTPI || lon <= -(HALF_PI + FORTPI)) { - area.value = AREA_ENUM.AREA_1; - theta = (lon > 0.0 ? lon - SPI : lon + SPI); - } else if (lon > -(HALF_PI + FORTPI) && lon <= -FORTPI) { - area.value = AREA_ENUM.AREA_2; - theta = lon + HALF_PI; - } else { - area.value = AREA_ENUM.AREA_3; - theta = lon; - } - } else if (this.face === FACE_ENUM.BOTTOM) { - phi = HALF_PI + lat; - if (lon >= FORTPI && lon <= HALF_PI + FORTPI) { - area.value = AREA_ENUM.AREA_0; - theta = -lon + HALF_PI; - } else if (lon < FORTPI && lon >= -FORTPI) { - area.value = AREA_ENUM.AREA_1; - theta = -lon; - } else if (lon < -FORTPI && lon >= -(HALF_PI + FORTPI)) { - area.value = AREA_ENUM.AREA_2; - theta = -lon - HALF_PI; - } else { - area.value = AREA_ENUM.AREA_3; - theta = (lon > 0.0 ? -lon + SPI : -lon - SPI); - } - } else { - var q, r, s; - var sinlat, coslat; - var sinlon, coslon; - - if (this.face === FACE_ENUM.RIGHT) { - lon = qsc_shift_lon_origin(lon, +HALF_PI); - } else if (this.face === FACE_ENUM.BACK) { - lon = qsc_shift_lon_origin(lon, +SPI); - } else if (this.face === FACE_ENUM.LEFT) { - lon = qsc_shift_lon_origin(lon, -HALF_PI); - } - sinlat = Math.sin(lat); - coslat = Math.cos(lat); - sinlon = Math.sin(lon); - coslon = Math.cos(lon); - q = coslat * coslon; - r = coslat * sinlon; - s = sinlat; - - if (this.face === FACE_ENUM.FRONT) { - phi = Math.acos(q); - theta = qsc_fwd_equat_face_theta(phi, s, r, area); - } else if (this.face === FACE_ENUM.RIGHT) { - phi = Math.acos(r); - theta = qsc_fwd_equat_face_theta(phi, s, -q, area); - } else if (this.face === FACE_ENUM.BACK) { - phi = Math.acos(-q); - theta = qsc_fwd_equat_face_theta(phi, s, -r, area); - } else if (this.face === FACE_ENUM.LEFT) { - phi = Math.acos(-r); - theta = qsc_fwd_equat_face_theta(phi, s, q, area); - } else { - /* Impossible */ - phi = theta = 0; - area.value = AREA_ENUM.AREA_0; - } - } - - /* Compute mu and nu for the area of definition. - * For mu, see Eq. (3-21) in [OL76], but note the typos: - * compare with Eq. (3-14). For nu, see Eq. (3-38). */ - mu = Math.atan((12 / SPI) * (theta + Math.acos(Math.sin(theta) * Math.cos(FORTPI)) - HALF_PI)); - t = Math.sqrt((1 - Math.cos(phi)) / (Math.cos(mu) * Math.cos(mu)) / (1 - Math.cos(Math.atan(1 / Math.cos(theta))))); - - /* Apply the result to the real area. */ - if (area.value === AREA_ENUM.AREA_1) { - mu += HALF_PI; - } else if (area.value === AREA_ENUM.AREA_2) { - mu += SPI; - } else if (area.value === AREA_ENUM.AREA_3) { - mu += 1.5 * SPI; - } - - /* Now compute x, y from mu and nu */ - xy.x = t * Math.cos(mu); - xy.y = t * Math.sin(mu); - xy.x = xy.x * this.a + this.x0; - xy.y = xy.y * this.a + this.y0; - - p.x = xy.x; - p.y = xy.y; - return p; -} - -// QSC inverse equations--mapping x,y to lat/long -// ----------------------------------------------------------------- -export function inverse(p) { - var lp = {lam: 0, phi: 0}; - var mu, nu, cosmu, tannu; - var tantheta, theta, cosphi, phi; - var t; - var area = {value: 0}; - - /* de-offset */ - p.x = (p.x - this.x0) / this.a; - p.y = (p.y - this.y0) / this.a; - - /* Convert the input x, y to the mu and nu angles as used by QSC. - * This depends on the area of the cube face. */ - nu = Math.atan(Math.sqrt(p.x * p.x + p.y * p.y)); - mu = Math.atan2(p.y, p.x); - if (p.x >= 0.0 && p.x >= Math.abs(p.y)) { - area.value = AREA_ENUM.AREA_0; - } else if (p.y >= 0.0 && p.y >= Math.abs(p.x)) { - area.value = AREA_ENUM.AREA_1; - mu -= HALF_PI; - } else if (p.x < 0.0 && -p.x >= Math.abs(p.y)) { - area.value = AREA_ENUM.AREA_2; - mu = (mu < 0.0 ? mu + SPI : mu - SPI); - } else { - area.value = AREA_ENUM.AREA_3; - mu += HALF_PI; - } - - /* Compute phi and theta for the area of definition. - * The inverse projection is not described in the original paper, but some - * good hints can be found here (as of 2011-12-14): - * http://fits.gsfc.nasa.gov/fitsbits/saf.93/saf.9302 - * (search for "Message-Id: <9302181759.AA25477 at fits.cv.nrao.edu>") */ - t = (SPI / 12) * Math.tan(mu); - tantheta = Math.sin(t) / (Math.cos(t) - (1 / Math.sqrt(2))); - theta = Math.atan(tantheta); - cosmu = Math.cos(mu); - tannu = Math.tan(nu); - cosphi = 1 - cosmu * cosmu * tannu * tannu * (1 - Math.cos(Math.atan(1 / Math.cos(theta)))); - if (cosphi < -1) { - cosphi = -1; - } else if (cosphi > +1) { - cosphi = +1; - } - - /* Apply the result to the real area on the cube face. - * For the top and bottom face, we can compute phi and lam directly. - * For the other faces, we must use unit sphere cartesian coordinates - * as an intermediate step. */ - if (this.face === FACE_ENUM.TOP) { - phi = Math.acos(cosphi); - lp.phi = HALF_PI - phi; - if (area.value === AREA_ENUM.AREA_0) { - lp.lam = theta + HALF_PI; - } else if (area.value === AREA_ENUM.AREA_1) { - lp.lam = (theta < 0.0 ? theta + SPI : theta - SPI); - } else if (area.value === AREA_ENUM.AREA_2) { - lp.lam = theta - HALF_PI; - } else /* area.value == AREA_ENUM.AREA_3 */ { - lp.lam = theta; - } - } else if (this.face === FACE_ENUM.BOTTOM) { - phi = Math.acos(cosphi); - lp.phi = phi - HALF_PI; - if (area.value === AREA_ENUM.AREA_0) { - lp.lam = -theta + HALF_PI; - } else if (area.value === AREA_ENUM.AREA_1) { - lp.lam = -theta; - } else if (area.value === AREA_ENUM.AREA_2) { - lp.lam = -theta - HALF_PI; - } else /* area.value == AREA_ENUM.AREA_3 */ { - lp.lam = (theta < 0.0 ? -theta - SPI : -theta + SPI); - } - } else { - /* Compute phi and lam via cartesian unit sphere coordinates. */ - var q, r, s; - q = cosphi; - t = q * q; - if (t >= 1) { - s = 0; - } else { - s = Math.sqrt(1 - t) * Math.sin(theta); - } - t += s * s; - if (t >= 1) { - r = 0; - } else { - r = Math.sqrt(1 - t); - } - /* Rotate q,r,s into the correct area. */ - if (area.value === AREA_ENUM.AREA_1) { - t = r; - r = -s; - s = t; - } else if (area.value === AREA_ENUM.AREA_2) { - r = -r; - s = -s; - } else if (area.value === AREA_ENUM.AREA_3) { - t = r; - r = s; - s = -t; - } - /* Rotate q,r,s into the correct cube face. */ - if (this.face === FACE_ENUM.RIGHT) { - t = q; - q = -r; - r = t; - } else if (this.face === FACE_ENUM.BACK) { - q = -q; - r = -r; - } else if (this.face === FACE_ENUM.LEFT) { - t = q; - q = r; - r = -t; - } - /* Now compute phi and lam from the unit sphere coordinates. */ - lp.phi = Math.acos(-s) - HALF_PI; - lp.lam = Math.atan2(r, q); - if (this.face === FACE_ENUM.RIGHT) { - lp.lam = qsc_shift_lon_origin(lp.lam, -HALF_PI); - } else if (this.face === FACE_ENUM.BACK) { - lp.lam = qsc_shift_lon_origin(lp.lam, -SPI); - } else if (this.face === FACE_ENUM.LEFT) { - lp.lam = qsc_shift_lon_origin(lp.lam, +HALF_PI); - } - } - - /* Apply the shift from the sphere to the ellipsoid as described - * in [LK12]. */ - if (this.es !== 0) { - var invert_sign; - var tanphi, xa; - invert_sign = (lp.phi < 0 ? 1 : 0); - tanphi = Math.tan(lp.phi); - xa = this.b / Math.sqrt(tanphi * tanphi + this.one_minus_f_squared); - lp.phi = Math.atan(Math.sqrt(this.a * this.a - xa * xa) / (this.one_minus_f * xa)); - if (invert_sign) { - lp.phi = -lp.phi; - } - } - - lp.lam += this.long0; - p.x = lp.lam; - p.y = lp.phi; - return p; -} - -/* Helper function for forward projection: compute the theta angle - * and determine the area number. */ -function qsc_fwd_equat_face_theta(phi, y, x, area) { - var theta; - if (phi < EPSLN) { - area.value = AREA_ENUM.AREA_0; - theta = 0.0; - } else { - theta = Math.atan2(y, x); - if (Math.abs(theta) <= FORTPI) { - area.value = AREA_ENUM.AREA_0; - } else if (theta > FORTPI && theta <= HALF_PI + FORTPI) { - area.value = AREA_ENUM.AREA_1; - theta -= HALF_PI; - } else if (theta > HALF_PI + FORTPI || theta <= -(HALF_PI + FORTPI)) { - area.value = AREA_ENUM.AREA_2; - theta = (theta >= 0.0 ? theta - SPI : theta + SPI); - } else { - area.value = AREA_ENUM.AREA_3; - theta += HALF_PI; - } - } - return theta; -} - -/* Helper function: shift the longitude. */ -function qsc_shift_lon_origin(lon, offset) { - var slon = lon + offset; - if (slon < -SPI) { - slon += TWO_PI; - } else if (slon > +SPI) { - slon -= TWO_PI; - } - return slon; -} - -export var names = ["Quadrilateralized Spherical Cube", "Quadrilateralized_Spherical_Cube", "qsc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; - diff --git a/proj4js-master/lib/projections/robin.js b/proj4js-master/lib/projections/robin.js deleted file mode 100644 index f335bd7a..00000000 --- a/proj4js-master/lib/projections/robin.js +++ /dev/null @@ -1,161 +0,0 @@ -// Robinson projection -// Based on https://github.com/OSGeo/proj.4/blob/master/src/PJ_robin.c -// Polynomial coeficients from http://article.gmane.org/gmane.comp.gis.proj-4.devel/6039 - -import {HALF_PI, D2R, R2D, EPSLN} from '../constants/values'; -import adjust_lon from '../common/adjust_lon'; - -var COEFS_X = [ - [1.0000, 2.2199e-17, -7.15515e-05, 3.1103e-06], - [0.9986, -0.000482243, -2.4897e-05, -1.3309e-06], - [0.9954, -0.00083103, -4.48605e-05, -9.86701e-07], - [0.9900, -0.00135364, -5.9661e-05, 3.6777e-06], - [0.9822, -0.00167442, -4.49547e-06, -5.72411e-06], - [0.9730, -0.00214868, -9.03571e-05, 1.8736e-08], - [0.9600, -0.00305085, -9.00761e-05, 1.64917e-06], - [0.9427, -0.00382792, -6.53386e-05, -2.6154e-06], - [0.9216, -0.00467746, -0.00010457, 4.81243e-06], - [0.8962, -0.00536223, -3.23831e-05, -5.43432e-06], - [0.8679, -0.00609363, -0.000113898, 3.32484e-06], - [0.8350, -0.00698325, -6.40253e-05, 9.34959e-07], - [0.7986, -0.00755338, -5.00009e-05, 9.35324e-07], - [0.7597, -0.00798324, -3.5971e-05, -2.27626e-06], - [0.7186, -0.00851367, -7.01149e-05, -8.6303e-06], - [0.6732, -0.00986209, -0.000199569, 1.91974e-05], - [0.6213, -0.010418, 8.83923e-05, 6.24051e-06], - [0.5722, -0.00906601, 0.000182, 6.24051e-06], - [0.5322, -0.00677797, 0.000275608, 6.24051e-06] -]; - -var COEFS_Y = [ - [-5.20417e-18, 0.0124, 1.21431e-18, -8.45284e-11], - [0.0620, 0.0124, -1.26793e-09, 4.22642e-10], - [0.1240, 0.0124, 5.07171e-09, -1.60604e-09], - [0.1860, 0.0123999, -1.90189e-08, 6.00152e-09], - [0.2480, 0.0124002, 7.10039e-08, -2.24e-08], - [0.3100, 0.0123992, -2.64997e-07, 8.35986e-08], - [0.3720, 0.0124029, 9.88983e-07, -3.11994e-07], - [0.4340, 0.0123893, -3.69093e-06, -4.35621e-07], - [0.4958, 0.0123198, -1.02252e-05, -3.45523e-07], - [0.5571, 0.0121916, -1.54081e-05, -5.82288e-07], - [0.6176, 0.0119938, -2.41424e-05, -5.25327e-07], - [0.6769, 0.011713, -3.20223e-05, -5.16405e-07], - [0.7346, 0.0113541, -3.97684e-05, -6.09052e-07], - [0.7903, 0.0109107, -4.89042e-05, -1.04739e-06], - [0.8435, 0.0103431, -6.4615e-05, -1.40374e-09], - [0.8936, 0.00969686, -6.4636e-05, -8.547e-06], - [0.9394, 0.00840947, -0.000192841, -4.2106e-06], - [0.9761, 0.00616527, -0.000256, -4.2106e-06], - [1.0000, 0.00328947, -0.000319159, -4.2106e-06] -]; - -var FXC = 0.8487; -var FYC = 1.3523; -var C1 = R2D/5; // rad to 5-degree interval -var RC1 = 1/C1; -var NODES = 18; - -var poly3_val = function(coefs, x) { - return coefs[0] + x * (coefs[1] + x * (coefs[2] + x * coefs[3])); -}; - -var poly3_der = function(coefs, x) { - return coefs[1] + x * (2 * coefs[2] + x * 3 * coefs[3]); -}; - -function newton_rapshon(f_df, start, max_err, iters) { - var x = start; - for (; iters; --iters) { - var upd = f_df(x); - x -= upd; - if (Math.abs(upd) < max_err) { - break; - } - } - return x; -} - -export function init() { - this.x0 = this.x0 || 0; - this.y0 = this.y0 || 0; - this.long0 = this.long0 || 0; - this.es = 0; - this.title = this.title || "Robinson"; -} - -export function forward(ll) { - var lon = adjust_lon(ll.x - this.long0); - - var dphi = Math.abs(ll.y); - var i = Math.floor(dphi * C1); - if (i < 0) { - i = 0; - } else if (i >= NODES) { - i = NODES - 1; - } - dphi = R2D * (dphi - RC1 * i); - var xy = { - x: poly3_val(COEFS_X[i], dphi) * lon, - y: poly3_val(COEFS_Y[i], dphi) - }; - if (ll.y < 0) { - xy.y = -xy.y; - } - - xy.x = xy.x * this.a * FXC + this.x0; - xy.y = xy.y * this.a * FYC + this.y0; - return xy; -} - -export function inverse(xy) { - var ll = { - x: (xy.x - this.x0) / (this.a * FXC), - y: Math.abs(xy.y - this.y0) / (this.a * FYC) - }; - - if (ll.y >= 1) { // pathologic case - ll.x /= COEFS_X[NODES][0]; - ll.y = xy.y < 0 ? -HALF_PI : HALF_PI; - } else { - // find table interval - var i = Math.floor(ll.y * NODES); - if (i < 0) { - i = 0; - } else if (i >= NODES) { - i = NODES - 1; - } - for (;;) { - if (COEFS_Y[i][0] > ll.y) { - --i; - } else if (COEFS_Y[i+1][0] <= ll.y) { - ++i; - } else { - break; - } - } - // linear interpolation in 5 degree interval - var coefs = COEFS_Y[i]; - var t = 5 * (ll.y - coefs[0]) / (COEFS_Y[i+1][0] - coefs[0]); - // find t so that poly3_val(coefs, t) = ll.y - t = newton_rapshon(function(x) { - return (poly3_val(coefs, x) - ll.y) / poly3_der(coefs, x); - }, t, EPSLN, 100); - - ll.x /= poly3_val(COEFS_X[i], t); - ll.y = (5 * i + t) * D2R; - if (xy.y < 0) { - ll.y = -ll.y; - } - } - - ll.x = adjust_lon(ll.x + this.long0); - return ll; -} - -export var names = ["Robinson", "robin"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/sinu.js b/proj4js-master/lib/projections/sinu.js deleted file mode 100644 index 7ff57637..00000000 --- a/proj4js-master/lib/projections/sinu.js +++ /dev/null @@ -1,115 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; -import adjust_lat from '../common/adjust_lat'; -import pj_enfn from '../common/pj_enfn'; -var MAX_ITER = 20; -import pj_mlfn from '../common/pj_mlfn'; -import pj_inv_mlfn from '../common/pj_inv_mlfn'; -import {EPSLN, HALF_PI} from '../constants/values'; - -import asinz from '../common/asinz'; - - -export function init() { - /* Place parameters in static storage for common use - -------------------------------------------------*/ - - - if (!this.sphere) { - this.en = pj_enfn(this.es); - } - else { - this.n = 1; - this.m = 0; - this.es = 0; - this.C_y = Math.sqrt((this.m + 1) / this.n); - this.C_x = this.C_y / (this.m + 1); - } - -} - -/* Sinusoidal forward equations--mapping lat,long to x,y - -----------------------------------------------------*/ -export function forward(p) { - var x, y; - var lon = p.x; - var lat = p.y; - /* Forward equations - -----------------*/ - lon = adjust_lon(lon - this.long0); - - if (this.sphere) { - if (!this.m) { - lat = this.n !== 1 ? Math.asin(this.n * Math.sin(lat)) : lat; - } - else { - var k = this.n * Math.sin(lat); - for (var i = MAX_ITER; i; --i) { - var V = (this.m * lat + Math.sin(lat) - k) / (this.m + Math.cos(lat)); - lat -= V; - if (Math.abs(V) < EPSLN) { - break; - } - } - } - x = this.a * this.C_x * lon * (this.m + Math.cos(lat)); - y = this.a * this.C_y * lat; - - } - else { - - var s = Math.sin(lat); - var c = Math.cos(lat); - y = this.a * pj_mlfn(lat, s, c, this.en); - x = this.a * lon * c / Math.sqrt(1 - this.es * s * s); - } - - p.x = x; - p.y = y; - return p; -} - -export function inverse(p) { - var lat, temp, lon, s; - - p.x -= this.x0; - lon = p.x / this.a; - p.y -= this.y0; - lat = p.y / this.a; - - if (this.sphere) { - lat /= this.C_y; - lon = lon / (this.C_x * (this.m + Math.cos(lat))); - if (this.m) { - lat = asinz((this.m * lat + Math.sin(lat)) / this.n); - } - else if (this.n !== 1) { - lat = asinz(Math.sin(lat) / this.n); - } - lon = adjust_lon(lon + this.long0); - lat = adjust_lat(lat); - } - else { - lat = pj_inv_mlfn(p.y / this.a, this.es, this.en); - s = Math.abs(lat); - if (s < HALF_PI) { - s = Math.sin(lat); - temp = this.long0 + p.x * Math.sqrt(1 - this.es * s * s) / (this.a * Math.cos(lat)); - //temp = this.long0 + p.x / (this.a * Math.cos(lat)); - lon = adjust_lon(temp); - } - else if ((s - EPSLN) < HALF_PI) { - lon = this.long0; - } - } - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["Sinusoidal", "sinu"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/somerc.js b/proj4js-master/lib/projections/somerc.js deleted file mode 100644 index 18cdccb6..00000000 --- a/proj4js-master/lib/projections/somerc.js +++ /dev/null @@ -1,86 +0,0 @@ -/* - references: - Formules et constantes pour le Calcul pour la - projection cylindrique conforme à axe oblique et pour la transformation entre - des systèmes de référence. - http://www.swisstopo.admin.ch/internet/swisstopo/fr/home/topics/survey/sys/refsys/switzerland.parsysrelated1.31216.downloadList.77004.DownloadFile.tmp/swissprojectionfr.pdf - */ - -export function init() { - var phy0 = this.lat0; - this.lambda0 = this.long0; - var sinPhy0 = Math.sin(phy0); - var semiMajorAxis = this.a; - var invF = this.rf; - var flattening = 1 / invF; - var e2 = 2 * flattening - Math.pow(flattening, 2); - var e = this.e = Math.sqrt(e2); - this.R = this.k0 * semiMajorAxis * Math.sqrt(1 - e2) / (1 - e2 * Math.pow(sinPhy0, 2)); - this.alpha = Math.sqrt(1 + e2 / (1 - e2) * Math.pow(Math.cos(phy0), 4)); - this.b0 = Math.asin(sinPhy0 / this.alpha); - var k1 = Math.log(Math.tan(Math.PI / 4 + this.b0 / 2)); - var k2 = Math.log(Math.tan(Math.PI / 4 + phy0 / 2)); - var k3 = Math.log((1 + e * sinPhy0) / (1 - e * sinPhy0)); - this.K = k1 - this.alpha * k2 + this.alpha * e / 2 * k3; -} - -export function forward(p) { - var Sa1 = Math.log(Math.tan(Math.PI / 4 - p.y / 2)); - var Sa2 = this.e / 2 * Math.log((1 + this.e * Math.sin(p.y)) / (1 - this.e * Math.sin(p.y))); - var S = -this.alpha * (Sa1 + Sa2) + this.K; - - // spheric latitude - var b = 2 * (Math.atan(Math.exp(S)) - Math.PI / 4); - - // spheric longitude - var I = this.alpha * (p.x - this.lambda0); - - // psoeudo equatorial rotation - var rotI = Math.atan(Math.sin(I) / (Math.sin(this.b0) * Math.tan(b) + Math.cos(this.b0) * Math.cos(I))); - - var rotB = Math.asin(Math.cos(this.b0) * Math.sin(b) - Math.sin(this.b0) * Math.cos(b) * Math.cos(I)); - - p.y = this.R / 2 * Math.log((1 + Math.sin(rotB)) / (1 - Math.sin(rotB))) + this.y0; - p.x = this.R * rotI + this.x0; - return p; -} - -export function inverse(p) { - var Y = p.x - this.x0; - var X = p.y - this.y0; - - var rotI = Y / this.R; - var rotB = 2 * (Math.atan(Math.exp(X / this.R)) - Math.PI / 4); - - var b = Math.asin(Math.cos(this.b0) * Math.sin(rotB) + Math.sin(this.b0) * Math.cos(rotB) * Math.cos(rotI)); - var I = Math.atan(Math.sin(rotI) / (Math.cos(this.b0) * Math.cos(rotI) - Math.sin(this.b0) * Math.tan(rotB))); - - var lambda = this.lambda0 + I / this.alpha; - - var S = 0; - var phy = b; - var prevPhy = -1000; - var iteration = 0; - while (Math.abs(phy - prevPhy) > 0.0000001) { - if (++iteration > 20) { - //...reportError("omercFwdInfinity"); - return; - } - //S = Math.log(Math.tan(Math.PI / 4 + phy / 2)); - S = 1 / this.alpha * (Math.log(Math.tan(Math.PI / 4 + b / 2)) - this.K) + this.e * Math.log(Math.tan(Math.PI / 4 + Math.asin(this.e * Math.sin(phy)) / 2)); - prevPhy = phy; - phy = 2 * Math.atan(Math.exp(S)) - Math.PI / 2; - } - - p.x = lambda; - p.y = phy; - return p; -} - -export var names = ["somerc"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/stere.js b/proj4js-master/lib/projections/stere.js deleted file mode 100644 index 2118f9a1..00000000 --- a/proj4js-master/lib/projections/stere.js +++ /dev/null @@ -1,188 +0,0 @@ -import {EPSLN, HALF_PI} from '../constants/values'; - -import sign from '../common/sign'; -import msfnz from '../common/msfnz'; -import tsfnz from '../common/tsfnz'; -import phi2z from '../common/phi2z'; -import adjust_lon from '../common/adjust_lon'; - -export function ssfn_(phit, sinphi, eccen) { - sinphi *= eccen; - return (Math.tan(0.5 * (HALF_PI + phit)) * Math.pow((1 - sinphi) / (1 + sinphi), 0.5 * eccen)); -} - -export function init() { - - // setting default parameters - this.x0 = this.x0 || 0; - this.y0 = this.y0 || 0; - this.lat0 = this.lat0 || 0; - this.long0 = this.long0 || 0; - - console.log('BEGIN!!!!!!!!', this.k0) - - this.coslat0 = Math.cos(this.lat0); - this.sinlat0 = Math.sin(this.lat0); - if (this.sphere) { - if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN) { - console.log('BEGIN CASE A!') - this.k0 = 0.5 * (1 + sign(this.lat0) * Math.sin(this.lat_ts)); - } - } - else { - if (Math.abs(this.coslat0) <= EPSLN) { - if (this.lat0 > 0) { - //North pole - //trace('stere:north pole'); - this.con = 1; - } - else { - //South pole - //trace('stere:south pole'); - this.con = -1; - } - } - this.cons = Math.sqrt(Math.pow(1 + this.e, 1 + this.e) * Math.pow(1 - this.e, 1 - this.e)); - if (this.k0 === 1 && !isNaN(this.lat_ts) && Math.abs(this.coslat0) <= EPSLN && Math.abs(Math.cos(this.lat_ts)) > EPSLN) { - // When k0 is 1 (default value) and lat_ts is a vaild number and lat0 is at a pole and lat_ts is not at a pole - // Recalculate k0 using formula 21-35 from p161 of Snyder, 1987 - console.log('BEGIN CASE B!') - this.k0 = 0.5 * this.cons * msfnz(this.e, Math.sin(this.lat_ts), Math.cos(this.lat_ts)) / tsfnz(this.e, this.con * this.lat_ts, this.con * Math.sin(this.lat_ts)); - } - this.ms1 = msfnz(this.e, this.sinlat0, this.coslat0); - this.X0 = 2 * Math.atan(this.ssfn_(this.lat0, this.sinlat0, this.e)) - HALF_PI; - this.cosX0 = Math.cos(this.X0); - this.sinX0 = Math.sin(this.X0); - } - console.log('HERHEHRHERHEHRHEHR A 2', this.k0); -} - -// Stereographic forward equations--mapping lat,long to x,y -export function forward(p) { - var lon = p.x; - var lat = p.y; - var sinlat = Math.sin(lat); - var coslat = Math.cos(lat); - var A, X, sinX, cosX, ts, rh; - var dlon = adjust_lon(lon - this.long0); - - if (Math.abs(Math.abs(lon - this.long0) - Math.PI) <= EPSLN && Math.abs(lat + this.lat0) <= EPSLN) { - //case of the origine point - //trace('stere:this is the origin point'); - p.x = NaN; - p.y = NaN; - return p; - } - if (this.sphere) { - //trace('stere:sphere case'); - A = 2 * this.k0 / (1 + this.sinlat0 * sinlat + this.coslat0 * coslat * Math.cos(dlon)); - p.x = this.a * A * coslat * Math.sin(dlon) + this.x0; - p.y = this.a * A * (this.coslat0 * sinlat - this.sinlat0 * coslat * Math.cos(dlon)) + this.y0; - return p; - } - else { - X = 2 * Math.atan(this.ssfn_(lat, sinlat, this.e)) - HALF_PI; - cosX = Math.cos(X); - sinX = Math.sin(X); - if (Math.abs(this.coslat0) <= EPSLN) { - ts = tsfnz(this.e, lat * this.con, this.con * sinlat); - rh = 2 * this.a * this.k0 * ts / this.cons; - p.x = this.x0 + rh * Math.sin(lon - this.long0); - p.y = this.y0 - this.con * rh * Math.cos(lon - this.long0); - //trace(p.toString()); - return p; - } - else if (Math.abs(this.sinlat0) < EPSLN) { - //Eq - //trace('stere:equateur'); - A = 2 * this.a * this.k0 / (1 + cosX * Math.cos(dlon)); - p.y = A * sinX; - } - else { - //other case - //trace('stere:normal case'); - A = 2 * this.a * this.k0 * this.ms1 / (this.cosX0 * (1 + this.sinX0 * sinX + this.cosX0 * cosX * Math.cos(dlon))); - p.y = A * (this.cosX0 * sinX - this.sinX0 * cosX * Math.cos(dlon)) + this.y0; - } - p.x = A * cosX * Math.sin(dlon) + this.x0; - } - //trace(p.toString()); - return p; -} - -//* Stereographic inverse equations--mapping x,y to lat/long -export function inverse(p) { - p.x -= this.x0; - p.y -= this.y0; - var lon, lat, ts, ce, Chi; - var rh = Math.sqrt(p.x * p.x + p.y * p.y); - if (this.sphere) { - var c = 2 * Math.atan(rh / (2 * this.a * this.k0)); - lon = this.long0; - lat = this.lat0; - if (rh <= EPSLN) { - p.x = lon; - p.y = lat; - return p; - } - lat = Math.asin(Math.cos(c) * this.sinlat0 + p.y * Math.sin(c) * this.coslat0 / rh); - if (Math.abs(this.coslat0) < EPSLN) { - if (this.lat0 > 0) { - lon = adjust_lon(this.long0 + Math.atan2(p.x, - 1 * p.y)); - } - else { - lon = adjust_lon(this.long0 + Math.atan2(p.x, p.y)); - } - } - else { - lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(c), rh * this.coslat0 * Math.cos(c) - p.y * this.sinlat0 * Math.sin(c))); - } - p.x = lon; - p.y = lat; - return p; - } - else { - if (Math.abs(this.coslat0) <= EPSLN) { - if (rh <= EPSLN) { - lat = this.lat0; - lon = this.long0; - p.x = lon; - p.y = lat; - //trace(p.toString()); - return p; - } - p.x *= this.con; - p.y *= this.con; - ts = rh * this.cons / (2 * this.a * this.k0); - lat = this.con * phi2z(this.e, ts); - lon = this.con * adjust_lon(this.con * this.long0 + Math.atan2(p.x, - 1 * p.y)); - } - else { - ce = 2 * Math.atan(rh * this.cosX0 / (2 * this.a * this.k0 * this.ms1)); - lon = this.long0; - if (rh <= EPSLN) { - Chi = this.X0; - } - else { - Chi = Math.asin(Math.cos(ce) * this.sinX0 + p.y * Math.sin(ce) * this.cosX0 / rh); - lon = adjust_lon(this.long0 + Math.atan2(p.x * Math.sin(ce), rh * this.cosX0 * Math.cos(ce) - p.y * this.sinX0 * Math.sin(ce))); - } - lat = -1 * phi2z(this.e, Math.tan(0.5 * (HALF_PI + Chi))); - } - } - p.x = lon; - p.y = lat; - - //trace(p.toString()); - return p; - -} - -export var names = ["stere", "Stereographic_South_Pole", "Polar Stereographic (variant B)", "Polar_Stereographic"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names, - ssfn_: ssfn_ -}; diff --git a/proj4js-master/lib/projections/sterea.js b/proj4js-master/lib/projections/sterea.js deleted file mode 100644 index a90f43c9..00000000 --- a/proj4js-master/lib/projections/sterea.js +++ /dev/null @@ -1,65 +0,0 @@ -import gauss from './gauss'; -import adjust_lon from '../common/adjust_lon'; -import hypot from '../common/hypot'; - -export function init() { - gauss.init.apply(this); - if (!this.rc) { - return; - } - this.sinc0 = Math.sin(this.phic0); - this.cosc0 = Math.cos(this.phic0); - this.R2 = 2 * this.rc; - if (!this.title) { - this.title = "Oblique Stereographic Alternative"; - } -} - -export function forward(p) { - var sinc, cosc, cosl, k; - p.x = adjust_lon(p.x - this.long0); - gauss.forward.apply(this, [p]); - sinc = Math.sin(p.y); - cosc = Math.cos(p.y); - cosl = Math.cos(p.x); - k = this.k0 * this.R2 / (1 + this.sinc0 * sinc + this.cosc0 * cosc * cosl); - p.x = k * cosc * Math.sin(p.x); - p.y = k * (this.cosc0 * sinc - this.sinc0 * cosc * cosl); - p.x = this.a * p.x + this.x0; - p.y = this.a * p.y + this.y0; - return p; -} - -export function inverse(p) { - var sinc, cosc, lon, lat, rho; - p.x = (p.x - this.x0) / this.a; - p.y = (p.y - this.y0) / this.a; - - p.x /= this.k0; - p.y /= this.k0; - if ((rho = hypot(p.x, p.y))) { - var c = 2 * Math.atan2(rho, this.R2); - sinc = Math.sin(c); - cosc = Math.cos(c); - lat = Math.asin(cosc * this.sinc0 + p.y * sinc * this.cosc0 / rho); - lon = Math.atan2(p.x * sinc, rho * this.cosc0 * cosc - p.y * this.sinc0 * sinc); - } - else { - lat = this.phic0; - lon = 0; - } - - p.x = lon; - p.y = lat; - gauss.inverse.apply(this, [p]); - p.x = adjust_lon(p.x + this.long0); - return p; -} - -export var names = ["Stereographic_North_Pole", "Oblique_Stereographic", "sterea","Oblique Stereographic Alternative","Double_Stereographic"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/tmerc.js b/proj4js-master/lib/projections/tmerc.js deleted file mode 100644 index 8a778357..00000000 --- a/proj4js-master/lib/projections/tmerc.js +++ /dev/null @@ -1,174 +0,0 @@ -// Heavily based on this tmerc projection implementation -// https://github.com/mbloch/mapshaper-proj/blob/master/src/projections/tmerc.js - -import pj_enfn from '../common/pj_enfn'; -import pj_mlfn from '../common/pj_mlfn'; -import pj_inv_mlfn from '../common/pj_inv_mlfn'; -import adjust_lon from '../common/adjust_lon'; - -import {EPSLN, HALF_PI} from '../constants/values'; -import sign from '../common/sign'; - -export function init() { - this.x0 = this.x0 !== undefined ? this.x0 : 0; - this.y0 = this.y0 !== undefined ? this.y0 : 0; - this.long0 = this.long0 !== undefined ? this.long0 : 0; - this.lat0 = this.lat0 !== undefined ? this.lat0 : 0; - - if (this.es) { - this.en = pj_enfn(this.es); - this.ml0 = pj_mlfn(this.lat0, Math.sin(this.lat0), Math.cos(this.lat0), this.en); - } -} - -/** - Transverse Mercator Forward - long/lat to x/y - long/lat in radians - */ -export function forward(p) { - var lon = p.x; - var lat = p.y; - - var delta_lon = adjust_lon(lon - this.long0); - var con; - var x, y; - var sin_phi = Math.sin(lat); - var cos_phi = Math.cos(lat); - - if (!this.es) { - var b = cos_phi * Math.sin(delta_lon); - - if ((Math.abs(Math.abs(b) - 1)) < EPSLN) { - return (93); - } - else { - x = 0.5 * this.a * this.k0 * Math.log((1 + b) / (1 - b)) + this.x0; - y = cos_phi * Math.cos(delta_lon) / Math.sqrt(1 - Math.pow(b, 2)); - b = Math.abs(y); - - if (b >= 1) { - if ((b - 1) > EPSLN) { - return (93); - } - else { - y = 0; - } - } - else { - y = Math.acos(y); - } - - if (lat < 0) { - y = -y; - } - - y = this.a * this.k0 * (y - this.lat0) + this.y0; - } - } - else { - console.log('ELSE', this.en, this.a, this.x0, this.k0, this.ep2, this.es, this.ml0, this.y0); - var al = cos_phi * delta_lon; - var als = Math.pow(al, 2); - var c = this.ep2 * Math.pow(cos_phi, 2); - var cs = Math.pow(c, 2); - var tq = Math.abs(cos_phi) > EPSLN ? Math.tan(lat) : 0; - var t = Math.pow(tq, 2); - var ts = Math.pow(t, 2); - con = 1 - this.es * Math.pow(sin_phi, 2); - al = al / Math.sqrt(con); - var ml = pj_mlfn(lat, sin_phi, cos_phi, this.en); - - x = this.a * (this.k0 * al * (1 + - als / 6 * (1 - t + c + - als / 20 * (5 - 18 * t + ts + 14 * c - 58 * t * c + - als / 42 * (61 + 179 * ts - ts * t - 479 * t))))) + - this.x0; - - y = this.a * (this.k0 * (ml - this.ml0 + - sin_phi * delta_lon * al / 2 * (1 + - als / 12 * (5 - t + 9 * c + 4 * cs + - als / 30 * (61 + ts - 58 * t + 270 * c - 330 * t * c + - als / 56 * (1385 + 543 * ts - ts * t - 3111 * t)))))) + - this.y0; - } - - p.x = x; - p.y = y; - - return p; -} - -/** - Transverse Mercator Inverse - x/y to long/lat - */ -export function inverse(p) { - var con, phi; - var lat, lon; - var x = (p.x - this.x0) * (1 / this.a); - var y = (p.y - this.y0) * (1 / this.a); - - if (!this.es) { - var f = Math.exp(x / this.k0); - var g = 0.5 * (f - 1 / f); - var temp = this.lat0 + y / this.k0; - var h = Math.cos(temp); - con = Math.sqrt((1 - Math.pow(h, 2)) / (1 + Math.pow(g, 2))); - lat = Math.asin(con); - - if (y < 0) { - lat = -lat; - } - - if ((g === 0) && (h === 0)) { - lon = 0; - } - else { - lon = adjust_lon(Math.atan2(g, h) + this.long0); - } - } - else { // ellipsoidal form - con = this.ml0 + y / this.k0; - phi = pj_inv_mlfn(con, this.es, this.en); - - if (Math.abs(phi) < HALF_PI) { - var sin_phi = Math.sin(phi); - var cos_phi = Math.cos(phi); - var tan_phi = Math.abs(cos_phi) > EPSLN ? Math.tan(phi) : 0; - var c = this.ep2 * Math.pow(cos_phi, 2); - var cs = Math.pow(c, 2); - var t = Math.pow(tan_phi, 2); - var ts = Math.pow(t, 2); - con = 1 - this.es * Math.pow(sin_phi, 2); - var d = x * Math.sqrt(con) / this.k0; - var ds = Math.pow(d, 2); - con = con * tan_phi; - - lat = phi - (con * ds / (1 - this.es)) * 0.5 * (1 - - ds / 12 * (5 + 3 * t - 9 * c * t + c - 4 * cs - - ds / 30 * (61 + 90 * t - 252 * c * t + 45 * ts + 46 * c - - ds / 56 * (1385 + 3633 * t + 4095 * ts + 1574 * ts * t)))); - - lon = adjust_lon(this.long0 + (d * (1 - - ds / 6 * (1 + 2 * t + c - - ds / 20 * (5 + 28 * t + 24 * ts + 8 * c * t + 6 * c - - ds / 42 * (61 + 662 * t + 1320 * ts + 720 * ts * t)))) / cos_phi)); - } - else { - lat = HALF_PI * sign(y); - lon = 0; - } - } - - p.x = lon; - p.y = lat; - - return p; -} - -export var names = ["Fast_Transverse_Mercator", "Fast Transverse Mercator"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/tpers.js b/proj4js-master/lib/projections/tpers.js deleted file mode 100644 index 45141429..00000000 --- a/proj4js-master/lib/projections/tpers.js +++ /dev/null @@ -1,169 +0,0 @@ - -var mode = { - N_POLE: 0, - S_POLE: 1, - EQUIT: 2, - OBLIQ: 3 -}; - -import { D2R, HALF_PI, EPSLN } from "../constants/values"; -import hypot from "../common/hypot"; - -var params = { - h: { def: 100000, num: true }, // default is Karman line, no default in PROJ.7 - azi: { def: 0, num: true, degrees: true }, // default is North - tilt: { def: 0, num: true, degrees: true }, // default is Nadir - long0: { def: 0, num: true }, // default is Greenwich, conversion to rad is automatic - lat0: { def: 0, num: true } // default is Equator, conversion to rad is automatic -}; - -export function init() { - Object.keys(params).forEach(function (p) { - if (typeof this[p] === "undefined") { - this[p] = params[p].def; - } else if (params[p].num && isNaN(this[p])) { - throw new Error("Invalid parameter value, must be numeric " + p + " = " + this[p]); - } else if (params[p].num) { - this[p] = parseFloat(this[p]); - } - if (params[p].degrees) { - this[p] = this[p] * D2R; - } - }.bind(this)); - - if (Math.abs((Math.abs(this.lat0) - HALF_PI)) < EPSLN) { - this.mode = this.lat0 < 0 ? mode.S_POLE : mode.N_POLE; - } else if (Math.abs(this.lat0) < EPSLN) { - this.mode = mode.EQUIT; - } else { - this.mode = mode.OBLIQ; - this.sinph0 = Math.sin(this.lat0); - this.cosph0 = Math.cos(this.lat0); - } - - this.pn1 = this.h / this.a; // Normalize relative to the Earth's radius - - if (this.pn1 <= 0 || this.pn1 > 1e10) { - throw new Error("Invalid height"); - } - - this.p = 1 + this.pn1; - this.rp = 1 / this.p; - this.h1 = 1 / this.pn1; - this.pfact = (this.p + 1) * this.h1; - this.es = 0; - - var omega = this.tilt; - var gamma = this.azi; - this.cg = Math.cos(gamma); - this.sg = Math.sin(gamma); - this.cw = Math.cos(omega); - this.sw = Math.sin(omega); -} - -export function forward(p) { - p.x -= this.long0; - var sinphi = Math.sin(p.y); - var cosphi = Math.cos(p.y); - var coslam = Math.cos(p.x); - var x, y; - switch (this.mode) { - case mode.OBLIQ: - y = this.sinph0 * sinphi + this.cosph0 * cosphi * coslam; - break; - case mode.EQUIT: - y = cosphi * coslam; - break; - case mode.S_POLE: - y = -sinphi; - break; - case mode.N_POLE: - y = sinphi; - break; - } - y = this.pn1 / (this.p - y); - x = y * cosphi * Math.sin(p.x); - - switch (this.mode) { - case mode.OBLIQ: - y *= this.cosph0 * sinphi - this.sinph0 * cosphi * coslam; - break; - case mode.EQUIT: - y *= sinphi; - break; - case mode.N_POLE: - y *= -(cosphi * coslam); - break; - case mode.S_POLE: - y *= cosphi * coslam; - break; - } - - // Tilt - var yt, ba; - yt = y * this.cg + x * this.sg; - ba = 1 / (yt * this.sw * this.h1 + this.cw); - x = (x * this.cg - y * this.sg) * this.cw * ba; - y = yt * ba; - - p.x = x * this.a; - p.y = y * this.a; - return p; -} - -export function inverse(p) { - p.x /= this.a; - p.y /= this.a; - var r = { x: p.x, y: p.y }; - - // Un-Tilt - var bm, bq, yt; - yt = 1 / (this.pn1 - p.y * this.sw); - bm = this.pn1 * p.x * yt; - bq = this.pn1 * p.y * this.cw * yt; - p.x = bm * this.cg + bq * this.sg; - p.y = bq * this.cg - bm * this.sg; - - var rh = hypot(p.x, p.y); - if (Math.abs(rh) < EPSLN) { - r.x = 0; - r.y = p.y; - } else { - var cosz, sinz; - sinz = 1 - rh * rh * this.pfact; - sinz = (this.p - Math.sqrt(sinz)) / (this.pn1 / rh + rh / this.pn1); - cosz = Math.sqrt(1 - sinz * sinz); - switch (this.mode) { - case mode.OBLIQ: - r.y = Math.asin(cosz * this.sinph0 + p.y * sinz * this.cosph0 / rh); - p.y = (cosz - this.sinph0 * Math.sin(r.y)) * rh; - p.x *= sinz * this.cosph0; - break; - case mode.EQUIT: - r.y = Math.asin(p.y * sinz / rh); - p.y = cosz * rh; - p.x *= sinz; - break; - case mode.N_POLE: - r.y = Math.asin(cosz); - p.y = -p.y; - break; - case mode.S_POLE: - r.y = -Math.asin(cosz); - break; - } - r.x = Math.atan2(p.x, p.y); - } - - p.x = r.x + this.long0; - p.y = r.y; - return p; -} - -export var names = ["Tilted_Perspective", "tpers"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/projections/utm.js b/proj4js-master/lib/projections/utm.js deleted file mode 100644 index 60ec67b3..00000000 --- a/proj4js-master/lib/projections/utm.js +++ /dev/null @@ -1,30 +0,0 @@ -import adjust_zone from '../common/adjust_zone'; -import etmerc from './etmerc'; -export var dependsOn = 'etmerc'; -import {D2R} from '../constants/values'; - - -export function init() { - var zone = adjust_zone(this.zone, this.long0); - if (zone === undefined) { - throw new Error('unknown utm zone'); - } - this.lat0 = 0; - console.log('ZOME', this.zone, zone, this.long0); - this.long0 = ((6 * Math.abs(zone)) - 183) * D2R; - console.log('ZONE AFTER', this.zone, zone, this.long0); - this.x0 = 500000; - this.y0 = this.utmSouth ? 10000000 : 0; - this.k0 = 0.9996; - - etmerc.init.apply(this); - this.forward = etmerc.forward; - this.inverse = etmerc.inverse; -} - -export var names = ["Universal Transverse Mercator System", "utm"]; -export default { - init: init, - names: names, - dependsOn: dependsOn -}; diff --git a/proj4js-master/lib/projections/vandg.js b/proj4js-master/lib/projections/vandg.js deleted file mode 100644 index 1f1b5030..00000000 --- a/proj4js-master/lib/projections/vandg.js +++ /dev/null @@ -1,129 +0,0 @@ -import adjust_lon from '../common/adjust_lon'; - -import {HALF_PI, EPSLN} from '../constants/values'; - -import asinz from '../common/asinz'; - -/* Initialize the Van Der Grinten projection - ----------------------------------------*/ -export function init() { - //this.R = 6370997; //Radius of earth - this.R = this.a; -} - -export function forward(p) { - - var lon = p.x; - var lat = p.y; - - /* Forward equations - -----------------*/ - var dlon = adjust_lon(lon - this.long0); - var x, y; - - if (Math.abs(lat) <= EPSLN) { - x = this.x0 + this.R * dlon; - y = this.y0; - } - var theta = asinz(2 * Math.abs(lat / Math.PI)); - if ((Math.abs(dlon) <= EPSLN) || (Math.abs(Math.abs(lat) - HALF_PI) <= EPSLN)) { - x = this.x0; - if (lat >= 0) { - y = this.y0 + Math.PI * this.R * Math.tan(0.5 * theta); - } - else { - y = this.y0 + Math.PI * this.R * -Math.tan(0.5 * theta); - } - // return(OK); - } - var al = 0.5 * Math.abs((Math.PI / dlon) - (dlon / Math.PI)); - var asq = al * al; - var sinth = Math.sin(theta); - var costh = Math.cos(theta); - - var g = costh / (sinth + costh - 1); - var gsq = g * g; - var m = g * (2 / sinth - 1); - var msq = m * m; - var con = Math.PI * this.R * (al * (g - msq) + Math.sqrt(asq * (g - msq) * (g - msq) - (msq + asq) * (gsq - msq))) / (msq + asq); - if (dlon < 0) { - con = -con; - } - x = this.x0 + con; - //con = Math.abs(con / (Math.PI * this.R)); - var q = asq + g; - con = Math.PI * this.R * (m * q - al * Math.sqrt((msq + asq) * (asq + 1) - q * q)) / (msq + asq); - if (lat >= 0) { - //y = this.y0 + Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con); - y = this.y0 + con; - } - else { - //y = this.y0 - Math.PI * this.R * Math.sqrt(1 - con * con - 2 * al * con); - y = this.y0 - con; - } - p.x = x; - p.y = y; - return p; -} - -/* Van Der Grinten inverse equations--mapping x,y to lat/long - ---------------------------------------------------------*/ -export function inverse(p) { - var lon, lat; - var xx, yy, xys, c1, c2, c3; - var a1; - var m1; - var con; - var th1; - var d; - - /* inverse equations - -----------------*/ - p.x -= this.x0; - p.y -= this.y0; - con = Math.PI * this.R; - xx = p.x / con; - yy = p.y / con; - xys = xx * xx + yy * yy; - c1 = -Math.abs(yy) * (1 + xys); - c2 = c1 - 2 * yy * yy + xx * xx; - c3 = -2 * c1 + 1 + 2 * yy * yy + xys * xys; - d = yy * yy / c3 + (2 * c2 * c2 * c2 / c3 / c3 / c3 - 9 * c1 * c2 / c3 / c3) / 27; - a1 = (c1 - c2 * c2 / 3 / c3) / c3; - m1 = 2 * Math.sqrt(-a1 / 3); - con = ((3 * d) / a1) / m1; - if (Math.abs(con) > 1) { - if (con >= 0) { - con = 1; - } - else { - con = -1; - } - } - th1 = Math.acos(con) / 3; - if (p.y >= 0) { - lat = (-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI; - } - else { - lat = -(-m1 * Math.cos(th1 + Math.PI / 3) - c2 / 3 / c3) * Math.PI; - } - - if (Math.abs(xx) < EPSLN) { - lon = this.long0; - } - else { - lon = adjust_lon(this.long0 + Math.PI * (xys - 1 + Math.sqrt(1 + 2 * (xx * xx - yy * yy) + xys * xys)) / 2 / xx); - } - - p.x = lon; - p.y = lat; - return p; -} - -export var names = ["Van_der_Grinten_I", "VanDerGrinten", "vandg"]; -export default { - init: init, - forward: forward, - inverse: inverse, - names: names -}; diff --git a/proj4js-master/lib/transform.js b/proj4js-master/lib/transform.js deleted file mode 100644 index 07deae26..00000000 --- a/proj4js-master/lib/transform.js +++ /dev/null @@ -1,115 +0,0 @@ -import {D2R, R2D, PJD_3PARAM, PJD_7PARAM, PJD_GRIDSHIFT} from './constants/values'; -import datum_transform from './datum_transform'; -import adjust_axis from './adjust_axis'; -import proj from './Proj'; -import toPoint from './common/toPoint'; -import checkSanity from './checkSanity'; - -function checkNotWGS(source, dest) { - return ( - (source.datum.datum_type === PJD_3PARAM || source.datum.datum_type === PJD_7PARAM || source.datum.datum_type === PJD_GRIDSHIFT) && dest.datumCode !== 'WGS84') || - ((dest.datum.datum_type === PJD_3PARAM || dest.datum.datum_type === PJD_7PARAM || dest.datum.datum_type === PJD_GRIDSHIFT) && source.datumCode !== 'WGS84'); -} - -export default function transform(source, dest, point, enforceAxis) { - console.log('BEGIN TRANSFORM', source, dest, enforceAxis) - var wgs84; - if (Array.isArray(point)) { - point = toPoint(point); - } else { - // Clone the point object so inputs don't get modified - point = { - x: point.x, - y: point.y, - z: point.z, - m: point.m - }; - } - var hasZ = point.z !== undefined; - checkSanity(point); - // Workaround for datum shifts towgs84, if either source or destination projection is not wgs84 - if (source.datum && dest.datum && checkNotWGS(source, dest)) { - wgs84 = new proj('WGS84'); - console.log('THIS IS CALLED A') - point = transform(source, wgs84, point, enforceAxis); - source = wgs84; - } - // DGR, 2010/11/12 - if (enforceAxis && source.axis !== 'enu') { - point = adjust_axis(source, false, point); - } - // Transform source points to long/lat, if they aren't already. - if (source.projName === 'longlat') { - point = { - x: point.x * D2R, - y: point.y * D2R, - z: point.z || 0 - }; - } else { - if (source.to_meter) { - console.log('METER!', source.to_meter) - point = { - x: point.x * source.to_meter, - y: point.y * source.to_meter, - z: point.z || 0 - }; - } - point = source.inverse(point); // Convert Cartesian to longlat - if (!point) { - return; - } - console.log('STEP 1: INVERSE A', point) - } - // Adjust for the prime meridian if necessary - if (source.from_greenwich) { - point.x += source.from_greenwich; - } - - // Convert datums if needed, and if possible. - point = datum_transform(source.datum, dest.datum, point); - if (!point) { - return; - } - - console.log('STEP 2: MID DATUM A', point); - - // Adjust for the prime meridian if necessary - if (dest.from_greenwich) { - point = { - x: point.x - dest.from_greenwich, - y: point.y, - z: point.z || 0 - }; - } - - if (dest.projName === 'longlat') { - // convert radians to decimal degrees - point = { - x: point.x * R2D, - y: point.y * R2D, - z: point.z || 0 - }; - } else { // else project - // console.log('STEP 3: FORWARD A DEST: ', dest); - point = dest.forward(point); - console.log('STEP 3: FORWARD A', point); - if (dest.to_meter) { - point = { - x: point.x / dest.to_meter, - y: point.y / dest.to_meter, - z: point.z || 0 - }; - } - } - console.log('STEP 4: METER A', point); - - // DGR, 2010/11/12 - if (enforceAxis && dest.axis !== 'enu') { - return adjust_axis(dest, true, point); - } - - if (point && !hasZ) { - delete point.z; - } - return point; -} diff --git a/proj4js-master/package-lock.json b/proj4js-master/package-lock.json deleted file mode 100644 index e2de1b31..00000000 --- a/proj4js-master/package-lock.json +++ /dev/null @@ -1,7011 +0,0 @@ -{ - "name": "proj4", - "version": "2.12.2-alpha", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "proj4", - "version": "2.12.2-alpha", - "license": "MIT", - "dependencies": { - "mgrs": "1.0.0", - "wkt-parser": "^1.3.3" - }, - "devDependencies": { - "chai": "~4.1.2", - "curl-amd": "^0.8.12", - "grunt": "^1.0.1", - "grunt-cli": "~1.2.0", - "grunt-contrib-connect": "~1.0.2", - "grunt-contrib-jshint": "~3.2.0", - "grunt-contrib-uglify": "~3.1.0", - "grunt-mocha-phantomjs": "~4.0.0", - "grunt-rollup": "^6.0.0", - "istanbul": "~0.4.5", - "mocha": "~4.0.0", - "rollup": "^0.50.0", - "rollup-plugin-json": "^2.3.0", - "rollup-plugin-node-resolve": "^3.0.0", - "rollup-plugin-replace": "^2.0.0", - "tin": "~0.5.0" - } - }, - "node_modules/abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true - }, - "node_modules/accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "dependencies": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "dependencies": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - }, - "funding": { - "type": "github", - "url": "https://github.com/sponsors/epoberezkin" - } - }, - "node_modules/amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "optional": true, - "engines": { - "node": ">=0.4.2" - } - }, - "node_modules/ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "dependencies": { - "sprintf-js": "~1.0.2" - } - }, - "node_modules/array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "dependencies": { - "safer-buffer": "~2.1.0" - } - }, - "node_modules/assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "node_modules/asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "node_modules/aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "dependencies": { - "safe-buffer": "5.1.2" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true - }, - "node_modules/bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "dependencies": { - "tweetnacl": "^0.14.3" - } - }, - "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, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "dependencies": { - "fill-range": "^7.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha512-7Rfk377tpSM9TWBEeHs0FlDZGoAIei2V/4MdZJoFMBFAK6BqLpxAIUepGRHGdPFgGsLb02PXovC4qddyHvQqTg==", - "dev": true - }, - "node_modules/browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==", - "dev": true, - "dependencies": { - "pako": "~0.2.0" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "node_modules/builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==", - "dev": true, - "dependencies": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, - "node_modules/chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha512-YTHf80rJ8M5/cJoFKEV1y3PnexbGs0vSHjouRRU8gLM05Nc3Mqq9zor/P4SCqB/sgvKRLvya7wHLC1XQ9pTjgQ==", - "dev": true, - "dependencies": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "dependencies": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", - "dev": true, - "dependencies": { - "exit": "0.1.2", - "glob": "^7.1.1" - }, - "engines": { - "node": ">=0.2.5" - } - }, - "node_modules/color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "dependencies": { - "color-name": "~1.1.4" - }, - "engines": { - "node": ">=7.0.0" - } - }, - "node_modules/color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "node_modules/colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "dev": true, - "engines": { - "node": ">=0.1.90" - } - }, - "node_modules/combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "dependencies": { - "delayed-stream": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", - "dev": true - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "engines": [ - "node >= 0.8" - ], - "dependencies": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - } - }, - "node_modules/concat-stream/node_modules/isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "node_modules/concat-stream/node_modules/readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "node_modules/concat-stream/node_modules/string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.1.0" - } - }, - "node_modules/connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/connect-livereload": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.5.4.tgz", - "integrity": "sha512-3KnRwsWf4VmP01I4hCDQqTc4e2UxOvJIi8i08GiwqX2oymzxNFY7PqjFkwHglYTJ0yzUJkO5yqdPxVaIz3Pbug==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", - "dev": true, - "dependencies": { - "date-now": "^0.1.4" - } - }, - "node_modules/core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "node_modules/curl-amd": { - "version": "0.8.12", - "resolved": "https://registry.npmjs.org/curl-amd/-/curl-amd-0.8.12.tgz", - "integrity": "sha512-7rTMBicetW3SM6syQfp76U91/TRPRYKz32OfaA0OH2E/EXXOnpvY44x+neGT5UFW8S8Fq5hjkYWe8KOGwLZuVA==", - "dev": true - }, - "node_modules/currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==", - "dev": true, - "dependencies": { - "array-find-index": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - }, - "engines": { - "node": ">=0.10" - } - }, - "node_modules/date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", - "dev": true - }, - "node_modules/dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "dependencies": { - "type-detect": "^4.0.0" - }, - "engines": { - "node": ">=0.12" - } - }, - "node_modules/deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "node_modules/delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true, - "engines": { - "node": ">= 0.8", - "npm": "1.2.8000 || >= 1.4.16" - } - }, - "node_modules/detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/diff": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", - "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", - "dev": true, - "engines": { - "node": ">=0.3.1" - } - }, - "node_modules/dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "dependencies": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - } - }, - "node_modules/dom-serializer/node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/dom-serializer/node_modules/entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "node_modules/domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", - "dev": true, - "dependencies": { - "domelementtype": "1" - } - }, - "node_modules/domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", - "dev": true, - "dependencies": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "node_modules/ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "dependencies": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "node_modules/ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "node_modules/encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", - "dev": true - }, - "node_modules/error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "dependencies": { - "is-arrayish": "^0.2.1" - } - }, - "node_modules/es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true - }, - "node_modules/escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", - "dev": true, - "dependencies": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1" - }, - "bin": { - "escodegen": "bin/escodegen.js", - "esgenerate": "bin/esgenerate.js" - }, - "engines": { - "node": ">=0.12.0" - }, - "optionalDependencies": { - "source-map": "~0.2.0" - } - }, - "node_modules/esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, - "node_modules/esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "node_modules/exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "node_modules/extract-zip": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", - "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", - "dev": true, - "dependencies": { - "concat-stream": "^1.6.2", - "debug": "^2.6.9", - "mkdirp": "^0.5.4", - "yauzl": "^2.10.0" - }, - "bin": { - "extract-zip": "cli.js" - } - }, - "node_modules/extract-zip/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true, - "engines": [ - "node >=0.6.0" - ] - }, - "node_modules/fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "node_modules/fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "node_modules/fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", - "dev": true, - "dependencies": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "dependencies": { - "to-regex-range": "^5.0.1" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "dependencies": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", - "dev": true, - "dependencies": { - "glob": "~5.0.0" - }, - "engines": { - "node": ">= 0.6.0" - } - }, - "node_modules/findup-sync/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "dev": true, - "dependencies": { - "for-in": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "dependencies": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - }, - "engines": { - "node": ">= 0.12" - } - }, - "node_modules/fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/fs-extra": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", - "integrity": "sha512-VerQV6vEKuhDWD2HGOybV6v5I73syoc/cXAbKlgTC7M/oFVEtklWlp9QH2Ijw3IaWDOQcMkldSPa7zXy79Z/UQ==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0" - } - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/getobject": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", - "dev": true, - "engines": { - "node": ">=10" - } - }, - "node_modules/getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0" - } - }, - "node_modules/glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "dependencies": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/global-prefix/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "node_modules/growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", - "dev": true, - "engines": { - "node": ">=4.x" - } - }, - "node_modules/grunt": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", - "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", - "dev": true, - "dependencies": { - "dateformat": "~3.0.3", - "eventemitter2": "~0.4.13", - "exit": "~0.1.2", - "findup-sync": "~0.3.0", - "glob": "~7.1.6", - "grunt-cli": "~1.4.3", - "grunt-known-options": "~2.0.0", - "grunt-legacy-log": "~3.0.0", - "grunt-legacy-util": "~2.0.1", - "iconv-lite": "~0.4.13", - "js-yaml": "~3.14.0", - "minimatch": "~3.0.4", - "mkdirp": "~1.0.4", - "nopt": "~3.0.6", - "rimraf": "~3.0.2" - }, - "bin": { - "grunt": "bin/grunt" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha512-8oM6ZAe4yG8Y7co/Ejc9613AixyN+gdCADyAFvJ1BbHGvrNa0ltaqrEWXV9P/W0gbQbAh3C8swJIaDuAX7syiw==", - "dev": true, - "dependencies": { - "findup-sync": "~0.3.0", - "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" - }, - "bin": { - "grunt": "bin/grunt" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-cli/node_modules/grunt-known-options": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz", - "integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-contrib-connect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-1.0.2.tgz", - "integrity": "sha512-7OPoyfGrpOYzuiRPzGyzWDe/xFcjttXe1ztVSFS8TAVBtpfXeeOV9RiwuyqA4yN1UeOG2Pnpx8s0DcUDAu21Gw==", - "dev": true, - "dependencies": { - "async": "^1.5.2", - "connect": "^3.4.0", - "connect-livereload": "^0.5.0", - "http2": "^3.3.4", - "morgan": "^1.6.1", - "opn": "^4.0.0", - "portscanner": "^1.0.0", - "serve-index": "^1.7.1", - "serve-static": "^1.10.0" - }, - "engines": { - "node": ">=0.10.0" - }, - "peerDependencies": { - "grunt": ">=0.4.0" - } - }, - "node_modules/grunt-contrib-jshint": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-3.2.0.tgz", - "integrity": "sha512-pcXWCSZWfoMSvcV4BwH21TUtLtcX0Ms8IGuOPIcLeXK3fud9KclY7iqMKY94jFx8TxZzh028YYtpR+io8DiEaQ==", - "dev": true, - "dependencies": { - "chalk": "~4.1.2", - "hooker": "^0.2.3", - "jshint": "~2.13.4" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-contrib-jshint/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/grunt-contrib-jshint/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/grunt-contrib-jshint/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/grunt-contrib-uglify": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-3.1.0.tgz", - "integrity": "sha512-4Dx6HOI4ipP4wOqHZEGYYLmBGMccfS6XAI8OOBCiLhLEN54CtxVdCYgT83dPdhxLpXFhNpG89frRjfqcos4H5w==", - "dev": true, - "dependencies": { - "chalk": "^1.0.0", - "maxmin": "^1.1.0", - "uglify-js": "~3.0.4", - "uri-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-known-options": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/grunt-legacy-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", - "dev": true, - "dependencies": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.1.0", - "hooker": "~0.2.3", - "lodash": "~4.17.19" - }, - "engines": { - "node": ">= 0.10.0" - } - }, - "node_modules/grunt-legacy-log-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", - "dev": true, - "dependencies": { - "chalk": "~4.1.0", - "lodash": "~4.17.19" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-legacy-log-utils/node_modules/ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "dependencies": { - "color-convert": "^2.0.1" - }, - "engines": { - "node": ">=8" - }, - "funding": { - "url": "https://github.com/chalk/ansi-styles?sponsor=1" - } - }, - "node_modules/grunt-legacy-log-utils/node_modules/chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "dependencies": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/chalk/chalk?sponsor=1" - } - }, - "node_modules/grunt-legacy-log-utils/node_modules/supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "dependencies": { - "has-flag": "^4.0.0" - }, - "engines": { - "node": ">=8" - } - }, - "node_modules/grunt-legacy-util": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", - "dev": true, - "dependencies": { - "async": "~3.2.0", - "exit": "~0.1.2", - "getobject": "~1.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.21", - "underscore.string": "~3.3.5", - "which": "~2.0.2" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt-legacy-util/node_modules/async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - }, - "node_modules/grunt-mocha-phantomjs": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/grunt-mocha-phantomjs/-/grunt-mocha-phantomjs-4.0.0.tgz", - "integrity": "sha512-yYChubnh9MRcSx82vW9BhBcfyPUanfEzGA91LFbXvppHV6gIXYxugja2V2Awo6LCmrp26w6lVqYdkbZ3GO2gcw==", - "dev": true, - "dependencies": { - "async": "^1.5.2", - "mocha-phantomjs-core": "^1.3.0", - "object-assign": "^4.1.0", - "phantomjs-prebuilt": "^2.1.3" - }, - "peerDependencies": { - "grunt": ">=0.4.0" - } - }, - "node_modules/grunt-rollup": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/grunt-rollup/-/grunt-rollup-6.0.0.tgz", - "integrity": "sha512-nICpGA4CbgNtvdNMNPoytV+Fa9MJuhRSVk4Odfcw7v6lrJmfZw4iJniNBeZrYkW09gT7qADylIivJaVqzF4fmA==", - "dev": true, - "dependencies": { - "rollup": "0.50.0" - }, - "engines": { - "node": ">= 4.0.0" - }, - "peerDependencies": { - "grunt": ">=0.4.0" - } - }, - "node_modules/grunt-rollup/node_modules/rollup": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.50.0.tgz", - "integrity": "sha512-7RqCBQ9iwsOBPkjYgoIaeUij606mSkDMExP0NT7QDI3bqkHYQHrQ83uoNIXwPcQm/vP2VbsUz3kiyZZ1qPlLTQ==", - "dev": true, - "bin": { - "rollup": "bin/rollup" - } - }, - "node_modules/grunt/node_modules/grunt-cli": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", - "dev": true, - "dependencies": { - "grunt-known-options": "~2.0.0", - "interpret": "~1.1.0", - "liftup": "~3.0.1", - "nopt": "~4.0.1", - "v8flags": "~3.2.0" - }, - "bin": { - "grunt": "bin/grunt" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/grunt/node_modules/grunt-cli/node_modules/nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "dev": true, - "dependencies": { - "abbrev": "1", - "osenv": "^0.1.4" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/gzip-size": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz", - "integrity": "sha512-mu66twX6zg8WB6IPfUtrquS7fjwGnDJ7kdVcggd5rpjwBItQKjHtvhu6VcQMkqPYAR7DjWpEaN3xiBSNmxvzPg==", - "dev": true, - "dependencies": { - "browserify-zlib": "^0.1.4", - "concat-stream": "^1.4.1" - }, - "bin": { - "gzip-size": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "dependencies": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "handlebars": "bin/handlebars" - }, - "engines": { - "node": ">=0.4.7" - }, - "optionalDependencies": { - "uglify-js": "^3.1.4" - } - }, - "node_modules/handlebars/node_modules/source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/handlebars/node_modules/uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, - "optional": true, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "deprecated": "this library is no longer supported", - "dev": true, - "dependencies": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/hasha": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", - "integrity": "sha512-jZ38TU/EBiGKrmyTNNZgnvCZHNowiRI4+w/I9noMlekHTZH3KyGgvJLmhSgykeAQ9j2SYPDosM0Bg3wHfzibAQ==", - "dev": true, - "dependencies": { - "is-stream": "^1.0.1", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha512-z/GDPjlRMNOa2XJiB4em8wJpuuBfrFOlYKTZxtpkdr1uPdibHI8rYA3MY0KDObpVyaes0e/aunid/t88ZI2EKA==", - "dev": true, - "bin": { - "he": "bin/he" - } - }, - "node_modules/homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "dependencies": { - "parse-passwd": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "node_modules/htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", - "dev": true, - "dependencies": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - } - }, - "node_modules/http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "dependencies": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors/node_modules/depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/http-errors/node_modules/inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - }, - "node_modules/http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "dependencies": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - }, - "engines": { - "node": ">=0.8", - "npm": ">=1.3.7" - } - }, - "node_modules/http2": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/http2/-/http2-3.3.7.tgz", - "integrity": "sha512-puSi8M8WNlFJm9Pk4c/Mbz9Gwparuj3gO9/RRO5zv6piQ0FY+9Qywp0PdWshYgsMJSalixFY7eC6oPu0zRxLAQ==", - "deprecated": "Use the built-in module in node 9.0.0 or newer, instead", - "dev": true, - "engines": { - "node": ">=0.12.0 <9.0.0" - } - }, - "node_modules/iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "dependencies": { - "safer-buffer": ">= 2.1.2 < 3" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==", - "dev": true, - "dependencies": { - "repeating": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", - "dev": true - }, - "node_modules/is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "dependencies": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "node_modules/is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, - "dependencies": { - "has": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true, - "engines": { - "node": ">=0.10.0" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "dependencies": { - "is-extglob": "^2.1.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true - }, - "node_modules/is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true, - "engines": { - "node": ">=0.12.0" - } - }, - "node_modules/is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "dependencies": { - "is-unc-path": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "node_modules/is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "dependencies": { - "unc-path-regex": "^0.1.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, - "node_modules/is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "node_modules/isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "node_modules/isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, - "node_modules/istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha512-nMtdn4hvK0HjUlzr1DrKSUY8ychprt8dzHOgY2KXsIhHu5PuQQEOTM27gV9Xblyon7aUH/TSFIjRHEODF/FRPg==", - "deprecated": "This module is no longer maintained, try this instead:\n npm i nyc\nVisit https://istanbul.js.org/integrations for other alternatives.", - "dev": true, - "dependencies": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "bin": { - "istanbul": "lib/cli.js" - } - }, - "node_modules/istanbul/node_modules/glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "dependencies": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/istanbul/node_modules/has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/istanbul/node_modules/mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "dependencies": { - "minimist": "^1.2.6" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/istanbul/node_modules/supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", - "dev": true, - "dependencies": { - "has-flag": "^1.0.0" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/istanbul/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "dependencies": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "bin": { - "js-yaml": "bin/js-yaml.js" - } - }, - "node_modules/js-yaml/node_modules/esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true, - "bin": { - "esparse": "bin/esparse.js", - "esvalidate": "bin/esvalidate.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, - "node_modules/jshint": { - "version": "2.13.6", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", - "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", - "dev": true, - "dependencies": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "strip-json-comments": "1.0.x" - }, - "bin": { - "jshint": "bin/jshint" - } - }, - "node_modules/json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "node_modules/json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "node_modules/json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "node_modules/jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.6" - } - }, - "node_modules/jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "dependencies": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - }, - "engines": { - "node": ">=0.6.0" - } - }, - "node_modules/kew": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", - "integrity": "sha512-IG6nm0+QtAMdXt9KvbgbGdvY50RSrw+U4sGZg+KlrSKPJEwVE5JVoI3d7RWfSMdBQneRheeAOj3lIjX5VL/9RQ==", - "dev": true - }, - "node_modules/kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", - "dev": true, - "optionalDependencies": { - "graceful-fs": "^4.1.9" - } - }, - "node_modules/levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/liftup": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", - "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", - "dev": true, - "dependencies": { - "extend": "^3.0.2", - "findup-sync": "^4.0.0", - "fined": "^1.2.0", - "flagged-respawn": "^1.0.1", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.1", - "rechoir": "^0.7.0", - "resolve": "^1.19.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/liftup/node_modules/findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", - "dev": true, - "dependencies": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/liftup/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "node_modules/loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==", - "dev": true, - "dependencies": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "dependencies": { - "sourcemap-codec": "^1.4.8" - } - }, - "node_modules/make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "dependencies": { - "kind-of": "^6.0.2" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/maxmin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz", - "integrity": "sha512-jypoV6wTPuz/ngkc2sDZnFvpvx14QICNKS/jK9RbkmiQQJZ4JWstIszA8iT/z9tPSF/vXQ5qtG0h65N9tiLIKA==", - "dev": true, - "dependencies": { - "chalk": "^1.0.0", - "figures": "^1.0.1", - "gzip-size": "^1.0.0", - "pretty-bytes": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA==", - "dev": true, - "dependencies": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mgrs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mgrs/-/mgrs-1.0.0.tgz", - "integrity": "sha512-awNbTOqCxK1DBGjalK3xqWIstBZgN6fxsMSiXLs9/spqWkF2pAhb2rrYCFSsr1/tT7PhcDGjZndG8SWYn0byYA==" - }, - "node_modules/micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "dependencies": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - }, - "engines": { - "node": ">=8.6" - } - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "dependencies": { - "mime-db": "1.52.0" - }, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true, - "bin": { - "mkdirp": "bin/cmd.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/mocha": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", - "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", - "dev": true, - "dependencies": { - "browser-stdout": "1.3.0", - "commander": "2.11.0", - "debug": "3.1.0", - "diff": "3.3.1", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.3", - "he": "1.1.1", - "mkdirp": "0.5.1", - "supports-color": "4.4.0" - }, - "bin": { - "_mocha": "bin/_mocha", - "mocha": "bin/mocha" - }, - "engines": { - "node": ">= 4.0.0", - "npm": ">= 2.15.11" - } - }, - "node_modules/mocha-phantomjs-core": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mocha-phantomjs-core/-/mocha-phantomjs-core-1.3.1.tgz", - "integrity": "sha512-Jz/3d3WnZw3A5kygxiRsPkNpSK8p5ki20oCjtLlVq8SZAaXKisbH/HOCeuK8lkSJf4hHEoPZkzU/5yxVuf1AIg==", - "dev": true - }, - "node_modules/mocha/node_modules/debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "dependencies": { - "ms": "2.0.0" - } - }, - "node_modules/mocha/node_modules/glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - } - }, - "node_modules/mocha/node_modules/has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/mocha/node_modules/minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==", - "dev": true - }, - "node_modules/mocha/node_modules/mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "deprecated": "Legacy versions of mkdirp are no longer supported. Please update to mkdirp 1.x. (Note that the API surface has changed to use Promises in 1.x.)", - "dev": true, - "dependencies": { - "minimist": "0.0.8" - }, - "bin": { - "mkdirp": "bin/cmd.js" - } - }, - "node_modules/mocha/node_modules/supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "dependencies": { - "has-flag": "^2.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "dev": true, - "dependencies": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "node_modules/negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "node_modules/nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "dependencies": { - "abbrev": "1" - }, - "bin": { - "nopt": "bin/nopt.js" - } - }, - "node_modules/normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "dependencies": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - } - }, - "node_modules/normalize-package-data/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", - "dev": true, - "dependencies": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", - "dev": true, - "dependencies": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "dependencies": { - "isobject": "^3.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha512-iPBWbPP4OEOzR1xfhpGLDh+ypKBOygunZhM9jBtA7FS5sKjEiMZw0EFb82hnDOmTZX90ZWLoZKUza4cVt8MexA==", - "dev": true, - "dependencies": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "dependencies": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "dependencies": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "node_modules/pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", - "dev": true - }, - "node_modules/parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", - "dev": true, - "dependencies": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "dependencies": { - "error-ex": "^1.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "dependencies": { - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "node_modules/path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", - "dev": true, - "dependencies": { - "path-root-regex": "^0.1.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "dependencies": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "node_modules/performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, - "node_modules/phantomjs-prebuilt": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz", - "integrity": "sha512-PIiRzBhW85xco2fuj41FmsyuYHKjKuXWmhjy3A/Y+CMpN/63TV+s9uzfVhsUwFe0G77xWtHBG8xmXf5BqEUEuQ==", - "deprecated": "this package is now deprecated", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "es6-promise": "^4.0.3", - "extract-zip": "^1.6.5", - "fs-extra": "^1.0.0", - "hasha": "^2.2.0", - "kew": "^0.7.0", - "progress": "^1.1.8", - "request": "^2.81.0", - "request-progress": "^2.0.1", - "which": "^1.2.10" - }, - "bin": { - "phantomjs": "bin/phantomjs" - } - }, - "node_modules/phantomjs-prebuilt/node_modules/which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "which": "bin/which" - } - }, - "node_modules/picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true, - "engines": { - "node": ">=8.6" - }, - "funding": { - "url": "https://github.com/sponsors/jonschlinkert" - } - }, - "node_modules/pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "dependencies": { - "pinkie": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/portscanner": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-1.2.0.tgz", - "integrity": "sha512-3MCx40XO6ChNJJHw1tTFukQK/M/8FacGZK/vGbnrKpozObrJzembYtfi7ZdA2hkF2Lojg77XhsKUPvF8eHKcDA==", - "dev": true, - "dependencies": { - "async": "1.5.2" - }, - "engines": { - "node": ">=0.4", - "npm": ">=1.0.0" - } - }, - "node_modules/prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha512-LNisJvAjy+hruxp3GV4IkZZscTI34+ISfeM1hesB9V6ezIDfXYrBi9TIXVjjMcEB4QFN7tL+dFDEk4s8jMBMyA==", - "dev": true, - "dependencies": { - "get-stdin": "^4.0.1", - "meow": "^3.1.0" - }, - "bin": { - "pretty-bytes": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "node_modules/progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha512-UdA8mJ4weIkUBO224tIarHzuHs4HuYiJvsuGT7j/SPQiUJVjYvNDBIPa0hAorduOfjGohB/qHWRa/lrrWX/mXw==", - "dev": true, - "engines": { - "node": ">=0.4.0" - } - }, - "node_modules/psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "node_modules/punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "dependencies": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "dependencies": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", - "dev": true, - "dependencies": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "node_modules/rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "dependencies": { - "resolve": "^1.9.0" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/rechoir/node_modules/resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "dependencies": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - }, - "bin": { - "resolve": "bin/resolve" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g==", - "dev": true, - "dependencies": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "dependencies": { - "is-finite": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "deprecated": "request has been deprecated, see https://github.com/request/request/issues/3142", - "dev": true, - "dependencies": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/request-progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz", - "integrity": "sha512-dxdraeZVUNEn9AvLrxkgB2k6buTlym71dJk1fk4v8j3Ou3RKNm07BcgbHdj2lLgYGfqX71F+awb1MR+tWPFJzA==", - "dev": true, - "dependencies": { - "throttleit": "^1.0.0" - } - }, - "node_modules/resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true - }, - "node_modules/resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "dependencies": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/rollup": { - "version": "0.50.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.50.1.tgz", - "integrity": "sha512-XwrnqjSTk+yR8GbP6hiJuVe83MVmBw/gm4P3qP34A10fRXvv6ppl0ZUg1+Pj1tIZSR/aw5ZaILLEiVxwXIAdAw==", - "dev": true, - "bin": { - "rollup": "bin/rollup" - } - }, - "node_modules/rollup-plugin-json": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-2.3.1.tgz", - "integrity": "sha512-alQQQVPo2z9pl6LSK8QqyDlWwCH5KeE8YxgQv7fa/SeTxz+gQe36jBjcha7hQW68MrVh9Ms71EQaMZDAG3w2yw==", - "deprecated": "This module has been deprecated and is no longer maintained. Please use @rollup/plugin-json.", - "dev": true, - "dependencies": { - "rollup-pluginutils": "^2.0.1" - }, - "peerDependencies": { - "rollup": "< 0.59.0" - } - }, - "node_modules/rollup-plugin-node-resolve": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", - "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", - "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.", - "dev": true, - "dependencies": { - "builtin-modules": "^2.0.0", - "is-module": "^1.0.0", - "resolve": "^1.1.6" - } - }, - "node_modules/rollup-plugin-replace": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz", - "integrity": "sha512-/5bxtUPkDHyBJAKketb4NfaeZjL5yLZdeUihSfbF2PQMz+rSTEb8ARKoOl3UBT4m7/X+QOXJo3sLTcq+yMMYTA==", - "deprecated": "This module has moved and is now available at @rollup/plugin-replace. Please update your dependencies. This version is no longer maintained.", - "dev": true, - "dependencies": { - "magic-string": "^0.25.2", - "rollup-pluginutils": "^2.6.0" - } - }, - "node_modules/rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "dependencies": { - "estree-walker": "^0.6.1" - } - }, - "node_modules/safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "node_modules/safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "dependencies": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/send/node_modules/http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "dependencies": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/send/node_modules/ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "node_modules/send/node_modules/on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "dependencies": { - "ee-first": "1.1.1" - }, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/send/node_modules/setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "node_modules/send/node_modules/statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "dependencies": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "dependencies": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "node_modules/signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "node_modules/source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", - "dev": true, - "optional": true, - "dependencies": { - "amdefine": ">=0.0.4" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "node_modules/spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "dependencies": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "node_modules/spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "dependencies": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "node_modules/spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", - "dev": true - }, - "node_modules/sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "node_modules/sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "dependencies": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - }, - "bin": { - "sshpk-conv": "bin/sshpk-conv", - "sshpk-sign": "bin/sshpk-sign", - "sshpk-verify": "bin/sshpk-verify" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true, - "engines": { - "node": ">= 0.6" - } - }, - "node_modules/string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/string/-/string-1.6.1.tgz", - "integrity": "sha512-HjS4ixm3n26s7G7aj7frqsiiM/lA1vz4zoOMHD6CfT7niMZv3nqspyKWAdnYBklKQM7xYuGfUn3jDLR18WlsPQ==", - "dev": true - }, - "node_modules/string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true - }, - "node_modules/strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "dependencies": { - "ansi-regex": "^2.0.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", - "dev": true, - "dependencies": { - "is-utf8": "^0.2.0" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==", - "dev": true, - "dependencies": { - "get-stdin": "^4.0.1" - }, - "bin": { - "strip-indent": "cli.js" - }, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", - "dev": true, - "bin": { - "strip-json-comments": "cli.js" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/throttleit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", - "dev": true - }, - "node_modules/tin": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/tin/-/tin-0.5.0.tgz", - "integrity": "sha512-lHhMm3Fy0+g9EBkH6+C6b8V5lm9SmvtpMO2scLAg/Fo0Ou94ogxDGf3PL6T2o7bgQMfYm9UAT6+U1Ppy/6CHZw==", - "dev": true, - "dependencies": { - "commander": "~2.0.0", - "semver": "~2.2.1", - "string": "~1.6.0" - }, - "bin": { - "tin": "bin/tin" - } - }, - "node_modules/tin/node_modules/commander": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.0.0.tgz", - "integrity": "sha512-qebjpyeaA/nJ4w3EO2cV2++/zEkccPnjWogzA2rff+Lk8ILI75vULeTmyd4wPxWdKwtP3J+G39IXVZadh0UHyw==", - "dev": true, - "engines": { - "node": ">= 0.6.x" - } - }, - "node_modules/tin/node_modules/semver": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-2.2.1.tgz", - "integrity": "sha512-zM5SE887Z8Ixx9cGaFnu9Wd8xr0RFwixASZcvUh2QGnf/1uxYmyetDzhzkEdDKipmZPq/JTB0gLo1Sg59LXkQQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "dependencies": { - "is-number": "^7.0.0" - }, - "engines": { - "node": ">=8.0" - } - }, - "node_modules/toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true, - "engines": { - "node": ">=0.6" - } - }, - "node_modules/tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "dependencies": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "node_modules/type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "dependencies": { - "prelude-ls": "~1.1.2" - }, - "engines": { - "node": ">= 0.8.0" - } - }, - "node_modules/type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "node_modules/uglify-js": { - "version": "3.0.28", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.28.tgz", - "integrity": "sha512-0h/qGay016GG2lVav3Kz174F3T2Vjlz2v6HCt+WDQpoXfco0hWwF5gHK9yh88mUYvIC+N7Z8NT8WpjSp1yoqGA==", - "dev": true, - "dependencies": { - "commander": "~2.11.0", - "source-map": "~0.5.1" - }, - "bin": { - "uglifyjs": "bin/uglifyjs" - }, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/uglify-js/node_modules/source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/underscore.string": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", - "dev": true, - "dependencies": { - "sprintf-js": "^1.1.1", - "util-deprecate": "^1.0.2" - }, - "engines": { - "node": "*" - } - }, - "node_modules/underscore.string/node_modules/sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - }, - "node_modules/unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true, - "engines": { - "node": ">= 0.8" - } - }, - "node_modules/uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "dependencies": { - "punycode": "^2.1.0" - } - }, - "node_modules/uri-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", - "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", - "dev": true, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "deprecated": "Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.", - "dev": true, - "bin": { - "uuid": "bin/uuid" - } - }, - "node_modules/v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "dependencies": { - "homedir-polyfill": "^1.0.1" - }, - "engines": { - "node": ">= 0.10" - } - }, - "node_modules/validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "dependencies": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "node_modules/verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "engines": [ - "node >=0.6.0" - ], - "dependencies": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - } - }, - "node_modules/verror/node_modules/core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - }, - "node_modules/which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "dependencies": { - "isexe": "^2.0.0" - }, - "bin": { - "node-which": "bin/node-which" - }, - "engines": { - "node": ">= 8" - } - }, - "node_modules/wkt-parser": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.3.3.tgz", - "integrity": "sha512-ZnV3yH8/k58ZPACOXeiHaMuXIiaTk1t0hSUVisbO0t4RjA5wPpUytcxeyiN2h+LZRrmuHIh/1UlrR9e7DHDvTw==" - }, - "node_modules/word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - } - }, - "dependencies": { - "abbrev": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", - "integrity": "sha512-LEyx4aLEC3x6T0UguF6YILf+ntvmOaWsVfENmIW0E9H09vKlLDGelMjjSm0jkDHALj8A8quZ/HapKNigzwge+Q==", - "dev": true - }, - "accepts": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/accepts/-/accepts-1.3.8.tgz", - "integrity": "sha512-PYAthTa2m2VKxuvSD3DPC/Gy+U+sOA1LAuT8mkmRuvw+NACSaeXEQ+NHcVF7rONl6qcaxV3Uuemwawk+7+SJLw==", - "dev": true, - "requires": { - "mime-types": "~2.1.34", - "negotiator": "0.6.3" - } - }, - "ajv": { - "version": "6.12.6", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", - "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", - "dev": true, - "requires": { - "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", - "uri-js": "^4.2.2" - } - }, - "amdefine": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", - "integrity": "sha512-S2Hw0TtNkMJhIabBwIojKL9YHO5T0n5eNqWJ7Lrlel/zDbftQpxpapi8tZs3X1HWa+u+QeydGmzzNU0m09+Rcg==", - "dev": true, - "optional": true - }, - "ansi-regex": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", - "integrity": "sha512-TIGnTpdo+E3+pCyAluZvtED5p5wCqLdezCyhPZzKPcxvFplEt4i+W7OONCKgeZFT3+y5NZZfOOS/Bdcanm1MYA==", - "dev": true - }, - "ansi-styles": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-2.2.1.tgz", - "integrity": "sha512-kmCevFghRiWM7HB5zTPULl4r9bVFSWjz62MhqizDGUrq2NWuNMQyuv4tHHoKJHs69M/MF64lEcHdYIocrdWQYA==", - "dev": true - }, - "argparse": { - "version": "1.0.10", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", - "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", - "dev": true, - "requires": { - "sprintf-js": "~1.0.2" - } - }, - "array-each": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", - "integrity": "sha512-zHjL5SZa68hkKHBFBK6DJCTtr9sfTCPCaph/L7tMSLcTFgy+zX7E+6q5UArbtOtMBCtxdICpfTCspRse+ywyXA==", - "dev": true - }, - "array-find-index": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/array-find-index/-/array-find-index-1.0.2.tgz", - "integrity": "sha512-M1HQyIXcBGtVywBt8WVdim+lrNaK7VHp99Qt5pSNziXznKHViIBbXWtfRTpEFpF/c4FdfxNAsCCwPp5phBYJtw==", - "dev": true - }, - "array-slice": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", - "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", - "dev": true - }, - "asn1": { - "version": "0.2.6", - "resolved": "https://registry.npmjs.org/asn1/-/asn1-0.2.6.tgz", - "integrity": "sha512-ix/FxPn0MDjeyJ7i/yoHGFt/EX6LyNbxSEhPPXODPL+KB0VPk86UYfL0lMdy+KCnv+fmvIzySwaK5COwqVbWTQ==", - "dev": true, - "requires": { - "safer-buffer": "~2.1.0" - } - }, - "assert-plus": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/assert-plus/-/assert-plus-1.0.0.tgz", - "integrity": "sha512-NfJ4UzBCcQGLDlQq7nHxH+tv3kyZ0hHQqF5BO6J7tNJeP5do1llPr8dZ8zHonfhAu0PHAdMkSo+8o0wxg9lZWw==", - "dev": true - }, - "assertion-error": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", - "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", - "dev": true - }, - "async": { - "version": "1.5.2", - "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", - "integrity": "sha512-nSVgobk4rv61R9PUSDtYt7mPVB2olxNR5RWJcAsH676/ef11bUZwvu7+RGYrYauVdDPcO519v68wRhXQtxsV9w==", - "dev": true - }, - "asynckit": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", - "integrity": "sha512-Oei9OH4tRh0YqU3GxhX79dM/mwVgvbZJaSNaRk+bshkj0S5cfHcgYakreBjrHwatXKbz+IoIdYLxrKim2MjW0Q==", - "dev": true - }, - "aws-sign2": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/aws-sign2/-/aws-sign2-0.7.0.tgz", - "integrity": "sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==", - "dev": true - }, - "aws4": { - "version": "1.11.0", - "resolved": "https://registry.npmjs.org/aws4/-/aws4-1.11.0.tgz", - "integrity": "sha512-xh1Rl34h6Fi1DC2WWKfxUTVqRsNnr6LsKz2+hfwDxQJWmrx8+c7ylaqBMcHfl1U1r2dsifOvKX3LQuLNZ+XSvA==", - "dev": true - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "basic-auth": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/basic-auth/-/basic-auth-2.0.1.tgz", - "integrity": "sha512-NF+epuEdnUYVlGuhaxbbq+dvJttwLnGY+YixlXlME5KpQ5W3CnXA5cVTneY3SPbPDRkcjMbifrwmFYcClgOZeg==", - "dev": true, - "requires": { - "safe-buffer": "5.1.2" - } - }, - "batch": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/batch/-/batch-0.6.1.tgz", - "integrity": "sha512-x+VAiMRL6UPkx+kudNvxTl6hB2XNNCG2r+7wixVfIYwu/2HKRXimwQyaumLjMveWvT2Hkd/cAJw+QBMfJ/EKVw==", - "dev": true - }, - "bcrypt-pbkdf": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", - "integrity": "sha512-qeFIXtP4MSoi6NLqO12WfqARWWuCKi2Rn/9hJLEmtB5yTNr9DqFWkJRCf2qShWzPeAMRnOgCrq0sg/KLv5ES9w==", - "dev": true, - "requires": { - "tweetnacl": "^0.14.3" - } - }, - "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, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "braces": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", - "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", - "dev": true, - "requires": { - "fill-range": "^7.0.1" - } - }, - "browser-stdout": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.0.tgz", - "integrity": "sha512-7Rfk377tpSM9TWBEeHs0FlDZGoAIei2V/4MdZJoFMBFAK6BqLpxAIUepGRHGdPFgGsLb02PXovC4qddyHvQqTg==", - "dev": true - }, - "browserify-zlib": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.1.4.tgz", - "integrity": "sha512-19OEpq7vWgsH6WkvkBJQDFvJS1uPcbFOQ4v9CU839dO+ZZXUZO6XpE6hNCqvlIIj+4fZvRiJ6DsAQ382GwiyTQ==", - "dev": true, - "requires": { - "pako": "~0.2.0" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true - }, - "buffer-from": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.2.tgz", - "integrity": "sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==", - "dev": true - }, - "builtin-modules": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/builtin-modules/-/builtin-modules-2.0.0.tgz", - "integrity": "sha512-3U5kUA5VPsRUA3nofm/BXX7GVHKfxz0hOBAPxXrIvHzlDRkQVqEn6yi8QJegxl4LzOHLdvb7XF5dVawa/VVYBg==", - "dev": true - }, - "camelcase": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-2.1.1.tgz", - "integrity": "sha512-DLIsRzJVBQu72meAKPkWQOLcujdXT32hwdfnkI1frSiSRMK1MofjKHf+MEx0SB6fjEFXL8fBDv1dKymBlOp4Qw==", - "dev": true - }, - "camelcase-keys": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/camelcase-keys/-/camelcase-keys-2.1.0.tgz", - "integrity": "sha512-bA/Z/DERHKqoEOrp+qeGKw1QlvEQkGZSc0XaY6VnTxZr+Kv1G5zFwttpjv8qxZ/sBPT4nthwZaAcsAZTJlSKXQ==", - "dev": true, - "requires": { - "camelcase": "^2.0.0", - "map-obj": "^1.0.0" - } - }, - "caseless": { - "version": "0.12.0", - "resolved": "https://registry.npmjs.org/caseless/-/caseless-0.12.0.tgz", - "integrity": "sha512-4tYFyifaFfGacoiObjJegolkwSU4xQNGbVgUiNYVUxbQ2x2lUsFvY4hVgVzGiIe6WLOPqycWXA40l+PWsxthUw==", - "dev": true - }, - "chai": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chai/-/chai-4.1.2.tgz", - "integrity": "sha512-YTHf80rJ8M5/cJoFKEV1y3PnexbGs0vSHjouRRU8gLM05Nc3Mqq9zor/P4SCqB/sgvKRLvya7wHLC1XQ9pTjgQ==", - "dev": true, - "requires": { - "assertion-error": "^1.0.1", - "check-error": "^1.0.1", - "deep-eql": "^3.0.0", - "get-func-name": "^2.0.0", - "pathval": "^1.0.0", - "type-detect": "^4.0.0" - } - }, - "chalk": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-1.1.3.tgz", - "integrity": "sha512-U3lRVLMSlsCfjqYPbLyVv11M9CPW4I728d6TCKMAOJueEeB9/8o+eSsMnxPJD+Q+K909sdESg7C+tIkoH6on1A==", - "dev": true, - "requires": { - "ansi-styles": "^2.2.1", - "escape-string-regexp": "^1.0.2", - "has-ansi": "^2.0.0", - "strip-ansi": "^3.0.0", - "supports-color": "^2.0.0" - } - }, - "check-error": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", - "integrity": "sha512-BrgHpW9NURQgzoNyjfq0Wu6VFO6D7IZEmJNdtgNqpzGG8RuNFHt2jQxWlAs4HMe119chBnv+34syEZtc6IhLtA==", - "dev": true - }, - "cli": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/cli/-/cli-1.0.1.tgz", - "integrity": "sha512-41U72MB56TfUMGndAKK8vJ78eooOD4Z5NOL4xEfjc0c23s+6EYKXlXsmACBVclLP1yOfWCgEganVzddVrSNoTg==", - "dev": true, - "requires": { - "exit": "0.1.2", - "glob": "^7.1.1" - } - }, - "color-convert": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", - "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", - "dev": true, - "requires": { - "color-name": "~1.1.4" - } - }, - "color-name": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", - "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", - "dev": true - }, - "colors": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/colors/-/colors-1.1.2.tgz", - "integrity": "sha512-ENwblkFQpqqia6b++zLD/KUWafYlVY/UNnAp7oz7LY7E924wmpye416wBOmvv/HMWzl8gL1kJlfvId/1Dg176w==", - "dev": true - }, - "combined-stream": { - "version": "1.0.8", - "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", - "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", - "dev": true, - "requires": { - "delayed-stream": "~1.0.0" - } - }, - "commander": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.11.0.tgz", - "integrity": "sha512-b0553uYA5YAEGgyYIGYROzKQ7X5RAqedkfjiZxwi0kL1g3bOaBNNZfYkzt/CL0umgD5wc9Jec2FbB98CjkMRvQ==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "concat-stream": { - "version": "1.6.2", - "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", - "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", - "dev": true, - "requires": { - "buffer-from": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^2.2.2", - "typedarray": "^0.0.6" - }, - "dependencies": { - "isarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", - "integrity": "sha512-VLghIWNM6ELQzo7zwmcg0NmTVyWKYjvIeM83yjp0wRDTmUnrM678fQbcKBo6n2CJEF0szoG//ytg+TKla89ALQ==", - "dev": true - }, - "readable-stream": { - "version": "2.3.7", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", - "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.3", - "isarray": "~1.0.0", - "process-nextick-args": "~2.0.0", - "safe-buffer": "~5.1.1", - "string_decoder": "~1.1.1", - "util-deprecate": "~1.0.1" - } - }, - "string_decoder": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", - "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", - "dev": true, - "requires": { - "safe-buffer": "~5.1.0" - } - } - } - }, - "connect": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/connect/-/connect-3.7.0.tgz", - "integrity": "sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==", - "dev": true, - "requires": { - "debug": "2.6.9", - "finalhandler": "1.1.2", - "parseurl": "~1.3.3", - "utils-merge": "1.0.1" - } - }, - "connect-livereload": { - "version": "0.5.4", - "resolved": "https://registry.npmjs.org/connect-livereload/-/connect-livereload-0.5.4.tgz", - "integrity": "sha512-3KnRwsWf4VmP01I4hCDQqTc4e2UxOvJIi8i08GiwqX2oymzxNFY7PqjFkwHglYTJ0yzUJkO5yqdPxVaIz3Pbug==", - "dev": true - }, - "console-browserify": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.1.0.tgz", - "integrity": "sha512-duS7VP5pvfsNLDvL1O4VOEbw37AI3A4ZUQYemvDlnpGrNu9tprR7BYWpDYwC0Xia0Zxz5ZupdiIrUp0GH1aXfg==", - "dev": true, - "requires": { - "date-now": "^0.1.4" - } - }, - "core-util-is": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.3.tgz", - "integrity": "sha512-ZQBvi1DcpJ4GDqanjucZ2Hj3wEO5pZDS89BWbkcrvdxksJorwUDDZamX9ldFkp9aw2lmBDLgkObEA4DWNJ9FYQ==", - "dev": true - }, - "curl-amd": { - "version": "0.8.12", - "resolved": "https://registry.npmjs.org/curl-amd/-/curl-amd-0.8.12.tgz", - "integrity": "sha512-7rTMBicetW3SM6syQfp76U91/TRPRYKz32OfaA0OH2E/EXXOnpvY44x+neGT5UFW8S8Fq5hjkYWe8KOGwLZuVA==", - "dev": true - }, - "currently-unhandled": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/currently-unhandled/-/currently-unhandled-0.4.1.tgz", - "integrity": "sha512-/fITjgjGU50vjQ4FH6eUoYu+iUoUKIXws2hL15JJpIR+BbTxaXQsMuuyjtNh2WqsSBS5nsaZHFsFecyw5CCAng==", - "dev": true, - "requires": { - "array-find-index": "^1.0.1" - } - }, - "dashdash": { - "version": "1.14.1", - "resolved": "https://registry.npmjs.org/dashdash/-/dashdash-1.14.1.tgz", - "integrity": "sha512-jRFi8UDGo6j+odZiEpjazZaWqEal3w/basFjQHQEwVtZJGDpxbH1MeYluwCS8Xq5wmLJooDlMgvVarmWfGM44g==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "date-now": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/date-now/-/date-now-0.1.4.tgz", - "integrity": "sha512-AsElvov3LoNB7tf5k37H2jYSB+ZZPMT5sG2QjJCcdlV5chIv6htBUBUui2IKRjgtKAKtCBN7Zbwa+MtwLjSeNw==", - "dev": true - }, - "dateformat": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/dateformat/-/dateformat-3.0.3.tgz", - "integrity": "sha512-jyCETtSl3VMZMWeRo7iY1FL19ges1t55hMo5yaam4Jrsm5EPL89UQkoQRyiI+Yf4k8r2ZpdngkV8hr1lIdjb3Q==", - "dev": true - }, - "debug": { - "version": "2.6.9", - "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", - "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "decamelize": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", - "integrity": "sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==", - "dev": true - }, - "deep-eql": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", - "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", - "dev": true, - "requires": { - "type-detect": "^4.0.0" - } - }, - "deep-is": { - "version": "0.1.4", - "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.4.tgz", - "integrity": "sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==", - "dev": true - }, - "delayed-stream": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", - "integrity": "sha512-ZySD7Nf91aLB0RxL4KGrKHBXl7Eds1DAmEdcoVawXnLD7SDhpNgtuII2aAkg7a7QS41jxPSZ17p4VdGnMHk3MQ==", - "dev": true - }, - "depd": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/depd/-/depd-2.0.0.tgz", - "integrity": "sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==", - "dev": true - }, - "destroy": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/destroy/-/destroy-1.2.0.tgz", - "integrity": "sha512-2sJGJTaXIIaR1w4iJSNoN0hnMY7Gpc/n8D4qSCJw8QqFWXf7cuAgnEHxBpweaVcPevC2l3KpjYCx3NypQQgaJg==", - "dev": true - }, - "detect-file": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", - "integrity": "sha512-DtCOLG98P007x7wiiOmfI0fi3eIKyWiLTGJ2MDnVi/E04lWGbf+JzrRHMm0rgIIZJGtHpKpbVgLWHrv8xXpc3Q==", - "dev": true - }, - "diff": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/diff/-/diff-3.3.1.tgz", - "integrity": "sha512-MKPHZDMB0o6yHyDryUOScqZibp914ksXwAMYMTHj6KO8UeKsRYNJD3oNCKjTqZon+V488P7N/HzXF8t7ZR95ww==", - "dev": true - }, - "dom-serializer": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-0.2.2.tgz", - "integrity": "sha512-2/xPb3ORsQ42nHYiSunXkDjPLBaEj/xTwUO4B7XCZQTRk7EBtTOPaygh10YAAh2OI1Qrp6NWfpAhzswj0ydt9g==", - "dev": true, - "requires": { - "domelementtype": "^2.0.1", - "entities": "^2.0.0" - }, - "dependencies": { - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true - }, - "entities": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.2.0.tgz", - "integrity": "sha512-p92if5Nz619I0w+akJrLZH0MX0Pb5DX39XOwQTtXSdQQOaYH03S1uIQp4mhOZtAXrxq4ViO67YTiLBo2638o9A==", - "dev": true - } - } - }, - "domelementtype": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-1.3.1.tgz", - "integrity": "sha512-BSKB+TSpMpFI/HOxCNr1O8aMOTZ8hT3pM3GQ0w/mWRmkhEDSFJkkyzz4XQsBV44BChwGkrDfMyjVD0eA2aFV3w==", - "dev": true - }, - "domhandler": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-2.3.0.tgz", - "integrity": "sha512-q9bUwjfp7Eif8jWxxxPSykdRZAb6GkguBGSgvvCrhI9wB71W2K/Kvv4E61CF/mcCfnVJDeDWx/Vb/uAqbDj6UQ==", - "dev": true, - "requires": { - "domelementtype": "1" - } - }, - "domutils": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-1.5.1.tgz", - "integrity": "sha512-gSu5Oi/I+3wDENBsOWBiRK1eoGxcywYSqg3rR960/+EfY0CF4EX1VPkgHOZ3WiS/Jg2DtliF6BhWcHlfpYUcGw==", - "dev": true, - "requires": { - "dom-serializer": "0", - "domelementtype": "1" - } - }, - "ecc-jsbn": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/ecc-jsbn/-/ecc-jsbn-0.1.2.tgz", - "integrity": "sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==", - "dev": true, - "requires": { - "jsbn": "~0.1.0", - "safer-buffer": "^2.1.0" - } - }, - "ee-first": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz", - "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", - "dev": true - }, - "encodeurl": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/encodeurl/-/encodeurl-1.0.2.tgz", - "integrity": "sha512-TPJXq8JqFaVYm2CWmPvnP2Iyo4ZSM7/QKcSmuMLDObfpH5fi7RUGmd/rTDf+rut/saiDiQEeVTNgAmJEdAOx0w==", - "dev": true - }, - "entities": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-1.0.0.tgz", - "integrity": "sha512-LbLqfXgJMmy81t+7c14mnulFHJ170cM6E+0vMXR9k/ZiZwgX8i5pNgjTCX3SO4VeUsFLV+8InixoretwU+MjBQ==", - "dev": true - }, - "error-ex": { - "version": "1.3.2", - "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", - "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", - "dev": true, - "requires": { - "is-arrayish": "^0.2.1" - } - }, - "es6-promise": { - "version": "4.2.8", - "resolved": "https://registry.npmjs.org/es6-promise/-/es6-promise-4.2.8.tgz", - "integrity": "sha512-HJDGx5daxeIvxdBxvG2cb9g4tEvwIk3i8+nhX0yGrYmZUzbkdg8QbDevheDB8gd0//uPj4c1EQua8Q+MViT0/w==", - "dev": true - }, - "escape-html": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/escape-html/-/escape-html-1.0.3.tgz", - "integrity": "sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "escodegen": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", - "integrity": "sha512-yhi5S+mNTOuRvyW4gWlg5W1byMaQGWWSYHXsuFZ7GBo7tpyOwi2EdzMP/QWxh9hwkD2m+wDVHJsxhRIj+v/b/A==", - "dev": true, - "requires": { - "esprima": "^2.7.1", - "estraverse": "^1.9.1", - "esutils": "^2.0.2", - "optionator": "^0.8.1", - "source-map": "~0.2.0" - } - }, - "esprima": { - "version": "2.7.3", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", - "integrity": "sha512-OarPfz0lFCiW4/AV2Oy1Rp9qu0iusTKqykwTspGCZtPxmF81JR4MmIebvF1F9+UOKth2ZubLQ4XGGaU+hSn99A==", - "dev": true - }, - "estraverse": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", - "integrity": "sha512-25w1fMXQrGdoquWnScXZGckOv+Wes+JDnuN/+7ex3SauFRS72r2lFDec0EKPt2YD1wUJ/IrfEex+9yp4hfSOJA==", - "dev": true - }, - "estree-walker": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", - "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true - }, - "esutils": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", - "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", - "dev": true - }, - "etag": { - "version": "1.8.1", - "resolved": "https://registry.npmjs.org/etag/-/etag-1.8.1.tgz", - "integrity": "sha512-aIL5Fx7mawVa300al2BnEE4iNvo1qETxLrPI/o05L7z6go7fCw1J6EQmbK4FmJ2AS7kgVF/KEZWufBfdClMcPg==", - "dev": true - }, - "eventemitter2": { - "version": "0.4.14", - "resolved": "https://registry.npmjs.org/eventemitter2/-/eventemitter2-0.4.14.tgz", - "integrity": "sha512-K7J4xq5xAD5jHsGM5ReWXRTFa3JRGofHiMcVgQ8PRwgWxzjHpMWCIzsmyf60+mh8KLsqYPcjUMa0AC4hd6lPyQ==", - "dev": true - }, - "exit": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/exit/-/exit-0.1.2.tgz", - "integrity": "sha512-Zk/eNKV2zbjpKzrsQ+n1G6poVbErQxJ0LBOJXaKZ1EViLzH+hrLu9cdXI4zw9dBQJslwBEpbQ2P1oS7nDxs6jQ==", - "dev": true - }, - "expand-tilde": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", - "integrity": "sha512-A5EmesHW6rfnZ9ysHQjPdJRni0SRar0tjtG5MNtm9n5TUvsYU8oozprtRD4AqHxcZWWlVuAmQo2nWKfN9oyjTw==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "extend": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", - "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", - "dev": true - }, - "extract-zip": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/extract-zip/-/extract-zip-1.7.0.tgz", - "integrity": "sha512-xoh5G1W/PB0/27lXgMQyIhP5DSY/LhoCsOyZgb+6iMmRtCwVBo55uKaMoEYrDCKQhWvqEip5ZPKAc6eFNyf/MA==", - "dev": true, - "requires": { - "concat-stream": "^1.6.2", - "debug": "^2.6.9", - "mkdirp": "^0.5.4", - "yauzl": "^2.10.0" - }, - "dependencies": { - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - } - } - }, - "extsprintf": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/extsprintf/-/extsprintf-1.3.0.tgz", - "integrity": "sha512-11Ndz7Nv+mvAC1j0ktTa7fAb0vLyGGX+rMHNBYQviQDGU0Hw7lhctJANqbPhu9nV9/izT/IntTgZ7Im/9LJs9g==", - "dev": true - }, - "fast-deep-equal": { - "version": "3.1.3", - "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", - "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", - "dev": true - }, - "fast-json-stable-stringify": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", - "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", - "dev": true - }, - "fast-levenshtein": { - "version": "2.0.6", - "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", - "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==", - "dev": true - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "figures": { - "version": "1.7.0", - "resolved": "https://registry.npmjs.org/figures/-/figures-1.7.0.tgz", - "integrity": "sha512-UxKlfCRuCBxSXU4C6t9scbDyWZ4VlaFFdojKtzJuSkuOBQ5CNFum+zZXFwHjo+CxBC1t6zlYPgHIgFjL8ggoEQ==", - "dev": true, - "requires": { - "escape-string-regexp": "^1.0.5", - "object-assign": "^4.1.0" - } - }, - "fill-range": { - "version": "7.0.1", - "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", - "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", - "dev": true, - "requires": { - "to-regex-range": "^5.0.1" - } - }, - "finalhandler": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", - "integrity": "sha512-aAWcW57uxVNrQZqFXjITpW3sIUQmHGG3qSb9mUah9MgMC4NeWhNOlNjXEYq3HjRAvL6arUviZGGJsBg6z0zsWA==", - "dev": true, - "requires": { - "debug": "2.6.9", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "on-finished": "~2.3.0", - "parseurl": "~1.3.3", - "statuses": "~1.5.0", - "unpipe": "~1.0.0" - } - }, - "find-up": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", - "integrity": "sha512-jvElSjyuo4EMQGoTwo1uJU5pQMwTW5lS1x05zzfJuTIyLR3zwO27LYrxNg+dlvKpGOuGy/MzBdXh80g0ve5+HA==", - "dev": true, - "requires": { - "path-exists": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "findup-sync": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-0.3.0.tgz", - "integrity": "sha512-z8Nrwhi6wzxNMIbxlrTzuUW6KWuKkogZ/7OdDVq+0+kxn77KUH1nipx8iU6suqkHqc4y6n7a9A8IpmxY/pTjWg==", - "dev": true, - "requires": { - "glob": "~5.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - } - } - }, - "fined": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", - "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "is-plain-object": "^2.0.3", - "object.defaults": "^1.1.0", - "object.pick": "^1.2.0", - "parse-filepath": "^1.0.1" - } - }, - "flagged-respawn": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", - "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", - "dev": true - }, - "for-in": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", - "integrity": "sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==", - "dev": true - }, - "for-own": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", - "integrity": "sha512-0OABksIGrxKK8K4kynWkQ7y1zounQxP+CWnyclVwj81KW3vlLlGUx57DKGcP/LH216GzqnstnPocF16Nxs0Ycg==", - "dev": true, - "requires": { - "for-in": "^1.0.1" - } - }, - "forever-agent": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/forever-agent/-/forever-agent-0.6.1.tgz", - "integrity": "sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==", - "dev": true - }, - "form-data": { - "version": "2.3.3", - "resolved": "https://registry.npmjs.org/form-data/-/form-data-2.3.3.tgz", - "integrity": "sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==", - "dev": true, - "requires": { - "asynckit": "^0.4.0", - "combined-stream": "^1.0.6", - "mime-types": "^2.1.12" - } - }, - "fresh": { - "version": "0.5.2", - "resolved": "https://registry.npmjs.org/fresh/-/fresh-0.5.2.tgz", - "integrity": "sha512-zJ2mQYM18rEFOudeV4GShTGIQ7RbzA7ozbU9I/XBpm7kqgMywgmylMwXHxZJmkVoYkna9d2pVXVXPdYTP9ej8Q==", - "dev": true - }, - "fs-extra": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-1.0.0.tgz", - "integrity": "sha512-VerQV6vEKuhDWD2HGOybV6v5I73syoc/cXAbKlgTC7M/oFVEtklWlp9QH2Ijw3IaWDOQcMkldSPa7zXy79Z/UQ==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "jsonfile": "^2.1.0", - "klaw": "^1.0.0" - } - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-func-name": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", - "integrity": "sha512-Hm0ixYtaSZ/V7C8FJrtZIuBBI+iSgL+1Aq82zSu8VQNB4S3Gk8e7Qs3VwBDJAhmRZcFqkl3tQu36g/Foh5I5ig==", - "dev": true - }, - "get-stdin": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/get-stdin/-/get-stdin-4.0.1.tgz", - "integrity": "sha512-F5aQMywwJ2n85s4hJPTT9RPxGmubonuB10MNYo17/xph174n2MIR33HRguhzVag10O/npM7SPk73LMZNP+FaWw==", - "dev": true - }, - "getobject": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/getobject/-/getobject-1.0.2.tgz", - "integrity": "sha512-2zblDBaFcb3rB4rF77XVnuINOE2h2k/OnqXAiy0IrTxUfV1iFp3la33oAQVY9pCpWU268WFYVt2t71hlMuLsOg==", - "dev": true - }, - "getpass": { - "version": "0.1.7", - "resolved": "https://registry.npmjs.org/getpass/-/getpass-0.1.7.tgz", - "integrity": "sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0" - } - }, - "glob": { - "version": "7.1.7", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.7.tgz", - "integrity": "sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "global-modules": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", - "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", - "dev": true, - "requires": { - "global-prefix": "^1.0.1", - "is-windows": "^1.0.1", - "resolve-dir": "^1.0.0" - } - }, - "global-prefix": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", - "integrity": "sha512-5lsx1NUDHtSjfg0eHlmYvZKv8/nVqX4ckFbM+FrGcQ+04KWcWFo9P5MxPZYSzUvyzmdTbI7Eix8Q4IbELDqzKg==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.2", - "homedir-polyfill": "^1.0.1", - "ini": "^1.3.4", - "is-windows": "^1.0.1", - "which": "^1.2.14" - }, - "dependencies": { - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "graceful-fs": { - "version": "4.2.10", - "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.10.tgz", - "integrity": "sha512-9ByhssR2fPVsNZj478qUUbKfmL0+t5BDVyjShtyZZLiK7ZDAArFFfopyOTj0M05wE2tJPisA4iTnnXl2YoPvOA==", - "dev": true - }, - "growl": { - "version": "1.10.3", - "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.3.tgz", - "integrity": "sha512-hKlsbA5Vu3xsh1Cg3J7jSmX/WaW6A5oBeqzM88oNbCRQFz+zUaXm6yxS4RVytp1scBoJzSYl4YAEOQIt6O8V1Q==", - "dev": true - }, - "grunt": { - "version": "1.5.3", - "resolved": "https://registry.npmjs.org/grunt/-/grunt-1.5.3.tgz", - "integrity": "sha512-mKwmo4X2d8/4c/BmcOETHek675uOqw0RuA/zy12jaspWqvTp4+ZeQF1W+OTpcbncnaBsfbQJ6l0l4j+Sn/GmaQ==", - "dev": true, - "requires": { - "dateformat": "~3.0.3", - "eventemitter2": "~0.4.13", - "exit": "~0.1.2", - "findup-sync": "~0.3.0", - "glob": "~7.1.6", - "grunt-cli": "~1.4.3", - "grunt-known-options": "~2.0.0", - "grunt-legacy-log": "~3.0.0", - "grunt-legacy-util": "~2.0.1", - "iconv-lite": "~0.4.13", - "js-yaml": "~3.14.0", - "minimatch": "~3.0.4", - "mkdirp": "~1.0.4", - "nopt": "~3.0.6", - "rimraf": "~3.0.2" - }, - "dependencies": { - "grunt-cli": { - "version": "1.4.3", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.4.3.tgz", - "integrity": "sha512-9Dtx/AhVeB4LYzsViCjUQkd0Kw0McN2gYpdmGYKtE2a5Yt7v1Q+HYZVWhqXc/kGnxlMtqKDxSwotiGeFmkrCoQ==", - "dev": true, - "requires": { - "grunt-known-options": "~2.0.0", - "interpret": "~1.1.0", - "liftup": "~3.0.1", - "nopt": "~4.0.1", - "v8flags": "~3.2.0" - }, - "dependencies": { - "nopt": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-4.0.3.tgz", - "integrity": "sha512-CvaGwVMztSMJLOeXPrez7fyfObdZqNUK1cPAEzLHrTybIua9pMdmmPR5YwtfNftIOMv3DPUhFaxsZMNTQO20Kg==", - "dev": true, - "requires": { - "abbrev": "1", - "osenv": "^0.1.4" - } - } - } - } - } - }, - "grunt-cli": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/grunt-cli/-/grunt-cli-1.2.0.tgz", - "integrity": "sha512-8oM6ZAe4yG8Y7co/Ejc9613AixyN+gdCADyAFvJ1BbHGvrNa0ltaqrEWXV9P/W0gbQbAh3C8swJIaDuAX7syiw==", - "dev": true, - "requires": { - "findup-sync": "~0.3.0", - "grunt-known-options": "~1.1.0", - "nopt": "~3.0.6", - "resolve": "~1.1.0" - }, - "dependencies": { - "grunt-known-options": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-1.1.1.tgz", - "integrity": "sha512-cHwsLqoighpu7TuYj5RonnEuxGVFnztcUqTqp5rXFGYL4OuPFofwC4Ycg7n9fYwvK6F5WbYgeVOwph9Crs2fsQ==", - "dev": true - } - } - }, - "grunt-contrib-connect": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/grunt-contrib-connect/-/grunt-contrib-connect-1.0.2.tgz", - "integrity": "sha512-7OPoyfGrpOYzuiRPzGyzWDe/xFcjttXe1ztVSFS8TAVBtpfXeeOV9RiwuyqA4yN1UeOG2Pnpx8s0DcUDAu21Gw==", - "dev": true, - "requires": { - "async": "^1.5.2", - "connect": "^3.4.0", - "connect-livereload": "^0.5.0", - "http2": "^3.3.4", - "morgan": "^1.6.1", - "opn": "^4.0.0", - "portscanner": "^1.0.0", - "serve-index": "^1.7.1", - "serve-static": "^1.10.0" - } - }, - "grunt-contrib-jshint": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-jshint/-/grunt-contrib-jshint-3.2.0.tgz", - "integrity": "sha512-pcXWCSZWfoMSvcV4BwH21TUtLtcX0Ms8IGuOPIcLeXK3fud9KclY7iqMKY94jFx8TxZzh028YYtpR+io8DiEaQ==", - "dev": true, - "requires": { - "chalk": "~4.1.2", - "hooker": "^0.2.3", - "jshint": "~2.13.4" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "grunt-contrib-uglify": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/grunt-contrib-uglify/-/grunt-contrib-uglify-3.1.0.tgz", - "integrity": "sha512-4Dx6HOI4ipP4wOqHZEGYYLmBGMccfS6XAI8OOBCiLhLEN54CtxVdCYgT83dPdhxLpXFhNpG89frRjfqcos4H5w==", - "dev": true, - "requires": { - "chalk": "^1.0.0", - "maxmin": "^1.1.0", - "uglify-js": "~3.0.4", - "uri-path": "^1.0.0" - } - }, - "grunt-known-options": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/grunt-known-options/-/grunt-known-options-2.0.0.tgz", - "integrity": "sha512-GD7cTz0I4SAede1/+pAbmJRG44zFLPipVtdL9o3vqx9IEyb7b4/Y3s7r6ofI3CchR5GvYJ+8buCSioDv5dQLiA==", - "dev": true - }, - "grunt-legacy-log": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log/-/grunt-legacy-log-3.0.0.tgz", - "integrity": "sha512-GHZQzZmhyq0u3hr7aHW4qUH0xDzwp2YXldLPZTCjlOeGscAOWWPftZG3XioW8MasGp+OBRIu39LFx14SLjXRcA==", - "dev": true, - "requires": { - "colors": "~1.1.2", - "grunt-legacy-log-utils": "~2.1.0", - "hooker": "~0.2.3", - "lodash": "~4.17.19" - } - }, - "grunt-legacy-log-utils": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/grunt-legacy-log-utils/-/grunt-legacy-log-utils-2.1.0.tgz", - "integrity": "sha512-lwquaPXJtKQk0rUM1IQAop5noEpwFqOXasVoedLeNzaibf/OPWjKYvvdqnEHNmU+0T0CaReAXIbGo747ZD+Aaw==", - "dev": true, - "requires": { - "chalk": "~4.1.0", - "lodash": "~4.17.19" - }, - "dependencies": { - "ansi-styles": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", - "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", - "dev": true, - "requires": { - "color-convert": "^2.0.1" - } - }, - "chalk": { - "version": "4.1.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", - "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", - "dev": true, - "requires": { - "ansi-styles": "^4.1.0", - "supports-color": "^7.1.0" - } - }, - "supports-color": { - "version": "7.2.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", - "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", - "dev": true, - "requires": { - "has-flag": "^4.0.0" - } - } - } - }, - "grunt-legacy-util": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/grunt-legacy-util/-/grunt-legacy-util-2.0.1.tgz", - "integrity": "sha512-2bQiD4fzXqX8rhNdXkAywCadeqiPiay0oQny77wA2F3WF4grPJXCvAcyoWUJV+po/b15glGkxuSiQCK299UC2w==", - "dev": true, - "requires": { - "async": "~3.2.0", - "exit": "~0.1.2", - "getobject": "~1.0.0", - "hooker": "~0.2.3", - "lodash": "~4.17.21", - "underscore.string": "~3.3.5", - "which": "~2.0.2" - }, - "dependencies": { - "async": { - "version": "3.2.4", - "resolved": "https://registry.npmjs.org/async/-/async-3.2.4.tgz", - "integrity": "sha512-iAB+JbDEGXhyIUavoDl9WP/Jj106Kz9DEn1DPgYw5ruDn0e3Wgi3sKFm55sASdGBNOQB8F59d9qQ7deqrHA8wQ==", - "dev": true - } - } - }, - "grunt-mocha-phantomjs": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/grunt-mocha-phantomjs/-/grunt-mocha-phantomjs-4.0.0.tgz", - "integrity": "sha512-yYChubnh9MRcSx82vW9BhBcfyPUanfEzGA91LFbXvppHV6gIXYxugja2V2Awo6LCmrp26w6lVqYdkbZ3GO2gcw==", - "dev": true, - "requires": { - "async": "^1.5.2", - "mocha-phantomjs-core": "^1.3.0", - "object-assign": "^4.1.0", - "phantomjs-prebuilt": "^2.1.3" - } - }, - "grunt-rollup": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/grunt-rollup/-/grunt-rollup-6.0.0.tgz", - "integrity": "sha512-nICpGA4CbgNtvdNMNPoytV+Fa9MJuhRSVk4Odfcw7v6lrJmfZw4iJniNBeZrYkW09gT7qADylIivJaVqzF4fmA==", - "dev": true, - "requires": { - "rollup": "0.50.0" - }, - "dependencies": { - "rollup": { - "version": "0.50.0", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.50.0.tgz", - "integrity": "sha512-7RqCBQ9iwsOBPkjYgoIaeUij606mSkDMExP0NT7QDI3bqkHYQHrQ83uoNIXwPcQm/vP2VbsUz3kiyZZ1qPlLTQ==", - "dev": true - } - } - }, - "gzip-size": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/gzip-size/-/gzip-size-1.0.0.tgz", - "integrity": "sha512-mu66twX6zg8WB6IPfUtrquS7fjwGnDJ7kdVcggd5rpjwBItQKjHtvhu6VcQMkqPYAR7DjWpEaN3xiBSNmxvzPg==", - "dev": true, - "requires": { - "browserify-zlib": "^0.1.4", - "concat-stream": "^1.4.1" - } - }, - "handlebars": { - "version": "4.7.7", - "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", - "integrity": "sha512-aAcXm5OAfE/8IXkcZvCepKU3VzW1/39Fb5ZuqMtgI/hT8X2YgoMvBY5dLhq/cpOvw7Lk1nK/UF71aLG/ZnVYRA==", - "dev": true, - "requires": { - "minimist": "^1.2.5", - "neo-async": "^2.6.0", - "source-map": "^0.6.1", - "uglify-js": "^3.1.4", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "source-map": { - "version": "0.6.1", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", - "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", - "dev": true - }, - "uglify-js": { - "version": "3.17.4", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.17.4.tgz", - "integrity": "sha512-T9q82TJI9e/C1TAxYvfb16xO120tMVFZrGA3f9/P4424DNu6ypK103y0GPFVa17yotwSyZW5iYXgjYHkGrJW/g==", - "dev": true, - "optional": true - } - } - }, - "har-schema": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/har-schema/-/har-schema-2.0.0.tgz", - "integrity": "sha512-Oqluz6zhGX8cyRaTQlFMPw80bSJVG2x/cFb8ZPhUILGgHka9SsokCCOQgpveePerqidZOrT14ipqfJb7ILcW5Q==", - "dev": true - }, - "har-validator": { - "version": "5.1.5", - "resolved": "https://registry.npmjs.org/har-validator/-/har-validator-5.1.5.tgz", - "integrity": "sha512-nmT2T0lljbxdQZfspsno9hgrG3Uir6Ks5afism62poxqBM6sDnMEuPmzTq8XN0OEwqKLLdh1jQI3qyE66Nzb3w==", - "dev": true, - "requires": { - "ajv": "^6.12.3", - "har-schema": "^2.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-ansi": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-ansi/-/has-ansi-2.0.0.tgz", - "integrity": "sha512-C8vBJ8DwUCx19vhm7urhTuUsr4/IyP6l4VzNQDv+ryHQObW3TTTp9yB68WpYgRe2bbaGuZ/se74IqFeVnMnLZg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "has-flag": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", - "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", - "dev": true - }, - "hasha": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/hasha/-/hasha-2.2.0.tgz", - "integrity": "sha512-jZ38TU/EBiGKrmyTNNZgnvCZHNowiRI4+w/I9noMlekHTZH3KyGgvJLmhSgykeAQ9j2SYPDosM0Bg3wHfzibAQ==", - "dev": true, - "requires": { - "is-stream": "^1.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "he": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/he/-/he-1.1.1.tgz", - "integrity": "sha512-z/GDPjlRMNOa2XJiB4em8wJpuuBfrFOlYKTZxtpkdr1uPdibHI8rYA3MY0KDObpVyaes0e/aunid/t88ZI2EKA==", - "dev": true - }, - "homedir-polyfill": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", - "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", - "dev": true, - "requires": { - "parse-passwd": "^1.0.0" - } - }, - "hooker": { - "version": "0.2.3", - "resolved": "https://registry.npmjs.org/hooker/-/hooker-0.2.3.tgz", - "integrity": "sha512-t+UerCsQviSymAInD01Pw+Dn/usmz1sRO+3Zk1+lx8eg+WKpD2ulcwWqHHL0+aseRBr+3+vIhiG1K1JTwaIcTA==", - "dev": true - }, - "hosted-git-info": { - "version": "2.8.9", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.9.tgz", - "integrity": "sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==", - "dev": true - }, - "htmlparser2": { - "version": "3.8.3", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-3.8.3.tgz", - "integrity": "sha512-hBxEg3CYXe+rPIua8ETe7tmG3XDn9B0edOE/e9wH2nLczxzgdu0m0aNHY+5wFZiviLWLdANPJTssa92dMcXQ5Q==", - "dev": true, - "requires": { - "domelementtype": "1", - "domhandler": "2.3", - "domutils": "1.5", - "entities": "1.0", - "readable-stream": "1.1" - } - }, - "http-errors": { - "version": "1.6.3", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-1.6.3.tgz", - "integrity": "sha512-lks+lVC8dgGyh97jxvxeYTWQFvh4uw4yC12gVl63Cg30sjPX4wuGcdkICVXDAESr6OJGjqGA8Iz5mkeN6zlD7A==", - "dev": true, - "requires": { - "depd": "~1.1.2", - "inherits": "2.0.3", - "setprototypeof": "1.1.0", - "statuses": ">= 1.4.0 < 2" - }, - "dependencies": { - "depd": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/depd/-/depd-1.1.2.tgz", - "integrity": "sha512-7emPTl6Dpo6JRXOXjLRxck+FlLRX5847cLKEn00PLAgc3g2hTZZgr+e4c2v6QpSmLeFP3n5yUo7ft6avBK/5jQ==", - "dev": true - }, - "inherits": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", - "integrity": "sha512-x00IRNXNy63jwGkJmzPigoySHbaqpNuzKbBOmzK+g2OdZpQ9w+sxCN+VSB3ja7IAge2OP2qpfxTjeNcyjmW1uw==", - "dev": true - } - } - }, - "http-signature": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/http-signature/-/http-signature-1.2.0.tgz", - "integrity": "sha512-CAbnr6Rz4CYQkLYUtSNXxQPUH2gK8f3iWexVlsnMeD+GjlsQ0Xsy1cOX+mN3dtxYomRy21CiOzU8Uhw6OwncEQ==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "jsprim": "^1.2.2", - "sshpk": "^1.7.0" - } - }, - "http2": { - "version": "3.3.7", - "resolved": "https://registry.npmjs.org/http2/-/http2-3.3.7.tgz", - "integrity": "sha512-puSi8M8WNlFJm9Pk4c/Mbz9Gwparuj3gO9/RRO5zv6piQ0FY+9Qywp0PdWshYgsMJSalixFY7eC6oPu0zRxLAQ==", - "dev": true - }, - "iconv-lite": { - "version": "0.4.24", - "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", - "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", - "dev": true, - "requires": { - "safer-buffer": ">= 2.1.2 < 3" - } - }, - "indent-string": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-2.1.0.tgz", - "integrity": "sha512-aqwDFWSgSgfRaEwao5lg5KEcVd/2a+D1rvoG7NdilmYz0NwRk6StWpWdz/Hpk34MKPpx7s8XxUqimfcQK6gGlg==", - "dev": true, - "requires": { - "repeating": "^2.0.0" - } - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "interpret": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.1.0.tgz", - "integrity": "sha512-CLM8SNMDu7C5psFCn6Wg/tgpj/bKAg7hc2gWqcuR9OD5Ft9PhBpIu8PLicPeis+xDd6YX2ncI8MCA64I9tftIA==", - "dev": true - }, - "is-absolute": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", - "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", - "dev": true, - "requires": { - "is-relative": "^1.0.0", - "is-windows": "^1.0.1" - } - }, - "is-arrayish": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", - "integrity": "sha512-zz06S8t0ozoDXMG+ube26zeCTNXcKIPJZJi8hBrF4idCLms4CG9QtK7qBl1boi5ODzFpjswb5JPmHCbMpjaYzg==", - "dev": true - }, - "is-core-module": { - "version": "2.11.0", - "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.11.0.tgz", - "integrity": "sha512-RRjxlvLDkD1YJwDbroBHMb+cukurkDWNyHx7D3oNB5x9rb5ogcksMC5wHCadcXoo67gVr/+3GFySh3134zi6rw==", - "dev": true, - "requires": { - "has": "^1.0.3" - } - }, - "is-extglob": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", - "integrity": "sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==", - "dev": true - }, - "is-finite": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-finite/-/is-finite-1.1.0.tgz", - "integrity": "sha512-cdyMtqX/BOqqNBBiKlIVkytNHm49MtMlYyn1zxzvJKWmFMlGzm+ry5BBfYyeY9YmNKbRSo/o7OX9w9ale0wg3w==", - "dev": true - }, - "is-glob": { - "version": "4.0.3", - "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.3.tgz", - "integrity": "sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg==", - "dev": true, - "requires": { - "is-extglob": "^2.1.1" - } - }, - "is-module": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-module/-/is-module-1.0.0.tgz", - "integrity": "sha512-51ypPSPCoTEIN9dy5Oy+h4pShgJmPCygKfyRCISBI+JoWT/2oJvK8QPxmwv7b/p239jXrm9M1mlQbyKJ5A152g==", - "dev": true - }, - "is-number": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", - "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", - "dev": true - }, - "is-plain-object": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", - "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "is-relative": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", - "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", - "dev": true, - "requires": { - "is-unc-path": "^1.0.0" - } - }, - "is-stream": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", - "integrity": "sha512-uQPm8kcs47jx38atAcWTVxyltQYoPT68y9aWYdV6yWXSyW8mzSat0TL6CiWdZeCdF3KrAvpVtnHbTv4RN+rqdQ==", - "dev": true - }, - "is-typedarray": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-typedarray/-/is-typedarray-1.0.0.tgz", - "integrity": "sha512-cyA56iCMHAh5CdzjJIa4aohJyeO1YbwLi3Jc35MmRU6poroFjIGZzUzupGiRPOjgHg9TLu43xbpwXk523fMxKA==", - "dev": true - }, - "is-unc-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", - "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", - "dev": true, - "requires": { - "unc-path-regex": "^0.1.2" - } - }, - "is-utf8": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", - "integrity": "sha512-rMYPYvCzsXywIsldgLaSoPlw5PfoB/ssr7hY4pLfcodrA5M/eArza1a9VmTiNIBNMjOGr1Ow9mTyU2o69U6U9Q==", - "dev": true - }, - "is-windows": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", - "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", - "dev": true - }, - "isarray": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", - "integrity": "sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==", - "dev": true - }, - "isexe": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", - "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==", - "dev": true - }, - "isobject": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", - "integrity": "sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==", - "dev": true - }, - "isstream": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/isstream/-/isstream-0.1.2.tgz", - "integrity": "sha512-Yljz7ffyPbrLpLngrMtZ7NduUgVvi6wG9RJ9IUcyCd59YQ911PBJphODUcbOVbqYfxe1wuYf/LJ8PauMRwsM/g==", - "dev": true - }, - "istanbul": { - "version": "0.4.5", - "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", - "integrity": "sha512-nMtdn4hvK0HjUlzr1DrKSUY8ychprt8dzHOgY2KXsIhHu5PuQQEOTM27gV9Xblyon7aUH/TSFIjRHEODF/FRPg==", - "dev": true, - "requires": { - "abbrev": "1.0.x", - "async": "1.x", - "escodegen": "1.8.x", - "esprima": "2.7.x", - "glob": "^5.0.15", - "handlebars": "^4.0.1", - "js-yaml": "3.x", - "mkdirp": "0.5.x", - "nopt": "3.x", - "once": "1.x", - "resolve": "1.1.x", - "supports-color": "^3.1.0", - "which": "^1.1.1", - "wordwrap": "^1.0.0" - }, - "dependencies": { - "glob": { - "version": "5.0.15", - "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", - "integrity": "sha512-c9IPMazfRITpmAAKi22dK1VKxGDX9ehhqfABDriL/lzO92xcUKEJPQHrVA/2YHSNFB4iFlykVmWvwo48nr3OxA==", - "dev": true, - "requires": { - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "2 || 3", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", - "integrity": "sha512-DyYHfIYwAJmjAjSSPKANxI8bFY9YtFrgkAfinBojQ8YJTOuOuav64tMUJv584SES4xl74PmuaevIyaLESHdTAA==", - "dev": true - }, - "mkdirp": { - "version": "0.5.6", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.6.tgz", - "integrity": "sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==", - "dev": true, - "requires": { - "minimist": "^1.2.6" - } - }, - "supports-color": { - "version": "3.2.3", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", - "integrity": "sha512-Jds2VIYDrlp5ui7t8abHN2bjAu4LV/q4N2KivFPpGH0lrka0BMq/33AmECUXlKPcHigkNaqfXRENFju+rlcy+A==", - "dev": true, - "requires": { - "has-flag": "^1.0.0" - } - }, - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "js-yaml": { - "version": "3.14.1", - "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.1.tgz", - "integrity": "sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==", - "dev": true, - "requires": { - "argparse": "^1.0.7", - "esprima": "^4.0.0" - }, - "dependencies": { - "esprima": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", - "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", - "dev": true - } - } - }, - "jsbn": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", - "integrity": "sha512-UVU9dibq2JcFWxQPA6KCqj5O42VOmAY3zQUfEKxU0KpTGXwNoCjkX1e13eHNvw/xPynt6pU0rZ1htjWTNTSXsg==", - "dev": true - }, - "jshint": { - "version": "2.13.6", - "resolved": "https://registry.npmjs.org/jshint/-/jshint-2.13.6.tgz", - "integrity": "sha512-IVdB4G0NTTeQZrBoM8C5JFVLjV2KtZ9APgybDA1MK73xb09qFs0jCXyQLnCOp1cSZZZbvhq/6mfXHUTaDkffuQ==", - "dev": true, - "requires": { - "cli": "~1.0.0", - "console-browserify": "1.1.x", - "exit": "0.1.x", - "htmlparser2": "3.8.x", - "lodash": "~4.17.21", - "minimatch": "~3.0.2", - "strip-json-comments": "1.0.x" - } - }, - "json-schema": { - "version": "0.4.0", - "resolved": "https://registry.npmjs.org/json-schema/-/json-schema-0.4.0.tgz", - "integrity": "sha512-es94M3nTIfsEPisRafak+HDLfHXnKBhV3vU5eqPcS3flIWqcxJWgXHXiey3YrpaNsanY5ei1VoYEbOzijuq9BA==", - "dev": true - }, - "json-schema-traverse": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", - "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", - "dev": true - }, - "json-stringify-safe": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz", - "integrity": "sha512-ZClg6AaYvamvYEE82d3Iyd3vSSIjQ+odgjaTzRuO3s7toCdFKczob2i0zCh7JE8kWn17yvAWhUVxvqGwUalsRA==", - "dev": true - }, - "jsonfile": { - "version": "2.4.0", - "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-2.4.0.tgz", - "integrity": "sha512-PKllAqbgLgxHaj8TElYymKCAgrASebJrWpTnEkOaTowt23VKXXN0sUeriJ+eh7y6ufb/CC5ap11pz71/cM0hUw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.6" - } - }, - "jsprim": { - "version": "1.4.2", - "resolved": "https://registry.npmjs.org/jsprim/-/jsprim-1.4.2.tgz", - "integrity": "sha512-P2bSOMAc/ciLz6DzgjVlGJP9+BrJWu5UDGK70C2iweC5QBIeFf0ZXRvGjEj2uYgrY2MkAAhsSWHDWlFtEroZWw==", - "dev": true, - "requires": { - "assert-plus": "1.0.0", - "extsprintf": "1.3.0", - "json-schema": "0.4.0", - "verror": "1.10.0" - } - }, - "kew": { - "version": "0.7.0", - "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", - "integrity": "sha512-IG6nm0+QtAMdXt9KvbgbGdvY50RSrw+U4sGZg+KlrSKPJEwVE5JVoI3d7RWfSMdBQneRheeAOj3lIjX5VL/9RQ==", - "dev": true - }, - "kind-of": { - "version": "6.0.3", - "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", - "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", - "dev": true - }, - "klaw": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/klaw/-/klaw-1.3.1.tgz", - "integrity": "sha512-TED5xi9gGQjGpNnvRWknrwAB1eL5GciPfVFOt3Vk1OJCVDQbzuSfrF3hkUQKlsgKrG1F+0t5W0m+Fje1jIt8rw==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.9" - } - }, - "levn": { - "version": "0.3.0", - "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", - "integrity": "sha512-0OO4y2iOHix2W6ujICbKIaEQXvFQHue65vUG3pb5EUomzPI90z9hsA1VsO/dbIIpC53J8gxM9Q4Oho0jrCM/yA==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2" - } - }, - "liftup": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/liftup/-/liftup-3.0.1.tgz", - "integrity": "sha512-yRHaiQDizWSzoXk3APcA71eOI/UuhEkNN9DiW2Tt44mhYzX4joFoCZlxsSOF7RyeLlfqzFLQI1ngFq3ggMPhOw==", - "dev": true, - "requires": { - "extend": "^3.0.2", - "findup-sync": "^4.0.0", - "fined": "^1.2.0", - "flagged-respawn": "^1.0.1", - "is-plain-object": "^2.0.4", - "object.map": "^1.0.1", - "rechoir": "^0.7.0", - "resolve": "^1.19.0" - }, - "dependencies": { - "findup-sync": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-4.0.0.tgz", - "integrity": "sha512-6jvvn/12IC4quLBL1KNokxC7wWTvYncaVUYSoxWw7YykPLuRrnv4qdHcSOywOI5RpkOVGeQRtWM8/q+G6W6qfQ==", - "dev": true, - "requires": { - "detect-file": "^1.0.0", - "is-glob": "^4.0.0", - "micromatch": "^4.0.2", - "resolve-dir": "^1.0.1" - } - }, - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - } - } - }, - "load-json-file": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", - "integrity": "sha512-cy7ZdNRXdablkXYNI049pthVeXFurRyb9+hA/dZzerZ0pGTx42z+y+ssxBaVV2l70t1muq5IdKhn4UtcoGUY9A==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "parse-json": "^2.2.0", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0", - "strip-bom": "^2.0.0" - } - }, - "lodash": { - "version": "4.17.21", - "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz", - "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg==", - "dev": true - }, - "loud-rejection": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/loud-rejection/-/loud-rejection-1.6.0.tgz", - "integrity": "sha512-RPNliZOFkqFumDhvYqOaNY4Uz9oJM2K9tC6JWsJJsNdhuONW4LQHRBpb0qf4pJApVffI5N39SwzWZJuEhfd7eQ==", - "dev": true, - "requires": { - "currently-unhandled": "^0.4.1", - "signal-exit": "^3.0.0" - } - }, - "magic-string": { - "version": "0.25.9", - "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", - "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", - "dev": true, - "requires": { - "sourcemap-codec": "^1.4.8" - } - }, - "make-iterator": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", - "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", - "dev": true, - "requires": { - "kind-of": "^6.0.2" - } - }, - "map-cache": { - "version": "0.2.2", - "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", - "integrity": "sha512-8y/eV9QQZCiyn1SprXSrCmqJN0yNRATe+PO8ztwqrvrbdRLA3eYJF0yaR0YayLWkMbsQSKWS9N2gPcGEc4UsZg==", - "dev": true - }, - "map-obj": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/map-obj/-/map-obj-1.0.1.tgz", - "integrity": "sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==", - "dev": true - }, - "maxmin": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/maxmin/-/maxmin-1.1.0.tgz", - "integrity": "sha512-jypoV6wTPuz/ngkc2sDZnFvpvx14QICNKS/jK9RbkmiQQJZ4JWstIszA8iT/z9tPSF/vXQ5qtG0h65N9tiLIKA==", - "dev": true, - "requires": { - "chalk": "^1.0.0", - "figures": "^1.0.1", - "gzip-size": "^1.0.0", - "pretty-bytes": "^1.0.0" - } - }, - "meow": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/meow/-/meow-3.7.0.tgz", - "integrity": "sha512-TNdwZs0skRlpPpCUK25StC4VH+tP5GgeY1HQOOGP+lQ2xtdkN2VtT/5tiX9k3IWpkBPV9b3LsAWXn4GGi/PrSA==", - "dev": true, - "requires": { - "camelcase-keys": "^2.0.0", - "decamelize": "^1.1.2", - "loud-rejection": "^1.0.0", - "map-obj": "^1.0.1", - "minimist": "^1.1.3", - "normalize-package-data": "^2.3.4", - "object-assign": "^4.0.1", - "read-pkg-up": "^1.0.1", - "redent": "^1.0.0", - "trim-newlines": "^1.0.0" - } - }, - "mgrs": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/mgrs/-/mgrs-1.0.0.tgz", - "integrity": "sha512-awNbTOqCxK1DBGjalK3xqWIstBZgN6fxsMSiXLs9/spqWkF2pAhb2rrYCFSsr1/tT7PhcDGjZndG8SWYn0byYA==" - }, - "micromatch": { - "version": "4.0.5", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.5.tgz", - "integrity": "sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==", - "dev": true, - "requires": { - "braces": "^3.0.2", - "picomatch": "^2.3.1" - } - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mime-db": { - "version": "1.52.0", - "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz", - "integrity": "sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==", - "dev": true - }, - "mime-types": { - "version": "2.1.35", - "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz", - "integrity": "sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw==", - "dev": true, - "requires": { - "mime-db": "1.52.0" - } - }, - "minimatch": { - "version": "3.0.8", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.8.tgz", - "integrity": "sha512-6FsRAQsxQ61mw+qP1ZzbL9Bc78x2p5OqNgNpnoAFLTrX8n5Kxph0CsnhmKKNXTWjXqU5L0pGPR7hYk+XWZr60Q==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true - }, - "mkdirp": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", - "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", - "dev": true - }, - "mocha": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/mocha/-/mocha-4.0.1.tgz", - "integrity": "sha512-evDmhkoA+cBNiQQQdSKZa2b9+W2mpLoj50367lhy+Klnx9OV8XlCIhigUnn1gaTFLQCa0kdNhEGDr0hCXOQFDw==", - "dev": true, - "requires": { - "browser-stdout": "1.3.0", - "commander": "2.11.0", - "debug": "3.1.0", - "diff": "3.3.1", - "escape-string-regexp": "1.0.5", - "glob": "7.1.2", - "growl": "1.10.3", - "he": "1.1.1", - "mkdirp": "0.5.1", - "supports-color": "4.4.0" - }, - "dependencies": { - "debug": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/debug/-/debug-3.1.0.tgz", - "integrity": "sha512-OX8XqP7/1a9cqkxYw2yXss15f26NKWBpDXQd0/uK/KPqdQhxbPa994hnzjcE2VqQpDslf55723cKPUOGSmMY3g==", - "dev": true, - "requires": { - "ms": "2.0.0" - } - }, - "glob": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.2.tgz", - "integrity": "sha512-MJTUg1kjuLeQCJ+ccE4Vpa6kKVXkPYJ2mOCQyUuKLcLQsdrMCpBPUi8qVE6+YuaJkozeA9NusTAw3hLr8Xe5EQ==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.0.4", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has-flag": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-2.0.0.tgz", - "integrity": "sha512-P+1n3MnwjR/Epg9BBo1KT8qbye2g2Ou4sFumihwt6I4tsUX7jnLcX4BTOSKg/B1ZrIYMN9FcEnG4x5a7NB8Eng==", - "dev": true - }, - "minimist": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-0.0.8.tgz", - "integrity": "sha512-miQKw5Hv4NS1Psg2517mV4e4dYNaO3++hjAvLOAzKqZ61rH8NS1SK+vbfBWZ5PY/Me/bEWhUwqMghEW5Fb9T7Q==", - "dev": true - }, - "mkdirp": { - "version": "0.5.1", - "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.1.tgz", - "integrity": "sha512-SknJC52obPfGQPnjIkXbmA6+5H15E+fR+E4iR2oQ3zzCLbd7/ONua69R/Gw7AgkTLsRG+r5fzksYwWe1AgTyWA==", - "dev": true, - "requires": { - "minimist": "0.0.8" - } - }, - "supports-color": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-4.4.0.tgz", - "integrity": "sha512-rKC3+DyXWgK0ZLKwmRsrkyHVZAjNkfzeehuFWdGGcqGDTZFH73+RH6S/RDAAxl9GusSjZSUWYLmT9N5pzXFOXQ==", - "dev": true, - "requires": { - "has-flag": "^2.0.0" - } - } - } - }, - "mocha-phantomjs-core": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/mocha-phantomjs-core/-/mocha-phantomjs-core-1.3.1.tgz", - "integrity": "sha512-Jz/3d3WnZw3A5kygxiRsPkNpSK8p5ki20oCjtLlVq8SZAaXKisbH/HOCeuK8lkSJf4hHEoPZkzU/5yxVuf1AIg==", - "dev": true - }, - "morgan": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/morgan/-/morgan-1.10.0.tgz", - "integrity": "sha512-AbegBVI4sh6El+1gNwvD5YIck7nSA36weD7xvIxG4in80j/UoK8AEGaWnnz8v1GxonMCltmlNs5ZKbGvl9b1XQ==", - "dev": true, - "requires": { - "basic-auth": "~2.0.1", - "debug": "2.6.9", - "depd": "~2.0.0", - "on-finished": "~2.3.0", - "on-headers": "~1.0.2" - } - }, - "ms": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", - "integrity": "sha512-Tpp60P6IUJDTuOq/5Z8cdskzJujfwqfOTkrwIwj7IRISpnkJnT6SyJ4PCPnGMoFjC9ddhal5KVIYtAt97ix05A==", - "dev": true - }, - "negotiator": { - "version": "0.6.3", - "resolved": "https://registry.npmjs.org/negotiator/-/negotiator-0.6.3.tgz", - "integrity": "sha512-+EUsqGPLsM+j/zdChZjsnX51g4XrHFOIXwfnCVPGlQk/k5giakcKsuxCObBRu6DSm9opw/O6slWbJdghQM4bBg==", - "dev": true - }, - "neo-async": { - "version": "2.6.2", - "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", - "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", - "dev": true - }, - "nopt": { - "version": "3.0.6", - "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", - "integrity": "sha512-4GUt3kSEYmk4ITxzB/b9vaIDfUVWN/Ml1Fwl11IlnIG2iaJ9O6WXZ9SrYM9NLI8OCBieN2Y8SWC2oJV0RQ7qYg==", - "dev": true, - "requires": { - "abbrev": "1" - } - }, - "normalize-package-data": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", - "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", - "dev": true, - "requires": { - "hosted-git-info": "^2.1.4", - "resolve": "^1.10.0", - "semver": "2 || 3 || 4 || 5", - "validate-npm-package-license": "^3.0.1" - }, - "dependencies": { - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - } - } - }, - "oauth-sign": { - "version": "0.9.0", - "resolved": "https://registry.npmjs.org/oauth-sign/-/oauth-sign-0.9.0.tgz", - "integrity": "sha512-fexhUFFPTGV8ybAtSIGbV6gOkSv8UtRbDBnAyLQw4QPKkgNlsH2ByPGtMUqdWkos6YCRmAqViwgZrJc/mRDzZQ==", - "dev": true - }, - "object-assign": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", - "integrity": "sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==", - "dev": true - }, - "object.defaults": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", - "integrity": "sha512-c/K0mw/F11k4dEUBMW8naXUuBuhxRCfG7W+yFy8EcijU/rSmazOUd1XAEEe6bC0OuXY4HUKjTJv7xbxIMqdxrA==", - "dev": true, - "requires": { - "array-each": "^1.0.1", - "array-slice": "^1.0.0", - "for-own": "^1.0.0", - "isobject": "^3.0.0" - } - }, - "object.map": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", - "integrity": "sha512-3+mAJu2PLfnSVGHwIWubpOFLscJANBKuB/6A4CxBstc4aqwQY0FWcsppuy4jU5GSB95yES5JHSI+33AWuS4k6w==", - "dev": true, - "requires": { - "for-own": "^1.0.0", - "make-iterator": "^1.0.0" - } - }, - "object.pick": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", - "integrity": "sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==", - "dev": true, - "requires": { - "isobject": "^3.0.1" - } - }, - "on-finished": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.3.0.tgz", - "integrity": "sha512-ikqdkGAAyf/X/gPhXGvfgAytDZtDbr+bkNUJ0N9h5MI/dmdgCs3l6hoHrcUv41sRKew3jIwrp4qQDXiK99Utww==", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "on-headers": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/on-headers/-/on-headers-1.0.2.tgz", - "integrity": "sha512-pZAE+FJLoyITytdqK0U5s+FIpjN0JP3OzFi/u8Rx+EV5/W+JTWGXG8xFzevE7AjBfDqHv/8vL8qQsIhHnqRkrA==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "opn": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/opn/-/opn-4.0.2.tgz", - "integrity": "sha512-iPBWbPP4OEOzR1xfhpGLDh+ypKBOygunZhM9jBtA7FS5sKjEiMZw0EFb82hnDOmTZX90ZWLoZKUza4cVt8MexA==", - "dev": true, - "requires": { - "object-assign": "^4.0.1", - "pinkie-promise": "^2.0.0" - } - }, - "optionator": { - "version": "0.8.3", - "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", - "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", - "dev": true, - "requires": { - "deep-is": "~0.1.3", - "fast-levenshtein": "~2.0.6", - "levn": "~0.3.0", - "prelude-ls": "~1.1.2", - "type-check": "~0.3.2", - "word-wrap": "~1.2.3" - } - }, - "os-homedir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-homedir/-/os-homedir-1.0.2.tgz", - "integrity": "sha512-B5JU3cabzk8c67mRRd3ECmROafjYMXbuzlwtqdM8IbS8ktlTix8aFGb2bAGKrSRIlnfKwovGUUr72JUPyOb6kQ==", - "dev": true - }, - "os-tmpdir": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", - "integrity": "sha512-D2FR03Vir7FIu45XBY20mTb+/ZSWB00sjU9jdQXt83gDrI4Ztz5Fs7/yy74g2N5SVQY4xY1qDr4rNddwYRVX0g==", - "dev": true - }, - "osenv": { - "version": "0.1.5", - "resolved": "https://registry.npmjs.org/osenv/-/osenv-0.1.5.tgz", - "integrity": "sha512-0CWcCECdMVc2Rw3U5w9ZjqX6ga6ubk1xDVKxtBQPK7wis/0F2r9T6k4ydGYhecl7YUBxBVxhL5oisPsNxAPe2g==", - "dev": true, - "requires": { - "os-homedir": "^1.0.0", - "os-tmpdir": "^1.0.0" - } - }, - "pako": { - "version": "0.2.9", - "resolved": "https://registry.npmjs.org/pako/-/pako-0.2.9.tgz", - "integrity": "sha512-NUcwaKxUxWrZLpDG+z/xZaCgQITkA/Dv4V/T6bw7VON6l1Xz/VnrBqrYjZQ12TamKHzITTfOEIYUj48y2KXImA==", - "dev": true - }, - "parse-filepath": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", - "integrity": "sha512-FwdRXKCohSVeXqwtYonZTXtbGJKrn+HNyWDYVcp5yuJlesTwNH4rsmRZ+GrKAPJ5bLpRxESMeS+Rl0VCHRvB2Q==", - "dev": true, - "requires": { - "is-absolute": "^1.0.0", - "map-cache": "^0.2.0", - "path-root": "^0.1.1" - } - }, - "parse-json": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", - "integrity": "sha512-QR/GGaKCkhwk1ePQNYDRKYZ3mwU9ypsKhB0XyFnLQdomyEqk3e8wpW3V5Jp88zbxK4n5ST1nqo+g9juTpownhQ==", - "dev": true, - "requires": { - "error-ex": "^1.2.0" - } - }, - "parse-passwd": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", - "integrity": "sha512-1Y1A//QUXEZK7YKz+rD9WydcE1+EuPr6ZBgKecAB8tmoW6UFv0NREVJe1p+jRxtThkcbbKkfwIbWJe/IeE6m2Q==", - "dev": true - }, - "parseurl": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/parseurl/-/parseurl-1.3.3.tgz", - "integrity": "sha512-CiyeOxFT/JZyN5m0z9PfXw4SCBJ6Sygz1Dpl0wqjlhDEGGBP1GnsUVEL0p63hoG1fcj3fHynXi9NYO4nWOL+qQ==", - "dev": true - }, - "path-exists": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", - "integrity": "sha512-yTltuKuhtNeFJKa1PiRzfLAU5182q1y4Eb4XCJ3PBqyzEDkAZRzBrKKBct682ls9reBVHf9udYLN5Nd+K1B9BQ==", - "dev": true, - "requires": { - "pinkie-promise": "^2.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "path-parse": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.7.tgz", - "integrity": "sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==", - "dev": true - }, - "path-root": { - "version": "0.1.1", - "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", - "integrity": "sha512-QLcPegTHF11axjfojBIoDygmS2E3Lf+8+jI6wOVmNVenrKSo3mFdSGiIgdSHenczw3wPtlVMQaFVwGmM7BJdtg==", - "dev": true, - "requires": { - "path-root-regex": "^0.1.0" - } - }, - "path-root-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", - "integrity": "sha512-4GlJ6rZDhQZFE0DPVKh0e9jmZ5egZfxTkp7bcRDuPlJXbAwhxcl2dINPUAsjLdejqaLsCeg8axcLjIbvBjN4pQ==", - "dev": true - }, - "path-type": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", - "integrity": "sha512-S4eENJz1pkiQn9Znv33Q+deTOKmbl+jj1Fl+qiP/vYezj+S8x+J3Uo0ISrx/QoEvIlOaDWJhPaRd1flJ9HXZqg==", - "dev": true, - "requires": { - "graceful-fs": "^4.1.2", - "pify": "^2.0.0", - "pinkie-promise": "^2.0.0" - } - }, - "pathval": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.1.tgz", - "integrity": "sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==", - "dev": true - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "performance-now": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz", - "integrity": "sha512-7EAHlyLHI56VEIdK57uwHdHKIaAGbnXPiw0yWbarQZOKaKpvUIgW0jWRVLiatnM+XXlSwsanIBH/hzGMJulMow==", - "dev": true - }, - "phantomjs-prebuilt": { - "version": "2.1.16", - "resolved": "https://registry.npmjs.org/phantomjs-prebuilt/-/phantomjs-prebuilt-2.1.16.tgz", - "integrity": "sha512-PIiRzBhW85xco2fuj41FmsyuYHKjKuXWmhjy3A/Y+CMpN/63TV+s9uzfVhsUwFe0G77xWtHBG8xmXf5BqEUEuQ==", - "dev": true, - "requires": { - "es6-promise": "^4.0.3", - "extract-zip": "^1.6.5", - "fs-extra": "^1.0.0", - "hasha": "^2.2.0", - "kew": "^0.7.0", - "progress": "^1.1.8", - "request": "^2.81.0", - "request-progress": "^2.0.1", - "which": "^1.2.10" - }, - "dependencies": { - "which": { - "version": "1.3.1", - "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", - "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - } - } - }, - "picomatch": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.3.1.tgz", - "integrity": "sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==", - "dev": true - }, - "pify": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", - "integrity": "sha512-udgsAY+fTnvv7kI7aaxbqwWNb0AHiB0qBO89PZKPkoTmGOgdbrHDKD+0B2X4uTfJ/FT1R09r9gTsjUjNJotuog==", - "dev": true - }, - "pinkie": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", - "integrity": "sha512-MnUuEycAemtSaeFSjXKW/aroV7akBbY+Sv+RkyqFjgAe73F+MR0TBWKBRDkmfWq/HiFmdavfZ1G7h4SPZXaCSg==", - "dev": true - }, - "pinkie-promise": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", - "integrity": "sha512-0Gni6D4UcLTbv9c57DfxDGdr41XfgUjqWZu492f0cIGr16zDU06BWP/RAEvOuo7CQ0CNjHaLlM59YJJFm3NWlw==", - "dev": true, - "requires": { - "pinkie": "^2.0.0" - } - }, - "portscanner": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/portscanner/-/portscanner-1.2.0.tgz", - "integrity": "sha512-3MCx40XO6ChNJJHw1tTFukQK/M/8FacGZK/vGbnrKpozObrJzembYtfi7ZdA2hkF2Lojg77XhsKUPvF8eHKcDA==", - "dev": true, - "requires": { - "async": "1.5.2" - } - }, - "prelude-ls": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", - "integrity": "sha512-ESF23V4SKG6lVSGZgYNpbsiaAkdab6ZgOxe52p7+Kid3W3u3bxR4Vfd/o21dmN7jSt0IwgZ4v5MUd26FEtXE9w==", - "dev": true - }, - "pretty-bytes": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/pretty-bytes/-/pretty-bytes-1.0.4.tgz", - "integrity": "sha512-LNisJvAjy+hruxp3GV4IkZZscTI34+ISfeM1hesB9V6ezIDfXYrBi9TIXVjjMcEB4QFN7tL+dFDEk4s8jMBMyA==", - "dev": true, - "requires": { - "get-stdin": "^4.0.1", - "meow": "^3.1.0" - } - }, - "process-nextick-args": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", - "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", - "dev": true - }, - "progress": { - "version": "1.1.8", - "resolved": "https://registry.npmjs.org/progress/-/progress-1.1.8.tgz", - "integrity": "sha512-UdA8mJ4weIkUBO224tIarHzuHs4HuYiJvsuGT7j/SPQiUJVjYvNDBIPa0hAorduOfjGohB/qHWRa/lrrWX/mXw==", - "dev": true - }, - "psl": { - "version": "1.9.0", - "resolved": "https://registry.npmjs.org/psl/-/psl-1.9.0.tgz", - "integrity": "sha512-E/ZsdU4HLs/68gYzgGTkMicWTLPdAftJLfJFlLUAAKZGkStNU72sZjT66SnMDVOfOWY/YAoiD7Jxa9iHvngcag==", - "dev": true - }, - "punycode": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", - "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", - "dev": true - }, - "qs": { - "version": "6.5.3", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.5.3.tgz", - "integrity": "sha512-qxXIEh4pCGfHICj1mAJQ2/2XVZkjCDTcEgfoSQxc/fYivUZxTkk7L3bDBJSoNrEzXI17oUO5Dp07ktqE5KzczA==", - "dev": true - }, - "range-parser": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/range-parser/-/range-parser-1.2.1.tgz", - "integrity": "sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==", - "dev": true - }, - "read-pkg": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", - "integrity": "sha512-7BGwRHqt4s/uVbuyoeejRn4YmFnYZiFl4AuaeXHlgZf3sONF0SOGlxs2Pw8g6hCKupo08RafIO5YXFNOKTfwsQ==", - "dev": true, - "requires": { - "load-json-file": "^1.0.0", - "normalize-package-data": "^2.3.2", - "path-type": "^1.0.0" - } - }, - "read-pkg-up": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", - "integrity": "sha512-WD9MTlNtI55IwYUS27iHh9tK3YoIVhxis8yKhLpTqWtml739uXc9NWTpxoHkfZf3+DkCCsXox94/VWZniuZm6A==", - "dev": true, - "requires": { - "find-up": "^1.0.0", - "read-pkg": "^1.0.0" - } - }, - "readable-stream": { - "version": "1.1.14", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", - "integrity": "sha512-+MeVjFf4L44XUkhM1eYbD8fyEsxcV81pqMSR5gblfcLCHfZvbrqy4/qYHE+/R5HoBUT11WV5O08Cr1n3YXkWVQ==", - "dev": true, - "requires": { - "core-util-is": "~1.0.0", - "inherits": "~2.0.1", - "isarray": "0.0.1", - "string_decoder": "~0.10.x" - } - }, - "rechoir": { - "version": "0.7.1", - "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.7.1.tgz", - "integrity": "sha512-/njmZ8s1wVeR6pjTZ+0nCnv8SpZNRMT2D1RLOJQESlYFDBvwpTA4KWJpZ+sBJ4+vhjILRcK7JIFdGCdxEAAitg==", - "dev": true, - "requires": { - "resolve": "^1.9.0" - }, - "dependencies": { - "resolve": { - "version": "1.22.1", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.22.1.tgz", - "integrity": "sha512-nBpuuYuY5jFsli/JIs1oldw6fOQCBioohqWZg/2hiaOybXOft4lonv85uDOKXdf8rhyK159cxU5cDcK/NKk8zw==", - "dev": true, - "requires": { - "is-core-module": "^2.9.0", - "path-parse": "^1.0.7", - "supports-preserve-symlinks-flag": "^1.0.0" - } - } - } - }, - "redent": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/redent/-/redent-1.0.0.tgz", - "integrity": "sha512-qtW5hKzGQZqKoh6JNSD+4lfitfPKGz42e6QwiRmPM5mmKtR0N41AbJRYu0xJi7nhOJ4WDgRkKvAk6tw4WIwR4g==", - "dev": true, - "requires": { - "indent-string": "^2.1.0", - "strip-indent": "^1.0.1" - } - }, - "repeating": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/repeating/-/repeating-2.0.1.tgz", - "integrity": "sha512-ZqtSMuVybkISo2OWvqvm7iHSWngvdaW3IpsT9/uP8v4gMi591LY6h35wdOfvQdWCKFWZWm2Y1Opp4kV7vQKT6A==", - "dev": true, - "requires": { - "is-finite": "^1.0.0" - } - }, - "request": { - "version": "2.88.2", - "resolved": "https://registry.npmjs.org/request/-/request-2.88.2.tgz", - "integrity": "sha512-MsvtOrfG9ZcrOwAW+Qi+F6HbD0CWXEh9ou77uOb7FM2WPhwT7smM833PzanhJLsgXjN89Ir6V2PczXNnMpwKhw==", - "dev": true, - "requires": { - "aws-sign2": "~0.7.0", - "aws4": "^1.8.0", - "caseless": "~0.12.0", - "combined-stream": "~1.0.6", - "extend": "~3.0.2", - "forever-agent": "~0.6.1", - "form-data": "~2.3.2", - "har-validator": "~5.1.3", - "http-signature": "~1.2.0", - "is-typedarray": "~1.0.0", - "isstream": "~0.1.2", - "json-stringify-safe": "~5.0.1", - "mime-types": "~2.1.19", - "oauth-sign": "~0.9.0", - "performance-now": "^2.1.0", - "qs": "~6.5.2", - "safe-buffer": "^5.1.2", - "tough-cookie": "~2.5.0", - "tunnel-agent": "^0.6.0", - "uuid": "^3.3.2" - } - }, - "request-progress": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/request-progress/-/request-progress-2.0.1.tgz", - "integrity": "sha512-dxdraeZVUNEn9AvLrxkgB2k6buTlym71dJk1fk4v8j3Ou3RKNm07BcgbHdj2lLgYGfqX71F+awb1MR+tWPFJzA==", - "dev": true, - "requires": { - "throttleit": "^1.0.0" - } - }, - "resolve": { - "version": "1.1.7", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", - "integrity": "sha512-9znBF0vBcaSN3W2j7wKvdERPwqTxSpCq+if5C0WoTCyV9n24rua28jeuQ2pL/HOf+yUe/Mef+H/5p60K0Id3bg==", - "dev": true - }, - "resolve-dir": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", - "integrity": "sha512-R7uiTjECzvOsWSfdM0QKFNBVFcK27aHOUwdvK53BcW8zqnGdYp0Fbj82cy54+2A4P2tFM22J5kRfe1R+lM/1yg==", - "dev": true, - "requires": { - "expand-tilde": "^2.0.0", - "global-modules": "^1.0.0" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "rollup": { - "version": "0.50.1", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-0.50.1.tgz", - "integrity": "sha512-XwrnqjSTk+yR8GbP6hiJuVe83MVmBw/gm4P3qP34A10fRXvv6ppl0ZUg1+Pj1tIZSR/aw5ZaILLEiVxwXIAdAw==", - "dev": true - }, - "rollup-plugin-json": { - "version": "2.3.1", - "resolved": "https://registry.npmjs.org/rollup-plugin-json/-/rollup-plugin-json-2.3.1.tgz", - "integrity": "sha512-alQQQVPo2z9pl6LSK8QqyDlWwCH5KeE8YxgQv7fa/SeTxz+gQe36jBjcha7hQW68MrVh9Ms71EQaMZDAG3w2yw==", - "dev": true, - "requires": { - "rollup-pluginutils": "^2.0.1" - } - }, - "rollup-plugin-node-resolve": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-node-resolve/-/rollup-plugin-node-resolve-3.4.0.tgz", - "integrity": "sha512-PJcd85dxfSBWih84ozRtBkB731OjXk0KnzN0oGp7WOWcarAFkVa71cV5hTJg2qpVsV2U8EUwrzHP3tvy9vS3qg==", - "dev": true, - "requires": { - "builtin-modules": "^2.0.0", - "is-module": "^1.0.0", - "resolve": "^1.1.6" - } - }, - "rollup-plugin-replace": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/rollup-plugin-replace/-/rollup-plugin-replace-2.2.0.tgz", - "integrity": "sha512-/5bxtUPkDHyBJAKketb4NfaeZjL5yLZdeUihSfbF2PQMz+rSTEb8ARKoOl3UBT4m7/X+QOXJo3sLTcq+yMMYTA==", - "dev": true, - "requires": { - "magic-string": "^0.25.2", - "rollup-pluginutils": "^2.6.0" - } - }, - "rollup-pluginutils": { - "version": "2.8.2", - "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", - "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", - "dev": true, - "requires": { - "estree-walker": "^0.6.1" - } - }, - "safe-buffer": { - "version": "5.1.2", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", - "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true - }, - "safer-buffer": { - "version": "2.1.2", - "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", - "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "send": { - "version": "0.18.0", - "resolved": "https://registry.npmjs.org/send/-/send-0.18.0.tgz", - "integrity": "sha512-qqWzuOjSFOuqPjFe4NOsMLafToQQwBSOEpS+FwEt3A2V3vKubTquT3vmLTQpFgMXp8AlFWFuP1qKaJZOtPpVXg==", - "dev": true, - "requires": { - "debug": "2.6.9", - "depd": "2.0.0", - "destroy": "1.2.0", - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "etag": "~1.8.1", - "fresh": "0.5.2", - "http-errors": "2.0.0", - "mime": "1.6.0", - "ms": "2.1.3", - "on-finished": "2.4.1", - "range-parser": "~1.2.1", - "statuses": "2.0.1" - }, - "dependencies": { - "http-errors": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", - "integrity": "sha512-FtwrG/euBzaEjYeRqOgly7G0qviiXoJWnvEH2Z1plBdXgbyjv34pHTSb9zoeHMyDy33+DWy5Wt9Wo+TURtOYSQ==", - "dev": true, - "requires": { - "depd": "2.0.0", - "inherits": "2.0.4", - "setprototypeof": "1.2.0", - "statuses": "2.0.1", - "toidentifier": "1.0.1" - } - }, - "ms": { - "version": "2.1.3", - "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", - "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", - "dev": true - }, - "on-finished": { - "version": "2.4.1", - "resolved": "https://registry.npmjs.org/on-finished/-/on-finished-2.4.1.tgz", - "integrity": "sha512-oVlzkg3ENAhCk2zdv7IJwd/QUD4z2RxRwpkcGY8psCVcCYZNq4wYnVWALHM+brtuJjePWiYF/ClmuDr8Ch5+kg==", - "dev": true, - "requires": { - "ee-first": "1.1.1" - } - }, - "setprototypeof": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.2.0.tgz", - "integrity": "sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==", - "dev": true - }, - "statuses": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-2.0.1.tgz", - "integrity": "sha512-RwNA9Z/7PrK06rYLIzFMlaF+l73iwpzsqRIFgbMLbTcLD6cOao82TaWefPXQvB2fOC4AjuYSEndS7N/mTCbkdQ==", - "dev": true - } - } - }, - "serve-index": { - "version": "1.9.1", - "resolved": "https://registry.npmjs.org/serve-index/-/serve-index-1.9.1.tgz", - "integrity": "sha512-pXHfKNP4qujrtteMrSBb0rc8HJ9Ms/GrXwcUtUtD5s4ewDJI8bT3Cz2zTVRMKtri49pLx2e0Ya8ziP5Ya2pZZw==", - "dev": true, - "requires": { - "accepts": "~1.3.4", - "batch": "0.6.1", - "debug": "2.6.9", - "escape-html": "~1.0.3", - "http-errors": "~1.6.2", - "mime-types": "~2.1.17", - "parseurl": "~1.3.2" - } - }, - "serve-static": { - "version": "1.15.0", - "resolved": "https://registry.npmjs.org/serve-static/-/serve-static-1.15.0.tgz", - "integrity": "sha512-XGuRDNjXUijsUL0vl6nSD7cwURuzEgglbOaFuZM9g3kwDXOWVTck0jLzjPzGD+TazWbboZYu52/9/XPdUgne9g==", - "dev": true, - "requires": { - "encodeurl": "~1.0.2", - "escape-html": "~1.0.3", - "parseurl": "~1.3.3", - "send": "0.18.0" - } - }, - "setprototypeof": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/setprototypeof/-/setprototypeof-1.1.0.tgz", - "integrity": "sha512-BvE/TwpZX4FXExxOxZyRGQQv651MSwmWKZGqvmPcRIjDqWub67kTKuIMx43cZZrS/cBBzwBcNDWoFxt2XEFIpQ==", - "dev": true - }, - "signal-exit": { - "version": "3.0.7", - "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.7.tgz", - "integrity": "sha512-wnD2ZE+l+SPC/uoS0vXeE9L1+0wuaMqKlfz9AMUo38JsyLSBWSFcHR1Rri62LZc12vLr1gb3jl7iwQhgwpAbGQ==", - "dev": true - }, - "source-map": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", - "integrity": "sha512-CBdZ2oa/BHhS4xj5DlhjWNHcan57/5YuvfdLf17iVmIpd9KRm+DFLmC6nBNj+6Ua7Kt3TmOjDpQT1aTYOQtoUA==", - "dev": true, - "optional": true, - "requires": { - "amdefine": ">=0.0.4" - } - }, - "sourcemap-codec": { - "version": "1.4.8", - "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", - "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true - }, - "spdx-correct": { - "version": "3.1.1", - "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", - "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", - "dev": true, - "requires": { - "spdx-expression-parse": "^3.0.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-exceptions": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", - "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", - "dev": true - }, - "spdx-expression-parse": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", - "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", - "dev": true, - "requires": { - "spdx-exceptions": "^2.1.0", - "spdx-license-ids": "^3.0.0" - } - }, - "spdx-license-ids": { - "version": "3.0.12", - "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.12.tgz", - "integrity": "sha512-rr+VVSXtRhO4OHbXUiAF7xW3Bo9DuuF6C5jH+q/x15j2jniycgKbxU09Hr0WqlSLUs4i4ltHGXqTe7VHclYWyA==", - "dev": true - }, - "sprintf-js": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", - "integrity": "sha512-D9cPgkvLlV3t3IzL0D0YLvGA9Ahk4PcvVwUbN0dSGr1aP0Nrt4AEnTUbuGvquEC0mA64Gqt1fzirlRs5ibXx8g==", - "dev": true - }, - "sshpk": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/sshpk/-/sshpk-1.17.0.tgz", - "integrity": "sha512-/9HIEs1ZXGhSPE8X6Ccm7Nam1z8KcoCqPdI7ecm1N33EzAetWahvQWVqLZtaZQ+IDKX4IyA2o0gBzqIMkAagHQ==", - "dev": true, - "requires": { - "asn1": "~0.2.3", - "assert-plus": "^1.0.0", - "bcrypt-pbkdf": "^1.0.0", - "dashdash": "^1.12.0", - "ecc-jsbn": "~0.1.1", - "getpass": "^0.1.1", - "jsbn": "~0.1.0", - "safer-buffer": "^2.0.2", - "tweetnacl": "~0.14.0" - } - }, - "statuses": { - "version": "1.5.0", - "resolved": "https://registry.npmjs.org/statuses/-/statuses-1.5.0.tgz", - "integrity": "sha512-OpZ3zP+jT1PI7I8nemJX4AKmAX070ZkYPVWV/AaKTJl+tXCTGyVdC1a4SL8RUQYEwk/f34ZX8UTykN68FwrqAA==", - "dev": true - }, - "string": { - "version": "1.6.1", - "resolved": "https://registry.npmjs.org/string/-/string-1.6.1.tgz", - "integrity": "sha512-HjS4ixm3n26s7G7aj7frqsiiM/lA1vz4zoOMHD6CfT7niMZv3nqspyKWAdnYBklKQM7xYuGfUn3jDLR18WlsPQ==", - "dev": true - }, - "string_decoder": { - "version": "0.10.31", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", - "integrity": "sha512-ev2QzSzWPYmy9GuqfIVildA4OdcGLeFZQrq5ys6RtiuF+RQQiZWr8TZNyAcuVXyQRYfEO+MsoB/1BuQVhOJuoQ==", - "dev": true - }, - "strip-ansi": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", - "integrity": "sha512-VhumSSbBqDTP8p2ZLKj40UjBCV4+v8bUSEpUb4KjRgWk9pbqGF4REFj6KEagidb2f/M6AzC0EmFyDNGaw9OCzg==", - "dev": true, - "requires": { - "ansi-regex": "^2.0.0" - } - }, - "strip-bom": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", - "integrity": "sha512-kwrX1y7czp1E69n2ajbG65mIo9dqvJ+8aBQXOGVxqwvNbsXdFM6Lq37dLAY3mknUwru8CfcCbfOLL/gMo+fi3g==", - "dev": true, - "requires": { - "is-utf8": "^0.2.0" - } - }, - "strip-indent": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/strip-indent/-/strip-indent-1.0.1.tgz", - "integrity": "sha512-I5iQq6aFMM62fBEAIB/hXzwJD6EEZ0xEGCX2t7oXqaKPIRgt4WruAQ285BISgdkP+HLGWyeGmNJcpIwFeRYRUA==", - "dev": true, - "requires": { - "get-stdin": "^4.0.1" - } - }, - "strip-json-comments": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-1.0.4.tgz", - "integrity": "sha512-AOPG8EBc5wAikaG1/7uFCNFJwnKOuQwFTpYBdTW6OvWHeZBQBrAA/amefHGrEiOnCPcLFZK6FUPtWVKpQVIRgg==", - "dev": true - }, - "supports-color": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-2.0.0.tgz", - "integrity": "sha512-KKNVtd6pCYgPIKU4cp2733HWYCpplQhddZLBUryaAHou723x+FRzQ5Df824Fj+IyyuiQTRoub4SnIFfIcrp70g==", - "dev": true - }, - "supports-preserve-symlinks-flag": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz", - "integrity": "sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==", - "dev": true - }, - "throttleit": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/throttleit/-/throttleit-1.0.0.tgz", - "integrity": "sha512-rkTVqu6IjfQ/6+uNuuc3sZek4CEYxTJom3IktzgdSxcZqdARuebbA/f4QmAxMQIxqq9ZLEUkSYqvuk1I6VKq4g==", - "dev": true - }, - "tin": { - "version": "0.5.0", - "resolved": "https://registry.npmjs.org/tin/-/tin-0.5.0.tgz", - "integrity": "sha512-lHhMm3Fy0+g9EBkH6+C6b8V5lm9SmvtpMO2scLAg/Fo0Ou94ogxDGf3PL6T2o7bgQMfYm9UAT6+U1Ppy/6CHZw==", - "dev": true, - "requires": { - "commander": "~2.0.0", - "semver": "~2.2.1", - "string": "~1.6.0" - }, - "dependencies": { - "commander": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/commander/-/commander-2.0.0.tgz", - "integrity": "sha512-qebjpyeaA/nJ4w3EO2cV2++/zEkccPnjWogzA2rff+Lk8ILI75vULeTmyd4wPxWdKwtP3J+G39IXVZadh0UHyw==", - "dev": true - }, - "semver": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-2.2.1.tgz", - "integrity": "sha512-zM5SE887Z8Ixx9cGaFnu9Wd8xr0RFwixASZcvUh2QGnf/1uxYmyetDzhzkEdDKipmZPq/JTB0gLo1Sg59LXkQQ==", - "dev": true - } - } - }, - "to-regex-range": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", - "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", - "dev": true, - "requires": { - "is-number": "^7.0.0" - } - }, - "toidentifier": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/toidentifier/-/toidentifier-1.0.1.tgz", - "integrity": "sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==", - "dev": true - }, - "tough-cookie": { - "version": "2.5.0", - "resolved": "https://registry.npmjs.org/tough-cookie/-/tough-cookie-2.5.0.tgz", - "integrity": "sha512-nlLsUzgm1kfLXSXfRZMc1KLAugd4hqJHDTvc2hDIwS3mZAfMEuMbc03SujMF+GEcpaX/qboeycw6iO8JwVv2+g==", - "dev": true, - "requires": { - "psl": "^1.1.28", - "punycode": "^2.1.1" - } - }, - "trim-newlines": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/trim-newlines/-/trim-newlines-1.0.0.tgz", - "integrity": "sha512-Nm4cF79FhSTzrLKGDMi3I4utBtFv8qKy4sq1enftf2gMdpqI8oVQTAfySkTz5r49giVzDj88SVZXP4CeYQwjaw==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "tweetnacl": { - "version": "0.14.5", - "resolved": "https://registry.npmjs.org/tweetnacl/-/tweetnacl-0.14.5.tgz", - "integrity": "sha512-KXXFFdAbFXY4geFIwoyNK+f5Z1b7swfXABfL7HXCmoIWMKU3dmS26672A4EeQtDzLKy7SXmfBu51JolvEKwtGA==", - "dev": true - }, - "type-check": { - "version": "0.3.2", - "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", - "integrity": "sha512-ZCmOJdvOWDBYJlzAoFkC+Q0+bUyEOS1ltgp1MGU03fqHG+dbi9tBFU2Rd9QKiDZFAYrhPh2JUf7rZRIuHRKtOg==", - "dev": true, - "requires": { - "prelude-ls": "~1.1.2" - } - }, - "type-detect": { - "version": "4.0.8", - "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", - "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", - "dev": true - }, - "typedarray": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", - "integrity": "sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==", - "dev": true - }, - "uglify-js": { - "version": "3.0.28", - "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.0.28.tgz", - "integrity": "sha512-0h/qGay016GG2lVav3Kz174F3T2Vjlz2v6HCt+WDQpoXfco0hWwF5gHK9yh88mUYvIC+N7Z8NT8WpjSp1yoqGA==", - "dev": true, - "requires": { - "commander": "~2.11.0", - "source-map": "~0.5.1" - }, - "dependencies": { - "source-map": { - "version": "0.5.7", - "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", - "integrity": "sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==", - "dev": true - } - } - }, - "unc-path-regex": { - "version": "0.1.2", - "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", - "integrity": "sha512-eXL4nmJT7oCpkZsHZUOJo8hcX3GbsiDOa0Qu9F646fi8dT3XuSVopVqAcEiVzSKKH7UoDti23wNX3qGFxcW5Qg==", - "dev": true - }, - "underscore.string": { - "version": "3.3.6", - "resolved": "https://registry.npmjs.org/underscore.string/-/underscore.string-3.3.6.tgz", - "integrity": "sha512-VoC83HWXmCrF6rgkyxS9GHv8W9Q5nhMKho+OadDJGzL2oDYbYEppBaCMH6pFlwLeqj2QS+hhkw2kpXkSdD1JxQ==", - "dev": true, - "requires": { - "sprintf-js": "^1.1.1", - "util-deprecate": "^1.0.2" - }, - "dependencies": { - "sprintf-js": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.1.2.tgz", - "integrity": "sha512-VE0SOVEHCk7Qc8ulkWw3ntAzXuqf7S2lvwQaDLRnUeIEaKNQJzV6BwmLKhOqT61aGhfUMrXeaBk+oDGCzvhcug==", - "dev": true - } - } - }, - "unpipe": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/unpipe/-/unpipe-1.0.0.tgz", - "integrity": "sha512-pjy2bYhSsufwWlKwPc+l3cN7+wuJlK6uz0YdJEOlQDbl6jo/YlPi4mb8agUkVC8BF7V8NuzeyPNqRksA3hztKQ==", - "dev": true - }, - "uri-js": { - "version": "4.4.1", - "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz", - "integrity": "sha512-7rKUyy33Q1yc98pQ1DAmLtwX109F7TIfWlW1Ydo8Wl1ii1SeHieeh0HHfPeL2fMXK6z0s8ecKs9frCuLJvndBg==", - "dev": true, - "requires": { - "punycode": "^2.1.0" - } - }, - "uri-path": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/uri-path/-/uri-path-1.0.0.tgz", - "integrity": "sha512-8pMuAn4KacYdGMkFaoQARicp4HSw24/DHOVKWqVRJ8LhhAwPPFpdGvdL9184JVmUwe7vz7Z9n6IqI6t5n2ELdg==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "utils-merge": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/utils-merge/-/utils-merge-1.0.1.tgz", - "integrity": "sha512-pMZTvIkT1d+TFGvDOqodOclx0QWkkgi6Tdoa8gC8ffGAAqz9pzPTZWAybbsHHoED/ztMtkv/VoYTYyShUn81hA==", - "dev": true - }, - "uuid": { - "version": "3.4.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-3.4.0.tgz", - "integrity": "sha512-HjSDRw6gZE5JMggctHBcjVak08+KEVhSIiDzFnT9S9aegmp85S/bReBVTb4QTFaRNptJ9kuYaNhnbNEOkbKb/A==", - "dev": true - }, - "v8flags": { - "version": "3.2.0", - "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", - "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", - "dev": true, - "requires": { - "homedir-polyfill": "^1.0.1" - } - }, - "validate-npm-package-license": { - "version": "3.0.4", - "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", - "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", - "dev": true, - "requires": { - "spdx-correct": "^3.0.0", - "spdx-expression-parse": "^3.0.0" - } - }, - "verror": { - "version": "1.10.0", - "resolved": "https://registry.npmjs.org/verror/-/verror-1.10.0.tgz", - "integrity": "sha512-ZZKSmDAEFOijERBLkmYfJ+vmk3w+7hOLYDNkRCuRuMJGEmqYNCNLyBBFwWKVMhfwaEF3WOd0Zlw86U/WC/+nYw==", - "dev": true, - "requires": { - "assert-plus": "^1.0.0", - "core-util-is": "1.0.2", - "extsprintf": "^1.2.0" - }, - "dependencies": { - "core-util-is": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", - "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==", - "dev": true - } - } - }, - "which": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", - "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", - "dev": true, - "requires": { - "isexe": "^2.0.0" - } - }, - "wkt-parser": { - "version": "1.3.3", - "resolved": "https://registry.npmjs.org/wkt-parser/-/wkt-parser-1.3.3.tgz", - "integrity": "sha512-ZnV3yH8/k58ZPACOXeiHaMuXIiaTk1t0hSUVisbO0t4RjA5wPpUytcxeyiN2h+LZRrmuHIh/1UlrR9e7DHDvTw==" - }, - "word-wrap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", - "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", - "dev": true - }, - "wordwrap": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", - "integrity": "sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==", - "dev": true - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - } - } -} diff --git a/proj4js-master/package.json b/proj4js-master/package.json deleted file mode 100644 index 442faefb..00000000 --- a/proj4js-master/package.json +++ /dev/null @@ -1,46 +0,0 @@ -{ - "name": "proj4", - "version": "2.12.2-alpha", - "description": "Proj4js is a JavaScript library to transform point coordinates from one coordinate system to another, including datum transformations.", - "homepage": "https://proj4js.github.io/proj4js/", - "main": "dist/proj4-src.js", - "module": "lib/index.js", - "directories": { - "test": "test", - "doc": "docs" - }, - "scripts": { - "prepare": "grunt", - "build": "grunt", - "build:tmerc": "grunt build:tmerc", - "test": "npm run build && istanbul test node_modules/mocha/bin/_mocha test/test.js" - }, - "repository": { - "type": "git", - "url": "git://github.com/proj4js/proj4js.git" - }, - "author": "", - "license": "MIT", - "devDependencies": { - "chai": "~4.1.2", - "curl-amd": "^0.8.12", - "grunt": "^1.0.1", - "grunt-cli": "~1.2.0", - "grunt-contrib-connect": "~1.0.2", - "grunt-contrib-jshint": "~3.2.0", - "grunt-contrib-uglify": "~3.1.0", - "grunt-mocha-phantomjs": "~4.0.0", - "grunt-rollup": "^6.0.0", - "istanbul": "~0.4.5", - "mocha": "~4.0.0", - "rollup": "^0.50.0", - "rollup-plugin-json": "^2.3.0", - "rollup-plugin-node-resolve": "^3.0.0", - "rollup-plugin-replace": "^2.0.0", - "tin": "~0.5.0" - }, - "dependencies": { - "mgrs": "1.0.0", - "wkt-parser": "^1.3.3" - } -} diff --git a/proj4js-master/publish.sh b/proj4js-master/publish.sh deleted file mode 100755 index d4ad0780..00000000 --- a/proj4js-master/publish.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/bash - -# get current version -VERSION=$(node -e "console.log(require('./package.json').version)") - -# Build -git checkout -b build -node_modules/.bin/grunt -git add dist -f -git commit -m "build $VERSION" - -# Tag and push -git tag -f v$VERSION -m "v$VERSION" -git push --tags git@github.com:proj4js/proj4js.git $VERSION - -# Publish -npm publish - -# Cleanup -git checkout master -git branch -D build diff --git a/proj4js-master/test/BETA2007.gsb b/proj4js-master/test/BETA2007.gsb deleted file mode 100644 index 69cd3346..00000000 Binary files a/proj4js-master/test/BETA2007.gsb and /dev/null differ diff --git a/proj4js-master/test/amd.html b/proj4js-master/test/amd.html deleted file mode 100644 index 477a1d7a..00000000 --- a/proj4js-master/test/amd.html +++ /dev/null @@ -1,63 +0,0 @@ - - - - Mocha Tests - - - - -
- - - - - - - diff --git a/proj4js-master/test/opt.html b/proj4js-master/test/opt.html deleted file mode 100644 index a0abcd56..00000000 --- a/proj4js-master/test/opt.html +++ /dev/null @@ -1,25 +0,0 @@ - - - - Mocha Tests - - -
- - - - - - - - \ No newline at end of file diff --git a/proj4js-master/test/package.json.js b/proj4js-master/test/package.json.js deleted file mode 100644 index b82c0d23..00000000 --- a/proj4js-master/test/package.json.js +++ /dev/null @@ -1 +0,0 @@ -define({version : "curl is dumb"}); \ No newline at end of file diff --git a/proj4js-master/test/test.js b/proj4js-master/test/test.js deleted file mode 100644 index 514c12d2..00000000 --- a/proj4js-master/test/test.js +++ /dev/null @@ -1,567 +0,0 @@ -// You can do this in the grunt config for each mocha task, see the `options` config - - -// Start the main app logic. - -function startTests(chai, proj4, testPoints) { - - - var assert = chai.assert; - proj4.defs([ - ["EPSG:102018", "+proj=gnom +lat_0=90 +lon_0=0 +x_0=6300000 +y_0=6300000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs"], - ["testmerc", "+proj=merc +lon_0=5.937 +lat_ts=45.027 +ellps=sphere"], - ["testmerc2", "+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +units=m +k=1.0 +nadgrids=@null +no_defs"] - ]); - proj4.defs('esriOnline', 'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]'); - - describe('parse', function() { - it('should parse units', function() { - assert.equal(proj4.defs('testmerc2').units, 'm'); - }); - }); - - describe('proj2proj', function() { - it('should work transforming from one projection to another', function() { - var sweref99tm = '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'; - var rt90 = '+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 +y_0=0.0 +proj=tmerc +ellps=bessel +units=m +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs'; - var rslt = proj4(sweref99tm, rt90).forward([319180, 6399862]); - assert.closeTo(rslt[0], 1271137.927561178, 0.000001); - assert.closeTo(rslt[1], 6404230.291456626, 0.000001); - }); - it('should work with a proj object', function() { - var sweref99tm = proj4('+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'); - var rt90 = proj4('+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 +y_0=0.0 +proj=tmerc +ellps=bessel +units=m +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs'); - var rslt = proj4(sweref99tm, rt90).forward([319180, 6399862]); - assert.closeTo(rslt[0], 1271137.927561178, 0.000001); - assert.closeTo(rslt[1], 6404230.291456626, 0.000001); - }); - }); - - describe('proj4', function() { - describe('core', function() { - testPoints.forEach(function(testPoint) { - describe(testPoint.code, function() { - var xyAcc = 2, - llAcc = 6; - if ('acc' in testPoint) { - if ('xy' in testPoint.acc) { - xyAcc = testPoint.acc.xy; - } - if ('ll' in testPoint.acc) { - llAcc = testPoint.acc.ll; - } - } - var xyEPSLN = Math.pow(10, - 1 * xyAcc); - var llEPSLN = Math.pow(10, - 1 * llAcc); - describe('traditional', function() { - it('should work with forwards', function() { - var proj = new proj4.Proj(testPoint.code); - var xy = proj4.transform(proj4.WGS84, proj, proj4.toPoint(testPoint.ll)); - assert.closeTo(xy.x, testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy.y, testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('should work with backwards', function() { - var proj = new proj4.Proj(testPoint.code); - var ll = proj4.transform(proj, proj4.WGS84, proj4.toPoint(testPoint.xy)); - assert.closeTo(ll.x, testPoint.ll[0], llEPSLN, 'lng is close'); - assert.closeTo(ll.y, testPoint.ll[1], llEPSLN, 'lat is close'); - }); - }); - describe('new method 2 param', function() { - it('shortcut method should work with an array', function() { - var xy = proj4(testPoint.code, testPoint.ll); - assert.closeTo(xy[0], testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy[1], testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('shortcut method should work with an object', function() { - var pt = { - x: testPoint.ll[0], - y: testPoint.ll[1] - }; - var xy = proj4(testPoint.code, pt); - assert.closeTo(xy.x, testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy.y, testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('shortcut method should work with a point object', function() { - var pt = proj4.toPoint(testPoint.ll); - var xy = proj4(testPoint.code, pt); - assert.closeTo(xy.x, testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy.y, testPoint.xy[1], xyEPSLN, 'y is close'); - }); - }); - describe('new method 3 param', function() { - it('shortcut method should work with an array', function() { - var xy = proj4(proj4.WGS84, testPoint.code, testPoint.ll); - assert.closeTo(xy[0], testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy[1], testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('shortcut method should work with an object', function() { - var pt = { - x: testPoint.ll[0], - y: testPoint.ll[1] - }; - var xy = proj4(proj4.WGS84, testPoint.code, pt); - assert.closeTo(xy.x, testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy.y, testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('shortcut method should work with a point object', function() { - var pt = proj4.toPoint(testPoint.ll); - var xy = proj4(proj4.WGS84, testPoint.code, pt); - assert.closeTo(xy.x, testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy.y, testPoint.xy[1], xyEPSLN, 'y is close'); - }); - }); - describe('new method 3 param other way', function() { - it('shortcut method should work with an array', function() { - var ll = proj4(testPoint.code, proj4.WGS84, testPoint.xy); - assert.closeTo(ll[0], testPoint.ll[0], llEPSLN, 'x is close'); - assert.closeTo(ll[1], testPoint.ll[1], llEPSLN, 'y is close'); - }); - it('shortcut method should work with an object', function() { - var pt = { - x: testPoint.xy[0], - y: testPoint.xy[1] - }; - // in case of geocentric proj we need Z value. - if (typeof testPoint.xy[2] === 'number') { - pt.z = testPoint.xy[2] - } - var ll = proj4(testPoint.code, proj4.WGS84, pt); - assert.closeTo(ll.x, testPoint.ll[0], llEPSLN, 'x is close'); - assert.closeTo(ll.y, testPoint.ll[1], llEPSLN, 'y is close'); - }); - it('shortcut method should work with a point object', function() { - var pt = proj4.toPoint(testPoint.xy); - var ll = proj4(testPoint.code, proj4.WGS84, pt); - assert.closeTo(ll.x, testPoint.ll[0], llEPSLN, 'x is close'); - assert.closeTo(ll.y, testPoint.ll[1], llEPSLN, 'y is close'); - }); - }); - describe('1 param', function() { - it('forwards', function() { - var xy = proj4(testPoint.code).forward(testPoint.ll); - assert.closeTo(xy[0], testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy[1], testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('inverse', function() { - var ll = proj4(testPoint.code).inverse(testPoint.xy); - assert.closeTo(ll[0], testPoint.ll[0], llEPSLN, 'x is close'); - assert.closeTo(ll[1], testPoint.ll[1], llEPSLN, 'y is close'); - }); - }); - describe('proj object', function() { - it('should work with a 2 element array', function() { - const ll = [testPoint.ll[0], testPoint.ll[1]]; - Object.freeze(ll); - var xy = proj4(new proj4.Proj(testPoint.code), ll); - assert.closeTo(xy[0], testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy[1], testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('should work wit a 3 element array', function() { - const llz = [testPoint.ll[0], testPoint.ll[1], 0]; - Object.freeze(llz); - var xy = proj4(new proj4.Proj(testPoint.code), llz); - assert.closeTo(xy[0], testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy[1], testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('should work on element', function() { - var xy = proj4(new proj4.Proj(testPoint.code)).forward(testPoint.ll); - assert.closeTo(xy[0], testPoint.xy[0], xyEPSLN, 'x is close'); - assert.closeTo(xy[1], testPoint.xy[1], xyEPSLN, 'y is close'); - }); - it('should work 3 element point object', function() { - var pt = proj4.toPoint(testPoint.xy); - var ll = proj4(new proj4.Proj(testPoint.code), proj4.WGS84, pt); - assert.closeTo(ll.x, testPoint.ll[0], llEPSLN, 'x is close'); - assert.closeTo(ll.y, testPoint.ll[1], llEPSLN, 'y is close'); - }); - }); - describe('proj coord object', function() { - it('should not be modified', function() { - var expected = {x: 100000, y: 100000}; - var inpxy = {x: expected.x, y: expected.y}; - proj4('EPSG:3857', proj4.WGS84, inpxy); - - assert.deepEqual(inpxy, expected, "input is unmodified"); - }); - }); - }); - }); - }); - describe('points', function () { - it('should not create a z if none was provided', function() { - const result = proj4( - 'GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]]', - 'PROJCS["OSGB 1936 / British National Grid",GEOGCS["OSGB 1936",DATUM["OSGB_1936",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6277"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4277"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",49],PARAMETER["central_meridian",-2],PARAMETER["scale_factor",0.9996012717],PARAMETER["false_easting",400000],PARAMETER["false_northing",-100000],AUTHORITY["EPSG","27700"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]', - {x: -0.12793738, y: 51.507747}); - assert.closeTo(result.x, 530018.229301635, 1e-6); - assert.closeTo(result.y, 180418.4380560551, 1e-6); - assert.equal(result.z, undefined); - }); - it('should return null for transform of [0, 0] for EPSG:3413 -> EPSG:3857', function () { - var point = proj4.transform( - proj4.Proj('+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs'), - proj4.Proj('EPSG:3857'), - [0, 0] - ); - assert.strictEqual(point, null); - }); - it('should ignore stuff it does not know', function () { - var sweref99tm = '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'; - var rt90 = '+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 +y_0=0.0 +proj=tmerc +ellps=bessel +units=m +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs'; - var rslt = proj4(sweref99tm, rt90).forward({ - x: 319180, - y: 6399862, - z: 0, - m: 1000, - method: function () { - return 'correct answer'; - } - }); - assert.closeTo(rslt.x, 1271137.927561178, 0.000001); - assert.closeTo(rslt.y, 6404230.291456626, 0.000001); - assert.equal(rslt.z, 0); - assert.equal(rslt.m, 1000); - assert.equal(rslt.method(), 'correct answer'); - }); - it('should be able to compute X Y Z M in geocenteric coordinates', function () { - var epsg4978 = '+proj=geocent +datum=WGS84 +units=m +no_defs'; - var rslt = proj4(epsg4978).forward({ - x: -7.76166, - y: 39.19685, - z: 0, - m: 1000, - method: function () { - return 'correct answer'; - } - }); - assert.closeTo(rslt.x, 4904199.584207411, 0.000001); - assert.closeTo(rslt.y, -668448.8153664203, 0.000001); - assert.closeTo(rslt.z, 4009276.930771821, 0.000001); - assert.equal(rslt.m, 1000); - assert.equal(rslt.method(), 'correct answer'); - }); - }); - describe('points array', function () { - it('should ignore stuff it does not know', function () { - var sweref99tm = '+proj=utm +zone=33 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs'; - var rt90 = '+lon_0=15.808277777799999 +lat_0=0.0 +k=1.0 +x_0=1500000.0 +y_0=0.0 +proj=tmerc +ellps=bessel +units=m +towgs84=414.1,41.3,603.1,-0.855,2.141,-7.023,0 +no_defs'; - var rslt = proj4(sweref99tm, rt90).forward([ - 319180, - 6399862, - 0, - 1000, - ]); - assert.closeTo(rslt[0], 1271137.927561178, 0.000001); - assert.closeTo(rslt[1], 6404230.291456626, 0.000001); - assert.equal(rslt[2], 0); - assert.equal(rslt[3], 1000); - }); - it('should be able to compute X Y Z M in geocenteric coordinates', function () { - var epsg4978 = '+proj=geocent +datum=WGS84 +units=m +no_defs'; - var rslt = proj4(epsg4978).forward([ - -7.76166, - 39.19685, - 0, - 1000 - ]); - assert.closeTo(rslt[0], 4904199.584207411, 0.000001); - assert.closeTo(rslt[1], -668448.8153664203, 0.000001); - assert.closeTo(rslt[2], 4009276.930771821, 0.000001); - assert.equal(rslt[3], 1000); - }); - }); - - it('should use [x,y] axis order', function() { - var enu = 'PROJCS["NAD83 / Massachusetts Mainland", GEOGCS["NAD83", DATUM["North American Datum 1983", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", -71.5], PARAMETER["latitude_of_origin", 41.0], PARAMETER["standard_parallel_1", 42.68333333333334], PARAMETER["false_easting", 200000.0], PARAMETER["false_northing", 750000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 41.71666666666667], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","26986"]]'; - var neu = 'PROJCS["NAD83 / Massachusetts Mainland NE", GEOGCS["NAD83", DATUM["North American Datum 1983", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", -71.5], PARAMETER["latitude_of_origin", 41.0], PARAMETER["standard_parallel_1", 42.68333333333334], PARAMETER["false_easting", 200000.0], PARAMETER["false_northing", 750000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 41.71666666666667], UNIT["m", 1.0], AXIS["Northing", NORTH], AXIS["Easting", EAST], AUTHORITY["EPSG","26986"]]'; - var rslt = proj4(enu, neu).forward({ - x: 10.2, - y: 43.4 - }); - assert.closeTo(rslt.x, 10.2, 0.000001); - assert.closeTo(rslt.y, 43.4, 0.000001); - }); - - it('should use correct axis order with proj4.transform()', function() { - var enu = 'PROJCS["NAD83 / Massachusetts Mainland", GEOGCS["NAD83", DATUM["North American Datum 1983", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", -71.5], PARAMETER["latitude_of_origin", 41.0], PARAMETER["standard_parallel_1", 42.68333333333334], PARAMETER["false_easting", 200000.0], PARAMETER["false_northing", 750000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 41.71666666666667], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","26986"]]'; - var neu = 'PROJCS["NAD83 / Massachusetts Mainland NE", GEOGCS["NAD83", DATUM["North American Datum 1983", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", -71.5], PARAMETER["latitude_of_origin", 41.0], PARAMETER["standard_parallel_1", 42.68333333333334], PARAMETER["false_easting", 200000.0], PARAMETER["false_northing", 750000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 41.71666666666667], UNIT["m", 1.0], AXIS["Northing", NORTH], AXIS["Easting", EAST], AUTHORITY["EPSG","26986"]]'; - var rslt = proj4(enu, neu).forward({ - x: 10.2, - y: 43.4 - }, true); - assert.closeTo(rslt.x, 43.4, 0.000001); - assert.closeTo(rslt.y, 10.2, 0.000001); - }); - - it('axes should be invertable with proj4.transform()', function () { - var enu = '+proj=longlat +axis=enu'; - var esu = '+proj=longlat +axis=esu'; - var wnu = '+proj=longlat +axis=wnu'; - var result = proj4(enu, esu).forward({x: 40, y: 50}, true); - assert.closeTo(result.x, 40, 0.000001); - assert.closeTo(result.y, -50, 0.000001); - var result = proj4(enu, wnu).forward({x: 40, y: 50}, true); - assert.closeTo(result.x, -40, 0.000001); - assert.closeTo(result.y, 50, 0.000001); - }); - - describe('defs', function () { - assert.equal(proj4.defs('testmerc'), proj4.defs['testmerc']); - proj4.defs('foo', '+proj=merc +lon_0=5.937 +lat_ts=45.027 +ellps=sphere'); - assert.typeOf(proj4.defs['foo'], 'object'); - proj4.defs('urn:x-ogc:def:crs:EPSG:4326', proj4.defs('EPSG:4326')); - assert.strictEqual(proj4.defs['urn:x-ogc:def:crs:EPSG:4326'], proj4.defs['EPSG:4326']); - - describe('wkt', function () { - it('should provide the correct conversion factor for WKT GEOGCS projections', function () { - proj4.defs('EPSG:4269', 'GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]]'); - assert.equal(proj4.defs['EPSG:4269'].to_meter, 6378137 * 0.01745329251994328); - - proj4.defs('EPSG:4279', 'GEOGCS["OS(SN)80",DATUM["OS_SN_1980",SPHEROID["Airy 1830",6377563.396,299.3249646,AUTHORITY["EPSG","7001"]],AUTHORITY["EPSG","6279"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4279"]]'); - assert.equal(proj4.defs['EPSG:4279'].to_meter, 6377563.396 * 0.01745329251994328); - }); - it('should parse wkt and proj4 of the same crs and result in the same params', function () { - var s1 = 'GEOGCS["PSD93",DATUM["PDO_Survey_Datum_1993",SPHEROID["Clarke 1880 (RGS)",6378249.145,293.465,AUTHORITY["EPSG","7012"]],TOWGS84[-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101],AUTHORITY["EPSG","6134"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4134"]]'; - var s2 = '+proj=longlat +ellps=clrk80 +towgs84=-180.624,-225.516,173.919,-0.81,-1.898,8.336,16.7101 +no_defs'; - var crs1 = proj4(s1); - var crs2 = proj4(s2); - assert.equal(crs1.oProj.a, crs2.oProj.a); - // proj4 has different ellipsoid parameters that EPSG: http://epsg.io/4134 - // assert.equal(crs1.oProj.b, crs2.oProj.b); - }); - it('should handled defined points correctly', function () { - var prj = '+proj=utm +zone=31'; - var proj = proj4(prj); - var res = proj.forward([3, 0]); - assert.deepEqual(res, [500000, 0]); - }); - }); - }); - describe('errors', function() { - it('should throw an error for an unknown ref', function() { - assert.throws(function() { - new proj4.Proj('fake one'); - }, 'fake one', 'should work'); - }); - it('should throw when passed null', function() { - assert.throws(function() { - proj4('+proj=utm +zone=31', [null, 0]); - }, 'coordinates must be finite numbers', 'should work'); - }); - it('should throw when passed NaN', function() { - assert.throws(function() { - proj4('+proj=utm +zone=31', [0, NaN]); - }, 'coordinates must be finite numbers', 'should work'); - }); - it('should throw when passed Infinity', function() { - assert.throws(function() { - proj4('+proj=utm +zone=31', [Infinity, 0]); - }, 'coordinates must be finite numbers', 'should work'); - }); - it('should throw when passed -Infinity', function() { - assert.throws(function() { - proj4('+proj=utm +zone=31', [-Infinity, 0]); - }, 'coordinates must be finite numbers', 'should work'); - }); - }); - describe('utility', function() { - it('should have MGRS available in the proj4.util namespace', function() { - assert.typeOf(proj4.mgrs, "object", "MGRS available in the proj4.util namespace"); - }); - it('should have fromMGRS method added to proj4.Point prototype', function() { - assert.typeOf(proj4.Point.fromMGRS, "function", "fromMGRS method added to proj4.Point prototype"); - }); - it('should have toMGRS method added to proj4.Point prototype', function() { - assert.typeOf(proj4.Point.prototype.toMGRS, "function", "toMGRS method added to proj4.Point prototype"); - }); - - describe('First MGRS set', function() { - var mgrs = "33UXP04"; - var point = proj4.Point.fromMGRS(mgrs); - it('Longitude of point from MGRS correct.', function() { - assert.equal(point.x.toPrecision(7), "16.41450", "Longitude of point from MGRS correct."); - }); - it('Latitude of point from MGRS correct.', function() { - assert.equal(point.y.toPrecision(7), "48.24949", "Latitude of point from MGRS correct."); - }); - it('MGRS reference with highest accuracy correct.', function() { - assert.equal(point.toMGRS(), "33UXP0500444998", "MGRS reference with highest accuracy correct."); - }); - it('MGRS reference with 1-digit accuracy correct.', function() { - assert.equal(point.toMGRS(1), mgrs, "MGRS reference with 1-digit accuracy correct."); - }); - }); - describe('Second MGRS set', function() { - var mgrs = "24XWT783908"; // near UTM zone border, so there are two ways to reference this - var point = proj4.Point.fromMGRS(mgrs); - it("Longitude of point from MGRS correct.", function() { - assert.equal(point.x.toPrecision(7), "-32.66433", "Longitude of point from MGRS correct."); - }); - it("Latitude of point from MGRS correct.", function() { - assert.equal(point.y.toPrecision(7), "83.62778", "Latitude of point from MGRS correct."); - }); - it("MGRS reference with 3-digit accuracy correct.", function() { - assert.equal(point.toMGRS(3), "25XEN041865", "MGRS reference with 3-digit accuracy correct."); - }); - }); - describe('Defs and Datum definition', function() { - proj4.defs("EPSG:5514", "+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=greenwich +units=m +no_defs +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56"); - var point = proj4.transform(proj4.Proj("WGS84"), proj4.Proj("EPSG:5514"), - proj4.toPoint([12.806988, 49.452262])); - it("Longitude of point from WGS84 correct.", function() { - assert.equal(point.x.toPrecision(8), "-868208.61", "Longitude of point from WGS84 correct."); - }); - it("Latitude of point from WGS84 correct.", function() { - assert.equal(point.y.toPrecision(9), "-1095793.64", "Latitude of point from WGS84 correct."); - }); - var point2 = proj4.transform(proj4.Proj("WGS84"), proj4.Proj("EPSG:5514"), - proj4.toPoint([12.806988, 49.452262])); - it("Longitude of point from WGS84 with second call for EPSG:5514 correct.", function() { - assert.equal(point2.x.toPrecision(8), "-868208.61", "Longitude of point from WGS84 correct."); - }); - it("Latitude of point from WGS84 with second call for EPSG:5514 correct.", function() { - assert.equal(point2.y.toPrecision(9), "-1095793.64", "Latitude of point from WGS84 correct."); - }); - }); - }); - - describe('Nadgrids BETA2007', function() { - var tests = [ - ['EPSG:31466', 'EPSG:4326', 2559552, 5670982, 6.850861772, 51.170707759, 0.0000001, 0.01], - ['EPSG:31466', 'EPSG:3857', 2559552, 5670982, 762634.443931574, 6651545.680265270, 0.01, 0.01], - ['EPSG:31466', 'EPSG:25832', 2559552, 5670982, 349757.381712518, 5671004.065049540, 0.01, 0.01], - ]; - - function initializeNadgrid(buffer) { - proj4.nadgrid('BETA2007.gsb', buffer); - proj4.defs('EPSG:31466', '+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +no_defs +type=crs'); - proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs'); - } - - before(function(done) { - if (typeof XMLHttpRequest !== 'undefined') { - const xhr = new XMLHttpRequest(); - xhr.open('GET', 'BETA2007.gsb', true); - xhr.responseType = 'arraybuffer'; - xhr.addEventListener('load', function() { - initializeNadgrid(xhr.response); - done(); - }); - xhr.addEventListener('error', done); - xhr.send(); - } else if (typeof require === 'function') { - const fs = require('fs'); - const path = require('path'); - fs.readFile(path.join(__dirname, 'BETA2007.gsb'), function(err, data) { - if (err) { - done(err); - } else { - initializeNadgrid(data.buffer); - done(); - } - }) - } - }); - - tests.forEach(function(test) { - var fromProj = test[0]; - var toProj = test[1]; - var fromX = test[2]; - var fromY = test[3]; - var toX = test[4]; - var toY = test[5]; - var fromPrecision = test[6]; - var toPrecision = test[7]; - it('should transform ' + fromProj + ' to ' + toProj, function () { - var transformed = proj4(fromProj, toProj, [fromX, fromY]); - assert.approximately(transformed[0], toX, fromPrecision); - assert.approximately(transformed[1], toY, fromPrecision); - }); - it('should transform ' + toProj + ' to ' + fromProj, function () { - var transformed = proj4(toProj, fromProj, [toX, toY]); - assert.approximately(transformed[0], fromX, toPrecision); - assert.approximately(transformed[1], fromY, toPrecision); - }); - }); - }); - - describe('Nadgrids ntv2', function() { - var tests = [ - [-44.382211538462, 40.3768, -44.380749, 40.377457], // just inside the lower limit - [-87.617788, 59.623262, -87.617659, 59.623441], // just inside the upper limit - [-44.5, 40.5, -44.498553, 40.500632], // inside the first square - [-60, 50, -59.999192, 50.000058], // a general point towards the middle of the grid - [0, 0, 0, 0] // fall back to null - ]; - - var converter; - - function initializeNadgrid(buffer) { - proj4.nadgrid('ntv2', buffer); - proj4.defs('ntv2_from', '+proj=longlat +ellps=clrk66 +nadgrids=@ignorable,ntv2,null'); - proj4.defs('ntv2_to', '+proj=longlat +datum=WGS84 +no_defs'); - converter = proj4('ntv2_from', 'ntv2_to'); - } - - before(function(done) { - if (typeof XMLHttpRequest !== 'undefined') { - const xhr = new XMLHttpRequest(); - xhr.open('GET', 'ntv2_0_downsampled.gsb', true); - xhr.responseType = 'arraybuffer'; - xhr.addEventListener('load', function() { - initializeNadgrid(xhr.response); - done(); - }); - xhr.addEventListener('error', done); - xhr.send(); - } else if (typeof require === 'function') { - const fs = require('fs'); - const path = require('path'); - fs.readFile(path.join(__dirname, 'ntv2_0_downsampled.gsb'), function(err, data) { - if (err) { - done(err); - } else { - initializeNadgrid(data.buffer); - done(); - } - }) - } - }); - - tests.forEach(function(test) { - var fromLng = test[0]; - var fromLat = test[1]; - var toLng = test[2]; - var toLat = test[3]; - it('should interpolate ' + [fromLng, fromLat] + ' to ' + [toLng, toLat], function () { - var actual = converter.forward([fromLng, fromLat]); - assert.approximately(actual[0], toLng, 0.000001); - assert.approximately(actual[1], toLat, 0.000001); - }); - }); - - var inverseTests = [ - [-44.5, 40.5, -44.498553, 40.500632], - [-60, 50, -59.999192, 50.000058] - ]; - - inverseTests.forEach(function(test) { - var fromLng = test[0]; - var fromLat = test[1]; - var toLng = test[2]; - var toLat = test[3]; - it('should inverse interpolate ' + [toLng, toLat] + ' to ' + [fromLng, fromLat], function () { - var actual = converter.inverse([toLng, toLat]); - assert.approximately(actual[0], fromLng, 0.000001); - assert.approximately(actual[1], fromLat, 0.000001); - }); - }); - }); - }); -} -if(typeof process !== 'undefined'&&process.toString() === '[object process]'){ - (function(){ - startTests(require('chai'), require('../dist/proj4-src'), require('./testData')); - })(); -} diff --git a/proj4js-master/test/testData.js b/proj4js-master/test/testData.js deleted file mode 100644 index d431d53d..00000000 --- a/proj4js-master/test/testData.js +++ /dev/null @@ -1,891 +0,0 @@ -var testPoints = [ - {code: 'testmerc', - xy: [-45007.0787624, 4151725.59875], - ll: [5.364315,46.623154] - }, - {code: 'testmerc2', - xy: [4156404,7480076.5], - ll: [37.33761240175515, 55.60447049026976] - }, - {code: 'PROJCS["CH1903 / LV03",GEOGCS["CH1903",DATUM["D_CH1903",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],UNIT["Meter",1]]', - xy: [660013.4882918689, 185172.17110117766], - ll: [8.225, 46.815], - acc:{ - xy: 0.1, - ll: 5 - } - }, - {code: 'PROJCS["CH1903 / LV03",GEOGCS["CH1903",DATUM["CH1903",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],TOWGS84[674.4,15.1,405.3,0,0,0,0],AUTHORITY["EPSG","6149"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4149"]],PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"],PARAMETER["latitude_of_center",46.95240555555556],PARAMETER["longitude_of_center",7.439583333333333],PARAMETER["azimuth",90],PARAMETER["rectified_grid_angle",90],PARAMETER["scale_factor",1],PARAMETER["false_easting",600000],PARAMETER["false_northing",200000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Y",EAST],AXIS["X",NORTH],AUTHORITY["EPSG","21781"]]', - xy: [660013.4882918689, 185172.17110117766], - ll: [8.225, 46.815], - acc:{ - xy: 0.1, - ll: 5 - } - }, - {code: 'PROJCS["NAD83 / Massachusetts Mainland",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],AUTHORITY["EPSG","26986"],AXIS["X",EAST],AXIS["Y",NORTH]]', - xy: [ 231394.84,902621.11], - ll: [-71.11881762742996,42.37346263960867] - }, - {code: 'PROJCS["NAD83 / Massachusetts Mainland",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",42.68333333333333],PARAMETER["standard_parallel_2",41.71666666666667],PARAMETER["latitude_of_origin",41],PARAMETER["central_meridian",-71.5],PARAMETER["false_easting",200000],PARAMETER["false_northing",750000],UNIT["Meter",1]]', - xy: [ 231394.84,902621.11], - ll: [-71.11881762742996,42.37346263960867] - }, - {code:'PROJCS["NAD83 / Massachusetts Mainland", GEOGCS["NAD83", DATUM["North American Datum 1983", SPHEROID["GRS 1980", 6378137.0, 298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0], AUTHORITY["EPSG","6269"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4269"]], PROJECTION["Lambert_Conformal_Conic_2SP", AUTHORITY["EPSG","9802"]], PARAMETER["central_meridian", -71.5], PARAMETER["latitude_of_origin", 41.0], PARAMETER["standard_parallel_1", 42.68333333333334], PARAMETER["false_easting", 200000.0], PARAMETER["false_northing", 750000.0], PARAMETER["scale_factor", 1.0], PARAMETER["standard_parallel_2", 41.71666666666667], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","26986"]]', - xy: [ 231394.84,902621.11], - ll: [-71.11881762742996,42.37346263960867] - }, - {code: 'PROJCS["Asia_North_Equidistant_Conic",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Equidistant_Conic"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",95],PARAMETER["Standard_Parallel_1",15],PARAMETER["Standard_Parallel_2",65],PARAMETER["Latitude_Of_Origin",30],UNIT["Meter",1]]', - xy: [88280.59904432714, 111340.90165417176], - ll: [96,31] - }, - {code: 'PROJCS["Asia_North_Equidistant_Conic",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Equidistant_Conic"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",95],PARAMETER["Standard_Parallel_1",15],PARAMETER["Standard_Parallel_2",65],PARAMETER["Latitude_Of_Origin",30],UNIT["Meter",1],AUTHORITY["EPSG","102026"]]', - xy: [88280.59904432714, 111340.90165417176], - ll: [96,31] - }, - {code: 'PROJCS["World_Sinusoidal",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Sinusoidal"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1],AUTHORITY["EPSG","54008"]]', - xy: [738509.49,5874620.38], - ll: [11.0, 53.0] - }, - {code: 'PROJCS["World_Sinusoidal",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Sinusoidal"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1]]', - xy: [738509.49,5874620.38], - ll: [11.0, 53.0] - }, - {code: 'PROJCS["ETRS89 / ETRS-LAEA",GEOGCS["ETRS89",DATUM["D_ETRS_1989",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_origin",52],PARAMETER["central_meridian",10],PARAMETER["false_easting",4321000],PARAMETER["false_northing",3210000],UNIT["Meter",1]]', - xy: [4388138.60, 3321736.46], - ll: [11.0, 53.0] - }, - {code: 'PROJCS["ETRS89 / ETRS-LAEA",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Azimuthal_Equal_Area"],PARAMETER["latitude_of_center",52],PARAMETER["longitude_of_center",10],PARAMETER["false_easting",4321000],PARAMETER["false_northing",3210000],AUTHORITY["EPSG","3035"],AXIS["X",EAST],AXIS["Y",NORTH]]', - xy: [4388138.60, 3321736.46], - ll: [11.0, 53.0] - }, - {code: 'EPSG:102018', - xy: [350577.5930806119, 4705857.070634324], - ll: [-75,46] - }, {code: '+proj=gnom +lat_0=90 +lon_0=0 +x_0=6300000 +y_0=6300000 +ellps=WGS84 +datum=WGS84 +units=m +no_defs', - xy: [350577.5930806119, 4705857.070634324], - ll: [-75,46] - }, - {code: 'PROJCS["NAD83(CSRS) / UTM zone 17N",GEOGCS["NAD83(CSRS)",DATUM["D_North_American_1983_CSRS98",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]', - xy: [411461.807497, 4700123.744402], - ll: [-82.07666015625, 42.448388671875] - }, - {code: 'PROJCS["NAD83(CSRS) / UTM zone 17N",GEOGCS["NAD83(CSRS)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4617"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-81],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2958"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]', - xy: [411461.807497, 4700123.744402], - ll: [-82.07666015625, 42.448388671875] - }, - {code: 'PROJCS["ETRS89 / UTM zone 32N",GEOGCS["ETRS89",DATUM["European_Terrestrial_Reference_System_1989",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6258"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4258"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",9],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","25832"]]', - xy: [-1877994.66, 3932281.56], - ll: [-16.10000000237, 32.879999998812] - }, - {code: 'PROJCS["NAD27 / UTM zone 14N",GEOGCS["NAD27 Coordinate System",DATUM["D_North American Datum 1927 (NAD27)",SPHEROID["Clarke_1866",6378206.4,294.97869821391]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-99],PARAMETER["scale_factor",0.9996],UNIT["Meter (m)",1]]', - xy: [2026074.9192811155, 12812891.606450122], - ll: [51.517955776474096, 61.56941794249017] - }, - {code: 'PROJCS["World_Mollweide",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mollweide"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1],AUTHORITY["EPSG","54009"]]', - xy: [3891383.58309223, 6876758.9933288], - ll: [60,60] - }, - {code: 'PROJCS["World_Mollweide",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mollweide"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1]]', - xy: [3891383.58309223, 6876758.9933288], - ll: [60,60] - }, - { - code:'PROJCS["NAD83 / BC Albers",GEOGCS["NAD83",DATUM["North_American_Datum_1983",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],AUTHORITY["EPSG","6269"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4269"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Albers_Conic_Equal_Area"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",58.5],PARAMETER["latitude_of_center",45],PARAMETER["longitude_of_center",-126],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],AUTHORITY["EPSG","3005"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]', - ll:[-126.54, 54.15], - xy:[964813.103719, 1016486.305862] - }, { - code:'PROJCS["NAD83 / BC Albers",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Albers"],PARAMETER["standard_parallel_1",50],PARAMETER["standard_parallel_2",58.5],PARAMETER["latitude_of_origin",45],PARAMETER["central_meridian",-126],PARAMETER["false_easting",1000000],PARAMETER["false_northing",0],UNIT["Meter",1]]', - ll:[-126.54, 54.15], - xy:[964813.103719, 1016486.305862] - }, - { - code:'PROJCS["Azimuthal_Equidistant",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Azimuthal_Equidistant"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Latitude_Of_Origin",0],UNIT["Meter",1]]', - ll:[0, 0], - xy:[0, 0] - }, - { - code:'PROJCS["Sphere_Azimuthal_Equidistant",GEOGCS["GCS_Sphere",DATUM["Not_specified_based_on_Authalic_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Azimuthal_Equidistant"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Latitude_Of_Origin",0],UNIT["Meter",1]]', - ll:[0, 0], - xy:[0, 0] - }, - { - code:'PROJCS["North_Pole_Azimuthal_Equidistant",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Azimuthal_Equidistant"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Latitude_Of_Origin",90],UNIT["Meter",1]]', - ll:[50.977303830208, 30.915260093747], - xy:[5112279.911077, -4143196.76625] - }, - { - code:'PROJCS["North_Pole_Azimuthal_Equidistant",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Azimuthal_Equidistant"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],PARAMETER["Latitude_Of_Origin",90],UNIT["Meter",1],AUTHORITY["EPSG","102016"]]', - ll:[50.977303830208, 30.915260093747], - xy:[5112279.911077, -4143196.76625] - }, - { - code:'PROJCS["Mount Dillon / Tobago Grid",GEOGCS["Mount Dillon",DATUM["Mount_Dillon",SPHEROID["Clarke 1858",6378293.645208759,294.2606763692654,AUTHORITY["EPSG","7007"]],AUTHORITY["EPSG","6157"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4157"]],UNIT["Clarke\'s link",0.201166195164,AUTHORITY["EPSG","9039"]],PROJECTION["Cassini_Soldner"],PARAMETER["latitude_of_origin",11.25217861111111],PARAMETER["central_meridian",-60.68600888888889],PARAMETER["false_easting",187500],PARAMETER["false_northing",180000],AUTHORITY["EPSG","2066"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]', - ll:[-60.676753018, 11.2487234308], - xy:[192524.3061766178, 178100.2740019509], - acc:{ - ll:1, - xy:-4 - } - }, { - code:'PROJCS["Mount Dillon / Tobago Grid",GEOGCS["Mount Dillon",DATUM["D_Mount_Dillon",SPHEROID["Clarke_1858",6378293.645208759,294.2606763692654]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Cassini"],PARAMETER["latitude_of_origin",11.25217861111111],PARAMETER["central_meridian",-60.68600888888889],PARAMETER["false_easting",187500],PARAMETER["false_northing",180000],UNIT["Clarke\'s link",0.201166195164]]', - ll:[-60.676753018, 11.2487234308], - xy:[192524.3061766178, 178100.2740019509], - acc:{ - ll:1, - xy:-4 - } - }, - // { - // code:'EPSG:3975', - // ll:[-9.764450683, 25.751953], - // xy:[-942135.525095996, 3178441.8667094777] - // }, - { - code:'PROJCS["World Equidistant Cylindrical (Sphere)",GEOGCS["Unspecified datum based upon the GRS 1980 Authalic Sphere",DATUM["Not_specified_based_on_GRS_1980_Authalic_Sphere",SPHEROID["GRS 1980 Authalic Sphere",6371007,0,AUTHORITY["EPSG","7048"]],AUTHORITY["EPSG","6047"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4047"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Equirectangular"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3786"],AXIS["X",EAST],AXIS["Y",NORTH]]', - ll:[-1.7539371169976, 12.632997701986], - xy:[-195029.12334755991, 1395621.9368162225], - acc:{ - ll:2 - } - }, { - code:'PROJCS["World Equidistant Cylindrical (Sphere)",GEOGCS["Unspecified datum based upon the GRS 1980 Authalic Sphere",DATUM["D_",SPHEROID["GRS_1980_Authalic_Sphere",6371007,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Equidistant_Cylindrical"],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]', - ll:[-1.7539371169976, 12.632997701986], - xy:[-195029.12334755991, 1395621.9368162225], - acc:{ - ll:2 - } - }, - { - code:'PROJCS["Segara / NEIEZ",GEOGCS["Segara",DATUM["Gunung_Segara",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6613"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4613"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],AUTHORITY["EPSG","3000"],AXIS["X",EAST],AXIS["Y",NORTH]]', - ll:[116.65547897884308 , -0.6595605286983485], - xy:[4638523.040740433, 827245.2586932715] - }, { - code:'PROJCS["Segara / NEIEZ",GEOGCS["Segara",DATUM["D_Gunung_Segara",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Mercator"],PARAMETER["central_meridian",110],PARAMETER["scale_factor",0.997],PARAMETER["false_easting",3900000],PARAMETER["false_northing",900000],UNIT["Meter",1]]', - ll:[116.65547897884308 , -0.6595605286983485], - xy:[4638523.040740433, 827245.2586932715] - }, - { - code:'PROJCS["Beduaram / TM 13 NE",GEOGCS["Beduaram",DATUM["Beduaram",SPHEROID["Clarke 1880 (IGN)",6378249.2,293.4660212936269,AUTHORITY["EPSG","7011"]],TOWGS84[-106,-87,188,0,0,0,0],AUTHORITY["EPSG","6213"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4213"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],AUTHORITY["EPSG","2931"],AXIS["X",EAST],AXIS["Y",NORTH]]', - ll:[5, 25], - xy:[-308919.1234711099, 2788738.255936392] - }, - { - code:'PROJCS["Beduaram / TM 13 NE",GEOGCS["Beduaram",DATUM["D_Beduaram",SPHEROID["Clarke_1880_IGN",6378249.2,293.4660212936269]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Transverse_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",13],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",0],UNIT["Meter",1]]', - ll:[5, 25], - xy:[-308919.1234711099, 2788738.255936392] - }, - { - code: '+proj=lcc +lat_1=49.5 +lat_0=49.5 +lon_0=0 +k_0=0.999877341 +x_0=600000 +y_0=1200000 +ellps=clrk80ign +pm=paris +towgs84=-168,-60,320,0,0,0,0 +units=m +no_defs +type=crs', - ll:[2.294482, 48.859045], - xy:[596916.561147926957, 1128733.073948238511] - }, - { - code:'PROJCS["S-JTSK (Ferro) / Krovak",GEOGCS["S-JTSK (Ferro)",DATUM["S_JTSK_Ferro",SPHEROID["Bessel 1841",6377397.155,299.1528128,AUTHORITY["EPSG","7004"]],AUTHORITY["EPSG","6818"]],PRIMEM["Ferro",-17.66666666666667,AUTHORITY["EPSG","8909"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4818"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Krovak"],PARAMETER["latitude_of_center",49.5],PARAMETER["longitude_of_center",42.5],PARAMETER["azimuth",30.28813972222222],PARAMETER["pseudo_standard_parallel_1",78.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","2065"],AXIS["Y",WEST],AXIS["X",SOUTH]]', - ll:[17.323583231075897, 49.39440725405376], - xy:[-544115.474379, -1144058.330762] - },{ - code:'PROJCS["S-JTSK (Ferro) / Krovak",GEOGCS["S-JTSK (Ferro)",DATUM["D_S_JTSK",SPHEROID["Bessel_1841",6377397.155,299.1528128]],PRIMEM["Ferro",-17.66666666666667],UNIT["Degree",0.017453292519943295]],PROJECTION["Krovak"],PARAMETER["latitude_of_center",49.5],PARAMETER["longitude_of_center",42.5],PARAMETER["azimuth",30.28813972222222],PARAMETER["pseudo_standard_parallel_1",78.5],PARAMETER["scale_factor",0.9999],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]', - ll:[17.323583231075897, 49.39440725405376], - xy:[-544115.474379, -1144058.330762] - },{ - code:'PROJCS["Sphere_Miller_Cylindrical",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Miller_Cylindrical"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1]]', - ll:[-1.3973289073953, 12.649176474268513 ], - xy:[-155375.88535614178, 1404635.2633403721], - acc:{ - ll:3 - } - },{ - code:'PROJCS["Sphere_Miller_Cylindrical",GEOGCS["GCS_Sphere",DATUM["Not_specified_based_on_Authalic_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Miller_Cylindrical"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1],AUTHORITY["EPSG","53003"]]', - ll:[-1.3973289073953, 12.649176474268513 ], - xy:[-155375.88535614178, 1404635.2633403721], - acc:{ - ll:3 - } - },{ - code:'PROJCS["NZGD49 / New Zealand Map Grid",GEOGCS["NZGD49",DATUM["D_New_Zealand_1949",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",173],PARAMETER["false_easting",2510000],PARAMETER["false_northing",6023150],UNIT["Meter",1]]', - ll:[172.465, -40.7], - xy:[2464770.343667, 6056137.861919] - },{ - code:'PROJCS["NZGD49 / New Zealand Map Grid",GEOGCS["NZGD49",DATUM["New_Zealand_Geodetic_Datum_1949",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[59.47,-5.04,187.44,0.47,-0.1,1.024,-4.5993],AUTHORITY["EPSG","6272"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4272"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["New_Zealand_Map_Grid"],PARAMETER["latitude_of_origin",-41],PARAMETER["central_meridian",173],PARAMETER["false_easting",2510000],PARAMETER["false_northing",6023150],AUTHORITY["EPSG","27200"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]', - ll:[172.465, -40.7], - xy:[2464770.343667, 6056137.861919] - },{ - code: 'PROJCS["Rassadiran / Nakhl e Taqi", GEOGCS["Rassadiran", DATUM["Rassadiran", SPHEROID["International 1924",6378388,297, AUTHORITY["EPSG","7022"]], TOWGS84[-133.63,-157.5,-158.62,0,0,0,0], AUTHORITY["EPSG","6153"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4153"]], PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center"], PARAMETER["latitude_of_center",27.51882880555555], PARAMETER["longitude_of_center",52.60353916666667], PARAMETER["azimuth",0.5716611944444444], PARAMETER["rectified_grid_angle",0.5716611944444444], PARAMETER["scale_factor",0.999895934], PARAMETER["false_easting",658377.437], PARAMETER["false_northing",3044969.194], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","2057"]]', - ll: [52.605, 27.5], - xy: [658511.261946, 3043003.05468], - acc: { - ll: 8, - xy: 6 - } - },{ - code:'PROJCS["SAD69 / Brazil Polyconic",GEOGCS["SAD69",DATUM["D_South_American_1969",SPHEROID["GRS_1967_SAD69",6378160,298.25]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]', - ll:[-49.221772553812, -0.34551739237581], - xy:[5531902.134932, 9961660.779347], - acc:{ - ll:3, - xy:-2 - } - },{ - code:'PROJCS["SAD69 / Brazil Polyconic",GEOGCS["SAD69",DATUM["South_American_Datum_1969",SPHEROID["GRS 1967 (SAD69)",6378160,298.25,AUTHORITY["EPSG","7050"]],AUTHORITY["EPSG","6618"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4618"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polyconic"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-54],PARAMETER["false_easting",5000000],PARAMETER["false_northing",10000000],AUTHORITY["EPSG","29101"],AXIS["X",EAST],AXIS["Y",NORTH]]', - ll:[-49.221772553812, -0.34551739237581], - xy:[5531902.134932, 9961660.779347], - acc:{ - ll:3, - xy:-2 - } - },{ - code:'PROJCS["WGS 84 / UPS North",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.994],PARAMETER["false_easting",2000000],PARAMETER["false_northing",2000000],AUTHORITY["EPSG","32661"],AXIS["Easting",UNKNOWN],AXIS["Northing",UNKNOWN]]', - ll:[0, 75], - xy:[2000000, 325449.806286] - },{ - code:'PROJCS["WGS 84 / UPS North",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Stereographic_North_Pole"],PARAMETER["standard_parallel_1",90],PARAMETER["central_meridian",0],PARAMETER["scale_factor",0.994],PARAMETER["false_easting",2000000],PARAMETER["false_northing",2000000],UNIT["Meter",1]]', - ll:[0, 75], - xy:[2000000, 325449.806286] - },{ - code:'+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', - ll:[2, 0], - xy:[222638.98158654713, 0] - },{ - code:'+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', - ll:[89, 0], - xy:[9907434.680601358, 0] - },{ -// code:'+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', -// ll:[91, 0], -// xy:[10130073.6622, 0] -// },{ - code:'+proj=aeqd +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs', - ll:[91, 0], - xy:[10118738.32, 0.00] - },{ - code:'+proj=laea +lat_0=2 +lon_0=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs', - ll:[1, 2], - xy:[0, 0] - },{ - code:'+proj=laea +lat_0=1 +lon_0=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs', - ll:[1, 1], - xy:[0, 0] - },{ - code:'+proj=laea +lat_0=1 +lon_0=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs', - ll:[2, 1], - xy:[111176.58, 16.93] - },{ - code:'+proj=laea +lat_0=1 +lon_0=1 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs', - ll:[1, 2], - xy:[0.00,111193.52] - },{ - code:'+proj=laea +lat_0=0 +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs', - ll:[19, 0], - xy:[2103036.59, 0.00] - },{ - code:'+proj=stere +lat_0=-90 +lat_ts=-70 +lon_0=0 +k=1 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs"', - ll:[0, -72.5], - xy:[0, 1910008.78441421] - },{ - code:'+proj=stere +lat_0=-90 +lon_0=0 +x_0=0 +y_0=0 +a=3396000 +b=3396000 +units=m +no_defs', - ll:[0, -72.5], - xy:[0, 1045388.79] - },{ - code:'+proj=stere', - ll:[0, -72.5], - xy:[0, -9334375.897187851] - },{ - // Test that lat_ts at a pole is handled correctly in stere projection - code:'+no_defs +units=m +ellps=GRS80 +lon_0=0 +proj=stere +lat_ts=90.0 +lat_0=90 +x_0=0 +y_0=0', - ll:[69.648700, 18.955781], - xy:[8527917.706, -3163255.729] - },{ - code:'PROJCS["WGS 84 / NSIDC Sea Ice Polar Stereographic South", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH], AUTHORITY["EPSG","4326"]], PROJECTION["Polar Stereographic (variant B)", AUTHORITY["EPSG","9829"]], PARAMETER["central_meridian", 0.0], PARAMETER["Standard_Parallel_1", -70.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", "North along 90 deg East"], AXIS["Northing", "North along 0 deg"], AUTHORITY["EPSG","3976"]]', - ll:[0, -72.5], - xy:[0, 1910008.78441421] - },{ - code:'PROJCS["NAD83(CSRS98) / New Brunswick Stereo (deprecated)",GEOGCS["NAD83(CSRS98)",DATUM["D_North_American_1983_CSRS98",SPHEROID["GRS_1980",6378137,298.257222101]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Stereographic_North_Pole"],PARAMETER["standard_parallel_1",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],UNIT["Meter",1]]', - ll:[-66.415, 46.34], - xy:[2506543.370459, 7482219.546176] - },{ - code:'PROJCS["NAD83(CSRS98) / New Brunswick Stereo (deprecated)",GEOGCS["NAD83(CSRS98)",DATUM["NAD83_Canadian_Spatial_Reference_System",SPHEROID["GRS 1980",6378137,298.257222101,AUTHORITY["EPSG","7019"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6140"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9108"]],AUTHORITY["EPSG","4140"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Oblique_Stereographic"],PARAMETER["latitude_of_origin",46.5],PARAMETER["central_meridian",-66.5],PARAMETER["scale_factor",0.999912],PARAMETER["false_easting",2500000],PARAMETER["false_northing",7500000],AUTHORITY["EPSG","2036"],AXIS["Easting",EAST],AXIS["Northing",NORTH]]', - ll:[-66.415, 46.34], - xy:[2506543.370459, 7482219.546176] - },{ - code:'PROJCS["Sphere_Van_der_Grinten_I",GEOGCS["GCS_Sphere",DATUM["D_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Van_der_Grinten_I"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1]]', - ll:[-1.41160801956, 67.40891366748], - xy:[-125108.675828, 9016899.042114], - acc:{ - ll:0, - xy:-5 - } - },{ - code:'PROJCS["Sphere_Van_der_Grinten_I",GEOGCS["GCS_Sphere",DATUM["Not_specified_based_on_Authalic_Sphere",SPHEROID["Sphere",6371000,0]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["VanDerGrinten"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1],AUTHORITY["EPSG","53029"]]', - ll:[-1.41160801956, 67.40891366748], - xy:[-125108.675828, 9016899.042114], - acc:{ - ll:0, - xy:-5 - } - },{ - code:'PROJCS["NAD_1983_StatePlane_New_Jersey_FIPS_2900_Feet",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",492125.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-74.5],PARAMETER["Scale_Factor",0.9999],PARAMETER["Latitude_Of_Origin",38.83333333333334],UNIT["Foot_US",0.3048006096012192]]', - ll:[-74,41], - xy:[630128.205,789591.522] - }, - { - code:'esriOnline', - ll:[-74,41], - xy:[-8237642.318702244, 5012341.663847514] - }, - { - code: '+proj=sinu +lon_0=0 +x_0=0 +y_0=0 +a=6371000 +b=6371000 +units=m +no_defs', - xy: [736106.55, 5893331.11], - ll: [11.0, 53.0] - }, - { - code:'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],AUTHORITY["EPSG","31370"],AXIS["X",EAST],AXIS["Y",NORTH]]', - xy:[104588.196404, 193175.582367], - ll:[3.7186701465384533,51.04642936832842] - }, - { - code:'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["D_Belge_1972",SPHEROID["International_1924",6378388,297]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Lambert_Conformal_Conic"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],UNIT["Meter",1]]', - xy:[104588.196404, 193175.582367], - ll:[3.7186701465384533,51.04642936832842] - }, - { - code:'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-106.8686,52.2978,-103.7239,-0.3366,0.457,-1.8422,-1.2747],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","31370"]]', - xy:[104469.69796438649, 193146.39675426576], - ll:[3.7186701465384533,51.04642936832842] - }, - { - code:'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-99.059,53.322,-112.486,-0.419,0.83,-1.885,-1],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","31370"]]', - xy:[104468.8305227503, 193169.6828284394], - ll:[3.7186701465384533,51.04642936832842] - }, - { - code:'PROJCS["Belge 1972 / Belgian Lambert 72",GEOGCS["Belge 1972",DATUM["Reseau_National_Belge_1972",SPHEROID["International 1924",6378388,297,AUTHORITY["EPSG","7022"]],TOWGS84[-125.8,79.9,-100.5,0,0,0,0],AUTHORITY["EPSG","6313"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4313"]],PROJECTION["Lambert_Conformal_Conic_2SP"],PARAMETER["standard_parallel_1",51.16666723333333],PARAMETER["standard_parallel_2",49.8333339],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",4.367486666666666],PARAMETER["false_easting",150000.013],PARAMETER["false_northing",5400088.438],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],AUTHORITY["EPSG","31370"]]', - xy:[104412.1099068548, 193116.8535417635], - ll:[3.7186701465384533,51.04642936832842] - }, - { - code:'+proj=lcc +lat_1=51.16666723333333 +lat_2=49.8333339 +lat_0=90 +lon_0=4.367486666666666 +x_0=150000.013 +y_0=5400088.438 +ellps=intl +towgs84=106.869,-52.2978,103.724,-0.33657,0.456955,-1.84218,1 +units=m +no_defs ', - xy:[104588.196404, 193175.582367], - ll:[3.7186701465384533,51.04642936832842] - }, - { - code: 'PROJCS["JAD2001 / Jamaica Metric Grid",GEOGCS["JAD2001",DATUM["Jamaica_2001",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],TOWGS84[0,0,0,0,0,0,0],AUTHORITY["EPSG","6758"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4758"]],PROJECTION["Lambert_Conformal_Conic_1SP"],PARAMETER["latitude_of_origin",18],PARAMETER["central_meridian",-77],PARAMETER["scale_factor",1],PARAMETER["false_easting",750000],PARAMETER["false_northing",650000],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["Easting",EAST],AXIS["Northing",NORTH],AUTHORITY["EPSG","3448"]]', - xy: [7578825.28673236, 11374595.814939449], - ll: [44.2312, 76.4860], - }, - { - code:"+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs", - ll:[-3.20078, 55.96056], - xy:[325132.0089586496, 674822.638235305] - }, - { - code:"+proj=krovak +lat_0=49.5 +lon_0=24.83333333333333 +alpha=30.28813972222222 +k=0.9999 +x_0=0 +y_0=0 +ellps=bessel +pm=greenwich +units=m +no_defs +towgs84=570.8,85.7,462.8,4.998,1.587,5.261,3.56", - ll: [12.806988, 49.452262], - xy: [-868208.61, -1095793.64] - }, - { - code:"+proj=tmerc +lat_0=40.5 +lon_0=-110.0833333333333 +k=0.9999375 +x_0=800000.0000101599 +y_0=99999.99998983997 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=us-ft +no_defs", - ll: [-110.8, 43.5], - xy: [2434515.870, 1422072.711] - }, - // QSC WGS84 - { - code: '+proj=qsc +lat_0=0 +lon_0=0 +units=m +datum=WGS84', - ll: [2, 1], - xy: [304638.4508447283296846, 164123.8709293559950311] - }, - { - code: '+proj=qsc +lat_0=0 +lon_0=90 +units=m +datum=WGS84', - ll: [2, 1], - xy: [-11576764.4717786349356174, 224687.8649776891397778] - }, - { - code: '+proj=qsc +lat_0=0 +lon_0=180 +units=m +datum=WGS84', - ll: [2, 1], - xy: [-15631296.4526007361710072, 8421356.1168374437838793] - }, - { - code: '+proj=qsc +lat_0=0 +lon_0=-90 +units=m +datum=WGS84', - ll: [2, 1], - xy: [11988027.5987015366554260, 232669.8736086514254566 - ] - }, - { - code: '+proj=qsc +lat_0=90 +lon_0=0 +units=m +datum=WGS84', - ll: [2, 1], - xy: [456180.4073964518611319, -11678366.5914389267563820 - ] - }, - { - code: '+proj=qsc +lat_0=-90 +lon_0=0 +units=m +datum=WGS84', - ll: [2, 1], - xy: [464158.3228444084525108, 11882603.8180405404418707] - }, - // QSC WGS84 WKT - { - code: 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Quadrilateralized_Spherical_Cube"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",0],UNIT["Meter",1]]', - ll: [2, 1], - xy: [304638.4508447283296846, 164123.8709293559950311] - }, - { - code: 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Quadrilateralized_Spherical_Cube"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",90],UNIT["Meter",1]]', - ll: [2, 1], - xy: [-11576764.4717786349356174, 224687.8649776891397778] - }, - { - code: 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Quadrilateralized_Spherical_Cube"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",180],UNIT["Meter",1]]', - ll: [2, 1], - xy: [-15631296.4526007361710072, 8421356.1168374437838793] - }, - { - code: 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Quadrilateralized_Spherical_Cube"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",-90],UNIT["Meter",1]]', - ll: [2, 1], - xy: [11988027.5987015366554260, 232669.8736086514254566 - ] - }, - { - code: 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Quadrilateralized_Spherical_Cube"],PARAMETER["latitude_of_origin",90],PARAMETER["central_meridian",0],UNIT["Meter",1]]', - ll: [2, 1], - xy: [456180.4073964518611319, -11678366.5914389267563820 - ] - }, - { - code: 'PROJCS["unnamed",GEOGCS["WGS 84",DATUM["unknown",SPHEROID["WGS84",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Quadrilateralized_Spherical_Cube"],PARAMETER["latitude_of_origin",-90],PARAMETER["central_meridian",0],UNIT["Meter",1]]', - ll: [2, 1], - xy: [464158.3228444084525108, 11882603.8180405404418707] - }, - // QSC Mars - { - code: '+proj=qsc +units=m +a=3396190 +b=3376200 +lat_0=0 +lon_0=0', - ll: [2, 1], - xy: [162139.9347801624389831, 86935.6184961361577734] - }, - { - code: '+proj=qsc +units=m +a=3396190 +b=3376200 +lat_0=0 +lon_0=90', - ll: [2, 1], - xy: [-6164327.7345527401193976,119033.1141843862715177] - }, - { - code: '+proj=qsc +units=m +a=3396190 +b=3376200 +lat_0=0 +lon_0=180', - ll: [2, 1], - xy: [-8327904.7183852149173617, 4465226.5862284321337938] - }, - { - code: '+proj=qsc +units=m +a=3396190 +b=3376200 +lat_0=0 +lon_0=-90', - ll: [2, 1], - xy: [6383315.0547841880470514, 123261.7574065744993277] - }, - { - code: '+proj=qsc +units=m +a=3396190 +b=3376200 +lat_0=90 +lon_0=0', - ll: [2, 1], - xy: [242914.9289354820502922, -6218701.0766915259882808] - }, - { - code: '+proj=qsc +units=m +a=3396190 +b=3376200 +lat_0=-90 +lon_0=0', - ll: [2, 1], - xy: [247141.3965058987669181, 6326900.0192015860229731] - }, - // Robinson - { - code: '+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', - ll: [-15, -35], - xy: [-1335949.91, -3743319.07], - acc: {ll: 4, xy: 0} - }, - { - code: '+proj=robin +lon_0=0 +x_0=0 +y_0=0 +datum=WGS84 +units=m +no_defs', - ll: [-10, 50], - xy: [-819964.60, 5326895.52], - acc: {ll: 4, xy: 0} - }, - { - code: '+proj=robin +a=6400000', - ll: [80, -20], - xy: [7449059.80, -2146370.56], - acc: {ll: 4, xy: 0} - }, - { - code: '+proj=robin +lon_0=15 +x_0=100000 +y_0=100000 +datum=WGS84', - ll: [-35, 40], - xy: [-4253493.26, 4376351.58], - acc: {ll: 4, xy: 0} - }, - { - code: 'PROJCS["World_Robinson",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Robinson"],PARAMETER["False_Easting",0],PARAMETER["False_Northing",0],PARAMETER["Central_Meridian",0],UNIT["Meter",1]]', - ll: [20, 40], - xy: [1741397.30, 4276351.58], - acc: {ll: 4, xy: 0} - }, - { - code: 'PROJCS["World_Robinson",GEOGCS["GCS_WGS_1984",DATUM["WGS_1984",SPHEROID["WGS_1984",6378137,298.257223563]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Robinson"],PARAMETER["False_Easting",100000],PARAMETER["False_Northing",100000],PARAMETER["Central_Meridian",15],UNIT["Meter",1]]', - ll: [-35, 40], - xy: [-4253493.26, 4376351.58], - acc: {ll: 4, xy: 0} - }, - { - code: '+proj=robin +lon_0=162 +x_0=0 +y_0=0 +ellps=WGS84 +datum=WGS84 +units=m +no_defs', - ll: [-90, 22], - xy: [9987057.08, 2352946.55], - acc: {ll: 4, xy: 0} - }, - // check that coordinates at 180 and -180 deg. longitude don't wrap around - { - code: 'EPSG:3857', - ll: [-180, 0], - xy: [-20037508.342789, 0] - }, - { - code: 'EPSG:3857', - ll: [180, 0], - xy: [20037508.342789, 0] - }, - // these test cases are taken from mapshaper-proj and the test results match - { - code: '+proj=tmerc +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5', - ll: [2, 1], - xy: [222650.79679577847, 110642.2294119271] - }, - { - code: '+proj=tmerc +approx +a=6400000 +lat_1=0.5 +lat_2=2 +n=0.5', - ll: [2, 1], - xy: [223413.46640632232, 111769.14504059685] - }, - { - code: '+proj=etmerc +zone=30 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5', - ll: [2, 1], - xy: [222650.7967975856, 110642.2294119332] - }, - { - code: '+proj=etmerc +k=0.998 +lon_0=-20 +datum=WGS84 +x_0=10000 +y_0=20000', - ll: [2, 1], - xy: [2516532.477709202, 139083.35793371277] - }, - { - code: '+proj=utm +zone=30 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5', - ll: [2, 1], - xy: [1057002.405491298, 110955.14117594929] - }, - { - code: '+proj=utm +lon_0=-3 +ellps=GRS80 +lat_1=0.5 +lat_2=2 +n=0.5', - ll: [2, 1], - xy: [1057002.4052152266, 110955.14117382761] - }, - // these test cases are related to the original issue on GitHub - { - code: '+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs', - ll: [2, 1], - xy: [-959006.4926646841, 113457.31956265299] - }, - { - code: '+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs', - ll: [31, 70], - xy: [1104629.4356366363, 7845845.077685604] - }, - // these test cases are for Norway snow flake zones - { - code: '+proj=utm +zone=31 +datum=WGS84 +units=m +no_defs', - ll: [59.121778, 1.508527], - xy: [8089746.634775677, 301230.8618526573] - }, - { - code: '+proj=utm +zone=32 +datum=WGS84 +units=m +no_defs', - ll: [59.121778, 1.508527], - xy: [6969865.865375574, 261237.08330733588] - }, - { - code: '+proj=utm +zone=33 +datum=WGS84 +units=m +no_defs', - ll: [59.121778, 1.508527], - xy: [5984417.050333044, 232959.75386279594] - }, - { - code: '+proj=utm +zone=34 +datum=WGS84 +units=m +no_defs', - ll: [79.070672, 20.520579], - xy: [7421462.108989433, 3922366.25143021] - }, - { - code: '+proj=utm +zone=35 +datum=WGS84 +units=m +no_defs', - ll: [79.070672, 20.520579], - xy: [6548241.281523044, 3478520.1422119136] - }, - // these test cases are for the margin zones 1 and 60 - { - code: '+proj=utm +zone=1 +datum=WGS84 +units=m +no_defs', - ll: [-177, 60], - xy: [500000, 6651411.190362714] - }, - { - code: '+proj=utm +zone=60 +datum=WGS84 +units=m +no_defs', - ll: [177, 60], - xy: [500000.0000000014, 6651411.190362714] - }, - { - code: '+proj=lcc +lat_1=46.8 +lat_0=46.8 +lon_0=0 +k_0=0.99987742 +x_0=600000 +y_0=2200000 +a=6378249.2 +b=6356515 +towgs84=-168,-60,320,0,0,0,0 +pm=paris +units=m +no_defs', - ll: [1.4477496, 46.8692953], - xy: [532247.285, 2208091.8723] - }, - { - code: '+proj=utm +zone=33 +units=m +no_defs', - ll: [2, 1], - xy: [-959006.4926646841, 113457.31956265299] - }, - { - code: '+proj=utm +zone=33 +units=m', - ll: [2, 1], - xy: [-959006.4926646841, 113457.31956265299] - }, - { - code: '+proj=utm +zone=33', - ll: [2, 1], - xy: [-959006.4926646841, 113457.31956265299] - }, - { - code: 'PROJCS["CUSTOM_OBLIQUE_MERCATOR", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST]], PROJECTION["Hotine_Oblique_Mercator_Azimuth_Center", AUTHORITY["EPSG", "9815"]], PARAMETER["latitude_of_center", 37.50832038], PARAMETER["longitude_of_center", -122.25064809], PARAMETER["azimuth", 45.0], PARAMETER["rectified_grid_angle", -3.99], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", -361.25], PARAMETER["false_northing", 254.915], UNIT["foot", 0.3048], AXIS["Easting", EAST], AXIS["Northing", NORTH]]', - xy: [-361.2499999983702, 254.91500000283122], - ll: [-122.25064809, 37.50832038], - acc:{ - ll: 3, - xy: 8 - } - }, - // Omerc Type A - #273 - { - code: '+proj=omerc +lat_0=4 +lonc=102.25 +alpha=323.0257964666666 +k=0.99984 +x_0=804671 +y_0=0 +no_uoff +gamma=323.1301023611111 +ellps=GRS80 +units=m +no_defs', - xy: [412597.532715, 338944.957259], - ll: [101.70979078430528, 3.06268465621428], - acc:{ - ll: 2, - xy: -3 - } - }, - { - code: 'PROJCS["GDM2000 / Peninsula RSO", GEOGCS["GDM2000", DATUM["Geodetic_Datum_of_Malaysia_2000", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], AUTHORITY["EPSG","6742"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4742"]], PROJECTION["Hotine_Oblique_Mercator"], PARAMETER["latitude_of_center",4], PARAMETER["longitude_of_center",102.25], PARAMETER["azimuth",323.0257964666666], PARAMETER["rectified_grid_angle",323.1301023611111], PARAMETER["scale_factor",0.99984], PARAMETER["false_easting",804671], PARAMETER["false_northing",0], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["Easting",EAST], AXIS["Northing",NORTH], AUTHORITY["EPSG","3375"]]', - xy: [412597.532715, 338944.957259], - ll: [101.70979078430528, 3.06268465621428], - acc:{ - ll: 7, - xy: 6 - } - }, - // EPSG:3468 - { - code: '+proj=omerc +lat_0=57 +lonc=-133.6666666666667 +alpha=323.1301023611111 +k=0.9999 +x_0=5000000 +y_0=-5000000 +no_uoff +gamma=323.1301023611111 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs', - xy: [1264314.74, -763162.04], - ll: [-128.115000029, 44.8150000066], - acc:{ - ll: 9, - xy: 4 - } - }, - { - code: 'PROJCS["NAD83(NSRS2007) / Alaska zone 1", GEOGCS["NAD83(NSRS2007)", DATUM["NAD83_National_Spatial_Reference_System_2007", SPHEROID["GRS 1980",6378137,298.257222101, AUTHORITY["EPSG","7019"]], TOWGS84[0,0,0,0,0,0,0], AUTHORITY["EPSG","6759"]], PRIMEM["Greenwich",0, AUTHORITY["EPSG","8901"]], UNIT["degree",0.0174532925199433, AUTHORITY["EPSG","9122"]], AUTHORITY["EPSG","4759"]], PROJECTION["Hotine_Oblique_Mercator"], PARAMETER["latitude_of_center",57], PARAMETER["longitude_of_center",-133.6666666666667], PARAMETER["azimuth",323.1301023611111], PARAMETER["rectified_grid_angle",323.1301023611111], PARAMETER["scale_factor",0.9999], PARAMETER["false_easting",5000000], PARAMETER["false_northing",-5000000], UNIT["metre",1, AUTHORITY["EPSG","9001"]], AXIS["X",EAST], AXIS["Y",NORTH], AUTHORITY["EPSG","3468"]]', - xy: [1264314.74, -763162.04], - ll: [-128.115000029, 44.8150000066], - acc:{ - ll: 9, - xy: 4 - } - }, - // Omerc Type B - #308 - { - code: '+proj=omerc +lat_0=37.4769061 +lonc=141.0039618 +alpha=202.22 +k=1 +x_0=138 +y_0=77.65 +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs', - xy: [168.2438, 64.1736], - ll: [141.003611, 37.476802], - acc:{ - ll: 9, - xy: 4 - } - }, - { - code: 'PROJCS["UNK / Oblique_Mercator",GEOGCS["UNK",DATUM["Unknown datum",SPHEROID["WGS 84", 6378137.0, 298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.017453292519943295]],PROJECTION["Oblique_Mercator"],PARAMETER["latitude_of_center",37.4769061],PARAMETER["longitude_of_center",141.0039618],PARAMETER["central_meridian",141.0039618],PARAMETER["azimuth",202.22],PARAMETER["scale_factor",1],PARAMETER["false_easting",138],PARAMETER["false_northing",77.65],UNIT["Meter",1]]', - xy: [168.2438, 64.1736], - ll: [141.003611, 37.476802], - acc:{ - ll: 9, - xy: 4 - } - }, - // Test with Feet - { - code: 'PROJCS["UNK / Oblique_Mercator",GEOGCS["UNK",DATUM["Unknown datum",SPHEROID["WGS 84", 6378137.0, 298.257223563]],PRIMEM["Greenwich",0],UNIT["degree",0.017453292519943295]],PROJECTION["Oblique_Mercator"],PARAMETER["latitude_of_center",37.4769061],PARAMETER["longitude_of_center",141.0039618],PARAMETER["central_meridian",141.0039618],PARAMETER["azimuth",202.22],PARAMETER["scale_factor",1],PARAMETER["false_easting",138],PARAMETER["false_northing",77.65],UNIT["Foot_US",0.3048006096012192]]', - xy: [237.22488871325027, 33.43626458451221], - ll: [141.003611, 37.476802], - }, - { - code: 'PROJCS["WGS 84 / Pseudo-Mercator", GEOGCS["WGS 84", DATUM["World Geodetic System 1984", SPHEROID["WGS 84", 6378137.0, 0, AUTHORITY["EPSG","7030"]], AUTHORITY["EPSG","6326"]], PRIMEM["Greenwich", 0.0, AUTHORITY["EPSG","8901"]], UNIT["degree", 0.017453292519943295], AXIS["Geodetic latitude", NORTH], AXIS["Geodetic longitude", EAST], AUTHORITY["EPSG","4326"]], PROJECTION["Popular Visualisation Pseudo Mercator", AUTHORITY["EPSG","1024"]], PARAMETER["semi_minor", 6378137.0], PARAMETER["latitude_of_origin", 0.0], PARAMETER["central_meridian", 0.0], PARAMETER["scale_factor", 1.0], PARAMETER["false_easting", 0.0], PARAMETER["false_northing", 0.0], UNIT["m", 1.0], AXIS["Easting", EAST], AXIS["Northing", NORTH], AUTHORITY["EPSG","3857"]]', - xy: [-12523490.49256873, 5166512.50707369], - ll: [-112.50042920000004, 42.036926809999976] - }, - { - code: 'PROJCS["WGS 84 / Pseudo-Mercator",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Mercator_1SP"],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AXIS["X",EAST],AXIS["Y",NORTH],EXTENSION["PROJ4","+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs"],AUTHORITY["EPSG","9999"]]', - xy: [-12523490.49256873, 5166512.50707369], - ll: [-112.50042920000004, 42.036926809999976] - }, - { - code: '+proj=geocent +datum=WGS84 +units=m +no_defs', - ll: [-7.56234, 38.96618, 0], - xy: [4922499, -653508, 3989398], - acc: { - ll: 0, - xy: 0 - } - }, - { - code: '+proj=geocent +ellps=GRS80 +units=m +no_defs', - ll: [-7.56234, 38.96618, 1], - xy: [4922499, -653508, 3989399], - acc: { - ll: 0, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +azi=20', - ll: [2, 1], - xy: [170820.288955531, 180460.865555805], - acc: { - ll: 5, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +azi=20', - ll: [2, -1], - xy: [246853.941538942, -28439.878035775], - acc: { - ll: 5, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +azi=20', - ll: [-2, 1], - xy: [-246853.941538942, 28439.878035775], - acc: { - ll: 5, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +azi=20', - ll: [-2, -1], - xy: [-170820.288955531, -180460.865555805], - acc: { - ll: 5, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +tilt=20', - ll: [2, 1], - xy: [213598.340357101, 113687.930830744], - acc: { - ll: 5, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +tilt=20', - ll: [2, -1], - xy: [231609.982792523, -123274.645577324], - acc: { - ll: 5, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +tilt=20', - ll: [-2, 1], - xy: [-213598.340357101, 113687.930830744], - acc: { - ll: 5, - xy: 0 - } - }, - { - code: '+proj=tpers +a=6400000 +h=1000000 +tilt=20', - ll: [-2, -1], - xy: [-231609.982792523, -123274.645577324], - acc: { - ll: 5, - xy: 0 - } - }, - // Geostationary - Ellipsoid - X Sweep - { - code: '+proj=geos +sweep=x +lon_0=-75 +h=35786023 +a=6378137.0 +b=6356752.314', - ll: [-95, 25], - xy: [-1920508.77, 2605680.03], - }, - // Geostationary - Ellipsoid - Y Sweep - { - code: '+proj=geos +sweep=y +lon_0=-75 +h=35786023 +a=6378137.0 +b=6356752.314', - ll: [-95, 25], - xy: [-1925601.20, 2601922.01], - }, - // Geostationary - Sphere - X Sweep - { - code: '+proj=geos +sweep=x +lon_0=-75 +h=35786023 +a=6378137.0 +b=6378137.0', - ll: [-95, 25], - xy: [-1919131.48, 2621384.15], - }, - // Geostationary - Sphere - Y Sweep - { - code: '+proj=geos +sweep=y +lon_0=-75 +h=35786023 +a=6378137.0 +b=6378137.0', - ll: [-95, 25], - xy: [-1924281.93, 2617608.82], - }, - // WKT - Arctic Polar Stereographic - { - code: 'PROJCS["WGS 84 / Arctic Polar Stereographic",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",71],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3995"]]', - ll: [0, 90], - xy: [0, 0], - }, - { - code: 'PROJCS["WGS 84 / Arctic Polar Stereographic",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",71],PARAMETER["central_meridian",0],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["metre",1,AUTHORITY["EPSG","9001"]],AUTHORITY["EPSG","3995"]]', - ll: [0, 0], - xy: [0, -12367396.218459858], - }, - // WKT - Antarctic Polar Stereographic - { - code: 'PROJCS["WGS 84 / Antarctic Polar Stereographic",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-71],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3031"]]', - ll: [0, -90], - xy: [0, 0], - }, - { - code: 'PROJCS["WGS 84 / Antarctic Polar Stereographic",GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.01745329251994328,AUTHORITY["EPSG","9122"]],AUTHORITY["EPSG","4326"]],UNIT["metre",1,AUTHORITY["EPSG","9001"]],PROJECTION["Polar_Stereographic"],PARAMETER["latitude_of_origin",-71],PARAMETER["central_meridian",0],PARAMETER["scale_factor",1],PARAMETER["false_easting",0],PARAMETER["false_northing",0],AUTHORITY["EPSG","3031"]]', - ll: [0, 0], - xy: [0, 12367396.218459858], - }, - { - code: '+proj=eqearth +lon_0=0 +x_0=0 +y_0=0 +R=6371008.7714 +units=m +no_defs +type=crs', - ll: [16, 48], - xy: [1284600.7230114893, 5794915.366010354] - }, - { - code: '+proj=eqearth +lon_0=150 +x_0=0 +y_0=0 +R=6371008.7714 +units=m +no_defs +type=crs', - ll: [16, 48], - xy: [-10758531.055221224, 5794915.366010354] - }, - { - code: '+proj=bonne +lat_1=10 +lon_0=10', - ll: [4.9, 52.366667], - xy: [-347381.937958562, 4700204.94589969] - }, - { - code: '+proj=bonne +a=6400000 +lat_1=0.5 +lat_2=2', - ll: [2, 1], - xy: [223368.11557252839, 55884.555246393575] - }, - { - code: '+proj=bonne +ellps=GRS80 +lat_1=0.5 +lat_2=2', - ll: [2, 1], - xy: [222605.29609715697, 55321.139565494814] - } -]; -if (typeof module !== 'undefined') { - module.exports = testPoints; -} else if (typeof define === 'function') { - define(function () { - return testPoints; - }); -} diff --git a/src/dataStore/file.ts b/src/dataStore/file.ts index d8a7af83..202fbd2e 100644 --- a/src/dataStore/file.ts +++ b/src/dataStore/file.ts @@ -1,12 +1,22 @@ +import externalSort from './externalSort'; import { closeSync, fstatSync, openSync, readSync, writeSync } from 'fs'; - -import type { Uint64Cell } from '../wasm/uint64'; -import type { Key, Stringifiable } from '..'; - -/** A low/high pair for faster comparisons */ -interface LowHigh { - low: number; - high: number; +import { compare, toCell } from '../dataStructures/uint64'; + +import type { Stringifiable } from '..'; +import type { Uint64, Uint64Cell } from '../dataStructures/uint64'; + +/** Options to create a S2FileStore */ +export interface Options { + /** If true, then the values are stored in the index section of the keys file */ + valuesAreIndex?: boolean; + /** If true, then the data is already sorted and get calls can be immediately returned */ + isSorted?: boolean; + /** The maximum heap size in bytes for each grouping of data. */ + maxHeap?: number; + /** The number of threads to use for sorting */ + threadCount?: number; + /** If desired, a temporary directory to use */ + tmpDir?: string; } /** @@ -19,47 +29,55 @@ export class S2FileStore { #state: 'read' | 'write' = 'read'; #size = 0; #sorted: boolean; + #maxHeap?: number; + #threadCount?: number; + #tmpDir?: string; // options #indexIsValues = false; // write params #valueOffset = 0; - #keyFd: number; - #valueFd: number; + // read write fd + #keyFd: number = -1; + #valueFd: number = -1; /** * Builds a new File based KV - * @param path - the path to the file - * @param isSorted - set to true if the keys are already sorted - * @param valuesAreIndex - set to true if the values are stored in the index section of the keys file + * @param fileName - the path + file name without the extension + * @param options - the options of how the store should be created and ued */ constructor( - public readonly path: string, - isSorted = false, - valuesAreIndex = false, + public readonly fileName: string, + options?: Options, ) { - this.#sorted = isSorted; - this.#indexIsValues = valuesAreIndex; - this.#keyFd = openSync(`${path}.keys`, 'a'); - if (!this.#indexIsValues) this.#valueFd = openSync(`${path}.values`, 'a'); - else this.#valueFd = -1; + this.#sorted = options?.isSorted ?? false; + this.#indexIsValues = options?.valuesAreIndex ?? false; + this.#maxHeap = options?.maxHeap; + this.#threadCount = options?.threadCount; + this.#tmpDir = options?.tmpDir; + if (!this.#sorted) this.#switchToWriteState(); // Update the size if the file already existed const stat = fstatSync(this.#keyFd); if (stat.size >= 16) this.#size = stat.size / 16; } + /** @returns - the length of the store */ + get length(): number { + return this.#size; + } + /** * Adds a value to be associated with a key - * @param key - the key + * @param key - the uint64 id * @param value - the value to store */ - set(key: Key, value: V): void { - if (this.#state !== 'read') throw new Error('Can no longer write to KVFile store.'); + set(key: Uint64, value: V): void { + this.#switchToWriteState(); // prepare value const valueStr = JSON.stringify(value); const valueBuf = Buffer.from(valueStr); // write key offset as a uint64 const buffer = Buffer.alloc(16); - const { low, high } = this.#getLowHigh(key); + const { low, high } = toCell(key); buffer.writeUInt32LE(low, 0); buffer.writeUInt32LE(high, 4); // write value offset to point to the value position in the `${path}.values` @@ -91,15 +109,15 @@ export class S2FileStore { * @param bigint - set to true if the key is a bigint * @returns the value if the map contains values for the key */ - get(key: Key, max?: number, bigint = false): V[] | undefined { - this.#switchToWriteState(); + async get(key: Uint64, max?: number, bigint = false): Promise { + await this.#switchToReadState(); let lowerIndex = this.#lowerBound(key); if (lowerIndex >= this.#size) return undefined; + const { low: lowID, high: highID } = toCell(key); const res: V[] = []; const buffer = Buffer.alloc(16); while (true) { readSync(this.#keyFd, buffer, 0, 16, lowerIndex * 16); - const { low: lowID, high: highID } = this.#getLowHigh(key); if (buffer.readUInt32LE(0) !== lowID || buffer.readUInt32LE(4) !== highID) break; const valueOffset = buffer.readUInt32LE(8); const valueLength = buffer.readUInt32LE(12); @@ -120,98 +138,83 @@ export class S2FileStore { return res; } - /** - * Check if the map contains the key - * @param key - the key - * @returns true if the map contains value(s) for the key - */ - has(key: Key): boolean { - this.#switchToWriteState(); - const lowerIndex = this.#lowerBound(key); - if (lowerIndex >= this.#size) return false; - const { low: lowID, high: highID } = this.#getLowHigh(key); - const buffer = Buffer.alloc(8); - readSync(this.#keyFd, buffer, 0, 8, lowerIndex * 16); - const low = buffer.readUInt32LE(0); - const high = buffer.readUInt32LE(4); - return low === lowID && high === highID; + /** Sort the data if not sorted */ + async sort(): Promise { + await this.#switchToReadState(); } - /** Switches to write state if in read. Also sort the keys. */ - #switchToWriteState(): void { - if (this.#state === 'write') return; - if (this.#state === 'read') { - this.#state = 'write'; - closeSync(this.#keyFd); - if (!this.#indexIsValues) closeSync(this.#valueFd); - this.#keyFd = openSync(`${this.path}.keys`, 'r+'); - if (!this.#indexIsValues) this.#valueFd = openSync(`${this.path}.values`, 'r+'); - this.#sort(); + /** + * Iterates over all values in the store + * @param bigint - set to true if the value is a bigint stored in the index + * @yields an iterator + */ + async *entries(bigint = false): AsyncIterableIterator<{ key: Uint64Cell; value: V }> { + await this.#switchToReadState(); + for (let i = 0; i < this.#size; i++) { + const buffer = Buffer.alloc(16); + readSync(this.#keyFd, buffer, 0, 16, i * 16); + const keyLow = buffer.readUInt32LE(0); + const keyHigh = buffer.readUInt32LE(4); + const valueOffset = buffer.readUInt32LE(8); + const valueLength = buffer.readUInt32LE(12); + if (this.#indexIsValues) { + const value = bigint + ? ((BigInt(valueOffset) + (BigInt(valueLength) << 32n)) as unknown as V) + : ((valueOffset + (valueLength << 32)) as unknown as V); + yield { key: { low: keyLow, high: keyHigh }, value }; + } else { + const valueBuf = Buffer.alloc(valueLength); + readSync(this.#valueFd, valueBuf, 0, valueLength, valueOffset); + const value = JSON.parse(valueBuf.toString()) as V; + yield { key: { low: keyLow, high: keyHigh }, value }; + } } } - /** Sort the data */ - #sort(): void { - if (this.#sorted) return; - this.#quickSort(0, this.#size - 1); - this.#sorted = true; + /** Closes the store */ + close(): void { + if (this.#keyFd >= 0) closeSync(this.#keyFd); + if (!this.#indexIsValues && this.#valueFd >= 0) closeSync(this.#valueFd); } - /** - * TODO: Running in parallel can be faster - * @param low - low index inclusive - * @param high - high index inclusive - */ - #quickSort(low: number, high: number): void { - if (low >= high) return; - const pivot = this.#partition(low, high); - this.#quickSort(low, pivot - 1); - this.#quickSort(pivot + 1, high); + /** Switches to write state if in read. */ + #switchToWriteState(): void { + if (this.#state === 'write') return; + this.#state = 'write'; + this.close(); + this.#keyFd = openSync(`${this.fileName}.keys`, 'w'); + if (!this.#indexIsValues) this.#valueFd = openSync(`${this.fileName}.values`, 'w'); } - /** - * @param low - low index inclusive - * @param high - high index inclusive - * @returns the index of the pivot - */ - #partition(low: number, high: number): number { - const pivot = this.#getKey(high); - let i = low - 1; - for (let j = low; j < high; j++) { - const jLohi = this.#getKey(j); - if (this.#compareLowHigh(jLohi, pivot) <= 0) { - i++; - this.#swapKeys(i, j); - } - } - this.#swapKeys(i + 1, high); - return i + 1; + /** Switches to read state if in write. Also sort the keys. */ + async #switchToReadState(): Promise { + if (this.#state === 'read') return; + this.#state = 'read'; + this.close(); + await this.#sort(); + this.#keyFd = openSync(`${this.fileName}.sortedkeys`, 'r'); + if (!this.#indexIsValues) this.#valueFd = openSync(`${this.fileName}.values`, 'r'); } - /** - * Swap the keys at i and j including their pointers to values - * @param i - the index of the i-th key - * @param j - the index of the j-th key - */ - #swapKeys(i: number, j: number): void { - if (i === j) return; - const iKey = Buffer.alloc(16); - const jKey = Buffer.alloc(16); - readSync(this.#keyFd, iKey, 0, 16, i * 16); - readSync(this.#keyFd, jKey, 0, 16, j * 16); - writeSync(this.#keyFd, jKey, 0, 16, i * 16); - writeSync(this.#keyFd, iKey, 0, 16, j * 16); - readSync(this.#keyFd, iKey, 0, 16, i * 16); - readSync(this.#keyFd, jKey, 0, 16, j * 16); + /** Sort the data */ + async #sort(): Promise { + if (this.#sorted) return; + await externalSort( + [`${this.fileName}.keys`], + `${this.fileName}.sortedKeys`, + this.#maxHeap, + this.#threadCount, + this.#tmpDir, + ); + this.#sorted = true; } /** * @param id - the id to search for * @returns the starting index from the lower bound of the id */ - #lowerBound(id: Key): number { - const loHiID = this.#getLowHigh(id); - this.#sort(); + #lowerBound(id: Uint64): number { + const loHiID = toCell(id); // lower bound search let lo: number = 0; let hi: number = this.#size; @@ -220,7 +223,7 @@ export class S2FileStore { while (lo < hi) { mid = Math.floor(lo + (hi - lo) / 2); const loHi = this.#getKey(mid); - if (this.#compareLowHigh(loHi, loHiID) === -1) { + if (compare(loHi, loHiID) === -1) { lo = mid + 1; } else { hi = mid; @@ -234,51 +237,9 @@ export class S2FileStore { * @param index - the index to get the key from * @returns the key */ - #getKey(index: number): LowHigh { - // read in the key - const buffer = Buffer.alloc(8); - readSync(this.#keyFd, buffer, 0, 4, index * 16); - return { - low: buffer.readUInt32LE(0), - high: buffer.readUInt32LE(4), - }; - } - - /** - * @param lohiA - the first LowHigh - * @param lohiB - the second LowHigh - * @returns -1 | 0 | 1 - */ - #compareLowHigh(lohiA: LowHigh, lohiB: LowHigh): -1 | 0 | 1 { - if (lohiA.high < lohiB.high) return -1; - if (lohiA.high > lohiB.high) return 1; - if (lohiA.low < lohiB.low) return -1; - if (lohiA.low > lohiB.low) return 1; - return 0; - } - - /** - * @param key - the key used by the S2FileStore - * @returns the low and high parts of the key - */ - #getLowHigh(key: Key): LowHigh { - if (typeof key === 'number') { - const keyBig = BigInt(key); - return { - low: Number(keyBig & 0xffffffffn), - high: Number(keyBig >> 32n) & 0xffffffff, - }; - } else if (typeof key === 'bigint') { - return { - low: Number(key & 0xffffffffn), - high: Number(key >> 32n) & 0xffffffff, - }; - } else { - const { low, high } = key as Uint64Cell; - return { - low, - high, - }; - } + #getKey(index: number): Uint64Cell { + const buf = Buffer.alloc(8); + readSync(this.#keyFd, buf, 0, 8, index * 16); + return { low: buf.readUint32LE(0), high: buf.readUint32LE(4) }; } } diff --git a/src/dataStore/index.ts b/src/dataStore/index.ts index 183184a2..8a9a8091 100644 --- a/src/dataStore/index.ts +++ b/src/dataStore/index.ts @@ -1,11 +1,5 @@ -import type { S2CellId } from '..'; -import type { Uint64Cell } from '../wasm/uint64'; - export * from './kv'; export * from './multimap'; -/** Always a uint64. Sometimes a number is enough though */ -export type Key = number | S2CellId | Uint64Cell; - /** Any type of value that can be stored as a string */ export type Stringifiable = string | object | number | boolean | null; diff --git a/src/dataStore/kv/file.ts b/src/dataStore/kv/file.ts index 3606c549..836ffe9c 100644 --- a/src/dataStore/kv/file.ts +++ b/src/dataStore/kv/file.ts @@ -1,89 +1,48 @@ -import { closeSync, openSync, writeSync } from 'fs'; +import { S2FileStore } from '../file'; import type { KVStore } from '.'; -import type { Key, Stringifiable } from '..'; +import type { Stringifiable } from '..'; +import type { Uint64Cell } from '../../dataStructures/uint64'; -/** - * NOTE: The File KVStore is designed to be used in states: - * - write-only. The initial state is write-only. Write all you need to before reading - * - read-only. Once you have written everything, the first read will lock the file to be static - * and read-only. - */ -export class KVFile implements KVStore { - state: 'read' | 'write' = 'read'; - // write params - #valueOffset = 0; - #keyWriteFd: number; - #valueWriteFd: number; - // read params +/** File based multimap store */ +export class FileMultiMap implements KVStore { + #store: S2FileStore; /** - * Builds a new File based KV - * @param file - the path to the file + * Builds a new MultiMap file store + * @param fileName - the path + file name without the extension */ - constructor(file: string) { - this.#keyWriteFd = openSync(`${file}.keys`, 'a'); - this.#valueWriteFd = openSync(`${file}.values`, 'a'); + constructor(fileName: string) { + this.#store = new S2FileStore(fileName); } - /** - * Adds a value to be associated with a key - * @param key - the key - * @param value - the value to store - */ - set(key: K, value: V): void { - if (this.state !== 'read') throw new Error('Can no longer write to KVFile store.'); - // write key offset as a uint64 - const buffer = Buffer.alloc(8); - if (typeof key === 'number') { - buffer.writeUInt32LE(key & 0xffffffff, 0); - buffer.writeUInt32LE((key >>> 32) & 0xffffffff, 4); - } else { - const keyBuffer = Buffer.from( - (key as DataView).buffer, - (key as DataView).byteOffset, - (key as DataView).byteLength, - ); - keyBuffer.copy(buffer, 0, 0, 8); - } - buffer.writeUInt32LE(this.#valueOffset & 0xffffffff, 8); - buffer.writeUInt32LE((this.#valueOffset >>> 32) & 0xffffffff, 12); - writeSync(this.#keyWriteFd, buffer); - // write value and update value offset - const valueStr = JSON.stringify(value); - const valueBuf = Buffer.from(valueStr); - writeSync(this.#valueWriteFd, valueBuf); - this.#valueOffset += valueBuf.byteLength; + /** @returns - the length of the map */ + get length(): number { + return this.#store.length; } /** - * Gets the value associated with a key + * Adds a value to the list of values associated with a key * @param key - the key - * @returns the value if the map contains values for the key + * @param value - the value to store */ - get(key: K): V | undefined { - this.#switchToWriteState(); - return undefined; + set(key: Uint64Cell, value: V): void { + this.#store.set(key, value); } /** - * Check if the map contains the key + * Gets the list of values associated with a key * @param key - the key - * @returns true if the map contains value(s) for the key + * @returns the list of values if the map contains values for the key */ - has(key: K): boolean { - this.#switchToWriteState(); - return false; + async get(key: Uint64Cell): Promise { + const value = await this.#store.get(key, 0); + if (value === undefined) return undefined; + return value[0] as V; } - /** Switches to write state if in read. Also sort the keys. */ - #switchToWriteState(): void { - if (this.state === 'write') return; - if (this.state === 'read') { - this.state = 'write'; - closeSync(this.#keyWriteFd); - closeSync(this.#valueWriteFd); - // TODO: SORT KEYS - } + /** Closes the store */ + close(): void { + this.#store.close(); } } diff --git a/src/dataStore/kv/index.ts b/src/dataStore/kv/index.ts index a0a378af..ccaaa2d9 100644 --- a/src/dataStore/kv/index.ts +++ b/src/dataStore/kv/index.ts @@ -1,11 +1,17 @@ -import type { Key, Stringifiable } from '..'; +import type { Stringifiable } from '..'; +import type { Uint64Cell } from '../../dataStructures/uint64'; /** Represents a key-value store */ -export interface KVStore { - get: (key: K) => V | undefined; - set: (key: K, value: V) => void; - has: (key: K) => boolean; +export interface KVStore { + length: number; + get: ((key: Uint64Cell) => V | undefined) | ((key: Uint64Cell) => Promise); + set: (key: Uint64Cell, value: V) => void; } /** Just a placeholder to explain what a local key-value store essentially is */ -export class KV extends Map implements KVStore {} +export class KV extends Map implements KVStore { + /** @returns - the length of the map */ + get length(): number { + return this.size; + } +} diff --git a/src/dataStore/kv/mmap.ts b/src/dataStore/kv/mmap.ts new file mode 100644 index 00000000..b481cc19 --- /dev/null +++ b/src/dataStore/kv/mmap.ts @@ -0,0 +1,43 @@ +import { S2MMapStore } from '../mmap'; + +import type { KVStore } from '.'; +import type { Stringifiable } from '..'; +import type { Uint64Cell } from '../../dataStructures/uint64'; + +/** File based multimap store */ +export class FileMultiMap implements KVStore { + #store: S2MMapStore; + + /** + * Builds a new MultiMap file store + * @param fileName - the path + file name without the extension + */ + constructor(fileName: string) { + this.#store = new S2MMapStore(fileName); + } + + /** @returns - the length of the map */ + get length(): number { + return this.#store.length; + } + + /** + * Adds a value to the list of values associated with a key + * @param key - the key + * @param value - the value to store + */ + set(key: Uint64Cell, value: V): void { + this.#store.set(key, value); + } + + /** + * Gets the list of values associated with a key + * @param key - the key + * @returns the list of values if the map contains values for the key + */ + async get(key: Uint64Cell): Promise { + const value = await this.#store.get(key, 0); + if (value === undefined) return undefined; + return value[0] as V; + } +} diff --git a/src/dataStore/mmap.ts b/src/dataStore/mmap.ts index 8cd3620f..547f7e4f 100644 --- a/src/dataStore/mmap.ts +++ b/src/dataStore/mmap.ts @@ -1,14 +1,23 @@ import externalSort from './externalSort'; import { mmap } from 'bun'; import { closeSync, fstatSync, openSync, writeSync } from 'fs'; - -import type { Uint64Cell } from '../wasm/uint64'; -import type { Key, Stringifiable } from '..'; - -/** A low/high pair for faster comparisons */ -interface LowHigh { - low: number; - high: number; +import { compare, toCell } from '../dataStructures/uint64'; + +import type { Stringifiable } from '..'; +import type { Uint64, Uint64Cell } from '../dataStructures/uint64'; + +/** Options to create a S2MMapStore */ +export interface Options { + /** If true, then the values are stored in the index section of the keys file */ + valuesAreIndex?: boolean; + /** If true, then the data is already sorted and get calls can be immediately returned */ + isSorted?: boolean; + /** The maximum heap size in bytes for each grouping of data. */ + maxHeap?: number; + /** The number of threads to use for sorting */ + threadCount?: number; + /** If desired, a temporary directory to use */ + tmpDir?: string; } /** @@ -18,53 +27,60 @@ interface LowHigh { * and read-only. */ export class S2MMapStore { - #state: 'read' | 'write' = 'write'; + #state: 'read' | 'write' = 'read'; #size = 0; #sorted: boolean; + #maxHeap?: number; + #threadCount?: number; + #tmpDir?: string; // options #indexIsValues = false; // write params #valueOffset = 0; - #keyFd: number; - #valueFd: number; + #keyFd: number = -1; + #valueFd: number = -1; // readers #keyReader!: Uint8Array; #valueReader!: Uint8Array; /** * Builds a new File based KV - * @param fileName - the file name without the extension - * @param isSorted - set to true if the keys are already sorted - * @param valuesAreIndex - set to true if the values are stored in the index section of the keys file + * @param fileName - the path + file name without the extension + * @param options - the options of how the store should be created and ued */ constructor( public readonly fileName: string, - isSorted = false, - valuesAreIndex = false, + options?: Options, ) { - this.#sorted = isSorted; - this.#indexIsValues = valuesAreIndex; - this.#keyFd = openSync(`${fileName}.keys`, 'a'); - if (!this.#indexIsValues) this.#valueFd = openSync(`${fileName}.values`, 'a'); - else this.#valueFd = -1; + this.#sorted = options?.isSorted ?? false; + this.#indexIsValues = options?.valuesAreIndex ?? false; + this.#maxHeap = options?.maxHeap; + this.#threadCount = options?.threadCount; + this.#tmpDir = options?.tmpDir; + if (!this.#sorted) this.#switchToWriteState(); // Update the size if the file already existed const stat = fstatSync(this.#keyFd); if (stat.size >= 16) this.#size = stat.size / 16; } + /** @returns - the length of the store */ + get length(): number { + return this.#size; + } + /** * Adds a value to be associated with a key - * @param key - the key + * @param key - the uint64 id * @param value - the value to store */ - set(key: Key, value: V): void { - if (this.#state !== 'write') throw new Error('Can no longer write to KVFile store.'); + set(key: Uint64, value: V): void { + this.#switchToWriteState(); // prepare value const valueStr = JSON.stringify(value); const valueBuf = Buffer.from(valueStr); // write key offset as a uint64 const buffer = Buffer.alloc(16); - const { low, high } = this.#getLowHigh(key); + const { low, high } = toCell(key); buffer.writeUInt32LE(low, 0); buffer.writeUInt32LE(high, 4); // write value offset to point to the value position in the `${path}.values` @@ -96,11 +112,11 @@ export class S2MMapStore { * @param bigint - set to true if the key is a bigint * @returns the value if the map contains values for the key */ - get(key: Key, max?: number, bigint = false): V[] | undefined { - if (!this.#sorted) throw new Error('Not sorted, please call "switchToReadState" first'); + async get(key: Uint64, max?: number, bigint = false): Promise { + await this.#switchToReadState(); let lowerIndex = this.#lowerBound(key); if (lowerIndex >= this.#size) return undefined; - const { low: lowID, high: highID } = this.#getLowHigh(key); + const { low: lowID, high: highID } = toCell(key); const res: V[] = []; while (true) { const keySlice = this.#keyReader.subarray(lowerIndex * 16, lowerIndex * 16 + 16); @@ -125,29 +141,53 @@ export class S2MMapStore { return res; } + /** Sort the data if not sorted */ + async sort(): Promise { + await this.#switchToReadState(); + } + /** - * Check if the map contains the key - * @param key - the key - * @returns true if the map contains value(s) for the key + * Iterates over all values in the store + * @param bigint - set to true if the value is a bigint stored in the index + * @yields an iterator */ - has(key: Key): boolean { - if (!this.#sorted) throw new Error('Not sorted, please call "switchToReadState" first'); - const lowerIndex = this.#lowerBound(key); - if (lowerIndex >= this.#size) return false; - const { low: lowID, high: highID } = this.#getLowHigh(key); - const keySlice = this.#keyReader.subarray(lowerIndex * 16, lowerIndex * 16 + 8); - const buf = Buffer.from(keySlice); - const low = buf.readUint32LE(0); - const high = buf.readUint32LE(4); - return low === lowID && high === highID; + async *entries(bigint = false): AsyncIterableIterator<{ key: Uint64Cell; value: V }> { + await this.#switchToReadState(); + for (let i = 0; i < this.#size; i++) { + const keySlice = this.#keyReader.subarray(i * 16, i * 16 + 16); + const buffer = Buffer.from(keySlice); + const keyLow = buffer.readUInt32LE(0); + const keyHigh = buffer.readUInt32LE(4); + const valueOffset = buffer.readUInt32LE(8); + const valueLength = buffer.readUInt32LE(12); + if (this.#indexIsValues) { + const value = bigint + ? ((BigInt(valueOffset) + (BigInt(valueLength) << 32n)) as unknown as V) + : ((valueOffset + (valueLength << 32)) as unknown as V); + yield { key: { low: keyLow, high: keyHigh }, value }; + } else { + const valSlice = this.#valueReader.subarray(valueOffset, valueOffset + valueLength); + const valueBuf = Buffer.from(valSlice); + const value = JSON.parse(valueBuf.toString()) as V; + yield { key: { low: keyLow, high: keyHigh }, value }; + } + } + } + + /** Switches to write state if in read. */ + #switchToWriteState(): void { + if (this.#state === 'write') return; + this.#state = 'write'; + this.#keyFd = openSync(`${this.fileName}.keys`, 'w'); + if (!this.#indexIsValues) this.#valueFd = openSync(`${this.fileName}.values`, 'w'); } /** Switches to read state if in write. Also sort the keys. */ - async switchToReadState(): Promise { + async #switchToReadState(): Promise { if (this.#state === 'read') return; this.#state = 'read'; - closeSync(this.#keyFd); - if (!this.#indexIsValues) closeSync(this.#valueFd); + if (this.#keyFd > 0) closeSync(this.#keyFd); + if (!this.#indexIsValues && this.#valueFd > 0) closeSync(this.#valueFd); await this.#sort(); this.#keyReader = mmap(`${this.fileName}.sortedkeys`); if (!this.#indexIsValues) this.#valueReader = mmap(`${this.fileName}.values`); @@ -156,7 +196,13 @@ export class S2MMapStore { /** Sort the data */ async #sort(): Promise { if (this.#sorted) return; - await externalSort([`${this.fileName}.keys`], `${this.fileName}.sortedKeys`); + await externalSort( + [`${this.fileName}.keys`], + `${this.fileName}.sortedKeys`, + this.#maxHeap, + this.#threadCount, + this.#tmpDir, + ); this.#sorted = true; } @@ -164,8 +210,8 @@ export class S2MMapStore { * @param id - the id to search for * @returns the starting index from the lower bound of the id */ - #lowerBound(id: Key): number { - const loHiID = this.#getLowHigh(id); + #lowerBound(id: Uint64): number { + const loHiID = toCell(id); // lower bound search let lo: number = 0; let hi: number = this.#size; @@ -174,7 +220,7 @@ export class S2MMapStore { while (lo < hi) { mid = Math.floor(lo + (hi - lo) / 2); const loHi = this.#getKey(mid); - if (this.#compareLowHigh(loHi, loHiID) === -1) { + if (compare(loHi, loHiID) === -1) { lo = mid + 1; } else { hi = mid; @@ -188,50 +234,9 @@ export class S2MMapStore { * @param index - the index to get the key from * @returns the key */ - #getKey(index: number): LowHigh { + #getKey(index: number): Uint64Cell { const key = this.#keyReader.subarray(index * 16, index * 16 + 8); const buf = Buffer.from(key); - return { - low: buf.readUint32LE(0), - high: buf.readUint32LE(4), - }; - } - - /** - * @param lohiA - the first LowHigh - * @param lohiB - the second LowHigh - * @returns -1 | 0 | 1 - */ - #compareLowHigh(lohiA: LowHigh, lohiB: LowHigh): -1 | 0 | 1 { - if (lohiA.high < lohiB.high) return -1; - if (lohiA.high > lohiB.high) return 1; - if (lohiA.low < lohiB.low) return -1; - if (lohiA.low > lohiB.low) return 1; - return 0; - } - - /** - * @param key - the key used by the S2MMapStore - * @returns the low and high parts of the key - */ - #getLowHigh(key: Key): LowHigh { - if (typeof key === 'number') { - const keyBig = BigInt(key); - return { - low: Number(keyBig & 0xffffffffn), - high: Number(keyBig >> 32n) & 0xffffffff, - }; - } else if (typeof key === 'bigint') { - return { - low: Number(key & 0xffffffffn), - high: Number(key >> 32n) & 0xffffffff, - }; - } else { - const { low, high } = key as Uint64Cell; - return { - low, - high, - }; - } + return { low: buf.readUint32LE(0), high: buf.readUint32LE(4) }; } } diff --git a/src/dataStore/multimap/file.ts b/src/dataStore/multimap/file.ts index e69de29b..68354b2f 100644 --- a/src/dataStore/multimap/file.ts +++ b/src/dataStore/multimap/file.ts @@ -0,0 +1,46 @@ +import { S2FileStore } from '../file'; + +import type { MultiMapStore } from '.'; +import type { Stringifiable } from '..'; +import type { Uint64Cell } from '../../dataStructures/uint64'; + +/** File based multimap store */ +export class FileMultiMap implements MultiMapStore { + #store: S2FileStore; + + /** + * Builds a new MultiMap file store + * @param fileName - the path + file name without the extension + */ + constructor(fileName: string) { + this.#store = new S2FileStore(fileName); + } + + /** @returns - the length of the map */ + get length(): number { + return this.#store.length; + } + + /** + * Adds a value to the list of values associated with a key + * @param key - the key + * @param value - the value to store + */ + set(key: Uint64Cell, value: V): void { + this.#store.set(key, value); + } + + /** + * Gets the list of values associated with a key + * @param key - the key + * @returns the list of values if the map contains values for the key + */ + async get(key: Uint64Cell): Promise { + return await this.#store.get(key); + } + + /** Closes the store */ + close(): void { + this.#store.close(); + } +} diff --git a/src/dataStore/multimap/index.ts b/src/dataStore/multimap/index.ts index 4c76425e..ab2f013f 100644 --- a/src/dataStore/multimap/index.ts +++ b/src/dataStore/multimap/index.ts @@ -1,27 +1,33 @@ -import type { Key, Stringifiable } from '..'; +import type { Stringifiable } from '..'; +import type { Uint64Cell } from '../../dataStructures/uint64'; /** Represents a key-value store */ -export interface MultiMapStore { - get: (key: K) => V[] | undefined; - set: (key: K, value: V) => void; - has: (key: K) => boolean; +export interface MultiMapStore { + length: number; + get: ((key: Uint64Cell) => V[] | undefined) | ((key: Uint64Cell) => Promise); + set: (key: Uint64Cell, value: V) => void; } /** A local multimap key-value store */ -export class MultiMap implements MultiMapStore { - private map: Map; +export class MultiMap implements MultiMapStore { + private map: Map; /** Builds a new MultiMap */ constructor() { this.map = new Map(); } + /** @returns - the length of the map */ + get length(): number { + return this.map.size; + } + /** * Adds a value to the list of values associated with a key * @param key - the key * @param value - the value to store */ - set(key: K, value: V): void { + set(key: Uint64Cell, value: V): void { const list = this.get(key); if (list === undefined) { this.map.set(key, [value]); @@ -35,16 +41,7 @@ export class MultiMap implements MultiMapStore * @param key - the key * @returns the list of values if the map contains values for the key */ - get(key: K): V[] | undefined { + get(key: Uint64Cell): V[] | undefined { return this.map.get(key); } - - /** - * Check if the map contains the key - * @param key - the key - * @returns true if the map contains value(s) for the key - */ - has(key: K): boolean { - return this.map.has(key); - } } diff --git a/src/dataStore/multimap/mmap.ts b/src/dataStore/multimap/mmap.ts new file mode 100644 index 00000000..0c42c928 --- /dev/null +++ b/src/dataStore/multimap/mmap.ts @@ -0,0 +1,41 @@ +import { S2MMapStore } from '../mmap'; + +import type { MultiMapStore } from '.'; +import type { Stringifiable } from '..'; +import type { Uint64Cell } from '../../dataStructures/uint64'; + +/** File based multimap store */ +export class FileMultiMap implements MultiMapStore { + #store: S2MMapStore; + + /** + * Builds a new MultiMap file store + * @param fileName - the path + file name without the extension + */ + constructor(fileName: string) { + this.#store = new S2MMapStore(fileName); + } + + /** @returns - the length of the map */ + get length(): number { + return this.#store.length; + } + + /** + * Adds a value to the list of values associated with a key + * @param key - the key + * @param value - the value to store + */ + set(key: Uint64Cell, value: V): void { + this.#store.set(key, value); + } + + /** + * Gets the list of values associated with a key + * @param key - the key + * @returns the list of values if the map contains values for the key + */ + async get(key: Uint64Cell): Promise { + return await this.#store.get(key); + } +} diff --git a/src/dataStore/vector/file.ts b/src/dataStore/vector/file.ts index e69de29b..567c710f 100644 --- a/src/dataStore/vector/file.ts +++ b/src/dataStore/vector/file.ts @@ -0,0 +1,58 @@ +import { S2FileStore } from '../file'; + +import type { VectorKey, VectorStore } from '.'; + +/** File based vector store */ +export class FileVector implements VectorStore { + #store: S2FileStore; + /** @param fileName - the path + file name without the extension */ + constructor(fileName: string) { + this.#store = new S2FileStore(fileName); + } + + /** @returns the length of the store */ + get length(): number { + return this.#store.length; + } + + /** @param value - store the value */ + push(value: V): void { + this.#store.set(value.cell, value); + } + + /** + * @param index - the position in the store to get the value from + * @returns the value + */ + async get(index: number): Promise { + const value = await this.#store.get(index); + if (value === undefined) throw new Error('Value not found'); + return value[0] as V; + } + + /** Sort the store */ + async sort(): Promise { + await this.#store.sort(); + } + + /** + * iterate through the values + * @yields an iterator + */ + async *values(): AsyncGenerator { + for await (const { value } of this.#store.entries()) yield value as V; + } + + /** + * iterate through the values + * @returns an iterator + */ + [Symbol.iterator](): AsyncGenerator { + return this.values(); + } + + /** Closes the store */ + close(): void { + this.#store.close(); + } +} diff --git a/src/dataStore/vector/index.ts b/src/dataStore/vector/index.ts index 4bb1a2f7..6d83a1e5 100644 --- a/src/dataStore/vector/index.ts +++ b/src/dataStore/vector/index.ts @@ -1,17 +1,27 @@ -import type { Stringifiable } from '../'; +import { compare } from '../../dataStructures/uint64'; + +import type { Uint64Cell } from '../../dataStructures/uint64'; + +/** The kind of input required to store a vector for proper indexing */ +export interface VectorKey { + cell: Uint64Cell; +} /** Represents a vector store or an array */ -export interface VectorStore { +export interface VectorStore { push: (value: V) => void; - get: (index: number) => V; - sort: (compareFn?: (a: V, b: V) => number) => void; - length: () => number; - values: () => IterableIterator; - [Symbol.iterator]: () => IterableIterator; + get: (index: number) => Promise; + length: number; + values: (() => Generator) | (() => AsyncGenerator); + sort: (() => void) | (() => Promise); + [Symbol.iterator]: (() => Generator) | (() => AsyncGenerator); } -/** Just a placeholder to explain what a local key-value store essentially is */ -export class Vector implements VectorStore { +/** A constructor for a vector store */ +export type VectorStoreConstructor = new () => VectorStore; + +/** A local vector key-value store */ +export class Vector implements VectorStore { #store: V[] = []; /** @param value - the value to store */ @@ -23,36 +33,35 @@ export class Vector implements VectorStore { * @param index - the position in the store to get the value from * @returns the value */ - get(index: number): V { - return this.#store[index]; - } - - /** - * Sort the store - * @param compareFn - the compare function explaining how the data should be sorted - */ - sort(compareFn?: (a: V, b: V) => number): void { - this.#store.sort(compareFn); + async get(index: number): Promise { + return await this.#store[index]; } /** @returns the length of the store */ - length(): number { + get length(): number { return this.#store.length; } /** * iterate through the values - * @returns an iterator + * @yields an iterator */ - values(): IterableIterator { - return this.#store.values(); + *values(): Generator { + for (const value of this.#store) yield value; + } + + /** Sort the store in place */ + sort(): void { + this.#store.sort((a, b): -1 | 0 | 1 => { + return compare(a.cell, b.cell); + }); } /** * iterate through the values * @returns an iterator */ - [Symbol.iterator](): IterableIterator { + [Symbol.iterator](): Generator { return this.values(); } } diff --git a/src/dataStore/vector/mmap.ts b/src/dataStore/vector/mmap.ts new file mode 100644 index 00000000..9267d57c --- /dev/null +++ b/src/dataStore/vector/mmap.ts @@ -0,0 +1,53 @@ +import { S2MMapStore } from '../mmap'; + +import type { VectorKey, VectorStore } from '.'; + +/** File based vector store */ +export class FileVector implements VectorStore { + #store: S2MMapStore; + /** @param fileName - the path + file name without the extension */ + constructor(fileName: string) { + this.#store = new S2MMapStore(fileName); + } + + /** @returns the length of the store */ + get length(): number { + return this.#store.length; + } + + /** @param value - store the value */ + push(value: V): void { + this.#store.set(value.cell, value); + } + + /** + * @param index - the position in the store to get the value from + * @returns the value + */ + async get(index: number): Promise { + const value = await this.#store.get(index); + if (value === undefined) throw new Error('Value not found'); + return value[0] as V; + } + + /** Sort the store */ + async sort(): Promise { + await this.#store.sort(); + } + + /** + * iterate through the values + * @yields an iterator + */ + async *values(): AsyncGenerator { + for await (const { value } of this.#store.entries()) yield value as V; + } + + /** + * iterate through the values + * @returns an iterator + */ + [Symbol.iterator](): AsyncGenerator { + return this.values(); + } +} diff --git a/src/dataStructures/pointCluster.ts b/src/dataStructures/pointCluster.ts index de117a61..24ae5175 100644 --- a/src/dataStructures/pointCluster.ts +++ b/src/dataStructures/pointCluster.ts @@ -11,11 +11,19 @@ import { toST, } from '../geometry/s2/point'; +import type { PointShape } from './pointIndex'; import type { S1ChordAngle } from '../geometry/s1/chordAngle'; import type { Face, Point3D, Projection, Properties, S2CellId } from '../geometry'; +import type { VectorStoreConstructor } from '../dataStore/vector'; + +/** The kind of input required to store a point for proper indexing */ +export type ClusterStore = VectorStoreConstructor>; + /** Options for point clustering */ export interface ClusterOptions { + /** type of store to use. Defaults to an in memory store */ + store?: ClusterStore; /** projection to use */ projection?: Projection; /** Name of the layer to build when requesting a tile */ @@ -29,25 +37,27 @@ export interface ClusterOptions { } /** A cluster is a storage device to maintain groups of information in a cluster */ -export class Cluster { - visited: boolean = false; - sum: number = 1; +export interface Cluster { + properties: Properties; + visited: boolean; + sum: number; +} - /** - * @param ref - the reference data - */ - constructor(public ref: Properties) {} +/** + * @param properties - the properties associated with the cluster + * @returns - a new cluster + */ +function newCluster(properties: Properties): Cluster { + return { properties, visited: false, sum: 1 }; +} - /** - * @param ref - the reference data - * @param sum - the sum of points - * @returns - a new cluster - */ - static fromSum(ref: Properties, sum: number): Cluster { - const cluster = new Cluster(ref); - cluster.sum = sum; - return cluster; - } +/** + * @param properties - the properties associated with the cluster + * @param sum - the sum of the cluster + * @returns - a new cluster with the correct sum and properties data + */ +function sumToCluster(properties: Properties, sum: number): Cluster { + return { properties, visited: false, sum }; } /** Compare two data items, return true to merge data */ @@ -60,7 +70,6 @@ export default class PointCluster { minzoom: number; maxzoom: number; radius: number; - // { [zoom]: Index } indexes = new Map>(); /** @param options - cluster options on how to build the cluster */ @@ -71,7 +80,7 @@ export default class PointCluster { this.maxzoom = Math.min(options?.maxzoom ?? 16, 29); this.radius = options?.radius ?? 40; for (let zoom = this.minzoom; zoom <= this.maxzoom; zoom++) { - this.indexes.set(zoom, new PointIndex()); + this.indexes.set(zoom, new PointIndex(options?.store)); } } @@ -82,7 +91,7 @@ export default class PointCluster { */ insert(point: Point3D, data: Properties): void { const maxzoomIndex = this.indexes.get(this.maxzoom); - maxzoomIndex?.insert(point, new Cluster(data)); + maxzoomIndex?.insert(point, newCluster(data)); } /** @@ -109,7 +118,7 @@ export default class PointCluster { * Build the clusters when done adding points * @param cmp_ - custom compare function */ - buildClusters(cmp_?: Comparitor): void { + async buildClusters(cmp_?: Comparitor): Promise { const { minzoom, maxzoom } = this; // const cmp = cmp_ orelse defaultCmp; const cmp: Comparitor = cmp_ ?? ((_a: Properties, _b: Properties) => true); @@ -117,7 +126,7 @@ export default class PointCluster { const curIndex = this.indexes.get(zoom); const queryIndex = this.indexes.get(zoom - 1); if (curIndex === undefined || queryIndex === undefined) throw new Error('Index not found'); - if (zoom === maxzoom) this.#cluster(zoom, queryIndex, curIndex, cmp); + if (zoom === maxzoom) await this.#cluster(zoom, queryIndex, curIndex, cmp); } } @@ -127,14 +136,14 @@ export default class PointCluster { * @param currIndex - the index to insert into * @param cmp - the compare function */ - #cluster( + async #cluster( zoom: number, queryIndex: PointIndex, currIndex: PointIndex, cmp: Comparitor, - ): void { + ): Promise { const radius = this.#getLevelRadius(zoom); - for (const clusterPoint of queryIndex) { + for await (const clusterPoint of queryIndex) { const { point, data: clusterData } = clusterPoint; if (clusterData.visited) continue; clusterData.visited = true; @@ -142,10 +151,10 @@ export default class PointCluster { const newClusterPoint = mulScalar(point, clusterData.sum); let newNumPoints = clusterData.sum; // joining all points found within radius - const points = queryIndex.searchRadius(point, radius); + const points = await queryIndex.searchRadius(point, radius); for (const { point: foundPoint, data: foundData } of points) { // only add points that match or have not been visited already - if (!cmp(clusterData.ref, foundData.ref) || foundData.visited) continue; + if (!cmp(clusterData.properties, foundData.properties) || foundData.visited) continue; foundData.visited = true; // weighted add to newClusterPoint position addMut(newClusterPoint, mulScalar(foundPoint, foundData.sum)); @@ -155,7 +164,7 @@ export default class PointCluster { divMutScalar(newClusterPoint, newNumPoints); normalize(newClusterPoint); // store the new cluster point - currIndex.insert(newClusterPoint, Cluster.fromSum(clusterData.ref, newNumPoints)); + currIndex.insert(newClusterPoint, sumToCluster(clusterData.properties, newNumPoints)); } } @@ -163,33 +172,33 @@ export default class PointCluster { * @param id - the cell id * @returns - the data within the range of the tile id */ - getCellData(id: S2CellId): undefined | Point[] { + async getCellData(id: S2CellId): Promise[]> { const { minzoom, maxzoom, indexes } = this; const zoom = level(id); if (zoom < minzoom) return; const [min, max] = range(id); const levelIndex = indexes.get(Math.min(zoom, maxzoom)); - return levelIndex?.searchRange(min, max); + return await levelIndex?.searchRange(min, max); } /** * @param id - the id of the vector tile * @returns - the vector tile */ - getTile(id: S2CellId): undefined | Tile { - const data = this.getCellData(id); + async getTile(id: S2CellId): Promise { + const data = await this.getCellData(id); if (data === undefined) return; const tile = new Tile(id); for (const { point, data: cluster } of data) { const [face, s, t] = toST(point); - const { sum, ref } = cluster; + const { sum, properties } = cluster; tile.addFeature( { type: 'VectorFeature', face, geometry: { is3D: false, type: 'Point', coordinates: { x: s, y: t, m: { sum } } }, - properties: ref, + properties, }, this.layerName, ); diff --git a/src/dataStructures/pointIndex.ts b/src/dataStructures/pointIndex.ts index c1bdc7b0..8156627b 100644 --- a/src/dataStructures/pointIndex.ts +++ b/src/dataStructures/pointIndex.ts @@ -1,49 +1,71 @@ -import Uint64CellGenerator from '../wasm/uint64'; +import { Vector } from '../dataStore/vector'; import { fromS2Points } from '../geometry/s1/chordAngle'; import { range } from '../geometry'; +import { compare, fromS2Point, toCell } from '../dataStructures/uint64'; import { fromS1ChordAngle, getIntersectingCells } from '../geometry/s2/cap'; -import type { S1ChordAngle } from '../geometry/s1/chordAngle'; -import type { Uint64Cell } from '../wasm/uint64'; -import type { Point3D, S2CellId } from '../geometry'; +import { fromLonLat, fromST } from '../geometry/s2/point'; -/** A point shape to be indexed */ -export class PointShape { - /** - * @param cell - the cell that defines the point - * @param point - the point to track current location - * @param data - the data associated with the point - */ - constructor( - public cell: Uint64Cell, - public point: Point3D, - public data: T, - ) {} +import type { S1ChordAngle } from '../geometry/s1/chordAngle'; +import type { Stringifiable } from '../dataStore'; +import type { Face, Point3D } from '../geometry'; +import type { Uint64, Uint64Cell } from '../dataStructures/uint64'; +import type { VectorStore, VectorStoreConstructor } from '../dataStore/vector'; + +/** The kind of input required to store a point for proper indexing */ +export interface PointShape { + cell: Uint64Cell; + point: Point3D; + data: T; } /** An index of cells with radius queries */ -export default class PointIndex { - #store: PointShape[] = []; +export default class PointIndex { + #store: VectorStore>; #unsorted: boolean = false; - cellGen = new Uint64CellGenerator(); + + /** @param store - the store to index. May be an in memory or disk */ + constructor(store: VectorStoreConstructor> = Vector) { + this.#store = new store(); + } /** * @param point - the point to be indexed * @param data - the data associated with the point */ insert(point: Point3D, data: T): void { - const cell = this.cellGen.fromS2Point(point); - this.#store.push(new PointShape(cell, point, data)); + this.#store.push({ cell: fromS2Point(point), point, data }); this.#unsorted = true; } + /** + * Add a lon-lat pair to the cluster + * @param lon - longitude in degrees + * @param lat - latitude in degrees + * @param data - the data associated with the point + */ + insertLonLat(lon: number, lat: number, data: T): void { + this.insert(fromLonLat(lon, lat), data); + } + + /** + * @param face - the face of the cell + * @param s - the s coordinate + * @param t - the t coordinate + * @param data - the data associated with the point + */ + insertFaceST(face: Face, s: number, t: number, data: T): void { + this.insert(fromST(face, s, t), data); + } + /** * iterate through the points - * @returns an iterator + * @yields a PointShape */ - [Symbol.iterator](): IterableIterator> { - this.#sort(); - return this.#store.values(); + async *[Symbol.asyncIterator](): AsyncGenerator> { + await this.#sort(); + // return this.#store.values(); + for (const value of this.#store) yield value; } /** @@ -51,17 +73,15 @@ export default class PointIndex { * @param points - array of the points to add */ insertPoints(points: PointShape[]): void { - this.#store.push(...points); + for (const point of points) this.#store.push(point); this.#unsorted = true; } /** Sort the index in place if unsorted */ - #sort(): void { + async #sort(): Promise { if (!this.#unsorted) return; - this.#store.sort((a, b) => { - return a.cell.compare(b.cell); - }); + await this.#store.sort(); this.#unsorted = false; } @@ -70,9 +90,9 @@ export default class PointIndex { * @param id - input id to seek the starting index of the search * @returns the starting index */ - lowerBound(id: S2CellId): number { - const cellID = this.cellGen.fromBigInt(id); - this.#sort(); + async lowerBound(id: Uint64): Promise { + const cellID = toCell(id); + await this.#sort(); // lower bound search let lo: number = 0; let hi: number = this.#store.length; @@ -80,7 +100,8 @@ export default class PointIndex { while (lo < hi) { mid = Math.floor(lo + (hi - lo) / 2); - if (this.#store[mid].cell.compare(cellID) === -1) { + const { cell: midCell } = await this.#store.get(mid); + if (compare(midCell, cellID) === -1) { lo = mid + 1; } else { hi = mid; @@ -95,14 +116,16 @@ export default class PointIndex { * @param high - the upper bound * @returns the points in the range */ - searchRange(low: S2CellId, high: S2CellId): PointShape[] { - this.#sort(); + async searchRange(low: Uint64, high: Uint64): Promise[]> { + await this.#sort(); const res: PointShape[] = []; - let lo = this.lowerBound(low); - const hiID = this.cellGen.fromBigInt(high); + let lo = await this.lowerBound(low); + const hiID = toCell(high); - while (lo < this.#store.length && this.#store[lo].cell.compare(hiID) <= 0) { - res.push(this.#store[lo]); + while (true) { + const currLo = await this.#store.get(lo); + if (lo < this.#store.length && compare(currLo.cell, hiID) <= 0) break; + res.push(currLo); lo++; } @@ -114,8 +137,8 @@ export default class PointIndex { * @param radius - the search radius * @returns the points within the radius */ - searchRadius(target: Point3D, radius: S1ChordAngle): PointShape[] { - this.#sort(); + async searchRadius(target: Point3D, radius: S1ChordAngle): Promise[]> { + await this.#sort(); const res: PointShape[] = []; if (radius < 0) return res; const cap = fromS1ChordAngle(target, radius, undefined); @@ -123,7 +146,7 @@ export default class PointIndex { // iterate each covering s2cell min-max range on store. check distance from found // store Cells to target and if within radius add to results const [min, max] = range(cell); - for (const point of this.searchRange(min, max)) { + for (const point of await this.searchRange(min, max)) { if (fromS2Points(target, point.point) < radius) res.push(point); } } diff --git a/src/dataStructures/uint64.ts b/src/dataStructures/uint64.ts new file mode 100644 index 00000000..0ecab741 --- /dev/null +++ b/src/dataStructures/uint64.ts @@ -0,0 +1,72 @@ +import { S2Point, fromS2Point as fromS2, fromST } from '../geometry'; + +import type { Face, Point3D, S2CellId } from '../geometry'; + +/** An Uint64Cell contains all the information needed to uniquely identify a 64-bit cell */ +export interface Uint64Cell { + low: number; + high: number; +} + +/** The 64-bit cell id in BigInt, Number, or Uint64Cell form */ +export type Uint64 = number | S2CellId | Uint64Cell; + +/** + * Convert a BigInt to an Uint64Cell representation + * @param id - the 64-bit cell id in BigInt or number form + * @returns - an Uint64Cell with the appropriate id and functions + */ +export function toCell(id: Uint64): Uint64Cell { + if (typeof id === 'object') return id; + const bigint = BigInt(id); + return { + low: Number(bigint & 0xffffffffn), + high: Number(bigint >> 32n) & 0xffffffff, + }; +} + +/** + * Convert a lon/lat to an Uint64Cell representation + * @param lon - longitude + * @param lat - latitude + * @returns - an Uint64Cell with the appropriate id and functions + */ +export function fromLonLat(lon: number, lat: number): Uint64Cell { + const { toST, fromLonLat } = S2Point; + const [face, s, t] = toST(fromLonLat(lon, lat)); + return fromFaceST(face, s, t); +} + +/** + * Convert a face/s/t to an Uint64Cell representation + * @param face - face on the sphere + * @param s - x position + * @param t - y position + * @returns - an Uint64Cell with the appropriate id and functions + */ +export function fromFaceST(face: Face, s: number, t: number): Uint64Cell { + const id = fromST(face, s, t); + return toCell(id); +} + +/** + * @param point - a vector point on the sphere + * @returns - an Uint64Cell with the appropriate id and functions + */ +export function fromS2Point(point: Point3D): Uint64Cell { + const id = fromS2(point); + return toCell(id); +} + +/** + * @param a - the first cell + * @param b - the second cell + * @returns -1 | 0 | 1 + */ +export function compare(a: Uint64Cell, b: Uint64Cell): -1 | 0 | 1 { + if (a.high < b.high) return -1; + if (a.high > b.high) return 1; + if (a.low < b.low) return -1; + if (a.low > b.low) return 1; + return 0; +} diff --git a/src/geometry/index.ts b/src/geometry/index.ts index c08c12c4..1f5afd1a 100644 --- a/src/geometry/index.ts +++ b/src/geometry/index.ts @@ -61,7 +61,7 @@ export interface BaseFeature< M = Record, D extends MValue = MValue, P extends Properties = Properties, - G = Geometry | VectorGeometry, + G = Geometry | VectorGeometry, > { type: T; id?: number; @@ -82,14 +82,14 @@ export type VectorFeature< M = Record, D extends MValue = MValue, P extends Properties = Properties, - G = VectorGeometry, + G = VectorGeometry, > = BaseFeature<'VectorFeature', M, D, P, G>; /** S2 Feature */ export interface S2Feature< M = Record, D extends MValue = MValue, P extends Properties = Properties, - G = VectorGeometry, + G = VectorGeometry, > extends BaseFeature<'S2Feature', M, D, P, G> { face: Face; } diff --git a/src/proj4/constants/datums.ts b/src/proj4/constants/datums.ts index 727650e9..bcc3a395 100644 --- a/src/proj4/constants/datums.ts +++ b/src/proj4/constants/datums.ts @@ -40,13 +40,6 @@ const nad83: ToWGS84Datum = { datumName: 'North_American_Datum_1983', }; -/** North_American_Datum_1927 Datum */ -const nad27: NADGRIDSDatum = { - nadgrids: ['@conus', '@alaska', '@ntv2_0.gsb', '@ntv1_can.dat'], - ellipse: 'clrk66', - datumName: 'North_American_Datum_1927', -}; - /** Potsdam Rauenberg 1950 DHDN Datum */ const potsdam: ToWGS84Datum = { datumParams: [598.1, 73.7, 418.2, 0.202, 0.045, -2.455, 6.7], @@ -158,6 +151,13 @@ export const DATUMS: Record = { gunung_segara, }; +/** North_American_Datum_1927 Datum */ +const nad27: NADGRIDSDatum = { + nadgrids: ['@conus', '@alaska', '@ntv2_0.gsb', '@ntv1_can.dat'], + ellipse: 'clrk66', + datumName: 'North_American_Datum_1927', +}; + export const NAD_GRIDS: Record = { nad27, }; diff --git a/src/proj4/datum.ts b/src/proj4/datum.ts index a1780419..05e6f438 100644 --- a/src/proj4/datum.ts +++ b/src/proj4/datum.ts @@ -7,7 +7,6 @@ import { PJD_GRIDSHIFT, PJD_NODATUM, PJD_WGS84, - R2D, SEC_TO_RAD, SRS_WGS84_ESQUARED, SRS_WGS84_SEMIMAJOR, @@ -15,23 +14,25 @@ import { } from './constants'; import type { DatumParams } from 's2-tools/readers/wkt'; +import type { NadSubGrid } from 's2-tools/readers/nadgrid'; import type { VectorPoint } from 's2-tools/geometry'; -import type { ProjectionParams, ProjectionTransform } from '.'; +import type { ProjectionParams, ProjectionTransform, Transformer } from '.'; const { abs, sin, cos, sqrt, atan2, atan, PI, floor } = Math; /** * @param params - projection specific parameters to be adjusted * @param nadgrids - nad grid data if applicable + * @param transformer - the projection transformer to potentially pull data from */ -export function buildDatum(params: ProjectionParams): void { +export function buildDatum(params: ProjectionParams, transformer: Transformer): void { if (params.datumCode === undefined || params.datumCode === 'none') { params.datumType = PJD_NODATUM; } else { params.datumType = PJD_WGS84; } - // TODO: If datumParams is undefined, check against datum constants using datumCode + // If datumParams is undefined, check against datum constants using datumCode if (params.datumParams === undefined) { const datum = DATUMS[params.datumCode?.toLowerCase() ?? '']; if (datum !== undefined) { @@ -61,11 +62,11 @@ export function buildDatum(params: ProjectionParams): void { } } - // TODO: Just upgrade datumType if grids exists in params - // if (params.nadgrids) { - // params.datumType = PJD_GRIDSHIFT; - // params.grids = params.nadgrids; - // } + // Upgrade datumType if grids exists in params and pull in the grids we need + if (params.nadgrids !== undefined) { + params.datumType = PJD_GRIDSHIFT; + params.grids = transformer.getGridsFromString(params.nadgrids); + } } /** @@ -335,7 +336,7 @@ function checkParams(type: number): boolean { * @param source * @param dest */ -export function checkNotWGS(source: ProjectionTransform, dest: ProjectionTransform) { +export function checkNotWGS(source: ProjectionTransform, dest: ProjectionTransform): boolean { return ( ((source.datumType === PJD_3PARAM || source.datumType === PJD_7PARAM || @@ -364,14 +365,13 @@ export function datumTransform( if (source.datumType === PJD_NODATUM || dest.datumType === PJD_NODATUM) return; // If this datum requires grid shifts, then apply it to geodetic coordinates. - let source_a = source.a; - let source_es = source.es; + let sourceA = source.a; + let sourceEs = source.es; if (source.datumType === PJD_GRIDSHIFT) { // source - const gridShiftCode = applyGridShift(source, false, point); - if (gridShiftCode !== 0) return; - source_a = SRS_WGS84_SEMIMAJOR; - source_es = SRS_WGS84_ESQUARED; + applyGridShift(source, false, point); + sourceA = SRS_WGS84_SEMIMAJOR; + sourceEs = SRS_WGS84_ESQUARED; } let dest_a = dest.a; @@ -385,25 +385,22 @@ export function datumTransform( // Do we need to go through geocentric coordinates? if ( - source_es === dest_es && - source_a === dest_a && + sourceEs === dest_es && + sourceA === dest_a && !checkParams(source.datumType) && !checkParams(dest.datumType) ) return; // Convert to geocentric coordinates. - geodeticToGeocentric(point, source_es, source_a); + geodeticToGeocentric(point, sourceEs, sourceA); // Convert between datums if (checkParams(source.datumType)) geocentricToWgs84(point, source.datumType, source.datumParams); if (checkParams(dest.datumType)) geocentricFromWgs84(point, dest.datumType, dest.datumParams); // Convert back to geodetic coordinates. geocentricToGeodetic(point, dest_es, dest_a, dest_b); - if (dest.datumType === PJD_GRIDSHIFT) { - const destGridShiftResult = applyGridShift(dest, true, point); - if (destGridShiftResult !== 0) return; - } + if (dest.datumType === PJD_GRIDSHIFT) applyGridShift(dest, true, point); } /** @@ -411,25 +408,27 @@ export function datumTransform( * @param inverse * @param point */ -export function applyGridShift(source, inverse, point) { - if (source.grids === null || source.grids.length === 0) { - throw new Error('Grid shift grids not found'); - } +export function applyGridShift( + source: ProjectionTransform, + inverse: boolean, + point: VectorPoint, +): void { + const { grids } = source; + if (grids === undefined) throw new Error('Grid shift grids not found'); const input = { x: -point.x, y: point.y }; let output = { x: Number.NaN, y: Number.NaN }; - let onlyMandatoryGrids = false; const attemptedGrids = []; - outer: for (let i = 0; i < source.grids.length; i++) { - const grid = source.grids[i]; + outer: for (const grid of grids) { attemptedGrids.push(grid.name); if (grid.isNull) { output = input; break; } - onlyMandatoryGrids = grid.mandatory; - if (grid.grid === null) { + if (grid.grid === undefined) { if (grid.mandatory) { - throw new Error(`Unable to find mandatory grid '${grid.name}'`); + console.warn( + `Unable to find mandatory grid '${grid.name}'. Maybe have an incorrect result.`, + ); } continue; } @@ -437,11 +436,11 @@ export function applyGridShift(source, inverse, point) { for (let j = 0, jj = subgrids.length; j < jj; j++) { const subgrid = subgrids[j]; // skip tables that don't match our point at all - const epsilon = (abs(subgrid.del[1]) + abs(subgrid.del[0])) / 10000.0; - const minX = subgrid.ll[0] - epsilon; - const minY = subgrid.ll[1] - epsilon; - const maxX = subgrid.ll[0] + (subgrid.lim[0] - 1) * subgrid.del[0] + epsilon; - const maxY = subgrid.ll[1] + (subgrid.lim[1] - 1) * subgrid.del[1] + epsilon; + const epsilon = (abs(subgrid.del.y) + abs(subgrid.del.x)) / 10000.0; + const minX = subgrid.ll.x - epsilon; + const minY = subgrid.ll.y - epsilon; + const maxX = subgrid.ll.x + (subgrid.lim.x - 1) * subgrid.del.x + epsilon; + const maxY = subgrid.ll.y + (subgrid.lim.y - 1) * subgrid.del.y + epsilon; if (minY > input.y || minX > input.x || maxY < input.y || maxX < input.x) { continue; } @@ -452,13 +451,13 @@ export function applyGridShift(source, inverse, point) { } } if (isNaN(output.x)) { - throw new Error( - `Failed to find a grid shift table for location '${-input.x * R2D} ${input.y * R2D}' tried: '${attemptedGrids}'`, - ); + return; + // throw new Error( + // `Failed to find a grid shift table for location '${-input.x * R2D} ${input.y * R2D}' tried: '${attemptedGrids}'`, + // ); } point.x = -output.x; point.y = output.y; - return 0; } /** @@ -466,20 +465,15 @@ export function applyGridShift(source, inverse, point) { * @param inverse * @param ct */ -function applySubgridShift(pin, inverse, ct) { +function applySubgridShift(pin: VectorPoint, inverse: boolean, ct: NadSubGrid): VectorPoint { const val = { x: Number.NaN, y: Number.NaN }; - if (isNaN(pin.x)) { - return val; - } const tb = { x: pin.x, y: pin.y }; - tb.x -= ct.ll[0]; - tb.y -= ct.ll[1]; + tb.x -= ct.ll.x; + tb.y -= ct.ll.y; tb.x = adjustLon(tb.x - PI) + PI; const t = nadInterpolate(tb, ct); if (inverse) { - if (isNaN(t.x)) { - return val; - } + if (isNaN(t.x)) return val; t.x = tb.x - t.x; t.y = tb.y - t.y; let i = 9; @@ -495,12 +489,10 @@ function applySubgridShift(pin, inverse, ct) { dif = { x: tb.x - (del.x + t.x), y: tb.y - (del.y + t.y) }; t.x += dif.x; t.y += dif.y; - } while (i-- && abs(dif.x) > tol && abs(dif.y) > tol); - if (i < 0) { - throw new Error('Inverse grid shift iterator failed to converge.'); - } - val.x = adjustLon(t.x + ct.ll[0]); - val.y = t.y + ct.ll[1]; + } while (i-- > 0 && abs(dif.x) > tol && abs(dif.y) > tol); + if (i < 0) throw new Error('Inverse grid shift iterator failed to converge.'); + val.x = adjustLon(t.x + ct.ll.x); + val.y = t.y + ct.ll.y; } else { if (!isNaN(t.x)) { val.x = pin.x + t.x; @@ -514,22 +506,22 @@ function applySubgridShift(pin, inverse, ct) { * @param pin * @param ct */ -function nadInterpolate(pin: VectorPoint, ct): VectorPoint { - const t = { x: pin.x / ct.del[0], y: pin.y / ct.del[1] }; - const indx = { x: floor(t.x), y: floor(t.y) }; - const frct = { x: t.x - 1 * indx.x, y: t.y - 1.0 * indx.y }; +function nadInterpolate(pin: VectorPoint, ct: NadSubGrid): VectorPoint { + const t = { x: pin.x / ct.del.x, y: pin.y / ct.del.y }; + const indx: VectorPoint = { x: floor(t.x), y: floor(t.y) }; + const frct = { x: t.x - indx.x, y: t.y - indx.y }; const val = { x: NaN, y: NaN }; let inx; - if (indx.x < 0 || indx.x >= ct.lim[0]) return val; - if (indx.y < 0 || indx.y >= ct.lim[1]) return val; - inx = indx.y * ct.lim[0] + indx.x; - const f00 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] }; + if (indx.x < 0 || indx.x >= ct.lim.x) return val; + if (indx.y < 0 || indx.y >= ct.lim.y) return val; + inx = indx.y * ct.lim.x + indx.x; + const f00 = { x: ct.cvs[inx].x, y: ct.cvs[inx].y }; inx++; - const f10 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] }; - inx += ct.lim[0]; - const f11 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] }; + const f10 = { x: ct.cvs[inx].x, y: ct.cvs[inx].y }; + inx += ct.lim.x; + const f11 = { x: ct.cvs[inx].x, y: ct.cvs[inx].y }; inx--; - const f01 = { x: ct.cvs[inx][0], y: ct.cvs[inx][1] }; + const f01 = { x: ct.cvs[inx].x, y: ct.cvs[inx].y }; const m11 = frct.x * frct.y, m10 = frct.x * (1.0 - frct.y), m00 = (1.0 - frct.x) * (1.0 - frct.y), diff --git a/src/proj4/parseCode.ts b/src/proj4/parseCode.ts index 224936c3..1d16322c 100644 --- a/src/proj4/parseCode.ts +++ b/src/proj4/parseCode.ts @@ -11,13 +11,18 @@ import { isWKTProjection, parseWKTProjection } from 's2-tools/readers/wkt'; import type { DatumParams } from 's2-tools/readers/wkt'; import type { ProjectionParams } from './projections'; +import type { Transformer } from './transformer'; /** * TODO: Support json objects that use the https://proj.org/schemas/v0.7/projjson.schema.json * @param code * @param proj + * @param transformer */ -export function parseProj(code: string | ProjectionParams): ProjectionParams { +export function parseProj( + code: string | ProjectionParams, + transformer: Transformer, +): ProjectionParams { let params: ProjectionParams = {}; if (typeof code === 'object') params = code; else if (code[0] === '+') params = parseProj4Str(code); @@ -28,7 +33,7 @@ export function parseProj(code: string | ProjectionParams): ProjectionParams { deriveEccentricity(params); params.lat1 = params.lat1 ?? params.lat0; // Lambert_Conformal_Conic_1SP, for example, needs this params.k0 = params.k ?? params.k0; - buildDatum(params); + buildDatum(params, transformer); // filter undefined values Object.keys(params).forEach((key) => { // @ts-expect-error - key is a string diff --git a/src/proj4/projections/base.ts b/src/proj4/projections/base.ts index a14690a1..d8b25bfb 100644 --- a/src/proj4/projections/base.ts +++ b/src/proj4/projections/base.ts @@ -1,6 +1,7 @@ import { D2R, PJD_NODATUM, R2D } from '../constants'; import type { DatumParams } from 's2-tools/readers/wkt'; +import type { GridDefinition } from 's2-tools/readers/nadgrid'; import type { ProjectionTransform } from '.'; import type { VectorPoint } from 's2-tools/geometry'; @@ -56,6 +57,7 @@ export interface ProjectionParams { noRot?: boolean; rA?: boolean; projName?: string; + grids?: GridDefinition[]; } /** Base class for all projections */ @@ -97,6 +99,7 @@ export class ProjectionBase implements ProjectionTransform { approx = false; axis = 'enu'; nadgrids = '@null'; + grids?: GridDefinition[]; sphere = false; ellps = 'wgs84'; // Ellipsoid name diff --git a/src/proj4/projections/index.ts b/src/proj4/projections/index.ts index d8d1487e..6daf6f95 100644 --- a/src/proj4/projections/index.ts +++ b/src/proj4/projections/index.ts @@ -37,6 +37,7 @@ import { VanDerGrinten } from './vandg'; import { ProjectionBase } from './base'; import type { DatumParams } from 's2-tools/readers/wkt'; +import type { GridDefinition } from 's2-tools/readers/nadgrid'; import type { VectorPoint } from 's2json-spec'; export * from './aea'; @@ -88,6 +89,7 @@ export interface ProjectionTransform { toMeter?: number; fromGreenwich: number; datum?: string; + grids?: GridDefinition[]; datumCode: string; datumType: number; datumParams: DatumParams; diff --git a/src/proj4/transformer.ts b/src/proj4/transformer.ts index be6aa08b..b1aa2216 100644 --- a/src/proj4/transformer.ts +++ b/src/proj4/transformer.ts @@ -1,4 +1,5 @@ import * as EPSG_Codes from './projections/references'; +import { NadGridStore } from '../readers/nadgrid'; import { parseProj } from './parseCode'; import { ALL_DEFINITIONS, DEFAULT_DEFINITIONS, WGS84 } from './projections'; import { checkNotWGS, datumTransform } from './datum'; @@ -16,7 +17,7 @@ import type { * as needed to reduce code size and improve performance. * Both forward and inverse projections are default set to wgs84. */ -export class Transformer { +export class Transformer extends NadGridStore { // EPSG code definitions epsgs = new Map(); // Definitions are descriptions of projections @@ -32,6 +33,7 @@ export class Transformer { * @param destCode - convenience: if provided, we run `this.setDestination(destCode)` immediately */ constructor(sourceCode?: string | ProjectionParams, destCode?: string | ProjectionParams) { + super(); for (const def of DEFAULT_DEFINITIONS) this.insertDefinition(def); // defaults to a standard WGS84 lon-lat projection transform this.source = this.destination = this.wgs84 = this.#buildTransformer(WGS84); @@ -55,7 +57,7 @@ export class Transformer { */ #buildTransformer(code: string | ProjectionParams): ProjectionTransform { code = this.#parseEPSGCode(code); - const params = parseProj(code); + const params = parseProj(code, this); // search let def: ProjectionTransformDefinition | undefined; for (const name of [params.projName, params.name]) { @@ -72,14 +74,10 @@ export class Transformer { * @returns - if no EPSG code is found, returns the original code. Otherwise returns the EPSG definition */ #parseEPSGCode(code: string | ProjectionParams): string | ProjectionParams { - if (typeof code === 'string' && this.epsgs.has(code)) return this.epsgs.get(code)!; - else if ( - typeof code === 'object' && - typeof code.projName === 'string' && - this.epsgs.has(code.projName) - ) - return this.epsgs.get(code.projName)!; - else return code; + const codeName = (typeof code === 'string' ? code : code.projName)?.replaceAll(':', '_'); + const epsg = this.epsgs.get(codeName ?? ''); + if (epsg !== undefined) return epsg; + return code; } /** diff --git a/src/readers/README.md b/src/readers/README.md index d3c6c4fc..f3c1be6b 100644 --- a/src/readers/README.md +++ b/src/readers/README.md @@ -11,7 +11,7 @@ ### OTHERS - [ ] GTFS -- [ ] netCDF (currently only partially supported via nadgrid) +- [ ] netCDF - [ ] gdb (in gzipped form) - [ ] TIFFs (.tif, .tiff, .dem) - [ ] Images (.png, .jpg, .gif) diff --git a/src/readers/geotiff/constants.ts b/src/readers/geotiff/constants.ts index 357b20de..4095ead1 100644 --- a/src/readers/geotiff/constants.ts +++ b/src/readers/geotiff/constants.ts @@ -121,9 +121,7 @@ export const FIELD_TAG_NAMES = { 0xc5f2: 'LercParameters', }; -/** - * - */ +/** List of Tags and their representations */ export interface TagNames { // TIFF Baseline Artist?: string; @@ -137,42 +135,42 @@ export interface TagNames { ExtraSamples?: number[]; FillOrder?: number; FreeByteCounts?: number[]; - // 0x0120: 'FreeOffsets'; - // 0x0123: 'GrayResponseCurve'; - // 0x0122: 'GrayResponseUnit'; - // 0x013c: 'HostComputer'; + FreeOffsets?: number[]; + GrayResponseCurve?: number[]; + GrayResponseUnit?: number; + HostComputer?: string; ImageDescription?: string; ImageLength?: number; ImageWidth?: number; - // 0x010f: 'Make'; - // 0x0119: 'MaxSampleValue'; - // 0x0118: 'MinSampleValue'; - // 0x0110: 'Model'; - // 0x00fe: 'NewSubfileType'; - // 0x0112: 'Orientation'; + Make?: string; + MaxSampleValue?: number; + MinSampleValue?: number; + Model?: string; + NewSubfileType?: number; + Orientation?: number; PhotometricInterpretation?: number; PlanarConfiguration?: number; ResolutionUnit?: number; RowsPerStrip?: number; SamplesPerPixel?: number; - // 0x0131: 'Software'; + Software?: string; StripByteCounts?: number[]; StripOffsets?: number[]; - // 0x00ff: 'SubfileType'; - // 0x0107: 'Threshholding'; + SubfileType?: number; + Threshholding?: number; XResolution?: [number, number]; YResolution?: [number, number]; - // // TIFF Extended - // 0x0146: 'BadFaxLines'; - // 0x0147: 'CleanFaxData'; - // 0x0157: 'ClipPath'; - // 0x0148: 'ConsecutiveBadFaxLines'; - // 0x01b1: 'Decode'; - // 0x01b2: 'DefaultImageColor'; - // 0x010d: 'DocumentName'; - // 0x0150: 'DotRange'; - // 0x0141: 'HalftoneHints'; - // 0x015a: 'Indexed'; + // TIFF Extended + BadFaxLines?: number; + CleanFaxData?: number; + ClipPathName?: string; + ConsecutiveBadFaxLines?: number[]; + Decode?: number[]; + DefaultImageColor?: number; + DocumentName?: string; + DotRange?: number[]; + HalftoneHints?: number[]; + Indexed?: number; JPEGTables?: number[]; // 0x011d: 'PageName'; // 0x0129: 'PageNumber'; @@ -200,7 +198,7 @@ export interface TagNames { // 0x0212: 'YCbCrSubSampling'; // 0x0159: 'YClipPathUnits'; // 0x011f: 'YPosition'; - // // EXIF + // EXIF // 0x9202: 'ApertureValue'; // 0xa001: 'ColorSpace'; // 0x9004: 'DateTimeDigitized'; @@ -217,27 +215,26 @@ export interface TagNames { // 0x927c: 'MakerNote'; // 0x9201: 'ShutterSpeedValue'; // 0x9286: 'UserComment'; - // // IPTC - // 0x83bb: 'IPTC'; - // // ICC - // 0x8773: 'ICC Profile'; - // // XMP - // 0x02bc: 'XMP'; - // // GDAL - // 0xa480: 'GDAL_METADATA'; - // 0xa481: 'GDAL_NODATA'; - // // Photoshop - // 0x8649: 'Photoshop'; - // // GeoTiff - // 0x830e: 'ModelPixelScale'; - // 0x8482: 'ModelTiepoint'; - // 0x85d8: 'ModelTransformation'; + // IPTC + IPTC?: number[]; + // ICC + 'ICC Profile'?: number[]; + // XMP + XMP?: number[]; + // GDAL + GDAL_METADATA?: string; + GDAL_NODATA?: number; + // Photoshop + Photoshop?: string; + // GeoTiff + ModelPixelScale?: number[]; + ModelTiepoint?: number[]; ModelTransformation?: number[]; - // 0x87af: 'GeoKeyDirectory'; - // 0x87b0: 'GeoDoubleParams'; + GeoKeyDirectory?: GeoKeyDirectory; + GeoDoubleParams?: number[]; GeoAsciiParams?: string; - // // LERC - // 0xc5f2: 'LercParameters'; + // LERC + LercParameters?: number[]; } export const FIELD_TAG_TYPES = { diff --git a/src/readers/geotiff/decoder.ts b/src/readers/geotiff/decoder.ts index 8016350e..a71c7869 100644 --- a/src/readers/geotiff/decoder.ts +++ b/src/readers/geotiff/decoder.ts @@ -14,7 +14,7 @@ export function getDecoder(compression = 1): Decoder { if (compression === 1) return rawDecoder; else if (compression === 5) return lzwDecoder; else if (compression === 7) return jpegDecoder; - else if ([6, 7, 50001].includes(compression)) return imageDecoder; + else if ([6, 50001].includes(compression)) return imageDecoder; else if ([8, 32946].includes(compression)) return deflateDecoder; else if (compression === 32773) return packbitsDecoder; throw new Error(`Unsupported compression: ${compression}`); diff --git a/src/readers/geotiff/image.ts b/src/readers/geotiff/image.ts index 5cb3c846..b4feccd5 100644 --- a/src/readers/geotiff/image.ts +++ b/src/readers/geotiff/image.ts @@ -6,7 +6,7 @@ import { needsNormalization, normalizeArray, sum, toArrayType } from './imageUti import type { Reader } from '..'; import type { Transformer } from '../../proj4'; -import type { ArrayTypes, Decoder, ImageFileDirectory } from '.'; +import type { ArrayTypes, Decoder, GridReader, ImageFileDirectory } from '.'; import type { Properties, VectorMultiPoint, @@ -64,26 +64,26 @@ export class GeoTIFFImage { #littleEndian: boolean; #isTiled = false; #planarConfiguration = 1; - #transformer?: Transformer; + #transformer: Transformer; /** * @param reader * @param imageDirectory * @param littleEndian + * @param gridStore */ - constructor(reader: Reader, imageDirectory: ImageFileDirectory, littleEndian: boolean) { + constructor( + reader: Reader, + imageDirectory: ImageFileDirectory, + littleEndian: boolean, + gridStore: GridReader[], + ) { this.#reader = reader; this.#imageDirectory = imageDirectory; this.#littleEndian = littleEndian; if (imageDirectory.StripOffsets === undefined) this.#isTiled = true; if (imageDirectory.PlanarConfiguration !== undefined) this.#planarConfiguration = imageDirectory.PlanarConfiguration; - } - - /** Build a transformer if it doesn't exist. */ - getTransformer(): Transformer { - if (this.#transformer === undefined) - this.#transformer = buildTransform(this.#imageDirectory.geoKeyDirectory); - return this.#transformer; + this.#transformer = buildTransform(this.#imageDirectory.geoKeyDirectory, gridStore); } /** @@ -224,8 +224,7 @@ export class GeoTIFFImage { */ get originLL(): VectorPoint { const { origin } = this; - const transfomer = this.getTransformer(); - return transfomer.forward(origin); + return this.#transformer.forward(origin); } /** @@ -263,8 +262,7 @@ export class GeoTIFFImage { */ get resolutionLL(): VectorPoint { const { resolution } = this; - const transfomer = this.getTransformer(); - return transfomer.forward(resolution); + return this.#transformer.forward(resolution); } /** @@ -313,9 +311,8 @@ export class GeoTIFFImage { const maxY = Math.max(y1, y2); if (transform) { - const transformer = this.getTransformer(); - const { x: tminX, y: tminY } = transformer.forward({ x: minX, y: minY }); - const { x: tmaxX, y: tmaxY } = transformer.forward({ x: maxX, y: maxY }); + const { x: tminX, y: tminY } = this.#transformer.forward({ x: minX, y: minY }); + const { x: tmaxX, y: tmaxY } = this.#transformer.forward({ x: maxX, y: maxY }); return [tminX, tminY, tmaxX, tmaxY]; } else { return [minX, minY, maxX, maxY]; @@ -414,7 +411,6 @@ export class GeoTIFFImage { * @returns - The vector feature with rgba values incoded into the points */ async getMultiPointVector(): Promise { - const transformer = this.getTransformer(); const { width, height, alpha, data } = await this.getRGBA(); const [minX, minY, maxX, maxY] = this.getBoundingBox(false); const coordinates: VectorMultiPoint = []; @@ -437,7 +433,7 @@ export class GeoTIFFImage { const b = data[y * width * rgbaStride + x * rgbaStride + 2]; const a = alpha ? data[y * width * rgbaStride + x * rgbaStride + 3] : 255; // find the lon-lat coordinates of the point - const { x: lon, y: lat } = transformer.forward({ x: xPos, y: yPos }); + const { x: lon, y: lat } = this.#transformer.forward({ x: xPos, y: yPos }); // Add point to coordinates array coordinates.push({ x: lon, diff --git a/src/readers/geotiff/index.ts b/src/readers/geotiff/index.ts index 5664b01e..c3ede805 100644 --- a/src/readers/geotiff/index.ts +++ b/src/readers/geotiff/index.ts @@ -15,15 +15,32 @@ export * from './image'; export * from './imageUtil'; export * from './predictor'; +/** + * + */ +export interface GridReader { + key: string; + reader: Reader; +} + /** * */ export class GeoTIFFReader extends GeoTIFFHeaderReader { + gridStore: GridReader[] = []; /** @param reader - the geotiff reader to parse data from */ constructor(reader: Reader) { super(reader); } + /** + * @param key + * @param reader + */ + addGridReader(key: string, reader: Reader): void { + this.gridStore.push({ key, reader }); + } + /** * Get the n-th internal subfile of an image. By default, the first is returned. * @param index - the index of the image to get [Default=0] @@ -31,7 +48,12 @@ export class GeoTIFFReader extends GeoTIFFHeaderReader { */ getImage(index = 0): GeoTIFFImage { if (index >= this.length) throw new Error('Index out of bounds.'); - return new GeoTIFFImage(this.reader, this.imageDirectories[index], this.littleEndian); + return new GeoTIFFImage( + this.reader, + this.imageDirectories[index], + this.littleEndian, + this.gridStore, + ); } /** diff --git a/src/readers/geotiff/jpeg.ts b/src/readers/geotiff/jpeg.ts index 87ad46d7..81b32bb2 100644 --- a/src/readers/geotiff/jpeg.ts +++ b/src/readers/geotiff/jpeg.ts @@ -645,6 +645,7 @@ function buildComponentData(frame, component) { * */ class JpegStreamReader { + quantizationTables: Int32Array[] = []; /** * */ @@ -652,7 +653,6 @@ class JpegStreamReader { this.jfif = null; this.adobe = null; - this.quantizationTables = []; this.huffmanTablesAC = []; this.huffmanTablesDC = []; this.resetFrames(); diff --git a/src/readers/geotiff/proj.ts b/src/readers/geotiff/proj.ts index 27a4c535..c9295832 100644 --- a/src/readers/geotiff/proj.ts +++ b/src/readers/geotiff/proj.ts @@ -12,17 +12,23 @@ import { } from '../../proj4'; import type { DatumParams } from '..'; -import type { GeoKeyDirectory } from '.'; import type { ProjectionParams } from '../../proj4'; +import type { GeoKeyDirectory, GridReader } from '.'; /** * @param geoKeys + * @param gridStore */ -export function buildTransform(geoKeys?: GeoKeyDirectory): Transformer { +export function buildTransform( + geoKeys?: GeoKeyDirectory, + gridStore: GridReader[] = [], +): Transformer { const params = buildParams(geoKeys); const transformer = new Transformer(); injectAllDefinitions(transformer); injectAllEPSGCodes(transformer); + for (const { key, reader } of gridStore) transformer.addGridFromReader(key, reader); + if (geoKeys === undefined) return transformer; if (params !== undefined) transformer.setSource(params); return transformer; } diff --git a/src/readers/nadgrid.ts b/src/readers/nadgrid.ts index 74477682..926f3409 100644 --- a/src/readers/nadgrid.ts +++ b/src/readers/nadgrid.ts @@ -1,6 +1,11 @@ import type { Reader } from '.'; -import type { FeatureCollection, VectorFeature, VectorPoint } from 's2-tools/geometry'; +import type { + FeatureCollection, + VectorFeature, + VectorMultiPoint, + VectorPoint, +} from 's2-tools/geometry'; /** * Resources for details of NTv2 file formats: @@ -8,12 +13,32 @@ import type { FeatureCollection, VectorFeature, VectorPoint } from 's2-tools/geo * - http://mimaka.com/help/gs/html/004_NTV2%20Data%20Format.htm */ +/** Seconds to degrees (S / 3_600) */ +const SEC2DEG = 0.00000484813681109536; + +/** A Subgrid contained inside a NadGrid */ +export interface NadSubGrid { + cvs: VectorMultiPoint; + ll: VectorPoint; + del: VectorPoint; + lim: VectorPoint; + count: number; +} + +/** A grid wrapper around a parsed .gsb file */ +export interface GridDefinition { + name: string; + mandatory: boolean; + grid?: NadGrid; + isNull: boolean; +} + /** Store Grids from a NTv2 file (.gsb) */ export class NadGridStore { grids = new Map(); /** @param grid - a nadgrid class to store */ - addGrid(grid: NadGrid) { + addGrid(grid: NadGrid): void { this.grids.set(grid.key, grid); } @@ -29,10 +54,43 @@ export class NadGridStore { * @param key - the key or name of the grid * @param reader - the input data to parse */ - addGridFromReader(key: string, reader: Reader) { + addGridFromReader(key: string, reader: Reader): void { const grid = new NadGrid(key, reader); this.addGrid(grid); } + + /** + * @param keys - complex string of grid keys to test against + * @returns - an array of grid definitions + */ + getGridsFromString(keys?: string): GridDefinition[] { + const res: GridDefinition[] = []; + if (keys === undefined) return res; + for (const grid of keys.split(',')) { + const g = this.getGridFromString(grid); + if (g !== undefined) res.push(g); + } + return res; + } + + /** + * @param name - a single grid name to test against + * @returns - a grid definition + */ + getGridFromString(name: string): undefined | GridDefinition { + if (name.length === 0) return undefined; + const optional = name[0] === '@'; + if (optional) name = name.slice(1); + if (name === 'null') { + return { name: 'null', mandatory: !optional, grid: undefined, isNull: true }; + } + return { + name: name, + mandatory: !optional, + grid: this.grids.get(name), + isNull: false, + }; + } } /** The header of a NTv2 file */ @@ -78,9 +136,9 @@ export interface NadGridMetadata { /** Load a binary NTv2 file (.gsb) */ export class NadGrid { - isLittleEndian = false; + #isLittleEndian = false; #header!: NadGridHeader; - features: VectorFeature[] = []; + subgrids: NadSubGrid[] = []; /** * @param key - the key or name of the grid @@ -90,13 +148,13 @@ export class NadGrid { public key: string, public reader: Reader, ) { - this.#detectLittleEndian(); + this.#isLittleEndian = this.#detectLittleEndian(); this.#readHeader(); this.#readSubGrids(); } /** @returns - The header describing how to decode the feature */ - getHeader(): NadGridHeader { + get header(): NadGridHeader { return { ...this.#header }; } @@ -105,7 +163,7 @@ export class NadGrid { * @returns - a collection of VectorFeatures */ getFeatureCollection(): FeatureCollection { - const { features } = this; + const features = this.subgrids.map(this.#subGrideToVectorFeature); return { type: 'FeatureCollection', features }; } @@ -114,7 +172,7 @@ export class NadGrid { * @yields {VectorFeature} */ *[Symbol.iterator](): Generator> { - for (const feature of this.features) yield feature; + for (const subgrid of this.subgrids) yield this.#subGrideToVectorFeature(subgrid); } /** @@ -132,22 +190,23 @@ export class NadGrid { } /** Parse the main header data. Describes the subgrids to decode lon-lat */ - #readHeader() { - const { reader, isLittleEndian } = this; + #readHeader(): void { + const { reader } = this; + const le = this.#isLittleEndian; this.#header = { - nFields: reader.getInt32(8, isLittleEndian), - nSubgridFields: reader.getInt32(24, isLittleEndian), - nSubgrids: reader.getInt32(40, isLittleEndian), + nFields: reader.getInt32(8, le), + nSubgridFields: reader.getInt32(24, le), + nSubgrids: reader.getInt32(40, le), shiftType: reader.parseString(56, 8), - fromSemiMajorAxis: reader.getFloat64(120, isLittleEndian), - fromSemiMinorAxis: reader.getFloat64(136, isLittleEndian), - toSemiMajorAxis: reader.getFloat64(152, isLittleEndian), - toSemiMinorAxis: reader.getFloat64(168, isLittleEndian), + fromSemiMajorAxis: reader.getFloat64(120, le), + fromSemiMinorAxis: reader.getFloat64(136, le), + toSemiMajorAxis: reader.getFloat64(152, le), + toSemiMinorAxis: reader.getFloat64(168, le), }; } /** Build all grid data */ - #readSubGrids() { + #readSubGrids(): void { let gridOffset = 176; for (let i = 0; i < this.#header.nSubgrids; i++) { const subHeader = this.#readSubGridHeader(gridOffset); @@ -159,52 +218,69 @@ export class NadGrid { 1 + (subHeader.upperLatitude - subHeader.lowerLatitude) / subHeader.latitudeInterval, ); - const feature: VectorFeature = { - type: 'VectorFeature', - properties: {}, - geometry: { - type: 'MultiPoint', - is3D: false, - // CVS => lonLat coords - coordinates: nodes.map(({ longitudeShift, latitudeShift }) => { - return { x: secondsToDegrees(longitudeShift), y: secondsToDegrees(latitudeShift) }; - }), - }, - metadata: { - // ll => lowerLonLat - lowerLonLat: { - x: secondsToDegrees(subHeader.lowerLongitude), - y: secondsToDegrees(subHeader.lowerLatitude), - }, - // del => lonLatInterval - lonLatInterval: { x: subHeader.longitudeInterval, y: subHeader.latitudeInterval }, - // lim => lonLatColumnCount - lonLatColumnCount: { x: lonColumnCount, y: latColumnCount }, - // count => count - count: subHeader.gridNodeCount, + const subGrid: NadSubGrid = { + cvs: nodes.map(({ longitudeShift, latitudeShift }) => { + return { x: longitudeShift * SEC2DEG, y: latitudeShift * SEC2DEG }; + }), + ll: { + x: subHeader.lowerLongitude * SEC2DEG, + y: subHeader.lowerLatitude * SEC2DEG, }, + del: { x: subHeader.longitudeInterval * SEC2DEG, y: subHeader.latitudeInterval * SEC2DEG }, + lim: { x: lonColumnCount, y: latColumnCount }, + count: subHeader.gridNodeCount, }; - this.features.push(feature); + + this.subgrids.push(subGrid); gridOffset += 176 + subHeader.gridNodeCount * 16; } } + /** + * @param subGrid - the subgrid to convert to a vector feature + * @returns - the vector feature + */ + #subGrideToVectorFeature(subGrid: NadSubGrid): VectorFeature { + const { cvs, ll, del, lim, count } = subGrid; + return { + type: 'VectorFeature', + properties: {}, + geometry: { + type: 'MultiPoint', + is3D: false, + // CVS => lonLat coords + coordinates: cvs, + }, + metadata: { + // ll => lowerLonLat + lowerLonLat: ll, + // del => lonLatInterval + lonLatInterval: del, + // lim => lonLatColumnCount + lonLatColumnCount: lim, + // count => count + count, + }, + }; + } + /** * @param offset - offset to read in the subgrid header * @returns - the subgrid header */ #readSubGridHeader(offset: number): NadSubGridHeader { - const { reader, isLittleEndian } = this; + const { reader } = this; + const le = this.#isLittleEndian; return { name: reader.parseString(offset + 8, 8), parent: reader.parseString(offset + 24, 8), - lowerLatitude: reader.getFloat64(offset + 72, isLittleEndian), - upperLatitude: reader.getFloat64(offset + 88, isLittleEndian), - lowerLongitude: reader.getFloat64(offset + 104, isLittleEndian), - upperLongitude: reader.getFloat64(offset + 120, isLittleEndian), - latitudeInterval: reader.getFloat64(offset + 136, isLittleEndian), - longitudeInterval: reader.getFloat64(offset + 152, isLittleEndian), - gridNodeCount: reader.getInt32(offset + 168, isLittleEndian), + lowerLatitude: reader.getFloat64(offset + 72, le), + upperLatitude: reader.getFloat64(offset + 88, le), + lowerLongitude: reader.getFloat64(offset + 104, le), + upperLongitude: reader.getFloat64(offset + 120, le), + latitudeInterval: reader.getFloat64(offset + 136, le), + longitudeInterval: reader.getFloat64(offset + 152, le), + gridNodeCount: reader.getInt32(offset + 168, le), }; } @@ -214,30 +290,20 @@ export class NadGrid { * @returns - an array of grid nodes */ #readGridNodes(offset: number, gridHeader: NadSubGridHeader): GridNode[] { - const { reader, isLittleEndian } = this; + const { reader } = this; + const le = this.#isLittleEndian; const nodesOffset = offset + 176; const gridRecordLength = 16; const gridShiftRecords = []; for (let i = 0; i < gridHeader.gridNodeCount; i++) { const record = { - latitudeShift: reader.getFloat32(nodesOffset + i * gridRecordLength, isLittleEndian), - longitudeShift: reader.getFloat32(nodesOffset + i * gridRecordLength + 4, isLittleEndian), - latitudeAccuracy: reader.getFloat32(nodesOffset + i * gridRecordLength + 8, isLittleEndian), - longitudeAccuracy: reader.getFloat32( - nodesOffset + i * gridRecordLength + 12, - isLittleEndian, - ), + latitudeShift: reader.getFloat32(nodesOffset + i * gridRecordLength, le), + longitudeShift: reader.getFloat32(nodesOffset + i * gridRecordLength + 4, le), + latitudeAccuracy: reader.getFloat32(nodesOffset + i * gridRecordLength + 8, le), + longitudeAccuracy: reader.getFloat32(nodesOffset + i * gridRecordLength + 12, le), }; gridShiftRecords.push(record); } return gridShiftRecords; } } - -/** - * @param seconds - number of seconds - * @returns radians - */ -function secondsToDegrees(seconds: number): number { - return seconds / 3600; -} diff --git a/src/readers/netCDF/data.ts b/src/readers/netCDF/data.ts new file mode 100644 index 00000000..eda00277 --- /dev/null +++ b/src/readers/netCDF/data.ts @@ -0,0 +1,66 @@ +import { IOBuffer } from 'iobuffer'; + +import { Header } from './header'; +import { num2bytes, readType, str2num } from './types'; +// const STREAMING = 4294967295; + +/** + * Read data for the given non-record variable + * @param buffer - Buffer for the file data + * @param variable - Variable metadata + * @returns - Data of the element + */ +export function nonRecord( + buffer: IOBuffer, + variable: Header['variables'][number], +): Array> { + // variable type + const type = str2num(variable.type); + + // size of the data + const size = variable.size / num2bytes(type); + + // iterates over the data + const data = new Array(size); + for (let i = 0; i < size; i++) { + data[i] = readType(buffer, type, 1); + } + + return data; +} + +/** + * Read data for the given record variable + * @param buffer - Buffer for the file data + * @param variable - Variable metadata + * @param recordDimension - Record dimension metadata + * @returns - Data of the element + */ +export function record( + buffer: IOBuffer, + variable: Header['variables'][number], + recordDimension: Header['recordDimension'], +): Array> { + // variable type + const type = str2num(variable.type); + const width = variable.size ? variable.size / num2bytes(type) : 1; + + // size of the data + // TODO streaming data + const size = recordDimension.length; + + // iterates over the data + const data = new Array(size); + const step = recordDimension.recordStep; + if (step) { + for (let i = 0; i < size; i++) { + const currentOffset = buffer.offset; + data[i] = readType(buffer, type, width); + buffer.seek(currentOffset + step); + } + } else { + throw new Error('recordDimension.recordStep is undefined'); + } + + return data; +} diff --git a/src/readers/netCDF/header.ts b/src/readers/netCDF/header.ts new file mode 100644 index 00000000..cc19dccc --- /dev/null +++ b/src/readers/netCDF/header.ts @@ -0,0 +1,296 @@ +import { IOBuffer } from 'iobuffer'; + +import { num2str, readType } from './types'; +import { notNetcdf, padding, readName } from './utils'; + +// Grammar constants +const ZERO = 0; +const NC_DIMENSION = 10; +const NC_VARIABLE = 11; +const NC_ATTRIBUTE = 12; +const NC_UNLIMITED = 0; + +/** + * + */ +export interface Header { + recordDimension: { + /** + Length of the record dimension + sum of the varSize's of all the record variables. + */ + length: number; + id?: number; + name?: string; + recordStep?: number; + }; + // Version + version: number; + /* List of dimensions*/ + dimensions: Dimensions['dimensions']; + /* List of global attributes */ + globalAttributes: Attribute[]; + /* List of variables*/ + variables: Variables['variables']; +} +/** + * Reads the file header as @see {@link Header} + * @param buffer - Buffer for the file data + * @param version - Version of the file + * @returns + */ +export function header(buffer: IOBuffer, version: number): Header { + const header: Partial
= { version }; + + const recordDimension: Header['recordDimension'] = { + length: buffer.readUint32(), + }; + + const dimList = dimensionsList(buffer); + + if (!Array.isArray(dimList)) { + recordDimension.id = dimList.recordId; + recordDimension.name = dimList.recordName; + header.dimensions = dimList.dimensions; + } + + header.globalAttributes = attributesList(buffer); + + const variables = variablesList(buffer, recordDimension?.id, version); + if (!Array.isArray(variables)) { + header.variables = variables.variables; + recordDimension.recordStep = variables.recordStep; + } + + header.recordDimension = recordDimension; + + return header as Header; +} + +/** + * + */ +export interface Dimensions { + /* that is an array of dimension object:*/ + dimensions: Array<{ + /* name of the dimension*/ + name: string; + /* size of the dimension */ + size: number; + }>; + /* id of the dimension that has unlimited size or undefined,*/ + recordId?: number; + /* name of the dimension that has unlimited size */ + recordName?: string; +} + +/** + * List of dimensions + * @param buffer - Buffer for the file data + * @returns List of dimensions + */ +function dimensionsList(buffer: IOBuffer): Dimensions | [] { + const result: Partial = {}; + let recordId: number | undefined, recordName: string | undefined; + + const dimList = buffer.readUint32(); + + let dimensions: Dimensions['dimensions']; + + if (dimList === ZERO) { + notNetcdf(buffer.readUint32() !== ZERO, 'wrong empty tag for list of dimensions'); + return []; + } else { + notNetcdf(dimList !== NC_DIMENSION, 'wrong tag for list of dimensions'); + + // Length of dimensions + const dimensionSize = buffer.readUint32(); + dimensions = new Array(dimensionSize); + + //populate `name` and `size` for each dimension + for (let dim = 0; dim < dimensionSize; dim++) { + // Read name + const name = readName(buffer); + + // Read dimension size + const size = buffer.readUint32(); + if (size === NC_UNLIMITED) { + // in netcdf 3 one field can be of size unlimited + recordId = dim; + recordName = name; + } + + dimensions[dim] = { + name, + size, + }; + } + } + if (recordId !== undefined) { + result.recordId = recordId; + } + if (recordName !== undefined) { + result.recordName = recordName; + } + result.dimensions = dimensions; + return result as Dimensions; +} + +/** + * + */ +export interface Attribute { + /* name of the attribute */ + name: string; + /* type of the attribute */ + type: string; + /* value of the attribute */ + value: number | string; +} +/** + * List of attributes + * @param buffer - Buffer for the file data + * @returns - List of attributes with: + */ +function attributesList(buffer: IOBuffer): Attribute[] { + const gAttList = buffer.readUint32(); + let attributes; + if (gAttList === ZERO) { + notNetcdf(buffer.readUint32() !== ZERO, 'wrong empty tag for list of attributes'); + return []; + } else { + notNetcdf(gAttList !== NC_ATTRIBUTE, 'wrong tag for list of attributes'); + + // Length of attributes + const attributeSize = buffer.readUint32(); + attributes = new Array(attributeSize); + // Populate `name`, `type` and `value` for each attribute + for (let gAtt = 0; gAtt < attributeSize; gAtt++) { + // Read name + const name = readName(buffer); + + // Read type + const type = buffer.readUint32(); + notNetcdf(type < 1 || type > 6, `non valid type ${type}`); + + // Read attribute + const size = buffer.readUint32(); + const value = readType(buffer, type, size); + + // Apply padding + padding(buffer); + + attributes[gAtt] = { + name, + type: num2str(type), + value, + }; + } + } + return attributes; +} + +/** + * + */ +export interface Variable { + /* name of the variable */ + name: string; + /* Array with the dimension IDs of the variable*/ + dimensions: number[]; + /* Array with the attributes of the variable*/ + attributes: []; + /* type of the variable*/ + type: string; + /* size of the variable */ + size: number; + /* offset where of the variable begins */ + offset: number; + /* True if is a record variable, false otherwise (unlimited size) */ + record: boolean; +} +/** + * + */ +interface Variables { + variables: Variable[]; + recordStep: number; +} +/** + * @param buffer - Buffer for the file data + * @param recordId - Id of the unlimited dimension (also called record dimension) + * This value may be undefined if there is no unlimited dimension + * @param version - Version of the file + * @returns - Number of recordStep and list of variables @see {@link Variables} + */ +function variablesList( + buffer: IOBuffer, + recordId: number | undefined, + version: number, +): Variables | [] { + const varList = buffer.readUint32(); + let recordStep = 0; + let variables; + if (varList === ZERO) { + notNetcdf(buffer.readUint32() !== ZERO, 'wrong empty tag for list of variables'); + return []; + } else { + notNetcdf(varList !== NC_VARIABLE, 'wrong tag for list of variables'); + + // Length of variables + const variableSize = buffer.readUint32(); + variables = new Array(variableSize); + for (let v = 0; v < variableSize; v++) { + // Read name + const name = readName(buffer); + + // Read dimensionality of the variable + const dimensionality = buffer.readUint32(); + + // Index into the list of dimensions + const dimensionsIds = new Array(dimensionality); + for (let dim = 0; dim < dimensionality; dim++) { + dimensionsIds[dim] = buffer.readUint32(); + } + + // Read variables size + const attributes = attributesList(buffer); + + // Read type + const type = buffer.readUint32(); + notNetcdf(type < 1 && type > 6, `non valid type ${type}`); + + // Read variable size + // The 32-bit varSize field is not large enough to contain the size of variables that require + // more than 2^32 - 4 bytes, so 2^32 - 1 is used in the varSize field for such variables. + const varSize = buffer.readUint32(); + + // Read offset + let offset = buffer.readUint32(); + if (version === 2) { + notNetcdf(offset > 0, 'offsets larger than 4GB not supported'); + offset = buffer.readUint32(); + } + + let record = false; + // Count amount of record variables + if (typeof recordId !== 'undefined' && dimensionsIds[0] === recordId) { + recordStep += varSize; + record = true; + } + variables[v] = { + name, + dimensions: dimensionsIds, + attributes, + type: num2str(type), + size: varSize, + offset, + record, + }; + } + } + return { + variables, + recordStep, + }; +} diff --git a/src/readers/netCDF/index.ts b/src/readers/netCDF/index.ts new file mode 100644 index 00000000..de2ee06c --- /dev/null +++ b/src/readers/netCDF/index.ts @@ -0,0 +1,219 @@ +import { nonRecord, record } from './data'; +import { Header, header } from './header'; +import { notNetcdf } from './utils'; + +import type { Reader } from '..'; + +/** + * Reads a NetCDF v3.x file + * [See specification](https://www.unidata.ucar.edu/software/netcdf/docs/file_format_specifications.html) + * @param data - ArrayBuffer or any Typed Array (including Node.js' Buffer from v4) with the data + */ +export class NetCDFReader { + #header: Header; + + /** + * @param data + * @param reader + */ + constructor(public reader: Reader) { + if (reader.parseString(0, 3) !== 'CDF') throw new Error('Not a valid NetCDF v3.x file'); + + // Check the NetCDF format + const version = buffer.readByte(); + notNetcdf(version > 2, 'unknown version'); + + // Read the header + this.header = header(buffer, version); + this.buffer = buffer; + } + + /** + * @returns - Version for the NetCDF format + */ + get version() { + if (this.header.version === 1) { + return 'classic format'; + } else { + return '64-bit offset format'; + } + } + + /** + * @returns - Metadata for the record dimension + * `length`: Number of elements in the record dimension + * `id`: Id number in the list of dimensions for the record dimension + * `name`: String with the name of the record dimension + * `recordStep`: Number with the record variables step size + */ + get recordDimension() { + return this.header.recordDimension; + } + + /** + * @returns - Array - List of dimensions with: + * `name`: String with the name of the dimension + * `size`: Number with the size of the dimension + */ + get dimensions() { + return this.header.dimensions; + } + + /** + * @returns - Array - List of global attributes with: + * `name`: String with the name of the attribute + * `type`: String with the type of the attribute + * `value`: A number or string with the value of the attribute + */ + get globalAttributes(): Header['globalAttributes'] { + return this.header.globalAttributes; + } + + /** + * Returns the value of an attribute + * @param - AttributeName + * @param attributeName + * @returns - Value of the attributeName or null + */ + getAttribute(attributeName: string) { + const attribute = this.globalAttributes.find((val) => val.name === attributeName); + if (attribute) return attribute.value; + return null; + } + + /** + * Returns the value of a variable as a string + * @param - variableName + * @param variableName + * @returns - Value of the variable as a string or null + */ + getDataVariableAsString(variableName: string) { + const variable = this.getDataVariable(variableName); + if (variable) return variable.join(''); + return null; + } + + /** + * + */ + get variables() { + return this.header.variables; + } + + toString = toString; + + /** + * Retrieves the data for a given variable + * @param variableName - Name of the variable to search or variable object + * @returns The variable values + */ + getDataVariable(variableName: string | Header['variables'][number]) { + let variable; + if (typeof variableName === 'string') { + // search the variable + variable = this.header.variables.find((val) => { + return val.name === variableName; + }); + } else { + variable = variableName; + } + + // throws if variable not found + if (variable === undefined) { + throw new Error('Not a valid NetCDF v3.x file: variable not found'); + } + + // go to the offset position + this.buffer.seek(variable.offset); + + if (variable.record) { + // record variable case + return record(this.buffer, variable, this.header.recordDimension); + } else { + // non-record variable case + return nonRecord(this.buffer, variable); + } + } + + /** + * Check if a dataVariable exists + * @param variableName - Name of the variable to find + * @returns boolean + */ + dataVariableExists(variableName: string) { + const variable = this.header.variables.find((val) => { + return val.name === variableName; + }); + return variable !== undefined; + } + + /** + * Check if an attribute exists + * @param attributeName - Name of the attribute to find + * @returns boolean + */ + attributeExists(attributeName: string) { + const attribute = this.globalAttributes.find((val) => val.name === attributeName); + return attribute !== undefined; + } + + /** + * + */ + toString(): string { + const result: string[] = []; + result.push('DIMENSIONS'); + for (const dimension of this.dimensions) { + result.push(` ${dimension.name.padEnd(30)} = size: ${dimension.size}`); + } + + result.push(''); + result.push('GLOBAL ATTRIBUTES'); + for (const attribute of this.globalAttributes) { + result.push(` ${attribute.name.padEnd(30)} = ${attribute.value}`); + } + + const variables = JSON.parse(JSON.stringify(this.variables)); + result.push(''); + result.push('VARIABLES:'); + for (const variable of variables) { + variable.value = this.getDataVariable(variable); + let stringify = JSON.stringify(variable.value); + if (stringify.length > 50) stringify = stringify.substring(0, 50); + if (!isNaN(variable.value.length)) { + stringify += ` (length: ${variable.value.length})`; + } + result.push(` ${variable.name.padEnd(30)} = ${stringify}`); + } + return result.join('\n'); + } +} + +// UTIL: + +// /** +// * Moves 1, 2, or 3 bytes to next 4-byte boundary +// * @param buffer - Buffer for the file data +// */ +// export function padding(buffer: IOBuffer) { +// if (buffer.offset % 4 !== 0) { +// buffer.skip(4 - (buffer.offset % 4)); +// } +// } + +// /** +// * Reads the name +// * @param buffer - Buffer for the file data +// * @return Name +// */ +// export function readName(buffer: IOBuffer) { +// // Read name +// const nameLength = buffer.readUint32(); +// const name = buffer.readChars(nameLength); + +// // validate name +// // TODO +// // Apply padding +// padding(buffer); +// return name; +// } diff --git a/src/readers/netCDF/parser.ts b/src/readers/netCDF/parser.ts new file mode 100644 index 00000000..f7baac40 --- /dev/null +++ b/src/readers/netCDF/parser.ts @@ -0,0 +1,164 @@ +import { IOBuffer } from 'iobuffer'; + +import { nonRecord, record } from './data'; +import { Header, header } from './header'; +import { toString } from './toString'; +import { notNetcdf } from './utils'; + +/** + * Reads a NetCDF v3.x file + * [See specification](https://www.unidata.ucar.edu/software/netcdf/docs/file_format_specifications.html) + * @param data - ArrayBuffer or any Typed Array (including Node.js' Buffer from v4) with the data + */ +export class NetCDFReader { + public header: Header; + public buffer: IOBuffer; + + /** + * @param data + */ + constructor(data: BinaryData) { + const buffer = new IOBuffer(data); + buffer.setBigEndian(); + + // Validate that it's a NetCDF file + notNetcdf(buffer.readChars(3) !== 'CDF', 'should start with CDF'); + + // Check the NetCDF format + const version = buffer.readByte(); + notNetcdf(version > 2, 'unknown version'); + + // Read the header + this.header = header(buffer, version); + this.buffer = buffer; + } + + /** + * @returns - Version for the NetCDF format + */ + get version() { + if (this.header.version === 1) { + return 'classic format'; + } else { + return '64-bit offset format'; + } + } + + /** + * @returns - Metadata for the record dimension + * `length`: Number of elements in the record dimension + * `id`: Id number in the list of dimensions for the record dimension + * `name`: String with the name of the record dimension + * `recordStep`: Number with the record variables step size + */ + get recordDimension() { + return this.header.recordDimension; + } + + /** + * @returns - Array - List of dimensions with: + * `name`: String with the name of the dimension + * `size`: Number with the size of the dimension + */ + get dimensions() { + return this.header.dimensions; + } + + /** + * @returns - Array - List of global attributes with: + * `name`: String with the name of the attribute + * `type`: String with the type of the attribute + * `value`: A number or string with the value of the attribute + */ + get globalAttributes(): Header['globalAttributes'] { + return this.header.globalAttributes; + } + + /** + * Returns the value of an attribute + * @param - AttributeName + * @param attributeName + * @returns - Value of the attributeName or null + */ + getAttribute(attributeName: string) { + const attribute = this.globalAttributes.find((val) => val.name === attributeName); + if (attribute) return attribute.value; + return null; + } + + /** + * Returns the value of a variable as a string + * @param - variableName + * @param variableName + * @returns - Value of the variable as a string or null + */ + getDataVariableAsString(variableName: string) { + const variable = this.getDataVariable(variableName); + if (variable) return variable.join(''); + return null; + } + + /** + * + */ + get variables() { + return this.header.variables; + } + + toString = toString; + + /** + * Retrieves the data for a given variable + * @param variableName - Name of the variable to search or variable object + * @returns The variable values + */ + getDataVariable(variableName: string | Header['variables'][number]) { + let variable; + if (typeof variableName === 'string') { + // search the variable + variable = this.header.variables.find((val) => { + return val.name === variableName; + }); + } else { + variable = variableName; + } + + // throws if variable not found + if (variable === undefined) { + throw new Error('Not a valid NetCDF v3.x file: variable not found'); + } + + // go to the offset position + this.buffer.seek(variable.offset); + + if (variable.record) { + // record variable case + return record(this.buffer, variable, this.header.recordDimension); + } else { + // non-record variable case + return nonRecord(this.buffer, variable); + } + } + + /** + * Check if a dataVariable exists + * @param variableName - Name of the variable to find + * @returns boolean + */ + dataVariableExists(variableName: string) { + const variable = this.header.variables.find((val) => { + return val.name === variableName; + }); + return variable !== undefined; + } + + /** + * Check if an attribute exists + * @param attributeName - Name of the attribute to find + * @returns boolean + */ + attributeExists(attributeName: string) { + const attribute = this.globalAttributes.find((val) => val.name === attributeName); + return attribute !== undefined; + } +} diff --git a/src/readers/netCDF/type.ts b/src/readers/netCDF/type.ts new file mode 100644 index 00000000..5e064258 --- /dev/null +++ b/src/readers/netCDF/type.ts @@ -0,0 +1,140 @@ +import type { Reader } from '..'; + +const types = { + BYTE: 1, + CHAR: 2, + SHORT: 3, + INT: 4, + FLOAT: 5, + DOUBLE: 6, +}; + +/** + * Parse a number into their respective type + * @param type - integer that represents the type + * @returns - parsed value of the type + */ +export function num2str(type: number): string { + switch (Number(type)) { + case types.BYTE: + return 'byte'; + case types.CHAR: + return 'char'; + case types.SHORT: + return 'short'; + case types.INT: + return 'int'; + case types.FLOAT: + return 'float'; + case types.DOUBLE: + return 'double'; + default: + return 'undefined'; + } +} + +/** + * Parse a number type identifier to his size in bytes + * @param type - integer that represents the type + * @returns size of the type + */ +export function num2bytes(type: number): number { + switch (Number(type)) { + case types.BYTE: + return 1; + case types.CHAR: + return 1; + case types.SHORT: + return 2; + case types.INT: + return 4; + case types.FLOAT: + return 4; + case types.DOUBLE: + return 8; + default: + return -1; + } +} + +/** + * Reverse search of num2str + * @param type - string that represents the type + * @returns parsed value of the type + */ +export function str2num(type: string) { + switch (String(type)) { + case 'byte': + return types.BYTE; + case 'char': + return types.CHAR; + case 'short': + return types.SHORT; + case 'int': + return types.INT; + case 'float': + return types.FLOAT; + case 'double': + return types.DOUBLE; + /* istanbul ignore next */ + default: + return -1; + } +} + +/** + * Auxiliary function to read numeric data + * @param size - Size of the element to read + * @param bufferReader - Function to read next value + * @returns + */ +function readNumber(size: number, bufferReader: () => number): number | number[] { + if (size !== 1) { + const numbers = new Array(size); + for (let i = 0; i < size; i++) { + numbers[i] = bufferReader(); + } + return numbers; + } else { + return bufferReader(); + } +} + +/** + * Given a type and a size reads the next element + * @param buffer - Buffer for the file data + * @param reader + * @param type - Type of the data to read + * @param size - Size of the element to read + * @returns + */ +export function readType(reader: Reader, type: number, size: number): string | number | number[] { + switch (type) { + case types.BYTE: + return Array.from(reader.slice(size)); + case types.CHAR: + return trimNull(buffer.readChars(size)); + case types.SHORT: + return readNumber(size, buffer.readInt16.bind(buffer)); + case types.INT: + return readNumber(size, buffer.readInt32.bind(buffer)); + case types.FLOAT: + return readNumber(size, buffer.readFloat32.bind(buffer)); + case types.DOUBLE: + return readNumber(size, buffer.readFloat64.bind(buffer)); + default: + throw new Error(`non valid type ${type}`); + } +} + +/** + * Removes null terminate value + * @param value - String to trim + * @returns - Trimmed string + */ +function trimNull(value: string): string { + if (value.charCodeAt(value.length - 1) === 0) { + return value.substring(0, value.length - 1); + } + return value; +} diff --git a/src/util/polyfills/image.ts b/src/util/polyfills/image.ts index 6b1019c1..7f7a3227 100644 --- a/src/util/polyfills/image.ts +++ b/src/util/polyfills/image.ts @@ -66,7 +66,7 @@ async function createImageBitmap(blob: Blob): Promise { info: { width, height }, } = decodedImage; - return { data, width, height }; + return { data: new Uint8Array(data), width, height }; } /** An offscreen canvas polyfill */ @@ -143,8 +143,10 @@ class OffscreenCanvasRenderingContext2D { * @returns the ImageData */ getImageData(x: number, y: number, width: number, height: number): ImageData { - const imageData = new Uint8ClampedArray(width * height * 4); + const size = width * height * 4; + if (this.data.length === size) return { data: this.data, width, height }; + const imageData = new Uint8ClampedArray(size); for (let row = 0; row < height; row++) { for (let col = 0; col < width; col++) { const canvasX = x + col; diff --git a/proj4js-master/test/ntv2_0_downsampled.gsb b/tests/proj4/fixtures/ntv2_0_downsampled.gsb similarity index 100% rename from proj4js-master/test/ntv2_0_downsampled.gsb rename to tests/proj4/fixtures/ntv2_0_downsampled.gsb diff --git a/tests/proj4/index.test.ts b/tests/proj4/index.test.ts index bdb76495..abf7b511 100644 --- a/tests/proj4/index.test.ts +++ b/tests/proj4/index.test.ts @@ -78,171 +78,3 @@ describe('axes should be invertable with proj4.transform()', function () { expect(result2.x).toBeCloseTo(-40, 5); expect(result2.y).toBeCloseTo(50, 5); }); - -// describe('Nadgrids BETA2007', function () { -// const tests = [ -// ['EPSG:31466', 'EPSG:4326', 2559552, 5670982, 6.850861772, 51.170707759, 0.0000001, 0.01], -// [ -// 'EPSG:31466', -// 'EPSG:3857', -// 2559552, -// 5670982, -// 762634.443931574, -// 6651545.68026527, -// 0.01, -// 0.01, -// ], -// [ -// 'EPSG:31466', -// 'EPSG:25832', -// 2559552, -// 5670982, -// 349757.381712518, -// 5671004.06504954, -// 0.01, -// 0.01, -// ], -// ]; - -// /** -// * @param buffer -// */ -// function initializeNadgrid(buffer) { -// proj4.nadgrid('BETA2007.gsb', buffer); -// proj4.defs( -// 'EPSG:31466', -// '+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +no_defs +type=crs', -// ); -// proj4.defs( -// 'EPSG:25832', -// '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs', -// ); -// } - -// before(function (done) { -// if (typeof XMLHttpRequest !== 'undefined') { -// const xhr = new XMLHttpRequest(); -// xhr.open('GET', 'BETA2007.gsb', true); -// xhr.responseType = 'arraybuffer'; -// xhr.addEventListener('load', function () { -// initializeNadgrid(xhr.response); -// done(); -// }); -// xhr.addEventListener('error', done); -// xhr.send(); -// } else if (typeof require === 'function') { -// const fs = require('fs'); -// const path = require('path'); -// fs.readFile(path.join(__dirname, 'BETA2007.gsb'), function (err, data) { -// if (err) { -// done(err); -// } else { -// initializeNadgrid(data.buffer); -// done(); -// } -// }); -// } -// }); - -// tests.forEach(function (test) { -// const fromProj = test[0]; -// const toProj = test[1]; -// const fromX = test[2]; -// const fromY = test[3]; -// const toX = test[4]; -// const toY = test[5]; -// const fromPrecision = test[6]; -// const toPrecision = test[7]; -// it('should transform ' + fromProj + ' to ' + toProj, function () { -// const transformed = proj4(fromProj, toProj, [fromX, fromY]); -// assert.approximately(transformed[0], toX, fromPrecision); -// assert.approximately(transformed[1], toY, fromPrecision); -// }); -// it('should transform ' + toProj + ' to ' + fromProj, function () { -// const transformed = proj4(toProj, fromProj, [toX, toY]); -// assert.approximately(transformed[0], fromX, toPrecision); -// assert.approximately(transformed[1], fromY, toPrecision); -// }); -// }); -// }); - -// describe('Nadgrids ntv2', function () { -// const tests = [ -// [-44.382211538462, 40.3768, -44.380749, 40.377457], // just inside the lower limit -// [-87.617788, 59.623262, -87.617659, 59.623441], // just inside the upper limit -// [-44.5, 40.5, -44.498553, 40.500632], // inside the first square -// [-60, 50, -59.999192, 50.000058], // a general point towards the middle of the grid -// [0, 0, 0, 0], // fall back to null -// ]; - -// let converter; - -// /** -// * @param buffer -// */ -// function initializeNadgrid(buffer) { -// proj4.nadgrid('ntv2', buffer); -// proj4.defs('ntv2_from', '+proj=longlat +ellps=clrk66 +nadgrids=@ignorable,ntv2,null'); -// proj4.defs('ntv2_to', '+proj=longlat +datum=WGS84 +no_defs'); -// converter = proj4('ntv2_from', 'ntv2_to'); -// } - -// before(function (done) { -// if (typeof XMLHttpRequest !== 'undefined') { -// const xhr = new XMLHttpRequest(); -// xhr.open('GET', 'ntv2_0_downsampled.gsb', true); -// xhr.responseType = 'arraybuffer'; -// xhr.addEventListener('load', function () { -// initializeNadgrid(xhr.response); -// done(); -// }); -// xhr.addEventListener('error', done); -// xhr.send(); -// } else if (typeof require === 'function') { -// const fs = require('fs'); -// const path = require('path'); -// fs.readFile(path.join(__dirname, 'ntv2_0_downsampled.gsb'), function (err, data) { -// if (err) { -// done(err); -// } else { -// initializeNadgrid(data.buffer); -// done(); -// } -// }); -// } -// }); - -// tests.forEach(function (test) { -// const fromLng = test[0]; -// const fromLat = test[1]; -// const toLng = test[2]; -// const toLat = test[3]; -// it('should interpolate ' + [fromLng, fromLat] + ' to ' + [toLng, toLat], function () { -// const actual = converter.forward([fromLng, fromLat]); -// assert.approximately(actual[0], toLng, 0.000001); -// assert.approximately(actual[1], toLat, 0.000001); -// }); -// }); - -// const inverseTests = [ -// [-44.5, 40.5, -44.498553, 40.500632], -// [-60, 50, -59.999192, 50.000058], -// ]; - -// inverseTests.forEach(function (test) { -// const fromLng = test[0]; -// const fromLat = test[1]; -// const toLng = test[2]; -// const toLat = test[3]; -// it( -// 'should inverse interpolate ' + [toLng, toLat] + ' to ' + [fromLng, fromLat], -// function () { -// const actual = converter.inverse([toLng, toLat]); -// assert.approximately(actual[0], fromLng, 0.000001); -// assert.approximately(actual[1], fromLat, 0.000001); -// }, -// ); -// }); -// }); -// }); -// } diff --git a/tests/proj4/mgrs.test.ts b/tests/proj4/mgrs.test.ts index 00a1f734..b040d21c 100644 --- a/tests/proj4/mgrs.test.ts +++ b/tests/proj4/mgrs.test.ts @@ -4,7 +4,7 @@ import { forward, getLetterDesignator, inverse, toPoint } from '../../src/proj4/ describe('First MGRS set', () => { const mgrsStr = '33UXP04'; const point = toPoint(mgrsStr); - if (!point) throw new Error('Invalid MGRS string'); + if (point === undefined) throw new Error('Invalid MGRS string'); it('Longitude of point from MGRS correct.', () => { expect(point.x).toBeCloseTo(16.4145, 6); }); @@ -28,7 +28,7 @@ describe('First MGRS set', () => { describe('Second MGRS set', () => { const mgrsStr = '24XWT783908'; // near UTM zone border, so there are two ways to reference this const point = toPoint(mgrsStr); - if (!point) throw new Error('Invalid MGRS string'); + if (point === undefined) throw new Error('Invalid MGRS string'); it('Longitude of point from MGRS correct.', () => { expect(point.x).toBeCloseTo(-32.66433, 5); }); @@ -143,7 +143,8 @@ describe('data validation', () => { }); }); -describe('test against all data from mgrsToGeo_WE.txt', async () => { +// eslint-disable-next-line @typescript-eslint/no-misused-promises +describe('test against all data from mgrsToGeo_WE.txt', async (): Promise => { const text = await Bun.file(`${__dirname}/fixtures/mgrsToGeo_WE.txt`).text(); const [_header, _description, _blank, ...rows] = text.split(/\r?\n/); diff --git a/tests/proj4/nadgrid.test.ts b/tests/proj4/nadgrid.test.ts new file mode 100644 index 00000000..e8486523 --- /dev/null +++ b/tests/proj4/nadgrid.test.ts @@ -0,0 +1,103 @@ +import MMapReader from '../../src/readers/mmap'; +import { Transformer, injectAllDefinitions, injectAllEPSGCodes } from '../../src/proj4'; +import { describe, expect, it, test } from 'bun:test'; + +describe('nagrid BETA2007.gsb', (): void => { + it('EPSG_31466 -> EPSG_25832', (): void => { + const transform = new Transformer(); + injectAllDefinitions(transform); + injectAllEPSGCodes(transform); + transform.addGridFromReader( + 'BETA2007.gsb', + new MMapReader(`${__dirname}/fixtures/BETA2007.gsb`), + ); + transform.setSource('EPSG_31466'); + transform.setDestination('EPSG_25832'); + const forward = transform.forward({ x: 2559552, y: 5670982 }); + expect(forward.x).toBeCloseTo(349757.381712518, 0.01); + expect(forward.y).toBeCloseTo(5671004.06504954, 0.01); + }); + + it('EPSG_31466 -> EPSG_4326', (): void => { + const transform = new Transformer(); + injectAllDefinitions(transform); + injectAllEPSGCodes(transform); + transform.addGridFromReader( + 'BETA2007.gsb', + new MMapReader(`${__dirname}/fixtures/BETA2007.gsb`), + ); + transform.setSource('EPSG_31466'); + transform.setDestination('EPSG_4326'); + const forward = transform.forward({ x: 2559552, y: 5670982 }); + expect(forward.x).toBeCloseTo(6.850861772, 0.0000001); + expect(forward.y).toBeCloseTo(51.170707759, 0.01); + }); + + it('EPSG_31466 -> EPSG_3857', (): void => { + const transform = new Transformer(); + injectAllDefinitions(transform); + injectAllEPSGCodes(transform); + transform.addGridFromReader( + 'BETA2007.gsb', + new MMapReader(`${__dirname}/fixtures/BETA2007.gsb`), + ); + transform.setSource('EPSG_31466'); + transform.setDestination('EPSG_3857'); + const forward = transform.forward({ x: 2559552, y: 5670982 }); + expect(forward.x).toBeCloseTo(762634.443931574, 0.01); + expect(forward.y).toBeCloseTo(6651545.68026527, 0.01); + }); + + it('EPSG:31466 -> EPSG:3857', (): void => { + const transform = new Transformer(); + injectAllDefinitions(transform); + injectAllEPSGCodes(transform); + transform.addGridFromReader( + 'BETA2007.gsb', + new MMapReader(`${__dirname}/fixtures/BETA2007.gsb`), + ); + transform.setSource('EPSG:31466'); + transform.setDestination('EPSG:3857'); + const forward = transform.forward({ x: 2559552, y: 5670982 }); + expect(forward.x).toBeCloseTo(762634.443931574, 0.01); + expect(forward.y).toBeCloseTo(6651545.68026527, 0.01); + }); +}); + +test('ntv2', (): void => { + const transform = new Transformer(); + injectAllDefinitions(transform); + injectAllEPSGCodes(transform); + transform.addGridFromReader( + 'ntv2', + new MMapReader(`${__dirname}/fixtures/ntv2_0_downsampled.gsb`), + ); + + transform.setSource('+proj=longlat +ellps=clrk66 +nadgrids=@ignorable,ntv2,null'); + transform.setDestination('+proj=longlat +datum=WGS84 +no_defs'); + + const forwardTests = [ + [-44.382211538462, 40.3768, -44.380749, 40.377457], // just inside the lower limit + [-87.617788, 59.623262, -87.617659, 59.623441], // just inside the upper limit + [-44.5, 40.5, -44.498553, 40.500632], // inside the first square + [-60, 50, -59.999192, 50.000058], // a general point towards the middle of the grid + [0, 0, 0, 0], // fall back to null + ]; + + for (const [fromLng, fromLat, toLng, toLat] of forwardTests) { + const forward = transform.forward({ x: fromLng, y: fromLat }); + expect(forward.x).toBeCloseTo(toLng, 0.000001); + expect(forward.y).toBeCloseTo(toLat, 0.000001); + } + + const inverseTests = [ + [-44.5, 40.5, -44.498553, 40.500632], + [-60, 50, -59.999192, 50.000058], + ]; + + for (const [fromLng, fromLat, toLng, toLat] of inverseTests) { + const inverse = transform.inverse({ x: fromLng, y: fromLat }); + expect(inverse.x).toBeCloseTo(toLng, 0.000001); + expect(inverse.y).toBeCloseTo(toLat, 0.000001); + } +}); diff --git a/tests/readers/geotiff/fixtures/ntv2_0.gsb b/tests/readers/geotiff/fixtures/ntv2_0.gsb new file mode 100644 index 00000000..9b723675 Binary files /dev/null and b/tests/readers/geotiff/fixtures/ntv2_0.gsb differ diff --git a/tests/readers/geotiff/proj4.test.ts b/tests/readers/geotiff/proj4.test.ts index 22dd8677..4ce57e58 100644 --- a/tests/readers/geotiff/proj4.test.ts +++ b/tests/readers/geotiff/proj4.test.ts @@ -182,7 +182,9 @@ test('mercator1sp.tif test', async (): Promise => { test('byte.tif test', async (): Promise => { // actual data const fileReader = new FileReader(`${__dirname}/fixtures/projections/byte.tif`); + // const ntv2 = new MMapReader(`${__dirname}/fixtures/ntv2_0.gsb`); const geotiffReader = new GeoTIFFReader(fileReader); + // geotiffReader.addGridReader('NTv2_0.gsb', ntv2); const image = geotiffReader.getImage(); // compare data const cmpTiff = await fromArrayBuffer( @@ -726,7 +728,7 @@ test('ProjectedCSTypeGeoKey_5588_oblique_stereographic.tif test', async (): Prom expect(bounds).toEqual([440720, 3751260, 440780, 3751320]); const boundsCorrected = image.getBoundingBox(true); expect(boundsCorrected).toEqual([ - -69.08909055988515, 54.00219682088313, -69.08882272890078, 54.0023659994581, + -69.08909055988515, 54.002196820883135, -69.08882272890078, 54.0023659994581, ]); const boundsCmp = cmpImage.getBoundingBox(); expect(boundsCmp).toEqual([440720, 3751260, 440780, 3751320]); @@ -854,7 +856,7 @@ test('ProjectedCSTypeGeoKey_27200_new_zealand_mapping_grid.tif test', async (): expect(bounds).toEqual([440720, 3751260, 440780, 3751320]); const boundsCorrected = image.getBoundingBox(true); expect(boundsCorrected).toEqual([ - 142.5869840558114, -55.8388637505136, 142.58790609359477, -55.838724496136386, + 142.5869840558114, -55.838863750513596, 142.58790609359477, -55.83872449613639, ]); const boundsCmp = cmpImage.getBoundingBox(); expect(boundsCmp).toEqual([440720, 3751260, 440780, 3751320]); @@ -929,7 +931,7 @@ test('ProjLinearUnitsGeoKey_9036.tif test', async (): Promise => { expect(bounds).toEqual([440720, 3751260, 440780, 3751320]); const boundsCorrected = image.getBoundingBox(true); expect(boundsCorrected).toEqual([ - -102.33809671112067, 10.326816035405699, -102.33793170372446, 10.326982893760002, + -102.33809671112067, 10.326816035405699, -102.33793170372446, 10.32698289376, ]); const boundsCmp = cmpImage.getBoundingBox(); expect(boundsCmp).toEqual([440720, 3751260, 440780, 3751320]); diff --git a/tmpTests2.ts b/tmpTests2.ts index 02ab8262..30cdb6a1 100644 --- a/tmpTests2.ts +++ b/tmpTests2.ts @@ -1,11 +1,44 @@ -import { fromArrayBuffer } from './geotiff/src/geotiff'; +// import { fromArrayBuffer } from './geotiff/src/geotiff'; -const tiff = await fromArrayBuffer(await Bun.file('./tests/readers/geotiff/fixtures/initial.tiff').arrayBuffer()); -const image = await tiff.getImage(); -const data = await image.readRasters({ interleave: true }); +// const tiff = await fromArrayBuffer(await Bun.file('./tests/readers/geotiff/fixtures/initial.tiff').arrayBuffer()); +// const image = await tiff.getImage(); +// const data = await image.readRasters({ interleave: true }); -console.log(data); +// console.log(data); -export function test(a: number): number { - return a; -} +// export function test(a: number): number { +// return a; +// } + +// import { NadGrid } from './src/readers/nadgrid'; +// import nadgrid from './proj4js-master/lib/nadgrid'; +// import MMapReader from './src/readers/mmap'; + +const data = await Bun.file('./tests/proj4/fixtures/BETA2007.gsb').arrayBuffer(); + +// const gridA = nadgrid('BETA2007.gsb', data); +// const { ll: llA, del: delA, lim: limA, count: countA, cvs: cvsA } = gridA.subgrids[0]; + +// const gridB = new NadGrid('BETA2007.gsb', new MMapReader('./tests/proj4/fixtures/BETA2007.gsb')); +// const subGridB1 = gridB.subgrids[0]; +// const { ll: llB, del: delB, lim: limB, count: countB, cvs: cvsB } = subGridB1; +// console.log('ll', llA, llB); +// console.log('del', delA, delB); +// console.log('lim', limA, limB); +// console.log('count', countA, countB); +// console.log('cvs', cvsA, cvsB); + +import proj4 from './proj4js-master/lib/'; + +proj4.nadgrid('BETA2007.gsb', data); + +// ['EPSG:31466', 'EPSG:25832', 2559552, 5670982, 349757.381712518, 5671004.065049540, 0.01, 0.01], + +// proj4.defs('EPSG:31466', '+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +no_defs +type=crs'); +// proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs'); + +proj4.defs('EPSG:31466', '+proj=tmerc +lat_0=0 +lon_0=6 +k=1 +x_0=2500000 +y_0=0 +ellps=bessel +nadgrids=BETA2007.gsb +units=m +no_defs +type=crs'); +proj4.defs('EPSG:25832', '+proj=utm +zone=32 +ellps=GRS80 +towgs84=0,0,0,0,0,0,0 +units=m +no_defs +type=crs') + +const res = proj4('EPSG:31466', 'EPSG:25832', [2559552, 5670982]); +console.log('res', res)