﻿/*
* Raphael 1.5.0 - JavaScript Vector Library
*
* Copyright (c) 2010 Dmitry Baranovskiy (http://raphaeljs.com)
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
*/
(function() { function aG() { if (aG.is(arguments[0], a4)) { var b = arguments[0], d = D[bz](aG, b.splice(0, 3 + aG.is(b[0], aD))), R = d.set(); for (var E = 0, S = b[r]; E < S; E++) { var e = b[E] || {}; bm[af](e.type) && R[j](d[e.type]().attr(e)) } return R } return D[bz](aG, arguments) } aG.version = "1.5.0"; var a = /[, ]+/, bm = { circle: 1, rect: 1, path: 1, ellipse: 1, text: 1, image: 1 }, bk = /\{(\d+)\}/g, bC = "prototype", af = "hasOwnProperty", Z = document, aN = window, q = { was: Object[bC][af].call(aN, "Raphael"), is: aN.Raphael }, bw = function() { this.customAttributes = {} }, aW, bh = "appendChild", bz = "apply", bt = "concat", V = "createTouch" in Z, aM = "", aF = " ", bA = String, H = "split", P = "click dblclick mousedown mousemove mouseout mouseover mouseup touchstart touchmove touchend orientationchange touchcancel gesturestart gesturechange gestureend"[H](aF), bn = { mousedown: "touchstart", mousemove: "touchmove", mouseup: "touchend" }, aT = "join", r = "length", bE = bA[bC].toLowerCase, an = Math, l = an.max, bf = an.min, bi = an.pow, aD = "number", ae = "string", a4 = "array", aX = "toString", a1 = "fill", aQ = Object[bC][aX], bq = {}, j = "push", bx = /^(?=[\da-f]$)/, h = /^url\(['"]?([^\)]+?)['"]?\)$/i, F = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+\s*,\s*[\d\.]+\s*,\s*[\d\.]+(?:\s*,\s*[\d\.]+)?)\s*\)|rgba?\(\s*([\d\.]+%\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%(?:\s*,\s*[\d\.]+%)?)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsb\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0)?\s*,\s*[\d\.]+\s*,\s*[\d\.]+)\s*\)|hsl\(\s*([\d\.]+(?:deg|\xb0|%)\s*,\s*[\d\.]+%\s*,\s*[\d\.]+%)\s*\))\s*$/i, ao = /^(NaN|-?Infinity)$/, c = /^cubic-bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, ac = an.round, C = "setAttribute", ai = parseFloat, Q = parseInt, a2 = " progid:DXImageTransform.Microsoft", bl = bA[bC].toUpperCase, p = { blur: 0, "clip-rect": "0 0 1e9 1e9", cursor: "default", cx: 0, cy: 0, fill: "#fff", "fill-opacity": 1, font: '10px "Arial"', "font-family": '"Arial"', "font-size": "10", "font-style": "normal", "font-weight": 400, gradient: 0, height: 0, href: "http://raphaeljs.com/", opacity: 1, path: "M0,0", r: 0, rotation: 0, rx: 0, ry: 0, scale: "1 1", src: "", stroke: "#000", "stroke-dasharray": "", "stroke-linecap": "butt", "stroke-linejoin": "butt", "stroke-miterlimit": 0, "stroke-opacity": 1, "stroke-width": 1, target: "_blank", "text-anchor": "middle", title: "Raphael", translation: "0 0", width: 0, x: 0, y: 0 }, al = { along: "along", blur: aD, "clip-rect": "csv", cx: aD, cy: aD, fill: "colour", "fill-opacity": aD, "font-size": aD, height: aD, opacity: aD, path: "path", r: aD, rotation: "csv", rx: aD, ry: aD, scale: "csv", stroke: "colour", "stroke-opacity": aD, "stroke-width": aD, translation: "csv", width: aD, x: aD, y: aD }, bp = "replace", a7 = /,?([achlmqrstvxz]),?/gi, ba = /\s*,\s*/, m = { hs: 1, rg: 1 }, bc = /^(from|to|\d+%)$/, aO = /([achlmqstvz])[\s,]*((-?\d*\.?\d*(?:e[-+]?\d+)?\s*,?\s*)+)/ig, aE = /(-?\d*\.?\d*(?:e[-+]?\d+)?)\s*,?\s*/ig, bj = function(e, d) { return e.key - d.key }; aG.type = (aN.SVGAngle || Z.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#BasicStructure", "1.1") ? "SVG" : "VML"); if (aG.type == "VML") { var av = Z.createElement("div"), az; av.innerHTML = '<v:shape adj="1"/>'; az = av.firstChild; az.style.behavior = "url(#default#VML)"; if (!(az && typeof az.adj == "object")) { return aG.type = null } av = null } aG.svg = !(aG.vml = aG.type == "VML"); bw[bC] = aG[bC]; aW = bw[bC]; aG._id = 0; aG._oid = 0; aG.fn = {}; aG.is = function(d, b) { b = bE.call(b); if (b == "finite") { return !ao.test(+d) } return (b == "null" && d === null) || (b == typeof d) || (b == "object" && d === Object(d)) || (b == "array" && Array.isArray && Array.isArray(d)) || aQ.call(d).slice(8, -1).toLowerCase() == b }; aG.angle = function(E, S, e, R, d, i) { if (d == null) { var b = E - e, bF = S - R; if (!b && !bF) { return 0 } return ((b < 0) * 180 + an.atan(-bF / -b) * 180 / an.PI + 360) % 360 } else { return aG.angle(E, S, d, i) - aG.angle(e, R, d, i) } }; aG.snapTo = function(d, E, b) { b = b || 10; d = [][bt](d); var e = d.length; while (e--) { if (an.abs(d[e] - E) <= b) { return d[e] } } return E }; aG.setWindow = function(b) { aN = b; Z = aN.document }; var a6 = function(E) { if (aG.vml) { var b = /^\s+|\s+$/g; var S; try { var bF = new ActiveXObject("htmlfile"); bF.write("<body>"); bF.close(); S = bF.body } catch (bG) { S = createPopup().document.body } var d = S.createTextRange(); a6 = ay(function(i) { try { S.style.color = bA(i)[bp](b, aM); var bH = d.queryCommandValue("ForeColor"); bH = ((bH & 255) << 16) | (bH & 65280) | ((bH & 16711680) >>> 16); return "#" + ("000000" + bH[aX](16)).slice(-6) } catch (bI) { return "none" } }) } else { var R = Z.createElement("i"); R.title = "Rapha\xebl Colour Picker"; R.style.display = "none"; Z.body[bh](R); a6 = ay(function(e) { R.style.color = e; return Z.defaultView.getComputedStyle(R, aM).getPropertyValue("color") }) } return a6(E) }, aA = function() { return "hsb(" + [this.h, this.s, this.b] + ")" }, L = function() { return "hsl(" + [this.h, this.s, this.l] + ")" }, A = function() { return this.hex }; aG.hsb2rgb = function(i, e, d) { if (aG.is(i, "object") && "h" in i && "s" in i && "b" in i) { d = i.b; e = i.s; i = i.h } return aG.hsl2rgb(i, e, d / 2) }; aG.hsl2rgb = function(S, bM, e) { if (aG.is(S, "object") && "h" in S && "s" in S && "l" in S) { e = S.l; bM = S.s; S = S.h } if (S > 1 || bM > 1 || e > 1) { S /= 360; bM /= 100; e /= 100 } var bJ = {}, bG = ["r", "g", "b"], bF, bI, R, d, bH, bK; if (!bM) { bJ = { r: e, g: e, b: e} } else { if (e < 0.5) { bF = e * (1 + bM) } else { bF = e + bM - e * bM } bI = 2 * e - bF; for (var E = 0, bL = bG.length; E < bL; E++) { R = S + 1 / 3 * -(E - 1); R < 0 && R++; R > 1 && R--; if (R * 6 < 1) { bJ[bG[E]] = bI + (bF - bI) * 6 * R } else { if (R * 2 < 1) { bJ[bG[E]] = bF } else { if (R * 3 < 2) { bJ[bG[E]] = bI + (bF - bI) * (2 / 3 - R) * 6 } else { bJ[bG[E]] = bI } } } } } bJ.r *= 255; bJ.g *= 255; bJ.b *= 255; d = (~ ~bJ.r)[aX](16); bH = (~ ~bJ.g)[aX](16); bK = (~ ~bJ.b)[aX](16); d = d[bp](bx, "0"); bH = bH[bp](bx, "0"); bK = bK[bp](bx, "0"); bJ.hex = "#" + d + bH + bK; bJ.toString = A; return bJ }; aG.rgb2hsb = function(b, d, bF) { if (d == null && aG.is(b, "object") && "r" in b && "g" in b && "b" in b) { bF = b.b; d = b.g; b = b.r } if (d == null && aG.is(b, ae)) { var bH = aG.getRGB(b); b = bH.r; d = bH.g; bF = bH.b } if (b > 1 || d > 1 || bF > 1) { b /= 255; d /= 255; bF /= 255 } var S = l(b, d, bF), e = bf(b, d, bF), E, i, R = S; if (e == S) { return { h: 0, s: 0, b: S, toString: aA} } else { var bG = (S - e); i = bG / S; if (b == S) { E = (d - bF) / bG } else { if (d == S) { E = 2 + ((bF - b) / bG) } else { E = 4 + ((b - d) / bG) } } E /= 6; E < 0 && E++; E > 1 && E-- } return { h: E, s: i, b: R, toString: aA} }; aG.rgb2hsl = function(d, e, S) { if (e == null && aG.is(d, "object") && "r" in d && "g" in d && "b" in d) { S = d.b; e = d.g; d = d.r } if (e == null && aG.is(d, ae)) { var bI = aG.getRGB(d); d = bI.r; e = bI.g; S = bI.b } if (d > 1 || e > 1 || S > 1) { d /= 255; e /= 255; S /= 255 } var R = l(d, e, S), i = bf(d, e, S), E, bH, b = (R + i) / 2, bG; if (i == R) { bG = { h: 0, s: 0, l: b} } else { var bF = R - i; bH = b < 0.5 ? bF / (R + i) : bF / (2 - R - i); if (d == R) { E = (e - S) / bF } else { if (e == R) { E = 2 + (S - d) / bF } else { E = 4 + (d - e) / bF } } E /= 6; E < 0 && E++; E > 1 && E--; bG = { h: E, s: bH, l: b} } bG.toString = L; return bG }; aG._path2string = function() { return this.join(",")[bp](a7, "$1") }; function ay(i, d, b) { function e() { var E = Array[bC].slice.call(arguments, 0), S = E[aT]("\u25ba"), R = e.cache = e.cache || {}, bF = e.count = e.count || []; if (R[af](S)) { return b ? b(R[S]) : R[S] } bF[r] >= 1000 && delete R[bF.shift()]; bF[j](S); R[S] = i[bz](d, E); return b ? b(R[S]) : R[S] } return e } aG.getRGB = ay(function(e) { if (!e || !!((e = bA(e)).indexOf("-") + 1)) { return { r: -1, g: -1, b: -1, hex: "none", error: 1} } if (e == "none") { return { r: -1, g: -1, b: -1, hex: "none"} } !(m[af](e.substring(0, 2)) || e.charAt() == "#") && (e = a6(e)); var bF, i, E, bI, S, bJ, bG = e.match(F); if (bG) { if (bG[2]) { bI = Q(bG[2].substring(5), 16); E = Q(bG[2].substring(3, 5), 16); i = Q(bG[2].substring(1, 3), 16) } if (bG[3]) { bI = Q((bJ = bG[3].charAt(3)) + bJ, 16); E = Q((bJ = bG[3].charAt(2)) + bJ, 16); i = Q((bJ = bG[3].charAt(1)) + bJ, 16) } if (bG[4]) { bG = bG[4][H](ba); i = ai(bG[0]); E = ai(bG[1]); bI = ai(bG[2]); S = ai(bG[3]) } if (bG[5]) { bG = bG[5][H](ba); i = ai(bG[0]) * 2.55; E = ai(bG[1]) * 2.55; bI = ai(bG[2]) * 2.55; S = ai(bG[3]) } if (bG[6]) { bG = bG[6][H](ba); i = ai(bG[0]); E = ai(bG[1]); bI = ai(bG[2]); (bG[0].slice(-3) == "deg" || bG[0].slice(-1) == "\xb0") && (i /= 360); return aG.hsb2rgb(i, E, bI) } if (bG[7]) { bG = bG[7][H](ba); i = ai(bG[0]) * 2.55; E = ai(bG[1]) * 2.55; bI = ai(bG[2]) * 2.55; (bG[0].slice(-3) == "deg" || bG[0].slice(-1) == "\xb0") && (i /= 360 * 2.55); return aG.hsb2rgb(i, E, bI) } if (bG[8]) { bG = bG[8][H](ba); i = ai(bG[0]); E = ai(bG[1]); bI = ai(bG[2]); (bG[0].slice(-3) == "deg" || bG[0].slice(-1) == "\xb0") && (i /= 360); return aG.hsl2rgb(i, E, bI) } if (bG[9]) { bG = bG[9][H](ba); i = ai(bG[0]) * 2.55; E = ai(bG[1]) * 2.55; bI = ai(bG[2]) * 2.55; (bG[0].slice(-3) == "deg" || bG[0].slice(-1) == "\xb0") && (i /= 360 * 2.55); return aG.hsl2rgb(i, E, bI) } bG = { r: i, g: E, b: bI }; var d = (~ ~i)[aX](16), R = (~ ~E)[aX](16), bH = (~ ~bI)[aX](16); d = d[bp](bx, "0"); R = R[bp](bx, "0"); bH = bH[bp](bx, "0"); bG.hex = "#" + d + R + bH; isFinite(ai(S)) && (bG.o = S); return bG } return { r: -1, g: -1, b: -1, hex: "none", error: 1} }, aG); aG.getColor = function(d) { var e = this.getColor.start = this.getColor.start || { h: 0, s: 1, b: d || 0.75 }, b = this.hsb2rgb(e.h, e.s, e.b); e.h += 0.075; if (e.h > 1) { e.h = 0; e.s -= 0.2; e.s <= 0 && (this.getColor.start = { h: 0, s: 1, b: e.b }) } return b.hex }; aG.getColor.reset = function() { delete this.start }; aG.parsePathString = ay(function(b) { if (!b) { return null } var e = { a: 7, c: 6, h: 1, l: 2, m: 2, q: 4, s: 4, t: 2, v: 1, z: 0 }, d = []; if (aG.is(b, a4) && aG.is(b[0], a4)) { d = aP(b) } if (!d[r]) { bA(b)[bp](aO, function(E, i, bF) { var S = [], R = bE.call(i); bF[bp](aE, function(bH, bG) { bG && S[j](+bG) }); if (R == "m" && S[r] > 2) { d[j]([i][bt](S.splice(0, 2))); R = "l"; i = i == "m" ? "l" : "L" } while (S[r] >= e[R]) { d[j]([i][bt](S.splice(0, e[R]))); if (!e[R]) { break } } }) } d[aX] = aG._path2string; return d }); aG.findDotsAtSegment = function(d, b, bS, bQ, S, E, bG, bF, bM) { var bK = 1 - bM, bJ = bi(bK, 3) * d + bi(bK, 2) * 3 * bM * bS + bK * 3 * bM * bM * S + bi(bM, 3) * bG, bH = bi(bK, 3) * b + bi(bK, 2) * 3 * bM * bQ + bK * 3 * bM * bM * E + bi(bM, 3) * bF, bO = d + 2 * bM * (bS - d) + bM * bM * (S - 2 * bS + d), bN = b + 2 * bM * (bQ - b) + bM * bM * (E - 2 * bQ + b), bR = bS + 2 * bM * (S - bS) + bM * bM * (bG - 2 * S + bS), bP = bQ + 2 * bM * (E - bQ) + bM * bM * (bF - 2 * E + bQ), bL = (1 - bM) * d + bM * bS, bI = (1 - bM) * b + bM * bQ, i = (1 - bM) * S + bM * bG, e = (1 - bM) * E + bM * bF, R = (90 - an.atan((bO - bR) / (bN - bP)) * 180 / an.PI); (bO > bR || bN < bP) && (R += 180); return { x: bJ, y: bH, m: { x: bO, y: bN }, n: { x: bR, y: bP }, start: { x: bL, y: bI }, end: { x: i, y: e }, alpha: R} }; var ah = ay(function(bJ) { if (!bJ) { return { x: 0, y: 0, width: 0, height: 0} } bJ = U(bJ); var bG = 0, bF = 0, E = [], d = [], e; for (var R = 0, bI = bJ[r]; R < bI; R++) { e = bJ[R]; if (e[0] == "M") { bG = e[1]; bF = e[2]; E[j](bG); d[j](bF) } else { var S = a3(bG, bF, e[1], e[2], e[3], e[4], e[5], e[6]); E = E[bt](S.min.x, S.max.x); d = d[bt](S.min.y, S.max.y); bG = e[5]; bF = e[6] } } var b = bf[bz](0, E), bH = bf[bz](0, d); return { x: b, y: bH, width: l[bz](0, E) - b, height: l[bz](0, d) - bH} }), aP = function(S) { var e = []; if (!aG.is(S, a4) || !aG.is(S && S[0], a4)) { S = aG.parsePathString(S) } for (var d = 0, E = S[r]; d < E; d++) { e[d] = []; for (var b = 0, R = S[d][r]; b < R; b++) { e[d][b] = S[d][b] } } e[aX] = aG._path2string; return e }, ar = ay(function(E) { if (!aG.is(E, a4) || !aG.is(E && E[0], a4)) { E = aG.parsePathString(E) } var bI = [], bK = 0, bJ = 0, bN = 0, bM = 0, e = 0; if (E[0][0] == "M") { bK = E[0][1]; bJ = E[0][2]; bN = bK; bM = bJ; e++; bI[j](["M", bK, bJ]) } for (var bF = e, bO = E[r]; bF < bO; bF++) { var b = bI[bF] = [], bL = E[bF]; if (bL[0] != bE.call(bL[0])) { b[0] = bE.call(bL[0]); switch (b[0]) { case "a": b[1] = bL[1]; b[2] = bL[2]; b[3] = bL[3]; b[4] = bL[4]; b[5] = bL[5]; b[6] = +(bL[6] - bK).toFixed(3); b[7] = +(bL[7] - bJ).toFixed(3); break; case "v": b[1] = +(bL[1] - bJ).toFixed(3); break; case "m": bN = bL[1]; bM = bL[2]; default: for (var S = 1, bG = bL[r]; S < bG; S++) { b[S] = +(bL[S] - ((S % 2) ? bK : bJ)).toFixed(3) } } } else { b = bI[bF] = []; if (bL[0] == "m") { bN = bL[1] + bK; bM = bL[2] + bJ } for (var R = 0, d = bL[r]; R < d; R++) { bI[bF][R] = bL[R] } } var bH = bI[bF][r]; switch (bI[bF][0]) { case "z": bK = bN; bJ = bM; break; case "h": bK += +bI[bF][bH - 1]; break; case "v": bJ += +bI[bF][bH - 1]; break; default: bK += +bI[bF][bH - 2]; bJ += +bI[bF][bH - 1] } } bI[aX] = aG._path2string; return bI }, 0, aP), x = ay(function(E) { if (!aG.is(E, a4) || !aG.is(E && E[0], a4)) { E = aG.parsePathString(E) } var bH = [], bJ = 0, bI = 0, bM = 0, bL = 0, e = 0; if (E[0][0] == "M") { bJ = +E[0][1]; bI = +E[0][2]; bM = bJ; bL = bI; e++; bH[0] = ["M", bJ, bI] } for (var bF = e, bN = E[r]; bF < bN; bF++) { var b = bH[bF] = [], bK = E[bF]; if (bK[0] != bl.call(bK[0])) { b[0] = bl.call(bK[0]); switch (b[0]) { case "A": b[1] = bK[1]; b[2] = bK[2]; b[3] = bK[3]; b[4] = bK[4]; b[5] = bK[5]; b[6] = +(bK[6] + bJ); b[7] = +(bK[7] + bI); break; case "V": b[1] = +bK[1] + bI; break; case "H": b[1] = +bK[1] + bJ; break; case "M": bM = +bK[1] + bJ; bL = +bK[2] + bI; default: for (var S = 1, bG = bK[r]; S < bG; S++) { b[S] = +bK[S] + ((S % 2) ? bJ : bI) } } } else { for (var R = 0, d = bK[r]; R < d; R++) { bH[bF][R] = bK[R] } } switch (b[0]) { case "Z": bJ = bM; bI = bL; break; case "H": bJ = b[1]; break; case "V": bI = b[1]; break; case "M": bM = bH[bF][bH[bF][r] - 2]; bL = bH[bF][bH[bF][r] - 1]; default: bJ = bH[bF][bH[bF][r] - 2]; bI = bH[bF][bH[bF][r] - 1] } } bH[aX] = aG._path2string; return bH }, null, aP), bB = function(d, i, b, e) { return [d, i, b, e, b, e] }, bg = function(d, i, S, E, b, e) { var R = 1 / 3, bF = 2 / 3; return [R * d + bF * S, R * i + bF * E, R * b + bF * S, R * e + bF * E, b, e] }, Y = function(bN, ci, bW, bU, bO, bI, R, bM, ch, bP) { var E = an.PI, bT = E * 120 / 180, b = E / 180 * (+bO || 0), b0 = [], bX, ce = ay(function(cj, cm, i) { var cl = cj * an.cos(i) - cm * an.sin(i), ck = cj * an.sin(i) + cm * an.cos(i); return { x: cl, y: ck} }); if (!bP) { bX = ce(bN, ci, -b); bN = bX.x; ci = bX.y; bX = ce(bM, ch, -b); bM = bX.x; ch = bX.y; var d = an.cos(E / 180 * bO), bK = an.sin(E / 180 * bO), b2 = (bN - bM) / 2, b1 = (ci - ch) / 2; var cc = (b2 * b2) / (bW * bW) + (b1 * b1) / (bU * bU); if (cc > 1) { cc = an.sqrt(cc); bW = cc * bW; bU = cc * bU } var e = bW * bW, b5 = bU * bU, b7 = (bI == R ? -1 : 1) * an.sqrt(an.abs((e * b5 - e * b1 * b1 - b5 * b2 * b2) / (e * b1 * b1 + b5 * b2 * b2))), bR = b7 * bW * b1 / bU + (bN + bM) / 2, bQ = b7 * -bU * b2 / bW + (ci + ch) / 2, bH = an.asin(((ci - bQ) / bU).toFixed(9)), bG = an.asin(((ch - bQ) / bU).toFixed(9)); bH = bN < bR ? E - bH : bH; bG = bM < bR ? E - bG : bG; bH < 0 && (bH = E * 2 + bH); bG < 0 && (bG = E * 2 + bG); if (R && bH > bG) { bH = bH - E * 2 } if (!R && bG > bH) { bG = bG - E * 2 } } else { bH = bP[0]; bG = bP[1]; bR = bP[2]; bQ = bP[3] } var bL = bG - bH; if (an.abs(bL) > bT) { var bS = bG, bV = bM, bJ = ch; bG = bH + bT * (R && bG > bH ? 1 : -1); bM = bR + bW * an.cos(bG); ch = bQ + bU * an.sin(bG); b0 = Y(bM, ch, bW, bU, bO, 0, R, bV, bJ, [bG, bS, bR, bQ]) } bL = bG - bH; var bF = an.cos(bH), cg = an.sin(bH), S = an.cos(bG), cf = an.sin(bG), b3 = an.tan(bL / 4), b6 = 4 / 3 * bW * b3, b4 = 4 / 3 * bU * b3, cd = [bN, ci], cb = [bN + b6 * cg, ci - b4 * bF], ca = [bM + b6 * cf, ch - b4 * S], b8 = [bM, ch]; cb[0] = 2 * cd[0] - cb[0]; cb[1] = 2 * cd[1] - cb[1]; if (bP) { return [cb, ca, b8][bt](b0) } else { b0 = [cb, ca, b8][bt](b0)[aT]()[H](","); var bY = []; for (var b9 = 0, bZ = b0[r]; b9 < bZ; b9++) { bY[b9] = b9 % 2 ? ce(b0[b9 - 1], b0[b9], b).y : ce(b0[b9], b0[b9 + 1], b).x } return bY } }, ab = function(d, b, i, e, bG, bF, S, R, bH) { var E = 1 - bH; return { x: bi(E, 3) * d + bi(E, 2) * 3 * bH * i + E * 3 * bH * bH * bG + bi(bH, 3) * S, y: bi(E, 3) * b + bi(E, 2) * 3 * bH * e + E * 3 * bH * bH * bF + bi(bH, 3) * R} }, a3 = ay(function(i, d, R, E, bO, bN, bK, bH) { var bM = (bO - 2 * R + i) - (bK - 2 * bO + R), bJ = 2 * (R - i) - 2 * (bO - R), bG = i - R, bF = (-bJ + an.sqrt(bJ * bJ - 4 * bM * bG)) / 2 / bM, S = (-bJ - an.sqrt(bJ * bJ - 4 * bM * bG)) / 2 / bM, bI = [d, bH], bL = [i, bK], e; an.abs(bF) > "1e12" && (bF = 0.5); an.abs(S) > "1e12" && (S = 0.5); if (bF > 0 && bF < 1) { e = ab(i, d, R, E, bO, bN, bK, bH, bF); bL[j](e.x); bI[j](e.y) } if (S > 0 && S < 1) { e = ab(i, d, R, E, bO, bN, bK, bH, S); bL[j](e.x); bI[j](e.y) } bM = (bN - 2 * E + d) - (bH - 2 * bN + E); bJ = 2 * (E - d) - 2 * (bN - E); bG = d - E; bF = (-bJ + an.sqrt(bJ * bJ - 4 * bM * bG)) / 2 / bM; S = (-bJ - an.sqrt(bJ * bJ - 4 * bM * bG)) / 2 / bM; an.abs(bF) > "1e12" && (bF = 0.5); an.abs(S) > "1e12" && (S = 0.5); if (bF > 0 && bF < 1) { e = ab(i, d, R, E, bO, bN, bK, bH, bF); bL[j](e.x); bI[j](e.y) } if (S > 0 && S < 1) { e = ab(i, d, R, E, bO, bN, bK, bH, S); bL[j](e.x); bI[j](e.y) } return { min: { x: bf[bz](0, bL), y: bf[bz](0, bI) }, max: { x: l[bz](0, bL), y: l[bz](0, bI)}} }), U = ay(function(bN, bI) { var E = x(bN), bJ = bI && x(bI), bK = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, b = { x: 0, y: 0, bx: 0, by: 0, X: 0, Y: 0, qx: null, qy: null }, S = function(bO, bP) { var i, bQ; if (!bO) { return ["C", bP.x, bP.y, bP.x, bP.y, bP.x, bP.y] } !(bO[0] in { T: 1, Q: 1 }) && (bP.qx = bP.qy = null); switch (bO[0]) { case "M": bP.X = bO[1]; bP.Y = bO[2]; break; case "A": bO = ["C"][bt](Y[bz](0, [bP.x, bP.y][bt](bO.slice(1)))); break; case "S": i = bP.x + (bP.x - (bP.bx || bP.x)); bQ = bP.y + (bP.y - (bP.by || bP.y)); bO = ["C", i, bQ][bt](bO.slice(1)); break; case "T": bP.qx = bP.x + (bP.x - (bP.qx || bP.x)); bP.qy = bP.y + (bP.y - (bP.qy || bP.y)); bO = ["C"][bt](bg(bP.x, bP.y, bP.qx, bP.qy, bO[1], bO[2])); break; case "Q": bP.qx = bO[1]; bP.qy = bO[2]; bO = ["C"][bt](bg(bP.x, bP.y, bO[1], bO[2], bO[3], bO[4])); break; case "L": bO = ["C"][bt](bB(bP.x, bP.y, bO[1], bO[2])); break; case "H": bO = ["C"][bt](bB(bP.x, bP.y, bO[1], bP.y)); break; case "V": bO = ["C"][bt](bB(bP.x, bP.y, bP.x, bO[1])); break; case "Z": bO = ["C"][bt](bB(bP.x, bP.y, bP.X, bP.Y)); break } return bO }, d = function(bO, bP) { if (bO[bP][r] > 7) { bO[bP].shift(); var bQ = bO[bP]; while (bQ[r]) { bO.splice(bP++, 0, ["C"][bt](bQ.splice(0, 6))) } bO.splice(bP, 1); bL = l(E[r], bJ && bJ[r] || 0) } }, e = function(bS, bR, bP, bO, bQ) { if (bS && bR && bS[bQ][0] == "M" && bR[bQ][0] != "M") { bR.splice(bQ, 0, ["M", bO.x, bO.y]); bP.bx = 0; bP.by = 0; bP.x = bS[bQ][1]; bP.y = bS[bQ][2]; bL = l(E[r], bJ && bJ[r] || 0) } }; for (var bG = 0, bL = l(E[r], bJ && bJ[r] || 0); bG < bL; bG++) { E[bG] = S(E[bG], bK); d(E, bG); bJ && (bJ[bG] = S(bJ[bG], b)); bJ && d(bJ, bG); e(E, bJ, bK, b, bG); e(bJ, E, b, bK, bG); var bF = E[bG], bM = bJ && bJ[bG], R = bF[r], bH = bJ && bM[r]; bK.x = bF[R - 2]; bK.y = bF[R - 1]; bK.bx = ai(bF[R - 4]) || bK.x; bK.by = ai(bF[R - 3]) || bK.y; b.bx = bJ && (ai(bM[bH - 4]) || b.x); b.by = bJ && (ai(bM[bH - 3]) || b.y); b.x = bJ && bM[bH - 2]; b.y = bJ && bM[bH - 1] } return bJ ? [E, bJ] : E }, null, aP), v = ay(function(bI) { var bH = []; for (var S = 0, bJ = bI[r]; S < bJ; S++) { var b = {}, bG = bI[S].match(/^([^:]*):?([\d\.]*)/); b.color = aG.getRGB(bG[1]); if (b.color.error) { return null } b.color = b.color.hex; bG[2] && (b.offset = bG[2] + "%"); bH[j](b) } for (S = 1, bJ = bH[r] - 1; S < bJ; S++) { if (!bH[S].offset) { var e = ai(bH[S - 1].offset || 0), E = 0; for (var R = S + 1; R < bJ; R++) { if (bH[R].offset) { E = bH[R].offset; break } } if (!E) { E = 100; R = bJ } E = ai(E); var bF = (E - e) / (R - S + 1); for (; S < R; S++) { e += bF; bH[S].offset = e + "%" } } } return bH }), aH = function(b, E, e, i) { var d; if (aG.is(b, ae) || aG.is(b, "object")) { d = aG.is(b, ae) ? Z.getElementById(b) : b; if (d.tagName) { if (E == null) { return { container: d, width: d.style.pixelWidth || d.offsetWidth, height: d.style.pixelHeight || d.offsetHeight} } else { return { container: d, width: E, height: e} } } } else { return { container: 1, x: b, y: E, width: e, height: i} } }, bb = function(b, e) { var d = this; for (var i in e) { if (e[af](i) && !(i in b)) { switch (typeof e[i]) { case "function": (function(E) { b[i] = b === d ? E : function() { return E[bz](d, arguments) } })(e[i]); break; case "object": b[i] = b[i] || {}; bb.call(this, b[i], e[i]); break; default: b[i] = e[i]; break } } } }, aC = function(b, d) { b == d.top && (d.top = b.prev); b == d.bottom && (d.bottom = b.next); b.next && (b.next.prev = b.prev); b.prev && (b.prev.next = b.next) }, ak = function(b, d) { if (d.top === b) { return } aC(b, d); b.next = null; b.prev = d.top; d.top.next = b; d.top = b }, o = function(b, d) { if (d.bottom === b) { return } aC(b, d); b.next = d.bottom; b.prev = null; d.bottom.prev = b; d.bottom = b }, I = function(d, b, e) { aC(d, e); b == e.top && (e.top = d); b.next && (b.next.prev = d); d.next = b.next; d.prev = b; b.next = d }, aJ = function(d, b, e) { aC(d, e); b == e.bottom && (e.bottom = d); b.prev && (b.prev.next = d); d.prev = b.prev; b.prev = d; d.next = b }, y = function(b) { return function() { throw new Error("Rapha\xebl: you are calling to method \u201c" + b + "\u201d of removed object") } }, aL = /^r(?:\(([^,]+?)\s*,\s*([^\)]+?)\))?/; aG.pathToRelative = ar; if (aG.svg) { aW.svgns = "http://www.w3.org/2000/svg"; aW.xlink = "http://www.w3.org/1999/xlink"; ac = function(b) { return +b + (~ ~b === b) * 0.5 }; var be = function(e, b) { if (b) { for (var d in b) { if (b[af](d)) { e[C](d, bA(b[d])) } } } else { e = Z.createElementNS(aW.svgns, e); e.style.webkitTapHighlightColor = "rgba(0,0,0,0)"; return e } }; aG[aX] = function() { return "Your browser supports SVG.\nYou are running Rapha\xebl " + this.version }; var w = function(b, i) { var d = be("path"); i.canvas && i.canvas[bh](d); var e = new aR(d, i); e.type = "path"; am(e, { fill: "none", stroke: "#000", path: b }); return e }; var g = function(E, bM, b) { var bJ = "linear", bG = 0.5, S = 0.5, bO = E.style; bM = bA(bM)[bp](aL, function(bQ, i, bR) { bJ = "radial"; if (i && bR) { bG = ai(i); S = ai(bR); var bP = ((S > 0.5) * 2 - 1); bi(bG - 0.5, 2) + bi(S - 0.5, 2) > 0.25 && (S = an.sqrt(0.25 - bi(bG - 0.5, 2)) * bP + 0.5) && S != 0.5 && (S = S.toFixed(5) - 0.00001 * bP) } return aM }); bM = bM[H](/\s*\-\s*/); if (bJ == "linear") { var bF = bM.shift(); bF = -ai(bF); if (isNaN(bF)) { return null } var R = [0, 0, an.cos(bF * an.PI / 180), an.sin(bF * an.PI / 180)], bL = 1 / (l(an.abs(R[2]), an.abs(R[3])) || 1); R[2] *= bL; R[3] *= bL; if (R[2] < 0) { R[0] = -R[2]; R[2] = 0 } if (R[3] < 0) { R[1] = -R[3]; R[3] = 0 } } var bI = v(bM); if (!bI) { return null } var d = E.getAttribute(a1); d = d.match(/^url\(#(.*)\)$/); d && b.defs.removeChild(Z.getElementById(d[1])); var e = be(bJ + "Gradient"); e.id = "r" + (aG._id++)[aX](36); be(e, bJ == "radial" ? { fx: bG, fy: S} : { x1: R[0], y1: R[1], x2: R[2], y2: R[3] }); b.defs[bh](e); for (var bH = 0, bN = bI[r]; bH < bN; bH++) { var bK = be("stop"); be(bK, { offset: bI[bH].offset ? bI[bH].offset : !bH ? "0%" : "100%", "stop-color": bI[bH].color || "#fff" }); e[bh](bK) } be(E, { fill: "url(#" + e.id + ")", opacity: 1, "fill-opacity": 1 }); bO.fill = aM; bO.opacity = 1; bO.fillOpacity = 1; return 1 }; var aa = function(d) { var b = d.getBBox(); be(d.pattern, { patternTransform: aG.format("translate({0},{1})", b.x, b.y) }) }; var am = function(bL, bU) { var bO = { "": [0], none: [0], "-": [3, 1], ".": [1, 1], "-.": [3, 1, 1, 1], "-..": [3, 1, 1, 1, 1, 1], ". ": [1, 3], "- ": [4, 3], "--": [8, 3], "- .": [4, 3, 1, 3], "--.": [8, 3, 1, 3], "--..": [8, 3, 1, 3, 1, 3] }, bQ = bL.node, bM = bL.attrs, bI = bL.rotate(), S = function(b1, b0) { b0 = bO[bE.call(b0)]; if (b0) { var bY = b1.attrs["stroke-width"] || "1", bW = { round: bY, square: bY, butt: 0}[b1.attrs["stroke-linecap"] || bU["stroke-linecap"]] || 0, bZ = []; var bX = b0[r]; while (bX--) { bZ[bX] = b0[bX] * bY + ((bX % 2) ? 1 : -1) * bW } be(bQ, { "stroke-dasharray": bZ[aT](",") }) } }; bU[af]("rotation") && (bI = bU.rotation); var bH = bA(bI)[H](a); if (!(bH.length - 1)) { bH = null } else { bH[1] = +bH[1]; bH[2] = +bH[2] } ai(bI) && bL.rotate(0, true); for (var bP in bU) { if (bU[af](bP)) { if (!p[af](bP)) { continue } var bN = bU[bP]; bM[bP] = bN; switch (bP) { case "blur": bL.blur(bN); break; case "rotation": bL.rotate(bN, true); break; case "href": case "title": case "target": var bS = bQ.parentNode; if (bE.call(bS.tagName) != "a") { var E = be("a"); bS.insertBefore(E, bQ); E[bh](bQ); bS = E } if (bP == "target" && bN == "blank") { bS.setAttributeNS(bL.paper.xlink, "show", "new") } else { bS.setAttributeNS(bL.paper.xlink, bP, bN) } break; case "cursor": bQ.style.cursor = bN; break; case "clip-rect": var d = bA(bN)[H](a); if (d[r] == 4) { bL.clip && bL.clip.parentNode.parentNode.removeChild(bL.clip.parentNode); var e = be("clipPath"), bR = be("rect"); e.id = "r" + (aG._id++)[aX](36); be(bR, { x: d[0], y: d[1], width: d[2], height: d[3] }); e[bh](bR); bL.paper.defs[bh](e); be(bQ, { "clip-path": "url(#" + e.id + ")" }); bL.clip = bR } if (!bN) { var bT = Z.getElementById(bQ.getAttribute("clip-path")[bp](/(^url\(#|\)$)/g, aM)); bT && bT.parentNode.removeChild(bT); be(bQ, { "clip-path": aM }); delete bL.clip } break; case "path": if (bL.type == "path") { be(bQ, { d: bN ? bM.path = x(bN) : "M0,0" }) } break; case "width": bQ[C](bP, bN); if (bM.fx) { bP = "x"; bN = bM.x } else { break } case "x": if (bM.fx) { bN = -bM.x - (bM.width || 0) } case "rx": if (bP == "rx" && bL.type == "rect") { break } case "cx": bH && (bP == "x" || bP == "cx") && (bH[1] += bN - bM[bP]); bQ[C](bP, bN); bL.pattern && aa(bL); break; case "height": bQ[C](bP, bN); if (bM.fy) { bP = "y"; bN = bM.y } else { break } case "y": if (bM.fy) { bN = -bM.y - (bM.height || 0) } case "ry": if (bP == "ry" && bL.type == "rect") { break } case "cy": bH && (bP == "y" || bP == "cy") && (bH[2] += bN - bM[bP]); bQ[C](bP, bN); bL.pattern && aa(bL); break; case "r": if (bL.type == "rect") { be(bQ, { rx: bN, ry: bN }) } else { bQ[C](bP, bN) } break; case "src": if (bL.type == "image") { bQ.setAttributeNS(bL.paper.xlink, "href", bN) } break; case "stroke-width": bQ.style.strokeWidth = bN; bQ[C](bP, bN); if (bM["stroke-dasharray"]) { S(bL, bM["stroke-dasharray"]) } break; case "stroke-dasharray": S(bL, bN); break; case "translation": var bF = bA(bN)[H](a); bF[0] = +bF[0] || 0; bF[1] = +bF[1] || 0; if (bH) { bH[1] += bF[0]; bH[2] += bF[1] } z.call(bL, bF[0], bF[1]); break; case "scale": bF = bA(bN)[H](a); bL.scale(+bF[0] || 1, +bF[1] || +bF[0] || 1, isNaN(ai(bF[2])) ? null : +bF[2], isNaN(ai(bF[3])) ? null : +bF[3]); break; case a1: var R = bA(bN).match(h); if (R) { e = be("pattern"); var bK = be("image"); e.id = "r" + (aG._id++)[aX](36); be(e, { x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1 }); be(bK, { x: 0, y: 0 }); bK.setAttributeNS(bL.paper.xlink, "href", R[1]); e[bh](bK); var bV = Z.createElement("img"); bV.style.cssText = "position:absolute;left:-9999em;top-9999em"; bV.onload = function() { be(e, { width: this.offsetWidth, height: this.offsetHeight }); be(bK, { width: this.offsetWidth, height: this.offsetHeight }); Z.body.removeChild(this); bL.paper.safari() }; Z.body[bh](bV); bV.src = R[1]; bL.paper.defs[bh](e); bQ.style.fill = "url(#" + e.id + ")"; be(bQ, { fill: "url(#" + e.id + ")" }); bL.pattern = e; bL.pattern && aa(bL); break } var i = aG.getRGB(bN); if (!i.error) { delete bU.gradient; delete bM.gradient; !aG.is(bM.opacity, "undefined") && aG.is(bU.opacity, "undefined") && be(bQ, { opacity: bM.opacity }); !aG.is(bM["fill-opacity"], "undefined") && aG.is(bU["fill-opacity"], "undefined") && be(bQ, { "fill-opacity": bM["fill-opacity"] }) } else { if ((({ circle: 1, ellipse: 1 })[af](bL.type) || bA(bN).charAt() != "r") && g(bQ, bN, bL.paper)) { bM.gradient = bN; bM.fill = "none"; break } } i[af]("o") && be(bQ, { "fill-opacity": i.o > 1 ? i.o / 100 : i.o }); case "stroke": i = aG.getRGB(bN); bQ[C](bP, i.hex); bP == "stroke" && i[af]("o") && be(bQ, { "stroke-opacity": i.o > 1 ? i.o / 100 : i.o }); break; case "gradient": (({ circle: 1, ellipse: 1 })[af](bL.type) || bA(bN).charAt() != "r") && g(bQ, bN, bL.paper); break; case "opacity": case "fill-opacity": if (bM.gradient) { var b = Z.getElementById(bQ.getAttribute(a1)[bp](/^url\(#|\)$/g, aM)); if (b) { var bG = b.getElementsByTagName("stop"); bG[bG[r] - 1][C]("stop-opacity", bN) } break } default: bP == "font-size" && (bN = Q(bN, 10) + "px"); var bJ = bP[bp](/(\-.)/g, function(bW) { return bl.call(bW.substring(1)) }); bQ.style[bJ] = bN; bQ[C](bP, bN); break } } } O(bL, bU); if (bH) { bL.rotate(bH.join(aF)) } else { ai(bI) && bL.rotate(bI, true) } }; var n = 1.2, O = function(b, E) { if (b.type != "text" || !(E[af]("text") || E[af]("font") || E[af]("font-size") || E[af]("x") || E[af]("y"))) { return } var bH = b.attrs, d = b.node, bJ = d.firstChild ? Q(Z.defaultView.getComputedStyle(d.firstChild, aM).getPropertyValue("font-size"), 10) : 10; if (E[af]("text")) { bH.text = E.text; while (d.firstChild) { d.removeChild(d.firstChild) } var e = bA(E.text)[H]("\n"); for (var R = 0, bI = e[r]; R < bI; R++) { if (e[R]) { var bF = be("tspan"); R && be(bF, { dy: bJ * n, x: bH.x }); bF[bh](Z.createTextNode(e[R])); d[bh](bF) } } } else { e = d.getElementsByTagName("tspan"); for (R = 0, bI = e[r]; R < bI; R++) { R && be(e[R], { dy: bJ * n, x: bH.x }) } } be(d, { y: bH.y }); var S = b.getBBox(), bG = bH.y - (S.y + S.height / 2); bG && isFinite(bG) && be(d, { y: bH.y + bG }) }, aR = function(d, b) { var i = 0, e = 0; this[0] = d; this.id = aG._oid++; this.node = d; d.raphael = this; this.paper = b; this.attrs = this.attrs || {}; this.transformations = []; this._ = { tx: 0, ty: 0, rt: { deg: 0, cx: 0, cy: 0 }, sx: 1, sy: 1 }; !b.bottom && (b.bottom = this); this.prev = b.top; b.top && (b.top.next = this); b.top = this; this.next = null }; var a9 = aR[bC]; aR[bC].rotate = function(d, b, i) { if (this.removed) { return this } if (d == null) { if (this._.rt.cx) { return [this._.rt.deg, this._.rt.cx, this._.rt.cy][aT](aF) } return this._.rt.deg } var e = this.getBBox(); d = bA(d)[H](a); if (d[r] - 1) { b = ai(d[1]); i = ai(d[2]) } d = ai(d[0]); if (b != null && b !== false) { this._.rt.deg = d } else { this._.rt.deg += d } (i == null) && (b = null); this._.rt.cx = b; this._.rt.cy = i; b = b == null ? e.x + e.width / 2 : b; i = i == null ? e.y + e.height / 2 : i; if (this._.rt.deg) { this.transformations[0] = aG.format("rotate({0} {1} {2})", this._.rt.deg, b, i); this.clip && be(this.clip, { transform: aG.format("rotate({0} {1} {2})", -this._.rt.deg, b, i) }) } else { this.transformations[0] = aM; this.clip && be(this.clip, { transform: aM }) } be(this.node, { transform: this.transformations[aT](aF) }); return this }; aR[bC].hide = function() { !this.removed && (this.node.style.display = "none"); return this }; aR[bC].show = function() { !this.removed && (this.node.style.display = ""); return this }; aR[bC].remove = function() { if (this.removed) { return } aC(this, this.paper); this.node.parentNode.removeChild(this.node); for (var b in this) { delete this[b] } this.removed = true }; aR[bC].getBBox = function() { if (this.removed) { return this } if (this.type == "path") { return ah(this.attrs.path) } if (this.node.style.display == "none") { this.show(); var d = true } var bF = {}; try { bF = this.node.getBBox() } catch (R) { } finally { bF = bF || {} } if (this.type == "text") { bF = { x: bF.x, y: Infinity, width: 0, height: 0 }; for (var b = 0, E = this.node.getNumberOfChars(); b < E; b++) { var S = this.node.getExtentOfChar(b); (S.y < bF.y) && (bF.y = S.y); (S.y + S.height - bF.y > bF.height) && (bF.height = S.y + S.height - bF.y); (S.x + S.width - bF.x > bF.width) && (bF.width = S.x + S.width - bF.x) } } d && this.hide(); return bF }; aR[bC].attr = function(b, bH) { if (this.removed) { return this } if (b == null) { var bG = {}; for (var R in this.attrs) { if (this.attrs[af](R)) { bG[R] = this.attrs[R] } } this._.rt.deg && (bG.rotation = this.rotate()); (this._.sx != 1 || this._.sy != 1) && (bG.scale = this.scale()); bG.gradient && bG.fill == "none" && (bG.fill = bG.gradient) && delete bG.gradient; return bG } if (bH == null && aG.is(b, ae)) { if (b == "translation") { return z.call(this) } if (b == "rotation") { return this.rotate() } if (b == "scale") { return this.scale() } if (b == a1 && this.attrs.fill == "none" && this.attrs.gradient) { return this.attrs.gradient } return this.attrs[b] } if (bH == null && aG.is(b, a4)) { var bJ = {}; for (var E = 0, S = b.length; E < S; E++) { bJ[b[E]] = this.attr(b[E]) } return bJ } if (bH != null) { var d = {}; d[b] = bH } else { if (b != null && aG.is(b, "object")) { d = b } } for (var bI in this.paper.customAttributes) { if (this.paper.customAttributes[af](bI) && d[af](bI) && aG.is(this.paper.customAttributes[bI], "function")) { var bF = this.paper.customAttributes[bI].apply(this, [][bt](d[bI])); this.attrs[bI] = d[bI]; for (var e in bF) { if (bF[af](e)) { d[e] = bF[e] } } } } am(this, d); return this }; aR[bC].toFront = function() { if (this.removed) { return this } this.node.parentNode[bh](this.node); var b = this.paper; b.top != this && ak(this, b); return this }; aR[bC].toBack = function() { if (this.removed) { return this } if (this.node.parentNode.firstChild != this.node) { this.node.parentNode.insertBefore(this.node, this.node.parentNode.firstChild); o(this, this.paper); var b = this.paper } return this }; aR[bC].insertAfter = function(b) { if (this.removed) { return this } var d = b.node || b[b.length - 1].node; if (d.nextSibling) { d.parentNode.insertBefore(this.node, d.nextSibling) } else { d.parentNode[bh](this.node) } I(this, b, this.paper); return this }; aR[bC].insertBefore = function(b) { if (this.removed) { return this } var d = b.node || b[0].node; d.parentNode.insertBefore(this.node, d); aJ(this, b, this.paper); return this }; aR[bC].blur = function(d) { var b = this; if (+d !== 0) { var e = be("filter"), i = be("feGaussianBlur"); b.attrs.blur = d; e.id = "r" + (aG._id++)[aX](36); be(i, { stdDeviation: +d || 1.5 }); e.appendChild(i); b.paper.defs.appendChild(e); b._blur = e; be(b.node, { filter: "url(#" + e.id + ")" }) } else { if (b._blur) { b._blur.parentNode.removeChild(b._blur); delete b._blur; delete b.attrs.blur } b.node.removeAttribute("filter") } }; var ad = function(d, b, R, E) { var i = be("circle"); d.canvas && d.canvas[bh](i); var e = new aR(i, d); e.attrs = { cx: b, cy: R, r: E, fill: "none", stroke: "#000" }; e.type = "circle"; be(i, e.attrs); return e }, a8 = function(e, b, bF, d, R, S) { var E = be("rect"); e.canvas && e.canvas[bh](E); var i = new aR(E, e); i.attrs = { x: b, y: bF, width: d, height: R, r: S || 0, rx: S || 0, ry: S || 0, fill: "none", stroke: "#000" }; i.type = "rect"; be(E, i.attrs); return i }, ax = function(d, b, S, R, E) { var i = be("ellipse"); d.canvas && d.canvas[bh](i); var e = new aR(i, d); e.attrs = { cx: b, cy: S, rx: R, ry: E, fill: "none", stroke: "#000" }; e.type = "ellipse"; be(i, e.attrs); return e }, u = function(e, S, b, bF, d, R) { var E = be("image"); be(E, { x: b, y: bF, width: d, height: R, preserveAspectRatio: "none" }); E.setAttributeNS(e.xlink, "href", S); e.canvas && e.canvas[bh](E); var i = new aR(E, e); i.attrs = { x: b, y: bF, width: d, height: R, src: S }; i.type = "image"; return i }, aj = function(d, b, R, E) { var i = be("text"); be(i, { x: b, y: R, "text-anchor": "middle" }); d.canvas && d.canvas[bh](i); var e = new aR(i, d); e.attrs = { x: b, y: R, "text-anchor": "middle", text: E, font: p.font, stroke: "none", fill: "#000" }; e.type = "text"; am(e, e.attrs); return e }, by = function(d, b) { this.width = d || this.width; this.height = b || this.height; this.canvas[C]("width", this.width); this.canvas[C]("height", this.height); return this }, D = function() { var i = aH[bz](0, arguments), e = i && i.container, d = i.x, S = i.y, E = i.width, b = i.height; if (!e) { throw new Error("SVG container not found.") } var R = be("svg"); d = d || 0; S = S || 0; E = E || 512; b = b || 342; be(R, { xmlns: "http://www.w3.org/2000/svg", version: 1.1, width: E, height: b }); if (e == 1) { R.style.cssText = "position:absolute;left:" + d + "px;top:" + S + "px"; Z.body[bh](R) } else { if (e.firstChild) { e.insertBefore(R, e.firstChild) } else { e[bh](R) } } e = new bw; e.width = E; e.height = b; e.canvas = R; bb.call(e, e, aG.fn); e.clear(); return e }; aW.clear = function() { var b = this.canvas; while (b.firstChild) { b.removeChild(b.firstChild) } this.bottom = this.top = null; (this.desc = be("desc"))[bh](Z.createTextNode("Created with Rapha\xebl")); b[bh](this.desc); b[bh](this.defs = be("defs")) }; aW.remove = function() { this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); for (var b in this) { this[b] = y(b) } } } if (aG.vml) { var M = { M: "m", L: "l", C: "c", Z: "x", m: "t", l: "r", c: "v", z: "x" }, aK = /([clmz]),?([^clmz]*)/gi, bu = / progid:\S+Blur\([^\)]+\)/g, bD = /-?[^,\s-]+/g, aU = 1000 + aF + 1000, t = 10, s = { path: 1, rect: 1 }, bd = function(bJ) { var bG = /[ahqstv]/ig, e = x; bA(bJ).match(bG) && (e = U); bG = /[clmz]/g; if (e == x && !bA(bJ).match(bG)) { var bF = bA(bJ)[bp](aK, function(bM, bO, bK) { var bN = [], i = bE.call(bO) == "m", bL = M[bO]; bK[bp](bD, function(bP) { if (i && bN[r] == 2) { bL += bN + M[bO == "m" ? "l" : "L"]; bN = [] } bN[j](ac(bP * t)) }); return bL + bN }); return bF } var bH = e(bJ), d, b; bF = []; for (var R = 0, bI = bH[r]; R < bI; R++) { d = bH[R]; b = bE.call(bH[R][0]); b == "z" && (b = "x"); for (var E = 1, S = d[r]; E < S; E++) { b += ac(d[E] * t) + (E != S - 1 ? "," : aM) } bF[j](b) } return bF[aT](aF) }; aG[aX] = function() { return "Your browser doesn\u2019t support SVG. Falling down to VML.\nYou are running Rapha\xebl " + this.version }; w = function(e, d) { var R = aw("group"); R.style.cssText = "position:absolute;left:0;top:0;width:" + d.width + "px;height:" + d.height + "px"; R.coordsize = d.coordsize; R.coordorigin = d.coordorigin; var E = aw("shape"), i = E.style; i.width = d.width + "px"; i.height = d.height + "px"; E.coordsize = aU; E.coordorigin = d.coordorigin; R[bh](E); var S = new aR(E, R, d), b = { fill: "none", stroke: "#000" }; e && (b.path = e); S.type = "path"; S.path = []; S.Path = aM; am(S, b); d.canvas[bh](R); return S }; am = function(bH, bO) { bH.attrs = bH.attrs || {}; var bL = bH.node, bP = bH.attrs, S = bL.style, i, bN = (bO.x != bP.x || bO.y != bP.y || bO.width != bP.width || bO.height != bP.height || bO.r != bP.r) && bH.type == "rect", bT = bH; for (var bF in bO) { if (bO[af](bF)) { bP[bF] = bO[bF] } } if (bN) { bP.path = aq(bP.x, bP.y, bP.width, bP.height, bP.r); bH.X = bP.x; bH.Y = bP.y; bH.W = bP.width; bH.H = bP.height } bO.href && (bL.href = bO.href); bO.title && (bL.title = bO.title); bO.target && (bL.target = bO.target); bO.cursor && (S.cursor = bO.cursor); "blur" in bO && bH.blur(bO.blur); if (bO.path && bH.type == "path" || bN) { bL.path = bd(bP.path) } if (bO.rotation != null) { bH.rotate(bO.rotation, true) } if (bO.translation) { i = bA(bO.translation)[H](a); z.call(bH, i[0], i[1]); if (bH._.rt.cx != null) { bH._.rt.cx += +i[0]; bH._.rt.cy += +i[1]; bH.setBox(bH.attrs, i[0], i[1]) } } if (bO.scale) { i = bA(bO.scale)[H](a); bH.scale(+i[0] || 1, +i[1] || +i[0] || 1, +i[2] || null, +i[3] || null) } if ("clip-rect" in bO) { var b = bA(bO["clip-rect"])[H](a); if (b[r] == 4) { b[2] = +b[2] + (+b[0]); b[3] = +b[3] + (+b[1]); var bG = bL.clipRect || Z.createElement("div"), bS = bG.style, R = bL.parentNode; bS.clip = aG.format("rect({1}px {2}px {3}px {0}px)", b); if (!bL.clipRect) { bS.position = "absolute"; bS.top = 0; bS.left = 0; bS.width = bH.paper.width + "px"; bS.height = bH.paper.height + "px"; R.parentNode.insertBefore(bG, R); bG[bh](R); bL.clipRect = bG } } if (!bO["clip-rect"]) { bL.clipRect && (bL.clipRect.style.clip = aM) } } if (bH.type == "image" && bO.src) { bL.src = bO.src } if (bH.type == "image" && bO.opacity) { bL.filterOpacity = a2 + ".Alpha(opacity=" + (bO.opacity * 100) + ")"; S.filter = (bL.filterMatrix || aM) + (bL.filterOpacity || aM) } bO.font && (S.font = bO.font); bO["font-family"] && (S.fontFamily = '"' + bO["font-family"][H](",")[0][bp](/^['"]+|['"]+$/g, aM) + '"'); bO["font-size"] && (S.fontSize = bO["font-size"]); bO["font-weight"] && (S.fontWeight = bO["font-weight"]); bO["font-style"] && (S.fontStyle = bO["font-style"]); if (bO.opacity != null || bO["stroke-width"] != null || bO.fill != null || bO.stroke != null || bO["stroke-width"] != null || bO["stroke-opacity"] != null || bO["fill-opacity"] != null || bO["stroke-dasharray"] != null || bO["stroke-miterlimit"] != null || bO["stroke-linejoin"] != null || bO["stroke-linecap"] != null) { bL = bH.shape || bL; var bM = (bL.getElementsByTagName(a1) && bL.getElementsByTagName(a1)[0]), bQ = false; !bM && (bQ = bM = aw(a1)); if ("fill-opacity" in bO || "opacity" in bO) { var d = ((+bP["fill-opacity"] + 1 || 2) - 1) * ((+bP.opacity + 1 || 2) - 1) * ((+aG.getRGB(bO.fill).o + 1 || 2) - 1); d = bf(l(d, 0), 1); bM.opacity = d } bO.fill && (bM.on = true); if (bM.on == null || bO.fill == "none") { bM.on = false } if (bM.on && bO.fill) { var e = bO.fill.match(h); if (e) { bM.src = e[1]; bM.type = "tile" } else { bM.color = aG.getRGB(bO.fill).hex; bM.src = aM; bM.type = "solid"; if (aG.getRGB(bO.fill).error && (bT.type in { circle: 1, ellipse: 1} || bA(bO.fill).charAt() != "r") && g(bT, bO.fill)) { bP.fill = "none"; bP.gradient = bO.fill } } } bQ && bL[bh](bM); var E = (bL.getElementsByTagName("stroke") && bL.getElementsByTagName("stroke")[0]), bR = false; !E && (bR = E = aw("stroke")); if ((bO.stroke && bO.stroke != "none") || bO["stroke-width"] || bO["stroke-opacity"] != null || bO["stroke-dasharray"] || bO["stroke-miterlimit"] || bO["stroke-linejoin"] || bO["stroke-linecap"]) { E.on = true } (bO.stroke == "none" || E.on == null || bO.stroke == 0 || bO["stroke-width"] == 0) && (E.on = false); var bK = aG.getRGB(bO.stroke); E.on && bO.stroke && (E.color = bK.hex); d = ((+bP["stroke-opacity"] + 1 || 2) - 1) * ((+bP.opacity + 1 || 2) - 1) * ((+bK.o + 1 || 2) - 1); var bI = (ai(bO["stroke-width"]) || 1) * 0.75; d = bf(l(d, 0), 1); bO["stroke-width"] == null && (bI = bP["stroke-width"]); bO["stroke-width"] && (E.weight = bI); bI && bI < 1 && (d *= bI) && (E.weight = 1); E.opacity = d; bO["stroke-linejoin"] && (E.joinstyle = bO["stroke-linejoin"] || "miter"); E.miterlimit = bO["stroke-miterlimit"] || 8; bO["stroke-linecap"] && (E.endcap = bO["stroke-linecap"] == "butt" ? "flat" : bO["stroke-linecap"] == "square" ? "square" : "round"); if (bO["stroke-dasharray"]) { var bJ = { "-": "shortdash", ".": "shortdot", "-.": "shortdashdot", "-..": "shortdashdotdot", ". ": "dot", "- ": "dash", "--": "longdash", "- .": "dashdot", "--.": "longdashdot", "--..": "longdashdotdot" }; E.dashstyle = bJ[af](bO["stroke-dasharray"]) ? bJ[bO["stroke-dasharray"]] : aM } bR && bL[bh](E) } if (bT.type == "text") { S = bT.paper.span.style; bP.font && (S.font = bP.font); bP["font-family"] && (S.fontFamily = bP["font-family"]); bP["font-size"] && (S.fontSize = bP["font-size"]); bP["font-weight"] && (S.fontWeight = bP["font-weight"]); bP["font-style"] && (S.fontStyle = bP["font-style"]); bT.node.string && (bT.paper.span.innerHTML = bA(bT.node.string)[bp](/</g, "&#60;")[bp](/&/g, "&#38;")[bp](/\n/g, "<br>")); bT.W = bP.w = bT.paper.span.offsetWidth; bT.H = bP.h = bT.paper.span.offsetHeight; bT.X = bP.x; bT.Y = bP.y + ac(bT.H / 2); switch (bP["text-anchor"]) { case "start": bT.node.style["v-text-align"] = "left"; bT.bbx = ac(bT.W / 2); break; case "end": bT.node.style["v-text-align"] = "right"; bT.bbx = -ac(bT.W / 2); break; default: bT.node.style["v-text-align"] = "center"; break } } }; g = function(b, bF) { b.attrs = b.attrs || {}; var bG = b.attrs, bI, R = "linear", S = ".5 .5"; b.attrs.gradient = bF; bF = bA(bF)[bp](aL, function(bK, bL, i) { R = "radial"; if (bL && i) { bL = ai(bL); i = ai(i); bi(bL - 0.5, 2) + bi(i - 0.5, 2) > 0.25 && (i = an.sqrt(0.25 - bi(bL - 0.5, 2)) * ((i > 0.5) * 2 - 1) + 0.5); S = bL + aF + i } return aM }); bF = bF[H](/\s*\-\s*/); if (R == "linear") { var d = bF.shift(); d = -ai(d); if (isNaN(d)) { return null } } var E = v(bF); if (!E) { return null } b = b.shape || b.node; bI = b.getElementsByTagName(a1)[0] || aw(a1); !bI.parentNode && b.appendChild(bI); if (E[r]) { bI.on = true; bI.method = "none"; bI.color = E[0].color; bI.color2 = E[E[r] - 1].color; var bJ = []; for (var e = 0, bH = E[r]; e < bH; e++) { E[e].offset && bJ[j](E[e].offset + aF + E[e].color) } bI.colors && (bI.colors.value = bJ[r] ? bJ[aT]() : "0% " + bI.color); if (R == "radial") { bI.type = "gradientradial"; bI.focus = "100%"; bI.focussize = S; bI.focusposition = S } else { bI.type = "gradient"; bI.angle = (270 - d) % 360 } } return 1 }; aR = function(E, S, b) { var R = 0, e = 0, d = 0, i = 1; this[0] = E; this.id = aG._oid++; this.node = E; E.raphael = this; this.X = 0; this.Y = 0; this.attrs = {}; this.Group = S; this.paper = b; this._ = { tx: 0, ty: 0, rt: { deg: 0 }, sx: 1, sy: 1 }; !b.bottom && (b.bottom = this); this.prev = b.top; b.top && (b.top.next = this); b.top = this; this.next = null }; a9 = aR[bC]; a9.rotate = function(d, b, e) { if (this.removed) { return this } if (d == null) { if (this._.rt.cx) { return [this._.rt.deg, this._.rt.cx, this._.rt.cy][aT](aF) } return this._.rt.deg } d = bA(d)[H](a); if (d[r] - 1) { b = ai(d[1]); e = ai(d[2]) } d = ai(d[0]); if (b != null) { this._.rt.deg = d } else { this._.rt.deg += d } e == null && (b = null); this._.rt.cx = b; this._.rt.cy = e; this.setBox(this.attrs, b, e); this.Group.style.rotation = this._.rt.deg; return this }; a9.setBox = function(E, R, e) { if (this.removed) { return this } var b = this.Group.style, S = (this.shape && this.shape.style) || this.node.style; E = E || {}; for (var bF in E) { if (E[af](bF)) { this.attrs[bF] = E[bF] } } R = R || this._.rt.cx; e = e || this._.rt.cy; var bI = this.attrs, bL, bK, bM, bH; switch (this.type) { case "circle": bL = bI.cx - bI.r; bK = bI.cy - bI.r; bM = bH = bI.r * 2; break; case "ellipse": bL = bI.cx - bI.rx; bK = bI.cy - bI.ry; bM = bI.rx * 2; bH = bI.ry * 2; break; case "image": bL = +bI.x; bK = +bI.y; bM = bI.width || 0; bH = bI.height || 0; break; case "text": this.textpath.v = ["m", ac(bI.x), ", ", ac(bI.y - 2), "l", ac(bI.x) + 1, ", ", ac(bI.y - 2)][aT](aM); bL = bI.x - ac(this.W / 2); bK = bI.y - this.H / 2; bM = this.W; bH = this.H; break; case "rect": case "path": if (!this.attrs.path) { bL = 0; bK = 0; bM = this.paper.width; bH = this.paper.height } else { var bG = ah(this.attrs.path); bL = bG.x; bK = bG.y; bM = bG.width; bH = bG.height } break; default: bL = 0; bK = 0; bM = this.paper.width; bH = this.paper.height; break } R = (R == null) ? bL + bM / 2 : R; e = (e == null) ? bK + bH / 2 : e; var d = R - this.paper.width / 2, bJ = e - this.paper.height / 2, bN; b.left != (bN = d + "px") && (b.left = bN); b.top != (bN = bJ + "px") && (b.top = bN); this.X = s[af](this.type) ? -d : bL; this.Y = s[af](this.type) ? -bJ : bK; this.W = bM; this.H = bH; if (s[af](this.type)) { S.left != (bN = -d * t + "px") && (S.left = bN); S.top != (bN = -bJ * t + "px") && (S.top = bN) } else { if (this.type == "text") { S.left != (bN = -d + "px") && (S.left = bN); S.top != (bN = -bJ + "px") && (S.top = bN) } else { b.width != (bN = this.paper.width + "px") && (b.width = bN); b.height != (bN = this.paper.height + "px") && (b.height = bN); S.left != (bN = bL - d + "px") && (S.left = bN); S.top != (bN = bK - bJ + "px") && (S.top = bN); S.width != (bN = bM + "px") && (S.width = bN); S.height != (bN = bH + "px") && (S.height = bN) } } }; a9.hide = function() { !this.removed && (this.Group.style.display = "none"); return this }; a9.show = function() { !this.removed && (this.Group.style.display = "block"); return this }; a9.getBBox = function() { if (this.removed) { return this } if (s[af](this.type)) { return ah(this.attrs.path) } return { x: this.X + (this.bbx || 0), y: this.Y, width: this.W, height: this.H} }; a9.remove = function() { if (this.removed) { return } aC(this, this.paper); this.node.parentNode.removeChild(this.node); this.Group.parentNode.removeChild(this.Group); this.shape && this.shape.parentNode.removeChild(this.shape); for (var b in this) { delete this[b] } this.removed = true }; a9.attr = function(b, bF) { if (this.removed) { return this } if (b == null) { var S = {}; for (var E in this.attrs) { if (this.attrs[af](E)) { S[E] = this.attrs[E] } } this._.rt.deg && (S.rotation = this.rotate()); (this._.sx != 1 || this._.sy != 1) && (S.scale = this.scale()); S.gradient && S.fill == "none" && (S.fill = S.gradient) && delete S.gradient; return S } if (bF == null && aG.is(b, "string")) { if (b == "translation") { return z.call(this) } if (b == "rotation") { return this.rotate() } if (b == "scale") { return this.scale() } if (b == a1 && this.attrs.fill == "none" && this.attrs.gradient) { return this.attrs.gradient } return this.attrs[b] } if (this.attrs && bF == null && aG.is(b, a4)) { var bI, bH = {}; for (E = 0, bI = b[r]; E < bI; E++) { bH[b[E]] = this.attr(b[E]) } return bH } var d; if (bF != null) { d = {}; d[b] = bF } bF == null && aG.is(b, "object") && (d = b); if (d) { for (var bG in this.paper.customAttributes) { if (this.paper.customAttributes[af](bG) && d[af](bG) && aG.is(this.paper.customAttributes[bG], "function")) { var R = this.paper.customAttributes[bG].apply(this, [][bt](d[bG])); this.attrs[bG] = d[bG]; for (var e in R) { if (R[af](e)) { d[e] = R[e] } } } } if (d.text && this.type == "text") { this.node.string = d.text } am(this, d); if (d.gradient && (({ circle: 1, ellipse: 1 })[af](this.type) || bA(d.gradient).charAt() != "r")) { g(this, d.gradient) } (!s[af](this.type) || this._.rt.deg) && this.setBox(this.attrs) } return this }; a9.toFront = function() { !this.removed && this.Group.parentNode[bh](this.Group); this.paper.top != this && ak(this, this.paper); return this }; a9.toBack = function() { if (this.removed) { return this } if (this.Group.parentNode.firstChild != this.Group) { this.Group.parentNode.insertBefore(this.Group, this.Group.parentNode.firstChild); o(this, this.paper) } return this }; a9.insertAfter = function(b) { if (this.removed) { return this } if (b.constructor == ag) { b = b[b.length - 1] } if (b.Group.nextSibling) { b.Group.parentNode.insertBefore(this.Group, b.Group.nextSibling) } else { b.Group.parentNode[bh](this.Group) } I(this, b, this.paper); return this }; a9.insertBefore = function(b) { if (this.removed) { return this } if (b.constructor == ag) { b = b[0] } b.Group.parentNode.insertBefore(this.Group, b.Group); aJ(this, b, this.paper); return this }; a9.blur = function(b) { var d = this.node.runtimeStyle, e = d.filter; e = e.replace(bu, aM); if (+b !== 0) { this.attrs.blur = b; d.filter = e + aF + a2 + ".Blur(pixelradius=" + (+b || 1.5) + ")"; d.margin = aG.format("-{0}px 0 0 -{0}px", ac(+b || 1.5)) } else { d.filter = e; d.margin = 0; delete this.attrs.blur } }; ad = function(d, b, bF, R) { var E = aw("group"), S = aw("oval"), e = S.style; E.style.cssText = "position:absolute;left:0;top:0;width:" + d.width + "px;height:" + d.height + "px"; E.coordsize = aU; E.coordorigin = d.coordorigin; E[bh](S); var i = new aR(S, E, d); i.type = "circle"; am(i, { stroke: "#000", fill: "none" }); i.attrs.cx = b; i.attrs.cy = bF; i.attrs.r = R; i.setBox({ x: b - R, y: bF - R, width: R * 2, height: R * 2 }); d.canvas[bh](E); return i }; function aq(b, E, d, e, i) { if (i) { return aG.format("M{0},{1}l{2},0a{3},{3},0,0,1,{3},{3}l0,{5}a{3},{3},0,0,1,{4},{3}l{6},0a{3},{3},0,0,1,{4},{4}l0,{7}a{3},{3},0,0,1,{3},{4}z", b + i, E, d - i * 2, i, -i, e - i * 2, i * 2 - d, i * 2 - e) } else { return aG.format("M{0},{1}l{2},0,0,{3},{4},0z", b, E, d, e, -d) } } a8 = function(d, S, E, bF, e, b) { var bG = aq(S, E, bF, e, b), i = d.path(bG), R = i.attrs; i.X = R.x = S; i.Y = R.y = E; i.W = R.width = bF; i.H = R.height = e; R.r = b; R.path = bG; i.type = "rect"; return i }; ax = function(b, bG, bF, e, d) { var E = aw("group"), i = aw("oval"), S = i.style; E.style.cssText = "position:absolute;left:0;top:0;width:" + b.width + "px;height:" + b.height + "px"; E.coordsize = aU; E.coordorigin = b.coordorigin; E[bh](i); var R = new aR(i, E, b); R.type = "ellipse"; am(R, { stroke: "#000" }); R.attrs.cx = bG; R.attrs.cy = bF; R.attrs.rx = e; R.attrs.ry = d; R.setBox({ x: bG - e, y: bF - d, width: e * 2, height: d * 2 }); b.canvas[bh](E); return R }; u = function(d, b, bF, S, bG, i) { var E = aw("group"), e = aw("image"); E.style.cssText = "position:absolute;left:0;top:0;width:" + d.width + "px;height:" + d.height + "px"; E.coordsize = aU; E.coordorigin = d.coordorigin; e.src = b; E[bh](e); var R = new aR(e, E, d); R.type = "image"; R.attrs.src = b; R.attrs.x = bF; R.attrs.y = S; R.attrs.w = bG; R.attrs.h = i; R.setBox({ x: bF, y: S, width: bG, height: i }); d.canvas[bh](E); return R }; aj = function(d, bG, bF, bH) { var E = aw("group"), i = aw("shape"), S = i.style, bI = aw("path"), b = bI.style, e = aw("textpath"); E.style.cssText = "position:absolute;left:0;top:0;width:" + d.width + "px;height:" + d.height + "px"; E.coordsize = aU; E.coordorigin = d.coordorigin; bI.v = aG.format("m{0},{1}l{2},{1}", ac(bG * 10), ac(bF * 10), ac(bG * 10) + 1); bI.textpathok = true; S.width = d.width; S.height = d.height; e.string = bA(bH); e.on = true; i[bh](e); i[bh](bI); E[bh](i); var R = new aR(e, E, d); R.shape = i; R.textpath = bI; R.type = "text"; R.attrs.text = bH; R.attrs.x = bG; R.attrs.y = bF; R.attrs.w = 1; R.attrs.h = 1; am(R, { font: p.font, stroke: "none", fill: "#000" }); R.setBox(); d.canvas[bh](E); return R }; by = function(e, b) { var d = this.canvas.style; e == +e && (e += "px"); b == +b && (b += "px"); d.width = e; d.height = b; d.clip = "rect(0 " + e + " " + b + " 0)"; return this }; var aw; Z.createStyleSheet().addRule(".rvml", "behavior:url(#default#VML)"); try { !Z.namespaces.rvml && Z.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); aw = function(b) { return Z.createElement("<rvml:" + b + ' class="rvml">') } } catch (au) { aw = function(b) { return Z.createElement("<" + b + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">') } } D = function() { var e = aH[bz](0, arguments), b = e.container, bG = e.height, bH, d = e.width, bF = e.x, S = e.y; if (!b) { throw new Error("VML container not found.") } var E = new bw, R = E.canvas = Z.createElement("div"), i = R.style; bF = bF || 0; S = S || 0; d = d || 512; bG = bG || 342; d == +d && (d += "px"); bG == +bG && (bG += "px"); E.width = 1000; E.height = 1000; E.coordsize = t * 1000 + aF + t * 1000; E.coordorigin = "0 0"; E.span = Z.createElement("span"); E.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; R[bh](E.span); i.cssText = aG.format("top:0;left:0;width:{0};height:{1};display:inline-block;position:relative;clip:rect(0 {0} {1} 0);overflow:hidden", d, bG); if (b == 1) { Z.body[bh](R); i.left = bF + "px"; i.top = S + "px"; i.position = "absolute" } else { if (b.firstChild) { b.insertBefore(R, b.firstChild) } else { b[bh](R) } } bb.call(E, E, aG.fn); return E }; aW.clear = function() { this.canvas.innerHTML = aM; this.span = Z.createElement("span"); this.span.style.cssText = "position:absolute;left:-9999em;top:-9999em;padding:0;margin:0;line-height:1;display:inline;"; this.canvas[bh](this.span); this.bottom = this.top = null }; aW.remove = function() { this.canvas.parentNode.removeChild(this.canvas); for (var b in this) { this[b] = y(b) } return true } } var T = navigator.userAgent.match(/Version\/(.*?)\s/); if ((navigator.vendor == "Apple Computer, Inc.") && (T && T[1] < 4 || navigator.platform.slice(0, 2) == "iP")) { aW.safari = function() { var b = this.rect(-99, -99, this.width + 99, this.height + 99).attr({ stroke: "none" }); aN.setTimeout(function() { b.remove() }) } } else { aW.safari = function() { } } var N = function() { this.returnValue = false }, bs = function() { return this.originalEvent.preventDefault() }, a0 = function() { this.cancelBubble = true }, aB = function() { return this.originalEvent.stopPropagation() }, at = (function() { if (Z.addEventListener) { return function(R, i, e, d) { var b = V && bn[i] ? bn[i] : i; var E = function(bH) { if (V && bn[af](i)) { for (var bF = 0, bG = bH.targetTouches && bH.targetTouches.length; bF < bG; bF++) { if (bH.targetTouches[bF].target == R) { var S = bH; bH = bH.targetTouches[bF]; bH.originalEvent = S; bH.preventDefault = bs; bH.stopPropagation = aB; break } } } return e.call(d, bH) }; R.addEventListener(b, E, false); return function() { R.removeEventListener(b, E, false); return true } } } else { if (Z.attachEvent) { return function(R, i, e, d) { var E = function(S) { S = S || aN.event; S.preventDefault = S.preventDefault || N; S.stopPropagation = S.stopPropagation || a0; return e.call(d, S) }; R.attachEvent("on" + i, E); var b = function() { R.detachEvent("on" + i, E); return true }; return b } } } })(), a5 = [], bo = function(S) { var bG = S.clientX, bF = S.clientY, bH = Z.documentElement.scrollTop || Z.body.scrollTop, bI = Z.documentElement.scrollLeft || Z.body.scrollLeft, b, d = a5.length; while (d--) { b = a5[d]; if (V) { var R = S.touches.length, E; while (R--) { E = S.touches[R]; if (E.identifier == b.el._drag.id) { bG = E.clientX; bF = E.clientY; (S.originalEvent ? S.originalEvent : S).preventDefault(); break } } } else { S.preventDefault() } bG += bI; bF += bH; b.move && b.move.call(b.el, bG - b.el._drag.x, bF - b.el._drag.y, bG, bF) } }, f = function() { aG.unmousemove(bo).unmouseup(f); var d = a5.length, b; while (d--) { b = a5[d]; b.el._drag = {}; b.end && b.end.call(b.el) } a5 = [] }; for (var ap = P[r]; ap--; ) { (function(b) { aG[b] = aR[bC][b] = function(d) { if (aG.is(d, "function")) { this.events = this.events || []; this.events.push({ name: b, f: d, unbind: at(this.shape || this.node || Z, b, d, this) }) } return this }; aG["un" + b] = aR[bC]["un" + b] = function(i) { var e = this.events, d = e[r]; while (d--) { if (e[d].name == b && e[d].f == i) { e[d].unbind(); e.splice(d, 1); !e.length && delete this.events; return this } } return this } })(P[ap]) } a9.hover = function(d, b) { return this.mouseover(d).mouseout(b) }; a9.unhover = function(d, b) { return this.unmouseover(d).unmouseout(b) }; a9.drag = function(b, e, d) { this._drag = {}; this.mousedown(function(E) { (E.originalEvent || E).preventDefault(); var i = Z.documentElement.scrollTop || Z.body.scrollTop, R = Z.documentElement.scrollLeft || Z.body.scrollLeft; this._drag.x = E.clientX + R; this._drag.y = E.clientY + i; this._drag.id = E.identifier; e && e.call(this, E.clientX + R, E.clientY + i); !a5.length && aG.mousemove(bo).mouseup(f); a5.push({ el: this, move: b, end: d }) }); return this }; a9.undrag = function(b, E, e) { var d = a5.length; while (d--) { a5[d].el == this && (a5[d].move == b && a5[d].end == e) && a5.splice(d, 1); !a5.length && aG.unmousemove(bo).unmouseup(f) } }; aW.circle = function(b, e, d) { return ad(this, b || 0, e || 0, d || 0) }; aW.rect = function(b, E, d, e, i) { return a8(this, b || 0, E || 0, d || 0, e || 0, i || 0) }; aW.ellipse = function(b, i, e, d) { return ax(this, b || 0, i || 0, e || 0, d || 0) }; aW.path = function(b) { b && !aG.is(b, ae) && !aG.is(b[0], a4) && (b += aM); return w(aG.format[bz](aG, arguments), this) }; aW.image = function(i, b, E, d, e) { return u(this, i || "about:blank", b || 0, E || 0, d || 0, e || 0) }; aW.text = function(b, e, d) { return aj(this, b || 0, e || 0, bA(d)) }; aW.set = function(b) { arguments[r] > 1 && (b = Array[bC].splice.call(arguments, 0, arguments[r])); return new ag(b) }; aW.setSize = by; aW.top = aW.bottom = null; aW.raphael = aG; function B() { return this.x + aF + this.y } a9.resetScale = function() { if (this.removed) { return this } this._.sx = 1; this._.sy = 1; this.attrs.scale = "1 1" }; a9.scale = function(bK, bJ, e, d) { if (this.removed) { return this } if (bK == null && bJ == null) { return { x: this._.sx, y: this._.sy, toString: B} } bJ = bJ || bK; ! +bJ && (bJ = bK); var bO, bM, bN, bL, b0 = this.attrs; if (bK != 0) { var bI = this.getBBox(), bF = bI.x + bI.width / 2, E = bI.y + bI.height / 2, bZ = bK / this._.sx, bY = bJ / this._.sy; e = (+e || e == 0) ? e : bF; d = (+d || d == 0) ? d : E; var bH = ~ ~(bK / an.abs(bK)), S = ~ ~(bJ / an.abs(bJ)), bR = this.node.style, b2 = e + (bF - e) * bZ, b1 = d + (E - d) * bY; switch (this.type) { case "rect": case "image": var bG = b0.width * bH * bZ, bQ = b0.height * S * bY; this.attr({ height: bQ, r: b0.r * bf(bH * bZ, S * bY), width: bG, x: b2 - bG / 2, y: b1 - bQ / 2 }); break; case "circle": case "ellipse": this.attr({ rx: b0.rx * bH * bZ, ry: b0.ry * S * bY, r: b0.r * bf(bH * bZ, S * bY), cx: b2, cy: b1 }); break; case "text": this.attr({ x: b2, y: b1 }); break; case "path": var bT = ar(b0.path), bU = true; for (var bW = 0, bP = bT[r]; bW < bP; bW++) { var bS = bT[bW], R = bl.call(bS[0]); if (R == "M" && bU) { continue } else { bU = false } if (R == "A") { bS[bT[bW][r] - 2] *= bZ; bS[bT[bW][r] - 1] *= bY; bS[1] *= bH * bZ; bS[2] *= S * bY; bS[5] = +!(bH + S ? ! +bS[5] : +bS[5]) } else { if (R == "H") { for (var bV = 1, bX = bS[r]; bV < bX; bV++) { bS[bV] *= bZ } } else { if (R == "V") { for (bV = 1, bX = bS[r]; bV < bX; bV++) { bS[bV] *= bY } } else { for (bV = 1, bX = bS[r]; bV < bX; bV++) { bS[bV] *= (bV % 2) ? bZ : bY } } } } } var b = ah(bT); bO = b2 - b.x - b.width / 2; bM = b1 - b.y - b.height / 2; bT[0][1] += bO; bT[0][2] += bM; this.attr({ path: bT }); break } if (this.type in { text: 1, image: 1} && (bH != 1 || S != 1)) { if (this.transformations) { this.transformations[2] = "scale("[bt](bH, ",", S, ")"); this.node[C]("transform", this.transformations[aT](aF)); bO = (bH == -1) ? -b0.x - (bG || 0) : b0.x; bM = (S == -1) ? -b0.y - (bQ || 0) : b0.y; this.attr({ x: bO, y: bM }); b0.fx = bH - 1; b0.fy = S - 1 } else { this.node.filterMatrix = a2 + ".Matrix(M11="[bt](bH, ", M12=0, M21=0, M22=", S, ", Dx=0, Dy=0, sizingmethod='auto expand', filtertype='bilinear')"); bR.filter = (this.node.filterMatrix || aM) + (this.node.filterOpacity || aM) } } else { if (this.transformations) { this.transformations[2] = aM; this.node[C]("transform", this.transformations[aT](aF)); b0.fx = 0; b0.fy = 0 } else { this.node.filterMatrix = aM; bR.filter = (this.node.filterMatrix || aM) + (this.node.filterOpacity || aM) } } b0.scale = [bK, bJ, e, d][aT](aF); this._.sx = bK; this._.sy = bJ } return this }; a9.clone = function() { if (this.removed) { return null } var b = this.attr(); delete b.scale; delete b.translation; return this.paper[this.type]().attr(b) }; var aZ = {}, k = function(R, d, bH, bG, bN, bM, bL, bK, S) { var bJ = 0, E = [R, d, bH, bG, bN, bM, bL, bK].join(), b = aZ[E], bF, e; !b && (aZ[E] = b = { data: [] }); b.timer && clearTimeout(b.timer); b.timer = setTimeout(function() { delete aZ[E] }, 2000); for (var bI = 0; bI < 101; bI++) { if (b.data[S] > bI) { e = b.data[bI * 100] } else { e = aG.findDotsAtSegment(R, d, bH, bG, bN, bM, bL, bK, bI / 100); b.data[bI] = e } bI && (bJ += bi(bi(bF.x - e.x, 2) + bi(bF.y - e.y, 2), 0.5)); if (S != null && bJ >= S) { return e } bF = e } if (S == null) { return bJ } }, aY = function(b, d) { return function(bN, R, S) { bN = U(bN); var bJ, bI, e, bF, E = "", bM = {}, bK, bH = 0; for (var bG = 0, bL = bN.length; bG < bL; bG++) { e = bN[bG]; if (e[0] == "M") { bJ = +e[1]; bI = +e[2] } else { bF = k(bJ, bI, e[1], e[2], e[3], e[4], e[5], e[6]); if (bH + bF > R) { if (d && !bM.start) { bK = k(bJ, bI, e[1], e[2], e[3], e[4], e[5], e[6], R - bH); E += ["C", bK.start.x, bK.start.y, bK.m.x, bK.m.y, bK.x, bK.y]; if (S) { return E } bM.start = E; E = ["M", bK.x, bK.y + "C", bK.n.x, bK.n.y, bK.end.x, bK.end.y, e[5], e[6]][aT](); bH += bF; bJ = +e[5]; bI = +e[6]; continue } if (!b && !d) { bK = k(bJ, bI, e[1], e[2], e[3], e[4], e[5], e[6], R - bH); return { x: bK.x, y: bK.y, alpha: bK.alpha} } } bH += bF; bJ = +e[5]; bI = +e[6] } E += e } bM.end = E; bK = b ? bH : d ? bM : aG.findDotsAtSegment(bJ, bI, e[1], e[2], e[3], e[4], e[5], e[6], 1); bK.alpha && (bK = { x: bK.x, y: bK.y, alpha: bK.alpha }); return bK } }; var aI = aY(1), K = aY(), X = aY(0, 1); a9.getTotalLength = function() { if (this.type != "path") { return } if (this.node.getTotalLength) { return this.node.getTotalLength() } return aI(this.attrs.path) }; a9.getPointAtLength = function(b) { if (this.type != "path") { return } if (this.node.getPointAtLength) { return this.node.getPointAtLength(b) } return K(this.attrs.path, b) }; a9.getSubpath = function(e, d) { if (this.type != "path") { return } if (an.abs(this.getTotalLength() - d) < "1e-6") { return X(this.attrs.path, e).end } var b = X(this.attrs.path, d, 1); return e ? X(b, e).end : b }; aG.easing_formulas = { linear: function(b) { return b }, "<": function(b) { return bi(b, 3) }, ">": function(b) { return bi(b - 1, 3) + 1 }, "<>": function(b) { b = b * 2; if (b < 1) { return bi(b, 3) / 2 } b -= 2; return (bi(b, 3) + 2) / 2 }, backIn: function(d) { var b = 1.70158; return d * d * ((b + 1) * d - b) }, backOut: function(d) { d = d - 1; var b = 1.70158; return d * d * ((b + 1) * d + b) + 1 }, elastic: function(e) { if (e == 0 || e == 1) { return e } var d = 0.3, b = d / 4; return bi(2, -10 * e) * an.sin((e - b) * (2 * an.PI) / d) + 1 }, bounce: function(i) { var d = 7.5625, e = 2.75, b; if (i < (1 / e)) { b = d * i * i } else { if (i < (2 / e)) { i -= (1.5 / e); b = d * i * i + 0.75 } else { if (i < (2.5 / e)) { i -= (2.25 / e); b = d * i * i + 0.9375 } else { i -= (2.625 / e); b = d * i * i + 0.984375 } } } return b } }; var W = [], br = function() { var bG = +new Date; for (var bR = 0; bR < W[r]; bR++) { var bW = W[bR]; if (bW.stop || bW.el.removed) { continue } var R = bG - bW.start, bO = bW.ms, bN = bW.easing, bS = bW.from, bL = bW.diff, d = bW.to, bK = bW.t, bF = bW.el, bM = {}, b; if (R < bO) { var E = bN(R / bO); for (var bP in bS) { if (bS[af](bP)) { switch (al[bP]) { case "along": b = E * bO * bL[bP]; d.back && (b = d.len - b); var bQ = K(d[bP], b); bF.translate(bL.sx - bL.x || 0, bL.sy - bL.y || 0); bL.x = bQ.x; bL.y = bQ.y; bF.translate(bQ.x - bL.sx, bQ.y - bL.sy); d.rot && bF.rotate(bL.r + bQ.alpha, bQ.x, bQ.y); break; case aD: b = +bS[bP] + E * bO * bL[bP]; break; case "colour": b = "rgb(" + [J(ac(bS[bP].r + E * bO * bL[bP].r)), J(ac(bS[bP].g + E * bO * bL[bP].g)), J(ac(bS[bP].b + E * bO * bL[bP].b))][aT](",") + ")"; break; case "path": b = []; for (var bU = 0, bJ = bS[bP][r]; bU < bJ; bU++) { b[bU] = [bS[bP][bU][0]]; for (var bT = 1, bV = bS[bP][bU][r]; bT < bV; bT++) { b[bU][bT] = +bS[bP][bU][bT] + E * bO * bL[bP][bU][bT] } b[bU] = b[bU][aT](aF) } b = b[aT](aF); break; case "csv": switch (bP) { case "translation": var bI = E * bO * bL[bP][0] - bK.x, bH = E * bO * bL[bP][1] - bK.y; bK.x += bI; bK.y += bH; b = bI + aF + bH; break; case "rotation": b = +bS[bP][0] + E * bO * bL[bP][0]; bS[bP][1] && (b += "," + bS[bP][1] + "," + bS[bP][2]); break; case "scale": b = [+bS[bP][0] + E * bO * bL[bP][0], +bS[bP][1] + E * bO * bL[bP][1], (2 in d[bP] ? d[bP][2] : aM), (3 in d[bP] ? d[bP][3] : aM)][aT](aF); break; case "clip-rect": b = []; bU = 4; while (bU--) { b[bU] = +bS[bP][bU] + E * bO * bL[bP][bU] } break } break; default: var S = [].concat(bS[bP]); b = []; bU = bF.paper.customAttributes[bP].length; while (bU--) { b[bU] = +S[bU] + E * bO * bL[bP][bU] } break } bM[bP] = b } } bF.attr(bM); bF._run && bF._run.call(bF) } else { if (d.along) { bQ = K(d.along, d.len * !d.back); bF.translate(bL.sx - (bL.x || 0) + bQ.x - bL.sx, bL.sy - (bL.y || 0) + bQ.y - bL.sy); d.rot && bF.rotate(bL.r + bQ.alpha, bQ.x, bQ.y) } (bK.x || bK.y) && bF.translate(-bK.x, -bK.y); d.scale && (d.scale += aM); bF.attr(d); W.splice(bR--, 1) } } aG.svg && bF && bF.paper && bF.paper.safari(); W[r] && setTimeout(br) }, bv = function(b, e, R, E, i) { var d = R - E; e.timeouts.push(setTimeout(function() { aG.is(i, "function") && i.call(e); e.animate(b, d, b.easing) }, E)) }, J = function(b) { return l(bf(b, 255), 0) }, z = function(b, e) { if (b == null) { return { x: this._.tx, y: this._.ty, toString: B} } this._.tx += +b; this._.ty += +e; switch (this.type) { case "circle": case "ellipse": this.attr({ cx: +b + this.attrs.cx, cy: +e + this.attrs.cy }); break; case "rect": case "image": case "text": this.attr({ x: +b + this.attrs.x, y: +e + this.attrs.y }); break; case "path": var d = ar(this.attrs.path); d[0][1] += +b; d[0][2] += +e; this.attr({ path: d }); break } return this }; a9.animateWith = function(e, R, b, bF, S) { for (var d = 0, E = W.length; d < E; d++) { if (W[d].el.id == e.id) { R.start = W[d].start } } return this.animate(R, b, bF, S) }; a9.animateAlong = aS(); a9.animateAlongBack = aS(1); function aS(b) { return function(i, e, d, R) { var E = { back: b }; aG.is(d, "function") ? (R = d) : (E.rot = d); i && i.constructor == aR && (i = i.attrs.path); i && (E.along = i); return this.animate(E, e, R) } } function aV(bL, i, d, bK, bJ, bF) { var bG = 3 * i, bI = 3 * (bK - i) - bG, b = 1 - bG - bI, S = 3 * d, bH = 3 * (bJ - d) - S, bM = 1 - S - bH; function R(bN) { return ((b * bN + bI) * bN + bG) * bN } function e(bN, bP) { var bO = E(bN, bP); return ((bM * bO + bH) * bO + S) * bO } function E(bN, bU) { var bT, bS, bQ, bO, bR, bP; for (bQ = bN, bP = 0; bP < 8; bP++) { bO = R(bQ) - bN; if (an.abs(bO) < bU) { return bQ } bR = (3 * b * bQ + 2 * bI) * bQ + bG; if (an.abs(bR) < 0.000001) { break } bQ = bQ - bO / bR } bT = 0; bS = 1; bQ = bN; if (bQ < bT) { return bT } if (bQ > bS) { return bS } while (bT < bS) { bO = R(bQ); if (an.abs(bO - bN) < bU) { return bQ } if (bN > bO) { bT = bQ } else { bS = bQ } bQ = (bS - bT) / 2 + bT } return bQ } return e(bL, 1 / (200 * bF)) } a9.onAnimation = function(b) { this._run = b || 0; return this }; a9.animate = function(bY, bO, bN, R) { var d = this; d.timeouts = d.timeouts || []; if (aG.is(bN, "function") || !bN) { R = bN || null } if (d.removed) { R && R.call(d); return d } var bS = {}, e = {}, S = false, bJ = {}; for (var bP in bY) { if (bY[af](bP)) { if (al[af](bP) || d.paper.customAttributes[af](bP)) { S = true; bS[bP] = d.attr(bP); (bS[bP] == null) && (bS[bP] = p[bP]); e[bP] = bY[bP]; switch (al[bP]) { case "along": var bW = aI(bY[bP]); var bQ = K(bY[bP], bW * !!bY.back); var bF = d.getBBox(); bJ[bP] = bW / bO; bJ.tx = bF.x; bJ.ty = bF.y; bJ.sx = bQ.x; bJ.sy = bQ.y; e.rot = bY.rot; e.back = bY.back; e.len = bW; bY.rot && (bJ.r = ai(d.rotate()) || 0); break; case aD: bJ[bP] = (e[bP] - bS[bP]) / bO; break; case "colour": bS[bP] = aG.getRGB(bS[bP]); var bR = aG.getRGB(e[bP]); bJ[bP] = { r: (bR.r - bS[bP].r) / bO, g: (bR.g - bS[bP].g) / bO, b: (bR.b - bS[bP].b) / bO }; break; case "path": var bG = U(bS[bP], e[bP]); bS[bP] = bG[0]; var bL = bG[1]; bJ[bP] = []; for (var bV = 0, bI = bS[bP][r]; bV < bI; bV++) { bJ[bP][bV] = [0]; for (var bU = 1, bX = bS[bP][bV][r]; bU < bX; bU++) { bJ[bP][bV][bU] = (bL[bV][bU] - bS[bP][bV][bU]) / bO } } break; case "csv": var b = bA(bY[bP])[H](a), bH = bA(bS[bP])[H](a); switch (bP) { case "translation": bS[bP] = [0, 0]; bJ[bP] = [b[0] / bO, b[1] / bO]; break; case "rotation": bS[bP] = (bH[1] == b[1] && bH[2] == b[2]) ? bH : [0, b[1], b[2]]; bJ[bP] = [(b[0] - bS[bP][0]) / bO, 0, 0]; break; case "scale": bY[bP] = b; bS[bP] = bA(bS[bP])[H](a); bJ[bP] = [(b[0] - bS[bP][0]) / bO, (b[1] - bS[bP][1]) / bO, 0, 0]; break; case "clip-rect": bS[bP] = bA(bS[bP])[H](a); bJ[bP] = []; bV = 4; while (bV--) { bJ[bP][bV] = (b[bV] - bS[bP][bV]) / bO } break } e[bP] = b; break; default: b = [].concat(bY[bP]); bH = [].concat(bS[bP]); bJ[bP] = []; bV = d.paper.customAttributes[bP][r]; while (bV--) { bJ[bP][bV] = ((b[bV] || 0) - (bH[bV] || 0)) / bO } break } } } } if (!S) { var bM = [], E; for (var bZ in bY) { if (bY[af](bZ) && bc.test(bZ)) { bP = { value: bY[bZ] }; bZ == "from" && (bZ = 0); bZ == "to" && (bZ = 100); bP.key = Q(bZ, 10); bM.push(bP) } } bM.sort(bj); if (bM[0].key) { bM.unshift({ key: 0, value: d.attrs }) } for (bV = 0, bI = bM[r]; bV < bI; bV++) { bv(bM[bV].value, d, bO / 100 * bM[bV].key, bO / 100 * (bM[bV - 1] && bM[bV - 1].key || 0), bM[bV - 1] && bM[bV - 1].value.callback) } E = bM[bM[r] - 1].value.callback; if (E) { d.timeouts.push(setTimeout(function() { E.call(d) }, bO)) } } else { var bT = aG.easing_formulas[bN]; if (!bT) { bT = bA(bN).match(c); if (bT && bT[r] == 5) { var bK = bT; bT = function(i) { return aV(i, +bK[1], +bK[2], +bK[3], +bK[4], bO) } } else { bT = function(i) { return i } } } W.push({ start: bY.start || +new Date, ms: bO, easing: bT, from: bS, diff: bJ, to: e, el: d, t: { x: 0, y: 0} }); aG.is(R, "function") && (d._ac = setTimeout(function() { R.call(d) }, bO)); W[r] == 1 && setTimeout(br) } return this }; a9.stop = function() { for (var b = 0; b < W.length; b++) { W[b].el.id == this.id && W.splice(b--, 1) } for (b = 0, ii = this.timeouts && this.timeouts.length; b < ii; b++) { clearTimeout(this.timeouts[b]) } this.timeouts = []; clearTimeout(this._ac); delete this._ac; return this }; a9.translate = function(b, d) { return this.attr({ translation: b + " " + d }) }; a9[aX] = function() { return "Rapha\xebl\u2019s object" }; aG.ae = W; var ag = function(b) { this.items = []; this[r] = 0; this.type = "set"; if (b) { for (var d = 0, e = b[r]; d < e; d++) { if (b[d] && (b[d].constructor == aR || b[d].constructor == ag)) { this[this.items[r]] = this.items[this.items[r]] = b[d]; this[r]++ } } } }; ag[bC][j] = function() { var E, b; for (var d = 0, e = arguments[r]; d < e; d++) { E = arguments[d]; if (E && (E.constructor == aR || E.constructor == ag)) { b = this.items[r]; this[b] = this.items[b] = E; this[r]++ } } return this }; ag[bC].pop = function() { delete this[this[r]--]; return this.items.pop() }; for (var G in a9) { if (a9[af](G)) { ag[bC][G] = (function(b) { return function() { for (var d = 0, e = this.items[r]; d < e; d++) { this.items[d][b][bz](this.items[d], arguments) } return this } })(G) } } ag[bC].attr = function(d, S) { if (d && aG.is(d, a4) && aG.is(d[0], "object")) { for (var b = 0, R = d[r]; b < R; b++) { this.items[b].attr(d[b]) } } else { for (var e = 0, E = this.items[r]; e < E; e++) { this.items[e].attr(d, S) } } return this }; ag[bC].animate = function(d, b, S, bG) { (aG.is(S, "function") || !S) && (bG = S || null); var R = this.items[r], e = R, bH, bF = this, E; bG && (E = function() { ! --R && bG.call(bF) }); S = aG.is(S, ae) ? S : E; bH = this.items[--e].animate(d, b, S, E); while (e--) { this.items[e] && !this.items[e].removed && this.items[e].animateWith(bH, d, b, S, E) } return this }; ag[bC].insertAfter = function(d) { var b = this.items[r]; while (b--) { this.items[b].insertAfter(d) } return this }; ag[bC].getBBox = function() { var b = [], S = [], d = [], E = []; for (var e = this.items[r]; e--; ) { var R = this.items[e].getBBox(); b[j](R.x); S[j](R.y); d[j](R.x + R.width); E[j](R.y + R.height) } b = bf[bz](0, b); S = bf[bz](0, S); return { x: b, y: S, width: l[bz](0, d) - b, height: l[bz](0, E) - S} }; ag[bC].clone = function(e) { e = new ag; for (var b = 0, d = this.items[r]; b < d; b++) { e[j](this.items[b].clone()) } return e }; aG.registerFont = function(d) { if (!d.face) { return d } this.fonts = this.fonts || {}; var i = { w: d.w, face: {}, glyphs: {} }, e = d.face["font-family"]; for (var S in d.face) { if (d.face[af](S)) { i.face[S] = d.face[S] } } if (this.fonts[e]) { this.fonts[e][j](i) } else { this.fonts[e] = [i] } if (!d.svg) { i.face["units-per-em"] = Q(d.face["units-per-em"], 10); for (var E in d.glyphs) { if (d.glyphs[af](E)) { var R = d.glyphs[E]; i.glyphs[E] = { w: R.w, k: {}, d: R.d && "M" + R.d[bp](/[mlcxtrv]/g, function(bF) { return { l: "L", c: "C", x: "z", t: "m", r: "l", v: "c"}[bF] || "M" }) + "z" }; if (R.k) { for (var b in R.k) { if (R[af](b)) { i.glyphs[E].k[b] = R.k[b] } } } } } } return d }; aW.getFont = function(bG, bH, d, E) { E = E || "normal"; d = d || "normal"; bH = +bH || { normal: 400, bold: 700, lighter: 300, bolder: 800}[bH] || 400; if (!aG.fonts) { return } var R = aG.fonts[bG]; if (!R) { var e = new RegExp("(^|\\s)" + bG[bp](/[^\w\d\s+!~.:_-]/g, aM) + "(\\s|$)", "i"); for (var b in aG.fonts) { if (aG.fonts[af](b)) { if (e.test(b)) { R = aG.fonts[b]; break } } } } var S; if (R) { for (var bF = 0, bI = R[r]; bF < bI; bF++) { S = R[bF]; if (S.face["font-weight"] == bH && (S.face["font-style"] == d || !S.face["font-style"]) && S.face["font-stretch"] == E) { break } } } return S }; aW.print = function(R, E, b, bG, bH, bQ, d) { bQ = bQ || "middle"; d = l(bf(d || 0, 1), -1); var bM = this.set(), bP = bA(b)[H](aM), bN = 0, bK = aM, bR; aG.is(bG, b) && (bG = this.getFont(bG)); if (bG) { bR = (bH || 16) / bG.face["units-per-em"]; var e = bG.face.bbox.split(a), bF = +e[0], bI = +e[1] + (bQ == "baseline" ? e[3] - e[1] + (+bG.face.descent) : (e[3] - e[1]) / 2); for (var bL = 0, S = bP[r]; bL < S; bL++) { var bJ = bL && bG.glyphs[bP[bL - 1]] || {}, bO = bG.glyphs[bP[bL]]; bN += bL ? (bJ.w || bG.w) + (bJ.k && bJ.k[bP[bL]] || 0) + (bG.w * d) : 0; bO && bO.d && bM[j](this.path(bO.d).attr({ fill: "#000", stroke: "none", translation: [bN, 0] })) } bM.scale(bR, bR, bF, bI).translate(R - bF, E - bI) } return bM }; aG.format = function(d, e) { var b = aG.is(e, a4) ? [0][bt](e) : arguments; d && aG.is(d, ae) && b[r] - 1 && (d = d[bp](bk, function(R, E) { return b[++E] == null ? aM : b[E] })); return d || aM }; aG.ninja = function() { q.was ? (aN.Raphael = q.is) : delete Raphael; return aG }; aG.el = a9; aG.st = ag[bC]; q.was ? (aN.Raphael = aG) : (Raphael = aG) })();
