add lisp packages

This commit is contained in:
2020-12-05 21:29:49 +01:00
parent 85e20365ae
commit a6e2395755
7272 changed files with 1363243 additions and 0 deletions

View File

@@ -0,0 +1,234 @@
// https://d3js.org/d3-drag/ v1.2.5 Copyright 2019 Mike Bostock
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('d3-dispatch'), require('d3-selection')) :
typeof define === 'function' && define.amd ? define(['exports', 'd3-dispatch', 'd3-selection'], factory) :
(global = global || self, factory(global.d3 = global.d3 || {}, global.d3, global.d3));
}(this, function (exports, d3Dispatch, d3Selection) { 'use strict';
function nopropagation() {
d3Selection.event.stopImmediatePropagation();
}
function noevent() {
d3Selection.event.preventDefault();
d3Selection.event.stopImmediatePropagation();
}
function nodrag(view) {
var root = view.document.documentElement,
selection = d3Selection.select(view).on("dragstart.drag", noevent, true);
if ("onselectstart" in root) {
selection.on("selectstart.drag", noevent, true);
} else {
root.__noselect = root.style.MozUserSelect;
root.style.MozUserSelect = "none";
}
}
function yesdrag(view, noclick) {
var root = view.document.documentElement,
selection = d3Selection.select(view).on("dragstart.drag", null);
if (noclick) {
selection.on("click.drag", noevent, true);
setTimeout(function() { selection.on("click.drag", null); }, 0);
}
if ("onselectstart" in root) {
selection.on("selectstart.drag", null);
} else {
root.style.MozUserSelect = root.__noselect;
delete root.__noselect;
}
}
function constant(x) {
return function() {
return x;
};
}
function DragEvent(target, type, subject, id, active, x, y, dx, dy, dispatch) {
this.target = target;
this.type = type;
this.subject = subject;
this.identifier = id;
this.active = active;
this.x = x;
this.y = y;
this.dx = dx;
this.dy = dy;
this._ = dispatch;
}
DragEvent.prototype.on = function() {
var value = this._.on.apply(this._, arguments);
return value === this._ ? this : value;
};
// Ignore right-click, since that should open the context menu.
function defaultFilter() {
return !d3Selection.event.ctrlKey && !d3Selection.event.button;
}
function defaultContainer() {
return this.parentNode;
}
function defaultSubject(d) {
return d == null ? {x: d3Selection.event.x, y: d3Selection.event.y} : d;
}
function defaultTouchable() {
return navigator.maxTouchPoints || ("ontouchstart" in this);
}
function drag() {
var filter = defaultFilter,
container = defaultContainer,
subject = defaultSubject,
touchable = defaultTouchable,
gestures = {},
listeners = d3Dispatch.dispatch("start", "drag", "end"),
active = 0,
mousedownx,
mousedowny,
mousemoving,
touchending,
clickDistance2 = 0;
function drag(selection) {
selection
.on("mousedown.drag", mousedowned)
.filter(touchable)
.on("touchstart.drag", touchstarted)
.on("touchmove.drag", touchmoved)
.on("touchend.drag touchcancel.drag", touchended)
.style("touch-action", "none")
.style("-webkit-tap-highlight-color", "rgba(0,0,0,0)");
}
function mousedowned() {
if (touchending || !filter.apply(this, arguments)) return;
var gesture = beforestart("mouse", container.apply(this, arguments), d3Selection.mouse, this, arguments);
if (!gesture) return;
d3Selection.select(d3Selection.event.view).on("mousemove.drag", mousemoved, true).on("mouseup.drag", mouseupped, true);
nodrag(d3Selection.event.view);
nopropagation();
mousemoving = false;
mousedownx = d3Selection.event.clientX;
mousedowny = d3Selection.event.clientY;
gesture("start");
}
function mousemoved() {
noevent();
if (!mousemoving) {
var dx = d3Selection.event.clientX - mousedownx, dy = d3Selection.event.clientY - mousedowny;
mousemoving = dx * dx + dy * dy > clickDistance2;
}
gestures.mouse("drag");
}
function mouseupped() {
d3Selection.select(d3Selection.event.view).on("mousemove.drag mouseup.drag", null);
yesdrag(d3Selection.event.view, mousemoving);
noevent();
gestures.mouse("end");
}
function touchstarted() {
if (!filter.apply(this, arguments)) return;
var touches = d3Selection.event.changedTouches,
c = container.apply(this, arguments),
n = touches.length, i, gesture;
for (i = 0; i < n; ++i) {
if (gesture = beforestart(touches[i].identifier, c, d3Selection.touch, this, arguments)) {
nopropagation();
gesture("start");
}
}
}
function touchmoved() {
var touches = d3Selection.event.changedTouches,
n = touches.length, i, gesture;
for (i = 0; i < n; ++i) {
if (gesture = gestures[touches[i].identifier]) {
noevent();
gesture("drag");
}
}
}
function touchended() {
var touches = d3Selection.event.changedTouches,
n = touches.length, i, gesture;
if (touchending) clearTimeout(touchending);
touchending = setTimeout(function() { touchending = null; }, 500); // Ghost clicks are delayed!
for (i = 0; i < n; ++i) {
if (gesture = gestures[touches[i].identifier]) {
nopropagation();
gesture("end");
}
}
}
function beforestart(id, container, point, that, args) {
var p = point(container, id), s, dx, dy,
sublisteners = listeners.copy();
if (!d3Selection.customEvent(new DragEvent(drag, "beforestart", s, id, active, p[0], p[1], 0, 0, sublisteners), function() {
if ((d3Selection.event.subject = s = subject.apply(that, args)) == null) return false;
dx = s.x - p[0] || 0;
dy = s.y - p[1] || 0;
return true;
})) return;
return function gesture(type) {
var p0 = p, n;
switch (type) {
case "start": gestures[id] = gesture, n = active++; break;
case "end": delete gestures[id], --active; // nobreak
case "drag": p = point(container, id), n = active; break;
}
d3Selection.customEvent(new DragEvent(drag, type, s, id, n, p[0] + dx, p[1] + dy, p[0] - p0[0], p[1] - p0[1], sublisteners), sublisteners.apply, sublisteners, [type, that, args]);
};
}
drag.filter = function(_) {
return arguments.length ? (filter = typeof _ === "function" ? _ : constant(!!_), drag) : filter;
};
drag.container = function(_) {
return arguments.length ? (container = typeof _ === "function" ? _ : constant(_), drag) : container;
};
drag.subject = function(_) {
return arguments.length ? (subject = typeof _ === "function" ? _ : constant(_), drag) : subject;
};
drag.touchable = function(_) {
return arguments.length ? (touchable = typeof _ === "function" ? _ : constant(!!_), drag) : touchable;
};
drag.on = function() {
var value = listeners.on.apply(listeners, arguments);
return value === listeners ? drag : value;
};
drag.clickDistance = function(_) {
return arguments.length ? (clickDistance2 = (_ = +_) * _, drag) : Math.sqrt(clickDistance2);
};
return drag;
}
exports.drag = drag;
exports.dragDisable = nodrag;
exports.dragEnable = yesdrag;
Object.defineProperty(exports, '__esModule', { value: true });
}));

View File

@@ -0,0 +1,2 @@
// https://d3js.org/d3-drag/ v1.2.5 Copyright 2019 Mike Bostock
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?e(exports,require("d3-dispatch"),require("d3-selection")):"function"==typeof define&&define.amd?define(["exports","d3-dispatch","d3-selection"],e):e((t=t||self).d3=t.d3||{},t.d3,t.d3)}(this,function(t,e,n){"use strict";function o(){n.event.stopImmediatePropagation()}function i(){n.event.preventDefault(),n.event.stopImmediatePropagation()}function r(t){var e=t.document.documentElement,o=n.select(t).on("dragstart.drag",i,!0);"onselectstart"in e?o.on("selectstart.drag",i,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function c(t,e){var o=t.document.documentElement,r=n.select(t).on("dragstart.drag",null);e&&(r.on("click.drag",i,!0),setTimeout(function(){r.on("click.drag",null)},0)),"onselectstart"in o?r.on("selectstart.drag",null):(o.style.MozUserSelect=o.__noselect,delete o.__noselect)}function u(t){return function(){return t}}function s(t,e,n,o,i,r,c,u,s,a){this.target=t,this.type=e,this.subject=n,this.identifier=o,this.active=i,this.x=r,this.y=c,this.dx=u,this.dy=s,this._=a}function a(){return!n.event.ctrlKey&&!n.event.button}function l(){return this.parentNode}function d(t){return null==t?{x:n.event.x,y:n.event.y}:t}function f(){return navigator.maxTouchPoints||"ontouchstart"in this}s.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t},t.drag=function(){var t,h,v,p,g=a,m=l,y=d,b=f,_={},w=e.dispatch("start","drag","end"),x=0,T=0;function j(t){t.on("mousedown.drag",k).filter(b).on("touchstart.drag",P).on("touchmove.drag",q).on("touchend.drag touchcancel.drag",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function k(){if(!p&&g.apply(this,arguments)){var e=D("mouse",m.apply(this,arguments),n.mouse,this,arguments);e&&(n.select(n.event.view).on("mousemove.drag",E,!0).on("mouseup.drag",M,!0),r(n.event.view),o(),v=!1,t=n.event.clientX,h=n.event.clientY,e("start"))}}function E(){if(i(),!v){var e=n.event.clientX-t,o=n.event.clientY-h;v=e*e+o*o>T}_.mouse("drag")}function M(){n.select(n.event.view).on("mousemove.drag mouseup.drag",null),c(n.event.view,v),i(),_.mouse("end")}function P(){if(g.apply(this,arguments)){var t,e,i=n.event.changedTouches,r=m.apply(this,arguments),c=i.length;for(t=0;t<c;++t)(e=D(i[t].identifier,r,n.touch,this,arguments))&&(o(),e("start"))}}function q(){var t,e,o=n.event.changedTouches,r=o.length;for(t=0;t<r;++t)(e=_[o[t].identifier])&&(i(),e("drag"))}function z(){var t,e,i=n.event.changedTouches,r=i.length;for(p&&clearTimeout(p),p=setTimeout(function(){p=null},500),t=0;t<r;++t)(e=_[i[t].identifier])&&(o(),e("end"))}function D(t,e,o,i,r){var c,u,a,l=o(e,t),d=w.copy();if(n.customEvent(new s(j,"beforestart",c,t,x,l[0],l[1],0,0,d),function(){return null!=(n.event.subject=c=y.apply(i,r))&&(u=c.x-l[0]||0,a=c.y-l[1]||0,!0)}))return function f(h){var v,p=l;switch(h){case"start":_[t]=f,v=x++;break;case"end":delete _[t],--x;case"drag":l=o(e,t),v=x}n.customEvent(new s(j,h,c,t,v,l[0]+u,l[1]+a,l[0]-p[0],l[1]-p[1],d),d.apply,d,[h,i,r])}}return j.filter=function(t){return arguments.length?(g="function"==typeof t?t:u(!!t),j):g},j.container=function(t){return arguments.length?(m="function"==typeof t?t:u(t),j):m},j.subject=function(t){return arguments.length?(y="function"==typeof t?t:u(t),j):y},j.touchable=function(t){return arguments.length?(b="function"==typeof t?t:u(!!t),j):b},j.on=function(){var t=w.on.apply(w,arguments);return t===w?j:t},j.clickDistance=function(t){return arguments.length?(T=(t=+t)*t,j):Math.sqrt(T)},j},t.dragDisable=r,t.dragEnable=c,Object.defineProperty(t,"__esModule",{value:!0})});