@hpcc-js/comms 3.6.0 → 3.6.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/browser/index.js +11 -867
- package/dist/browser/index.js.map +1 -1
- package/dist/browser/index.umd.cjs +2 -2
- package/dist/browser/index.umd.cjs.map +1 -1
- package/dist/node/index.cjs +1 -1
- package/dist/node/index.cjs.map +1 -1
- package/dist/node/index.js +1 -1
- package/dist/node/index.js.map +1 -1
- package/package.json +5 -5
- package/src/__package__.ts +2 -2
- package/src/services/wsdl/ws_logaccess/v1.08/ws_logaccess.ts +2 -2
- package/types/__package__.d.ts +2 -2
- package/types/services/wsdl/ws_logaccess/v1.08/ws_logaccess.d.ts +2 -2
package/dist/browser/index.js
CHANGED
|
@@ -2,7 +2,10 @@ var __defProp = Object.defineProperty;
|
|
|
2
2
|
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: !0, configurable: !0, writable: !0, value }) : obj[key] = value;
|
|
3
3
|
var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key != "symbol" ? key + "" : key, value);
|
|
4
4
|
import { scopedLogger, join, promiseTimeout, exists, deepMixin, xml2json, StateObject, Cache, Graph, Subgraph as Subgraph$1, Vertex as Vertex$1, Edge as Edge$1, SAXStackParser, Stack, espTime2Seconds as espTime2Seconds$1, deepMixinT, XMLNode, debounce, Message, Dispatch } from "@hpcc-js/util";
|
|
5
|
-
|
|
5
|
+
import { max, mean } from "d3-array";
|
|
6
|
+
import { format } from "d3-format";
|
|
7
|
+
import { utcFormat, utcParse } from "d3-time-format";
|
|
8
|
+
const PKG_NAME = "@hpcc-js/comms", PKG_VERSION = "3.6.1", BUILD_VERSION = "3.7.1", logger$6 = scopedLogger("comms/connection.ts");
|
|
6
9
|
function instanceOfIOptions(object) {
|
|
7
10
|
return "baseUrl" in object;
|
|
8
11
|
}
|
|
@@ -1189,60 +1192,6 @@ class LogaccessService extends LogaccessServiceBase {
|
|
|
1189
1192
|
});
|
|
1190
1193
|
}
|
|
1191
1194
|
}
|
|
1192
|
-
function ascending(a, b) {
|
|
1193
|
-
return a < b ? -1 : a > b ? 1 : a >= b ? 0 : NaN;
|
|
1194
|
-
}
|
|
1195
|
-
function bisector(compare) {
|
|
1196
|
-
return compare.length === 1 && (compare = ascendingComparator(compare)), {
|
|
1197
|
-
left: function(a, x, lo, hi) {
|
|
1198
|
-
for (lo == null && (lo = 0), hi == null && (hi = a.length); lo < hi; ) {
|
|
1199
|
-
var mid = lo + hi >>> 1;
|
|
1200
|
-
compare(a[mid], x) < 0 ? lo = mid + 1 : hi = mid;
|
|
1201
|
-
}
|
|
1202
|
-
return lo;
|
|
1203
|
-
},
|
|
1204
|
-
right: function(a, x, lo, hi) {
|
|
1205
|
-
for (lo == null && (lo = 0), hi == null && (hi = a.length); lo < hi; ) {
|
|
1206
|
-
var mid = lo + hi >>> 1;
|
|
1207
|
-
compare(a[mid], x) > 0 ? hi = mid : lo = mid + 1;
|
|
1208
|
-
}
|
|
1209
|
-
return lo;
|
|
1210
|
-
}
|
|
1211
|
-
};
|
|
1212
|
-
}
|
|
1213
|
-
function ascendingComparator(f) {
|
|
1214
|
-
return function(d, x) {
|
|
1215
|
-
return ascending(f(d), x);
|
|
1216
|
-
};
|
|
1217
|
-
}
|
|
1218
|
-
bisector(ascending);
|
|
1219
|
-
function number(x) {
|
|
1220
|
-
return x === null ? NaN : +x;
|
|
1221
|
-
}
|
|
1222
|
-
function d3Max(values, valueof) {
|
|
1223
|
-
var n = values.length, i = -1, value, max;
|
|
1224
|
-
if (valueof == null) {
|
|
1225
|
-
for (; ++i < n; )
|
|
1226
|
-
if ((value = values[i]) != null && value >= value)
|
|
1227
|
-
for (max = value; ++i < n; )
|
|
1228
|
-
(value = values[i]) != null && value > max && (max = value);
|
|
1229
|
-
} else
|
|
1230
|
-
for (; ++i < n; )
|
|
1231
|
-
if ((value = valueof(values[i], i, values)) != null && value >= value)
|
|
1232
|
-
for (max = value; ++i < n; )
|
|
1233
|
-
(value = valueof(values[i], i, values)) != null && value > max && (max = value);
|
|
1234
|
-
return max;
|
|
1235
|
-
}
|
|
1236
|
-
function d3Mean(values, valueof) {
|
|
1237
|
-
var n = values.length, m = n, i = -1, value, sum = 0;
|
|
1238
|
-
if (valueof == null)
|
|
1239
|
-
for (; ++i < n; )
|
|
1240
|
-
isNaN(value = number(values[i])) ? --m : sum += value;
|
|
1241
|
-
else
|
|
1242
|
-
for (; ++i < n; )
|
|
1243
|
-
isNaN(value = number(valueof(values[i], i, values))) ? --m : sum += value;
|
|
1244
|
-
if (m) return sum / m;
|
|
1245
|
-
}
|
|
1246
1195
|
class MachineServiceBase extends Service {
|
|
1247
1196
|
constructor(optsConnection) {
|
|
1248
1197
|
super(optsConnection, "ws_machine", "1.17");
|
|
@@ -1297,8 +1246,8 @@ class MachineService extends MachineServiceBase {
|
|
|
1297
1246
|
NetAddress: mu.NetAddress,
|
|
1298
1247
|
Description: mu.Description,
|
|
1299
1248
|
DiskUsages,
|
|
1300
|
-
mean:
|
|
1301
|
-
max:
|
|
1249
|
+
mean: mean(DiskUsages.filter((du) => !isNaN(du.PercentUsed)), (du) => du.PercentUsed),
|
|
1250
|
+
max: max(DiskUsages.filter((du) => !isNaN(du.PercentUsed)), (du) => du.PercentUsed)
|
|
1302
1251
|
};
|
|
1303
1252
|
});
|
|
1304
1253
|
return {
|
|
@@ -1307,8 +1256,8 @@ class MachineService extends MachineServiceBase {
|
|
|
1307
1256
|
Description: cu.Description,
|
|
1308
1257
|
MachineUsages,
|
|
1309
1258
|
MachineUsagesDescription: MachineUsages.reduce((prev, mu) => prev + (mu.Description || ""), ""),
|
|
1310
|
-
mean:
|
|
1311
|
-
max:
|
|
1259
|
+
mean: mean(MachineUsages.filter((mu) => !isNaN(mu.mean)), (mu) => mu.mean),
|
|
1260
|
+
max: max(MachineUsages.filter((mu) => !isNaN(mu.max)), (mu) => mu.max)
|
|
1312
1261
|
};
|
|
1313
1262
|
});
|
|
1314
1263
|
return {
|
|
@@ -1316,8 +1265,8 @@ class MachineService extends MachineServiceBase {
|
|
|
1316
1265
|
Description: tcu.Description,
|
|
1317
1266
|
ComponentUsages,
|
|
1318
1267
|
ComponentUsagesDescription: ComponentUsages.reduce((prev, cu) => prev + (cu.MachineUsagesDescription || ""), ""),
|
|
1319
|
-
mean:
|
|
1320
|
-
max:
|
|
1268
|
+
mean: mean(ComponentUsages.filter((cu) => !isNaN(cu.mean)), (cu) => cu.mean),
|
|
1269
|
+
max: max(ComponentUsages.filter((cu) => !isNaN(cu.max)), (cu) => cu.max)
|
|
1321
1270
|
};
|
|
1322
1271
|
}));
|
|
1323
1272
|
}
|
|
@@ -2024,811 +1973,6 @@ class WorkunitsServiceEx extends WorkunitsServiceBase {
|
|
|
2024
1973
|
return this._connection.send("WUPublishWorkunit", request);
|
|
2025
1974
|
}
|
|
2026
1975
|
}
|
|
2027
|
-
function formatDecimal(x) {
|
|
2028
|
-
return Math.abs(x = Math.round(x)) >= 1e21 ? x.toLocaleString("en").replace(/,/g, "") : x.toString(10);
|
|
2029
|
-
}
|
|
2030
|
-
function formatDecimalParts(x, p) {
|
|
2031
|
-
if ((i = (x = p ? x.toExponential(p - 1) : x.toExponential()).indexOf("e")) < 0) return null;
|
|
2032
|
-
var i, coefficient = x.slice(0, i);
|
|
2033
|
-
return [
|
|
2034
|
-
coefficient.length > 1 ? coefficient[0] + coefficient.slice(2) : coefficient,
|
|
2035
|
-
+x.slice(i + 1)
|
|
2036
|
-
];
|
|
2037
|
-
}
|
|
2038
|
-
function exponent(x) {
|
|
2039
|
-
return x = formatDecimalParts(Math.abs(x)), x ? x[1] : NaN;
|
|
2040
|
-
}
|
|
2041
|
-
function formatGroup(grouping, thousands) {
|
|
2042
|
-
return function(value, width) {
|
|
2043
|
-
for (var i = value.length, t = [], j = 0, g = grouping[0], length = 0; i > 0 && g > 0 && (length + g + 1 > width && (g = Math.max(1, width - length)), t.push(value.substring(i -= g, i + g)), !((length += g + 1) > width)); )
|
|
2044
|
-
g = grouping[j = (j + 1) % grouping.length];
|
|
2045
|
-
return t.reverse().join(thousands);
|
|
2046
|
-
};
|
|
2047
|
-
}
|
|
2048
|
-
function formatNumerals(numerals) {
|
|
2049
|
-
return function(value) {
|
|
2050
|
-
return value.replace(/[0-9]/g, function(i) {
|
|
2051
|
-
return numerals[+i];
|
|
2052
|
-
});
|
|
2053
|
-
};
|
|
2054
|
-
}
|
|
2055
|
-
var re = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
2056
|
-
function formatSpecifier(specifier) {
|
|
2057
|
-
if (!(match = re.exec(specifier))) throw new Error("invalid format: " + specifier);
|
|
2058
|
-
var match;
|
|
2059
|
-
return new FormatSpecifier({
|
|
2060
|
-
fill: match[1],
|
|
2061
|
-
align: match[2],
|
|
2062
|
-
sign: match[3],
|
|
2063
|
-
symbol: match[4],
|
|
2064
|
-
zero: match[5],
|
|
2065
|
-
width: match[6],
|
|
2066
|
-
comma: match[7],
|
|
2067
|
-
precision: match[8] && match[8].slice(1),
|
|
2068
|
-
trim: match[9],
|
|
2069
|
-
type: match[10]
|
|
2070
|
-
});
|
|
2071
|
-
}
|
|
2072
|
-
formatSpecifier.prototype = FormatSpecifier.prototype;
|
|
2073
|
-
function FormatSpecifier(specifier) {
|
|
2074
|
-
this.fill = specifier.fill === void 0 ? " " : specifier.fill + "", this.align = specifier.align === void 0 ? ">" : specifier.align + "", this.sign = specifier.sign === void 0 ? "-" : specifier.sign + "", this.symbol = specifier.symbol === void 0 ? "" : specifier.symbol + "", this.zero = !!specifier.zero, this.width = specifier.width === void 0 ? void 0 : +specifier.width, this.comma = !!specifier.comma, this.precision = specifier.precision === void 0 ? void 0 : +specifier.precision, this.trim = !!specifier.trim, this.type = specifier.type === void 0 ? "" : specifier.type + "";
|
|
2075
|
-
}
|
|
2076
|
-
FormatSpecifier.prototype.toString = function() {
|
|
2077
|
-
return this.fill + this.align + this.sign + this.symbol + (this.zero ? "0" : "") + (this.width === void 0 ? "" : Math.max(1, this.width | 0)) + (this.comma ? "," : "") + (this.precision === void 0 ? "" : "." + Math.max(0, this.precision | 0)) + (this.trim ? "~" : "") + this.type;
|
|
2078
|
-
};
|
|
2079
|
-
function formatTrim(s) {
|
|
2080
|
-
out: for (var n = s.length, i = 1, i0 = -1, i1; i < n; ++i)
|
|
2081
|
-
switch (s[i]) {
|
|
2082
|
-
case ".":
|
|
2083
|
-
i0 = i1 = i;
|
|
2084
|
-
break;
|
|
2085
|
-
case "0":
|
|
2086
|
-
i0 === 0 && (i0 = i), i1 = i;
|
|
2087
|
-
break;
|
|
2088
|
-
default:
|
|
2089
|
-
if (!+s[i]) break out;
|
|
2090
|
-
i0 > 0 && (i0 = 0);
|
|
2091
|
-
break;
|
|
2092
|
-
}
|
|
2093
|
-
return i0 > 0 ? s.slice(0, i0) + s.slice(i1 + 1) : s;
|
|
2094
|
-
}
|
|
2095
|
-
var prefixExponent;
|
|
2096
|
-
function formatPrefixAuto(x, p) {
|
|
2097
|
-
var d = formatDecimalParts(x, p);
|
|
2098
|
-
if (!d) return x + "";
|
|
2099
|
-
var coefficient = d[0], exponent2 = d[1], i = exponent2 - (prefixExponent = Math.max(-8, Math.min(8, Math.floor(exponent2 / 3))) * 3) + 1, n = coefficient.length;
|
|
2100
|
-
return i === n ? coefficient : i > n ? coefficient + new Array(i - n + 1).join("0") : i > 0 ? coefficient.slice(0, i) + "." + coefficient.slice(i) : "0." + new Array(1 - i).join("0") + formatDecimalParts(x, Math.max(0, p + i - 1))[0];
|
|
2101
|
-
}
|
|
2102
|
-
function formatRounded(x, p) {
|
|
2103
|
-
var d = formatDecimalParts(x, p);
|
|
2104
|
-
if (!d) return x + "";
|
|
2105
|
-
var coefficient = d[0], exponent2 = d[1];
|
|
2106
|
-
return exponent2 < 0 ? "0." + new Array(-exponent2).join("0") + coefficient : coefficient.length > exponent2 + 1 ? coefficient.slice(0, exponent2 + 1) + "." + coefficient.slice(exponent2 + 1) : coefficient + new Array(exponent2 - coefficient.length + 2).join("0");
|
|
2107
|
-
}
|
|
2108
|
-
const formatTypes = {
|
|
2109
|
-
"%": function(x, p) {
|
|
2110
|
-
return (x * 100).toFixed(p);
|
|
2111
|
-
},
|
|
2112
|
-
b: function(x) {
|
|
2113
|
-
return Math.round(x).toString(2);
|
|
2114
|
-
},
|
|
2115
|
-
c: function(x) {
|
|
2116
|
-
return x + "";
|
|
2117
|
-
},
|
|
2118
|
-
d: formatDecimal,
|
|
2119
|
-
e: function(x, p) {
|
|
2120
|
-
return x.toExponential(p);
|
|
2121
|
-
},
|
|
2122
|
-
f: function(x, p) {
|
|
2123
|
-
return x.toFixed(p);
|
|
2124
|
-
},
|
|
2125
|
-
g: function(x, p) {
|
|
2126
|
-
return x.toPrecision(p);
|
|
2127
|
-
},
|
|
2128
|
-
o: function(x) {
|
|
2129
|
-
return Math.round(x).toString(8);
|
|
2130
|
-
},
|
|
2131
|
-
p: function(x, p) {
|
|
2132
|
-
return formatRounded(x * 100, p);
|
|
2133
|
-
},
|
|
2134
|
-
r: formatRounded,
|
|
2135
|
-
s: formatPrefixAuto,
|
|
2136
|
-
X: function(x) {
|
|
2137
|
-
return Math.round(x).toString(16).toUpperCase();
|
|
2138
|
-
},
|
|
2139
|
-
x: function(x) {
|
|
2140
|
-
return Math.round(x).toString(16);
|
|
2141
|
-
}
|
|
2142
|
-
};
|
|
2143
|
-
function identity(x) {
|
|
2144
|
-
return x;
|
|
2145
|
-
}
|
|
2146
|
-
var map = Array.prototype.map, prefixes = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
2147
|
-
function formatLocale$1(locale2) {
|
|
2148
|
-
var group = locale2.grouping === void 0 || locale2.thousands === void 0 ? identity : formatGroup(map.call(locale2.grouping, Number), locale2.thousands + ""), currencyPrefix = locale2.currency === void 0 ? "" : locale2.currency[0] + "", currencySuffix = locale2.currency === void 0 ? "" : locale2.currency[1] + "", decimal = locale2.decimal + "", numerals = locale2.numerals === void 0 ? identity : formatNumerals(map.call(locale2.numerals, String)), percent = locale2.percent === void 0 ? "%" : locale2.percent + "", minus = locale2.minus + "", nan = locale2.nan === void 0 ? "NaN" : locale2.nan + "";
|
|
2149
|
-
function newFormat(specifier) {
|
|
2150
|
-
specifier = formatSpecifier(specifier);
|
|
2151
|
-
var fill = specifier.fill, align = specifier.align, sign = specifier.sign, symbol = specifier.symbol, zero = specifier.zero, width = specifier.width, comma = specifier.comma, precision = specifier.precision, trim = specifier.trim, type = specifier.type;
|
|
2152
|
-
type === "n" ? (comma = !0, type = "g") : formatTypes[type] || (precision === void 0 && (precision = 12), trim = !0, type = "g"), (zero || fill === "0" && align === "=") && (zero = !0, fill = "0", align = "=");
|
|
2153
|
-
var prefix = symbol === "$" ? currencyPrefix : symbol === "#" && /[boxX]/.test(type) ? "0" + type.toLowerCase() : "", suffix = symbol === "$" ? currencySuffix : /[%p]/.test(type) ? percent : "", formatType = formatTypes[type], maybeSuffix = /[defgprs%]/.test(type);
|
|
2154
|
-
precision = precision === void 0 ? 6 : /[gprs]/.test(type) ? Math.max(1, Math.min(21, precision)) : Math.max(0, Math.min(20, precision));
|
|
2155
|
-
function format2(value) {
|
|
2156
|
-
var valuePrefix = prefix, valueSuffix = suffix, i, n, c;
|
|
2157
|
-
if (type === "c")
|
|
2158
|
-
valueSuffix = formatType(value) + valueSuffix, value = "";
|
|
2159
|
-
else {
|
|
2160
|
-
value = +value;
|
|
2161
|
-
var valueNegative = value < 0 || 1 / value < 0;
|
|
2162
|
-
if (value = isNaN(value) ? nan : formatType(Math.abs(value), precision), trim && (value = formatTrim(value)), valueNegative && +value == 0 && sign !== "+" && (valueNegative = !1), valuePrefix = (valueNegative ? sign === "(" ? sign : minus : sign === "-" || sign === "(" ? "" : sign) + valuePrefix, valueSuffix = (type === "s" ? prefixes[8 + prefixExponent / 3] : "") + valueSuffix + (valueNegative && sign === "(" ? ")" : ""), maybeSuffix) {
|
|
2163
|
-
for (i = -1, n = value.length; ++i < n; )
|
|
2164
|
-
if (c = value.charCodeAt(i), 48 > c || c > 57) {
|
|
2165
|
-
valueSuffix = (c === 46 ? decimal + value.slice(i + 1) : value.slice(i)) + valueSuffix, value = value.slice(0, i);
|
|
2166
|
-
break;
|
|
2167
|
-
}
|
|
2168
|
-
}
|
|
2169
|
-
}
|
|
2170
|
-
comma && !zero && (value = group(value, 1 / 0));
|
|
2171
|
-
var length = valuePrefix.length + value.length + valueSuffix.length, padding = length < width ? new Array(width - length + 1).join(fill) : "";
|
|
2172
|
-
switch (comma && zero && (value = group(padding + value, padding.length ? width - valueSuffix.length : 1 / 0), padding = ""), align) {
|
|
2173
|
-
case "<":
|
|
2174
|
-
value = valuePrefix + value + valueSuffix + padding;
|
|
2175
|
-
break;
|
|
2176
|
-
case "=":
|
|
2177
|
-
value = valuePrefix + padding + value + valueSuffix;
|
|
2178
|
-
break;
|
|
2179
|
-
case "^":
|
|
2180
|
-
value = padding.slice(0, length = padding.length >> 1) + valuePrefix + value + valueSuffix + padding.slice(length);
|
|
2181
|
-
break;
|
|
2182
|
-
default:
|
|
2183
|
-
value = padding + valuePrefix + value + valueSuffix;
|
|
2184
|
-
break;
|
|
2185
|
-
}
|
|
2186
|
-
return numerals(value);
|
|
2187
|
-
}
|
|
2188
|
-
return format2.toString = function() {
|
|
2189
|
-
return specifier + "";
|
|
2190
|
-
}, format2;
|
|
2191
|
-
}
|
|
2192
|
-
function formatPrefix(specifier, value) {
|
|
2193
|
-
var f = newFormat((specifier = formatSpecifier(specifier), specifier.type = "f", specifier)), e = Math.max(-8, Math.min(8, Math.floor(exponent(value) / 3))) * 3, k = Math.pow(10, -e), prefix = prefixes[8 + e / 3];
|
|
2194
|
-
return function(value2) {
|
|
2195
|
-
return f(k * value2) + prefix;
|
|
2196
|
-
};
|
|
2197
|
-
}
|
|
2198
|
-
return {
|
|
2199
|
-
format: newFormat,
|
|
2200
|
-
formatPrefix
|
|
2201
|
-
};
|
|
2202
|
-
}
|
|
2203
|
-
var locale$1, format;
|
|
2204
|
-
defaultLocale$1({
|
|
2205
|
-
decimal: ".",
|
|
2206
|
-
thousands: ",",
|
|
2207
|
-
grouping: [3],
|
|
2208
|
-
currency: ["$", ""],
|
|
2209
|
-
minus: "-"
|
|
2210
|
-
});
|
|
2211
|
-
function defaultLocale$1(definition) {
|
|
2212
|
-
return locale$1 = formatLocale$1(definition), format = locale$1.format, locale$1.formatPrefix, locale$1;
|
|
2213
|
-
}
|
|
2214
|
-
var t0 = /* @__PURE__ */ new Date(), t1 = /* @__PURE__ */ new Date();
|
|
2215
|
-
function newInterval(floori, offseti, count, field) {
|
|
2216
|
-
function interval(date) {
|
|
2217
|
-
return floori(date = arguments.length === 0 ? /* @__PURE__ */ new Date() : /* @__PURE__ */ new Date(+date)), date;
|
|
2218
|
-
}
|
|
2219
|
-
return interval.floor = function(date) {
|
|
2220
|
-
return floori(date = /* @__PURE__ */ new Date(+date)), date;
|
|
2221
|
-
}, interval.ceil = function(date) {
|
|
2222
|
-
return floori(date = new Date(date - 1)), offseti(date, 1), floori(date), date;
|
|
2223
|
-
}, interval.round = function(date) {
|
|
2224
|
-
var d0 = interval(date), d1 = interval.ceil(date);
|
|
2225
|
-
return date - d0 < d1 - date ? d0 : d1;
|
|
2226
|
-
}, interval.offset = function(date, step) {
|
|
2227
|
-
return offseti(date = /* @__PURE__ */ new Date(+date), step == null ? 1 : Math.floor(step)), date;
|
|
2228
|
-
}, interval.range = function(start, stop, step) {
|
|
2229
|
-
var range = [], previous;
|
|
2230
|
-
if (start = interval.ceil(start), step = step == null ? 1 : Math.floor(step), !(start < stop) || !(step > 0)) return range;
|
|
2231
|
-
do
|
|
2232
|
-
range.push(previous = /* @__PURE__ */ new Date(+start)), offseti(start, step), floori(start);
|
|
2233
|
-
while (previous < start && start < stop);
|
|
2234
|
-
return range;
|
|
2235
|
-
}, interval.filter = function(test) {
|
|
2236
|
-
return newInterval(function(date) {
|
|
2237
|
-
if (date >= date) for (; floori(date), !test(date); ) date.setTime(date - 1);
|
|
2238
|
-
}, function(date, step) {
|
|
2239
|
-
if (date >= date)
|
|
2240
|
-
if (step < 0) for (; ++step <= 0; )
|
|
2241
|
-
for (; offseti(date, -1), !test(date); )
|
|
2242
|
-
;
|
|
2243
|
-
else for (; --step >= 0; )
|
|
2244
|
-
for (; offseti(date, 1), !test(date); )
|
|
2245
|
-
;
|
|
2246
|
-
});
|
|
2247
|
-
}, count && (interval.count = function(start, end) {
|
|
2248
|
-
return t0.setTime(+start), t1.setTime(+end), floori(t0), floori(t1), Math.floor(count(t0, t1));
|
|
2249
|
-
}, interval.every = function(step) {
|
|
2250
|
-
return step = Math.floor(step), !isFinite(step) || !(step > 0) ? null : step > 1 ? interval.filter(field ? function(d) {
|
|
2251
|
-
return field(d) % step === 0;
|
|
2252
|
-
} : function(d) {
|
|
2253
|
-
return interval.count(0, d) % step === 0;
|
|
2254
|
-
}) : interval;
|
|
2255
|
-
}), interval;
|
|
2256
|
-
}
|
|
2257
|
-
var durationMinute = 6e4, durationDay = 864e5, durationWeek = 6048e5, day = newInterval(function(date) {
|
|
2258
|
-
date.setHours(0, 0, 0, 0);
|
|
2259
|
-
}, function(date, step) {
|
|
2260
|
-
date.setDate(date.getDate() + step);
|
|
2261
|
-
}, function(start, end) {
|
|
2262
|
-
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationDay;
|
|
2263
|
-
}, function(date) {
|
|
2264
|
-
return date.getDate() - 1;
|
|
2265
|
-
});
|
|
2266
|
-
day.range;
|
|
2267
|
-
function weekday(i) {
|
|
2268
|
-
return newInterval(function(date) {
|
|
2269
|
-
date.setDate(date.getDate() - (date.getDay() + 7 - i) % 7), date.setHours(0, 0, 0, 0);
|
|
2270
|
-
}, function(date, step) {
|
|
2271
|
-
date.setDate(date.getDate() + step * 7);
|
|
2272
|
-
}, function(start, end) {
|
|
2273
|
-
return (end - start - (end.getTimezoneOffset() - start.getTimezoneOffset()) * durationMinute) / durationWeek;
|
|
2274
|
-
});
|
|
2275
|
-
}
|
|
2276
|
-
var sunday = weekday(0), monday = weekday(1), tuesday = weekday(2), wednesday = weekday(3), thursday = weekday(4), friday = weekday(5), saturday = weekday(6);
|
|
2277
|
-
sunday.range;
|
|
2278
|
-
monday.range;
|
|
2279
|
-
tuesday.range;
|
|
2280
|
-
wednesday.range;
|
|
2281
|
-
thursday.range;
|
|
2282
|
-
friday.range;
|
|
2283
|
-
saturday.range;
|
|
2284
|
-
var year = newInterval(function(date) {
|
|
2285
|
-
date.setMonth(0, 1), date.setHours(0, 0, 0, 0);
|
|
2286
|
-
}, function(date, step) {
|
|
2287
|
-
date.setFullYear(date.getFullYear() + step);
|
|
2288
|
-
}, function(start, end) {
|
|
2289
|
-
return end.getFullYear() - start.getFullYear();
|
|
2290
|
-
}, function(date) {
|
|
2291
|
-
return date.getFullYear();
|
|
2292
|
-
});
|
|
2293
|
-
year.every = function(k) {
|
|
2294
|
-
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
|
|
2295
|
-
date.setFullYear(Math.floor(date.getFullYear() / k) * k), date.setMonth(0, 1), date.setHours(0, 0, 0, 0);
|
|
2296
|
-
}, function(date, step) {
|
|
2297
|
-
date.setFullYear(date.getFullYear() + step * k);
|
|
2298
|
-
});
|
|
2299
|
-
};
|
|
2300
|
-
year.range;
|
|
2301
|
-
var utcDay = newInterval(function(date) {
|
|
2302
|
-
date.setUTCHours(0, 0, 0, 0);
|
|
2303
|
-
}, function(date, step) {
|
|
2304
|
-
date.setUTCDate(date.getUTCDate() + step);
|
|
2305
|
-
}, function(start, end) {
|
|
2306
|
-
return (end - start) / durationDay;
|
|
2307
|
-
}, function(date) {
|
|
2308
|
-
return date.getUTCDate() - 1;
|
|
2309
|
-
});
|
|
2310
|
-
utcDay.range;
|
|
2311
|
-
function utcWeekday(i) {
|
|
2312
|
-
return newInterval(function(date) {
|
|
2313
|
-
date.setUTCDate(date.getUTCDate() - (date.getUTCDay() + 7 - i) % 7), date.setUTCHours(0, 0, 0, 0);
|
|
2314
|
-
}, function(date, step) {
|
|
2315
|
-
date.setUTCDate(date.getUTCDate() + step * 7);
|
|
2316
|
-
}, function(start, end) {
|
|
2317
|
-
return (end - start) / durationWeek;
|
|
2318
|
-
});
|
|
2319
|
-
}
|
|
2320
|
-
var utcSunday = utcWeekday(0), utcMonday = utcWeekday(1), utcTuesday = utcWeekday(2), utcWednesday = utcWeekday(3), utcThursday = utcWeekday(4), utcFriday = utcWeekday(5), utcSaturday = utcWeekday(6);
|
|
2321
|
-
utcSunday.range;
|
|
2322
|
-
utcMonday.range;
|
|
2323
|
-
utcTuesday.range;
|
|
2324
|
-
utcWednesday.range;
|
|
2325
|
-
utcThursday.range;
|
|
2326
|
-
utcFriday.range;
|
|
2327
|
-
utcSaturday.range;
|
|
2328
|
-
var utcYear = newInterval(function(date) {
|
|
2329
|
-
date.setUTCMonth(0, 1), date.setUTCHours(0, 0, 0, 0);
|
|
2330
|
-
}, function(date, step) {
|
|
2331
|
-
date.setUTCFullYear(date.getUTCFullYear() + step);
|
|
2332
|
-
}, function(start, end) {
|
|
2333
|
-
return end.getUTCFullYear() - start.getUTCFullYear();
|
|
2334
|
-
}, function(date) {
|
|
2335
|
-
return date.getUTCFullYear();
|
|
2336
|
-
});
|
|
2337
|
-
utcYear.every = function(k) {
|
|
2338
|
-
return !isFinite(k = Math.floor(k)) || !(k > 0) ? null : newInterval(function(date) {
|
|
2339
|
-
date.setUTCFullYear(Math.floor(date.getUTCFullYear() / k) * k), date.setUTCMonth(0, 1), date.setUTCHours(0, 0, 0, 0);
|
|
2340
|
-
}, function(date, step) {
|
|
2341
|
-
date.setUTCFullYear(date.getUTCFullYear() + step * k);
|
|
2342
|
-
});
|
|
2343
|
-
};
|
|
2344
|
-
utcYear.range;
|
|
2345
|
-
function localDate(d) {
|
|
2346
|
-
if (0 <= d.y && d.y < 100) {
|
|
2347
|
-
var date = new Date(-1, d.m, d.d, d.H, d.M, d.S, d.L);
|
|
2348
|
-
return date.setFullYear(d.y), date;
|
|
2349
|
-
}
|
|
2350
|
-
return new Date(d.y, d.m, d.d, d.H, d.M, d.S, d.L);
|
|
2351
|
-
}
|
|
2352
|
-
function utcDate(d) {
|
|
2353
|
-
if (0 <= d.y && d.y < 100) {
|
|
2354
|
-
var date = new Date(Date.UTC(-1, d.m, d.d, d.H, d.M, d.S, d.L));
|
|
2355
|
-
return date.setUTCFullYear(d.y), date;
|
|
2356
|
-
}
|
|
2357
|
-
return new Date(Date.UTC(d.y, d.m, d.d, d.H, d.M, d.S, d.L));
|
|
2358
|
-
}
|
|
2359
|
-
function newDate(y, m, d) {
|
|
2360
|
-
return { y, m, d, H: 0, M: 0, S: 0, L: 0 };
|
|
2361
|
-
}
|
|
2362
|
-
function formatLocale(locale2) {
|
|
2363
|
-
var locale_dateTime = locale2.dateTime, locale_date = locale2.date, locale_time = locale2.time, locale_periods = locale2.periods, locale_weekdays = locale2.days, locale_shortWeekdays = locale2.shortDays, locale_months = locale2.months, locale_shortMonths = locale2.shortMonths, periodRe = formatRe(locale_periods), periodLookup = formatLookup(locale_periods), weekdayRe = formatRe(locale_weekdays), weekdayLookup = formatLookup(locale_weekdays), shortWeekdayRe = formatRe(locale_shortWeekdays), shortWeekdayLookup = formatLookup(locale_shortWeekdays), monthRe = formatRe(locale_months), monthLookup = formatLookup(locale_months), shortMonthRe = formatRe(locale_shortMonths), shortMonthLookup = formatLookup(locale_shortMonths), formats = {
|
|
2364
|
-
a: formatShortWeekday,
|
|
2365
|
-
A: formatWeekday,
|
|
2366
|
-
b: formatShortMonth,
|
|
2367
|
-
B: formatMonth,
|
|
2368
|
-
c: null,
|
|
2369
|
-
d: formatDayOfMonth,
|
|
2370
|
-
e: formatDayOfMonth,
|
|
2371
|
-
f: formatMicroseconds,
|
|
2372
|
-
g: formatYearISO,
|
|
2373
|
-
G: formatFullYearISO,
|
|
2374
|
-
H: formatHour24,
|
|
2375
|
-
I: formatHour12,
|
|
2376
|
-
j: formatDayOfYear,
|
|
2377
|
-
L: formatMilliseconds,
|
|
2378
|
-
m: formatMonthNumber,
|
|
2379
|
-
M: formatMinutes,
|
|
2380
|
-
p: formatPeriod,
|
|
2381
|
-
q: formatQuarter,
|
|
2382
|
-
Q: formatUnixTimestamp,
|
|
2383
|
-
s: formatUnixTimestampSeconds,
|
|
2384
|
-
S: formatSeconds,
|
|
2385
|
-
u: formatWeekdayNumberMonday,
|
|
2386
|
-
U: formatWeekNumberSunday,
|
|
2387
|
-
V: formatWeekNumberISO,
|
|
2388
|
-
w: formatWeekdayNumberSunday,
|
|
2389
|
-
W: formatWeekNumberMonday,
|
|
2390
|
-
x: null,
|
|
2391
|
-
X: null,
|
|
2392
|
-
y: formatYear,
|
|
2393
|
-
Y: formatFullYear,
|
|
2394
|
-
Z: formatZone,
|
|
2395
|
-
"%": formatLiteralPercent
|
|
2396
|
-
}, utcFormats = {
|
|
2397
|
-
a: formatUTCShortWeekday,
|
|
2398
|
-
A: formatUTCWeekday,
|
|
2399
|
-
b: formatUTCShortMonth,
|
|
2400
|
-
B: formatUTCMonth,
|
|
2401
|
-
c: null,
|
|
2402
|
-
d: formatUTCDayOfMonth,
|
|
2403
|
-
e: formatUTCDayOfMonth,
|
|
2404
|
-
f: formatUTCMicroseconds,
|
|
2405
|
-
g: formatUTCYearISO,
|
|
2406
|
-
G: formatUTCFullYearISO,
|
|
2407
|
-
H: formatUTCHour24,
|
|
2408
|
-
I: formatUTCHour12,
|
|
2409
|
-
j: formatUTCDayOfYear,
|
|
2410
|
-
L: formatUTCMilliseconds,
|
|
2411
|
-
m: formatUTCMonthNumber,
|
|
2412
|
-
M: formatUTCMinutes,
|
|
2413
|
-
p: formatUTCPeriod,
|
|
2414
|
-
q: formatUTCQuarter,
|
|
2415
|
-
Q: formatUnixTimestamp,
|
|
2416
|
-
s: formatUnixTimestampSeconds,
|
|
2417
|
-
S: formatUTCSeconds,
|
|
2418
|
-
u: formatUTCWeekdayNumberMonday,
|
|
2419
|
-
U: formatUTCWeekNumberSunday,
|
|
2420
|
-
V: formatUTCWeekNumberISO,
|
|
2421
|
-
w: formatUTCWeekdayNumberSunday,
|
|
2422
|
-
W: formatUTCWeekNumberMonday,
|
|
2423
|
-
x: null,
|
|
2424
|
-
X: null,
|
|
2425
|
-
y: formatUTCYear,
|
|
2426
|
-
Y: formatUTCFullYear,
|
|
2427
|
-
Z: formatUTCZone,
|
|
2428
|
-
"%": formatLiteralPercent
|
|
2429
|
-
}, parses = {
|
|
2430
|
-
a: parseShortWeekday,
|
|
2431
|
-
A: parseWeekday,
|
|
2432
|
-
b: parseShortMonth,
|
|
2433
|
-
B: parseMonth,
|
|
2434
|
-
c: parseLocaleDateTime,
|
|
2435
|
-
d: parseDayOfMonth,
|
|
2436
|
-
e: parseDayOfMonth,
|
|
2437
|
-
f: parseMicroseconds,
|
|
2438
|
-
g: parseYear,
|
|
2439
|
-
G: parseFullYear,
|
|
2440
|
-
H: parseHour24,
|
|
2441
|
-
I: parseHour24,
|
|
2442
|
-
j: parseDayOfYear,
|
|
2443
|
-
L: parseMilliseconds,
|
|
2444
|
-
m: parseMonthNumber,
|
|
2445
|
-
M: parseMinutes,
|
|
2446
|
-
p: parsePeriod,
|
|
2447
|
-
q: parseQuarter,
|
|
2448
|
-
Q: parseUnixTimestamp,
|
|
2449
|
-
s: parseUnixTimestampSeconds,
|
|
2450
|
-
S: parseSeconds,
|
|
2451
|
-
u: parseWeekdayNumberMonday,
|
|
2452
|
-
U: parseWeekNumberSunday,
|
|
2453
|
-
V: parseWeekNumberISO,
|
|
2454
|
-
w: parseWeekdayNumberSunday,
|
|
2455
|
-
W: parseWeekNumberMonday,
|
|
2456
|
-
x: parseLocaleDate,
|
|
2457
|
-
X: parseLocaleTime,
|
|
2458
|
-
y: parseYear,
|
|
2459
|
-
Y: parseFullYear,
|
|
2460
|
-
Z: parseZone,
|
|
2461
|
-
"%": parseLiteralPercent
|
|
2462
|
-
};
|
|
2463
|
-
formats.x = newFormat(locale_date, formats), formats.X = newFormat(locale_time, formats), formats.c = newFormat(locale_dateTime, formats), utcFormats.x = newFormat(locale_date, utcFormats), utcFormats.X = newFormat(locale_time, utcFormats), utcFormats.c = newFormat(locale_dateTime, utcFormats);
|
|
2464
|
-
function newFormat(specifier, formats2) {
|
|
2465
|
-
return function(date) {
|
|
2466
|
-
var string = [], i = -1, j = 0, n = specifier.length, c, pad2, format2;
|
|
2467
|
-
for (date instanceof Date || (date = /* @__PURE__ */ new Date(+date)); ++i < n; )
|
|
2468
|
-
specifier.charCodeAt(i) === 37 && (string.push(specifier.slice(j, i)), (pad2 = pads[c = specifier.charAt(++i)]) != null ? c = specifier.charAt(++i) : pad2 = c === "e" ? " " : "0", (format2 = formats2[c]) && (c = format2(date, pad2)), string.push(c), j = i + 1);
|
|
2469
|
-
return string.push(specifier.slice(j, i)), string.join("");
|
|
2470
|
-
};
|
|
2471
|
-
}
|
|
2472
|
-
function newParse(specifier, Z) {
|
|
2473
|
-
return function(string) {
|
|
2474
|
-
var d = newDate(1900, void 0, 1), i = parseSpecifier(d, specifier, string += "", 0), week, day$1;
|
|
2475
|
-
if (i != string.length) return null;
|
|
2476
|
-
if ("Q" in d) return new Date(d.Q);
|
|
2477
|
-
if ("s" in d) return new Date(d.s * 1e3 + ("L" in d ? d.L : 0));
|
|
2478
|
-
if (Z && !("Z" in d) && (d.Z = 0), "p" in d && (d.H = d.H % 12 + d.p * 12), d.m === void 0 && (d.m = "q" in d ? d.q : 0), "V" in d) {
|
|
2479
|
-
if (d.V < 1 || d.V > 53) return null;
|
|
2480
|
-
"w" in d || (d.w = 1), "Z" in d ? (week = utcDate(newDate(d.y, 0, 1)), day$1 = week.getUTCDay(), week = day$1 > 4 || day$1 === 0 ? utcMonday.ceil(week) : utcMonday(week), week = utcDay.offset(week, (d.V - 1) * 7), d.y = week.getUTCFullYear(), d.m = week.getUTCMonth(), d.d = week.getUTCDate() + (d.w + 6) % 7) : (week = localDate(newDate(d.y, 0, 1)), day$1 = week.getDay(), week = day$1 > 4 || day$1 === 0 ? monday.ceil(week) : monday(week), week = day.offset(week, (d.V - 1) * 7), d.y = week.getFullYear(), d.m = week.getMonth(), d.d = week.getDate() + (d.w + 6) % 7);
|
|
2481
|
-
} else ("W" in d || "U" in d) && ("w" in d || (d.w = "u" in d ? d.u % 7 : "W" in d ? 1 : 0), day$1 = "Z" in d ? utcDate(newDate(d.y, 0, 1)).getUTCDay() : localDate(newDate(d.y, 0, 1)).getDay(), d.m = 0, d.d = "W" in d ? (d.w + 6) % 7 + d.W * 7 - (day$1 + 5) % 7 : d.w + d.U * 7 - (day$1 + 6) % 7);
|
|
2482
|
-
return "Z" in d ? (d.H += d.Z / 100 | 0, d.M += d.Z % 100, utcDate(d)) : localDate(d);
|
|
2483
|
-
};
|
|
2484
|
-
}
|
|
2485
|
-
function parseSpecifier(d, specifier, string, j) {
|
|
2486
|
-
for (var i = 0, n = specifier.length, m = string.length, c, parse; i < n; ) {
|
|
2487
|
-
if (j >= m) return -1;
|
|
2488
|
-
if (c = specifier.charCodeAt(i++), c === 37) {
|
|
2489
|
-
if (c = specifier.charAt(i++), parse = parses[c in pads ? specifier.charAt(i++) : c], !parse || (j = parse(d, string, j)) < 0) return -1;
|
|
2490
|
-
} else if (c != string.charCodeAt(j++))
|
|
2491
|
-
return -1;
|
|
2492
|
-
}
|
|
2493
|
-
return j;
|
|
2494
|
-
}
|
|
2495
|
-
function parsePeriod(d, string, i) {
|
|
2496
|
-
var n = periodRe.exec(string.slice(i));
|
|
2497
|
-
return n ? (d.p = periodLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2498
|
-
}
|
|
2499
|
-
function parseShortWeekday(d, string, i) {
|
|
2500
|
-
var n = shortWeekdayRe.exec(string.slice(i));
|
|
2501
|
-
return n ? (d.w = shortWeekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2502
|
-
}
|
|
2503
|
-
function parseWeekday(d, string, i) {
|
|
2504
|
-
var n = weekdayRe.exec(string.slice(i));
|
|
2505
|
-
return n ? (d.w = weekdayLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2506
|
-
}
|
|
2507
|
-
function parseShortMonth(d, string, i) {
|
|
2508
|
-
var n = shortMonthRe.exec(string.slice(i));
|
|
2509
|
-
return n ? (d.m = shortMonthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2510
|
-
}
|
|
2511
|
-
function parseMonth(d, string, i) {
|
|
2512
|
-
var n = monthRe.exec(string.slice(i));
|
|
2513
|
-
return n ? (d.m = monthLookup[n[0].toLowerCase()], i + n[0].length) : -1;
|
|
2514
|
-
}
|
|
2515
|
-
function parseLocaleDateTime(d, string, i) {
|
|
2516
|
-
return parseSpecifier(d, locale_dateTime, string, i);
|
|
2517
|
-
}
|
|
2518
|
-
function parseLocaleDate(d, string, i) {
|
|
2519
|
-
return parseSpecifier(d, locale_date, string, i);
|
|
2520
|
-
}
|
|
2521
|
-
function parseLocaleTime(d, string, i) {
|
|
2522
|
-
return parseSpecifier(d, locale_time, string, i);
|
|
2523
|
-
}
|
|
2524
|
-
function formatShortWeekday(d) {
|
|
2525
|
-
return locale_shortWeekdays[d.getDay()];
|
|
2526
|
-
}
|
|
2527
|
-
function formatWeekday(d) {
|
|
2528
|
-
return locale_weekdays[d.getDay()];
|
|
2529
|
-
}
|
|
2530
|
-
function formatShortMonth(d) {
|
|
2531
|
-
return locale_shortMonths[d.getMonth()];
|
|
2532
|
-
}
|
|
2533
|
-
function formatMonth(d) {
|
|
2534
|
-
return locale_months[d.getMonth()];
|
|
2535
|
-
}
|
|
2536
|
-
function formatPeriod(d) {
|
|
2537
|
-
return locale_periods[+(d.getHours() >= 12)];
|
|
2538
|
-
}
|
|
2539
|
-
function formatQuarter(d) {
|
|
2540
|
-
return 1 + ~~(d.getMonth() / 3);
|
|
2541
|
-
}
|
|
2542
|
-
function formatUTCShortWeekday(d) {
|
|
2543
|
-
return locale_shortWeekdays[d.getUTCDay()];
|
|
2544
|
-
}
|
|
2545
|
-
function formatUTCWeekday(d) {
|
|
2546
|
-
return locale_weekdays[d.getUTCDay()];
|
|
2547
|
-
}
|
|
2548
|
-
function formatUTCShortMonth(d) {
|
|
2549
|
-
return locale_shortMonths[d.getUTCMonth()];
|
|
2550
|
-
}
|
|
2551
|
-
function formatUTCMonth(d) {
|
|
2552
|
-
return locale_months[d.getUTCMonth()];
|
|
2553
|
-
}
|
|
2554
|
-
function formatUTCPeriod(d) {
|
|
2555
|
-
return locale_periods[+(d.getUTCHours() >= 12)];
|
|
2556
|
-
}
|
|
2557
|
-
function formatUTCQuarter(d) {
|
|
2558
|
-
return 1 + ~~(d.getUTCMonth() / 3);
|
|
2559
|
-
}
|
|
2560
|
-
return {
|
|
2561
|
-
format: function(specifier) {
|
|
2562
|
-
var f = newFormat(specifier += "", formats);
|
|
2563
|
-
return f.toString = function() {
|
|
2564
|
-
return specifier;
|
|
2565
|
-
}, f;
|
|
2566
|
-
},
|
|
2567
|
-
parse: function(specifier) {
|
|
2568
|
-
var p = newParse(specifier += "", !1);
|
|
2569
|
-
return p.toString = function() {
|
|
2570
|
-
return specifier;
|
|
2571
|
-
}, p;
|
|
2572
|
-
},
|
|
2573
|
-
utcFormat: function(specifier) {
|
|
2574
|
-
var f = newFormat(specifier += "", utcFormats);
|
|
2575
|
-
return f.toString = function() {
|
|
2576
|
-
return specifier;
|
|
2577
|
-
}, f;
|
|
2578
|
-
},
|
|
2579
|
-
utcParse: function(specifier) {
|
|
2580
|
-
var p = newParse(specifier += "", !0);
|
|
2581
|
-
return p.toString = function() {
|
|
2582
|
-
return specifier;
|
|
2583
|
-
}, p;
|
|
2584
|
-
}
|
|
2585
|
-
};
|
|
2586
|
-
}
|
|
2587
|
-
var pads = { "-": "", _: " ", 0: "0" }, numberRe = /^\s*\d+/, percentRe = /^%/, requoteRe = /[\\^$*+?|[\]().{}]/g;
|
|
2588
|
-
function pad(value, fill, width) {
|
|
2589
|
-
var sign = value < 0 ? "-" : "", string = (sign ? -value : value) + "", length = string.length;
|
|
2590
|
-
return sign + (length < width ? new Array(width - length + 1).join(fill) + string : string);
|
|
2591
|
-
}
|
|
2592
|
-
function requote(s) {
|
|
2593
|
-
return s.replace(requoteRe, "\\$&");
|
|
2594
|
-
}
|
|
2595
|
-
function formatRe(names) {
|
|
2596
|
-
return new RegExp("^(?:" + names.map(requote).join("|") + ")", "i");
|
|
2597
|
-
}
|
|
2598
|
-
function formatLookup(names) {
|
|
2599
|
-
for (var map2 = {}, i = -1, n = names.length; ++i < n; ) map2[names[i].toLowerCase()] = i;
|
|
2600
|
-
return map2;
|
|
2601
|
-
}
|
|
2602
|
-
function parseWeekdayNumberSunday(d, string, i) {
|
|
2603
|
-
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2604
|
-
return n ? (d.w = +n[0], i + n[0].length) : -1;
|
|
2605
|
-
}
|
|
2606
|
-
function parseWeekdayNumberMonday(d, string, i) {
|
|
2607
|
-
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2608
|
-
return n ? (d.u = +n[0], i + n[0].length) : -1;
|
|
2609
|
-
}
|
|
2610
|
-
function parseWeekNumberSunday(d, string, i) {
|
|
2611
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2612
|
-
return n ? (d.U = +n[0], i + n[0].length) : -1;
|
|
2613
|
-
}
|
|
2614
|
-
function parseWeekNumberISO(d, string, i) {
|
|
2615
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2616
|
-
return n ? (d.V = +n[0], i + n[0].length) : -1;
|
|
2617
|
-
}
|
|
2618
|
-
function parseWeekNumberMonday(d, string, i) {
|
|
2619
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2620
|
-
return n ? (d.W = +n[0], i + n[0].length) : -1;
|
|
2621
|
-
}
|
|
2622
|
-
function parseFullYear(d, string, i) {
|
|
2623
|
-
var n = numberRe.exec(string.slice(i, i + 4));
|
|
2624
|
-
return n ? (d.y = +n[0], i + n[0].length) : -1;
|
|
2625
|
-
}
|
|
2626
|
-
function parseYear(d, string, i) {
|
|
2627
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2628
|
-
return n ? (d.y = +n[0] + (+n[0] > 68 ? 1900 : 2e3), i + n[0].length) : -1;
|
|
2629
|
-
}
|
|
2630
|
-
function parseZone(d, string, i) {
|
|
2631
|
-
var n = /^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(string.slice(i, i + 6));
|
|
2632
|
-
return n ? (d.Z = n[1] ? 0 : -(n[2] + (n[3] || "00")), i + n[0].length) : -1;
|
|
2633
|
-
}
|
|
2634
|
-
function parseQuarter(d, string, i) {
|
|
2635
|
-
var n = numberRe.exec(string.slice(i, i + 1));
|
|
2636
|
-
return n ? (d.q = n[0] * 3 - 3, i + n[0].length) : -1;
|
|
2637
|
-
}
|
|
2638
|
-
function parseMonthNumber(d, string, i) {
|
|
2639
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2640
|
-
return n ? (d.m = n[0] - 1, i + n[0].length) : -1;
|
|
2641
|
-
}
|
|
2642
|
-
function parseDayOfMonth(d, string, i) {
|
|
2643
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2644
|
-
return n ? (d.d = +n[0], i + n[0].length) : -1;
|
|
2645
|
-
}
|
|
2646
|
-
function parseDayOfYear(d, string, i) {
|
|
2647
|
-
var n = numberRe.exec(string.slice(i, i + 3));
|
|
2648
|
-
return n ? (d.m = 0, d.d = +n[0], i + n[0].length) : -1;
|
|
2649
|
-
}
|
|
2650
|
-
function parseHour24(d, string, i) {
|
|
2651
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2652
|
-
return n ? (d.H = +n[0], i + n[0].length) : -1;
|
|
2653
|
-
}
|
|
2654
|
-
function parseMinutes(d, string, i) {
|
|
2655
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2656
|
-
return n ? (d.M = +n[0], i + n[0].length) : -1;
|
|
2657
|
-
}
|
|
2658
|
-
function parseSeconds(d, string, i) {
|
|
2659
|
-
var n = numberRe.exec(string.slice(i, i + 2));
|
|
2660
|
-
return n ? (d.S = +n[0], i + n[0].length) : -1;
|
|
2661
|
-
}
|
|
2662
|
-
function parseMilliseconds(d, string, i) {
|
|
2663
|
-
var n = numberRe.exec(string.slice(i, i + 3));
|
|
2664
|
-
return n ? (d.L = +n[0], i + n[0].length) : -1;
|
|
2665
|
-
}
|
|
2666
|
-
function parseMicroseconds(d, string, i) {
|
|
2667
|
-
var n = numberRe.exec(string.slice(i, i + 6));
|
|
2668
|
-
return n ? (d.L = Math.floor(n[0] / 1e3), i + n[0].length) : -1;
|
|
2669
|
-
}
|
|
2670
|
-
function parseLiteralPercent(d, string, i) {
|
|
2671
|
-
var n = percentRe.exec(string.slice(i, i + 1));
|
|
2672
|
-
return n ? i + n[0].length : -1;
|
|
2673
|
-
}
|
|
2674
|
-
function parseUnixTimestamp(d, string, i) {
|
|
2675
|
-
var n = numberRe.exec(string.slice(i));
|
|
2676
|
-
return n ? (d.Q = +n[0], i + n[0].length) : -1;
|
|
2677
|
-
}
|
|
2678
|
-
function parseUnixTimestampSeconds(d, string, i) {
|
|
2679
|
-
var n = numberRe.exec(string.slice(i));
|
|
2680
|
-
return n ? (d.s = +n[0], i + n[0].length) : -1;
|
|
2681
|
-
}
|
|
2682
|
-
function formatDayOfMonth(d, p) {
|
|
2683
|
-
return pad(d.getDate(), p, 2);
|
|
2684
|
-
}
|
|
2685
|
-
function formatHour24(d, p) {
|
|
2686
|
-
return pad(d.getHours(), p, 2);
|
|
2687
|
-
}
|
|
2688
|
-
function formatHour12(d, p) {
|
|
2689
|
-
return pad(d.getHours() % 12 || 12, p, 2);
|
|
2690
|
-
}
|
|
2691
|
-
function formatDayOfYear(d, p) {
|
|
2692
|
-
return pad(1 + day.count(year(d), d), p, 3);
|
|
2693
|
-
}
|
|
2694
|
-
function formatMilliseconds(d, p) {
|
|
2695
|
-
return pad(d.getMilliseconds(), p, 3);
|
|
2696
|
-
}
|
|
2697
|
-
function formatMicroseconds(d, p) {
|
|
2698
|
-
return formatMilliseconds(d, p) + "000";
|
|
2699
|
-
}
|
|
2700
|
-
function formatMonthNumber(d, p) {
|
|
2701
|
-
return pad(d.getMonth() + 1, p, 2);
|
|
2702
|
-
}
|
|
2703
|
-
function formatMinutes(d, p) {
|
|
2704
|
-
return pad(d.getMinutes(), p, 2);
|
|
2705
|
-
}
|
|
2706
|
-
function formatSeconds(d, p) {
|
|
2707
|
-
return pad(d.getSeconds(), p, 2);
|
|
2708
|
-
}
|
|
2709
|
-
function formatWeekdayNumberMonday(d) {
|
|
2710
|
-
var day2 = d.getDay();
|
|
2711
|
-
return day2 === 0 ? 7 : day2;
|
|
2712
|
-
}
|
|
2713
|
-
function formatWeekNumberSunday(d, p) {
|
|
2714
|
-
return pad(sunday.count(year(d) - 1, d), p, 2);
|
|
2715
|
-
}
|
|
2716
|
-
function dISO(d) {
|
|
2717
|
-
var day2 = d.getDay();
|
|
2718
|
-
return day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d);
|
|
2719
|
-
}
|
|
2720
|
-
function formatWeekNumberISO(d, p) {
|
|
2721
|
-
return d = dISO(d), pad(thursday.count(year(d), d) + (year(d).getDay() === 4), p, 2);
|
|
2722
|
-
}
|
|
2723
|
-
function formatWeekdayNumberSunday(d) {
|
|
2724
|
-
return d.getDay();
|
|
2725
|
-
}
|
|
2726
|
-
function formatWeekNumberMonday(d, p) {
|
|
2727
|
-
return pad(monday.count(year(d) - 1, d), p, 2);
|
|
2728
|
-
}
|
|
2729
|
-
function formatYear(d, p) {
|
|
2730
|
-
return pad(d.getFullYear() % 100, p, 2);
|
|
2731
|
-
}
|
|
2732
|
-
function formatYearISO(d, p) {
|
|
2733
|
-
return d = dISO(d), pad(d.getFullYear() % 100, p, 2);
|
|
2734
|
-
}
|
|
2735
|
-
function formatFullYear(d, p) {
|
|
2736
|
-
return pad(d.getFullYear() % 1e4, p, 4);
|
|
2737
|
-
}
|
|
2738
|
-
function formatFullYearISO(d, p) {
|
|
2739
|
-
var day2 = d.getDay();
|
|
2740
|
-
return d = day2 >= 4 || day2 === 0 ? thursday(d) : thursday.ceil(d), pad(d.getFullYear() % 1e4, p, 4);
|
|
2741
|
-
}
|
|
2742
|
-
function formatZone(d) {
|
|
2743
|
-
var z = d.getTimezoneOffset();
|
|
2744
|
-
return (z > 0 ? "-" : (z *= -1, "+")) + pad(z / 60 | 0, "0", 2) + pad(z % 60, "0", 2);
|
|
2745
|
-
}
|
|
2746
|
-
function formatUTCDayOfMonth(d, p) {
|
|
2747
|
-
return pad(d.getUTCDate(), p, 2);
|
|
2748
|
-
}
|
|
2749
|
-
function formatUTCHour24(d, p) {
|
|
2750
|
-
return pad(d.getUTCHours(), p, 2);
|
|
2751
|
-
}
|
|
2752
|
-
function formatUTCHour12(d, p) {
|
|
2753
|
-
return pad(d.getUTCHours() % 12 || 12, p, 2);
|
|
2754
|
-
}
|
|
2755
|
-
function formatUTCDayOfYear(d, p) {
|
|
2756
|
-
return pad(1 + utcDay.count(utcYear(d), d), p, 3);
|
|
2757
|
-
}
|
|
2758
|
-
function formatUTCMilliseconds(d, p) {
|
|
2759
|
-
return pad(d.getUTCMilliseconds(), p, 3);
|
|
2760
|
-
}
|
|
2761
|
-
function formatUTCMicroseconds(d, p) {
|
|
2762
|
-
return formatUTCMilliseconds(d, p) + "000";
|
|
2763
|
-
}
|
|
2764
|
-
function formatUTCMonthNumber(d, p) {
|
|
2765
|
-
return pad(d.getUTCMonth() + 1, p, 2);
|
|
2766
|
-
}
|
|
2767
|
-
function formatUTCMinutes(d, p) {
|
|
2768
|
-
return pad(d.getUTCMinutes(), p, 2);
|
|
2769
|
-
}
|
|
2770
|
-
function formatUTCSeconds(d, p) {
|
|
2771
|
-
return pad(d.getUTCSeconds(), p, 2);
|
|
2772
|
-
}
|
|
2773
|
-
function formatUTCWeekdayNumberMonday(d) {
|
|
2774
|
-
var dow = d.getUTCDay();
|
|
2775
|
-
return dow === 0 ? 7 : dow;
|
|
2776
|
-
}
|
|
2777
|
-
function formatUTCWeekNumberSunday(d, p) {
|
|
2778
|
-
return pad(utcSunday.count(utcYear(d) - 1, d), p, 2);
|
|
2779
|
-
}
|
|
2780
|
-
function UTCdISO(d) {
|
|
2781
|
-
var day2 = d.getUTCDay();
|
|
2782
|
-
return day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d);
|
|
2783
|
-
}
|
|
2784
|
-
function formatUTCWeekNumberISO(d, p) {
|
|
2785
|
-
return d = UTCdISO(d), pad(utcThursday.count(utcYear(d), d) + (utcYear(d).getUTCDay() === 4), p, 2);
|
|
2786
|
-
}
|
|
2787
|
-
function formatUTCWeekdayNumberSunday(d) {
|
|
2788
|
-
return d.getUTCDay();
|
|
2789
|
-
}
|
|
2790
|
-
function formatUTCWeekNumberMonday(d, p) {
|
|
2791
|
-
return pad(utcMonday.count(utcYear(d) - 1, d), p, 2);
|
|
2792
|
-
}
|
|
2793
|
-
function formatUTCYear(d, p) {
|
|
2794
|
-
return pad(d.getUTCFullYear() % 100, p, 2);
|
|
2795
|
-
}
|
|
2796
|
-
function formatUTCYearISO(d, p) {
|
|
2797
|
-
return d = UTCdISO(d), pad(d.getUTCFullYear() % 100, p, 2);
|
|
2798
|
-
}
|
|
2799
|
-
function formatUTCFullYear(d, p) {
|
|
2800
|
-
return pad(d.getUTCFullYear() % 1e4, p, 4);
|
|
2801
|
-
}
|
|
2802
|
-
function formatUTCFullYearISO(d, p) {
|
|
2803
|
-
var day2 = d.getUTCDay();
|
|
2804
|
-
return d = day2 >= 4 || day2 === 0 ? utcThursday(d) : utcThursday.ceil(d), pad(d.getUTCFullYear() % 1e4, p, 4);
|
|
2805
|
-
}
|
|
2806
|
-
function formatUTCZone() {
|
|
2807
|
-
return "+0000";
|
|
2808
|
-
}
|
|
2809
|
-
function formatLiteralPercent() {
|
|
2810
|
-
return "%";
|
|
2811
|
-
}
|
|
2812
|
-
function formatUnixTimestamp(d) {
|
|
2813
|
-
return +d;
|
|
2814
|
-
}
|
|
2815
|
-
function formatUnixTimestampSeconds(d) {
|
|
2816
|
-
return Math.floor(+d / 1e3);
|
|
2817
|
-
}
|
|
2818
|
-
var locale, utcFormat, utcParse;
|
|
2819
|
-
defaultLocale({
|
|
2820
|
-
dateTime: "%x, %X",
|
|
2821
|
-
date: "%-m/%-d/%Y",
|
|
2822
|
-
time: "%-I:%M:%S %p",
|
|
2823
|
-
periods: ["AM", "PM"],
|
|
2824
|
-
days: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
|
|
2825
|
-
shortDays: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
|
|
2826
|
-
months: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
|
|
2827
|
-
shortMonths: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"]
|
|
2828
|
-
});
|
|
2829
|
-
function defaultLocale(definition) {
|
|
2830
|
-
return locale = formatLocale(definition), locale.format, locale.parse, utcFormat = locale.utcFormat, utcParse = locale.utcParse, locale;
|
|
2831
|
-
}
|
|
2832
1976
|
class ECLGraph extends StateObject {
|
|
2833
1977
|
constructor(wu, eclGraph, eclTimers) {
|
|
2834
1978
|
super();
|
|
@@ -3591,7 +2735,7 @@ function formatValues(item, key, dedup) {
|
|
|
3591
2735
|
const keyParts = splitMetric(key);
|
|
3592
2736
|
if (!dedup[keyParts.measure]) {
|
|
3593
2737
|
dedup[keyParts.label] = !0;
|
|
3594
|
-
const avg = safeParseFloat(item[`${keyParts.measure}Avg${keyParts.label}`]), min = safeParseFloat(item[`${keyParts.measure}Min${keyParts.label}`]),
|
|
2738
|
+
const avg = safeParseFloat(item[`${keyParts.measure}Avg${keyParts.label}`]), min = safeParseFloat(item[`${keyParts.measure}Min${keyParts.label}`]), max2 = safeParseFloat(item[`${keyParts.measure}Max${keyParts.label}`]), stdDev = safeParseFloat(item[`${keyParts.measure}StdDev${keyParts.label}`]), StdDevs = Math.max((avg - min) / stdDev, (max2 - avg) / stdDev);
|
|
3595
2739
|
return {
|
|
3596
2740
|
Key: `${keyParts.measure}${keyParts.label}`,
|
|
3597
2741
|
Value: formatValue(item, `${keyParts.measure}${keyParts.label}`),
|