main repo

This commit is contained in:
Basilosaurusrex
2025-11-24 18:09:40 +01:00
parent b636ee5e70
commit f027651f9b
34146 changed files with 4436636 additions and 0 deletions

35
node_modules/d3-time/src/day.js generated vendored Normal file
View File

@@ -0,0 +1,35 @@
import {timeInterval} from "./interval.js";
import {durationDay, durationMinute} from "./duration.js";
export const timeDay = timeInterval(
date => date.setHours(0, 0, 0, 0),
(date, step) => date.setDate(date.getDate() + step),
(start, end) => (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay,
date => date.getDate() - 1
);
export const timeDays = timeDay.range;
export const utcDay = timeInterval((date) => {
date.setUTCHours(0, 0, 0, 0);
}, (date, step) => {
date.setUTCDate(date.getUTCDate() + step);
}, (start, end) => {
return (end - start) / durationDay;
}, (date) => {
return date.getUTCDate() - 1;
});
export const utcDays = utcDay.range;
export const unixDay = timeInterval((date) => {
date.setUTCHours(0, 0, 0, 0);
}, (date, step) => {
date.setUTCDate(date.getUTCDate() + step);
}, (start, end) => {
return (end - start) / durationDay;
}, (date) => {
return Math.floor(date / durationDay);
});
export const unixDays = unixDay.range;

7
node_modules/d3-time/src/duration.js generated vendored Normal file
View File

@@ -0,0 +1,7 @@
export const durationSecond = 1000;
export const durationMinute = durationSecond * 60;
export const durationHour = durationMinute * 60;
export const durationDay = durationHour * 24;
export const durationWeek = durationDay * 7;
export const durationMonth = durationDay * 30;
export const durationYear = durationDay * 365;

26
node_modules/d3-time/src/hour.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import {timeInterval} from "./interval.js";
import {durationHour, durationMinute, durationSecond} from "./duration.js";
export const timeHour = timeInterval((date) => {
date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond - date.getMinutes() * durationMinute);
}, (date, step) => {
date.setTime(+date + step * durationHour);
}, (start, end) => {
return (end - start) / durationHour;
}, (date) => {
return date.getHours();
});
export const timeHours = timeHour.range;
export const utcHour = timeInterval((date) => {
date.setUTCMinutes(0, 0, 0);
}, (date, step) => {
date.setTime(+date + step * durationHour);
}, (start, end) => {
return (end - start) / durationHour;
}, (date) => {
return date.getUTCHours();
});
export const utcHours = utcHour.range;

96
node_modules/d3-time/src/index.js generated vendored Normal file
View File

@@ -0,0 +1,96 @@
export {
timeInterval
} from "./interval.js";
export {
millisecond as utcMillisecond,
milliseconds as utcMilliseconds,
millisecond as timeMillisecond,
milliseconds as timeMilliseconds
} from "./millisecond.js";
export {
second as utcSecond,
seconds as utcSeconds,
second as timeSecond,
seconds as timeSeconds
} from "./second.js";
export {
timeMinute,
timeMinutes,
utcMinute,
utcMinutes
} from "./minute.js";
export {
timeHour,
timeHours,
utcHour,
utcHours
} from "./hour.js";
export {
timeDay,
timeDays,
utcDay,
utcDays,
unixDay,
unixDays
} from "./day.js";
export {
timeSunday as timeWeek,
timeSundays as timeWeeks,
timeSunday,
timeSundays,
timeMonday,
timeMondays,
timeTuesday,
timeTuesdays,
timeWednesday,
timeWednesdays,
timeThursday,
timeThursdays,
timeFriday,
timeFridays,
timeSaturday,
timeSaturdays,
utcSunday as utcWeek,
utcSundays as utcWeeks,
utcSunday,
utcSundays,
utcMonday,
utcMondays,
utcTuesday,
utcTuesdays,
utcWednesday,
utcWednesdays,
utcThursday,
utcThursdays,
utcFriday,
utcFridays,
utcSaturday,
utcSaturdays
} from "./week.js";
export {
timeMonth,
timeMonths,
utcMonth,
utcMonths
} from "./month.js";
export {
timeYear,
timeYears,
utcYear,
utcYears
} from "./year.js";
export {
utcTicks,
utcTickInterval,
timeTicks,
timeTickInterval
} from "./ticks.js";

69
node_modules/d3-time/src/interval.js generated vendored Normal file
View File

@@ -0,0 +1,69 @@
const t0 = new Date, t1 = new Date;
export function timeInterval(floori, offseti, count, field) {
function interval(date) {
return floori(date = arguments.length === 0 ? new Date : new Date(+date)), date;
}
interval.floor = (date) => {
return floori(date = new Date(+date)), date;
};
interval.ceil = (date) => {
return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
};
interval.round = (date) => {
const d0 = interval(date), d1 = interval.ceil(date);
return date - d0 < d1 - date ? d0 : d1;
};
interval.offset = (date, step) => {
return offseti(date = new Date(+date), step == null ? 1 : Math.floor(step)), date;
};
interval.range = (start, stop, step) => {
const range = [];
start = interval.ceil(start);
step = step == null ? 1 : Math.floor(step);
if (!(start < stop) || !(step > 0)) return range; // also handles Invalid Date
let previous;
do range.push(previous = new Date(+start)), offseti(start, step), floori(start);
while (previous < start && start < stop);
return range;
};
interval.filter = (test) => {
return timeInterval((date) => {
if (date >= date) while (floori(date), !test(date)) date.setTime(date - 1);
}, (date, step) => {
if (date >= date) {
if (step < 0) while (++step <= 0) {
while (offseti(date, -1), !test(date)) {} // eslint-disable-line no-empty
} else while (--step >= 0) {
while (offseti(date, +1), !test(date)) {} // eslint-disable-line no-empty
}
}
});
};
if (count) {
interval.count = (start, end) => {
t0.setTime(+start), t1.setTime(+end);
floori(t0), floori(t1);
return Math.floor(count(t0, t1));
};
interval.every = (step) => {
step = Math.floor(step);
return !isFinite(step) || !(step > 0) ? null
: !(step > 1) ? interval
: interval.filter(field
? (d) => field(d) % step === 0
: (d) => interval.count(0, d) % step === 0);
};
}
return interval;
}

25
node_modules/d3-time/src/millisecond.js generated vendored Normal file
View File

@@ -0,0 +1,25 @@
import {timeInterval} from "./interval.js";
export const millisecond = timeInterval(() => {
// noop
}, (date, step) => {
date.setTime(+date + step);
}, (start, end) => {
return end - start;
});
// An optimized implementation for this simple case.
millisecond.every = (k) => {
k = Math.floor(k);
if (!isFinite(k) || !(k > 0)) return null;
if (!(k > 1)) return millisecond;
return timeInterval((date) => {
date.setTime(Math.floor(date / k) * k);
}, (date, step) => {
date.setTime(+date + step * k);
}, (start, end) => {
return (end - start) / k;
});
};
export const milliseconds = millisecond.range;

26
node_modules/d3-time/src/minute.js generated vendored Normal file
View File

@@ -0,0 +1,26 @@
import {timeInterval} from "./interval.js";
import {durationMinute, durationSecond} from "./duration.js";
export const timeMinute = timeInterval((date) => {
date.setTime(date - date.getMilliseconds() - date.getSeconds() * durationSecond);
}, (date, step) => {
date.setTime(+date + step * durationMinute);
}, (start, end) => {
return (end - start) / durationMinute;
}, (date) => {
return date.getMinutes();
});
export const timeMinutes = timeMinute.range;
export const utcMinute = timeInterval((date) => {
date.setUTCSeconds(0, 0);
}, (date, step) => {
date.setTime(+date + step * durationMinute);
}, (start, end) => {
return (end - start) / durationMinute;
}, (date) => {
return date.getUTCMinutes();
});
export const utcMinutes = utcMinute.range;

27
node_modules/d3-time/src/month.js generated vendored Normal file
View File

@@ -0,0 +1,27 @@
import {timeInterval} from "./interval.js";
export const timeMonth = timeInterval((date) => {
date.setDate(1);
date.setHours(0, 0, 0, 0);
}, (date, step) => {
date.setMonth(date.getMonth() + step);
}, (start, end) => {
return end.getMonth() - start.getMonth() + (end.getFullYear() - start.getFullYear()) * 12;
}, (date) => {
return date.getMonth();
});
export const timeMonths = timeMonth.range;
export const utcMonth = timeInterval((date) => {
date.setUTCDate(1);
date.setUTCHours(0, 0, 0, 0);
}, (date, step) => {
date.setUTCMonth(date.getUTCMonth() + step);
}, (start, end) => {
return end.getUTCMonth() - start.getUTCMonth() + (end.getUTCFullYear() - start.getUTCFullYear()) * 12;
}, (date) => {
return date.getUTCMonth();
});
export const utcMonths = utcMonth.range;

14
node_modules/d3-time/src/second.js generated vendored Normal file
View File

@@ -0,0 +1,14 @@
import {timeInterval} from "./interval.js";
import {durationSecond} from "./duration.js";
export const second = timeInterval((date) => {
date.setTime(date - date.getMilliseconds());
}, (date, step) => {
date.setTime(+date + step * durationSecond);
}, (start, end) => {
return (end - start) / durationSecond;
}, (date) => {
return date.getUTCSeconds();
});
export const seconds = second.range;

58
node_modules/d3-time/src/ticks.js generated vendored Normal file
View File

@@ -0,0 +1,58 @@
import {bisector, tickStep} from "d3-array";
import {durationDay, durationHour, durationMinute, durationMonth, durationSecond, durationWeek, durationYear} from "./duration.js";
import {millisecond} from "./millisecond.js";
import {second} from "./second.js";
import {timeMinute, utcMinute} from "./minute.js";
import {timeHour, utcHour} from "./hour.js";
import {timeDay, unixDay} from "./day.js";
import {timeSunday, utcSunday} from "./week.js";
import {timeMonth, utcMonth} from "./month.js";
import {timeYear, utcYear} from "./year.js";
function ticker(year, month, week, day, hour, minute) {
const tickIntervals = [
[second, 1, durationSecond],
[second, 5, 5 * durationSecond],
[second, 15, 15 * durationSecond],
[second, 30, 30 * durationSecond],
[minute, 1, durationMinute],
[minute, 5, 5 * durationMinute],
[minute, 15, 15 * durationMinute],
[minute, 30, 30 * durationMinute],
[ hour, 1, durationHour ],
[ hour, 3, 3 * durationHour ],
[ hour, 6, 6 * durationHour ],
[ hour, 12, 12 * durationHour ],
[ day, 1, durationDay ],
[ day, 2, 2 * durationDay ],
[ week, 1, durationWeek ],
[ month, 1, durationMonth ],
[ month, 3, 3 * durationMonth ],
[ year, 1, durationYear ]
];
function ticks(start, stop, count) {
const reverse = stop < start;
if (reverse) [start, stop] = [stop, start];
const interval = count && typeof count.range === "function" ? count : tickInterval(start, stop, count);
const ticks = interval ? interval.range(start, +stop + 1) : []; // inclusive stop
return reverse ? ticks.reverse() : ticks;
}
function tickInterval(start, stop, count) {
const target = Math.abs(stop - start) / count;
const i = bisector(([,, step]) => step).right(tickIntervals, target);
if (i === tickIntervals.length) return year.every(tickStep(start / durationYear, stop / durationYear, count));
if (i === 0) return millisecond.every(Math.max(tickStep(start, stop, count), 1));
const [t, step] = tickIntervals[target / tickIntervals[i - 1][2] < tickIntervals[i][2] / target ? i - 1 : i];
return t.every(step);
}
return [ticks, tickInterval];
}
const [utcTicks, utcTickInterval] = ticker(utcYear, utcMonth, utcSunday, unixDay, utcHour, utcMinute);
const [timeTicks, timeTickInterval] = ticker(timeYear, timeMonth, timeSunday, timeDay, timeHour, timeMinute);
export {utcTicks, utcTickInterval, timeTicks, timeTickInterval};

56
node_modules/d3-time/src/week.js generated vendored Normal file
View File

@@ -0,0 +1,56 @@
import {timeInterval} from "./interval.js";
import {durationMinute, durationWeek} from "./duration.js";
function timeWeekday(i) {
return timeInterval((date) => {
date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7);
date.setHours(0, 0, 0, 0);
}, (date, step) => {
date.setDate(date.getDate() + step * 7);
}, (start, end) => {
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
});
}
export const timeSunday = timeWeekday(0);
export const timeMonday = timeWeekday(1);
export const timeTuesday = timeWeekday(2);
export const timeWednesday = timeWeekday(3);
export const timeThursday = timeWeekday(4);
export const timeFriday = timeWeekday(5);
export const timeSaturday = timeWeekday(6);
export const timeSundays = timeSunday.range;
export const timeMondays = timeMonday.range;
export const timeTuesdays = timeTuesday.range;
export const timeWednesdays = timeWednesday.range;
export const timeThursdays = timeThursday.range;
export const timeFridays = timeFriday.range;
export const timeSaturdays = timeSaturday.range;
function utcWeekday(i) {
return timeInterval((date) => {
date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7);
date.setUTCHours(0, 0, 0, 0);
}, (date, step) => {
date.setUTCDate(date.getUTCDate() + step * 7);
}, (start, end) => {
return (end - start) / durationWeek;
});
}
export const utcSunday = utcWeekday(0);
export const utcMonday = utcWeekday(1);
export const utcTuesday = utcWeekday(2);
export const utcWednesday = utcWeekday(3);
export const utcThursday = utcWeekday(4);
export const utcFriday = utcWeekday(5);
export const utcSaturday = utcWeekday(6);
export const utcSundays = utcSunday.range;
export const utcMondays = utcMonday.range;
export const utcTuesdays = utcTuesday.range;
export const utcWednesdays = utcWednesday.range;
export const utcThursdays = utcThursday.range;
export const utcFridays = utcFriday.range;
export const utcSaturdays = utcSaturday.range;

49
node_modules/d3-time/src/year.js generated vendored Normal file
View File

@@ -0,0 +1,49 @@
import {timeInterval} from "./interval.js";
export const timeYear = timeInterval((date) => {
date.setMonth(0, 1);
date.setHours(0, 0, 0, 0);
}, (date, step) => {
date.setFullYear(date.getFullYear() + step);
}, (start, end) => {
return end.getFullYear() - start.getFullYear();
}, (date) => {
return date.getFullYear();
});
// An optimized implementation for this simple case.
timeYear.every = (k) => {
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {
date.setFullYear(Math.floor(date.getFullYear() / k) * k);
date.setMonth(0, 1);
date.setHours(0, 0, 0, 0);
}, (date, step) => {
date.setFullYear(date.getFullYear() + step * k);
});
};
export const timeYears = timeYear.range;
export const utcYear = timeInterval((date) => {
date.setUTCMonth(0, 1);
date.setUTCHours(0, 0, 0, 0);
}, (date, step) => {
date.setUTCFullYear(date.getUTCFullYear() + step);
}, (start, end) => {
return end.getUTCFullYear() - start.getUTCFullYear();
}, (date) => {
return date.getUTCFullYear();
});
// An optimized implementation for this simple case.
utcYear.every = (k) => {
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : timeInterval((date) => {
date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k);
date.setUTCMonth(0, 1);
date.setUTCHours(0, 0, 0, 0);
}, (date, step) => {
date.setUTCFullYear(date.getUTCFullYear() + step * k);
});
};
export const utcYears = utcYear.range;