@altimateai/ui-components 0.0.58-beta.1 → 0.0.59
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/CoachForm.js +23701 -37056
- package/dist/Stack.js +7 -7
- package/dist/Switch.js +1 -1
- package/dist/TagsInput.js +493 -495
- package/dist/_basePickBy.js +151 -0
- package/dist/_baseUniq.js +615 -0
- package/dist/arc.js +83 -0
- package/dist/architecture-U656AL7Q.js +5 -0
- package/dist/architectureDiagram-VXUJARFQ.js +4666 -0
- package/dist/assets/icons/index.js +1 -1
- package/dist/blockDiagram-VD42YOAC.js +2266 -0
- package/dist/c4Diagram-YG6GDRKO.js +1582 -0
- package/dist/channel.js +5 -0
- package/dist/chunk-4BX2VUAB.js +9 -0
- package/dist/chunk-55IACEB6.js +9 -0
- package/dist/chunk-B4BG7PRW.js +1377 -0
- package/dist/chunk-DI55MBZ5.js +1382 -0
- package/dist/chunk-FMBD7UC4.js +19 -0
- package/dist/chunk-QN33PNHL.js +20 -0
- package/dist/chunk-QZHKN3VN.js +15 -0
- package/dist/chunk-TZMSLE5B.js +64 -0
- package/dist/classDiagram-2ON5EDUG.js +17 -0
- package/dist/classDiagram-v2-WZHVMYZB.js +17 -0
- package/dist/clone.js +8 -0
- package/dist/cose-bilkent-S5V4N54A.js +2606 -0
- package/dist/cytoscape.esm.js +18731 -0
- package/dist/dagre-6UL2VRFP.js +447 -0
- package/dist/dayjs.min.js +302 -0
- package/dist/defaultLocale.js +171 -0
- package/dist/diagram-PSM6KHXK.js +535 -0
- package/dist/diagram-QEK2KX5R.js +221 -0
- package/dist/diagram-S2PKOQOG.js +143 -0
- package/dist/erDiagram-Q2GNP2WA.js +843 -0
- package/dist/flowDiagram-NV44I4VS.js +1628 -0
- package/dist/ganttDiagram-LVOFAZNH.js +2500 -0
- package/dist/gitGraph-F6HP7TQM.js +5 -0
- package/dist/gitGraphDiagram-NY62KEGX.js +713 -0
- package/dist/graph.js +247 -0
- package/dist/index.js +30 -30
- package/dist/index2.js +36 -36
- package/dist/info-NVLQJR56.js +5 -0
- package/dist/infoDiagram-F6ZHWCRC.js +24 -0
- package/dist/init.js +16 -0
- package/dist/journeyDiagram-XKPGCS4Q.js +837 -0
- package/dist/kanban-definition-3W4ZIXB7.js +720 -0
- package/dist/katex.js +11691 -0
- package/dist/layout.js +1324 -0
- package/dist/lineage/index.js +13 -13
- package/dist/linear.js +259 -0
- package/dist/main.js +4 -4
- package/dist/mermaid-parser.core.js +12921 -0
- package/dist/mindmap-definition-VGOIOE7T.js +786 -0
- package/dist/ordinal.js +61 -0
- package/dist/packet-BFZMPI3H.js +5 -0
- package/dist/pie-7BOR55EZ.js +5 -0
- package/dist/pieDiagram-ADFJNKIX.js +163 -0
- package/dist/quadrantDiagram-AYHSOK5B.js +1025 -0
- package/dist/radar-NHE76QYJ.js +5 -0
- package/dist/redux-toolkit.modern.js +1138 -1420
- package/dist/requirementDiagram-UZGBJVZJ.js +852 -0
- package/dist/sankeyDiagram-TZEHDZUN.js +811 -0
- package/dist/sequenceDiagram-WL72ISMW.js +2523 -0
- package/dist/shadcn/index.d.ts +1 -0
- package/dist/shadcn/index.js +2 -2
- package/dist/stateDiagram-FKZM4ZOC.js +264 -0
- package/dist/stateDiagram-v2-4FDKWEC3.js +17 -0
- package/dist/timeline-definition-IT6M3QCI.js +802 -0
- package/dist/treemap-KMMF4GRG.js +5 -0
- package/dist/xychartDiagram-PRI3JC2R.js +1341 -0
- package/package.json +1 -1
- package/dist/Table.js +0 -22
- package/dist/flowchart-elk-definition-170a3958.js +0 -46393
- package/dist/is_dark.js +0 -8
- package/dist/mindmap-definition-44684416.js +0 -20514
- package/dist/timeline-definition-8e5a9bc6.js +0 -825
|
@@ -0,0 +1,302 @@
|
|
|
1
|
+
import { j as R } from "./index2.js";
|
|
2
|
+
import { forwardRef as q } from "react";
|
|
3
|
+
import { f as B } from "./Stack.js";
|
|
4
|
+
import { c as tt, g as et } from "./redux-toolkit.modern.js";
|
|
5
|
+
const nt = q(
|
|
6
|
+
({ className: T, isOpen: H = !1, children: v, ...g }, L) => H ? /* @__PURE__ */ R.jsx("div", { ref: L, className: B("al-transition-all", T), ...g, children: v }) : null
|
|
7
|
+
);
|
|
8
|
+
nt.displayName = "Collapse";
|
|
9
|
+
const rt = q(
|
|
10
|
+
({ className: T, ...H }, v) => /* @__PURE__ */ R.jsx(
|
|
11
|
+
"table",
|
|
12
|
+
{
|
|
13
|
+
ref: v,
|
|
14
|
+
className: B("al-w-full al-caption-bottom al-text-sm", T),
|
|
15
|
+
...H
|
|
16
|
+
}
|
|
17
|
+
)
|
|
18
|
+
);
|
|
19
|
+
rt.displayName = "Table";
|
|
20
|
+
var G = { exports: {} };
|
|
21
|
+
(function(T, H) {
|
|
22
|
+
(function(v, g) {
|
|
23
|
+
T.exports = g();
|
|
24
|
+
})(tt, function() {
|
|
25
|
+
var v = 1e3, g = 6e4, L = 36e5, F = "millisecond", b = "second", O = "minute", _ = "hour", M = "day", N = "week", m = "month", J = "quarter", p = "year", x = "date", Z = "Invalid Date", P = /^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/, Q = /\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g, K = { name: "en", weekdays: "Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"), months: "January_February_March_April_May_June_July_August_September_October_November_December".split("_"), ordinal: function(s) {
|
|
26
|
+
var n = ["th", "st", "nd", "rd"], t = s % 100;
|
|
27
|
+
return "[" + s + (n[(t - 20) % 10] || n[t] || n[0]) + "]";
|
|
28
|
+
} }, U = function(s, n, t) {
|
|
29
|
+
var r = String(s);
|
|
30
|
+
return !r || r.length >= n ? s : "" + Array(n + 1 - r.length).join(t) + s;
|
|
31
|
+
}, X = { s: U, z: function(s) {
|
|
32
|
+
var n = -s.utcOffset(), t = Math.abs(n), r = Math.floor(t / 60), e = t % 60;
|
|
33
|
+
return (n <= 0 ? "+" : "-") + U(r, 2, "0") + ":" + U(e, 2, "0");
|
|
34
|
+
}, m: function s(n, t) {
|
|
35
|
+
if (n.date() < t.date()) return -s(t, n);
|
|
36
|
+
var r = 12 * (t.year() - n.year()) + (t.month() - n.month()), e = n.clone().add(r, m), i = t - e < 0, a = n.clone().add(r + (i ? -1 : 1), m);
|
|
37
|
+
return +(-(r + (t - e) / (i ? e - a : a - e)) || 0);
|
|
38
|
+
}, a: function(s) {
|
|
39
|
+
return s < 0 ? Math.ceil(s) || 0 : Math.floor(s);
|
|
40
|
+
}, p: function(s) {
|
|
41
|
+
return { M: m, y: p, w: N, d: M, D: x, h: _, m: O, s: b, ms: F, Q: J }[s] || String(s || "").toLowerCase().replace(/s$/, "");
|
|
42
|
+
}, u: function(s) {
|
|
43
|
+
return s === void 0;
|
|
44
|
+
} }, j = "en", D = {};
|
|
45
|
+
D[j] = K;
|
|
46
|
+
var z = "$isDayjsObject", E = function(s) {
|
|
47
|
+
return s instanceof A || !(!s || !s[z]);
|
|
48
|
+
}, W = function s(n, t, r) {
|
|
49
|
+
var e;
|
|
50
|
+
if (!n) return j;
|
|
51
|
+
if (typeof n == "string") {
|
|
52
|
+
var i = n.toLowerCase();
|
|
53
|
+
D[i] && (e = i), t && (D[i] = t, e = i);
|
|
54
|
+
var a = n.split("-");
|
|
55
|
+
if (!e && a.length > 1) return s(a[0]);
|
|
56
|
+
} else {
|
|
57
|
+
var o = n.name;
|
|
58
|
+
D[o] = n, e = o;
|
|
59
|
+
}
|
|
60
|
+
return !r && e && (j = e), e || !r && j;
|
|
61
|
+
}, f = function(s, n) {
|
|
62
|
+
if (E(s)) return s.clone();
|
|
63
|
+
var t = typeof n == "object" ? n : {};
|
|
64
|
+
return t.date = s, t.args = arguments, new A(t);
|
|
65
|
+
}, u = X;
|
|
66
|
+
u.l = W, u.i = E, u.w = function(s, n) {
|
|
67
|
+
return f(s, { locale: n.$L, utc: n.$u, x: n.$x, $offset: n.$offset });
|
|
68
|
+
};
|
|
69
|
+
var A = function() {
|
|
70
|
+
function s(t) {
|
|
71
|
+
this.$L = W(t.locale, null, !0), this.parse(t), this.$x = this.$x || t.x || {}, this[z] = !0;
|
|
72
|
+
}
|
|
73
|
+
var n = s.prototype;
|
|
74
|
+
return n.parse = function(t) {
|
|
75
|
+
this.$d = function(r) {
|
|
76
|
+
var e = r.date, i = r.utc;
|
|
77
|
+
if (e === null) return /* @__PURE__ */ new Date(NaN);
|
|
78
|
+
if (u.u(e)) return /* @__PURE__ */ new Date();
|
|
79
|
+
if (e instanceof Date) return new Date(e);
|
|
80
|
+
if (typeof e == "string" && !/Z$/i.test(e)) {
|
|
81
|
+
var a = e.match(P);
|
|
82
|
+
if (a) {
|
|
83
|
+
var o = a[2] - 1 || 0, c = (a[7] || "0").substring(0, 3);
|
|
84
|
+
return i ? new Date(Date.UTC(a[1], o, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, c)) : new Date(a[1], o, a[3] || 1, a[4] || 0, a[5] || 0, a[6] || 0, c);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
return new Date(e);
|
|
88
|
+
}(t), this.init();
|
|
89
|
+
}, n.init = function() {
|
|
90
|
+
var t = this.$d;
|
|
91
|
+
this.$y = t.getFullYear(), this.$M = t.getMonth(), this.$D = t.getDate(), this.$W = t.getDay(), this.$H = t.getHours(), this.$m = t.getMinutes(), this.$s = t.getSeconds(), this.$ms = t.getMilliseconds();
|
|
92
|
+
}, n.$utils = function() {
|
|
93
|
+
return u;
|
|
94
|
+
}, n.isValid = function() {
|
|
95
|
+
return this.$d.toString() !== Z;
|
|
96
|
+
}, n.isSame = function(t, r) {
|
|
97
|
+
var e = f(t);
|
|
98
|
+
return this.startOf(r) <= e && e <= this.endOf(r);
|
|
99
|
+
}, n.isAfter = function(t, r) {
|
|
100
|
+
return f(t) < this.startOf(r);
|
|
101
|
+
}, n.isBefore = function(t, r) {
|
|
102
|
+
return this.endOf(r) < f(t);
|
|
103
|
+
}, n.$g = function(t, r, e) {
|
|
104
|
+
return u.u(t) ? this[r] : this.set(e, t);
|
|
105
|
+
}, n.unix = function() {
|
|
106
|
+
return Math.floor(this.valueOf() / 1e3);
|
|
107
|
+
}, n.valueOf = function() {
|
|
108
|
+
return this.$d.getTime();
|
|
109
|
+
}, n.startOf = function(t, r) {
|
|
110
|
+
var e = this, i = !!u.u(r) || r, a = u.p(t), o = function(w, d) {
|
|
111
|
+
var y = u.w(e.$u ? Date.UTC(e.$y, d, w) : new Date(e.$y, d, w), e);
|
|
112
|
+
return i ? y : y.endOf(M);
|
|
113
|
+
}, c = function(w, d) {
|
|
114
|
+
return u.w(e.toDate()[w].apply(e.toDate("s"), (i ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(d)), e);
|
|
115
|
+
}, h = this.$W, l = this.$M, $ = this.$D, k = "set" + (this.$u ? "UTC" : "");
|
|
116
|
+
switch (a) {
|
|
117
|
+
case p:
|
|
118
|
+
return i ? o(1, 0) : o(31, 11);
|
|
119
|
+
case m:
|
|
120
|
+
return i ? o(1, l) : o(0, l + 1);
|
|
121
|
+
case N:
|
|
122
|
+
var S = this.$locale().weekStart || 0, Y = (h < S ? h + 7 : h) - S;
|
|
123
|
+
return o(i ? $ - Y : $ + (6 - Y), l);
|
|
124
|
+
case M:
|
|
125
|
+
case x:
|
|
126
|
+
return c(k + "Hours", 0);
|
|
127
|
+
case _:
|
|
128
|
+
return c(k + "Minutes", 1);
|
|
129
|
+
case O:
|
|
130
|
+
return c(k + "Seconds", 2);
|
|
131
|
+
case b:
|
|
132
|
+
return c(k + "Milliseconds", 3);
|
|
133
|
+
default:
|
|
134
|
+
return this.clone();
|
|
135
|
+
}
|
|
136
|
+
}, n.endOf = function(t) {
|
|
137
|
+
return this.startOf(t, !1);
|
|
138
|
+
}, n.$set = function(t, r) {
|
|
139
|
+
var e, i = u.p(t), a = "set" + (this.$u ? "UTC" : ""), o = (e = {}, e[M] = a + "Date", e[x] = a + "Date", e[m] = a + "Month", e[p] = a + "FullYear", e[_] = a + "Hours", e[O] = a + "Minutes", e[b] = a + "Seconds", e[F] = a + "Milliseconds", e)[i], c = i === M ? this.$D + (r - this.$W) : r;
|
|
140
|
+
if (i === m || i === p) {
|
|
141
|
+
var h = this.clone().set(x, 1);
|
|
142
|
+
h.$d[o](c), h.init(), this.$d = h.set(x, Math.min(this.$D, h.daysInMonth())).$d;
|
|
143
|
+
} else o && this.$d[o](c);
|
|
144
|
+
return this.init(), this;
|
|
145
|
+
}, n.set = function(t, r) {
|
|
146
|
+
return this.clone().$set(t, r);
|
|
147
|
+
}, n.get = function(t) {
|
|
148
|
+
return this[u.p(t)]();
|
|
149
|
+
}, n.add = function(t, r) {
|
|
150
|
+
var e, i = this;
|
|
151
|
+
t = Number(t);
|
|
152
|
+
var a = u.p(r), o = function(l) {
|
|
153
|
+
var $ = f(i);
|
|
154
|
+
return u.w($.date($.date() + Math.round(l * t)), i);
|
|
155
|
+
};
|
|
156
|
+
if (a === m) return this.set(m, this.$M + t);
|
|
157
|
+
if (a === p) return this.set(p, this.$y + t);
|
|
158
|
+
if (a === M) return o(1);
|
|
159
|
+
if (a === N) return o(7);
|
|
160
|
+
var c = (e = {}, e[O] = g, e[_] = L, e[b] = v, e)[a] || 1, h = this.$d.getTime() + t * c;
|
|
161
|
+
return u.w(h, this);
|
|
162
|
+
}, n.subtract = function(t, r) {
|
|
163
|
+
return this.add(-1 * t, r);
|
|
164
|
+
}, n.format = function(t) {
|
|
165
|
+
var r = this, e = this.$locale();
|
|
166
|
+
if (!this.isValid()) return e.invalidDate || Z;
|
|
167
|
+
var i = t || "YYYY-MM-DDTHH:mm:ssZ", a = u.z(this), o = this.$H, c = this.$m, h = this.$M, l = e.weekdays, $ = e.months, k = e.meridiem, S = function(d, y, C, I) {
|
|
168
|
+
return d && (d[y] || d(r, i)) || C[y].slice(0, I);
|
|
169
|
+
}, Y = function(d) {
|
|
170
|
+
return u.s(o % 12 || 12, d, "0");
|
|
171
|
+
}, w = k || function(d, y, C) {
|
|
172
|
+
var I = d < 12 ? "AM" : "PM";
|
|
173
|
+
return C ? I.toLowerCase() : I;
|
|
174
|
+
};
|
|
175
|
+
return i.replace(Q, function(d, y) {
|
|
176
|
+
return y || function(C) {
|
|
177
|
+
switch (C) {
|
|
178
|
+
case "YY":
|
|
179
|
+
return String(r.$y).slice(-2);
|
|
180
|
+
case "YYYY":
|
|
181
|
+
return u.s(r.$y, 4, "0");
|
|
182
|
+
case "M":
|
|
183
|
+
return h + 1;
|
|
184
|
+
case "MM":
|
|
185
|
+
return u.s(h + 1, 2, "0");
|
|
186
|
+
case "MMM":
|
|
187
|
+
return S(e.monthsShort, h, $, 3);
|
|
188
|
+
case "MMMM":
|
|
189
|
+
return S($, h);
|
|
190
|
+
case "D":
|
|
191
|
+
return r.$D;
|
|
192
|
+
case "DD":
|
|
193
|
+
return u.s(r.$D, 2, "0");
|
|
194
|
+
case "d":
|
|
195
|
+
return String(r.$W);
|
|
196
|
+
case "dd":
|
|
197
|
+
return S(e.weekdaysMin, r.$W, l, 2);
|
|
198
|
+
case "ddd":
|
|
199
|
+
return S(e.weekdaysShort, r.$W, l, 3);
|
|
200
|
+
case "dddd":
|
|
201
|
+
return l[r.$W];
|
|
202
|
+
case "H":
|
|
203
|
+
return String(o);
|
|
204
|
+
case "HH":
|
|
205
|
+
return u.s(o, 2, "0");
|
|
206
|
+
case "h":
|
|
207
|
+
return Y(1);
|
|
208
|
+
case "hh":
|
|
209
|
+
return Y(2);
|
|
210
|
+
case "a":
|
|
211
|
+
return w(o, c, !0);
|
|
212
|
+
case "A":
|
|
213
|
+
return w(o, c, !1);
|
|
214
|
+
case "m":
|
|
215
|
+
return String(c);
|
|
216
|
+
case "mm":
|
|
217
|
+
return u.s(c, 2, "0");
|
|
218
|
+
case "s":
|
|
219
|
+
return String(r.$s);
|
|
220
|
+
case "ss":
|
|
221
|
+
return u.s(r.$s, 2, "0");
|
|
222
|
+
case "SSS":
|
|
223
|
+
return u.s(r.$ms, 3, "0");
|
|
224
|
+
case "Z":
|
|
225
|
+
return a;
|
|
226
|
+
}
|
|
227
|
+
return null;
|
|
228
|
+
}(d) || a.replace(":", "");
|
|
229
|
+
});
|
|
230
|
+
}, n.utcOffset = function() {
|
|
231
|
+
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
232
|
+
}, n.diff = function(t, r, e) {
|
|
233
|
+
var i, a = this, o = u.p(r), c = f(t), h = (c.utcOffset() - this.utcOffset()) * g, l = this - c, $ = function() {
|
|
234
|
+
return u.m(a, c);
|
|
235
|
+
};
|
|
236
|
+
switch (o) {
|
|
237
|
+
case p:
|
|
238
|
+
i = $() / 12;
|
|
239
|
+
break;
|
|
240
|
+
case m:
|
|
241
|
+
i = $();
|
|
242
|
+
break;
|
|
243
|
+
case J:
|
|
244
|
+
i = $() / 3;
|
|
245
|
+
break;
|
|
246
|
+
case N:
|
|
247
|
+
i = (l - h) / 6048e5;
|
|
248
|
+
break;
|
|
249
|
+
case M:
|
|
250
|
+
i = (l - h) / 864e5;
|
|
251
|
+
break;
|
|
252
|
+
case _:
|
|
253
|
+
i = l / L;
|
|
254
|
+
break;
|
|
255
|
+
case O:
|
|
256
|
+
i = l / g;
|
|
257
|
+
break;
|
|
258
|
+
case b:
|
|
259
|
+
i = l / v;
|
|
260
|
+
break;
|
|
261
|
+
default:
|
|
262
|
+
i = l;
|
|
263
|
+
}
|
|
264
|
+
return e ? i : u.a(i);
|
|
265
|
+
}, n.daysInMonth = function() {
|
|
266
|
+
return this.endOf(m).$D;
|
|
267
|
+
}, n.$locale = function() {
|
|
268
|
+
return D[this.$L];
|
|
269
|
+
}, n.locale = function(t, r) {
|
|
270
|
+
if (!t) return this.$L;
|
|
271
|
+
var e = this.clone(), i = W(t, r, !0);
|
|
272
|
+
return i && (e.$L = i), e;
|
|
273
|
+
}, n.clone = function() {
|
|
274
|
+
return u.w(this.$d, this);
|
|
275
|
+
}, n.toDate = function() {
|
|
276
|
+
return new Date(this.valueOf());
|
|
277
|
+
}, n.toJSON = function() {
|
|
278
|
+
return this.isValid() ? this.toISOString() : null;
|
|
279
|
+
}, n.toISOString = function() {
|
|
280
|
+
return this.$d.toISOString();
|
|
281
|
+
}, n.toString = function() {
|
|
282
|
+
return this.$d.toUTCString();
|
|
283
|
+
}, s;
|
|
284
|
+
}(), V = A.prototype;
|
|
285
|
+
return f.prototype = V, [["$ms", F], ["$s", b], ["$m", O], ["$H", _], ["$W", M], ["$M", m], ["$y", p], ["$D", x]].forEach(function(s) {
|
|
286
|
+
V[s[1]] = function(n) {
|
|
287
|
+
return this.$g(n, s[0], s[1]);
|
|
288
|
+
};
|
|
289
|
+
}), f.extend = function(s, n) {
|
|
290
|
+
return s.$i || (s(n, A, f), s.$i = !0), f;
|
|
291
|
+
}, f.locale = W, f.isDayjs = E, f.unix = function(s) {
|
|
292
|
+
return f(1e3 * s);
|
|
293
|
+
}, f.en = D[j], f.Ls = D, f.p = {}, f;
|
|
294
|
+
});
|
|
295
|
+
})(G);
|
|
296
|
+
var st = G.exports;
|
|
297
|
+
const ct = /* @__PURE__ */ et(st);
|
|
298
|
+
export {
|
|
299
|
+
nt as C,
|
|
300
|
+
rt as T,
|
|
301
|
+
ct as d
|
|
302
|
+
};
|
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
function H(n) {
|
|
2
|
+
return Math.abs(n = Math.round(n)) >= 1e21 ? n.toLocaleString("en").replace(/,/g, "") : n.toString(10);
|
|
3
|
+
}
|
|
4
|
+
function j(n, t) {
|
|
5
|
+
if ((e = (n = t ? n.toExponential(t - 1) : n.toExponential()).indexOf("e")) < 0) return null;
|
|
6
|
+
var e, i = n.slice(0, e);
|
|
7
|
+
return [
|
|
8
|
+
i.length > 1 ? i[0] + i.slice(2) : i,
|
|
9
|
+
+n.slice(e + 1)
|
|
10
|
+
];
|
|
11
|
+
}
|
|
12
|
+
function J(n) {
|
|
13
|
+
return n = j(Math.abs(n)), n ? n[1] : NaN;
|
|
14
|
+
}
|
|
15
|
+
function K(n, t) {
|
|
16
|
+
return function(e, i) {
|
|
17
|
+
for (var o = e.length, f = [], c = 0, u = n[0], p = 0; o > 0 && u > 0 && (p + u + 1 > i && (u = Math.max(1, i - p)), f.push(e.substring(o -= u, o + u)), !((p += u + 1) > i)); )
|
|
18
|
+
u = n[c = (c + 1) % n.length];
|
|
19
|
+
return f.reverse().join(t);
|
|
20
|
+
};
|
|
21
|
+
}
|
|
22
|
+
function Q(n) {
|
|
23
|
+
return function(t) {
|
|
24
|
+
return t.replace(/[0-9]/g, function(e) {
|
|
25
|
+
return n[+e];
|
|
26
|
+
});
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
var V = /^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;
|
|
30
|
+
function N(n) {
|
|
31
|
+
if (!(t = V.exec(n))) throw new Error("invalid format: " + n);
|
|
32
|
+
var t;
|
|
33
|
+
return new $({
|
|
34
|
+
fill: t[1],
|
|
35
|
+
align: t[2],
|
|
36
|
+
sign: t[3],
|
|
37
|
+
symbol: t[4],
|
|
38
|
+
zero: t[5],
|
|
39
|
+
width: t[6],
|
|
40
|
+
comma: t[7],
|
|
41
|
+
precision: t[8] && t[8].slice(1),
|
|
42
|
+
trim: t[9],
|
|
43
|
+
type: t[10]
|
|
44
|
+
});
|
|
45
|
+
}
|
|
46
|
+
N.prototype = $.prototype;
|
|
47
|
+
function $(n) {
|
|
48
|
+
this.fill = n.fill === void 0 ? " " : n.fill + "", this.align = n.align === void 0 ? ">" : n.align + "", this.sign = n.sign === void 0 ? "-" : n.sign + "", this.symbol = n.symbol === void 0 ? "" : n.symbol + "", this.zero = !!n.zero, this.width = n.width === void 0 ? void 0 : +n.width, this.comma = !!n.comma, this.precision = n.precision === void 0 ? void 0 : +n.precision, this.trim = !!n.trim, this.type = n.type === void 0 ? "" : n.type + "";
|
|
49
|
+
}
|
|
50
|
+
$.prototype.toString = function() {
|
|
51
|
+
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;
|
|
52
|
+
};
|
|
53
|
+
function W(n) {
|
|
54
|
+
n: for (var t = n.length, e = 1, i = -1, o; e < t; ++e)
|
|
55
|
+
switch (n[e]) {
|
|
56
|
+
case ".":
|
|
57
|
+
i = o = e;
|
|
58
|
+
break;
|
|
59
|
+
case "0":
|
|
60
|
+
i === 0 && (i = e), o = e;
|
|
61
|
+
break;
|
|
62
|
+
default:
|
|
63
|
+
if (!+n[e]) break n;
|
|
64
|
+
i > 0 && (i = 0);
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
return i > 0 ? n.slice(0, i) + n.slice(o + 1) : n;
|
|
68
|
+
}
|
|
69
|
+
var U;
|
|
70
|
+
function _(n, t) {
|
|
71
|
+
var e = j(n, t);
|
|
72
|
+
if (!e) return n + "";
|
|
73
|
+
var i = e[0], o = e[1], f = o - (U = Math.max(-8, Math.min(8, Math.floor(o / 3))) * 3) + 1, c = i.length;
|
|
74
|
+
return f === c ? i : f > c ? i + new Array(f - c + 1).join("0") : f > 0 ? i.slice(0, f) + "." + i.slice(f) : "0." + new Array(1 - f).join("0") + j(n, Math.max(0, t + f - 1))[0];
|
|
75
|
+
}
|
|
76
|
+
function G(n, t) {
|
|
77
|
+
var e = j(n, t);
|
|
78
|
+
if (!e) return n + "";
|
|
79
|
+
var i = e[0], o = e[1];
|
|
80
|
+
return o < 0 ? "0." + new Array(-o).join("0") + i : i.length > o + 1 ? i.slice(0, o + 1) + "." + i.slice(o + 1) : i + new Array(o - i.length + 2).join("0");
|
|
81
|
+
}
|
|
82
|
+
const I = {
|
|
83
|
+
"%": (n, t) => (n * 100).toFixed(t),
|
|
84
|
+
b: (n) => Math.round(n).toString(2),
|
|
85
|
+
c: (n) => n + "",
|
|
86
|
+
d: H,
|
|
87
|
+
e: (n, t) => n.toExponential(t),
|
|
88
|
+
f: (n, t) => n.toFixed(t),
|
|
89
|
+
g: (n, t) => n.toPrecision(t),
|
|
90
|
+
o: (n) => Math.round(n).toString(8),
|
|
91
|
+
p: (n, t) => G(n * 100, t),
|
|
92
|
+
r: G,
|
|
93
|
+
s: _,
|
|
94
|
+
X: (n) => Math.round(n).toString(16).toUpperCase(),
|
|
95
|
+
x: (n) => Math.round(n).toString(16)
|
|
96
|
+
};
|
|
97
|
+
function X(n) {
|
|
98
|
+
return n;
|
|
99
|
+
}
|
|
100
|
+
var O = Array.prototype.map, R = ["y", "z", "a", "f", "p", "n", "µ", "m", "", "k", "M", "G", "T", "P", "E", "Z", "Y"];
|
|
101
|
+
function v(n) {
|
|
102
|
+
var t = n.grouping === void 0 || n.thousands === void 0 ? X : K(O.call(n.grouping, Number), n.thousands + ""), e = n.currency === void 0 ? "" : n.currency[0] + "", i = n.currency === void 0 ? "" : n.currency[1] + "", o = n.decimal === void 0 ? "." : n.decimal + "", f = n.numerals === void 0 ? X : Q(O.call(n.numerals, String)), c = n.percent === void 0 ? "%" : n.percent + "", u = n.minus === void 0 ? "−" : n.minus + "", p = n.nan === void 0 ? "NaN" : n.nan + "";
|
|
103
|
+
function F(a) {
|
|
104
|
+
a = N(a);
|
|
105
|
+
var x = a.fill, M = a.align, m = a.sign, w = a.symbol, l = a.zero, S = a.width, E = a.comma, g = a.precision, L = a.trim, d = a.type;
|
|
106
|
+
d === "n" ? (E = !0, d = "g") : I[d] || (g === void 0 && (g = 12), L = !0, d = "g"), (l || x === "0" && M === "=") && (l = !0, x = "0", M = "=");
|
|
107
|
+
var Z = w === "$" ? e : w === "#" && /[boxX]/.test(d) ? "0" + d.toLowerCase() : "", q = w === "$" ? i : /[%p]/.test(d) ? c : "", T = I[d], B = /[defgprs%]/.test(d);
|
|
108
|
+
g = g === void 0 ? 6 : /[gprs]/.test(d) ? Math.max(1, Math.min(21, g)) : Math.max(0, Math.min(20, g));
|
|
109
|
+
function C(r) {
|
|
110
|
+
var y = Z, h = q, b, D, k;
|
|
111
|
+
if (d === "c")
|
|
112
|
+
h = T(r) + h, r = "";
|
|
113
|
+
else {
|
|
114
|
+
r = +r;
|
|
115
|
+
var P = r < 0 || 1 / r < 0;
|
|
116
|
+
if (r = isNaN(r) ? p : T(Math.abs(r), g), L && (r = W(r)), P && +r == 0 && m !== "+" && (P = !1), y = (P ? m === "(" ? m : u : m === "-" || m === "(" ? "" : m) + y, h = (d === "s" ? R[8 + U / 3] : "") + h + (P && m === "(" ? ")" : ""), B) {
|
|
117
|
+
for (b = -1, D = r.length; ++b < D; )
|
|
118
|
+
if (k = r.charCodeAt(b), 48 > k || k > 57) {
|
|
119
|
+
h = (k === 46 ? o + r.slice(b + 1) : r.slice(b)) + h, r = r.slice(0, b);
|
|
120
|
+
break;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
E && !l && (r = t(r, 1 / 0));
|
|
125
|
+
var z = y.length + r.length + h.length, s = z < S ? new Array(S - z + 1).join(x) : "";
|
|
126
|
+
switch (E && l && (r = t(s + r, s.length ? S - h.length : 1 / 0), s = ""), M) {
|
|
127
|
+
case "<":
|
|
128
|
+
r = y + r + h + s;
|
|
129
|
+
break;
|
|
130
|
+
case "=":
|
|
131
|
+
r = y + s + r + h;
|
|
132
|
+
break;
|
|
133
|
+
case "^":
|
|
134
|
+
r = s.slice(0, z = s.length >> 1) + y + r + h + s.slice(z);
|
|
135
|
+
break;
|
|
136
|
+
default:
|
|
137
|
+
r = s + y + r + h;
|
|
138
|
+
break;
|
|
139
|
+
}
|
|
140
|
+
return f(r);
|
|
141
|
+
}
|
|
142
|
+
return C.toString = function() {
|
|
143
|
+
return a + "";
|
|
144
|
+
}, C;
|
|
145
|
+
}
|
|
146
|
+
function Y(a, x) {
|
|
147
|
+
var M = F((a = N(a), a.type = "f", a)), m = Math.max(-8, Math.min(8, Math.floor(J(x) / 3))) * 3, w = Math.pow(10, -m), l = R[8 + m / 3];
|
|
148
|
+
return function(S) {
|
|
149
|
+
return M(w * S) + l;
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
format: F,
|
|
154
|
+
formatPrefix: Y
|
|
155
|
+
};
|
|
156
|
+
}
|
|
157
|
+
var A, nn, tn;
|
|
158
|
+
rn({
|
|
159
|
+
thousands: ",",
|
|
160
|
+
grouping: [3],
|
|
161
|
+
currency: ["$", ""]
|
|
162
|
+
});
|
|
163
|
+
function rn(n) {
|
|
164
|
+
return A = v(n), nn = A.format, tn = A.formatPrefix, A;
|
|
165
|
+
}
|
|
166
|
+
export {
|
|
167
|
+
tn as a,
|
|
168
|
+
nn as b,
|
|
169
|
+
J as e,
|
|
170
|
+
N as f
|
|
171
|
+
};
|