Initial commit
This commit is contained in:
15
node_modules/d3-dispatch/.eslintrc.json
generated
vendored
Normal file
15
node_modules/d3-dispatch/.eslintrc.json
generated
vendored
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"extends": "eslint:recommended",
|
||||
"parserOptions": {
|
||||
"sourceType": "module",
|
||||
"ecmaVersion": 8
|
||||
},
|
||||
"env": {
|
||||
"es6": true,
|
||||
"node": true,
|
||||
"browser": true
|
||||
},
|
||||
"rules": {
|
||||
"no-cond-assign": 0
|
||||
}
|
||||
}
|
||||
27
node_modules/d3-dispatch/LICENSE
generated
vendored
Normal file
27
node_modules/d3-dispatch/LICENSE
generated
vendored
Normal file
@@ -0,0 +1,27 @@
|
||||
Copyright 2010-2016 Mike Bostock
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
|
||||
* Redistributions of source code must retain the above copyright notice, this
|
||||
list of conditions and the following disclaimer.
|
||||
|
||||
* Redistributions in binary form must reproduce the above copyright notice,
|
||||
this list of conditions and the following disclaimer in the documentation
|
||||
and/or other materials provided with the distribution.
|
||||
|
||||
* Neither the name of the author nor the names of contributors may be used to
|
||||
endorse or promote products derived from this software without specific prior
|
||||
written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
|
||||
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
|
||||
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
95
node_modules/d3-dispatch/dist/d3-dispatch.js
generated
vendored
Normal file
95
node_modules/d3-dispatch/dist/d3-dispatch.js
generated
vendored
Normal file
@@ -0,0 +1,95 @@
|
||||
// https://d3js.org/d3-dispatch/ v1.0.5 Copyright 2018 Mike Bostock
|
||||
(function (global, factory) {
|
||||
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports) :
|
||||
typeof define === 'function' && define.amd ? define(['exports'], factory) :
|
||||
(factory((global.d3 = global.d3 || {})));
|
||||
}(this, (function (exports) { 'use strict';
|
||||
|
||||
var noop = {value: function() {}};
|
||||
|
||||
function dispatch() {
|
||||
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
||||
if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t);
|
||||
_[t] = [];
|
||||
}
|
||||
return new Dispatch(_);
|
||||
}
|
||||
|
||||
function Dispatch(_) {
|
||||
this._ = _;
|
||||
}
|
||||
|
||||
function parseTypenames(typenames, types) {
|
||||
return typenames.trim().split(/^|\s+/).map(function(t) {
|
||||
var name = "", i = t.indexOf(".");
|
||||
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
||||
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
||||
return {type: t, name: name};
|
||||
});
|
||||
}
|
||||
|
||||
Dispatch.prototype = dispatch.prototype = {
|
||||
constructor: Dispatch,
|
||||
on: function(typename, callback) {
|
||||
var _ = this._,
|
||||
T = parseTypenames(typename + "", _),
|
||||
t,
|
||||
i = -1,
|
||||
n = T.length;
|
||||
|
||||
// If no callback was specified, return the callback of the given type and name.
|
||||
if (arguments.length < 2) {
|
||||
while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
|
||||
return;
|
||||
}
|
||||
|
||||
// If a type was specified, set the callback for the given type and name.
|
||||
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
||||
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
||||
while (++i < n) {
|
||||
if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
|
||||
else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
copy: function() {
|
||||
var copy = {}, _ = this._;
|
||||
for (var t in _) copy[t] = _[t].slice();
|
||||
return new Dispatch(copy);
|
||||
},
|
||||
call: function(type, that) {
|
||||
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
||||
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
||||
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
||||
},
|
||||
apply: function(type, that, args) {
|
||||
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
||||
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
||||
}
|
||||
};
|
||||
|
||||
function get(type, name) {
|
||||
for (var i = 0, n = type.length, c; i < n; ++i) {
|
||||
if ((c = type[i]).name === name) {
|
||||
return c.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function set(type, name, callback) {
|
||||
for (var i = 0, n = type.length; i < n; ++i) {
|
||||
if (type[i].name === name) {
|
||||
type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (callback != null) type.push({name: name, value: callback});
|
||||
return type;
|
||||
}
|
||||
|
||||
exports.dispatch = dispatch;
|
||||
|
||||
Object.defineProperty(exports, '__esModule', { value: true });
|
||||
|
||||
})));
|
||||
2
node_modules/d3-dispatch/dist/d3-dispatch.min.js
generated
vendored
Normal file
2
node_modules/d3-dispatch/dist/d3-dispatch.min.js
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
// https://d3js.org/d3-dispatch/ v1.0.5 Copyright 2018 Mike Bostock
|
||||
!function(n,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports):"function"==typeof define&&define.amd?define(["exports"],e):e(n.d3=n.d3||{})}(this,function(n){"use strict";var e={value:function(){}};function t(){for(var n,e=0,t=arguments.length,o={};e<t;++e){if(!(n=arguments[e]+"")||n in o)throw new Error("illegal type: "+n);o[n]=[]}return new r(o)}function r(n){this._=n}function o(n,e){for(var t,r=0,o=n.length;r<o;++r)if((t=n[r]).name===e)return t.value}function i(n,t,r){for(var o=0,i=n.length;o<i;++o)if(n[o].name===t){n[o]=e,n=n.slice(0,o).concat(n.slice(o+1));break}return null!=r&&n.push({name:t,value:r}),n}r.prototype=t.prototype={constructor:r,on:function(n,e){var t,r,f=this._,l=(r=f,(n+"").trim().split(/^|\s+/).map(function(n){var e="",t=n.indexOf(".");if(t>=0&&(e=n.slice(t+1),n=n.slice(0,t)),n&&!r.hasOwnProperty(n))throw new Error("unknown type: "+n);return{type:n,name:e}})),a=-1,u=l.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<u;)if(t=(n=l[a]).type)f[t]=i(f[t],n.name,e);else if(null==e)for(t in f)f[t]=i(f[t],n.name,null);return this}for(;++a<u;)if((t=(n=l[a]).type)&&(t=o(f[t],n.name)))return t},copy:function(){var n={},e=this._;for(var t in e)n[t]=e[t].slice();return new r(n)},call:function(n,e){if((t=arguments.length-2)>0)for(var t,r,o=new Array(t),i=0;i<t;++i)o[i]=arguments[i+2];if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(i=0,t=(r=this._[n]).length;i<t;++i)r[i].value.apply(e,o)},apply:function(n,e,t){if(!this._.hasOwnProperty(n))throw new Error("unknown type: "+n);for(var r=this._[n],o=0,i=r.length;o<i;++o)r[o].value.apply(e,t)}},n.dispatch=t,Object.defineProperty(n,"__esModule",{value:!0})});
|
||||
25
node_modules/d3-dispatch/package.json
generated
vendored
Normal file
25
node_modules/d3-dispatch/package.json
generated
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
{
|
||||
"name": "d3-dispatch",
|
||||
"version": "1.0.5",
|
||||
"description": "Register named callbacks and call them with arguments.",
|
||||
"homepage": "https://d3js.org/d3-dispatch/",
|
||||
"license": "BSD-3-Clause",
|
||||
"author": {
|
||||
"name": "Mike Bostock",
|
||||
"url": "http://bost.ocks.org/mike"
|
||||
},
|
||||
"main": "dist/d3-dispatch.js",
|
||||
"unpkg": "dist/d3-dispatch.min.js",
|
||||
"jsdelivr": "dist/d3-dispatch.min.js",
|
||||
"module": "src/index.js",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/d3/d3-dispatch.git"
|
||||
},
|
||||
"devDependencies": {
|
||||
"eslint": "5",
|
||||
"rollup": "0.64",
|
||||
"rollup-plugin-terser": "1",
|
||||
"tape": "4"
|
||||
}
|
||||
}
|
||||
36
node_modules/d3-dispatch/rollup.config.js
generated
vendored
Normal file
36
node_modules/d3-dispatch/rollup.config.js
generated
vendored
Normal file
@@ -0,0 +1,36 @@
|
||||
import {terser} from "rollup-plugin-terser";
|
||||
import * as meta from "./package.json";
|
||||
|
||||
const config = {
|
||||
input: "src/index.js",
|
||||
external: Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)),
|
||||
output: {
|
||||
file: `dist/${meta.name}.js`,
|
||||
name: "d3",
|
||||
format: "umd",
|
||||
indent: false,
|
||||
extend: true,
|
||||
banner: `// ${meta.homepage} v${meta.version} Copyright ${(new Date).getFullYear()} ${meta.author.name}`,
|
||||
globals: Object.assign({}, ...Object.keys(meta.dependencies || {}).filter(key => /^d3-/.test(key)).map(key => ({[key]: "d3"})))
|
||||
},
|
||||
plugins: []
|
||||
};
|
||||
|
||||
export default [
|
||||
config,
|
||||
{
|
||||
...config,
|
||||
output: {
|
||||
...config.output,
|
||||
file: `dist/${meta.name}.min.js`
|
||||
},
|
||||
plugins: [
|
||||
...config.plugins,
|
||||
terser({
|
||||
output: {
|
||||
preamble: config.output.banner
|
||||
}
|
||||
})
|
||||
]
|
||||
}
|
||||
];
|
||||
84
node_modules/d3-dispatch/src/dispatch.js
generated
vendored
Normal file
84
node_modules/d3-dispatch/src/dispatch.js
generated
vendored
Normal file
@@ -0,0 +1,84 @@
|
||||
var noop = {value: function() {}};
|
||||
|
||||
function dispatch() {
|
||||
for (var i = 0, n = arguments.length, _ = {}, t; i < n; ++i) {
|
||||
if (!(t = arguments[i] + "") || (t in _)) throw new Error("illegal type: " + t);
|
||||
_[t] = [];
|
||||
}
|
||||
return new Dispatch(_);
|
||||
}
|
||||
|
||||
function Dispatch(_) {
|
||||
this._ = _;
|
||||
}
|
||||
|
||||
function parseTypenames(typenames, types) {
|
||||
return typenames.trim().split(/^|\s+/).map(function(t) {
|
||||
var name = "", i = t.indexOf(".");
|
||||
if (i >= 0) name = t.slice(i + 1), t = t.slice(0, i);
|
||||
if (t && !types.hasOwnProperty(t)) throw new Error("unknown type: " + t);
|
||||
return {type: t, name: name};
|
||||
});
|
||||
}
|
||||
|
||||
Dispatch.prototype = dispatch.prototype = {
|
||||
constructor: Dispatch,
|
||||
on: function(typename, callback) {
|
||||
var _ = this._,
|
||||
T = parseTypenames(typename + "", _),
|
||||
t,
|
||||
i = -1,
|
||||
n = T.length;
|
||||
|
||||
// If no callback was specified, return the callback of the given type and name.
|
||||
if (arguments.length < 2) {
|
||||
while (++i < n) if ((t = (typename = T[i]).type) && (t = get(_[t], typename.name))) return t;
|
||||
return;
|
||||
}
|
||||
|
||||
// If a type was specified, set the callback for the given type and name.
|
||||
// Otherwise, if a null callback was specified, remove callbacks of the given name.
|
||||
if (callback != null && typeof callback !== "function") throw new Error("invalid callback: " + callback);
|
||||
while (++i < n) {
|
||||
if (t = (typename = T[i]).type) _[t] = set(_[t], typename.name, callback);
|
||||
else if (callback == null) for (t in _) _[t] = set(_[t], typename.name, null);
|
||||
}
|
||||
|
||||
return this;
|
||||
},
|
||||
copy: function() {
|
||||
var copy = {}, _ = this._;
|
||||
for (var t in _) copy[t] = _[t].slice();
|
||||
return new Dispatch(copy);
|
||||
},
|
||||
call: function(type, that) {
|
||||
if ((n = arguments.length - 2) > 0) for (var args = new Array(n), i = 0, n, t; i < n; ++i) args[i] = arguments[i + 2];
|
||||
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
||||
for (t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
||||
},
|
||||
apply: function(type, that, args) {
|
||||
if (!this._.hasOwnProperty(type)) throw new Error("unknown type: " + type);
|
||||
for (var t = this._[type], i = 0, n = t.length; i < n; ++i) t[i].value.apply(that, args);
|
||||
}
|
||||
};
|
||||
|
||||
function get(type, name) {
|
||||
for (var i = 0, n = type.length, c; i < n; ++i) {
|
||||
if ((c = type[i]).name === name) {
|
||||
return c.value;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function set(type, name, callback) {
|
||||
for (var i = 0, n = type.length; i < n; ++i) {
|
||||
if (type[i].name === name) {
|
||||
type[i] = noop, type = type.slice(0, i).concat(type.slice(i + 1));
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (callback != null) type.push({name: name, value: callback});
|
||||
return type;
|
||||
}
|
||||
|
||||
export default dispatch;
|
||||
1
node_modules/d3-dispatch/src/index.js
generated
vendored
Normal file
1
node_modules/d3-dispatch/src/index.js
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
export {default as dispatch} from "./dispatch";
|
||||
Reference in New Issue
Block a user