@mobileaction/action-kit 1.57.0 → 1.57.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/action-kit.mjs +1 -1
- package/dist/{annotations-DzxKra_-.js → annotations-DjS6cZ0g.js} +386 -383
- package/dist/components/typography/index.vue.d.ts +1 -1
- package/dist/export-data-DSMuByxy.js +332 -0
- package/dist/exporting-DZnBR8gm.js +601 -0
- package/dist/funnel-DaTDEOyF.js +134 -0
- package/dist/{index-C8r4OcCO.js → index-bTz35Vhl.js} +1879 -1845
- package/dist/map-BhX11nMc.js +1744 -0
- package/dist/offline-exporting-Dj1jDKzF.js +192 -0
- package/dist/stock-Cv-uIi1p.js +2076 -0
- package/dist/venn-CgBXe2Vp.js +453 -0
- package/dist/wordcloud-Bwb3kAJt.js +227 -0
- package/package.json +2 -2
- package/dist/export-data-B7wYF5EQ.js +0 -327
- package/dist/exporting-B0cCEyyg.js +0 -535
- package/dist/funnel-DTHaLuEK.js +0 -135
- package/dist/map-C_BILLYp.js +0 -1757
- package/dist/offline-exporting-8t0G_rUZ.js +0 -192
- package/dist/stock-DyTZKEyb.js +0 -2044
- package/dist/venn-DfFwIzSQ.js +0 -454
- package/dist/wordcloud-Hu3_8VaC.js +0 -235
|
@@ -0,0 +1,601 @@
|
|
|
1
|
+
import { g as $t } from "./index-bTz35Vhl.js";
|
|
2
|
+
function Gt(j, z) {
|
|
3
|
+
for (var k = 0; k < z.length; k++) {
|
|
4
|
+
const F = z[k];
|
|
5
|
+
if (typeof F != "string" && !Array.isArray(F)) {
|
|
6
|
+
for (const L in F)
|
|
7
|
+
if (L !== "default" && !(L in j)) {
|
|
8
|
+
const M = Object.getOwnPropertyDescriptor(F, L);
|
|
9
|
+
M && Object.defineProperty(j, L, M.get ? M : {
|
|
10
|
+
enumerable: !0,
|
|
11
|
+
get: () => F[L]
|
|
12
|
+
});
|
|
13
|
+
}
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
return Object.freeze(Object.defineProperty(j, Symbol.toStringTag, { value: "Module" }));
|
|
17
|
+
}
|
|
18
|
+
var W = { exports: {} }, Vt = W.exports, pt;
|
|
19
|
+
function qt() {
|
|
20
|
+
return pt || (pt = 1, function(j, z) {
|
|
21
|
+
/**
|
|
22
|
+
* Highcharts JS v12.5.0 (2026-01-12)
|
|
23
|
+
* @module highcharts/modules/exporting
|
|
24
|
+
* @requires highcharts
|
|
25
|
+
*
|
|
26
|
+
* Exporting module
|
|
27
|
+
*
|
|
28
|
+
* (c) 2010-2026 Highsoft AS
|
|
29
|
+
* Author: Torstein Honsi
|
|
30
|
+
*
|
|
31
|
+
* A commercial license may be required depending on use.
|
|
32
|
+
* See www.highcharts.com/license
|
|
33
|
+
*/
|
|
34
|
+
(function(k, F) {
|
|
35
|
+
j.exports = F(k._Highcharts, k._Highcharts.AST, k._Highcharts.Chart);
|
|
36
|
+
})("u" < typeof window ? Vt : window, (k, F, L) => (() => {
|
|
37
|
+
var M, K, ut = { 660: (s) => {
|
|
38
|
+
s.exports = F;
|
|
39
|
+
}, 944: (s) => {
|
|
40
|
+
s.exports = k;
|
|
41
|
+
}, 960: (s) => {
|
|
42
|
+
s.exports = L;
|
|
43
|
+
} }, Z = {};
|
|
44
|
+
function b(s) {
|
|
45
|
+
var t = Z[s];
|
|
46
|
+
if (t !== void 0) return t.exports;
|
|
47
|
+
var e = Z[s] = { exports: {} };
|
|
48
|
+
return ut[s](e, e.exports, b), e.exports;
|
|
49
|
+
}
|
|
50
|
+
b.n = (s) => {
|
|
51
|
+
var t = s && s.__esModule ? () => s.default : () => s;
|
|
52
|
+
return b.d(t, { a: t }), t;
|
|
53
|
+
}, b.d = (s, t) => {
|
|
54
|
+
for (var e in t) b.o(t, e) && !b.o(s, e) && Object.defineProperty(s, e, { enumerable: !0, get: t[e] });
|
|
55
|
+
}, b.o = (s, t) => Object.prototype.hasOwnProperty.call(s, t);
|
|
56
|
+
var Q = {};
|
|
57
|
+
b.d(Q, { default: () => Bt });
|
|
58
|
+
var dt = b(944), E = b.n(dt), gt = b(660), G = b.n(gt), ft = b(960), mt = b.n(ft), _ = M || (M = {});
|
|
59
|
+
_.compose = function(s) {
|
|
60
|
+
return s.navigation || (s.navigation = new tt(s)), s;
|
|
61
|
+
};
|
|
62
|
+
class tt {
|
|
63
|
+
constructor(t) {
|
|
64
|
+
this.updates = [], this.chart = t;
|
|
65
|
+
}
|
|
66
|
+
addUpdate(t) {
|
|
67
|
+
this.chart.navigation.updates.push(t);
|
|
68
|
+
}
|
|
69
|
+
update(t, e) {
|
|
70
|
+
this.updates.forEach((o) => {
|
|
71
|
+
o.call(this.chart, t, e);
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
_.Additions = tt;
|
|
76
|
+
let yt = M, { isSafari: xt, win: S, win: { document: I } } = E(), { error: wt } = E(), et = S.URL || S.webkitURL || S;
|
|
77
|
+
function J(s, t) {
|
|
78
|
+
let e = S.navigator, o = I.createElement("a");
|
|
79
|
+
if (typeof s != "string" && !(s instanceof String) && e.msSaveOrOpenBlob) return void e.msSaveOrOpenBlob(s, t);
|
|
80
|
+
if (s = "" + s, e.userAgent.length > 1e3) throw Error("Input too long");
|
|
81
|
+
let n = /Edge\/\d+/.test(e.userAgent);
|
|
82
|
+
if ((xt && typeof s == "string" && s.indexOf("data:application/pdf") === 0 || n || s.length > 2e6) && !(s = function(i) {
|
|
83
|
+
let r = i.replace(/filename=.*;/, "").match(/data:([^;]*)(;base64)?,([A-Z+\d\/]+)/i);
|
|
84
|
+
if (r && r.length > 3 && S.atob && S.ArrayBuffer && S.Uint8Array && S.Blob && et.createObjectURL) {
|
|
85
|
+
let c = S.atob(r[3]), a = new S.ArrayBuffer(c.length), l = new S.Uint8Array(a);
|
|
86
|
+
for (let u = 0; u < l.length; ++u) l[u] = c.charCodeAt(u);
|
|
87
|
+
return et.createObjectURL(new S.Blob([l], { type: r[1] }));
|
|
88
|
+
}
|
|
89
|
+
}(s) || "")) throw Error("Failed to convert to blob");
|
|
90
|
+
if (o.download !== void 0) o.href = s, o.download = t, I.body.appendChild(o), o.click(), I.body.removeChild(o);
|
|
91
|
+
else try {
|
|
92
|
+
if (!S.open(s, "chart")) throw Error("Failed to open window");
|
|
93
|
+
} catch {
|
|
94
|
+
S.location.href = s;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
let { isTouchDevice: vt } = E(), bt = { exporting: { allowTableSorting: !0, libURL: "https://code.highcharts.com/12.5.0/lib/", local: !0, type: "image/png", url: `https://export-svg.highcharts.com?v=${E().version}`, pdfFont: { normal: void 0, bold: void 0, bolditalic: void 0, italic: void 0 }, printMaxWidth: 780, scale: 2, buttons: { contextButton: { className: "highcharts-contextbutton", menuClassName: "highcharts-contextmenu", symbol: "menu", titleKey: "contextButtonTitle", menuItems: ["viewFullscreen", "printChart", "separator", "downloadPNG", "downloadJPEG", "downloadSVG"] } }, menuItemDefinitions: { viewFullscreen: { textKey: "viewFullscreen", onclick: function() {
|
|
98
|
+
this.fullscreen?.toggle();
|
|
99
|
+
} }, printChart: { textKey: "printChart", onclick: function() {
|
|
100
|
+
this.exporting?.print();
|
|
101
|
+
} }, separator: { separator: !0 }, downloadPNG: { textKey: "downloadPNG", onclick: async function() {
|
|
102
|
+
await this.exporting?.exportChart();
|
|
103
|
+
} }, downloadJPEG: { textKey: "downloadJPEG", onclick: async function() {
|
|
104
|
+
await this.exporting?.exportChart({ type: "image/jpeg" });
|
|
105
|
+
} }, downloadPDF: { textKey: "downloadPDF", onclick: async function() {
|
|
106
|
+
await this.exporting?.exportChart({ type: "application/pdf" });
|
|
107
|
+
} }, downloadSVG: { textKey: "downloadSVG", onclick: async function() {
|
|
108
|
+
await this.exporting?.exportChart({ type: "image/svg+xml" });
|
|
109
|
+
} } } }, lang: { viewFullscreen: "View in full screen", exitFullscreen: "Exit from full screen", printChart: "Print chart", downloadPNG: "Download PNG image", downloadJPEG: "Download JPEG image", downloadPDF: "Download PDF document", downloadSVG: "Download SVG vector image", contextButtonTitle: "Chart context menu" }, navigation: { buttonOptions: { symbolSize: 14, symbolX: 14.5, symbolY: 13.5, align: "right", buttonSpacing: 5, height: 28, y: -5, verticalAlign: "top", width: 28, symbolFill: "#666666", symbolStroke: "#666666", symbolStrokeWidth: 3, theme: { fill: "#ffffff", padding: 5, stroke: "none", "stroke-linecap": "round" } }, menuStyle: { border: "none", borderRadius: "3px", background: "#ffffff", padding: "0.5em" }, menuItemStyle: { background: "none", borderRadius: "3px", color: "#333333", padding: "0.5em", fontSize: vt ? "0.9em" : "0.8em", transition: "background 250ms, color 250ms" }, menuItemHoverStyle: { background: "#f2f2f2" } } };
|
|
110
|
+
(function(s) {
|
|
111
|
+
let t = [];
|
|
112
|
+
function e(n, i, r, c) {
|
|
113
|
+
return [["M", n, i + 2.5], ["L", n + r, i + 2.5], ["M", n, i + c / 2 + 0.5], ["L", n + r, i + c / 2 + 0.5], ["M", n, i + c - 1.5], ["L", n + r, i + c - 1.5]];
|
|
114
|
+
}
|
|
115
|
+
function o(n, i, r, c) {
|
|
116
|
+
let a = c / 3 - 2;
|
|
117
|
+
return [].concat(this.circle(r - a, i, a, a), this.circle(r - a, i + a + 4, a, a), this.circle(r - a, i + 2 * (a + 4), a, a));
|
|
118
|
+
}
|
|
119
|
+
s.compose = function(n) {
|
|
120
|
+
if (t.indexOf(n) === -1) {
|
|
121
|
+
t.push(n);
|
|
122
|
+
let i = n.prototype.symbols;
|
|
123
|
+
i.menu = e, i.menuball = o.bind(i);
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
})(K || (K = {}));
|
|
127
|
+
let St = K, { composed: Et } = E(), { addEvent: X, fireEvent: nt, pushUnique: Ct } = E();
|
|
128
|
+
function Ot() {
|
|
129
|
+
this.fullscreen = new it(this);
|
|
130
|
+
}
|
|
131
|
+
class it {
|
|
132
|
+
static compose(t) {
|
|
133
|
+
Ct(Et, "Fullscreen") && X(t, "beforeRender", Ot);
|
|
134
|
+
}
|
|
135
|
+
constructor(t) {
|
|
136
|
+
this.chart = t, this.isOpen = !1;
|
|
137
|
+
const e = t.renderTo;
|
|
138
|
+
!this.browserProps && (typeof e.requestFullscreen == "function" ? this.browserProps = { fullscreenChange: "fullscreenchange", requestFullscreen: "requestFullscreen", exitFullscreen: "exitFullscreen" } : e.mozRequestFullScreen ? this.browserProps = { fullscreenChange: "mozfullscreenchange", requestFullscreen: "mozRequestFullScreen", exitFullscreen: "mozCancelFullScreen" } : e.webkitRequestFullScreen ? this.browserProps = { fullscreenChange: "webkitfullscreenchange", requestFullscreen: "webkitRequestFullScreen", exitFullscreen: "webkitExitFullscreen" } : e.msRequestFullscreen && (this.browserProps = { fullscreenChange: "MSFullscreenChange", requestFullscreen: "msRequestFullscreen", exitFullscreen: "msExitFullscreen" }));
|
|
139
|
+
}
|
|
140
|
+
close() {
|
|
141
|
+
let t = this, e = t.chart, o = e.options.chart;
|
|
142
|
+
nt(e, "fullscreenClose", void 0, function() {
|
|
143
|
+
t.isOpen && t.browserProps && e.container.ownerDocument instanceof Document && e.container.ownerDocument[t.browserProps.exitFullscreen](), t.unbindFullscreenEvent && (t.unbindFullscreenEvent = t.unbindFullscreenEvent()), e.setSize(t.origWidth, t.origHeight, !1), t.origWidth = void 0, t.origHeight = void 0, o.width = t.origWidthOption, o.height = t.origHeightOption, t.origWidthOption = void 0, t.origHeightOption = void 0, t.isOpen = !1, t.setButtonText();
|
|
144
|
+
});
|
|
145
|
+
}
|
|
146
|
+
open() {
|
|
147
|
+
let t = this, e = t.chart, o = e.options.chart;
|
|
148
|
+
nt(e, "fullscreenOpen", void 0, function() {
|
|
149
|
+
if (o && (t.origWidthOption = o.width, t.origHeightOption = o.height), t.origWidth = e.chartWidth, t.origHeight = e.chartHeight, t.browserProps) {
|
|
150
|
+
let n = X(e.container.ownerDocument, t.browserProps.fullscreenChange, function() {
|
|
151
|
+
t.isOpen ? (t.isOpen = !1, t.close()) : (e.setSize(null, null, !1), t.isOpen = !0, t.setButtonText());
|
|
152
|
+
}), i = X(e, "destroy", n);
|
|
153
|
+
t.unbindFullscreenEvent = () => {
|
|
154
|
+
n(), i();
|
|
155
|
+
};
|
|
156
|
+
let r = e.renderTo[t.browserProps.requestFullscreen]();
|
|
157
|
+
r && r.catch(function() {
|
|
158
|
+
alert("Full screen is not supported inside a frame.");
|
|
159
|
+
});
|
|
160
|
+
}
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
setButtonText() {
|
|
164
|
+
let t = this.chart, e = t.exporting?.divElements, o = t.options.exporting, n = o && o.buttons && o.buttons.contextButton.menuItems, i = t.options.lang;
|
|
165
|
+
if (o?.menuItemDefinitions && i?.exitFullscreen && i.viewFullscreen && n && e) {
|
|
166
|
+
let r = e[n.indexOf("viewFullscreen")];
|
|
167
|
+
r && G().setElementHTML(r, this.isOpen ? i.exitFullscreen : o.menuItemDefinitions.viewFullscreen?.textKey || i.viewFullscreen);
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
toggle() {
|
|
171
|
+
this.isOpen ? this.close() : this.open();
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
let { win: ot } = E(), { discardElement: Tt, objectEach: rt } = E(), V = { ajax: function(s) {
|
|
175
|
+
let t = { json: "application/json", xml: "application/xml", text: "text/plain", octet: "application/octet-stream" }, e = new XMLHttpRequest();
|
|
176
|
+
function o(n, i) {
|
|
177
|
+
s.error && s.error(n, i);
|
|
178
|
+
}
|
|
179
|
+
if (!s.url) return !1;
|
|
180
|
+
e.open((s.type || "get").toUpperCase(), s.url, !0), s.headers?.["Content-Type"] || e.setRequestHeader("Content-Type", t[s.dataType || "json"] || t.text), rt(s.headers, function(n, i) {
|
|
181
|
+
e.setRequestHeader(i, n);
|
|
182
|
+
}), s.responseType && (e.responseType = s.responseType), e.onreadystatechange = function() {
|
|
183
|
+
let n;
|
|
184
|
+
if (e.readyState === 4) {
|
|
185
|
+
if (e.status === 200) {
|
|
186
|
+
if (s.responseType !== "blob" && (n = e.responseText, s.dataType === "json")) try {
|
|
187
|
+
n = JSON.parse(n);
|
|
188
|
+
} catch (i) {
|
|
189
|
+
if (i instanceof Error) return o(e, i);
|
|
190
|
+
}
|
|
191
|
+
return s.success?.(n, e);
|
|
192
|
+
}
|
|
193
|
+
o(e, e.responseText);
|
|
194
|
+
}
|
|
195
|
+
}, s.data && typeof s.data != "string" && (s.data = JSON.stringify(s.data)), e.send(s.data);
|
|
196
|
+
}, getJSON: function(s, t) {
|
|
197
|
+
V.ajax({ url: s, success: t, dataType: "json", headers: { "Content-Type": "text/plain" } });
|
|
198
|
+
} };
|
|
199
|
+
V.post = async function(s, t, e) {
|
|
200
|
+
let o = new ot.FormData();
|
|
201
|
+
rt(t, function(i, r) {
|
|
202
|
+
o.append(r, i);
|
|
203
|
+
}), o.append("b64", "true");
|
|
204
|
+
let n = await ot.fetch(s, { method: "POST", body: o, ...e });
|
|
205
|
+
if (n.ok) {
|
|
206
|
+
let i = await n.text(), r = document.createElement("a");
|
|
207
|
+
r.href = `data:${t.type};base64,${i}`, r.download = t.filename, r.click(), Tt(r);
|
|
208
|
+
}
|
|
209
|
+
};
|
|
210
|
+
let { defaultOptions: kt, setOptions: Ft } = E(), { composed: Rt, doc: D, isFirefox: Pt, isMS: B, isSafari: q, SVG_NS: Nt, win: w } = E(), { addEvent: R, clearTimeout: Y, createElement: H, css: C, discardElement: st, error: Lt, extend: A, find: Mt, fireEvent: U, isObject: Dt, merge: O, objectEach: At, pick: $, pushUnique: Ht, removeEvent: Ut, splat: jt, uniqueKey: It } = E();
|
|
211
|
+
G().allowedAttributes.push("data-z-index", "fill-opacity", "filter", "preserveAspectRatio", "rx", "ry", "stroke-dasharray", "stroke-linejoin", "stroke-opacity", "text-anchor", "transform", "transform-origin", "version", "viewBox", "visibility", "xmlns", "xmlns:xlink"), G().allowedTags.push("desc", "clippath", "fedropshadow", "femorphology", "g", "image");
|
|
212
|
+
let at = w.URL || w.webkitURL || w;
|
|
213
|
+
class d {
|
|
214
|
+
constructor(t, e) {
|
|
215
|
+
this.options = {}, this.chart = t, this.options = e, this.btnCount = 0, this.buttonOffset = 0, this.divElements = [], this.svgElements = [];
|
|
216
|
+
}
|
|
217
|
+
static hyphenate(t) {
|
|
218
|
+
return t.replace(/[A-Z]/g, function(e) {
|
|
219
|
+
return "-" + e.toLowerCase();
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
static async imageToDataURL(t, e, o) {
|
|
223
|
+
let n = await d.loadImage(t), i = D.createElement("canvas"), r = i?.getContext("2d");
|
|
224
|
+
if (r) return i.height = n.height * e, i.width = n.width * e, r.drawImage(n, 0, 0, i.width, i.height), i.toDataURL(o);
|
|
225
|
+
throw Error("No canvas found!");
|
|
226
|
+
}
|
|
227
|
+
static async fetchCSS(t) {
|
|
228
|
+
let e = await fetch(t).then((n) => n.text()), o = new CSSStyleSheet();
|
|
229
|
+
return o.replaceSync(e), o;
|
|
230
|
+
}
|
|
231
|
+
static async handleStyleSheet(t, e) {
|
|
232
|
+
try {
|
|
233
|
+
for (let o of Array.from(t.cssRules)) {
|
|
234
|
+
if (o instanceof CSSImportRule) {
|
|
235
|
+
let n = await d.fetchCSS(o.href);
|
|
236
|
+
await d.handleStyleSheet(n, e);
|
|
237
|
+
}
|
|
238
|
+
if (o instanceof CSSFontFaceRule) {
|
|
239
|
+
let n = o.cssText;
|
|
240
|
+
if (t.href) {
|
|
241
|
+
let i = t.href, r = /url\(\s*(['"]?)(?![a-z]+:|\/\/)([^'")]+?)\1\s*\)/gi;
|
|
242
|
+
n = n.replace(r, (c, a, l) => {
|
|
243
|
+
let u = new URL(l, i).href;
|
|
244
|
+
return `url(${a}${u}${a})`;
|
|
245
|
+
});
|
|
246
|
+
}
|
|
247
|
+
e.push(n);
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
} catch {
|
|
251
|
+
if (t.href) {
|
|
252
|
+
let o = await d.fetchCSS(t.href);
|
|
253
|
+
await d.handleStyleSheet(o, e);
|
|
254
|
+
}
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
static async fetchStyleSheets() {
|
|
258
|
+
let t = [];
|
|
259
|
+
for (let e of Array.from(D.styleSheets)) await d.handleStyleSheet(e, t);
|
|
260
|
+
return t;
|
|
261
|
+
}
|
|
262
|
+
static async inlineFonts(t) {
|
|
263
|
+
let e = await d.fetchStyleSheets(), o = /url\(([^)]+)\)/g, n = [], i = e.join(`
|
|
264
|
+
`), r;
|
|
265
|
+
for (; r = o.exec(i); ) {
|
|
266
|
+
let u = r[1].replace(/['"]/g, "");
|
|
267
|
+
n.includes(u) || n.push(u);
|
|
268
|
+
}
|
|
269
|
+
let c = (u) => {
|
|
270
|
+
let f = "", h = new Uint8Array(u);
|
|
271
|
+
for (let p = 0; p < h.byteLength; p++) f += String.fromCharCode(h[p]);
|
|
272
|
+
return btoa(f);
|
|
273
|
+
}, a = {};
|
|
274
|
+
for (let u of n) try {
|
|
275
|
+
let f = await fetch(u), h = f.headers.get("Content-Type") || "", p = c(await f.arrayBuffer());
|
|
276
|
+
a[u] = `data:${h};base64,${p}`;
|
|
277
|
+
} catch {
|
|
278
|
+
}
|
|
279
|
+
i = i.replace(o, (u, f) => {
|
|
280
|
+
let h = f.replace(/['"]/g, "");
|
|
281
|
+
return `url(${a[h] || h})`;
|
|
282
|
+
});
|
|
283
|
+
let l = document.createElementNS("http://www.w3.org/2000/svg", "style");
|
|
284
|
+
return l.textContent = i, t.append(l), t;
|
|
285
|
+
}
|
|
286
|
+
static loadImage(t) {
|
|
287
|
+
return new Promise((e, o) => {
|
|
288
|
+
let n = new w.Image();
|
|
289
|
+
n.crossOrigin = "Anonymous", n.onload = () => {
|
|
290
|
+
setTimeout(() => {
|
|
291
|
+
e(n);
|
|
292
|
+
}, d.loadEventDeferDelay);
|
|
293
|
+
}, n.onerror = (i) => {
|
|
294
|
+
o(i);
|
|
295
|
+
}, n.src = t;
|
|
296
|
+
});
|
|
297
|
+
}
|
|
298
|
+
static prepareImageOptions(t) {
|
|
299
|
+
let e = t?.type || "image/png", o = t?.libURL || kt.exporting?.libURL;
|
|
300
|
+
return { type: e, filename: (t?.filename || "chart") + "." + (e === "image/svg+xml" ? "svg" : e.split("/")[1]), scale: t?.scale || 1, libURL: o?.slice(-1) !== "/" ? o + "/" : o };
|
|
301
|
+
}
|
|
302
|
+
static sanitizeSVG(t, e) {
|
|
303
|
+
let o = t.indexOf("</svg>") + 6, n = t.indexOf("<foreignObject") > -1, i = t.substr(o);
|
|
304
|
+
return t = t.substr(0, o), n ? t = t.replace(/(<(?:img|br).*?(?=\>))>/g, "$1 />") : i && e?.exporting?.allowHTML && (i = '<foreignObject x="0" y="0" width="' + e.chart.width + '" height="' + e.chart.height + '"><body xmlns="http://www.w3.org/1999/xhtml">' + i.replace(/(<(?:img|br).*?(?=\>))>/g, "$1 />") + "</body></foreignObject>", t = t.replace("</svg>", i + "</svg>")), t = t.replace(/zIndex="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(/jQuery\d+="[^"]+"/g, "").replace(/url\(("|")(.*?)("|")\;?\)/g, "url($2)").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS\d+\:)?href=/g, " xlink:href=").replace(/\n+/g, " ").replace(/ /g, " ").replace(/­/g, "");
|
|
305
|
+
}
|
|
306
|
+
static svgToDataURL(t) {
|
|
307
|
+
let e = w.navigator.userAgent, o = e.indexOf("WebKit") > -1 && 0 > e.indexOf("Chrome");
|
|
308
|
+
try {
|
|
309
|
+
if (!o && t.indexOf("<foreignObject") === -1) return at.createObjectURL(new w.Blob([t], { type: "image/svg+xml;charset-utf-16" }));
|
|
310
|
+
} catch {
|
|
311
|
+
}
|
|
312
|
+
return "data:image/svg+xml;charset=UTF-8," + encodeURIComponent(t);
|
|
313
|
+
}
|
|
314
|
+
addButton(t) {
|
|
315
|
+
let e, o = this, n = o.chart, i = n.renderer, r = O(n.options.navigation?.buttonOptions, t), c = r.onclick, a = r.menuItems, l = r.symbolSize || 12;
|
|
316
|
+
if (r.enabled === !1 || !r.theme) return;
|
|
317
|
+
let u = n.styledMode ? {} : r.theme, f = () => {
|
|
318
|
+
};
|
|
319
|
+
c ? f = function(p) {
|
|
320
|
+
p && p.stopPropagation(), c.call(n, p);
|
|
321
|
+
} : a && (f = function(p) {
|
|
322
|
+
p && p.stopPropagation(), o.contextMenu(h.menuClassName, a, h.translateX || 0, h.translateY || 0, h.width || 0, h.height || 0, h), h.setState(2);
|
|
323
|
+
}), r.text && r.symbol ? u.paddingLeft = $(u.paddingLeft, 30) : r.text || A(u, { width: r.width, height: r.height, padding: 0 });
|
|
324
|
+
let h = i.button(r.text || "", 0, 0, f, u, void 0, void 0, void 0, void 0, r.useHTML).addClass(t.className || "").attr({ title: $(n.options.lang[r._titleKey || r.titleKey], "") });
|
|
325
|
+
h.menuClassName = t.menuClassName || "highcharts-menu-" + o.btnCount++, r.symbol && (e = i.symbol(r.symbol, Math.round((r.symbolX || 0) - l / 2), Math.round((r.symbolY || 0) - l / 2), l, l, { width: l, height: l }).addClass("highcharts-button-symbol").attr({ zIndex: 1 }).add(h), n.styledMode || e.attr({ stroke: r.symbolStroke, fill: r.symbolFill, "stroke-width": r.symbolStrokeWidth || 1 })), h.add(o.group).align(A(r, { width: h.width, x: $(r.x, o.buttonOffset) }), !0, "spacingBox"), o.buttonOffset += ((h.width || 0) + (r.buttonSpacing || 0)) * (r.align === "right" ? -1 : 1), o.svgElements.push(h, e);
|
|
326
|
+
}
|
|
327
|
+
afterPrint() {
|
|
328
|
+
let t = this.chart;
|
|
329
|
+
if (!this.printReverseInfo) return;
|
|
330
|
+
let { childNodes: e, origDisplay: o, resetParams: n } = this.printReverseInfo;
|
|
331
|
+
this.moveContainers(t.renderTo), [].forEach.call(e, function(i, r) {
|
|
332
|
+
i.nodeType === 1 && (i.style.display = o[r] || "");
|
|
333
|
+
}), this.isPrinting = !1, n && t.setSize.apply(t, n), delete this.printReverseInfo, d.printingChart = void 0, U(t, "afterPrint");
|
|
334
|
+
}
|
|
335
|
+
beforePrint() {
|
|
336
|
+
let t = this.chart, e = D.body, o = this.options.printMaxWidth, n = { childNodes: e.childNodes, origDisplay: [], resetParams: void 0 };
|
|
337
|
+
this.isPrinting = !0, t.pointer?.reset(void 0, 0), U(t, "beforePrint"), o && t.chartWidth > o && (n.resetParams = [t.options.chart.width, void 0, !1], t.setSize(o, void 0, !1)), [].forEach.call(n.childNodes, function(i, r) {
|
|
338
|
+
i.nodeType === 1 && (n.origDisplay[r] = i.style.display, i.style.display = "none");
|
|
339
|
+
}), this.moveContainers(e), this.printReverseInfo = n;
|
|
340
|
+
}
|
|
341
|
+
contextMenu(t, e, o, n, i, r, c) {
|
|
342
|
+
let a = this, l = a.chart, u = l.options.navigation, f = l.chartWidth, h = l.chartHeight, p = "cache-" + t, x = Math.max(i, r), v, m = l[p];
|
|
343
|
+
m || (a.contextMenuEl = l[p] = m = H("div", { className: t }, { position: "absolute", zIndex: 1e3, padding: x + "px", pointerEvents: "auto", ...l.renderer.style }, l.scrollablePlotArea?.fixedDiv || l.container), v = H("ul", { className: "highcharts-menu" }, l.styledMode ? {} : { listStyle: "none", margin: 0, padding: 0 }, m), l.styledMode || C(v, A({ MozBoxShadow: "3px 3px 10px #0008", WebkitBoxShadow: "3px 3px 10px #0008", boxShadow: "3px 3px 10px #0008" }, u?.menuStyle || {})), m.hideMenu = function() {
|
|
344
|
+
C(m, { display: "none" }), c && c.setState(0), l.exporting && (l.exporting.openMenu = !1), C(l.renderTo, { overflow: "hidden" }), C(l.container, { overflow: "hidden" }), Y(m.hideTimer), U(l, "exportMenuHidden");
|
|
345
|
+
}, a.events?.push(R(m, "mouseleave", function() {
|
|
346
|
+
m.hideTimer = w.setTimeout(m.hideMenu, 500);
|
|
347
|
+
}), R(m, "mouseenter", function() {
|
|
348
|
+
Y(m.hideTimer);
|
|
349
|
+
}), R(D, "mouseup", function(g) {
|
|
350
|
+
l.pointer?.inClass(g.target, t) || m.hideMenu();
|
|
351
|
+
}), R(m, "click", function() {
|
|
352
|
+
l.exporting?.openMenu && m.hideMenu();
|
|
353
|
+
})), e.forEach(function(g) {
|
|
354
|
+
if (typeof g == "string" && a.options.menuItemDefinitions?.[g] && (g = a.options.menuItemDefinitions[g]), Dt(g, !0)) {
|
|
355
|
+
let P;
|
|
356
|
+
g.separator ? P = H("hr", void 0, void 0, v) : (g.textKey === "viewData" && a.isDataTableVisible && (g.textKey = "hideData"), P = H("li", { className: "highcharts-menu-item", onclick: function(N) {
|
|
357
|
+
N && N.stopPropagation(), m.hideMenu(), typeof g != "string" && g.onclick && g.onclick.apply(l, arguments);
|
|
358
|
+
} }, void 0, v), G().setElementHTML(P, g.text || l.options.lang[g.textKey]), l.styledMode || (P.onmouseover = function() {
|
|
359
|
+
C(this, u?.menuItemHoverStyle || {});
|
|
360
|
+
}, P.onmouseout = function() {
|
|
361
|
+
C(this, u?.menuItemStyle || {});
|
|
362
|
+
}, C(P, A({ cursor: "pointer" }, u?.menuItemStyle || {})))), a.divElements.push(P);
|
|
363
|
+
}
|
|
364
|
+
}), a.divElements.push(v, m), a.menuHeight = m.offsetHeight, a.menuWidth = m.offsetWidth);
|
|
365
|
+
let y = { display: "block" };
|
|
366
|
+
o + (a.menuWidth || 0) > f ? y.right = f - o - i - x + "px" : y.left = o - x + "px", n + r + (a.menuHeight || 0) > h && c.alignOptions?.verticalAlign !== "top" ? y.bottom = h - n - x + "px" : y.top = n + r - x + "px", C(m, y), C(l.renderTo, { overflow: "" }), C(l.container, { overflow: "" }), l.exporting && (l.exporting.openMenu = !0), U(l, "exportMenuShown");
|
|
367
|
+
}
|
|
368
|
+
destroy(t) {
|
|
369
|
+
let e, o = t ? t.target : this.chart, { divElements: n, events: i, svgElements: r } = this;
|
|
370
|
+
r.forEach((c, a) => {
|
|
371
|
+
c && (c.onclick = c.ontouchstart = null, o[e = "cache-" + c.menuClassName] && delete o[e], r[a] = c.destroy());
|
|
372
|
+
}), r.length = 0, this.group && (this.group.destroy(), delete this.group), n.forEach(function(c, a) {
|
|
373
|
+
c && (Y(c.hideTimer), Ut(c, "mouseleave"), n[a] = c.onmouseout = c.onmouseover = c.ontouchstart = c.onclick = null, st(c));
|
|
374
|
+
}), n.length = 0, i && (i.forEach(function(c) {
|
|
375
|
+
c();
|
|
376
|
+
}), i.length = 0);
|
|
377
|
+
}
|
|
378
|
+
async downloadSVG(t, e) {
|
|
379
|
+
let o, n = { svg: t, exportingOptions: e, exporting: this };
|
|
380
|
+
if (U(d.prototype, "downloadSVG", n), n.defaultPrevented) return;
|
|
381
|
+
let { type: i, filename: r, scale: c, libURL: a } = d.prepareImageOptions(e);
|
|
382
|
+
if (i === "application/pdf") throw Error("Offline exporting logic for PDF type is not found.");
|
|
383
|
+
if (i === "image/svg+xml") {
|
|
384
|
+
if (w.MSBlobBuilder !== void 0) {
|
|
385
|
+
let u = new w.MSBlobBuilder();
|
|
386
|
+
u.append(t), o = u.getBlob("image/svg+xml");
|
|
387
|
+
} else o = d.svgToDataURL(t);
|
|
388
|
+
J(o, r);
|
|
389
|
+
} else {
|
|
390
|
+
o = d.svgToDataURL(t);
|
|
391
|
+
try {
|
|
392
|
+
d.objectURLRevoke = !0;
|
|
393
|
+
let u = await d.imageToDataURL(o, c, i);
|
|
394
|
+
J(u, r);
|
|
395
|
+
} catch (u) {
|
|
396
|
+
if (u.message === "No canvas found!") throw u;
|
|
397
|
+
if (t.length > 1e8) throw Error("Input too long");
|
|
398
|
+
let f = D.createElement("canvas"), h = f.getContext("2d"), p = t.match(/^<svg[^>]*\s{,1000}width\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/), x = t.match(/^<svg[^>]*\s{0,1000}height\s{,1000}=\s{,1000}\"?(\d+)\"?[^>]*>/);
|
|
399
|
+
if (h && p && x) {
|
|
400
|
+
let v = p[1] * c, m = x[1] * c;
|
|
401
|
+
if (f.width = v, f.height = m, !w.canvg) {
|
|
402
|
+
var l;
|
|
403
|
+
d.objectURLRevoke = !0, await (l = a + "canvg.js", new Promise((y, g) => {
|
|
404
|
+
let P = I.getElementsByTagName("head")[0], N = I.createElement("script");
|
|
405
|
+
N.type = "text/javascript", N.src = l, N.onload = () => {
|
|
406
|
+
y();
|
|
407
|
+
}, N.onerror = () => {
|
|
408
|
+
let ct = `Error loading script ${l}`;
|
|
409
|
+
wt(ct), g(Error(ct));
|
|
410
|
+
}, P.appendChild(N);
|
|
411
|
+
}));
|
|
412
|
+
}
|
|
413
|
+
w.canvg.Canvg.fromString(h, t).start(), J(w.navigator.msSaveOrOpenBlob ? f.msToBlob() : f.toDataURL(i), r);
|
|
414
|
+
}
|
|
415
|
+
} finally {
|
|
416
|
+
if (d.objectURLRevoke) try {
|
|
417
|
+
at.revokeObjectURL(o);
|
|
418
|
+
} catch {
|
|
419
|
+
}
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
}
|
|
423
|
+
async exportChart(t, e) {
|
|
424
|
+
if ((t = O(this.options, t)).local) await this.localExport(t, e || {});
|
|
425
|
+
else {
|
|
426
|
+
let o = this.getSVGForExport(t, e);
|
|
427
|
+
t.url && await V.post(t.url, { filename: t.filename ? t.filename.replace(/\//g, "-") : this.getFilename(), type: t.type, width: t.width, scale: t.scale, svg: o }, t.fetchOptions);
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
async fallbackToServer(t, e) {
|
|
431
|
+
t.fallbackToExportServer === !1 ? t.error ? t.error(t, e) : Lt(28, !0) : t.type === "application/pdf" && (t.local = !1, await this.exportChart(t));
|
|
432
|
+
}
|
|
433
|
+
getChartHTML(t) {
|
|
434
|
+
let e = this.chart;
|
|
435
|
+
return t && this.inlineStyles(), this.resolveCSSVariables(), e.container.innerHTML;
|
|
436
|
+
}
|
|
437
|
+
getFilename() {
|
|
438
|
+
let t = this.chart.userOptions.title?.text, e = this.options.filename;
|
|
439
|
+
return e ? e.replace(/\//g, "-") : (typeof t == "string" && (e = t.toLowerCase().replace(/<\/?[^>]+(>|$)/g, "").replace(/[\s_]+/g, "-").replace(/[^a-z\d\-]/g, "").replace(/^[\-]+/g, "").replace(/[\-]+/g, "-").substr(0, 24).replace(/[\-]+$/g, "")), (!e || e.length < 5) && (e = "chart"), e);
|
|
440
|
+
}
|
|
441
|
+
getSVG(t) {
|
|
442
|
+
let e = this.chart, o, n, i = O(e.options, t);
|
|
443
|
+
i.plotOptions = O(e.userOptions.plotOptions, t?.plotOptions), i.time = O(e.userOptions.time, t?.time);
|
|
444
|
+
let r = H("div", void 0, { position: "absolute", top: "-9999em", width: e.chartWidth + "px", height: e.chartHeight + "px" }, D.body), c = e.renderTo.style.width, a = e.renderTo.style.height, l = i.exporting?.sourceWidth || i.chart.width || /px$/.test(c) && parseInt(c, 10) || (i.isGantt ? 800 : 600), u = i.exporting?.sourceHeight || i.chart.height || /px$/.test(a) && parseInt(a, 10) || 400;
|
|
445
|
+
A(i.chart, { animation: !1, renderTo: r, forExport: !0, renderer: "SVGRenderer", width: l, height: u }), i.exporting && (i.exporting.enabled = !1), delete i.data, i.series = [], e.series.forEach(function(p) {
|
|
446
|
+
(n = O(p.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: p.visible })).isInternal || i?.series?.push(n);
|
|
447
|
+
});
|
|
448
|
+
let f = {};
|
|
449
|
+
e.axes.forEach(function(p) {
|
|
450
|
+
p.userOptions.internalKey || (p.userOptions.internalKey = It()), i && !p.options.isInternal && (f[p.coll] || (f[p.coll] = !0, i[p.coll] = []), i[p.coll].push(O(p.userOptions, { visible: p.visible, type: p.type, uniqueNames: p.uniqueNames })));
|
|
451
|
+
}), i.colorAxis = e.userOptions.colorAxis;
|
|
452
|
+
let h = new e.constructor(i, e.callback);
|
|
453
|
+
return t && ["xAxis", "yAxis", "series"].forEach(function(p) {
|
|
454
|
+
t[p] && h.update({ [p]: t[p] });
|
|
455
|
+
}), e.axes.forEach(function(p) {
|
|
456
|
+
let x = Mt(h.axes, (v) => v.options.internalKey === p.userOptions.internalKey);
|
|
457
|
+
if (x) {
|
|
458
|
+
let v = p.getExtremes(), m = jt(t?.[p.coll] || {})[0], y = "min" in m ? m.min : v.userMin, g = "max" in m ? m.max : v.userMax;
|
|
459
|
+
(y !== void 0 && y !== x.min || g !== void 0 && g !== x.max) && x.setExtremes(y ?? void 0, g ?? void 0, !0, !1);
|
|
460
|
+
}
|
|
461
|
+
}), o = h.exporting?.getChartHTML(e.styledMode || i.exporting?.applyStyleSheets) || "", U(e, "getSVG", { chartCopy: h }), o = d.sanitizeSVG(o, i), i = void 0, h.destroy(), st(r), o;
|
|
462
|
+
}
|
|
463
|
+
getSVGForExport(t, e) {
|
|
464
|
+
let o = this.options;
|
|
465
|
+
return this.getSVG(O({ chart: { borderRadius: 0 } }, o.chartOptions, e, { exporting: { sourceWidth: t?.sourceWidth || o.sourceWidth, sourceHeight: t?.sourceHeight || o.sourceHeight } }));
|
|
466
|
+
}
|
|
467
|
+
inlineStyles() {
|
|
468
|
+
let t, e = d.inlineDenylist, o = d.inlineAllowlist, n = {}, i = H("iframe", void 0, { width: "1px", height: "1px", visibility: "hidden" }, D.body), r = i.contentWindow?.document;
|
|
469
|
+
r && r.body.appendChild(r.createElementNS(Nt, "svg")), function c(a) {
|
|
470
|
+
let l, u, f, h, p, x, v = {};
|
|
471
|
+
if (r && a.nodeType === 1 && d.unstyledElements.indexOf(a.nodeName) === -1) {
|
|
472
|
+
if (l = w.getComputedStyle(a, null), u = a.nodeName === "svg" ? {} : w.getComputedStyle(a.parentNode, null), !n[a.nodeName]) {
|
|
473
|
+
t = r.getElementsByTagName("svg")[0], f = r.createElementNS(a.namespaceURI, a.nodeName), t.appendChild(f);
|
|
474
|
+
let m = w.getComputedStyle(f, null), y = {};
|
|
475
|
+
for (let g in m) g.length < 1e3 && typeof m[g] == "string" && !/^\d+$/.test(g) && (y[g] = m[g]);
|
|
476
|
+
n[a.nodeName] = y, a.nodeName === "text" && delete n.text.fill, t.removeChild(f);
|
|
477
|
+
}
|
|
478
|
+
for (let m in l) (Pt || B || q || Object.hasOwnProperty.call(l, m)) && function(y, g) {
|
|
479
|
+
if (h = p = !1, o.length) {
|
|
480
|
+
for (x = o.length; x-- && !p; ) p = o[x].test(g);
|
|
481
|
+
h = !p;
|
|
482
|
+
}
|
|
483
|
+
for (g === "transform" && y === "none" && (h = !0), x = e.length; x-- && !h; ) {
|
|
484
|
+
if (g.length > 1e3) throw Error("Input too long");
|
|
485
|
+
h = e[x].test(g) || typeof y == "function";
|
|
486
|
+
}
|
|
487
|
+
!h && (u[g] !== y || a.nodeName === "svg") && n[a.nodeName][g] !== y && (d.inlineToAttributes && d.inlineToAttributes.indexOf(g) === -1 ? v[g] = y : y && a.setAttribute(d.hyphenate(g), y));
|
|
488
|
+
}(l[m], m);
|
|
489
|
+
if (C(a, v), a.nodeName === "svg" && a.setAttribute("stroke-width", "1px"), a.nodeName === "text") return;
|
|
490
|
+
[].forEach.call(a.children || a.childNodes, c);
|
|
491
|
+
}
|
|
492
|
+
}(this.chart.container.querySelector("svg")), t.parentNode.removeChild(t), i.parentNode.removeChild(i);
|
|
493
|
+
}
|
|
494
|
+
async localExport(t, e) {
|
|
495
|
+
let o = this.chart, n, i, r = null, c;
|
|
496
|
+
if (B && o.styledMode && !d.inlineAllowlist.length && d.inlineAllowlist.push(/^blockSize/, /^border/, /^caretColor/, /^color/, /^columnRule/, /^columnRuleColor/, /^cssFloat/, /^cursor/, /^fill$/, /^fillOpacity/, /^font/, /^inlineSize/, /^length/, /^lineHeight/, /^opacity/, /^outline/, /^parentRule/, /^rx$/, /^ry$/, /^stroke/, /^textAlign/, /^textAnchor/, /^textDecoration/, /^transform/, /^vectorEffect/, /^visibility/, /^x$/, /^y$/), B && (t.type === "application/pdf" || o.container.getElementsByTagName("image").length && t.type !== "image/svg+xml") || t.type === "application/pdf" && [].some.call(o.container.getElementsByTagName("image"), function(l) {
|
|
497
|
+
let u = l.getAttribute("href");
|
|
498
|
+
return u !== "" && typeof u == "string" && u.indexOf("data:") !== 0;
|
|
499
|
+
})) return void await this.fallbackToServer(t, Error("Image type not supported for this chart/browser."));
|
|
500
|
+
let a = R(o, "getSVG", (l) => {
|
|
501
|
+
i = l.chartCopy.options, c = (n = l.chartCopy.container.cloneNode(!0)) && n.getElementsByTagName("image") || [];
|
|
502
|
+
});
|
|
503
|
+
try {
|
|
504
|
+
let l;
|
|
505
|
+
for (let h of (this.getSVGForExport(t, e), c ? Array.from(c) : [])) if (r = h.getAttributeNS("http://www.w3.org/1999/xlink", "href")) {
|
|
506
|
+
d.objectURLRevoke = !1;
|
|
507
|
+
let p = await d.imageToDataURL(r, t?.scale || 1, t?.type || "image/png");
|
|
508
|
+
h.setAttributeNS("http://www.w3.org/1999/xlink", "href", p);
|
|
509
|
+
} else h.parentNode.removeChild(h);
|
|
510
|
+
let u = n?.querySelector("svg");
|
|
511
|
+
u && !t.chartOptions?.chart?.style?.fontFamily && await d.inlineFonts(u);
|
|
512
|
+
let f = (l = n?.innerHTML, d.sanitizeSVG(l || "", i));
|
|
513
|
+
if (f.indexOf("<foreignObject") > -1 && t.type !== "image/svg+xml" && (B || t.type === "application/pdf")) throw Error("Image type not supported for charts with embedded HTML");
|
|
514
|
+
return await this.downloadSVG(f, A({ filename: this.getFilename() }, t)), f;
|
|
515
|
+
} catch (l) {
|
|
516
|
+
await this.fallbackToServer(t, l);
|
|
517
|
+
} finally {
|
|
518
|
+
a();
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
moveContainers(t) {
|
|
522
|
+
let e = this.chart, { scrollablePlotArea: o } = e;
|
|
523
|
+
(o ? [o.fixedDiv, o.scrollingContainer] : [e.container]).forEach(function(n) {
|
|
524
|
+
t.appendChild(n);
|
|
525
|
+
});
|
|
526
|
+
}
|
|
527
|
+
print() {
|
|
528
|
+
let t = this.chart;
|
|
529
|
+
this.isPrinting || (d.printingChart = t, q || this.beforePrint(), setTimeout(() => {
|
|
530
|
+
w.focus(), w.print(), q || setTimeout(() => {
|
|
531
|
+
t.exporting?.afterPrint();
|
|
532
|
+
}, 1e3);
|
|
533
|
+
}, 1));
|
|
534
|
+
}
|
|
535
|
+
render() {
|
|
536
|
+
let t = this, { chart: e, options: o } = t, n = t?.isDirty || !t?.svgElements.length;
|
|
537
|
+
t.buttonOffset = 0, t.isDirty && t.destroy(), n && o.enabled !== !1 && (t.events = [], t.group || (t.group = e.renderer.g("exporting-group").attr({ zIndex: 3 }).add()), At(o?.buttons, function(i) {
|
|
538
|
+
t.addButton(i);
|
|
539
|
+
}), t.isDirty = !1);
|
|
540
|
+
}
|
|
541
|
+
resolveCSSVariables() {
|
|
542
|
+
Array.from(this.chart.container.querySelectorAll("*")).forEach((t) => {
|
|
543
|
+
["color", "fill", "stop-color", "stroke"].forEach((e) => {
|
|
544
|
+
t.getAttribute(e)?.includes("var(") && t.setAttribute(e, getComputedStyle(t).getPropertyValue(e)), t.style?.[e]?.includes("var(") && (t.style[e] = getComputedStyle(t).getPropertyValue(e));
|
|
545
|
+
});
|
|
546
|
+
});
|
|
547
|
+
}
|
|
548
|
+
update(t, e) {
|
|
549
|
+
this.isDirty = !0, O(!0, this.options, t), $(e, !0) && this.chart.redraw();
|
|
550
|
+
}
|
|
551
|
+
}
|
|
552
|
+
d.inlineAllowlist = [], d.inlineDenylist = [/-/, /^(clipPath|cssText|d|height|width)$/, /^font$/, /[lL]ogical(Width|Height)$/, /^parentRule$/, /^(cssRules|ownerRules)$/, /perspective/, /TapHighlightColor/, /^transition/, /^length$/, /^\d+$/], d.inlineToAttributes = ["fill", "stroke", "strokeLinecap", "strokeLinejoin", "strokeWidth", "textAnchor", "x", "y"], d.loadEventDeferDelay = 150 * !!B, d.unstyledElements = ["clipPath", "defs", "desc"], function(s) {
|
|
553
|
+
function t(n) {
|
|
554
|
+
let i = n.exporting;
|
|
555
|
+
i && (i.render(), R(n, "redraw", function() {
|
|
556
|
+
this.exporting?.render();
|
|
557
|
+
}), R(n, "destroy", function() {
|
|
558
|
+
this.exporting?.destroy();
|
|
559
|
+
}));
|
|
560
|
+
}
|
|
561
|
+
function e() {
|
|
562
|
+
let n = this;
|
|
563
|
+
n.options.exporting && (n.exporting = new s(n, n.options.exporting), yt.compose(n).navigation.addUpdate((i, r) => {
|
|
564
|
+
n.exporting && (n.exporting.isDirty = !0, O(!0, n.options.navigation, i), $(r, !0) && n.redraw());
|
|
565
|
+
}));
|
|
566
|
+
}
|
|
567
|
+
function o({ alignTo: n, key: i, textPxLength: r }) {
|
|
568
|
+
let c = this.options.exporting, { align: a, buttonSpacing: l = 0, verticalAlign: u, width: f = 0 } = O(this.options.navigation?.buttonOptions, c?.buttons?.contextButton), h = n.width - r, p = f + l;
|
|
569
|
+
(c?.enabled ?? !0) && i === "title" && a === "right" && u === "top" && h < 2 * p && (h < p ? n.width -= p : this.title?.alignValue !== "left" && (n.x -= p - h / 2));
|
|
570
|
+
}
|
|
571
|
+
s.compose = function(n, i) {
|
|
572
|
+
St.compose(i), it.compose(n), Ht(Rt, "Exporting") && (A(mt().prototype, { exportChart: async function(r, c) {
|
|
573
|
+
await this.exporting?.exportChart(r, c);
|
|
574
|
+
}, getChartHTML: function(r) {
|
|
575
|
+
return this.exporting?.getChartHTML(r);
|
|
576
|
+
}, getFilename: function() {
|
|
577
|
+
return this.exporting?.getFilename();
|
|
578
|
+
}, getSVG: function(r) {
|
|
579
|
+
return this.exporting?.getSVG(r);
|
|
580
|
+
}, print: function() {
|
|
581
|
+
return this.exporting?.print();
|
|
582
|
+
} }), n.prototype.callbacks.push(t), R(n, "afterInit", e), R(n, "layOutTitle", o), q && w.matchMedia("print").addListener(function(r) {
|
|
583
|
+
s.printingChart && (r.matches ? s.printingChart.exporting?.beforePrint() : s.printingChart.exporting?.afterPrint());
|
|
584
|
+
}), Ft(bt));
|
|
585
|
+
};
|
|
586
|
+
}(d || (d = {}));
|
|
587
|
+
let lt = d, T = E();
|
|
588
|
+
T.Exporting = lt, T.HttpUtilities = T.HttpUtilities || V, T.ajax = T.HttpUtilities.ajax, T.getJSON = T.HttpUtilities.getJSON, T.post = T.HttpUtilities.post, lt.compose(T.Chart, T.Renderer);
|
|
589
|
+
let Bt = E();
|
|
590
|
+
return Q.default;
|
|
591
|
+
})());
|
|
592
|
+
}(W)), W.exports;
|
|
593
|
+
}
|
|
594
|
+
var ht = qt();
|
|
595
|
+
const Wt = /* @__PURE__ */ $t(ht), Kt = /* @__PURE__ */ Gt({
|
|
596
|
+
__proto__: null,
|
|
597
|
+
default: Wt
|
|
598
|
+
}, [ht]);
|
|
599
|
+
export {
|
|
600
|
+
Kt as e
|
|
601
|
+
};
|