PageSourceSearch

https://www.townscript.com/dashboard/vendor/javascripts/highcharts-exporting.cache.js

js townscript.com collected 2026-09-24 08:35:46 UTC 9,633 bytes, 54 lines download raw bytes

1/*
2 Highcharts JS v4.2.3 (2016-02-08)
3 Exporting module
4
5 (c) 2010-2016 Torstein Honsi
6
7 License: www.highcharts.com/license
8 */
9(function (f) { typeof module === "object" && module.exports ? module.exports = f : f(Highcharts) })(function (f) {
10	var r = f.win, m = r.document, A = f.Chart, t = f.addEvent, B = f.removeEvent, C = f.fireEvent, n = f.createElement, s = f.discardElement, v = f.css, l = f.merge, i = f.each, q = f.extend, F = f.splat, G = Math.max, H = f.isTouchDevice, I = f.Renderer.prototype.symbols, y = f.getOptions(), z; q(y.lang, {
11		printChart: "Print chart", downloadPNG: "Download PNG image", downloadJPEG: "Download JPEG image", downloadPDF: "Download PDF document", downloadSVG: "Download SVG vector image",
12		contextButtonTitle: "Chart context menu"
13	}); y.navigation = { menuStyle: { border: "1px solid #A0A0A0", background: "#FFFFFF", padding: "5px 0" }, menuItemStyle: { padding: "0 10px", background: "none", color: "#303030", fontSize: H ? "14px" : "11px" }, menuItemHoverStyle: { background: "#4572A5", color: "#FFFFFF" }, buttonOptions: { symbolFill: "#E0E0E0", symbolSize: 14, symbolStroke: "#666", symbolStrokeWidth: 3, symbolX: 12.5, symbolY: 10.5, align: "right", buttonSpacing: 3, height: 22, theme: { fill: "white", stroke: "none" }, verticalAlign: "top", width: 24 } };
14	y.exporting = {
15		type: "image/png", url: "http://export.highcharts.com/", buttons: {
16			contextButton: {
17				menuClassName: "highcharts-contextmenu", symbol: "menu", _titleKey: "contextButtonTitle", menuItems: [{ textKey: "printChart", onclick: function () { this.print() } }, { separator: !0 }, { textKey: "downloadPNG", onclick: function () { this.exportChart() } }, { textKey: "downloadJPEG", onclick: function () { this.exportChart({ type: "image/jpeg" }) } }, { textKey: "downloadPDF", onclick: function () { this.exportChart({ type: "application/pdf" }) } }, {
18					textKey: "downloadSVG",
19					onclick: function () { this.exportChart({ type: "image/svg+xml" }) }
20				}]
21			}
22		}
23	}; f.post = function (a, b, e) { var c, a = n("form", l({ method: "post", action: a, enctype: "multipart/form-data" }, e), { display: "none" }, m.body); for (c in b) n("input", { type: "hidden", name: c, value: b[c] }, null, a); a.submit(); s(a) }; q(A.prototype, {
24		sanitizeSVG: function (a) {
25			return a.replace(/zIndex="[^"]+"/g, "").replace(/isShadow="[^"]+"/g, "").replace(/symbolName="[^"]+"/g, "").replace(/jQuery[0-9]+="[^"]+"/g, "").replace(/url\([^#]+#/g, "url(#").replace(/<svg /, '<svg xmlns:xlink="http://www.w3.org/1999/xlink" ').replace(/ (NS[0-9]+\:)?href=/g,
26				" xlink:href=").replace(/\n/, " ").replace(/<\/svg>.*?$/, "</svg>").replace(/(fill|stroke)="rgba\(([ 0-9]+,[ 0-9]+,[ 0-9]+),([ 0-9\.]+)\)"/g, '$1="rgb($2)" $1-opacity="$3"').replace(/&nbsp;/g, "\u00a0").replace(/&shy;/g, "\u00ad").replace(/<IMG /g, "<image ").replace(/<(\/?)TITLE>/g, "<$1title>").replace(/height=([^" ]+)/g, 'height="$1"').replace(/width=([^" ]+)/g, 'width="$1"').replace(/hc-svg-href="([^"]+)">/g, 'xlink:href="$1"/>').replace(/ id=([^" >]+)/g, ' id="$1"').replace(/class=([^" >]+)/g, 'class="$1"').replace(/ transform /g,
27					" ").replace(/:(path|rect)/g, "$1").replace(/style="([^"]+)"/g, function (b) { return b.toLowerCase() })
28		}, getChartHTML: function () { return this.container.innerHTML }, getSVG: function (a) {
29			var b = this, e, c, g, j, k, d = l(b.options, a), J = d.exporting.allowHTML; if (!m.createElementNS) m.createElementNS = function (b, a) { return m.createElement(a) }; c = n("div", null, { position: "absolute", top: "-9999em", width: b.chartWidth + "px", height: b.chartHeight + "px" }, m.body); g = b.renderTo.style.width; k = b.renderTo.style.height; g = d.exporting.sourceWidth ||
30				d.chart.width || /px$/.test(g) && parseInt(g, 10) || 600; k = d.exporting.sourceHeight || d.chart.height || /px$/.test(k) && parseInt(k, 10) || 400; q(d.chart, { animation: !1, renderTo: c, forExport: !0, renderer: "SVGRenderer", width: g, height: k }); d.exporting.enabled = !1; delete d.data; d.series = []; i(b.series, function (a) { j = l(a.userOptions, { animation: !1, enableMouseTracking: !1, showCheckbox: !1, visible: a.visible }); j.isInternal || d.series.push(j) }); a && i(["xAxis", "yAxis"], function (b) { i(F(a[b]), function (a, c) { d[b][c] = l(d[b][c], a) }) }); e =
31					new f.Chart(d, b.callback); i(["xAxis", "yAxis"], function (a) { i(b[a], function (b, c) { var d = e[a][c], f = b.getExtremes(), g = f.userMin, f = f.userMax; d && (g !== void 0 || f !== void 0) && d.setExtremes(g, f, !0, !1) }) }); g = e.getChartHTML(); d = null; e.destroy(); s(c); if (J && (c = g.match(/<\/svg>(.*?$)/))) c = '<foreignObject x="0" y="0" width="200" height="200"><body xmlns="http://www.w3.org/1999/xhtml">' + c[1] + "</body></foreignObject>", g = g.replace("</svg>", c + "</svg>"); g = this.sanitizeSVG(g); return g = g.replace(/(url\(#highcharts-[0-9]+)&quot;/g,
32						"$1").replace(/&quot;/g, "'")
33		}, getSVGForExport: function (a, b) { var e = this.options.exporting;
33 return this.getSVG(l({ chart: { borderRadius: 0 } }, e.chartOptions, b, { exporting: { sourceWidth: a && a.sourceWidth || e.sourceWidth, sourceHeight: a && a.sourceHeight || e.sourceHeight } })) }, exportChart: function (a, b) { var e = this.getSVGForExport(a, b), a = l(this.options.exporting, a); f.post(a.url, { filename: a.filename || "chart", type: a.type, width: a.width || 0, scale: a.scale || 2, svg: e }, a.formAttributes) }, print: function () {
34			var a = this, b = a.container,
35			e = [], c = b.parentNode, f = m.body, j = f.childNodes; if (!a.isPrinting) a.isPrinting = !0, a.pointer.reset(null, 0), C(a, "beforePrint"), i(j, function (a, b) { if (a.nodeType === 1) e[b] = a.style.display, a.style.display = "none" }), f.appendChild(b), r.focus(), r.print(), setTimeout(function () { c.appendChild(b); i(j, function (a, b) { if (a.nodeType === 1) a.style.display = e[b] }); a.isPrinting = !1; C(a, "afterPrint") }, 1E3)
36		}, contextMenu: function (a, b, e, c, f, j, k) {
37			var d = this, l = d.options.navigation, D = l.menuItemStyle, o = d.chartWidth, p = d.chartHeight, E = "cache-" +
38				a, h = d[E], u = G(f, j), w, x, r, s = function (b) { d.pointer.inClass(b.target, a) || x() }; if (!h) d[E] = h = n("div", { className: a }, { position: "absolute", zIndex: 1E3, padding: u + "px" }, d.container), w = n("div", null, q({ MozBoxShadow: "3px 3px 10px #888", WebkitBoxShadow: "3px 3px 10px #888", boxShadow: "3px 3px 10px #888" }, l.menuStyle), h), x = function () { v(h, { display: "none" }); k && k.setState(0); d.openMenu = !1 }, t(h, "mouseleave", function () { r = setTimeout(x, 500) }), t(h, "mouseenter", function () { clearTimeout(r) }), t(m, "mouseup", s), t(d, "destroy", function () {
39					B(m,
40						"mouseup", s)
41				}), i(b, function (a) { if (a) { var b = a.separator ? n("hr", null, null, w) : n("div", { onmouseover: function () { v(this, l.menuItemHoverStyle) }, onmouseout: function () { v(this, D) }, onclick: function (b) { b && b.stopPropagation(); x(); a.onclick && a.onclick.apply(d, arguments) }, innerHTML: a.text || d.options.lang[a.textKey] }, q({ cursor: "pointer" }, D), w); d.exportDivElements.push(b) } }), d.exportDivElements.push(w, h), d.exportMenuWidth = h.offsetWidth, d.exportMenuHeight = h.offsetHeight; b = { display: "block" }; e + d.exportMenuWidth > o ? b.right =
42					o - e - f - u + "px" : b.left = e - u + "px"; c + j + d.exportMenuHeight > p && k.alignOptions.verticalAlign !== "top" ? b.bottom = p - c - u + "px" : b.top = c + j - u + "px"; v(h, b); d.openMenu = !0
43		}, addButton: function (a) {
44			var b = this, e = b.renderer, c = l(b.options.navigation.buttonOptions, a), g = c.onclick, j = c.menuItems, k, d, m = { stroke: c.symbolStroke, fill: c.symbolFill }, i = c.symbolSize || 12; if (!b.btnCount) b.btnCount = 0; if (!b.exportDivElements) b.exportDivElements = [], b.exportSVGElements = []; if (c.enabled !== !1) {
45				var o = c.theme, p = o.states, n = p && p.hover, p = p && p.select,
46				h; delete o.states; g ? h = function (a) { a.stopPropagation(); g.call(b, a) } : j && (h = function () { b.contextMenu(d.menuClassName, j, d.translateX, d.translateY, d.width, d.height, d); d.setState(2) }); c.text && c.symbol ? o.paddingLeft = f.pick(o.paddingLeft, 25) : c.text || q(o, { width: c.width, height: c.height, padding: 0 }); d = e.button(c.text, 0, 0, h, o, n, p).attr({ title: b.options.lang[c._titleKey], "stroke-linecap": "round", zIndex: 3 }); d.menuClassName = a.menuClassName || "highcharts-menu-" + b.btnCount++; c.symbol && (k = e.symbol(c.symbol, c.symbolX -
47					i / 2, c.symbolY - i / 2, i, i).attr(q(m, { "stroke-width": c.symbolStrokeWidth || 1, zIndex: 1 })).add(d)); d.add().align(q(c, { width: d.width, x: f.pick(c.x, z) }), !0, "spacingBox"); z += (d.width + c.buttonSpacing) * (c.align === "right" ? -1 : 1); b.exportSVGElements.push(d, k)
48			}
49		}, destroyExport: function (a) {
50			var a = a.target, b, e; for (b = 0; b < a.exportSVGElements.length; b++)if (e = a.exportSVGElements[b]) e.onclick = e.ontouchstart = null, a.exportSVGElements[b] = e.destroy(); for (b = 0; b < a.exportDivElements.length; b++)e = a.exportDivElements[b], B(e, "mouseleave"),
51				a.exportDivElements[b] = e.onmouseout = e.onmouseover = e.ontouchstart = e.onclick = null, s(e)
52		}
53	}); I.menu = function (a, b, e, c) { return ["M", a, b + 2.5, "L", a + e, b + 2.5, "M", a, b + c / 2 + 0.5, "L", a + e, b + c / 2 + 0.5, "M", a, b + c - 1.5, "L", a + e, b + c - 1.5] }; A.prototype.callbacks.push(function (a) { var b, e = a.options.exporting, c = e.buttons; z = 0; if (e.enabled !== !1) { for (b in c) a.addButton(c[b]); t(a, "destroy", a.destroyExport) } })
54});

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.