mirror of
https://github.com/nunocoracao/blowfish.git
synced 2026-01-30 16:31:52 +01:00
config redirect
This commit is contained in:
13
node_modules/d3-fetch/LICENSE
generated
vendored
Normal file
13
node_modules/d3-fetch/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
Copyright 2016-2021 Mike Bostock
|
||||
|
||||
Permission to use, copy, modify, and/or distribute this software for any purpose
|
||||
with or without fee is hereby granted, provided that the above copyright notice
|
||||
and this permission notice appear in all copies.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
|
||||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
|
||||
FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
|
||||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|
||||
TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
|
||||
THIS SOFTWARE.
|
||||
111
node_modules/d3-fetch/README.md
generated
vendored
Normal file
111
node_modules/d3-fetch/README.md
generated
vendored
Normal file
@@ -0,0 +1,111 @@
|
||||
# d3-fetch
|
||||
|
||||
This module provides convenient parsing on top of [Fetch](https://fetch.spec.whatwg.org/). For example, to load a text file:
|
||||
|
||||
```js
|
||||
const text = await d3.text("/path/to/file.txt");
|
||||
console.log(text); // Hello, world!
|
||||
```
|
||||
|
||||
To load and parse a CSV file:
|
||||
|
||||
```js
|
||||
const data = await d3.csv("/path/to/file.csv");
|
||||
console.log(data); // [{"Hello": "world"}, …]
|
||||
```
|
||||
|
||||
This module has built-in support for parsing [JSON](#json), [CSV](#csv), and [TSV](#tsv). You can parse additional formats by using [text](#text) directly. (This module replaced [d3-request](https://github.com/d3/d3-request).)
|
||||
|
||||
## Installing
|
||||
|
||||
If you use npm, `npm install d3-fetch`. You can also download the [latest release on GitHub](https://github.com/d3/d3-fetch/releases/latest). For vanilla HTML in modern browsers, import d3-fetch from Skypack:
|
||||
|
||||
```html
|
||||
<script type="module">
|
||||
|
||||
import {csv} from "https://cdn.skypack.dev/d3-fetch@3";
|
||||
|
||||
csv("/path/to/file.csv").then((data) => {
|
||||
console.log(data); // [{"Hello": "world"}, …]
|
||||
});
|
||||
|
||||
</script>
|
||||
```
|
||||
|
||||
For legacy environments, you can load d3-fetch’s UMD bundle from an npm-based CDN such as jsDelivr; a `d3` global is exported:
|
||||
|
||||
```html
|
||||
<script src="https://cdn.jsdelivr.net/npm/d3-fetch@3"></script>
|
||||
<script>
|
||||
|
||||
d3.csv("/path/to/file.csv").then((data) => {
|
||||
console.log(data); // [{"Hello": "world"}, …]
|
||||
});
|
||||
|
||||
</script>
|
||||
```
|
||||
|
||||
## API Reference
|
||||
|
||||
<a name="blob" href="#blob">#</a> d3.<b>blob</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/blob.js "Source")
|
||||
|
||||
Fetches the binary file at the specified *input* URL as a Blob. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields.
|
||||
|
||||
<a name="buffer" href="#buffer">#</a> d3.<b>buffer</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/buffer.js "Source")
|
||||
|
||||
Fetches the binary file at the specified *input* URL as an ArrayBuffer. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields.
|
||||
|
||||
<a name="csv" href="#csv">#</a> d3.<b>csv</b>(<i>input</i>[, <i>init</i>][, <i>row</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/dsv.js "Source")
|
||||
|
||||
Equivalent to [d3.dsv](#dsv) with the comma character as the delimiter.
|
||||
|
||||
<a name="dsv" href="#dsv">#</a> d3.<b>dsv</b>(<i>delimiter</i>, <i>input</i>[, <i>init</i>][, <i>row</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/dsv.js "Source")
|
||||
|
||||
Fetches the [DSV](https://github.com/d3/d3-dsv) file at the specified *input* URL. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. An optional *row* conversion function may be specified to map and filter row objects to a more-specific representation; see [*dsv*.parse](https://github.com/d3/d3-dsv#dsv_parse) for details. For example:
|
||||
|
||||
```js
|
||||
const data = await d3.dsv(",", "test.csv", (d) => {
|
||||
return {
|
||||
year: new Date(+d.Year, 0, 1), // convert "Year" column to Date
|
||||
make: d.Make,
|
||||
model: d.Model,
|
||||
length: +d.Length // convert "Length" column to number
|
||||
};
|
||||
});
|
||||
```
|
||||
|
||||
If only one of *init* and *row* is specified, it is interpreted as the *row* conversion function if it is a function, and otherwise an *init* object.
|
||||
|
||||
See also [d3.csv](#csv) and [d3.tsv](#tsv).
|
||||
|
||||
<a name="html" href="#html">#</a> d3.<b>html</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/xml.js "Source")
|
||||
|
||||
Fetches the file at the specified *input* URL as [text](#text) and then [parses it](https://developer.mozilla.org/docs/Web/API/DOMParser) as HTML. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields.
|
||||
|
||||
<a name="image" href="#image">#</a> d3.<b>image</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/image.js "Source")
|
||||
|
||||
Fetches the image at the specified *input* URL. If *init* is specified, sets any additional properties on the image before loading. For example, to enable an anonymous [cross-origin request](https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image):
|
||||
|
||||
```js
|
||||
const img = await d3.image("https://example.com/test.png", {crossOrigin: "anonymous"});
|
||||
```
|
||||
|
||||
<a name="json" href="#json">#</a> d3.<b>json</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/json.js "Source")
|
||||
|
||||
Fetches the [JSON](http://json.org) file at the specified *input* URL. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields. If the server returns a status code of [204 No Content](https://developer.mozilla.org/docs/Web/HTTP/Status/204) or [205 Reset Content](https://developer.mozilla.org/docs/Web/HTTP/Status/205), the promise resolves to `undefined`.
|
||||
|
||||
<a name="svg" href="#svg">#</a> d3.<b>svg</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/xml.js "Source")
|
||||
|
||||
Fetches the file at the specified *input* URL as [text](#text) and then [parses it](https://developer.mozilla.org/docs/Web/API/DOMParser) as SVG. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields.
|
||||
|
||||
<a name="text" href="#text">#</a> d3.<b>text</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/text.js "Source")
|
||||
|
||||
Fetches the text file at the specified *input* URL. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields.
|
||||
|
||||
<a name="tsv" href="#tsv">#</a> d3.<b>tsv</b>(<i>input</i>[, <i>init</i>][, <i>row</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/dsv.js "Source")
|
||||
|
||||
Equivalent to [d3.dsv](#dsv) with the tab character as the delimiter.
|
||||
|
||||
<a name="xml" href="#xml">#</a> d3.<b>xml</b>(<i>input</i>[, <i>init</i>]) · [Source](https://github.com/d3/d3-fetch/blob/master/src/xml.js "Source")
|
||||
|
||||
Fetches the file at the specified *input* URL as [text](#text) and then [parses it](https://developer.mozilla.org/docs/Web/API/DOMParser) as XML. If *init* is specified, it is passed along to the underlying call to [fetch](https://fetch.spec.whatwg.org/#fetch-method); see [RequestInit](https://fetch.spec.whatwg.org/#requestinit) for allowed fields.
|
||||
100
node_modules/d3-fetch/dist/d3-fetch.js
generated
vendored
Normal file
100
node_modules/d3-fetch/dist/d3-fetch.js
generated
vendored
Normal file
@@ -0,0 +1,100 @@
|
||||
// https://d3js.org/d3-fetch/ v3.0.1 Copyright 2016-2021 Mike Bostock
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dsv')) :
|
||||
typeof define === 'function' && define.amd ? define(['exports', 'd3-dsv'], factory) :
|
||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, factory(global.d3 = global.d3 || {}, global.d3));
|
||||
}(this, (function (exports, d3Dsv) { 'use strict';
|
||||
|
||||
function responseBlob(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
return response.blob();
|
||||
}
|
||||
|
||||
function blob(input, init) {
|
||||
return fetch(input, init).then(responseBlob);
|
||||
}
|
||||
|
||||
function responseArrayBuffer(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
return response.arrayBuffer();
|
||||
}
|
||||
|
||||
function buffer(input, init) {
|
||||
return fetch(input, init).then(responseArrayBuffer);
|
||||
}
|
||||
|
||||
function responseText(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
return response.text();
|
||||
}
|
||||
|
||||
function text(input, init) {
|
||||
return fetch(input, init).then(responseText);
|
||||
}
|
||||
|
||||
function dsvParse(parse) {
|
||||
return function(input, init, row) {
|
||||
if (arguments.length === 2 && typeof init === "function") row = init, init = undefined;
|
||||
return text(input, init).then(function(response) {
|
||||
return parse(response, row);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
function dsv(delimiter, input, init, row) {
|
||||
if (arguments.length === 3 && typeof init === "function") row = init, init = undefined;
|
||||
var format = d3Dsv.dsvFormat(delimiter);
|
||||
return text(input, init).then(function(response) {
|
||||
return format.parse(response, row);
|
||||
});
|
||||
}
|
||||
|
||||
var csv = dsvParse(d3Dsv.csvParse);
|
||||
var tsv = dsvParse(d3Dsv.tsvParse);
|
||||
|
||||
function image(input, init) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var image = new Image;
|
||||
for (var key in init) image[key] = init[key];
|
||||
image.onerror = reject;
|
||||
image.onload = function() { resolve(image); };
|
||||
image.src = input;
|
||||
});
|
||||
}
|
||||
|
||||
function responseJson(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
if (response.status === 204 || response.status === 205) return;
|
||||
return response.json();
|
||||
}
|
||||
|
||||
function json(input, init) {
|
||||
return fetch(input, init).then(responseJson);
|
||||
}
|
||||
|
||||
function parser(type) {
|
||||
return (input, init) => text(input, init)
|
||||
.then(text => (new DOMParser).parseFromString(text, type));
|
||||
}
|
||||
|
||||
var xml = parser("application/xml");
|
||||
|
||||
var html = parser("text/html");
|
||||
|
||||
var svg = parser("image/svg+xml");
|
||||
|
||||
exports.blob = blob;
|
||||
exports.buffer = buffer;
|
||||
exports.csv = csv;
|
||||
exports.dsv = dsv;
|
||||
exports.html = html;
|
||||
exports.image = image;
|
||||
exports.json = json;
|
||||
exports.svg = svg;
|
||||
exports.text = text;
|
||||
exports.tsv = tsv;
|
||||
exports.xml = xml;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
2
node_modules/d3-fetch/dist/d3-fetch.min.js
generated
vendored
Normal file
2
node_modules/d3-fetch/dist/d3-fetch.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
// https://d3js.org/d3-fetch/ v3.0.1 Copyright 2016-2021 Mike Bostock
|
||||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("d3-dsv")):"function"==typeof define&&define.amd?define(["exports","d3-dsv"],n):n((t="undefined"!=typeof globalThis?globalThis:t||self).d3=t.d3||{},t.d3)}(this,(function(t,n){"use strict";function e(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function r(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function o(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function u(t,n){return fetch(t,n).then(o)}function f(t){return function(n,e,r){return 2===arguments.length&&"function"==typeof e&&(r=e,e=void 0),u(n,e).then((function(n){return t(n,r)}))}}var s=f(n.csvParse),i=f(n.tsvParse);function a(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function c(t){return(n,e)=>u(n,e).then((n=>(new DOMParser).parseFromString(n,t)))}var d=c("application/xml"),h=c("text/html"),l=c("image/svg+xml");t.blob=function(t,n){return fetch(t,n).then(e)},t.buffer=function(t,n){return fetch(t,n).then(r)},t.csv=s,t.dsv=function(t,e,r,o){3===arguments.length&&"function"==typeof r&&(o=r,r=void 0);var f=n.dsvFormat(t);return u(e,r).then((function(t){return f.parse(t,o)}))},t.html=h,t.image=function(t,n){return new Promise((function(e,r){var o=new Image;for(var u in n)o[u]=n[u];o.onerror=r,o.onload=function(){e(o)},o.src=t}))},t.json=function(t,n){return fetch(t,n).then(a)},t.svg=l,t.text=u,t.tsv=i,t.xml=d,Object.defineProperty(t,"__esModule",{value:!0})}));
|
||||
53
node_modules/d3-fetch/package.json
generated
vendored
Normal file
53
node_modules/d3-fetch/package.json
generated
vendored
Normal file
@@ -0,0 +1,53 @@
|
||||
{
|
||||
"name": "d3-fetch",
|
||||
"version": "3.0.1",
|
||||
"description": "Convenient parsing for Fetch.",
|
||||
"homepage": "https://d3js.org/d3-fetch/",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/d3/d3-fetch.git"
|
||||
},
|
||||
"keywords": [
|
||||
"d3",
|
||||
"d3-module",
|
||||
"fetch",
|
||||
"ajax",
|
||||
"XMLHttpRequest"
|
||||
],
|
||||
"license": "ISC",
|
||||
"author": {
|
||||
"name": "Mike Bostock",
|
||||
"url": "http://bost.ocks.org/mike"
|
||||
},
|
||||
"type": "module",
|
||||
"files": [
|
||||
"dist/**/*.js",
|
||||
"src/**/*.js"
|
||||
],
|
||||
"module": "src/index.js",
|
||||
"main": "src/index.js",
|
||||
"jsdelivr": "dist/d3-fetch.min.js",
|
||||
"unpkg": "dist/d3-fetch.min.js",
|
||||
"exports": {
|
||||
"umd": "./dist/d3-fetch.min.js",
|
||||
"default": "./src/index.js"
|
||||
},
|
||||
"sideEffects": false,
|
||||
"dependencies": {
|
||||
"d3-dsv": "1 - 3"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "7",
|
||||
"mocha": "8",
|
||||
"rollup": "2",
|
||||
"rollup-plugin-terser": "7"
|
||||
},
|
||||
"scripts": {
|
||||
"test": "mocha 'test/**/*-test.js' && eslint src test",
|
||||
"prepublishOnly": "rm -rf dist && yarn test && rollup -c",
|
||||
"postpublish": "git push && git push --tags && cd ../d3.github.com && git pull && cp ../${npm_package_name}/dist/${npm_package_name}.js ${npm_package_name}.v${npm_package_version%%.*}.js && cp ../${npm_package_name}/dist/${npm_package_name}.min.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git add ${npm_package_name}.v${npm_package_version%%.*}.js ${npm_package_name}.v${npm_package_version%%.*}.min.js && git commit -m \"${npm_package_name} ${npm_package_version}\" && git push && cd -"
|
||||
},
|
||||
"engines": {
|
||||
"node": ">=12"
|
||||
}
|
||||
}
|
||||
8
node_modules/d3-fetch/src/blob.js
generated
vendored
Normal file
8
node_modules/d3-fetch/src/blob.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
function responseBlob(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
return response.blob();
|
||||
}
|
||||
|
||||
export default function(input, init) {
|
||||
return fetch(input, init).then(responseBlob);
|
||||
}
|
||||
8
node_modules/d3-fetch/src/buffer.js
generated
vendored
Normal file
8
node_modules/d3-fetch/src/buffer.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
function responseArrayBuffer(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
return response.arrayBuffer();
|
||||
}
|
||||
|
||||
export default function(input, init) {
|
||||
return fetch(input, init).then(responseArrayBuffer);
|
||||
}
|
||||
22
node_modules/d3-fetch/src/dsv.js
generated
vendored
Normal file
22
node_modules/d3-fetch/src/dsv.js
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
import {csvParse, dsvFormat, tsvParse} from "d3-dsv";
|
||||
import text from "./text.js";
|
||||
|
||||
function dsvParse(parse) {
|
||||
return function(input, init, row) {
|
||||
if (arguments.length === 2 && typeof init === "function") row = init, init = undefined;
|
||||
return text(input, init).then(function(response) {
|
||||
return parse(response, row);
|
||||
});
|
||||
};
|
||||
}
|
||||
|
||||
export default function dsv(delimiter, input, init, row) {
|
||||
if (arguments.length === 3 && typeof init === "function") row = init, init = undefined;
|
||||
var format = dsvFormat(delimiter);
|
||||
return text(input, init).then(function(response) {
|
||||
return format.parse(response, row);
|
||||
});
|
||||
}
|
||||
|
||||
export var csv = dsvParse(csvParse);
|
||||
export var tsv = dsvParse(tsvParse);
|
||||
9
node_modules/d3-fetch/src/image.js
generated
vendored
Normal file
9
node_modules/d3-fetch/src/image.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
export default function(input, init) {
|
||||
return new Promise(function(resolve, reject) {
|
||||
var image = new Image;
|
||||
for (var key in init) image[key] = init[key];
|
||||
image.onerror = reject;
|
||||
image.onload = function() { resolve(image); };
|
||||
image.src = input;
|
||||
});
|
||||
}
|
||||
7
node_modules/d3-fetch/src/index.js
generated
vendored
Normal file
7
node_modules/d3-fetch/src/index.js
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
export {default as blob} from "./blob.js";
|
||||
export {default as buffer} from "./buffer.js";
|
||||
export {default as dsv, csv, tsv} from "./dsv.js";
|
||||
export {default as image} from "./image.js";
|
||||
export {default as json} from "./json.js";
|
||||
export {default as text} from "./text.js";
|
||||
export {default as xml, html, svg} from "./xml.js";
|
||||
9
node_modules/d3-fetch/src/json.js
generated
vendored
Normal file
9
node_modules/d3-fetch/src/json.js
generated
vendored
Normal file
@@ -0,0 +1,9 @@
|
||||
function responseJson(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
if (response.status === 204 || response.status === 205) return;
|
||||
return response.json();
|
||||
}
|
||||
|
||||
export default function(input, init) {
|
||||
return fetch(input, init).then(responseJson);
|
||||
}
|
||||
8
node_modules/d3-fetch/src/text.js
generated
vendored
Normal file
8
node_modules/d3-fetch/src/text.js
generated
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
function responseText(response) {
|
||||
if (!response.ok) throw new Error(response.status + " " + response.statusText);
|
||||
return response.text();
|
||||
}
|
||||
|
||||
export default function(input, init) {
|
||||
return fetch(input, init).then(responseText);
|
||||
}
|
||||
12
node_modules/d3-fetch/src/xml.js
generated
vendored
Normal file
12
node_modules/d3-fetch/src/xml.js
generated
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
import text from "./text.js";
|
||||
|
||||
function parser(type) {
|
||||
return (input, init) => text(input, init)
|
||||
.then(text => (new DOMParser).parseFromString(text, type));
|
||||
}
|
||||
|
||||
export default parser("application/xml");
|
||||
|
||||
export var html = parser("text/html");
|
||||
|
||||
export var svg = parser("image/svg+xml");
|
||||
Reference in New Issue
Block a user