@hpcc-js/html 2.44.0 → 3.1.1
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/index.js +92 -1047
- package/dist/index.js.map +7 -1
- package/package.json +31 -35
- package/src/BreakdownTable.ts +5 -5
- package/src/HTMLTooltip.ts +19 -20
- package/src/SimpleTable.ts +1 -2
- package/src/StatsTable.ts +3 -3
- package/src/StyledTable.ts +15 -15
- package/src/TitleBar.ts +5 -2
- package/src/VizComponent.tsx +1 -1
- package/src/VizInstance.tsx +1 -1
- package/src/__package__.ts +2 -2
- package/src/index.ts +11 -11
- package/src/reactD3.ts +3 -3
- package/types/BreakdownTable.d.ts +3 -5
- package/types/HTMLTooltip.d.ts +0 -1
- package/types/JSXWidget.d.ts +0 -1
- package/types/SimpleTable.d.ts +0 -1
- package/types/StatsTable.d.ts +1 -2
- package/types/StyledTable.d.ts +1 -2
- package/types/TitleBar.d.ts +1 -3
- package/types/VizComponent.d.ts +2 -3
- package/types/VizInstance.d.ts +2 -3
- package/types/__package__.d.ts +2 -3
- package/types/index.d.ts +11 -12
- package/types/reactD3.d.ts +0 -1
- package/dist/index.es6.js +0 -1026
- package/dist/index.es6.js.map +0 -1
- package/dist/index.min.js +0 -2
- package/dist/index.min.js.map +0 -1
- package/types/BreakdownTable.d.ts.map +0 -1
- package/types/HTMLTooltip.d.ts.map +0 -1
- package/types/JSXWidget.d.ts.map +0 -1
- package/types/SimpleTable.d.ts.map +0 -1
- package/types/StatsTable.d.ts.map +0 -1
- package/types/StyledTable.d.ts.map +0 -1
- package/types/TitleBar.d.ts.map +0 -1
- package/types/VizComponent.d.ts.map +0 -1
- package/types/VizInstance.d.ts.map +0 -1
- package/types/__package__.d.ts.map +0 -1
- package/types/index.d.ts.map +0 -1
- package/types/reactD3.d.ts.map +0 -1
- package/types-3.4/BreakdownTable.d.ts +0 -49
- package/types-3.4/HTMLTooltip.d.ts +0 -107
- package/types-3.4/JSXWidget.d.ts +0 -9
- package/types-3.4/SimpleTable.d.ts +0 -16
- package/types-3.4/StatsTable.d.ts +0 -30
- package/types-3.4/StyledTable.d.ts +0 -49
- package/types-3.4/TitleBar.d.ts +0 -43
- package/types-3.4/VizComponent.d.ts +0 -10
- package/types-3.4/VizInstance.d.ts +0 -10
- package/types-3.4/__package__.d.ts +0 -4
- package/types-3.4/index.d.ts +0 -12
- package/types-3.4/reactD3.d.ts +0 -31
package/dist/index.js
CHANGED
|
@@ -1,1048 +1,93 @@
|
|
|
1
|
-
(function (global, factory) {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
var PKG_VERSION = "2.44.0";
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
HTMLTooltip.prototype.update = function (domNode, element) {
|
|
94
|
-
var _this = this;
|
|
95
|
-
_super.prototype.update.call(this, domNode, element);
|
|
96
|
-
if (this._contentNode !== this._prevContentNode) {
|
|
97
|
-
var node = this._tooltipElement.node();
|
|
98
|
-
__spreadArray([], node.querySelectorAll("*"), true).map(function (n) { return n.__data__; })
|
|
99
|
-
.filter(function (n) { return n; })
|
|
100
|
-
.forEach(function (w) {
|
|
101
|
-
if (typeof w.target === "function") {
|
|
102
|
-
w.target(null);
|
|
103
|
-
}
|
|
104
|
-
if (typeof w.exit === "function") {
|
|
105
|
-
w.exit();
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
node.innerHTML = "";
|
|
109
|
-
node.appendChild(this._contentNode);
|
|
110
|
-
this._prevContentNode = this._contentNode;
|
|
111
|
-
}
|
|
112
|
-
if (this._contentNode) {
|
|
113
|
-
this.onShowContent(this._contentNode);
|
|
114
|
-
}
|
|
115
|
-
else {
|
|
116
|
-
this._tooltipElement
|
|
117
|
-
.html(function () {
|
|
118
|
-
return _this._tooltipHTMLCallback(_this.data());
|
|
119
|
-
});
|
|
120
|
-
}
|
|
121
|
-
if (this.fitContent()) {
|
|
122
|
-
this._tooltipElement
|
|
123
|
-
.style("width", "auto")
|
|
124
|
-
.style("height", "auto")
|
|
125
|
-
.style("padding", "0px")
|
|
126
|
-
.style("box-sizing", "content-box");
|
|
127
|
-
var rect = this._tooltipElement.node().getBoundingClientRect();
|
|
128
|
-
this.tooltipWidth_default(rect.width);
|
|
129
|
-
this.tooltipHeight_default(rect.height);
|
|
130
|
-
}
|
|
131
|
-
this._closing = false;
|
|
132
|
-
this._tooltipElement
|
|
133
|
-
.style("background-color", this.tooltipColor())
|
|
134
|
-
.style("color", this.fontColor())
|
|
135
|
-
.style("width", this.tooltipWidth() + "px")
|
|
136
|
-
.style("height", this.tooltipHeight() + "px")
|
|
137
|
-
.style("opacity", 1)
|
|
138
|
-
.style("padding", this.padding() + "px")
|
|
139
|
-
.style("pointer-events", this.enablePointerEvents() ? "all" : "none")
|
|
140
|
-
.style("box-sizing", "content-box");
|
|
141
|
-
this._arrowElement
|
|
142
|
-
.style("opacity", 1)
|
|
143
|
-
.style("pointer-events", "none");
|
|
144
|
-
this.updateTooltipPosition();
|
|
145
|
-
};
|
|
146
|
-
HTMLTooltip.prototype.onShowContent = function (node) {
|
|
147
|
-
};
|
|
148
|
-
HTMLTooltip.prototype.updateTooltipPosition = function () {
|
|
149
|
-
var bbox = this.calcReferenceBBox();
|
|
150
|
-
var direction = this.calcTooltipDirection(bbox);
|
|
151
|
-
var box = bbox[direction];
|
|
152
|
-
this._tooltipElement
|
|
153
|
-
.style("top", box.y + "px")
|
|
154
|
-
.style("left", box.x + "px");
|
|
155
|
-
this.setArrowPosition(box, direction);
|
|
156
|
-
return box;
|
|
157
|
-
};
|
|
158
|
-
HTMLTooltip.prototype.calcTooltipDirection = function (bbox) {
|
|
159
|
-
var directions = Object.keys(bbox);
|
|
160
|
-
var defaultDirection = this.direction();
|
|
161
|
-
directions.sort(function (a, b) { return a === defaultDirection ? -1 : 1; });
|
|
162
|
-
var windowRect = {
|
|
163
|
-
top: 0,
|
|
164
|
-
left: 0,
|
|
165
|
-
width: window.innerWidth,
|
|
166
|
-
height: window.innerHeight
|
|
167
|
-
};
|
|
168
|
-
for (var i = 0; i < directions.length; i++) {
|
|
169
|
-
var tooltipRect = {
|
|
170
|
-
top: bbox[directions[i]].y,
|
|
171
|
-
left: bbox[directions[i]].x,
|
|
172
|
-
width: this.tooltipWidth(),
|
|
173
|
-
height: this.tooltipHeight()
|
|
174
|
-
};
|
|
175
|
-
if (this.rectFits(tooltipRect, windowRect)) {
|
|
176
|
-
return directions[i];
|
|
177
|
-
}
|
|
178
|
-
}
|
|
179
|
-
this._logger.warning("Tooltip doesn't fit in the window for any of the directions. Defaulting to '".concat(defaultDirection, "'"));
|
|
180
|
-
this._logger.debug(windowRect);
|
|
181
|
-
this._logger.debug({
|
|
182
|
-
top: bbox[defaultDirection].y,
|
|
183
|
-
left: bbox[defaultDirection].x,
|
|
184
|
-
width: this.tooltipWidth(),
|
|
185
|
-
height: this.tooltipHeight()
|
|
186
|
-
});
|
|
187
|
-
return defaultDirection;
|
|
188
|
-
};
|
|
189
|
-
HTMLTooltip.prototype.rectFits = function (innerRect, outerRect) {
|
|
190
|
-
return (innerRect.top >= outerRect.top &&
|
|
191
|
-
innerRect.left >= outerRect.left &&
|
|
192
|
-
innerRect.width + innerRect.left <= outerRect.width + outerRect.left &&
|
|
193
|
-
innerRect.height + innerRect.top <= outerRect.height + outerRect.top);
|
|
194
|
-
};
|
|
195
|
-
HTMLTooltip.prototype.setArrowPosition = function (point, direction) {
|
|
196
|
-
var top;
|
|
197
|
-
var left;
|
|
198
|
-
var visibleBorderStyle = "border-top-color";
|
|
199
|
-
this._arrowElement
|
|
200
|
-
.style("border", "".concat(this.arrowHeight(), "px solid ").concat(this.tooltipColor()))
|
|
201
|
-
.style("border-top-color", "transparent")
|
|
202
|
-
.style("border-right-color", "transparent")
|
|
203
|
-
.style("border-bottom-color", "transparent")
|
|
204
|
-
.style("border-left-color", "transparent");
|
|
205
|
-
switch (direction) {
|
|
206
|
-
case "n":
|
|
207
|
-
top = point.y + this.tooltipHeight() + (this.padding() * 2);
|
|
208
|
-
left = point.x + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2) + this.padding();
|
|
209
|
-
visibleBorderStyle = "border-top-color";
|
|
210
|
-
this._arrowElement
|
|
211
|
-
.style("border-top-width", "".concat(this.arrowHeight(), "px"))
|
|
212
|
-
.style("border-bottom-width", "0px")
|
|
213
|
-
.style("border-left-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
214
|
-
.style("border-right-width", "".concat(this.arrowWidth() / 2, "px"));
|
|
215
|
-
break;
|
|
216
|
-
case "s":
|
|
217
|
-
top = point.y - this.arrowHeight();
|
|
218
|
-
left = point.x + this.padding() + (this.tooltipWidth() / 2) - (this.arrowWidth() / 2);
|
|
219
|
-
visibleBorderStyle = "border-bottom-color";
|
|
220
|
-
this._arrowElement
|
|
221
|
-
.style("border-top-width", "0px")
|
|
222
|
-
.style("border-bottom-width", "".concat(this.arrowHeight(), "px"))
|
|
223
|
-
.style("border-left-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
224
|
-
.style("border-right-width", "".concat(this.arrowWidth() / 2, "px"));
|
|
225
|
-
break;
|
|
226
|
-
case "e":
|
|
227
|
-
top = point.y + (this.tooltipHeight() / 2) + this.padding() - (this.arrowWidth() / 2);
|
|
228
|
-
left = point.x - this.arrowHeight();
|
|
229
|
-
visibleBorderStyle = "border-right-color";
|
|
230
|
-
this._arrowElement
|
|
231
|
-
.style("border-top-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
232
|
-
.style("border-bottom-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
233
|
-
.style("border-left-width", "0px")
|
|
234
|
-
.style("border-right-width", "".concat(this.arrowHeight(), "px"));
|
|
235
|
-
break;
|
|
236
|
-
case "w":
|
|
237
|
-
top = point.y + (this.tooltipHeight() / 2) - (this.arrowWidth() / 2) + this.padding();
|
|
238
|
-
left = point.x + this.tooltipWidth() + (this.padding() * 2);
|
|
239
|
-
visibleBorderStyle = "border-left-color";
|
|
240
|
-
this._arrowElement
|
|
241
|
-
.style("border-top-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
242
|
-
.style("border-bottom-width", "".concat(this.arrowWidth() / 2, "px"))
|
|
243
|
-
.style("border-left-width", "".concat(this.arrowHeight(), "px"))
|
|
244
|
-
.style("border-right-width", "0px");
|
|
245
|
-
break;
|
|
246
|
-
}
|
|
247
|
-
if (typeof top !== "undefined" && typeof left !== "undefined") {
|
|
248
|
-
this._arrowElement
|
|
249
|
-
.style("top", top + "px")
|
|
250
|
-
.style("left", left + "px")
|
|
251
|
-
.style(visibleBorderStyle, this.tooltipColor())
|
|
252
|
-
.style("opacity", 1);
|
|
253
|
-
}
|
|
254
|
-
else {
|
|
255
|
-
this._arrowElement
|
|
256
|
-
.style("opacity", 0);
|
|
257
|
-
}
|
|
258
|
-
return point;
|
|
259
|
-
};
|
|
260
|
-
HTMLTooltip.prototype.getReferenceNode = function () {
|
|
261
|
-
if (!this._triggerElement) {
|
|
262
|
-
return this.element().node().parentNode.parentNode;
|
|
263
|
-
}
|
|
264
|
-
return this._triggerElement.node();
|
|
265
|
-
};
|
|
266
|
-
HTMLTooltip.prototype.calcReferenceBBox = function () {
|
|
267
|
-
var node = this.getReferenceNode();
|
|
268
|
-
var _a = node.getBoundingClientRect(), top = _a.top, left = _a.left, width = _a.width, height = _a.height;
|
|
269
|
-
var wholeW = this.tooltipWidth();
|
|
270
|
-
var wholeH = this.tooltipHeight();
|
|
271
|
-
var halfW = wholeW / 2;
|
|
272
|
-
var halfH = wholeH / 2;
|
|
273
|
-
var arrowH = this.arrowHeight();
|
|
274
|
-
var p = this.padding();
|
|
275
|
-
var p2 = p * 2;
|
|
276
|
-
if (this.followCursor() && this._cursorLoc) {
|
|
277
|
-
left = this._cursorLoc[0];
|
|
278
|
-
top = this._cursorLoc[1];
|
|
279
|
-
width = 1;
|
|
280
|
-
height = 1;
|
|
281
|
-
}
|
|
282
|
-
var bbox = {
|
|
283
|
-
n: {
|
|
284
|
-
x: left + (width / 2) - halfW - p,
|
|
285
|
-
y: top - wholeH - arrowH - p2
|
|
286
|
-
},
|
|
287
|
-
e: {
|
|
288
|
-
x: left + width + arrowH,
|
|
289
|
-
y: top + (height / 2) - halfH - p
|
|
290
|
-
},
|
|
291
|
-
s: {
|
|
292
|
-
x: left + (width / 2) - halfW - p,
|
|
293
|
-
y: top + height + arrowH
|
|
294
|
-
},
|
|
295
|
-
w: {
|
|
296
|
-
x: left - wholeW - arrowH - p2,
|
|
297
|
-
y: top + (height / 2) - halfH - p
|
|
298
|
-
},
|
|
299
|
-
nw: {
|
|
300
|
-
x: left - wholeW - p2,
|
|
301
|
-
y: top - wholeH - p2
|
|
302
|
-
},
|
|
303
|
-
ne: {
|
|
304
|
-
x: left + width,
|
|
305
|
-
y: top - wholeH - p2
|
|
306
|
-
},
|
|
307
|
-
se: {
|
|
308
|
-
x: left + width,
|
|
309
|
-
y: top + height
|
|
310
|
-
},
|
|
311
|
-
sw: {
|
|
312
|
-
x: left - wholeW - p2,
|
|
313
|
-
y: top + height
|
|
314
|
-
}
|
|
315
|
-
};
|
|
316
|
-
return bbox;
|
|
317
|
-
};
|
|
318
|
-
HTMLTooltip.prototype.mouseout = function () {
|
|
319
|
-
var _this = this;
|
|
320
|
-
this._closing = true;
|
|
321
|
-
this._tooltipElement.on("mouseover", function () {
|
|
322
|
-
_this._closing = false;
|
|
323
|
-
});
|
|
324
|
-
this._tooltipElement.on("mouseout", function () {
|
|
325
|
-
_this.mouseout();
|
|
326
|
-
});
|
|
327
|
-
setTimeout(function () {
|
|
328
|
-
if (_this._closing) {
|
|
329
|
-
_this.visible(false);
|
|
330
|
-
}
|
|
331
|
-
}, this.closeDelay());
|
|
332
|
-
};
|
|
333
|
-
HTMLTooltip.prototype.visible = function (_) {
|
|
334
|
-
if (!arguments.length)
|
|
335
|
-
return _super.prototype.visible.call(this);
|
|
336
|
-
if (this._arrowElement) {
|
|
337
|
-
this._arrowElement.style("visibility", _ ? "visible" : "hidden");
|
|
338
|
-
this._tooltipElement.style("visibility", _ ? "visible" : "hidden");
|
|
339
|
-
}
|
|
340
|
-
_super.prototype.visible.call(this, _);
|
|
341
|
-
return this;
|
|
342
|
-
};
|
|
343
|
-
HTMLTooltip.prototype.exit = function (domNode, element) {
|
|
344
|
-
if (this._arrowElement) {
|
|
345
|
-
this._arrowElement.remove();
|
|
346
|
-
this._tooltipElement.remove();
|
|
347
|
-
}
|
|
348
|
-
_super.prototype.exit.call(this, domNode, element);
|
|
349
|
-
};
|
|
350
|
-
return HTMLTooltip;
|
|
351
|
-
}(common.HTMLWidget));
|
|
352
|
-
HTMLTooltip.prototype._class += " html_HTMLTooltip";
|
|
353
|
-
HTMLTooltip.prototype.publish("fitContent", false, "boolean", "If true, tooltip will grow to fit its html content");
|
|
354
|
-
HTMLTooltip.prototype.publish("followCursor", false, "boolean", "If true, tooltip will display relative to cursor location");
|
|
355
|
-
HTMLTooltip.prototype.publish("closeDelay", 400, "number", "Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)");
|
|
356
|
-
HTMLTooltip.prototype.publish("direction", "n", "set", "Direction in which to display the tooltip", ["n", "s", "e", "w", "ne", "nw", "se", "sw"]);
|
|
357
|
-
HTMLTooltip.prototype.publish("padding", 8, "number", "Padding (pixels)");
|
|
358
|
-
HTMLTooltip.prototype.publish("arrowWidth", 16, "number", "Width (or height depending on direction) of the tooltip arrow (pixels)");
|
|
359
|
-
HTMLTooltip.prototype.publish("arrowHeight", 8, "number", "Height (or width depending on direction) of the tooltip arrow (pixels)");
|
|
360
|
-
HTMLTooltip.prototype.publish("fontColor", "#FFF", "html-color", "The default font color for text in the tooltip");
|
|
361
|
-
HTMLTooltip.prototype.publish("tooltipColor", "#000000EE", "html-color", "Background color of the tooltip");
|
|
362
|
-
HTMLTooltip.prototype.publish("tooltipWidth", 200, "number", "Width of the tooltip (not including arrow) (pixels)");
|
|
363
|
-
HTMLTooltip.prototype.publish("tooltipHeight", 200, "number", "Height of the tooltip (not including arrow) (pixels)");
|
|
364
|
-
HTMLTooltip.prototype.publish("enablePointerEvents", false, "boolean", "If true, the 'pointer-events: all' style will be used");
|
|
365
|
-
|
|
366
|
-
var SimpleTable = /** @class */ (function (_super) {
|
|
367
|
-
__extends(SimpleTable, _super);
|
|
368
|
-
function SimpleTable() {
|
|
369
|
-
return _super.call(this) || this;
|
|
370
|
-
}
|
|
371
|
-
SimpleTable.prototype.transformData = function () {
|
|
372
|
-
return this.data();
|
|
373
|
-
};
|
|
374
|
-
SimpleTable.prototype.enter = function (domNode, element) {
|
|
375
|
-
_super.prototype.enter.call(this, domNode, element);
|
|
376
|
-
this._table = element.append("table");
|
|
377
|
-
this._thead = this._table.append("thead");
|
|
378
|
-
this._theadRow = this._thead.append("tr");
|
|
379
|
-
this._tbody = this._table.append("tbody");
|
|
380
|
-
};
|
|
381
|
-
SimpleTable.prototype.update = function (domNode, element) {
|
|
382
|
-
_super.prototype.update.call(this, domNode, element);
|
|
383
|
-
this._table
|
|
384
|
-
.style("width", this.autoWidth() ? "auto" : "100%");
|
|
385
|
-
var theadTrSelection = this._theadRow.selectAll("th").data(this.columns());
|
|
386
|
-
theadTrSelection.enter()
|
|
387
|
-
.append("th")
|
|
388
|
-
.attr("class", function (n, i) { return "th-".concat(i); })
|
|
389
|
-
.merge(theadTrSelection)
|
|
390
|
-
.text(function (_d) { return (_d).toString(); });
|
|
391
|
-
theadTrSelection.exit().remove();
|
|
392
|
-
var trSelection = this._tbody.selectAll("tr").data(this.transformData());
|
|
393
|
-
trSelection.enter()
|
|
394
|
-
.append("tr")
|
|
395
|
-
.merge(trSelection)
|
|
396
|
-
.each(function (d) {
|
|
397
|
-
var tr = common.select(this);
|
|
398
|
-
var tdSelection = tr.selectAll("td").data(d);
|
|
399
|
-
tdSelection.enter()
|
|
400
|
-
.append("td")
|
|
401
|
-
.attr("class", function (n, i) { return "col-".concat(i); })
|
|
402
|
-
.merge(tdSelection)
|
|
403
|
-
.text(function (_d) { return (_d).toString(); });
|
|
404
|
-
tdSelection.exit().remove();
|
|
405
|
-
});
|
|
406
|
-
trSelection.exit().remove();
|
|
407
|
-
};
|
|
408
|
-
return SimpleTable;
|
|
409
|
-
}(common.HTMLWidget));
|
|
410
|
-
SimpleTable.prototype._class += " html_SimpleTable";
|
|
411
|
-
SimpleTable.prototype.publish("autoWidth", false, "boolean", "If true, table width will be set to 'auto'. If false, the width is set to '100%'");
|
|
412
|
-
|
|
413
|
-
var StyledTable = /** @class */ (function (_super) {
|
|
414
|
-
__extends(StyledTable, _super);
|
|
415
|
-
function StyledTable() {
|
|
416
|
-
return _super.call(this) || this;
|
|
417
|
-
}
|
|
418
|
-
StyledTable.prototype.applyStyleObject = function (selection, styleObject) {
|
|
419
|
-
Object.keys(styleObject).forEach(function (styleName) {
|
|
420
|
-
selection.style(styleName, styleObject[styleName]);
|
|
421
|
-
});
|
|
422
|
-
};
|
|
423
|
-
StyledTable.prototype.update = function (domNode, element) {
|
|
424
|
-
var _this = this;
|
|
425
|
-
_super.prototype.update.call(this, domNode, element);
|
|
426
|
-
element.selectAll("tr,th,td")
|
|
427
|
-
.attr("style", "")
|
|
428
|
-
.style("font-family", this.fontFamily())
|
|
429
|
-
.style("color", this.fontColor());
|
|
430
|
-
this.theadColumnStyles().forEach(function (styleObj, i) {
|
|
431
|
-
_this.applyStyleObject(element.select(".th-".concat(i)), styleObj);
|
|
432
|
-
});
|
|
433
|
-
this.tbodyColumnStyles().forEach(function (styleObj, i) {
|
|
434
|
-
_this.applyStyleObject(element.selectAll(".col-".concat(i)), styleObj);
|
|
435
|
-
});
|
|
436
|
-
var evenRowStylesExist = Object.keys(this.evenRowStyles()).length > 0;
|
|
437
|
-
var lastRowStylesExist = Object.keys(this.lastRowStyles()).length > 0;
|
|
438
|
-
var tbodyRows = element.selectAll("tbody > tr");
|
|
439
|
-
if (evenRowStylesExist) {
|
|
440
|
-
var tbodyEvenRows = tbodyRows.select(function (d, i) { return i % 2 ? this : null; });
|
|
441
|
-
this.applyStyleObject(tbodyEvenRows, this.evenRowStyles());
|
|
442
|
-
}
|
|
443
|
-
if (lastRowStylesExist) {
|
|
444
|
-
var tbodyLastRow = tbodyRows.select(function (d, i, arr) { return i === arr.length - 1 ? this : null; });
|
|
445
|
-
this.applyStyleObject(tbodyLastRow, this.lastRowStyles());
|
|
446
|
-
}
|
|
447
|
-
};
|
|
448
|
-
return StyledTable;
|
|
449
|
-
}(SimpleTable));
|
|
450
|
-
StyledTable.prototype._class += " html_StyledTable";
|
|
451
|
-
StyledTable.prototype.publish("fontFamily", "Verdana", "string", "Base font-family used within the table");
|
|
452
|
-
StyledTable.prototype.publish("fontColor", "#333", "string", "Base font color used within the table");
|
|
453
|
-
StyledTable.prototype.publish("theadColumnStyles", [], "array", 'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])');
|
|
454
|
-
StyledTable.prototype.publish("tbodyColumnStyles", [], "array", 'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])');
|
|
455
|
-
StyledTable.prototype.publish("lastRowStyles", {}, "object", 'Object containing styles for the last row (ex: {"color":"red"})');
|
|
456
|
-
StyledTable.prototype.publish("evenRowStyles", {}, "object", 'Object containing styles for even rows (ex: {"background-color":"#AAA"})');
|
|
457
|
-
|
|
458
|
-
var BreakdownTable = /** @class */ (function (_super) {
|
|
459
|
-
__extends(BreakdownTable, _super);
|
|
460
|
-
function BreakdownTable() {
|
|
461
|
-
return _super.call(this) || this;
|
|
462
|
-
}
|
|
463
|
-
BreakdownTable.prototype.transformData = function () {
|
|
464
|
-
var rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
465
|
-
return this.breakdownData(rowCount);
|
|
466
|
-
};
|
|
467
|
-
BreakdownTable.prototype.breakdownData = function (limit) {
|
|
468
|
-
var len = this.data().length;
|
|
469
|
-
var sum = this.data().reduce(function (acc, row) { return acc + row[1]; }, 0);
|
|
470
|
-
var data = [];
|
|
471
|
-
var percSum = 0;
|
|
472
|
-
this.data().sort(function (a, b) { return a[1] > b[1] ? -1 : 1; });
|
|
473
|
-
var hiddenRowCount = len - limit;
|
|
474
|
-
var showOther = hiddenRowCount > 0;
|
|
475
|
-
this.data()
|
|
476
|
-
.filter(function (_, i) { return showOther ? i < limit - 1 : true; })
|
|
477
|
-
.forEach(function (row) {
|
|
478
|
-
var perc = Math.round((row[1] / sum) * 100);
|
|
479
|
-
percSum += perc;
|
|
480
|
-
data.push([row[0], perc + "%"]);
|
|
481
|
-
});
|
|
482
|
-
if (showOther) {
|
|
483
|
-
var otherLabel = "".concat(this.otherLabel(), " (").concat(len - limit + 1, ")");
|
|
484
|
-
var otherPercentage = "~" + (100 - percSum) + "%";
|
|
485
|
-
data.push([otherLabel, otherPercentage]);
|
|
486
|
-
}
|
|
487
|
-
return data;
|
|
488
|
-
};
|
|
489
|
-
BreakdownTable.prototype.calculateRowCount = function () {
|
|
490
|
-
var theadRowHeight = this.columns().length > 0 ? this.thFontSize() + 5 : 0;
|
|
491
|
-
var tbodyRowHeight = this.fontSize() + 5;
|
|
492
|
-
var tbodyAvailableHeight = this.height() - theadRowHeight;
|
|
493
|
-
var rowCount = Math.floor(tbodyAvailableHeight / tbodyRowHeight);
|
|
494
|
-
return rowCount;
|
|
495
|
-
};
|
|
496
|
-
BreakdownTable.prototype.enter = function (domNode, element) {
|
|
497
|
-
var _this = this;
|
|
498
|
-
_super.prototype.enter.call(this, domNode, element);
|
|
499
|
-
this._tooltip = new HTMLTooltip()
|
|
500
|
-
.target(domNode);
|
|
501
|
-
this._tooltip
|
|
502
|
-
.tooltipHTML(function (data) {
|
|
503
|
-
var _a;
|
|
504
|
-
var rowCount = _this.useCalculatedRowCount() ? _this.calculateRowCount() : _this.rowCount();
|
|
505
|
-
var rowHeight = (_a = Math.max.apply(Math, data.map(function (row) { return _this.textSize(row[0], _this.fontFamily(), _this.fontSize()).height; }))) !== null && _a !== void 0 ? _a : _this.fontSize();
|
|
506
|
-
var widestLabel = Math.max.apply(Math, data.map(function (row) { return _this.textSize(row[0], _this.fontFamily(), _this.fontSize()).width; }));
|
|
507
|
-
var widestPerc = 30;
|
|
508
|
-
var colCount = 2;
|
|
509
|
-
var w = colCount * (widestLabel + widestPerc) + (_this._tooltip.padding() * 2);
|
|
510
|
-
var h = rowHeight * Math.ceil((data.length - rowCount) / colCount) + (_this._tooltip.padding() * 2);
|
|
511
|
-
_this._tooltip.tooltipWidth(w);
|
|
512
|
-
_this._tooltip.tooltipHeight(h);
|
|
513
|
-
var otherData = _this.breakdownData(_this.data().length).slice(rowCount - 1);
|
|
514
|
-
return "<div style=\"\n width: 100%;\n height: 100%;\n font-size: ".concat(_this.fontSize(), "px;\n \">").concat(otherData.map(function (row) {
|
|
515
|
-
return "<div style=\"\n float:left;\n width:".concat(Math.floor(99 / colCount), "%;\n \">").concat(row[0], ": ").concat(row[1], "</div>");
|
|
516
|
-
}).join(""), "</div>");
|
|
517
|
-
});
|
|
518
|
-
};
|
|
519
|
-
BreakdownTable.prototype.update = function (domNode, element) {
|
|
520
|
-
this.theadColumnStyles_default([
|
|
521
|
-
{
|
|
522
|
-
"color": this.thFirstColor(),
|
|
523
|
-
"font-size": this.thFontSize() + "px",
|
|
524
|
-
"font-weight": this.thFontWeight(),
|
|
525
|
-
"text-align": this.labelAlignment(),
|
|
526
|
-
"width": "auto",
|
|
527
|
-
"padding": "0px"
|
|
528
|
-
},
|
|
529
|
-
{
|
|
530
|
-
"width": "1%",
|
|
531
|
-
"font-size": this.thFontSize() + "px",
|
|
532
|
-
"font-weight": this.thFontWeight(),
|
|
533
|
-
"text-align": this.percentageAlignment(),
|
|
534
|
-
"padding": "0px"
|
|
535
|
-
}
|
|
536
|
-
]);
|
|
537
|
-
this.tbodyColumnStyles_default([
|
|
538
|
-
{
|
|
539
|
-
"color": this.topLabelColor(),
|
|
540
|
-
"font-size": this.fontSize() + "px",
|
|
541
|
-
"font-weight": "normal",
|
|
542
|
-
"text-align": this.labelAlignment(),
|
|
543
|
-
"width": "auto",
|
|
544
|
-
"padding": "0px"
|
|
545
|
-
},
|
|
546
|
-
{
|
|
547
|
-
"color": this.topPercentageColor(),
|
|
548
|
-
"font-size": this.fontSize() + "px",
|
|
549
|
-
"font-weight": "normal",
|
|
550
|
-
"text-align": this.percentageAlignment(),
|
|
551
|
-
"width": "1%",
|
|
552
|
-
"padding": "0px"
|
|
553
|
-
}
|
|
554
|
-
]);
|
|
555
|
-
this.lastRowStyles_default([
|
|
556
|
-
{
|
|
557
|
-
"color": this.otherLabelColor(),
|
|
558
|
-
"font-size": this.fontSize() + "px",
|
|
559
|
-
"font-weight": this.otherLabelBold() ? "bold" : "normal",
|
|
560
|
-
"text-align": this.labelAlignment(),
|
|
561
|
-
"width": "auto",
|
|
562
|
-
"padding": "0px"
|
|
563
|
-
},
|
|
564
|
-
{
|
|
565
|
-
"color": this.otherLabelColor(),
|
|
566
|
-
"font-size": this.fontSize() + "px",
|
|
567
|
-
"font-weight": this.otherPercentageBold() ? "bold" : "normal",
|
|
568
|
-
"text-align": this.percentageAlignment(),
|
|
569
|
-
"width": "1%",
|
|
570
|
-
"padding": "0px"
|
|
571
|
-
}
|
|
572
|
-
]);
|
|
573
|
-
_super.prototype.update.call(this, domNode, element);
|
|
574
|
-
var rowCount = this.useCalculatedRowCount() ? this.calculateRowCount() : this.rowCount();
|
|
575
|
-
if (rowCount < this.data().length) {
|
|
576
|
-
var lastRow_1 = element.select("tbody > tr:last-child");
|
|
577
|
-
var context_1 = this;
|
|
578
|
-
lastRow_1
|
|
579
|
-
.on("mouseout.tooltip", function (d) {
|
|
580
|
-
context_1._tooltip._triggerElement = lastRow_1;
|
|
581
|
-
context_1._tooltip
|
|
582
|
-
.visible(false)
|
|
583
|
-
.render();
|
|
584
|
-
})
|
|
585
|
-
.on("mouseenter.tooltip", function (d) {
|
|
586
|
-
context_1._tooltip._triggerElement = lastRow_1;
|
|
587
|
-
context_1._tooltip
|
|
588
|
-
.direction("n")
|
|
589
|
-
.data(context_1.data())
|
|
590
|
-
.visible(true)
|
|
591
|
-
.render();
|
|
592
|
-
});
|
|
593
|
-
}
|
|
594
|
-
};
|
|
595
|
-
return BreakdownTable;
|
|
596
|
-
}(StyledTable));
|
|
597
|
-
BreakdownTable.prototype._class += " html_BreakdownTable";
|
|
598
|
-
BreakdownTable.prototype.publish("useCalculatedRowCount", true, "boolean", "If true, rowCount will be calculated and its default will be overwritten");
|
|
599
|
-
BreakdownTable.prototype.publish("rowCount", 5, "number", "Number of total rows to display (including the 'other' row)", undefined, { disable: function (w) { return w.useCalculatedRowCount(); } });
|
|
600
|
-
BreakdownTable.prototype.publish("fontSize", 14, "number", "Font size (pixels)");
|
|
601
|
-
BreakdownTable.prototype.publish("labelAlignment", "left", "set", "Alignment of the label column text", ["left", "center", "right"]);
|
|
602
|
-
BreakdownTable.prototype.publish("percentageAlignment", "center", "set", "Alignment of the percentage column text", ["left", "center", "right"]);
|
|
603
|
-
BreakdownTable.prototype.publish("topLabelColor", "#333", "html-color", "Color of displayed 'top' labels");
|
|
604
|
-
BreakdownTable.prototype.publish("topPercentageColor", "#1A99D5", "html-color", "Color of displayed 'top' percentages");
|
|
605
|
-
BreakdownTable.prototype.publish("topPercentageBold", true, "html-color", "If true, the 'top' percentages will be bold");
|
|
606
|
-
BreakdownTable.prototype.publish("otherLabel", "Other", "string", "Label text for the 'other' row");
|
|
607
|
-
BreakdownTable.prototype.publish("otherLabelColor", "#AAA", "html-color", "Color of the 'other' label");
|
|
608
|
-
BreakdownTable.prototype.publish("otherLabelBold", false, "html-color", "If true, the 'other' label will be bold");
|
|
609
|
-
BreakdownTable.prototype.publish("otherPercentageColor", "#AAA", "html-color", "Color of the 'other' percentage");
|
|
610
|
-
BreakdownTable.prototype.publish("otherPercentageBold", false, "html-color", "If true, the 'other' percentage will be bold");
|
|
611
|
-
BreakdownTable.prototype.publish("thFontWeight", "bold", "string", "Font weight for th elements");
|
|
612
|
-
BreakdownTable.prototype.publish("thFontSize", 26, "number", "Font size for th elements");
|
|
613
|
-
BreakdownTable.prototype.publish("thFirstColor", "#333", "html-color", "Text color of the first th element");
|
|
614
|
-
BreakdownTable.prototype.publish("thLastColor", "#333", "html-color", "Text color of the last th element");
|
|
615
|
-
|
|
616
|
-
var n,l$1,u$1,i$1,o$1,r$1,f$1,e$1,c$1,s$1,h$1={},v$1=[],p$1=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,y$1=Array.isArray;function d$1(n,l){for(var u in l)n[u]=l[u];return n}function w$1(n){n&&n.parentNode&&n.parentNode.removeChild(n);}function _(l,u,t){var i,o,r,f={};for(r in u)"key"==r?i=u[r]:"ref"==r?o=u[r]:f[r]=u[r];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):t),"function"==typeof l&&null!=l.defaultProps)for(r in l.defaultProps)void 0===f[r]&&(f[r]=l.defaultProps[r]);return g(l,f,i,o,null)}function g(n,t,i,o,r){var f={type:n,props:t,key:i,ref:o,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:null==r?++u$1:r,__i:-1,__u:0};return null==r&&null!=l$1.vnode&&l$1.vnode(f),f}function b(n){return n.children}function k$1(n,l){this.props=n,this.context=l;}function x(n,l){if(null==l)return n.__?x(n.__,n.__i+1):null;for(var u;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e)return u.__e;return "function"==typeof n.type?x(n):null}function C$1(n){var l,u;if(null!=(n=n.__)&&null!=n.__c){for(n.__e=n.__c.base=null,l=0;l<n.__k.length;l++)if(null!=(u=n.__k[l])&&null!=u.__e){n.__e=n.__c.base=u.__e;break}return C$1(n)}}function M(n){(!n.__d&&(n.__d=!0)&&i$1.push(n)&&!P.__r++||o$1!==l$1.debounceRendering)&&((o$1=l$1.debounceRendering)||r$1)(P);}function P(){var n,u,t,o,r,e,c,s;for(i$1.sort(f$1);n=i$1.shift();)n.__d&&(u=i$1.length,o=void 0,e=(r=(t=n).__v).__e,c=[],s=[],t.__P&&((o=d$1({},r)).__v=r.__v+1,l$1.vnode&&l$1.vnode(o),O(t.__P,o,r,t.__n,t.__P.namespaceURI,32&r.__u?[e]:null,c,null==e?x(r):e,!!(32&r.__u),s),o.__v=r.__v,o.__.__k[o.__i]=o,j$1(c,o,s),o.__e!=e&&C$1(o)),i$1.length>u&&i$1.sort(f$1));P.__r=0;}function S(n,l,u,t,i,o,r,f,e,c,s){var a,p,y,d,w,_=t&&t.__k||v$1,g=l.length;for(u.__d=e,$(u,l,_),e=u.__d,a=0;a<g;a++)null!=(y=u.__k[a])&&(p=-1===y.__i?h$1:_[y.__i]||h$1,y.__i=a,O(n,y,p,i,o,r,f,e,c,s),d=y.__e,y.ref&&p.ref!=y.ref&&(p.ref&&N(p.ref,null,y),s.push(y.ref,y.__c||d,y)),null==w&&null!=d&&(w=d),65536&y.__u||p.__k===y.__k?e=I(y,e,n):"function"==typeof y.type&&void 0!==y.__d?e=y.__d:d&&(e=d.nextSibling),y.__d=void 0,y.__u&=-196609);u.__d=e,u.__e=w;}function $(n,l,u){var t,i,o,r,f,e=l.length,c=u.length,s=c,a=0;for(n.__k=[],t=0;t<e;t++)null!=(i=l[t])&&"boolean"!=typeof i&&"function"!=typeof i?(r=t+a,(i=n.__k[t]="string"==typeof i||"number"==typeof i||"bigint"==typeof i||i.constructor==String?g(null,i,null,null,null):y$1(i)?g(b,{children:i},null,null,null):void 0===i.constructor&&i.__b>0?g(i.type,i.props,i.key,i.ref?i.ref:null,i.__v):i).__=n,i.__b=n.__b+1,o=null,-1!==(f=i.__i=L(i,u,r,s))&&(s--,(o=u[f])&&(o.__u|=131072)),null==o||null===o.__v?(-1==f&&a--,"function"!=typeof i.type&&(i.__u|=65536)):f!==r&&(f==r-1?a--:f==r+1?a++:(f>r?a--:a++,i.__u|=65536))):i=n.__k[t]=null;if(s)for(t=0;t<c;t++)null!=(o=u[t])&&0==(131072&o.__u)&&(o.__e==n.__d&&(n.__d=x(o)),V(o,o));}function I(n,l,u){var t,i;if("function"==typeof n.type){for(t=n.__k,i=0;t&&i<t.length;i++)t[i]&&(t[i].__=n,l=I(t[i],l,u));return l}n.__e!=l&&(l&&n.type&&!u.contains(l)&&(l=x(n)),u.insertBefore(n.__e,l||null),l=n.__e);do{l=l&&l.nextSibling;}while(null!=l&&8===l.nodeType);return l}function L(n,l,u,t){var i=n.key,o=n.type,r=u-1,f=u+1,e=l[u];if(null===e||e&&i==e.key&&o===e.type&&0==(131072&e.__u))return u;if(t>(null!=e&&0==(131072&e.__u)?1:0))for(;r>=0||f<l.length;){if(r>=0){if((e=l[r])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return r;r--;}if(f<l.length){if((e=l[f])&&0==(131072&e.__u)&&i==e.key&&o===e.type)return f;f++;}}return -1}function T$1(n,l,u){"-"===l[0]?n.setProperty(l,null==u?"":u):n[l]=null==u?"":"number"!=typeof u||p$1.test(l)?u:u+"px";}function A(n,l,u,t,i){var o;n:if("style"===l)if("string"==typeof u)n.style.cssText=u;else {if("string"==typeof t&&(n.style.cssText=t=""),t)for(l in t)u&&l in u||T$1(n.style,l,"");if(u)for(l in u)t&&u[l]===t[l]||T$1(n.style,l,u[l]);}else if("o"===l[0]&&"n"===l[1])o=l!==(l=l.replace(/(PointerCapture)$|Capture$/i,"$1")),l=l.toLowerCase()in n||"onFocusOut"===l||"onFocusIn"===l?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+o]=u,u?t?u.u=t.u:(u.u=e$1,n.addEventListener(l,o?s$1:c$1,o)):n.removeEventListener(l,o?s$1:c$1,o);else {if("http://www.w3.org/2000/svg"==i)l=l.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!=l&&"height"!=l&&"href"!=l&&"list"!=l&&"form"!=l&&"tabIndex"!=l&&"download"!=l&&"rowSpan"!=l&&"colSpan"!=l&&"role"!=l&&"popover"!=l&&l in n)try{n[l]=null==u?"":u;break n}catch(n){}"function"==typeof u||(null==u||!1===u&&"-"!==l[4]?n.removeAttribute(l):n.setAttribute(l,"popover"==l&&1==u?"":u));}}function F(n){return function(u){if(this.l){var t=this.l[u.type+n];if(null==u.t)u.t=e$1++;else if(u.t<t.u)return;return t(l$1.event?l$1.event(u):u)}}}function O(n,u,t,i,o,r,f,e,c,s){var a,h,v,p,w,_,g,m,x,C,M,P,$,I,H,L,T=u.type;if(void 0!==u.constructor)return null;128&t.__u&&(c=!!(32&t.__u),r=[e=u.__e=t.__e]),(a=l$1.__b)&&a(u);n:if("function"==typeof T)try{if(m=u.props,x="prototype"in T&&T.prototype.render,C=(a=T.contextType)&&i[a.__c],M=a?C?C.props.value:a.__:i,t.__c?g=(h=u.__c=t.__c).__=h.__E:(x?u.__c=h=new T(m,M):(u.__c=h=new k$1(m,M),h.constructor=T,h.render=q$1),C&&C.sub(h),h.props=m,h.state||(h.state={}),h.context=M,h.__n=i,v=h.__d=!0,h.__h=[],h._sb=[]),x&&null==h.__s&&(h.__s=h.state),x&&null!=T.getDerivedStateFromProps&&(h.__s==h.state&&(h.__s=d$1({},h.__s)),d$1(h.__s,T.getDerivedStateFromProps(m,h.__s))),p=h.props,w=h.state,h.__v=u,v)x&&null==T.getDerivedStateFromProps&&null!=h.componentWillMount&&h.componentWillMount(),x&&null!=h.componentDidMount&&h.__h.push(h.componentDidMount);else {if(x&&null==T.getDerivedStateFromProps&&m!==p&&null!=h.componentWillReceiveProps&&h.componentWillReceiveProps(m,M),!h.__e&&(null!=h.shouldComponentUpdate&&!1===h.shouldComponentUpdate(m,h.__s,M)||u.__v===t.__v)){for(u.__v!==t.__v&&(h.props=m,h.state=h.__s,h.__d=!1),u.__e=t.__e,u.__k=t.__k,u.__k.some(function(n){n&&(n.__=u);}),P=0;P<h._sb.length;P++)h.__h.push(h._sb[P]);h._sb=[],h.__h.length&&f.push(h);break n}null!=h.componentWillUpdate&&h.componentWillUpdate(m,h.__s,M),x&&null!=h.componentDidUpdate&&h.__h.push(function(){h.componentDidUpdate(p,w,_);});}if(h.context=M,h.props=m,h.__P=n,h.__e=!1,$=l$1.__r,I=0,x){for(h.state=h.__s,h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),H=0;H<h._sb.length;H++)h.__h.push(h._sb[H]);h._sb=[];}else do{h.__d=!1,$&&$(u),a=h.render(h.props,h.state,h.context),h.state=h.__s;}while(h.__d&&++I<25);h.state=h.__s,null!=h.getChildContext&&(i=d$1(d$1({},i),h.getChildContext())),x&&!v&&null!=h.getSnapshotBeforeUpdate&&(_=h.getSnapshotBeforeUpdate(p,w)),S(n,y$1(L=null!=a&&a.type===b&&null==a.key?a.props.children:a)?L:[L],u,t,i,o,r,f,e,c,s),h.base=u.__e,u.__u&=-161,h.__h.length&&f.push(h),g&&(h.__E=h.__=null);}catch(n){if(u.__v=null,c||null!=r){for(u.__u|=c?160:32;e&&8===e.nodeType&&e.nextSibling;)e=e.nextSibling;r[r.indexOf(e)]=null,u.__e=e;}else u.__e=t.__e,u.__k=t.__k;l$1.__e(n,u,t);}else null==r&&u.__v===t.__v?(u.__k=t.__k,u.__e=t.__e):u.__e=z$1(t.__e,u,t,i,o,r,f,c,s);(a=l$1.diffed)&&a(u);}function j$1(n,u,t){u.__d=void 0;for(var i=0;i<t.length;i++)N(t[i],t[++i],t[++i]);l$1.__c&&l$1.__c(u,n),n.some(function(u){try{n=u.__h,u.__h=[],n.some(function(n){n.call(u);});}catch(n){l$1.__e(n,u.__v);}});}function z$1(u,t,i,o,r,f,e,c,s){var a,v,p,d,_,g,m,b=i.props,k=t.props,C=t.type;if("svg"===C?r="http://www.w3.org/2000/svg":"math"===C?r="http://www.w3.org/1998/Math/MathML":r||(r="http://www.w3.org/1999/xhtml"),null!=f)for(a=0;a<f.length;a++)if((_=f[a])&&"setAttribute"in _==!!C&&(C?_.localName===C:3===_.nodeType)){u=_,f[a]=null;break}if(null==u){if(null===C)return document.createTextNode(k);u=document.createElementNS(r,C,k.is&&k),c&&(l$1.__m&&l$1.__m(t,f),c=!1),f=null;}if(null===C)b===k||c&&u.data===k||(u.data=k);else {if(f=f&&n.call(u.childNodes),b=i.props||h$1,!c&&null!=f)for(b={},a=0;a<u.attributes.length;a++)b[(_=u.attributes[a]).name]=_.value;for(a in b)if(_=b[a],"children"==a);else if("dangerouslySetInnerHTML"==a)p=_;else if(!(a in k)){if("value"==a&&"defaultValue"in k||"checked"==a&&"defaultChecked"in k)continue;A(u,a,null,_,r);}for(a in k)_=k[a],"children"==a?d=_:"dangerouslySetInnerHTML"==a?v=_:"value"==a?g=_:"checked"==a?m=_:c&&"function"!=typeof _||b[a]===_||A(u,a,_,b[a],r);if(v)c||p&&(v.__html===p.__html||v.__html===u.innerHTML)||(u.innerHTML=v.__html),t.__k=[];else if(p&&(u.innerHTML=""),S(u,y$1(d)?d:[d],t,i,o,"foreignObject"===C?"http://www.w3.org/1999/xhtml":r,f,e,f?f[0]:i.__k&&x(i,0),c,s),null!=f)for(a=f.length;a--;)w$1(f[a]);c||(a="value","progress"===C&&null==g?u.removeAttribute("value"):void 0!==g&&(g!==u[a]||"progress"===C&&!g||"option"===C&&g!==b[a])&&A(u,a,g,b[a],r),a="checked",void 0!==m&&m!==u[a]&&A(u,a,m,b[a],r));}return u}function N(n,u,t){try{if("function"==typeof n){var i="function"==typeof n.__u;i&&n.__u(),i&&null==u||(n.__u=n(u));}else n.current=u;}catch(n){l$1.__e(n,t);}}function V(n,u,t){var i,o;if(l$1.unmount&&l$1.unmount(n),(i=n.ref)&&(i.current&&i.current!==n.__e||N(i,null,u)),null!=(i=n.__c)){if(i.componentWillUnmount)try{i.componentWillUnmount();}catch(n){l$1.__e(n,u);}i.base=i.__P=null;}if(i=n.__k)for(o=0;o<i.length;o++)i[o]&&V(i[o],u,t||"function"!=typeof n.type);t||w$1(n.__e),n.__c=n.__=n.__e=n.__d=void 0;}function q$1(n,l,u){return this.constructor(n,u)}function B$1(u,t,i){var o,r,f,e;l$1.__&&l$1.__(u,t),r=(o="function"==typeof i)?null:i&&i.__k||t.__k,f=[],e=[],O(t,u=(!o&&i||t).__k=_(b,null,[u]),r||h$1,h$1,t.namespaceURI,!o&&i?[i]:r?null:t.firstChild?n.call(t.childNodes):null,f,!o&&i?i:r?r.__e:t.firstChild,o,e),j$1(f,u,e);}n=v$1.slice,l$1={__e:function(n,l,u,t){for(var i,o,r;l=l.__;)if((i=l.__c)&&!i.__)try{if((o=i.constructor)&&null!=o.getDerivedStateFromError&&(i.setState(o.getDerivedStateFromError(n)),r=i.__d),null!=i.componentDidCatch&&(i.componentDidCatch(n,t||{}),r=i.__d),r)return i.__E=i}catch(l){n=l;}throw n}},u$1=0,k$1.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=d$1({},this.state),"function"==typeof n&&(n=n(d$1({},u),this.props)),n&&d$1(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),M(this));},k$1.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),M(this));},k$1.prototype.render=b,i$1=[],r$1="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f$1=function(n,l){return n.__v.__b-l.__v.__b},P.__r=0,e$1=0,c$1=F(!1),s$1=F(!0);
|
|
617
|
-
|
|
618
|
-
var r,u,i,f=[],c=l$1,e=c.__b,a=c.__r,v=c.diffed,l=c.__c,m=c.unmount,s=c.__;function j(){for(var n;n=f.shift();)if(n.__P&&n.__H)try{n.__H.__h.forEach(z),n.__H.__h.forEach(B),n.__H.__h=[];}catch(t){n.__H.__h=[],c.__e(t,n.__v);}}c.__b=function(n){r=null,e&&e(n);},c.__=function(n,t){n&&t.__k&&t.__k.__m&&(n.__m=t.__k.__m),s&&s(n,t);},c.__r=function(n){a&&a(n);var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.i=n.__N=void 0;})):(i.__h.forEach(z),i.__h.forEach(B),i.__h=[],0)),u=r;},c.diffed=function(n){v&&v(n);var t=n.__c;t&&t.__H&&(t.__H.__h.length&&(1!==f.push(t)&&i===c.requestAnimationFrame||((i=c.requestAnimationFrame)||w)(j)),t.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.i=void 0;})),u=r=null;},c.__c=function(n,t){t.some(function(n){try{n.__h.forEach(z),n.__h=n.__h.filter(function(n){return !n.__||B(n)});}catch(r){t.some(function(n){n.__h&&(n.__h=[]);}),t=[],c.__e(r,n.__v);}}),l&&l(n,t);},c.unmount=function(n){m&&m(n);var t,r=n.__c;r&&r.__H&&(r.__H.__.forEach(function(n){try{z(n);}catch(n){t=n;}}),r.__H=void 0,t&&c.__e(t,r.__v));};var k="function"==typeof requestAnimationFrame;function w(n){var t,r=function(){clearTimeout(u),k&&cancelAnimationFrame(t),setTimeout(n);},u=setTimeout(r,100);k&&(t=requestAnimationFrame(r));}function z(n){var t=r,u=n.__c;"function"==typeof u&&(n.__c=void 0,u()),r=t;}function B(n){var t=r;n.__c=n.__(),r=t;}
|
|
619
|
-
|
|
620
|
-
var JSXWidget = /** @class */ (function (_super) {
|
|
621
|
-
__extends(JSXWidget, _super);
|
|
622
|
-
function JSXWidget() {
|
|
623
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
624
|
-
}
|
|
625
|
-
JSXWidget.prototype.jsxRender = function (jsx, domNode) {
|
|
626
|
-
this.rootNode = B$1(jsx, domNode, this.rootNode);
|
|
627
|
-
};
|
|
628
|
-
JSXWidget.Component = k$1;
|
|
629
|
-
JSXWidget.createElement = _;
|
|
630
|
-
return JSXWidget;
|
|
631
|
-
}(common.HTMLWidget));
|
|
632
|
-
JSXWidget.prototype._class += " html_JSXWidget";
|
|
633
|
-
|
|
634
|
-
var VNode = /** @class */ (function () {
|
|
635
|
-
function VNode(attrs, children) {
|
|
636
|
-
this._attrs = attrs;
|
|
637
|
-
this._children = children;
|
|
638
|
-
}
|
|
639
|
-
VNode.prototype.type = function () {
|
|
640
|
-
return "div";
|
|
641
|
-
};
|
|
642
|
-
VNode.prototype.attrs = function () {
|
|
643
|
-
return this._attrs;
|
|
644
|
-
};
|
|
645
|
-
VNode.prototype.attr = function (key) {
|
|
646
|
-
return this._attrs[key];
|
|
647
|
-
};
|
|
648
|
-
VNode.prototype.children = function () {
|
|
649
|
-
return this._children;
|
|
650
|
-
};
|
|
651
|
-
VNode.prototype.update = function (targetElement) {
|
|
652
|
-
for (var key in this._attrs) {
|
|
653
|
-
targetElement.attr(key, this._attrs[key]);
|
|
654
|
-
}
|
|
655
|
-
};
|
|
656
|
-
VNode.prototype.render = function (targetElement) {
|
|
657
|
-
var thisElement = targetElement.selectAll("".concat(targetElement.node().tagName, " > *")).data([this]);
|
|
658
|
-
thisElement.exit()
|
|
659
|
-
.remove();
|
|
660
|
-
return thisElement.enter().append(this.type())
|
|
661
|
-
.attr("reactd3", 0)
|
|
662
|
-
.merge(thisElement)
|
|
663
|
-
.each(function (d) {
|
|
664
|
-
var element = common.select(this);
|
|
665
|
-
d.update(element);
|
|
666
|
-
d.renderChildren(element);
|
|
667
|
-
});
|
|
668
|
-
};
|
|
669
|
-
VNode.prototype.renderChildren = function (targetElement) {
|
|
670
|
-
var thisElement = targetElement.selectAll("".concat(targetElement.node().tagName, " > *")).data(this._children);
|
|
671
|
-
thisElement.exit()
|
|
672
|
-
.remove();
|
|
673
|
-
return thisElement.enter().append(function (d) { return document.createElement(d.type()); })
|
|
674
|
-
.attr("reactd3", function (_d, i) { return i; })
|
|
675
|
-
.merge(thisElement)
|
|
676
|
-
.each(function (d) {
|
|
677
|
-
var element = common.select(this);
|
|
678
|
-
d.update(element);
|
|
679
|
-
d.renderChildren(element);
|
|
680
|
-
});
|
|
681
|
-
};
|
|
682
|
-
return VNode;
|
|
683
|
-
}());
|
|
684
|
-
var ConstVNode = /** @class */ (function (_super) {
|
|
685
|
-
__extends(ConstVNode, _super);
|
|
686
|
-
function ConstVNode(type, attrs, children) {
|
|
687
|
-
var _this = _super.call(this, attrs, children) || this;
|
|
688
|
-
_this._type = type;
|
|
689
|
-
return _this;
|
|
690
|
-
}
|
|
691
|
-
ConstVNode.prototype.type = function () {
|
|
692
|
-
return this._type;
|
|
693
|
-
};
|
|
694
|
-
return ConstVNode;
|
|
695
|
-
}(VNode));
|
|
696
|
-
var TextVNode = /** @class */ (function (_super) {
|
|
697
|
-
__extends(TextVNode, _super);
|
|
698
|
-
function TextVNode(text) {
|
|
699
|
-
var _this = _super.call(this, {}, []) || this;
|
|
700
|
-
_this._text = text;
|
|
701
|
-
return _this;
|
|
702
|
-
}
|
|
703
|
-
TextVNode.prototype.type = function () {
|
|
704
|
-
return "span";
|
|
705
|
-
};
|
|
706
|
-
TextVNode.prototype.update = function (targetElement) {
|
|
707
|
-
_super.prototype.update.call(this, targetElement);
|
|
708
|
-
targetElement.text(this._text);
|
|
709
|
-
};
|
|
710
|
-
return TextVNode;
|
|
711
|
-
}(VNode));
|
|
712
|
-
function isReactFn(_) {
|
|
713
|
-
return typeof _ === "function";
|
|
714
|
-
}
|
|
715
|
-
function isIVNode(_) {
|
|
716
|
-
return _.prototype && _.prototype instanceof VNode;
|
|
717
|
-
}
|
|
718
|
-
var ReactD3 = /** @class */ (function () {
|
|
719
|
-
function ReactD3() {
|
|
720
|
-
}
|
|
721
|
-
// static createElementXXX(type: string | ReactFn | IVNode, attrs: { [key: string]: string }, ...children: Array<string | VNode>): VNode {
|
|
722
|
-
ReactD3.createElement = function (type, attrs) {
|
|
723
|
-
var children = [];
|
|
724
|
-
for (var _i = 2; _i < arguments.length; _i++) {
|
|
725
|
-
children[_i - 2] = arguments[_i];
|
|
726
|
-
}
|
|
727
|
-
if (isIVNode(type)) {
|
|
728
|
-
return new type(attrs);
|
|
729
|
-
}
|
|
730
|
-
else if (isReactFn(type)) {
|
|
731
|
-
return type(attrs);
|
|
732
|
-
}
|
|
733
|
-
return new ConstVNode(type, attrs, children.map(function (child) {
|
|
734
|
-
if (typeof child === "string") {
|
|
735
|
-
return new TextVNode(child);
|
|
736
|
-
}
|
|
737
|
-
return child;
|
|
738
|
-
}));
|
|
739
|
-
};
|
|
740
|
-
ReactD3.render = function (vdom, targetElement) {
|
|
741
|
-
vdom.render(targetElement);
|
|
742
|
-
};
|
|
743
|
-
return ReactD3;
|
|
744
|
-
}());
|
|
745
|
-
|
|
746
|
-
var VizComponent = /** @class */ (function (_super) {
|
|
747
|
-
__extends(VizComponent, _super);
|
|
748
|
-
function VizComponent() {
|
|
749
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
750
|
-
}
|
|
751
|
-
VizComponent.prototype.refreshProps = function () {
|
|
752
|
-
for (var key in this.props) {
|
|
753
|
-
if (this.widget[key] && typeof this.widget[key] === "function") {
|
|
754
|
-
this.widget[key](this.props[key]);
|
|
755
|
-
}
|
|
756
|
-
}
|
|
757
|
-
};
|
|
758
|
-
VizComponent.prototype.componentDidMount = function () {
|
|
759
|
-
this.widget = new this.props.type()
|
|
760
|
-
.target(this.base);
|
|
761
|
-
this.refreshProps();
|
|
762
|
-
this.widget
|
|
763
|
-
.render();
|
|
764
|
-
};
|
|
765
|
-
VizComponent.prototype.componentWillUnmount = function () {
|
|
766
|
-
this.widget
|
|
767
|
-
.target(null)
|
|
768
|
-
.render();
|
|
769
|
-
};
|
|
770
|
-
VizComponent.prototype.render = function () {
|
|
771
|
-
return _("div", { style: this.props.style });
|
|
772
|
-
};
|
|
773
|
-
VizComponent.prototype.componentDidUpdate = function () {
|
|
774
|
-
this.refreshProps();
|
|
775
|
-
this.widget.render();
|
|
776
|
-
};
|
|
777
|
-
return VizComponent;
|
|
778
|
-
}(JSXWidget.Component));
|
|
779
|
-
|
|
780
|
-
var VizInstance = /** @class */ (function (_super) {
|
|
781
|
-
__extends(VizInstance, _super);
|
|
782
|
-
function VizInstance() {
|
|
783
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
784
|
-
}
|
|
785
|
-
VizInstance.prototype.refreshProps = function () {
|
|
786
|
-
for (var key in this.props) {
|
|
787
|
-
if (this.widget[key] && typeof this.widget[key] === "function") {
|
|
788
|
-
this.widget[key](this.props[key]);
|
|
789
|
-
}
|
|
790
|
-
}
|
|
791
|
-
};
|
|
792
|
-
VizInstance.prototype.componentDidMount = function () {
|
|
793
|
-
this.widget = this.props.instance
|
|
794
|
-
.target(this.base);
|
|
795
|
-
this.refreshProps();
|
|
796
|
-
this.widget
|
|
797
|
-
.render();
|
|
798
|
-
};
|
|
799
|
-
VizInstance.prototype.componentWillUnmount = function () {
|
|
800
|
-
this.widget
|
|
801
|
-
.target(null)
|
|
802
|
-
.render();
|
|
803
|
-
};
|
|
804
|
-
VizInstance.prototype.render = function () {
|
|
805
|
-
return _("div", { style: this.props.style });
|
|
806
|
-
};
|
|
807
|
-
VizInstance.prototype.componentDidUpdate = function () {
|
|
808
|
-
this.refreshProps();
|
|
809
|
-
this.widget.render();
|
|
810
|
-
};
|
|
811
|
-
return VizInstance;
|
|
812
|
-
}(JSXWidget.Component));
|
|
813
|
-
|
|
814
|
-
var StatsTable = /** @class */ (function (_super) {
|
|
815
|
-
__extends(StatsTable, _super);
|
|
816
|
-
function StatsTable() {
|
|
817
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
818
|
-
}
|
|
819
|
-
StatsTable.prototype.transformData = function () {
|
|
820
|
-
var _this = this;
|
|
821
|
-
var totalRow = [["Total", 0, 0]];
|
|
822
|
-
var data = this.data();
|
|
823
|
-
data.forEach(function (row) {
|
|
824
|
-
totalRow[0][1] += row[1];
|
|
825
|
-
totalRow[0][2] += row[2];
|
|
826
|
-
});
|
|
827
|
-
return data
|
|
828
|
-
.concat(totalRow)
|
|
829
|
-
.map(function (row) {
|
|
830
|
-
return [
|
|
831
|
-
row[0],
|
|
832
|
-
_this.secondColumnFormat_exists() ? common.format(_this.secondColumnFormat())(row[1]) : row[1],
|
|
833
|
-
_this.thirdColumnFormat_exists() ? common.format(_this.thirdColumnFormat())(row[2]) : row[2]
|
|
834
|
-
];
|
|
835
|
-
});
|
|
836
|
-
};
|
|
837
|
-
StatsTable.prototype.update = function (domNode, element) {
|
|
838
|
-
this.tbodyColumnStyles_default([
|
|
839
|
-
{
|
|
840
|
-
"font-weight": "bold",
|
|
841
|
-
"width": this.firstColumnWidth(),
|
|
842
|
-
"text-align": "left"
|
|
843
|
-
},
|
|
844
|
-
{
|
|
845
|
-
"width": this.secondColumnWidth(),
|
|
846
|
-
"text-align": "right"
|
|
847
|
-
},
|
|
848
|
-
{
|
|
849
|
-
"width": this.thirdColumnWidth(),
|
|
850
|
-
"text-align": "right"
|
|
851
|
-
}
|
|
852
|
-
]);
|
|
853
|
-
this.evenRowStyles_default([
|
|
854
|
-
{
|
|
855
|
-
"font-weight": "bold",
|
|
856
|
-
"width": this.firstColumnWidth(),
|
|
857
|
-
"text-align": "left",
|
|
858
|
-
"font-color": this.evenRowFontColor(),
|
|
859
|
-
"background-color": this.evenRowBackgroundColor()
|
|
860
|
-
},
|
|
861
|
-
{
|
|
862
|
-
"width": this.secondColumnWidth(),
|
|
863
|
-
"text-align": "right",
|
|
864
|
-
"font-color": this.evenRowFontColor(),
|
|
865
|
-
"background-color": this.evenRowBackgroundColor()
|
|
866
|
-
},
|
|
867
|
-
{
|
|
868
|
-
"width": this.thirdColumnWidth(),
|
|
869
|
-
"text-align": "right",
|
|
870
|
-
"font-color": this.evenRowFontColor(),
|
|
871
|
-
"background-color": this.evenRowBackgroundColor()
|
|
872
|
-
}
|
|
873
|
-
]);
|
|
874
|
-
this.lastRowStyles_default({
|
|
875
|
-
"font-weight": "bold"
|
|
876
|
-
});
|
|
877
|
-
_super.prototype.update.call(this, domNode, element);
|
|
878
|
-
};
|
|
879
|
-
return StatsTable;
|
|
880
|
-
}(StyledTable));
|
|
881
|
-
StatsTable.prototype._class += " html_StatsTable";
|
|
882
|
-
StatsTable.prototype.publish("labelColor", "#333", "html-color", "Color of the text in the first column");
|
|
883
|
-
StatsTable.prototype.publish("primaryValueColor", "#333", "html-color", "Color of the text in the second column");
|
|
884
|
-
StatsTable.prototype.publish("secondaryValueColor", "#333", "html-color", "Color of the text in the third column");
|
|
885
|
-
StatsTable.prototype.publish("evenRowBackgroundColor", "#333", "html-color", "Background color of the even rows");
|
|
886
|
-
StatsTable.prototype.publish("evenRowFontColor", "#333", "html-color", "Font color of the even rows");
|
|
887
|
-
StatsTable.prototype.publish("firstColumnWidth", "auto", "string", "CSS style applied as the 'width' for the first column (ex: 40px)");
|
|
888
|
-
StatsTable.prototype.publish("secondColumnWidth", "1%", "string", "CSS style applied as the 'width' for the second column (ex: 40px)");
|
|
889
|
-
StatsTable.prototype.publish("thirdColumnWidth", "1%", "string", "CSS style applied as the 'width' for the third column (ex: 40px)");
|
|
890
|
-
StatsTable.prototype.publish("secondColumnFormat", "$,.0f", "string", "d3-format specifier applied to the second column's values", undefined, { optional: true });
|
|
891
|
-
StatsTable.prototype.publish("thirdColumnFormat", null, "string", "d3-format specifier applied to the third column's values", undefined, { optional: true });
|
|
892
|
-
|
|
893
|
-
function styleInject(css, ref) {
|
|
894
|
-
if ( ref === void 0 ) ref = {};
|
|
895
|
-
var insertAt = ref.insertAt;
|
|
896
|
-
|
|
897
|
-
if (typeof document === 'undefined') { return; }
|
|
898
|
-
|
|
899
|
-
var head = document.head || document.getElementsByTagName('head')[0];
|
|
900
|
-
var style = document.createElement('style');
|
|
901
|
-
style.type = 'text/css';
|
|
902
|
-
|
|
903
|
-
if (insertAt === 'top') {
|
|
904
|
-
if (head.firstChild) {
|
|
905
|
-
head.insertBefore(style, head.firstChild);
|
|
906
|
-
} else {
|
|
907
|
-
head.appendChild(style);
|
|
908
|
-
}
|
|
909
|
-
} else {
|
|
910
|
-
head.appendChild(style);
|
|
911
|
-
}
|
|
912
|
-
|
|
913
|
-
if (style.styleSheet) {
|
|
914
|
-
style.styleSheet.cssText = css;
|
|
915
|
-
} else {
|
|
916
|
-
style.appendChild(document.createTextNode(css));
|
|
917
|
-
}
|
|
918
|
-
}
|
|
919
|
-
|
|
920
|
-
var css_248z = "#wrap{width:100%}#left,#right{padding:5px}#left{background-color:red;display:block;overflow:hidden;text-align:left;text-overflow:ellipsis}#left,#right{white-space:nowrap}#right{background-color:orange;float:right;text-align:right}.html_TitleBar>.main{display:block;width:100%}.html_TitleBar .title{display:block;font-size:20px;font-weight:700;overflow:hidden;padding:4px;text-align:left;text-overflow:ellipsis;white-space:nowrap}.html_TitleBar .icon-bar{float:right;line-height:28px;padding:4px;text-align:right;white-space:nowrap}.html_TitleBar .icon-bar-item,.html_TitleBar .icon-bar-item>div{display:inline}.html_TitleBar .icon-bar a{color:#a9a9a9;padding-bottom:4px;padding-top:4px;text-align:center;transition:all .3s ease}.html_TitleBar .icon-bar a:hover{background-color:#f5f5f5}.html_TitleBar .icon-bar a.selected{background-color:#efe5e5}.html_TitleBar .icon-bar a.spacer{color:none;padding-bottom:0;padding-left:8px;padding-top:2px;text-align:center}.html_TitleBar .icon-bar a.spacer:hover{background-color:transparent}.html_TitleBar .icon-bar .active{background-color:#4caf50}";
|
|
921
|
-
styleInject(css_248z);
|
|
922
|
-
|
|
923
|
-
var Item = /** @class */ (function (_super) {
|
|
924
|
-
__extends(Item, _super);
|
|
925
|
-
function Item(owner) {
|
|
926
|
-
var _this = _super.call(this) || this;
|
|
927
|
-
_this._owner = owner;
|
|
928
|
-
_this._tag = "a";
|
|
929
|
-
return _this;
|
|
930
|
-
}
|
|
931
|
-
return Item;
|
|
932
|
-
}(common.HTMLWidget));
|
|
933
|
-
var Button = /** @class */ (function (_super) {
|
|
934
|
-
__extends(Button, _super);
|
|
935
|
-
function Button(owner, icon) {
|
|
936
|
-
var _this = _super.call(this, owner) || this;
|
|
937
|
-
_this._icon = icon;
|
|
938
|
-
return _this;
|
|
939
|
-
}
|
|
940
|
-
Button.prototype.icon = function () {
|
|
941
|
-
return this._icon;
|
|
942
|
-
};
|
|
943
|
-
Button.prototype.enter = function (domNode, element) {
|
|
944
|
-
var _this = this;
|
|
945
|
-
_super.prototype.enter.call(this, domNode, element);
|
|
946
|
-
element
|
|
947
|
-
.attr("href", "#")
|
|
948
|
-
.on("click", function (d, idx, groups) { return _this._owner.titleBarClick(_this, d, idx, groups); })
|
|
949
|
-
.append("i")
|
|
950
|
-
.attr("class", "fa ".concat(this._icon, " fa-lg fa-fw"));
|
|
951
|
-
};
|
|
952
|
-
return Button;
|
|
953
|
-
}(Item));
|
|
954
|
-
var ToggleButton = /** @class */ (function (_super) {
|
|
955
|
-
__extends(ToggleButton, _super);
|
|
956
|
-
function ToggleButton() {
|
|
957
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
958
|
-
}
|
|
959
|
-
ToggleButton.prototype.enter = function (domNode, element) {
|
|
960
|
-
var _this = this;
|
|
961
|
-
element.on("click.sel", function (d, idx, groups) {
|
|
962
|
-
_this.selected(!_this.selected());
|
|
963
|
-
_this.render();
|
|
964
|
-
});
|
|
965
|
-
_super.prototype.enter.call(this, domNode, element);
|
|
966
|
-
};
|
|
967
|
-
ToggleButton.prototype.update = function (domNode, element) {
|
|
968
|
-
_super.prototype.update.call(this, domNode, element);
|
|
969
|
-
this._element.classed("selected", this.selected());
|
|
970
|
-
};
|
|
971
|
-
return ToggleButton;
|
|
972
|
-
}(Button));
|
|
973
|
-
ToggleButton.prototype.publish("selected", false, "boolean");
|
|
974
|
-
var Spacer = /** @class */ (function (_super) {
|
|
975
|
-
__extends(Spacer, _super);
|
|
976
|
-
function Spacer() {
|
|
977
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
978
|
-
}
|
|
979
|
-
Spacer.prototype.enter = function (domNode, element) {
|
|
980
|
-
_super.prototype.enter.call(this, domNode, element);
|
|
981
|
-
element
|
|
982
|
-
.attr("class", "spacer")
|
|
983
|
-
.attr("href", "#")
|
|
984
|
-
.append("i");
|
|
985
|
-
};
|
|
986
|
-
return Spacer;
|
|
987
|
-
}(Item));
|
|
988
|
-
var TitleBar = /** @class */ (function (_super) {
|
|
989
|
-
__extends(TitleBar, _super);
|
|
990
|
-
function TitleBar() {
|
|
991
|
-
return _super.call(this) || this;
|
|
992
|
-
}
|
|
993
|
-
TitleBar.prototype.enter = function (domNode, element) {
|
|
994
|
-
_super.prototype.enter.call(this, domNode, element);
|
|
995
|
-
this._divMain = element.append("div")
|
|
996
|
-
.attr("class", "main");
|
|
997
|
-
this._divIconBar = this._divMain.append("div")
|
|
998
|
-
.attr("class", "icon-bar");
|
|
999
|
-
this._divTitle = this._divMain.append("div")
|
|
1000
|
-
.attr("class", "title");
|
|
1001
|
-
};
|
|
1002
|
-
TitleBar.prototype.update = function (domNode, element) {
|
|
1003
|
-
_super.prototype.update.call(this, domNode, element);
|
|
1004
|
-
this._divTitle.text(this.title());
|
|
1005
|
-
var icons = this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());
|
|
1006
|
-
icons.enter().append("div")
|
|
1007
|
-
.attr("class", "icon-bar-item")
|
|
1008
|
-
.each(function (d) {
|
|
1009
|
-
d.target(this);
|
|
1010
|
-
})
|
|
1011
|
-
.merge(icons)
|
|
1012
|
-
.each(function (d) {
|
|
1013
|
-
d.render();
|
|
1014
|
-
});
|
|
1015
|
-
icons.exit()
|
|
1016
|
-
.each(function (d) {
|
|
1017
|
-
d.target(null);
|
|
1018
|
-
})
|
|
1019
|
-
.remove();
|
|
1020
|
-
icons.order();
|
|
1021
|
-
};
|
|
1022
|
-
return TitleBar;
|
|
1023
|
-
}(JSXWidget));
|
|
1024
|
-
TitleBar.prototype._class += " html_TitleBar";
|
|
1025
|
-
TitleBar.prototype.publish("title", "", "string");
|
|
1026
|
-
TitleBar.prototype.publish("buttons", [], "widgetArray");
|
|
1027
|
-
|
|
1028
|
-
exports.BUILD_VERSION = BUILD_VERSION;
|
|
1029
|
-
exports.BreakdownTable = BreakdownTable;
|
|
1030
|
-
exports.Button = Button;
|
|
1031
|
-
exports.HTMLTooltip = HTMLTooltip;
|
|
1032
|
-
exports.Item = Item;
|
|
1033
|
-
exports.JSXWidget = JSXWidget;
|
|
1034
|
-
exports.PKG_NAME = PKG_NAME;
|
|
1035
|
-
exports.PKG_VERSION = PKG_VERSION;
|
|
1036
|
-
exports.ReactD3 = ReactD3;
|
|
1037
|
-
exports.SimpleTable = SimpleTable;
|
|
1038
|
-
exports.Spacer = Spacer;
|
|
1039
|
-
exports.StatsTable = StatsTable;
|
|
1040
|
-
exports.StyledTable = StyledTable;
|
|
1041
|
-
exports.TitleBar = TitleBar;
|
|
1042
|
-
exports.ToggleButton = ToggleButton;
|
|
1043
|
-
exports.VNode = VNode;
|
|
1044
|
-
exports.VizComponent = VizComponent;
|
|
1045
|
-
exports.VizInstance = VizInstance;
|
|
1046
|
-
|
|
1047
|
-
}));
|
|
1
|
+
var we=Object.defineProperty;var h=(e,t)=>we(e,"name",{value:t,configurable:!0});var Je="@hpcc-js/html",Xe="3.1.1",Ze="3.2.1";import{HTMLWidget as xe,select as Ce}from"@hpcc-js/common";import{scopedLogger as ke}from"@hpcc-js/util";var k=class extends xe{static{h(this,"HTMLTooltip")}_triggerElement;_contentNode;_prevContentNode;_tooltipElement;_arrowElement;_tooltipHTMLCallback=h(t=>"<b>_tooltipHTMLCallback is undefined</b>","_tooltipHTMLCallback");_logger=ke("html/HTMLTooltip");constructor(){super(),this.visible(!1)}tooltipHTML(t){return this._tooltipHTMLCallback=t,this}tooltipContent(t){return arguments.length?(this._contentNode=t,this):this._contentNode}triggerElement(t){return this._triggerElement=t,this}enter(t,o){super.enter(t,o);let r=Ce("body");this._tooltipElement=r.append("div").attr("class","tooltip-div").style("z-index","2147483638").style("position","fixed"),this._arrowElement=r.append("div").attr("class","arrow-div").style("z-index","2147483638").style("position","fixed")}update(t,o){if(super.update(t,o),this._contentNode!==this._prevContentNode){let r=this._tooltipElement.node();[...r.querySelectorAll("*")].map(n=>n.__data__).filter(n=>n).forEach(n=>{typeof n.target=="function"&&n.target(null),typeof n.exit=="function"&&n.exit()}),r.innerHTML="",r.appendChild(this._contentNode),this._prevContentNode=this._contentNode}if(this._contentNode?this.onShowContent(this._contentNode):this._tooltipElement.html(()=>this._tooltipHTMLCallback(this.data())),this.fitContent()){this._tooltipElement.style("width","auto").style("height","auto").style("padding","0px").style("box-sizing","content-box");let r=this._tooltipElement.node().getBoundingClientRect();this.tooltipWidth_default(r.width),this.tooltipHeight_default(r.height)}this._closing=!1,this._tooltipElement.style("background-color",this.tooltipColor()).style("color",this.fontColor()).style("width",this.tooltipWidth()+"px").style("height",this.tooltipHeight()+"px").style("opacity",1).style("padding",this.padding()+"px").style("pointer-events",this.enablePointerEvents()?"all":"none").style("box-sizing","content-box"),this._arrowElement.style("opacity",1).style("pointer-events","none"),this.updateTooltipPosition()}onShowContent(t){}updateTooltipPosition(){let t=this.calcReferenceBBox(),o=this.calcTooltipDirection(t),r=t[o];return this._tooltipElement.style("top",r.y+"px").style("left",r.x+"px"),this.setArrowPosition(r,o),r}calcTooltipDirection(t){let o=Object.keys(t),r=this.direction();o.sort((i,s)=>i===r?-1:1);let n={top:0,left:0,width:window.innerWidth,height:window.innerHeight};for(let i=0;i<o.length;i++){let s={top:t[o[i]].y,left:t[o[i]].x,width:this.tooltipWidth(),height:this.tooltipHeight()};if(this.rectFits(s,n))return o[i]}return this._logger.warning(`Tooltip doesn't fit in the window for any of the directions. Defaulting to '${r}'`),this._logger.debug(n),this._logger.debug({top:t[r].y,left:t[r].x,width:this.tooltipWidth(),height:this.tooltipHeight()}),r}rectFits(t,o){return t.top>=o.top&&t.left>=o.left&&t.width+t.left<=o.width+o.left&&t.height+t.top<=o.height+o.top}setArrowPosition(t,o){let r,n,i="border-top-color";switch(this._arrowElement.style("border",`${this.arrowHeight()}px solid ${this.tooltipColor()}`).style("border-top-color","transparent").style("border-right-color","transparent").style("border-bottom-color","transparent").style("border-left-color","transparent"),o){case"n":r=t.y+this.tooltipHeight()+this.padding()*2,n=t.x+this.tooltipWidth()/2-this.arrowWidth()/2+this.padding(),i="border-top-color",this._arrowElement.style("border-top-width",`${this.arrowHeight()}px`).style("border-bottom-width","0px").style("border-left-width",`${this.arrowWidth()/2}px`).style("border-right-width",`${this.arrowWidth()/2}px`);break;case"s":r=t.y-this.arrowHeight(),n=t.x+this.padding()+this.tooltipWidth()/2-this.arrowWidth()/2,i="border-bottom-color",this._arrowElement.style("border-top-width","0px").style("border-bottom-width",`${this.arrowHeight()}px`).style("border-left-width",`${this.arrowWidth()/2}px`).style("border-right-width",`${this.arrowWidth()/2}px`);break;case"e":r=t.y+this.tooltipHeight()/2+this.padding()-this.arrowWidth()/2,n=t.x-this.arrowHeight(),i="border-right-color",this._arrowElement.style("border-top-width",`${this.arrowWidth()/2}px`).style("border-bottom-width",`${this.arrowWidth()/2}px`).style("border-left-width","0px").style("border-right-width",`${this.arrowHeight()}px`);break;case"w":r=t.y+this.tooltipHeight()/2-this.arrowWidth()/2+this.padding(),n=t.x+this.tooltipWidth()+this.padding()*2,i="border-left-color",this._arrowElement.style("border-top-width",`${this.arrowWidth()/2}px`).style("border-bottom-width",`${this.arrowWidth()/2}px`).style("border-left-width",`${this.arrowHeight()}px`).style("border-right-width","0px");break}return typeof r<"u"&&typeof n<"u"?this._arrowElement.style("top",r+"px").style("left",n+"px").style(i,this.tooltipColor()).style("opacity",1):this._arrowElement.style("opacity",0),t}getReferenceNode(){return this._triggerElement?this._triggerElement.node():this.element().node().parentNode.parentNode}_cursorLoc;calcReferenceBBox(){let t=this.getReferenceNode(),{top:o,left:r,width:n,height:i}=t.getBoundingClientRect(),s=this.tooltipWidth(),p=this.tooltipHeight(),_=s/2,a=p/2,d=this.arrowHeight(),l=this.padding(),f=l*2;return this.followCursor()&&this._cursorLoc&&(r=this._cursorLoc[0],o=this._cursorLoc[1],n=1,i=1),{n:{x:r+n/2-_-l,y:o-p-d-f},e:{x:r+n+d,y:o+i/2-a-l},s:{x:r+n/2-_-l,y:o+i+d},w:{x:r-s-d-f,y:o+i/2-a-l},nw:{x:r-s-f,y:o-p-f},ne:{x:r+n,y:o-p-f},se:{x:r+n,y:o+i},sw:{x:r-s-f,y:o+i}}}_closing=!1;mouseout(){this._closing=!0,this._tooltipElement.on("mouseover",()=>{this._closing=!1}),this._tooltipElement.on("mouseout",()=>{this.mouseout()}),setTimeout(()=>{this._closing&&this.visible(!1)},this.closeDelay())}visible(t){return arguments.length?(this._arrowElement&&(this._arrowElement.style("visibility",t?"visible":"hidden"),this._tooltipElement.style("visibility",t?"visible":"hidden")),super.visible(t),this):super.visible()}exit(t,o){this._arrowElement&&(this._arrowElement.remove(),this._tooltipElement.remove()),super.exit(t,o)}};k.prototype._class+=" html_HTMLTooltip";k.prototype.publish("fitContent",!1,"boolean","If true, tooltip will grow to fit its html content");k.prototype.publish("followCursor",!1,"boolean","If true, tooltip will display relative to cursor location");k.prototype.publish("closeDelay",400,"number","Number of milliseconds to wait before closing tooltip (cancelled on tooltip mouseover event)");k.prototype.publish("direction","n","set","Direction in which to display the tooltip",["n","s","e","w","ne","nw","se","sw"]);k.prototype.publish("padding",8,"number","Padding (pixels)");k.prototype.publish("arrowWidth",16,"number","Width (or height depending on direction) of the tooltip arrow (pixels)");k.prototype.publish("arrowHeight",8,"number","Height (or width depending on direction) of the tooltip arrow (pixels)");k.prototype.publish("fontColor","#FFF","html-color","The default font color for text in the tooltip");k.prototype.publish("tooltipColor","#000000EE","html-color","Background color of the tooltip");k.prototype.publish("tooltipWidth",200,"number","Width of the tooltip (not including arrow) (pixels)");k.prototype.publish("tooltipHeight",200,"number","Height of the tooltip (not including arrow) (pixels)");k.prototype.publish("enablePointerEvents",!1,"boolean","If true, the 'pointer-events: all' style will be used");import{HTMLWidget as Se,select as Ee}from"@hpcc-js/common";var B=class extends Se{static{h(this,"SimpleTable")}_table;_tbody;_thead;_theadRow;constructor(){super()}transformData(){return this.data()}enter(t,o){super.enter(t,o),this._table=o.append("table"),this._thead=this._table.append("thead"),this._theadRow=this._thead.append("tr"),this._tbody=this._table.append("tbody")}update(t,o){super.update(t,o),this._table.style("width",this.autoWidth()?"auto":"100%");let r=this._theadRow.selectAll("th").data(this.columns());r.enter().append("th").attr("class",(i,s)=>`th-${s}`).merge(r).text(i=>i.toString()),r.exit().remove();let n=this._tbody.selectAll("tr").data(this.transformData());n.enter().append("tr").merge(n).each(function(i){let p=Ee(this).selectAll("td").data(i);p.enter().append("td").attr("class",(_,a)=>`col-${a}`).merge(p).text(_=>_.toString()),p.exit().remove()}),n.exit().remove()}};B.prototype._class+=" html_SimpleTable";B.prototype.publish("autoWidth",!1,"boolean","If true, table width will be set to 'auto'. If false, the width is set to '100%'");var S=class extends B{static{h(this,"StyledTable")}constructor(){super()}applyStyleObject(t,o){Object.keys(o).forEach(r=>{t.style(r,o[r])})}update(t,o){super.update(t,o),o.selectAll("tr,th,td").attr("style","").style("font-family",this.fontFamily()).style("color",this.fontColor()),this.theadColumnStyles().forEach((s,p)=>{this.applyStyleObject(o.select(`.th-${p}`),s)}),this.tbodyColumnStyles().forEach((s,p)=>{this.applyStyleObject(o.selectAll(`.col-${p}`),s)});let r=Object.keys(this.evenRowStyles()).length>0,n=Object.keys(this.lastRowStyles()).length>0,i=o.selectAll("tbody > tr");if(r){let s=i.select(function(p,_){return _%2?this:null});this.applyStyleObject(s,this.evenRowStyles())}if(n){let s=i.select(function(p,_,a){return _===a.length-1?this:null});this.applyStyleObject(s,this.lastRowStyles())}}};S.prototype._class+=" html_StyledTable";S.prototype.publish("fontFamily","Verdana","string","Base font-family used within the table");S.prototype.publish("fontColor","#333","string","Base font color used within the table");S.prototype.publish("theadColumnStyles",[],"array",'Array of objects containing styles for the thead columns (ex: [{"color":"red"},{"color":"blue"}])');S.prototype.publish("tbodyColumnStyles",[],"array",'Array of objects containing styles for the tbody columns (ex: [{"color":"red"},{"color":"blue"}])');S.prototype.publish("lastRowStyles",{},"object",'Object containing styles for the last row (ex: {"color":"red"})');S.prototype.publish("evenRowStyles",{},"object",'Object containing styles for even rows (ex: {"background-color":"#AAA"})');var w=class extends S{static{h(this,"BreakdownTable")}_tooltip;constructor(){super()}transformData(){let t=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount();return this.breakdownData(t)}breakdownData(t){let o=this.data().length,r=this.data().reduce((_,a)=>_+a[1],0),n=[],i=0;this.data().sort((_,a)=>_[1]>a[1]?-1:1);let p=o-t>0;if(this.data().filter((_,a)=>p?a<t-1:!0).forEach(_=>{let a=Math.round(_[1]/r*100);i+=a,n.push([_[0],a+"%"])}),p){let _=`${this.otherLabel()} (${o-t+1})`,a="~"+(100-i)+"%";n.push([_,a])}return n}calculateRowCount(){let t=this.columns().length>0?this.thFontSize()+5:0,o=this.fontSize()+5,r=this.height()-t;return Math.floor(r/o)}enter(t,o){super.enter(t,o),this._tooltip=new k().target(t),this._tooltip.tooltipHTML(r=>{let n=this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount(),i=Math.max(...r.map(f=>this.textSize(f[0],this.fontFamily(),this.fontSize()).height))??this.fontSize(),s=Math.max(...r.map(f=>this.textSize(f[0],this.fontFamily(),this.fontSize()).width)),p=30,_=2,a=_*(s+p)+this._tooltip.padding()*2,d=i*Math.ceil((r.length-n)/_)+this._tooltip.padding()*2;this._tooltip.tooltipWidth(a),this._tooltip.tooltipHeight(d);let l=this.breakdownData(this.data().length).slice(n-1);return`<div style="
|
|
2
|
+
width: 100%;
|
|
3
|
+
height: 100%;
|
|
4
|
+
font-size: ${this.fontSize()}px;
|
|
5
|
+
">${l.map(f=>`<div style="
|
|
6
|
+
float:left;
|
|
7
|
+
width:${Math.floor(99/_)}%;
|
|
8
|
+
">${f[0]}: ${f[1]}</div>`).join("")}</div>`})}update(t,o){if(this.theadColumnStyles_default([{color:this.thFirstColor(),"font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.labelAlignment(),width:"auto",padding:"0px"},{width:"1%","font-size":this.thFontSize()+"px","font-weight":this.thFontWeight(),"text-align":this.percentageAlignment(),padding:"0px"}]),this.tbodyColumnStyles_default([{color:this.topLabelColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.topPercentageColor(),"font-size":this.fontSize()+"px","font-weight":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),this.lastRowStyles_default([{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherLabelBold()?"bold":"normal","text-align":this.labelAlignment(),width:"auto",padding:"0px"},{color:this.otherLabelColor(),"font-size":this.fontSize()+"px","font-weight":this.otherPercentageBold()?"bold":"normal","text-align":this.percentageAlignment(),width:"1%",padding:"0px"}]),super.update(t,o),(this.useCalculatedRowCount()?this.calculateRowCount():this.rowCount())<this.data().length){let n=o.select("tbody > tr:last-child"),i=this;n.on("mouseout.tooltip",s=>{i._tooltip._triggerElement=n,i._tooltip.visible(!1).render()}).on("mouseenter.tooltip",s=>{i._tooltip._triggerElement=n,i._tooltip.direction("n").data(i.data()).visible(!0).render()})}}};w.prototype._class+=" html_BreakdownTable";w.prototype.publish("useCalculatedRowCount",!0,"boolean","If true, rowCount will be calculated and its default will be overwritten");w.prototype.publish("rowCount",5,"number","Number of total rows to display (including the 'other' row)",void 0,{disable:h(e=>e.useCalculatedRowCount(),"disable")});w.prototype.publish("fontSize",14,"number","Font size (pixels)");w.prototype.publish("labelAlignment","left","set","Alignment of the label column text",["left","center","right"]);w.prototype.publish("percentageAlignment","center","set","Alignment of the percentage column text",["left","center","right"]);w.prototype.publish("topLabelColor","#333","html-color","Color of displayed 'top' labels");w.prototype.publish("topPercentageColor","#1A99D5","html-color","Color of displayed 'top' percentages");w.prototype.publish("topPercentageBold",!0,"html-color","If true, the 'top' percentages will be bold");w.prototype.publish("otherLabel","Other","string","Label text for the 'other' row");w.prototype.publish("otherLabelColor","#AAA","html-color","Color of the 'other' label");w.prototype.publish("otherLabelBold",!1,"html-color","If true, the 'other' label will be bold");w.prototype.publish("otherPercentageColor","#AAA","html-color","Color of the 'other' percentage");w.prototype.publish("otherPercentageBold",!1,"html-color","If true, the 'other' percentage will be bold");w.prototype.publish("thFontWeight","bold","string","Font weight for th elements");w.prototype.publish("thFontSize",26,"number","Font size for th elements");w.prototype.publish("thFirstColor","#333","html-color","Text color of the first th element");w.prototype.publish("thLastColor","#333","html-color","Text color of the last th element");import{HTMLWidget as Ve}from"@hpcc-js/common";var He=Object.defineProperty,c=h((e,t)=>He(e,"name",{value:t,configurable:!0}),"l");var nt,g,Yt,We,L,Bt,te,dt,xt,ft,gt,Te,j={},ee=[],Re=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,it=Array.isArray;function P(e,t){for(var o in t)e[o]=t[o];return e}h(P,"w");c(P,"d");function Ct(e){e&&e.parentNode&&e.parentNode.removeChild(e)}h(Ct,"ve");c(Ct,"w");function R(e,t,o){var r,n,i,s={};for(i in t)i=="key"?r=t[i]:i=="ref"?n=t[i]:s[i]=t[i];if(arguments.length>2&&(s.children=arguments.length>3?nt.call(arguments,2):o),typeof e=="function"&&e.defaultProps!=null)for(i in e.defaultProps)s[i]===void 0&&(s[i]=e.defaultProps[i]);return U(e,s,r,n,null)}h(R,"R");c(R,"_");function U(e,t,o,r,n){var i={type:e,props:t,key:o,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,constructor:void 0,__v:n??++Yt,__i:-1,__u:0};return n==null&&g.vnode!=null&&g.vnode(i),i}h(U,"W");c(U,"g");function N(e){return e.children}h(N,"S");c(N,"b");function H(e,t){this.props=e,this.context=t}h(H,"k");c(H,"k");function D(e,t){if(t==null)return e.__?D(e.__,e.__i+1):null;for(var o;t<e.__k.length;t++)if((o=e.__k[t])!=null&&o.__e!=null)return o.__e;return typeof e.type=="function"?D(e):null}h(D,"U");c(D,"x");function kt(e){var t,o;if((e=e.__)!=null&&e.__c!=null){for(e.__e=e.__c.base=null,t=0;t<e.__k.length;t++)if((o=e.__k[t])!=null&&o.__e!=null){e.__e=e.__c.base=o.__e;break}return kt(e)}}h(kt,"me");c(kt,"C");function mt(e){(!e.__d&&(e.__d=!0)&&L.push(e)&&!q.__r++||Bt!==g.debounceRendering)&&((Bt=g.debounceRendering)||te)(q)}h(mt,"se");c(mt,"S");function q(){var e,t,o,r,n,i,s,p;for(L.sort(dt);e=L.shift();)e.__d&&(t=L.length,r=void 0,i=(n=(o=e).__v).__e,s=[],p=[],o.__P&&((r=P({},n)).__v=n.__v+1,g.vnode&&g.vnode(r),lt(o.__P,r,n,o.__n,o.__P.namespaceURI,32&n.__u?[i]:null,s,i??D(n),!!(32&n.__u),p),r.__v=n.__v,r.__.__k[r.__i]=r,Ht(s,r,p),r.__e!=i&&kt(r)),L.length>t&&L.sort(dt));q.__r=0}h(q,"V");c(q,"M");function St(e,t,o,r,n,i,s,p,_,a,d){var l,f,u,x,W,C=r&&r.__k||ee,m=t.length;for(o.__d=_,oe(o,t,C),_=o.__d,l=0;l<m;l++)(u=o.__k[l])!=null&&(f=u.__i===-1?j:C[u.__i]||j,u.__i=l,lt(e,u,f,n,i,s,p,_,a,d),x=u.__e,u.ref&&f.ref!=u.ref&&(f.ref&&st(f.ref,null,u),d.push(u.ref,u.__c||x,u)),W==null&&x!=null&&(W=x),65536&u.__u||f.__k===u.__k?_=Et(u,_,e):typeof u.type=="function"&&u.__d!==void 0?_=u.__d:x&&(_=x.nextSibling),u.__d=void 0,u.__u&=-196609);o.__d=_,o.__e=W}h(St,"ye");c(St,"P");function oe(e,t,o){var r,n,i,s,p,_=t.length,a=o.length,d=a,l=0;for(e.__k=[],r=0;r<_;r++)(n=t[r])!=null&&typeof n!="boolean"&&typeof n!="function"?(s=r+l,(n=e.__k[r]=typeof n=="string"||typeof n=="number"||typeof n=="bigint"||n.constructor==String?U(null,n,null,null,null):it(n)?U(N,{children:n},null,null,null):n.constructor===void 0&&n.__b>0?U(n.type,n.props,n.key,n.ref?n.ref:null,n.__v):n).__=e,n.__b=e.__b+1,i=null,(p=n.__i=re(n,o,s,d))!==-1&&(d--,(i=o[p])&&(i.__u|=131072)),i==null||i.__v===null?(p==-1&&l--,typeof n.type!="function"&&(n.__u|=65536)):p!==s&&(p==s-1?l--:p==s+1?l++:(p>s?l--:l++,n.__u|=65536))):n=e.__k[r]=null;if(d)for(r=0;r<a;r++)(i=o[r])!=null&&!(131072&i.__u)&&(i.__e==e.__d&&(e.__d=D(i)),Wt(i,i))}h(oe,"Xe");c(oe,"$");function Et(e,t,o){var r,n;if(typeof e.type=="function"){for(r=e.__k,n=0;r&&n<r.length;n++)r[n]&&(r[n].__=e,t=Et(r[n],t,o));return t}e.__e!=t&&(t&&e.type&&!o.contains(t)&&(t=D(e)),o.insertBefore(e.__e,t||null),t=e.__e);do t=t&&t.nextSibling;while(t!=null&&t.nodeType===8);return t}h(Et,"ge");c(Et,"I");function K(e,t){return t=t||[],e==null||typeof e=="boolean"||(it(e)?e.some(function(o){K(o,t)}):t.push(e)),t}h(K,"I");c(K,"H");function re(e,t,o,r){var n=e.key,i=e.type,s=o-1,p=o+1,_=t[o];if(_===null||_&&n==_.key&&i===_.type&&!(131072&_.__u))return o;if(r>(_!=null&&!(131072&_.__u)?1:0))for(;s>=0||p<t.length;){if(s>=0){if((_=t[s])&&!(131072&_.__u)&&n==_.key&&i===_.type)return s;s--}if(p<t.length){if((_=t[p])&&!(131072&_.__u)&&n==_.key&&i===_.type)return p;p++}}return-1}h(re,"et");c(re,"L");function yt(e,t,o){t[0]==="-"?e.setProperty(t,o??""):e[t]=o==null?"":typeof o!="number"||Re.test(t)?o:o+"px"}h(yt,"ce");c(yt,"T");function z(e,t,o,r,n){var i;t:if(t==="style")if(typeof o=="string")e.style.cssText=o;else{if(typeof r=="string"&&(e.style.cssText=r=""),r)for(t in r)o&&t in o||yt(e.style,t,"");if(o)for(t in o)r&&o[t]===r[t]||yt(e.style,t,o[t])}else if(t[0]==="o"&&t[1]==="n")i=t!==(t=t.replace(/(PointerCapture)$|Capture$/i,"$1")),t=t.toLowerCase()in e||t==="onFocusOut"||t==="onFocusIn"?t.toLowerCase().slice(2):t.slice(2),e.l||(e.l={}),e.l[t+i]=o,o?r?o.u=r.u:(o.u=xt,e.addEventListener(t,i?gt:ft,i)):e.removeEventListener(t,i?gt:ft,i);else{if(n=="http://www.w3.org/2000/svg")t=t.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if(t!="width"&&t!="height"&&t!="href"&&t!="list"&&t!="form"&&t!="tabIndex"&&t!="download"&&t!="rowSpan"&&t!="colSpan"&&t!="role"&&t!="popover"&&t in e)try{e[t]=o??"";break t}catch{}typeof o=="function"||(o==null||o===!1&&t[4]!=="-"?e.removeAttribute(t):e.setAttribute(t,t=="popover"&&o==1?"":o))}}h(z,"A");c(z,"A");function bt(e){return function(t){if(this.l){var o=this.l[t.type+e];if(t.t==null)t.t=xt++;else if(t.t<o.u)return;return o(g.event?g.event(t):t)}}}h(bt,"fe");c(bt,"F");function lt(e,t,o,r,n,i,s,p,_,a){var d,l,f,u,x,W,C,m,y,I,F,Q,$,Dt,Y,ct,T=t.type;if(t.constructor!==void 0)return null;128&o.__u&&(_=!!(32&o.__u),i=[p=t.__e=o.__e]),(d=g.__b)&&d(t);t:if(typeof T=="function")try{if(m=t.props,y="prototype"in T&&T.prototype.render,I=(d=T.contextType)&&r[d.__c],F=d?I?I.props.value:d.__:r,o.__c?C=(l=t.__c=o.__c).__=l.__E:(y?t.__c=l=new T(m,F):(t.__c=l=new H(m,F),l.constructor=T,l.render=ie),I&&I.sub(l),l.props=m,l.state||(l.state={}),l.context=F,l.__n=r,f=l.__d=!0,l.__h=[],l._sb=[]),y&&l.__s==null&&(l.__s=l.state),y&&T.getDerivedStateFromProps!=null&&(l.__s==l.state&&(l.__s=P({},l.__s)),P(l.__s,T.getDerivedStateFromProps(m,l.__s))),u=l.props,x=l.state,l.__v=t,f)y&&T.getDerivedStateFromProps==null&&l.componentWillMount!=null&&l.componentWillMount(),y&&l.componentDidMount!=null&&l.__h.push(l.componentDidMount);else{if(y&&T.getDerivedStateFromProps==null&&m!==u&&l.componentWillReceiveProps!=null&&l.componentWillReceiveProps(m,F),!l.__e&&(l.shouldComponentUpdate!=null&&l.shouldComponentUpdate(m,l.__s,F)===!1||t.__v===o.__v)){for(t.__v!==o.__v&&(l.props=m,l.state=l.__s,l.__d=!1),t.__e=o.__e,t.__k=o.__k,t.__k.some(function(tt){tt&&(tt.__=t)}),Q=0;Q<l._sb.length;Q++)l.__h.push(l._sb[Q]);l._sb=[],l.__h.length&&s.push(l);break t}l.componentWillUpdate!=null&&l.componentWillUpdate(m,l.__s,F),y&&l.componentDidUpdate!=null&&l.__h.push(function(){l.componentDidUpdate(u,x,W)})}if(l.context=F,l.props=m,l.__P=e,l.__e=!1,$=g.__r,Dt=0,y){for(l.state=l.__s,l.__d=!1,$&&$(t),d=l.render(l.props,l.state,l.context),Y=0;Y<l._sb.length;Y++)l.__h.push(l._sb[Y]);l._sb=[]}else do l.__d=!1,$&&$(t),d=l.render(l.props,l.state,l.context),l.state=l.__s;while(l.__d&&++Dt<25);l.state=l.__s,l.getChildContext!=null&&(r=P(P({},r),l.getChildContext())),y&&!f&&l.getSnapshotBeforeUpdate!=null&&(W=l.getSnapshotBeforeUpdate(u,x)),St(e,it(ct=d!=null&&d.type===N&&d.key==null?d.props.children:d)?ct:[ct],t,o,r,n,i,s,p,_,a),l.base=t.__e,t.__u&=-161,l.__h.length&&s.push(l),C&&(l.__E=l.__=null)}catch(tt){if(t.__v=null,_||i!=null){for(t.__u|=_?160:128;p&&p.nodeType===8&&p.nextSibling;)p=p.nextSibling;i[i.indexOf(p)]=null,t.__e=p}else t.__e=o.__e,t.__k=o.__k;g.__e(tt,t,o)}else i==null&&t.__v===o.__v?(t.__k=o.__k,t.__e=o.__e):t.__e=ne(o.__e,t,o,r,n,i,s,_,a);(d=g.diffed)&&d(t)}h(lt,"X");c(lt,"O");function Ht(e,t,o){t.__d=void 0;for(var r=0;r<o.length;r++)st(o[r],o[++r],o[++r]);g.__c&&g.__c(t,e),e.some(function(n){try{e=n.__h,n.__h=[],e.some(function(i){i.call(n)})}catch(i){g.__e(i,n.__v)}})}h(Ht,"be");c(Ht,"j");function ne(e,t,o,r,n,i,s,p,_){var a,d,l,f,u,x,W,C=o.props,m=t.props,y=t.type;if(y==="svg"?n="http://www.w3.org/2000/svg":y==="math"?n="http://www.w3.org/1998/Math/MathML":n||(n="http://www.w3.org/1999/xhtml"),i!=null){for(a=0;a<i.length;a++)if((u=i[a])&&"setAttribute"in u==!!y&&(y?u.localName===y:u.nodeType===3)){e=u,i[a]=null;break}}if(e==null){if(y===null)return document.createTextNode(m);e=document.createElementNS(n,y,m.is&&m),p&&(g.__m&&g.__m(t,i),p=!1),i=null}if(y===null)C===m||p&&e.data===m||(e.data=m);else{if(i=i&&nt.call(e.childNodes),C=o.props||j,!p&&i!=null)for(C={},a=0;a<e.attributes.length;a++)C[(u=e.attributes[a]).name]=u.value;for(a in C)if(u=C[a],a!="children"){if(a=="dangerouslySetInnerHTML")l=u;else if(!(a in m)){if(a=="value"&&"defaultValue"in m||a=="checked"&&"defaultChecked"in m)continue;z(e,a,null,u,n)}}for(a in m)u=m[a],a=="children"?f=u:a=="dangerouslySetInnerHTML"?d=u:a=="value"?x=u:a=="checked"?W=u:p&&typeof u!="function"||C[a]===u||z(e,a,u,C[a],n);if(d)p||l&&(d.__html===l.__html||d.__html===e.innerHTML)||(e.innerHTML=d.__html),t.__k=[];else if(l&&(e.innerHTML=""),St(e,it(f)?f:[f],t,o,r,y==="foreignObject"?"http://www.w3.org/1999/xhtml":n,i,s,i?i[0]:o.__k&&D(o,0),p,_),i!=null)for(a=i.length;a--;)Ct(i[a]);p||(a="value",y==="progress"&&x==null?e.removeAttribute("value"):x!==void 0&&(x!==e[a]||y==="progress"&&!x||y==="option"&&x!==C[a])&&z(e,a,x,C[a],n),a="checked",W!==void 0&&W!==e[a]&&z(e,a,W,C[a],n))}return e}h(ne,"tt");c(ne,"z");function st(e,t,o){try{if(typeof e=="function"){var r=typeof e.__u=="function";r&&e.__u(),r&&t==null||(e.__u=e(t))}else e.current=t}catch(n){g.__e(n,o)}}h(st,"ee");c(st,"N");function Wt(e,t,o){var r,n;if(g.unmount&&g.unmount(e),(r=e.ref)&&(r.current&&r.current!==e.__e||st(r,null,t)),(r=e.__c)!=null){if(r.componentWillUnmount)try{r.componentWillUnmount()}catch(i){g.__e(i,t)}r.base=r.__P=null}if(r=e.__k)for(n=0;n<r.length;n++)r[n]&&Wt(r[n],t,o||typeof e.type!="function");o||Ct(e.__e),e.__c=e.__=e.__e=e.__d=void 0}h(Wt,"Ce");c(Wt,"V");function ie(e,t,o){return this.constructor(e,o)}h(ie,"nt");c(ie,"q");function at(e,t,o){var r,n,i,s;g.__&&g.__(e,t),n=(r=typeof o=="function")?null:o&&o.__k||t.__k,i=[],s=[],lt(t,e=(!r&&o||t).__k=R(N,null,[e]),n||j,j,t.namespaceURI,!r&&o?[o]:n?null:t.firstChild?nt.call(t.childNodes):null,i,!r&&o?o:n?n.__e:t.firstChild,r,s),Ht(i,e,s)}h(at,"te");c(at,"B");nt=ee.slice,g={__e:c(function(e,t,o,r){for(var n,i,s;t=t.__;)if((n=t.__c)&&!n.__)try{if((i=n.constructor)&&i.getDerivedStateFromError!=null&&(n.setState(i.getDerivedStateFromError(e)),s=n.__d),n.componentDidCatch!=null&&(n.componentDidCatch(e,r||{}),s=n.__d),s)return n.__E=n}catch(p){e=p}throw e},"__e")},Yt=0,We=c(function(e){return e!=null&&e.constructor==null},"t"),H.prototype.setState=function(e,t){var o;o=this.__s!=null&&this.__s!==this.state?this.__s:this.__s=P({},this.state),typeof e=="function"&&(e=e(P({},o),this.props)),e&&P(o,e),e!=null&&this.__v&&(t&&this._sb.push(t),mt(this))},H.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),mt(this))},H.prototype.render=N,L=[],te=typeof Promise=="function"?Promise.prototype.then.bind(Promise.resolve()):setTimeout,dt=c(function(e,t){return e.__v.__b-t.__v.__b},"f"),q.__r=0,xt=0,ft=bt(!1),gt=bt(!0),Te=0;var M,b,ut,Mt,ot=0,le=[],v=g,It=v.__b,$t=v.__r,zt=v.diffed,Ot=v.__c,Ut=v.unmount,Vt=v.__;function G(e,t){v.__h&&v.__h(b,e,ot||t),ot=0;var o=b.__H||(b.__H={__:[],__h:[]});return e>=o.__.length&&o.__.push({}),o.__[e]}h(G,"q");c(G,"d");function Pe(e){return ot=1,se(Tt,e)}h(Pe,"He");c(Pe,"h");function se(e,t,o){var r=G(M++,2);if(r.t=e,!r.__c&&(r.__=[o?o(t):Tt(void 0,t),function(p){var _=r.__N?r.__N[0]:r.__[0],a=r.t(_,p);_!==a&&(r.__N=[a,r.__[1]],r.__c.setState({}))}],r.__c=b,!b.u)){var n=c(function(p,_,a){if(!r.__c.__H)return!0;var d=r.__c.__H.__.filter(function(f){return!!f.__c});if(d.every(function(f){return!f.__N}))return!i||i.call(this,p,_,a);var l=!1;return d.forEach(function(f){if(f.__N){var u=f.__[0];f.__=f.__N,f.__N=void 0,u!==f.__[0]&&(l=!0)}}),!(!l&&r.__c.props===p)&&(!i||i.call(this,p,_,a))},"f");b.u=!0;var i=b.shouldComponentUpdate,s=b.componentWillUpdate;b.componentWillUpdate=function(p,_,a){if(this.__e){var d=i;i=void 0,n(p,_,a),i=d}s&&s.call(this,p,_,a)},b.shouldComponentUpdate=n}return r.__N||r.__}h(se,"oe");c(se,"p");function Ae(e,t){var o=G(M++,3);!v.__s&&_t(o.__H,t)&&(o.__=e,o.i=t,b.__H.__h.push(o))}h(Ae,"De");c(Ae,"y");function Fe(e,t){var o=G(M++,4);!v.__s&&_t(o.__H,t)&&(o.__=e,o.i=t,b.__h.push(o))}h(Fe,"Te");c(Fe,"_");function ae(e,t){var o=G(M++,7);return _t(o.__H,t)&&(o.__=e(),o.__H=t,o.__h=e),o.__}h(ae,"re");c(ae,"T");function Le(e,t){return ot=8,ae(function(){return e},t)}h(Le,"Me");c(Le,"q");function _e(){for(var e;e=le.shift();)if(e.__P&&e.__H)try{e.__H.__h.forEach(V),e.__H.__h.forEach(rt),e.__H.__h=[]}catch(t){e.__H.__h=[],v.__e(t,e.__v)}}h(_e,"_t");c(_e,"j");v.__b=function(e){b=null,It&&It(e)},v.__=function(e,t){e&&t.__k&&t.__k.__m&&(e.__m=t.__k.__m),Vt&&Vt(e,t)},v.__r=function(e){$t&&$t(e),M=0;var t=(b=e.__c).__H;t&&(ut===b?(t.__h=[],b.__h=[],t.__.forEach(function(o){o.__N&&(o.__=o.__N),o.i=o.__N=void 0})):(t.__h.forEach(V),t.__h.forEach(rt),t.__h=[],M=0)),ut=b},v.diffed=function(e){zt&&zt(e);var t=e.__c;t&&t.__H&&(t.__H.__h.length&&(le.push(t)!==1&&Mt===v.requestAnimationFrame||((Mt=v.requestAnimationFrame)||he)(_e)),t.__H.__.forEach(function(o){o.i&&(o.__H=o.i),o.i=void 0})),ut=b=null},v.__c=function(e,t){t.some(function(o){try{o.__h.forEach(V),o.__h=o.__h.filter(function(r){return!r.__||rt(r)})}catch(r){t.some(function(n){n.__h&&(n.__h=[])}),t=[],v.__e(r,o.__v)}}),Ot&&Ot(e,t)},v.unmount=function(e){Ut&&Ut(e);var t,o=e.__c;o&&o.__H&&(o.__H.__.forEach(function(r){try{V(r)}catch(n){t=n}}),o.__H=void 0,t&&v.__e(t,o.__v))};var jt=typeof requestAnimationFrame=="function";function he(e){var t,o=c(function(){clearTimeout(r),jt&&cancelAnimationFrame(t),setTimeout(e)},"r"),r=setTimeout(o,100);jt&&(t=requestAnimationFrame(o))}h(he,"ot");c(he,"w");function V(e){var t=b,o=e.__c;typeof o=="function"&&(e.__c=void 0,o()),b=t}h(V,"z");c(V,"z");function rt(e){var t=b;e.__c=e.__(),b=t}h(rt,"_e");c(rt,"B");function _t(e,t){return!e||e.length!==t.length||t.some(function(o,r){return o!==e[r]})}h(_t,"ue");c(_t,"C");function Tt(e,t){return typeof t=="function"?t(e):t}h(Tt,"Ie");c(Tt,"D");function vt(e,t){for(var o in e)if(o!=="__source"&&!(o in t))return!0;for(var r in t)if(r!=="__source"&&e[r]!==t[r])return!0;return!1}h(vt,"Le");c(vt,"g");function wt(e,t){this.props=e,this.context=t}h(wt,"Oe");c(wt,"E");(wt.prototype=new H).isPureReactComponent=!0,wt.prototype.shouldComponentUpdate=function(e,t){return vt(this.props,e)||vt(this.state,t)};var qt=g.__b;g.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),qt&&qt(e)};var fo=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.forward_ref")||3911,Ne=g.__e;g.__e=function(e,t,o,r){if(e.then){for(var n,i=t;i=i.__;)if((n=i.__c)&&n.__c)return t.__e==null&&(t.__e=o.__e,t.__k=o.__k),n.__c(e,t)}Ne(e,t,o,r)};var Kt=g.unmount;function Rt(e,t,o){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(r){typeof r.__c=="function"&&r.__c()}),e.__c.__H=null),(e=function(r,n){for(var i in n)r[i]=n[i];return r}({},e)).__c!=null&&(e.__c.__P===o&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(r){return Rt(r,t,o)})),e}h(Rt,"je");c(Rt,"T");function Pt(e,t,o){return e&&o&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(r){return Pt(r,t,o)}),e.__c&&e.__c.__P===t&&(e.__e&&o.appendChild(e.__e),e.__c.__e=!0,e.__c.__P=o)),e}h(Pt,"qe");c(Pt,"A");function et(){this.__u=0,this.t=null,this.__b=null}h(et,"ie");c(et,"D");function At(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}h(At,"Ge");c(At,"L");function O(){this.u=null,this.o=null}h(O,"G");c(O,"F");g.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&32&e.__u&&(e.type=null),Kt&&Kt(e)},(et.prototype=new H).__c=function(e,t){var o=t.__c,r=this;r.t==null&&(r.t=[]),r.t.push(o);var n=At(r.__v),i=!1,s=c(function(){i||(i=!0,o.__R=null,n?n(p):p())},"i");o.__R=s;var p=c(function(){if(!--r.__u){if(r.state.__a){var _=r.state.__a;r.__v.__k[0]=Pt(_,_.__c.__P,_.__c.__O)}var a;for(r.setState({__a:r.__b=null});a=r.t.pop();)a.forceUpdate()}},"c");r.__u++||32&t.__u||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(s,s)},et.prototype.componentWillUnmount=function(){this.t=[]},et.prototype.render=function(e,t){if(this.__b){if(this.__v.__k){var o=document.createElement("div"),r=this.__v.__k[0].__c;this.__v.__k[0]=Rt(this.__b,o,r.__O=r.__P)}this.__b=null}var n=t.__a&&R(N,null,e.fallback);return n&&(n.__u&=-33),[R(N,null,t.__a?null:e.children),n]};var Gt=c(function(e,t,o){if(++o[1]===o[0]&&e.o.delete(t),e.props.revealOrder&&(e.props.revealOrder[0]!=="t"||!e.o.size))for(o=e.u;o;){for(;o.length>3;)o.pop()();if(o[1]<o[0])break;e.u=o=o[2]}},"U");(O.prototype=new H).__a=function(e){var t=this,o=At(t.__v),r=t.o.get(e);return r[0]++,function(n){var i=c(function(){t.props.revealOrder?(r.push(n),Gt(t,e,r)):n()},"o");o?o(i):i()}},O.prototype.render=function(e){this.u=null,this.o=new Map;var t=K(e.children);e.revealOrder&&e.revealOrder[0]==="b"&&t.reverse();for(var o=t.length;o--;)this.o.set(t[o],this.u=[1,0,this.u]);return e.children},O.prototype.componentDidUpdate=O.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,o){Gt(e,o,t)})};var De=typeof Symbol<"u"&&Symbol.for&&Symbol.for("react.element")||60103,Be=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,Me=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,Ie=/[A-Z0-9]/g,$e=typeof document<"u",ze=c(function(e){return(typeof Symbol<"u"&&typeof Symbol()=="symbol"?/fil|che|rad/:/fil|che|ra/).test(e)},"Y");H.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(H.prototype,e,{configurable:!0,get:c(function(){return this["UNSAFE_"+e]},"get"),set:c(function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})},"set")})});var Jt=g.event;function pe(){}h(pe,"dt");c(pe,"J");function ce(){return this.cancelBubble}h(ce,"ht");c(ce,"K");function ue(){return this.defaultPrevented}h(ue,"vt");c(ue,"Q");g.event=function(e){return Jt&&(e=Jt(e)),e.persist=pe,e.isPropagationStopped=ce,e.isDefaultPrevented=ue,e.nativeEvent=e};var de,Oe={enumerable:!1,configurable:!0,get:c(function(){return this.class},"get")},Xt=g.vnode;g.vnode=function(e){typeof e.type=="string"&&function(t){var o=t.props,r=t.type,n={},i=r.indexOf("-")===-1;for(var s in o){var p=o[s];if(!(s==="value"&&"defaultValue"in o&&p==null||$e&&s==="children"&&r==="noscript"||s==="class"||s==="className")){var _=s.toLowerCase();s==="defaultValue"&&"value"in o&&o.value==null?s="value":s==="download"&&p===!0?p="":_==="translate"&&p==="no"?p=!1:_[0]==="o"&&_[1]==="n"?_==="ondoubleclick"?s="ondblclick":_!=="onchange"||r!=="input"&&r!=="textarea"||ze(o.type)?_==="onfocus"?s="onfocusin":_==="onblur"?s="onfocusout":Me.test(s)&&(s=_):_=s="oninput":i&&Be.test(s)?s=s.replace(Ie,"-$&").toLowerCase():p===null&&(p=void 0),_==="oninput"&&n[s=_]&&(s="oninputCapture"),n[s]=p}}r=="select"&&n.multiple&&Array.isArray(n.value)&&(n.value=K(o.children).forEach(function(a){a.props.selected=n.value.indexOf(a.props.value)!=-1})),r=="select"&&n.defaultValue!=null&&(n.value=K(o.children).forEach(function(a){a.props.selected=n.multiple?n.defaultValue.indexOf(a.props.value)!=-1:n.defaultValue==a.props.value})),o.class&&!o.className?(n.class=o.class,Object.defineProperty(n,"className",Oe)):(o.className&&!o.class||o.class&&o.className)&&(n.class=n.className=o.className),t.props=n}(e),e.$$typeof=De,Xt&&Xt(e)};var Zt=g.__r;g.__r=function(e){Zt&&Zt(e),de=e.__c};var Qt=g.diffed;g.diffed=function(e){Qt&&Qt(e);var t=e.props,o=e.__e;o!=null&&e.type==="textarea"&&"value"in t&&t.value!==o.value&&(o.value=t.value==null?"":t.value),de=null};function Ue(e){return!!e.__k&&(at(null,e),!0)}h(Ue,"yt");c(Ue,"hn");var A=class extends Ve{static{h(this,"JSXWidget")}static Component=H;static createElement=R;rootNode;jsxRender(t,o){this.rootNode=at(t,o,this.rootNode)}};A.prototype._class+=" html_JSXWidget";import{select as ge}from"@hpcc-js/common";var J=class{static{h(this,"VNode")}_attrs;_children;constructor(t,o){this._attrs=t,this._children=o}type(){return"div"}attrs(){return this._attrs}attr(t){return this._attrs[t]}children(){return this._children}update(t){for(let o in this._attrs)t.attr(o,this._attrs[o])}render(t){let o=t.selectAll(`${t.node().tagName} > *`).data([this]);return o.exit().remove(),o.enter().append(this.type()).attr("reactd3",0).merge(o).each(function(r){let n=ge(this);r.update(n),r.renderChildren(n)})}renderChildren(t){let o=t.selectAll(`${t.node().tagName} > *`).data(this._children);return o.exit().remove(),o.enter().append(r=>document.createElement(r.type())).attr("reactd3",(r,n)=>n).merge(o).each(function(r){let n=ge(this);r.update(n),r.renderChildren(n)})}},Ft=class extends J{static{h(this,"ConstVNode")}_type;constructor(t,o,r){super(o,r),this._type=t}type(){return this._type}},Lt=class extends J{static{h(this,"TextVNode")}_text;constructor(t){super({},[]),this._text=t}type(){return"span"}update(t){super.update(t),t.text(this._text)}};function je(e){return typeof e=="function"}h(je,"isReactFn");function qe(e){return e.prototype&&e.prototype instanceof J}h(qe,"isIVNode");var me=class{static{h(this,"ReactD3")}static createElement(t,o,...r){return qe(t)?new t(o):je(t)?t(o):new Ft(t,o,r.map(n=>typeof n=="string"?new Lt(n):n))}static render(t,o){t.render(o)}};var ye=class extends A.Component{static{h(this,"VizComponent")}widget;refreshProps(){for(let t in this.props)this.widget[t]&&typeof this.widget[t]=="function"&&this.widget[t](this.props[t])}componentDidMount(){this.widget=new this.props.type().target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return R("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};var be=class extends A.Component{static{h(this,"VizInstance")}widget;refreshProps(){for(let t in this.props)this.widget[t]&&typeof this.widget[t]=="function"&&this.widget[t](this.props[t])}componentDidMount(){this.widget=this.props.instance.target(this.base),this.refreshProps(),this.widget.render()}componentWillUnmount(){this.widget.target(null).render()}render(){return R("div",{style:this.props.style})}componentDidUpdate(){this.refreshProps(),this.widget.render()}};import{format as ve}from"@hpcc-js/common";var E=class extends S{static{h(this,"StatsTable")}transformData(){let t=[["Total",0,0]],o=this.data();return o.forEach(r=>{t[0][1]+=r[1],t[0][2]+=r[2]}),o.concat(t).map(r=>[r[0],this.secondColumnFormat_exists()?ve(this.secondColumnFormat())(r[1]):r[1],this.thirdColumnFormat_exists()?ve(this.thirdColumnFormat())(r[2]):r[2]])}update(t,o){this.tbodyColumnStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left"},{width:this.secondColumnWidth(),"text-align":"right"},{width:this.thirdColumnWidth(),"text-align":"right"}]),this.evenRowStyles_default([{"font-weight":"bold",width:this.firstColumnWidth(),"text-align":"left","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.secondColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()},{width:this.thirdColumnWidth(),"text-align":"right","font-color":this.evenRowFontColor(),"background-color":this.evenRowBackgroundColor()}]),this.lastRowStyles_default({"font-weight":"bold"}),super.update(t,o)}};E.prototype._class+=" html_StatsTable";E.prototype.publish("labelColor","#333","html-color","Color of the text in the first column");E.prototype.publish("primaryValueColor","#333","html-color","Color of the text in the second column");E.prototype.publish("secondaryValueColor","#333","html-color","Color of the text in the third column");E.prototype.publish("evenRowBackgroundColor","#333","html-color","Background color of the even rows");E.prototype.publish("evenRowFontColor","#333","html-color","Font color of the even rows");E.prototype.publish("firstColumnWidth","auto","string","CSS style applied as the 'width' for the first column (ex: 40px)");E.prototype.publish("secondColumnWidth","1%","string","CSS style applied as the 'width' for the second column (ex: 40px)");E.prototype.publish("thirdColumnWidth","1%","string","CSS style applied as the 'width' for the third column (ex: 40px)");E.prototype.publish("secondColumnFormat","$,.0f","string","d3-format specifier applied to the second column's values",void 0,{optional:!0});E.prototype.publish("thirdColumnFormat",null,"string","d3-format specifier applied to the third column's values",void 0,{optional:!0});import{HTMLWidget as Ke}from"@hpcc-js/common";(function(){if(!document.getElementById("f5fc3b48")){var e=document.createElement("style");e.id="f5fc3b48",e.textContent=`#wrap
|
|
9
|
+
{
|
|
10
|
+
width: 100%;
|
|
11
|
+
}
|
|
12
|
+
#left, #right {padding:5px;}
|
|
13
|
+
|
|
14
|
+
#left {
|
|
15
|
+
background-color:red;
|
|
16
|
+
text-align:left;
|
|
17
|
+
display: block;
|
|
18
|
+
text-overflow: ellipsis;
|
|
19
|
+
white-space: nowrap;
|
|
20
|
+
overflow: hidden;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
#right {
|
|
24
|
+
background-color:orange;
|
|
25
|
+
float:right;
|
|
26
|
+
text-align:right;
|
|
27
|
+
white-space: nowrap;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
.html_TitleBar > .main {
|
|
31
|
+
width: 100%;
|
|
32
|
+
display: block;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
.html_TitleBar .title {
|
|
36
|
+
padding:4px;
|
|
37
|
+
text-align:left;
|
|
38
|
+
display: block;
|
|
39
|
+
text-overflow: ellipsis;
|
|
40
|
+
white-space: nowrap;
|
|
41
|
+
overflow: hidden;
|
|
42
|
+
font-size:20px;
|
|
43
|
+
font-weight: bold;
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
.html_TitleBar .icon-bar {
|
|
47
|
+
padding:4px;
|
|
48
|
+
float: right;
|
|
49
|
+
text-align:right;
|
|
50
|
+
white-space: nowrap;
|
|
51
|
+
line-height: 28px;
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
.html_TitleBar .icon-bar-item {
|
|
55
|
+
display: inline;
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.html_TitleBar .icon-bar-item > div {
|
|
59
|
+
display: inline;
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
.html_TitleBar .icon-bar a {
|
|
63
|
+
text-align: center; /* Center-align text */
|
|
64
|
+
padding-top: 4px;
|
|
65
|
+
padding-bottom: 4px;
|
|
66
|
+
transition: all 0.3s ease; /* Add transition for hover effects */
|
|
67
|
+
color: darkgray; /* White text color */
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
.html_TitleBar .icon-bar a:hover {
|
|
71
|
+
background-color: whitesmoke; /* Add a hover color */
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.html_TitleBar .icon-bar a.selected {
|
|
75
|
+
background-color: #efe5e5; /* Add a hover color */
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
.html_TitleBar .icon-bar a.spacer {
|
|
79
|
+
text-align: center; /* Center-align text */
|
|
80
|
+
padding-top: 2px;
|
|
81
|
+
padding-left: 8px;
|
|
82
|
+
padding-bottom: 0px;
|
|
83
|
+
color: none;
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.html_TitleBar .icon-bar a.spacer:hover {
|
|
87
|
+
background-color: transparent;
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
.html_TitleBar .icon-bar .active {
|
|
91
|
+
background-color: #4CAF50; /* Add an active/current color */
|
|
92
|
+
}`,document.head.appendChild(e)}})();var X=class extends Ke{static{h(this,"Item")}_owner;constructor(t){super(),this._owner=t,this._tag="a"}};X.prototype._class+=" html_Item";var ht=class extends X{static{h(this,"Button")}_icon;constructor(t,o){super(t),this._icon=o}icon(){return this._icon}enter(t,o){super.enter(t,o),o.attr("href","#").on("click",(r,n,i)=>this._owner.titleBarClick(this,r,n,i)).append("i").attr("class",`fa ${this._icon} fa-lg fa-fw`)}};ht.prototype._class+=" html_Button";var pt=class extends ht{static{h(this,"ToggleButton")}enter(t,o){o.on("click.sel",(r,n,i)=>{this.selected(!this.selected()),this.render()}),super.enter(t,o)}update(t,o){super.update(t,o),this._element.classed("selected",this.selected())}};pt.prototype._class+=" html_ToggleButton";pt.prototype.publish("selected",!1,"boolean");var Nt=class extends X{static{h(this,"Spacer")}enter(t,o){super.enter(t,o),o.attr("class","spacer").attr("href","#").append("i")}};Nt.prototype._class+=" html_Spacer";var Z=class extends A{static{h(this,"TitleBar")}_divMain;_divIconBar;_divTitle;constructor(){super()}enter(t,o){super.enter(t,o),this._divMain=o.append("div").attr("class","main"),this._divIconBar=this._divMain.append("div").attr("class","icon-bar"),this._divTitle=this._divMain.append("div").attr("class","title")}update(t,o){super.update(t,o),this._divTitle.text(this.title());let r=this._divIconBar.selectAll(".icon-bar-item").data(this.buttons());r.enter().append("div").attr("class","icon-bar-item").each(function(n){n.target(this)}).merge(r).each(function(n){n.render()}),r.exit().each(function(n){n.target(null)}).remove(),r.order()}};Z.prototype._class+=" html_TitleBar";Z.prototype.publish("title","","string");Z.prototype.publish("buttons",[],"widgetArray");export{Ze as BUILD_VERSION,w as BreakdownTable,ht as Button,k as HTMLTooltip,X as Item,A as JSXWidget,Je as PKG_NAME,Xe as PKG_VERSION,me as ReactD3,B as SimpleTable,Nt as Spacer,E as StatsTable,S as StyledTable,Z as TitleBar,pt as ToggleButton,J as VNode,ye as VizComponent,be as VizInstance};
|
|
1048
93
|
//# sourceMappingURL=index.js.map
|