PageSourceSearch

https://social.grifdail.fr/client-assets/tagcanvas.min.js

js grifdail.fr collected 2026-10-04 12:24:30 UTC 63,360 bytes, 2,553 lines download raw bytes

1/**
2 * Copyright (C) 2010-2021 Graham Breach
3 *
4 * This program is free software: you can redistribute it and/or modify
5 * it under the terms of the GNU Lesser General Public License as published by
6 * the Free Software Foundation, either version 3 of the License, or
7 * (at your option) any later version.
8 *
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 * GNU Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public License
15 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
16 */
17/**
18 * TagCanvas 2.11
19 * For more information, please contact <[email protected]>
20 */
21(function () {
22	"use strict";
23	var r,
24		C,
25		p = Math.abs,
26		o = Math.sin,
27		l = Math.cos,
28		g = Math.max,
29		h = Math.min,
30		af = Math.ceil,
31		E = Math.sqrt,
32		w = Math.pow,
33		I = {},
34		D = {},
35		R = {
36			0: "0,",
37			1: "17,",
38			2: "34,",
39			3: "51,",
40			4: "68,",
41			5: "85,",
42			6: "102,",
43			7: "119,",
44			8: "136,",
45			9: "153,",
46			a: "170,",
47			A: "170,",
48			b: "187,",
49			B: "187,",
50			c: "204,",
51			C: "204,",
52			d: "221,",
53			D: "221,",
54			e: "238,",
55			E: "238,",
56			f: "255,",
57			F: "255,",
58		},
59		f,
60		d,
61		b,
62		T,
63		z,
64		F,
65		M,
66		c = document,
67		v,
68		e,
69		P,
70		j = {};
71	for (r = 0; r < 256; ++r)
72		(C = r.toString(16)),
73			r < 16 && (C = "0" + C),
74			(D[C] = D[C.toUpperCase()] = r.toString() + ",");
75	function n(a) {
76		return typeof a != "undefined";
77	}
78	function B(a) {
79		return typeof a == "object" && a != null;
80	}
81	function G(a, c, b) {
82		return isNaN(a) ? b : h(b, g(c, a));
83	}
84	function x() {
85		return !1;
86	}
87	function q() {
88		return new Date().valueOf();
89	}
90	function ak(c, d) {
91		var b = [],
92			e = c.length,
93			a;
94		for (a = 0; a < e; ++a) b.push(c[a]);
95		return b.sort(d), b;
96	}
97	function ai(a) {
98		for (var b = a.length - 1, d, c; b; )
99			(c = ~~(Math.random() * b)), (d = a[b]), (a[b] = a[c]), (a[c] = d), --b;
100	}
101	function ag() {
102		var a = window.AudioContext || window.webkitAudioContext;
103		if (((e = new a()), !e)) {
104			e = "off";
105			return;
106		}
107		return e;
108	}
109	function $(u, a, t, s, r, q, p) {
110		var j = s,
111			h = r,
112			i = t * 0.01,
113			n = 80 * i,
114			m = 100 * i,
115			o = 40 * i,
116			l = 30 * i,
117			c = l / 2,
118			b = j + n,
119			f = b - o,
120			k = h + m,
121			d = k - l,
122			g = h + l,
123			e = h + m / 2;
124		if (
125			(a.setTransform(1, 0, 0, 1, 0, 0),
126			a.setLineDash([]),
127			(a.globalAlpha = 1),
128			(a.strokeStyle = p),
129			(a.lineWidth = q),
130			(a.lineJoin = "round"),
131			a.beginPath(),
132			a.moveTo(f, g),
133			a.lineTo(f, d),
134			a.moveTo(b, k),
135			a.lineTo(f, d),
136			a.lineTo(j, d),
137			a.lineTo(j, g),
138			a.lineTo(f, g),
139			a.lineTo(b, h),
140			u)
141		) {
142			a.lineTo(b, g),
143				a.moveTo(b, d),
144				a.lineTo(b, k),
145				a.moveTo(b - c, e - c),
146				a.lineTo(b + c, e + c),
147				a.moveTo(b + c, e - c),
148				a.lineTo(b - c, e + c),
149				a.stroke();
150			return;
151		}
152		a.closePath(), a.stroke();
153	}
154	function s(a, b, c) {
155		(this.x = a), (this.y = b), (this.z = c);
156	}
157	(z = s.prototype),
158		(z.length = function () {
159			return E(this.x * this.x + this.y * this.y + this.z * this.z);
160		}),
161		(z.dot = function (a) {
162			return this.x * a.x + this.y * a.y + this.z * a.z;
163		}),
164		(z.cross = function (a) {
165			var b = this.y * a.z - this.z * a.y,
166				c = this.z * a.x - this.x * a.z,
167				d = this.x * a.y - this.y * a.x;
168			return new s(b, c, d);
169		}),
170		(z.angle = function (b) {
171			var c = this.dot(b),
172				a;
173			return c == 0
174				? Math.PI / 2
175				: ((a = c / (this.length() * b.length())), a >= 1)
176				? 0
177				: a <= -1
178				? Math.PI
179				: Math.acos(a);
180		}),
181		(z.unit = function () {
182			var a = this.length();
183			return new s(this.x / a, this.y / a, this.z / a);
184		});
185	function ay(b, a) {
186		(a = (a * Math.PI) / 180), (b = (b * Math.PI) / 180);
187		var c = o(b) * l(a),
188			d = -o(a),
189			e = -l(b) * l(a);
190		return new s(c, d, e);
191	}
192	function m(a) {
193		(this[1] = { 1: a[0], 2: a[1], 3: a[2] }),
194			(this[2] = { 1: a[3], 2: a[4], 3: a[5] }),
195			(this[3] = { 1: a[6], 2: a[7], 3: a[8] });
196	}
197	(T = m.prototype),
198		(m.Identity = function () {
199			return new m([1, 0, 0, 0, 1, 0, 0, 0, 1]);
200		}),
201		(m.Rotation = function (e, a) {
202			var c = o(e),
203				d = l(e),
204				b = 1 - d;
205			return new m([
206				d + w(a.x, 2) * b,
207				a.x * a.y * b - a.z * c,
208				a.x * a.z * b + a.y * c,
209				a.y * a.x * b + a.z * c,
210				d + w(a.y, 2) * b,
211				a.y * a.z * b - a.x * c,
212				a.z * a.x * b - a.y * c,
213				a.z * a.y * b + a.x * c,
214				d + w(a.z, 2) * b,
215			]);
216		}),
217		(T.mul = function (c) {
218			var d = [],
219				a,
220				b,
221				e = c.xform ? 1 : 0;
222			for (a = 1; a <= 3; ++a)
223				for (b = 1; b <= 3; ++b)
224					e
225						? d.push(
226								this[a][1] * c[1][b] +
227									this[a][2] * c[2][b] +
228									this[a][3] * c[3][b],
229						  )
230						: d.push(this[a][b] * c);
231			return new m(d);
232		}),
233		(T.xform = function (b) {
234			var a = {},
235				c = b.x,
236				d = b.y,
237				e = b.z;
238			return (
239				(a.x = c * this[1][1] + d * this[2][1] + e * this[3][1]),
240				(a.y = c * this[1][2] + d * this[2][2] + e * this[3][2]),
241				(a.z = c * this[1][3] + d * this[2][3] + e * this[3][3]),
242				a
243			);
244		});
245	function aB(g, j, k, m, f) {
246		var a,
247			b,
248			c,
249			d,
250			e = [],
251			h = 2 / g,
252			i;
253		i = Math.PI * (3 - E(5) + (parseFloat(f) ? parseFloat(f) : 0));
254		for (a = 0; a < g; ++a)
255			(b = a * h - 1 + h / 2),
256				(c = E(1 - b * b)),
257				(d = a * i),
258				e.push([l(d) * c * j, b * k, o(d) * c * m]);
259		return e;
260	}
261	function U(n, p, m, k, h, g) {
262		var b,
263			f = [],
264			i = 2 / n,
265			j,
266			a,
267			d,
268			c,
269			e;
270		j = Math.PI * (3 - E(5) + (parseFloat(g) ? parseFloat(g) : 0));
271		for (a = 0; a < n; ++a)
272			(d = a * i - 1 + i / 2),
273				(b = a * j),
274				(c = l(b)),
275				(e = o(b)),
276				f.push(p ? [d * m, c * k, e * h] : [c * m, d * k, e * h]);
277		return f;
278	}
279	function aa(k, e, f, h, i, j) {
280		var b,
281			g = [],
282			m = (Math.PI * 2) / e,
283			a,
284			c,
285			d;
286		for (a = 0; a < e; ++a)
287			(b = a * m),
288				(c = l(b)),
289				(d = o(b)),
290				g.push(k ? [j * f, c * h, d * i] : [c * f, j * h, d * i]);
291		return g;
292	}
293	function ax(a, b, c, d, e) {
294		return U(a, 0, b, c, d, e);
295	}
296	function aH(a, b, c, d, e) {
297		return U(a, 1, b, c, d, e);
298	}
299	function aG(b, c, d, e, a) {
300		return (a = isNaN(a) ? 0 : a * 1), aa(0, b, c, d, e, a);
301	}
302	function aF(b, c, d, e, a) {
303		return (a = isNaN(a) ? 0 : a * 1), aa(1, b, c, d, e, a);
304	}
305	function av(b) {
306		var a = new Image();
307		(a.onload = function () {
308			var c = a.width / 2,
309				d = a.height / 2;
310			b.centreFunc = function (b, g, h, e, f) {
311				b.setTransform(1, 0, 0, 1, 0, 0),
312					(b.globalAlpha = 1),
313					b.drawImage(a, e - c, f - d);
314			};
315		}),
316			(a.src = b.centreImage);
317	}
318	function aE(a, c) {
319		var b = a,
320			d,
321			e,
322			f = (c * 1).toPrecision(3) + ")";
323		return (
324			a[0] === "#"
325				? (I[a] ||
326						(a.length === 4
327							? (I[a] = "rgba(" + R[a[1]] + R[a[2]] + R[a[3]])
328							: (I[a] =
329									"rgba(" +
330									D[a.substr(1, 2)] +
331									D[a.substr(3, 2)] +
332									D[a.substr(5, 2)])),
333				  (b = I[a] + f))
334				: a.substr(0, 4) === "rgb(" || a.substr(0, 4) === "hsl("
335				? (b = a.replace("(", "a(").replace(")", "," + f))
336				: (a.substr(0, 5) === "rgba(" || a.substr(0, 5) === "hsla(") &&
337				  ((d = a.lastIndexOf(",") + 1),
338				  (e = a.indexOf(")")),
339				  (c *= parseFloat(a.substring(d, e))),
340				  (b = a.substr(0, d) + c.toPrecision(3) + ")")),
341			b
342		);
343	}
344	function k(b, d) {
345		if (window.G_vmlCanvasManager) return null;
346		var a = c.createElement("canvas");
347		return (a.width = b), (a.height = d), a;
348	}
349	function aD() {
350		var b = k(3, 3),
351			a,
352			c;
353		return (
354			!!b &&
355			((a = b.getContext("2d")),
356			(a.strokeStyle = "#000"),
357			(a.shadowColor = "#fff"),
358			(a.shadowBlur = 3),
359			(a.globalAlpha = 0),
360			a.strokeRect(2, 2, 2, 2),
361			(a.globalAlpha = 1),
362			(c = a.getImageData(2, 2, 1, 1)),
363			(b = null),
364			c.data[0] > 0)
365		);
366	}
367	function aC(a, c, f, d) {
368		var e = a.createLinearGradient(0, 0, c, 0),
369			b;
370		for (b in d) e.addColorStop(1 - b, d[b]);
371		(a.fillStyle = e), a.fillRect(0, f, c, 1);
372	}
373	function L(a, m, j) {
374		var l = 1024,
375			d = 1,
376			e = a.weightGradient,
377			i,
378			f,
379			b,
380			c;
381		if (a.gCanvas) (f = a.gCanvas.getContext("2d")), (d = a.gCanvas.height);
382		else {
383			if ((B(e[0]) ? (d = e.length) : (e = [e]), (a.gCanvas = i = k(l, d)), !i))
384				return null;
385			f = i.getContext("2d");
386			for (b = 0; b < d; ++b) aC(f, l, b, e[b]);
387		}
388		return (
389			(j = g(h(j || 0, d - 1), 0)),
390			(c = f.getImageData(~~((l - 1) * m), j, 1, 1).data),
391			"rgba(" + c[0] + "," + c[1] + "," + c[2] + "," + c[3] / 255 + ")"
392		);
393	}
394	function Y(b, i, q, k, o, n, h, d, a, g, f, l) {
395		var m = o + (d || 0) + (a.length && a[0] < 0 ? p(a[0]) : 0),
396			j = n + (d || 0) + (a.length && a[1] < 0 ? p(a[1]) : 0),
397			c,
398			e;
399		(b.font = i),
400			(b.textBaseline = "top"),
401			(b.fillStyle = q),
402			h && (b.shadowColor = h),
403			d && (b.shadowBlur = d),
404			a.length && ((b.shadowOffsetX = a[0]), (b.shadowOffsetY = a[1]));
405		for (c = 0; c < k.length; ++c)
406			(e = 0),
407				f &&
408					("right" == l
409						? (e = g - f[c])
410						: "centre" == l && (e = (g - f[c]) / 2)),
411				b.fillText(k[c], m + e, j),
412				(j += parseInt(i));
413	}
414	function y(d, a, b, f, e, c, g) {
415		c
416			? (d.beginPath(),
417			  d.moveTo(a, b + e - c),
418			  d.arcTo(a, b, a + c, b, c),
419			  d.arcTo(a + f, b, a + f, b + c, c),
420			  d.arcTo(a + f, b + e, a + f - c, b + e, c),
421			  d.arcTo(a, b + e, a, b + e - c, c),
422			  d.closePath(),
423			  d[g ? "stroke" : "fill"]())
424			: d[g ? "strokeRect" : "fillRect"](a, b, f, e);
425	}
426	function O(a, b, c, d, e, f, g, h, i) {
427		(this.strings = a),
428			(this.font = b),
429			(this.width = c),
430			(this.height = d),
431			(this.maxWidth = e),
432			(this.stringWidths = f),
433			(this.align = g),
434			(this.valign = h),
435			(this.scale = i);
436	}
437	(M = O.prototype),
438		(M.SetImage = function (a, b, c, d, e, f, g, h) {
439			(this.image = a),
440				(this.iwidth = b * this.scale),
441				(this.iheight = c * this.scale),
442				(this.ipos = d),
443				(this.ipad = e * this.scale),
444				(this.iscale = h),
445				(this.ialign = f),
446				(this.ivalign = g);
447		}),
448		(M.Align = function (c, d, a) {
449			var b = 0;
450			return (
451				a == "right" || a == "bottom"
452					? (b = d - c)
453					: a != "left" && a != "top" && (b = (d - c) / 2),
454				b
455			);
456		}),
457		(M.Create = function (G, D, F, b, A, m, q, j, E) {
458			var o,
459				e,
460				f,
461				a,
462				l,
463				s,
464				i,
465				u,
466				v,
467				r,
468				w,
469				n,
470				c,
471				d,
472				x,
473				B = p(q[0]),
474				C = p(q[1]),
475				t,
476				z;
477			return (
478				(j = g(j, B + m, C + m)),
479				(l = 2 * (j + b)),
480				(i = 2 * (j + b)),
481				(e = this.width + l),
482				(f = this.height + i),
483				(v = r = j + b),
484				this.image &&
485					((w = n = j + b),
486					(c = this.iwidth),
487					(d = this.iheight),
488					this.ipos == "top" || this.ipos == "bottom"
489						? (c < this.width
490								? (w += this.Align(c, this.width, this.ialign))
491								: (v += this.Align(this.width, c, this.align)),
492						  this.ipos == "top"
493								? (r += d + this.ipad)
494								: (n += this.height + this.ipad),
495						  (e = g(e, c + l)),
496						  (f += d + this.ipad))
497						: (d < this.height
498								? (n += this.Align(d, this.height, this.ivalign))
499								: (r += this.Align(this.height, d, this.valign)),
500						  this.ipos == "right"
501								? (w += this.width + this.ipad)
502								: (v += c + this.ipad),
503						  (e += c + this.ipad),
504						  (f = g(f, d + i)))),
505				(o = k(e, f)),
506				!o
507					? null
508					: ((l = i = b / 2),
509					  (s = e - b),
510					  (u = f - b),
511					  (x = h(E, s / 2, u / 2)),
512					  (a = o.getContext("2d")),
513					  D && ((a.fillStyle = D), y(a, l, i, s, u, x)),
514					  b &&
515							((a.strokeStyle = F), (a.lineWidth = b), y(a, l, i, s, u, x, !0)),
516					  (m || B || C) &&
517							((t = k(e, f)), t && ((z = a), (a = t.getContext("2d")))),
518					  Y(
519							a,
520							this.font,
521							G,
522							this.strings,
523							v,
524							r,
525							0,
526							0,
527							[],
528							this.maxWidth,
529							this.stringWidths,
530							this.align,
531					  ),
532					  this.image && a.drawImage(this.image, w, n, c, d),
533					  z &&
534							((a = z),
535							A && (a.shadowColor = A),
536							m && (a.shadowBlur = m),
537							(a.shadowOffsetX = q[0]),
538							(a.shadowOffsetY = q[1]),
539							a.drawImage(t, 0, 0)),
540					  o)
541			);
542		});
543	function H(a, c, d) {
544		var b = k(c, d),
545			e;
546		return b
547			? ((e = b.getContext("2d")),
548			  e.drawImage(a, (c - a.width) / 2, (d - a.height) / 2),
549			  b)
550			: null;
551	}
552	function S(e, b, c) {
553		var a = k(b, c),
554			d;
555		return a ? ((d = a.getContext("2d")), d.drawImage(e, 0, 0, b, c), a) : null;
556	}
557	function W(n, u, t, e, s, c, v, d, r, w) {
558		var g = u + (2 * d + c) * e,
559			f = t + (2 * d + c) * e,
560			l = k(g, f),
561			b,
562			i,
563			q,
564			m,
565			j,
566			o,
567			a,
568			p;
569		return l
570			? ((c *= e),
571			  (r *= e),
572			  (i = q = c / 2),
573			  (m = g - c),
574			  (j = f - c),
575			  (d = d * e + i),
576			  (b = l.getContext("2d")),
577			  (p = h(r, m / 2, j / 2)),
578			  s && ((b.fillStyle = s), y(b, i, q, m, j, p)),
579			  c && ((b.strokeStyle = v), (b.lineWidth = c), y(b, i, q, m, j, p, !0)),
580			  w
581					? ((o = k(g, f)),
582					  (a = o.getContext("2d")),
583					  a.drawImage(n, d, d, u, t),
584					  (a.globalCompositeOperation = "source-in"),
585					  (a.fillStyle = v),
586					  a.fillRect(0, 0, g, f),
587					  (a.globalCompositeOperation = "destination-over"),
588					  a.drawImage(l, 0, 0),
589					  (a.globalCompositeOperation = "source-over"),
590					  b.drawImage(o, 0, 0))
591					: b.drawImage(n, d, d, n.width, n.height),
592			  { image: l, width: g / e, height: f / e })
593			: null;
594	}
595	function at(l, f, c, d, j) {
596		var e,
597			a,
598			b = parseFloat(f),
599			i = g(c, d);
600		return (
601			(e = k(c, d)),
602			!e
603				? null
604				: (f.indexOf("%") > 0 ? (b = (i * b) / 100) : (b = b * j),
605				  (a = e.getContext("2d")),
606				  (a.globalCompositeOperation = "source-over"),
607				  (a.fillStyle = "#fff"),
608				  b >= i / 2
609						? ((b = h(c, d) / 2),
610						  a.beginPath(),
611						  a.moveTo(c / 2, d / 2),
612						  a.arc(c / 2, d / 2, b, 0, 2 * Math.PI, !1),
613						  a.fill(),
614						  a.closePath())
615						: ((b = h(c / 2, d / 2, b)), y(a, 0, 0, c, d, b, !0), a.fill()),
616				  (a.globalCompositeOperation = "source-in"),
617				  a.drawImage(l, 0, 0, c, d),
618				  e)
619		);
620	}
621	function ao(q, m, i, b, h, a, c) {
622		var g = p(c[0]),
623			f = p(c[1]),
624			j = m + (g > a ? g + a : a * 2) * b,
625			l = i + (f > a ? f + a : a * 2) * b,
626			n = b * ((a || 0) + (c[0] < 0 ? g : 0)),
627			o = b * ((a || 0) + (c[1] < 0 ? f : 0)),
628			e,
629			d;
630		return (
631			(e = k(j, l)),
632			!e
633				? null
634				: ((d = e.getContext("2d")),
635				  h && (d.shadowColor = h),
636				  a && (d.shadowBlur = a * b),
637				  c && ((d.shadowOffsetX = c[0] * b), (d.shadowOffsetY = c[1] * b)),
638				  d.drawImage(q, n, o, m, i),
639				  { image: e, width: j / b, height: l / b })
640		);
641	}
642	function ae(m, o, l) {
643		var c = parseInt(m.toString().length * l),
644			h = parseInt(l * 2 * m.length),
645			j = k(c, h),
646			g,
647			i,
648			e,
649			f,
650			b,
651			d,
652			n,
653			a;
654		if (!j) return null;
655		(g = j.getContext("2d")),
656			(g.fillStyle = "#000"),
657			g.fillRect(0, 0, c, h),
658			Y(g, l + "px " + o, "#fff", m, 0, 0, 0, 0, [], "centre"),
659			(i = g.getImageData(0, 0, c, h)),
660			(e = i.width),
661			(f = i.height),
662			(a = { min: { x: e, y: f }, max: { x: -1, y: -1 } });
663		for (d = 0; d < f; ++d)
664			for (b = 0; b < e; ++b)
665				(n = (d * e + b) * 4),
666					i.data[n + 1] > 0 &&
667						(b < a.min.x && (a.min.x = b),
668						b > a.max.x && (a.max.x = b),
669						d < a.min.y && (a.min.y = d),
670						d > a.max.y && (a.max.y = d));
671		return (
672			e != c && ((a.min.x *= c / e), (a.max.x *= c / e)),
673			f != h && ((a.min.y *= c / f), (a.max.y *= c / f)),
674			(j = null),
675			a
676		);
677	}
678	function Q(a) {
679		return "'" + a.replace(/(\'|\")/g, "").replace(/\s*,\s*/g, "', '") + "'";
680	}
681	function t(b, d, a) {
682		(a = a || c),
683			a.addEventListener
684				? a.addEventListener(b, d, !1)
685				: a.attachEvent("on" + b, d);
686	}
687	function am(b, d, a) {
688		(a = a || c),
689			a.removeEventListener
690				? a.removeEventListener(b, d)
691				: a.detachEvent("on" + b, d);
692	}
693	function A(g, e, j, a, b) {
694		var l = b.imageScale,
695			h,
696			c,
697			k,
698			m,
699			f,
700			d;
701		if (!e.complete)
702			return t(
703				"load",
704				function () {
705					A(g, e, j, a, b);
706				},
707				e,
708			);
709		if (!g.complete)
710			return t(
711				"load",
712				function () {
713					A(g, e, j, a, b);
714				},
715				g,
716			);
717		if (j && !j.complete)
718			return t(
719				"load",
720				function () {
721					A(g, e, j, a, b);
722				},
723				j,
724			);
725		(e.width = e.width),
726			(e.height = e.height),
727			l && ((g.width = e.width * l), (g.height = e.height * l)),
728			(a.iw = g.width),
729			(a.ih = g.height),
730			b.txtOpt &&
731				((c = g),
732				(h = b.zoomMax * b.txtScale),
733				(f = a.iw * h),
734				(d = a.ih * h),
735				f < e.naturalWidth || d < e.naturalHeight
736					? ((c = S(g, f, d)), c && (a.fimage = c))
737					: ((f = a.iw), (d = a.ih), (h = 1)),
738				parseFloat(b.imageRadius) &&
739					(a.image = a.fimage = g = at(a.image, b.imageRadius, f, d, h)),
740				a.HasText() ||
741					(b.shadow &&
742						((c = ao(a.image, f, d, h, b.shadow, b.shadowBlur, b.shadowOffset)),
743						c && ((a.fimage = c.image), (a.w = c.width), (a.h = c.height))),
744					(b.bgColour || b.bgOutlineThickness) &&
745						((k =
746							b.bgColour == "tag" ? i(a.a, "background-color") : b.bgColour),
747						(m =
748							b.bgOutline == "tag"
749								? i(a.a, "color")
750								: b.bgOutline || b.textColour),
751						(f = a.fimage.width),
752						(d = a.fimage.height),
753						b.outlineMethod == "colour" &&
754							((c = W(
755								a.fimage,
756								f,
757								d,
758								h,
759								k,
760								b.bgOutlineThickness,
761								a.outline.colour,
762								b.padding,
763								b.bgRadius,
764								1,
765							)),
766							c && (a.oimage = c.image)),
767						(c = W(
768							a.fimage,
769							f,
770							d,
771							h,
772							k,
773							b.bgOutlineThickness,
774							m,
775							b.padding,
776							b.bgRadius,
777						)),
778						c && ((a.fimage = c.image), (a.w = c.width), (a.h = c.height))),
779					b.outlineMethod == "size" &&
780						(b.outlineIncrease > 0
781							? ((a.iw += 2 * b.outlineIncrease),
782							  (a.ih += 2 * b.outlineIncrease),
783							  (f = h * a.iw),
784							  (d = h * a.ih),
785							  (c = S(a.fimage, f, d)),
786							  (a.oimage = c),
787							  (a.fimage = H(a.fimage, a.oimage.width, a.oimage.height)))
788							: ((f = h * (a.iw + 2 * b.outlineIncrease)),
789							  (d = h * (a.ih + 2 * b.outlineIncrease)),
790							  (c = S(a.fimage, f, d)),
791							  (a.oimage = H(c, a.fimage.width, a.fimage.height)))))),
792			(a.alt = j),
793			a.Init();
794	}
795	function i(a, d) {
796		var b = c.defaultView,
797			e = d.replace(/\-([a-z])/g, function (a) {
798				return a.charAt(1).toUpperCase();
799			});
800		return (
801			(b &&
802				b.getComputedStyle &&
803				b.getComputedStyle(a, null).getPropertyValue(d)) ||
804			(a.currentStyle && a.currentStyle[e])
805		);
806	}
807	function aj(c, d, e) {
808		var b = 1,
809			a;
810		return (
811			d
812				? (b = 1 * (c.getAttribute(d) || e))
813				: (a = i(c, "font-size")) &&
814				  (b =
815						(a.indexOf("px") > -1 && a.replace("px", "") * 1) ||
816						(a.indexOf("pt") > -1 && a.replace("pt", "") * 1.25) ||
817						a * 3.3),
818			b
819		);
820	}
821	function u(a) {
822		return a.target && n(a.target.id)
823			? a.target.id
824			: a.srcElement.parentNode.id;
825	}
826	function K(a, c) {
827		var b,
828			d,
829			e = parseInt(i(c, "width")) / c.width,
830			f = parseInt(i(c, "height")) / c.height;
831		return (
832			n(a.offsetX)
833				? (b = { x: a.offsetX, y: a.offsetY })
834				: ((d = X(c.id)),
835				  n(a.changedTouches) && (a = a.changedTouches[0]),
836				  a.pageX && (b = { x: a.pageX - d.x, y: a.pageY - d.y })),
837			b && e && f && ((b.x /= e), (b.y /= f)),
838			b
839		);
840	}
841	function an(c) {
842		var d = c.target || c.fromElement.parentNode,
843			b = a.tc[d.id];
844		b && ((b.mx = b.my = -1), b.UnFreeze(), b.EndDrag());
845	}
846	function ad(e) {
847		var g,
848			c = a,
849			b,
850			d,
851			f = u(e);
852		for (g in c.tc)
853			(b = c.tc[g]), b.tttimer && (clearTimeout(b.tttimer), (b.tttimer = null));
854		f &&
855			c.tc[f] &&
856			((b = c.tc[f]),
857			(d = K(e, b.canvas)) && ((b.mx = d.x), (b.my = d.y), b.Drag(e, d)),
858			(b.drawn = 0));
859	}
860	function ap(b) {
861		var e = a,
862			f = c.addEventListener ? 0 : 1,
863			d = u(b);
864		d && b.button == f && e.tc[d] && e.tc[d].BeginDrag(b);
865	}
866	function aq(b) {
867		var f = a,
868			g = c.addEventListener ? 0 : 1,
869			e = u(b),
870			d;
871		e &&
872			b.button == g &&
873			f.tc[e] &&
874			((d = f.tc[e]), ad(b), !d.EndDrag() && !d.touchState && d.Clicked(b));
875	}
876	function ar(c) {
877		var e = u(c),
878			b = e && a.tc[e],
879			d;
880		b &&
881			c.changedTouches &&
882			(c.touches.length == 1 && b.touchState == 0
883				? ((b.touchState = 1),
884				  b.BeginDrag(c),
885				  (d = K(c, b.canvas)) && ((b.mx = d.x), (b.my = d.y), (b.drawn = 0)))
886				: c.targetTouches.length == 2 && b.pinchZoom
887				? ((b.touchState = 3), b.EndDrag(), b.BeginPinch(c))
888				: (b.EndDrag(), b.EndPinch(), (b.touchState = 0)));
889	}
890	function ac(c) {
891		var d = u(c),
892			b = d && a.tc[d];
893		if (b && c.changedTouches) {
894			switch (b.touchState) {
895				case 1:
896					b.Draw(), b.Clicked();
897					break;
898					break;
899				case 2:
900					b.EndDrag();
901					break;
902				case 3:
903					b.EndPinch();
904			}
905			b.touchState = 0;
906		}
907	}
908	function au(c) {
909		var f,
910			e = a,
911			b,
912			d,
913			g = u(c);
914		for (f in e.tc)
915			(b = e.tc[f]), b.tttimer && (clearTimeout(b.tttimer), (b.tttimer = null));
916		if (((b = g && e.tc[g]), b && c.changedTouches && b.touchState)) {
917			switch (b.touchState) {
918				case 1:
919				case 2:
920					(d = K(c, b.canvas)) &&
921						((b.mx = d.x), (b.my = d.y), b.Drag(c, d) && (b.touchState = 2));
922					break;
923				case 3:
924					b.Pinch(c);
925			}
926			b.drawn = 0;
927		}
928	}
929	function ab(b) {
930		var d = a,
931			c = u(b);
932		c &&
933			d.tc[c] &&
934			((b.cancelBubble = !0),
935			(b.returnValue = !1),
936			b.preventDefault && b.preventDefault(),
937			d.tc[c].Wheel((b.wheelDelta || b.detail) > 0));
938	}
939	function aw(d) {
940		var c,
941			b = a;
942		clearTimeout(b.scrollTimer);
943		for (c in b.tc) b.tc[c].Pause();
944		b.scrollTimer = setTimeout(function () {
945			var b,
946				c = a;
947			for (b in c.tc) c.tc[b].Resume();
948		}, b.scrollPause);
949	}
950	function al() {
951		Z(q());
952	}
953	function Z(b) {
954		var c = a.tc,
955			d;
956		a.NextFrame(a.interval), (b = b || q());
957		for (d in c) c[d].Draw(b);
958	}
959	function az() {
960		requestAnimationFrame(Z);
961	}
962	function aA(a) {
963		setTimeout(al, a);
964	}
965	function X(f) {
966		var g = c.getElementById(f),
967			b = g.getBoundingClientRect(),
968			a = c.documentElement,
969			d = c.body,
970			e = window,
971			h = e.pageXOffset || a.scrollLeft,
972			i = e.pageYOffset || a.scrollTop,
973			j = a.clientLeft || d.clientLeft,
974			k = a.clientTop || d.clientTop;
975		return { x: b.left + h - j, y: b.top + i - k };
976	}
977	function aI(a, b, d, e) {
978		var c = (a.radius * a.z1) / (a.z1 + a.z2 + b.z);
979		return { x: b.x * c * d, y: b.y * c * e, z: b.z, w: (a.z1 - b.z) / a.z2 };
980	}
981	function V(a) {
982		(this.e = a),
983			(this.br = 0),
984			(this.line = []),
985			(this.text = []),
986			(this.original = a.innerText || a.textContent);
987	}
988	(F = V.prototype),
989		(F.Empty = function () {
990			for (var a = 0; a < this.text.length; ++a)
991				if (this.text[a].length) return !1;
992			return !0;
993		}),
994		(F.Lines = function (c) {
995			var e = c ? 1 : 0,
996				b,
997				d,
998				a;
999			(c = c || this.e), (b = c.childNodes), (d = b.length);
1000			for (a = 0; a < d; ++a)
1001				b[a].nodeName == "BR"
1002					? (this.text.push(this.line.join(" ")), (this.br = 1))
1003					: b[a].nodeType == 3
1004					? this.br
1005						? ((this.line = [b[a].nodeValue]), (this.br = 0))
1006						: this.line.push(b[a].nodeValue)
1007					: this.Lines(b[a]);
1008			return e || this.br || this.text.push(this.line.join(" ")), this.text;
1009		}),
1010		(F.SplitWidth = function (h, e, f, g) {
1011			var c,
1012				b,
1013				a,
1014				d = [];
1015			e.font = g + "px " + f;
1016			for (c = 0; c < this.text.length; ++c) {
1017				(a = this.text[c].split(/\s+/)), (this.line = [a[0]]);
1018				for (b = 1; b < a.length; ++b)
1019					e.measureText(this.line.join(" ") + " " + a[b]).width > h
1020						? (d.push(this.line.join(" ")), (this.line = [a[b]]))
1021						: this.line.push(a[b]);
1022				d.push(this.line.join(" "));
1023			}
1024			return (this.text = d);
1025		});
1026	function _(a, b) {
1027		(this.ts = null),
1028			(this.tc = a),
1029			(this.tag = b),
1030			(this.x = this.y = this.w = this.h = this.sc = 1),
1031			(this.z = 0),
1032			(this.pulse = 1),
1033			(this.pulsate = a.pulsateTo < 1),
1034			(this.colour = a.outlineColour),
1035			(this.adash = ~~a.outlineDash),
1036			(this.agap = ~~a.outlineDashSpace || this.adash),
1037			(this.aspeed = a.outlineDashSpeed * 1),
1038			this.colour == "tag"
1039				? (this.colour = i(b.a, "color"))
1040				: this.colour == "tagbg" && (this.colour = i(b.a, "background-color")),
1041			(this.Draw = this.pulsate ? this.DrawPulsate : this.DrawSimple),
1042			(this.radius = a.outlineRadius | 0),
1043			this.SetMethod(a.outlineMethod, a.altImage);
1044	}
1045	(f = _.prototype),
1046		(f.SetMethod = function (a, d) {
1047			var b = {
1048					block: ["PreDraw", "DrawBlock"],
1049					colour: ["PreDraw", "DrawColour"],
1050					outline: ["PostDraw", "DrawOutline"],
1051					classic: ["LastDraw", "DrawOutline"],
1052					size: ["PreDraw", "DrawSize"],
1053					none: ["LastDraw"],
1054				},
1055				c = b[a] || b.outline;
1056			a == "none"
1057				? (this.Draw = function () {
1058						return 1;
1059				  })
1060				: (this.drawFunc = this[c[1]]),
1061				(this[c[0]] = this.Draw),
1062				d && ((this.RealPreDraw = this.PreDraw), (this.PreDraw = this.DrawAlt));
1063		}),
1064		(f.Update = function (d, e, i, j, a, f, g, h) {
1065			var b = this.tc.outlineOffset,
1066				c = 2 * b;
1067			(this.x = a * d + g - b),
1068				(this.y = a * e + h - b),
1069				(this.w = a * i + c),
1070				(this.h = a * j + c),
1071				(this.sc = a),
1072				(this.z = f);
1073		}),
1074		(f.Ants = function (k) {
1075			if (!this.adash) return;
1076			var b = this.adash,
1077				c = this.agap,
1078				a = this.aspeed,
1079				j = b + c,
1080				h = 0,
1081				g = b,
1082				f = c,
1083				i = 0,
1084				d = 0,
1085				e;
1086			a &&
1087				((d = (p(a) * (q() - this.ts)) / 50),
1088				a < 0 && (d = 864e4 - d),
1089				(a = ~~d % j)),
1090				a
1091					? (b >= a ? ((h = b - a), (g = a)) : ((f = j - a), (i = c - f)),
1092					  (e = [h, f, g, i]))
1093					: (e = [b, c]),
1094				k.setLineDash(e);
1095		}),
1096		(f.DrawOutline = function (a, d, e, b, c, f) {
1097			var g = h(this.radius, c / 2, b / 2);
1098			(a.strokeStyle = f), this.Ants(a), y(a, d, e, b, c, g, !0);
1099		}),
1100		(f.DrawSize = function (i, n, m, l, k, j, a, h, g) {
1101			var f = a.w,
1102				e = a.h,
1103				c,
1104				b,
1105				d;
1106			return (
1107				this.pulsate
1108					? (a.image
1109							? (d =
1110									(a.image.height + this.tc.outlineIncrease) / a.image.height)
1111							: (d = a.oscale),
1112					  (b = a.fimage || a.image),
1113					  (c = 1 + (d - 1) * (1 - this.pulse)),
1114					  (a.h *= c),
1115					  (a.w *= c))
1116					: (b = a.oimage),
1117				(a.alpha = 1),
1118				a.Draw(i, h, g, b),
1119				(a.h = e),
1120				(a.w = f),
1121				1
1122			);
1123		}),
1124		(f.DrawColour = function (d, h, i, e, f, g, a, b, c) {
1125			return a.oimage
1126				? (this.pulse < 1
1127						? ((a.alpha = 1 - w(this.pulse, 2)),
1128						  a.Draw(d, b, c, a.fimage),
1129						  (a.alpha = this.pulse))
1130						: (a.alpha = 1),
1131				  a.Draw(d, b, c, a.oimage),
1132				  1)
1133				: this[a.image ? "DrawColourImage" : "DrawColourText"](
1134						d,
1135						h,
1136						i,
1137						e,
1138						f,
1139						g,
1140						a,
1141						b,
1142						c,
1143				  );
1144		}),
1145		(f.DrawColourText = function (f, h, i, j, g, e, a, b, c) {
1146			var d = a.colour;
1147			return (a.colour = e), (a.alpha = 1), a.Draw(f, b, c), (a.colour = d), 1;
1148		}),
1149		(f.DrawColourImage = function (a, q, p, o, n, m, i, r, l) {
1150			var f = a.canvas,
1151				e = ~~g(q, 0),
1152				d = ~~g(p, 0),
1153				c = (h(f.width - e, o) + 0.5) | 0,
1154				b = (h(f.height - d, n) + 0.5) | 0,
1155				j;
1156			return (
1157				v ? ((v.width = c), (v.height = b)) : (v = k(c, b)),
1158				!v
1159					? this.SetMethod("outline")
1160					: ((j = v.getContext("2d")),
1161					  j.drawImage(f, e, d, c, b, 0, 0, c, b),
1162					  a.clearRect(e, d, c, b),
1163					  this.pulsate ? (i.alpha = 1 - w(this.pulse, 2)) : (i.alpha = 1),
1164					  i.Draw(a, r, l),
1165					  a.setTransform(1, 0, 0, 1, 0, 0),
1166					  a.save(),
1167					  a.beginPath(),
1168					  a.rect(e, d, c, b),
1169					  a.clip(),
1170					  (a.globalCompositeOperation = "source-in"),
1171					  (a.fillStyle = m),
1172					  a.fillRect(e, d, c, b),
1173					  a.restore(),
1174					  (a.globalAlpha = 1),
1175					  (a.globalCompositeOperation = "destination-over"),
1176					  a.drawImage(v, 0, 0, c, b, e, d, c, b),
1177					  (a.globalCompositeOperation = "source-over"),
1178					  1)
1179			);
1180		}),
1181		(f.DrawAlt = function (b, a, c, d, f, g) {
1182			var e = this.RealPreDraw(b, a, c, d, f, g);
1183			return a.alt && (a.DrawImage(b, c, d, a.alt), (e = 1)), e;
1184		}),
1185		(f.DrawBlock = function (a, d, e, b, c, f) {
1186			var g = h(this.radius, c / 2, b / 2);
1187			(a.fillStyle = f), y(a, d, e, b, c, g);
1188		}),
1189		(f.DrawSimple = function (a, b, c, d, e, f) {
1190			var g = this.tc;
1191			return (
1192				a.setTransform(1, 0, 0, 1, 0, 0),
1193				(a.strokeStyle = this.colour),
1194				(a.lineWidth = g.outlineThickness),
1195				(a.shadowBlur = a.shadowOffsetX = a.shadowOffsetY = 0),
1196				(a.globalAlpha = f ? e : 1),
1197				this.drawFunc(a, this.x, this.y, this.w, this.h, this.colour, b, c, d)
1198			);
1199		}),
1200		(f.DrawPulsate = function (h, d, e, f) {
1201			var g = q() - this.ts,
1202				c = this.tc,
1203				b =
1204					c.pulsateTo +
1205					(1 - c.pulsateTo) *
1206						(0.5 + l((2 * Math.PI * g) / (1e3 * c.pulsateTime)) / 2);
1207			return (
1208				(this.pulse = b = a.Smooth(1, b)), this.DrawSimple(h, d, e, f, b, 1)
1209			);
1210		}),
1211		(f.Active = function (d, a, b) {
1212			var c =
1213				a >= this.x &&
1214				b >= this.y &&
1215				a <= this.x + this.w &&
1216				b <= this.y + this.h;
1217			return c ? (this.ts = this.ts || q()) : (this.ts = null), c;
1218		}),
1219		(f.PreDraw = f.PostDraw = f.LastDraw = x);
1220	function J(a, h, c, b, e, f, g, d, i, j, k, l, m, n) {
1221		(this.tc = a),
1222			(this.image = null),
1223			(this.text = h),
1224			(this.text_original = n),
1225			(this.line_widths = []),
1226			(this.title = c.title || null),
1227			(this.a = c),
1228			(this.position = new s(b[0], b[1], b[2])),
1229			(this.x = this.y = this.z = 0),
1230			(this.w = e),
1231			(this.h = f),
1232			(this.colour = g || a.textColour),
1233			(this.bgColour = d || a.bgColour),
1234			(this.bgRadius = i | 0),
1235			(this.bgOutline = j || this.colour),
1236			(this.bgOutlineThickness = k | 0),
1237			(this.textFont = l || a.textFont),
1238			(this.padding = m | 0),
1239			(this.sc = this.alpha = 1),
1240			(this.weighted = !a.weight),
1241			(this.outline = new _(a, this)),
1242			(this.audio = null);
1243	}
1244	(d = J.prototype),
1245		(d.Init = function (b) {
1246			var a = this.tc;
1247			(this.textHeight = a.textHeight),
1248				this.HasText()
1249					? this.Measure(a.ctxt, a)
1250					: ((this.w = this.iw), (this.h = this.ih)),
1251				(this.SetShadowColour = a.shadowAlpha
1252					? this.SetShadowColourAlpha
1253					: this.SetShadowColourFixed),
1254				this.SetDraw(a);
1255		}),
1256		(d.Draw = x),
1257		(d.HasText = function () {
1258			return this.text && this.text[0].length > 0;
1259		}),
1260		(d.EqualTo = function (a) {
1261			var b = a.getElementsByTagName("img");
1262			return this.a.href != a.href
1263				? 0
1264				: b.length
1265				? this.image.src == b[0].src
1266				: (a.innerText || a.textContent) == this.text_original;
1267		}),
1268		(d.SetImage = function (a) {
1269			this.image = this.fimage = a;
1270		}),
1271		(d.SetAudio = function (a) {
1272			(this.audio = a), this.audio.load();
1273		}),
1274		(d.SetDraw = function (a) {
1275			(this.Draw = this.fimage
1276				? a.ie > 7
1277					? this.DrawImageIE
1278					: this.DrawImage
1279				: this.DrawText),
1280				a.noSelect && (this.CheckActive = x);
1281		}),
1282		(d.MeasureText = function (d) {
1283			var a,
1284				e = this.text.length,
1285				b = 0,
1286				c;
1287			for (a = 0; a < e; ++a)
1288				(this.line_widths[a] = c = d.measureText(this.text[a]).width),
1289					(b = g(b, c));
1290			return b;
1291		}),
1292		(d.Measure = function (e, a) {
1293			var f = ae(this.text, this.textFont, this.textHeight),
1294				b,
1295				k,
1296				h,
1297				i,
1298				g,
1299				l,
1300				j,
1301				c,
1302				d;
1303			(j = f ? f.max.y + f.min.y : this.textHeight),
1304				(e.font = this.font = this.textHeight + "px " + this.textFont),
1305				(l = this.MeasureText(e)),
1306				a.txtOpt &&
1307					((b = a.txtScale),
1308					(k = b * this.textHeight),
1309					(h = k + "px " + this.textFont),
1310					(i = [b * a.shadowOffset[0], b * a.shadowOffset[1]]),
1311					(e.font = h),
1312					(g = this.MeasureText(e)),
1313					(d = new O(
1314						this.text,
1315						h,
1316						g + b,
1317						b * j + b,
1318						g,
1319						this.line_widths,
1320						a.textAlign,
1321						a.textVAlign,
1322						b,
1323					)),
1324					this.image &&
1325						d.SetImage(
1326							this.image,
1327							this.iw,
1328							this.ih,
1329							a.imagePosition,
1330							a.imagePadding,
1331							a.imageAlign,
1332							a.imageVAlign,
1333							a.imageScale,
1334						),
1335					(c = d.Create(
1336						this.colour,
1337						this.bgColour,
1338						this.bgOutline,
1339						b * this.bgOutlineThickness,
1340						a.shadow,
1341						b * a.shadowBlur,
1342						i,
1343						b * this.padding,
1344						b * this.bgRadius,
1345					)),
1346					a.outlineMethod == "colour"
1347						? (this.oimage = d.Create(
1348								this.outline.colour,
1349								this.bgColour,
1350								this.outline.colour,
1351								b * this.bgOutlineThickness,
1352								a.shadow,
1353								b * a.shadowBlur,
1354								i,
1355								b * this.padding,
1356								b * this.bgRadius,
1357						  ))
1358						: a.outlineMethod == "size" &&
1359						  ((f = ae(
1360								this.text,
1361								this.textFont,
1362								this.textHeight + a.outlineIncrease,
1363						  )),
1364						  (k = f.max.y + f.min.y),
1365						  (h =
1366								b * (this.textHeight + a.outlineIncrease) +
1367								"px " +
1368								this.textFont),
1369						  (e.font = h),
1370						  (g = this.MeasureText(e)),
1371						  (d = new O(
1372								this.text,
1373								h,
1374								g + b,
1375								b * k + b,
1376								g,
1377								this.line_widths,
1378								a.textAlign,
1379								a.textVAlign,
1380								b,
1381						  )),
1382						  this.image &&
1383								d.SetImage(
1384									this.image,
1385									this.iw + a.outlineIncrease,
1386									this.ih + a.outlineIncrease,
1387									a.imagePosition,
1388									a.imagePadding,
1389									a.imageAlign,
1390									a.imageVAlign,
1391									a.imageScale,
1392								),
1393						  (this.oimage = d.Create(
1394								this.colour,
1395								this.bgColour,
1396								this.bgOutline,
1397								b * this.bgOutlineThickness,
1398								a.shadow,
1399								b * a.shadowBlur,
1400								i,
1401								b * this.padding,
1402								b * this.bgRadius,
1403						  )),
1404						  (this.oscale = this.oimage.width / c.width),
1405						  a.outlineIncrease > 0
1406								? (c = H(c, this.oimage.width, this.oimage.height))
1407								: (this.oimage = H(this.oimage, c.width, c.height))),
1408					c &&
1409						((this.fimage = c),
1410						(l = this.fimage.width / b),
1411						(j = this.fimage.height / b)),
1412					this.SetDraw(a),
1413					(a.txtOpt = !!this.fimage)),
1414				(this.h = j),
1415				(this.w = l);
1416		}),
1417		(d.SetFont = function (a, b, c, d) {
1418			(this.textFont = a),
1419				(this.colour = b),
1420				(this.bgColour = c),
1421				(this.bgOutline = d),
1422				this.Measure(this.tc.ctxt, this.tc);
1423		}),
1424		(d.SetWeight = function (c) {
1425			var b = this.tc,
1426				e = b.weightMode.split(/[, ]/),
1427				d,
1428				a,
1429				f = c.length;
1430			if (!this.HasText()) return;
1431			this.weighted = !0;
1432			for (a = 0; a < f; ++a)
1433				(d = e[a] || "size"),
1434					"both" == d
1435						? (this.Weight(
1436								c[a],
1437								b.ctxt,
1438								b,
1439								"size",
1440								b.min_weight[a],
1441								b.max_weight[a],
1442								a,
1443						  ),
1444						  this.Weight(
1445								c[a],
1446								b.ctxt,
1447								b,
1448								"colour",
1449								b.min_weight[a],
1450								b.max_weight[a],
1451								a,
1452						  ))
1453						: this.Weight(
1454								c[a],
1455								b.ctxt,
1456								b,
1457								d,
1458								b.min_weight[a],
1459								b.max_weight[a],
1460								a,
1461						  );
1462			this.Measure(b.ctxt, b);
1463		}),
1464		(d.Weight = function (b, i, a, d, f, h, e) {
1465			b = isNaN(b) ? 1 : b;
1466			var c = (b - f) / (h - f);
1467			"colour" == d
1468				? (this.colour = L(a, c, e))
1469				: "bgcolour" == d
1470				? (this.bgColour = L(a, c, e))
1471				: "bgoutline" == d
1472				? (this.bgOutline = L(a, c, e))
1473				: "outline" == d
1474				? (this.outline.colour = L(a, c, e))
1475				: "size" == d &&
1476				  (a.weightSizeMin > 0 && a.weightSizeMax > a.weightSizeMin
1477						? (this.textHeight =
1478								a.weightSize *
1479								(a.weightSizeMin + (a.weightSizeMax - a.weightSizeMin) * c))
1480						: (this.textHeight = g(1, b * a.weightSize)));
1481		}),
1482		(d.SetShadowColourFixed = function (a, b, c) {
1483			a.shadowColor = b;
1484		}),
1485		(d.SetShadowColourAlpha = function (a, b, c) {
1486			a.shadowColor = aE(b, c);
1487		}),
1488		(d.DrawText = function (a, h, i) {
1489			var e = this.tc,
1490				g = this.x,
1491				f = this.y,
1492				c = this.sc,
1493				b,
1494				d;
1495			(a.globalAlpha = this.alpha),
1496				(a.fillStyle = this.colour),
1497				e.shadow && this.SetShadowColour(a, e.shadow, this.alpha),
1498				(a.font = this.font),
1499				(g += h / c),
1500				(f += i / c - this.h / 2);
1501			for (b = 0; b < this.text.length; ++b)
1502				(d = g),
1503					"right" == e.textAlign
1504						? (d += this.w / 2 - this.line_widths[b])
1505						: "centre" == e.textAlign
1506						? (d -= this.line_widths[b] / 2)
1507						: (d -= this.w / 2),
1508					a.setTransform(c, 0, 0, c, c * d, c * f),
1509					a.fillText(this.text[b], 0, 0),
1510					(f += this.textHeight);
1511		}),
1512		(d.DrawImage = function (b, i, k, l) {
1513			var e = this.x,
1514				f = this.y,
1515				a = this.sc,
1516				j = l || this.fimage,
1517				c = this.w,
1518				d = this.h,
1519				g = this.alpha,
1520				h = this.shadow;
1521			(b.globalAlpha = g),
1522				h && this.SetShadowColour(b, h, g),
1523				(e += i / a - c / 2),
1524				(f += k / a - d / 2),
1525				b.setTransform(a, 0, 0, a, a * e, a * f),
1526				b.drawImage(j, 0, 0, c, d);
1527		}),
1528		(d.DrawImageIE = function (b, d, e) {
1529			var c = this.fimage,
1530				a = this.sc,
1531				f = (c.width = this.w * a),
1532				g = (c.height = this.h * a),
1533				h = this.x * a + d - f / 2,
1534				i = this.y * a + e - g / 2;
1535			b.setTransform(1, 0, 0, 1, 0, 0),
1536				(b.globalAlpha = this.alpha),
1537				b.drawImage(c, h, i);
1538		}),
1539		(d.Calc = function (g, e) {
1540			var a,
1541				b = this.tc,
1542				d = b.minBrightness,
1543				f = b.maxBrightness,
1544				c = b.max_radius;
1545			return (
1546				(a = g.xform(this.position)),
1547				(this.xformed = a),
1548				(a = aI(b, a, b.stretchX, b.stretchY)),
1549				(this.x = a.x),
1550				(this.y = a.y),
1551				(this.z = a.z),
1552				(this.sc = a.w),
1553				(this.alpha = e * G(d + ((f - d) * (c - this.z)) / (2 * c), 0, 1)),
1554				this.xformed
1555			);
1556		}),
1557		(d.UpdateActive = function (h, e, f) {
1558			var a = this.outline,
1559				b = this.w,
1560				c = this.h,
1561				d = this.x - b / 2,
1562				g = this.y - c / 2;
1563			return a.Update(d, g, b, c, this.sc, this.z, e, f), a;
1564		}),
1565		(d.CheckActive = function (a, d, e) {
1566			var b = this.tc,
1567				c = this.UpdateActive(a, d, e);
1568			return c.Active(a, b.mx, b.my) ? c : null;
1569		}),
1570		(d.Clicked = function (f) {
1571			var b = this.a,
1572				a = b.target,
1573				d = b.href,
1574				e;
1575			if (a != "" && a != "_self") {
1576				if (self.frames[a]) self.frames[a].document.location = d;
1577				else {
1578					try {
1579						if (top.frames[a]) {
1580							top.frames[a].document.location = d;
1581							return;
1582						}
1583					} catch (a) {}
1584					window.open(d, a);
1585				}
1586				return;
1587			}
1588			if (c.createEvent) {
1589				if (
1590					((e = c.createEvent("MouseEvents")),
1591					e.initMouseEvent(
1592						"click",
1593						1,
1594						1,
1595						window,
1596						0,
1597						0,
1598						0,
1599						0,
1600						0,
1601						0,
1602						0,
1603						0,
1604						0,
1605						0,
1606						null,
1607					),
1608					!b.dispatchEvent(e))
1609				)
1610					return;
1611			} else if (b.fireEvent) if (!b.fireEvent("onclick")) return;
1612			c.location = d;
1613		}),
1614		(d.StopAudio = function () {
1615			this.audio && this.playing && this.audio.pause(),
1616				(this.stopped = 1),
1617				(this.playing = 0);
1618		}),
1619		(d.PlayAudio = function () {
1620			if (e === "off" || this.tc.audioOff) return;
1621			if (!e && !ag()) return;
1622			var a = this.tc.audio,
1623				c = this.tc.gain,
1624				d = "suspended",
1625				b;
1626			if (this.audio)
1627				if (
1628					(this.track ||
1629						((this.track = e.createMediaElementSource(this.audio)),
1630						(this.gain = e.createGain()),
1631						this.track.connect(this.gain),
1632						this.gain.connect(e.destination)),
1633					(a = this.audio),
1634					(c = this.gain),
1635					!a.paused)
1636				)
1637					return 1;
1638			if (a) {
1639				if ((e.state == d && e.resume(), e.state == d)) return;
1640				return (
1641					(c.gain.value = h(2, g(0, this.tc.audioVolume * 1))),
1642					(a.currentTime = 0),
1643					(this.stopped = 0),
1644					(b = a.play()),
1645					b !== void 0 &&
1646						b.then((a) => {
1647							this.stopped ? this.audio.pause() : (this.playing = 1);
1648						}),
1649					1
1650				);
1651			}
1652		});
1653	function a(f, o, k) {
1654		var d,
1655			i,
1656			b = c.getElementById(f),
1657			l = ["id", "class", "innerHTML"];
1658		if (!b) throw 0;
1659		if (
1660			(n(window.G_vmlCanvasManager) &&
1661				((b = window.G_vmlCanvasManager.initElement(b)),
1662				(this.ie = parseFloat(navigator.appVersion.split("MSIE")[1]))),
1663			b && (!b.getContext || !b.getContext("2d").fillText))
1664		) {
1665			i = c.createElement("DIV");
1666			for (d = 0; d < l.length; ++d) i[l[d]] = b[l[d]];
1667			throw (b.parentNode.insertBefore(i, b), b.parentNode.removeChild(b), 0);
1668		}
1669		for (d in a.options)
1670			this[d] = k && n(k[d]) ? k[d] : n(a[d]) ? a[d] : a.options[d];
1671		if (
1672			((this.canvas = b),
1673			(this.ctxt = b.getContext("2d")),
1674			(this.z1 = 250 / g(this.depth, 0.001)),
1675			(this.z2 = this.z1 / this.zoom),
1676			(this.radius = h(b.height, b.width) * 0.0075),
1677			(this.max_radius = 100),
1678			(this.max_weight = []),
1679			(this.min_weight = []),
1680			(this.textFont = this.textFont && Q(this.textFont)),
1681			(this.textHeight *= 1),
1682			(this.imageRadius = this.imageRadius.toString()),
1683			(this.pulsateTo = G(this.pulsateTo, 0, 1)),
1684			(this.minBrightness = G(this.minBrightness, 0, 1)),
1685			(this.maxBrightness = G(this.maxBrightness, this.minBrightness, 1)),
1686			(this.ctxt.textBaseline = "top"),
1687			(this.lx = (this.lock + "").indexOf("x") + 1),
1688			(this.ly = (this.lock + "").indexOf("y") + 1),
1689			(this.frozen = this.dx = this.dy = this.fixedAnim = this.touchState = 0),
1690			(this.fixedAlpha = 1),
1691			(this.source = o || f),
1692			(this.repeatTags = h(64, ~~this.repeatTags)),
1693			(this.minTags = h(200, ~~this.minTags)),
1694			~~this.scrollPause > 0
1695				? (a.scrollPause = ~~this.scrollPause)
1696				: (this.scrollPause = 0),
1697			this.minTags > 0 &&
1698				this.repeatTags < 1 &&
1699				(d = this.GetTags().length) &&
1700				(this.repeatTags = af(this.minTags / d) - 1),
1701			(this.transform = m.Identity()),
1702			(this.startTime = this.time = q()),
1703			(this.mx = this.my = -1),
1704			this.centreImage && av(this),
1705			(this.Animate = this.dragControl
1706				? this.AnimateDrag
1707				: this.AnimatePosition),
1708			(this.animTiming =
1709				typeof a[this.animTiming] == "function"
1710					? a[this.animTiming]
1711					: a.Smooth),
1712			this.shadowBlur || this.shadowOffset[0] || this.shadowOffset[1]
1713				? ((this.ctxt.shadowColor = this.shadow),
1714				  (this.shadow = this.ctxt.shadowColor),
1715				  (this.shadowAlpha = aD()))
1716				: delete this.shadow,
1717			this.activeAudio === !1
1718				? (e = "off")
1719				: this.activeAudio && this.LoadAudio(),
1720			this.Load(),
1721			o &&
1722				this.hideTags &&
1723				(function (b) {
1724					a.loaded
1725						? b.HideTags()
1726						: t(
1727								"load",
1728								function () {
1729									b.HideTags();
1730								},
1731								window,
1732						  );
1733				})(this),
1734			(this.yaw = this.initial ? this.initial[0] * this.maxSpeed : 0),
1735			(this.pitch = this.initial ? this.initial[1] * this.maxSpeed : 0),
1736			this.tooltip
1737				? ((this.ctitle = b.title),
1738				  (b.title = ""),
1739				  this.tooltip == "native"
1740						? (this.Tooltip = this.TooltipNative)
1741						: ((this.Tooltip = this.TooltipDiv),
1742						  this.ttdiv ||
1743								((this.ttdiv = c.createElement("div")),
1744								(this.ttdiv.className = this.tooltipClass),
1745								(this.ttdiv.style.position = "absolute"),
1746								(this.ttdiv.style.zIndex = b.style.zIndex + 1),
1747								t(
1748									"mouseover",
1749									function (a) {
1750										a.target.style.display = "none";
1751									},
1752									this.ttdiv,
1753								),
1754								c.body.appendChild(this.ttdiv))))
1755				: (this.Tooltip = this.TooltipNone),
1756			!this.noMouse && !j[f])
1757		) {
1758			(j[f] = [
1759				["mousemove", ad],
1760				["mouseout", an],
1761				["mouseup", aq],
1762				["touchstart", ar],
1763				["touchend", ac],
1764				["touchcancel", ac],
1765				["touchmove", au],
1766			]),
1767				this.dragControl &&
1768					(j[f].push(["mousedown", ap]), j[f].push(["selectstart", x])),
1769				this.wheelZoom &&
1770					(j[f].push(["mousewheel", ab]), j[f].push(["DOMMouseScroll", ab])),
1771				this.scrollPause && j[f].push(["scroll", aw, window]);
1772			for (d = 0; d < j[f].length; ++d)
1773				(i = j[f][d]), t(i[0], i[1], i[2] ? i[2] : b);
1774		}
1775		a.started ||
1776			((a.NextFrame = window.requestAnimationFrame ? az : aA),
1777			(a.interval = this.interval),
1778			a.NextFrame(this.interval),
1779			(a.started = 1));
1780	}
1781	(b = a.prototype),
1782		(b.SourceElements = function () {
1783			return c.querySelectorAll
1784				? c.querySelectorAll("#" + this.source)
1785				: [c.getElementById(this.source)];
1786		}),
1787		(b.HideTags = function () {
1788			var b = this.SourceElements(),
1789				a;
1790			for (a = 0; a < b.length; ++a) b[a].style.display = "none";
1791		}),
1792		(b.GetTags = function () {
1793			var e = this.SourceElements(),
1794				c,
1795				f = [],
1796				a,
1797				b,
1798				d;
1799			for (d = 0; d <= this.repeatTags; ++d)
1800				for (a = 0; a < e.length; ++a) {
1801					c = e[a].getElementsByTagName("a");
1802					for (b = 0; b < c.length; ++b) f.push(c[b]);
1803				}
1804			return f;
1805		}),
1806		(b.Message = function (j) {
1807			var g = [],
1808				a,
1809				f,
1810				b = j.split(""),
1811				d,
1812				e,
1813				h,
1814				i;
1815			for (a = 0; a < b.length; ++a)
1816				b[a] != " " &&
1817					((f = a - b.length / 2),
1818					(d = c.createElement("A")),
1819					(d.href = "#"),
1820					(d.innerText = b[a]),
1821					(h = 100 * o(f / 9)),
1822					(i = -100 * l(f / 9)),
1823					(e = new J(
1824						this,
1825						b[a],
1826						d,
1827						[h, 0, i],
1828						2,
1829						18,
1830						"#000",
1831						"#fff",
1832						0,
1833						0,
1834						0,
1835						"monospace",
1836						2,
1837						b[a],
1838					)),
1839					e.Init(),
1840					g.push(e));
1841			return g;
1842		}),
1843		(b.AddAudio = function (b, c) {
1844			if (e === "off") return;
1845			var a = b.getElementsByTagName("audio");
1846			a.length && (c.SetAudio(a[0]), (this.hasAudio = 1));
1847		}),
1848		(b.CreateTag = function (b) {
1849			var e,
1850				c,
1851				a,
1852				f,
1853				d,
1854				g,
1855				h,
1856				j,
1857				k = [0, 0, 0],
1858				l;
1859			if ("text" != this.imageMode)
1860				if (((e = b.getElementsByTagName("img")), e.length))
1861					if (((c = new Image()), (c.src = e[0].src), !this.imageMode))
1862						return (
1863							(a = new J(this, "", b, k, 0, 0)),
1864							a.SetImage(c),
1865							A(c, e[0], e[1], a, this),
1866							this.AddAudio(b, a),
1867							a
1868						);
1869			if (
1870				("image" != this.imageMode &&
1871					((d = new V(b)),
1872					(f = d.Lines()),
1873					d.Empty()
1874						? (d = null)
1875						: ((g = this.textFont || Q(i(b, "font-family"))),
1876						  this.splitWidth &&
1877								(f = d.SplitWidth(
1878									this.splitWidth,
1879									this.ctxt,
1880									g,
1881									this.textHeight,
1882								)),
1883						  (h =
1884								this.bgColour == "tag"
1885									? i(b, "background-color")
1886									: this.bgColour),
1887						  (j = this.bgOutline == "tag" ? i(b, "color") : this.bgOutline))),
1888				d || c)
1889			)
1890				return (
1891					(a = new J(
1892						this,
1893						f,
1894						b,
1895						k,
1896						2,
1897						this.textHeight + 2,
1898						this.textColour || i(b, "color"),
1899						h,
1900						this.bgRadius,
1901						j,
1902						this.bgOutlineThickness,
1903						g,
1904						this.padding,
1905						d && d.original,
1906					)),
1907					c ? (a.SetImage(c), A(c, e[0], e[1], a, this)) : a.Init(),
1908					this.AddAudio(b, a),
1909					a
1910				);
1911		}),
1912		(b.UpdateTag = function (a, b) {
1913			var c = this.textColour || i(b, "color"),
1914				d = this.textFont || Q(i(b, "font-family")),
1915				e = this.bgColour == "tag" ? i(b, "background-color") : this.bgColour,
1916				f = this.bgOutline == "tag" ? i(b, "color") : this.bgOutline;
1917			(a.a = b),
1918				(a.title = b.title),
1919				(a.colour != c ||
1920					a.textFont != d ||
1921					a.bgColour != e ||
1922					a.bgOutline != f) &&
1923					a.SetFont(d, c, e, f);
1924		}),
1925		(b.Weight = function (d) {
1926			var f = d.length,
1927				c,
1928				b,
1929				a,
1930				e = [],
1931				g,
1932				h = this.weightFrom ? this.weightFrom.split(/[, ]/) : [null],
1933				i = h.length;
1934			for (b = 0; b < f; ++b) {
1935				e[b] = [];
1936				for (a = 0; a < i; ++a)
1937					(c = aj(d[b].a, h[a], this.textHeight)),
1938						(!this.max_weight[a] || c > this.max_weight[a]) &&
1939							(this.max_weight[a] = c),
1940						(!this.min_weight[a] || c < this.min_weight[a]) &&
1941							(this.min_weight[a] = c),
1942						(e[b][a] = c);
1943			}
1944			for (a = 0; a < i; ++a)
1945				this.max_weight[a] > this.min_weight[a] && (g = 1);
1946			if (g) for (b = 0; b < f; ++b) d[b].SetWeight(e[b]);
1947		}),
1948		(b.Load = function () {
1949			var c = this.GetTags(),
1950				b = [],
1951				d,
1952				k,
1953				l,
1954				h,
1955				i,
1956				j,
1957				f,
1958				a,
1959				e = [],
1960				m = { sphere: aB, vcylinder: ax, hcylinder: aH, vring: aG, hring: aF };
1961			if (c.length) {
1962				e.length = c.length;
1963				for (a = 0; a < c.length; ++a) e[a] = a;
1964				this.shuffleTags && ai(e),
1965					(h = 100 * this.radiusX),
1966					(i = 100 * this.radiusY),
1967					(j = 100 * this.radiusZ),
1968					(this.max_radius = g(h, g(i, j)));
1969				for (a = 0; a < c.length; ++a)
1970					(k = this.CreateTag(c[e[a]])), k && b.push(k);
1971				this.weight && this.Weight(b, !0),
1972					this.shapeArgs
1973						? (this.shapeArgs[0] = b.length)
1974						: ((l = this.shape.toString().split(/[(),]/)),
1975						  (d = l.shift()),
1976						  typeof window[d] == "function"
1977								? (this.shape = window[d])
1978								: (this.shape = m[d] || m.sphere),
1979						  (this.shapeArgs = [b.length, h, i, j].concat(l))),
1980					(f = this.shape.apply(this, this.shapeArgs)),
1981					(this.listLength = b.length);
1982				for (a = 0; a < b.length; ++a)
1983					b[a].position = new s(f[a][0], f[a][1], f[a][2]);
1984			}
1985			this.noTagsMessage &&
1986				!b.length &&
1987				((a =
1988					this.imageMode && this.imageMode != "both"
1989						? this.imageMode + " "
1990						: ""),
1991				(b = this.Message("No " + a + "tags"))),
1992				(this.taglist = b);
1993		}),
1994		(b.Update = function () {
1995			var e = this.GetTags(),
1996				d = [],
1997				j = this.taglist,
1998				k,
1999				f = [],
2000				c = [],
2001				h,
2002				i,
2003				g,
2004				a,
2005				b;
2006			if (!this.shapeArgs) return this.Load();
2007			if (e.length) {
2008				(g = this.listLength = e.length), (i = j.length);
2009				for (a = 0; a < i; ++a) d.push(j[a]), c.push(a);
2010				for (a = 0; a < g; ++a) {
2011					for (b = 0, k = 0; b < i; ++b)
2012						j[b].EqualTo(e[a]) && (this.UpdateTag(d[b], e[a]), (k = c[b] = -1));
2013					k || f.push(a);
2014				}
2015				for (a = 0, b = 0; a < i; ++a) c[b] == -1 ? c.splice(b, 1) : ++b;
2016				if (c.length) {
2017					for (ai(c); c.length && f.length; )
2018						(a = c.shift()), (b = f.shift()), (d[a] = this.CreateTag(e[b]));
2019					for (
2020						c.sort(function (a, b) {
2021							return a - b;
2022						});
2023						c.length;
2024					)
2025						d.splice(c.pop(), 1);
2026				}
2027				for (b = d.length / (f.length + 1), a = 0; f.length; )
2028					d.splice(af(++a * b), 0, this.CreateTag(e[f.shift()]));
2029				(this.shapeArgs[0] = g = d.length),
2030					(h = this.shape.apply(this, this.shapeArgs));
2031				for (a = 0; a < g; ++a)
2032					d[a].position = new s(h[a][0], h[a][1], h[a][2]);
2033				this.weight && this.Weight(d);
2034			}
2035			this.taglist = d;
2036		}),
2037		(b.SetShadow = function (a) {
2038			(a.shadowBlur = this.shadowBlur),
2039				(a.shadowOffsetX = this.shadowOffset[0]),
2040				(a.shadowOffsetY = this.shadowOffset[1]);
2041		}),
2042		(b.LoadAudio = function () {
2043			if (!e && !ag()) return;
2044			(this.audio = c.createElement("audio")),
2045				(this.audio.src = this.activeAudio),
2046				(this.track = e.createMediaElementSource(this.audio)),
2047				(this.gain = e.createGain()),
2048				this.track.connect(this.gain),
2049				this.gain.connect(e.destination),
2050				(this.hasAudio = 1),
2051				(P = function (a) {
2052					e.resume(), c.removeEventListener("click", P);
2053				}),
2054				c.addEventListener("click", P);
2055		}),
2056		(b.ShowAudioIcon = function () {
2057			var a = this.audioIconSize,
2058				c = this.canvas,
2059				d = this.ctxt,
2060				k = c.width - a - 3,
2061				f = c.height - a - 3,
2062				g = this.audioIconThickness,
2063				h = "#000",
2064				i = "#fff",
2065				j = this.audioIconDark,
2066				b = this.audioOff,
2067				l = "suspended";
2068			if (!e) return;
2069			b || (b = e.state === l),
2070				this.audioIcon &&
2071					this.hasAudio &&
2072					($(b, d, a, k, f, g + 1, j ? i : h), $(b, d, a, k, f, g, j ? h : i));
2073		}),
2074		(b.CheckAudioIcon = function () {
2075			var a = this.audioIconSize,
2076				b = this.canvas,
2077				c = this.audioIconThickness / 2,
2078				d = b.width - a - 3 - c,
2079				e = b.height - a - 3 - c;
2080			if (this.audioIcon && this.mx >= d && this.my >= e) return !0;
2081		}),
2082		(b.ToggleAudio = function () {
2083			var a = this.audioOff || (e && e.state === "suspended");
2084			a || (this.currentAudio && this.currentAudio.StopAudio()),
2085				(this.audioOff = !a);
2086		}),
2087		(b.Draw = function (s) {
2088			if (this.paused) return;
2089			var l = this.canvas,
2090				i = l.width,
2091				j = l.height,
2092				q = 0,
2093				p = ((s - this.time) * a.interval) / 1e3,
2094				h = i / 2 + this.offsetX,
2095				g = j / 2 + this.offsetY,
2096				d = this.ctxt,
2097				b,
2098				f,
2099				c,
2100				o = -1,
2101				e = this.taglist,
2102				k = e.length,
2103				t = this.active && this.active.tag,
2104				m = "",
2105				u = this.frontSelect,
2106				r = this.centreFunc == x,
2107				n;
2108			if (((this.time = s), this.frozen && this.drawn))
2109				return this.Animate(i, j, p);
2110			(n = this.AnimateFixed()), d.setTransform(1, 0, 0, 1, 0, 0);
2111			for (c = 0; c < k; ++c) e[c].Calc(this.transform, this.fixedAlpha);
2112			if (
2113				((e = ak(e, function (a, b) {
2114					return b.z - a.z;
2115				})),
2116				n && this.fixedAnim.active)
2117			)
2118				b = this.fixedAnim.tag.UpdateActive(d, h, g);
2119			else if (((this.active = null), this.CheckAudioIcon())) m = "pointer";
2120			else {
2121				for (c = 0; c < k; ++c)
2122					(f =
2123						this.mx >= 0 &&
2124						this.my >= 0 &&
2125						this.taglist[c].CheckActive(d, h, g)),
2126						f &&
2127							f.sc > q &&
2128							(!u || f.z <= 0) &&
2129							((b = f), (o = c), (b.tag = this.taglist[c]), (q = f.sc));
2130				this.active = b;
2131			}
2132			this.txtOpt || (this.shadow && this.SetShadow(d)),
2133				d.clearRect(0, 0, i, j);
2134			for (c = 0; c < k; ++c) {
2135				if (!r && e[c].z <= 0) {
2136					try {
2137						this.centreFunc(d, i, j, h, g);
2138					} catch (a) {
2139						alert(a), (this.centreFunc = x);
2140					}
2141					r = !0;
2142				}
2143				(b && b.tag == e[c] && b.PreDraw(d, e[c], h, g)) || e[c].Draw(d, h, g),
2144					b && b.tag == e[c] && b.PostDraw(d);
2145			}
2146			this.freezeActive && b
2147				? this.Freeze()
2148				: (this.UnFreeze(), (this.drawn = k == this.listLength)),
2149				this.fixedCallback &&
2150					(this.fixedCallback(this, this.fixedCallbackTag),
2151					(this.fixedCallback = null)),
2152				n || this.Animate(i, j, p),
2153				b &&
2154					(b.LastDraw(d),
2155					b.tag != t &&
2156						(this.currentAudio &&
2157							this.currentAudio != b.tag &&
2158							this.currentAudio.StopAudio(),
2159						b.tag.PlayAudio() && (this.currentAudio = b.tag)),
2160					(m = this.activeCursor)),
2161				(l.style.cursor = m),
2162				this.Tooltip(b, this.taglist[o]),
2163				this.audioIcon && this.ShowAudioIcon();
2164		}),
2165		(b.TooltipNone = function () {}),
2166		(b.TooltipNative = function (b, a) {
2167			b
2168				? (this.canvas.title = a && a.title ? a.title : "")
2169				: (this.canvas.title = this.ctitle);
2170		}),
2171		(b.SetTTDiv = function (c, d) {
2172			var a = this,
2173				b = a.ttdiv.style;
2174			c != a.ttdiv.innerHTML && (b.display = "none"),
2175				(a.ttdiv.innerHTML = c),
2176				d && (d.title = a.ttdiv.innerHTML),
2177				b.display == "none" &&
2178					!a.tttimer &&
2179					(a.tttimer = setTimeout(function () {
2180						var c = X(a.canvas.id);
2181						(b.display = "block"),
2182							(b.left = c.x + a.mx + "px"),
2183							(b.top = c.y + a.my + 24 + "px"),
2184							(a.tttimer = null);
2185					}, a.tooltipDelay));
2186		}),
2187		(b.TooltipDiv = function (b, a) {
2188			b && a && a.title
2189				? this.SetTTDiv(a.title, a)
2190				: !b && this.mx != -1 && this.my != -1 && this.ctitle.length
2191				? this.SetTTDiv(this.ctitle)
2192				: (this.ttdiv.style.display = "none");
2193		}),
2194		(b.Transform = function (c, a, b) {
2195			if (a || b) {
2196				var d = o(a),
2197					e = l(a),
2198					f = o(b),
2199					g = l(b),
2200					h = new m([g, 0, f, 0, 1, 0, -f, 0, g]),
2201					i = new m([1, 0, 0, 0, e, -d, 0, d, e]);
2202				c.transform = c.transform.mul(h.mul(i));
2203			}
2204		}),
2205		(b.AnimateFixed = function () {
2206			var a, b, c, d, e;
2207			return (
2208				!!(this.fadeIn &&
2209					((b = q() - this.startTime),
2210					b >= this.fadeIn
2211						? ((this.fadeIn = 0), (this.fixedAlpha = 1))
2212						: (this.fixedAlpha = b / this.fadeIn)),
2213				this.fixedAnim) &&
2214				(this.fixedAnim.transform ||
2215					(this.fixedAnim.transform = this.transform),
2216				(a = this.fixedAnim),
2217				(b = q() - a.t0),
2218				(c = a.angle),
2219				d,
2220				(e = this.animTiming(a.t, b)),
2221				(this.transform = a.transform),
2222				b >= a.t
2223					? ((this.fixedCallbackTag = a.tag),
2224					  (this.fixedCallback = a.cb),
2225					  (this.fixedAnim = this.yaw = this.pitch = 0))
2226					: (c *= e),
2227				(d = m.Rotation(c, a.axis)),
2228				(this.transform = this.transform.mul(d)),
2229				this.fixedAnim != 0)
2230			);
2231		}),
2232		(b.AnimatePosition = function (g, h, f) {
2233			var a = this,
2234				d = a.mx,
2235				e = a.my,
2236				b,
2237				c;
2238			!a.frozen && d >= 0 && e >= 0 && d < g && e < h
2239				? ((b = a.maxSpeed),
2240				  (c = a.reverse ? -1 : 1),
2241				  a.lx || (a.yaw = ((d * 2 * b) / g - b) * c * f),
2242				  a.ly || (a.pitch = ((e * 2 * b) / h - b) * -c * f),
2243				  (a.initial = null))
2244				: a.initial ||
2245				  (a.frozen && !a.freezeDecel ? (a.yaw = a.pitch = 0) : a.Decel(a)),
2246				this.Transform(a, a.pitch, a.yaw);
2247		}),
2248		(b.AnimateDrag = function (d, e, c) {
2249			var a = this,
2250				b = (100 * c * a.maxSpeed) / a.max_radius / a.zoom;
2251			a.dx || a.dy
2252				? (a.lx || (a.yaw = (a.dx * b) / a.stretchX),
2253				  a.ly || (a.pitch = (a.dy * -b) / a.stretchY),
2254				  (a.dx = a.dy = 0),
2255				  (a.initial = null))
2256				: a.initial || a.Decel(a),
2257				this.Transform(a, a.pitch, a.yaw);
2258		}),
2259		(b.Freeze = function () {
2260			this.frozen ||
2261				((this.preFreeze = [this.yaw, this.pitch]),
2262				(this.frozen = 1),
2263				(this.drawn = 0));
2264		}),
2265		(b.UnFreeze = function () {
2266			this.frozen &&
2267				((this.yaw = this.preFreeze[0]),
2268				(this.pitch = this.preFreeze[1]),
2269				(this.frozen = 0));
2270		}),
2271		(b.Decel = function (a) {
2272			var b = a.minSpeed,
2273				c = p(a.yaw),
2274				d = p(a.pitch);
2275			!a.lx && c > b && (a.yaw = c > a.z0 ? a.yaw * a.decel : 0),
2276				!a.ly && d > b && (a.pitch = d > a.z0 ? a.pitch * a.decel : 0);
2277		}),
2278		(b.Zoom = function (a) {
2279			(this.z2 = this.z1 * (1 / a)), (this.drawn = 0);
2280		}),
2281		(b.Clicked = function (b) {
2282			if (this.CheckAudioIcon()) {
2283				this.ToggleAudio();
2284				return;
2285			}
2286			var a = this.active;
2287			try {
2288				a &&
2289					a.tag &&
2290					(this.clickToFront === !1 || this.clickToFront === null
2291						? a.tag.Clicked(b)
2292						: this.TagToFront(
2293								a.tag,
2294								this.clickToFront,
2295								function () {
2296									a.tag.Clicked(b);
2297								},
2298								!0,
2299						  ));
2300			} catch (a) {}
2301		}),
2302		(b.Wheel = function (a) {
2303			var b = this.zoom + this.zoomStep * (a ? 1 : -1);
2304			(this.zoom = h(this.zoomMax, g(this.zoomMin, b))), this.Zoom(this.zoom);
2305		}),
2306		(b.BeginDrag = function (a) {
2307			(this.down = K(a, this.canvas)),
2308				(a.cancelBubble = !0),
2309				(a.returnValue = !1),
2310				a.preventDefault && a.preventDefault();
2311		}),
2312		(b.Drag = function (e, a) {
2313			if (this.dragControl && this.down) {
2314				var d = this.dragThreshold * this.dragThreshold,
2315					b = a.x - this.down.x,
2316					c = a.y - this.down.y;
2317				(this.dragging || b * b + c * c > d) &&
2318					((this.dx = b), (this.dy = c), (this.dragging = 1), (this.down = a));
2319			}
2320			return this.dragging;
2321		}),
2322		(b.EndDrag = function () {
2323			var a = this.dragging;
2324			return (this.dragging = this.down = null), a;
2325		});
2326	function ah(a) {
2327		var b = a.targetTouches[0],
2328			c = a.targetTouches[1];
2329		return E(w(c.pageX - b.pageX, 2) + w(c.pageY - b.pageY, 2));
2330	}
2331	(b.BeginPinch = function (a) {
2332		(this.pinched = [ah(a), this.zoom]), a.preventDefault && a.preventDefault();
2333	}),
2334		(b.Pinch = function (d) {
2335			var b,
2336				c,
2337				a = this.pinched;
2338			if (!a) return;
2339			(c = ah(d)),
2340				(b = (a[1] * c) / a[0]),
2341				(this.zoom = h(this.zoomMax, g(this.zoomMin, b))),
2342				this.Zoom(this.zoom);
2343		}),
2344		(b.EndPinch = function (a) {
2345			this.pinched = null;
2346		}),
2347		(b.Pause = function () {
2348			this.paused = !0;
2349		}),
2350		(b.Resume = function () {
2351			this.paused = !1;
2352		}),
2353		(b.SetSpeed = function (a) {
2354			(this.initial = a),
2355				(this.yaw = a[0] * this.maxSpeed),
2356				(this.pitch = a[1] * this.maxSpeed);
2357		}),
2358		(b.FindTag = function (a) {
2359			if (!n(a)) return null;
2360			if ((n(a.index) && (a = a.index), !B(a))) return this.taglist[a];
2361			var c, d, b;
2362			n(a.id)
2363				? ((c = "id"), (d = a.id))
2364				: n(a.text) && ((c = "innerText"), (d = a.text));
2365			for (b = 0; b < this.taglist.length; ++b)
2366				if (this.taglist[b].a[c] == d) return this.taglist[b];
2367		}),
2368		(b.RotateTag = function (a, h, i, j, f, g) {
2369			var b = a.Calc(this.transform, 1),
2370				c = new s(b.x, b.y, b.z),
2371				d = ay(i, h),
2372				e = c.angle(d),
2373				k = c.cross(d).unit();
2374			e == 0
2375				? ((this.fixedCallbackTag = a), (this.fixedCallback = f))
2376				: (this.fixedAnim = {
2377						angle: -e,
2378						axis: k,
2379						t: j,
2380						t0: q(),
2381						cb: f,
2382						tag: a,
2383						active: g,
2384				  });
2385		}),
2386		(b.TagToFront = function (a, b, c, d) {
2387			this.RotateTag(a, 0, 0, b, c, d);
2388		}),
2389		(b.Volume = function (a) {
2390			this.audioVolume = a * 1;
2391		}),
2392		(a.Start = function (b, c, d) {
2393			a.Delete(b), (a.tc[b] = new a(b, c, d));
2394		});
2395	function N(c, b) {
2396		a.tc[b] && a.tc[b][c]();
2397	}
2398	(a.Linear = function (a, b) {
2399		return b / a;
2400	}),
2401		(a.Smooth = function (a, b) {
2402			return 0.5 - l((b * Math.PI) / a) / 2;
2403		}),
2404		(a.Pause = function (a) {
2405			N("Pause", a);
2406		}),
2407		(a.Resume = function (a) {
2408			N("Resume", a);
2409		}),
2410		(a.Reload = function (a) {
2411			N("Load", a);
2412		}),
2413		(a.Update = function (a) {
2414			N("Update", a);
2415		}),
2416		(a.SetSpeed = function (c, b) {
2417			return (
2418				!!(B(b) && a.tc[c] && !isNaN(b[0]) && !isNaN(b[1])) &&
2419				(a.tc[c].SetSpeed(b), !0)
2420			);
2421		}),
2422		(a.TagToFront = function (c, b) {
2423			return !!B(b) && ((b.lat = b.lng = 0), a.RotateTag(c, b));
2424		}),
2425		(a.RotateTag = function (c, b) {
2426			if (B(b) && a.tc[c]) {
2427				isNaN(b.time) && (b.time = 500);
2428				var d = a.tc[c].FindTag(b);
2429				if (d)
2430					return (
2431						a.tc[c].RotateTag(d, b.lat, b.lng, b.time, b.callback, b.active), !0
2432					);
2433			}
2434			return !1;
2435		}),
2436		(a.Delete = function (b) {
2437			var d, e;
2438			if (j[b])
2439				if (((e = c.getElementById(b)), e))
2440					for (d = 0; d < j[b].length; ++d) am(j[b][d][0], j[b][d][1], e);
2441			delete j[b], delete a.tc[b];
2442		}),
2443		(a.tc = {}),
2444		(a.options = {
2445			z1: 2e4,
2446			z2: 2e4,
2447			z0: 2e-4,
2448			freezeActive: !1,
2449			freezeDecel: !1,
2450			activeCursor: "pointer",
2451			pulsateTo: 1,
2452			pulsateTime: 3,
2453			reverse: !1,
2454			depth: 0.5,
2455			maxSpeed: 0.05,
2456			minSpeed: 0,
2457			decel: 0.95,
2458			interval: 20,
2459			minBrightness: 0.1,
2460			maxBrightness: 1,
2461			outlineColour: "#ffff99",
2462			outlineThickness: 2,
2463			outlineOffset: 5,
2464			outlineMethod: "outline",
2465			outlineRadius: 0,
2466			textColour: "#ff99ff",
2467			textHeight: 15,
2468			textFont: "Helvetica, Arial, sans-serif",
2469			shadow: "#000",
2470			shadowBlur: 0,
2471			shadowOffset: [0, 0],
2472			initial: null,
2473			hideTags: !0,
2474			zoom: 1,
2475			weight: !1,
2476			weightMode: "size",
2477			weightFrom: null,
2478			weightSize: 1,
2479			weightSizeMin: null,
2480			weightSizeMax: null,
2481			weightGradient: { 0: "#f00", 0.33: "#ff0", 0.66: "#0f0", 1: "#00f" },
2482			txtOpt: !0,
2483			txtScale: 2,
2484			frontSelect: !1,
2485			wheelZoom: !0,
2486			zoomMin: 0.3,
2487			zoomMax: 3,
2488			zoomStep: 0.05,
2489			shape: "sphere",
2490			lock: null,
2491			tooltip: null,
2492			tooltipDelay: 300,
2493			tooltipClass: "tctooltip",
2494			radiusX: 1,
2495			radiusY: 1,
2496			radiusZ: 1,
2497			stretchX: 1,
2498			stretchY: 1,
2499			offsetX: 0,
2500			offsetY: 0,
2501			shuffleTags: !1,
2502			noSelect: !1,
2503			noMouse: !1,
2504			imageScale: 1,
2505			paused: !1,
2506			dragControl: !1,
2507			dragThreshold: 4,
2508			centreFunc: x,
2509			splitWidth: 0,
2510			animTiming: "Smooth",
2511			clickToFront: !1,
2512			fadeIn: 0,
2513			padding: 0,
2514			bgColour: null,
2515			bgRadius: 0,
2516			bgOutline: null,
2517			bgOutlineThickness: 0,
2518			outlineIncrease: 4,
2519			textAlign: "centre",
2520			textVAlign: "middle",
2521			imageMode: null,
2522			imagePosition: null,
2523			imagePadding: 2,
2524			imageAlign: "centre",
2525			imageVAlign: "middle",
2526			noTagsMessage: !0,
2527			centreImage: null,
2528			pinchZoom: !1,
2529			repeatTags: 0,
2530			minTags: 0,
2531			imageRadius: 0,
2532			scrollPause: !1,
2533			outlineDash: 0,
2534			outlineDashSpace: 0,
2535			outlineDashSpeed: 1,
2536			activeAudio: "",
2537			audioVolume: 1,
2538			audioIcon: 1,
2539			audioIconSize: 20,
2540			audioIconThickness: 2,
2541			audioIconDark: 0,
2542			altImage: 0,
2543		});
2544	for (r in a.options) a[r] = a.options[r];
2545	(window.TagCanvas = a),
2546		t(
2547			"load",
2548			function () {
2549				a.loaded = 1;
2550			},
2551			window,
2552		);
2553})();

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.