1. (function (a, b) {
  2. function cA(a) {
  3. return f.isWindow(a) ? a : a.nodeType === 9 ? a.defaultView || a.parentWindow : !1
  4. }
  5. function cx(a) {
  6. if (!cm[a]) {
  7. var b = c.body,
  8. d = f("<" + a + ">").appendTo(b),
  9. e = d.css("display");
  10. d.remove();
  11. if (e === "none" || e === "") {
  12. cn || (cn = c.createElement("iframe"), cn.frameBorder = cn.width = cn.height = 0), b.appendChild(cn);
  13. if (!co || !cn.createElement) co = (cn.contentWindow || cn.contentDocument).document, co.write((c.compatMode === "CSS1Compat" ? "<!doctype html>" : "") + "<html><body>"), co.close();
  14. d = co.createElement(a), co.body.appendChild(d), e = f.css(d, "display"), b.removeChild(cn)
  15. }
  16. cm[a] = e
  17. }
  18. return cm[a]
  19. }
  20. function cw(a, b) {
  21. var c = {};
  22. f.each(cs.concat.apply([], cs.slice(0, b)), function () {
  23. c[this] = a
  24. });
  25. return c
  26. }
  27. function cv() {
  28. ct = b
  29. }
  30. function cu() {
  31. setTimeout(cv, 0);
  32. return ct = f.now()
  33. }
  34. function cl() {
  35. try {
  36. return new a.ActiveXObject("Microsoft.XMLHTTP")
  37. } catch (b) {}
  38. }
  39. function ck() {
  40. try {
  41. return new a.XMLHttpRequest
  42. } catch (b) {}
  43. }
  44. function ce(a, c) {
  45. a.dataFilter && (c = a.dataFilter(c, a.dataType));
  46. var d = a.dataTypes,
  47. e = {}, g, h, i = d.length,
  48. j, k = d[0],
  49. l, m, n, o, p;
  50. for (g = 1; g < i; g++) {
  51. if (g === 1) for (h in a.converters) typeof h == "string" && (e[h.toLowerCase()] = a.converters[h]);
  52. l = k, k = d[g];
  53. if (k === "*") k = l;
  54. else if (l !== "*" && l !== k) {
  55. m = l + " " + k, n = e[m] || e["* " + k];
  56. if (!n) {
  57. p = b;
  58. for (o in e) {
  59. j = o.split(" ");
  60. if (j[0] === l || j[0] === "*") {
  61. p = e[j[1] + " " + k];
  62. if (p) {
  63. o = e[o], o === !0 ? n = p : p === !0 && (n = o);
  64. break
  65. }
  66. }
  67. }
  68. }!n && !p && f.error("No conversion from " + m.replace(" ", " to ")), n !== !0 && (c = n ? n(c) : p(o(c)))
  69. }
  70. }
  71. return c
  72. }
  73. function cd(a, c, d) {
  74. var e = a.contents,
  75. f = a.dataTypes,
  76. g = a.responseFields,
  77. h, i, j, k;
  78. for (i in g) i in d && (c[g[i]] = d[i]);
  79. while (f[0] === "*") f.shift(), h === b && (h = a.mimeType || c.getResponseHeader("content-type"));
  80. if (h) for (i in e) if (e[i] && e[i].test(h)) {
  81. f.unshift(i);
  82. break
  83. }
  84. if (f[0] in d) j = f[0];
  85. else {
  86. for (i in d) {
  87. if (!f[0] || a.converters[i + " " + f[0]]) {
  88. j = i;
  89. break
  90. }
  91. k || (k = i)
  92. }
  93. j = j || k
  94. }
  95. if (j) {
  96. j !== f[0] && f.unshift(j);
  97. return d[j]
  98. }
  99. }
  100. function cc(a, b, c, d) {
  101. if (f.isArray(b)) f.each(b, function (b, e) {
  102. c || bG.test(a) ? d(a, e) : cc(a + "[" + (typeof e == "object" || f.isArray(e) ? b : "") + "]", e, c, d)
  103. });
  104. else if (!c && b != null && typeof b == "object") for (var e in b) cc(a + "[" + e + "]", b[e], c, d);
  105. else d(a, b)
  106. }
  107. function cb(a, c) {
  108. var d, e, g = f.ajaxSettings.flatOptions || {};
  109. for (d in c) c[d] !== b && ((g[d] ? a : e || (e = {}))[d] = c[d]);
  110. e && f.extend(!0, a, e)
  111. }
  112. function ca(a, c, d, e, f, g) {
  113. f = f || c.dataTypes[0], g = g || {}, g[f] = !0;
  114. var h = a[f],
  115. i = 0,
  116. j = h ? h.length : 0,
  117. k = a === bV,
  118. l;
  119. for (; i < j && (k || !l); i++) l = h[i](c, d, e), typeof l == "string" && (!k || g[l] ? l = b : (c.dataTypes.unshift(l), l = ca(a, c, d, e, l, g)));
  120. (k || !l) && !g["*"] && (l = ca(a, c, d, e, "*", g));
  121. return l
  122. }
  123. function b_(a) {
  124. return function (b, c) {
  125. typeof b != "string" && (c = b, b = "*");
  126. if (f.isFunction(c)) {
  127. var d = b.toLowerCase().split(bR),
  128. e = 0,
  129. g = d.length,
  130. h, i, j;
  131. for (; e < g; e++) h = d[e], j = /^\+/.test(h), j && (h = h.substr(1) || "*"), i = a[h] = a[h] || [], i[j ? "unshift" : "push"](c)
  132. }
  133. }
  134. }
  135. function bE(a, b, c) {
  136. var d = b === "width" ? a.offsetWidth : a.offsetHeight,
  137. e = b === "width" ? bz : bA;
  138. if (d > 0) {
  139. c !== "border" && f.each(e, function () {
  140. c || (d -= parseFloat(f.css(a, "padding" + this)) || 0), c === "margin" ? d += parseFloat(f.css(a, c + this)) || 0 : d -= parseFloat(f.css(a, "border" + this + "Width")) || 0
  141. });
  142. return d + "px"
  143. }
  144. d = bB(a, b, b);
  145. if (d < 0 || d == null) d = a.style[b] || 0;
  146. d = parseFloat(d) || 0, c && f.each(e, function () {
  147. d += parseFloat(f.css(a, "padding" + this)) || 0, c !== "padding" && (d += parseFloat(f.css(a, "border" + this + "Width")) || 0), c === "margin" && (d += parseFloat(f.css(a, c + this)) || 0)
  148. });
  149. return d + "px"
  150. }
  151. function br(a, b) {
  152. b.src ? f.ajax({
  153. url: b.src,
  154. async: !1,
  155. dataType: "script"
  156. }) : f.globalEval((b.text || b.textContent || b.innerHTML || "").replace(bi, "/*$0*/")), b.parentNode && b.parentNode.removeChild(b)
  157. }
  158. function bq(a) {
  159. var b = (a.nodeName || "").toLowerCase();
  160. b === "input" ? bp(a) : b !== "script" && typeof a.getElementsByTagName != "undefined" && f.grep(a.getElementsByTagName("input"), bp)
  161. }
  162. function bp(a) {
  163. if (a.type === "checkbox" || a.type === "radio") a.defaultChecked = a.checked
  164. }
  165. function bo(a) {
  166. return typeof a.getElementsByTagName != "undefined" ? a.getElementsByTagName("*") : typeof a.querySelectorAll != "undefined" ? a.querySelectorAll("*") : []
  167. }
  168. function bn(a, b) {
  169. var c;
  170. if (b.nodeType === 1) {
  171. b.clearAttributes && b.clearAttributes(), b.mergeAttributes && b.mergeAttributes(a), c = b.nodeName.toLowerCase();
  172. if (c === "object") b.outerHTML = a.outerHTML;
  173. else if (c !== "input" || a.type !== "checkbox" && a.type !== "radio") {
  174. if (c === "option") b.selected = a.defaultSelected;
  175. else if (c === "input" || c === "textarea") b.defaultValue = a.defaultValue
  176. } else a.checked && (b.defaultChecked = b.checked = a.checked), b.value !== a.value && (b.value = a.value);
  177. b.removeAttribute(f.expando)
  178. }
  179. }
  180. function bm(a, b) {
  181. if (b.nodeType === 1 && !! f.hasData(a)) {
  182. var c, d, e, g = f._data(a),
  183. h = f._data(b, g),
  184. i = g.events;
  185. if (i) {
  186. delete h.handle, h.events = {};
  187. for (c in i) for (d = 0, e = i[c].length; d < e; d++) f.event.add(b, c + (i[c][d].namespace ? "." : "") + i[c][d].namespace, i[c][d], i[c][d].data)
  188. }
  189. h.data && (h.data = f.extend({}, h.data))
  190. }
  191. }
  192. function bl(a, b) {
  193. return f.nodeName(a, "table") ? a.getElementsByTagName("tbody")[0] || a.appendChild(a.ownerDocument.createElement("tbody")) : a
  194. }
  195. function X(a) {
  196. var b = Y.split(" "),
  197. c = a.createDocumentFragment();
  198. if (c.createElement) while (b.length) c.createElement(b.pop());
  199. return c
  200. }
  201. function W(a, b, c) {
  202. b = b || 0;
  203. if (f.isFunction(b)) return f.grep(a, function (a, d) {
  204. var e = !! b.call(a, d, a);
  205. return e === c
  206. });
  207. if (b.nodeType) return f.grep(a, function (a, d) {
  208. return a === b === c
  209. });
  210. if (typeof b == "string") {
  211. var d = f.grep(a, function (a) {
  212. return a.nodeType === 1
  213. });
  214. if (R.test(b)) return f.filter(b, d, !c);
  215. b = f.filter(b, d)
  216. }
  217. return f.grep(a, function (a, d) {
  218. return f.inArray(a, b) >= 0 === c
  219. })
  220. }
  221. function V(a) {
  222. return !a || !a.parentNode || a.parentNode.nodeType === 11
  223. }
  224. function N() {
  225. return !0
  226. }
  227. function M() {
  228. return !1
  229. }
  230. function n(a, b, c) {
  231. var d = b + "defer",
  232. e = b + "queue",
  233. g = b + "mark",
  234. h = f._data(a, d);
  235. h && (c === "queue" || !f._data(a, e)) && (c === "mark" || !f._data(a, g)) && setTimeout(function () {
  236. !f._data(a, e) && !f._data(a, g) && (f.removeData(a, d, !0), h.fire())
  237. }, 0)
  238. }
  239. function m(a) {
  240. for (var b in a) {
  241. if (b === "data" && f.isEmptyObject(a[b])) continue;
  242. if (b !== "toJSON") return !1
  243. }
  244. return !0
  245. }
  246. function l(a, c, d) {
  247. if (d === b && a.nodeType === 1) {
  248. var e = "data-" + c.replace(k, "-$1").toLowerCase();
  249. d = a.getAttribute(e);
  250. if (typeof d == "string") {
  251. try {
  252. d = d === "true" ? !0 : d === "false" ? !1 : d === "null" ? null : f.isNumeric(d) ? parseFloat(d) : j.test(d) ? f.parseJSON(d) : d
  253. } catch (g) {}
  254. f.data(a, c, d)
  255. } else d = b
  256. }
  257. return d
  258. }
  259. function h(a) {
  260. var b = g[a] = {}, c, d;
  261. a = a.split(/\s+/);
  262. for (c = 0, d = a.length; c < d; c++) b[a[c]] = !0;
  263. return b
  264. }
  265. var c = a.document,
  266. d = a.navigator,
  267. e = a.location,
  268. f = function () {
  269. function K() {
  270. if (!e.isReady) {
  271. try {
  272. c.documentElement.doScroll("left")
  273. } catch (a) {
  274. setTimeout(K, 1);
  275. return
  276. }
  277. e.ready()
  278. }
  279. }
  280. var e = function (a, b) {
  281. return new e.fn.init(a, b, h)
  282. }, f = a.jQuery,
  283. g = a.$,
  284. h, i = /^(?:[^#<]*(<[\w\W]+>)[^>]*$|#([\w\-]*)$)/,
  285. j = /\S/,
  286. k = /^\s+/,
  287. l = /\s+$/,
  288. m = /\d/,
  289. n = /^<(\w+)\s*\/?>(?:<\/\1>)?$/,
  290. o = /^[\],:{}\s]*$/,
  291. p = /\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,
  292. q = /"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,
  293. r = /(?:^|:|,)(?:\s*\[)+/g,
  294. s = /(webkit)[ \/]([\w.]+)/,
  295. t = /(opera)(?:.*version)?[ \/]([\w.]+)/,
  296. u = /(msie) ([\w.]+)/,
  297. v = /(mozilla)(?:.*? rv:([\w.]+))?/,
  298. w = /-([a-z]|[0-9])/ig,
  299. x = /^-ms-/,
  300. y = function (a, b) {
  301. return (b + "").toUpperCase()
  302. }, z = d.userAgent,
  303. A, B, C, D = Object.prototype.toString,
  304. E = Object.prototype.hasOwnProperty,
  305. F = Array.prototype.push,
  306. G = Array.prototype.slice,
  307. H = String.prototype.trim,
  308. I = Array.prototype.indexOf,
  309. J = {};
  310. e.fn = e.prototype = {
  311. constructor: e,
  312. init: function (a, d, f) {
  313. var g, h, j, k;
  314. if (!a) return this;
  315. if (a.nodeType) {
  316. this.context = this[0] = a, this.length = 1;
  317. return this
  318. }
  319. if (a === "body" && !d && c.body) {
  320. this.context = c, this[0] = c.body, this.selector = a, this.length = 1;
  321. return this
  322. }
  323. if (typeof a == "string") {
  324. a.charAt(0) !== "<" || a.charAt(a.length - 1) !== ">" || a.length < 3 ? g = i.exec(a) : g = [null, a, null];
  325. if (g && (g[1] || !d)) {
  326. if (g[1]) {
  327. d = d instanceof e ? d[0] : d, k = d ? d.ownerDocument || d : c, j = n.exec(a), j ? e.isPlainObject(d) ? (a = [c.createElement(j[1])], e.fn.attr.call(a, d, !0)) : a = [k.createElement(j[1])] : (j = e.buildFragment([g[1]], [k]), a = (j.cacheable ? e.clone(j.fragment) : j.fragment).childNodes);
  328. return e.merge(this, a)
  329. }
  330. h = c.getElementById(g[2]);
  331. if (h && h.parentNode) {
  332. if (h.id !== g[2]) return f.find(a);
  333. this.length = 1, this[0] = h
  334. }
  335. this.context = c, this.selector = a;
  336. return this
  337. }
  338. return !d || d.jquery ? (d || f).find(a) : this.constructor(d).find(a)
  339. }
  340. if (e.isFunction(a)) return f.ready(a);
  341. a.selector !== b && (this.selector = a.selector, this.context = a.context);
  342. return e.makeArray(a, this)
  343. },
  344. selector: "",
  345. jquery: "1.7",
  346. length: 0,
  347. size: function () {
  348. return this.length
  349. },
  350. toArray: function () {
  351. return G.call(this, 0)
  352. },
  353. get: function (a) {
  354. return a == null ? this.toArray() : a < 0 ? this[this.length + a] : this[a]
  355. },
  356. pushStack: function (a, b, c) {
  357. var d = this.constructor();
  358. e.isArray(a) ? F.apply(d, a) : e.merge(d, a), d.prevObject = this, d.context = this.context, b === "find" ? d.selector = this.selector + (this.selector ? " " : "") + c : b && (d.selector = this.selector + "." + b + "(" + c + ")");
  359. return d
  360. },
  361. each: function (a, b) {
  362. return e.each(this, a, b)
  363. },
  364. ready: function (a) {
  365. e.bindReady(), B.add(a);
  366. return this
  367. },
  368. eq: function (a) {
  369. return a === -1 ? this.slice(a) : this.slice(a, + a + 1)
  370. },
  371. first: function () {
  372. return this.eq(0)
  373. },
  374. last: function () {
  375. return this.eq(-1)
  376. },
  377. slice: function () {
  378. return this.pushStack(G.apply(this, arguments), "slice", G.call(arguments).join(","))
  379. },
  380. map: function (a) {
  381. return this.pushStack(e.map(this, function (b, c) {
  382. return a.call(b, c, b)
  383. }))
  384. },
  385. end: function () {
  386. return this.prevObject || this.constructor(null)
  387. },
  388. push: F,
  389. sort: [].sort,
  390. splice: [].splice
  391. }, e.fn.init.prototype = e.fn, e.extend = e.fn.extend = function () {
  392. var a, c, d, f, g, h, i = arguments[0] || {}, j = 1,
  393. k = arguments.length,
  394. l = !1;
  395. typeof i == "boolean" && (l = i, i = arguments[1] || {}, j = 2), typeof i != "object" && !e.isFunction(i) && (i = {}), k === j && (i = this, --j);
  396. for (; j < k; j++) if ((a = arguments[j]) != null) for (c in a) {
  397. d = i[c], f = a[c];
  398. if (i === f) continue;
  399. l && f && (e.isPlainObject(f) || (g = e.isArray(f))) ? (g ? (g = !1, h = d && e.isArray(d) ? d : []) : h = d && e.isPlainObject(d) ? d : {}, i[c] = e.extend(l, h, f)) : f !== b && (i[c] = f)
  400. }
  401. return i
  402. }, e.extend({
  403. noConflict: function (b) {
  404. a.$ === e && (a.$ = g), b && a.jQuery === e && (a.jQuery = f);
  405. return e
  406. },
  407. isReady: !1,
  408. readyWait: 1,
  409. holdReady: function (a) {
  410. a ? e.readyWait++ : e.ready(!0)
  411. },
  412. ready: function (a) {
  413. if (a === !0 && !--e.readyWait || a !== !0 && !e.isReady) {
  414. if (!c.body) return setTimeout(e.ready, 1);
  415. e.isReady = !0;
  416. if (a !== !0 && --e.readyWait > 0) return;
  417. B.fireWith(c, [e]), e.fn.trigger && e(c).trigger("ready").unbind("ready")
  418. }
  419. },
  420. bindReady: function () {
  421. if (!B) {
  422. B = e.Callbacks("once memory");
  423. if (c.readyState === "complete") return setTimeout(e.ready, 1);
  424. if (c.addEventListener) c.addEventListener("DOMContentLoaded", C, !1), a.addEventListener("load", e.ready, !1);
  425. else if (c.attachEvent) {
  426. c.attachEvent("onreadystatechange", C), a.attachEvent("onload", e.ready);
  427. var b = !1;
  428. try {
  429. b = a.frameElement == null
  430. } catch (d) {}
  431. c.documentElement.doScroll && b && K()
  432. }
  433. }
  434. },
  435. isFunction: function (a) {
  436. return e.type(a) === "function"
  437. },
  438. isArray: Array.isArray || function (a) {
  439. return e.type(a) === "array"
  440. },
  441. isWindow: function (a) {
  442. return a && typeof a == "object" && "setInterval" in a
  443. },
  444. isNumeric: function (a) {
  445. return a != null && m.test(a) && !isNaN(a)
  446. },
  447. type: function (a) {
  448. return a == null ? String(a) : J[D.call(a)] || "object"
  449. },
  450. isPlainObject: function (a) {
  451. if (!a || e.type(a) !== "object" || a.nodeType || e.isWindow(a)) return !1;
  452. try {
  453. if (a.constructor && !E.call(a, "constructor") && !E.call(a.constructor.prototype, "isPrototypeOf")) return !1
  454. } catch (c) {
  455. return !1
  456. }
  457. var d;
  458. for (d in a);
  459. return d === b || E.call(a, d)
  460. },
  461. isEmptyObject: function (a) {
  462. for (var b in a) return !1;
  463. return !0
  464. },
  465. error: function (a) {
  466. throw a
  467. },
  468. parseJSON: function (b) {
  469. if (typeof b != "string" || !b) return null;
  470. b = e.trim(b);
  471. if (a.JSON && a.JSON.parse) return a.JSON.parse(b);
  472. if (o.test(b.replace(p, "@").replace(q, "]").replace(r, ""))) return (new Function("return " + b))();
  473. e.error("Invalid JSON: " + b)
  474. },
  475. parseXML: function (c) {
  476. var d, f;
  477. try {
  478. a.DOMParser ? (f = new DOMParser, d = f.parseFromString(c, "text/xml")) : (d = new ActiveXObject("Microsoft.XMLDOM"), d.async = "false", d.loadXML(c))
  479. } catch (g) {
  480. d = b
  481. }(!d || !d.documentElement || d.getElementsByTagName("parsererror").length) && e.error("Invalid XML: " + c);
  482. return d
  483. },
  484. noop: function () {},
  485. globalEval: function (b) {
  486. b && j.test(b) && (a.execScript || function (b) {
  487. a.eval.call(a, b)
  488. })(b)
  489. },
  490. camelCase: function (a) {
  491. return a.replace(x, "ms-").replace(w, y)
  492. },
  493. nodeName: function (a, b) {
  494. return a.nodeName && a.nodeName.toUpperCase() === b.toUpperCase()
  495. },
  496. each: function (a, c, d) {
  497. var f, g = 0,
  498. h = a.length,
  499. i = h === b || e.isFunction(a);
  500. if (d) {
  501. if (i) {
  502. for (f in a) if (c.apply(a[f], d) === !1) break
  503. } else for (; g < h;) if (c.apply(a[g++], d) === !1) break
  504. } else if (i) {
  505. for (f in a) if (c.call(a[f], f, a[f]) === !1) break
  506. } else for (; g < h;) if (c.call(a[g], g, a[g++]) === !1) break;
  507. return a
  508. },
  509. trim: H ? function (a) {
  510. return a == null ? "" : H.call(a)
  511. } : function (a) {
  512. return a == null ? "" : (a + "").replace(k, "").replace(l, "")
  513. },
  514. makeArray: function (a, b) {
  515. var c = b || [];
  516. if (a != null) {
  517. var d = e.type(a);
  518. a.length == null || d === "string" || d === "function" || d === "regexp" || e.isWindow(a) ? F.call(c, a) : e.merge(c, a)
  519. }
  520. return c
  521. },
  522. inArray: function (a, b, c) {
  523. var d;
  524. if (b) {
  525. if (I) return I.call(b, a, c);
  526. d = b.length, c = c ? c < 0 ? Math.max(0, d + c) : c : 0;
  527. for (; c < d; c++) if (c in b && b[c] === a) return c
  528. }
  529. return -1
  530. },
  531. merge: function (a, c) {
  532. var d = a.length,
  533. e = 0;
  534. if (typeof c.length == "number") for (var f = c.length; e < f; e++) a[d++] = c[e];
  535. else while (c[e] !== b) a[d++] = c[e++];
  536. a.length = d;
  537. return a
  538. },
  539. grep: function (a, b, c) {
  540. var d = [],
  541. e;
  542. c = !! c;
  543. for (var f = 0, g = a.length; f < g; f++) e = !! b(a[f], f), c !== e && d.push(a[f]);
  544. return d
  545. },
  546. map: function (a, c, d) {
  547. var f, g, h = [],
  548. i = 0,
  549. j = a.length,
  550. k = a instanceof e || j !== b && typeof j == "number" && (j > 0 && a[0] && a[j - 1] || j === 0 || e.isArray(a));
  551. if (k) for (; i < j; i++) f = c(a[i], i, d), f != null && (h[h.length] = f);
  552. else for (g in a) f = c(a[g], g, d), f != null && (h[h.length] = f);
  553. return h.concat.apply([], h)
  554. },
  555. guid: 1,
  556. proxy: function (a, c) {
  557. if (typeof c == "string") {
  558. var d = a[c];
  559. c = a, a = d
  560. }
  561. if (!e.isFunction(a)) return b;
  562. var f = G.call(arguments, 2),
  563. g = function () {
  564. return a.apply(c, f.concat(G.call(arguments)))
  565. };
  566. g.guid = a.guid = a.guid || g.guid || e.guid++;
  567. return g
  568. },
  569. access: function (a, c, d, f, g, h) {
  570. var i = a.length;
  571. if (typeof c == "object") {
  572. for (var j in c) e.access(a, j, c[j], f, g, d);
  573. return a
  574. }
  575. if (d !== b) {
  576. f = !h && f && e.isFunction(d);
  577. for (var k = 0; k < i; k++) g(a[k], c, f ? d.call(a[k], k, g(a[k], c)) : d, h);
  578. return a
  579. }
  580. return i ? g(a[0], c) : b
  581. },
  582. now: function () {
  583. return (new Date).getTime()
  584. },
  585. uaMatch: function (a) {
  586. a = a.toLowerCase();
  587. var b = s.exec(a) || t.exec(a) || u.exec(a) || a.indexOf("compatible") < 0 && v.exec(a) || [];
  588. return {
  589. browser: b[1] || "",
  590. version: b[2] || "0"
  591. }
  592. },
  593. sub: function () {
  594. function a(b, c) {
  595. return new a.fn.init(b, c)
  596. }
  597. e.extend(!0, a, this), a.superclass = this, a.fn = a.prototype = this(), a.fn.constructor = a, a.sub = this.sub, a.fn.init = function (d, f) {
  598. f && f instanceof e && !(f instanceof a) && (f = a(f));
  599. return e.fn.init.call(this, d, f, b)
  600. }, a.fn.init.prototype = a.fn;
  601. var b = a(c);
  602. return a
  603. },
  604. browser: {}
  605. }), e.each("Boolean Number String Function Array Date RegExp Object".split(" "), function (a, b) {
  606. J["[object " + b + "]"] = b.toLowerCase()
  607. }), A = e.uaMatch(z), A.browser && (e.browser[A.browser] = !0, e.browser.version = A.version), e.browser.webkit && (e.browser.safari = !0), j.test(" ") && (k = /^[\s\xA0]+/, l = /[\s\xA0]+$/), h = e(c), c.addEventListener ? C = function () {
  608. c.removeEventListener("DOMContentLoaded", C, !1), e.ready()
  609. } : c.attachEvent && (C = function () {
  610. c.readyState === "complete" && (c.detachEvent("onreadystatechange", C), e.ready())
  611. }), typeof define == "function" && define.amd && define.amd.jQuery && define("jquery", [], function () {
  612. return e
  613. });
  614. return e
  615. }(),
  616. g = {};
  617. f.Callbacks = function (a) {
  618. a = a ? g[a] || h(a) : {};
  619. var c = [],
  620. d = [],
  621. e, i, j, k, l, m = function (b) {
  622. var d, e, g, h, i;
  623. for (d = 0, e = b.length; d < e; d++) g = b[d], h = f.type(g), h === "array" ? m(g) : h === "function" && (!a.unique || !o.has(g)) && c.push(g)
  624. }, n = function (b, f) {
  625. f = f || [], e = !a.memory || [b, f], i = !0, l = j || 0, j = 0, k = c.length;
  626. for (; c && l < k; l++) if (c[l].apply(b, f) === !1 && a.stopOnFalse) {
  627. e = !0;
  628. break
  629. }
  630. i = !1, c && (a.once ? e === !0 ? o.disable() : c = [] : d && d.length && (e = d.shift(), o.fireWith(e[0], e[1])))
  631. }, o = {
  632. add: function () {
  633. if (c) {
  634. var a = c.length;
  635. m(arguments), i ? k = c.length : e && e !== !0 && (j = a, n(e[0], e[1]))
  636. }
  637. return this
  638. },
  639. remove: function () {
  640. if (c) {
  641. var b = arguments,
  642. d = 0,
  643. e = b.length;
  644. for (; d < e; d++) for (var f = 0; f < c.length; f++) if (b[d] === c[f]) {
  645. i && f <= k && (k--, f <= l && l--), c.splice(f--, 1);
  646. if (a.unique) break
  647. }
  648. }
  649. return this
  650. },
  651. has: function (a) {
  652. if (c) {
  653. var b = 0,
  654. d = c.length;
  655. for (; b < d; b++) if (a === c[b]) return !0
  656. }
  657. return !1
  658. },
  659. empty: function () {
  660. c = [];
  661. return this
  662. },
  663. disable: function () {
  664. c = d = e = b;
  665. return this
  666. },
  667. disabled: function () {
  668. return !c
  669. },
  670. lock: function () {
  671. d = b, (!e || e === !0) && o.disable();
  672. return this
  673. },
  674. locked: function () {
  675. return !d
  676. },
  677. fireWith: function (b, c) {
  678. d && (i ? a.once || d.push([b, c]) : (!a.once || !e) && n(b, c));
  679. return this
  680. },
  681. fire: function () {
  682. o.fireWith(this, arguments);
  683. return this
  684. },
  685. fired: function () {
  686. return !!e
  687. }
  688. };
  689. return o
  690. };
  691. var i = [].slice;
  692. f.extend({
  693. Deferred: function (a) {
  694. var b = f.Callbacks("once memory"),
  695. c = f.Callbacks("once memory"),
  696. d = f.Callbacks("memory"),
  697. e = "pending",
  698. g = {
  699. resolve: b,
  700. reject: c,
  701. notify: d
  702. }, h = {
  703. done: b.add,
  704. fail: c.add,
  705. progress: d.add,
  706. state: function () {
  707. return e
  708. },
  709. isResolved: b.fired,
  710. isRejected: c.fired,
  711. then: function (a, b, c) {
  712. i.done(a).fail(b).progress(c);
  713. return this
  714. },
  715. always: function () {
  716. return i.done.apply(i, arguments).fail.apply(i, arguments)
  717. },
  718. pipe: function (a, b, c) {
  719. return f.Deferred(function (d) {
  720. f.each({
  721. done: [a, "resolve"],
  722. fail: [b, "reject"],
  723. progress: [c, "notify"]
  724. }, function (a, b) {
  725. var c = b[0],
  726. e = b[1],
  727. g;
  728. f.isFunction(c) ? i[a](function () {
  729. g = c.apply(this, arguments), g && f.isFunction(g.promise) ? g.promise().then(d.resolve, d.reject, d.notify) : d[e + "With"](this === i ? d : this, [g])
  730. }) : i[a](d[e])
  731. })
  732. }).promise()
  733. },
  734. promise: function (a) {
  735. if (a == null) a = h;
  736. else for (var b in h) a[b] = h[b];
  737. return a
  738. }
  739. }, i = h.promise({}),
  740. j;
  741. for (j in g) i[j] = g[j].fire, i[j + "With"] = g[j].fireWith;
  742. i.done(function () {
  743. e = "resolved"
  744. }, c.disable, d.lock).fail(function () {
  745. e = "rejected"
  746. }, b.disable, d.lock), a && a.call(i, i);
  747. return i
  748. },
  749. when: function (a) {
  750. function m(a) {
  751. return function (b) {
  752. e[a] = arguments.length > 1 ? i.call(arguments, 0) : b, j.notifyWith(k, e)
  753. }
  754. }
  755. function l(a) {
  756. return function (c) {
  757. b[a] = arguments.length > 1 ? i.call(arguments, 0) : c, --g || j.resolveWith(j, b)
  758. }
  759. }
  760. var b = i.call(arguments, 0),
  761. c = 0,
  762. d = b.length,
  763. e = Array(d),
  764. g = d,
  765. h = d,
  766. j = d <= 1 && a && f.isFunction(a.promise) ? a : f.Deferred(),
  767. k = j.promise();
  768. if (d > 1) {
  769. for (; c < d; c++) b[c] && b[c].promise && f.isFunction(b[c].promise) ? b[c].promise().then(l(c), j.reject, m(c)) : --g;
  770. g || j.resolveWith(j, b)
  771. } else j !== a && j.resolveWith(j, d ? [a] : []);
  772. return k
  773. }
  774. }), f.support = function () {
  775. var a = c.createElement("div"),
  776. b = c.documentElement,
  777. d, e, g, h, i, j, k, l, m, n, o, p, q, r, s, t, u;
  778. a.setAttribute("className", "t"), a.innerHTML = " <link/><table></table><a href='/a' style='top:1px;float:left;opacity:.55;'>a</a><input type='checkbox'/><nav></nav>", d = a.getElementsByTagName("*"), e = a.getElementsByTagName("a")[0];
  779. if (!d || !d.length || !e) return {};
  780. g = c.createElement("select"), h = g.appendChild(c.createElement("option")), i = a.getElementsByTagName("input")[0], k = {
  781. leadingWhitespace: a.firstChild.nodeType === 3,
  782. tbody: !a.getElementsByTagName("tbody").length,
  783. htmlSerialize: !! a.getElementsByTagName("link").length,
  784. style: /top/.test(e.getAttribute("style")),
  785. hrefNormalized: e.getAttribute("href") === "/a",
  786. opacity: /^0.55/.test(e.style.opacity),
  787. cssFloat: !! e.style.cssFloat,
  788. unknownElems: !! a.getElementsByTagName("nav").length,
  789. checkOn: i.value === "on",
  790. optSelected: h.selected,
  791. getSetAttribute: a.className !== "t",
  792. enctype: !! c.createElement("form").enctype,
  793. submitBubbles: !0,
  794. changeBubbles: !0,
  795. focusinBubbles: !1,
  796. deleteExpando: !0,
  797. noCloneEvent: !0,
  798. inlineBlockNeedsLayout: !1,
  799. shrinkWrapBlocks: !1,
  800. reliableMarginRight: !0
  801. }, i.checked = !0, k.noCloneChecked = i.cloneNode(!0).checked, g.disabled = !0, k.optDisabled = !h.disabled;
  802. try {
  803. delete a.test
  804. } catch (v) {
  805. k.deleteExpando = !1
  806. }!a.addEventListener && a.attachEvent && a.fireEvent && (a.attachEvent("onclick", function () {
  807. k.noCloneEvent = !1
  808. }), a.cloneNode(!0).fireEvent("onclick")), i = c.createElement("input"), i.value = "t", i.setAttribute("type", "radio"), k.radioValue = i.value === "t", i.setAttribute("checked", "checked"), a.appendChild(i), l = c.createDocumentFragment(), l.appendChild(a.lastChild), k.checkClone = l.cloneNode(!0).cloneNode(!0).lastChild.checked, a.innerHTML = "", a.style.width = a.style.paddingLeft = "1px", m = c.getElementsByTagName("body")[0], o = c.createElement(m ? "div" : "body"), p = {
  809. visibility: "hidden",
  810. width: 0,
  811. height: 0,
  812. border: 0,
  813. margin: 0,
  814. background: "none"
  815. }, m && f.extend(p, {
  816. position: "absolute",
  817. left: "-999px",
  818. top: "-999px"
  819. });
  820. for (t in p) o.style[t] = p[t];
  821. o.appendChild(a), n = m || b, n.insertBefore(o, n.firstChild), k.appendChecked = i.checked, k.boxModel = a.offsetWidth === 2, "zoom" in a.style && (a.style.display = "inline", a.style.zoom = 1, k.inlineBlockNeedsLayout = a.offsetWidth === 2, a.style.display = "", a.innerHTML = "<div style='width:4px;'></div>", k.shrinkWrapBlocks = a.offsetWidth !== 2), a.innerHTML = "<table><tr><td style='padding:0;border:0;display:none'></td><td>t</td></tr></table>", q = a.getElementsByTagName("td"), u = q[0].offsetHeight === 0, q[0].style.display = "", q[1].style.display = "none", k.reliableHiddenOffsets = u && q[0].offsetHeight === 0, a.innerHTML = "", c.defaultView && c.defaultView.getComputedStyle && (j = c.createElement("div"), j.style.width = "0", j.style.marginRight = "0", a.appendChild(j), k.reliableMarginRight = (parseInt((c.defaultView.getComputedStyle(j, null) || {
  822. marginRight: 0
  823. }).marginRight, 10) || 0) === 0);
  824. if (a.attachEvent) for (t in {
  825. submit: 1,
  826. change: 1,
  827. focusin: 1
  828. }) s = "on" + t, u = s in a, u || (a.setAttribute(s, "return;"), u = typeof a[s] == "function"), k[t + "Bubbles"] = u;
  829. f(function () {
  830. var a, b, d, e, g, h, i = 1,
  831. j = "position:absolute;top:0;left:0;width:1px;height:1px;margin:0;",
  832. l = "visibility:hidden;border:0;",
  833. n = "style='" + j + "border:5px solid #000;padding:0;'",
  834. p = "<div " + n + "><div></div></div>" + "<table " + n + " cellpadding='0' cellspacing='0'>" + "<tr><td></td></tr></table>";
  835. m = c.getElementsByTagName("body")[0];
  836. !m || (a = c.createElement("div"), a.style.cssText = l + "width:0;height:0;position:static;top:0;margin-top:" + i + "px", m.insertBefore(a, m.firstChild), o = c.createElement("div"), o.style.cssText = j + l, o.innerHTML = p, a.appendChild(o), b = o.firstChild, d = b.firstChild, g = b.nextSibling.firstChild.firstChild, h = {
  837. doesNotAddBorder: d.offsetTop !== 5,
  838. doesAddBorderForTableAndCells: g.offsetTop === 5
  839. }, d.style.position = "fixed", d.style.top = "20px", h.fixedPosition = d.offsetTop === 20 || d.offsetTop === 15, d.style.position = d.style.top = "", b.style.overflow = "hidden", b.style.position = "relative", h.subtractsBorderForOverflowNotVisible = d.offsetTop === -5, h.doesNotIncludeMarginInBodyOffset = m.offsetTop !== i, m.removeChild(a), o = a = null, f.extend(k, h))
  840. }), o.innerHTML = "", n.removeChild(o), o = l = g = h = m = j = a = i = null;
  841. return k
  842. }(), f.boxModel = f.support.boxModel;
  843. var j = /^(?:\{.*\}|\[.*\])$/,
  844. k = /([A-Z])/g;
  845. f.extend({
  846. cache: {},
  847. uuid: 0,
  848. expando: "jQuery" + (f.fn.jquery + Math.random()).replace(/\D/g, ""),
  849. noData: {
  850. embed: !0,
  851. object: "clsid:D27CDB6E-AE6D-11cf-96B8-444553540000",
  852. applet: !0
  853. },
  854. hasData: function (a) {
  855. a = a.nodeType ? f.cache[a[f.expando]] : a[f.expando];
  856. return !!a && !m(a)
  857. },
  858. data: function (a, c, d, e) {
  859. if ( !! f.acceptData(a)) {
  860. var g, h, i, j = f.expando,
  861. k = typeof c == "string",
  862. l = a.nodeType,
  863. m = l ? f.cache : a,
  864. n = l ? a[f.expando] : a[f.expando] && f.expando,
  865. o = c === "events";
  866. if ((!n || !m[n] || !o && !e && !m[n].data) && k && d === b) return;
  867. n || (l ? a[f.expando] = n = ++f.uuid : n = f.expando), m[n] || (m[n] = {}, l || (m[n].toJSON = f.noop));
  868. if (typeof c == "object" || typeof c == "function") e ? m[n] = f.extend(m[n], c) : m[n].data = f.extend(m[n].data, c);
  869. g = h = m[n], e || (h.data || (h.data = {}), h = h.data), d !== b && (h[f.camelCase(c)] = d);
  870. if (o && !h[c]) return g.events;
  871. k ? (i = h[c], i == null && (i = h[f.camelCase(c)])) : i = h;
  872. return i
  873. }
  874. },
  875. removeData: function (a, b, c) {
  876. if ( !! f.acceptData(a)) {
  877. var d, e, g, h = f.expando,
  878. i = a.nodeType,
  879. j = i ? f.cache : a,
  880. k = i ? a[f.expando] : f.expando;
  881. if (!j[k]) return;
  882. if (b) {
  883. d = c ? j[k] : j[k].data;
  884. if (d) {
  885. f.isArray(b) ? b = b : b in d ? b = [b] : (b = f.camelCase(b), b in d ? b = [b] : b = b.split(" "));
  886. for (e = 0, g = b.length; e < g; e++) delete d[b[e]];
  887. if (!(c ? m : f.isEmptyObject)(d)) return
  888. }
  889. }
  890. if (!c) {
  891. delete j[k].data;
  892. if (!m(j[k])) return
  893. }
  894. f.support.deleteExpando || !j.setInterval ? delete j[k] : j[k] = null, i && (f.support.deleteExpando ? delete a[f.expando] : a.removeAttribute ? a.removeAttribute(f.expando) : a[f.expando] = null)
  895. }
  896. },
  897. _data: function (a, b, c) {
  898. return f.data(a, b, c, !0)
  899. },
  900. acceptData: function (a) {
  901. if (a.nodeName) {
  902. var b = f.noData[a.nodeName.toLowerCase()];
  903. if (b) return b !== !0 && a.getAttribute("classid") === b
  904. }
  905. return !0
  906. }
  907. }), f.fn.extend({
  908. data: function (a, c) {
  909. var d, e, g, h = null;
  910. if (typeof a == "undefined") {
  911. if (this.length) {
  912. h = f.data(this[0]);
  913. if (this[0].nodeType === 1 && !f._data(this[0], "parsedAttrs")) {
  914. e = this[0].attributes;
  915. for (var i = 0, j = e.length; i < j; i++) g = e[i].name, g.indexOf("data-") === 0 && (g = f.camelCase(g.substring(5)), l(this[0], g, h[g]));
  916. f._data(this[0], "parsedAttrs", !0)
  917. }
  918. }
  919. return h
  920. }
  921. if (typeof a == "object") return this.each(function () {
  922. f.data(this, a)
  923. });
  924. d = a.split("."), d[1] = d[1] ? "." + d[1] : "";
  925. if (c === b) {
  926. h = this.triggerHandler("getData" + d[1] + "!", [d[0]]), h === b && this.length && (h = f.data(this[0], a), h = l(this[0], a, h));
  927. return h === b && d[1] ? this.data(d[0]) : h
  928. }
  929. return this.each(function () {
  930. var b = f(this),
  931. e = [d[0], c];
  932. b.triggerHandler("setData" + d[1] + "!", e), f.data(this, a, c), b.triggerHandler("changeData" + d[1] + "!", e)
  933. })
  934. },
  935. removeData: function (a) {
  936. return this.each(function () {
  937. f.removeData(this, a)
  938. })
  939. }
  940. }), f.extend({
  941. _mark: function (a, b) {
  942. a && (b = (b || "fx") + "mark", f._data(a, b, (f._data(a, b) || 0) + 1))
  943. },
  944. _unmark: function (a, b, c) {
  945. a !== !0 && (c = b, b = a, a = !1);
  946. if (b) {
  947. c = c || "fx";
  948. var d = c + "mark",
  949. e = a ? 0 : (f._data(b, d) || 1) - 1;
  950. e ? f._data(b, d, e) : (f.removeData(b, d, !0), n(b, c, "mark"))
  951. }
  952. },
  953. queue: function (a, b, c) {
  954. var d;
  955. if (a) {
  956. b = (b || "fx") + "queue", d = f._data(a, b), c && (!d || f.isArray(c) ? d = f._data(a, b, f.makeArray(c)) : d.push(c));
  957. return d || []
  958. }
  959. },
  960. dequeue: function (a, b) {
  961. b = b || "fx";
  962. var c = f.queue(a, b),
  963. d = c.shift(),
  964. e = {};
  965. d === "inprogress" && (d = c.shift()), d && (b === "fx" && c.unshift("inprogress"), f._data(a, b + ".run", e), d.call(a, function () {
  966. f.dequeue(a, b)
  967. }, e)), c.length || (f.removeData(a, b + "queue " + b + ".run", !0), n(a, b, "queue"))
  968. }
  969. }), f.fn.extend({
  970. queue: function (a, c) {
  971. typeof a != "string" && (c = a, a = "fx");
  972. if (c === b) return f.queue(this[0], a);
  973. return this.each(function () {
  974. var b = f.queue(this, a, c);
  975. a === "fx" && b[0] !== "inprogress" && f.dequeue(this, a)
  976. })
  977. },
  978. dequeue: function (a) {
  979. return this.each(function () {
  980. f.dequeue(this, a)
  981. })
  982. },
  983. delay: function (a, b) {
  984. a = f.fx ? f.fx.speeds[a] || a : a, b = b || "fx";
  985. return this.queue(b, function (b, c) {
  986. var d = setTimeout(b, a);
  987. c.stop = function () {
  988. clearTimeout(d)
  989. }
  990. })
  991. },
  992. clearQueue: function (a) {
  993. return this.queue(a || "fx", [])
  994. },
  995. promise: function (a, c) {
  996. function m() {
  997. --h || d.resolveWith(e, [e])
  998. }
  999. typeof a != "string" && (c = a, a = b), a = a || "fx";
  1000. var d = f.Deferred(),
  1001. e = this,
  1002. g = e.length,
  1003. h = 1,
  1004. i = a + "defer",
  1005. j = a + "queue",
  1006. k = a + "mark",
  1007. l;
  1008. while (g--) if (l = f.data(e[g], i, b, !0) || (f.data(e[g], j, b, !0) || f.data(e[g], k, b, !0)) && f.data(e[g], i, f.Callbacks("once memory"), !0)) h++, l.add(m);
  1009. m();
  1010. return d.promise()
  1011. }
  1012. });
  1013. var o = /[\n\t\r]/g,
  1014. p = /\s+/,
  1015. q = /\r/g,
  1016. r = /^(?:button|input)$/i,
  1017. s = /^(?:button|input|object|select|textarea)$/i,
  1018. t = /^a(?:rea)?$/i,
  1019. u = /^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,
  1020. v = f.support.getSetAttribute,
  1021. w, x, y;
  1022. f.fn.extend({
  1023. attr: function (a, b) {
  1024. return f.access(this, a, b, !0, f.attr)
  1025. },
  1026. removeAttr: function (a) {
  1027. return this.each(function () {
  1028. f.removeAttr(this, a)
  1029. })
  1030. },
  1031. prop: function (a, b) {
  1032. return f.access(this, a, b, !0, f.prop)
  1033. },
  1034. removeProp: function (a) {
  1035. a = f.propFix[a] || a;
  1036. return this.each(function () {
  1037. try {
  1038. this[a] = b, delete this[a]
  1039. } catch (c) {}
  1040. })
  1041. },
  1042. addClass: function (a) {
  1043. var b, c, d, e, g, h, i;
  1044. if (f.isFunction(a)) return this.each(function (b) {
  1045. f(this).addClass(a.call(this, b, this.className))
  1046. });
  1047. if (a && typeof a == "string") {
  1048. b = a.split(p);
  1049. for (c = 0, d = this.length; c < d; c++) {
  1050. e = this[c];
  1051. if (e.nodeType === 1) if (!e.className && b.length === 1) e.className = a;
  1052. else {
  1053. g = " " + e.className + " ";
  1054. for (h = 0, i = b.length; h < i; h++)~g.indexOf(" " + b[h] + " ") || (g += b[h] + " ");
  1055. e.className = f.trim(g)
  1056. }
  1057. }
  1058. }
  1059. return this
  1060. },
  1061. removeClass: function (a) {
  1062. var c, d, e, g, h, i, j;
  1063. if (f.isFunction(a)) return this.each(function (b) {
  1064. f(this).removeClass(a.call(this, b, this.className))
  1065. });
  1066. if (a && typeof a == "string" || a === b) {
  1067. c = (a || "").split(p);
  1068. for (d = 0, e = this.length; d < e; d++) {
  1069. g = this[d];
  1070. if (g.nodeType === 1 && g.className) if (a) {
  1071. h = (" " + g.className + " ").replace(o, " ");
  1072. for (i = 0, j = c.length; i < j; i++) h = h.replace(" " + c[i] + " ", " ");
  1073. g.className = f.trim(h)
  1074. } else g.className = ""
  1075. }
  1076. }
  1077. return this
  1078. },
  1079. toggleClass: function (a, b) {
  1080. var c = typeof a,
  1081. d = typeof b == "boolean";
  1082. if (f.isFunction(a)) return this.each(function (c) {
  1083. f(this).toggleClass(a.call(this, c, this.className, b), b)
  1084. });
  1085. return this.each(function () {
  1086. if (c === "string") {
  1087. var e, g = 0,
  1088. h = f(this),
  1089. i = b,
  1090. j = a.split(p);
  1091. while (e = j[g++]) i = d ? i : !h.hasClass(e), h[i ? "addClass" : "removeClass"](e)
  1092. } else if (c === "undefined" || c === "boolean") this.className && f._data(this, "__className__", this.className), this.className = this.className || a === !1 ? "" : f._data(this, "__className__") || ""
  1093. })
  1094. },
  1095. hasClass: function (a) {
  1096. var b = " " + a + " ",
  1097. c = 0,
  1098. d = this.length;
  1099. for (; c < d; c++) if (this[c].nodeType === 1 && (" " + this[c].className + " ").replace(o, " ").indexOf(b) > -1) return !0;
  1100. return !1
  1101. },
  1102. val: function (a) {
  1103. var c, d, e, g = this[0];
  1104. if (!arguments.length) {
  1105. if (g) {
  1106. c = f.valHooks[g.nodeName.toLowerCase()] || f.valHooks[g.type];
  1107. if (c && "get" in c && (d = c.get(g, "value")) !== b) return d;
  1108. d = g.value;
  1109. return typeof d == "string" ? d.replace(q, "") : d == null ? "" : d
  1110. }
  1111. return b
  1112. }
  1113. e = f.isFunction(a);
  1114. return this.each(function (d) {
  1115. var g = f(this),
  1116. h;
  1117. if (this.nodeType === 1) {
  1118. e ? h = a.call(this, d, g.val()) : h = a, h == null ? h = "" : typeof h == "number" ? h += "" : f.isArray(h) && (h = f.map(h, function (a) {
  1119. return a == null ? "" : a + ""
  1120. })), c = f.valHooks[this.nodeName.toLowerCase()] || f.valHooks[this.type];
  1121. if (!c || !("set" in c) || c.set(this, h, "value") === b) this.value = h
  1122. }
  1123. })
  1124. }
  1125. }), f.extend({
  1126. valHooks: {
  1127. option: {
  1128. get: function (a) {
  1129. var b = a.attributes.value;
  1130. return !b || b.specified ? a.value : a.text
  1131. }
  1132. },
  1133. select: {
  1134. get: function (a) {
  1135. var b, c, d, e, g = a.selectedIndex,
  1136. h = [],
  1137. i = a.options,
  1138. j = a.type === "select-one";
  1139. if (g < 0) return null;
  1140. c = j ? g : 0, d = j ? g + 1 : i.length;
  1141. for (; c < d; c++) {
  1142. e = i[c];
  1143. if (e.selected && (f.support.optDisabled ? !e.disabled : e.getAttribute("disabled") === null) && (!e.parentNode.disabled || !f.nodeName(e.parentNode, "optgroup"))) {
  1144. b = f(e).val();
  1145. if (j) return b;
  1146. h.push(b)
  1147. }
  1148. }
  1149. if (j && !h.length && i.length) return f(i[g]).val();
  1150. return h
  1151. },
  1152. set: function (a, b) {
  1153. var c = f.makeArray(b);
  1154. f(a).find("option").each(function () {
  1155. this.selected = f.inArray(f(this).val(), c) >= 0
  1156. }), c.length || (a.selectedIndex = -1);
  1157. return c
  1158. }
  1159. }
  1160. },
  1161. attrFn: {
  1162. val: !0,
  1163. css: !0,
  1164. html: !0,
  1165. text: !0,
  1166. data: !0,
  1167. width: !0,
  1168. height: !0,
  1169. offset: !0
  1170. },
  1171. attr: function (a, c, d, e) {
  1172. var g, h, i, j = a.nodeType;
  1173. if (!a || j === 3 || j === 8 || j === 2) return b;
  1174. if (e && c in f.attrFn) return f(a)[c](d);
  1175. if (!("getAttribute" in a)) return f.prop(a, c, d);
  1176. i = j !== 1 || !f.isXMLDoc(a), i && (c = c.toLowerCase(), h = f.attrHooks[c] || (u.test(c) ? x : w));
  1177. if (d !== b) {
  1178. if (d === null) {
  1179. f.removeAttr(a, c);
  1180. return b
  1181. }
  1182. if (h && "set" in h && i && (g = h.set(a, d, c)) !== b) return g;
  1183. a.setAttribute(c, "" + d);
  1184. return d
  1185. }
  1186. if (h && "get" in h && i && (g = h.get(a, c)) !== null) return g;
  1187. g = a.getAttribute(c);
  1188. return g === null ? b : g
  1189. },
  1190. removeAttr: function (a, b) {
  1191. var c, d, e, g, h = 0;
  1192. if (a.nodeType === 1) {
  1193. d = (b || "").split(p), g = d.length;
  1194. for (; h < g; h++) e = d[h].toLowerCase(), c = f.propFix[e] || e, f.attr(a, e, ""), a.removeAttribute(v ? e : c), u.test(e) && c in a && (a[c] = !1)
  1195. }
  1196. },
  1197. attrHooks: {
  1198. type: {
  1199. set: function (a, b) {
  1200. if (r.test(a.nodeName) && a.parentNode) f.error("type property can't be changed");
  1201. else if (!f.support.radioValue && b === "radio" && f.nodeName(a, "input")) {
  1202. var c = a.value;
  1203. a.setAttribute("type", b), c && (a.value = c);
  1204. return b
  1205. }
  1206. }
  1207. },
  1208. value: {
  1209. get: function (a, b) {
  1210. if (w && f.nodeName(a, "button")) return w.get(a, b);
  1211. return b in a ? a.value : null
  1212. },
  1213. set: function (a, b, c) {
  1214. if (w && f.nodeName(a, "button")) return w.set(a, b, c);
  1215. a.value = b
  1216. }
  1217. }
  1218. },
  1219. propFix: {
  1220. tabindex: "tabIndex",
  1221. readonly: "readOnly",
  1222. "for": "htmlFor",
  1223. "class": "className",
  1224. maxlength: "maxLength",
  1225. cellspacing: "cellSpacing",
  1226. cellpadding: "cellPadding",
  1227. rowspan: "rowSpan",
  1228. colspan: "colSpan",
  1229. usemap: "useMap",
  1230. frameborder: "frameBorder",
  1231. contenteditable: "contentEditable"
  1232. },
  1233. prop: function (a, c, d) {
  1234. var e, g, h, i = a.nodeType;
  1235. if (!a || i === 3 || i === 8 || i === 2) return b;
  1236. h = i !== 1 || !f.isXMLDoc(a), h && (c = f.propFix[c] || c, g = f.propHooks[c]);
  1237. return d !== b ? g && "set" in g && (e = g.set(a, d, c)) !== b ? e : a[c] = d : g && "get" in g && (e = g.get(a, c)) !== null ? e : a[c]
  1238. },
  1239. propHooks: {
  1240. tabIndex: {
  1241. get: function (a) {
  1242. var c = a.getAttributeNode("tabindex");
  1243. return c && c.specified ? parseInt(c.value, 10) : s.test(a.nodeName) || t.test(a.nodeName) && a.href ? 0 : b
  1244. }
  1245. }
  1246. }
  1247. }), f.attrHooks.tabindex = f.propHooks.tabIndex, x = {
  1248. get: function (a, c) {
  1249. var d, e = f.prop(a, c);
  1250. return e === !0 || typeof e != "boolean" && (d = a.getAttributeNode(c)) && d.nodeValue !== !1 ? c.toLowerCase() : b
  1251. },
  1252. set: function (a, b, c) {
  1253. var d;
  1254. b === !1 ? f.removeAttr(a, c) : (d = f.propFix[c] || c, d in a && (a[d] = !0), a.setAttribute(c, c.toLowerCase()));
  1255. return c
  1256. }
  1257. }, v || (y = {
  1258. name: !0,
  1259. id: !0
  1260. }, w = f.valHooks.button = {
  1261. get: function (a, c) {
  1262. var d;
  1263. d = a.getAttributeNode(c);
  1264. return d && (y[c] ? d.nodeValue !== "" : d.specified) ? d.nodeValue : b
  1265. },
  1266. set: function (a, b, d) {
  1267. var e = a.getAttributeNode(d);
  1268. e || (e = c.createAttribute(d), a.setAttributeNode(e));
  1269. return e.nodeValue = b + ""
  1270. }
  1271. }, f.attrHooks.tabindex.set = w.set, f.each(["width", "height"], function (a, b) {
  1272. f.attrHooks[b] = f.extend(f.attrHooks[b], {
  1273. set: function (a, c) {
  1274. if (c === "") {
  1275. a.setAttribute(b, "auto");
  1276. return c
  1277. }
  1278. }
  1279. })
  1280. }), f.attrHooks.contenteditable = {
  1281. get: w.get,
  1282. set: function (a, b, c) {
  1283. b === "" && (b = "false"), w.set(a, b, c)
  1284. }
  1285. }), f.support.hrefNormalized || f.each(["href", "src", "width", "height"], function (a, c) {
  1286. f.attrHooks[c] = f.extend(f.attrHooks[c], {
  1287. get: function (a) {
  1288. var d = a.getAttribute(c, 2);
  1289. return d === null ? b : d
  1290. }
  1291. })
  1292. }), f.support.style || (f.attrHooks.style = {
  1293. get: function (a) {
  1294. return a.style.cssText.toLowerCase() || b
  1295. },
  1296. set: function (a, b) {
  1297. return a.style.cssText = "" + b
  1298. }
  1299. }), f.support.optSelected || (f.propHooks.selected = f.extend(f.propHooks.selected, {
  1300. get: function (a) {
  1301. var b = a.parentNode;
  1302. b && (b.selectedIndex, b.parentNode && b.parentNode.selectedIndex);
  1303. return null
  1304. }
  1305. })), f.support.enctype || (f.propFix.enctype = "encoding"), f.support.checkOn || f.each(["radio", "checkbox"], function () {
  1306. f.valHooks[this] = {
  1307. get: function (a) {
  1308. return a.getAttribute("value") === null ? "on" : a.value
  1309. }
  1310. }
  1311. }), f.each(["radio", "checkbox"], function () {
  1312. f.valHooks[this] = f.extend(f.valHooks[this], {
  1313. set: function (a, b) {
  1314. if (f.isArray(b)) return a.checked = f.inArray(f(a).val(), b) >= 0
  1315. }
  1316. })
  1317. });
  1318. var z = /\.(.*)$/,
  1319. A = /^(?:textarea|input|select)$/i,
  1320. B = /\./g,
  1321. C = / /g,
  1322. D = /[^\w\s.|`]/g,
  1323. E = /^([^\.]*)?(?:\.(.+))?$/,
  1324. F = /\bhover(\.\S+)?/,
  1325. G = /^key/,
  1326. H = /^(?:mouse|contextmenu)|click/,
  1327. I = /^(\w*)(?:#([\w\-]+))?(?:\.([\w\-]+))?$/,
  1328. J = function (a) {
  1329. var b = I.exec(a);
  1330. b && (b[1] = (b[1] || "").toLowerCase(), b[3] = b[3] && new RegExp("(?:^|\\s)" + b[3] + "(?:\\s|$)"));
  1331. return b
  1332. }, K = function (a, b) {
  1333. return (!b[1] || a.nodeName.toLowerCase() === b[1]) && (!b[2] || a.id === b[2]) && (!b[3] || b[3].test(a.className))
  1334. }, L = function (a) {
  1335. return f.event.special.hover ? a : a.replace(F, "mouseenter$1 mouseleave$1")
  1336. };
  1337. f.event = {
  1338. add: function (a, c, d, e, g) {
  1339. var h, i, j, k, l, m, n, o, p, q, r, s;
  1340. if (!(a.nodeType === 3 || a.nodeType === 8 || !c || !d || !(h = f._data(a)))) {
  1341. d.handler && (p = d, d = p.handler), d.guid || (d.guid = f.guid++), j = h.events, j || (h.events = j = {}), i = h.handle, i || (h.handle = i = function (a) {
  1342. return typeof f != "undefined" && (!a || f.event.triggered !== a.type) ? f.event.dispatch.apply(i.elem, arguments) : b
  1343. }, i.elem = a), c = L(c).split(" ");
  1344. for (k = 0; k < c.length; k++) {
  1345. l = E.exec(c[k]) || [], m = l[1], n = (l[2] || "").split(".").sort(), s = f.event.special[m] || {}, m = (g ? s.delegateType : s.bindType) || m, s = f.event.special[m] || {}, o = f.extend({
  1346. type: m,
  1347. origType: l[1],
  1348. data: e,
  1349. handler: d,
  1350. guid: d.guid,
  1351. selector: g,
  1352. namespace: n.join(".")
  1353. }, p), g && (o.quick = J(g), !o.quick && f.expr.match.POS.test(g) && (o.isPositional = !0)), r = j[m];
  1354. if (!r) {
  1355. r = j[m] = [], r.delegateCount = 0;
  1356. if (!s.setup || s.setup.call(a, e, n, i) === !1) a.addEventListener ? a.addEventListener(m, i, !1) : a.attachEvent && a.attachEvent("on" + m, i)
  1357. }
  1358. s.add && (s.add.call(a, o), o.handler.guid || (o.handler.guid = d.guid)), g ? r.splice(r.delegateCount++, 0, o) : r.push(o), f.event.global[m] = !0
  1359. }
  1360. a = null
  1361. }
  1362. },
  1363. global: {},
  1364. remove: function (a, b, c, d) {
  1365. var e = f.hasData(a) && f._data(a),
  1366. g, h, i, j, k, l, m, n, o, p, q;
  1367. if ( !! e && !! (m = e.events)) {
  1368. b = L(b || "").split(" ");
  1369. for (g = 0; g < b.length; g++) {
  1370. h = E.exec(b[g]) || [], i = h[1], j = h[2];
  1371. if (!i) {
  1372. j = j ? "." + j : "";
  1373. for (l in m) f.event.remove(a, l + j, c, d);
  1374. return
  1375. }
  1376. n = f.event.special[i] || {}, i = (d ? n.delegateType : n.bindType) || i, p = m[i] || [], k = p.length, j = j ? new RegExp("(^|\\.)" + j.split(".").sort().join("\\.(?:.*\\.)?") + "(\\.|$)") : null;
  1377. if (c || j || d || n.remove) for (l = 0; l < p.length; l++) {
  1378. q = p[l];
  1379. if (!c || c.guid === q.guid) if (!j || j.test(q.namespace)) if (!d || d === q.selector || d === "**" && q.selector) p.splice(l--, 1), q.selector && p.delegateCount--, n.remove && n.remove.call(a, q)
  1380. } else p.length = 0;
  1381. p.length === 0 && k !== p.length && ((!n.teardown || n.teardown.call(a, j) === !1) && f.removeEvent(a, i, e.handle), delete m[i])
  1382. }
  1383. f.isEmptyObject(m) && (o = e.handle, o && (o.elem = null), f.removeData(a, ["events", "handle"], !0))
  1384. }
  1385. },
  1386. customEvent: {
  1387. getData: !0,
  1388. setData: !0,
  1389. changeData: !0
  1390. },
  1391. trigger: function (c, d, e, g) {
  1392. if (!e || e.nodeType !== 3 && e.nodeType !== 8) {
  1393. var h = c.type || c,
  1394. i = [],
  1395. j, k, l, m, n, o, p, q, r, s;
  1396. h.indexOf("!") >= 0 && (h = h.slice(0, - 1), k = !0), h.indexOf(".") >= 0 && (i = h.split("."), h = i.shift(), i.sort());
  1397. if ((!e || f.event.customEvent[h]) && !f.event.global[h]) return;
  1398. c = typeof c == "object" ? c[f.expando] ? c : new f.Event(h, c) : new f.Event(h), c.type = h, c.isTrigger = !0, c.exclusive = k, c.namespace = i.join("."), c.namespace_re = c.namespace ? new RegExp("(^|\\.)" + i.join("\\.(?:.*\\.)?") + "(\\.|$)") : null, o = h.indexOf(":") < 0 ? "on" + h : "", (g || !e) && c.preventDefault();
  1399. if (!e) {
  1400. j = f.cache;
  1401. for (l in j) j[l].events && j[l].events[h] && f.event.trigger(c, d, j[l].handle.elem, !0);
  1402. return
  1403. }
  1404. c.result = b, c.target || (c.target = e), d = d != null ? f.makeArray(d) : [], d.unshift(c), p = f.event.special[h] || {};
  1405. if (p.trigger && p.trigger.apply(e, d) === !1) return;
  1406. r = [
  1407. [e, p.bindType || h]
  1408. ];
  1409. if (!g && !p.noBubble && !f.isWindow(e)) {
  1410. s = p.delegateType || h, n = null;
  1411. for (m = e.parentNode; m; m = m.parentNode) r.push([m, s]), n = m;
  1412. n && n === e.ownerDocument && r.push([n.defaultView || n.parentWindow || a, s])
  1413. }
  1414. for (l = 0; l < r.length; l++) {
  1415. m = r[l][0], c.type = r[l][1], q = (f._data(m, "events") || {})[c.type] && f._data(m, "handle"), q && q.apply(m, d), q = o && m[o], q && f.acceptData(m) && q.apply(m, d);
  1416. if (c.isPropagationStopped()) break
  1417. }
  1418. c.type = h, c.isDefaultPrevented() || (!p._default || p._default.apply(e.ownerDocument, d) === !1) && (h !== "click" || !f.nodeName(e, "a")) && f.acceptData(e) && o && e[h] && (h !== "focus" && h !== "blur" || c.target.offsetWidth !== 0) && !f.isWindow(e) && (n = e[o], n && (e[o] = null), f.event.triggered = h, e[h](), f.event.triggered = b, n && (e[o] = n));
  1419. return c.result
  1420. }
  1421. },
  1422. dispatch: function (c) {
  1423. c = f.event.fix(c || a.event);
  1424. var d = (f._data(this, "events") || {})[c.type] || [],
  1425. e = d.delegateCount,
  1426. g = [].slice.call(arguments, 0),
  1427. h = !c.exclusive && !c.namespace,
  1428. i = (f.event.special[c.type] || {}).handle,
  1429. j = [],
  1430. k, l, m, n, o, p, q, r, s, t, u;
  1431. g[0] = c, c.delegateTarget = this;
  1432. if (e && !c.target.disabled && (!c.button || c.type !== "click")) for (m = c.target; m != this; m = m.parentNode || this) {
  1433. o = {}, q = [];
  1434. for (k = 0; k < e; k++) r = d[k], s = r.selector, t = o[s], r.isPositional ? t = (t || (o[s] = f(s))).index(m) >= 0 : t === b && (t = o[s] = r.quick ? K(m, r.quick) : f(m).is(s)), t && q.push(r);
  1435. q.length && j.push({
  1436. elem: m,
  1437. matches: q
  1438. })
  1439. }
  1440. d.length > e && j.push({
  1441. elem: this,
  1442. matches: d.slice(e)
  1443. });
  1444. for (k = 0; k < j.length && !c.isPropagationStopped(); k++) {
  1445. p = j[k], c.currentTarget = p.elem;
  1446. for (l = 0; l < p.matches.length && !c.isImmediatePropagationStopped(); l++) {
  1447. r = p.matches[l];
  1448. if (h || !c.namespace && !r.namespace || c.namespace_re && c.namespace_re.test(r.namespace)) c.data = r.data, c.handleObj = r, n = (i || r.handler).apply(p.elem, g), n !== b && (c.result = n, n === !1 && (c.preventDefault(), c.stopPropagation()))
  1449. }
  1450. }
  1451. return c.result
  1452. },
  1453. props: "attrChange attrName relatedNode srcElement altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),
  1454. fixHooks: {},
  1455. keyHooks: {
  1456. props: "char charCode key keyCode".split(" "),
  1457. filter: function (a, b) {
  1458. a.which == null && (a.which = b.charCode != null ? b.charCode : b.keyCode);
  1459. return a
  1460. }
  1461. },
  1462. mouseHooks: {
  1463. props: "button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement wheelDelta".split(" "),
  1464. filter: function (a, d) {
  1465. var e, f, g, h = d.button,
  1466. i = d.fromElement;
  1467. a.pageX == null && d.clientX != null && (e = a.target.ownerDocument || c, f = e.documentElement, g = e.body, a.pageX = d.clientX + (f && f.scrollLeft || g && g.scrollLeft || 0) - (f && f.clientLeft || g && g.clientLeft || 0), a.pageY = d.clientY + (f && f.scrollTop || g && g.scrollTop || 0) - (f && f.clientTop || g && g.clientTop || 0)), !a.relatedTarget && i && (a.relatedTarget = i === a.target ? d.toElement : i), !a.which && h !== b && (a.which = h & 1 ? 1 : h & 2 ? 3 : h & 4 ? 2 : 0);
  1468. return a
  1469. }
  1470. },
  1471. fix: function (a) {
  1472. if (a[f.expando]) return a;
  1473. var d, e, g = a,
  1474. h = f.event.fixHooks[a.type] || {}, i = h.props ? this.props.concat(h.props) : this.props;
  1475. a = f.Event(g);
  1476. for (d = i.length; d;) e = i[--d], a[e] = g[e];
  1477. a.target || (a.target = g.srcElement || c), a.target.nodeType === 3 && (a.target = a.target.parentNode), a.metaKey === b && (a.metaKey = a.ctrlKey);
  1478. return h.filter ? h.filter(a, g) : a
  1479. },
  1480. special: {
  1481. ready: {
  1482. setup: f.bindReady
  1483. },
  1484. focus: {
  1485. delegateType: "focusin",
  1486. noBubble: !0
  1487. },
  1488. blur: {
  1489. delegateType: "focusout",
  1490. noBubble: !0
  1491. },
  1492. beforeunload: {
  1493. setup: function (a, b, c) {
  1494. f.isWindow(this) && (this.onbeforeunload = c)
  1495. },
  1496. teardown: function (a, b) {
  1497. this.onbeforeunload === b && (this.onbeforeunload = null)
  1498. }
  1499. }
  1500. },
  1501. simulate: function (a, b, c, d) {
  1502. var e = f.extend(new f.Event, c, {
  1503. type: a,
  1504. isSimulated: !0,
  1505. originalEvent: {}
  1506. });
  1507. d ? f.event.trigger(e, null, b) : f.event.dispatch.call(b, e), e.isDefaultPrevented() && c.preventDefault()
  1508. }
  1509. }, f.event.handle = f.event.dispatch, f.removeEvent = c.removeEventListener ? function (a, b, c) {
  1510. a.removeEventListener && a.removeEventListener(b, c, !1)
  1511. } : function (a, b, c) {
  1512. a.detachEvent && a.detachEvent("on" + b, c)
  1513. }, f.Event = function (a, b) {
  1514. if (!(this instanceof f.Event)) return new f.Event(a, b);
  1515. a && a.type ? (this.originalEvent = a, this.type = a.type, this.isDefaultPrevented = a.defaultPrevented || a.returnValue === !1 || a.getPreventDefault && a.getPreventDefault() ? N : M) : this.type = a, b && f.extend(this, b), this.timeStamp = a && a.timeStamp || f.now(), this[f.expando] = !0
  1516. }, f.Event.prototype = {
  1517. preventDefault: function () {
  1518. this.isDefaultPrevented = N;
  1519. var a = this.originalEvent;
  1520. !a || (a.preventDefault ? a.preventDefault() : a.returnValue = !1)
  1521. },
  1522. stopPropagation: function () {
  1523. this.isPropagationStopped = N;
  1524. var a = this.originalEvent;
  1525. !a || (a.stopPropagation && a.stopPropagation(), a.cancelBubble = !0)
  1526. },
  1527. stopImmediatePropagation: function () {
  1528. this.isImmediatePropagationStopped = N, this.stopPropagation()
  1529. },
  1530. isDefaultPrevented: M,
  1531. isPropagationStopped: M,
  1532. isImmediatePropagationStopped: M
  1533. }, f.each({
  1534. mouseenter: "mouseover",
  1535. mouseleave: "mouseout"
  1536. }, function (a, b) {
  1537. f.event.special[a] = f.event.special[b] = {
  1538. delegateType: b,
  1539. bindType: b,
  1540. handle: function (a) {
  1541. var b = this,
  1542. c = a.relatedTarget,
  1543. d = a.handleObj,
  1544. e = d.selector,
  1545. g, h;
  1546. if (!c || d.origType === a.type || c !== b && !f.contains(b, c)) g = a.type, a.type = d.origType, h = d.handler.apply(this, arguments), a.type = g;
  1547. return h
  1548. }
  1549. }
  1550. }), f.support.submitBubbles || (f.event.special.submit = {
  1551. setup: function () {
  1552. if (f.nodeName(this, "form")) return !1;
  1553. f.event.add(this, "click._submit keypress._submit", function (a) {
  1554. var c = a.target,
  1555. d = f.nodeName(c, "input") || f.nodeName(c, "button") ? c.form : b;
  1556. d && !d._submit_attached && (f.event.add(d, "submit._submit", function (a) {
  1557. this.parentNode && f.event.simulate("submit", this.parentNode, a, !0)
  1558. }), d._submit_attached = !0)
  1559. })
  1560. },
  1561. teardown: function () {
  1562. if (f.nodeName(this, "form")) return !1;
  1563. f.event.remove(this, "._submit")
  1564. }
  1565. }), f.support.changeBubbles || (f.event.special.change = {
  1566. setup: function () {
  1567. if (A.test(this.nodeName)) {
  1568. if (this.type === "checkbox" || this.type === "radio") f.event.add(this, "propertychange._change", function (a) {
  1569. a.originalEvent.propertyName === "checked" && (this._just_changed = !0)
  1570. }), f.event.add(this, "click._change", function (a) {
  1571. this._just_changed && (this._just_changed = !1, f.event.simulate("change", this, a, !0))
  1572. });
  1573. return !1
  1574. }
  1575. f.event.add(this, "beforeactivate._change", function (a) {
  1576. var b = a.target;
  1577. A.test(b.nodeName) && !b._change_attached && (f.event.add(b, "change._change", function (a) {
  1578. this.parentNode && !a.isSimulated && f.event.simulate("change", this.parentNode, a, !0)
  1579. }), b._change_attached = !0)
  1580. })
  1581. },
  1582. handle: function (a) {
  1583. var b = a.target;
  1584. if (this !== b || a.isSimulated || a.isTrigger || b.type !== "radio" && b.type !== "checkbox") return a.handleObj.handler.apply(this, arguments)
  1585. },
  1586. teardown: function () {
  1587. f.event.remove(this, "._change");
  1588. return A.test(this.nodeName)
  1589. }
  1590. }), f.support.focusinBubbles || f.each({
  1591. focus: "focusin",
  1592. blur: "focusout"
  1593. }, function (a, b) {
  1594. var d = 0,
  1595. e = function (a) {
  1596. f.event.simulate(b, a.target, f.event.fix(a), !0)
  1597. };
  1598. f.event.special[b] = {
  1599. setup: function () {
  1600. d++ === 0 && c.addEventListener(a, e, !0)
  1601. },
  1602. teardown: function () {
  1603. --d === 0 && c.removeEventListener(a, e, !0)
  1604. }
  1605. }
  1606. }), f.fn.extend({
  1607. on: function (a, c, d, e, g) {
  1608. var h, i;
  1609. if (typeof a == "object") {
  1610. typeof c != "string" && (d = c, c = b);
  1611. for (i in a) this.on(i, c, d, a[i], g);
  1612. return this
  1613. }
  1614. d == null && e == null ? (e = c, d = c = b) : e == null && (typeof c == "string" ? (e = d, d = b) : (e = d, d = c, c = b));
  1615. if (e === !1) e = M;
  1616. else if (!e) return this;
  1617. g === 1 && (h = e, e = function (a) {
  1618. f().off(a);
  1619. return h.apply(this, arguments)
  1620. }, e.guid = h.guid || (h.guid = f.guid++));
  1621. return this.each(function () {
  1622. f.event.add(this, a, e, d, c)
  1623. })
  1624. },
  1625. one: function (a, b, c, d) {
  1626. return this.on.call(this, a, b, c, d, 1)
  1627. },
  1628. off: function (a, c, d) {
  1629. if (a && a.preventDefault && a.handleObj) {
  1630. var e = a.handleObj;
  1631. f(a.delegateTarget).off(e.namespace ? e.type + "." + e.namespace : e.type, e.selector, e.handler);
  1632. return this
  1633. }
  1634. if (typeof a == "object") {
  1635. for (var g in a) this.off(g, c, a[g]);
  1636. return this
  1637. }
  1638. if (c === !1 || typeof c == "function") d = c, c = b;
  1639. d === !1 && (d = M);
  1640. return this.each(function () {
  1641. f.event.remove(this, a, d, c)
  1642. })
  1643. },
  1644. bind: function (a, b, c) {
  1645. return this.on(a, null, b, c)
  1646. },
  1647. unbind: function (a, b) {
  1648. return this.off(a, null, b)
  1649. },
  1650. live: function (a, b, c) {
  1651. f(this.context).on(a, this.selector, b, c);
  1652. return this
  1653. },
  1654. die: function (a, b) {
  1655. f(this.context).off(a, this.selector || "**", b);
  1656. return this
  1657. },
  1658. delegate: function (a, b, c, d) {
  1659. return this.on(b, a, c, d)
  1660. },
  1661. undelegate: function (a, b, c) {
  1662. return arguments.length == 1 ? this.off(a, "**") : this.off(b, a, c)
  1663. },
  1664. trigger: function (a, b) {
  1665. return this.each(function () {
  1666. f.event.trigger(a, b, this)
  1667. })
  1668. },
  1669. triggerHandler: function (a, b) {
  1670. if (this[0]) return f.event.trigger(a, b, this[0], !0)
  1671. },
  1672. toggle: function (a) {
  1673. var b = arguments,
  1674. c = a.guid || f.guid++,
  1675. d = 0,
  1676. e = function (c) {
  1677. var e = (f._data(this, "lastToggle" + a.guid) || 0) % d;
  1678. f._data(this, "lastToggle" + a.guid, e + 1), c.preventDefault();
  1679. return b[e].apply(this, arguments) || !1
  1680. };
  1681. e.guid = c;
  1682. while (d < b.length) b[d++].guid = c;
  1683. return this.click(e)
  1684. },
  1685. hover: function (a, b) {
  1686. return this.mouseenter(a).mouseleave(b || a)
  1687. }
  1688. }), f.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "), function (a, b) {
  1689. f.fn[b] = function (a, c) {
  1690. c == null && (c = a, a = null);
  1691. return arguments.length > 0 ? this.bind(b, a, c) : this.trigger(b)
  1692. }, f.attrFn && (f.attrFn[b] = !0), G.test(b) && (f.event.fixHooks[b] = f.event.keyHooks), H.test(b) && (f.event.fixHooks[b] = f.event.mouseHooks)
  1693. }),
  1694. function () {
  1695. function x(a, b, c, e, f, g) {
  1696. for (var h = 0, i = e.length; h < i; h++) {
  1697. var j = e[h];
  1698. if (j) {
  1699. var k = !1;
  1700. j = j[a];
  1701. while (j) {
  1702. if (j[d] === c) {
  1703. k = e[j.sizset];
  1704. break
  1705. }
  1706. if (j.nodeType === 1) {
  1707. g || (j[d] = c, j.sizset = h);
  1708. if (typeof b != "string") {
  1709. if (j === b) {
  1710. k = !0;
  1711. break
  1712. }
  1713. } else if (m.filter(b, [j]).length > 0) {
  1714. k = j;
  1715. break
  1716. }
  1717. }
  1718. j = j[a]
  1719. }
  1720. e[h] = k
  1721. }
  1722. }
  1723. }
  1724. function w(a, b, c, e, f, g) {
  1725. for (var h = 0, i = e.length; h < i; h++) {
  1726. var j = e[h];
  1727. if (j) {
  1728. var k = !1;
  1729. j = j[a];
  1730. while (j) {
  1731. if (j[d] === c) {
  1732. k = e[j.sizset];
  1733. break
  1734. }
  1735. j.nodeType === 1 && !g && (j[d] = c, j.sizset = h);
  1736. if (j.nodeName.toLowerCase() === b) {
  1737. k = j;
  1738. break
  1739. }
  1740. j = j[a]
  1741. }
  1742. e[h] = k
  1743. }
  1744. }
  1745. }
  1746. var a = /((?:\((?:\([^()]+\)|[^()]+)+\)|\[(?:\[[^\[\]]*\]|['"][^'"]*['"]|[^\[\]'"]+)+\]|\\.|[^ >+~,(\[\\]+)+|[>+~])(\s*,\s*)?((?:.|\r|\n)*)/g,
  1747. d = "sizcache" + (Math.random() + "").replace(".", ""),
  1748. e = 0,
  1749. g = Object.prototype.toString,
  1750. h = !1,
  1751. i = !0,
  1752. j = /\\/g,
  1753. k = /\r\n/g,
  1754. l = /\W/;
  1755. [0, 0].sort(function () {
  1756. i = !1;
  1757. return 0
  1758. });
  1759. var m = function (b, d, e, f) {
  1760. e = e || [], d = d || c;
  1761. var h = d;
  1762. if (d.nodeType !== 1 && d.nodeType !== 9) return [];
  1763. if (!b || typeof b != "string") return e;
  1764. var i, j, k, l, n, q, r, t, u = !0,
  1765. v = m.isXML(d),
  1766. w = [],
  1767. x = b;
  1768. do {
  1769. a.exec(""), i = a.exec(x);
  1770. if (i) {
  1771. x = i[3], w.push(i[1]);
  1772. if (i[2]) {
  1773. l = i[3];
  1774. break
  1775. }
  1776. }
  1777. } while (i);
  1778. if (w.length > 1 && p.exec(b)) if (w.length === 2 && o.relative[w[0]]) j = y(w[0] + w[1], d, f);
  1779. else {
  1780. j = o.relative[w[0]] ? [d] : m(w.shift(), d);
  1781. while (w.length) b = w.shift(), o.relative[b] && (b += w.shift()), j = y(b, j, f)
  1782. } else {
  1783. !f && w.length > 1 && d.nodeType === 9 && !v && o.match.ID.test(w[0]) && !o.match.ID.test(w[w.length - 1]) && (n = m.find(w.shift(), d, v), d = n.expr ? m.filter(n.expr, n.set)[0] : n.set[0]);
  1784. if (d) {
  1785. n = f ? {
  1786. expr: w.pop(),
  1787. set: s(f)
  1788. } : m.find(w.pop(), w.length === 1 && (w[0] === "~" || w[0] === "+") && d.parentNode ? d.parentNode : d, v), j = n.expr ? m.filter(n.expr, n.set) : n.set, w.length > 0 ? k = s(j) : u = !1;
  1789. while (w.length) q = w.pop(), r = q, o.relative[q] ? r = w.pop() : q = "", r == null && (r = d), o.relative[q](k, r, v)
  1790. } else k = w = []
  1791. }
  1792. k || (k = j), k || m.error(q || b);
  1793. if (g.call(k) === "[object Array]") if (!u) e.push.apply(e, k);
  1794. else if (d && d.nodeType === 1) for (t = 0; k[t] != null; t++) k[t] && (k[t] === !0 || k[t].nodeType === 1 && m.contains(d, k[t])) && e.push(j[t]);
  1795. else for (t = 0; k[t] != null; t++) k[t] && k[t].nodeType === 1 && e.push(j[t]);
  1796. else s(k, e);
  1797. l && (m(l, h, e, f), m.uniqueSort(e));
  1798. return e
  1799. };
  1800. m.uniqueSort = function (a) {
  1801. if (u) {
  1802. h = i, a.sort(u);
  1803. if (h) for (var b = 1; b < a.length; b++) a[b] === a[b - 1] && a.splice(b--, 1)
  1804. }
  1805. return a
  1806. }, m.matches = function (a, b) {
  1807. return m(a, null, null, b)
  1808. }, m.matchesSelector = function (a, b) {
  1809. return m(b, null, null, [a]).length > 0
  1810. }, m.find = function (a, b, c) {
  1811. var d, e, f, g, h, i;
  1812. if (!a) return [];
  1813. for (e = 0, f = o.order.length; e < f; e++) {
  1814. h = o.order[e];
  1815. if (g = o.leftMatch[h].exec(a)) {
  1816. i = g[1], g.splice(1, 1);
  1817. if (i.substr(i.length - 1) !== "\\") {
  1818. g[1] = (g[1] || "").replace(j, ""), d = o.find[h](g, b, c);
  1819. if (d != null) {
  1820. a = a.replace(o.match[h], "");
  1821. break
  1822. }
  1823. }
  1824. }
  1825. }
  1826. d || (d = typeof b.getElementsByTagName != "undefined" ? b.getElementsByTagName("*") : []);
  1827. return {
  1828. set: d,
  1829. expr: a
  1830. }
  1831. }, m.filter = function (a, c, d, e) {
  1832. var f, g, h, i, j, k, l, n, p, q = a,
  1833. r = [],
  1834. s = c,
  1835. t = c && c[0] && m.isXML(c[0]);
  1836. while (a && c.length) {
  1837. for (h in o.filter) if ((f = o.leftMatch[h].exec(a)) != null && f[2]) {
  1838. k = o.filter[h], l = f[1], g = !1, f.splice(1, 1);
  1839. if (l.substr(l.length - 1) === "\\") continue;
  1840. s === r && (r = []);
  1841. if (o.preFilter[h]) {
  1842. f = o.preFilter[h](f, s, d, r, e, t);
  1843. if (!f) g = i = !0;
  1844. else if (f === !0) continue
  1845. }
  1846. if (f) for (n = 0;
  1847. (j = s[n]) != null; n++) j && (i = k(j, f, n, s), p = e ^ i, d && i != null ? p ? g = !0 : s[n] = !1 : p && (r.push(j), g = !0));
  1848. if (i !== b) {
  1849. d || (s = r), a = a.replace(o.match[h], "");
  1850. if (!g) return [];
  1851. break
  1852. }
  1853. }
  1854. if (a === q) if (g == null) m.error(a);
  1855. else break;
  1856. q = a
  1857. }
  1858. return s
  1859. }, m.error = function (a) {
  1860. throw "Syntax error, unrecognized expression: " + a
  1861. };
  1862. var n = m.getText = function (a) {
  1863. var b, c, d = a.nodeType,
  1864. e = "";
  1865. if (d) {
  1866. if (d === 1) {
  1867. if (typeof a.textContent == "string") return a.textContent;
  1868. if (typeof a.innerText == "string") return a.innerText.replace(k, "");
  1869. for (a = a.firstChild; a; a = a.nextSibling) e += n(a)
  1870. } else if (d === 3 || d === 4) return a.nodeValue
  1871. } else for (b = 0; c = a[b]; b++) c.nodeType !== 8 && (e += n(c));
  1872. return e
  1873. }, o = m.selectors = {
  1874. order: ["ID", "NAME", "TAG"],
  1875. match: {
  1876. ID: /#((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
  1877. CLASS: /\.((?:[\w\u00c0-\uFFFF\-]|\\.)+)/,
  1878. NAME: /\[name=['"]*((?:[\w\u00c0-\uFFFF\-]|\\.)+)['"]*\]/,
  1879. ATTR: /\[\s*((?:[\w\u00c0-\uFFFF\-]|\\.)+)\s*(?:(\S?=)\s*(?:(['"])(.*?)\3|(#?(?:[\w\u00c0-\uFFFF\-]|\\.)*)|)|)\s*\]/,
  1880. TAG: /^((?:[\w\u00c0-\uFFFF\*\-]|\\.)+)/,
  1881. CHILD: /:(only|nth|last|first)-child(?:\(\s*(even|odd|(?:[+\-]?\d+|(?:[+\-]?\d*)?n\s*(?:[+\-]\s*\d+)?))\s*\))?/,
  1882. POS: /:(nth|eq|gt|lt|first|last|even|odd)(?:\((\d*)\))?(?=[^\-]|$)/,
  1883. PSEUDO: /:((?:[\w\u00c0-\uFFFF\-]|\\.)+)(?:\((['"]?)((?:\([^\)]+\)|[^\(\)]*)+)\2\))?/
  1884. },
  1885. leftMatch: {},
  1886. attrMap: {
  1887. "class": "className",
  1888. "for": "htmlFor"
  1889. },
  1890. attrHandle: {
  1891. href: function (a) {
  1892. return a.getAttribute("href")
  1893. },
  1894. type: function (a) {
  1895. return a.getAttribute("type")
  1896. }
  1897. },
  1898. relative: {
  1899. "+": function (a, b) {
  1900. var c = typeof b == "string",
  1901. d = c && !l.test(b),
  1902. e = c && !d;
  1903. d && (b = b.toLowerCase());
  1904. for (var f = 0, g = a.length, h; f < g; f++) if (h = a[f]) {
  1905. while ((h = h.previousSibling) && h.nodeType !== 1);
  1906. a[f] = e || h && h.nodeName.toLowerCase() === b ? h || !1 : h === b
  1907. }
  1908. e && m.filter(b, a, !0)
  1909. },
  1910. ">": function (a, b) {
  1911. var c, d = typeof b == "string",
  1912. e = 0,
  1913. f = a.length;
  1914. if (d && !l.test(b)) {
  1915. b = b.toLowerCase();
  1916. for (; e < f; e++) {
  1917. c = a[e];
  1918. if (c) {
  1919. var g = c.parentNode;
  1920. a[e] = g.nodeName.toLowerCase() === b ? g : !1
  1921. }
  1922. }
  1923. } else {
  1924. for (; e < f; e++) c = a[e], c && (a[e] = d ? c.parentNode : c.parentNode === b);
  1925. d && m.filter(b, a, !0)
  1926. }
  1927. },
  1928. "": function (a, b, c) {
  1929. var d, f = e++,
  1930. g = x;
  1931. typeof b == "string" && !l.test(b) && (b = b.toLowerCase(), d = b, g = w), g("parentNode", b, f, a, d, c)
  1932. },
  1933. "~": function (a, b, c) {
  1934. var d, f = e++,
  1935. g = x;
  1936. typeof b == "string" && !l.test(b) && (b = b.toLowerCase(), d = b, g = w), g("previousSibling", b, f, a, d, c)
  1937. }
  1938. },
  1939. find: {
  1940. ID: function (a, b, c) {
  1941. if (typeof b.getElementById != "undefined" && !c) {
  1942. var d = b.getElementById(a[1]);
  1943. return d && d.parentNode ? [d] : []
  1944. }
  1945. },
  1946. NAME: function (a, b) {
  1947. if (typeof b.getElementsByName != "undefined") {
  1948. var c = [],
  1949. d = b.getElementsByName(a[1]);
  1950. for (var e = 0, f = d.length; e < f; e++) d[e].getAttribute("name") === a[1] && c.push(d[e]);
  1951. return c.length === 0 ? null : c
  1952. }
  1953. },
  1954. TAG: function (a, b) {
  1955. if (typeof b.getElementsByTagName != "undefined") return b.getElementsByTagName(a[1])
  1956. }
  1957. },
  1958. preFilter: {
  1959. CLASS: function (a, b, c, d, e, f) {
  1960. a = " " + a[1].replace(j, "") + " ";
  1961. if (f) return a;
  1962. for (var g = 0, h;
  1963. (h = b[g]) != null; g++) h && (e ^ (h.className && (" " + h.className + " ").replace(/[\t\n\r]/g, " ").indexOf(a) >= 0) ? c || d.push(h) : c && (b[g] = !1));
  1964. return !1
  1965. },
  1966. ID: function (a) {
  1967. return a[1].replace(j, "")
  1968. },
  1969. TAG: function (a, b) {
  1970. return a[1].replace(j, "").toLowerCase()
  1971. },
  1972. CHILD: function (a) {
  1973. if (a[1] === "nth") {
  1974. a[2] || m.error(a[0]), a[2] = a[2].replace(/^\+|\s*/g, "");
  1975. var b = /(-?)(\d*)(?:n([+\-]?\d*))?/.exec(a[2] === "even" && "2n" || a[2] === "odd" && "2n+1" || !/\D/.test(a[2]) && "0n+" + a[2] || a[2]);
  1976. a[2] = b[1] + (b[2] || 1) - 0, a[3] = b[3] - 0
  1977. } else a[2] && m.error(a[0]);
  1978. a[0] = e++;
  1979. return a
  1980. },
  1981. ATTR: function (a, b, c, d, e, f) {
  1982. var g = a[1] = a[1].replace(j, "");
  1983. !f && o.attrMap[g] && (a[1] = o.attrMap[g]), a[4] = (a[4] || a[5] || "").replace(j, ""), a[2] === "~=" && (a[4] = " " + a[4] + " ");
  1984. return a
  1985. },
  1986. PSEUDO: function (b, c, d, e, f) {
  1987. if (b[1] === "not") if ((a.exec(b[3]) || "").length > 1 || /^\w/.test(b[3])) b[3] = m(b[3], null, null, c);
  1988. else {
  1989. var g = m.filter(b[3], c, d, !0 ^ f);
  1990. d || e.push.apply(e, g);
  1991. return !1
  1992. } else if (o.match.POS.test(b[0]) || o.match.CHILD.test(b[0])) return !0;
  1993. return b
  1994. },
  1995. POS: function (a) {
  1996. a.unshift(!0);
  1997. return a
  1998. }
  1999. },
  2000. filters: {
  2001. enabled: function (a) {
  2002. return a.disabled === !1 && a.type !== "hidden"
  2003. },
  2004. disabled: function (a) {
  2005. return a.disabled === !0
  2006. },
  2007. checked: function (a) {
  2008. return a.checked === !0
  2009. },
  2010. selected: function (a) {
  2011. a.parentNode && a.parentNode.selectedIndex;
  2012. return a.selected === !0
  2013. },
  2014. parent: function (a) {
  2015. return !!a.firstChild
  2016. },
  2017. empty: function (a) {
  2018. return !a.firstChild
  2019. },
  2020. has: function (a, b, c) {
  2021. return !!m(c[3], a).length
  2022. },
  2023. header: function (a) {
  2024. return /h\d/i.test(a.nodeName)
  2025. },
  2026. text: function (a) {
  2027. var b = a.getAttribute("type"),
  2028. c = a.type;
  2029. return a.nodeName.toLowerCase() === "input" && "text" === c && (b === c || b === null)
  2030. },
  2031. radio: function (a) {
  2032. return a.nodeName.toLowerCase() === "input" && "radio" === a.type
  2033. },
  2034. checkbox: function (a) {
  2035. return a.nodeName.toLowerCase() === "input" && "checkbox" === a.type
  2036. },
  2037. file: function (a) {
  2038. return a.nodeName.toLowerCase() === "input" && "file" === a.type
  2039. },
  2040. password: function (a) {
  2041. return a.nodeName.toLowerCase() === "input" && "password" === a.type
  2042. },
  2043. submit: function (a) {
  2044. var b = a.nodeName.toLowerCase();
  2045. return (b === "input" || b === "button") && "submit" === a.type
  2046. },
  2047. image: function (a) {
  2048. return a.nodeName.toLowerCase() === "input" && "image" === a.type
  2049. },
  2050. reset: function (a) {
  2051. var b = a.nodeName.toLowerCase();
  2052. return (b === "input" || b === "button") && "reset" === a.type
  2053. },
  2054. button: function (a) {
  2055. var b = a.nodeName.toLowerCase();
  2056. return b === "input" && "button" === a.type || b === "button"
  2057. },
  2058. input: function (a) {
  2059. return /input|select|textarea|button/i.test(a.nodeName)
  2060. },
  2061. focus: function (a) {
  2062. return a === a.ownerDocument.activeElement
  2063. }
  2064. },
  2065. setFilters: {
  2066. first: function (a, b) {
  2067. return b === 0
  2068. },
  2069. last: function (a, b, c, d) {
  2070. return b === d.length - 1
  2071. },
  2072. even: function (a, b) {
  2073. return b % 2 === 0
  2074. },
  2075. odd: function (a, b) {
  2076. return b % 2 === 1
  2077. },
  2078. lt: function (a, b, c) {
  2079. return b < c[3] - 0
  2080. },
  2081. gt: function (a, b, c) {
  2082. return b > c[3] - 0
  2083. },
  2084. nth: function (a, b, c) {
  2085. return c[3] - 0 === b
  2086. },
  2087. eq: function (a, b, c) {
  2088. return c[3] - 0 === b
  2089. }
  2090. },
  2091. filter: {
  2092. PSEUDO: function (a, b, c, d) {
  2093. var e = b[1],
  2094. f = o.filters[e];
  2095. if (f) return f(a, c, b, d);
  2096. if (e === "contains") return (a.textContent || a.innerText || n([a]) || "").indexOf(b[3]) >= 0;
  2097. if (e === "not") {
  2098. var g = b[3];
  2099. for (var h = 0, i = g.length; h < i; h++) if (g[h] === a) return !1;
  2100. return !0
  2101. }
  2102. m.error(e)
  2103. },
  2104. CHILD: function (a, b) {
  2105. var c, e, f, g, h, i, j, k = b[1],
  2106. l = a;
  2107. switch (k) {
  2108. case "only":
  2109. case "first":
  2110. while (l = l.previousSibling) if (l.nodeType === 1) return !1;
  2111. if (k === "first") return !0;
  2112. l = a;
  2113. case "last":
  2114. while (l = l.nextSibling) if (l.nodeType === 1) return !1;
  2115. return !0;
  2116. case "nth":
  2117. c = b[2], e = b[3];
  2118. if (c === 1 && e === 0) return !0;
  2119. f = b[0], g = a.parentNode;
  2120. if (g && (g[d] !== f || !a.nodeIndex)) {
  2121. i = 0;
  2122. for (l = g.firstChild; l; l = l.nextSibling) l.nodeType === 1 && (l.nodeIndex = ++i);
  2123. g[d] = f
  2124. }
  2125. j = a.nodeIndex - e;
  2126. return c === 0 ? j === 0 : j % c === 0 && j / c >= 0
  2127. }
  2128. },
  2129. ID: function (a, b) {
  2130. return a.nodeType === 1 && a.getAttribute("id") === b
  2131. },
  2132. TAG: function (a, b) {
  2133. return b === "*" && a.nodeType === 1 || !! a.nodeName && a.nodeName.toLowerCase() === b
  2134. },
  2135. CLASS: function (a, b) {
  2136. return (" " + (a.className || a.getAttribute("class")) + " ").indexOf(b) > -1
  2137. },
  2138. ATTR: function (a, b) {
  2139. var c = b[1],
  2140. d = m.attr ? m.attr(a, c) : o.attrHandle[c] ? o.attrHandle[c](a) : a[c] != null ? a[c] : a.getAttribute(c),
  2141. e = d + "",
  2142. f = b[2],
  2143. g = b[4];
  2144. return d == null ? f === "!=" : !f && m.attr ? d != null : f === "=" ? e === g : f === "*=" ? e.indexOf(g) >= 0 : f === "~=" ? (" " + e + " ").indexOf(g) >= 0 : g ? f === "!=" ? e !== g : f === "^=" ? e.indexOf(g) === 0 : f === "$=" ? e.substr(e.length - g.length) === g : f === "|=" ? e === g || e.substr(0, g.length + 1) === g + "-" : !1 : e && d !== !1
  2145. },
  2146. POS: function (a, b, c, d) {
  2147. var e = b[2],
  2148. f = o.setFilters[e];
  2149. if (f) return f(a, c, b, d)
  2150. }
  2151. }
  2152. }, p = o.match.POS,
  2153. q = function (a, b) {
  2154. return "\\" + (b - 0 + 1)
  2155. };
  2156. for (var r in o.match) o.match[r] = new RegExp(o.match[r].source + /(?![^\[]*\])(?![^\(]*\))/.source), o.leftMatch[r] = new RegExp(/(^(?:.|\r|\n)*?)/.source + o.match[r].source.replace(/\\(\d+)/g, q));
  2157. var s = function (a, b) {
  2158. a = Array.prototype.slice.call(a, 0);
  2159. if (b) {
  2160. b.push.apply(b, a);
  2161. return b
  2162. }
  2163. return a
  2164. };
  2165. try {
  2166. Array.prototype.slice.call(c.documentElement.childNodes, 0)[0].nodeType
  2167. } catch (t) {
  2168. s = function (a, b) {
  2169. var c = 0,
  2170. d = b || [];
  2171. if (g.call(a) === "[object Array]") Array.prototype.push.apply(d, a);
  2172. else if (typeof a.length == "number") for (var e = a.length; c < e; c++) d.push(a[c]);
  2173. else for (; a[c]; c++) d.push(a[c]);
  2174. return d
  2175. }
  2176. }
  2177. var u, v;
  2178. c.documentElement.compareDocumentPosition ? u = function (a, b) {
  2179. if (a === b) {
  2180. h = !0;
  2181. return 0
  2182. }
  2183. if (!a.compareDocumentPosition || !b.compareDocumentPosition) return a.compareDocumentPosition ? -1 : 1;
  2184. return a.compareDocumentPosition(b) & 4 ? -1 : 1
  2185. } : (u = function (a, b) {
  2186. if (a === b) {
  2187. h = !0;
  2188. return 0
  2189. }
  2190. if (a.sourceIndex && b.sourceIndex) return a.sourceIndex - b.sourceIndex;
  2191. var c, d, e = [],
  2192. f = [],
  2193. g = a.parentNode,
  2194. i = b.parentNode,
  2195. j = g;
  2196. if (g === i) return v(a, b);
  2197. if (!g) return -1;
  2198. if (!i) return 1;
  2199. while (j) e.unshift(j), j = j.parentNode;
  2200. j = i;
  2201. while (j) f.unshift(j), j = j.parentNode;
  2202. c = e.length, d = f.length;
  2203. for (var k = 0; k < c && k < d; k++) if (e[k] !== f[k]) return v(e[k], f[k]);
  2204. return k === c ? v(a, f[k], - 1) : v(e[k], b, 1)
  2205. }, v = function (a, b, c) {
  2206. if (a === b) return c;
  2207. var d = a.nextSibling;
  2208. while (d) {
  2209. if (d === b) return -1;
  2210. d = d.nextSibling
  2211. }
  2212. return 1
  2213. }),
  2214. function () {
  2215. var a = c.createElement("div"),
  2216. d = "script" + (new Date).getTime(),
  2217. e = c.documentElement;
  2218. a.innerHTML = "<a name='" + d + "'/>", e.insertBefore(a, e.firstChild), c.getElementById(d) && (o.find.ID = function (a, c, d) {
  2219. if (typeof c.getElementById != "undefined" && !d) {
  2220. var e = c.getElementById(a[1]);
  2221. return e ? e.id === a[1] || typeof e.getAttributeNode != "undefined" && e.getAttributeNode("id").nodeValue === a[1] ? [e] : b : []
  2222. }
  2223. }, o.filter.ID = function (a, b) {
  2224. var c = typeof a.getAttributeNode != "undefined" && a.getAttributeNode("id");
  2225. return a.nodeType === 1 && c && c.nodeValue === b
  2226. }), e.removeChild(a), e = a = null
  2227. }(),
  2228. function () {
  2229. var a = c.createElement("div");
  2230. a.appendChild(c.createComment("")), a.getElementsByTagName("*").length > 0 && (o.find.TAG = function (a, b) {
  2231. var c = b.getElementsByTagName(a[1]);
  2232. if (a[1] === "*") {
  2233. var d = [];
  2234. for (var e = 0; c[e]; e++) c[e].nodeType === 1 && d.push(c[e]);
  2235. c = d
  2236. }
  2237. return c
  2238. }), a.innerHTML = "<a href='#'></a>", a.firstChild && typeof a.firstChild.getAttribute != "undefined" && a.firstChild.getAttribute("href") !== "#" && (o.attrHandle.href = function (a) {
  2239. return a.getAttribute("href", 2)
  2240. }), a = null
  2241. }(), c.querySelectorAll && function () {
  2242. var a = m,
  2243. b = c.createElement("div"),
  2244. d = "__sizzle__";
  2245. b.innerHTML = "<p class='TEST'></p>";
  2246. if (!b.querySelectorAll || b.querySelectorAll(".TEST").length !== 0) {
  2247. m = function (b, e, f, g) {
  2248. e = e || c;
  2249. if (!g && !m.isXML(e)) {
  2250. var h = /^(\w+$)|^\.([\w\-]+$)|^#([\w\-]+$)/.exec(b);
  2251. if (h && (e.nodeType === 1 || e.nodeType === 9)) {
  2252. if (h[1]) return s(e.getElementsByTagName(b), f);
  2253. if (h[2] && o.find.CLASS && e.getElementsByClassName) return s(e.getElementsByClassName(h[2]), f)
  2254. }
  2255. if (e.nodeType === 9) {
  2256. if (b === "body" && e.body) return s([e.body], f);
  2257. if (h && h[3]) {
  2258. var i = e.getElementById(h[3]);
  2259. if (!i || !i.parentNode) return s([], f);
  2260. if (i.id === h[3]) return s([i], f)
  2261. }
  2262. try {
  2263. return s(e.querySelectorAll(b), f)
  2264. } catch (j) {}
  2265. } else if (e.nodeType === 1 && e.nodeName.toLowerCase() !== "object") {
  2266. var k = e,
  2267. l = e.getAttribute("id"),
  2268. n = l || d,
  2269. p = e.parentNode,
  2270. q = /^\s*[+~]/.test(b);
  2271. l ? n = n.replace(/'/g, "\\$&") : e.setAttribute("id", n), q && p && (e = e.parentNode);
  2272. try {
  2273. if (!q || p) return s(e.querySelectorAll("[id='" + n + "'] " + b), f)
  2274. } catch (r) {} finally {
  2275. l || k.removeAttribute("id")
  2276. }
  2277. }
  2278. }
  2279. return a(b, e, f, g)
  2280. };
  2281. for (var e in a) m[e] = a[e];
  2282. b = null
  2283. }
  2284. }(),
  2285. function () {
  2286. var a = c.documentElement,
  2287. b = a.matchesSelector || a.mozMatchesSelector || a.webkitMatchesSelector || a.msMatchesSelector;
  2288. if (b) {
  2289. var d = !b.call(c.createElement("div"), "div"),
  2290. e = !1;
  2291. try {
  2292. b.call(c.documentElement, "[test!='']:sizzle")
  2293. } catch (f) {
  2294. e = !0
  2295. }
  2296. m.matchesSelector = function (a, c) {
  2297. c = c.replace(/\=\s*([^'"\]]*)\s*\]/g, "='$1']");
  2298. if (!m.isXML(a)) try {
  2299. if (e || !o.match.PSEUDO.test(c) && !/!=/.test(c)) {
  2300. var f = b.call(a, c);
  2301. if (f || !d || a.document && a.document.nodeType !== 11) return f
  2302. }
  2303. } catch (g) {}
  2304. return m(c, null, null, [a]).length > 0
  2305. }
  2306. }
  2307. }(),
  2308. function () {
  2309. var a = c.createElement("div");
  2310. a.innerHTML = "<div class='test e'></div><div class='test'></div>";
  2311. if ( !! a.getElementsByClassName && a.getElementsByClassName("e").length !== 0) {
  2312. a.lastChild.className = "e";
  2313. if (a.getElementsByClassName("e").length === 1) return;
  2314. o.order.splice(1, 0, "CLASS"), o.find.CLASS = function (a, b, c) {
  2315. if (typeof b.getElementsByClassName != "undefined" && !c) return b.getElementsByClassName(a[1])
  2316. }, a = null
  2317. }
  2318. }(), c.documentElement.contains ? m.contains = function (a, b) {
  2319. return a !== b && (a.contains ? a.contains(b) : !0)
  2320. } : c.documentElement.compareDocumentPosition ? m.contains = function (a, b) {
  2321. return !!(a.compareDocumentPosition(b) & 16)
  2322. } : m.contains = function () {
  2323. return !1
  2324. }, m.isXML = function (a) {
  2325. var b = (a ? a.ownerDocument || a : 0).documentElement;
  2326. return b ? b.nodeName !== "HTML" : !1
  2327. };
  2328. var y = function (a, b, c) {
  2329. var d, e = [],
  2330. f = "",
  2331. g = b.nodeType ? [b] : b;
  2332. while (d = o.match.PSEUDO.exec(a)) f += d[0], a = a.replace(o.match.PSEUDO, "");
  2333. a = o.relative[a] ? a + "*" : a;
  2334. for (var h = 0, i = g.length; h < i; h++) m(a, g[h], e, c);
  2335. return m.filter(f, e)
  2336. };
  2337. m.attr = f.attr, m.selectors.attrMap = {}, f.find = m, f.expr = m.selectors, f.expr[":"] = f.expr.filters, f.unique = m.uniqueSort, f.text = m.getText, f.isXMLDoc = m.isXML, f.contains = m.contains
  2338. }();
  2339. var O = /Until$/,
  2340. P = /^(?:parents|prevUntil|prevAll)/,
  2341. Q = /,/,
  2342. R = /^.[^:#\[\.,]*$/,
  2343. S = Array.prototype.slice,
  2344. T = f.expr.match.POS,
  2345. U = {
  2346. children: !0,
  2347. contents: !0,
  2348. next: !0,
  2349. prev: !0
  2350. };
  2351. f.fn.extend({
  2352. find: function (a) {
  2353. var b = this,
  2354. c, d;
  2355. if (typeof a != "string") return f(a).filter(function () {
  2356. for (c = 0, d = b.length; c < d; c++) if (f.contains(b[c], this)) return !0
  2357. });
  2358. var e = this.pushStack("", "find", a),
  2359. g, h, i;
  2360. for (c = 0, d = this.length; c < d; c++) {
  2361. g = e.length, f.find(a, this[c], e);
  2362. if (c > 0) for (h = g; h < e.length; h++) for (i = 0; i < g; i++) if (e[i] === e[h]) {
  2363. e.splice(h--, 1);
  2364. break
  2365. }
  2366. }
  2367. return e
  2368. },
  2369. has: function (a) {
  2370. var b = f(a);
  2371. return this.filter(function () {
  2372. for (var a = 0, c = b.length; a < c; a++) if (f.contains(this, b[a])) return !0
  2373. })
  2374. },
  2375. not: function (a) {
  2376. return this.pushStack(W(this, a, !1), "not", a)
  2377. },
  2378. filter: function (a) {
  2379. return this.pushStack(W(this, a, !0), "filter", a)
  2380. },
  2381. is: function (a) {
  2382. return !!a && (typeof a == "string" ? T.test(a) ? f(a, this.context).index(this[0]) >= 0 : f.filter(a, this).length > 0 : this.filter(a).length > 0)
  2383. },
  2384. closest: function (a, b) {
  2385. var c = [],
  2386. d, e, g = this[0];
  2387. if (f.isArray(a)) {
  2388. var h = 1;
  2389. while (g && g.ownerDocument && g !== b) {
  2390. for (d = 0; d < a.length; d++) f(g).is(a[d]) && c.push({
  2391. selector: a[d],
  2392. elem: g,
  2393. level: h
  2394. });
  2395. g = g.parentNode, h++
  2396. }
  2397. return c
  2398. }
  2399. var i = T.test(a) || typeof a != "string" ? f(a, b || this.context) : 0;
  2400. for (d = 0, e = this.length; d < e; d++) {
  2401. g = this[d];
  2402. while (g) {
  2403. if (i ? i.index(g) > -1 : f.find.matchesSelector(g, a)) {
  2404. c.push(g);
  2405. break
  2406. }
  2407. g = g.parentNode;
  2408. if (!g || !g.ownerDocument || g === b || g.nodeType === 11) break
  2409. }
  2410. }
  2411. c = c.length > 1 ? f.unique(c) : c;
  2412. return this.pushStack(c, "closest", a)
  2413. },
  2414. index: function (a) {
  2415. if (!a) return this[0] && this[0].parentNode ? this.prevAll().length : -1;
  2416. if (typeof a == "string") return f.inArray(this[0], f(a));
  2417. return f.inArray(a.jquery ? a[0] : a, this)
  2418. },
  2419. add: function (a, b) {
  2420. var c = typeof a == "string" ? f(a, b) : f.makeArray(a && a.nodeType ? [a] : a),
  2421. d = f.merge(this.get(), c);
  2422. return this.pushStack(V(c[0]) || V(d[0]) ? d : f.unique(d))
  2423. },
  2424. andSelf: function () {
  2425. return this.add(this.prevObject)
  2426. }
  2427. }), f.each({
  2428. parent: function (a) {
  2429. var b = a.parentNode;
  2430. return b && b.nodeType !== 11 ? b : null
  2431. },
  2432. parents: function (a) {
  2433. return f.dir(a, "parentNode")
  2434. },
  2435. parentsUntil: function (a, b, c) {
  2436. return f.dir(a, "parentNode", c)
  2437. },
  2438. next: function (a) {
  2439. return f.nth(a, 2, "nextSibling")
  2440. },
  2441. prev: function (a) {
  2442. return f.nth(a, 2, "previousSibling")
  2443. },
  2444. nextAll: function (a) {
  2445. return f.dir(a, "nextSibling")
  2446. },
  2447. prevAll: function (a) {
  2448. return f.dir(a, "previousSibling")
  2449. },
  2450. nextUntil: function (a, b, c) {
  2451. return f.dir(a, "nextSibling", c)
  2452. },
  2453. prevUntil: function (a, b, c) {
  2454. return f.dir(a, "previousSibling", c)
  2455. },
  2456. siblings: function (a) {
  2457. return f.sibling(a.parentNode.firstChild, a)
  2458. },
  2459. children: function (a) {
  2460. return f.sibling(a.firstChild)
  2461. },
  2462. contents: function (a) {
  2463. return f.nodeName(a, "iframe") ? a.contentDocument || a.contentWindow.document : f.makeArray(a.childNodes)
  2464. }
  2465. }, function (a, b) {
  2466. f.fn[a] = function (c, d) {
  2467. var e = f.map(this, b, c),
  2468. g = S.call(arguments);
  2469. O.test(a) || (d = c), d && typeof d == "string" && (e = f.filter(d, e)), e = this.length > 1 && !U[a] ? f.unique(e) : e, (this.length > 1 || Q.test(d)) && P.test(a) && (e = e.reverse());
  2470. return this.pushStack(e, a, g.join(","))
  2471. }
  2472. }), f.extend({
  2473. filter: function (a, b, c) {
  2474. c && (a = ":not(" + a + ")");
  2475. return b.length === 1 ? f.find.matchesSelector(b[0], a) ? [b[0]] : [] : f.find.matches(a, b)
  2476. },
  2477. dir: function (a, c, d) {
  2478. var e = [],
  2479. g = a[c];
  2480. while (g && g.nodeType !== 9 && (d === b || g.nodeType !== 1 || !f(g).is(d))) g.nodeType === 1 && e.push(g), g = g[c];
  2481. return e
  2482. },
  2483. nth: function (a, b, c, d) {
  2484. b = b || 1;
  2485. var e = 0;
  2486. for (; a; a = a[c]) if (a.nodeType === 1 && ++e === b) break;
  2487. return a
  2488. },
  2489. sibling: function (a, b) {
  2490. var c = [];
  2491. for (; a; a = a.nextSibling) a.nodeType === 1 && a !== b && c.push(a);
  2492. return c
  2493. }
  2494. });
  2495. var Y = "abbr article aside audio canvas datalist details figcaption figure footer header hgroup mark meter nav output progress section summary time video",
  2496. Z = / jQuery\d+="(?:\d+|null)"/g,
  2497. $ = /^\s+/,
  2498. _ = /<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/ig,
  2499. ba = /<([\w:]+)/,
  2500. bb = /<tbody/i,
  2501. bc = /<|&#?\w+;/,
  2502. bd = /<(?:script|style)/i,
  2503. be = /<(?:script|object|embed|option|style)/i,
  2504. bf = new RegExp("<(?:" + Y.replace(" ", "|") + ")", "i"),
  2505. bg = /checked\s*(?:[^=]|=\s*.checked.)/i,
  2506. bh = /\/(java|ecma)script/i,
  2507. bi = /^\s*<!(?:\[CDATA\[|\-\-)/,
  2508. bj = {
  2509. option: [1, "<select multiple='multiple'>", "</select>"],
  2510. legend: [1, "<fieldset>", "</fieldset>"],
  2511. thead: [1, "<table>", "</table>"],
  2512. tr: [2, "<table><tbody>", "</tbody></table>"],
  2513. td: [3, "<table><tbody><tr>", "</tr></tbody></table>"],
  2514. col: [2, "<table><tbody></tbody><colgroup>", "</colgroup></table>"],
  2515. area: [1, "<map>", "</map>"],
  2516. _default: [0, "", ""]
  2517. }, bk = X(c);
  2518. bj.optgroup = bj.option, bj.tbody = bj.tfoot = bj.colgroup = bj.caption = bj.thead, bj.th = bj.td, f.support.htmlSerialize || (bj._default = [1, "div<div>", "</div>"]), f.fn.extend({
  2519. text: function (a) {
  2520. if (f.isFunction(a)) return this.each(function (b) {
  2521. var c = f(this);
  2522. c.text(a.call(this, b, c.text()))
  2523. });
  2524. if (typeof a != "object" && a !== b) return this.empty().append((this[0] && this[0].ownerDocument || c).createTextNode(a));
  2525. return f.text(this)
  2526. },
  2527. wrapAll: function (a) {
  2528. if (f.isFunction(a)) return this.each(function (b) {
  2529. f(this).wrapAll(a.call(this, b))
  2530. });
  2531. if (this[0]) {
  2532. var b = f(a, this[0].ownerDocument).eq(0).clone(!0);
  2533. this[0].parentNode && b.insertBefore(this[0]), b.map(function () {
  2534. var a = this;
  2535. while (a.firstChild && a.firstChild.nodeType === 1) a = a.firstChild;
  2536. return a
  2537. }).append(this)
  2538. }
  2539. return this
  2540. },
  2541. wrapInner: function (a) {
  2542. if (f.isFunction(a)) return this.each(function (b) {
  2543. f(this).wrapInner(a.call(this, b))
  2544. });
  2545. return this.each(function () {
  2546. var b = f(this),
  2547. c = b.contents();
  2548. c.length ? c.wrapAll(a) : b.append(a)
  2549. })
  2550. },
  2551. wrap: function (a) {
  2552. return this.each(function () {
  2553. f(this).wrapAll(a)
  2554. })
  2555. },
  2556. unwrap: function () {
  2557. return this.parent().each(function () {
  2558. f.nodeName(this, "body") || f(this).replaceWith(this.childNodes)
  2559. }).end()
  2560. },
  2561. append: function () {
  2562. return this.domManip(arguments, !0, function (a) {
  2563. this.nodeType === 1 && this.appendChild(a)
  2564. })
  2565. },
  2566. prepend: function () {
  2567. return this.domManip(arguments, !0, function (a) {
  2568. this.nodeType === 1 && this.insertBefore(a, this.firstChild)
  2569. })
  2570. },
  2571. before: function () {
  2572. if (this[0] && this[0].parentNode) return this.domManip(arguments, !1, function (a) {
  2573. this.parentNode.insertBefore(a, this)
  2574. });
  2575. if (arguments.length) {
  2576. var a = f(arguments[0]);
  2577. a.push.apply(a, this.toArray());
  2578. return this.pushStack(a, "before", arguments)
  2579. }
  2580. },
  2581. after: function () {
  2582. if (this[0] && this[0].parentNode) return this.domManip(arguments, !1, function (a) {
  2583. this.parentNode.insertBefore(a, this.nextSibling)
  2584. });
  2585. if (arguments.length) {
  2586. var a = this.pushStack(this, "after", arguments);
  2587. a.push.apply(a, f(arguments[0]).toArray());
  2588. return a
  2589. }
  2590. },
  2591. remove: function (a, b) {
  2592. for (var c = 0, d;
  2593. (d = this[c]) != null; c++) if (!a || f.filter(a, [d]).length)!b && d.nodeType === 1 && (f.cleanData(d.getElementsByTagName("*")), f.cleanData([d])), d.parentNode && d.parentNode.removeChild(d);
  2594. return this
  2595. },
  2596. empty: function () {
  2597. for (var a = 0, b;
  2598. (b = this[a]) != null; a++) {
  2599. b.nodeType === 1 && f.cleanData(b.getElementsByTagName("*"));
  2600. while (b.firstChild) b.removeChild(b.firstChild)
  2601. }
  2602. return this
  2603. },
  2604. clone: function (a, b) {
  2605. a = a == null ? !1 : a, b = b == null ? a : b;
  2606. return this.map(function () {
  2607. return f.clone(this, a, b)
  2608. })
  2609. },
  2610. html: function (a) {
  2611. if (a === b) return this[0] && this[0].nodeType === 1 ? this[0].innerHTML.replace(Z, "") : null;
  2612. if (typeof a == "string" && !bd.test(a) && (f.support.leadingWhitespace || !$.test(a)) && !bj[(ba.exec(a) || ["", ""])[1].toLowerCase()]) {
  2613. a = a.replace(_, "<$1></$2>");
  2614. try {
  2615. for (var c = 0, d = this.length; c < d; c++) this[c].nodeType === 1 && (f.cleanData(this[c].getElementsByTagName("*")), this[c].innerHTML = a)
  2616. } catch (e) {
  2617. this.empty().append(a)
  2618. }
  2619. } else f.isFunction(a) ? this.each(function (b) {
  2620. var c = f(this);
  2621. c.html(a.call(this, b, c.html()))
  2622. }) : this.empty().append(a);
  2623. return this
  2624. },
  2625. replaceWith: function (a) {
  2626. if (this[0] && this[0].parentNode) {
  2627. if (f.isFunction(a)) return this.each(function (b) {
  2628. var c = f(this),
  2629. d = c.html();
  2630. c.replaceWith(a.call(this, b, d))
  2631. });
  2632. typeof a != "string" && (a = f(a).detach());
  2633. return this.each(function () {
  2634. var b = this.nextSibling,
  2635. c = this.parentNode;
  2636. f(this).remove(), b ? f(b).before(a) : f(c).append(a)
  2637. })
  2638. }
  2639. return this.length ? this.pushStack(f(f.isFunction(a) ? a() : a), "replaceWith", a) : this
  2640. },
  2641. detach: function (a) {
  2642. return this.remove(a, !0)
  2643. },
  2644. domManip: function (a, c, d) {
  2645. var e, g, h, i, j = a[0],
  2646. k = [];
  2647. if (!f.support.checkClone && arguments.length === 3 && typeof j == "string" && bg.test(j)) return this.each(function () {
  2648. f(this).domManip(a, c, d, !0)
  2649. });
  2650. if (f.isFunction(j)) return this.each(function (e) {
  2651. var g = f(this);
  2652. a[0] = j.call(this, e, c ? g.html() : b), g.domManip(a, c, d)
  2653. });
  2654. if (this[0]) {
  2655. i = j && j.parentNode, f.support.parentNode && i && i.nodeType === 11 && i.childNodes.length === this.length ? e = {
  2656. fragment: i
  2657. } : e = f.buildFragment(a, this, k), h = e.fragment, h.childNodes.length === 1 ? g = h = h.firstChild : g = h.firstChild;
  2658. if (g) {
  2659. c = c && f.nodeName(g, "tr");
  2660. for (var l = 0, m = this.length, n = m - 1; l < m; l++) d.call(c ? bl(this[l], g) : this[l], e.cacheable || m > 1 && l < n ? f.clone(h, !0, !0) : h)
  2661. }
  2662. k.length && f.each(k, br)
  2663. }
  2664. return this
  2665. }
  2666. }), f.buildFragment = function (a, b, d) {
  2667. var e, g, h, i, j = a[0];
  2668. b && b[0] && (i = b[0].ownerDocument || b[0]), i.createDocumentFragment || (i = c), a.length === 1 && typeof j == "string" && j.length < 512 && i === c && j.charAt(0) === "<" && !be.test(j) && (f.support.checkClone || !bg.test(j)) && !f.support.unknownElems && bf.test(j) && (g = !0, h = f.fragments[j], h && h !== 1 && (e = h)), e || (e = i.createDocumentFragment(), f.clean(a, i, e, d)), g && (f.fragments[j] = h ? e : 1);
  2669. return {
  2670. fragment: e,
  2671. cacheable: g
  2672. }
  2673. }, f.fragments = {}, f.each({
  2674. appendTo: "append",
  2675. prependTo: "prepend",
  2676. insertBefore: "before",
  2677. insertAfter: "after",
  2678. replaceAll: "replaceWith"
  2679. }, function (a, b) {
  2680. f.fn[a] = function (c) {
  2681. var d = [],
  2682. e = f(c),
  2683. g = this.length === 1 && this[0].parentNode;
  2684. if (g && g.nodeType === 11 && g.childNodes.length === 1 && e.length === 1) {
  2685. e[b](this[0]);
  2686. return this
  2687. }
  2688. for (var h = 0, i = e.length; h < i; h++) {
  2689. var j = (h > 0 ? this.clone(!0) : this).get();
  2690. f(e[h])[b](j), d = d.concat(j)
  2691. }
  2692. return this.pushStack(d, a, e.selector)
  2693. }
  2694. }), f.extend({
  2695. clone: function (a, b, c) {
  2696. var d = a.cloneNode(!0),
  2697. e, g, h;
  2698. if ((!f.support.noCloneEvent || !f.support.noCloneChecked) && (a.nodeType === 1 || a.nodeType === 11) && !f.isXMLDoc(a)) {
  2699. bn(a, d), e = bo(a), g = bo(d);
  2700. for (h = 0; e[h]; ++h) g[h] && bn(e[h], g[h])
  2701. }
  2702. if (b) {
  2703. bm(a, d);
  2704. if (c) {
  2705. e = bo(a), g = bo(d);
  2706. for (h = 0; e[h]; ++h) bm(e[h], g[h])
  2707. }
  2708. }
  2709. e = g = null;
  2710. return d
  2711. },
  2712. clean: function (a, b, d, e) {
  2713. var g;
  2714. b = b || c, typeof b.createElement == "undefined" && (b = b.ownerDocument || b[0] && b[0].ownerDocument || c);
  2715. var h = [],
  2716. i;
  2717. for (var j = 0, k;
  2718. (k = a[j]) != null; j++) {
  2719. typeof k == "number" && (k += "");
  2720. if (!k) continue;
  2721. if (typeof k == "string") if (!bc.test(k)) k = b.createTextNode(k);
  2722. else {
  2723. k = k.replace(_, "<$1></$2>");
  2724. var l = (ba.exec(k) || ["", ""])[1].toLowerCase(),
  2725. m = bj[l] || bj._default,
  2726. n = m[0],
  2727. o = b.createElement("div");
  2728. b === c ? bk.appendChild(o) : X(b).appendChild(o), o.innerHTML = m[1] + k + m[2];
  2729. while (n--) o = o.lastChild;
  2730. if (!f.support.tbody) {
  2731. var p = bb.test(k),
  2732. q = l === "table" && !p ? o.firstChild && o.firstChild.childNodes : m[1] === "<table>" && !p ? o.childNodes : [];
  2733. for (i = q.length - 1; i >= 0; --i) f.nodeName(q[i], "tbody") && !q[i].childNodes.length && q[i].parentNode.removeChild(q[i])
  2734. }!f.support.leadingWhitespace && $.test(k) && o.insertBefore(b.createTextNode($.exec(k)[0]), o.firstChild), k = o.childNodes
  2735. }
  2736. var r;
  2737. if (!f.support.appendChecked) if (k[0] && typeof (r = k.length) == "number") for (i = 0; i < r; i++) bq(k[i]);
  2738. else bq(k);
  2739. k.nodeType ? h.push(k) : h = f.merge(h, k)
  2740. }
  2741. if (d) {
  2742. g = function (a) {
  2743. return !a.type || bh.test(a.type)
  2744. };
  2745. for (j = 0; h[j]; j++) if (e && f.nodeName(h[j], "script") && (!h[j].type || h[j].type.toLowerCase() === "text/javascript")) e.push(h[j].parentNode ? h[j].parentNode.removeChild(h[j]) : h[j]);
  2746. else {
  2747. if (h[j].nodeType === 1) {
  2748. var s = f.grep(h[j].getElementsByTagName("script"), g);
  2749. h.splice.apply(h, [j + 1, 0].concat(s))
  2750. }
  2751. d.appendChild(h[j])
  2752. }
  2753. }
  2754. return h
  2755. },
  2756. cleanData: function (a) {
  2757. var b, c, d = f.cache,
  2758. e = f.event.special,
  2759. g = f.support.deleteExpando;
  2760. for (var h = 0, i;
  2761. (i = a[h]) != null; h++) {
  2762. if (i.nodeName && f.noData[i.nodeName.toLowerCase()]) continue;
  2763. c = i[f.expando];
  2764. if (c) {
  2765. b = d[c];
  2766. if (b && b.events) {
  2767. for (var j in b.events) e[j] ? f.event.remove(i, j) : f.removeEvent(i, j, b.handle);
  2768. b.handle && (b.handle.elem = null)
  2769. }
  2770. g ? delete i[f.expando] : i.removeAttribute && i.removeAttribute(f.expando), delete d[c]
  2771. }
  2772. }
  2773. }
  2774. });
  2775. var bs = /alpha\([^)]*\)/i,
  2776. bt = /opacity=([^)]*)/,
  2777. bu = /([A-Z]|^ms)/g,
  2778. bv = /^-?\d+(?:px)?$/i,
  2779. bw = /^-?\d/,
  2780. bx = /^([\-+])=([\-+.\de]+)/,
  2781. by = {
  2782. position: "absolute",
  2783. visibility: "hidden",
  2784. display: "block"
  2785. }, bz = ["Left", "Right"],
  2786. bA = ["Top", "Bottom"],
  2787. bB, bC, bD;
  2788. f.fn.css = function (a, c) {
  2789. if (arguments.length === 2 && c === b) return this;
  2790. return f.access(this, a, c, !0, function (a, c, d) {
  2791. return d !== b ? f.style(a, c, d) : f.css(a, c)
  2792. })
  2793. }, f.extend({
  2794. cssHooks: {
  2795. opacity: {
  2796. get: function (a, b) {
  2797. if (b) {
  2798. var c = bB(a, "opacity", "opacity");
  2799. return c === "" ? "1" : c
  2800. }
  2801. return a.style.opacity
  2802. }
  2803. }
  2804. },
  2805. cssNumber: {
  2806. fillOpacity: !0,
  2807. fontWeight: !0,
  2808. lineHeight: !0,
  2809. opacity: !0,
  2810. orphans: !0,
  2811. widows: !0,
  2812. zIndex: !0,
  2813. zoom: !0
  2814. },
  2815. cssProps: {
  2816. "float": f.support.cssFloat ? "cssFloat" : "styleFloat"
  2817. },
  2818. style: function (a, c, d, e) {
  2819. if ( !! a && a.nodeType !== 3 && a.nodeType !== 8 && !! a.style) {
  2820. var g, h, i = f.camelCase(c),
  2821. j = a.style,
  2822. k = f.cssHooks[i];
  2823. c = f.cssProps[i] || i;
  2824. if (d === b) {
  2825. if (k && "get" in k && (g = k.get(a, !1, e)) !== b) return g;
  2826. return j[c]
  2827. }
  2828. h = typeof d, h === "string" && (g = bx.exec(d)) && (d = +(g[1] + 1) * +g[2] + parseFloat(f.css(a, c)), h = "number");
  2829. if (d == null || h === "number" && isNaN(d)) return;
  2830. h === "number" && !f.cssNumber[i] && (d += "px");
  2831. if (!k || !("set" in k) || (d = k.set(a, d)) !== b) try {
  2832. j[c] = d
  2833. } catch (l) {}
  2834. }
  2835. },
  2836. css: function (a, c, d) {
  2837. var e, g;
  2838. c = f.camelCase(c), g = f.cssHooks[c], c = f.cssProps[c] || c, c === "cssFloat" && (c = "float");
  2839. if (g && "get" in g && (e = g.get(a, !0, d)) !== b) return e;
  2840. if (bB) return bB(a, c)
  2841. },
  2842. swap: function (a, b, c) {
  2843. var d = {};
  2844. for (var e in b) d[e] = a.style[e], a.style[e] = b[e];
  2845. c.call(a);
  2846. for (e in b) a.style[e] = d[e]
  2847. }
  2848. }), f.curCSS = f.css, f.each(["height", "width"], function (a, b) {
  2849. f.cssHooks[b] = {
  2850. get: function (a, c, d) {
  2851. var e;
  2852. if (c) {
  2853. if (a.offsetWidth !== 0) return bE(a, b, d);
  2854. f.swap(a, by, function () {
  2855. e = bE(a, b, d)
  2856. });
  2857. return e
  2858. }
  2859. },
  2860. set: function (a, b) {
  2861. if (!bv.test(b)) return b;
  2862. b = parseFloat(b);
  2863. if (b >= 0) return b + "px"
  2864. }
  2865. }
  2866. }), f.support.opacity || (f.cssHooks.opacity = {
  2867. get: function (a, b) {
  2868. return bt.test((b && a.currentStyle ? a.currentStyle.filter : a.style.filter) || "") ? parseFloat(RegExp.$1) / 100 + "" : b ? "1" : ""
  2869. },
  2870. set: function (a, b) {
  2871. var c = a.style,
  2872. d = a.currentStyle,
  2873. e = f.isNumeric(b) ? "alpha(opacity=" + b * 100 + ")" : "",
  2874. g = d && d.filter || c.filter || "";
  2875. c.zoom = 1;
  2876. if (b >= 1 && f.trim(g.replace(bs, "")) === "") {
  2877. c.removeAttribute("filter");
  2878. if (d && !d.filter) return
  2879. }
  2880. c.filter = bs.test(g) ? g.replace(bs, e) : g + " " + e
  2881. }
  2882. }), f(function () {
  2883. f.support.reliableMarginRight || (f.cssHooks.marginRight = {
  2884. get: function (a, b) {
  2885. var c;
  2886. f.swap(a, {
  2887. display: "inline-block"
  2888. }, function () {
  2889. b ? c = bB(a, "margin-right", "marginRight") : c = a.style.marginRight
  2890. });
  2891. return c
  2892. }
  2893. })
  2894. }), c.defaultView && c.defaultView.getComputedStyle && (bC = function (a, c) {
  2895. var d, e, g;
  2896. c = c.replace(bu, "-$1").toLowerCase();
  2897. if (!(e = a.ownerDocument.defaultView)) return b;
  2898. if (g = e.getComputedStyle(a, null)) d = g.getPropertyValue(c), d === "" && !f.contains(a.ownerDocument.documentElement, a) && (d = f.style(a, c));
  2899. return d
  2900. }), c.documentElement.currentStyle && (bD = function (a, b) {
  2901. var c, d, e, f = a.currentStyle && a.currentStyle[b],
  2902. g = a.style;
  2903. f === null && g && (e = g[b]) && (f = e), !bv.test(f) && bw.test(f) && (c = g.left, d = a.runtimeStyle && a.runtimeStyle.left, d && (a.runtimeStyle.left = a.currentStyle.left), g.left = b === "fontSize" ? "1em" : f || 0, f = g.pixelLeft + "px", g.left = c, d && (a.runtimeStyle.left = d));
  2904. return f === "" ? "auto" : f
  2905. }), bB = bC || bD, f.expr && f.expr.filters && (f.expr.filters.hidden = function (a) {
  2906. var b = a.offsetWidth,
  2907. c = a.offsetHeight;
  2908. return b === 0 && c === 0 || !f.support.reliableHiddenOffsets && (a.style && a.style.display || f.css(a, "display")) === "none"
  2909. }, f.expr.filters.visible = function (a) {
  2910. return !f.expr.filters.hidden(a)
  2911. });
  2912. var bF = /%20/g,
  2913. bG = /\[\]$/,
  2914. bH = /\r?\n/g,
  2915. bI = /#.*$/,
  2916. bJ = /^(.*?):[ \t]*([^\r\n]*)\r?$/mg,
  2917. bK = /^(?:color|date|datetime|datetime-local|email|hidden|month|number|password|range|search|tel|text|time|url|week)$/i,
  2918. bL = /^(?:about|app|app\-storage|.+\-extension|file|res|widget):$/,
  2919. bM = /^(?:GET|HEAD)$/,
  2920. bN = /^\/\//,
  2921. bO = /\?/,
  2922. bP = /<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,
  2923. bQ = /^(?:select|textarea)/i,
  2924. bR = /\s+/,
  2925. bS = /([?&])_=[^&]*/,
  2926. bT = /^([\w\+\.\-]+:)(?:\/\/([^\/?#:]*)(?::(\d+))?)?/,
  2927. bU = f.fn.load,
  2928. bV = {}, bW = {}, bX, bY, bZ = ["*/"] + ["*"];
  2929. try {
  2930. bX = e.href
  2931. } catch (b$) {
  2932. bX = c.createElement("a"), bX.href = "", bX = bX.href
  2933. }
  2934. bY = bT.exec(bX.toLowerCase()) || [], f.fn.extend({
  2935. load: function (a, c, d) {
  2936. if (typeof a != "string" && bU) return bU.apply(this, arguments);
  2937. if (!this.length) return this;
  2938. var e = a.indexOf(" ");
  2939. if (e >= 0) {
  2940. var g = a.slice(e, a.length);
  2941. a = a.slice(0, e)
  2942. }
  2943. var h = "GET";
  2944. c && (f.isFunction(c) ? (d = c, c = b) : typeof c == "object" && (c = f.param(c, f.ajaxSettings.traditional), h = "POST"));
  2945. var i = this;
  2946. f.ajax({
  2947. url: a,
  2948. type: h,
  2949. dataType: "html",
  2950. data: c,
  2951. complete: function (a, b, c) {
  2952. c = a.responseText, a.isResolved() && (a.done(function (a) {
  2953. c = a
  2954. }), i.html(g ? f("<div>").append(c.replace(bP, "")).find(g) : c)), d && i.each(d, [c, b, a])
  2955. }
  2956. });
  2957. return this
  2958. },
  2959. serialize: function () {
  2960. return f.param(this.serializeArray())
  2961. },
  2962. serializeArray: function () {
  2963. return this.map(function () {
  2964. return this.elements ? f.makeArray(this.elements) : this
  2965. }).filter(function () {
  2966. return this.name && !this.disabled && (this.checked || bQ.test(this.nodeName) || bK.test(this.type))
  2967. }).map(function (a, b) {
  2968. var c = f(this).val();
  2969. return c == null ? null : f.isArray(c) ? f.map(c, function (a, c) {
  2970. return {
  2971. name: b.name,
  2972. value: a.replace(bH, "\r\n")
  2973. }
  2974. }) : {
  2975. name: b.name,
  2976. value: c.replace(bH, "\r\n")
  2977. }
  2978. }).get()
  2979. }
  2980. }), f.each("ajaxStart ajaxStop ajaxComplete ajaxError ajaxSuccess ajaxSend".split(" "), function (a, b) {
  2981. f.fn[b] = function (a) {
  2982. return this.bind(b, a)
  2983. }
  2984. }), f.each(["get", "post"], function (a, c) {
  2985. f[c] = function (a, d, e, g) {
  2986. f.isFunction(d) && (g = g || e, e = d, d = b);
  2987. return f.ajax({
  2988. type: c,
  2989. url: a,
  2990. data: d,
  2991. success: e,
  2992. dataType: g
  2993. })
  2994. }
  2995. }), f.extend({
  2996. getScript: function (a, c) {
  2997. return f.get(a, b, c, "script")
  2998. },
  2999. getJSON: function (a, b, c) {
  3000. return f.get(a, b, c, "json")
  3001. },
  3002. ajaxSetup: function (a, b) {
  3003. b ? cb(a, f.ajaxSettings) : (b = a, a = f.ajaxSettings), cb(a, b);
  3004. return a
  3005. },
  3006. ajaxSettings: {
  3007. url: bX,
  3008. isLocal: bL.test(bY[1]),
  3009. global: !0,
  3010. type: "GET",
  3011. contentType: "application/x-www-form-urlencoded",
  3012. processData: !0,
  3013. async: !0,
  3014. accepts: {
  3015. xml: "application/xml, text/xml",
  3016. html: "text/html",
  3017. text: "text/plain",
  3018. json: "application/json, text/javascript",
  3019. "*": bZ
  3020. },
  3021. contents: {
  3022. xml: /xml/,
  3023. html: /html/,
  3024. json: /json/
  3025. },
  3026. responseFields: {
  3027. xml: "responseXML",
  3028. text: "responseText"
  3029. },
  3030. converters: {
  3031. "* text": a.String,
  3032. "text html": !0,
  3033. "text json": f.parseJSON,
  3034. "text xml": f.parseXML
  3035. },
  3036. flatOptions: {
  3037. context: !0,
  3038. url: !0
  3039. }
  3040. },
  3041. ajaxPrefilter: b_(bV),
  3042. ajaxTransport: b_(bW),
  3043. ajax: function (a, c) {
  3044. function w(a, c, l, m) {
  3045. if (s !== 2) {
  3046. s = 2, q && clearTimeout(q), p = b, n = m || "", v.readyState = a > 0 ? 4 : 0;
  3047. var o, r, u, w = c,
  3048. x = l ? cd(d, v, l) : b,
  3049. y, z;
  3050. if (a >= 200 && a < 300 || a === 304) {
  3051. if (d.ifModified) {
  3052. if (y = v.getResponseHeader("Last-Modified")) f.lastModified[k] = y;
  3053. if (z = v.getResponseHeader("Etag")) f.etag[k] = z
  3054. }
  3055. if (a === 304) w = "notmodified", o = !0;
  3056. else try {
  3057. r = ce(d, x), w = "success", o = !0
  3058. } catch (A) {
  3059. w = "parsererror", u = A
  3060. }
  3061. } else {
  3062. u = w;
  3063. if (!w || a) w = "error", a < 0 && (a = 0)
  3064. }
  3065. v.status = a, v.statusText = "" + (c || w), o ? h.resolveWith(e, [r, w, v]) : h.rejectWith(e, [v, w, u]), v.statusCode(j), j = b, t && g.trigger("ajax" + (o ? "Success" : "Error"), [v, d, o ? r : u]), i.fireWith(e, [v, w]), t && (g.trigger("ajaxComplete", [v, d]), --f.active || f.event.trigger("ajaxStop"))
  3066. }
  3067. }
  3068. typeof a == "object" && (c = a, a = b), c = c || {};
  3069. var d = f.ajaxSetup({}, c),
  3070. e = d.context || d,
  3071. g = e !== d && (e.nodeType || e instanceof f) ? f(e) : f.event,
  3072. h = f.Deferred(),
  3073. i = f.Callbacks("once memory"),
  3074. j = d.statusCode || {}, k, l = {}, m = {}, n, o, p, q, r, s = 0,
  3075. t, u, v = {
  3076. readyState: 0,
  3077. setRequestHeader: function (a, b) {
  3078. if (!s) {
  3079. var c = a.toLowerCase();
  3080. a = m[c] = m[c] || a, l[a] = b
  3081. }
  3082. return this
  3083. },
  3084. getAllResponseHeaders: function () {
  3085. return s === 2 ? n : null
  3086. },
  3087. getResponseHeader: function (a) {
  3088. var c;
  3089. if (s === 2) {
  3090. if (!o) {
  3091. o = {};
  3092. while (c = bJ.exec(n)) o[c[1].toLowerCase()] = c[2]
  3093. }
  3094. c = o[a.toLowerCase()]
  3095. }
  3096. return c === b ? null : c
  3097. },
  3098. overrideMimeType: function (a) {
  3099. s || (d.mimeType = a);
  3100. return this
  3101. },
  3102. abort: function (a) {
  3103. a = a || "abort", p && p.abort(a), w(0, a);
  3104. return this
  3105. }
  3106. };
  3107. h.promise(v), v.success = v.done, v.error = v.fail, v.complete = i.add, v.statusCode = function (a) {
  3108. if (a) {
  3109. var b;
  3110. if (s < 2) for (b in a) j[b] = [j[b], a[b]];
  3111. else b = a[v.status], v.then(b, b)
  3112. }
  3113. return this
  3114. }, d.url = ((a || d.url) + "").replace(bI, "").replace(bN, bY[1] + "//"), d.dataTypes = f.trim(d.dataType || "*").toLowerCase().split(bR), d.crossDomain == null && (r = bT.exec(d.url.toLowerCase()), d.crossDomain = !(!r || r[1] == bY[1] && r[2] == bY[2] && (r[3] || (r[1] === "http:" ? 80 : 443)) == (bY[3] || (bY[1] === "http:" ? 80 : 443)))), d.data && d.processData && typeof d.data != "string" && (d.data = f.param(d.data, d.traditional)), ca(bV, d, c, v);
  3115. if (s === 2) return !1;
  3116. t = d.global, d.type = d.type.toUpperCase(), d.hasContent = !bM.test(d.type), t && f.active++ === 0 && f.event.trigger("ajaxStart");
  3117. if (!d.hasContent) {
  3118. d.data && (d.url += (bO.test(d.url) ? "&" : "?") + d.data, delete d.data), k = d.url;
  3119. if (d.cache === !1) {
  3120. var x = f.now(),
  3121. y = d.url.replace(bS, "$1_=" + x);
  3122. d.url = y + (y === d.url ? (bO.test(d.url) ? "&" : "?") + "_=" + x : "")
  3123. }
  3124. }(d.data && d.hasContent && d.contentType !== !1 || c.contentType) && v.setRequestHeader("Content-Type", d.contentType), d.ifModified && (k = k || d.url, f.lastModified[k] && v.setRequestHeader("If-Modified-Since", f.lastModified[k]), f.etag[k] && v.setRequestHeader("If-None-Match", f.etag[k])), v.setRequestHeader("Accept", d.dataTypes[0] && d.accepts[d.dataTypes[0]] ? d.accepts[d.dataTypes[0]] + (d.dataTypes[0] !== "*" ? ", " + bZ + "; q=0.01" : "") : d.accepts["*"]);
  3125. for (u in d.headers) v.setRequestHeader(u, d.headers[u]);
  3126. if (d.beforeSend && (d.beforeSend.call(e, v, d) === !1 || s === 2)) {
  3127. v.abort();
  3128. return !1
  3129. }
  3130. for (u in {
  3131. success: 1,
  3132. error: 1,
  3133. complete: 1
  3134. }) v[u](d[u]);
  3135. p = ca(bW, d, c, v);
  3136. if (!p) w(-1, "No Transport");
  3137. else {
  3138. v.readyState = 1, t && g.trigger("ajaxSend", [v, d]), d.async && d.timeout > 0 && (q = setTimeout(function () {
  3139. v.abort("timeout")
  3140. }, d.timeout));
  3141. try {
  3142. s = 1, p.send(l, w)
  3143. } catch (z) {
  3144. s < 2 ? w(-1, z) : f.error(z)
  3145. }
  3146. }
  3147. return v
  3148. },
  3149. param: function (a, c) {
  3150. var d = [],
  3151. e = function (a, b) {
  3152. b = f.isFunction(b) ? b() : b, d[d.length] = encodeURIComponent(a) + "=" + encodeURIComponent(b)
  3153. };
  3154. c === b && (c = f.ajaxSettings.traditional);
  3155. if (f.isArray(a) || a.jquery && !f.isPlainObject(a)) f.each(a, function () {
  3156. e(this.name, this.value)
  3157. });
  3158. else for (var g in a) cc(g, a[g], c, e);
  3159. return d.join("&").replace(bF, "+")
  3160. }
  3161. }), f.extend({
  3162. active: 0,
  3163. lastModified: {},
  3164. etag: {}
  3165. });
  3166. var cf = f.now(),
  3167. cg = /(\=)\?(&|$)|\?\?/i;
  3168. f.ajaxSetup({
  3169. jsonp: "callback",
  3170. jsonpCallback: function () {
  3171. return f.expando + "_" + cf++
  3172. }
  3173. }), f.ajaxPrefilter("json jsonp", function (b, c, d) {
  3174. var e = b.contentType === "application/x-www-form-urlencoded" && typeof b.data == "string";
  3175. if (b.dataTypes[0] === "jsonp" || b.jsonp !== !1 && (cg.test(b.url) || e && cg.test(b.data))) {
  3176. var g, h = b.jsonpCallback = f.isFunction(b.jsonpCallback) ? b.jsonpCallback() : b.jsonpCallback,
  3177. i = a[h],
  3178. j = b.url,
  3179. k = b.data,
  3180. l = "$1" + h + "$2";
  3181. b.jsonp !== !1 && (j = j.replace(cg, l), b.url === j && (e && (k = k.replace(cg, l)), b.data === k && (j += (/\?/.test(j) ? "&" : "?") + b.jsonp + "=" + h))), b.url = j, b.data = k, a[h] = function (a) {
  3182. g = [a]
  3183. }, d.always(function () {
  3184. a[h] = i, g && f.isFunction(i) && a[h](g[0])
  3185. }), b.converters["script json"] = function () {
  3186. g || f.error(h + " was not called");
  3187. return g[0]
  3188. }, b.dataTypes[0] = "json";
  3189. return "script"
  3190. }
  3191. }), f.ajaxSetup({
  3192. accepts: {
  3193. script: "text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"
  3194. },
  3195. contents: {
  3196. script: /javascript|ecmascript/
  3197. },
  3198. converters: {
  3199. "text script": function (a) {
  3200. f.globalEval(a);
  3201. return a
  3202. }
  3203. }
  3204. }), f.ajaxPrefilter("script", function (a) {
  3205. a.cache === b && (a.cache = !1), a.crossDomain && (a.type = "GET", a.global = !1)
  3206. }), f.ajaxTransport("script", function (a) {
  3207. if (a.crossDomain) {
  3208. var d, e = c.head || c.getElementsByTagName("head")[0] || c.documentElement;
  3209. return {
  3210. send: function (f, g) {
  3211. d = c.createElement("script"), d.async = "async", a.scriptCharset && (d.charset = a.scriptCharset), d.src = a.url, d.onload = d.onreadystatechange = function (a, c) {
  3212. if (c || !d.readyState || /loaded|complete/.test(d.readyState)) d.onload = d.onreadystatechange = null, e && d.parentNode && e.removeChild(d), d = b, c || g(200, "success")
  3213. }, e.insertBefore(d, e.firstChild)
  3214. },
  3215. abort: function () {
  3216. d && d.onload(0, 1)
  3217. }
  3218. }
  3219. }
  3220. });
  3221. var ch = a.ActiveXObject ? function () {
  3222. for (var a in cj) cj[a](0, 1)
  3223. } : !1,
  3224. ci = 0,
  3225. cj;
  3226. f.ajaxSettings.xhr = a.ActiveXObject ? function () {
  3227. return !this.isLocal && ck() || cl()
  3228. } : ck,
  3229. function (a) {
  3230. f.extend(f.support, {
  3231. ajax: !! a,
  3232. cors: !! a && "withCredentials" in a
  3233. })
  3234. }(f.ajaxSettings.xhr()), f.support.ajax && f.ajaxTransport(function (c) {
  3235. if (!c.crossDomain || f.support.cors) {
  3236. var d;
  3237. return {
  3238. send: function (e, g) {
  3239. var h = c.xhr(),
  3240. i, j;
  3241. c.username ? h.open(c.type, c.url, c.async, c.username, c.password) : h.open(c.type, c.url, c.async);
  3242. if (c.xhrFields) for (j in c.xhrFields) h[j] = c.xhrFields[j];
  3243. c.mimeType && h.overrideMimeType && h.overrideMimeType(c.mimeType), !c.crossDomain && !e["X-Requested-With"] && (e["X-Requested-With"] = "XMLHttpRequest");
  3244. try {
  3245. for (j in e) h.setRequestHeader(j, e[j])
  3246. } catch (k) {}
  3247. h.send(c.hasContent && c.data || null), d = function (a, e) {
  3248. var j, k, l, m, n;
  3249. try {
  3250. if (d && (e || h.readyState === 4)) {
  3251. d = b, i && (h.onreadystatechange = f.noop, ch && delete cj[i]);
  3252. if (e) h.readyState !== 4 && h.abort();
  3253. else {
  3254. j = h.status, l = h.getAllResponseHeaders(), m = {}, n = h.responseXML, n && n.documentElement && (m.xml = n), m.text = h.responseText;
  3255. try {
  3256. k = h.statusText
  3257. } catch (o) {
  3258. k = ""
  3259. }!j && c.isLocal && !c.crossDomain ? j = m.text ? 200 : 404 : j === 1223 && (j = 204)
  3260. }
  3261. }
  3262. } catch (p) {
  3263. e || g(-1, p)
  3264. }
  3265. m && g(j, k, m, l)
  3266. }, !c.async || h.readyState === 4 ? d() : (i = ++ci, ch && (cj || (cj = {}, f(a).unload(ch)), cj[i] = d), h.onreadystatechange = d)
  3267. },
  3268. abort: function () {
  3269. d && d(0, 1)
  3270. }
  3271. }
  3272. }
  3273. });
  3274. var cm = {}, cn, co, cp = /^(?:toggle|show|hide)$/,
  3275. cq = /^([+\-]=)?([\d+.\-]+)([a-z%]*)$/i,
  3276. cr, cs = [
  3277. ["height", "marginTop", "marginBottom", "paddingTop", "paddingBottom"],
  3278. ["width", "marginLeft", "marginRight", "paddingLeft", "paddingRight"],
  3279. ["opacity"]
  3280. ],
  3281. ct;
  3282. f.fn.extend({
  3283. show: function (a, b, c) {
  3284. var d, e;
  3285. if (a || a === 0) return this.animate(cw("show", 3), a, b, c);
  3286. for (var g = 0, h = this.length; g < h; g++) d = this[g], d.style && (e = d.style.display, !f._data(d, "olddisplay") && e === "none" && (e = d.style.display = ""), e === "" && f.css(d, "display") === "none" && f._data(d, "olddisplay", cx(d.nodeName)));
  3287. for (g = 0; g < h; g++) {
  3288. d = this[g];
  3289. if (d.style) {
  3290. e = d.style.display;
  3291. if (e === "" || e === "none") d.style.display = f._data(d, "olddisplay") || ""
  3292. }
  3293. }
  3294. return this
  3295. },
  3296. hide: function (a, b, c) {
  3297. if (a || a === 0) return this.animate(cw("hide", 3), a, b, c);
  3298. var d, e, g = 0,
  3299. h = this.length;
  3300. for (; g < h; g++) d = this[g], d.style && (e = f.css(d, "display"), e !== "none" && !f._data(d, "olddisplay") && f._data(d, "olddisplay", e));
  3301. for (g = 0; g < h; g++) this[g].style && (this[g].style.display = "none");
  3302. return this
  3303. },
  3304. _toggle: f.fn.toggle,
  3305. toggle: function (a, b, c) {
  3306. var d = typeof a == "boolean";
  3307. f.isFunction(a) && f.isFunction(b) ? this._toggle.apply(this, arguments) : a == null || d ? this.each(function () {
  3308. var b = d ? a : f(this).is(":hidden");
  3309. f(this)[b ? "show" : "hide"]()
  3310. }) : this.animate(cw("toggle", 3), a, b, c);
  3311. return this
  3312. },
  3313. fadeTo: function (a, b, c, d) {
  3314. return this.filter(":hidden").css("opacity", 0).show().end().animate({
  3315. opacity: b
  3316. }, a, c, d)
  3317. },
  3318. animate: function (a, b, c, d) {
  3319. function g() {
  3320. e.queue === !1 && f._mark(this);
  3321. var b = f.extend({}, e),
  3322. c = this.nodeType === 1,
  3323. d = c && f(this).is(":hidden"),
  3324. g, h, i, j, k, l, m, n, o;
  3325. b.animatedProperties = {};
  3326. for (i in a) {
  3327. g = f.camelCase(i), i !== g && (a[g] = a[i], delete a[i]), h = a[g], f.isArray(h) ? (b.animatedProperties[g] = h[1], h = a[g] = h[0]) : b.animatedProperties[g] = b.specialEasing && b.specialEasing[g] || b.easing || "swing";
  3328. if (h === "hide" && d || h === "show" && !d) return b.complete.call(this);
  3329. c && (g === "height" || g === "width") && (b.overflow = [this.style.overflow, this.style.overflowX, this.style.overflowY], f.css(this, "display") === "inline" && f.css(this, "float") === "none" && (!f.support.inlineBlockNeedsLayout || cx(this.nodeName) === "inline" ? this.style.display = "inline-block" : this.style.zoom = 1))
  3330. }
  3331. b.overflow != null && (this.style.overflow = "hidden");
  3332. for (i in a) j = new f.fx(this, b, i), h = a[i], cp.test(h) ? (o = f._data(this, "toggle" + i) || (h === "toggle" ? d ? "show" : "hide" : 0), o ? (f._data(this, "toggle" + i, o === "show" ? "hide" : "show"), j[o]()) : j[h]()) : (k = cq.exec(h), l = j.cur(), k ? (m = parseFloat(k[2]), n = k[3] || (f.cssNumber[i] ? "" : "px"), n !== "px" && (f.style(this, i, (m || 1) + n), l = (m || 1) / j.cur() * l, f.style(this, i, l + n)), k[1] && (m = (k[1] === "-=" ? -1 : 1) * m + l), j.custom(l, m, n)) : j.custom(l, h, ""));
  3333. return !0
  3334. }
  3335. var e = f.speed(b, c, d);
  3336. if (f.isEmptyObject(a)) return this.each(e.complete, [!1]);
  3337. a = f.extend({}, a);
  3338. return e.queue === !1 ? this.each(g) : this.queue(e.queue, g)
  3339. },
  3340. stop: function (a, c, d) {
  3341. typeof a != "string" && (d = c, c = a, a = b), c && a !== !1 && this.queue(a || "fx", []);
  3342. return this.each(function () {
  3343. function h(a, b, c) {
  3344. var e = b[c];
  3345. f.removeData(a, c, !0), e.stop(d)
  3346. }
  3347. var b, c = !1,
  3348. e = f.timers,
  3349. g = f._data(this);
  3350. d || f._unmark(!0, this);
  3351. if (a == null) for (b in g) g[b].stop && b.indexOf(".run") === b.length - 4 && h(this, g, b);
  3352. else g[b = a + ".run"] && g[b].stop && h(this, g, b);
  3353. for (b = e.length; b--;) e[b].elem === this && (a == null || e[b].queue === a) && (d ? e[b](!0) : e[b].saveState(), c = !0, e.splice(b, 1));
  3354. (!d || !c) && f.dequeue(this, a)
  3355. })
  3356. }
  3357. }), f.each({
  3358. slideDown: cw("show", 1),
  3359. slideUp: cw("hide", 1),
  3360. slideToggle: cw("toggle", 1),
  3361. fadeIn: {
  3362. opacity: "show"
  3363. },
  3364. fadeOut: {
  3365. opacity: "hide"
  3366. },
  3367. fadeToggle: {
  3368. opacity: "toggle"
  3369. }
  3370. }, function (a, b) {
  3371. f.fn[a] = function (a, c, d) {
  3372. return this.animate(b, a, c, d)
  3373. }
  3374. }), f.extend({
  3375. speed: function (a, b, c) {
  3376. var d = a && typeof a == "object" ? f.extend({}, a) : {
  3377. complete: c || !c && b || f.isFunction(a) && a,
  3378. duration: a,
  3379. easing: c && b || b && !f.isFunction(b) && b
  3380. };
  3381. d.duration = f.fx.off ? 0 : typeof d.duration == "number" ? d.duration : d.duration in f.fx.speeds ? f.fx.speeds[d.duration] : f.fx.speeds._default;
  3382. if (d.queue == null || d.queue === !0) d.queue = "fx";
  3383. d.old = d.complete, d.complete = function (a) {
  3384. f.isFunction(d.old) && d.old.call(this), d.queue ? f.dequeue(this, d.queue) : a !== !1 && f._unmark(this)
  3385. };
  3386. return d
  3387. },
  3388. easing: {
  3389. linear: function (a, b, c, d) {
  3390. return c + d * a
  3391. },
  3392. swing: function (a, b, c, d) {
  3393. return (-Math.cos(a * Math.PI) / 2 + .5) * d + c
  3394. }
  3395. },
  3396. timers: [],
  3397. fx: function (a, b, c) {
  3398. this.options = b, this.elem = a, this.prop = c, b.orig = b.orig || {}
  3399. }
  3400. }), f.fx.prototype = {
  3401. update: function () {
  3402. this.options.step && this.options.step.call(this.elem, this.now, this), (f.fx.step[this.prop] || f.fx.step._default)(this)
  3403. },
  3404. cur: function () {
  3405. if (this.elem[this.prop] != null && (!this.elem.style || this.elem.style[this.prop] == null)) return this.elem[this.prop];
  3406. var a, b = f.css(this.elem, this.prop);
  3407. return isNaN(a = parseFloat(b)) ? !b || b === "auto" ? 0 : b : a
  3408. },
  3409. custom: function (a, c, d) {
  3410. function h(a) {
  3411. return e.step(a)
  3412. }
  3413. var e = this,
  3414. g = f.fx;
  3415. this.startTime = ct || cu(), this.end = c, this.now = this.start = a, this.pos = this.state = 0, this.unit = d || this.unit || (f.cssNumber[this.prop] ? "" : "px"), h.queue = this.options.queue, h.elem = this.elem, h.saveState = function () {
  3416. e.options.hide && f._data(e.elem, "fxshow" + e.prop) === b && f._data(e.elem, "fxshow" + e.prop, e.start)
  3417. }, h() && f.timers.push(h) && !cr && (cr = setInterval(g.tick, g.interval))
  3418. },
  3419. show: function () {
  3420. var a = f._data(this.elem, "fxshow" + this.prop);
  3421. this.options.orig[this.prop] = a || f.style(this.elem, this.prop), this.options.show = !0, a !== b ? this.custom(this.cur(), a) : this.custom(this.prop === "width" || this.prop === "height" ? 1 : 0, this.cur()), f(this.elem).show()
  3422. },
  3423. hide: function () {
  3424. this.options.orig[this.prop] = f._data(this.elem, "fxshow" + this.prop) || f.style(this.elem, this.prop), this.options.hide = !0, this.custom(this.cur(), 0)
  3425. },
  3426. step: function (a) {
  3427. var b, c, d, e = ct || cu(),
  3428. g = !0,
  3429. h = this.elem,
  3430. i = this.options;
  3431. if (a || e >= i.duration + this.startTime) {
  3432. this.now = this.end, this.pos = this.state = 1, this.update(), i.animatedProperties[this.prop] = !0;
  3433. for (b in i.animatedProperties) i.animatedProperties[b] !== !0 && (g = !1);
  3434. if (g) {
  3435. i.overflow != null && !f.support.shrinkWrapBlocks && f.each(["", "X", "Y"], function (a, b) {
  3436. h.style["overflow" + b] = i.overflow[a]
  3437. }), i.hide && f(h).hide();
  3438. if (i.hide || i.show) for (b in i.animatedProperties) f.style(h, b, i.orig[b]), f.removeData(h, "fxshow" + b, !0), f.removeData(h, "toggle" + b, !0);
  3439. d = i.complete, d && (i.complete = !1, d.call(h))
  3440. }
  3441. return !1
  3442. }
  3443. i.duration == Infinity ? this.now = e : (c = e - this.startTime, this.state = c / i.duration, this.pos = f.easing[i.animatedProperties[this.prop]](this.state, c, 0, 1, i.duration), this.now = this.start + (this.end - this.start) * this.pos), this.update();
  3444. return !0
  3445. }
  3446. }, f.extend(f.fx, {
  3447. tick: function () {
  3448. var a, b = f.timers,
  3449. c = 0;
  3450. for (; c < b.length; c++) a = b[c], !a() && b[c] === a && b.splice(c--, 1);
  3451. b.length || f.fx.stop()
  3452. },
  3453. interval: 13,
  3454. stop: function () {
  3455. clearInterval(cr), cr = null
  3456. },
  3457. speeds: {
  3458. slow: 600,
  3459. fast: 200,
  3460. _default: 400
  3461. },
  3462. step: {
  3463. opacity: function (a) {
  3464. f.style(a.elem, "opacity", a.now)
  3465. },
  3466. _default: function (a) {
  3467. a.elem.style && a.elem.style[a.prop] != null ? a.elem.style[a.prop] = a.now + a.unit : a.elem[a.prop] = a.now
  3468. }
  3469. }
  3470. }), f.each(["width", "height"], function (a, b) {
  3471. f.fx.step[b] = function (a) {
  3472. f.style(a.elem, b, Math.max(0, a.now))
  3473. }
  3474. }), f.expr && f.expr.filters && (f.expr.filters.animated = function (a) {
  3475. return f.grep(f.timers, function (b) {
  3476. return a === b.elem
  3477. }).length
  3478. });
  3479. var cy = /^t(?:able|d|h)$/i,
  3480. cz = /^(?:body|html)$/i;
  3481. "getBoundingClientRect" in c.documentElement ? f.fn.offset = function (a) {
  3482. var b = this[0],
  3483. c;
  3484. if (a) return this.each(function (b) {
  3485. f.offset.setOffset(this, a, b)
  3486. });
  3487. if (!b || !b.ownerDocument) return null;
  3488. if (b === b.ownerDocument.body) return f.offset.bodyOffset(b);
  3489. try {
  3490. c = b.getBoundingClientRect()
  3491. } catch (d) {}
  3492. var e = b.ownerDocument,
  3493. g = e.documentElement;
  3494. if (!c || !f.contains(g, b)) return c ? {
  3495. top: c.top,
  3496. left: c.left
  3497. } : {
  3498. top: 0,
  3499. left: 0
  3500. };
  3501. var h = e.body,
  3502. i = cA(e),
  3503. j = g.clientTop || h.clientTop || 0,
  3504. k = g.clientLeft || h.clientLeft || 0,
  3505. l = i.pageYOffset || f.support.boxModel && g.scrollTop || h.scrollTop,
  3506. m = i.pageXOffset || f.support.boxModel && g.scrollLeft || h.scrollLeft,
  3507. n = c.top + l - j,
  3508. o = c.left + m - k;
  3509. return {
  3510. top: n,
  3511. left: o
  3512. }
  3513. } : f.fn.offset = function (a) {
  3514. var b = this[0];
  3515. if (a) return this.each(function (b) {
  3516. f.offset.setOffset(this, a, b)
  3517. });
  3518. if (!b || !b.ownerDocument) return null;
  3519. if (b === b.ownerDocument.body) return f.offset.bodyOffset(b);
  3520. var c, d = b.offsetParent,
  3521. e = b,
  3522. g = b.ownerDocument,
  3523. h = g.documentElement,
  3524. i = g.body,
  3525. j = g.defaultView,
  3526. k = j ? j.getComputedStyle(b, null) : b.currentStyle,
  3527. l = b.offsetTop,
  3528. m = b.offsetLeft;
  3529. while ((b = b.parentNode) && b !== i && b !== h) {
  3530. if (f.support.fixedPosition && k.position === "fixed") break;
  3531. c = j ? j.getComputedStyle(b, null) : b.currentStyle, l -= b.scrollTop, m -= b.scrollLeft, b === d && (l += b.offsetTop, m += b.offsetLeft, f.support.doesNotAddBorder && (!f.support.doesAddBorderForTableAndCells || !cy.test(b.nodeName)) && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), e = d, d = b.offsetParent), f.support.subtractsBorderForOverflowNotVisible && c.overflow !== "visible" && (l += parseFloat(c.borderTopWidth) || 0, m += parseFloat(c.borderLeftWidth) || 0), k = c
  3532. }
  3533. if (k.position === "relative" || k.position === "static") l += i.offsetTop, m += i.offsetLeft;
  3534. f.support.fixedPosition && k.position === "fixed" && (l += Math.max(h.scrollTop, i.scrollTop), m += Math.max(h.scrollLeft, i.scrollLeft));
  3535. return {
  3536. top: l,
  3537. left: m
  3538. }
  3539. }, f.offset = {
  3540. bodyOffset: function (a) {
  3541. var b = a.offsetTop,
  3542. c = a.offsetLeft;
  3543. f.support.doesNotIncludeMarginInBodyOffset && (b += parseFloat(f.css(a, "marginTop")) || 0, c += parseFloat(f.css(a, "marginLeft")) || 0);
  3544. return {
  3545. top: b,
  3546. left: c
  3547. }
  3548. },
  3549. setOffset: function (a, b, c) {
  3550. var d = f.css(a, "position");
  3551. d === "static" && (a.style.position = "relative");
  3552. var e = f(a),
  3553. g = e.offset(),
  3554. h = f.css(a, "top"),
  3555. i = f.css(a, "left"),
  3556. j = (d === "absolute" || d === "fixed") && f.inArray("auto", [h, i]) > -1,
  3557. k = {}, l = {}, m, n;
  3558. j ? (l = e.position(), m = l.top, n = l.left) : (m = parseFloat(h) || 0, n = parseFloat(i) || 0), f.isFunction(b) && (b = b.call(a, c, g)), b.top != null && (k.top = b.top - g.top + m), b.left != null && (k.left = b.left - g.left + n), "using" in b ? b.using.call(a, k) : e.css(k)
  3559. }
  3560. }, f.fn.extend({
  3561. position: function () {
  3562. if (!this[0]) return null;
  3563. var a = this[0],
  3564. b = this.offsetParent(),
  3565. c = this.offset(),
  3566. d = cz.test(b[0].nodeName) ? {
  3567. top: 0,
  3568. left: 0
  3569. } : b.offset();
  3570. c.top -= parseFloat(f.css(a, "marginTop")) || 0, c.left -= parseFloat(f.css(a, "marginLeft")) || 0, d.top += parseFloat(f.css(b[0], "borderTopWidth")) || 0, d.left += parseFloat(f.css(b[0], "borderLeftWidth")) || 0;
  3571. return {
  3572. top: c.top - d.top,
  3573. left: c.left - d.left
  3574. }
  3575. },
  3576. offsetParent: function () {
  3577. return this.map(function () {
  3578. var a = this.offsetParent || c.body;
  3579. while (a && !cz.test(a.nodeName) && f.css(a, "position") === "static") a = a.offsetParent;
  3580. return a
  3581. })
  3582. }
  3583. }), f.each(["Left", "Top"], function (a, c) {
  3584. var d = "scroll" + c;
  3585. f.fn[d] = function (c) {
  3586. var e, g;
  3587. if (c === b) {
  3588. e = this[0];
  3589. if (!e) return null;
  3590. g = cA(e);
  3591. return g ? "pageXOffset" in g ? g[a ? "pageYOffset" : "pageXOffset"] : f.support.boxModel && g.document.documentElement[d] || g.document.body[d] : e[d]
  3592. }
  3593. return this.each(function () {
  3594. g = cA(this), g ? g.scrollTo(a ? f(g).scrollLeft() : c, a ? c : f(g).scrollTop()) : this[d] = c
  3595. })
  3596. }
  3597. }), f.each(["Height", "Width"], function (a, c) {
  3598. var d = c.toLowerCase();
  3599. f.fn["inner" + c] = function () {
  3600. var a = this[0];
  3601. return a ? a.style ? parseFloat(f.css(a, d, "padding")) : this[d]() : null
  3602. }, f.fn["outer" + c] = function (a) {
  3603. var b = this[0];
  3604. return b ? b.style ? parseFloat(f.css(b, d, a ? "margin" : "border")) : this[d]() : null
  3605. }, f.fn[d] = function (a) {
  3606. var e = this[0];
  3607. if (!e) return a == null ? null : this;
  3608. if (f.isFunction(a)) return this.each(function (b) {
  3609. var c = f(this);
  3610. c[d](a.call(this, b, c[d]()))
  3611. });
  3612. if (f.isWindow(e)) {
  3613. var g = e.document.documentElement["client" + c],
  3614. h = e.document.body;
  3615. return e.document.compatMode === "CSS1Compat" && g || h && h["client" + c] || g
  3616. }
  3617. if (e.nodeType === 9) return Math.max(e.documentElement["client" + c], e.body["scroll" + c], e.documentElement["scroll" + c], e.body["offset" + c], e.documentElement["offset" + c]);
  3618. if (a === b) {
  3619. var i = f.css(e, d),
  3620. j = parseFloat(i);
  3621. return f.isNumeric(j) ? j : i
  3622. }
  3623. return this.css(d, typeof a == "string" ? a : a + "px")
  3624. }
  3625. }), a.jQuery = a.$ = f
  3626. })(window);
  3627. (function (c, j) {
  3628. function k(a, b) {
  3629. var d = a.nodeName.toLowerCase();
  3630. if ("area" === d) {
  3631. b = a.parentNode;
  3632. d = b.name;
  3633. if (!a.href || !d || b.nodeName.toLowerCase() !== "map") return false;
  3634. a = c("img[usemap=#" + d + "]")[0];
  3635. return !!a && l(a)
  3636. }
  3637. return (/input|select|textarea|button|object/.test(d) ? !a.disabled : "a" == d ? a.href || b : b) && l(a)
  3638. }
  3639. function l(a) {
  3640. return !c(a).parents().andSelf().filter(function () {
  3641. return c.curCSS(this, "visibility") === "hidden" || c.expr.filters.hidden(this)
  3642. }).length
  3643. }
  3644. c.ui = c.ui || {};
  3645. if (!c.ui.version) {
  3646. c.extend(c.ui, {
  3647. version: "1.8.16",
  3648. keyCode: {
  3649. ALT: 18,
  3650. BACKSPACE: 8,
  3651. CAPS_LOCK: 20,
  3652. COMMA: 188,
  3653. COMMAND: 91,
  3654. COMMAND_LEFT: 91,
  3655. COMMAND_RIGHT: 93,
  3656. CONTROL: 17,
  3657. DELETE: 46,
  3658. DOWN: 40,
  3659. END: 35,
  3660. ENTER: 13,
  3661. ESCAPE: 27,
  3662. HOME: 36,
  3663. INSERT: 45,
  3664. LEFT: 37,
  3665. MENU: 93,
  3666. NUMPAD_ADD: 107,
  3667. NUMPAD_DECIMAL: 110,
  3668. NUMPAD_DIVIDE: 111,
  3669. NUMPAD_ENTER: 108,
  3670. NUMPAD_MULTIPLY: 106,
  3671. NUMPAD_SUBTRACT: 109,
  3672. PAGE_DOWN: 34,
  3673. PAGE_UP: 33,
  3674. PERIOD: 190,
  3675. RIGHT: 39,
  3676. SHIFT: 16,
  3677. SPACE: 32,
  3678. TAB: 9,
  3679. UP: 38,
  3680. WINDOWS: 91
  3681. }
  3682. });
  3683. c.fn.extend({
  3684. propAttr: c.fn.prop || c.fn.attr,
  3685. _focus: c.fn.focus,
  3686. focus: function (a, b) {
  3687. return typeof a === "number" ? this.each(function () {
  3688. var d = this;
  3689. setTimeout(function () {
  3690. c(d).focus();
  3691. b && b.call(d)
  3692. }, a)
  3693. }) : this._focus.apply(this, arguments)
  3694. },
  3695. scrollParent: function () {
  3696. var a;
  3697. a = c.browser.msie && /(static|relative)/.test(this.css("position")) || /absolute/.test(this.css("position")) ? this.parents().filter(function () {
  3698. return /(relative|absolute|fixed)/.test(c.curCSS(this, "position", 1)) && /(auto|scroll)/.test(c.curCSS(this, "overflow", 1) + c.curCSS(this, "overflow-y", 1) + c.curCSS(this, "overflow-x", 1))
  3699. }).eq(0) : this.parents().filter(function () {
  3700. return /(auto|scroll)/.test(c.curCSS(this, "overflow", 1) + c.curCSS(this, "overflow-y", 1) + c.curCSS(this, "overflow-x", 1))
  3701. }).eq(0);
  3702. return /fixed/.test(this.css("position")) || !a.length ? c(document) : a
  3703. },
  3704. zIndex: function (a) {
  3705. if (a !== j) return this.css("zIndex", a);
  3706. if (this.length) {
  3707. a = c(this[0]);
  3708. for (var b; a.length && a[0] !== document;) {
  3709. b = a.css("position");
  3710. if (b === "absolute" || b === "relative" || b === "fixed") {
  3711. b = parseInt(a.css("zIndex"), 10);
  3712. if (!isNaN(b) && b !== 0) return b
  3713. }
  3714. a = a.parent()
  3715. }
  3716. }
  3717. return 0
  3718. },
  3719. disableSelection: function () {
  3720. return this.bind((c.support.selectstart ? "selectstart" : "mousedown") + ".ui-disableSelection", function (a) {
  3721. a.preventDefault()
  3722. })
  3723. },
  3724. enableSelection: function () {
  3725. return this.unbind(".ui-disableSelection")
  3726. }
  3727. });
  3728. c.each(["Width", "Height"], function (a, b) {
  3729. function d(f, g, m, n) {
  3730. c.each(e, function () {
  3731. g -= parseFloat(c.curCSS(f, "padding" + this, true)) || 0;
  3732. if (m) g -= parseFloat(c.curCSS(f, "border" + this + "Width", true)) || 0;
  3733. if (n) g -= parseFloat(c.curCSS(f, "margin" + this, true)) || 0
  3734. });
  3735. return g
  3736. }
  3737. var e = b === "Width" ? ["Left", "Right"] : ["Top", "Bottom"],
  3738. h = b.toLowerCase(),
  3739. i = {
  3740. innerWidth: c.fn.innerWidth,
  3741. innerHeight: c.fn.innerHeight,
  3742. outerWidth: c.fn.outerWidth,
  3743. outerHeight: c.fn.outerHeight
  3744. };
  3745. c.fn["inner" + b] = function (f) {
  3746. if (f === j) return i["inner" + b].call(this);
  3747. return this.each(function () {
  3748. c(this).css(h, d(this, f) + "px")
  3749. })
  3750. };
  3751. c.fn["outer" + b] = function (f, g) {
  3752. if (typeof f !== "number") return i["outer" + b].call(this, f);
  3753. return this.each(function () {
  3754. c(this).css(h, d(this, f, true, g) + "px")
  3755. })
  3756. }
  3757. });
  3758. c.extend(c.expr[":"], {
  3759. data: function (a, b, d) {
  3760. return !!c.data(a, d[3])
  3761. },
  3762. focusable: function (a) {
  3763. return k(a, !isNaN(c.attr(a, "tabindex")))
  3764. },
  3765. tabbable: function (a) {
  3766. var b = c.attr(a, "tabindex"),
  3767. d = isNaN(b);
  3768. return (d || b >= 0) && k(a, !d)
  3769. }
  3770. });
  3771. c(function () {
  3772. var a = document.body,
  3773. b = a.appendChild(b = document.createElement("div"));
  3774. c.extend(b.style, {
  3775. minHeight: "100px",
  3776. height: "auto",
  3777. padding: 0,
  3778. borderWidth: 0
  3779. });
  3780. c.support.minHeight = b.offsetHeight === 100;
  3781. c.support.selectstart = "onselectstart" in b;
  3782. a.removeChild(b).style.display = "none"
  3783. });
  3784. c.extend(c.ui, {
  3785. plugin: {
  3786. add: function (a, b, d) {
  3787. a = c.ui[a].prototype;
  3788. for (var e in d) {
  3789. a.plugins[e] = a.plugins[e] || [];
  3790. a.plugins[e].push([b, d[e]])
  3791. }
  3792. },
  3793. call: function (a, b, d) {
  3794. if ((b = a.plugins[b]) && a.element[0].parentNode) for (var e = 0; e < b.length; e++) a.options[b[e][0]] && b[e][1].apply(a.element, d)
  3795. }
  3796. },
  3797. contains: function (a, b) {
  3798. return document.compareDocumentPosition ? a.compareDocumentPosition(b) & 16 : a !== b && a.contains(b)
  3799. },
  3800. hasScroll: function (a, b) {
  3801. if (c(a).css("overflow") === "hidden") return false;
  3802. b = b && b === "left" ? "scrollLeft" : "scrollTop";
  3803. var d = false;
  3804. if (a[b] > 0) return true;
  3805. a[b] = 1;
  3806. d = a[b] > 0;
  3807. a[b] = 0;
  3808. return d
  3809. },
  3810. isOverAxis: function (a, b, d) {
  3811. return a > b && a < b + d
  3812. },
  3813. isOver: function (a, b, d, e, h, i) {
  3814. return c.ui.isOverAxis(a, d, h) && c.ui.isOverAxis(b, e, i)
  3815. }
  3816. })
  3817. }
  3818. })(jQuery);;
  3819. (function (b, j) {
  3820. if (b.cleanData) {
  3821. var k = b.cleanData;
  3822. b.cleanData = function (a) {
  3823. for (var c = 0, d;
  3824. (d = a[c]) != null; c++) try {
  3825. b(d).triggerHandler("remove")
  3826. } catch (e) {}
  3827. k(a)
  3828. }
  3829. } else {
  3830. var l = b.fn.remove;
  3831. b.fn.remove = function (a, c) {
  3832. return this.each(function () {
  3833. if (!c) if (!a || b.filter(a, [this]).length) b("*", this).add([this]).each(function () {
  3834. try {
  3835. b(this).triggerHandler("remove")
  3836. } catch (d) {}
  3837. });
  3838. return l.call(b(this), a, c)
  3839. })
  3840. }
  3841. }
  3842. b.widget = function (a, c, d) {
  3843. var e = a.split(".")[0],
  3844. f;
  3845. a = a.split(".")[1];
  3846. f = e + "-" + a;
  3847. if (!d) {
  3848. d = c;
  3849. c = b.Widget
  3850. }
  3851. b.expr[":"][f] = function (h) {
  3852. return !!b.data(h, a)
  3853. };
  3854. b[e] = b[e] || {};
  3855. b[e][a] = function (h, g) {
  3856. arguments.length && this._createWidget(h, g)
  3857. };
  3858. c = new c;
  3859. c.options = b.extend(true, {}, c.options);
  3860. b[e][a].prototype = b.extend(true, c, {
  3861. namespace: e,
  3862. widgetName: a,
  3863. widgetEventPrefix: b[e][a].prototype.widgetEventPrefix || a,
  3864. widgetBaseClass: f
  3865. }, d);
  3866. b.widget.bridge(a, b[e][a])
  3867. };
  3868. b.widget.bridge = function (a, c) {
  3869. b.fn[a] = function (d) {
  3870. var e = typeof d === "string",
  3871. f = Array.prototype.slice.call(arguments, 1),
  3872. h = this;
  3873. d = !e && f.length ? b.extend.apply(null, [true, d].concat(f)) : d;
  3874. if (e && d.charAt(0) === "_") return h;
  3875. e ? this.each(function () {
  3876. var g = b.data(this, a),
  3877. i = g && b.isFunction(g[d]) ? g[d].apply(g, f) : g;
  3878. if (i !== g && i !== j) {
  3879. h = i;
  3880. return false
  3881. }
  3882. }) : this.each(function () {
  3883. var g = b.data(this, a);
  3884. g ? g.option(d || {})._init() : b.data(this, a, new c(d, this))
  3885. });
  3886. return h
  3887. }
  3888. };
  3889. b.Widget = function (a, c) {
  3890. arguments.length && this._createWidget(a, c)
  3891. };
  3892. b.Widget.prototype = {
  3893. widgetName: "widget",
  3894. widgetEventPrefix: "",
  3895. options: {
  3896. disabled: false
  3897. },
  3898. _createWidget: function (a, c) {
  3899. b.data(c, this.widgetName, this);
  3900. this.element = b(c);
  3901. this.options = b.extend(true, {}, this.options, this._getCreateOptions(), a);
  3902. var d = this;
  3903. this.element.bind("remove." + this.widgetName, function () {
  3904. d.destroy()
  3905. });
  3906. this._create();
  3907. this._trigger("create");
  3908. this._init()
  3909. },
  3910. _getCreateOptions: function () {
  3911. return b.metadata && b.metadata.get(this.element[0])[this.widgetName]
  3912. },
  3913. _create: function () {},
  3914. _init: function () {},
  3915. destroy: function () {
  3916. this.element.unbind("." + this.widgetName).removeData(this.widgetName);
  3917. this.widget().unbind("." + this.widgetName).removeAttr("aria-disabled").removeClass(this.widgetBaseClass + "-disabled ui-state-disabled")
  3918. },
  3919. widget: function () {
  3920. return this.element
  3921. },
  3922. option: function (a, c) {
  3923. var d = a;
  3924. if (arguments.length === 0) return b.extend({}, this.options);
  3925. if (typeof a === "string") {
  3926. if (c === j) return this.options[a];
  3927. d = {};
  3928. d[a] = c
  3929. }
  3930. this._setOptions(d);
  3931. return this
  3932. },
  3933. _setOptions: function (a) {
  3934. var c = this;
  3935. b.each(a, function (d, e) {
  3936. c._setOption(d, e)
  3937. });
  3938. return this
  3939. },
  3940. _setOption: function (a, c) {
  3941. this.options[a] = c;
  3942. if (a === "disabled") this.widget()[c ? "addClass" : "removeClass"](this.widgetBaseClass + "-disabled ui-state-disabled").attr("aria-disabled", c);
  3943. return this
  3944. },
  3945. enable: function () {
  3946. return this._setOption("disabled", false)
  3947. },
  3948. disable: function () {
  3949. return this._setOption("disabled", true)
  3950. },
  3951. _trigger: function (a, c, d) {
  3952. var e = this.options[a];
  3953. c = b.Event(c);
  3954. c.type = (a === this.widgetEventPrefix ? a : this.widgetEventPrefix + a).toLowerCase();
  3955. d = d || {};
  3956. if (c.originalEvent) {
  3957. a = b.event.props.length;
  3958. for (var f; a;) {
  3959. f = b.event.props[--a];
  3960. c[f] = c.originalEvent[f]
  3961. }
  3962. }
  3963. this.element.trigger(c, d);
  3964. return !(b.isFunction(e) && e.call(this.element[0], c, d) === false || c.isDefaultPrevented())
  3965. }
  3966. }
  3967. })(jQuery);;
  3968. (function (b) {
  3969. var d = false;
  3970. b(document).mouseup(function () {
  3971. d = false
  3972. });
  3973. b.widget("ui.mouse", {
  3974. options: {
  3975. cancel: ":input,option",
  3976. distance: 1,
  3977. delay: 0
  3978. },
  3979. _mouseInit: function () {
  3980. var a = this;
  3981. this.element.bind("mousedown." + this.widgetName, function (c) {
  3982. return a._mouseDown(c)
  3983. }).bind("click." + this.widgetName, function (c) {
  3984. if (true === b.data(c.target, a.widgetName + ".preventClickEvent")) {
  3985. b.removeData(c.target, a.widgetName + ".preventClickEvent");
  3986. c.stopImmediatePropagation();
  3987. return false
  3988. }
  3989. });
  3990. this.started = false
  3991. },
  3992. _mouseDestroy: function () {
  3993. this.element.unbind("." + this.widgetName)
  3994. },
  3995. _mouseDown: function (a) {
  3996. if (!d) {
  3997. this._mouseStarted && this._mouseUp(a);
  3998. this._mouseDownEvent = a;
  3999. var c = this,
  4000. f = a.which == 1,
  4001. g = typeof this.options.cancel == "string" && a.target.nodeName ? b(a.target).closest(this.options.cancel).length : false;
  4002. if (!f || g || !this._mouseCapture(a)) return true;
  4003. this.mouseDelayMet = !this.options.delay;
  4004. if (!this.mouseDelayMet) this._mouseDelayTimer = setTimeout(function () {
  4005. c.mouseDelayMet = true
  4006. }, this.options.delay);
  4007. if (this._mouseDistanceMet(a) && this._mouseDelayMet(a)) {
  4008. this._mouseStarted = this._mouseStart(a) !== false;
  4009. if (!this._mouseStarted) {
  4010. a.preventDefault();
  4011. return true
  4012. }
  4013. }
  4014. true === b.data(a.target, this.widgetName + ".preventClickEvent") && b.removeData(a.target, this.widgetName + ".preventClickEvent");
  4015. this._mouseMoveDelegate = function (e) {
  4016. return c._mouseMove(e)
  4017. };
  4018. this._mouseUpDelegate = function (e) {
  4019. return c._mouseUp(e)
  4020. };
  4021. b(document).bind("mousemove." + this.widgetName, this._mouseMoveDelegate).bind("mouseup." + this.widgetName, this._mouseUpDelegate);
  4022. a.preventDefault();
  4023. return d = true
  4024. }
  4025. },
  4026. _mouseMove: function (a) {
  4027. if (b.browser.msie && !(document.documentMode >= 9) && !a.button) return this._mouseUp(a);
  4028. if (this._mouseStarted) {
  4029. this._mouseDrag(a);
  4030. return a.preventDefault()
  4031. }
  4032. if (this._mouseDistanceMet(a) && this._mouseDelayMet(a))(this._mouseStarted = this._mouseStart(this._mouseDownEvent, a) !== false) ? this._mouseDrag(a) : this._mouseUp(a);
  4033. return !this._mouseStarted
  4034. },
  4035. _mouseUp: function (a) {
  4036. b(document).unbind("mousemove." + this.widgetName, this._mouseMoveDelegate).unbind("mouseup." + this.widgetName, this._mouseUpDelegate);
  4037. if (this._mouseStarted) {
  4038. this._mouseStarted = false;
  4039. a.target == this._mouseDownEvent.target && b.data(a.target, this.widgetName + ".preventClickEvent", true);
  4040. this._mouseStop(a)
  4041. }
  4042. return false
  4043. },
  4044. _mouseDistanceMet: function (a) {
  4045. return Math.max(Math.abs(this._mouseDownEvent.pageX - a.pageX), Math.abs(this._mouseDownEvent.pageY - a.pageY)) >= this.options.distance
  4046. },
  4047. _mouseDelayMet: function () {
  4048. return this.mouseDelayMet
  4049. },
  4050. _mouseStart: function () {},
  4051. _mouseDrag: function () {},
  4052. _mouseStop: function () {},
  4053. _mouseCapture: function () {
  4054. return true
  4055. }
  4056. })
  4057. })(jQuery);;
  4058. (function (c) {
  4059. c.ui = c.ui || {};
  4060. var n = /left|center|right/,
  4061. o = /top|center|bottom/,
  4062. t = c.fn.position,
  4063. u = c.fn.offset;
  4064. c.fn.position = function (b) {
  4065. if (!b || !b.of) return t.apply(this, arguments);
  4066. b = c.extend({}, b);
  4067. var a = c(b.of),
  4068. d = a[0],
  4069. g = (b.collision || "flip").split(" "),
  4070. e = b.offset ? b.offset.split(" ") : [0, 0],
  4071. h, k, j;
  4072. if (d.nodeType === 9) {
  4073. h = a.width();
  4074. k = a.height();
  4075. j = {
  4076. top: 0,
  4077. left: 0
  4078. }
  4079. } else if (d.setTimeout) {
  4080. h = a.width();
  4081. k = a.height();
  4082. j = {
  4083. top: a.scrollTop(),
  4084. left: a.scrollLeft()
  4085. }
  4086. } else if (d.preventDefault) {
  4087. b.at = "left top";
  4088. h = k = 0;
  4089. j = {
  4090. top: b.of.pageY,
  4091. left: b.of.pageX
  4092. }
  4093. } else {
  4094. h = a.outerWidth();
  4095. k = a.outerHeight();
  4096. j = a.offset()
  4097. }
  4098. c.each(["my", "at"], function () {
  4099. var f = (b[this] || "").split(" ");
  4100. if (f.length === 1) f = n.test(f[0]) ? f.concat(["center"]) : o.test(f[0]) ? ["center"].concat(f) : ["center", "center"];
  4101. f[0] = n.test(f[0]) ? f[0] : "center";
  4102. f[1] = o.test(f[1]) ? f[1] : "center";
  4103. b[this] = f
  4104. });
  4105. if (g.length === 1) g[1] = g[0];
  4106. e[0] = parseInt(e[0], 10) || 0;
  4107. if (e.length === 1) e[1] = e[0];
  4108. e[1] = parseInt(e[1], 10) || 0;
  4109. if (b.at[0] === "right") j.left += h;
  4110. else if (b.at[0] === "center") j.left += h / 2;
  4111. if (b.at[1] === "bottom") j.top += k;
  4112. else if (b.at[1] === "center") j.top += k / 2;
  4113. j.left += e[0];
  4114. j.top += e[1];
  4115. return this.each(function () {
  4116. var f = c(this),
  4117. l = f.outerWidth(),
  4118. m = f.outerHeight(),
  4119. p = parseInt(c.curCSS(this, "marginLeft", true)) || 0,
  4120. q = parseInt(c.curCSS(this, "marginTop", true)) || 0,
  4121. v = l + p + (parseInt(c.curCSS(this, "marginRight", true)) || 0),
  4122. w = m + q + (parseInt(c.curCSS(this, "marginBottom", true)) || 0),
  4123. i = c.extend({}, j),
  4124. r;
  4125. if (b.my[0] === "right") i.left -= l;
  4126. else if (b.my[0] === "center") i.left -= l / 2;
  4127. if (b.my[1] === "bottom") i.top -= m;
  4128. else if (b.my[1] === "center") i.top -= m / 2;
  4129. i.left = Math.round(i.left);
  4130. i.top = Math.round(i.top);
  4131. r = {
  4132. left: i.left - p,
  4133. top: i.top - q
  4134. };
  4135. c.each(["left", "top"], function (s, x) {
  4136. c.ui.position[g[s]] && c.ui.position[g[s]][x](i, {
  4137. targetWidth: h,
  4138. targetHeight: k,
  4139. elemWidth: l,
  4140. elemHeight: m,
  4141. collisionPosition: r,
  4142. collisionWidth: v,
  4143. collisionHeight: w,
  4144. offset: e,
  4145. my: b.my,
  4146. at: b.at
  4147. })
  4148. });
  4149. c.fn.bgiframe && f.bgiframe();
  4150. f.offset(c.extend(i, {
  4151. using: b.using
  4152. }))
  4153. })
  4154. };
  4155. c.ui.position = {
  4156. fit: {
  4157. left: function (b, a) {
  4158. var d = c(window);
  4159. d = a.collisionPosition.left + a.collisionWidth - d.width() - d.scrollLeft();
  4160. b.left = d > 0 ? b.left - d : Math.max(b.left - a.collisionPosition.left, b.left)
  4161. },
  4162. top: function (b, a) {
  4163. var d = c(window);
  4164. d = a.collisionPosition.top + a.collisionHeight - d.height() - d.scrollTop();
  4165. b.top = d > 0 ? b.top - d : Math.max(b.top - a.collisionPosition.top, b.top)
  4166. }
  4167. },
  4168. flip: {
  4169. left: function (b, a) {
  4170. if (a.at[0] !== "center") {
  4171. var d = c(window);
  4172. d = a.collisionPosition.left + a.collisionWidth - d.width() - d.scrollLeft();
  4173. var g = a.my[0] === "left" ? -a.elemWidth : a.my[0] === "right" ? a.elemWidth : 0,
  4174. e = a.at[0] === "left" ? a.targetWidth : -a.targetWidth,
  4175. h = -2 * a.offset[0];
  4176. b.left += a.collisionPosition.left < 0 ? g + e + h : d > 0 ? g + e + h : 0
  4177. }
  4178. },
  4179. top: function (b, a) {
  4180. if (a.at[1] !== "center") {
  4181. var d = c(window);
  4182. d = a.collisionPosition.top + a.collisionHeight - d.height() - d.scrollTop();
  4183. var g = a.my[1] === "top" ? -a.elemHeight : a.my[1] === "bottom" ? a.elemHeight : 0,
  4184. e = a.at[1] === "top" ? a.targetHeight : -a.targetHeight,
  4185. h = -2 * a.offset[1];
  4186. b.top += a.collisionPosition.top < 0 ? g + e + h : d > 0 ? g + e + h : 0
  4187. }
  4188. }
  4189. }
  4190. };
  4191. if (!c.offset.setOffset) {
  4192. c.offset.setOffset = function (b, a) {
  4193. if (/static/.test(c.curCSS(b, "position"))) b.style.position = "relative";
  4194. var d = c(b),
  4195. g = d.offset(),
  4196. e = parseInt(c.curCSS(b, "top", true), 10) || 0,
  4197. h = parseInt(c.curCSS(b, "left", true), 10) || 0;
  4198. g = {
  4199. top: a.top - g.top + e,
  4200. left: a.left - g.left + h
  4201. };
  4202. "using" in a ? a.using.call(b, g) : d.css(g)
  4203. };
  4204. c.fn.offset = function (b) {
  4205. var a = this[0];
  4206. if (!a || !a.ownerDocument) return null;
  4207. if (b) return this.each(function () {
  4208. c.offset.setOffset(this, b)
  4209. });
  4210. return u.call(this)
  4211. }
  4212. }
  4213. })(jQuery);;
  4214. (function (d) {
  4215. d.widget("ui.draggable", d.ui.mouse, {
  4216. widgetEventPrefix: "drag",
  4217. options: {
  4218. addClasses: true,
  4219. appendTo: "parent",
  4220. axis: false,
  4221. connectToSortable: false,
  4222. containment: false,
  4223. cursor: "auto",
  4224. cursorAt: false,
  4225. grid: false,
  4226. handle: false,
  4227. helper: "original",
  4228. iframeFix: false,
  4229. opacity: false,
  4230. refreshPositions: false,
  4231. revert: false,
  4232. revertDuration: 500,
  4233. scope: "default",
  4234. scroll: true,
  4235. scrollSensitivity: 20,
  4236. scrollSpeed: 20,
  4237. snap: false,
  4238. snapMode: "both",
  4239. snapTolerance: 20,
  4240. stack: false,
  4241. zIndex: false
  4242. },
  4243. _create: function () {
  4244. if (this.options.helper == "original" && !/^(?:r|a|f)/.test(this.element.css("position"))) this.element[0].style.position = "relative";
  4245. this.options.addClasses && this.element.addClass("ui-draggable");
  4246. this.options.disabled && this.element.addClass("ui-draggable-disabled");
  4247. this._mouseInit()
  4248. },
  4249. destroy: function () {
  4250. if (this.element.data("draggable")) {
  4251. this.element.removeData("draggable").unbind(".draggable").removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");
  4252. this._mouseDestroy();
  4253. return this
  4254. }
  4255. },
  4256. _mouseCapture: function (a) {
  4257. var b = this.options;
  4258. if (this.helper || b.disabled || d(a.target).is(".ui-resizable-handle")) return false;
  4259. this.handle = this._getHandle(a);
  4260. if (!this.handle) return false;
  4261. if (b.iframeFix) d(b.iframeFix === true ? "iframe" : b.iframeFix).each(function () {
  4262. d('<div class="ui-draggable-iframeFix" style="background: #fff;"></div>').css({
  4263. width: this.offsetWidth + "px",
  4264. height: this.offsetHeight + "px",
  4265. position: "absolute",
  4266. opacity: "0.001",
  4267. zIndex: 1E3
  4268. }).css(d(this).offset()).appendTo("body")
  4269. });
  4270. return true
  4271. },
  4272. _mouseStart: function (a) {
  4273. var b = this.options;
  4274. this.helper = this._createHelper(a);
  4275. this._cacheHelperProportions();
  4276. if (d.ui.ddmanager) d.ui.ddmanager.current = this;
  4277. this._cacheMargins();
  4278. this.cssPosition = this.helper.css("position");
  4279. this.scrollParent = this.helper.scrollParent();
  4280. this.offset = this.positionAbs = this.element.offset();
  4281. this.offset = {
  4282. top: this.offset.top - this.margins.top,
  4283. left: this.offset.left - this.margins.left
  4284. };
  4285. d.extend(this.offset, {
  4286. click: {
  4287. left: a.pageX - this.offset.left,
  4288. top: a.pageY - this.offset.top
  4289. },
  4290. parent: this._getParentOffset(),
  4291. relative: this._getRelativeOffset()
  4292. });
  4293. this.originalPosition = this.position = this._generatePosition(a);
  4294. this.originalPageX = a.pageX;
  4295. this.originalPageY = a.pageY;
  4296. b.cursorAt && this._adjustOffsetFromHelper(b.cursorAt);
  4297. b.containment && this._setContainment();
  4298. if (this._trigger("start", a) === false) {
  4299. this._clear();
  4300. return false
  4301. }
  4302. this._cacheHelperProportions();
  4303. d.ui.ddmanager && !b.dropBehaviour && d.ui.ddmanager.prepareOffsets(this, a);
  4304. this.helper.addClass("ui-draggable-dragging");
  4305. this._mouseDrag(a, true);
  4306. d.ui.ddmanager && d.ui.ddmanager.dragStart(this, a);
  4307. return true
  4308. },
  4309. _mouseDrag: function (a, b) {
  4310. this.position = this._generatePosition(a);
  4311. this.positionAbs = this._convertPositionTo("absolute");
  4312. if (!b) {
  4313. b = this._uiHash();
  4314. if (this._trigger("drag", a, b) === false) {
  4315. this._mouseUp({});
  4316. return false
  4317. }
  4318. this.position = b.position
  4319. }
  4320. if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px";
  4321. if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px";
  4322. d.ui.ddmanager && d.ui.ddmanager.drag(this, a);
  4323. return false
  4324. },
  4325. _mouseStop: function (a) {
  4326. var b = false;
  4327. if (d.ui.ddmanager && !this.options.dropBehaviour) b = d.ui.ddmanager.drop(this, a);
  4328. if (this.dropped) {
  4329. b = this.dropped;
  4330. this.dropped = false
  4331. }
  4332. if ((!this.element[0] || !this.element[0].parentNode) && this.options.helper == "original") return false;
  4333. if (this.options.revert == "invalid" && !b || this.options.revert == "valid" && b || this.options.revert === true || d.isFunction(this.options.revert) && this.options.revert.call(this.element, b)) {
  4334. var c = this;
  4335. d(this.helper).animate(this.originalPosition, parseInt(this.options.revertDuration, 10), function () {
  4336. c._trigger("stop", a) !== false && c._clear()
  4337. })
  4338. } else this._trigger("stop", a) !== false && this._clear();
  4339. return false
  4340. },
  4341. _mouseUp: function (a) {
  4342. this.options.iframeFix === true && d("div.ui-draggable-iframeFix").each(function () {
  4343. this.parentNode.removeChild(this)
  4344. });
  4345. d.ui.ddmanager && d.ui.ddmanager.dragStop(this, a);
  4346. return d.ui.mouse.prototype._mouseUp.call(this, a)
  4347. },
  4348. cancel: function () {
  4349. this.helper.is(".ui-draggable-dragging") ? this._mouseUp({}) : this._clear();
  4350. return this
  4351. },
  4352. _getHandle: function (a) {
  4353. var b = !this.options.handle || !d(this.options.handle, this.element).length ? true : false;
  4354. d(this.options.handle, this.element).find("*").andSelf().each(function () {
  4355. if (this == a.target) b = true
  4356. });
  4357. return b
  4358. },
  4359. _createHelper: function (a) {
  4360. var b = this.options;
  4361. a = d.isFunction(b.helper) ? d(b.helper.apply(this.element[0], [a])) : b.helper == "clone" ? this.element.clone().removeAttr("id") : this.element;
  4362. a.parents("body").length || a.appendTo(b.appendTo == "parent" ? this.element[0].parentNode : b.appendTo);
  4363. a[0] != this.element[0] && !/(fixed|absolute)/.test(a.css("position")) && a.css("position", "absolute");
  4364. return a
  4365. },
  4366. _adjustOffsetFromHelper: function (a) {
  4367. if (typeof a == "string") a = a.split(" ");
  4368. if (d.isArray(a)) a = {
  4369. left: +a[0],
  4370. top: +a[1] || 0
  4371. };
  4372. if ("left" in a) this.offset.click.left = a.left + this.margins.left;
  4373. if ("right" in a) this.offset.click.left = this.helperProportions.width - a.right + this.margins.left;
  4374. if ("top" in a) this.offset.click.top = a.top + this.margins.top;
  4375. if ("bottom" in a) this.offset.click.top = this.helperProportions.height - a.bottom + this.margins.top
  4376. },
  4377. _getParentOffset: function () {
  4378. this.offsetParent = this.helper.offsetParent();
  4379. var a = this.offsetParent.offset();
  4380. if (this.cssPosition == "absolute" && this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
  4381. a.left += this.scrollParent.scrollLeft();
  4382. a.top += this.scrollParent.scrollTop()
  4383. }
  4384. if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && d.browser.msie) a = {
  4385. top: 0,
  4386. left: 0
  4387. };
  4388. return {
  4389. top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
  4390. left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
  4391. }
  4392. },
  4393. _getRelativeOffset: function () {
  4394. if (this.cssPosition == "relative") {
  4395. var a = this.element.position();
  4396. return {
  4397. top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
  4398. left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
  4399. }
  4400. } else return {
  4401. top: 0,
  4402. left: 0
  4403. }
  4404. },
  4405. _cacheMargins: function () {
  4406. this.margins = {
  4407. left: parseInt(this.element.css("marginLeft"), 10) || 0,
  4408. top: parseInt(this.element.css("marginTop"), 10) || 0,
  4409. right: parseInt(this.element.css("marginRight"), 10) || 0,
  4410. bottom: parseInt(this.element.css("marginBottom"), 10) || 0
  4411. }
  4412. },
  4413. _cacheHelperProportions: function () {
  4414. this.helperProportions = {
  4415. width: this.helper.outerWidth(),
  4416. height: this.helper.outerHeight()
  4417. }
  4418. },
  4419. _setContainment: function () {
  4420. var a = this.options;
  4421. if (a.containment == "parent") a.containment = this.helper[0].parentNode;
  4422. if (a.containment == "document" || a.containment == "window") this.containment = [a.containment == "document" ? 0 : d(window).scrollLeft() - this.offset.relative.left - this.offset.parent.left, a.containment == "document" ? 0 : d(window).scrollTop() - this.offset.relative.top - this.offset.parent.top, (a.containment == "document" ? 0 : d(window).scrollLeft()) + d(a.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (a.containment == "document" ? 0 : d(window).scrollTop()) + (d(a.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
  4423. if (!/^(document|window|parent)$/.test(a.containment) && a.containment.constructor != Array) {
  4424. a = d(a.containment);
  4425. var b = a[0];
  4426. if (b) {
  4427. a.offset();
  4428. var c = d(b).css("overflow") != "hidden";
  4429. this.containment = [(parseInt(d(b).css("borderLeftWidth"), 10) || 0) + (parseInt(d(b).css("paddingLeft"), 10) || 0), (parseInt(d(b).css("borderTopWidth"), 10) || 0) + (parseInt(d(b).css("paddingTop"), 10) || 0), (c ? Math.max(b.scrollWidth, b.offsetWidth) : b.offsetWidth) - (parseInt(d(b).css("borderLeftWidth"), 10) || 0) - (parseInt(d(b).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left - this.margins.right, (c ? Math.max(b.scrollHeight, b.offsetHeight) : b.offsetHeight) - (parseInt(d(b).css("borderTopWidth"), 10) || 0) - (parseInt(d(b).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top - this.margins.bottom];
  4430. this.relative_container = a
  4431. }
  4432. } else if (a.containment.constructor == Array) this.containment = a.containment
  4433. },
  4434. _convertPositionTo: function (a, b) {
  4435. if (!b) b = this.position;
  4436. a = a == "absolute" ? 1 : -1;
  4437. var c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
  4438. f = /(html|body)/i.test(c[0].tagName);
  4439. return {
  4440. top: b.top + this.offset.relative.top * a + this.offset.parent.top * a - (d.browser.safari && d.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : f ? 0 : c.scrollTop()) * a),
  4441. left: b.left + this.offset.relative.left * a + this.offset.parent.left * a - (d.browser.safari && d.browser.version < 526 && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : f ? 0 : c.scrollLeft()) * a)
  4442. }
  4443. },
  4444. _generatePosition: function (a) {
  4445. var b = this.options,
  4446. c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
  4447. f = /(html|body)/i.test(c[0].tagName),
  4448. e = a.pageX,
  4449. h = a.pageY;
  4450. if (this.originalPosition) {
  4451. var g;
  4452. if (this.containment) {
  4453. if (this.relative_container) {
  4454. g = this.relative_container.offset();
  4455. g = [this.containment[0] + g.left, this.containment[1] + g.top, this.containment[2] + g.left, this.containment[3] + g.top]
  4456. } else g = this.containment;
  4457. if (a.pageX - this.offset.click.left < g[0]) e = g[0] + this.offset.click.left;
  4458. if (a.pageY - this.offset.click.top < g[1]) h = g[1] + this.offset.click.top;
  4459. if (a.pageX - this.offset.click.left > g[2]) e = g[2] + this.offset.click.left;
  4460. if (a.pageY - this.offset.click.top > g[3]) h = g[3] + this.offset.click.top
  4461. }
  4462. if (b.grid) {
  4463. h = b.grid[1] ? this.originalPageY + Math.round((h - this.originalPageY) / b.grid[1]) * b.grid[1] : this.originalPageY;
  4464. h = g ? !(h - this.offset.click.top < g[1] || h - this.offset.click.top > g[3]) ? h : !(h - this.offset.click.top < g[1]) ? h - b.grid[1] : h + b.grid[1] : h;
  4465. e = b.grid[0] ? this.originalPageX + Math.round((e - this.originalPageX) / b.grid[0]) * b.grid[0] : this.originalPageX;
  4466. e = g ? !(e - this.offset.click.left < g[0] || e - this.offset.click.left > g[2]) ? e : !(e - this.offset.click.left < g[0]) ? e - b.grid[0] : e + b.grid[0] : e
  4467. }
  4468. }
  4469. return {
  4470. top: h - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (d.browser.safari && d.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : f ? 0 : c.scrollTop()),
  4471. left: e - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (d.browser.safari && d.browser.version < 526 && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : f ? 0 : c.scrollLeft())
  4472. }
  4473. },
  4474. _clear: function () {
  4475. this.helper.removeClass("ui-draggable-dragging");
  4476. this.helper[0] != this.element[0] && !this.cancelHelperRemoval && this.helper.remove();
  4477. this.helper = null;
  4478. this.cancelHelperRemoval = false
  4479. },
  4480. _trigger: function (a, b, c) {
  4481. c = c || this._uiHash();
  4482. d.ui.plugin.call(this, a, [b, c]);
  4483. if (a == "drag") this.positionAbs = this._convertPositionTo("absolute");
  4484. return d.Widget.prototype._trigger.call(this, a, b, c)
  4485. },
  4486. plugins: {},
  4487. _uiHash: function () {
  4488. return {
  4489. helper: this.helper,
  4490. position: this.position,
  4491. originalPosition: this.originalPosition,
  4492. offset: this.positionAbs
  4493. }
  4494. }
  4495. });
  4496. d.extend(d.ui.draggable, {
  4497. version: "1.8.16"
  4498. });
  4499. d.ui.plugin.add("draggable", "connectToSortable", {
  4500. start: function (a, b) {
  4501. var c = d(this).data("draggable"),
  4502. f = c.options,
  4503. e = d.extend({}, b, {
  4504. item: c.element
  4505. });
  4506. c.sortables = [];
  4507. d(f.connectToSortable).each(function () {
  4508. var h = d.data(this, "sortable");
  4509. if (h && !h.options.disabled) {
  4510. c.sortables.push({
  4511. instance: h,
  4512. shouldRevert: h.options.revert
  4513. });
  4514. h.refreshPositions();
  4515. h._trigger("activate", a, e)
  4516. }
  4517. })
  4518. },
  4519. stop: function (a, b) {
  4520. var c = d(this).data("draggable"),
  4521. f = d.extend({}, b, {
  4522. item: c.element
  4523. });
  4524. d.each(c.sortables, function () {
  4525. if (this.instance.isOver) {
  4526. this.instance.isOver = 0;
  4527. c.cancelHelperRemoval = true;
  4528. this.instance.cancelHelperRemoval = false;
  4529. if (this.shouldRevert) this.instance.options.revert = true;
  4530. this.instance._mouseStop(a);
  4531. this.instance.options.helper = this.instance.options._helper;
  4532. c.options.helper == "original" && this.instance.currentItem.css({
  4533. top: "auto",
  4534. left: "auto"
  4535. })
  4536. } else {
  4537. this.instance.cancelHelperRemoval = false;
  4538. this.instance._trigger("deactivate", a, f)
  4539. }
  4540. })
  4541. },
  4542. drag: function (a, b) {
  4543. var c = d(this).data("draggable"),
  4544. f = this;
  4545. d.each(c.sortables, function () {
  4546. this.instance.positionAbs = c.positionAbs;
  4547. this.instance.helperProportions = c.helperProportions;
  4548. this.instance.offset.click = c.offset.click;
  4549. if (this.instance._intersectsWith(this.instance.containerCache)) {
  4550. if (!this.instance.isOver) {
  4551. this.instance.isOver = 1;
  4552. this.instance.currentItem = d(f).clone().removeAttr("id").appendTo(this.instance.element).data("sortable-item", true);
  4553. this.instance.options._helper = this.instance.options.helper;
  4554. this.instance.options.helper = function () {
  4555. return b.helper[0]
  4556. };
  4557. a.target = this.instance.currentItem[0];
  4558. this.instance._mouseCapture(a, true);
  4559. this.instance._mouseStart(a, true, true);
  4560. this.instance.offset.click.top = c.offset.click.top;
  4561. this.instance.offset.click.left = c.offset.click.left;
  4562. this.instance.offset.parent.left -= c.offset.parent.left - this.instance.offset.parent.left;
  4563. this.instance.offset.parent.top -= c.offset.parent.top - this.instance.offset.parent.top;
  4564. c._trigger("toSortable", a);
  4565. c.dropped = this.instance.element;
  4566. c.currentItem = c.element;
  4567. this.instance.fromOutside = c
  4568. }
  4569. this.instance.currentItem && this.instance._mouseDrag(a)
  4570. } else if (this.instance.isOver) {
  4571. this.instance.isOver = 0;
  4572. this.instance.cancelHelperRemoval = true;
  4573. this.instance.options.revert = false;
  4574. this.instance._trigger("out", a, this.instance._uiHash(this.instance));
  4575. this.instance._mouseStop(a, true);
  4576. this.instance.options.helper = this.instance.options._helper;
  4577. this.instance.currentItem.remove();
  4578. this.instance.placeholder && this.instance.placeholder.remove();
  4579. c._trigger("fromSortable", a);
  4580. c.dropped = false
  4581. }
  4582. })
  4583. }
  4584. });
  4585. d.ui.plugin.add("draggable", "cursor", {
  4586. start: function () {
  4587. var a = d("body"),
  4588. b = d(this).data("draggable").options;
  4589. if (a.css("cursor")) b._cursor = a.css("cursor");
  4590. a.css("cursor", b.cursor)
  4591. },
  4592. stop: function () {
  4593. var a = d(this).data("draggable").options;
  4594. a._cursor && d("body").css("cursor", a._cursor)
  4595. }
  4596. });
  4597. d.ui.plugin.add("draggable", "opacity", {
  4598. start: function (a, b) {
  4599. a = d(b.helper);
  4600. b = d(this).data("draggable").options;
  4601. if (a.css("opacity")) b._opacity = a.css("opacity");
  4602. a.css("opacity", b.opacity)
  4603. },
  4604. stop: function (a, b) {
  4605. a = d(this).data("draggable").options;
  4606. a._opacity && d(b.helper).css("opacity", a._opacity)
  4607. }
  4608. });
  4609. d.ui.plugin.add("draggable", "scroll", {
  4610. start: function () {
  4611. var a = d(this).data("draggable");
  4612. if (a.scrollParent[0] != document && a.scrollParent[0].tagName != "HTML") a.overflowOffset = a.scrollParent.offset()
  4613. },
  4614. drag: function (a) {
  4615. var b = d(this).data("draggable"),
  4616. c = b.options,
  4617. f = false;
  4618. if (b.scrollParent[0] != document && b.scrollParent[0].tagName != "HTML") {
  4619. if (!c.axis || c.axis != "x") if (b.overflowOffset.top + b.scrollParent[0].offsetHeight - a.pageY < c.scrollSensitivity) b.scrollParent[0].scrollTop = f = b.scrollParent[0].scrollTop + c.scrollSpeed;
  4620. else if (a.pageY - b.overflowOffset.top < c.scrollSensitivity) b.scrollParent[0].scrollTop = f = b.scrollParent[0].scrollTop - c.scrollSpeed;
  4621. if (!c.axis || c.axis != "y") if (b.overflowOffset.left + b.scrollParent[0].offsetWidth - a.pageX < c.scrollSensitivity) b.scrollParent[0].scrollLeft = f = b.scrollParent[0].scrollLeft + c.scrollSpeed;
  4622. else if (a.pageX - b.overflowOffset.left < c.scrollSensitivity) b.scrollParent[0].scrollLeft = f = b.scrollParent[0].scrollLeft - c.scrollSpeed
  4623. } else {
  4624. if (!c.axis || c.axis != "x") if (a.pageY - d(document).scrollTop() < c.scrollSensitivity) f = d(document).scrollTop(d(document).scrollTop() - c.scrollSpeed);
  4625. else if (d(window).height() - (a.pageY - d(document).scrollTop()) < c.scrollSensitivity) f = d(document).scrollTop(d(document).scrollTop() + c.scrollSpeed);
  4626. if (!c.axis || c.axis != "y") if (a.pageX - d(document).scrollLeft() < c.scrollSensitivity) f = d(document).scrollLeft(d(document).scrollLeft() - c.scrollSpeed);
  4627. else if (d(window).width() - (a.pageX - d(document).scrollLeft()) < c.scrollSensitivity) f = d(document).scrollLeft(d(document).scrollLeft() + c.scrollSpeed)
  4628. }
  4629. f !== false && d.ui.ddmanager && !c.dropBehaviour && d.ui.ddmanager.prepareOffsets(b, a)
  4630. }
  4631. });
  4632. d.ui.plugin.add("draggable", "snap", {
  4633. start: function () {
  4634. var a = d(this).data("draggable"),
  4635. b = a.options;
  4636. a.snapElements = [];
  4637. d(b.snap.constructor != String ? b.snap.items || ":data(draggable)" : b.snap).each(function () {
  4638. var c = d(this),
  4639. f = c.offset();
  4640. this != a.element[0] && a.snapElements.push({
  4641. item: this,
  4642. width: c.outerWidth(),
  4643. height: c.outerHeight(),
  4644. top: f.top,
  4645. left: f.left
  4646. })
  4647. })
  4648. },
  4649. drag: function (a, b) {
  4650. for (var c = d(this).data("draggable"), f = c.options, e = f.snapTolerance, h = b.offset.left, g = h + c.helperProportions.width, n = b.offset.top, o = n + c.helperProportions.height, i = c.snapElements.length - 1; i >= 0; i--) {
  4651. var j = c.snapElements[i].left,
  4652. l = j + c.snapElements[i].width,
  4653. k = c.snapElements[i].top,
  4654. m = k + c.snapElements[i].height;
  4655. if (j - e < h && h < l + e && k - e < n && n < m + e || j - e < h && h < l + e && k - e < o && o < m + e || j - e < g && g < l + e && k - e < n && n < m + e || j - e < g && g < l + e && k - e < o && o < m + e) {
  4656. if (f.snapMode != "inner") {
  4657. var p = Math.abs(k - o) <= e,
  4658. q = Math.abs(m - n) <= e,
  4659. r = Math.abs(j - g) <= e,
  4660. s = Math.abs(l - h) <= e;
  4661. if (p) b.position.top = c._convertPositionTo("relative", {
  4662. top: k - c.helperProportions.height,
  4663. left: 0
  4664. }).top - c.margins.top;
  4665. if (q) b.position.top = c._convertPositionTo("relative", {
  4666. top: m,
  4667. left: 0
  4668. }).top - c.margins.top;
  4669. if (r) b.position.left = c._convertPositionTo("relative", {
  4670. top: 0,
  4671. left: j - c.helperProportions.width
  4672. }).left - c.margins.left;
  4673. if (s) b.position.left = c._convertPositionTo("relative", {
  4674. top: 0,
  4675. left: l
  4676. }).left - c.margins.left
  4677. }
  4678. var t = p || q || r || s;
  4679. if (f.snapMode != "outer") {
  4680. p = Math.abs(k - n) <= e;
  4681. q = Math.abs(m - o) <= e;
  4682. r = Math.abs(j - h) <= e;
  4683. s = Math.abs(l - g) <= e;
  4684. if (p) b.position.top = c._convertPositionTo("relative", {
  4685. top: k,
  4686. left: 0
  4687. }).top - c.margins.top;
  4688. if (q) b.position.top = c._convertPositionTo("relative", {
  4689. top: m - c.helperProportions.height,
  4690. left: 0
  4691. }).top - c.margins.top;
  4692. if (r) b.position.left = c._convertPositionTo("relative", {
  4693. top: 0,
  4694. left: j
  4695. }).left - c.margins.left;
  4696. if (s) b.position.left = c._convertPositionTo("relative", {
  4697. top: 0,
  4698. left: l - c.helperProportions.width
  4699. }).left - c.margins.left
  4700. }
  4701. if (!c.snapElements[i].snapping && (p || q || r || s || t)) c.options.snap.snap && c.options.snap.snap.call(c.element, a, d.extend(c._uiHash(), {
  4702. snapItem: c.snapElements[i].item
  4703. }));
  4704. c.snapElements[i].snapping = p || q || r || s || t
  4705. } else {
  4706. c.snapElements[i].snapping && c.options.snap.release && c.options.snap.release.call(c.element, a, d.extend(c._uiHash(), {
  4707. snapItem: c.snapElements[i].item
  4708. }));
  4709. c.snapElements[i].snapping = false
  4710. }
  4711. }
  4712. }
  4713. });
  4714. d.ui.plugin.add("draggable", "stack", {
  4715. start: function () {
  4716. var a = d(this).data("draggable").options;
  4717. a = d.makeArray(d(a.stack)).sort(function (c, f) {
  4718. return (parseInt(d(c).css("zIndex"), 10) || 0) - (parseInt(d(f).css("zIndex"), 10) || 0)
  4719. });
  4720. if (a.length) {
  4721. var b = parseInt(a[0].style.zIndex) || 0;
  4722. d(a).each(function (c) {
  4723. this.style.zIndex = b + c
  4724. });
  4725. this[0].style.zIndex = b + a.length
  4726. }
  4727. }
  4728. });
  4729. d.ui.plugin.add("draggable", "zIndex", {
  4730. start: function (a, b) {
  4731. a = d(b.helper);
  4732. b = d(this).data("draggable").options;
  4733. if (a.css("zIndex")) b._zIndex = a.css("zIndex");
  4734. a.css("zIndex", b.zIndex)
  4735. },
  4736. stop: function (a, b) {
  4737. a = d(this).data("draggable").options;
  4738. a._zIndex && d(b.helper).css("zIndex", a._zIndex)
  4739. }
  4740. })
  4741. })(jQuery);;
  4742. (function (d) {
  4743. d.widget("ui.droppable", {
  4744. widgetEventPrefix: "drop",
  4745. options: {
  4746. accept: "*",
  4747. activeClass: false,
  4748. addClasses: true,
  4749. greedy: false,
  4750. hoverClass: false,
  4751. scope: "default",
  4752. tolerance: "intersect"
  4753. },
  4754. _create: function () {
  4755. var a = this.options,
  4756. b = a.accept;
  4757. this.isover = 0;
  4758. this.isout = 1;
  4759. this.accept = d.isFunction(b) ? b : function (c) {
  4760. return c.is(b)
  4761. };
  4762. this.proportions = {
  4763. width: this.element[0].offsetWidth,
  4764. height: this.element[0].offsetHeight
  4765. };
  4766. d.ui.ddmanager.droppables[a.scope] = d.ui.ddmanager.droppables[a.scope] || [];
  4767. d.ui.ddmanager.droppables[a.scope].push(this);
  4768. a.addClasses && this.element.addClass("ui-droppable")
  4769. },
  4770. destroy: function () {
  4771. for (var a = d.ui.ddmanager.droppables[this.options.scope], b = 0; b < a.length; b++) a[b] == this && a.splice(b, 1);
  4772. this.element.removeClass("ui-droppable ui-droppable-disabled").removeData("droppable").unbind(".droppable");
  4773. return this
  4774. },
  4775. _setOption: function (a, b) {
  4776. if (a == "accept") this.accept = d.isFunction(b) ? b : function (c) {
  4777. return c.is(b)
  4778. };
  4779. d.Widget.prototype._setOption.apply(this, arguments)
  4780. },
  4781. _activate: function (a) {
  4782. var b = d.ui.ddmanager.current;
  4783. this.options.activeClass && this.element.addClass(this.options.activeClass);
  4784. b && this._trigger("activate", a, this.ui(b))
  4785. },
  4786. _deactivate: function (a) {
  4787. var b = d.ui.ddmanager.current;
  4788. this.options.activeClass && this.element.removeClass(this.options.activeClass);
  4789. b && this._trigger("deactivate", a, this.ui(b))
  4790. },
  4791. _over: function (a) {
  4792. var b = d.ui.ddmanager.current;
  4793. if (!(!b || (b.currentItem || b.element)[0] == this.element[0])) if (this.accept.call(this.element[0], b.currentItem || b.element)) {
  4794. this.options.hoverClass && this.element.addClass(this.options.hoverClass);
  4795. this._trigger("over", a, this.ui(b))
  4796. }
  4797. },
  4798. _out: function (a) {
  4799. var b = d.ui.ddmanager.current;
  4800. if (!(!b || (b.currentItem || b.element)[0] == this.element[0])) if (this.accept.call(this.element[0], b.currentItem || b.element)) {
  4801. this.options.hoverClass && this.element.removeClass(this.options.hoverClass);
  4802. this._trigger("out", a, this.ui(b))
  4803. }
  4804. },
  4805. _drop: function (a, b) {
  4806. var c = b || d.ui.ddmanager.current;
  4807. if (!c || (c.currentItem || c.element)[0] == this.element[0]) return false;
  4808. var e = false;
  4809. this.element.find(":data(droppable)").not(".ui-draggable-dragging").each(function () {
  4810. var g = d.data(this, "droppable");
  4811. if (g.options.greedy && !g.options.disabled && g.options.scope == c.options.scope && g.accept.call(g.element[0], c.currentItem || c.element) && d.ui.intersect(c, d.extend(g, {
  4812. offset: g.element.offset()
  4813. }), g.options.tolerance)) {
  4814. e = true;
  4815. return false
  4816. }
  4817. });
  4818. if (e) return false;
  4819. if (this.accept.call(this.element[0], c.currentItem || c.element)) {
  4820. this.options.activeClass && this.element.removeClass(this.options.activeClass);
  4821. this.options.hoverClass && this.element.removeClass(this.options.hoverClass);
  4822. this._trigger("drop", a, this.ui(c));
  4823. return this.element
  4824. }
  4825. return false
  4826. },
  4827. ui: function (a) {
  4828. return {
  4829. draggable: a.currentItem || a.element,
  4830. helper: a.helper,
  4831. position: a.position,
  4832. offset: a.positionAbs
  4833. }
  4834. }
  4835. });
  4836. d.extend(d.ui.droppable, {
  4837. version: "1.8.16"
  4838. });
  4839. d.ui.intersect = function (a, b, c) {
  4840. if (!b.offset) return false;
  4841. var e = (a.positionAbs || a.position.absolute).left,
  4842. g = e + a.helperProportions.width,
  4843. f = (a.positionAbs || a.position.absolute).top,
  4844. h = f + a.helperProportions.height,
  4845. i = b.offset.left,
  4846. k = i + b.proportions.width,
  4847. j = b.offset.top,
  4848. l = j + b.proportions.height;
  4849. switch (c) {
  4850. case "fit":
  4851. return i <= e && g <= k && j <= f && h <= l;
  4852. case "intersect":
  4853. return i < e + a.helperProportions.width / 2 && g - a.helperProportions.width / 2 < k && j < f + a.helperProportions.height / 2 && h - a.helperProportions.height / 2 < l;
  4854. case "pointer":
  4855. return d.ui.isOver((a.positionAbs || a.position.absolute).top + (a.clickOffset || a.offset.click).top, (a.positionAbs || a.position.absolute).left + (a.clickOffset || a.offset.click).left, j, i, b.proportions.height, b.proportions.width);
  4856. case "touch":
  4857. return (f >= j && f <= l || h >= j && h <= l || f < j && h > l) && (e >= i && e <= k || g >= i && g <= k || e < i && g > k);
  4858. default:
  4859. return false
  4860. }
  4861. };
  4862. d.ui.ddmanager = {
  4863. current: null,
  4864. droppables: {
  4865. "default": []
  4866. },
  4867. prepareOffsets: function (a, b) {
  4868. var c = d.ui.ddmanager.droppables[a.options.scope] || [],
  4869. e = b ? b.type : null,
  4870. g = (a.currentItem || a.element).find(":data(droppable)").andSelf(),
  4871. f = 0;
  4872. a: for (; f < c.length; f++) if (!(c[f].options.disabled || a && !c[f].accept.call(c[f].element[0], a.currentItem || a.element))) {
  4873. for (var h = 0; h < g.length; h++) if (g[h] == c[f].element[0]) {
  4874. c[f].proportions.height = 0;
  4875. continue a
  4876. }
  4877. c[f].visible = c[f].element.css("display") != "none";
  4878. if (c[f].visible) {
  4879. e == "mousedown" && c[f]._activate.call(c[f], b);
  4880. c[f].offset = c[f].element.offset();
  4881. c[f].proportions = {
  4882. width: c[f].element[0].offsetWidth,
  4883. height: c[f].element[0].offsetHeight
  4884. }
  4885. }
  4886. }
  4887. },
  4888. drop: function (a, b) {
  4889. var c = false;
  4890. d.each(d.ui.ddmanager.droppables[a.options.scope] || [], function () {
  4891. if (this.options) {
  4892. if (!this.options.disabled && this.visible && d.ui.intersect(a, this, this.options.tolerance)) c = c || this._drop.call(this, b);
  4893. if (!this.options.disabled && this.visible && this.accept.call(this.element[0], a.currentItem || a.element)) {
  4894. this.isout = 1;
  4895. this.isover = 0;
  4896. this._deactivate.call(this, b)
  4897. }
  4898. }
  4899. });
  4900. return c
  4901. },
  4902. dragStart: function (a, b) {
  4903. a.element.parents(":not(body,html)").bind("scroll.droppable", function () {
  4904. a.options.refreshPositions || d.ui.ddmanager.prepareOffsets(a, b)
  4905. })
  4906. },
  4907. drag: function (a, b) {
  4908. a.options.refreshPositions && d.ui.ddmanager.prepareOffsets(a, b);
  4909. d.each(d.ui.ddmanager.droppables[a.options.scope] || [], function () {
  4910. if (!(this.options.disabled || this.greedyChild || !this.visible)) {
  4911. var c = d.ui.intersect(a, this, this.options.tolerance);
  4912. if (c = !c && this.isover == 1 ? "isout" : c && this.isover == 0 ? "isover" : null) {
  4913. var e;
  4914. if (this.options.greedy) {
  4915. var g = this.element.parents(":data(droppable):eq(0)");
  4916. if (g.length) {
  4917. e = d.data(g[0], "droppable");
  4918. e.greedyChild = c == "isover" ? 1 : 0
  4919. }
  4920. }
  4921. if (e && c == "isover") {
  4922. e.isover = 0;
  4923. e.isout = 1;
  4924. e._out.call(e, b)
  4925. }
  4926. this[c] = 1;
  4927. this[c == "isout" ? "isover" : "isout"] = 0;
  4928. this[c == "isover" ? "_over" : "_out"].call(this, b);
  4929. if (e && c == "isout") {
  4930. e.isout = 0;
  4931. e.isover = 1;
  4932. e._over.call(e, b)
  4933. }
  4934. }
  4935. }
  4936. })
  4937. },
  4938. dragStop: function (a, b) {
  4939. a.element.parents(":not(body,html)").unbind("scroll.droppable");
  4940. a.options.refreshPositions || d.ui.ddmanager.prepareOffsets(a, b)
  4941. }
  4942. }
  4943. })(jQuery);;
  4944. (function (e) {
  4945. e.widget("ui.selectable", e.ui.mouse, {
  4946. options: {
  4947. appendTo: "body",
  4948. autoRefresh: true,
  4949. distance: 0,
  4950. filter: "*",
  4951. tolerance: "touch"
  4952. },
  4953. _create: function () {
  4954. var c = this;
  4955. this.element.addClass("ui-selectable");
  4956. this.dragged = false;
  4957. var f;
  4958. this.refresh = function () {
  4959. f = e(c.options.filter, c.element[0]);
  4960. f.each(function () {
  4961. var d = e(this),
  4962. b = d.offset();
  4963. e.data(this, "selectable-item", {
  4964. element: this,
  4965. $element: d,
  4966. left: b.left,
  4967. top: b.top,
  4968. right: b.left + d.outerWidth(),
  4969. bottom: b.top + d.outerHeight(),
  4970. startselected: false,
  4971. selected: d.hasClass("ui-selected"),
  4972. selecting: d.hasClass("ui-selecting"),
  4973. unselecting: d.hasClass("ui-unselecting")
  4974. })
  4975. })
  4976. };
  4977. this.refresh();
  4978. this.selectees = f.addClass("ui-selectee");
  4979. this._mouseInit();
  4980. this.helper = e("<div class='ui-selectable-helper'></div>")
  4981. },
  4982. destroy: function () {
  4983. this.selectees.removeClass("ui-selectee").removeData("selectable-item");
  4984. this.element.removeClass("ui-selectable ui-selectable-disabled").removeData("selectable").unbind(".selectable");
  4985. this._mouseDestroy();
  4986. return this
  4987. },
  4988. _mouseStart: function (c) {
  4989. var f = this;
  4990. this.opos = [c.pageX, c.pageY];
  4991. if (!this.options.disabled) {
  4992. var d = this.options;
  4993. this.selectees = e(d.filter, this.element[0]);
  4994. this._trigger("start", c);
  4995. e(d.appendTo).append(this.helper);
  4996. this.helper.css({
  4997. left: c.clientX,
  4998. top: c.clientY,
  4999. width: 0,
  5000. height: 0
  5001. });
  5002. d.autoRefresh && this.refresh();
  5003. this.selectees.filter(".ui-selected").each(function () {
  5004. var b = e.data(this, "selectable-item");
  5005. b.startselected = true;
  5006. if (!c.metaKey) {
  5007. b.$element.removeClass("ui-selected");
  5008. b.selected = false;
  5009. b.$element.addClass("ui-unselecting");
  5010. b.unselecting = true;
  5011. f._trigger("unselecting", c, {
  5012. unselecting: b.element
  5013. })
  5014. }
  5015. });
  5016. e(c.target).parents().andSelf().each(function () {
  5017. var b = e.data(this, "selectable-item");
  5018. if (b) {
  5019. var g = !c.metaKey || !b.$element.hasClass("ui-selected");
  5020. b.$element.removeClass(g ? "ui-unselecting" : "ui-selected").addClass(g ? "ui-selecting" : "ui-unselecting");
  5021. b.unselecting = !g;
  5022. b.selecting = g;
  5023. (b.selected = g) ? f._trigger("selecting", c, {
  5024. selecting: b.element
  5025. }) : f._trigger("unselecting", c, {
  5026. unselecting: b.element
  5027. });
  5028. return false
  5029. }
  5030. })
  5031. }
  5032. },
  5033. _mouseDrag: function (c) {
  5034. var f = this;
  5035. this.dragged = true;
  5036. if (!this.options.disabled) {
  5037. var d = this.options,
  5038. b = this.opos[0],
  5039. g = this.opos[1],
  5040. h = c.pageX,
  5041. i = c.pageY;
  5042. if (b > h) {
  5043. var j = h;
  5044. h = b;
  5045. b = j
  5046. }
  5047. if (g > i) {
  5048. j = i;
  5049. i = g;
  5050. g = j
  5051. }
  5052. this.helper.css({
  5053. left: b,
  5054. top: g,
  5055. width: h - b,
  5056. height: i - g
  5057. });
  5058. this.selectees.each(function () {
  5059. var a = e.data(this, "selectable-item");
  5060. if (!(!a || a.element == f.element[0])) {
  5061. var k = false;
  5062. if (d.tolerance == "touch") k = !(a.left > h || a.right < b || a.top > i || a.bottom < g);
  5063. else if (d.tolerance == "fit") k = a.left > b && a.right < h && a.top > g && a.bottom < i;
  5064. if (k) {
  5065. if (a.selected) {
  5066. a.$element.removeClass("ui-selected");
  5067. a.selected = false
  5068. }
  5069. if (a.unselecting) {
  5070. a.$element.removeClass("ui-unselecting");
  5071. a.unselecting = false
  5072. }
  5073. if (!a.selecting) {
  5074. a.$element.addClass("ui-selecting");
  5075. a.selecting = true;
  5076. f._trigger("selecting", c, {
  5077. selecting: a.element
  5078. })
  5079. }
  5080. } else {
  5081. if (a.selecting) if (c.metaKey && a.startselected) {
  5082. a.$element.removeClass("ui-selecting");
  5083. a.selecting = false;
  5084. a.$element.addClass("ui-selected");
  5085. a.selected = true
  5086. } else {
  5087. a.$element.removeClass("ui-selecting");
  5088. a.selecting = false;
  5089. if (a.startselected) {
  5090. a.$element.addClass("ui-unselecting");
  5091. a.unselecting = true
  5092. }
  5093. f._trigger("unselecting", c, {
  5094. unselecting: a.element
  5095. })
  5096. }
  5097. if (a.selected) if (!c.metaKey && !a.startselected) {
  5098. a.$element.removeClass("ui-selected");
  5099. a.selected = false;
  5100. a.$element.addClass("ui-unselecting");
  5101. a.unselecting = true;
  5102. f._trigger("unselecting", c, {
  5103. unselecting: a.element
  5104. })
  5105. }
  5106. }
  5107. }
  5108. });
  5109. return false
  5110. }
  5111. },
  5112. _mouseStop: function (c) {
  5113. var f = this;
  5114. this.dragged = false;
  5115. e(".ui-unselecting", this.element[0]).each(function () {
  5116. var d = e.data(this, "selectable-item");
  5117. d.$element.removeClass("ui-unselecting");
  5118. d.unselecting = false;
  5119. d.startselected = false;
  5120. f._trigger("unselected", c, {
  5121. unselected: d.element
  5122. })
  5123. });
  5124. e(".ui-selecting", this.element[0]).each(function () {
  5125. var d = e.data(this, "selectable-item");
  5126. d.$element.removeClass("ui-selecting").addClass("ui-selected");
  5127. d.selecting = false;
  5128. d.selected = true;
  5129. d.startselected = true;
  5130. f._trigger("selected", c, {
  5131. selected: d.element
  5132. })
  5133. });
  5134. this._trigger("stop", c);
  5135. this.helper.remove();
  5136. return false
  5137. }
  5138. });
  5139. e.extend(e.ui.selectable, {
  5140. version: "1.8.16"
  5141. })
  5142. })(jQuery);;
  5143. (function (d) {
  5144. d.widget("ui.sortable", d.ui.mouse, {
  5145. widgetEventPrefix: "sort",
  5146. options: {
  5147. appendTo: "parent",
  5148. axis: false,
  5149. connectWith: false,
  5150. containment: false,
  5151. cursor: "auto",
  5152. cursorAt: false,
  5153. dropOnEmpty: true,
  5154. forcePlaceholderSize: false,
  5155. forceHelperSize: false,
  5156. grid: false,
  5157. handle: false,
  5158. helper: "original",
  5159. items: "> *",
  5160. opacity: false,
  5161. placeholder: false,
  5162. revert: false,
  5163. scroll: true,
  5164. scrollSensitivity: 20,
  5165. scrollSpeed: 20,
  5166. scope: "default",
  5167. tolerance: "intersect",
  5168. zIndex: 1E3
  5169. },
  5170. _create: function () {
  5171. var a = this.options;
  5172. this.containerCache = {};
  5173. this.element.addClass("ui-sortable");
  5174. this.refresh();
  5175. this.floating = this.items.length ? a.axis === "x" || /left|right/.test(this.items[0].item.css("float")) || /inline|table-cell/.test(this.items[0].item.css("display")) : false;
  5176. this.offset = this.element.offset();
  5177. this._mouseInit()
  5178. },
  5179. destroy: function () {
  5180. this.element.removeClass("ui-sortable ui-sortable-disabled").removeData("sortable").unbind(".sortable");
  5181. this._mouseDestroy();
  5182. for (var a = this.items.length - 1; a >= 0; a--) this.items[a].item.removeData("sortable-item");
  5183. return this
  5184. },
  5185. _setOption: function (a, b) {
  5186. if (a === "disabled") {
  5187. this.options[a] = b;
  5188. this.widget()[b ? "addClass" : "removeClass"]("ui-sortable-disabled")
  5189. } else d.Widget.prototype._setOption.apply(this, arguments)
  5190. },
  5191. _mouseCapture: function (a, b) {
  5192. if (this.reverting) return false;
  5193. if (this.options.disabled || this.options.type == "static") return false;
  5194. this._refreshItems(a);
  5195. var c = null,
  5196. e = this;
  5197. d(a.target).parents().each(function () {
  5198. if (d.data(this, "sortable-item") == e) {
  5199. c = d(this);
  5200. return false
  5201. }
  5202. });
  5203. if (d.data(a.target, "sortable-item") == e) c = d(a.target);
  5204. if (!c) return false;
  5205. if (this.options.handle && !b) {
  5206. var f = false;
  5207. d(this.options.handle, c).find("*").andSelf().each(function () {
  5208. if (this == a.target) f = true
  5209. });
  5210. if (!f) return false
  5211. }
  5212. this.currentItem = c;
  5213. this._removeCurrentsFromItems();
  5214. return true
  5215. },
  5216. _mouseStart: function (a, b, c) {
  5217. b = this.options;
  5218. var e = this;
  5219. this.currentContainer = this;
  5220. this.refreshPositions();
  5221. this.helper = this._createHelper(a);
  5222. this._cacheHelperProportions();
  5223. this._cacheMargins();
  5224. this.scrollParent = this.helper.scrollParent();
  5225. this.offset = this.currentItem.offset();
  5226. this.offset = {
  5227. top: this.offset.top - this.margins.top,
  5228. left: this.offset.left - this.margins.left
  5229. };
  5230. this.helper.css("position", "absolute");
  5231. this.cssPosition = this.helper.css("position");
  5232. d.extend(this.offset, {
  5233. click: {
  5234. left: a.pageX - this.offset.left,
  5235. top: a.pageY - this.offset.top
  5236. },
  5237. parent: this._getParentOffset(),
  5238. relative: this._getRelativeOffset()
  5239. });
  5240. this.originalPosition = this._generatePosition(a);
  5241. this.originalPageX = a.pageX;
  5242. this.originalPageY = a.pageY;
  5243. b.cursorAt && this._adjustOffsetFromHelper(b.cursorAt);
  5244. this.domPosition = {
  5245. prev: this.currentItem.prev()[0],
  5246. parent: this.currentItem.parent()[0]
  5247. };
  5248. this.helper[0] != this.currentItem[0] && this.currentItem.hide();
  5249. this._createPlaceholder();
  5250. b.containment && this._setContainment();
  5251. if (b.cursor) {
  5252. if (d("body").css("cursor")) this._storedCursor = d("body").css("cursor");
  5253. d("body").css("cursor", b.cursor)
  5254. }
  5255. if (b.opacity) {
  5256. if (this.helper.css("opacity")) this._storedOpacity = this.helper.css("opacity");
  5257. this.helper.css("opacity", b.opacity)
  5258. }
  5259. if (b.zIndex) {
  5260. if (this.helper.css("zIndex")) this._storedZIndex = this.helper.css("zIndex");
  5261. this.helper.css("zIndex", b.zIndex)
  5262. }
  5263. if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") this.overflowOffset = this.scrollParent.offset();
  5264. this._trigger("start", a, this._uiHash());
  5265. this._preserveHelperProportions || this._cacheHelperProportions();
  5266. if (!c) for (c = this.containers.length - 1; c >= 0; c--) this.containers[c]._trigger("activate", a, e._uiHash(this));
  5267. if (d.ui.ddmanager) d.ui.ddmanager.current = this;
  5268. d.ui.ddmanager && !b.dropBehaviour && d.ui.ddmanager.prepareOffsets(this, a);
  5269. this.dragging = true;
  5270. this.helper.addClass("ui-sortable-helper");
  5271. this._mouseDrag(a);
  5272. return true
  5273. },
  5274. _mouseDrag: function (a) {
  5275. this.position = this._generatePosition(a);
  5276. this.positionAbs = this._convertPositionTo("absolute");
  5277. if (!this.lastPositionAbs) this.lastPositionAbs = this.positionAbs;
  5278. if (this.options.scroll) {
  5279. var b = this.options,
  5280. c = false;
  5281. if (this.scrollParent[0] != document && this.scrollParent[0].tagName != "HTML") {
  5282. if (this.overflowOffset.top + this.scrollParent[0].offsetHeight - a.pageY < b.scrollSensitivity) this.scrollParent[0].scrollTop = c = this.scrollParent[0].scrollTop + b.scrollSpeed;
  5283. else if (a.pageY - this.overflowOffset.top < b.scrollSensitivity) this.scrollParent[0].scrollTop = c = this.scrollParent[0].scrollTop - b.scrollSpeed;
  5284. if (this.overflowOffset.left + this.scrollParent[0].offsetWidth - a.pageX < b.scrollSensitivity) this.scrollParent[0].scrollLeft = c = this.scrollParent[0].scrollLeft + b.scrollSpeed;
  5285. else if (a.pageX - this.overflowOffset.left < b.scrollSensitivity) this.scrollParent[0].scrollLeft = c = this.scrollParent[0].scrollLeft - b.scrollSpeed
  5286. } else {
  5287. if (a.pageY - d(document).scrollTop() < b.scrollSensitivity) c = d(document).scrollTop(d(document).scrollTop() - b.scrollSpeed);
  5288. else if (d(window).height() - (a.pageY - d(document).scrollTop()) < b.scrollSensitivity) c = d(document).scrollTop(d(document).scrollTop() + b.scrollSpeed);
  5289. if (a.pageX - d(document).scrollLeft() < b.scrollSensitivity) c = d(document).scrollLeft(d(document).scrollLeft() - b.scrollSpeed);
  5290. else if (d(window).width() - (a.pageX - d(document).scrollLeft()) < b.scrollSensitivity) c = d(document).scrollLeft(d(document).scrollLeft() + b.scrollSpeed)
  5291. }
  5292. c !== false && d.ui.ddmanager && !b.dropBehaviour && d.ui.ddmanager.prepareOffsets(this, a)
  5293. }
  5294. this.positionAbs = this._convertPositionTo("absolute");
  5295. if (!this.options.axis || this.options.axis != "y") this.helper[0].style.left = this.position.left + "px";
  5296. if (!this.options.axis || this.options.axis != "x") this.helper[0].style.top = this.position.top + "px";
  5297. for (b = this.items.length - 1; b >= 0; b--) {
  5298. c = this.items[b];
  5299. var e = c.item[0],
  5300. f = this._intersectsWithPointer(c);
  5301. if (f) if (e != this.currentItem[0] && this.placeholder[f == 1 ? "next" : "prev"]()[0] != e && !d.ui.contains(this.placeholder[0], e) && (this.options.type == "semi-dynamic" ? !d.ui.contains(this.element[0], e) : true)) {
  5302. this.direction = f == 1 ? "down" : "up";
  5303. if (this.options.tolerance == "pointer" || this._intersectsWithSides(c)) this._rearrange(a, c);
  5304. else break;
  5305. this._trigger("change", a, this._uiHash());
  5306. break
  5307. }
  5308. }
  5309. this._contactContainers(a);
  5310. d.ui.ddmanager && d.ui.ddmanager.drag(this, a);
  5311. this._trigger("sort", a, this._uiHash());
  5312. this.lastPositionAbs = this.positionAbs;
  5313. return false
  5314. },
  5315. _mouseStop: function (a, b) {
  5316. if (a) {
  5317. d.ui.ddmanager && !this.options.dropBehaviour && d.ui.ddmanager.drop(this, a);
  5318. if (this.options.revert) {
  5319. var c = this;
  5320. b = c.placeholder.offset();
  5321. c.reverting = true;
  5322. d(this.helper).animate({
  5323. left: b.left - this.offset.parent.left - c.margins.left + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollLeft),
  5324. top: b.top - this.offset.parent.top - c.margins.top + (this.offsetParent[0] == document.body ? 0 : this.offsetParent[0].scrollTop)
  5325. }, parseInt(this.options.revert, 10) || 500, function () {
  5326. c._clear(a)
  5327. })
  5328. } else this._clear(a, b);
  5329. return false
  5330. }
  5331. },
  5332. cancel: function () {
  5333. var a = this;
  5334. if (this.dragging) {
  5335. this._mouseUp({
  5336. target: null
  5337. });
  5338. this.options.helper == "original" ? this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper") : this.currentItem.show();
  5339. for (var b = this.containers.length - 1; b >= 0; b--) {
  5340. this.containers[b]._trigger("deactivate", null, a._uiHash(this));
  5341. if (this.containers[b].containerCache.over) {
  5342. this.containers[b]._trigger("out", null, a._uiHash(this));
  5343. this.containers[b].containerCache.over = 0
  5344. }
  5345. }
  5346. }
  5347. if (this.placeholder) {
  5348. this.placeholder[0].parentNode && this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
  5349. this.options.helper != "original" && this.helper && this.helper[0].parentNode && this.helper.remove();
  5350. d.extend(this, {
  5351. helper: null,
  5352. dragging: false,
  5353. reverting: false,
  5354. _noFinalSort: null
  5355. });
  5356. this.domPosition.prev ? d(this.domPosition.prev).after(this.currentItem) : d(this.domPosition.parent).prepend(this.currentItem)
  5357. }
  5358. return this
  5359. },
  5360. serialize: function (a) {
  5361. var b = this._getItemsAsjQuery(a && a.connected),
  5362. c = [];
  5363. a = a || {};
  5364. d(b).each(function () {
  5365. var e = (d(a.item || this).attr(a.attribute || "id") || "").match(a.expression || /(.+)[-=_](.+)/);
  5366. if (e) c.push((a.key || e[1] + "[]") + "=" + (a.key && a.expression ? e[1] : e[2]))
  5367. });
  5368. !c.length && a.key && c.push(a.key + "=");
  5369. return c.join("&")
  5370. },
  5371. toArray: function (a) {
  5372. var b = this._getItemsAsjQuery(a && a.connected),
  5373. c = [];
  5374. a = a || {};
  5375. b.each(function () {
  5376. c.push(d(a.item || this).attr(a.attribute || "id") || "")
  5377. });
  5378. return c
  5379. },
  5380. _intersectsWith: function (a) {
  5381. var b = this.positionAbs.left,
  5382. c = b + this.helperProportions.width,
  5383. e = this.positionAbs.top,
  5384. f = e + this.helperProportions.height,
  5385. g = a.left,
  5386. h = g + a.width,
  5387. i = a.top,
  5388. k = i + a.height,
  5389. j = this.offset.click.top,
  5390. l = this.offset.click.left;
  5391. j = e + j > i && e + j < k && b + l > g && b + l < h;
  5392. return this.options.tolerance == "pointer" || this.options.forcePointerForContainers || this.options.tolerance != "pointer" && this.helperProportions[this.floating ? "width" : "height"] > a[this.floating ? "width" : "height"] ? j : g < b + this.helperProportions.width / 2 && c - this.helperProportions.width / 2 < h && i < e + this.helperProportions.height / 2 && f - this.helperProportions.height / 2 < k
  5393. },
  5394. _intersectsWithPointer: function (a) {
  5395. var b = d.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, a.top, a.height);
  5396. a = d.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, a.left, a.width);
  5397. b = b && a;
  5398. a = this._getDragVerticalDirection();
  5399. var c = this._getDragHorizontalDirection();
  5400. if (!b) return false;
  5401. return this.floating ? c && c == "right" || a == "down" ? 2 : 1 : a && (a == "down" ? 2 : 1)
  5402. },
  5403. _intersectsWithSides: function (a) {
  5404. var b = d.ui.isOverAxis(this.positionAbs.top + this.offset.click.top, a.top + a.height / 2, a.height);
  5405. a = d.ui.isOverAxis(this.positionAbs.left + this.offset.click.left, a.left + a.width / 2, a.width);
  5406. var c = this._getDragVerticalDirection(),
  5407. e = this._getDragHorizontalDirection();
  5408. return this.floating && e ? e == "right" && a || e == "left" && !a : c && (c == "down" && b || c == "up" && !b)
  5409. },
  5410. _getDragVerticalDirection: function () {
  5411. var a = this.positionAbs.top - this.lastPositionAbs.top;
  5412. return a != 0 && (a > 0 ? "down" : "up")
  5413. },
  5414. _getDragHorizontalDirection: function () {
  5415. var a = this.positionAbs.left - this.lastPositionAbs.left;
  5416. return a != 0 && (a > 0 ? "right" : "left")
  5417. },
  5418. refresh: function (a) {
  5419. this._refreshItems(a);
  5420. this.refreshPositions();
  5421. return this
  5422. },
  5423. _connectWith: function () {
  5424. var a = this.options;
  5425. return a.connectWith.constructor == String ? [a.connectWith] : a.connectWith
  5426. },
  5427. _getItemsAsjQuery: function (a) {
  5428. var b = [],
  5429. c = [],
  5430. e = this._connectWith();
  5431. if (e && a) for (a = e.length - 1; a >= 0; a--) for (var f = d(e[a]), g = f.length - 1; g >= 0; g--) {
  5432. var h = d.data(f[g], "sortable");
  5433. if (h && h != this && !h.options.disabled) c.push([d.isFunction(h.options.items) ? h.options.items.call(h.element) : d(h.options.items, h.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), h])
  5434. }
  5435. c.push([d.isFunction(this.options.items) ? this.options.items.call(this.element, null, {
  5436. options: this.options,
  5437. item: this.currentItem
  5438. }) : d(this.options.items, this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"), this]);
  5439. for (a = c.length - 1; a >= 0; a--) c[a][0].each(function () {
  5440. b.push(this)
  5441. });
  5442. return d(b)
  5443. },
  5444. _removeCurrentsFromItems: function () {
  5445. for (var a = this.currentItem.find(":data(sortable-item)"), b = 0; b < this.items.length; b++) for (var c = 0; c < a.length; c++) a[c] == this.items[b].item[0] && this.items.splice(b, 1)
  5446. },
  5447. _refreshItems: function (a) {
  5448. this.items = [];
  5449. this.containers = [this];
  5450. var b = this.items,
  5451. c = [
  5452. [d.isFunction(this.options.items) ? this.options.items.call(this.element[0], a, {
  5453. item: this.currentItem
  5454. }) : d(this.options.items, this.element), this]
  5455. ],
  5456. e = this._connectWith();
  5457. if (e) for (var f = e.length - 1; f >= 0; f--) for (var g = d(e[f]), h = g.length - 1; h >= 0; h--) {
  5458. var i = d.data(g[h], "sortable");
  5459. if (i && i != this && !i.options.disabled) {
  5460. c.push([d.isFunction(i.options.items) ? i.options.items.call(i.element[0], a, {
  5461. item: this.currentItem
  5462. }) : d(i.options.items, i.element), i]);
  5463. this.containers.push(i)
  5464. }
  5465. }
  5466. for (f = c.length - 1; f >= 0; f--) {
  5467. a = c[f][1];
  5468. e = c[f][0];
  5469. h = 0;
  5470. for (g = e.length; h < g; h++) {
  5471. i = d(e[h]);
  5472. i.data("sortable-item", a);
  5473. b.push({
  5474. item: i,
  5475. instance: a,
  5476. width: 0,
  5477. height: 0,
  5478. left: 0,
  5479. top: 0
  5480. })
  5481. }
  5482. }
  5483. },
  5484. refreshPositions: function (a) {
  5485. if (this.offsetParent && this.helper) this.offset.parent = this._getParentOffset();
  5486. for (var b = this.items.length - 1; b >= 0; b--) {
  5487. var c = this.items[b];
  5488. if (!(c.instance != this.currentContainer && this.currentContainer && c.item[0] != this.currentItem[0])) {
  5489. var e = this.options.toleranceElement ? d(this.options.toleranceElement, c.item) : c.item;
  5490. if (!a) {
  5491. c.width = e.outerWidth();
  5492. c.height = e.outerHeight()
  5493. }
  5494. e = e.offset();
  5495. c.left = e.left;
  5496. c.top = e.top
  5497. }
  5498. }
  5499. if (this.options.custom && this.options.custom.refreshContainers) this.options.custom.refreshContainers.call(this);
  5500. else for (b = this.containers.length - 1; b >= 0; b--) {
  5501. e = this.containers[b].element.offset();
  5502. this.containers[b].containerCache.left = e.left;
  5503. this.containers[b].containerCache.top = e.top;
  5504. this.containers[b].containerCache.width = this.containers[b].element.outerWidth();
  5505. this.containers[b].containerCache.height = this.containers[b].element.outerHeight()
  5506. }
  5507. return this
  5508. },
  5509. _createPlaceholder: function (a) {
  5510. var b = a || this,
  5511. c = b.options;
  5512. if (!c.placeholder || c.placeholder.constructor == String) {
  5513. var e = c.placeholder;
  5514. c.placeholder = {
  5515. element: function () {
  5516. var f = d(document.createElement(b.currentItem[0].nodeName)).addClass(e || b.currentItem[0].className + " ui-sortable-placeholder").removeClass("ui-sortable-helper")[0];
  5517. if (!e) f.style.visibility = "hidden";
  5518. return f
  5519. },
  5520. update: function (f, g) {
  5521. if (!(e && !c.forcePlaceholderSize)) {
  5522. g.height() || g.height(b.currentItem.innerHeight() - parseInt(b.currentItem.css("paddingTop") || 0, 10) - parseInt(b.currentItem.css("paddingBottom") || 0, 10));
  5523. g.width() || g.width(b.currentItem.innerWidth() - parseInt(b.currentItem.css("paddingLeft") || 0, 10) - parseInt(b.currentItem.css("paddingRight") || 0, 10))
  5524. }
  5525. }
  5526. }
  5527. }
  5528. b.placeholder = d(c.placeholder.element.call(b.element, b.currentItem));
  5529. b.currentItem.after(b.placeholder);
  5530. c.placeholder.update(b, b.placeholder)
  5531. },
  5532. _contactContainers: function (a) {
  5533. for (var b = null, c = null, e = this.containers.length - 1; e >= 0; e--) if (!d.ui.contains(this.currentItem[0], this.containers[e].element[0])) if (this._intersectsWith(this.containers[e].containerCache)) {
  5534. if (!(b && d.ui.contains(this.containers[e].element[0], b.element[0]))) {
  5535. b = this.containers[e];
  5536. c = e
  5537. }
  5538. } else if (this.containers[e].containerCache.over) {
  5539. this.containers[e]._trigger("out", a, this._uiHash(this));
  5540. this.containers[e].containerCache.over = 0
  5541. }
  5542. if (b) if (this.containers.length === 1) {
  5543. this.containers[c]._trigger("over", a, this._uiHash(this));
  5544. this.containers[c].containerCache.over = 1
  5545. } else if (this.currentContainer != this.containers[c]) {
  5546. b = 1E4;
  5547. e = null;
  5548. for (var f = this.positionAbs[this.containers[c].floating ? "left" : "top"], g = this.items.length - 1; g >= 0; g--) if (d.ui.contains(this.containers[c].element[0], this.items[g].item[0])) {
  5549. var h = this.items[g][this.containers[c].floating ? "left" : "top"];
  5550. if (Math.abs(h - f) < b) {
  5551. b = Math.abs(h - f);
  5552. e = this.items[g]
  5553. }
  5554. }
  5555. if (e || this.options.dropOnEmpty) {
  5556. this.currentContainer = this.containers[c];
  5557. e ? this._rearrange(a, e, null, true) : this._rearrange(a, null, this.containers[c].element, true);
  5558. this._trigger("change", a, this._uiHash());
  5559. this.containers[c]._trigger("change", a, this._uiHash(this));
  5560. this.options.placeholder.update(this.currentContainer, this.placeholder);
  5561. this.containers[c]._trigger("over", a, this._uiHash(this));
  5562. this.containers[c].containerCache.over = 1
  5563. }
  5564. }
  5565. },
  5566. _createHelper: function (a) {
  5567. var b = this.options;
  5568. a = d.isFunction(b.helper) ? d(b.helper.apply(this.element[0], [a, this.currentItem])) : b.helper == "clone" ? this.currentItem.clone() : this.currentItem;
  5569. a.parents("body").length || d(b.appendTo != "parent" ? b.appendTo : this.currentItem[0].parentNode)[0].appendChild(a[0]);
  5570. if (a[0] == this.currentItem[0]) this._storedCSS = {
  5571. width: this.currentItem[0].style.width,
  5572. height: this.currentItem[0].style.height,
  5573. position: this.currentItem.css("position"),
  5574. top: this.currentItem.css("top"),
  5575. left: this.currentItem.css("left")
  5576. };
  5577. if (a[0].style.width == "" || b.forceHelperSize) a.width(this.currentItem.width());
  5578. if (a[0].style.height == "" || b.forceHelperSize) a.height(this.currentItem.height());
  5579. return a
  5580. },
  5581. _adjustOffsetFromHelper: function (a) {
  5582. if (typeof a == "string") a = a.split(" ");
  5583. if (d.isArray(a)) a = {
  5584. left: +a[0],
  5585. top: +a[1] || 0
  5586. };
  5587. if ("left" in a) this.offset.click.left = a.left + this.margins.left;
  5588. if ("right" in a) this.offset.click.left = this.helperProportions.width - a.right + this.margins.left;
  5589. if ("top" in a) this.offset.click.top = a.top + this.margins.top;
  5590. if ("bottom" in a) this.offset.click.top = this.helperProportions.height - a.bottom + this.margins.top
  5591. },
  5592. _getParentOffset: function () {
  5593. this.offsetParent = this.helper.offsetParent();
  5594. var a = this.offsetParent.offset();
  5595. if (this.cssPosition == "absolute" && this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) {
  5596. a.left += this.scrollParent.scrollLeft();
  5597. a.top += this.scrollParent.scrollTop()
  5598. }
  5599. if (this.offsetParent[0] == document.body || this.offsetParent[0].tagName && this.offsetParent[0].tagName.toLowerCase() == "html" && d.browser.msie) a = {
  5600. top: 0,
  5601. left: 0
  5602. };
  5603. return {
  5604. top: a.top + (parseInt(this.offsetParent.css("borderTopWidth"), 10) || 0),
  5605. left: a.left + (parseInt(this.offsetParent.css("borderLeftWidth"), 10) || 0)
  5606. }
  5607. },
  5608. _getRelativeOffset: function () {
  5609. if (this.cssPosition == "relative") {
  5610. var a = this.currentItem.position();
  5611. return {
  5612. top: a.top - (parseInt(this.helper.css("top"), 10) || 0) + this.scrollParent.scrollTop(),
  5613. left: a.left - (parseInt(this.helper.css("left"), 10) || 0) + this.scrollParent.scrollLeft()
  5614. }
  5615. } else return {
  5616. top: 0,
  5617. left: 0
  5618. }
  5619. },
  5620. _cacheMargins: function () {
  5621. this.margins = {
  5622. left: parseInt(this.currentItem.css("marginLeft"), 10) || 0,
  5623. top: parseInt(this.currentItem.css("marginTop"), 10) || 0
  5624. }
  5625. },
  5626. _cacheHelperProportions: function () {
  5627. this.helperProportions = {
  5628. width: this.helper.outerWidth(),
  5629. height: this.helper.outerHeight()
  5630. }
  5631. },
  5632. _setContainment: function () {
  5633. var a = this.options;
  5634. if (a.containment == "parent") a.containment = this.helper[0].parentNode;
  5635. if (a.containment == "document" || a.containment == "window") this.containment = [0 - this.offset.relative.left - this.offset.parent.left, 0 - this.offset.relative.top - this.offset.parent.top, d(a.containment == "document" ? document : window).width() - this.helperProportions.width - this.margins.left, (d(a.containment == "document" ? document : window).height() || document.body.parentNode.scrollHeight) - this.helperProportions.height - this.margins.top];
  5636. if (!/^(document|window|parent)$/.test(a.containment)) {
  5637. var b = d(a.containment)[0];
  5638. a = d(a.containment).offset();
  5639. var c = d(b).css("overflow") != "hidden";
  5640. this.containment = [a.left + (parseInt(d(b).css("borderLeftWidth"), 10) || 0) + (parseInt(d(b).css("paddingLeft"), 10) || 0) - this.margins.left, a.top + (parseInt(d(b).css("borderTopWidth"), 10) || 0) + (parseInt(d(b).css("paddingTop"), 10) || 0) - this.margins.top, a.left + (c ? Math.max(b.scrollWidth, b.offsetWidth) : b.offsetWidth) - (parseInt(d(b).css("borderLeftWidth"), 10) || 0) - (parseInt(d(b).css("paddingRight"), 10) || 0) - this.helperProportions.width - this.margins.left, a.top + (c ? Math.max(b.scrollHeight, b.offsetHeight) : b.offsetHeight) - (parseInt(d(b).css("borderTopWidth"), 10) || 0) - (parseInt(d(b).css("paddingBottom"), 10) || 0) - this.helperProportions.height - this.margins.top]
  5641. }
  5642. },
  5643. _convertPositionTo: function (a, b) {
  5644. if (!b) b = this.position;
  5645. a = a == "absolute" ? 1 : -1;
  5646. var c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
  5647. e = /(html|body)/i.test(c[0].tagName);
  5648. return {
  5649. top: b.top + this.offset.relative.top * a + this.offset.parent.top * a - (d.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : c.scrollTop()) * a),
  5650. left: b.left + this.offset.relative.left * a + this.offset.parent.left * a - (d.browser.safari && this.cssPosition == "fixed" ? 0 : (this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : c.scrollLeft()) * a)
  5651. }
  5652. },
  5653. _generatePosition: function (a) {
  5654. var b = this.options,
  5655. c = this.cssPosition == "absolute" && !(this.scrollParent[0] != document && d.ui.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent,
  5656. e = /(html|body)/i.test(c[0].tagName);
  5657. if (this.cssPosition == "relative" && !(this.scrollParent[0] != document && this.scrollParent[0] != this.offsetParent[0])) this.offset.relative = this._getRelativeOffset();
  5658. var f = a.pageX,
  5659. g = a.pageY;
  5660. if (this.originalPosition) {
  5661. if (this.containment) {
  5662. if (a.pageX - this.offset.click.left < this.containment[0]) f = this.containment[0] + this.offset.click.left;
  5663. if (a.pageY - this.offset.click.top < this.containment[1]) g = this.containment[1] + this.offset.click.top;
  5664. if (a.pageX - this.offset.click.left > this.containment[2]) f = this.containment[2] + this.offset.click.left;
  5665. if (a.pageY - this.offset.click.top > this.containment[3]) g = this.containment[3] + this.offset.click.top
  5666. }
  5667. if (b.grid) {
  5668. g = this.originalPageY + Math.round((g - this.originalPageY) / b.grid[1]) * b.grid[1];
  5669. g = this.containment ? !(g - this.offset.click.top < this.containment[1] || g - this.offset.click.top > this.containment[3]) ? g : !(g - this.offset.click.top < this.containment[1]) ? g - b.grid[1] : g + b.grid[1] : g;
  5670. f = this.originalPageX + Math.round((f - this.originalPageX) / b.grid[0]) * b.grid[0];
  5671. f = this.containment ? !(f - this.offset.click.left < this.containment[0] || f - this.offset.click.left > this.containment[2]) ? f : !(f - this.offset.click.left < this.containment[0]) ? f - b.grid[0] : f + b.grid[0] : f
  5672. }
  5673. }
  5674. return {
  5675. top: g - this.offset.click.top - this.offset.relative.top - this.offset.parent.top + (d.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollTop() : e ? 0 : c.scrollTop()),
  5676. left: f - this.offset.click.left - this.offset.relative.left - this.offset.parent.left + (d.browser.safari && this.cssPosition == "fixed" ? 0 : this.cssPosition == "fixed" ? -this.scrollParent.scrollLeft() : e ? 0 : c.scrollLeft())
  5677. }
  5678. },
  5679. _rearrange: function (a, b, c, e) {
  5680. c ? c[0].appendChild(this.placeholder[0]) : b.item[0].parentNode.insertBefore(this.placeholder[0], this.direction == "down" ? b.item[0] : b.item[0].nextSibling);
  5681. this.counter = this.counter ? ++this.counter : 1;
  5682. var f = this,
  5683. g = this.counter;
  5684. window.setTimeout(function () {
  5685. g == f.counter && f.refreshPositions(!e)
  5686. }, 0)
  5687. },
  5688. _clear: function (a, b) {
  5689. this.reverting = false;
  5690. var c = [];
  5691. !this._noFinalSort && this.currentItem.parent().length && this.placeholder.before(this.currentItem);
  5692. this._noFinalSort = null;
  5693. if (this.helper[0] == this.currentItem[0]) {
  5694. for (var e in this._storedCSS) if (this._storedCSS[e] == "auto" || this._storedCSS[e] == "static") this._storedCSS[e] = "";
  5695. this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")
  5696. } else this.currentItem.show();
  5697. this.fromOutside && !b && c.push(function (f) {
  5698. this._trigger("receive", f, this._uiHash(this.fromOutside))
  5699. });
  5700. if ((this.fromOutside || this.domPosition.prev != this.currentItem.prev().not(".ui-sortable-helper")[0] || this.domPosition.parent != this.currentItem.parent()[0]) && !b) c.push(function (f) {
  5701. this._trigger("update", f, this._uiHash())
  5702. });
  5703. if (!d.ui.contains(this.element[0], this.currentItem[0])) {
  5704. b || c.push(function (f) {
  5705. this._trigger("remove", f, this._uiHash())
  5706. });
  5707. for (e = this.containers.length - 1; e >= 0; e--) if (d.ui.contains(this.containers[e].element[0], this.currentItem[0]) && !b) {
  5708. c.push(function (f) {
  5709. return function (g) {
  5710. f._trigger("receive", g, this._uiHash(this))
  5711. }
  5712. }.call(this, this.containers[e]));
  5713. c.push(function (f) {
  5714. return function (g) {
  5715. f._trigger("update", g, this._uiHash(this))
  5716. }
  5717. }.call(this, this.containers[e]))
  5718. }
  5719. }
  5720. for (e = this.containers.length - 1; e >= 0; e--) {
  5721. b || c.push(function (f) {
  5722. return function (g) {
  5723. f._trigger("deactivate", g, this._uiHash(this))
  5724. }
  5725. }.call(this, this.containers[e]));
  5726. if (this.containers[e].containerCache.over) {
  5727. c.push(function (f) {
  5728. return function (g) {
  5729. f._trigger("out", g, this._uiHash(this))
  5730. }
  5731. }.call(this, this.containers[e]));
  5732. this.containers[e].containerCache.over = 0
  5733. }
  5734. }
  5735. this._storedCursor && d("body").css("cursor", this._storedCursor);
  5736. this._storedOpacity && this.helper.css("opacity", this._storedOpacity);
  5737. if (this._storedZIndex) this.helper.css("zIndex", this._storedZIndex == "auto" ? "" : this._storedZIndex);
  5738. this.dragging = false;
  5739. if (this.cancelHelperRemoval) {
  5740. if (!b) {
  5741. this._trigger("beforeStop", a, this._uiHash());
  5742. for (e = 0; e < c.length; e++) c[e].call(this, a);
  5743. this._trigger("stop", a, this._uiHash())
  5744. }
  5745. return false
  5746. }
  5747. b || this._trigger("beforeStop", a, this._uiHash());
  5748. this.placeholder[0].parentNode.removeChild(this.placeholder[0]);
  5749. this.helper[0] != this.currentItem[0] && this.helper.remove();
  5750. this.helper = null;
  5751. if (!b) {
  5752. for (e = 0; e < c.length; e++) c[e].call(this, a);
  5753. this._trigger("stop", a, this._uiHash())
  5754. }
  5755. this.fromOutside = false;
  5756. return true
  5757. },
  5758. _trigger: function () {
  5759. d.Widget.prototype._trigger.apply(this, arguments) === false && this.cancel()
  5760. },
  5761. _uiHash: function (a) {
  5762. var b = a || this;
  5763. return {
  5764. helper: b.helper,
  5765. placeholder: b.placeholder || d([]),
  5766. position: b.position,
  5767. originalPosition: b.originalPosition,
  5768. offset: b.positionAbs,
  5769. item: b.currentItem,
  5770. sender: a ? a.element : null
  5771. }
  5772. }
  5773. });
  5774. d.extend(d.ui.sortable, {
  5775. version: "1.8.16"
  5776. })
  5777. })(jQuery);;
  5778. (function (d) {
  5779. var e = 0;
  5780. d.widget("ui.autocomplete", {
  5781. options: {
  5782. appendTo: "body",
  5783. autoFocus: false,
  5784. delay: 300,
  5785. minLength: 1,
  5786. position: {
  5787. my: "left top",
  5788. at: "left bottom",
  5789. collision: "none"
  5790. },
  5791. source: null
  5792. },
  5793. pending: 0,
  5794. _create: function () {
  5795. var a = this,
  5796. b = this.element[0].ownerDocument,
  5797. g;
  5798. this.element.addClass("ui-autocomplete-input").attr("autocomplete", "off").attr({
  5799. role: "textbox",
  5800. "aria-autocomplete": "list",
  5801. "aria-haspopup": "true"
  5802. }).bind("keydown.autocomplete", function (c) {
  5803. if (!(a.options.disabled || a.element.propAttr("readOnly"))) {
  5804. g = false;
  5805. var f = d.ui.keyCode;
  5806. switch (c.keyCode) {
  5807. case f.PAGE_UP:
  5808. a._move("previousPage", c);
  5809. break;
  5810. case f.PAGE_DOWN:
  5811. a._move("nextPage", c);
  5812. break;
  5813. case f.UP:
  5814. a._move("previous", c);
  5815. c.preventDefault();
  5816. break;
  5817. case f.DOWN:
  5818. a._move("next", c);
  5819. c.preventDefault();
  5820. break;
  5821. case f.ENTER:
  5822. case f.NUMPAD_ENTER:
  5823. if (a.menu.active) {
  5824. g = true;
  5825. c.preventDefault()
  5826. }
  5827. case f.TAB:
  5828. if (!a.menu.active) return;
  5829. a.menu.select(c);
  5830. break;
  5831. case f.ESCAPE:
  5832. a.element.val(a.term);
  5833. a.close(c);
  5834. break;
  5835. default:
  5836. clearTimeout(a.searching);
  5837. a.searching = setTimeout(function () {
  5838. if (a.term != a.element.val()) {
  5839. a.selectedItem = null;
  5840. a.search(null, c)
  5841. }
  5842. }, a.options.delay);
  5843. break
  5844. }
  5845. }
  5846. }).bind("keypress.autocomplete", function (c) {
  5847. if (g) {
  5848. g = false;
  5849. c.preventDefault()
  5850. }
  5851. }).bind("focus.autocomplete", function () {
  5852. if (!a.options.disabled) {
  5853. a.selectedItem = null;
  5854. a.previous = a.element.val()
  5855. }
  5856. }).bind("blur.autocomplete", function (c) {
  5857. if (!a.options.disabled) {
  5858. clearTimeout(a.searching);
  5859. a.closing = setTimeout(function () {
  5860. a.close(c);
  5861. a._change(c)
  5862. }, 150)
  5863. }
  5864. });
  5865. this._initSource();
  5866. this.response = function () {
  5867. return a._response.apply(a, arguments)
  5868. };
  5869. this.menu = d("<ul></ul>").addClass("ui-autocomplete").appendTo(d(this.options.appendTo || "body", b)[0]).mousedown(function (c) {
  5870. var f = a.menu.element[0];
  5871. d(c.target).closest(".ui-menu-item").length || setTimeout(function () {
  5872. d(document).one("mousedown", function (h) {
  5873. h.target !== a.element[0] && h.target !== f && !d.ui.contains(f, h.target) && a.close()
  5874. })
  5875. }, 1);
  5876. setTimeout(function () {
  5877. clearTimeout(a.closing)
  5878. }, 13)
  5879. }).menu({
  5880. focus: function (c, f) {
  5881. f = f.item.data("item.autocomplete");
  5882. false !== a._trigger("focus", c, {
  5883. item: f
  5884. }) && /^key/.test(c.originalEvent.type) && a.element.val(f.value)
  5885. },
  5886. selected: function (c, f) {
  5887. var h = f.item.data("item.autocomplete"),
  5888. i = a.previous;
  5889. if (a.element[0] !== b.activeElement) {
  5890. a.element.focus();
  5891. a.previous = i;
  5892. setTimeout(function () {
  5893. a.previous = i;
  5894. a.selectedItem = h
  5895. }, 1)
  5896. }
  5897. false !== a._trigger("select", c, {
  5898. item: h
  5899. }) && a.element.val(h.value);
  5900. a.term = a.element.val();
  5901. a.close(c);
  5902. a.selectedItem = h
  5903. },
  5904. blur: function () {
  5905. a.menu.element.is(":visible") && a.element.val() !== a.term && a.element.val(a.term)
  5906. }
  5907. }).zIndex(this.element.zIndex() + 1).css({
  5908. top: 0,
  5909. left: 0
  5910. }).hide().data("menu");
  5911. d.fn.bgiframe && this.menu.element.bgiframe()
  5912. },
  5913. destroy: function () {
  5914. this.element.removeClass("ui-autocomplete-input").removeAttr("autocomplete").removeAttr("role").removeAttr("aria-autocomplete").removeAttr("aria-haspopup");
  5915. this.menu.element.remove();
  5916. d.Widget.prototype.destroy.call(this)
  5917. },
  5918. _setOption: function (a, b) {
  5919. d.Widget.prototype._setOption.apply(this, arguments);
  5920. a === "source" && this._initSource();
  5921. if (a === "appendTo") this.menu.element.appendTo(d(b || "body", this.element[0].ownerDocument)[0]);
  5922. a === "disabled" && b && this.xhr && this.xhr.abort()
  5923. },
  5924. _initSource: function () {
  5925. var a = this,
  5926. b, g;
  5927. if (d.isArray(this.options.source)) {
  5928. b = this.options.source;
  5929. this.source = function (c, f) {
  5930. f(d.ui.autocomplete.filter(b, c.term))
  5931. }
  5932. } else if (typeof this.options.source === "string") {
  5933. g = this.options.source;
  5934. this.source = function (c, f) {
  5935. a.xhr && a.xhr.abort();
  5936. a.xhr = d.ajax({
  5937. url: g,
  5938. data: c,
  5939. dataType: "json",
  5940. autocompleteRequest: ++e,
  5941. success: function (h) {
  5942. this.autocompleteRequest === e && f(h)
  5943. },
  5944. error: function () {
  5945. this.autocompleteRequest === e && f([])
  5946. }
  5947. })
  5948. }
  5949. } else this.source = this.options.source
  5950. },
  5951. search: function (a, b) {
  5952. a = a != null ? a : this.element.val();
  5953. this.term = this.element.val();
  5954. if (a.length < this.options.minLength) return this.close(b);
  5955. clearTimeout(this.closing);
  5956. if (this._trigger("search", b) !== false) return this._search(a)
  5957. },
  5958. _search: function (a) {
  5959. this.pending++;
  5960. this.element.addClass("ui-autocomplete-loading");
  5961. this.source({
  5962. term: a
  5963. }, this.response)
  5964. },
  5965. _response: function (a) {
  5966. if (!this.options.disabled && a && a.length) {
  5967. a = this._normalize(a);
  5968. this._suggest(a);
  5969. this._trigger("open")
  5970. } else this.close();
  5971. this.pending--;
  5972. this.pending || this.element.removeClass("ui-autocomplete-loading")
  5973. },
  5974. close: function (a) {
  5975. clearTimeout(this.closing);
  5976. if (this.menu.element.is(":visible")) {
  5977. this.menu.element.hide();
  5978. this.menu.deactivate();
  5979. this._trigger("close", a)
  5980. }
  5981. },
  5982. _change: function (a) {
  5983. this.previous !== this.element.val() && this._trigger("change", a, {
  5984. item: this.selectedItem
  5985. })
  5986. },
  5987. _normalize: function (a) {
  5988. if (a.length && a[0].label && a[0].value) return a;
  5989. return d.map(a, function (b) {
  5990. if (typeof b === "string") return {
  5991. label: b,
  5992. value: b
  5993. };
  5994. return d.extend({
  5995. label: b.label || b.value,
  5996. value: b.value || b.label
  5997. }, b)
  5998. })
  5999. },
  6000. _suggest: function (a) {
  6001. var b = this.menu.element.empty().zIndex(this.element.zIndex() + 1);
  6002. this._renderMenu(b, a);
  6003. this.menu.deactivate();
  6004. this.menu.refresh();
  6005. b.show();
  6006. this._resizeMenu();
  6007. b.position(d.extend({
  6008. of: this.element
  6009. }, this.options.position));
  6010. this.options.autoFocus && this.menu.next(new d.Event("mouseover"))
  6011. },
  6012. _resizeMenu: function () {
  6013. var a = this.menu.element;
  6014. a.outerWidth(Math.max(a.width("").outerWidth(), this.element.outerWidth()))
  6015. },
  6016. _renderMenu: function (a, b) {
  6017. var g = this;
  6018. d.each(b, function (c, f) {
  6019. g._renderItem(a, f)
  6020. })
  6021. },
  6022. _renderItem: function (a, b) {
  6023. return d("<li></li>").data("item.autocomplete", b).append(d("<a></a>").text(b.label)).appendTo(a)
  6024. },
  6025. _move: function (a, b) {
  6026. if (this.menu.element.is(":visible")) if (this.menu.first() && /^previous/.test(a) || this.menu.last() && /^next/.test(a)) {
  6027. this.element.val(this.term);
  6028. this.menu.deactivate()
  6029. } else this.menu[a](b);
  6030. else this.search(null, b)
  6031. },
  6032. widget: function () {
  6033. return this.menu.element
  6034. }
  6035. });
  6036. d.extend(d.ui.autocomplete, {
  6037. escapeRegex: function (a) {
  6038. return a.replace(/[-[\]{}()*+?.,\\^$|#\s]/g, "\\$&")
  6039. },
  6040. filter: function (a, b) {
  6041. var g = new RegExp(d.ui.autocomplete.escapeRegex(b), "i");
  6042. return d.grep(a, function (c) {
  6043. return g.test(c.label || c.value || c)
  6044. })
  6045. }
  6046. })
  6047. })(jQuery);
  6048. (function (d) {
  6049. d.widget("ui.menu", {
  6050. _create: function () {
  6051. var e = this;
  6052. this.element.addClass("ui-menu ui-widget ui-widget-content ui-corner-all").attr({
  6053. role: "listbox",
  6054. "aria-activedescendant": "ui-active-menuitem"
  6055. }).click(function (a) {
  6056. if (d(a.target).closest(".ui-menu-item a").length) {
  6057. a.preventDefault();
  6058. e.select(a)
  6059. }
  6060. });
  6061. this.refresh()
  6062. },
  6063. refresh: function () {
  6064. var e = this;
  6065. this.element.children("li:not(.ui-menu-item):has(a)").addClass("ui-menu-item").attr("role", "menuitem").children("a").addClass("ui-corner-all").attr("tabindex", - 1).mouseenter(function (a) {
  6066. e.activate(a, d(this).parent())
  6067. }).mouseleave(function () {
  6068. e.deactivate()
  6069. })
  6070. },
  6071. activate: function (e, a) {
  6072. this.deactivate();
  6073. if (this.hasScroll()) {
  6074. var b = a.offset().top - this.element.offset().top,
  6075. g = this.element.scrollTop(),
  6076. c = this.element.height();
  6077. if (b < 0) this.element.scrollTop(g + b);
  6078. else b >= c && this.element.scrollTop(g + b - c + a.height())
  6079. }
  6080. this.active = a.eq(0).children("a").addClass("ui-state-hover").attr("id", "ui-active-menuitem").end();
  6081. this._trigger("focus", e, {
  6082. item: a
  6083. })
  6084. },
  6085. deactivate: function () {
  6086. if (this.active) {
  6087. this.active.children("a").removeClass("ui-state-hover").removeAttr("id");
  6088. this._trigger("blur");
  6089. this.active = null
  6090. }
  6091. },
  6092. next: function (e) {
  6093. this.move("next", ".ui-menu-item:first", e)
  6094. },
  6095. previous: function (e) {
  6096. this.move("prev", ".ui-menu-item:last", e)
  6097. },
  6098. first: function () {
  6099. return this.active && !this.active.prevAll(".ui-menu-item").length
  6100. },
  6101. last: function () {
  6102. return this.active && !this.active.nextAll(".ui-menu-item").length
  6103. },
  6104. move: function (e, a, b) {
  6105. if (this.active) {
  6106. e = this.active[e + "All"](".ui-menu-item").eq(0);
  6107. e.length ? this.activate(b, e) : this.activate(b, this.element.children(a))
  6108. } else this.activate(b, this.element.children(a))
  6109. },
  6110. nextPage: function (e) {
  6111. if (this.hasScroll()) if (!this.active || this.last()) this.activate(e, this.element.children(".ui-menu-item:first"));
  6112. else {
  6113. var a = this.active.offset().top,
  6114. b = this.element.height(),
  6115. g = this.element.children(".ui-menu-item").filter(function () {
  6116. var c = d(this).offset().top - a - b + d(this).height();
  6117. return c < 10 && c > -10
  6118. });
  6119. g.length || (g = this.element.children(".ui-menu-item:last"));
  6120. this.activate(e, g)
  6121. } else this.activate(e, this.element.children(".ui-menu-item").filter(!this.active || this.last() ? ":first" : ":last"))
  6122. },
  6123. previousPage: function (e) {
  6124. if (this.hasScroll()) if (!this.active || this.first()) this.activate(e, this.element.children(".ui-menu-item:last"));
  6125. else {
  6126. var a = this.active.offset().top,
  6127. b = this.element.height();
  6128. result = this.element.children(".ui-menu-item").filter(function () {
  6129. var g = d(this).offset().top - a + b - d(this).height();
  6130. return g < 10 && g > -10
  6131. });
  6132. result.length || (result = this.element.children(".ui-menu-item:first"));
  6133. this.activate(e, result)
  6134. } else this.activate(e, this.element.children(".ui-menu-item").filter(!this.active || this.first() ? ":last" : ":first"))
  6135. },
  6136. hasScroll: function () {
  6137. return this.element.height() < this.element[d.fn.prop ? "prop" : "attr"]("scrollHeight")
  6138. },
  6139. select: function (e) {
  6140. this._trigger("selected", e, {
  6141. item: this.active
  6142. })
  6143. }
  6144. })
  6145. })(jQuery);;
  6146. (function (d) {
  6147. d.widget("ui.slider", d.ui.mouse, {
  6148. widgetEventPrefix: "slide",
  6149. options: {
  6150. animate: false,
  6151. distance: 0,
  6152. max: 100,
  6153. min: 0,
  6154. orientation: "horizontal",
  6155. range: false,
  6156. step: 1,
  6157. value: 0,
  6158. values: null
  6159. },
  6160. _create: function () {
  6161. var a = this,
  6162. b = this.options,
  6163. c = this.element.find(".ui-slider-handle").addClass("ui-state-default ui-corner-all"),
  6164. f = b.values && b.values.length || 1,
  6165. e = [];
  6166. this._mouseSliding = this._keySliding = false;
  6167. this._animateOff = true;
  6168. this._handleIndex = null;
  6169. this._detectOrientation();
  6170. this._mouseInit();
  6171. this.element.addClass("ui-slider ui-slider-" + this.orientation + " ui-widget ui-widget-content ui-corner-all" + (b.disabled ? " ui-slider-disabled ui-disabled" : ""));
  6172. this.range = d([]);
  6173. if (b.range) {
  6174. if (b.range === true) {
  6175. if (!b.values) b.values = [this._valueMin(), this._valueMin()];
  6176. if (b.values.length && b.values.length !== 2) b.values = [b.values[0], b.values[0]]
  6177. }
  6178. this.range = d("<div></div>").appendTo(this.element).addClass("ui-slider-range ui-widget-header" + (b.range === "min" || b.range === "max" ? " ui-slider-range-" + b.range : ""))
  6179. }
  6180. for (var j = c.length; j < f; j += 1) e.push("<a class='ui-slider-handle ui-state-default ui-corner-all' href='#'></a>");
  6181. this.handles = c.add(d(e.join("")).appendTo(a.element));
  6182. this.handle = this.handles.eq(0);
  6183. this.handles.add(this.range).filter("a").click(function (g) {
  6184. g.preventDefault()
  6185. }).hover(function () {
  6186. b.disabled || d(this).addClass("ui-state-hover")
  6187. }, function () {
  6188. d(this).removeClass("ui-state-hover")
  6189. }).focus(function () {
  6190. if (b.disabled) d(this).blur();
  6191. else {
  6192. d(".ui-slider .ui-state-focus").removeClass("ui-state-focus");
  6193. d(this).addClass("ui-state-focus")
  6194. }
  6195. }).blur(function () {
  6196. d(this).removeClass("ui-state-focus")
  6197. });
  6198. this.handles.each(function (g) {
  6199. d(this).data("index.ui-slider-handle", g)
  6200. });
  6201. this.handles.keydown(function (g) {
  6202. var k = true,
  6203. l = d(this).data("index.ui-slider-handle"),
  6204. i, h, m;
  6205. if (!a.options.disabled) {
  6206. switch (g.keyCode) {
  6207. case d.ui.keyCode.HOME:
  6208. case d.ui.keyCode.END:
  6209. case d.ui.keyCode.PAGE_UP:
  6210. case d.ui.keyCode.PAGE_DOWN:
  6211. case d.ui.keyCode.UP:
  6212. case d.ui.keyCode.RIGHT:
  6213. case d.ui.keyCode.DOWN:
  6214. case d.ui.keyCode.LEFT:
  6215. k = false;
  6216. if (!a._keySliding) {
  6217. a._keySliding = true;
  6218. d(this).addClass("ui-state-active");
  6219. i = a._start(g, l);
  6220. if (i === false) return
  6221. }
  6222. break
  6223. }
  6224. m = a.options.step;
  6225. i = a.options.values && a.options.values.length ? (h = a.values(l)) : (h = a.value());
  6226. switch (g.keyCode) {
  6227. case d.ui.keyCode.HOME:
  6228. h = a._valueMin();
  6229. break;
  6230. case d.ui.keyCode.END:
  6231. h = a._valueMax();
  6232. break;
  6233. case d.ui.keyCode.PAGE_UP:
  6234. h = a._trimAlignValue(i + (a._valueMax() - a._valueMin()) / 5);
  6235. break;
  6236. case d.ui.keyCode.PAGE_DOWN:
  6237. h = a._trimAlignValue(i - (a._valueMax() - a._valueMin()) / 5);
  6238. break;
  6239. case d.ui.keyCode.UP:
  6240. case d.ui.keyCode.RIGHT:
  6241. if (i === a._valueMax()) return;
  6242. h = a._trimAlignValue(i + m);
  6243. break;
  6244. case d.ui.keyCode.DOWN:
  6245. case d.ui.keyCode.LEFT:
  6246. if (i === a._valueMin()) return;
  6247. h = a._trimAlignValue(i - m);
  6248. break
  6249. }
  6250. a._slide(g, l, h);
  6251. return k
  6252. }
  6253. }).keyup(function (g) {
  6254. var k = d(this).data("index.ui-slider-handle");
  6255. if (a._keySliding) {
  6256. a._keySliding = false;
  6257. a._stop(g, k);
  6258. a._change(g, k);
  6259. d(this).removeClass("ui-state-active")
  6260. }
  6261. });
  6262. this._refreshValue();
  6263. this._animateOff = false
  6264. },
  6265. destroy: function () {
  6266. this.handles.remove();
  6267. this.range.remove();
  6268. this.element.removeClass("ui-slider ui-slider-horizontal ui-slider-vertical ui-slider-disabled ui-widget ui-widget-content ui-corner-all").removeData("slider").unbind(".slider");
  6269. this._mouseDestroy();
  6270. return this
  6271. },
  6272. _mouseCapture: function (a) {
  6273. var b = this.options,
  6274. c, f, e, j, g;
  6275. if (b.disabled) return false;
  6276. this.elementSize = {
  6277. width: this.element.outerWidth(),
  6278. height: this.element.outerHeight()
  6279. };
  6280. this.elementOffset = this.element.offset();
  6281. c = this._normValueFromMouse({
  6282. x: a.pageX,
  6283. y: a.pageY
  6284. });
  6285. f = this._valueMax() - this._valueMin() + 1;
  6286. j = this;
  6287. this.handles.each(function (k) {
  6288. var l = Math.abs(c - j.values(k));
  6289. if (f > l) {
  6290. f = l;
  6291. e = d(this);
  6292. g = k
  6293. }
  6294. });
  6295. if (b.range === true && this.values(1) === b.min) {
  6296. g += 1;
  6297. e = d(this.handles[g])
  6298. }
  6299. if (this._start(a, g) === false) return false;
  6300. this._mouseSliding = true;
  6301. j._handleIndex = g;
  6302. e.addClass("ui-state-active").focus();
  6303. b = e.offset();
  6304. this._clickOffset = !d(a.target).parents().andSelf().is(".ui-slider-handle") ? {
  6305. left: 0,
  6306. top: 0
  6307. } : {
  6308. left: a.pageX - b.left - e.width() / 2,
  6309. top: a.pageY - b.top - e.height() / 2 - (parseInt(e.css("borderTopWidth"), 10) || 0) - (parseInt(e.css("borderBottomWidth"), 10) || 0) + (parseInt(e.css("marginTop"), 10) || 0)
  6310. };
  6311. this.handles.hasClass("ui-state-hover") || this._slide(a, g, c);
  6312. return this._animateOff = true
  6313. },
  6314. _mouseStart: function () {
  6315. return true
  6316. },
  6317. _mouseDrag: function (a) {
  6318. var b = this._normValueFromMouse({
  6319. x: a.pageX,
  6320. y: a.pageY
  6321. });
  6322. this._slide(a, this._handleIndex, b);
  6323. return false
  6324. },
  6325. _mouseStop: function (a) {
  6326. this.handles.removeClass("ui-state-active");
  6327. this._mouseSliding = false;
  6328. this._stop(a, this._handleIndex);
  6329. this._change(a, this._handleIndex);
  6330. this._clickOffset = this._handleIndex = null;
  6331. return this._animateOff = false
  6332. },
  6333. _detectOrientation: function () {
  6334. this.orientation = this.options.orientation === "vertical" ? "vertical" : "horizontal"
  6335. },
  6336. _normValueFromMouse: function (a) {
  6337. var b;
  6338. if (this.orientation === "horizontal") {
  6339. b = this.elementSize.width;
  6340. a = a.x - this.elementOffset.left - (this._clickOffset ? this._clickOffset.left : 0)
  6341. } else {
  6342. b = this.elementSize.height;
  6343. a = a.y - this.elementOffset.top - (this._clickOffset ? this._clickOffset.top : 0)
  6344. }
  6345. b = a / b;
  6346. if (b > 1) b = 1;
  6347. if (b < 0) b = 0;
  6348. if (this.orientation === "vertical") b = 1 - b;
  6349. a = this._valueMax() - this._valueMin();
  6350. return this._trimAlignValue(this._valueMin() + b * a)
  6351. },
  6352. _start: function (a, b) {
  6353. var c = {
  6354. handle: this.handles[b],
  6355. value: this.value()
  6356. };
  6357. if (this.options.values && this.options.values.length) {
  6358. c.value = this.values(b);
  6359. c.values = this.values()
  6360. }
  6361. return this._trigger("start", a, c)
  6362. },
  6363. _slide: function (a, b, c) {
  6364. var f;
  6365. if (this.options.values && this.options.values.length) {
  6366. f = this.values(b ? 0 : 1);
  6367. if (this.options.values.length === 2 && this.options.range === true && (b === 0 && c > f || b === 1 && c < f)) c = f;
  6368. if (c !== this.values(b)) {
  6369. f = this.values();
  6370. f[b] = c;
  6371. a = this._trigger("slide", a, {
  6372. handle: this.handles[b],
  6373. value: c,
  6374. values: f
  6375. });
  6376. this.values(b ? 0 : 1);
  6377. a !== false && this.values(b, c, true)
  6378. }
  6379. } else if (c !== this.value()) {
  6380. a = this._trigger("slide", a, {
  6381. handle: this.handles[b],
  6382. value: c
  6383. });
  6384. a !== false && this.value(c)
  6385. }
  6386. },
  6387. _stop: function (a, b) {
  6388. var c = {
  6389. handle: this.handles[b],
  6390. value: this.value()
  6391. };
  6392. if (this.options.values && this.options.values.length) {
  6393. c.value = this.values(b);
  6394. c.values = this.values()
  6395. }
  6396. this._trigger("stop", a, c)
  6397. },
  6398. _change: function (a, b) {
  6399. if (!this._keySliding && !this._mouseSliding) {
  6400. var c = {
  6401. handle: this.handles[b],
  6402. value: this.value()
  6403. };
  6404. if (this.options.values && this.options.values.length) {
  6405. c.value = this.values(b);
  6406. c.values = this.values()
  6407. }
  6408. this._trigger("change", a, c)
  6409. }
  6410. },
  6411. value: function (a) {
  6412. if (arguments.length) {
  6413. this.options.value = this._trimAlignValue(a);
  6414. this._refreshValue();
  6415. this._change(null, 0)
  6416. } else return this._value()
  6417. },
  6418. values: function (a, b) {
  6419. var c, f, e;
  6420. if (arguments.length > 1) {
  6421. this.options.values[a] = this._trimAlignValue(b);
  6422. this._refreshValue();
  6423. this._change(null, a)
  6424. } else if (arguments.length) if (d.isArray(arguments[0])) {
  6425. c = this.options.values;
  6426. f = arguments[0];
  6427. for (e = 0; e < c.length; e += 1) {
  6428. c[e] = this._trimAlignValue(f[e]);
  6429. this._change(null, e)
  6430. }
  6431. this._refreshValue()
  6432. } else return this.options.values && this.options.values.length ? this._values(a) : this.value();
  6433. else return this._values()
  6434. },
  6435. _setOption: function (a, b) {
  6436. var c, f = 0;
  6437. if (d.isArray(this.options.values)) f = this.options.values.length;
  6438. d.Widget.prototype._setOption.apply(this, arguments);
  6439. switch (a) {
  6440. case "disabled":
  6441. if (b) {
  6442. this.handles.filter(".ui-state-focus").blur();
  6443. this.handles.removeClass("ui-state-hover");
  6444. this.handles.propAttr("disabled", true);
  6445. this.element.addClass("ui-disabled")
  6446. } else {
  6447. this.handles.propAttr("disabled", false);
  6448. this.element.removeClass("ui-disabled")
  6449. }
  6450. break;
  6451. case "orientation":
  6452. this._detectOrientation();
  6453. this.element.removeClass("ui-slider-horizontal ui-slider-vertical").addClass("ui-slider-" + this.orientation);
  6454. this._refreshValue();
  6455. break;
  6456. case "value":
  6457. this._animateOff = true;
  6458. this._refreshValue();
  6459. this._change(null, 0);
  6460. this._animateOff = false;
  6461. break;
  6462. case "values":
  6463. this._animateOff = true;
  6464. this._refreshValue();
  6465. for (c = 0; c < f; c += 1) this._change(null, c);
  6466. this._animateOff = false;
  6467. break
  6468. }
  6469. },
  6470. _value: function () {
  6471. var a = this.options.value;
  6472. return a = this._trimAlignValue(a)
  6473. },
  6474. _values: function (a) {
  6475. var b, c;
  6476. if (arguments.length) {
  6477. b = this.options.values[a];
  6478. return b = this._trimAlignValue(b)
  6479. } else {
  6480. b = this.options.values.slice();
  6481. for (c = 0; c < b.length; c += 1) b[c] = this._trimAlignValue(b[c]);
  6482. return b
  6483. }
  6484. },
  6485. _trimAlignValue: function (a) {
  6486. if (a <= this._valueMin()) return this._valueMin();
  6487. if (a >= this._valueMax()) return this._valueMax();
  6488. var b = this.options.step > 0 ? this.options.step : 1,
  6489. c = (a - this._valueMin()) % b;
  6490. a = a - c;
  6491. if (Math.abs(c) * 2 >= b) a += c > 0 ? b : -b;
  6492. return parseFloat(a.toFixed(5))
  6493. },
  6494. _valueMin: function () {
  6495. return this.options.min
  6496. },
  6497. _valueMax: function () {
  6498. return this.options.max
  6499. },
  6500. _refreshValue: function () {
  6501. var a = this.options.range,
  6502. b = this.options,
  6503. c = this,
  6504. f = !this._animateOff ? b.animate : false,
  6505. e, j = {}, g, k, l, i;
  6506. if (this.options.values && this.options.values.length) this.handles.each(function (h) {
  6507. e = (c.values(h) - c._valueMin()) / (c._valueMax() - c._valueMin()) * 100;
  6508. j[c.orientation === "horizontal" ? "left" : "bottom"] = e + "%";
  6509. d(this).stop(1, 1)[f ? "animate" : "css"](j, b.animate);
  6510. if (c.options.range === true) if (c.orientation === "horizontal") {
  6511. if (h === 0) c.range.stop(1, 1)[f ? "animate" : "css"]({
  6512. left: e + "%"
  6513. }, b.animate);
  6514. if (h === 1) c.range[f ? "animate" : "css"]({
  6515. width: e - g + "%"
  6516. }, {
  6517. queue: false,
  6518. duration: b.animate
  6519. })
  6520. } else {
  6521. if (h === 0) c.range.stop(1, 1)[f ? "animate" : "css"]({
  6522. bottom: e + "%"
  6523. }, b.animate);
  6524. if (h === 1) c.range[f ? "animate" : "css"]({
  6525. height: e - g + "%"
  6526. }, {
  6527. queue: false,
  6528. duration: b.animate
  6529. })
  6530. }
  6531. g = e
  6532. });
  6533. else {
  6534. k = this.value();
  6535. l = this._valueMin();
  6536. i = this._valueMax();
  6537. e = i !== l ? (k - l) / (i - l) * 100 : 0;
  6538. j[c.orientation === "horizontal" ? "left" : "bottom"] = e + "%";
  6539. this.handle.stop(1, 1)[f ? "animate" : "css"](j, b.animate);
  6540. if (a === "min" && this.orientation === "horizontal") this.range.stop(1, 1)[f ? "animate" : "css"]({
  6541. width: e + "%"
  6542. }, b.animate);
  6543. if (a === "max" && this.orientation === "horizontal") this.range[f ? "animate" : "css"]({
  6544. width: 100 - e + "%"
  6545. }, {
  6546. queue: false,
  6547. duration: b.animate
  6548. });
  6549. if (a === "min" && this.orientation === "vertical") this.range.stop(1, 1)[f ? "animate" : "css"]({
  6550. height: e + "%"
  6551. }, b.animate);
  6552. if (a === "max" && this.orientation === "vertical") this.range[f ? "animate" : "css"]({
  6553. height: 100 - e + "%"
  6554. }, {
  6555. queue: false,
  6556. duration: b.animate
  6557. })
  6558. }
  6559. }
  6560. });
  6561. d.extend(d.ui.slider, {
  6562. version: "1.8.16"
  6563. })
  6564. })(jQuery);;
  6565. (function (d, p) {
  6566. function u() {
  6567. return ++v
  6568. }
  6569. function w() {
  6570. return ++x
  6571. }
  6572. var v = 0,
  6573. x = 0;
  6574. d.widget("ui.tabs", {
  6575. options: {
  6576. add: null,
  6577. ajaxOptions: null,
  6578. cache: false,
  6579. cookie: null,
  6580. collapsible: false,
  6581. disable: null,
  6582. disabled: [],
  6583. enable: null,
  6584. event: "click",
  6585. fx: null,
  6586. idPrefix: "ui-tabs-",
  6587. load: null,
  6588. panelTemplate: "<div></div>",
  6589. remove: null,
  6590. select: null,
  6591. show: null,
  6592. spinner: "<em>Loading&#8230;</em>",
  6593. tabTemplate: "<li><a href='#{href}'><span>#{label}</span></a></li>"
  6594. },
  6595. _create: function () {
  6596. this._tabify(true)
  6597. },
  6598. _setOption: function (b, e) {
  6599. if (b == "selected") this.options.collapsible && e == this.options.selected || this.select(e);
  6600. else {
  6601. this.options[b] = e;
  6602. this._tabify()
  6603. }
  6604. },
  6605. _tabId: function (b) {
  6606. return b.title && b.title.replace(/\s/g, "_").replace(/[^\w\u00c0-\uFFFF-]/g, "") || this.options.idPrefix + u()
  6607. },
  6608. _sanitizeSelector: function (b) {
  6609. return b.replace(/:/g, "\\:")
  6610. },
  6611. _cookie: function () {
  6612. var b = this.cookie || (this.cookie = this.options.cookie.name || "ui-tabs-" + w());
  6613. return d.cookie.apply(null, [b].concat(d.makeArray(arguments)))
  6614. },
  6615. _ui: function (b, e) {
  6616. return {
  6617. tab: b,
  6618. panel: e,
  6619. index: this.anchors.index(b)
  6620. }
  6621. },
  6622. _cleanup: function () {
  6623. this.lis.filter(".ui-state-processing").removeClass("ui-state-processing").find("span:data(label.tabs)").each(function () {
  6624. var b = d(this);
  6625. b.html(b.data("label.tabs")).removeData("label.tabs")
  6626. })
  6627. },
  6628. _tabify: function (b) {
  6629. function e(g, f) {
  6630. g.css("display", "");
  6631. !d.support.opacity && f.opacity && g[0].style.removeAttribute("filter")
  6632. }
  6633. var a = this,
  6634. c = this.options,
  6635. h = /^#.+/;
  6636. this.list = this.element.find("ol,ul").eq(0);
  6637. this.lis = d(" > li:has(a[href])", this.list);
  6638. this.anchors = this.lis.map(function () {
  6639. return d("a", this)[0]
  6640. });
  6641. this.panels = d([]);
  6642. this.anchors.each(function (g, f) {
  6643. var i = d(f).attr("href"),
  6644. l = i.split("#")[0],
  6645. q;
  6646. if (l && (l === location.toString().split("#")[0] || (q = d("base")[0]) && l === q.href)) {
  6647. i = f.hash;
  6648. f.href = i
  6649. }
  6650. if (h.test(i)) a.panels = a.panels.add(a.element.find(a._sanitizeSelector(i)));
  6651. else if (i && i !== "#") {
  6652. d.data(f, "href.tabs", i);
  6653. d.data(f, "load.tabs", i.replace(/#.*$/, ""));
  6654. i = a._tabId(f);
  6655. f.href = "#" + i;
  6656. f = a.element.find("#" + i);
  6657. if (!f.length) {
  6658. f = d(c.panelTemplate).attr("id", i).addClass("ui-tabs-panel ui-widget-content ui-corner-bottom").insertAfter(a.panels[g - 1] || a.list);
  6659. f.data("destroy.tabs", true)
  6660. }
  6661. a.panels = a.panels.add(f)
  6662. } else c.disabled.push(g)
  6663. });
  6664. if (b) {
  6665. this.element.addClass("ui-tabs ui-widget ui-widget-content ui-corner-all");
  6666. this.list.addClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
  6667. this.lis.addClass("ui-state-default ui-corner-top");
  6668. this.panels.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom");
  6669. if (c.selected === p) {
  6670. location.hash && this.anchors.each(function (g, f) {
  6671. if (f.hash == location.hash) {
  6672. c.selected = g;
  6673. return false
  6674. }
  6675. });
  6676. if (typeof c.selected !== "number" && c.cookie) c.selected = parseInt(a._cookie(), 10);
  6677. if (typeof c.selected !== "number" && this.lis.filter(".ui-tabs-selected").length) c.selected = this.lis.index(this.lis.filter(".ui-tabs-selected"));
  6678. c.selected = c.selected || (this.lis.length ? 0 : -1)
  6679. } else if (c.selected === null) c.selected = -1;
  6680. c.selected = c.selected >= 0 && this.anchors[c.selected] || c.selected < 0 ? c.selected : 0;
  6681. c.disabled = d.unique(c.disabled.concat(d.map(this.lis.filter(".ui-state-disabled"), function (g) {
  6682. return a.lis.index(g)
  6683. }))).sort();
  6684. d.inArray(c.selected, c.disabled) != -1 && c.disabled.splice(d.inArray(c.selected, c.disabled), 1);
  6685. this.panels.addClass("ui-tabs-hide");
  6686. this.lis.removeClass("ui-tabs-selected ui-state-active");
  6687. if (c.selected >= 0 && this.anchors.length) {
  6688. a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash)).removeClass("ui-tabs-hide");
  6689. this.lis.eq(c.selected).addClass("ui-tabs-selected ui-state-active");
  6690. a.element.queue("tabs", function () {
  6691. a._trigger("show", null, a._ui(a.anchors[c.selected], a.element.find(a._sanitizeSelector(a.anchors[c.selected].hash))[0]))
  6692. });
  6693. this.load(c.selected)
  6694. }
  6695. d(window).bind("unload", function () {
  6696. a.lis.add(a.anchors).unbind(".tabs");
  6697. a.lis = a.anchors = a.panels = null
  6698. })
  6699. } else c.selected = this.lis.index(this.lis.filter(".ui-tabs-selected"));
  6700. this.element[c.collapsible ? "addClass" : "removeClass"]("ui-tabs-collapsible");
  6701. c.cookie && this._cookie(c.selected, c.cookie);
  6702. b = 0;
  6703. for (var j; j = this.lis[b]; b++) d(j)[d.inArray(b, c.disabled) != -1 && !d(j).hasClass("ui-tabs-selected") ? "addClass" : "removeClass"]("ui-state-disabled");
  6704. c.cache === false && this.anchors.removeData("cache.tabs");
  6705. this.lis.add(this.anchors).unbind(".tabs");
  6706. if (c.event !== "mouseover") {
  6707. var k = function (g, f) {
  6708. f.is(":not(.ui-state-disabled)") && f.addClass("ui-state-" + g)
  6709. }, n = function (g, f) {
  6710. f.removeClass("ui-state-" + g)
  6711. };
  6712. this.lis.bind("mouseover.tabs", function () {
  6713. k("hover", d(this))
  6714. });
  6715. this.lis.bind("mouseout.tabs", function () {
  6716. n("hover", d(this))
  6717. });
  6718. this.anchors.bind("focus.tabs", function () {
  6719. k("focus", d(this).closest("li"))
  6720. });
  6721. this.anchors.bind("blur.tabs", function () {
  6722. n("focus", d(this).closest("li"))
  6723. })
  6724. }
  6725. var m, o;
  6726. if (c.fx) if (d.isArray(c.fx)) {
  6727. m = c.fx[0];
  6728. o = c.fx[1]
  6729. } else m = o = c.fx;
  6730. var r = o ? function (g, f) {
  6731. d(g).closest("li").addClass("ui-tabs-selected ui-state-active");
  6732. f.hide().removeClass("ui-tabs-hide").animate(o, o.duration || "normal", function () {
  6733. e(f, o);
  6734. a._trigger("show", null, a._ui(g, f[0]))
  6735. })
  6736. } : function (g, f) {
  6737. d(g).closest("li").addClass("ui-tabs-selected ui-state-active");
  6738. f.removeClass("ui-tabs-hide");
  6739. a._trigger("show", null, a._ui(g, f[0]))
  6740. }, s = m ? function (g, f) {
  6741. f.animate(m, m.duration || "normal", function () {
  6742. a.lis.removeClass("ui-tabs-selected ui-state-active");
  6743. f.addClass("ui-tabs-hide");
  6744. e(f, m);
  6745. a.element.dequeue("tabs")
  6746. })
  6747. } : function (g, f) {
  6748. a.lis.removeClass("ui-tabs-selected ui-state-active");
  6749. f.addClass("ui-tabs-hide");
  6750. a.element.dequeue("tabs")
  6751. };
  6752. this.anchors.bind(c.event + ".tabs", function () {
  6753. var g = this,
  6754. f = d(g).closest("li"),
  6755. i = a.panels.filter(":not(.ui-tabs-hide)"),
  6756. l = a.element.find(a._sanitizeSelector(g.hash));
  6757. if (f.hasClass("ui-tabs-selected") && !c.collapsible || f.hasClass("ui-state-disabled") || f.hasClass("ui-state-processing") || a.panels.filter(":animated").length || a._trigger("select", null, a._ui(this, l[0])) === false) {
  6758. this.blur();
  6759. return false
  6760. }
  6761. c.selected = a.anchors.index(this);
  6762. a.abort();
  6763. if (c.collapsible) if (f.hasClass("ui-tabs-selected")) {
  6764. c.selected = -1;
  6765. c.cookie && a._cookie(c.selected, c.cookie);
  6766. a.element.queue("tabs", function () {
  6767. s(g, i)
  6768. }).dequeue("tabs");
  6769. this.blur();
  6770. return false
  6771. } else if (!i.length) {
  6772. c.cookie && a._cookie(c.selected, c.cookie);
  6773. a.element.queue("tabs", function () {
  6774. r(g, l)
  6775. });
  6776. a.load(a.anchors.index(this));
  6777. this.blur();
  6778. return false
  6779. }
  6780. c.cookie && a._cookie(c.selected, c.cookie);
  6781. if (l.length) {
  6782. i.length && a.element.queue("tabs", function () {
  6783. s(g, i)
  6784. });
  6785. a.element.queue("tabs", function () {
  6786. r(g, l)
  6787. });
  6788. a.load(a.anchors.index(this))
  6789. } else throw "jQuery UI Tabs: Mismatching fragment identifier.";
  6790. d.browser.msie && this.blur()
  6791. });
  6792. this.anchors.bind("click.tabs", function () {
  6793. return false
  6794. })
  6795. },
  6796. _getIndex: function (b) {
  6797. if (typeof b == "string") b = this.anchors.index(this.anchors.filter("[href$=" + b + "]"));
  6798. return b
  6799. },
  6800. destroy: function () {
  6801. var b = this.options;
  6802. this.abort();
  6803. this.element.unbind(".tabs").removeClass("ui-tabs ui-widget ui-widget-content ui-corner-all ui-tabs-collapsible").removeData("tabs");
  6804. this.list.removeClass("ui-tabs-nav ui-helper-reset ui-helper-clearfix ui-widget-header ui-corner-all");
  6805. this.anchors.each(function () {
  6806. var e = d.data(this, "href.tabs");
  6807. if (e) this.href = e;
  6808. var a = d(this).unbind(".tabs");
  6809. d.each(["href", "load", "cache"], function (c, h) {
  6810. a.removeData(h + ".tabs")
  6811. })
  6812. });
  6813. this.lis.unbind(".tabs").add(this.panels).each(function () {
  6814. d.data(this, "destroy.tabs") ? d(this).remove() : d(this).removeClass("ui-state-default ui-corner-top ui-tabs-selected ui-state-active ui-state-hover ui-state-focus ui-state-disabled ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide")
  6815. });
  6816. b.cookie && this._cookie(null, b.cookie);
  6817. return this
  6818. },
  6819. add: function (b, e, a) {
  6820. if (a === p) a = this.anchors.length;
  6821. var c = this,
  6822. h = this.options;
  6823. e = d(h.tabTemplate.replace(/#\{href\}/g, b).replace(/#\{label\}/g, e));
  6824. b = !b.indexOf("#") ? b.replace("#", "") : this._tabId(d("a", e)[0]);
  6825. e.addClass("ui-state-default ui-corner-top").data("destroy.tabs", true);
  6826. var j = c.element.find("#" + b);
  6827. j.length || (j = d(h.panelTemplate).attr("id", b).data("destroy.tabs", true));
  6828. j.addClass("ui-tabs-panel ui-widget-content ui-corner-bottom ui-tabs-hide");
  6829. if (a >= this.lis.length) {
  6830. e.appendTo(this.list);
  6831. j.appendTo(this.list[0].parentNode)
  6832. } else {
  6833. e.insertBefore(this.lis[a]);
  6834. j.insertBefore(this.panels[a])
  6835. }
  6836. h.disabled = d.map(h.disabled, function (k) {
  6837. return k >= a ? ++k : k
  6838. });
  6839. this._tabify();
  6840. if (this.anchors.length == 1) {
  6841. h.selected = 0;
  6842. e.addClass("ui-tabs-selected ui-state-active");
  6843. j.removeClass("ui-tabs-hide");
  6844. this.element.queue("tabs", function () {
  6845. c._trigger("show", null, c._ui(c.anchors[0], c.panels[0]))
  6846. });
  6847. this.load(0)
  6848. }
  6849. this._trigger("add", null, this._ui(this.anchors[a], this.panels[a]));
  6850. return this
  6851. },
  6852. remove: function (b) {
  6853. b = this._getIndex(b);
  6854. var e = this.options,
  6855. a = this.lis.eq(b).remove(),
  6856. c = this.panels.eq(b).remove();
  6857. if (a.hasClass("ui-tabs-selected") && this.anchors.length > 1) this.select(b + (b + 1 < this.anchors.length ? 1 : -1));
  6858. e.disabled = d.map(d.grep(e.disabled, function (h) {
  6859. return h != b
  6860. }), function (h) {
  6861. return h >= b ? --h : h
  6862. });
  6863. this._tabify();
  6864. this._trigger("remove", null, this._ui(a.find("a")[0], c[0]));
  6865. return this
  6866. },
  6867. enable: function (b) {
  6868. b = this._getIndex(b);
  6869. var e = this.options;
  6870. if (d.inArray(b, e.disabled) != -1) {
  6871. this.lis.eq(b).removeClass("ui-state-disabled");
  6872. e.disabled = d.grep(e.disabled, function (a) {
  6873. return a != b
  6874. });
  6875. this._trigger("enable", null, this._ui(this.anchors[b], this.panels[b]));
  6876. return this
  6877. }
  6878. },
  6879. disable: function (b) {
  6880. b = this._getIndex(b);
  6881. var e = this.options;
  6882. if (b != e.selected) {
  6883. this.lis.eq(b).addClass("ui-state-disabled");
  6884. e.disabled.push(b);
  6885. e.disabled.sort();
  6886. this._trigger("disable", null, this._ui(this.anchors[b], this.panels[b]))
  6887. }
  6888. return this
  6889. },
  6890. select: function (b) {
  6891. b = this._getIndex(b);
  6892. if (b == -1) if (this.options.collapsible && this.options.selected != -1) b = this.options.selected;
  6893. else return this;
  6894. this.anchors.eq(b).trigger(this.options.event + ".tabs");
  6895. return this
  6896. },
  6897. load: function (b) {
  6898. b = this._getIndex(b);
  6899. var e = this,
  6900. a = this.options,
  6901. c = this.anchors.eq(b)[0],
  6902. h = d.data(c, "load.tabs");
  6903. this.abort();
  6904. if (!h || this.element.queue("tabs").length !== 0 && d.data(c, "cache.tabs")) this.element.dequeue("tabs");
  6905. else {
  6906. this.lis.eq(b).addClass("ui-state-processing");
  6907. if (a.spinner) {
  6908. var j = d("span", c);
  6909. j.data("label.tabs", j.html()).html(a.spinner)
  6910. }
  6911. this.xhr = d.ajax(d.extend({}, a.ajaxOptions, {
  6912. url: h,
  6913. success: function (k, n) {
  6914. e.element.find(e._sanitizeSelector(c.hash)).html(k);
  6915. e._cleanup();
  6916. a.cache && d.data(c, "cache.tabs", true);
  6917. e._trigger("load", null, e._ui(e.anchors[b], e.panels[b]));
  6918. try {
  6919. a.ajaxOptions.success(k, n)
  6920. } catch (m) {}
  6921. },
  6922. error: function (k, n) {
  6923. e._cleanup();
  6924. e._trigger("load", null, e._ui(e.anchors[b], e.panels[b]));
  6925. try {
  6926. a.ajaxOptions.error(k, n, b, c)
  6927. } catch (m) {}
  6928. }
  6929. }));
  6930. e.element.dequeue("tabs");
  6931. return this
  6932. }
  6933. },
  6934. abort: function () {
  6935. this.element.queue([]);
  6936. this.panels.stop(false, true);
  6937. this.element.queue("tabs", this.element.queue("tabs").splice(-2, 2));
  6938. if (this.xhr) {
  6939. this.xhr.abort();
  6940. delete this.xhr
  6941. }
  6942. this._cleanup();
  6943. return this
  6944. },
  6945. url: function (b, e) {
  6946. this.anchors.eq(b).removeData("cache.tabs").data("load.tabs", e);
  6947. return this
  6948. },
  6949. length: function () {
  6950. return this.anchors.length
  6951. }
  6952. });
  6953. d.extend(d.ui.tabs, {
  6954. version: "1.8.16"
  6955. });
  6956. d.extend(d.ui.tabs.prototype, {
  6957. rotation: null,
  6958. rotate: function (b, e) {
  6959. var a = this,
  6960. c = this.options,
  6961. h = a._rotate || (a._rotate = function (j) {
  6962. clearTimeout(a.rotation);
  6963. a.rotation = setTimeout(function () {
  6964. var k = c.selected;
  6965. a.select(++k < a.anchors.length ? k : 0)
  6966. }, b);
  6967. j && j.stopPropagation()
  6968. });
  6969. e = a._unrotate || (a._unrotate = !e ? function (j) {
  6970. j.clientX && a.rotate(null)
  6971. } : function () {
  6972. t = c.selected;
  6973. h()
  6974. });
  6975. if (b) {
  6976. this.element.bind("tabsshow", h);
  6977. this.anchors.bind(c.event + ".tabs", e);
  6978. h()
  6979. } else {
  6980. clearTimeout(a.rotation);
  6981. this.element.unbind("tabsshow", h);
  6982. this.anchors.unbind(c.event + ".tabs", e);
  6983. delete this._rotate;
  6984. delete this._unrotate
  6985. }
  6986. return this
  6987. }
  6988. })
  6989. })(jQuery);;
  6990. (function (d, C) {
  6991. function M() {
  6992. this.debug = false;
  6993. this._curInst = null;
  6994. this._keyEvent = false;
  6995. this._disabledInputs = [];
  6996. this._inDialog = this._datepickerShowing = false;
  6997. this._mainDivId = "ui-datepicker-div";
  6998. this._inlineClass = "ui-datepicker-inline";
  6999. this._appendClass = "ui-datepicker-append";
  7000. this._triggerClass = "ui-datepicker-trigger";
  7001. this._dialogClass = "ui-datepicker-dialog";
  7002. this._disableClass = "ui-datepicker-disabled";
  7003. this._unselectableClass = "ui-datepicker-unselectable";
  7004. this._currentClass = "ui-datepicker-current-day";
  7005. this._dayOverClass = "ui-datepicker-days-cell-over";
  7006. this.regional = [];
  7007. this.regional[""] = {
  7008. closeText: "Done",
  7009. prevText: "Prev",
  7010. nextText: "Next",
  7011. currentText: "Today",
  7012. monthNames: ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"],
  7013. monthNamesShort: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"],
  7014. dayNames: ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"],
  7015. dayNamesShort: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"],
  7016. dayNamesMin: ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"],
  7017. weekHeader: "Wk",
  7018. dateFormat: "mm/dd/yy",
  7019. firstDay: 0,
  7020. isRTL: false,
  7021. showMonthAfterYear: false,
  7022. yearSuffix: ""
  7023. };
  7024. this._defaults = {
  7025. showOn: "focus",
  7026. showAnim: "fadeIn",
  7027. showOptions: {},
  7028. defaultDate: null,
  7029. appendText: "",
  7030. buttonText: "...",
  7031. buttonImage: "",
  7032. buttonImageOnly: false,
  7033. hideIfNoPrevNext: false,
  7034. navigationAsDateFormat: false,
  7035. gotoCurrent: false,
  7036. changeMonth: false,
  7037. changeYear: false,
  7038. yearRange: "c-10:c+10",
  7039. showOtherMonths: false,
  7040. selectOtherMonths: false,
  7041. showWeek: false,
  7042. calculateWeek: this.iso8601Week,
  7043. shortYearCutoff: "+10",
  7044. minDate: null,
  7045. maxDate: null,
  7046. duration: "fast",
  7047. beforeShowDay: null,
  7048. beforeShow: null,
  7049. onSelect: null,
  7050. onChangeMonthYear: null,
  7051. onClose: null,
  7052. numberOfMonths: 1,
  7053. showCurrentAtPos: 0,
  7054. stepMonths: 1,
  7055. stepBigMonths: 12,
  7056. altField: "",
  7057. altFormat: "",
  7058. constrainInput: true,
  7059. showButtonPanel: false,
  7060. autoSize: false,
  7061. disabled: false
  7062. };
  7063. d.extend(this._defaults, this.regional[""]);
  7064. this.dpDiv = N(d('<div id="' + this._mainDivId + '" class="ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
  7065. }
  7066. function N(a) {
  7067. return a.bind("mouseout", function (b) {
  7068. b = d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");
  7069. b.length && b.removeClass("ui-state-hover ui-datepicker-prev-hover ui-datepicker-next-hover")
  7070. }).bind("mouseover", function (b) {
  7071. b = d(b.target).closest("button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a");
  7072. if (!(d.datepicker._isDisabledDatepicker(J.inline ? a.parent()[0] : J.input[0]) || !b.length)) {
  7073. b.parents(".ui-datepicker-calendar").find("a").removeClass("ui-state-hover");
  7074. b.addClass("ui-state-hover");
  7075. b.hasClass("ui-datepicker-prev") && b.addClass("ui-datepicker-prev-hover");
  7076. b.hasClass("ui-datepicker-next") && b.addClass("ui-datepicker-next-hover")
  7077. }
  7078. })
  7079. }
  7080. function H(a, b) {
  7081. d.extend(a, b);
  7082. for (var c in b) if (b[c] == null || b[c] == C) a[c] = b[c];
  7083. return a
  7084. }
  7085. d.extend(d.ui, {
  7086. datepicker: {
  7087. version: "1.8.16"
  7088. }
  7089. });
  7090. var B = (new Date).getTime(),
  7091. J;
  7092. d.extend(M.prototype, {
  7093. markerClassName: "hasDatepicker",
  7094. maxRows: 4,
  7095. log: function () {
  7096. this.debug && console.log.apply("", arguments)
  7097. },
  7098. _widgetDatepicker: function () {
  7099. return this.dpDiv
  7100. },
  7101. setDefaults: function (a) {
  7102. H(this._defaults, a || {});
  7103. return this
  7104. },
  7105. _attachDatepicker: function (a, b) {
  7106. var c = null;
  7107. for (var e in this._defaults) {
  7108. var f = a.getAttribute("date:" + e);
  7109. if (f) {
  7110. c = c || {};
  7111. try {
  7112. c[e] = eval(f)
  7113. } catch (h) {
  7114. c[e] = f
  7115. }
  7116. }
  7117. }
  7118. e = a.nodeName.toLowerCase();
  7119. f = e == "div" || e == "span";
  7120. if (!a.id) {
  7121. this.uuid += 1;
  7122. a.id = "dp" + this.uuid
  7123. }
  7124. var i = this._newInst(d(a), f);
  7125. i.settings = d.extend({}, b || {}, c || {});
  7126. if (e == "input") this._connectDatepicker(a, i);
  7127. else f && this._inlineDatepicker(a, i)
  7128. },
  7129. _newInst: function (a, b) {
  7130. return {
  7131. id: a[0].id.replace(/([^A-Za-z0-9_-])/g, "\\\\$1"),
  7132. input: a,
  7133. selectedDay: 0,
  7134. selectedMonth: 0,
  7135. selectedYear: 0,
  7136. drawMonth: 0,
  7137. drawYear: 0,
  7138. inline: b,
  7139. dpDiv: !b ? this.dpDiv : N(d('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
  7140. }
  7141. },
  7142. _connectDatepicker: function (a, b) {
  7143. var c = d(a);
  7144. b.append = d([]);
  7145. b.trigger = d([]);
  7146. if (!c.hasClass(this.markerClassName)) {
  7147. this._attachments(c, b);
  7148. c.addClass(this.markerClassName).keydown(this._doKeyDown).keypress(this._doKeyPress).keyup(this._doKeyUp).bind("setData.datepicker", function (e, f, h) {
  7149. b.settings[f] = h
  7150. }).bind("getData.datepicker", function (e, f) {
  7151. return this._get(b, f)
  7152. });
  7153. this._autoSize(b);
  7154. d.data(a, "datepicker", b);
  7155. b.settings.disabled && this._disableDatepicker(a)
  7156. }
  7157. },
  7158. _attachments: function (a, b) {
  7159. var c = this._get(b, "appendText"),
  7160. e = this._get(b, "isRTL");
  7161. b.append && b.append.remove();
  7162. if (c) {
  7163. b.append = d('<span class="' + this._appendClass + '">' + c + "</span>");
  7164. a[e ? "before" : "after"](b.append)
  7165. }
  7166. a.unbind("focus", this._showDatepicker);
  7167. b.trigger && b.trigger.remove();
  7168. c = this._get(b, "showOn");
  7169. if (c == "focus" || c == "both") a.focus(this._showDatepicker);
  7170. if (c == "button" || c == "both") {
  7171. c = this._get(b, "buttonText");
  7172. var f = this._get(b, "buttonImage");
  7173. b.trigger = d(this._get(b, "buttonImageOnly") ? d("<img/>").addClass(this._triggerClass).attr({
  7174. src: f,
  7175. alt: c,
  7176. title: c
  7177. }) : d('<button type="button"></button>').addClass(this._triggerClass).html(f == "" ? c : d("<img/>").attr({
  7178. src: f,
  7179. alt: c,
  7180. title: c
  7181. })));
  7182. a[e ? "before" : "after"](b.trigger);
  7183. b.trigger.click(function () {
  7184. d.datepicker._datepickerShowing && d.datepicker._lastInput == a[0] ? d.datepicker._hideDatepicker() : d.datepicker._showDatepicker(a[0]);
  7185. return false
  7186. })
  7187. }
  7188. },
  7189. _autoSize: function (a) {
  7190. if (this._get(a, "autoSize") && !a.inline) {
  7191. var b = new Date(2009, 11, 20),
  7192. c = this._get(a, "dateFormat");
  7193. if (c.match(/[DM]/)) {
  7194. var e = function (f) {
  7195. for (var h = 0, i = 0, g = 0; g < f.length; g++) if (f[g].length > h) {
  7196. h = f[g].length;
  7197. i = g
  7198. }
  7199. return i
  7200. };
  7201. b.setMonth(e(this._get(a, c.match(/MM/) ? "monthNames" : "monthNamesShort")));
  7202. b.setDate(e(this._get(a, c.match(/DD/) ? "dayNames" : "dayNamesShort")) + 20 - b.getDay())
  7203. }
  7204. a.input.attr("size", this._formatDate(a, b).length)
  7205. }
  7206. },
  7207. _inlineDatepicker: function (a, b) {
  7208. var c = d(a);
  7209. if (!c.hasClass(this.markerClassName)) {
  7210. c.addClass(this.markerClassName).append(b.dpDiv).bind("setData.datepicker", function (e, f, h) {
  7211. b.settings[f] = h
  7212. }).bind("getData.datepicker", function (e, f) {
  7213. return this._get(b, f)
  7214. });
  7215. d.data(a, "datepicker", b);
  7216. this._setDate(b, this._getDefaultDate(b), true);
  7217. this._updateDatepicker(b);
  7218. this._updateAlternate(b);
  7219. b.settings.disabled && this._disableDatepicker(a);
  7220. b.dpDiv.css("display", "block")
  7221. }
  7222. },
  7223. _dialogDatepicker: function (a, b, c, e, f) {
  7224. a = this._dialogInst;
  7225. if (!a) {
  7226. this.uuid += 1;
  7227. this._dialogInput = d('<input type="text" id="' + ("dp" + this.uuid) + '" style="position: absolute; top: -100px; width: 0px; z-index: -10;"/>');
  7228. this._dialogInput.keydown(this._doKeyDown);
  7229. d("body").append(this._dialogInput);
  7230. a = this._dialogInst = this._newInst(this._dialogInput, false);
  7231. a.settings = {};
  7232. d.data(this._dialogInput[0], "datepicker", a)
  7233. }
  7234. H(a.settings, e || {});
  7235. b = b && b.constructor == Date ? this._formatDate(a, b) : b;
  7236. this._dialogInput.val(b);
  7237. this._pos = f ? f.length ? f : [f.pageX, f.pageY] : null;
  7238. if (!this._pos) this._pos = [document.documentElement.clientWidth / 2 - 100 + (document.documentElement.scrollLeft || document.body.scrollLeft), document.documentElement.clientHeight / 2 - 150 + (document.documentElement.scrollTop || document.body.scrollTop)];
  7239. this._dialogInput.css("left", this._pos[0] + 20 + "px").css("top", this._pos[1] + "px");
  7240. a.settings.onSelect = c;
  7241. this._inDialog = true;
  7242. this.dpDiv.addClass(this._dialogClass);
  7243. this._showDatepicker(this._dialogInput[0]);
  7244. d.blockUI && d.blockUI(this.dpDiv);
  7245. d.data(this._dialogInput[0], "datepicker", a);
  7246. return this
  7247. },
  7248. _destroyDatepicker: function (a) {
  7249. var b = d(a),
  7250. c = d.data(a, "datepicker");
  7251. if (b.hasClass(this.markerClassName)) {
  7252. var e = a.nodeName.toLowerCase();
  7253. d.removeData(a, "datepicker");
  7254. if (e == "input") {
  7255. c.append.remove();
  7256. c.trigger.remove();
  7257. b.removeClass(this.markerClassName).unbind("focus", this._showDatepicker).unbind("keydown", this._doKeyDown).unbind("keypress", this._doKeyPress).unbind("keyup", this._doKeyUp)
  7258. } else if (e == "div" || e == "span") b.removeClass(this.markerClassName).empty()
  7259. }
  7260. },
  7261. _enableDatepicker: function (a) {
  7262. var b = d(a),
  7263. c = d.data(a, "datepicker");
  7264. if (b.hasClass(this.markerClassName)) {
  7265. var e = a.nodeName.toLowerCase();
  7266. if (e == "input") {
  7267. a.disabled = false;
  7268. c.trigger.filter("button").each(function () {
  7269. this.disabled = false
  7270. }).end().filter("img").css({
  7271. opacity: "1.0",
  7272. cursor: ""
  7273. })
  7274. } else if (e == "div" || e == "span") {
  7275. b = b.children("." + this._inlineClass);
  7276. b.children().removeClass("ui-state-disabled");
  7277. b.find("select.ui-datepicker-month, select.ui-datepicker-year").removeAttr("disabled")
  7278. }
  7279. this._disabledInputs = d.map(this._disabledInputs, function (f) {
  7280. return f == a ? null : f
  7281. })
  7282. }
  7283. },
  7284. _disableDatepicker: function (a) {
  7285. var b = d(a),
  7286. c = d.data(a, "datepicker");
  7287. if (b.hasClass(this.markerClassName)) {
  7288. var e = a.nodeName.toLowerCase();
  7289. if (e == "input") {
  7290. a.disabled = true;
  7291. c.trigger.filter("button").each(function () {
  7292. this.disabled = true
  7293. }).end().filter("img").css({
  7294. opacity: "0.5",
  7295. cursor: "default"
  7296. })
  7297. } else if (e == "div" || e == "span") {
  7298. b = b.children("." + this._inlineClass);
  7299. b.children().addClass("ui-state-disabled");
  7300. b.find("select.ui-datepicker-month, select.ui-datepicker-year").attr("disabled", "disabled")
  7301. }
  7302. this._disabledInputs = d.map(this._disabledInputs, function (f) {
  7303. return f == a ? null : f
  7304. });
  7305. this._disabledInputs[this._disabledInputs.length] = a
  7306. }
  7307. },
  7308. _isDisabledDatepicker: function (a) {
  7309. if (!a) return false;
  7310. for (var b = 0; b < this._disabledInputs.length; b++) if (this._disabledInputs[b] == a) return true;
  7311. return false
  7312. },
  7313. _getInst: function (a) {
  7314. try {
  7315. return d.data(a, "datepicker")
  7316. } catch (b) {
  7317. throw "Missing instance data for this datepicker";
  7318. }
  7319. },
  7320. _optionDatepicker: function (a, b, c) {
  7321. var e = this._getInst(a);
  7322. if (arguments.length == 2 && typeof b == "string") return b == "defaults" ? d.extend({}, d.datepicker._defaults) : e ? b == "all" ? d.extend({}, e.settings) : this._get(e, b) : null;
  7323. var f = b || {};
  7324. if (typeof b == "string") {
  7325. f = {};
  7326. f[b] = c
  7327. }
  7328. if (e) {
  7329. this._curInst == e && this._hideDatepicker();
  7330. var h = this._getDateDatepicker(a, true),
  7331. i = this._getMinMaxDate(e, "min"),
  7332. g = this._getMinMaxDate(e, "max");
  7333. H(e.settings, f);
  7334. if (i !== null && f.dateFormat !== C && f.minDate === C) e.settings.minDate = this._formatDate(e, i);
  7335. if (g !== null && f.dateFormat !== C && f.maxDate === C) e.settings.maxDate = this._formatDate(e, g);
  7336. this._attachments(d(a), e);
  7337. this._autoSize(e);
  7338. this._setDate(e, h);
  7339. this._updateAlternate(e);
  7340. this._updateDatepicker(e)
  7341. }
  7342. },
  7343. _changeDatepicker: function (a, b, c) {
  7344. this._optionDatepicker(a, b, c)
  7345. },
  7346. _refreshDatepicker: function (a) {
  7347. (a = this._getInst(a)) && this._updateDatepicker(a)
  7348. },
  7349. _setDateDatepicker: function (a, b) {
  7350. if (a = this._getInst(a)) {
  7351. this._setDate(a, b);
  7352. this._updateDatepicker(a);
  7353. this._updateAlternate(a)
  7354. }
  7355. },
  7356. _getDateDatepicker: function (a, b) {
  7357. (a = this._getInst(a)) && !a.inline && this._setDateFromField(a, b);
  7358. return a ? this._getDate(a) : null
  7359. },
  7360. _doKeyDown: function (a) {
  7361. var b = d.datepicker._getInst(a.target),
  7362. c = true,
  7363. e = b.dpDiv.is(".ui-datepicker-rtl");
  7364. b._keyEvent = true;
  7365. if (d.datepicker._datepickerShowing) switch (a.keyCode) {
  7366. case 9:
  7367. d.datepicker._hideDatepicker();
  7368. c = false;
  7369. break;
  7370. case 13:
  7371. c = d("td." + d.datepicker._dayOverClass + ":not(." + d.datepicker._currentClass + ")", b.dpDiv);
  7372. c[0] && d.datepicker._selectDay(a.target, b.selectedMonth, b.selectedYear, c[0]);
  7373. if (a = d.datepicker._get(b, "onSelect")) {
  7374. c = d.datepicker._formatDate(b);
  7375. a.apply(b.input ? b.input[0] : null, [c, b])
  7376. } else d.datepicker._hideDatepicker();
  7377. return false;
  7378. case 27:
  7379. d.datepicker._hideDatepicker();
  7380. break;
  7381. case 33:
  7382. d.datepicker._adjustDate(a.target, a.ctrlKey ? -d.datepicker._get(b, "stepBigMonths") : -d.datepicker._get(b, "stepMonths"), "M");
  7383. break;
  7384. case 34:
  7385. d.datepicker._adjustDate(a.target, a.ctrlKey ? +d.datepicker._get(b, "stepBigMonths") : +d.datepicker._get(b, "stepMonths"), "M");
  7386. break;
  7387. case 35:
  7388. if (a.ctrlKey || a.metaKey) d.datepicker._clearDate(a.target);
  7389. c = a.ctrlKey || a.metaKey;
  7390. break;
  7391. case 36:
  7392. if (a.ctrlKey || a.metaKey) d.datepicker._gotoToday(a.target);
  7393. c = a.ctrlKey || a.metaKey;
  7394. break;
  7395. case 37:
  7396. if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, e ? +1 : -1, "D");
  7397. c = a.ctrlKey || a.metaKey;
  7398. if (a.originalEvent.altKey) d.datepicker._adjustDate(a.target, a.ctrlKey ? -d.datepicker._get(b, "stepBigMonths") : -d.datepicker._get(b, "stepMonths"), "M");
  7399. break;
  7400. case 38:
  7401. if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, - 7, "D");
  7402. c = a.ctrlKey || a.metaKey;
  7403. break;
  7404. case 39:
  7405. if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, e ? -1 : +1, "D");
  7406. c = a.ctrlKey || a.metaKey;
  7407. if (a.originalEvent.altKey) d.datepicker._adjustDate(a.target, a.ctrlKey ? +d.datepicker._get(b, "stepBigMonths") : +d.datepicker._get(b, "stepMonths"), "M");
  7408. break;
  7409. case 40:
  7410. if (a.ctrlKey || a.metaKey) d.datepicker._adjustDate(a.target, + 7, "D");
  7411. c = a.ctrlKey || a.metaKey;
  7412. break;
  7413. default:
  7414. c = false
  7415. } else if (a.keyCode == 36 && a.ctrlKey) d.datepicker._showDatepicker(this);
  7416. else c = false;
  7417. if (c) {
  7418. a.preventDefault();
  7419. a.stopPropagation()
  7420. }
  7421. },
  7422. _doKeyPress: function (a) {
  7423. var b = d.datepicker._getInst(a.target);
  7424. if (d.datepicker._get(b, "constrainInput")) {
  7425. b = d.datepicker._possibleChars(d.datepicker._get(b, "dateFormat"));
  7426. var c = String.fromCharCode(a.charCode == C ? a.keyCode : a.charCode);
  7427. return a.ctrlKey || a.metaKey || c < " " || !b || b.indexOf(c) > -1
  7428. }
  7429. },
  7430. _doKeyUp: function (a) {
  7431. a = d.datepicker._getInst(a.target);
  7432. if (a.input.val() != a.lastVal) try {
  7433. if (d.datepicker.parseDate(d.datepicker._get(a, "dateFormat"), a.input ? a.input.val() : null, d.datepicker._getFormatConfig(a))) {
  7434. d.datepicker._setDateFromField(a);
  7435. d.datepicker._updateAlternate(a);
  7436. d.datepicker._updateDatepicker(a)
  7437. }
  7438. } catch (b) {
  7439. d.datepicker.log(b)
  7440. }
  7441. return true
  7442. },
  7443. _showDatepicker: function (a) {
  7444. a = a.target || a;
  7445. if (a.nodeName.toLowerCase() != "input") a = d("input", a.parentNode)[0];
  7446. if (!(d.datepicker._isDisabledDatepicker(a) || d.datepicker._lastInput == a)) {
  7447. var b = d.datepicker._getInst(a);
  7448. if (d.datepicker._curInst && d.datepicker._curInst != b) {
  7449. d.datepicker._datepickerShowing && d.datepicker._triggerOnClose(d.datepicker._curInst);
  7450. d.datepicker._curInst.dpDiv.stop(true, true)
  7451. }
  7452. var c = d.datepicker._get(b, "beforeShow");
  7453. c = c ? c.apply(a, [a, b]) : {};
  7454. if (c !== false) {
  7455. H(b.settings, c);
  7456. b.lastVal = null;
  7457. d.datepicker._lastInput = a;
  7458. d.datepicker._setDateFromField(b);
  7459. if (d.datepicker._inDialog) a.value = "";
  7460. if (!d.datepicker._pos) {
  7461. d.datepicker._pos = d.datepicker._findPos(a);
  7462. d.datepicker._pos[1] += a.offsetHeight
  7463. }
  7464. var e = false;
  7465. d(a).parents().each(function () {
  7466. e |= d(this).css("position") == "fixed";
  7467. return !e
  7468. });
  7469. if (e && d.browser.opera) {
  7470. d.datepicker._pos[0] -= document.documentElement.scrollLeft;
  7471. d.datepicker._pos[1] -= document.documentElement.scrollTop
  7472. }
  7473. c = {
  7474. left: d.datepicker._pos[0],
  7475. top: d.datepicker._pos[1]
  7476. };
  7477. d.datepicker._pos = null;
  7478. b.dpDiv.empty();
  7479. b.dpDiv.css({
  7480. position: "absolute",
  7481. display: "block",
  7482. top: "-1000px"
  7483. });
  7484. d.datepicker._updateDatepicker(b);
  7485. c = d.datepicker._checkOffset(b, c, e);
  7486. b.dpDiv.css({
  7487. position: d.datepicker._inDialog && d.blockUI ? "static" : e ? "fixed" : "absolute",
  7488. display: "none",
  7489. left: c.left + "px",
  7490. top: c.top + "px"
  7491. });
  7492. if (!b.inline) {
  7493. c = d.datepicker._get(b, "showAnim");
  7494. var f = d.datepicker._get(b, "duration"),
  7495. h = function () {
  7496. var i = b.dpDiv.find("iframe.ui-datepicker-cover");
  7497. if (i.length) {
  7498. var g = d.datepicker._getBorders(b.dpDiv);
  7499. i.css({
  7500. left: -g[0],
  7501. top: -g[1],
  7502. width: b.dpDiv.outerWidth(),
  7503. height: b.dpDiv.outerHeight()
  7504. })
  7505. }
  7506. };
  7507. b.dpDiv.zIndex(d(a).zIndex() + 1);
  7508. d.datepicker._datepickerShowing = true;
  7509. d.effects && d.effects[c] ? b.dpDiv.show(c, d.datepicker._get(b, "showOptions"), f, h) : b.dpDiv[c || "show"](c ? f : null, h);
  7510. if (!c || !f) h();
  7511. b.input.is(":visible") && !b.input.is(":disabled") && b.input.focus();
  7512. d.datepicker._curInst = b
  7513. }
  7514. }
  7515. }
  7516. },
  7517. _updateDatepicker: function (a) {
  7518. this.maxRows = 4;
  7519. var b = d.datepicker._getBorders(a.dpDiv);
  7520. J = a;
  7521. a.dpDiv.empty().append(this._generateHTML(a));
  7522. var c = a.dpDiv.find("iframe.ui-datepicker-cover");
  7523. c.length && c.css({
  7524. left: -b[0],
  7525. top: -b[1],
  7526. width: a.dpDiv.outerWidth(),
  7527. height: a.dpDiv.outerHeight()
  7528. });
  7529. a.dpDiv.find("." + this._dayOverClass + " a").mouseover();
  7530. b = this._getNumberOfMonths(a);
  7531. c = b[1];
  7532. a.dpDiv.removeClass("ui-datepicker-multi-2 ui-datepicker-multi-3 ui-datepicker-multi-4").width("");
  7533. c > 1 && a.dpDiv.addClass("ui-datepicker-multi-" + c).css("width", 17 * c + "em");
  7534. a.dpDiv[(b[0] != 1 || b[1] != 1 ? "add" : "remove") + "Class"]("ui-datepicker-multi");
  7535. a.dpDiv[(this._get(a, "isRTL") ? "add" : "remove") + "Class"]("ui-datepicker-rtl");
  7536. a == d.datepicker._curInst && d.datepicker._datepickerShowing && a.input && a.input.is(":visible") && !a.input.is(":disabled") && a.input[0] != document.activeElement && a.input.focus();
  7537. if (a.yearshtml) {
  7538. var e = a.yearshtml;
  7539. setTimeout(function () {
  7540. e === a.yearshtml && a.yearshtml && a.dpDiv.find("select.ui-datepicker-year:first").replaceWith(a.yearshtml);
  7541. e = a.yearshtml = null
  7542. }, 0)
  7543. }
  7544. },
  7545. _getBorders: function (a) {
  7546. var b = function (c) {
  7547. return {
  7548. thin: 1,
  7549. medium: 2,
  7550. thick: 3
  7551. }[c] || c
  7552. };
  7553. return [parseFloat(b(a.css("border-left-width"))), parseFloat(b(a.css("border-top-width")))]
  7554. },
  7555. _checkOffset: function (a, b, c) {
  7556. var e = a.dpDiv.outerWidth(),
  7557. f = a.dpDiv.outerHeight(),
  7558. h = a.input ? a.input.outerWidth() : 0,
  7559. i = a.input ? a.input.outerHeight() : 0,
  7560. g = document.documentElement.clientWidth + d(document).scrollLeft(),
  7561. j = document.documentElement.clientHeight + d(document).scrollTop();
  7562. b.left -= this._get(a, "isRTL") ? e - h : 0;
  7563. b.left -= c && b.left == a.input.offset().left ? d(document).scrollLeft() : 0;
  7564. b.top -= c && b.top == a.input.offset().top + i ? d(document).scrollTop() : 0;
  7565. b.left -= Math.min(b.left, b.left + e > g && g > e ? Math.abs(b.left + e - g) : 0);
  7566. b.top -= Math.min(b.top, b.top + f > j && j > f ? Math.abs(f + i) : 0);
  7567. return b
  7568. },
  7569. _findPos: function (a) {
  7570. for (var b = this._get(this._getInst(a), "isRTL"); a && (a.type == "hidden" || a.nodeType != 1 || d.expr.filters.hidden(a));) a = a[b ? "previousSibling" : "nextSibling"];
  7571. a = d(a).offset();
  7572. return [a.left, a.top]
  7573. },
  7574. _triggerOnClose: function (a) {
  7575. var b = this._get(a, "onClose");
  7576. if (b) b.apply(a.input ? a.input[0] : null, [a.input ? a.input.val() : "", a])
  7577. },
  7578. _hideDatepicker: function (a) {
  7579. var b = this._curInst;
  7580. if (!(!b || a && b != d.data(a, "datepicker"))) if (this._datepickerShowing) {
  7581. a = this._get(b, "showAnim");
  7582. var c = this._get(b, "duration"),
  7583. e = function () {
  7584. d.datepicker._tidyDialog(b);
  7585. this._curInst = null
  7586. };
  7587. d.effects && d.effects[a] ? b.dpDiv.hide(a, d.datepicker._get(b, "showOptions"), c, e) : b.dpDiv[a == "slideDown" ? "slideUp" : a == "fadeIn" ? "fadeOut" : "hide"](a ? c : null, e);
  7588. a || e();
  7589. d.datepicker._triggerOnClose(b);
  7590. this._datepickerShowing = false;
  7591. this._lastInput = null;
  7592. if (this._inDialog) {
  7593. this._dialogInput.css({
  7594. position: "absolute",
  7595. left: "0",
  7596. top: "-100px"
  7597. });
  7598. if (d.blockUI) {
  7599. d.unblockUI();
  7600. d("body").append(this.dpDiv)
  7601. }
  7602. }
  7603. this._inDialog = false
  7604. }
  7605. },
  7606. _tidyDialog: function (a) {
  7607. a.dpDiv.removeClass(this._dialogClass).unbind(".ui-datepicker-calendar")
  7608. },
  7609. _checkExternalClick: function (a) {
  7610. if (d.datepicker._curInst) {
  7611. a = d(a.target);
  7612. a[0].id != d.datepicker._mainDivId && a.parents("#" + d.datepicker._mainDivId).length == 0 && !a.hasClass(d.datepicker.markerClassName) && !a.hasClass(d.datepicker._triggerClass) && d.datepicker._datepickerShowing && !(d.datepicker._inDialog && d.blockUI) && d.datepicker._hideDatepicker()
  7613. }
  7614. },
  7615. _adjustDate: function (a, b, c) {
  7616. a = d(a);
  7617. var e = this._getInst(a[0]);
  7618. if (!this._isDisabledDatepicker(a[0])) {
  7619. this._adjustInstDate(e, b + (c == "M" ? this._get(e, "showCurrentAtPos") : 0), c);
  7620. this._updateDatepicker(e)
  7621. }
  7622. },
  7623. _gotoToday: function (a) {
  7624. a = d(a);
  7625. var b = this._getInst(a[0]);
  7626. if (this._get(b, "gotoCurrent") && b.currentDay) {
  7627. b.selectedDay = b.currentDay;
  7628. b.drawMonth = b.selectedMonth = b.currentMonth;
  7629. b.drawYear = b.selectedYear = b.currentYear
  7630. } else {
  7631. var c = new Date;
  7632. b.selectedDay = c.getDate();
  7633. b.drawMonth = b.selectedMonth = c.getMonth();
  7634. b.drawYear = b.selectedYear = c.getFullYear()
  7635. }
  7636. this._notifyChange(b);
  7637. this._adjustDate(a)
  7638. },
  7639. _selectMonthYear: function (a, b, c) {
  7640. a = d(a);
  7641. var e = this._getInst(a[0]);
  7642. e["selected" + (c == "M" ? "Month" : "Year")] = e["draw" + (c == "M" ? "Month" : "Year")] = parseInt(b.options[b.selectedIndex].value, 10);
  7643. this._notifyChange(e);
  7644. this._adjustDate(a)
  7645. },
  7646. _selectDay: function (a, b, c, e) {
  7647. var f = d(a);
  7648. if (!(d(e).hasClass(this._unselectableClass) || this._isDisabledDatepicker(f[0]))) {
  7649. f = this._getInst(f[0]);
  7650. f.selectedDay = f.currentDay = d("a", e).html();
  7651. f.selectedMonth = f.currentMonth = b;
  7652. f.selectedYear = f.currentYear = c;
  7653. this._selectDate(a, this._formatDate(f, f.currentDay, f.currentMonth, f.currentYear))
  7654. }
  7655. },
  7656. _clearDate: function (a) {
  7657. a = d(a);
  7658. this._getInst(a[0]);
  7659. this._selectDate(a, "")
  7660. },
  7661. _selectDate: function (a, b) {
  7662. a = this._getInst(d(a)[0]);
  7663. b = b != null ? b : this._formatDate(a);
  7664. a.input && a.input.val(b);
  7665. this._updateAlternate(a);
  7666. var c = this._get(a, "onSelect");
  7667. if (c) c.apply(a.input ? a.input[0] : null, [b, a]);
  7668. else a.input && a.input.trigger("change");
  7669. if (a.inline) this._updateDatepicker(a);
  7670. else {
  7671. this._hideDatepicker();
  7672. this._lastInput = a.input[0];
  7673. typeof a.input[0] != "object" && a.input.focus();
  7674. this._lastInput = null
  7675. }
  7676. },
  7677. _updateAlternate: function (a) {
  7678. var b = this._get(a, "altField");
  7679. if (b) {
  7680. var c = this._get(a, "altFormat") || this._get(a, "dateFormat"),
  7681. e = this._getDate(a),
  7682. f = this.formatDate(c, e, this._getFormatConfig(a));
  7683. d(b).each(function () {
  7684. d(this).val(f)
  7685. })
  7686. }
  7687. },
  7688. noWeekends: function (a) {
  7689. a = a.getDay();
  7690. return [a > 0 && a < 6, ""]
  7691. },
  7692. iso8601Week: function (a) {
  7693. a = new Date(a.getTime());
  7694. a.setDate(a.getDate() + 4 - (a.getDay() || 7));
  7695. var b = a.getTime();
  7696. a.setMonth(0);
  7697. a.setDate(1);
  7698. return Math.floor(Math.round((b - a) / 864E5) / 7) + 1
  7699. },
  7700. parseDate: function (a, b, c) {
  7701. if (a == null || b == null) throw "Invalid arguments";
  7702. b = typeof b == "object" ? b.toString() : b + "";
  7703. if (b == "") return null;
  7704. var e = (c ? c.shortYearCutoff : null) || this._defaults.shortYearCutoff;
  7705. e = typeof e != "string" ? e : (new Date).getFullYear() % 100 + parseInt(e, 10);
  7706. for (var f = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort, h = (c ? c.dayNames : null) || this._defaults.dayNames, i = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort, g = (c ? c.monthNames : null) || this._defaults.monthNames, j = c = -1, l = -1, u = -1, k = false, o = function (p) {
  7707. (p = A + 1 < a.length && a.charAt(A + 1) == p) && A++;
  7708. return p
  7709. }, m = function (p) {
  7710. var D = o(p);
  7711. p = new RegExp("^\\d{1," + (p == "@" ? 14 : p == "!" ? 20 : p == "y" && D ? 4 : p == "o" ? 3 : 2) + "}");
  7712. p = b.substring(q).match(p);
  7713. if (!p) throw "Missing number at position " + q;
  7714. q += p[0].length;
  7715. return parseInt(p[0], 10)
  7716. }, n = function (p, D, K) {
  7717. p = d.map(o(p) ? K : D, function (w, x) {
  7718. return [[x, w]]
  7719. }).sort(function (w, x) {
  7720. return -(w[1].length - x[1].length)
  7721. });
  7722. var E = -1;
  7723. d.each(p, function (w, x) {
  7724. w = x[1];
  7725. if (b.substr(q, w.length).toLowerCase() == w.toLowerCase()) {
  7726. E = x[0];
  7727. q += w.length;
  7728. return false
  7729. }
  7730. });
  7731. if (E != -1) return E + 1;
  7732. else throw "Unknown name at position " + q;
  7733. }, s = function () {
  7734. if (b.charAt(q) != a.charAt(A)) throw "Unexpected literal at position " + q;
  7735. q++
  7736. }, q = 0, A = 0; A < a.length; A++) if (k) if (a.charAt(A) == "'" && !o("'")) k = false;
  7737. else s();
  7738. else switch (a.charAt(A)) {
  7739. case "d":
  7740. l = m("d");
  7741. break;
  7742. case "D":
  7743. n("D", f, h);
  7744. break;
  7745. case "o":
  7746. u = m("o");
  7747. break;
  7748. case "m":
  7749. j = m("m");
  7750. break;
  7751. case "M":
  7752. j = n("M", i, g);
  7753. break;
  7754. case "y":
  7755. c = m("y");
  7756. break;
  7757. case "@":
  7758. var v = new Date(m("@"));
  7759. c = v.getFullYear();
  7760. j = v.getMonth() + 1;
  7761. l = v.getDate();
  7762. break;
  7763. case "!":
  7764. v = new Date((m("!") - this._ticksTo1970) / 1E4);
  7765. c = v.getFullYear();
  7766. j = v.getMonth() + 1;
  7767. l = v.getDate();
  7768. break;
  7769. case "'":
  7770. if (o("'")) s();
  7771. else k = true;
  7772. break;
  7773. default:
  7774. s()
  7775. }
  7776. if (q < b.length) throw "Extra/unparsed characters found in date: " + b.substring(q);
  7777. if (c == -1) c = (new Date).getFullYear();
  7778. else if (c < 100) c += (new Date).getFullYear() - (new Date).getFullYear() % 100 + (c <= e ? 0 : -100);
  7779. if (u > -1) {
  7780. j = 1;
  7781. l = u;
  7782. do {
  7783. e = this._getDaysInMonth(c, j - 1);
  7784. if (l <= e) break;
  7785. j++;
  7786. l -= e
  7787. } while (1)
  7788. }
  7789. v = this._daylightSavingAdjust(new Date(c, j - 1, l));
  7790. if (v.getFullYear() != c || v.getMonth() + 1 != j || v.getDate() != l) throw "Invalid date";
  7791. return v
  7792. },
  7793. ATOM: "yy-mm-dd",
  7794. COOKIE: "D, dd M yy",
  7795. ISO_8601: "yy-mm-dd",
  7796. RFC_822: "D, d M y",
  7797. RFC_850: "DD, dd-M-y",
  7798. RFC_1036: "D, d M y",
  7799. RFC_1123: "D, d M yy",
  7800. RFC_2822: "D, d M yy",
  7801. RSS: "D, d M y",
  7802. TICKS: "!",
  7803. TIMESTAMP: "@",
  7804. W3C: "yy-mm-dd",
  7805. _ticksTo1970: (718685 + Math.floor(492.5) - Math.floor(19.7) + Math.floor(4.925)) * 24 * 60 * 60 * 1E7,
  7806. formatDate: function (a, b, c) {
  7807. if (!b) return "";
  7808. var e = (c ? c.dayNamesShort : null) || this._defaults.dayNamesShort,
  7809. f = (c ? c.dayNames : null) || this._defaults.dayNames,
  7810. h = (c ? c.monthNamesShort : null) || this._defaults.monthNamesShort;
  7811. c = (c ? c.monthNames : null) || this._defaults.monthNames;
  7812. var i = function (o) {
  7813. (o = k + 1 < a.length && a.charAt(k + 1) == o) && k++;
  7814. return o
  7815. }, g = function (o, m, n) {
  7816. m = "" + m;
  7817. if (i(o)) for (; m.length < n;) m = "0" + m;
  7818. return m
  7819. }, j = function (o, m, n, s) {
  7820. return i(o) ? s[m] : n[m]
  7821. }, l = "",
  7822. u = false;
  7823. if (b) for (var k = 0; k < a.length; k++) if (u) if (a.charAt(k) == "'" && !i("'")) u = false;
  7824. else l += a.charAt(k);
  7825. else switch (a.charAt(k)) {
  7826. case "d":
  7827. l += g("d", b.getDate(), 2);
  7828. break;
  7829. case "D":
  7830. l += j("D", b.getDay(), e, f);
  7831. break;
  7832. case "o":
  7833. l += g("o", Math.round(((new Date(b.getFullYear(), b.getMonth(), b.getDate())).getTime() - (new Date(b.getFullYear(), 0, 0)).getTime()) / 864E5), 3);
  7834. break;
  7835. case "m":
  7836. l += g("m", b.getMonth() + 1, 2);
  7837. break;
  7838. case "M":
  7839. l += j("M", b.getMonth(), h, c);
  7840. break;
  7841. case "y":
  7842. l += i("y") ? b.getFullYear() : (b.getYear() % 100 < 10 ? "0" : "") + b.getYear() % 100;
  7843. break;
  7844. case "@":
  7845. l += b.getTime();
  7846. break;
  7847. case "!":
  7848. l += b.getTime() * 1E4 + this._ticksTo1970;
  7849. break;
  7850. case "'":
  7851. if (i("'")) l += "'";
  7852. else u = true;
  7853. break;
  7854. default:
  7855. l += a.charAt(k)
  7856. }
  7857. return l
  7858. },
  7859. _possibleChars: function (a) {
  7860. for (var b = "", c = false, e = function (h) {
  7861. (h = f + 1 < a.length && a.charAt(f + 1) == h) && f++;
  7862. return h
  7863. }, f = 0; f < a.length; f++) if (c) if (a.charAt(f) == "'" && !e("'")) c = false;
  7864. else b += a.charAt(f);
  7865. else switch (a.charAt(f)) {
  7866. case "d":
  7867. case "m":
  7868. case "y":
  7869. case "@":
  7870. b += "0123456789";
  7871. break;
  7872. case "D":
  7873. case "M":
  7874. return null;
  7875. case "'":
  7876. if (e("'")) b += "'";
  7877. else c = true;
  7878. break;
  7879. default:
  7880. b += a.charAt(f)
  7881. }
  7882. return b
  7883. },
  7884. _get: function (a, b) {
  7885. return a.settings[b] !== C ? a.settings[b] : this._defaults[b]
  7886. },
  7887. _setDateFromField: function (a, b) {
  7888. if (a.input.val() != a.lastVal) {
  7889. var c = this._get(a, "dateFormat"),
  7890. e = a.lastVal = a.input ? a.input.val() : null,
  7891. f, h;
  7892. f = h = this._getDefaultDate(a);
  7893. var i = this._getFormatConfig(a);
  7894. try {
  7895. f = this.parseDate(c, e, i) || h
  7896. } catch (g) {
  7897. this.log(g);
  7898. e = b ? "" : e
  7899. }
  7900. a.selectedDay = f.getDate();
  7901. a.drawMonth = a.selectedMonth = f.getMonth();
  7902. a.drawYear = a.selectedYear = f.getFullYear();
  7903. a.currentDay = e ? f.getDate() : 0;
  7904. a.currentMonth = e ? f.getMonth() : 0;
  7905. a.currentYear = e ? f.getFullYear() : 0;
  7906. this._adjustInstDate(a)
  7907. }
  7908. },
  7909. _getDefaultDate: function (a) {
  7910. return this._restrictMinMax(a, this._determineDate(a, this._get(a, "defaultDate"), new Date))
  7911. },
  7912. _determineDate: function (a, b, c) {
  7913. var e = function (h) {
  7914. var i = new Date;
  7915. i.setDate(i.getDate() + h);
  7916. return i
  7917. }, f = function (h) {
  7918. try {
  7919. return d.datepicker.parseDate(d.datepicker._get(a, "dateFormat"), h, d.datepicker._getFormatConfig(a))
  7920. } catch (i) {}
  7921. var g = (h.toLowerCase().match(/^c/) ? d.datepicker._getDate(a) : null) || new Date,
  7922. j = g.getFullYear(),
  7923. l = g.getMonth();
  7924. g = g.getDate();
  7925. for (var u = /([+-]?[0-9]+)\s*(d|D|w|W|m|M|y|Y)?/g, k = u.exec(h); k;) {
  7926. switch (k[2] || "d") {
  7927. case "d":
  7928. case "D":
  7929. g += parseInt(k[1], 10);
  7930. break;
  7931. case "w":
  7932. case "W":
  7933. g += parseInt(k[1], 10) * 7;
  7934. break;
  7935. case "m":
  7936. case "M":
  7937. l += parseInt(k[1], 10);
  7938. g = Math.min(g, d.datepicker._getDaysInMonth(j, l));
  7939. break;
  7940. case "y":
  7941. case "Y":
  7942. j += parseInt(k[1], 10);
  7943. g = Math.min(g, d.datepicker._getDaysInMonth(j, l));
  7944. break
  7945. }
  7946. k = u.exec(h)
  7947. }
  7948. return new Date(j, l, g)
  7949. };
  7950. if (b = (b = b == null || b === "" ? c : typeof b == "string" ? f(b) : typeof b == "number" ? isNaN(b) ? c : e(b) : new Date(b.getTime())) && b.toString() == "Invalid Date" ? c : b) {
  7951. b.setHours(0);
  7952. b.setMinutes(0);
  7953. b.setSeconds(0);
  7954. b.setMilliseconds(0)
  7955. }
  7956. return this._daylightSavingAdjust(b)
  7957. },
  7958. _daylightSavingAdjust: function (a) {
  7959. if (!a) return null;
  7960. a.setHours(a.getHours() > 12 ? a.getHours() + 2 : 0);
  7961. return a
  7962. },
  7963. _setDate: function (a, b, c) {
  7964. var e = !b,
  7965. f = a.selectedMonth,
  7966. h = a.selectedYear;
  7967. b = this._restrictMinMax(a, this._determineDate(a, b, new Date));
  7968. a.selectedDay = a.currentDay = b.getDate();
  7969. a.drawMonth = a.selectedMonth = a.currentMonth = b.getMonth();
  7970. a.drawYear = a.selectedYear = a.currentYear = b.getFullYear();
  7971. if ((f != a.selectedMonth || h != a.selectedYear) && !c) this._notifyChange(a);
  7972. this._adjustInstDate(a);
  7973. if (a.input) a.input.val(e ? "" : this._formatDate(a))
  7974. },
  7975. _getDate: function (a) {
  7976. return !a.currentYear || a.input && a.input.val() == "" ? null : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay))
  7977. },
  7978. _generateHTML: function (a) {
  7979. var b = new Date;
  7980. b = this._daylightSavingAdjust(new Date(b.getFullYear(), b.getMonth(), b.getDate()));
  7981. var c = this._get(a, "isRTL"),
  7982. e = this._get(a, "showButtonPanel"),
  7983. f = this._get(a, "hideIfNoPrevNext"),
  7984. h = this._get(a, "navigationAsDateFormat"),
  7985. i = this._getNumberOfMonths(a),
  7986. g = this._get(a, "showCurrentAtPos"),
  7987. j = this._get(a, "stepMonths"),
  7988. l = i[0] != 1 || i[1] != 1,
  7989. u = this._daylightSavingAdjust(!a.currentDay ? new Date(9999, 9, 9) : new Date(a.currentYear, a.currentMonth, a.currentDay)),
  7990. k = this._getMinMaxDate(a, "min"),
  7991. o = this._getMinMaxDate(a, "max");
  7992. g = a.drawMonth - g;
  7993. var m = a.drawYear;
  7994. if (g < 0) {
  7995. g += 12;
  7996. m--
  7997. }
  7998. if (o) {
  7999. var n = this._daylightSavingAdjust(new Date(o.getFullYear(), o.getMonth() - i[0] * i[1] + 1, o.getDate()));
  8000. for (n = k && n < k ? k : n; this._daylightSavingAdjust(new Date(m, g, 1)) > n;) {
  8001. g--;
  8002. if (g < 0) {
  8003. g = 11;
  8004. m--
  8005. }
  8006. }
  8007. }
  8008. a.drawMonth = g;
  8009. a.drawYear = m;
  8010. n = this._get(a, "prevText");
  8011. n = !h ? n : this.formatDate(n, this._daylightSavingAdjust(new Date(m, g - j, 1)), this._getFormatConfig(a));
  8012. n = this._canAdjustMonth(a, - 1, m, g) ? '<a class="ui-datepicker-prev ui-corner-all" onclick="DP_jQuery_' + B + ".datepicker._adjustDate('#" + a.id + "', -" + j + ", 'M');\" title=\"" + n + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e" : "w") + '">' + n + "</span></a>" : f ? "" : '<a class="ui-datepicker-prev ui-corner-all ui-state-disabled" title="' + n + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "e" : "w") + '">' + n + "</span></a>";
  8013. var s = this._get(a, "nextText");
  8014. s = !h ? s : this.formatDate(s, this._daylightSavingAdjust(new Date(m, g + j, 1)), this._getFormatConfig(a));
  8015. f = this._canAdjustMonth(a, + 1, m, g) ? '<a class="ui-datepicker-next ui-corner-all" onclick="DP_jQuery_' + B + ".datepicker._adjustDate('#" + a.id + "', +" + j + ", 'M');\" title=\"" + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w" : "e") + '">' + s + "</span></a>" : f ? "" : '<a class="ui-datepicker-next ui-corner-all ui-state-disabled" title="' + s + '"><span class="ui-icon ui-icon-circle-triangle-' + (c ? "w" : "e") + '">' + s + "</span></a>";
  8016. j = this._get(a, "currentText");
  8017. s = this._get(a, "gotoCurrent") && a.currentDay ? u : b;
  8018. j = !h ? j : this.formatDate(j, s, this._getFormatConfig(a));
  8019. h = !a.inline ? '<button type="button" class="ui-datepicker-close ui-state-default ui-priority-primary ui-corner-all" onclick="DP_jQuery_' + B + '.datepicker._hideDatepicker();">' + this._get(a, "closeText") + "</button>" : "";
  8020. e = e ? '<div class="ui-datepicker-buttonpane ui-widget-content">' + (c ? h : "") + (this._isInRange(a, s) ? '<button type="button" class="ui-datepicker-current ui-state-default ui-priority-secondary ui-corner-all" onclick="DP_jQuery_' + B + ".datepicker._gotoToday('#" + a.id + "');\">" + j + "</button>" : "") + (c ? "" : h) + "</div>" : "";
  8021. h = parseInt(this._get(a, "firstDay"), 10);
  8022. h = isNaN(h) ? 0 : h;
  8023. j = this._get(a, "showWeek");
  8024. s = this._get(a, "dayNames");
  8025. this._get(a, "dayNamesShort");
  8026. var q = this._get(a, "dayNamesMin"),
  8027. A = this._get(a, "monthNames"),
  8028. v = this._get(a, "monthNamesShort"),
  8029. p = this._get(a, "beforeShowDay"),
  8030. D = this._get(a, "showOtherMonths"),
  8031. K = this._get(a, "selectOtherMonths");
  8032. this._get(a, "calculateWeek");
  8033. for (var E = this._getDefaultDate(a), w = "", x = 0; x < i[0]; x++) {
  8034. var O = "";
  8035. this.maxRows = 4;
  8036. for (var G = 0; G < i[1]; G++) {
  8037. var P = this._daylightSavingAdjust(new Date(m, g, a.selectedDay)),
  8038. t = " ui-corner-all",
  8039. y = "";
  8040. if (l) {
  8041. y += '<div class="ui-datepicker-group';
  8042. if (i[1] > 1) switch (G) {
  8043. case 0:
  8044. y += " ui-datepicker-group-first";
  8045. t = " ui-corner-" + (c ? "right" : "left");
  8046. break;
  8047. case i[1] - 1:
  8048. y += " ui-datepicker-group-last";
  8049. t = " ui-corner-" + (c ? "left" : "right");
  8050. break;
  8051. default:
  8052. y += " ui-datepicker-group-middle";
  8053. t = "";
  8054. break
  8055. }
  8056. y += '">'
  8057. }
  8058. y += '<div class="ui-datepicker-header ui-widget-header ui-helper-clearfix' + t + '">' + (/all|left/.test(t) && x == 0 ? c ? f : n : "") + (/all|right/.test(t) && x == 0 ? c ? n : f : "") + this._generateMonthYearHeader(a, g, m, k, o, x > 0 || G > 0, A, v) + '</div><table class="ui-datepicker-calendar"><thead><tr>';
  8059. var z = j ? '<th class="ui-datepicker-week-col">' + this._get(a, "weekHeader") + "</th>" : "";
  8060. for (t = 0; t < 7; t++) {
  8061. var r = (t + h) % 7;
  8062. z += "<th" + ((t + h + 6) % 7 >= 5 ? ' class="ui-datepicker-week-end"' : "") + '><span title="' + s[r] + '">' + q[r] + "</span></th>"
  8063. }
  8064. y += z + "</tr></thead><tbody>";
  8065. z = this._getDaysInMonth(m, g);
  8066. if (m == a.selectedYear && g == a.selectedMonth) a.selectedDay = Math.min(a.selectedDay, z);
  8067. t = (this._getFirstDayOfMonth(m, g) - h + 7) % 7;
  8068. z = Math.ceil((t + z) / 7);
  8069. this.maxRows = z = l ? this.maxRows > z ? this.maxRows : z : z;
  8070. r = this._daylightSavingAdjust(new Date(m, g, 1 - t));
  8071. for (var Q = 0; Q < z; Q++) {
  8072. y += "<tr>";
  8073. var R = !j ? "" : '<td class="ui-datepicker-week-col">' + this._get(a, "calculateWeek")(r) + "</td>";
  8074. for (t = 0; t < 7; t++) {
  8075. var I = p ? p.apply(a.input ? a.input[0] : null, [r]) : [true, ""],
  8076. F = r.getMonth() != g,
  8077. L = F && !K || !I[0] || k && r < k || o && r > o;
  8078. R += '<td class="' + ((t + h + 6) % 7 >= 5 ? " ui-datepicker-week-end" : "") + (F ? " ui-datepicker-other-month" : "") + (r.getTime() == P.getTime() && g == a.selectedMonth && a._keyEvent || E.getTime() == r.getTime() && E.getTime() == P.getTime() ? " " + this._dayOverClass : "") + (L ? " " + this._unselectableClass + " ui-state-disabled" : "") + (F && !D ? "" : " " + I[1] + (r.getTime() == u.getTime() ? " " + this._currentClass : "") + (r.getTime() == b.getTime() ? " ui-datepicker-today" : "")) + '"' + ((!F || D) && I[2] ? ' title="' + I[2] + '"' : "") + (L ? "" : ' onclick="DP_jQuery_' + B + ".datepicker._selectDay('#" + a.id + "'," + r.getMonth() + "," + r.getFullYear() + ', this);return false;"') + ">" + (F && !D ? "&#xa0;" : L ? '<span class="ui-state-default">' + r.getDate() + "</span>" : '<a class="ui-state-default' + (r.getTime() == b.getTime() ? " ui-state-highlight" : "") + (r.getTime() == u.getTime() ? " ui-state-active" : "") + (F ? " ui-priority-secondary" : "") + '" href="#">' + r.getDate() + "</a>") + "</td>";
  8079. r.setDate(r.getDate() + 1);
  8080. r = this._daylightSavingAdjust(r)
  8081. }
  8082. y += R + "</tr>"
  8083. }
  8084. g++;
  8085. if (g > 11) {
  8086. g = 0;
  8087. m++
  8088. }
  8089. y += "</tbody></table>" + (l ? "</div>" + (i[0] > 0 && G == i[1] - 1 ? '<div class="ui-datepicker-row-break"></div>' : "") : "");
  8090. O += y
  8091. }
  8092. w += O
  8093. }
  8094. w += e + (d.browser.msie && parseInt(d.browser.version, 10) < 7 && !a.inline ? '<iframe src="javascript:false;" class="ui-datepicker-cover" frameborder="0"></iframe>' : "");
  8095. a._keyEvent = false;
  8096. return w
  8097. },
  8098. _generateMonthYearHeader: function (a, b, c, e, f, h, i, g) {
  8099. var j = this._get(a, "changeMonth"),
  8100. l = this._get(a, "changeYear"),
  8101. u = this._get(a, "showMonthAfterYear"),
  8102. k = '<div class="ui-datepicker-title">',
  8103. o = "";
  8104. if (h || !j) o += '<span class="ui-datepicker-month">' + i[b] + "</span>";
  8105. else {
  8106. i = e && e.getFullYear() == c;
  8107. var m = f && f.getFullYear() == c;
  8108. o += '<select class="ui-datepicker-month" onchange="DP_jQuery_' + B + ".datepicker._selectMonthYear('#" + a.id + "', this, 'M');\" >";
  8109. for (var n = 0; n < 12; n++) if ((!i || n >= e.getMonth()) && (!m || n <= f.getMonth())) o += '<option value="' + n + '"' + (n == b ? ' selected="selected"' : "") + ">" + g[n] + "</option>";
  8110. o += "</select>"
  8111. }
  8112. u || (k += o + (h || !(j && l) ? "&#xa0;" : ""));
  8113. if (!a.yearshtml) {
  8114. a.yearshtml = "";
  8115. if (h || !l) k += '<span class="ui-datepicker-year">' + c + "</span>";
  8116. else {
  8117. g = this._get(a, "yearRange").split(":");
  8118. var s = (new Date).getFullYear();
  8119. i = function (q) {
  8120. q = q.match(/c[+-].*/) ? c + parseInt(q.substring(1), 10) : q.match(/[+-].*/) ? s + parseInt(q, 10) : parseInt(q, 10);
  8121. return isNaN(q) ? s : q
  8122. };
  8123. b = i(g[0]);
  8124. g = Math.max(b, i(g[1] || ""));
  8125. b = e ? Math.max(b, e.getFullYear()) : b;
  8126. g = f ? Math.min(g, f.getFullYear()) : g;
  8127. for (a.yearshtml += '<select class="ui-datepicker-year" onchange="DP_jQuery_' + B + ".datepicker._selectMonthYear('#" + a.id + "', this, 'Y');\" >"; b <= g; b++) a.yearshtml += '<option value="' + b + '"' + (b == c ? ' selected="selected"' : "") + ">" + b + "</option>";
  8128. a.yearshtml += "</select>";
  8129. k += a.yearshtml;
  8130. a.yearshtml = null
  8131. }
  8132. }
  8133. k += this._get(a, "yearSuffix");
  8134. if (u) k += (h || !(j && l) ? "&#xa0;" : "") + o;
  8135. k += "</div>";
  8136. return k
  8137. },
  8138. _adjustInstDate: function (a, b, c) {
  8139. var e = a.drawYear + (c == "Y" ? b : 0),
  8140. f = a.drawMonth + (c == "M" ? b : 0);
  8141. b = Math.min(a.selectedDay, this._getDaysInMonth(e, f)) + (c == "D" ? b : 0);
  8142. e = this._restrictMinMax(a, this._daylightSavingAdjust(new Date(e, f, b)));
  8143. a.selectedDay = e.getDate();
  8144. a.drawMonth = a.selectedMonth = e.getMonth();
  8145. a.drawYear = a.selectedYear = e.getFullYear();
  8146. if (c == "M" || c == "Y") this._notifyChange(a)
  8147. },
  8148. _restrictMinMax: function (a, b) {
  8149. var c = this._getMinMaxDate(a, "min");
  8150. a = this._getMinMaxDate(a, "max");
  8151. b = c && b < c ? c : b;
  8152. return b = a && b > a ? a : b
  8153. },
  8154. _notifyChange: function (a) {
  8155. var b = this._get(a, "onChangeMonthYear");
  8156. if (b) b.apply(a.input ? a.input[0] : null, [a.selectedYear, a.selectedMonth + 1, a])
  8157. },
  8158. _getNumberOfMonths: function (a) {
  8159. a = this._get(a, "numberOfMonths");
  8160. return a == null ? [1, 1] : typeof a == "number" ? [1, a] : a
  8161. },
  8162. _getMinMaxDate: function (a, b) {
  8163. return this._determineDate(a, this._get(a, b + "Date"), null)
  8164. },
  8165. _getDaysInMonth: function (a, b) {
  8166. return 32 - this._daylightSavingAdjust(new Date(a, b, 32)).getDate()
  8167. },
  8168. _getFirstDayOfMonth: function (a, b) {
  8169. return (new Date(a, b, 1)).getDay()
  8170. },
  8171. _canAdjustMonth: function (a, b, c, e) {
  8172. var f = this._getNumberOfMonths(a);
  8173. c = this._daylightSavingAdjust(new Date(c, e + (b < 0 ? b : f[0] * f[1]), 1));
  8174. b < 0 && c.setDate(this._getDaysInMonth(c.getFullYear(), c.getMonth()));
  8175. return this._isInRange(a, c)
  8176. },
  8177. _isInRange: function (a, b) {
  8178. var c = this._getMinMaxDate(a, "min");
  8179. a = this._getMinMaxDate(a, "max");
  8180. return (!c || b.getTime() >= c.getTime()) && (!a || b.getTime() <= a.getTime())
  8181. },
  8182. _getFormatConfig: function (a) {
  8183. var b = this._get(a, "shortYearCutoff");
  8184. b = typeof b != "string" ? b : (new Date).getFullYear() % 100 + parseInt(b, 10);
  8185. return {
  8186. shortYearCutoff: b,
  8187. dayNamesShort: this._get(a, "dayNamesShort"),
  8188. dayNames: this._get(a, "dayNames"),
  8189. monthNamesShort: this._get(a, "monthNamesShort"),
  8190. monthNames: this._get(a, "monthNames")
  8191. }
  8192. },
  8193. _formatDate: function (a, b, c, e) {
  8194. if (!b) {
  8195. a.currentDay = a.selectedDay;
  8196. a.currentMonth = a.selectedMonth;
  8197. a.currentYear = a.selectedYear
  8198. }
  8199. b = b ? typeof b == "object" ? b : this._daylightSavingAdjust(new Date(e, c, b)) : this._daylightSavingAdjust(new Date(a.currentYear, a.currentMonth, a.currentDay));
  8200. return this.formatDate(this._get(a, "dateFormat"), b, this._getFormatConfig(a))
  8201. }
  8202. });
  8203. d.fn.datepicker = function (a) {
  8204. if (!this.length) return this;
  8205. if (!d.datepicker.initialized) {
  8206. d(document).mousedown(d.datepicker._checkExternalClick).find("body").append(d.datepicker.dpDiv);
  8207. d.datepicker.initialized = true
  8208. }
  8209. var b = Array.prototype.slice.call(arguments, 1);
  8210. if (typeof a == "string" && (a == "isDisabled" || a == "getDate" || a == "widget")) return d.datepicker["_" + a + "Datepicker"].apply(d.datepicker, [this[0]].concat(b));
  8211. if (a == "option" && arguments.length == 2 && typeof arguments[1] == "string") return d.datepicker["_" + a + "Datepicker"].apply(d.datepicker, [this[0]].concat(b));
  8212. return this.each(function () {
  8213. typeof a == "string" ? d.datepicker["_" + a + "Datepicker"].apply(d.datepicker, [this].concat(b)) : d.datepicker._attachDatepicker(this, a)
  8214. })
  8215. };
  8216. d.datepicker = new M;
  8217. d.datepicker.initialized = false;
  8218. d.datepicker.uuid = (new Date).getTime();
  8219. d.datepicker.version = "1.8.16";
  8220. window["DP_jQuery_" + B] = d
  8221. })(jQuery);;
  8222. jQuery.effects || function (f, j) {
  8223. function m(c) {
  8224. var a;
  8225. if (c && c.constructor == Array && c.length == 3) return c;
  8226. if (a = /rgb\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*\)/.exec(c)) return [parseInt(a[1], 10), parseInt(a[2], 10), parseInt(a[3], 10)];
  8227. if (a = /rgb\(\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*,\s*([0-9]+(?:\.[0-9]+)?)\%\s*\)/.exec(c)) return [parseFloat(a[1]) * 2.55, parseFloat(a[2]) * 2.55, parseFloat(a[3]) * 2.55];
  8228. if (a = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(c)) return [parseInt(a[1], 16), parseInt(a[2], 16), parseInt(a[3], 16)];
  8229. if (a = /#([a-fA-F0-9])([a-fA-F0-9])([a-fA-F0-9])/.exec(c)) return [parseInt(a[1] + a[1], 16), parseInt(a[2] + a[2], 16), parseInt(a[3] + a[3], 16)];
  8230. if (/rgba\(0, 0, 0, 0\)/.exec(c)) return n.transparent;
  8231. return n[f.trim(c).toLowerCase()]
  8232. }
  8233. function s(c, a) {
  8234. var b;
  8235. do {
  8236. b = f.curCSS(c, a);
  8237. if (b != "" && b != "transparent" || f.nodeName(c, "body")) break;
  8238. a = "backgroundColor"
  8239. } while (c = c.parentNode);
  8240. return m(b)
  8241. }
  8242. function o() {
  8243. var c = document.defaultView ? document.defaultView.getComputedStyle(this, null) : this.currentStyle,
  8244. a = {}, b, d;
  8245. if (c && c.length && c[0] && c[c[0]]) for (var e = c.length; e--;) {
  8246. b = c[e];
  8247. if (typeof c[b] == "string") {
  8248. d = b.replace(/\-(\w)/g, function (g, h) {
  8249. return h.toUpperCase()
  8250. });
  8251. a[d] = c[b]
  8252. }
  8253. } else for (b in c) if (typeof c[b] === "string") a[b] = c[b];
  8254. return a
  8255. }
  8256. function p(c) {
  8257. var a, b;
  8258. for (a in c) {
  8259. b = c[a];
  8260. if (b == null || f.isFunction(b) || a in t || /scrollbar/.test(a) || !/color/i.test(a) && isNaN(parseFloat(b))) delete c[a]
  8261. }
  8262. return c
  8263. }
  8264. function u(c, a) {
  8265. var b = {
  8266. _: 0
  8267. }, d;
  8268. for (d in a) if (c[d] != a[d]) b[d] = a[d];
  8269. return b
  8270. }
  8271. function k(c, a, b, d) {
  8272. if (typeof c == "object") {
  8273. d = a;
  8274. b = null;
  8275. a = c;
  8276. c = a.effect
  8277. }
  8278. if (f.isFunction(a)) {
  8279. d = a;
  8280. b = null;
  8281. a = {}
  8282. }
  8283. if (typeof a == "number" || f.fx.speeds[a]) {
  8284. d = b;
  8285. b = a;
  8286. a = {}
  8287. }
  8288. if (f.isFunction(b)) {
  8289. d = b;
  8290. b = null
  8291. }
  8292. a = a || {};
  8293. b = b || a.duration;
  8294. b = f.fx.off ? 0 : typeof b == "number" ? b : b in f.fx.speeds ? f.fx.speeds[b] : f.fx.speeds._default;
  8295. d = d || a.complete;
  8296. return [c, a, b, d]
  8297. }
  8298. function l(c) {
  8299. if (!c || typeof c === "number" || f.fx.speeds[c]) return true;
  8300. if (typeof c === "string" && !f.effects[c]) return true;
  8301. return false
  8302. }
  8303. f.effects = {};
  8304. f.each(["backgroundColor", "borderBottomColor", "borderLeftColor", "borderRightColor", "borderTopColor", "borderColor", "color", "outlineColor"], function (c, a) {
  8305. f.fx.step[a] = function (b) {
  8306. if (!b.colorInit) {
  8307. b.start = s(b.elem, a);
  8308. b.end = m(b.end);
  8309. b.colorInit = true
  8310. }
  8311. b.elem.style[a] = "rgb(" + Math.max(Math.min(parseInt(b.pos * (b.end[0] - b.start[0]) + b.start[0], 10), 255), 0) + "," + Math.max(Math.min(parseInt(b.pos * (b.end[1] - b.start[1]) + b.start[1], 10), 255), 0) + "," + Math.max(Math.min(parseInt(b.pos * (b.end[2] - b.start[2]) + b.start[2], 10), 255), 0) + ")"
  8312. }
  8313. });
  8314. var n = {
  8315. aqua: [0, 255, 255],
  8316. azure: [240, 255, 255],
  8317. beige: [245, 245, 220],
  8318. black: [0, 0, 0],
  8319. blue: [0, 0, 255],
  8320. brown: [165, 42, 42],
  8321. cyan: [0, 255, 255],
  8322. darkblue: [0, 0, 139],
  8323. darkcyan: [0, 139, 139],
  8324. darkgrey: [169, 169, 169],
  8325. darkgreen: [0, 100, 0],
  8326. darkkhaki: [189, 183, 107],
  8327. darkmagenta: [139, 0, 139],
  8328. darkolivegreen: [85, 107, 47],
  8329. darkorange: [255, 140, 0],
  8330. darkorchid: [153, 50, 204],
  8331. darkred: [139, 0, 0],
  8332. darksalmon: [233, 150, 122],
  8333. darkviolet: [148, 0, 211],
  8334. fuchsia: [255, 0, 255],
  8335. gold: [255, 215, 0],
  8336. green: [0, 128, 0],
  8337. indigo: [75, 0, 130],
  8338. khaki: [240, 230, 140],
  8339. lightblue: [173, 216, 230],
  8340. lightcyan: [224, 255, 255],
  8341. lightgreen: [144, 238, 144],
  8342. lightgrey: [211, 211, 211],
  8343. lightpink: [255, 182, 193],
  8344. lightyellow: [255, 255, 224],
  8345. lime: [0, 255, 0],
  8346. magenta: [255, 0, 255],
  8347. maroon: [128, 0, 0],
  8348. navy: [0, 0, 128],
  8349. olive: [128, 128, 0],
  8350. orange: [255, 165, 0],
  8351. pink: [255, 192, 203],
  8352. purple: [128, 0, 128],
  8353. violet: [128, 0, 128],
  8354. red: [255, 0, 0],
  8355. silver: [192, 192, 192],
  8356. white: [255, 255, 255],
  8357. yellow: [255, 255, 0],
  8358. transparent: [255, 255, 255]
  8359. }, q = ["add", "remove", "toggle"],
  8360. t = {
  8361. border: 1,
  8362. borderBottom: 1,
  8363. borderColor: 1,
  8364. borderLeft: 1,
  8365. borderRight: 1,
  8366. borderTop: 1,
  8367. borderWidth: 1,
  8368. margin: 1,
  8369. padding: 1
  8370. };
  8371. f.effects.animateClass = function (c, a, b, d) {
  8372. if (f.isFunction(b)) {
  8373. d = b;
  8374. b = null
  8375. }
  8376. return this.queue(function () {
  8377. var e = f(this),
  8378. g = e.attr("style") || " ",
  8379. h = p(o.call(this)),
  8380. r, v = e.attr("class");
  8381. f.each(q, function (w, i) {
  8382. c[i] && e[i + "Class"](c[i])
  8383. });
  8384. r = p(o.call(this));
  8385. e.attr("class", v);
  8386. e.animate(u(h, r), {
  8387. queue: false,
  8388. duration: a,
  8389. easing: b,
  8390. complete: function () {
  8391. f.each(q, function (w, i) {
  8392. c[i] && e[i + "Class"](c[i])
  8393. });
  8394. if (typeof e.attr("style") == "object") {
  8395. e.attr("style").cssText = "";
  8396. e.attr("style").cssText = g
  8397. } else e.attr("style", g);
  8398. d && d.apply(this, arguments);
  8399. f.dequeue(this)
  8400. }
  8401. })
  8402. })
  8403. };
  8404. f.fn.extend({
  8405. _addClass: f.fn.addClass,
  8406. addClass: function (c, a, b, d) {
  8407. return a ? f.effects.animateClass.apply(this, [{
  8408. add: c
  8409. },
  8410. a, b, d]) : this._addClass(c)
  8411. },
  8412. _removeClass: f.fn.removeClass,
  8413. removeClass: function (c, a, b, d) {
  8414. return a ? f.effects.animateClass.apply(this, [{
  8415. remove: c
  8416. },
  8417. a, b, d]) : this._removeClass(c)
  8418. },
  8419. _toggleClass: f.fn.toggleClass,
  8420. toggleClass: function (c, a, b, d, e) {
  8421. return typeof a == "boolean" || a === j ? b ? f.effects.animateClass.apply(this, [a ? {
  8422. add: c
  8423. } : {
  8424. remove: c
  8425. },
  8426. b, d, e]) : this._toggleClass(c, a) : f.effects.animateClass.apply(this, [{
  8427. toggle: c
  8428. },
  8429. a, b, d])
  8430. },
  8431. switchClass: function (c, a, b, d, e) {
  8432. return f.effects.animateClass.apply(this, [{
  8433. add: a,
  8434. remove: c
  8435. },
  8436. b, d, e])
  8437. }
  8438. });
  8439. f.extend(f.effects, {
  8440. version: "1.8.16",
  8441. save: function (c, a) {
  8442. for (var b = 0; b < a.length; b++) a[b] !== null && c.data("ec.storage." + a[b], c[0].style[a[b]])
  8443. },
  8444. restore: function (c, a) {
  8445. for (var b = 0; b < a.length; b++) a[b] !== null && c.css(a[b], c.data("ec.storage." + a[b]))
  8446. },
  8447. setMode: function (c, a) {
  8448. if (a == "toggle") a = c.is(":hidden") ? "show" : "hide";
  8449. return a
  8450. },
  8451. getBaseline: function (c, a) {
  8452. var b;
  8453. switch (c[0]) {
  8454. case "top":
  8455. b = 0;
  8456. break;
  8457. case "middle":
  8458. b = 0.5;
  8459. break;
  8460. case "bottom":
  8461. b = 1;
  8462. break;
  8463. default:
  8464. b = c[0] / a.height
  8465. }
  8466. switch (c[1]) {
  8467. case "left":
  8468. c = 0;
  8469. break;
  8470. case "center":
  8471. c = 0.5;
  8472. break;
  8473. case "right":
  8474. c = 1;
  8475. break;
  8476. default:
  8477. c = c[1] / a.width
  8478. }
  8479. return {
  8480. x: c,
  8481. y: b
  8482. }
  8483. },
  8484. createWrapper: function (c) {
  8485. if (c.parent().is(".ui-effects-wrapper")) return c.parent();
  8486. var a = {
  8487. width: c.outerWidth(true),
  8488. height: c.outerHeight(true),
  8489. "float": c.css("float")
  8490. }, b = f("<div></div>").addClass("ui-effects-wrapper").css({
  8491. fontSize: "100%",
  8492. background: "transparent",
  8493. border: "none",
  8494. margin: 0,
  8495. padding: 0
  8496. }),
  8497. d = document.activeElement;
  8498. c.wrap(b);
  8499. if (c[0] === d || f.contains(c[0], d)) f(d).focus();
  8500. b = c.parent();
  8501. if (c.css("position") == "static") {
  8502. b.css({
  8503. position: "relative"
  8504. });
  8505. c.css({
  8506. position: "relative"
  8507. })
  8508. } else {
  8509. f.extend(a, {
  8510. position: c.css("position"),
  8511. zIndex: c.css("z-index")
  8512. });
  8513. f.each(["top", "left", "bottom", "right"], function (e, g) {
  8514. a[g] = c.css(g);
  8515. if (isNaN(parseInt(a[g], 10))) a[g] = "auto"
  8516. });
  8517. c.css({
  8518. position: "relative",
  8519. top: 0,
  8520. left: 0,
  8521. right: "auto",
  8522. bottom: "auto"
  8523. })
  8524. }
  8525. return b.css(a).show()
  8526. },
  8527. removeWrapper: function (c) {
  8528. var a, b = document.activeElement;
  8529. if (c.parent().is(".ui-effects-wrapper")) {
  8530. a = c.parent().replaceWith(c);
  8531. if (c[0] === b || f.contains(c[0], b)) f(b).focus();
  8532. return a
  8533. }
  8534. return c
  8535. },
  8536. setTransition: function (c, a, b, d) {
  8537. d = d || {};
  8538. f.each(a, function (e, g) {
  8539. unit = c.cssUnit(g);
  8540. if (unit[0] > 0) d[g] = unit[0] * b + unit[1]
  8541. });
  8542. return d
  8543. }
  8544. });
  8545. f.fn.extend({
  8546. effect: function (c) {
  8547. var a = k.apply(this, arguments),
  8548. b = {
  8549. options: a[1],
  8550. duration: a[2],
  8551. callback: a[3]
  8552. };
  8553. a = b.options.mode;
  8554. var d = f.effects[c];
  8555. if (f.fx.off || !d) return a ? this[a](b.duration, b.callback) : this.each(function () {
  8556. b.callback && b.callback.call(this)
  8557. });
  8558. return d.call(this, b)
  8559. },
  8560. _show: f.fn.show,
  8561. show: function (c) {
  8562. if (l(c)) return this._show.apply(this, arguments);
  8563. else {
  8564. var a = k.apply(this, arguments);
  8565. a[1].mode = "show";
  8566. return this.effect.apply(this, a)
  8567. }
  8568. },
  8569. _hide: f.fn.hide,
  8570. hide: function (c) {
  8571. if (l(c)) return this._hide.apply(this, arguments);
  8572. else {
  8573. var a = k.apply(this, arguments);
  8574. a[1].mode = "hide";
  8575. return this.effect.apply(this, a)
  8576. }
  8577. },
  8578. __toggle: f.fn.toggle,
  8579. toggle: function (c) {
  8580. if (l(c) || typeof c === "boolean" || f.isFunction(c)) return this.__toggle.apply(this, arguments);
  8581. else {
  8582. var a = k.apply(this, arguments);
  8583. a[1].mode = "toggle";
  8584. return this.effect.apply(this, a)
  8585. }
  8586. },
  8587. cssUnit: function (c) {
  8588. var a = this.css(c),
  8589. b = [];
  8590. f.each(["em", "px", "%", "pt"], function (d, e) {
  8591. if (a.indexOf(e) > 0) b = [parseFloat(a), e]
  8592. });
  8593. return b
  8594. }
  8595. });
  8596. f.easing.jswing = f.easing.swing;
  8597. f.extend(f.easing, {
  8598. def: "easeOutQuad",
  8599. swing: function (c, a, b, d, e) {
  8600. return f.easing[f.easing.def](c, a, b, d, e)
  8601. },
  8602. easeInQuad: function (c, a, b, d, e) {
  8603. return d * (a /= e) * a + b
  8604. },
  8605. easeOutQuad: function (c, a, b, d, e) {
  8606. return -d * (a /= e) * (a - 2) + b
  8607. },
  8608. easeInOutQuad: function (c, a, b, d, e) {
  8609. if ((a /= e / 2) < 1) return d / 2 * a * a + b;
  8610. return -d / 2 * (--a * (a - 2) - 1) + b
  8611. },
  8612. easeInCubic: function (c, a, b, d, e) {
  8613. return d * (a /= e) * a * a + b
  8614. },
  8615. easeOutCubic: function (c, a, b, d, e) {
  8616. return d * ((a = a / e - 1) * a * a + 1) + b
  8617. },
  8618. easeInOutCubic: function (c, a, b, d, e) {
  8619. if ((a /= e / 2) < 1) return d / 2 * a * a * a + b;
  8620. return d / 2 * ((a -= 2) * a * a + 2) + b
  8621. },
  8622. easeInQuart: function (c, a, b, d, e) {
  8623. return d * (a /= e) * a * a * a + b
  8624. },
  8625. easeOutQuart: function (c, a, b, d, e) {
  8626. return -d * ((a = a / e - 1) * a * a * a - 1) + b
  8627. },
  8628. easeInOutQuart: function (c, a, b, d, e) {
  8629. if ((a /= e / 2) < 1) return d / 2 * a * a * a * a + b;
  8630. return -d / 2 * ((a -= 2) * a * a * a - 2) + b
  8631. },
  8632. easeInQuint: function (c, a, b, d, e) {
  8633. return d * (a /= e) * a * a * a * a + b
  8634. },
  8635. easeOutQuint: function (c, a, b, d, e) {
  8636. return d * ((a = a / e - 1) * a * a * a * a + 1) + b
  8637. },
  8638. easeInOutQuint: function (c, a, b, d, e) {
  8639. if ((a /= e / 2) < 1) return d / 2 * a * a * a * a * a + b;
  8640. return d / 2 * ((a -= 2) * a * a * a * a + 2) + b
  8641. },
  8642. easeInSine: function (c, a, b, d, e) {
  8643. return -d * Math.cos(a / e * (Math.PI / 2)) + d + b
  8644. },
  8645. easeOutSine: function (c, a, b, d, e) {
  8646. return d * Math.sin(a / e * (Math.PI / 2)) + b
  8647. },
  8648. easeInOutSine: function (c, a, b, d, e) {
  8649. return -d / 2 * (Math.cos(Math.PI * a / e) - 1) + b
  8650. },
  8651. easeInExpo: function (c, a, b, d, e) {
  8652. return a == 0 ? b : d * Math.pow(2, 10 * (a / e - 1)) + b
  8653. },
  8654. easeOutExpo: function (c, a, b, d, e) {
  8655. return a == e ? b + d : d * (-Math.pow(2, - 10 * a / e) + 1) + b
  8656. },
  8657. easeInOutExpo: function (c, a, b, d, e) {
  8658. if (a == 0) return b;
  8659. if (a == e) return b + d;
  8660. if ((a /= e / 2) < 1) return d / 2 * Math.pow(2, 10 * (a - 1)) + b;
  8661. return d / 2 * (-Math.pow(2, - 10 * --a) + 2) + b
  8662. },
  8663. easeInCirc: function (c, a, b, d, e) {
  8664. return -d * (Math.sqrt(1 - (a /= e) * a) - 1) + b
  8665. },
  8666. easeOutCirc: function (c, a, b, d, e) {
  8667. return d * Math.sqrt(1 - (a = a / e - 1) * a) + b
  8668. },
  8669. easeInOutCirc: function (c, a, b, d, e) {
  8670. if ((a /= e / 2) < 1) return -d / 2 * (Math.sqrt(1 - a * a) - 1) + b;
  8671. return d / 2 * (Math.sqrt(1 - (a -= 2) * a) + 1) + b
  8672. },
  8673. easeInElastic: function (c, a, b, d, e) {
  8674. c = 1.70158;
  8675. var g = 0,
  8676. h = d;
  8677. if (a == 0) return b;
  8678. if ((a /= e) == 1) return b + d;
  8679. g || (g = e * 0.3);
  8680. if (h < Math.abs(d)) {
  8681. h = d;
  8682. c = g / 4
  8683. } else c = g / (2 * Math.PI) * Math.asin(d / h);
  8684. return -(h * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * e - c) * 2 * Math.PI / g)) + b
  8685. },
  8686. easeOutElastic: function (c, a, b, d, e) {
  8687. c = 1.70158;
  8688. var g = 0,
  8689. h = d;
  8690. if (a == 0) return b;
  8691. if ((a /= e) == 1) return b + d;
  8692. g || (g = e * 0.3);
  8693. if (h < Math.abs(d)) {
  8694. h = d;
  8695. c = g / 4
  8696. } else c = g / (2 * Math.PI) * Math.asin(d / h);
  8697. return h * Math.pow(2, - 10 * a) * Math.sin((a * e - c) * 2 * Math.PI / g) + d + b
  8698. },
  8699. easeInOutElastic: function (c, a, b, d, e) {
  8700. c = 1.70158;
  8701. var g = 0,
  8702. h = d;
  8703. if (a == 0) return b;
  8704. if ((a /= e / 2) == 2) return b + d;
  8705. g || (g = e * 0.3 * 1.5);
  8706. if (h < Math.abs(d)) {
  8707. h = d;
  8708. c = g / 4
  8709. } else c = g / (2 * Math.PI) * Math.asin(d / h);
  8710. if (a < 1) return -0.5 * h * Math.pow(2, 10 * (a -= 1)) * Math.sin((a * e - c) * 2 * Math.PI / g) + b;
  8711. return h * Math.pow(2, - 10 * (a -= 1)) * Math.sin((a * e - c) * 2 * Math.PI / g) * 0.5 + d + b
  8712. },
  8713. easeInBack: function (c, a, b, d, e, g) {
  8714. if (g == j) g = 1.70158;
  8715. return d * (a /= e) * a * ((g + 1) * a - g) + b
  8716. },
  8717. easeOutBack: function (c, a, b, d, e, g) {
  8718. if (g == j) g = 1.70158;
  8719. return d * ((a = a / e - 1) * a * ((g + 1) * a + g) + 1) + b
  8720. },
  8721. easeInOutBack: function (c, a, b, d, e, g) {
  8722. if (g == j) g = 1.70158;
  8723. if ((a /= e / 2) < 1) return d / 2 * a * a * (((g *= 1.525) + 1) * a - g) + b;
  8724. return d / 2 * ((a -= 2) * a * (((g *= 1.525) + 1) * a + g) + 2) + b
  8725. },
  8726. easeInBounce: function (c, a, b, d, e) {
  8727. return d - f.easing.easeOutBounce(c, e - a, 0, d, e) + b
  8728. },
  8729. easeOutBounce: function (c, a, b, d, e) {
  8730. return (a /= e) < 1 / 2.75 ? d * 7.5625 * a * a + b : a < 2 / 2.75 ? d * (7.5625 * (a -= 1.5 / 2.75) * a + 0.75) + b : a < 2.5 / 2.75 ? d * (7.5625 * (a -= 2.25 / 2.75) * a + 0.9375) + b : d * (7.5625 * (a -= 2.625 / 2.75) * a + 0.984375) + b
  8731. },
  8732. easeInOutBounce: function (c, a, b, d, e) {
  8733. if (a < e / 2) return f.easing.easeInBounce(c, a * 2, 0, d, e) * 0.5 + b;
  8734. return f.easing.easeOutBounce(c, a * 2 - e, 0, d, e) * 0.5 + d * 0.5 + b
  8735. }
  8736. })
  8737. }(jQuery);;
  8738. (function (b) {
  8739. b.effects.blind = function (c) {
  8740. return this.queue(function () {
  8741. var a = b(this),
  8742. g = ["position", "top", "bottom", "left", "right"],
  8743. f = b.effects.setMode(a, c.options.mode || "hide"),
  8744. d = c.options.direction || "vertical";
  8745. b.effects.save(a, g);
  8746. a.show();
  8747. var e = b.effects.createWrapper(a).css({
  8748. overflow: "hidden"
  8749. }),
  8750. h = d == "vertical" ? "height" : "width";
  8751. d = d == "vertical" ? e.height() : e.width();
  8752. f == "show" && e.css(h, 0);
  8753. var i = {};
  8754. i[h] = f == "show" ? d : 0;
  8755. e.animate(i, c.duration, c.options.easing, function () {
  8756. f == "hide" && a.hide();
  8757. b.effects.restore(a, g);
  8758. b.effects.removeWrapper(a);
  8759. c.callback && c.callback.apply(a[0], arguments);
  8760. a.dequeue()
  8761. })
  8762. })
  8763. }
  8764. })(jQuery);;
  8765. (function (e) {
  8766. e.effects.bounce = function (b) {
  8767. return this.queue(function () {
  8768. var a = e(this),
  8769. l = ["position", "top", "bottom", "left", "right"],
  8770. h = e.effects.setMode(a, b.options.mode || "effect"),
  8771. d = b.options.direction || "up",
  8772. c = b.options.distance || 20,
  8773. m = b.options.times || 5,
  8774. i = b.duration || 250;
  8775. /show|hide/.test(h) && l.push("opacity");
  8776. e.effects.save(a, l);
  8777. a.show();
  8778. e.effects.createWrapper(a);
  8779. var f = d == "up" || d == "down" ? "top" : "left";
  8780. d = d == "up" || d == "left" ? "pos" : "neg";
  8781. c = b.options.distance || (f == "top" ? a.outerHeight({
  8782. margin: true
  8783. }) / 3 : a.outerWidth({
  8784. margin: true
  8785. }) / 3);
  8786. if (h == "show") a.css("opacity", 0).css(f, d == "pos" ? -c : c);
  8787. if (h == "hide") c /= m * 2;
  8788. h != "hide" && m--;
  8789. if (h == "show") {
  8790. var g = {
  8791. opacity: 1
  8792. };
  8793. g[f] = (d == "pos" ? "+=" : "-=") + c;
  8794. a.animate(g, i / 2, b.options.easing);
  8795. c /= 2;
  8796. m--
  8797. }
  8798. for (g = 0; g < m; g++) {
  8799. var j = {}, k = {};
  8800. j[f] = (d == "pos" ? "-=" : "+=") + c;
  8801. k[f] = (d == "pos" ? "+=" : "-=") + c;
  8802. a.animate(j, i / 2, b.options.easing).animate(k, i / 2, b.options.easing);
  8803. c = h == "hide" ? c * 2 : c / 2
  8804. }
  8805. if (h == "hide") {
  8806. g = {
  8807. opacity: 0
  8808. };
  8809. g[f] = (d == "pos" ? "-=" : "+=") + c;
  8810. a.animate(g, i / 2, b.options.easing, function () {
  8811. a.hide();
  8812. e.effects.restore(a, l);
  8813. e.effects.removeWrapper(a);
  8814. b.callback && b.callback.apply(this, arguments)
  8815. })
  8816. } else {
  8817. j = {};
  8818. k = {};
  8819. j[f] = (d == "pos" ? "-=" : "+=") + c;
  8820. k[f] = (d == "pos" ? "+=" : "-=") + c;
  8821. a.animate(j, i / 2, b.options.easing).animate(k, i / 2, b.options.easing, function () {
  8822. e.effects.restore(a, l);
  8823. e.effects.removeWrapper(a);
  8824. b.callback && b.callback.apply(this, arguments)
  8825. })
  8826. }
  8827. a.queue("fx", function () {
  8828. a.dequeue()
  8829. });
  8830. a.dequeue()
  8831. })
  8832. }
  8833. })(jQuery);;
  8834. (function (b) {
  8835. b.effects.fade = function (a) {
  8836. return this.queue(function () {
  8837. var c = b(this),
  8838. d = b.effects.setMode(c, a.options.mode || "hide");
  8839. c.animate({
  8840. opacity: d
  8841. }, {
  8842. queue: false,
  8843. duration: a.duration,
  8844. easing: a.options.easing,
  8845. complete: function () {
  8846. a.callback && a.callback.apply(this, arguments);
  8847. c.dequeue()
  8848. }
  8849. })
  8850. })
  8851. }
  8852. })(jQuery);;
  8853. (function (b) {
  8854. b.effects.highlight = function (c) {
  8855. return this.queue(function () {
  8856. var a = b(this),
  8857. e = ["backgroundImage", "backgroundColor", "opacity"],
  8858. d = b.effects.setMode(a, c.options.mode || "show"),
  8859. f = {
  8860. backgroundColor: a.css("backgroundColor")
  8861. };
  8862. if (d == "hide") f.opacity = 0;
  8863. b.effects.save(a, e);
  8864. a.show().css({
  8865. backgroundImage: "none",
  8866. backgroundColor: c.options.color || "#ffff99"
  8867. }).animate(f, {
  8868. queue: false,
  8869. duration: c.duration,
  8870. easing: c.options.easing,
  8871. complete: function () {
  8872. d == "hide" && a.hide();
  8873. b.effects.restore(a, e);
  8874. d == "show" && !b.support.opacity && this.style.removeAttribute("filter");
  8875. c.callback && c.callback.apply(this, arguments);
  8876. a.dequeue()
  8877. }
  8878. })
  8879. })
  8880. }
  8881. })(jQuery);;
  8882. (function (d) {
  8883. d.effects.pulsate = function (a) {
  8884. return this.queue(function () {
  8885. var b = d(this),
  8886. c = d.effects.setMode(b, a.options.mode || "show");
  8887. times = (a.options.times || 5) * 2 - 1;
  8888. duration = a.duration ? a.duration / 2 : d.fx.speeds._default / 2;
  8889. isVisible = b.is(":visible");
  8890. animateTo = 0;
  8891. if (!isVisible) {
  8892. b.css("opacity", 0).show();
  8893. animateTo = 1
  8894. }
  8895. if (c == "hide" && isVisible || c == "show" && !isVisible) times--;
  8896. for (c = 0; c < times; c++) {
  8897. b.animate({
  8898. opacity: animateTo
  8899. }, duration, a.options.easing);
  8900. animateTo = (animateTo + 1) % 2
  8901. }
  8902. b.animate({
  8903. opacity: animateTo
  8904. }, duration, a.options.easing, function () {
  8905. animateTo == 0 && b.hide();
  8906. a.callback && a.callback.apply(this, arguments)
  8907. });
  8908. b.queue("fx", function () {
  8909. b.dequeue()
  8910. }).dequeue()
  8911. })
  8912. }
  8913. })(jQuery);;
  8914. (function (c) {
  8915. c.effects.puff = function (b) {
  8916. return this.queue(function () {
  8917. var a = c(this),
  8918. e = c.effects.setMode(a, b.options.mode || "hide"),
  8919. g = parseInt(b.options.percent, 10) || 150,
  8920. h = g / 100,
  8921. i = {
  8922. height: a.height(),
  8923. width: a.width()
  8924. };
  8925. c.extend(b.options, {
  8926. fade: true,
  8927. mode: e,
  8928. percent: e == "hide" ? g : 100,
  8929. from: e == "hide" ? i : {
  8930. height: i.height * h,
  8931. width: i.width * h
  8932. }
  8933. });
  8934. a.effect("scale", b.options, b.duration, b.callback);
  8935. a.dequeue()
  8936. })
  8937. };
  8938. c.effects.scale = function (b) {
  8939. return this.queue(function () {
  8940. var a = c(this),
  8941. e = c.extend(true, {}, b.options),
  8942. g = c.effects.setMode(a, b.options.mode || "effect"),
  8943. h = parseInt(b.options.percent, 10) || (parseInt(b.options.percent, 10) == 0 ? 0 : g == "hide" ? 0 : 100),
  8944. i = b.options.direction || "both",
  8945. f = b.options.origin;
  8946. if (g != "effect") {
  8947. e.origin = f || ["middle", "center"];
  8948. e.restore = true
  8949. }
  8950. f = {
  8951. height: a.height(),
  8952. width: a.width()
  8953. };
  8954. a.from = b.options.from || (g == "show" ? {
  8955. height: 0,
  8956. width: 0
  8957. } : f);
  8958. h = {
  8959. y: i != "horizontal" ? h / 100 : 1,
  8960. x: i != "vertical" ? h / 100 : 1
  8961. };
  8962. a.to = {
  8963. height: f.height * h.y,
  8964. width: f.width * h.x
  8965. };
  8966. if (b.options.fade) {
  8967. if (g == "show") {
  8968. a.from.opacity = 0;
  8969. a.to.opacity = 1
  8970. }
  8971. if (g == "hide") {
  8972. a.from.opacity = 1;
  8973. a.to.opacity = 0
  8974. }
  8975. }
  8976. e.from = a.from;
  8977. e.to = a.to;
  8978. e.mode = g;
  8979. a.effect("size", e, b.duration, b.callback);
  8980. a.dequeue()
  8981. })
  8982. };
  8983. c.effects.size = function (b) {
  8984. return this.queue(function () {
  8985. var a = c(this),
  8986. e = ["position", "top", "bottom", "left", "right", "width", "height", "overflow", "opacity"],
  8987. g = ["position", "top", "bottom", "left", "right", "overflow", "opacity"],
  8988. h = ["width", "height", "overflow"],
  8989. i = ["fontSize"],
  8990. f = ["borderTopWidth", "borderBottomWidth", "paddingTop", "paddingBottom"],
  8991. k = ["borderLeftWidth", "borderRightWidth", "paddingLeft", "paddingRight"],
  8992. p = c.effects.setMode(a, b.options.mode || "effect"),
  8993. n = b.options.restore || false,
  8994. m = b.options.scale || "both",
  8995. l = b.options.origin,
  8996. j = {
  8997. height: a.height(),
  8998. width: a.width()
  8999. };
  9000. a.from = b.options.from || j;
  9001. a.to = b.options.to || j;
  9002. if (l) {
  9003. l = c.effects.getBaseline(l, j);
  9004. a.from.top = (j.height - a.from.height) * l.y;
  9005. a.from.left = (j.width - a.from.width) * l.x;
  9006. a.to.top = (j.height - a.to.height) * l.y;
  9007. a.to.left = (j.width - a.to.width) * l.x
  9008. }
  9009. var d = {
  9010. from: {
  9011. y: a.from.height / j.height,
  9012. x: a.from.width / j.width
  9013. },
  9014. to: {
  9015. y: a.to.height / j.height,
  9016. x: a.to.width / j.width
  9017. }
  9018. };
  9019. if (m == "box" || m == "both") {
  9020. if (d.from.y != d.to.y) {
  9021. e = e.concat(f);
  9022. a.from = c.effects.setTransition(a, f, d.from.y, a.from);
  9023. a.to = c.effects.setTransition(a, f, d.to.y, a.to)
  9024. }
  9025. if (d.from.x != d.to.x) {
  9026. e = e.concat(k);
  9027. a.from = c.effects.setTransition(a, k, d.from.x, a.from);
  9028. a.to = c.effects.setTransition(a, k, d.to.x, a.to)
  9029. }
  9030. }
  9031. if (m == "content" || m == "both") if (d.from.y != d.to.y) {
  9032. e = e.concat(i);
  9033. a.from = c.effects.setTransition(a, i, d.from.y, a.from);
  9034. a.to = c.effects.setTransition(a, i, d.to.y, a.to)
  9035. }
  9036. c.effects.save(a, n ? e : g);
  9037. a.show();
  9038. c.effects.createWrapper(a);
  9039. a.css("overflow", "hidden").css(a.from);
  9040. if (m == "content" || m == "both") {
  9041. f = f.concat(["marginTop", "marginBottom"]).concat(i);
  9042. k = k.concat(["marginLeft", "marginRight"]);
  9043. h = e.concat(f).concat(k);
  9044. a.find("*[width]").each(function () {
  9045. child = c(this);
  9046. n && c.effects.save(child, h);
  9047. var o = {
  9048. height: child.height(),
  9049. width: child.width()
  9050. };
  9051. child.from = {
  9052. height: o.height * d.from.y,
  9053. width: o.width * d.from.x
  9054. };
  9055. child.to = {
  9056. height: o.height * d.to.y,
  9057. width: o.width * d.to.x
  9058. };
  9059. if (d.from.y != d.to.y) {
  9060. child.from = c.effects.setTransition(child, f, d.from.y, child.from);
  9061. child.to = c.effects.setTransition(child, f, d.to.y, child.to)
  9062. }
  9063. if (d.from.x != d.to.x) {
  9064. child.from = c.effects.setTransition(child, k, d.from.x, child.from);
  9065. child.to = c.effects.setTransition(child, k, d.to.x, child.to)
  9066. }
  9067. child.css(child.from);
  9068. child.animate(child.to, b.duration, b.options.easing, function () {
  9069. n && c.effects.restore(child, h)
  9070. })
  9071. })
  9072. }
  9073. a.animate(a.to, {
  9074. queue: false,
  9075. duration: b.duration,
  9076. easing: b.options.easing,
  9077. complete: function () {
  9078. a.to.opacity === 0 && a.css("opacity", a.from.opacity);
  9079. p == "hide" && a.hide();
  9080. c.effects.restore(a, n ? e : g);
  9081. c.effects.removeWrapper(a);
  9082. b.callback && b.callback.apply(this, arguments);
  9083. a.dequeue()
  9084. }
  9085. })
  9086. })
  9087. }
  9088. })(jQuery);;
  9089. (function (d) {
  9090. d.effects.shake = function (a) {
  9091. return this.queue(function () {
  9092. var b = d(this),
  9093. j = ["position", "top", "bottom", "left", "right"];
  9094. d.effects.setMode(b, a.options.mode || "effect");
  9095. var c = a.options.direction || "left",
  9096. e = a.options.distance || 20,
  9097. l = a.options.times || 3,
  9098. f = a.duration || a.options.duration || 140;
  9099. d.effects.save(b, j);
  9100. b.show();
  9101. d.effects.createWrapper(b);
  9102. var g = c == "up" || c == "down" ? "top" : "left",
  9103. h = c == "up" || c == "left" ? "pos" : "neg";
  9104. c = {};
  9105. var i = {}, k = {};
  9106. c[g] = (h == "pos" ? "-=" : "+=") + e;
  9107. i[g] = (h == "pos" ? "+=" : "-=") + e * 2;
  9108. k[g] = (h == "pos" ? "-=" : "+=") + e * 2;
  9109. b.animate(c, f, a.options.easing);
  9110. for (e = 1; e < l; e++) b.animate(i, f, a.options.easing).animate(k, f, a.options.easing);
  9111. b.animate(i, f, a.options.easing).animate(c, f / 2, a.options.easing, function () {
  9112. d.effects.restore(b, j);
  9113. d.effects.removeWrapper(b);
  9114. a.callback && a.callback.apply(this, arguments)
  9115. });
  9116. b.queue("fx", function () {
  9117. b.dequeue()
  9118. });
  9119. b.dequeue()
  9120. })
  9121. }
  9122. })(jQuery);;
  9123. (function (e) {
  9124. e.effects.transfer = function (a) {
  9125. return this.queue(function () {
  9126. var b = e(this),
  9127. c = e(a.options.to),
  9128. d = c.offset();
  9129. c = {
  9130. top: d.top,
  9131. left: d.left,
  9132. height: c.innerHeight(),
  9133. width: c.innerWidth()
  9134. };
  9135. d = b.offset();
  9136. var f = e('<div class="ui-effects-transfer"></div>').appendTo(document.body).addClass(a.options.className).css({
  9137. top: d.top,
  9138. left: d.left,
  9139. height: b.innerHeight(),
  9140. width: b.innerWidth(),
  9141. position: "absolute"
  9142. }).animate(c, a.duration, a.options.easing, function () {
  9143. f.remove();
  9144. a.callback && a.callback.apply(b[0], arguments);
  9145. b.dequeue()
  9146. })
  9147. })
  9148. }
  9149. })(jQuery);;
  9150. jQuery.easing['jswing'] = jQuery.easing['swing'];
  9151. jQuery.extend(jQuery.easing, {
  9152. def: 'easeOutQuad',
  9153. swing: function (x, t, b, c, d) {
  9154. return jQuery.easing[jQuery.easing.def](x, t, b, c, d);
  9155. },
  9156. easeInQuad: function (x, t, b, c, d) {
  9157. return c * (t /= d) * t + b;
  9158. },
  9159. easeOutQuad: function (x, t, b, c, d) {
  9160. return -c * (t /= d) * (t - 2) + b;
  9161. },
  9162. easeInOutQuad: function (x, t, b, c, d) {
  9163. if ((t /= d / 2) < 1) return c / 2 * t * t + b;
  9164. return -c / 2 * ((--t) * (t - 2) - 1) + b;
  9165. },
  9166. easeInCubic: function (x, t, b, c, d) {
  9167. return c * (t /= d) * t * t + b;
  9168. },
  9169. easeOutCubic: function (x, t, b, c, d) {
  9170. return c * ((t = t / d - 1) * t * t + 1) + b;
  9171. },
  9172. easeInOutCubic: function (x, t, b, c, d) {
  9173. if ((t /= d / 2) < 1) return c / 2 * t * t * t + b;
  9174. return c / 2 * ((t -= 2) * t * t + 2) + b;
  9175. },
  9176. easeInQuart: function (x, t, b, c, d) {
  9177. return c * (t /= d) * t * t * t + b;
  9178. },
  9179. easeOutQuart: function (x, t, b, c, d) {
  9180. return -c * ((t = t / d - 1) * t * t * t - 1) + b;
  9181. },
  9182. easeInOutQuart: function (x, t, b, c, d) {
  9183. if ((t /= d / 2) < 1) return c / 2 * t * t * t * t + b;
  9184. return -c / 2 * ((t -= 2) * t * t * t - 2) + b;
  9185. },
  9186. easeInQuint: function (x, t, b, c, d) {
  9187. return c * (t /= d) * t * t * t * t + b;
  9188. },
  9189. easeOutQuint: function (x, t, b, c, d) {
  9190. return c * ((t = t / d - 1) * t * t * t * t + 1) + b;
  9191. },
  9192. easeInOutQuint: function (x, t, b, c, d) {
  9193. if ((t /= d / 2) < 1) return c / 2 * t * t * t * t * t + b;
  9194. return c / 2 * ((t -= 2) * t * t * t * t + 2) + b;
  9195. },
  9196. easeInSine: function (x, t, b, c, d) {
  9197. return -c * Math.cos(t / d * (Math.PI / 2)) + c + b;
  9198. },
  9199. easeOutSine: function (x, t, b, c, d) {
  9200. return c * Math.sin(t / d * (Math.PI / 2)) + b;
  9201. },
  9202. easeInOutSine: function (x, t, b, c, d) {
  9203. return -c / 2 * (Math.cos(Math.PI * t / d) - 1) + b;
  9204. },
  9205. easeInExpo: function (x, t, b, c, d) {
  9206. return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b;
  9207. },
  9208. easeOutExpo: function (x, t, b, c, d) {
  9209. return (t == d) ? b + c : c * (-Math.pow(2, - 10 * t / d) + 1) + b;
  9210. },
  9211. easeInOutExpo: function (x, t, b, c, d) {
  9212. if (t == 0) return b;
  9213. if (t == d) return b + c;
  9214. if ((t /= d / 2) < 1) return c / 2 * Math.pow(2, 10 * (t - 1)) + b;
  9215. return c / 2 * (-Math.pow(2, - 10 * --t) + 2) + b;
  9216. },
  9217. easeInCirc: function (x, t, b, c, d) {
  9218. return -c * (Math.sqrt(1 - (t /= d) * t) - 1) + b;
  9219. },
  9220. easeOutCirc: function (x, t, b, c, d) {
  9221. return c * Math.sqrt(1 - (t = t / d - 1) * t) + b;
  9222. },
  9223. easeInOutCirc: function (x, t, b, c, d) {
  9224. if ((t /= d / 2) < 1) return -c / 2 * (Math.sqrt(1 - t * t) - 1) + b;
  9225. return c / 2 * (Math.sqrt(1 - (t -= 2) * t) + 1) + b;
  9226. },
  9227. easeInElastic: function (x, t, b, c, d) {
  9228. var s = 1.70158;
  9229. var p = 0;
  9230. var a = c;
  9231. if (t == 0) return b;
  9232. if ((t /= d) == 1) return b + c;
  9233. if (!p) p = d * .3;
  9234. if (a < Math.abs(c)) {
  9235. a = c;
  9236. var s = p / 4;
  9237. } else var s = p / (2 * Math.PI) * Math.asin(c / a);
  9238. return -(a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
  9239. },
  9240. easeOutElastic: function (x, t, b, c, d) {
  9241. var s = 1.70158;
  9242. var p = 0;
  9243. var a = c;
  9244. if (t == 0) return b;
  9245. if ((t /= d) == 1) return b + c;
  9246. if (!p) p = d * .3;
  9247. if (a < Math.abs(c)) {
  9248. a = c;
  9249. var s = p / 4;
  9250. } else var s = p / (2 * Math.PI) * Math.asin(c / a);
  9251. return a * Math.pow(2, - 10 * t) * Math.sin((t * d - s) * (2 * Math.PI) / p) + c + b;
  9252. },
  9253. easeInOutElastic: function (x, t, b, c, d) {
  9254. var s = 1.70158;
  9255. var p = 0;
  9256. var a = c;
  9257. if (t == 0) return b;
  9258. if ((t /= d / 2) == 2) return b + c;
  9259. if (!p) p = d * (.3 * 1.5);
  9260. if (a < Math.abs(c)) {
  9261. a = c;
  9262. var s = p / 4;
  9263. } else var s = p / (2 * Math.PI) * Math.asin(c / a);
  9264. if (t < 1) return -.5 * (a * Math.pow(2, 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p)) + b;
  9265. return a * Math.pow(2, - 10 * (t -= 1)) * Math.sin((t * d - s) * (2 * Math.PI) / p) * .5 + c + b;
  9266. },
  9267. easeInBack: function (x, t, b, c, d, s) {
  9268. if (s == undefined) s = 1.70158;
  9269. return c * (t /= d) * t * ((s + 1) * t - s) + b;
  9270. },
  9271. easeOutBack: function (x, t, b, c, d, s) {
  9272. if (s == undefined) s = 1.70158;
  9273. return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;
  9274. },
  9275. easeInOutBack: function (x, t, b, c, d, s) {
  9276. if (s == undefined) s = 1.70158;
  9277. if ((t /= d / 2) < 1) return c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b;
  9278. return c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;
  9279. },
  9280. easeInBounce: function (x, t, b, c, d) {
  9281. return c - jQuery.easing.easeOutBounce(x, d - t, 0, c, d) + b;
  9282. },
  9283. easeOutBounce: function (x, t, b, c, d) {
  9284. if ((t /= d) < (1 / 2.75)) {
  9285. return c * (7.5625 * t * t) + b;
  9286. } else if (t < (2 / 2.75)) {
  9287. return c * (7.5625 * (t -= (1.5 / 2.75)) * t + .75) + b;
  9288. } else if (t < (2.5 / 2.75)) {
  9289. return c * (7.5625 * (t -= (2.25 / 2.75)) * t + .9375) + b;
  9290. } else {
  9291. return c * (7.5625 * (t -= (2.625 / 2.75)) * t + .984375) + b;
  9292. }
  9293. },
  9294. easeInOutBounce: function (x, t, b, c, d) {
  9295. if (t < d / 2) return jQuery.easing.easeInBounce(x, t * 2, 0, c, d) * .5 + b;
  9296. return jQuery.easing.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;
  9297. }
  9298. });
  9299. (function ($) {
  9300. $.fn.stickyPanel = function (options) {
  9301. var options = $.extend({}, $.fn.stickyPanel.defaults, options);
  9302. return this.each(function () {
  9303. $(window).bind("scroll.stickyPanel", {
  9304. selected: $(this),
  9305. options: options
  9306. }, Scroll);
  9307. });
  9308. };
  9309. function Scroll(event) {
  9310. var node = event.data.selected;
  9311. var o = event.data.options;
  9312. var isMobile = navigator.userAgent.toLowerCase().indexOf('mobile') > 0;
  9313. var windowHeight = $(window).height();
  9314. var nodeHeight = node.outerHeight(true);
  9315. var scrollTop = $(document).scrollTop();
  9316. if (!isMobile && scrollTop <= $(document).height() - windowHeight && scrollTop > node.offset().top - o.topPadding) {
  9317. var newNodeTop = 0;
  9318. if (o.topPadding != "undefined") {
  9319. newNodeTop = newNodeTop + o.topPadding;
  9320. }
  9321. var nodeLeft = node.offset().left;
  9322. node.data("PanelsTop", node.offset().top - newNodeTop);
  9323. if (o.savePanelSpace == true) {
  9324. var nodeWidth = node.outerWidth(true);
  9325. var nodeCssfloat = node.css("float");
  9326. var nodeCssdisplay = node.css("display");
  9327. var randomNum = Math.ceil(Math.random() * 9999);
  9328. node.data("PanelSpaceID", "stickyPanelSpace" + randomNum);
  9329. node.before("<div id='" + node.data("PanelSpaceID") + "' style='width:" + nodeWidth + "px;height:" + nodeHeight + "px;float:" + nodeCssfloat + ";display:" + nodeCssdisplay + ";'>&nbsp;</div>");
  9330. }
  9331. if (o.afterDetachCSSClass != "") {
  9332. node.addClass(o.afterDetachCSSClass);
  9333. }
  9334. node.data("Original_Inline_CSS", (!node.attr("style") ? "" : node.attr("style")));
  9335. node.css({
  9336. "margin": 0,
  9337. "left": nodeLeft,
  9338. "top": newNodeTop,
  9339. "position": "fixed"
  9340. });
  9341. }
  9342. if (scrollTop <= node.data("PanelsTop") && node.css("top") != "auto") {
  9343. if (o.savePanelSpace == true) {
  9344. $("#" + node.data("PanelSpaceID")).remove();
  9345. }
  9346. node.attr("style", node.data("Original_Inline_CSS"));
  9347. if (o.afterDetachCSSClass != "") {
  9348. node.removeClass(o.afterDetachCSSClass);
  9349. }
  9350. }
  9351. };
  9352. $.fn.stickyPanel.defaults = {
  9353. topPadding: 0,
  9354. afterDetachCSSClass: "",
  9355. savePanelSpace: false
  9356. };
  9357. })(jQuery);
  9358. (function () {
  9359. function L(a, b) {
  9360. var c;
  9361. a || (a = {});
  9362. for (c in b) a[c] = b[c];
  9363. return a
  9364. }
  9365. function za() {
  9366. for (var a = 0, b = arguments, c = b.length, d = {}; a < c; a++) d[b[a++]] = b[a];
  9367. return d
  9368. }
  9369. function S(a, b) {
  9370. return parseInt(a, b || 10)
  9371. }
  9372. function Ab(a) {
  9373. return typeof a === "string"
  9374. }
  9375. function mb(a) {
  9376. return typeof a === "object"
  9377. }
  9378. function Fb(a) {
  9379. return Object.prototype.toString.call(a) === "[object Array]"
  9380. }
  9381. function Bb(a) {
  9382. return typeof a === "number"
  9383. }
  9384. function nb(a) {
  9385. return oa.log(a) / oa.LN10
  9386. }
  9387. function cb(a) {
  9388. return oa.pow(10, a)
  9389. }
  9390. function Gb(a, b) {
  9391. for (var c = a.length; c--;) if (a[c] === b) {
  9392. a.splice(c, 1);
  9393. break
  9394. }
  9395. }
  9396. function s(a) {
  9397. return a !== X && a !== null
  9398. }
  9399. function A(a, b, c) {
  9400. var d, e;
  9401. if (Ab(b)) s(c) ? a.setAttribute(b, c) : a && a.getAttribute && (e = a.getAttribute(b));
  9402. else if (s(b) && mb(b)) for (d in b) a.setAttribute(d, b[d]);
  9403. return e
  9404. }
  9405. function Hb(a) {
  9406. return Fb(a) ? a : [a]
  9407. }
  9408. function p() {
  9409. var a = arguments,
  9410. b, c, d = a.length;
  9411. for (b = 0; b < d; b++) if (c = a[b], typeof c !== "undefined" && c !== null) return c
  9412. }
  9413. function P(a, b) {
  9414. if (Qb && b && b.opacity !== X) b.filter = "alpha(opacity=" + b.opacity * 100 + ")";
  9415. L(a.style, b)
  9416. }
  9417. function Aa(a, b, c, d, e) {
  9418. a = x.createElement(a);
  9419. b && L(a, b);
  9420. e && P(a, {
  9421. padding: 0,
  9422. border: Ma,
  9423. margin: 0
  9424. });
  9425. c && P(a, c);
  9426. d && d.appendChild(a);
  9427. return a
  9428. }
  9429. function pa(a, b) {
  9430. var c = function () {};
  9431. c.prototype = new a;
  9432. L(c.prototype, b);
  9433. return c
  9434. }
  9435. function dc(a, b, c, d) {
  9436. var e = Ea.lang,
  9437. f = isNaN(b = Ba(b)) ? 2 : b,
  9438. b = c === void 0 ? e.decimalPoint : c,
  9439. d = d === void 0 ? e.thousandsSep : d,
  9440. e = a < 0 ? "-" : "",
  9441. c = String(S(a = Ba(+a || 0).toFixed(f))),
  9442. g = c.length > 3 ? c.length % 3 : 0;
  9443. return e + (g ? c.substr(0, g) + d : "") + c.substr(g).replace(/(\d{3})(?=\d)/g, "$1" + d) + (f ? b + Ba(a - c).toFixed(f).slice(2) : "")
  9444. }
  9445. function Na(a, b) {
  9446. return Array((b || 2) + 1 - String(a).length).join(0) + a
  9447. }
  9448. function ec(a, b, c, d) {
  9449. var e, c = p(c, 1);
  9450. e = a / c;
  9451. b || (b = [1, 2, 2.5, 5, 10], d && d.allowDecimals === !1 && (c === 1 ? b = [1, 2, 5, 10] : c <= 0.1 && (b = [1 / c])));
  9452. for (d = 0; d < b.length; d++) if (a = b[d], e <= (b[d] + (b[d + 1] || b[d])) / 2) break;
  9453. a *= c;
  9454. return a
  9455. }
  9456. function Kc(a, b) {
  9457. var c = b || [
  9458. [Rb, [1, 2, 5, 10, 20, 25, 50, 100, 200, 500]],
  9459. [ob, [1, 2, 5, 10, 15, 30]],
  9460. [pb, [1, 2, 5, 10, 15, 30]],
  9461. [va, [1, 2, 3, 4, 6, 8, 12]],
  9462. [Ca, [1, 2]],
  9463. [Ya, [1, 2]],
  9464. [Da, [1, 2, 3, 4, 6]],
  9465. [Za, null]
  9466. ],
  9467. d = c[c.length - 1],
  9468. e = E[d[0]],
  9469. f = d[1],
  9470. g;
  9471. for (g = 0; g < c.length; g++) if (d = c[g], e = E[d[0]], f = d[1], c[g + 1] && a <= (e * f[f.length - 1] + E[c[g + 1][0]]) / 2) break;
  9472. e === E[Za] && a < 5 * e && (f = [1, 2, 5]);
  9473. e === E[Za] && a < 5 * e && (f = [1, 2, 5]);
  9474. c = ec(a / e, f);
  9475. return {
  9476. unitRange: e,
  9477. count: c,
  9478. unitName: d[0]
  9479. }
  9480. }
  9481. function Lc(a, b, c, d) {
  9482. var e = [],
  9483. f = {}, g = Ea.global.useUTC,
  9484. h, i = new Date(b),
  9485. b = a.unitRange,
  9486. k = a.count;
  9487. b >= E[ob] && (i.setMilliseconds(0), i.setSeconds(b >= E[pb] ? 0 : k * Ta(i.getSeconds() / k)));
  9488. if (b >= E[pb]) i[pc](b >= E[va] ? 0 : k * Ta(i[fc]() / k));
  9489. if (b >= E[va]) i[qc](b >= E[Ca] ? 0 : k * Ta(i[gc]() / k));
  9490. if (b >= E[Ca]) i[hc](b >= E[Da] ? 1 : k * Ta(i[db]() / k));
  9491. b >= E[Da] && (i[rc](b >= E[Za] ? 0 : k * Ta(i[qb]() / k)), h = i[rb]());
  9492. b >= E[Za] && (h -= h % k, i[sc](h));
  9493. if (b === E[Ya]) i[hc](i[db]() - i[ic]() + p(d, 1));
  9494. d = 1;
  9495. h = i[rb]();
  9496. for (var j = i.getTime(), l = i[qb](), i = i[db](); j < c;) e.push(j), b === E[Za] ? j = sb(h + d * k, 0) : b === E[Da] ? j = sb(h, l + d * k) : !g && (b === E[Ca] || b === E[Ya]) ? j = sb(h, l, i + d * k * (b === E[Ca] ? 1 : 7)) : (j += b * k, b <= E[va] && j % E[Ca] === 0 && (f[j] = Ca)), d++;
  9497. e.push(j);
  9498. e.info = L(a, {
  9499. higherRanks: f,
  9500. totalRange: b * k
  9501. });
  9502. return e
  9503. }
  9504. function tc() {
  9505. this.symbol = this.color = 0
  9506. }
  9507. function uc(a, b, c, d, e, f, g, h, i) {
  9508. var k = g.x,
  9509. g = g.y,
  9510. i = k + c + (i ? h : -a - h),
  9511. j = g - b + d + 15,
  9512. l;
  9513. i < 7 && (i = c + k + h);
  9514. i + a > c + e && (i -= i + a - (c + e), j = g - b + d - h, l = !0);
  9515. j < d + 5 ? (j = d + 5, l && g >= j && g <= j + b && (j = g + d + h)) : j + b > d + f && (j = d + f - b - h);
  9516. return {
  9517. x: i,
  9518. y: j
  9519. }
  9520. }
  9521. function Mc(a, b) {
  9522. var c = a.length,
  9523. d, e;
  9524. for (e = 0; e < c; e++) a[e].ss_i = e;
  9525. a.sort(function (a, c) {
  9526. d = b(a, c);
  9527. return d === 0 ? a.ss_i - c.ss_i : d
  9528. });
  9529. for (e = 0; e < c; e++) delete a[e].ss_i
  9530. }
  9531. function Sb(a) {
  9532. for (var b = a.length, c = a[0]; b--;) a[b] < c && (c = a[b]);
  9533. return c
  9534. }
  9535. function Ib(a) {
  9536. for (var b = a.length, c = a[0]; b--;) a[b] > c && (c = a[b]);
  9537. return c
  9538. }
  9539. function Jb(a) {
  9540. for (var b in a) a[b] && a[b].destroy && a[b].destroy(), delete a[b]
  9541. }
  9542. function Tb(a) {
  9543. tb || (tb = Aa(Ra));
  9544. a && tb.appendChild(a);
  9545. tb.innerHTML = ""
  9546. }
  9547. function jc(a, b) {
  9548. var c = "Highcharts error #" + a + ": www.highcharts.com/errors/" + a;
  9549. if (b) throw c;
  9550. else ca.console && console.log(c)
  9551. }
  9552. function Cb(a) {
  9553. return parseFloat(a.toPrecision(14))
  9554. }
  9555. function Kb(a, b) {
  9556. Ub = p(a, b.animation)
  9557. }
  9558. function vc() {
  9559. var a = Ea.global.useUTC,
  9560. b = a ? "getUTC" : "get",
  9561. c = a ? "setUTC" : "set";
  9562. sb = a ? Date.UTC : function (a, b, c, g, h, i) {
  9563. return (new Date(a, b, p(c, 1), p(g, 0), p(h, 0), p(i, 0))).getTime()
  9564. };
  9565. fc = b + "Minutes";
  9566. gc = b + "Hours";
  9567. ic = b + "Day";
  9568. db = b + "Date";
  9569. qb = b + "Month";
  9570. rb = b + "FullYear";
  9571. pc = c + "Minutes";
  9572. qc = c + "Hours";
  9573. hc = c + "Date";
  9574. rc = c + "Month";
  9575. sc = c + "FullYear"
  9576. }
  9577. function Sa() {}
  9578. function wc(a, b) {
  9579. function c(a) {
  9580. function b(a, c) {
  9581. this.pos = a;
  9582. this.type = c || "";
  9583. this.isNew = !0;
  9584. c || this.addLabel()
  9585. }
  9586. function c(a) {
  9587. if (a) this.options = a, this.id = a.id;
  9588. return this
  9589. }
  9590. function d(a, b, c, e) {
  9591. this.isNegative = b;
  9592. this.options = a;
  9593. this.x = c;
  9594. this.stack = e;
  9595. this.alignOptions = {
  9596. align: a.align || (U ? b ? "left" : "right" : "center"),
  9597. verticalAlign: a.verticalAlign || (U ? "middle" : b ? "bottom" : "top"),
  9598. y: p(a.y, U ? 4 : b ? 14 : -6),
  9599. x: p(a.x, U ? b ? -6 : 6 : 0)
  9600. };
  9601. this.textAlign = a.textAlign || (U ? b ? "right" : "left" : "center")
  9602. }
  9603. function e() {
  9604. var a = [],
  9605. b = [],
  9606. c;
  9607. C = M = null;
  9608. o(B.series, function (e) {
  9609. if (e.visible || !q.ignoreHiddenSeries) {
  9610. var f = e.options,
  9611. g, h, i, j, k, m, l, n, Y, ea = f.threshold,
  9612. B, o = [],
  9613. xc = 0;
  9614. if (R && ea <= 0) ea = f.threshold = null;
  9615. if (t) f = e.xData, f.length && (C = Ua(p(C, f[0]), Sb(f)), M = W(p(M, f[0]), Ib(f)));
  9616. else {
  9617. var y, r, G, v = e.cropped,
  9618. Z = e.xAxis.getExtremes(),
  9619. V = !! e.modifyValue;
  9620. g = f.stacking;
  9621. Ha = g === "percent";
  9622. if (g) k = f.stack, j = e.type + p(k, ""), m = "-" + j, e.stackKey = j, h = a[j] || [], a[j] = h, i = b[m] || [], b[m] = i;
  9623. Ha && (C = 0, M = 99);
  9624. f = e.processedXData;
  9625. l = e.processedYData;
  9626. B = l.length;
  9627. for (c = 0; c < B; c++) if (n = f[c], Y = l[c], Y !== null && Y !== X && (g ? (r = (y = Y < ea) ? i : h, G = y ? m : j, Y = r[n] = s(r[n]) ? r[n] + Y : Y, qa[G] || (qa[G] = {}), qa[G][n] || (qa[G][n] = new d(u.stackLabels, y, n, k)), qa[G][n].setTotal(Y)) : V && (Y = e.modifyValue(Y)), v || (f[c + 1] || n) >= Z.min && (f[c - 1] || n) <= Z.max)) if (n = Y.length) for (; n--;) Y[n] !== null && (o[xc++] = Y[n]);
  9628. else o[xc++] = Y;
  9629. !Ha && o.length && (C = Ua(p(C, o[0]), Sb(o)), M = W(p(M, o[0]), Ib(o)));
  9630. s(ea) && (C >= ea ? (C = ea, Ma = !0) : M < ea && (M = ea, Na = !0))
  9631. }
  9632. }
  9633. })
  9634. }
  9635. function f(a, b, c) {
  9636. for (var d, b = Cb(Ta(b / a) * a), c = Cb(Yb(c / a) * a), e = []; b <= c;) {
  9637. e.push(b);
  9638. b = Cb(b + a);
  9639. if (b === d) break;
  9640. d = b
  9641. }
  9642. return e
  9643. }
  9644. function g(a, b, c, d) {
  9645. var e = [];
  9646. if (!d) B._minorAutoInterval = null;
  9647. if (a >= 0.5) a = z(a), e = f(a, b, c);
  9648. else if (a >= 0.08) {
  9649. var h = Ta(b),
  9650. i, j, k, n, m, l;
  9651. for (i = a > 0.3 ? [1, 2, 4] : a > 0.15 ? [1, 2, 4, 6, 8] : [1, 2, 3, 4, 5, 6, 7, 8, 9]; h < c + 1 && !l; h++) {
  9652. k = i.length;
  9653. for (j = 0; j < k && !l; j++) n = nb(cb(h) * i[j]), n > b && e.push(m), m > c && (l = !0), m = n
  9654. }
  9655. } else if (b = cb(b), c = cb(c), a = u[d ? "minorTickInterval" : "tickInterval"], a = p(a === "auto" ? null : a, B._minorAutoInterval, (c - b) * (u.tickPixelInterval / (d ? 5 : 1)) / ((d ? D / N.length : D) || 1)), a = ec(a, null, oa.pow(10, Ta(oa.log(a) / oa.LN10))), e = Vb(f(a, b, c), nb), !d) B._minorAutoInterval = a / 5;
  9656. d || (Oa = a);
  9657. return e
  9658. }
  9659. function h() {
  9660. var a = [],
  9661. b, c;
  9662. if (R) {
  9663. c = N.length;
  9664. for (b = 1; b < c; b++) a = a.concat(g(Ga, N[b - 1], N[b], !0))
  9665. } else for (b = F + (N[0] - F) % Ga; b <= H; b += Ga) a.push(b);
  9666. return a
  9667. }
  9668. function i() {
  9669. var a, b = M - C >= fb,
  9670. c, d, e, f, g, h;
  9671. t && fb === X && !R && (s(u.min) || s(u.max) ? fb = null : (o(B.series, function (a) {
  9672. f = a.xData;
  9673. for (d = g = a.xIncrement ? 1 : f.length - 1; d > 0; d--) if (e = f[d] - f[d - 1], c === X || e < c) c = e
  9674. }), fb = Ua(c * 5, M - C)));
  9675. H - F < fb && (a = (fb - H + F) / 2, a = [F - a, p(u.min, F - a)], b && (a[2] = C), F = Ib(a), h = [F + fb, p(u.max, F + fb)], b && (h[2] = M), H = Sb(h), H - F < fb && (a[0] = H - fb, a[1] = p(u.min, H - fb), F = Ib(a)))
  9676. }
  9677. function j(a) {
  9678. var b, c = u.tickInterval,
  9679. d = u.tickPixelInterval;
  9680. da ? (na = m[t ? "xAxis" : "yAxis"][u.linkedTo], b = na.getExtremes(), F = p(b.min, b.dataMin), H = p(b.max, b.dataMax), u.type !== na.options.type && jc(11, 1)) : (F = p(ba, u.min, C), H = p(ca, u.max, M));
  9681. R && (!a && Ua(F, C) <= 0 && jc(10, 1), F = nb(F), H = nb(H));
  9682. ja && (ba = F = W(F, H - ja), ca = H, a && (ja = null));
  9683. i();
  9684. if (!Va && !Ha && !da && s(F) && s(H)) {
  9685. b = H - F || 1;
  9686. if (!s(u.min) && !s(ba) && Ea && (C < 0 || !Ma)) F -= b * Ea;
  9687. if (!s(u.max) && !s(ca) && Ja && (M > 0 || !Na)) H += b * Ja
  9688. }
  9689. Oa = F === H || F === void 0 || H === void 0 ? 1 : da && !c && d === na.options.tickPixelInterval ? na.tickInterval : p(c, Va ? 1 : (H - F) * d / (D || 1));
  9690. t && !a && o(B.series, function (a) {
  9691. a.processData(F !== ma || H !== za)
  9692. });
  9693. ib();
  9694. B.beforeSetTickPositions && B.beforeSetTickPositions();
  9695. B.postProcessTickInterval && (Oa = B.postProcessTickInterval(Oa));
  9696. !V && !R && (Wa = oa.pow(10, Ta(oa.log(Oa) / oa.LN10)), s(u.tickInterval) || (Oa = ec(Oa, null, Wa, u)));
  9697. B.tickInterval = Oa;
  9698. Ga = u.minorTickInterval === "auto" && Oa ? Oa / 5 : u.minorTickInterval;
  9699. (N = u.tickPositions || Xa && Xa.apply(B, [F, H])) || (N = V ? (B.getNonLinearTimeTicks || Lc)(Kc(Oa, u.units), F, H, u.startOfWeek, B.ordinalPositions, B.closestPointRange, !0) : R ? g(Oa, F, H) : f(Oa, F, H));
  9700. if (!da && (a = N[0], c = N[N.length - 1], u.startOnTick ? F = a : F > a && N.shift(), u.endOnTick ? H = c : H < c && N.pop(), gb || (gb = {
  9701. x: 0,
  9702. y: 0
  9703. }), !V && N.length > gb[w] && u.alignTicks !== !1)) gb[w] = N.length
  9704. }
  9705. function k(a) {
  9706. a = (new c(a)).render();
  9707. ta.push(a);
  9708. return a
  9709. }
  9710. function l() {
  9711. var a = u.title,
  9712. d = u.stackLabels,
  9713. e = u.alternateGridColor,
  9714. f = u.lineWidth,
  9715. g, i, j = m.hasRendered && s(ma) && !isNaN(ma),
  9716. n = (g = B.series.length && s(F) && s(H)) || p(u.showEmpty, !0),
  9717. Y, q;
  9718. if (g || da) if (Ga && !Va && o(h(), function (a) {
  9719. va[a] || (va[a] = new b(a, "minor"));
  9720. j && va[a].isNew && va[a].render(null, !0);
  9721. va[a].isActive = !0;
  9722. va[a].render()
  9723. }), o(N.slice(1).concat([N[0]]), function (a, c) {
  9724. c = c === N.length - 1 ? 0 : c + 1;
  9725. if (!da || a >= F && a <= H) Pa[a] || (Pa[a] = new b(a)), j && Pa[a].isNew && Pa[a].render(c, !0), Pa[a].isActive = !0, Pa[a].render(c)
  9726. }), e && o(N, function (a, b) {
  9727. if (b % 2 === 0 && a < H) Da[a] || (Da[a] = new c), Y = a, q = N[b + 1] !== X ? N[b + 1] : H, Da[a].options = {
  9728. from: R ? cb(Y) : Y,
  9729. to: R ? cb(q) : q,
  9730. color: e
  9731. }, Da[a].render(), Da[a].isActive = !0
  9732. }), !B._addedPlotLB) o((u.plotLines || []).concat(u.plotBands || []), function (a) {
  9733. k(a)
  9734. }), B._addedPlotLB = !0;
  9735. o([Pa, va, Da], function (a) {
  9736. for (var b in a) a[b].isActive ? a[b].isActive = !1 : (a[b].destroy(), delete a[b])
  9737. });
  9738. f && (g = x + (y ? A : 0) + T, i = ra - Lb - (y ? hb : 0) + T, g = I.crispLine([wa, G ? x : g, G ? i : E, fa, G ? sa - Zb : g, G ? i : ra - Lb], f), $ ? $.animate({
  9739. d: g
  9740. }) : $ = I.path(g).attr({
  9741. stroke: u.lineColor,
  9742. "stroke-width": f,
  9743. zIndex: 7
  9744. }).add(), $[n ? "show" : "hide"]());
  9745. if (v && n) n = G ? x : E, f = S(a.style.fontSize || 12), n = {
  9746. low: n + (G ? 0 : D),
  9747. middle: n + D / 2,
  9748. high: n + (G ? D : 0)
  9749. }[a.align], f = (G ? E + hb : x) + (G ? 1 : -1) * (y ? -1 : 1) * Ya + (r === 2 ? f : 0), v[v.isNew ? "attr" : "animate"]({
  9750. x: G ? n : f + (y ? A : 0) + T + (a.x || 0),
  9751. y: G ? f - (y ? hb : 0) + T : n + (a.y || 0)
  9752. }), v.isNew = !1;
  9753. if (d && d.enabled) {
  9754. var t, yc, d = B.stackTotalGroup;
  9755. if (!d) B.stackTotalGroup = d = I.g("stack-labels").attr({
  9756. visibility: eb,
  9757. zIndex: 6
  9758. }).translate(O, J).add();
  9759. for (t in qa) for (yc in a = qa[t], a) a[yc].render(d)
  9760. }
  9761. B.isDirty = !1
  9762. }
  9763. function n(a) {
  9764. for (var b = ta.length; b--;) ta[b].id === a && ta[b].destroy()
  9765. }
  9766. var t = a.isX,
  9767. y = a.opposite,
  9768. G = U ? !t : t,
  9769. r = G ? y ? 0 : 2 : y ? 1 : 3,
  9770. qa = {}, u = K(t ? $b : kc, [Nc, Oc, zc, Pc][r], a),
  9771. B = this,
  9772. v, Z = u.type,
  9773. V = Z === "datetime",
  9774. R = Z === "logarithmic",
  9775. T = u.offset || 0,
  9776. w = t ? "x" : "y",
  9777. D = 0,
  9778. ua, ia, bb, jb, x, E, A, hb, Lb, Zb, Mb, ib, P, Q, bc, $, C, M, fb = u.minRange || u.maxZoom,
  9779. ja = u.range,
  9780. ba, ca, Aa, Ca, H = null,
  9781. F = null,
  9782. ma, za, Ea = u.minPadding,
  9783. Ja = u.maxPadding,
  9784. Ka = 0,
  9785. da = s(u.linkedTo),
  9786. na, Ma, Na, Ha, Z = u.events,
  9787. Sa, ta = [],
  9788. Oa, Ga, Wa, N, Xa = u.tickPositioner,
  9789. Pa = {}, va = {}, Da = {}, Fa, La, Ya, Va = u.categories,
  9790. db = u.labels.formatter || function () {
  9791. var a = this.value,
  9792. b = this.dateTimeLabelFormat;
  9793. return b ? ac(b, a) : Oa % 1E6 === 0 ? a / 1E6 + "M" : Oa % 1E3 === 0 ? a / 1E3 + "k" : !Va && a >= 1E3 ? dc(a, 0) : a
  9794. }, Ra = G && u.labels.staggerLines,
  9795. ya = u.reversed,
  9796. Ia = Va && u.tickmarkPlacement === "between" ? 0.5 : 0;
  9797. b.prototype = {
  9798. addLabel: function () {
  9799. var a = this.pos,
  9800. b = u.labels,
  9801. c = Va && G && Va.length && !b.step && !b.staggerLines && !b.rotation && ka / Va.length || !G && ka / 2,
  9802. d = a === N[0],
  9803. e = a === N[N.length - 1],
  9804. f = Va && s(Va[a]) ? Va[a] : a,
  9805. g = this.label,
  9806. h = N.info,
  9807. i;
  9808. V && h && (i = u.dateTimeLabelFormats[h.higherRanks[a] || h.unitName]);
  9809. this.isFirst = d;
  9810. this.isLast = e;
  9811. a = db.call({
  9812. axis: B,
  9813. chart: m,
  9814. isFirst: d,
  9815. isLast: e,
  9816. dateTimeLabelFormat: i,
  9817. value: R ? Cb(cb(f)) : f
  9818. });
  9819. c = c && {
  9820. width: W(1, z(c - 2 * (b.padding || 10))) + ga
  9821. };
  9822. c = L(c, b.style);
  9823. s(g) ? g && g.attr({
  9824. text: a
  9825. }).css(c) : this.label = s(a) && b.enabled ? I.text(a, 0, 0, b.useHTML).attr({
  9826. align: b.align,
  9827. rotation: b.rotation
  9828. }).css(c).add(Q) : null
  9829. },
  9830. getLabelSize: function () {
  9831. var a = this.label;
  9832. return a ? (this.labelBBox = a.getBBox())[G ? "height" : "width"] : 0
  9833. },
  9834. getLabelSides: function () {
  9835. var a = u.labels,
  9836. b = this.labelBBox.width,
  9837. a = b * {
  9838. left: 0,
  9839. center: 0.5,
  9840. right: 1
  9841. }[a.align] - a.x;
  9842. return [-a, b - a]
  9843. },
  9844. handleOverflow: function (a) {
  9845. var b = !0,
  9846. c = this.isFirst,
  9847. d = this.isLast,
  9848. e = this.label,
  9849. f = e.x;
  9850. if (c || d) {
  9851. var g = this.getLabelSides(),
  9852. h = g[0],
  9853. g = g[1],
  9854. i = m.plotLeft,
  9855. j = i + B.len,
  9856. k = (a = Pa[N[a + (c ? 1 : -1)]]) && a.label.x + a.getLabelSides()[c ? 0 : 1];
  9857. c && !ya || d && ya ? f + h < i && (f = i - h, a && f + g > k && (b = !1)) : f + g > j && (f = j - g, a && f + h < k && (b = !1));
  9858. e.x = f
  9859. }
  9860. return b
  9861. },
  9862. render: function (a, b) {
  9863. var c = this.type,
  9864. d = this.label,
  9865. e = this.pos,
  9866. f = u.labels,
  9867. g = this.gridLine,
  9868. h = c ? c + "Grid" : "grid",
  9869. i = c ? c + "Tick" : "tick",
  9870. j = u[h + "LineWidth"],
  9871. k = u[h + "LineColor"],
  9872. n = u[h + "LineDashStyle"],
  9873. m = u[i + "Length"],
  9874. h = u[i + "Width"] || 0,
  9875. l = u[i + "Color"],
  9876. Y = u[i + "Position"],
  9877. i = this.mark,
  9878. q = f.step,
  9879. ea = b && Za || ra,
  9880. qa = !0,
  9881. o;
  9882. o = G ? Mb(e + Ia, null, null, b) + bb : x + T + (y ? (b && $a || sa) - Zb - x : 0);
  9883. ea = G ? ea - Lb + T - (y ? hb : 0) : ea - Mb(e + Ia, null, null, b) - bb;
  9884. if (j) {
  9885. e = P(e + Ia, j, b);
  9886. if (g === X) {
  9887. g = {
  9888. stroke: k,
  9889. "stroke-width": j
  9890. };
  9891. if (n) g.dashstyle = n;
  9892. if (!c) g.zIndex = 1;
  9893. this.gridLine = g = j ? I.path(e).attr(g).add(bc) : null
  9894. }!b && g && e && g.animate({
  9895. d: e
  9896. })
  9897. }
  9898. if (h) Y === "inside" && (m = -m), y && (m = -m), c = I.crispLine([wa, o, ea, fa, o + (G ? 0 : -m), ea + (G ? m : 0)], h), i ? i.animate({
  9899. d: c
  9900. }) : this.mark = I.path(c).attr({
  9901. stroke: l,
  9902. "stroke-width": h
  9903. }).add(Q);
  9904. if (d && !isNaN(o)) o = o + f.x - (Ia && G ? Ia * ia * (ya ? -1 : 1) : 0), ea = ea + f.y - (Ia && !G ? Ia * ia * (ya ? 1 : -1) : 0), s(f.y) || (ea += S(d.styles.lineHeight) * 0.9 - d.getBBox().height / 2), Ra && (ea += a / (q || 1) % Ra * 16), d.x = o, d.y = ea, this.isFirst && !p(u.showFirstLabel, 1) || this.isLast && !p(u.showLastLabel, 1) ? qa = !1 : !Ra && G && f.overflow === "justify" && !this.handleOverflow(a) && (qa = !1), q && a % q && (qa = !1), qa ? (d[this.isNew ? "attr" : "animate"]({
  9905. x: d.x,
  9906. y: d.y
  9907. }), d.show(), this.isNew = !1) : d.hide()
  9908. },
  9909. destroy: function () {
  9910. Jb(this)
  9911. }
  9912. };
  9913. c.prototype = {
  9914. render: function () {
  9915. var a = this,
  9916. b = (B.pointRange || 0) / 2,
  9917. c = a.options,
  9918. d = c.label,
  9919. e = a.label,
  9920. f = c.width,
  9921. g = c.to,
  9922. h = c.from,
  9923. i = c.value,
  9924. j, k = c.dashStyle,
  9925. n = a.svgElem,
  9926. m = [],
  9927. l, Y, u = c.color;
  9928. Y = c.zIndex;
  9929. var ea = c.events;
  9930. R && (h = nb(h), g = nb(g), i = nb(i));
  9931. if (f) {
  9932. if (m = P(i, f), b = {
  9933. stroke: u,
  9934. "stroke-width": f
  9935. }, k) b.dashstyle = k
  9936. } else if (s(h) && s(g)) h = W(h, F - b), g = Ua(g, H + b), j = P(g), (m = P(h)) && j ? m.push(j[4], j[5], j[1], j[2]) : m = null, b = {
  9937. fill: u
  9938. };
  9939. else return;
  9940. if (s(Y)) b.zIndex = Y;
  9941. if (n) m ? n.animate({
  9942. d: m
  9943. }, null, n.onGetPath) : (n.hide(), n.onGetPath = function () {
  9944. n.show()
  9945. });
  9946. else if (m && m.length && (a.svgElem = n = I.path(m).attr(b).add(), ea)) for (l in k = function (b) {
  9947. n.on(b, function (c) {
  9948. ea[b].apply(a, [c])
  9949. })
  9950. }, ea) k(l);
  9951. if (d && s(d.text) && m && m.length && A > 0 && hb > 0) {
  9952. d = K({
  9953. align: G && j && "center",
  9954. x: G ? !j && 4 : 10,
  9955. verticalAlign: !G && j && "middle",
  9956. y: G ? j ? 16 : 10 : j ? 6 : -4,
  9957. rotation: G && !j && 90
  9958. }, d);
  9959. if (!e) a.label = e = I.text(d.text, 0, 0).attr({
  9960. align: d.textAlign || d.align,
  9961. rotation: d.rotation,
  9962. zIndex: Y
  9963. }).css(d.style).add();
  9964. j = [m[1], m[4], p(m[6], m[1])];
  9965. m = [m[2], m[5], p(m[7], m[2])];
  9966. l = Sb(j);
  9967. Y = Sb(m);
  9968. e.align(d, !1, {
  9969. x: l,
  9970. y: Y,
  9971. width: Ib(j) - l,
  9972. height: Ib(m) - Y
  9973. });
  9974. e.show()
  9975. } else e && e.hide();
  9976. return a
  9977. },
  9978. destroy: function () {
  9979. Jb(this);
  9980. Gb(ta, this)
  9981. }
  9982. };
  9983. d.prototype = {
  9984. destroy: function () {
  9985. Jb(this)
  9986. },
  9987. setTotal: function (a) {
  9988. this.cum = this.total = a
  9989. },
  9990. render: function (a) {
  9991. var b = this.options.formatter.call(this);
  9992. this.label ? this.label.attr({
  9993. text: b,
  9994. visibility: ab
  9995. }) : this.label = m.renderer.text(b, 0, 0).css(this.options.style).attr({
  9996. align: this.textAlign,
  9997. rotation: this.options.rotation,
  9998. visibility: ab
  9999. }).add(a)
  10000. },
  10001. setOffset: function (a, b) {
  10002. var c = this.isNegative,
  10003. d = B.translate(this.total, 0, 0, 0, 1),
  10004. e = B.translate(0),
  10005. e = Ba(d - e),
  10006. f = m.xAxis[0].translate(this.x) + a,
  10007. g = m.plotHeight,
  10008. c = {
  10009. x: U ? c ? d : d - e : f,
  10010. y: U ? g - f - b : c ? g - d - e : g - d,
  10011. width: U ? e : b,
  10012. height: U ? b : e
  10013. };
  10014. this.label && this.label.align(this.alignOptions, null, c).attr({
  10015. visibility: eb
  10016. })
  10017. }
  10018. };
  10019. Mb = function (a, b, c, d, e) {
  10020. var f = 1,
  10021. g = 0,
  10022. h = d ? jb : ia,
  10023. d = d ? ma : F,
  10024. e = u.ordinal || R && e;
  10025. h || (h = ia);
  10026. c && (f *= -1, g = D);
  10027. ya && (f *= -1, g -= f * D);
  10028. b ? (ya && (a = D - a), a = a / h + d, e && (a = B.lin2val(a))) : (e && (a = B.val2lin(a)), a = f * (a - d) * h + g + f * Ka);
  10029. return a
  10030. };
  10031. P = function (a, b, c) {
  10032. var d, e, f, a = Mb(a, null, null, c),
  10033. g = c && Za || ra,
  10034. h = c && $a || sa,
  10035. i, c = e = z(a + bb);
  10036. d = f = z(g - a - bb);
  10037. if (isNaN(a)) i = !0;
  10038. else if (G) {
  10039. if (d = E, f = g - Lb, c < x || c > x + A) i = !0
  10040. } else if (c = x, e = h - Zb, d < E || d > E + hb) i = !0;
  10041. return i ? null : I.crispLine([wa, c, d, fa, e, f], b || 0)
  10042. };
  10043. ib = function () {
  10044. var a = H - F,
  10045. b = 0,
  10046. c, d;
  10047. if (t) da ? b = na.pointRange : o(B.series, function (a) {
  10048. b = W(b, a.pointRange);
  10049. d = a.closestPointRange;
  10050. !a.noSharedTooltip && s(d) && (c = s(c) ? Ua(c, d) : d)
  10051. }), B.pointRange = b, B.closestPointRange = c;
  10052. jb = ia;
  10053. B.translationSlope = ia = D / (a + b || 1);
  10054. bb = G ? x : Lb;
  10055. Ka = ia * (b / 2)
  10056. };
  10057. xa.push(B);
  10058. m[t ? "xAxis" : "yAxis"].push(B);
  10059. U && t && ya === X && (ya = !0);
  10060. L(B, {
  10061. addPlotBand: k,
  10062. addPlotLine: k,
  10063. adjustTickAmount: function () {
  10064. if (gb && gb[w] && !V && !Va && !da && u.alignTicks !== !1) {
  10065. var a = Fa,
  10066. b = N.length;
  10067. Fa = gb[w];
  10068. if (b < Fa) {
  10069. for (; N.length < Fa;) N.push(Cb(N[N.length - 1] + Oa));
  10070. ia *= (b - 1) / (Fa - 1);
  10071. H = N[N.length - 1]
  10072. }
  10073. if (s(a) && Fa !== a) B.isDirty = !0
  10074. }
  10075. },
  10076. categories: Va,
  10077. getExtremes: function () {
  10078. return {
  10079. min: R ? Cb(cb(F)) : F,
  10080. max: R ? Cb(cb(H)) : H,
  10081. dataMin: C,
  10082. dataMax: M,
  10083. userMin: ba,
  10084. userMax: ca
  10085. }
  10086. },
  10087. getPlotLinePath: P,
  10088. getThreshold: function (a) {
  10089. var b = R ? cb(F) : F,
  10090. c = R ? cb(H) : H;
  10091. b > a || a === null ? a = b : c < a && (a = c);
  10092. return Mb(a, 0, 1, 0, 1)
  10093. },
  10094. isXAxis: t,
  10095. options: u,
  10096. plotLinesAndBands: ta,
  10097. getOffset: function () {
  10098. var a = B.series.length && s(F) && s(H),
  10099. c = a || p(u.showEmpty, !0),
  10100. d = 0,
  10101. e, f = 0,
  10102. g = u.title,
  10103. h = u.labels,
  10104. i = [-1, 1, 1, - 1][r],
  10105. j;
  10106. Q || (Q = I.g("axis").attr({
  10107. zIndex: 7
  10108. }).add(), bc = I.g("grid").attr({
  10109. zIndex: u.gridZIndex || 1
  10110. }).add());
  10111. La = 0;
  10112. if (a || da) o(N, function (a) {
  10113. Pa[a] ? Pa[a].addLabel() : Pa[a] = new b(a)
  10114. }), o(N, function (a) {
  10115. if (r === 0 || r === 2 || {
  10116. 1: "left",
  10117. 3: "right"
  10118. }[r] === h.align) La = W(Pa[a].getLabelSize(), La)
  10119. }), Ra && (La += (Ra - 1) * 16);
  10120. else for (j in Pa) Pa[j].destroy(), delete Pa[j];
  10121. if (g && g.text) {
  10122. if (!v) v = B.axisTitle = I.text(g.text, 0, 0, g.useHTML).attr({
  10123. zIndex: 7,
  10124. rotation: g.rotation || 0,
  10125. align: g.textAlign || {
  10126. low: "left",
  10127. middle: "center",
  10128. high: "right"
  10129. }[g.align]
  10130. }).css(g.style).add(), v.isNew = !0;
  10131. if (c) d = v.getBBox()[G ? "height" : "width"], f = p(g.margin, G ? 5 : 10), e = g.offset;
  10132. v[c ? "show" : "hide"]()
  10133. }
  10134. T = i * p(u.offset, pa[r]);
  10135. Ya = p(e, La + f + (r !== 2 && La && i * u.labels[G ? "y" : "x"]));
  10136. pa[r] = W(pa[r], Ya + d + i * T)
  10137. },
  10138. render: l,
  10139. setAxisSize: function () {
  10140. var a = u.offsetLeft || 0,
  10141. b = u.offsetRight || 0;
  10142. x = p(u.left, O + a);
  10143. E = p(u.top, J);
  10144. A = p(u.width, ka - a + b);
  10145. hb = p(u.height, la);
  10146. Lb = ra - hb - E;
  10147. Zb = sa - A - x;
  10148. D = G ? A : hb;
  10149. B.left = x;
  10150. B.top = E;
  10151. B.len = D
  10152. },
  10153. setAxisTranslation: ib,
  10154. setCategories: function (b, c) {
  10155. B.categories = a.categories = Va = b;
  10156. o(B.series, function (a) {
  10157. a.translate();
  10158. a.setTooltipPoints(!0)
  10159. });
  10160. B.isDirty = !0;
  10161. p(c, !0) && m.redraw()
  10162. },
  10163. setExtremes: function (a, b, c, d, e) {
  10164. c = p(c, !0);
  10165. e = L(e, {
  10166. min: a,
  10167. max: b
  10168. });
  10169. aa(B, "setExtremes", e, function () {
  10170. ba = a;
  10171. ca = b;
  10172. B.isDirtyExtremes = !0;
  10173. c && m.redraw(d)
  10174. })
  10175. },
  10176. setScale: function () {
  10177. var a, b, c, d;
  10178. ma = F;
  10179. za = H;
  10180. ua = D;
  10181. D = G ? A : hb;
  10182. d = D !== ua;
  10183. o(B.series, function (a) {
  10184. if (a.isDirtyData || a.isDirty || a.xAxis.isDirty) c = !0
  10185. });
  10186. if (d || c || da || ba !== Aa || ca !== Ca) {
  10187. e();
  10188. j();
  10189. Aa = ba;
  10190. Ca = ca;
  10191. if (!t) for (a in qa) for (b in qa[a]) qa[a][b].cum = qa[a][b].total;
  10192. if (!B.isDirty) B.isDirty = d || F !== ma || H !== za
  10193. }
  10194. },
  10195. setTickPositions: j,
  10196. translate: Mb,
  10197. redraw: function () {
  10198. ub.resetTracker && ub.resetTracker();
  10199. l();
  10200. o(ta, function (a) {
  10201. a.render()
  10202. });
  10203. o(B.series, function (a) {
  10204. a.isDirty = !0
  10205. })
  10206. },
  10207. removePlotBand: n,
  10208. removePlotLine: n,
  10209. reversed: ya,
  10210. setTitle: function (a, b) {
  10211. u.title = K(u.title, a);
  10212. v = v.destroy();
  10213. B.isDirty = !0;
  10214. p(b, !0) && m.redraw()
  10215. },
  10216. series: [],
  10217. stacks: qa,
  10218. destroy: function () {
  10219. var a;
  10220. Qa(B);
  10221. for (a in qa) Jb(qa[a]), qa[a] = null;
  10222. if (B.stackTotalGroup) B.stackTotalGroup = B.stackTotalGroup.destroy();
  10223. o([Pa, va, Da, ta], function (a) {
  10224. Jb(a)
  10225. });
  10226. o([$, Q, bc, v], function (a) {
  10227. a && a.destroy()
  10228. });
  10229. $ = Q = bc = v = null
  10230. }
  10231. });
  10232. for (Sa in Z) ha(B, Sa, Z[Sa]);
  10233. if (R) B.val2lin = nb, B.lin2val = cb
  10234. }
  10235. function d(a) {
  10236. function b() {
  10237. var c = this.points || Hb(this),
  10238. d = c[0].series,
  10239. e;
  10240. e = [d.tooltipHeaderFormatter(c[0].key)];
  10241. o(c, function (a) {
  10242. d = a.series;
  10243. e.push(d.tooltipFormatter && d.tooltipFormatter(a) || a.point.tooltipFormatter(d.tooltipOptions.pointFormat))
  10244. });
  10245. e.push(a.footerFormat || "");
  10246. return e.join("")
  10247. }
  10248. function c(a, b) {
  10249. l = n ? a : (2 * l + a) / 3;
  10250. q = n ? b : (q + b) / 2;
  10251. t.attr({
  10252. x: l,
  10253. y: q
  10254. });
  10255. lb = Ba(a - l) > 1 || Ba(b - q) > 1 ? function () {
  10256. c(a, b)
  10257. } : null
  10258. }
  10259. function d() {
  10260. if (!n) {
  10261. var a = m.hoverPoints;
  10262. t.hide();
  10263. a && o(a, function (a) {
  10264. a.setState()
  10265. });
  10266. m.hoverPoints = null;
  10267. n = !0
  10268. }
  10269. }
  10270. var e, f = a.borderWidth,
  10271. g = a.crosshairs,
  10272. h = [],
  10273. i = a.style,
  10274. j = a.shared,
  10275. k = S(i.padding),
  10276. n = !0,
  10277. l = 0,
  10278. q = 0;
  10279. i.padding = 0;
  10280. var t = I.label("", 0, 0, null, null, null, a.useHTML).attr({
  10281. padding: k,
  10282. fill: a.backgroundColor,
  10283. "stroke-width": f,
  10284. r: a.borderRadius,
  10285. zIndex: 8
  10286. }).css(i).hide().add();
  10287. Fa || t.shadow(a.shadow);
  10288. return {
  10289. shared: j,
  10290. refresh: function (f) {
  10291. var i, k, l, q, r = {}, y = [];
  10292. l = f.tooltipPos;
  10293. i = a.formatter || b;
  10294. var r = m.hoverPoints,
  10295. v;
  10296. j && (!f.series || !f.series.noSharedTooltip) ? (q = 0, r && o(r, function (a) {
  10297. a.setState()
  10298. }), m.hoverPoints = f, o(f, function (a) {
  10299. a.setState(ta);
  10300. q += a.plotY;
  10301. y.push(a.getLabelConfig())
  10302. }), k = f[0].plotX, q = z(q) / f.length, r = {
  10303. x: f[0].category
  10304. }, r.points = y, f = f[0]) : r = f.getLabelConfig();
  10305. r = i.call(r);
  10306. e = f.series;
  10307. k = p(k, f.plotX);
  10308. q = p(q, f.plotY);
  10309. i = z(l ? l[0] : U ? ka - q : k);
  10310. k = z(l ? l[1] : U ? la - k : q);
  10311. l = j || !e.isCartesian || e.tooltipOutsidePlot || Db(i, k);
  10312. r === !1 || !l ? d() : (n && (t.show(), n = !1), t.attr({
  10313. text: r
  10314. }), v = a.borderColor || f.color || e.color || "#606060", t.attr({
  10315. stroke: v
  10316. }), l = uc(t.width, t.height, O, J, ka, la, {
  10317. x: i,
  10318. y: k
  10319. }, p(a.distance, 12), U), c(z(l.x), z(l.y)));
  10320. if (g) {
  10321. g = Hb(g);
  10322. var R;
  10323. l = g.length;
  10324. for (var Z; l--;) if (R = f.series[l ? "yAxis" : "xAxis"], g[l] && R) if (R = R.getPlotLinePath(l ? p(f.stackY, f.y) : f.x, 1), h[l]) h[l].attr({
  10325. d: R,
  10326. visibility: eb
  10327. });
  10328. else {
  10329. Z = {
  10330. "stroke-width": g[l].width || 1,
  10331. stroke: g[l].color || "#C0C0C0",
  10332. zIndex: g[l].zIndex || 2
  10333. };
  10334. if (g[l].dashStyle) Z.dashstyle = g[l].dashStyle;
  10335. h[l] = I.path(R).attr(Z).add()
  10336. }
  10337. }
  10338. aa(m, "tooltipRefresh", {
  10339. text: r,
  10340. x: i + O,
  10341. y: k + J,
  10342. borderColor: v
  10343. })
  10344. },
  10345. hide: d,
  10346. hideCrosshairs: function () {
  10347. o(h, function (a) {
  10348. a && a.hide()
  10349. })
  10350. },
  10351. destroy: function () {
  10352. o(h, function (a) {
  10353. a && a.destroy()
  10354. });
  10355. t && (t = t.destroy())
  10356. }
  10357. }
  10358. }
  10359. function e(a) {
  10360. function b(a) {
  10361. var c, d, e, a = a || ca.event;
  10362. if (!a.target) a.target = a.srcElement;
  10363. if (a.originalEvent) a = a.originalEvent;
  10364. if (a.event) a = a.event;
  10365. c = a.touches ? a.touches.item(0) : a;
  10366. ya = Ac(D);
  10367. d = ya.left;
  10368. e = ya.top;
  10369. Qb ? (d = a.x, c = a.y) : (d = c.pageX - d, c = c.pageY - e);
  10370. return L(a, {
  10371. chartX: z(d),
  10372. chartY: z(c)
  10373. })
  10374. }
  10375. function c(a) {
  10376. var b = {
  10377. xAxis: [],
  10378. yAxis: []
  10379. };
  10380. o(xa, function (c) {
  10381. var d = c.translate,
  10382. e = c.isXAxis;
  10383. b[e ? "xAxis" : "yAxis"].push({
  10384. axis: c,
  10385. value: d((U ? !e : e) ? a.chartX - O : la - a.chartY + J, !0)
  10386. })
  10387. });
  10388. return b
  10389. }
  10390. function e() {
  10391. var a = m.hoverSeries,
  10392. b = m.hoverPoint;
  10393. if (b) b.onMouseOut();
  10394. if (a) a.onMouseOut();
  10395. vb && (vb.hide(), vb.hideCrosshairs());
  10396. ob = null
  10397. }
  10398. function f() {
  10399. if (n) {
  10400. var a = {
  10401. xAxis: [],
  10402. yAxis: []
  10403. }, b = n.getBBox(),
  10404. c = b.x - O,
  10405. d = b.y - J;
  10406. k && (o(xa, function (e) {
  10407. if (e.options.zoomEnabled !== !1) {
  10408. var f = e.translate,
  10409. g = e.isXAxis,
  10410. h = U ? !g : g,
  10411. i = f(h ? c : la - d - b.height, !0, 0, 0, 1),
  10412. f = f(h ? c + b.width : la - d, !0, 0, 0, 1);
  10413. a[g ? "xAxis" : "yAxis"].push({
  10414. axis: e,
  10415. min: Ua(i, f),
  10416. max: W(i, f)
  10417. })
  10418. }
  10419. }), aa(m, "selection", a, zb));
  10420. n = n.destroy()
  10421. }
  10422. P(D, {
  10423. cursor: "auto"
  10424. });
  10425. m.mouseIsDown = Da = k = !1;
  10426. Qa(x, Ga ? "touchend" : "mouseup", f)
  10427. }
  10428. function g(a) {
  10429. var b = s(a.pageX) ? a.pageX : a.page.x,
  10430. a = s(a.pageX) ? a.pageY : a.page.y;
  10431. ya && !Db(b - ya.left - O, a - ya.top - J) && e()
  10432. }
  10433. function h() {
  10434. e();
  10435. ya = null
  10436. }
  10437. var i, j, k, n, l = Fa ? "" : q.zoomType,
  10438. t = /x/.test(l),
  10439. r = /y/.test(l),
  10440. y = t && !U || r && U,
  10441. p = r && !U || t && U;
  10442. if (!db) m.trackerGroup = db = I.g("tracker").attr({
  10443. zIndex: 9
  10444. }).add();
  10445. if (a.enabled) m.tooltip = vb = d(a), Bb = setInterval(function () {
  10446. lb && lb()
  10447. }, 32);
  10448. (function () {
  10449. D.onmousedown = function (a) {
  10450. a = b(a);
  10451. !Ga && a.preventDefault && a.preventDefault();
  10452. m.mouseIsDown = Da = !0;
  10453. m.mouseDownX = i = a.chartX;
  10454. j = a.chartY;
  10455. ha(x, Ga ? "touchend" : "mouseup", f)
  10456. };
  10457. var d = function (c) {
  10458. if (!c || !(c.touches && c.touches.length > 1)) {
  10459. c = b(c);
  10460. if (!Ga) c.returnValue = !1;
  10461. var d = c.chartX,
  10462. e = c.chartY,
  10463. f = !Db(d - O, e - J);
  10464. Ga && c.type === "touchstart" && (A(c.target, "isTracker") ? m.runTrackerClick || c.preventDefault() : !kb && !f && c.preventDefault());
  10465. f && (d < O ? d = O : d > O + ka && (d = O + ka), e < J ? e = J : e > J + la && (e = J + la));
  10466. if (Da && c.type !== "touchstart") {
  10467. if (k = Math.sqrt(Math.pow(i - d, 2) + Math.pow(j - e, 2)), k > 10) {
  10468. var g = Db(i - O, j - J);
  10469. if (Nb && (t || r) && g) n || (n = I.rect(O, J, y ? 1 : ka, p ? 1 : la, 0).attr({
  10470. fill: q.selectionMarkerFill || "rgba(69,114,167,0.25)",
  10471. zIndex: 7
  10472. }).add());
  10473. n && y && (c = d - i, n.attr({
  10474. width: Ba(c),
  10475. x: (c > 0 ? 0 : c) + i
  10476. }));
  10477. n && p && (e -= j, n.attr({
  10478. height: Ba(e),
  10479. y: (e > 0 ? 0 : e) + j
  10480. }));
  10481. g && !n && q.panning && m.pan(d)
  10482. }
  10483. } else if (!f) {
  10484. var h, d = m.hoverPoint,
  10485. e = m.hoverSeries,
  10486. l, o, g = sa,
  10487. R = U ? c.chartY : c.chartX - O;
  10488. if (vb && a.shared && (!e || !e.noSharedTooltip)) {
  10489. h = [];
  10490. l = Q.length;
  10491. for (o = 0; o < l; o++) if (Q[o].visible && Q[o].options.enableMouseTracking !== !1 && !Q[o].noSharedTooltip && Q[o].tooltipPoints.length) c = Q[o].tooltipPoints[R], c._dist = Ba(R - c.plotX), g = Ua(g, c._dist), h.push(c);
  10492. for (l = h.length; l--;) h[l]._dist > g && h.splice(l, 1);
  10493. if (h.length && h[0].plotX !== ob) vb.refresh(h), ob = h[0].plotX
  10494. }
  10495. if (e && e.tracker && (c = e.tooltipPoints[R]) && c !== d) c.onMouseOver()
  10496. }
  10497. return f || !Nb
  10498. }
  10499. };
  10500. D.onmousemove = d;
  10501. ha(D, "mouseleave", h);
  10502. ha(x, "mousemove", g);
  10503. D.ontouchstart = function (a) {
  10504. if (t || r) D.onmousedown(a);
  10505. d(a)
  10506. };
  10507. D.ontouchmove = d;
  10508. D.ontouchend = function () {
  10509. k && e()
  10510. };
  10511. D.onclick = function (a) {
  10512. var d = m.hoverPoint,
  10513. a = b(a);
  10514. a.cancelBubble = !0;
  10515. if (!k) if (d && (A(a.target, "isTracker") || A(a.target.parentNode, "isTracker"))) {
  10516. var e = d.plotX,
  10517. f = d.plotY;
  10518. L(d, {
  10519. pageX: ya.left + O + (U ? ka - f : e),
  10520. pageY: ya.top + J + (U ? la - e : f)
  10521. });
  10522. aa(d.series, "click", L(a, {
  10523. point: d
  10524. }));
  10525. d.firePointEvent("click", a)
  10526. } else L(a, c(a)), Db(a.chartX - O, a.chartY - J) && aa(m, "click", a);
  10527. k = !1
  10528. }
  10529. })();
  10530. L(this, {
  10531. zoomX: t,
  10532. zoomY: r,
  10533. resetTracker: e,
  10534. normalizeMouseEvent: b,
  10535. destroy: function () {
  10536. if (m.trackerGroup) m.trackerGroup = db = m.trackerGroup.destroy();
  10537. Qa(D, "mouseleave", h);
  10538. Qa(x, "mousemove", g);
  10539. D.onclick = D.onmousedown = D.onmousemove = D.ontouchstart = D.ontouchend = D.ontouchmove = null
  10540. }
  10541. })
  10542. }
  10543. function f(a) {
  10544. var b = a.type || q.type || q.defaultSeriesType,
  10545. c = Ha[b],
  10546. d = m.hasRendered;
  10547. if (d) if (U && b === "column") c = Ha.bar;
  10548. else if (!U && b === "bar") c = Ha.column;
  10549. b = new c;
  10550. b.init(m, a);
  10551. !d && b.inverted && (U = !0);
  10552. if (b.isCartesian) Nb = b.isCartesian;
  10553. Q.push(b);
  10554. return b
  10555. }
  10556. function g() {
  10557. q.alignTicks !== !1 && o(xa, function (a) {
  10558. a.adjustTickAmount()
  10559. });
  10560. gb = null
  10561. }
  10562. function h(a) {
  10563. var b = m.isDirtyLegend,
  10564. c, d = m.isDirtyBox,
  10565. e = Q.length,
  10566. f = e,
  10567. h = m.clipRect;
  10568. for (Kb(a, m); f--;) if (a = Q[f], a.isDirty && a.options.stacking) {
  10569. c = !0;
  10570. break
  10571. }
  10572. if (c) for (f = e; f--;) if (a = Q[f], a.options.stacking) a.isDirty = !0;
  10573. o(Q, function (a) {
  10574. a.isDirty && a.options.legendType === "point" && (b = !0)
  10575. });
  10576. if (b && Xa.renderLegend) Xa.renderLegend(), m.isDirtyLegend = !1;
  10577. Nb && (La || (gb = null, o(xa, function (a) {
  10578. a.setScale()
  10579. })), g(), Wb(), o(xa, function (a) {
  10580. if (a.isDirtyExtremes) a.isDirtyExtremes = !1, aa(a, "afterSetExtremes", a.getExtremes());
  10581. if (a.isDirty || d) a.redraw(), d = !0
  10582. }));
  10583. d && (qb(), h && (Ob(h), h.animate({
  10584. width: m.plotSizeX,
  10585. height: m.plotSizeY + 1
  10586. })));
  10587. o(Q, function (a) {
  10588. a.isDirty && a.visible && (!a.isCartesian || a.xAxis) && a.redraw()
  10589. });
  10590. ub && ub.resetTracker && ub.resetTracker();
  10591. I.draw();
  10592. aa(m, "redraw")
  10593. }
  10594. function i() {
  10595. var a = v.xAxis || {}, b = v.yAxis || {}, a = Hb(a);
  10596. o(a, function (a, b) {
  10597. a.index = b;
  10598. a.isX = !0
  10599. });
  10600. b = Hb(b);
  10601. o(b, function (a, b) {
  10602. a.index = b
  10603. });
  10604. a = a.concat(b);
  10605. o(a, function (a) {
  10606. new c(a)
  10607. });
  10608. g()
  10609. }
  10610. function k() {
  10611. var a = Ea.lang,
  10612. b = q.resetZoomButton,
  10613. c = b.theme,
  10614. d = c.states,
  10615. e = b.relativeTo === "chart" ? null : {
  10616. x: O,
  10617. y: J,
  10618. width: ka,
  10619. height: la
  10620. };
  10621. m.resetZoomButton = I.button(a.resetZoom, null, null, Fb, c, d && d.hover).attr({
  10622. align: b.position.align,
  10623. title: a.resetZoomTitle
  10624. }).add().align(b.position, !1, e)
  10625. }
  10626. function j(a, b) {
  10627. $ = K(v.title, a);
  10628. ja = K(v.subtitle, b);
  10629. o([
  10630. ["title", a, $],
  10631. ["subtitle", b, ja]
  10632. ], function (a) {
  10633. var b = a[0],
  10634. c = m[b],
  10635. d = a[1],
  10636. a = a[2];
  10637. c && d && (c = c.destroy());
  10638. a && a.text && !c && (m[b] = I.text(a.text, 0, 0, a.useHTML).attr({
  10639. align: a.align,
  10640. "class": Ia + b,
  10641. zIndex: a.zIndex || 4
  10642. }).css(a.style).add().align(a, !1, ib))
  10643. })
  10644. }
  10645. function l() {
  10646. Ja = q.renderTo;
  10647. na = Ia + lc++;
  10648. Ab(Ja) && (Ja = x.getElementById(Ja));
  10649. Ja || jc(13, !0);
  10650. Ja.innerHTML = "";
  10651. Ja.offsetWidth || (C = Ja.cloneNode(0), P(C, {
  10652. position: wb,
  10653. top: "-9999px",
  10654. display: ""
  10655. }), x.body.appendChild(C));
  10656. za = (C || Ja).offsetWidth;
  10657. Ca = (C || Ja).offsetHeight;
  10658. m.chartWidth = sa = q.width || za || 600;
  10659. m.chartHeight = ra = q.height || (Ca > 19 ? Ca : 400);
  10660. m.container = D = Aa(Ra, {
  10661. className: Ia + "container" + (q.className ? " " + q.className : ""),
  10662. id: na
  10663. }, L({
  10664. position: mc,
  10665. overflow: ab,
  10666. width: sa + ga,
  10667. height: ra + ga,
  10668. textAlign: "left",
  10669. lineHeight: "normal"
  10670. }, q.style), C || Ja);
  10671. m.renderer = I = q.forExport ? new Eb(D, sa, ra, !0) : new Xb(D, sa, ra);
  10672. Fa && I.create(m, D, sa, ra);
  10673. var a, b;
  10674. Bc && D.getBoundingClientRect && (a = function () {
  10675. P(D, {
  10676. left: 0,
  10677. top: 0
  10678. });
  10679. b = D.getBoundingClientRect();
  10680. P(D, {
  10681. left: -(b.left - S(b.left)) + ga,
  10682. top: -(b.top - S(b.top)) + ga
  10683. })
  10684. }, a(), ha(ca, "resize", a), ha(m, "destroy", function () {
  10685. Qa(ca, "resize", a)
  10686. }))
  10687. }
  10688. function n() {
  10689. function a(c) {
  10690. var d = q.width || Ja.offsetWidth,
  10691. e = q.height || Ja.offsetHeight,
  10692. c = c ? c.target : ca;
  10693. if (d && e && (c === ca || c === x)) {
  10694. if (d !== za || e !== Ca) clearTimeout(b), b = setTimeout(function () {
  10695. tb(d, e, !1)
  10696. }, 100);
  10697. za = d;
  10698. Ca = e
  10699. }
  10700. }
  10701. var b;
  10702. ha(ca, "resize", a);
  10703. ha(m, "destroy", function () {
  10704. Qa(ca, "resize", a)
  10705. })
  10706. }
  10707. function t() {
  10708. m && aa(m, "endResize", null, function () {
  10709. La -= 1
  10710. })
  10711. }
  10712. function r() {
  10713. for (var a = U || q.inverted || q.type === "bar" || q.defaultSeriesType === "bar", b = v.series, c = b && b.length; !a && c--;) b[c].type === "bar" && (a = !0);
  10714. m.inverted = U = a
  10715. }
  10716. function Z() {
  10717. var a = v.labels,
  10718. b = v.credits,
  10719. c;
  10720. j();
  10721. Xa = m.legend = new Rb;
  10722. o(xa, function (a) {
  10723. a.setScale()
  10724. });
  10725. Wb();
  10726. o(xa, function (a) {
  10727. a.setTickPositions(!0)
  10728. });
  10729. g();
  10730. Wb();
  10731. qb();
  10732. Nb && o(xa, function (a) {
  10733. a.render()
  10734. });
  10735. if (!m.seriesGroup) m.seriesGroup = I.g("series-group").attr({
  10736. zIndex: 3
  10737. }).add();
  10738. o(Q, function (a) {
  10739. a.translate();
  10740. a.setTooltipPoints();
  10741. a.render()
  10742. });
  10743. a.items && o(a.items, function () {
  10744. var b = L(a.style, this.style),
  10745. c = S(b.left) + O,
  10746. d = S(b.top) + J + 12;
  10747. delete b.left;
  10748. delete b.top;
  10749. I.text(this.html, c, d).attr({
  10750. zIndex: 2
  10751. }).css(b).add()
  10752. });
  10753. if (b.enabled && !m.credits) c = b.href, m.credits = I.text(b.text, 0, 0).on("click", function () {
  10754. if (c) location.href = c
  10755. }).attr({
  10756. align: b.position.align,
  10757. zIndex: 8
  10758. }).css(b.style).add().align(b.position);
  10759. m.hasRendered = !0
  10760. }
  10761. function V() {
  10762. if (!Pb && ca == ca.top && x.readyState !== "complete" || Fa && !ca.canvg) Fa ? Cc.push(V, v.global.canvasToolsURL) : x.attachEvent("onreadystatechange", function () {
  10763. x.detachEvent("onreadystatechange", V);
  10764. x.readyState === "complete" && V()
  10765. });
  10766. else {
  10767. l();
  10768. aa(m, "init");
  10769. if (Highcharts.RangeSelector && v.rangeSelector.enabled) m.rangeSelector = new Highcharts.RangeSelector(m);
  10770. rb();
  10771. sb();
  10772. r();
  10773. i();
  10774. o(v.series || [], function (a) {
  10775. f(a)
  10776. });
  10777. if (Highcharts.Scroller && (v.navigator.enabled || v.scrollbar.enabled)) m.scroller = new Highcharts.Scroller(m);
  10778. m.render = Z;
  10779. m.tracker = ub = new e(v.tooltip);
  10780. Z();
  10781. I.draw();
  10782. b && b.apply(m, [m]);
  10783. o(m.callbacks, function (a) {
  10784. a.apply(m, [m])
  10785. });
  10786. C && (Ja.appendChild(D), Tb(C));
  10787. aa(m, "load")
  10788. }
  10789. }
  10790. var v, y = a.series;
  10791. a.series = null;
  10792. v = K(Ea, a);
  10793. v.series = a.series = y;
  10794. var q = v.chart,
  10795. y = q.margin,
  10796. y = mb(y) ? y : [y, y, y, y],
  10797. T = p(q.marginTop, y[0]),
  10798. w = p(q.marginRight, y[1]),
  10799. E = p(q.marginBottom, y[2]),
  10800. bb = p(q.marginLeft, y[3]),
  10801. ia = q.spacingTop,
  10802. ua = q.spacingRight,
  10803. R = q.spacingBottom,
  10804. jb = q.spacingLeft,
  10805. ib, $, ja, J, ba, M, O, pa, Ja, C, D, na, za, Ca, sa, ra, $a, Za, ma, Na, Sa, da, m = this,
  10806. kb = (y = q.events) && !! y.click,
  10807. va, Db, vb, Da, xb, pb, Ya, la, ka, ub, db, Xa, Wa, yb, ya, Nb = q.showAxes,
  10808. La = 0,
  10809. xa = [],
  10810. gb, Q = [],
  10811. U, I, lb, Bb, ob, qb, Wb, rb, sb, tb, zb, Fb, Rb = function () {
  10812. function a(b, c) {
  10813. var d = b.legendItem,
  10814. e = b.legendLine,
  10815. g = b.legendSymbol,
  10816. h = q.color,
  10817. i = c ? f.itemStyle.color : h,
  10818. h = c ? b.color : h;
  10819. d && d.css({
  10820. fill: i
  10821. });
  10822. e && e.attr({
  10823. stroke: h
  10824. });
  10825. g && g.attr({
  10826. stroke: h,
  10827. fill: h
  10828. })
  10829. }
  10830. function b(a) {
  10831. var c = a.legendItem,
  10832. d = a.legendLine,
  10833. e = a._legendItemPos,
  10834. f = e[0],
  10835. e = e[1],
  10836. g = a.legendSymbol,
  10837. a = a.checkbox;
  10838. c && c.attr({
  10839. x: r ? f : Wa - f,
  10840. y: e
  10841. });
  10842. d && d.translate(r ? f : Wa - f, e - 4);
  10843. g && (c = f + g.xOff, g.attr({
  10844. x: r ? c : Wa - c,
  10845. y: e + g.yOff
  10846. }));
  10847. if (a) a.x = f, a.y = e
  10848. }
  10849. function c() {
  10850. o(j, function (a) {
  10851. var b = a.checkbox,
  10852. c = A.alignAttr;
  10853. b && P(b, {
  10854. left: c.translateX + a.legendItemWidth + b.x - 40 + ga,
  10855. top: c.translateY + b.y - 11 + ga
  10856. })
  10857. })
  10858. }
  10859. function d(b) {
  10860. var c, e, j, k, m = b.legendItem;
  10861. k = b.series || b;
  10862. var o = k.options,
  10863. v = o && o.borderWidth || 0;
  10864. if (!m) {
  10865. k = /^(bar|pie|area|column)$/.test(k.type);
  10866. b.legendItem = m = I.text(f.labelFormatter.call(b), 0, 0, f.useHTML).css(b.visible ? n : q).on("mouseover", function () {
  10867. b.setState(ta);
  10868. m.css(l)
  10869. }).on("mouseout", function () {
  10870. m.css(b.visible ? n : q);
  10871. b.setState()
  10872. }).on("click", function () {
  10873. var a = function () {
  10874. b.setVisible()
  10875. };
  10876. b.firePointEvent ? b.firePointEvent("legendItemClick", null, a) : aa(b, "legendItemClick", null, a)
  10877. }).attr({
  10878. align: r ? "left" : "right",
  10879. zIndex: 2
  10880. }).add(A);
  10881. if (!k && o && o.lineWidth) {
  10882. var u = {
  10883. "stroke-width": o.lineWidth,
  10884. zIndex: 2
  10885. };
  10886. if (o.dashStyle) u.dashstyle = o.dashStyle;
  10887. b.legendLine = I.path([wa, (-h - i) * (r ? 1 : -1), 0, fa, - i * (r ? 1 : -1), 0]).attr(u).add(A)
  10888. }
  10889. if (k) j = I.rect(c = -h - i, e = -11, h, 12, 2).attr({
  10890. zIndex: 3
  10891. }).add(A), r || (c += h);
  10892. else if (o && o.marker && o.marker.enabled) j = o.marker.radius, j = I.symbol(b.symbol, c = -h / 2 - i - j, e = -4 - j, 2 * j, 2 * j).attr(b.pointAttr[Ka]).attr({
  10893. zIndex: 3
  10894. }).add(A), r || (c += h / 2);
  10895. if (j) j.xOff = c + v % 2 / 2, j.yOff = e + v % 2 / 2;
  10896. b.legendSymbol = j;
  10897. a(b, b.visible);
  10898. if (o && o.showCheckbox) b.checkbox = Aa("input", {
  10899. type: "checkbox",
  10900. checked: b.selected,
  10901. defaultChecked: b.selected
  10902. }, f.itemCheckboxStyle, D), ha(b.checkbox, "click", function (a) {
  10903. aa(b, "checkboxClick", {
  10904. checked: a.target.checked
  10905. }, function () {
  10906. b.select()
  10907. })
  10908. })
  10909. }
  10910. c = m.getBBox();
  10911. e = b.legendItemWidth = f.itemWidth || h + i + c.width + t;
  10912. w = c.height;
  10913. if (g && s - V + e > (J || sa - 2 * t - V)) s = V, z += y + w + p;
  10914. !g && z + f.y + w > ra - ia - R && (z = T, s += Z, Z = 0);
  10915. Z = W(Z, e);
  10916. x = W(x, z + p);
  10917. b._legendItemPos = [s, z];
  10918. g ? s += e : z += y + w + p;
  10919. C = J || W(s - V + (g ? 0 : e), C)
  10920. }
  10921. function e() {
  10922. s = V;
  10923. z = T;
  10924. x = C = 0;
  10925. A || (A = I.g("legend").attr({
  10926. zIndex: 7
  10927. }).add());
  10928. j = [];
  10929. o(M, function (a) {
  10930. var b = a.options;
  10931. b.showInLegend && (j = j.concat(a.legendItems || (b.legendType === "point" ? a.data : a)))
  10932. });
  10933. Mc(j, function (a, b) {
  10934. return (a.options.legendIndex || 0) - (b.options.legendIndex || 0)
  10935. });
  10936. jb && j.reverse();
  10937. o(j, d);
  10938. Wa = J || C;
  10939. yb = x - v + w;
  10940. if (E || bb) {
  10941. Wa += 2 * t;
  10942. yb += 2 * t;
  10943. if (ua) {
  10944. if (Wa > 0 && yb > 0) ua[ua.isNew ? "attr" : "animate"](ua.crisp(null, null, null, Wa, yb)), ua.isNew = !1
  10945. } else ua = I.rect(0, 0, Wa, yb, f.borderRadius, E || 0).attr({
  10946. stroke: f.borderColor,
  10947. "stroke-width": E || 0,
  10948. fill: bb || Ma
  10949. }).add(A).shadow(f.shadow), ua.isNew = !0;
  10950. ua[j.length ? "show" : "hide"]()
  10951. }
  10952. o(j, b);
  10953. for (var a = ["left", "right", "top", "bottom"], g, h = 4; h--;) g = a[h], k[g] && k[g] !== "auto" && (f[h < 2 ? "align" : "verticalAlign"] = g, f[h < 2 ? "x" : "y"] = S(k[g]) * (h % 2 ? -1 : 1));
  10954. j.length && A.align(L(f, {
  10955. width: Wa,
  10956. height: yb
  10957. }), !0, ib);
  10958. La || c()
  10959. }
  10960. var f = m.options.legend;
  10961. if (f.enabled) {
  10962. var g = f.layout === "horizontal",
  10963. h = f.symbolWidth,
  10964. i = f.symbolPadding,
  10965. j, k = f.style,
  10966. n = f.itemStyle,
  10967. l = f.itemHoverStyle,
  10968. q = K(n, f.itemHiddenStyle),
  10969. t = f.padding || S(k.padding),
  10970. r = !f.rtl,
  10971. y = f.itemMarginTop || 0,
  10972. p = f.itemMarginBottom || 0,
  10973. v = 18,
  10974. Z = 0,
  10975. V = 4 + t + h + i,
  10976. T = t + y + v - 5,
  10977. s, z, x, w = 0,
  10978. ua, E = f.borderWidth,
  10979. bb = f.backgroundColor,
  10980. A, C, J = f.width,
  10981. M = m.series,
  10982. jb = f.reversed;
  10983. e();
  10984. ha(m, "endResize", c);
  10985. return {
  10986. colorizeItem: a,
  10987. destroyItem: function (a) {
  10988. var b = a.checkbox;
  10989. o(["legendItem", "legendLine", "legendSymbol"], function (b) {
  10990. a[b] && a[b].destroy()
  10991. });
  10992. b && Tb(a.checkbox)
  10993. },
  10994. renderLegend: e,
  10995. destroy: function () {
  10996. ua && (ua = ua.destroy());
  10997. A && (A = A.destroy())
  10998. }
  10999. }
  11000. }
  11001. };
  11002. Db = function (a, b) {
  11003. return a >= 0 && a <= ka && b >= 0 && b <= la
  11004. };
  11005. Fb = function () {
  11006. var a = m.resetZoomButton;
  11007. aa(m, "selection", {
  11008. resetSelection: !0
  11009. }, zb);
  11010. if (a) m.resetZoomButton = a.destroy()
  11011. };
  11012. zb = function (a) {
  11013. var b;
  11014. m.resetZoomEnabled !== !1 && !m.resetZoomButton && k();
  11015. !a || a.resetSelection ? o(xa, function (a) {
  11016. a.options.zoomEnabled !== !1 && (a.setExtremes(null, null, !1), b = !0)
  11017. }) : o(a.xAxis.concat(a.yAxis), function (a) {
  11018. var c = a.axis;
  11019. if (m.tracker[c.isXAxis ? "zoomX" : "zoomY"]) c.setExtremes(a.min, a.max, !1), b = !0
  11020. });
  11021. b && h(p(q.animation, m.pointCount < 100))
  11022. };
  11023. m.pan = function (a) {
  11024. var b = m.xAxis[0],
  11025. c = m.mouseDownX,
  11026. d = b.pointRange / 2,
  11027. e = b.getExtremes(),
  11028. f = b.translate(c - a, !0) + d,
  11029. c = b.translate(c + ka - a, !0) - d;
  11030. (d = m.hoverPoints) && o(d, function (a) {
  11031. a.setState()
  11032. });
  11033. f > Ua(e.dataMin, e.min) && c < W(e.dataMax, e.max) && b.setExtremes(f, c, !0, !1);
  11034. m.mouseDownX = a;
  11035. P(D, {
  11036. cursor: "move"
  11037. })
  11038. };
  11039. Wb = function () {
  11040. var a = v.legend,
  11041. b = p(a.margin, 10),
  11042. c = a.x,
  11043. d = a.y,
  11044. e = a.align,
  11045. f = a.verticalAlign,
  11046. g;
  11047. rb();
  11048. if ((m.title || m.subtitle) && !s(T))(g = W(m.title && !$.floating && !$.verticalAlign && $.y || 0, m.subtitle && !ja.floating && !ja.verticalAlign && ja.y || 0)) && (J = W(J, g + p($.margin, 15) + ia));
  11049. a.enabled && !a.floating && (e === "right" ? s(w) || (ba = W(ba, Wa - c + b + ua)) : e === "left" ? s(bb) || (O = W(O, Wa + c + b + jb)) : f === "top" ? s(T) || (J = W(J, yb + d + b + ia)) : f === "bottom" && (s(E) || (M = W(M, yb - d + b + R))));
  11050. m.extraBottomMargin && (M += m.extraBottomMargin);
  11051. m.extraTopMargin && (J += m.extraTopMargin);
  11052. Nb && o(xa, function (a) {
  11053. a.getOffset()
  11054. });
  11055. s(bb) || (O += pa[3]);
  11056. s(T) || (J += pa[0]);
  11057. s(E) || (M += pa[2]);
  11058. s(w) || (ba += pa[1]);
  11059. sb()
  11060. };
  11061. tb = function (a, b, c) {
  11062. var d = m.title,
  11063. e = m.subtitle;
  11064. La += 1;
  11065. Kb(c, m);
  11066. Za = ra;
  11067. $a = sa;
  11068. if (s(a)) m.chartWidth = sa = z(a);
  11069. if (s(b)) m.chartHeight = ra = z(b);
  11070. P(D, {
  11071. width: sa + ga,
  11072. height: ra + ga
  11073. });
  11074. I.setSize(sa, ra, c);
  11075. ka = sa - O - ba;
  11076. la = ra - J - M;
  11077. gb = null;
  11078. o(xa, function (a) {
  11079. a.isDirty = !0;
  11080. a.setScale()
  11081. });
  11082. o(Q, function (a) {
  11083. a.isDirty = !0
  11084. });
  11085. m.isDirtyLegend = !0;
  11086. m.isDirtyBox = !0;
  11087. Wb();
  11088. d && d.align(null, null, ib);
  11089. e && e.align(null, null, ib);
  11090. h(c);
  11091. Za = null;
  11092. aa(m, "resize");
  11093. Ub === !1 ? t() : setTimeout(t, Ub && Ub.duration || 500)
  11094. };
  11095. sb = function () {
  11096. m.plotLeft = O = z(O);
  11097. m.plotTop = J = z(J);
  11098. m.plotWidth = ka = z(sa - O - ba);
  11099. m.plotHeight = la = z(ra - J - M);
  11100. m.plotSizeX = U ? la : ka;
  11101. m.plotSizeY = U ? ka : la;
  11102. ib = {
  11103. x: jb,
  11104. y: ia,
  11105. width: sa - jb - ua,
  11106. height: ra - ia - R
  11107. };
  11108. o(xa, function (a) {
  11109. a.setAxisSize();
  11110. a.setAxisTranslation()
  11111. })
  11112. };
  11113. rb = function () {
  11114. J = p(T, ia);
  11115. ba = p(w, ua);
  11116. M = p(E, R);
  11117. O = p(bb, jb);
  11118. pa = [0, 0, 0, 0]
  11119. };
  11120. qb = function () {
  11121. var a = q.borderWidth || 0,
  11122. b = q.backgroundColor,
  11123. c = q.plotBackgroundColor,
  11124. d = q.plotBackgroundImage,
  11125. e, f = {
  11126. x: O,
  11127. y: J,
  11128. width: ka,
  11129. height: la
  11130. };
  11131. e = a + (q.shadow ? 8 : 0);
  11132. if (a || b) ma ? ma.animate(ma.crisp(null, null, null, sa - e, ra - e)) : ma = I.rect(e / 2, e / 2, sa - e, ra - e, q.borderRadius, a).attr({
  11133. stroke: q.borderColor,
  11134. "stroke-width": a,
  11135. fill: b || Ma
  11136. }).add().shadow(q.shadow);
  11137. c && (Na ? Na.animate(f) : Na = I.rect(O, J, ka, la, 0).attr({
  11138. fill: c
  11139. }).add().shadow(q.plotShadow));
  11140. d && (Sa ? Sa.animate(f) : Sa = I.image(d, O, J, ka, la).add());
  11141. q.plotBorderWidth && (da ? da.animate(da.crisp(null, O, J, ka, la)) : da = I.rect(O, J, ka, la, 0, q.plotBorderWidth).attr({
  11142. stroke: q.plotBorderColor,
  11143. "stroke-width": q.plotBorderWidth,
  11144. zIndex: 4
  11145. }).add());
  11146. m.isDirtyBox = !1
  11147. };
  11148. q.reflow !== !1 && ha(m, "load", n);
  11149. if (y) for (va in y) ha(m, va, y[va]);
  11150. m.options = v;
  11151. m.series = Q;
  11152. m.xAxis = [];
  11153. m.yAxis = [];
  11154. m.addSeries = function (a, b, c) {
  11155. var d;
  11156. a && (Kb(c, m), b = p(b, !0), aa(m, "addSeries", {
  11157. options: a
  11158. }, function () {
  11159. d = f(a);
  11160. d.isDirty = !0;
  11161. m.isDirtyLegend = !0;
  11162. b && m.redraw()
  11163. }));
  11164. return d
  11165. };
  11166. m.animation = Fa ? !1 : p(q.animation, !0);
  11167. m.Axis = c;
  11168. m.destroy = function () {
  11169. var a, b = D && D.parentNode;
  11170. if (m !== null) {
  11171. aa(m, "destroy");
  11172. Qa(m);
  11173. for (a = xa.length; a--;) xa[a] = xa[a].destroy();
  11174. for (a = Q.length; a--;) Q[a] = Q[a].destroy();
  11175. o("title,subtitle,seriesGroup,clipRect,credits,tracker,scroller,rangeSelector".split(","), function (a) {
  11176. var b = m[a];
  11177. b && (m[a] = b.destroy())
  11178. });
  11179. o([ma, da, Na, Xa, vb, I, ub], function (a) {
  11180. a && a.destroy && a.destroy()
  11181. });
  11182. ma = da = Na = Xa = vb = I = ub = null;
  11183. if (D) D.innerHTML = "", Qa(D), b && Tb(D), D = null;
  11184. clearInterval(Bb);
  11185. for (a in m) delete m[a];
  11186. v = m = null
  11187. }
  11188. };
  11189. m.get = function (a) {
  11190. var b, c, d;
  11191. for (b = 0; b < xa.length; b++) if (xa[b].options.id === a) return xa[b];
  11192. for (b = 0; b < Q.length; b++) if (Q[b].options.id === a) return Q[b];
  11193. for (b = 0; b < Q.length; b++) {
  11194. d = Q[b].points || [];
  11195. for (c = 0; c < d.length; c++) if (d[c].id === a) return d[c]
  11196. }
  11197. return null
  11198. };
  11199. m.getSelectedPoints = function () {
  11200. var a = [];
  11201. o(Q, function (b) {
  11202. a = a.concat(nc(b.points, function (a) {
  11203. return a.selected
  11204. }))
  11205. });
  11206. return a
  11207. };
  11208. m.getSelectedSeries = function () {
  11209. return nc(Q, function (a) {
  11210. return a.selected
  11211. })
  11212. };
  11213. m.hideLoading = function () {
  11214. xb && cc(xb, {
  11215. opacity: 0
  11216. }, {
  11217. duration: v.loading.hideDuration || 100,
  11218. complete: function () {
  11219. P(xb, {
  11220. display: Ma
  11221. })
  11222. }
  11223. });
  11224. Ya = !1
  11225. };
  11226. m.initSeries = f;
  11227. m.isInsidePlot = Db;
  11228. m.redraw = h;
  11229. m.setSize = tb;
  11230. m.setTitle = j;
  11231. m.showLoading = function (a) {
  11232. var b = v.loading;
  11233. xb || (xb = Aa(Ra, {
  11234. className: Ia + "loading"
  11235. }, L(b.style, {
  11236. left: O + ga,
  11237. top: J + ga,
  11238. width: ka + ga,
  11239. height: la + ga,
  11240. zIndex: 10,
  11241. display: Ma
  11242. }), D), pb = Aa("span", null, b.labelStyle, xb));
  11243. pb.innerHTML = a || v.lang.loading;
  11244. Ya || (P(xb, {
  11245. opacity: 0,
  11246. display: ""
  11247. }), cc(xb, {
  11248. opacity: b.style.opacity
  11249. }, {
  11250. duration: b.showDuration || 0
  11251. }), Ya = !0)
  11252. };
  11253. m.pointCount = 0;
  11254. m.counters = new tc;
  11255. V()
  11256. }
  11257. var X, x = document,
  11258. ca = window,
  11259. oa = Math,
  11260. z = oa.round,
  11261. Ta = oa.floor,
  11262. Yb = oa.ceil,
  11263. W = oa.max,
  11264. Ua = oa.min,
  11265. Ba = oa.abs,
  11266. ja = oa.cos,
  11267. C = oa.sin,
  11268. da = oa.PI,
  11269. Dc = da * 2 / 360,
  11270. kb = navigator.userAgent,
  11271. Qb = /msie/i.test(kb) && !ca.opera,
  11272. Xa = x.documentMode === 8,
  11273. Ec = /AppleWebKit/.test(kb),
  11274. Bc = /Firefox/.test(kb),
  11275. Pb = !! x.createElementNS && !! x.createElementNS("http://www.w3.org/2000/svg", "svg").createSVGRect,
  11276. Qc = Bc && parseInt(kb.split("Firefox/")[1], 10) < 4,
  11277. Fa = !Pb && !Qb && !! x.createElement("canvas").getContext,
  11278. Xb, Ga = x.documentElement.ontouchstart !== X,
  11279. Fc = {}, lc = 0,
  11280. tb, Ea, ac, Ub, La, E, Ra = "div",
  11281. wb = "absolute",
  11282. mc = "relative",
  11283. ab = "hidden",
  11284. Ia = "highcharts-",
  11285. eb = "visible",
  11286. ga = "px",
  11287. Ma = "none",
  11288. wa = "M",
  11289. fa = "L",
  11290. Gc = "rgba(192,192,192," + (Pb ? 1.0E-6 : 0.0020) + ")",
  11291. Ka = "",
  11292. ta = "hover",
  11293. Rb = "millisecond",
  11294. ob = "second",
  11295. pb = "minute",
  11296. va = "hour",
  11297. Ca = "day",
  11298. Ya = "week",
  11299. Da = "month",
  11300. Za = "year",
  11301. sb, fc, gc, ic, db, qb, rb, pc, qc, hc, rc, sc, w = ca.HighchartsAdapter,
  11302. na = w || {}, Hc = na.getScript,
  11303. o = na.each,
  11304. nc = na.grep,
  11305. Ac = na.offset,
  11306. Vb = na.map,
  11307. K = na.merge,
  11308. ha = na.addEvent,
  11309. Qa = na.removeEvent,
  11310. aa = na.fireEvent,
  11311. cc = na.animate,
  11312. Ob = na.stop,
  11313. Ha = {};
  11314. ca.Highcharts = {};
  11315. ac = function (a, b, c) {
  11316. if (!s(b) || isNaN(b)) return "Invalid date";
  11317. var a = p(a, "%Y-%m-%d %H:%M:%S"),
  11318. d = new Date(b),
  11319. e, f = d[gc](),
  11320. g = d[ic](),
  11321. h = d[db](),
  11322. i = d[qb](),
  11323. k = d[rb](),
  11324. j = Ea.lang,
  11325. l = j.weekdays,
  11326. b = {
  11327. a: l[g].substr(0, 3),
  11328. A: l[g],
  11329. d: Na(h),
  11330. e: h,
  11331. b: j.shortMonths[i],
  11332. B: j.months[i],
  11333. m: Na(i + 1),
  11334. y: k.toString().substr(2, 2),
  11335. Y: k,
  11336. H: Na(f),
  11337. I: Na(f % 12 || 12),
  11338. l: f % 12 || 12,
  11339. M: Na(d[fc]()),
  11340. p: f < 12 ? "AM" : "PM",
  11341. P: f < 12 ? "am" : "pm",
  11342. S: Na(d.getSeconds()),
  11343. L: Na(z(b % 1E3), 3)
  11344. };
  11345. for (e in b) a = a.replace("%" + e, b[e]);
  11346. return c ? a.substr(0, 1).toUpperCase() + a.substr(1) : a
  11347. };
  11348. tc.prototype = {
  11349. wrapColor: function (a) {
  11350. if (this.color >= a) this.color = 0
  11351. },
  11352. wrapSymbol: function (a) {
  11353. if (this.symbol >= a) this.symbol = 0
  11354. }
  11355. };
  11356. E = za(Rb, 1, ob, 1E3, pb, 6E4, va, 36E5, Ca, 864E5, Ya, 6048E5, Da, 2592E6, Za, 31556952E3);
  11357. La = {
  11358. init: function (a, b, c) {
  11359. var b = b || "",
  11360. d = a.shift,
  11361. e = b.indexOf("C") > -1,
  11362. f = e ? 7 : 3,
  11363. g, b = b.split(" "),
  11364. c = [].concat(c),
  11365. h, i, k = function (a) {
  11366. for (g = a.length; g--;) a[g] === wa && a.splice(g + 1, 0, a[g + 1], a[g + 2], a[g + 1], a[g + 2])
  11367. };
  11368. e && (k(b), k(c));
  11369. a.isArea && (h = b.splice(b.length - 6, 6), i = c.splice(c.length - 6, 6));
  11370. d === 1 && (c = [].concat(c).splice(0, f).concat(c));
  11371. a.shift = 0;
  11372. if (b.length) for (a = c.length; b.length < a;) d = [].concat(b).splice(b.length - f, f), e && (d[f - 6] = d[f - 2], d[f - 5] = d[f - 1]), b = b.concat(d);
  11373. h && (b = b.concat(h), c = c.concat(i));
  11374. return [b, c]
  11375. },
  11376. step: function (a, b, c, d) {
  11377. var e = [],
  11378. f = a.length;
  11379. if (c === 1) e = d;
  11380. else if (f === b.length && c < 1) for (; f--;) d = parseFloat(a[f]), e[f] = isNaN(d) ? a[f] : c * parseFloat(b[f] - d) + d;
  11381. else e = b;
  11382. return e
  11383. }
  11384. };
  11385. w && w.init && w.init(La);
  11386. if (!w && ca.jQuery) {
  11387. var ba = jQuery,
  11388. Hc = ba.getScript,
  11389. o = function (a, b) {
  11390. for (var c = 0, d = a.length; c < d; c++) if (b.call(a[c], a[c], c, a) === !1) return c
  11391. }, nc = ba.grep,
  11392. Vb = function (a, b) {
  11393. for (var c = [], d = 0, e = a.length; d < e; d++) c[d] = b.call(a[d], a[d], d, a);
  11394. return c
  11395. }, K = function () {
  11396. var a = arguments;
  11397. return ba.extend(!0, null, a[0], a[1], a[2], a[3])
  11398. }, Ac = function (a) {
  11399. return ba(a).offset()
  11400. }, ha = function (a, b, c) {
  11401. ba(a).bind(b, c)
  11402. }, Qa = function (a, b, c) {
  11403. var d = x.removeEventListener ? "removeEventListener" : "detachEvent";
  11404. x[d] && !a[d] && (a[d] = function () {});
  11405. ba(a).unbind(b, c)
  11406. }, aa = function (a, b, c, d) {
  11407. var e = ba.Event(b),
  11408. f = "detached" + b,
  11409. g;
  11410. L(e, c);
  11411. a[b] && (a[f] = a[b], a[b] = null);
  11412. o(["preventDefault", "stopPropagation"], function (a) {
  11413. var b = e[a];
  11414. e[a] = function () {
  11415. try {
  11416. b.call(e)
  11417. } catch (c) {
  11418. a === "preventDefault" && (g = !0)
  11419. }
  11420. }
  11421. });
  11422. ba(a).trigger(e);
  11423. a[f] && (a[b] = a[f], a[f] = null);
  11424. d && !e.isDefaultPrevented() && !g && d(e)
  11425. }, cc = function (a, b, c) {
  11426. var d = ba(a);
  11427. if (b.d) a.toD = b.d, b.d = 1;
  11428. d.stop();
  11429. d.animate(b, c)
  11430. }, Ob = function (a) {
  11431. ba(a).stop()
  11432. };
  11433. ba.extend(ba.easing, {
  11434. easeOutQuad: function (a, b, c, d, e) {
  11435. return -d * (b /= e) * (b - 2) + c
  11436. }
  11437. });
  11438. var Ic = jQuery.fx,
  11439. Jc = Ic.step;
  11440. o(["cur", "_default", "width", "height"], function (a, b) {
  11441. var c = b ? Jc : Ic.prototype,
  11442. d = c[a],
  11443. e;
  11444. d && (c[a] = function (a) {
  11445. a = b ? a : this;
  11446. e = a.elem;
  11447. return e.attr ? e.attr(a.prop, a.now) : d.apply(this, arguments)
  11448. })
  11449. });
  11450. Jc.d = function (a) {
  11451. var b = a.elem;
  11452. if (!a.started) {
  11453. var c = La.init(b, b.d, b.toD);
  11454. a.start = c[0];
  11455. a.end = c[1];
  11456. a.started = !0
  11457. }
  11458. b.attr("d", La.step(a.start, a.end, a.pos, b.toD))
  11459. }
  11460. }
  11461. w = {
  11462. enabled: !0,
  11463. align: "center",
  11464. x: 0,
  11465. y: 15,
  11466. style: {
  11467. color: "#666",
  11468. fontSize: "11px",
  11469. lineHeight: "14px"
  11470. }
  11471. };
  11472. Ea = {
  11473. colors: "#4572A7,#AA4643,#89A54E,#80699B,#3D96AE,#DB843D,#92A8CD,#A47D7C,#B5CA92".split(","),
  11474. symbols: ["circle", "diamond", "square", "triangle", "triangle-down"],
  11475. lang: {
  11476. loading: "Loading...",
  11477. months: "January,February,March,April,May,June,July,August,September,October,November,December".split(","),
  11478. shortMonths: "Jan,Feb,Mar,Apr,May,Jun,Jul,Aug,Sep,Oct,Nov,Dec".split(","),
  11479. weekdays: "Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday".split(","),
  11480. decimalPoint: ".",
  11481. resetZoom: "Reset zoom",
  11482. resetZoomTitle: "Reset zoom level 1:1",
  11483. thousandsSep: ","
  11484. },
  11485. global: {
  11486. useUTC: !0,
  11487. canvasToolsURL: "http://code.highcharts.com/2.2.1/modules/canvas-tools.js"
  11488. },
  11489. chart: {
  11490. borderColor: "#4572A7",
  11491. borderRadius: 5,
  11492. defaultSeriesType: "line",
  11493. ignoreHiddenSeries: !0,
  11494. spacingTop: 10,
  11495. spacingRight: 10,
  11496. spacingBottom: 15,
  11497. spacingLeft: 10,
  11498. style: {
  11499. fontFamily: '"Lucida Grande", "Lucida Sans Unicode", Verdana, Arial, Helvetica, sans-serif',
  11500. fontSize: "12px"
  11501. },
  11502. backgroundColor: "#FFFFFF",
  11503. plotBorderColor: "#C0C0C0",
  11504. resetZoomButton: {
  11505. theme: {
  11506. zIndex: 20
  11507. },
  11508. position: {
  11509. align: "right",
  11510. x: -10,
  11511. y: 10
  11512. }
  11513. }
  11514. },
  11515. title: {
  11516. text: "Chart title",
  11517. align: "center",
  11518. y: 15,
  11519. style: {
  11520. color: "#3E576F",
  11521. fontSize: "16px"
  11522. }
  11523. },
  11524. subtitle: {
  11525. text: "",
  11526. align: "center",
  11527. y: 30,
  11528. style: {
  11529. color: "#6D869F"
  11530. }
  11531. },
  11532. plotOptions: {
  11533. line: {
  11534. allowPointSelect: !1,
  11535. showCheckbox: !1,
  11536. animation: {
  11537. duration: 1E3
  11538. },
  11539. events: {},
  11540. lineWidth: 2,
  11541. shadow: !0,
  11542. marker: {
  11543. enabled: !0,
  11544. lineWidth: 0,
  11545. radius: 4,
  11546. lineColor: "#FFFFFF",
  11547. states: {
  11548. hover: {},
  11549. select: {
  11550. fillColor: "#FFFFFF",
  11551. lineColor: "#000000",
  11552. lineWidth: 2
  11553. }
  11554. }
  11555. },
  11556. point: {
  11557. events: {}
  11558. },
  11559. dataLabels: K(w, {
  11560. enabled: !1,
  11561. y: -6,
  11562. formatter: function () {
  11563. return this.y
  11564. }
  11565. }),
  11566. cropThreshold: 300,
  11567. pointRange: 0,
  11568. showInLegend: !0,
  11569. states: {
  11570. hover: {
  11571. marker: {}
  11572. },
  11573. select: {
  11574. marker: {}
  11575. }
  11576. },
  11577. stickyTracking: !0
  11578. }
  11579. },
  11580. labels: {
  11581. style: {
  11582. position: wb,
  11583. color: "#3E576F"
  11584. }
  11585. },
  11586. legend: {
  11587. enabled: !0,
  11588. align: "center",
  11589. layout: "horizontal",
  11590. labelFormatter: function () {
  11591. return this.name
  11592. },
  11593. borderWidth: 1,
  11594. borderColor: "#909090",
  11595. borderRadius: 5,
  11596. shadow: !1,
  11597. style: {
  11598. padding: "5px"
  11599. },
  11600. itemStyle: {
  11601. cursor: "pointer",
  11602. color: "#3E576F"
  11603. },
  11604. itemHoverStyle: {
  11605. color: "#000000"
  11606. },
  11607. itemHiddenStyle: {
  11608. color: "#C0C0C0"
  11609. },
  11610. itemCheckboxStyle: {
  11611. position: wb,
  11612. width: "13px",
  11613. height: "13px"
  11614. },
  11615. symbolWidth: 16,
  11616. symbolPadding: 5,
  11617. verticalAlign: "bottom",
  11618. x: 0,
  11619. y: 0
  11620. },
  11621. loading: {
  11622. labelStyle: {
  11623. fontWeight: "bold",
  11624. position: mc,
  11625. top: "1em"
  11626. },
  11627. style: {
  11628. position: wb,
  11629. backgroundColor: "white",
  11630. opacity: 0.5,
  11631. textAlign: "center"
  11632. }
  11633. },
  11634. tooltip: {
  11635. enabled: !0,
  11636. backgroundColor: "rgba(255, 255, 255, .85)",
  11637. borderWidth: 2,
  11638. borderRadius: 5,
  11639. headerFormat: '<span style="font-size: 10px">{point.key}</span><br/>',
  11640. pointFormat: '<span style="color:{series.color}">{series.name}</span>: <b>{point.y}</b><br/>',
  11641. shadow: !0,
  11642. shared: Fa,
  11643. snap: Ga ? 25 : 10,
  11644. style: {
  11645. color: "#333333",
  11646. fontSize: "12px",
  11647. padding: "5px",
  11648. whiteSpace: "nowrap"
  11649. }
  11650. },
  11651. credits: {
  11652. enabled: !0,
  11653. text: "Highcharts.com",
  11654. href: "http://www.highcharts.com",
  11655. position: {
  11656. align: "right",
  11657. x: -10,
  11658. verticalAlign: "bottom",
  11659. y: -5
  11660. },
  11661. style: {
  11662. cursor: "pointer",
  11663. color: "#909090",
  11664. fontSize: "10px"
  11665. }
  11666. }
  11667. };
  11668. var $b = {
  11669. dateTimeLabelFormats: za(Rb, "%H:%M:%S.%L", ob, "%H:%M:%S", pb, "%H:%M", va, "%H:%M", Ca, "%e. %b", Ya, "%e. %b", Da, "%b '%y", Za, "%Y"),
  11670. endOnTick: !1,
  11671. gridLineColor: "#C0C0C0",
  11672. labels: w,
  11673. lineColor: "#C0D0E0",
  11674. lineWidth: 1,
  11675. max: null,
  11676. min: null,
  11677. minPadding: 0.01,
  11678. maxPadding: 0.01,
  11679. minorGridLineColor: "#E0E0E0",
  11680. minorGridLineWidth: 1,
  11681. minorTickColor: "#A0A0A0",
  11682. minorTickLength: 2,
  11683. minorTickPosition: "outside",
  11684. startOfWeek: 1,
  11685. startOnTick: !1,
  11686. tickColor: "#C0D0E0",
  11687. tickLength: 5,
  11688. tickmarkPlacement: "between",
  11689. tickPixelInterval: 100,
  11690. tickPosition: "outside",
  11691. tickWidth: 1,
  11692. title: {
  11693. align: "middle",
  11694. style: {
  11695. color: "#6D869F",
  11696. fontWeight: "bold"
  11697. }
  11698. },
  11699. type: "linear"
  11700. }, kc = K($b, {
  11701. endOnTick: !0,
  11702. gridLineWidth: 1,
  11703. tickPixelInterval: 72,
  11704. showLastLabel: !0,
  11705. labels: {
  11706. align: "right",
  11707. x: -8,
  11708. y: 3
  11709. },
  11710. lineWidth: 0,
  11711. maxPadding: 0.05,
  11712. minPadding: 0.05,
  11713. startOnTick: !0,
  11714. tickWidth: 0,
  11715. title: {
  11716. rotation: 270,
  11717. text: "Y-values"
  11718. },
  11719. stackLabels: {
  11720. enabled: !1,
  11721. formatter: function () {
  11722. return this.total
  11723. },
  11724. style: w.style
  11725. }
  11726. }),
  11727. Pc = {
  11728. labels: {
  11729. align: "right",
  11730. x: -8,
  11731. y: null
  11732. },
  11733. title: {
  11734. rotation: 270
  11735. }
  11736. }, Oc = {
  11737. labels: {
  11738. align: "left",
  11739. x: 8,
  11740. y: null
  11741. },
  11742. title: {
  11743. rotation: 90
  11744. }
  11745. }, zc = {
  11746. labels: {
  11747. align: "center",
  11748. x: 0,
  11749. y: 14,
  11750. overflow: "justify"
  11751. },
  11752. title: {
  11753. rotation: 0
  11754. }
  11755. }, Nc = K(zc, {
  11756. labels: {
  11757. y: -5,
  11758. overflow: "justify"
  11759. }
  11760. }),
  11761. M = Ea.plotOptions,
  11762. w = M.line;
  11763. M.spline = K(w);
  11764. M.scatter = K(w, {
  11765. lineWidth: 0,
  11766. states: {
  11767. hover: {
  11768. lineWidth: 0
  11769. }
  11770. },
  11771. tooltip: {
  11772. headerFormat: '<span style="font-size: 10px; color:{series.color}">{series.name}</span><br/>',
  11773. pointFormat: "x: <b>{point.x}</b><br/>y: <b>{point.y}</b><br/>"
  11774. }
  11775. });
  11776. M.area = K(w, {
  11777. threshold: 0
  11778. });
  11779. M.areaspline = K(M.area);
  11780. M.column = K(w, {
  11781. borderColor: "#FFFFFF",
  11782. borderWidth: 1,
  11783. borderRadius: 0,
  11784. groupPadding: 0.2,
  11785. marker: null,
  11786. pointPadding: 0.1,
  11787. minPointLength: 0,
  11788. cropThreshold: 50,
  11789. pointRange: null,
  11790. states: {
  11791. hover: {
  11792. brightness: 0.1,
  11793. shadow: !1
  11794. },
  11795. select: {
  11796. color: "#C0C0C0",
  11797. borderColor: "#000000",
  11798. shadow: !1
  11799. }
  11800. },
  11801. dataLabels: {
  11802. y: null,
  11803. verticalAlign: null
  11804. },
  11805. threshold: 0
  11806. });
  11807. M.bar = K(M.column, {
  11808. dataLabels: {
  11809. align: "left",
  11810. x: 5,
  11811. y: null,
  11812. verticalAlign: "middle"
  11813. }
  11814. });
  11815. M.pie = K(w, {
  11816. borderColor: "#FFFFFF",
  11817. borderWidth: 1,
  11818. center: ["50%", "50%"],
  11819. colorByPoint: !0,
  11820. dataLabels: {
  11821. distance: 30,
  11822. enabled: !0,
  11823. formatter: function () {
  11824. return this.point.name
  11825. },
  11826. y: 5
  11827. },
  11828. legendType: "point",
  11829. marker: null,
  11830. size: "75%",
  11831. showInLegend: !1,
  11832. slicedOffset: 10,
  11833. states: {
  11834. hover: {
  11835. brightness: 0.1,
  11836. shadow: !1
  11837. }
  11838. }
  11839. });
  11840. vc();
  11841. var ma = function (a) {
  11842. var b = [],
  11843. c;
  11844. (function (a) {
  11845. (c = /rgba\(\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]{1,3})\s*,\s*([0-9]?(?:\.[0-9]+)?)\s*\)/.exec(a)) ? b = [S(c[1]), S(c[2]), S(c[3]), parseFloat(c[4], 10)] : (c = /#([a-fA-F0-9]{2})([a-fA-F0-9]{2})([a-fA-F0-9]{2})/.exec(a)) && (b = [S(c[1], 16), S(c[2], 16), S(c[3], 16), 1])
  11846. })(a);
  11847. return {
  11848. get: function (c) {
  11849. return b && !isNaN(b[0]) ? c === "rgb" ? "rgb(" + b[0] + "," + b[1] + "," + b[2] + ")" : c === "a" ? b[3] : "rgba(" + b.join(",") + ")" : a
  11850. },
  11851. brighten: function (a) {
  11852. if (Bb(a) && a !== 0) {
  11853. var c;
  11854. for (c = 0; c < 3; c++) b[c] += S(a * 255), b[c] < 0 && (b[c] = 0), b[c] > 255 && (b[c] = 255)
  11855. }
  11856. return this
  11857. },
  11858. setOpacity: function (a) {
  11859. b[3] = a;
  11860. return this
  11861. }
  11862. }
  11863. };
  11864. Sa.prototype = {
  11865. init: function (a, b) {
  11866. this.element = b === "span" ? Aa(b) : x.createElementNS("http://www.w3.org/2000/svg", b);
  11867. this.renderer = a;
  11868. this.attrSetters = {}
  11869. },
  11870. animate: function (a, b, c) {
  11871. b = p(b, Ub, !0);
  11872. Ob(this);
  11873. if (b) {
  11874. b = K(b);
  11875. if (c) b.complete = c;
  11876. cc(this, a, b)
  11877. } else this.attr(a), c && c()
  11878. },
  11879. attr: function (a, b) {
  11880. var c, d, e, f, g = this.element,
  11881. h = g.nodeName,
  11882. i = this.renderer,
  11883. k, j = this.attrSetters,
  11884. l = this.shadows,
  11885. n, o = this;
  11886. Ab(a) && s(b) && (c = a, a = {}, a[c] = b);
  11887. if (Ab(a)) c = a, h === "circle" ? c = {
  11888. x: "cx",
  11889. y: "cy"
  11890. }[c] || c : c === "strokeWidth" && (c = "stroke-width"), o = A(g, c) || this[c] || 0, c !== "d" && c !== "visibility" && (o = parseFloat(o));
  11891. else for (c in a) if (k = !1, d = a[c], e = j[c] && j[c](d, c), e !== !1) {
  11892. e !== X && (d = e);
  11893. if (c === "d") d && d.join && (d = d.join(" ")), /(NaN| {2}|^$)/.test(d) && (d = "M 0 0"), this.d = d;
  11894. else if (c === "x" && h === "text") {
  11895. for (e = 0; e < g.childNodes.length; e++) f = g.childNodes[e], A(f, "x") === A(g, "x") && A(f, "x", d);
  11896. this.rotation && A(g, "transform", "rotate(" + this.rotation + " " + d + " " + S(a.y || A(g, "y")) + ")")
  11897. } else if (c === "fill") d = i.color(d, g, c);
  11898. else if (h === "circle" && (c === "x" || c === "y")) c = {
  11899. x: "cx",
  11900. y: "cy"
  11901. }[c] || c;
  11902. else if (h === "rect" && c === "r") A(g, {
  11903. rx: d,
  11904. ry: d
  11905. }), k = !0;
  11906. else if (c === "translateX" || c === "translateY" || c === "rotation" || c === "verticalAlign") this[c] = d, this.updateTransform(), k = !0;
  11907. else if (c === "stroke") d = i.color(d, g, c);
  11908. else if (c === "dashstyle") if (c = "stroke-dasharray", d = d && d.toLowerCase(), d === "solid") d = Ma;
  11909. else {
  11910. if (d) {
  11911. d = d.replace("shortdashdotdot", "3,1,1,1,1,1,").replace("shortdashdot", "3,1,1,1").replace("shortdot", "1,1,").replace("shortdash", "3,1,").replace("longdash", "8,3,").replace(/dot/g, "1,3,").replace("dash", "4,3,").replace(/,$/, "").split(",");
  11912. for (e = d.length; e--;) d[e] = S(d[e]) * a["stroke-width"];
  11913. d = d.join(",")
  11914. }
  11915. } else c === "isTracker" ? this[c] = d : c === "width" ? d = S(d) : c === "align" ? (c = "text-anchor", d = {
  11916. left: "start",
  11917. center: "middle",
  11918. right: "end"
  11919. }[d]) : c === "title" && (e = x.createElementNS("http://www.w3.org/2000/svg", "title"), e.appendChild(x.createTextNode(d)), g.appendChild(e));
  11920. c === "strokeWidth" && (c = "stroke-width");
  11921. Ec && c === "stroke-width" && d === 0 && (d = 1.0E-6);
  11922. this.symbolName && /^(x|y|r|start|end|innerR|anchorX|anchorY)/.test(c) && (n || (this.symbolAttr(a), n = !0), k = !0);
  11923. if (l && /^(width|height|visibility|x|y|d|transform)$/.test(c)) for (e = l.length; e--;) A(l[e], c, d);
  11924. if ((c === "width" || c === "height") && h === "rect" && d < 0) d = 0;
  11925. c === "text" ? (this.textStr = d, this.added && i.buildText(this)) : k || A(g, c, d)
  11926. }
  11927. if (Ec && /Chrome\/(18|19)/.test(kb) && h === "text" && (a.x !== X || a.y !== X)) c = g.parentNode, d = g.nextSibling, c && (c.removeChild(g), d ? c.insertBefore(g, d) : c.appendChild(g));
  11928. return o
  11929. },
  11930. symbolAttr: function (a) {
  11931. var b = this;
  11932. o("x,y,r,start,end,width,height,innerR,anchorX,anchorY".split(","), function (c) {
  11933. b[c] = p(a[c], b[c])
  11934. });
  11935. b.attr({
  11936. d: b.renderer.symbols[b.symbolName](b.x, b.y, b.width, b.height, b)
  11937. })
  11938. },
  11939. clip: function (a) {
  11940. return this.attr("clip-path", "url(" + this.renderer.url + "#" + a.id + ")")
  11941. },
  11942. crisp: function (a, b, c, d, e) {
  11943. var f, g = {}, h = {}, i, a = a || this.strokeWidth || this.attr && this.attr("stroke-width") || 0;
  11944. i = z(a) % 2 / 2;
  11945. h.x = Ta(b || this.x || 0) + i;
  11946. h.y = Ta(c || this.y || 0) + i;
  11947. h.width = Ta((d || this.width || 0) - 2 * i);
  11948. h.height = Ta((e || this.height || 0) - 2 * i);
  11949. h.strokeWidth = a;
  11950. for (f in h) this[f] !== h[f] && (this[f] = g[f] = h[f]);
  11951. return g
  11952. },
  11953. css: function (a) {
  11954. var b = this.element,
  11955. b = a && a.width && b.nodeName === "text",
  11956. c, d = "",
  11957. e = function (a, b) {
  11958. return "-" + b.toLowerCase()
  11959. };
  11960. if (a && a.color) a.fill = a.color;
  11961. this.styles = a = L(this.styles, a);
  11962. if (Qb && !Pb) b && delete a.width, P(this.element, a);
  11963. else {
  11964. for (c in a) d += c.replace(/([A-Z])/g, e) + ":" + a[c] + ";";
  11965. this.attr({
  11966. style: d
  11967. })
  11968. }
  11969. b && this.added && this.renderer.buildText(this);
  11970. return this
  11971. },
  11972. on: function (a, b) {
  11973. var c = b;
  11974. Ga && a === "click" && (a = "touchstart", c = function (a) {
  11975. a.preventDefault();
  11976. b()
  11977. });
  11978. this.element["on" + a] = c;
  11979. return this
  11980. },
  11981. translate: function (a, b) {
  11982. return this.attr({
  11983. translateX: a,
  11984. translateY: b
  11985. })
  11986. },
  11987. invert: function () {
  11988. this.inverted = !0;
  11989. this.updateTransform();
  11990. return this
  11991. },
  11992. htmlCss: function (a) {
  11993. var b = this.element;
  11994. if (b = a && b.tagName === "SPAN" && a.width) delete a.width, this.textWidth = b, this.updateTransform();
  11995. this.styles = L(this.styles, a);
  11996. P(this.element, a);
  11997. return this
  11998. },
  11999. htmlGetBBox: function (a) {
  12000. var b = this.element,
  12001. c = this.bBox;
  12002. if (!c || a) {
  12003. if (b.nodeName === "text") b.style.position = wb;
  12004. c = this.bBox = {
  12005. x: b.offsetLeft,
  12006. y: b.offsetTop,
  12007. width: b.offsetWidth,
  12008. height: b.offsetHeight
  12009. }
  12010. }
  12011. return c
  12012. },
  12013. htmlUpdateTransform: function () {
  12014. if (this.added) {
  12015. var a = this.renderer,
  12016. b = this.element,
  12017. c = this.translateX || 0,
  12018. d = this.translateY || 0,
  12019. e = this.x || 0,
  12020. f = this.y || 0,
  12021. g = this.textAlign || "left",
  12022. h = {
  12023. left: 0,
  12024. center: 0.5,
  12025. right: 1
  12026. }[g],
  12027. i = g && g !== "left",
  12028. k = this.shadows;
  12029. if (c || d) P(b, {
  12030. marginLeft: c,
  12031. marginTop: d
  12032. }), k && o(k, function (a) {
  12033. P(a, {
  12034. marginLeft: c + 1,
  12035. marginTop: d + 1
  12036. })
  12037. });
  12038. this.inverted && o(b.childNodes, function (c) {
  12039. a.invertChild(c, b)
  12040. });
  12041. if (b.tagName === "SPAN") {
  12042. var j, l, k = this.rotation,
  12043. n;
  12044. j = 0;
  12045. var t = 1,
  12046. r = 0,
  12047. Z;
  12048. n = S(this.textWidth);
  12049. var V = this.xCorr || 0,
  12050. v = this.yCorr || 0,
  12051. y = [k, g, b.innerHTML, this.textWidth].join(",");
  12052. if (y !== this.cTT) s(k) && (j = k * Dc, t = ja(j), r = C(j), P(b, {
  12053. filter: k ? ["progid:DXImageTransform.Microsoft.Matrix(M11=", t, ", M12=", - r, ", M21=", r, ", M22=", t, ", sizingMethod='auto expand')"].join("") : Ma
  12054. })), j = p(this.elemWidth, b.offsetWidth), l = p(this.elemHeight, b.offsetHeight), j > n && (P(b, {
  12055. width: n + ga,
  12056. display: "block",
  12057. whiteSpace: "normal"
  12058. }), j = n), n = a.fontMetrics(b.style.fontSize).b, V = t < 0 && -j, v = r < 0 && -l, Z = t * r < 0, V += r * n * (Z ? 1 - h : h), v -= t * n * (k ? Z ? h : 1 - h : 1), i && (V -= j * h * (t < 0 ? -1 : 1), k && (v -= l * h * (r < 0 ? -1 : 1)), P(b, {
  12059. textAlign: g
  12060. })), this.xCorr = V, this.yCorr = v;
  12061. P(b, {
  12062. left: e + V + ga,
  12063. top: f + v + ga
  12064. });
  12065. this.cTT = y
  12066. }
  12067. } else this.alignOnAdd = !0
  12068. },
  12069. updateTransform: function () {
  12070. var a = this.translateX || 0,
  12071. b = this.translateY || 0,
  12072. c = this.inverted,
  12073. d = this.rotation,
  12074. e = [];
  12075. c && (a += this.attr("width"), b += this.attr("height"));
  12076. (a || b) && e.push("translate(" + a + "," + b + ")");
  12077. c ? e.push("rotate(90) scale(-1,1)") : d && e.push("rotate(" + d + " " + this.x + " " + this.y + ")");
  12078. e.length && A(this.element, "transform", e.join(" "))
  12079. },
  12080. toFront: function () {
  12081. var a = this.element;
  12082. a.parentNode.appendChild(a);
  12083. return this
  12084. },
  12085. align: function (a, b, c) {
  12086. a ? (this.alignOptions = a, this.alignByTranslate = b, c || this.renderer.alignedObjects.push(this)) : (a = this.alignOptions, b = this.alignByTranslate);
  12087. var c = p(c, this.renderer),
  12088. d = a.align,
  12089. e = a.verticalAlign,
  12090. f = (c.x || 0) + (a.x || 0),
  12091. g = (c.y || 0) + (a.y || 0),
  12092. h = {};
  12093. /^(right|center)$/.test(d) && (f += (c.width - (a.width || 0)) / {
  12094. right: 1,
  12095. center: 2
  12096. }[d]);
  12097. h[b ? "translateX" : "x"] = z(f);
  12098. /^(bottom|middle)$/.test(e) && (g += (c.height - (a.height || 0)) / ({
  12099. bottom: 1,
  12100. middle: 2
  12101. }[e] || 1));
  12102. h[b ? "translateY" : "y"] = z(g);
  12103. this[this.placed ? "animate" : "attr"](h);
  12104. this.placed = !0;
  12105. this.alignAttr = h;
  12106. return this
  12107. },
  12108. getBBox: function (a) {
  12109. var b, c, d = this.rotation;
  12110. c = this.element;
  12111. var e = d * Dc;
  12112. if (c.namespaceURI === "http://www.w3.org/2000/svg") {
  12113. try {
  12114. b = c.getBBox ? L({}, c.getBBox()) : {
  12115. width: c.offsetWidth,
  12116. height: c.offsetHeight
  12117. }
  12118. } catch (f) {}
  12119. if (!b || b.width < 0) b = {
  12120. width: 0,
  12121. height: 0
  12122. };
  12123. a = b.width;
  12124. c = b.height;
  12125. if (d) b.width = Ba(c * C(e)) + Ba(a * ja(e)), b.height = Ba(c * ja(e)) + Ba(a * C(e))
  12126. } else b = this.htmlGetBBox(a);
  12127. return b
  12128. },
  12129. show: function () {
  12130. return this.attr({
  12131. visibility: eb
  12132. })
  12133. },
  12134. hide: function () {
  12135. return this.attr({
  12136. visibility: ab
  12137. })
  12138. },
  12139. add: function (a) {
  12140. var b = this.renderer,
  12141. c = a || b,
  12142. d = c.element || b.box,
  12143. e = d.childNodes,
  12144. f = this.element,
  12145. g = A(f, "zIndex"),
  12146. h;
  12147. this.parentInverted = a && a.inverted;
  12148. this.textStr !== void 0 && b.buildText(this);
  12149. if (g) c.handleZ = !0, g = S(g);
  12150. if (c.handleZ) for (c = 0; c < e.length; c++) if (a = e[c], b = A(a, "zIndex"), a !== f && (S(b) > g || !s(g) && s(b))) {
  12151. d.insertBefore(f, a);
  12152. h = !0;
  12153. break
  12154. }
  12155. h || d.appendChild(f);
  12156. this.added = !0;
  12157. aa(this, "add");
  12158. return this
  12159. },
  12160. safeRemoveChild: function (a) {
  12161. var b = a.parentNode;
  12162. b && b.removeChild(a)
  12163. },
  12164. destroy: function () {
  12165. var a = this,
  12166. b = a.element || {}, c = a.shadows,
  12167. d = a.box,
  12168. e, f;
  12169. b.onclick = b.onmouseout = b.onmouseover = b.onmousemove = null;
  12170. Ob(a);
  12171. if (a.clipPath) a.clipPath = a.clipPath.destroy();
  12172. if (a.stops) {
  12173. for (f = 0; f < a.stops.length; f++) a.stops[f] = a.stops[f].destroy();
  12174. a.stops = null
  12175. }
  12176. a.safeRemoveChild(b);
  12177. c && o(c, function (b) {
  12178. a.safeRemoveChild(b)
  12179. });
  12180. d && d.destroy();
  12181. Gb(a.renderer.alignedObjects, a);
  12182. for (e in a) delete a[e];
  12183. return null
  12184. },
  12185. empty: function () {
  12186. for (var a = this.element, b = a.childNodes, c = b.length; c--;) a.removeChild(b[c])
  12187. },
  12188. shadow: function (a, b) {
  12189. var c = [],
  12190. d, e, f = this.element,
  12191. g = this.parentInverted ? "(-1,-1)" : "(1,1)";
  12192. if (a) {
  12193. for (d = 1; d <= 3; d++) e = f.cloneNode(0), A(e, {
  12194. isShadow: "true",
  12195. stroke: "rgb(0, 0, 0)",
  12196. "stroke-opacity": 0.05 * d,
  12197. "stroke-width": 7 - 2 * d,
  12198. transform: "translate" + g,
  12199. fill: Ma
  12200. }), b ? b.element.appendChild(e) : f.parentNode.insertBefore(e, f), c.push(e);
  12201. this.shadows = c
  12202. }
  12203. return this
  12204. }
  12205. };
  12206. var Eb = function () {
  12207. this.init.apply(this, arguments)
  12208. };
  12209. Eb.prototype = {
  12210. Element: Sa,
  12211. init: function (a, b, c, d) {
  12212. var e = location,
  12213. f;
  12214. f = this.createElement("svg").attr({
  12215. xmlns: "http://www.w3.org/2000/svg",
  12216. version: "1.1"
  12217. });
  12218. a.appendChild(f.element);
  12219. this.isSVG = !0;
  12220. this.box = f.element;
  12221. this.boxWrapper = f;
  12222. this.alignedObjects = [];
  12223. this.url = Qb ? "" : e.href.replace(/#.*?$/, "").replace(/([\('\)])/g, "\\$1");
  12224. this.defs = this.createElement("defs").add();
  12225. this.forExport = d;
  12226. this.gradients = {};
  12227. this.setSize(b, c, !1)
  12228. },
  12229. destroy: function () {
  12230. var a = this.defs;
  12231. this.box = null;
  12232. this.boxWrapper = this.boxWrapper.destroy();
  12233. Jb(this.gradients || {});
  12234. this.gradients = null;
  12235. if (a) this.defs = a.destroy();
  12236. return this.alignedObjects = null
  12237. },
  12238. createElement: function (a) {
  12239. var b = new this.Element;
  12240. b.init(this, a);
  12241. return b
  12242. },
  12243. draw: function () {},
  12244. buildText: function (a) {
  12245. for (var b = a.element, c = p(a.textStr, "").toString().replace(/<(b|strong)>/g, '<span style="font-weight:bold">').replace(/<(i|em)>/g, '<span style="font-style:italic">').replace(/<a/g, "<span").replace(/<\/(b|strong|i|em|a)>/g, "</span>").split(/<br.*?>/g), d = b.childNodes, e = /style="([^"]+)"/, f = /href="([^"]+)"/, g = A(b, "x"), h = a.styles, i = h && S(h.width), k = h && h.lineHeight, j, h = d.length; h--;) b.removeChild(d[h]);
  12246. i && !a.added && this.box.appendChild(b);
  12247. c[c.length - 1] === "" && c.pop();
  12248. o(c, function (c, d) {
  12249. var h, r = 0,
  12250. p, c = c.replace(/<span/g, "|||<span").replace(/<\/span>/g, "</span>|||");
  12251. h = c.split("|||");
  12252. o(h, function (c) {
  12253. if (c !== "" || h.length === 1) {
  12254. var l = {}, o = x.createElementNS("http://www.w3.org/2000/svg", "tspan");
  12255. e.test(c) && A(o, "style", c.match(e)[1].replace(/(;| |^)color([ :])/, "$1fill$2"));
  12256. f.test(c) && (A(o, "onclick", 'location.href="' + c.match(f)[1] + '"'), P(o, {
  12257. cursor: "pointer"
  12258. }));
  12259. c = (c.replace(/<(.|\n)*?>/g, "") || " ").replace(/&lt;/g, "<").replace(/&gt;/g, ">");
  12260. o.appendChild(x.createTextNode(c));
  12261. r ? l.dx = 3 : l.x = g;
  12262. if (!r) {
  12263. if (d) {
  12264. !Pb && a.renderer.forExport && P(o, {
  12265. display: "block"
  12266. });
  12267. p = ca.getComputedStyle && S(ca.getComputedStyle(j, null).getPropertyValue("line-height"));
  12268. if (!p || isNaN(p)) p = k || j.offsetHeight || 18;
  12269. A(o, "dy", p)
  12270. }
  12271. j = o
  12272. }
  12273. A(o, l);
  12274. b.appendChild(o);
  12275. r++;
  12276. if (i) for (var c = c.replace(/-/g, "- ").split(" "), q, T = []; c.length || T.length;) q = a.getBBox().width, l = q > i, !l || c.length === 1 ? (c = T, T = [], c.length && (o = x.createElementNS("http://www.w3.org/2000/svg", "tspan"), A(o, {
  12277. dy: k || 16,
  12278. x: g
  12279. }), b.appendChild(o), q > i && (i = q))) : (o.removeChild(o.firstChild), T.unshift(c.pop())), c.length && o.appendChild(x.createTextNode(c.join(" ").replace(/- /g, "-")))
  12280. }
  12281. })
  12282. })
  12283. },
  12284. button: function (a, b, c, d, e, f, g) {
  12285. var h = this.label(a, b, c),
  12286. i = 0,
  12287. k, j, l, n, o, a = {
  12288. x1: 0,
  12289. y1: 0,
  12290. x2: 0,
  12291. y2: 1
  12292. }, e = K(za("stroke-width", 1, "stroke", "#999", "fill", za("linearGradient", a, "stops", [
  12293. [0, "#FFF"],
  12294. [1, "#DDD"]
  12295. ]), "r", 3, "padding", 3, "style", za("color", "black")), e);
  12296. l = e.style;
  12297. delete e.style;
  12298. f = K(e, za("stroke", "#68A", "fill", za("linearGradient", a, "stops", [
  12299. [0, "#FFF"],
  12300. [1, "#ACF"]
  12301. ])), f);
  12302. n = f.style;
  12303. delete f.style;
  12304. g = K(e, za("stroke", "#68A", "fill", za("linearGradient", a, "stops", [
  12305. [0, "#9BD"],
  12306. [1, "#CDF"]
  12307. ])), g);
  12308. o = g.style;
  12309. delete g.style;
  12310. ha(h.element, "mouseenter", function () {
  12311. h.attr(f).css(n)
  12312. });
  12313. ha(h.element, "mouseleave", function () {
  12314. k = [e, f, g][i];
  12315. j = [l, n, o][i];
  12316. h.attr(k).css(j)
  12317. });
  12318. h.setState = function (a) {
  12319. (i = a) ? a === 2 && h.attr(g).css(o) : h.attr(e).css(l)
  12320. };
  12321. return h.on("click", function () {
  12322. d.call(h)
  12323. }).attr(e).css(L({
  12324. cursor: "default"
  12325. }, l))
  12326. },
  12327. crispLine: function (a, b) {
  12328. a[1] === a[4] && (a[1] = a[4] = z(a[1]) + b % 2 / 2);
  12329. a[2] === a[5] && (a[2] = a[5] = z(a[2]) + b % 2 / 2);
  12330. return a
  12331. },
  12332. path: function (a) {
  12333. return this.createElement("path").attr({
  12334. d: a,
  12335. fill: Ma
  12336. })
  12337. },
  12338. circle: function (a, b, c) {
  12339. a = mb(a) ? a : {
  12340. x: a,
  12341. y: b,
  12342. r: c
  12343. };
  12344. return this.createElement("circle").attr(a)
  12345. },
  12346. arc: function (a, b, c, d, e, f) {
  12347. if (mb(a)) b = a.y, c = a.r, d = a.innerR, e = a.start, f = a.end, a = a.x;
  12348. return this.symbol("arc", a || 0, b || 0, c || 0, c || 0, {
  12349. innerR: d || 0,
  12350. start: e || 0,
  12351. end: f || 0
  12352. })
  12353. },
  12354. rect: function (a, b, c, d, e, f) {
  12355. if (mb(a)) b = a.y, c = a.width, d = a.height, e = a.r, f = a.strokeWidth, a = a.x;
  12356. e = this.createElement("rect").attr({
  12357. rx: e,
  12358. ry: e,
  12359. fill: Ma
  12360. });
  12361. return e.attr(e.crisp(f, a, b, W(c, 0), W(d, 0)))
  12362. },
  12363. setSize: function (a, b, c) {
  12364. var d = this.alignedObjects,
  12365. e = d.length;
  12366. this.width = a;
  12367. this.height = b;
  12368. for (this.boxWrapper[p(c, !0) ? "animate" : "attr"]({
  12369. width: a,
  12370. height: b
  12371. }); e--;) d[e].align()
  12372. },
  12373. g: function (a) {
  12374. var b = this.createElement("g");
  12375. return s(a) ? b.attr({
  12376. "class": Ia + a
  12377. }) : b
  12378. },
  12379. image: function (a, b, c, d, e) {
  12380. var f = {
  12381. preserveAspectRatio: Ma
  12382. };
  12383. arguments.length > 1 && L(f, {
  12384. x: b,
  12385. y: c,
  12386. width: d,
  12387. height: e
  12388. });
  12389. f = this.createElement("image").attr(f);
  12390. f.element.setAttributeNS ? f.element.setAttributeNS("http://www.w3.org/1999/xlink", "href", a) : f.element.setAttribute("hc-svg-href", a);
  12391. return f
  12392. },
  12393. symbol: function (a, b, c, d, e, f) {
  12394. var g, h = this.symbols[a],
  12395. h = h && h(z(b), z(c), d, e, f),
  12396. i = /^url\((.*?)\)$/,
  12397. k;
  12398. if (h) g = this.path(h), L(g, {
  12399. symbolName: a,
  12400. x: b,
  12401. y: c,
  12402. width: d,
  12403. height: e
  12404. }), f && L(g, f);
  12405. else if (i.test(a)) {
  12406. var j = function (a, b) {
  12407. a.attr({
  12408. width: b[0],
  12409. height: b[1]
  12410. }).translate(-z(b[0] / 2), - z(b[1] / 2))
  12411. };
  12412. k = a.match(i)[1];
  12413. a = Fc[k];
  12414. g = this.image(k).attr({
  12415. x: b,
  12416. y: c
  12417. });
  12418. a ? j(g, a) : (g.attr({
  12419. width: 0,
  12420. height: 0
  12421. }), Aa("img", {
  12422. onload: function () {
  12423. j(g, Fc[k] = [this.width, this.height])
  12424. },
  12425. src: k
  12426. }))
  12427. }
  12428. return g
  12429. },
  12430. symbols: {
  12431. circle: function (a, b, c, d) {
  12432. var e = 0.166 * c;
  12433. return [wa, a + c / 2, b, "C", a + c + e, b, a + c + e, b + d, a + c / 2, b + d, "C", a - e, b + d, a - e, b, a + c / 2, b, "Z"]
  12434. },
  12435. square: function (a, b, c, d) {
  12436. return [wa, a, b, fa, a + c, b, a + c, b + d, a, b + d, "Z"]
  12437. },
  12438. triangle: function (a, b, c, d) {
  12439. return [wa, a + c / 2, b, fa, a + c, b + d, a, b + d, "Z"]
  12440. },
  12441. "triangle-down": function (a, b, c, d) {
  12442. return [wa, a, b, fa, a + c, b, a + c / 2, b + d, "Z"]
  12443. },
  12444. diamond: function (a, b, c, d) {
  12445. return [wa, a + c / 2, b, fa, a + c, b + d / 2, a + c / 2, b + d, a, b + d / 2, "Z"]
  12446. },
  12447. arc: function (a, b, c, d, e) {
  12448. var f = e.start,
  12449. c = e.r || c || d,
  12450. g = e.end - 1.0E-6,
  12451. d = e.innerR,
  12452. h = ja(f),
  12453. i = C(f),
  12454. k = ja(g),
  12455. g = C(g),
  12456. e = e.end - f < da ? 0 : 1;
  12457. return [wa, a + c * h, b + c * i, "A", c, c, 0, e, 1, a + c * k, b + c * g, fa, a + d * k, b + d * g, "A", d, d, 0, e, 0, a + d * h, b + d * i, "Z"]
  12458. }
  12459. },
  12460. clipRect: function (a, b, c, d) {
  12461. var e = Ia + lc++,
  12462. f = this.createElement("clipPath").attr({
  12463. id: e
  12464. }).add(this.defs),
  12465. a = this.rect(a, b, c, d, 0).add(f);
  12466. a.id = e;
  12467. a.clipPath = f;
  12468. return a
  12469. },
  12470. color: function (a, b, c) {
  12471. var d, e = /^rgba/;
  12472. if (a && a.linearGradient) {
  12473. var f = this,
  12474. g = a.linearGradient,
  12475. b = !Fb(g),
  12476. c = f.gradients,
  12477. h, i = g.x1 || g[0] || 0,
  12478. k = g.y1 || g[1] || 0,
  12479. j = g.x2 || g[2] || 0,
  12480. l = g.y2 || g[3] || 0,
  12481. n, t, r = [b, i, k, j, l, a.stops.join(",")].join(",");
  12482. c[r] ? g = A(c[r].element, "id") : (g = Ia + lc++, h = f.createElement("linearGradient").attr(L({
  12483. id: g,
  12484. x1: i,
  12485. y1: k,
  12486. x2: j,
  12487. y2: l
  12488. }, b ? null : {
  12489. gradientUnits: "userSpaceOnUse"
  12490. })).add(f.defs), h.stops = [], o(a.stops, function (a) {
  12491. e.test(a[1]) ? (d = ma(a[1]), n = d.get("rgb"), t = d.get("a")) : (n = a[1], t = 1);
  12492. a = f.createElement("stop").attr({
  12493. offset: a[0],
  12494. "stop-color": n,
  12495. "stop-opacity": t
  12496. }).add(h);
  12497. h.stops.push(a)
  12498. }), c[r] = h);
  12499. return "url(" + this.url + "#" + g + ")"
  12500. } else return e.test(a) ? (d = ma(a), A(b, c + "-opacity", d.get("a")), d.get("rgb")) : (b.removeAttribute(c + "-opacity"), a)
  12501. },
  12502. text: function (a, b, c, d) {
  12503. var e = Ea.chart.style;
  12504. if (d && !this.forExport) return this.html(a, b, c);
  12505. b = z(p(b, 0));
  12506. c = z(p(c, 0));
  12507. a = this.createElement("text").attr({
  12508. x: b,
  12509. y: c,
  12510. text: a
  12511. }).css({
  12512. fontFamily: e.fontFamily,
  12513. fontSize: e.fontSize
  12514. });
  12515. a.x = b;
  12516. a.y = c;
  12517. return a
  12518. },
  12519. html: function (a, b, c) {
  12520. var d = Ea.chart.style,
  12521. e = this.createElement("span"),
  12522. f = e.attrSetters,
  12523. g = e.element,
  12524. h = e.renderer;
  12525. f.text = function (a) {
  12526. g.innerHTML = a;
  12527. return !1
  12528. };
  12529. f.x = f.y = f.align = function (a, b) {
  12530. b === "align" && (b = "textAlign");
  12531. e[b] = a;
  12532. e.htmlUpdateTransform();
  12533. return !1
  12534. };
  12535. e.attr({
  12536. text: a,
  12537. x: z(b),
  12538. y: z(c)
  12539. }).css({
  12540. position: wb,
  12541. whiteSpace: "nowrap",
  12542. fontFamily: d.fontFamily,
  12543. fontSize: d.fontSize
  12544. });
  12545. e.css = e.htmlCss;
  12546. if (h.isSVG) e.add = function (a) {
  12547. var b, c, d = h.box.parentNode;
  12548. if (a) {
  12549. if (b = a.div, !b) b = a.div = Aa(Ra, {
  12550. className: A(a.element, "class")
  12551. }, {
  12552. position: wb,
  12553. left: a.attr("translateX") + ga,
  12554. top: a.attr("translateY") + ga
  12555. }, d), c = b.style, L(a.attrSetters, {
  12556. translateX: function (a) {
  12557. c.left = a + ga
  12558. },
  12559. translateY: function (a) {
  12560. c.top = a + ga
  12561. },
  12562. visibility: function (a, b) {
  12563. c[b] = a
  12564. }
  12565. })
  12566. } else b = d;
  12567. b.appendChild(g);
  12568. e.added = !0;
  12569. e.alignOnAdd && e.htmlUpdateTransform();
  12570. return e
  12571. };
  12572. return e
  12573. },
  12574. fontMetrics: function (a) {
  12575. var a = S(a || 11),
  12576. a = a < 24 ? a + 4 : z(a * 1.2),
  12577. b = z(a * 0.8);
  12578. return {
  12579. h: a,
  12580. b: b
  12581. }
  12582. },
  12583. label: function (a, b, c, d, e, f, g, h) {
  12584. function i() {
  12585. var a = n.styles,
  12586. a = a && a.textAlign,
  12587. b = v,
  12588. c;
  12589. c = h ? 0 : ia;
  12590. if (s(y) && (a === "center" || a === "right")) b += {
  12591. center: 0.5,
  12592. right: 1
  12593. }[a] * (y - p.width);
  12594. (b !== t.x || c !== t.y) && t.attr({
  12595. x: b,
  12596. y: c
  12597. });
  12598. t.x = b;
  12599. t.y = c
  12600. }
  12601. function k(a, b) {
  12602. r ? r.attr(a, b) : x[a] = b
  12603. }
  12604. function j() {
  12605. n.attr({
  12606. text: a,
  12607. x: b,
  12608. y: c,
  12609. anchorX: e,
  12610. anchorY: f
  12611. })
  12612. }
  12613. var l = this,
  12614. n = l.g(),
  12615. t = l.text("", 0, 0, g).attr({
  12616. zIndex: 1
  12617. }).add(n),
  12618. r, p, V = "left",
  12619. v = 3,
  12620. y, q, T, A, w = 0,
  12621. x = {}, ia, g = n.attrSetters;
  12622. ha(n, "add", j);
  12623. g.width = function (a) {
  12624. y = a;
  12625. return !1
  12626. };
  12627. g.height = function (a) {
  12628. q = a;
  12629. return !1
  12630. };
  12631. g.padding = function (a) {
  12632. s(a) && a !== v && (v = a, i());
  12633. return !1
  12634. };
  12635. g.align = function (a) {
  12636. V = a;
  12637. return !1
  12638. };
  12639. g.text = function (a, b) {
  12640. t.attr(b, a);
  12641. var c;
  12642. c = t.element.style;
  12643. p = (y === void 0 || q === void 0 || n.styles.textAlign) && t.getBBox(!0);
  12644. n.width = (y || p.width) + 2 * v;
  12645. n.height = (q || p.height) + 2 * v;
  12646. ia = v + l.fontMetrics(c && c.fontSize).b;
  12647. if (!r) c = h ? -ia : 0, n.box = r = d ? l.symbol(d, 0, c, n.width, n.height) : l.rect(0, c, n.width, n.height, 0, x["stroke-width"]), r.add(n);
  12648. r.attr(K({
  12649. width: n.width,
  12650. height: n.height
  12651. }, x));
  12652. x = null;
  12653. i();
  12654. return !1
  12655. };
  12656. g["stroke-width"] = function (a, b) {
  12657. w = a % 2 / 2;
  12658. k(b, a);
  12659. return !1
  12660. };
  12661. g.stroke = g.fill = g.r = function (a, b) {
  12662. k(b, a);
  12663. return !1
  12664. };
  12665. g.anchorX = function (a, b) {
  12666. e = a;
  12667. k(b, a + w - T);
  12668. return !1
  12669. };
  12670. g.anchorY = function (a, b) {
  12671. f = a;
  12672. k(b, a - A);
  12673. return !1
  12674. };
  12675. g.x = function (a) {
  12676. a -= {
  12677. left: 0,
  12678. center: 0.5,
  12679. right: 1
  12680. }[V] * ((y || p.width) + v);
  12681. T = n.x = z(a);
  12682. n.attr("translateX", T);
  12683. return !1
  12684. };
  12685. g.y = function (a) {
  12686. A = n.y = z(a);
  12687. n.attr("translateY", a);
  12688. return !1
  12689. };
  12690. var ua = n.css;
  12691. return L(n, {
  12692. css: function (a) {
  12693. if (a) {
  12694. var b = {}, a = K({}, a);
  12695. o("fontSize,fontWeight,fontFamily,color,lineHeight,width".split(","), function (c) {
  12696. a[c] !== X && (b[c] = a[c], delete a[c])
  12697. });
  12698. t.css(b)
  12699. }
  12700. return ua.call(n, a)
  12701. },
  12702. getBBox: function () {
  12703. return r.getBBox()
  12704. },
  12705. shadow: function (a) {
  12706. r.shadow(a);
  12707. return n
  12708. },
  12709. destroy: function () {
  12710. Qa(n, "add", j);
  12711. Qa(n.element, "mouseenter");
  12712. Qa(n.element, "mouseleave");
  12713. t && (t = t.destroy());
  12714. Sa.prototype.destroy.call(n)
  12715. }
  12716. })
  12717. }
  12718. };
  12719. Xb = Eb;
  12720. var $a;
  12721. if (!Pb && !Fa) $a = {
  12722. init: function (a, b) {
  12723. var c = ["<", b, ' filled="f" stroked="f"'],
  12724. d = ["position: ", wb, ";"];
  12725. (b === "shape" || b === Ra) && d.push("left:0;top:0;width:10px;height:10px;");
  12726. Xa && d.push("visibility: ", b === Ra ? ab : eb);
  12727. c.push(' style="', d.join(""), '"/>');
  12728. if (b) c = b === Ra || b === "span" || b === "img" ? c.join("") : a.prepVML(c), this.element = Aa(c);
  12729. this.renderer = a;
  12730. this.attrSetters = {}
  12731. },
  12732. add: function (a) {
  12733. var b = this.renderer,
  12734. c = this.element,
  12735. d = b.box,
  12736. d = a ? a.element || a : d;
  12737. a && a.inverted && b.invertChild(c, d);
  12738. Xa && d.gVis === ab && P(c, {
  12739. visibility: ab
  12740. });
  12741. d.appendChild(c);
  12742. this.added = !0;
  12743. this.alignOnAdd && !this.deferUpdateTransform && this.updateTransform();
  12744. aa(this, "add");
  12745. return this
  12746. },
  12747. toggleChildren: function (a, b) {
  12748. for (var c = a.childNodes, d = c.length; d--;) P(c[d], {
  12749. visibility: b
  12750. }), c[d].nodeName === "DIV" && this.toggleChildren(c[d], b)
  12751. },
  12752. updateTransform: Sa.prototype.htmlUpdateTransform,
  12753. attr: function (a, b) {
  12754. var c, d, e, f = this.element || {}, g = f.style,
  12755. h = f.nodeName,
  12756. i = this.renderer,
  12757. k = this.symbolName,
  12758. j, l = this.shadows,
  12759. n, o = this.attrSetters,
  12760. r = this;
  12761. Ab(a) && s(b) && (c = a, a = {}, a[c] = b);
  12762. if (Ab(a)) c = a, r = c === "strokeWidth" || c === "stroke-width" ? this.strokeweight : this[c];
  12763. else for (c in a) if (d = a[c], n = !1, e = o[c] && o[c](d, c), e !== !1 && d !== null) {
  12764. e !== X && (d = e);
  12765. if (k && /^(x|y|r|start|end|width|height|innerR|anchorX|anchorY)/.test(c)) j || (this.symbolAttr(a), j = !0), n = !0;
  12766. else if (c === "d") {
  12767. d = d || [];
  12768. this.d = d.join(" ");
  12769. e = d.length;
  12770. for (n = []; e--;) n[e] = Bb(d[e]) ? z(d[e] * 10) - 5 : d[e] === "Z" ? "x" : d[e];
  12771. d = n.join(" ") || "x";
  12772. f.path = d;
  12773. if (l) for (e = l.length; e--;) l[e].path = d;
  12774. n = !0
  12775. } else if (c === "zIndex" || c === "visibility") {
  12776. if (Xa && c === "visibility" && h === "DIV") f.gVis = d, this.toggleChildren(f, d), d === eb && (d = null);
  12777. d && (g[c] = d);
  12778. n = !0
  12779. } else if (c === "width" || c === "height") d = W(0, d), this[c] = d, this.updateClipping ? (this[c] = d, this.updateClipping()) : g[c] = d, n = !0;
  12780. else if (c === "x" || c === "y") this[c] = d, g[{
  12781. x: "left",
  12782. y: "top"
  12783. }[c]] = d;
  12784. else if (c === "class") f.className = d;
  12785. else if (c === "stroke") d = i.color(d, f, c), c = "strokecolor";
  12786. else if (c === "stroke-width" || c === "strokeWidth") f.stroked = d ? !0 : !1, c = "strokeweight", this[c] = d, Bb(d) && (d += ga);
  12787. else if (c === "dashstyle")(f.getElementsByTagName("stroke")[0] || Aa(i.prepVML(["<stroke/>"]), null, null, f))[c] = d || "solid", this.dashstyle = d, n = !0;
  12788. else if (c === "fill") h === "SPAN" ? g.color = d : (f.filled = d !== Ma ? !0 : !1, d = i.color(d, f, c), c = "fillcolor");
  12789. else if (c === "translateX" || c === "translateY" || c === "rotation") this[c] = d, this.updateTransform(), n = !0;
  12790. else if (c === "text") this.bBox = null, f.innerHTML = d, n = !0;
  12791. if (l && c === "visibility") for (e = l.length; e--;) l[e].style[c] = d;
  12792. n || (Xa ? f[c] = d : A(f, c, d))
  12793. }
  12794. return r
  12795. },
  12796. clip: function (a) {
  12797. var b = this,
  12798. c = a.members;
  12799. c.push(b);
  12800. b.destroyClip = function () {
  12801. Gb(c, b)
  12802. };
  12803. return b.css(a.getCSS(b.inverted))
  12804. },
  12805. css: Sa.prototype.htmlCss,
  12806. safeRemoveChild: function (a) {
  12807. a.parentNode && Tb(a)
  12808. },
  12809. destroy: function () {
  12810. this.destroyClip && this.destroyClip();
  12811. return Sa.prototype.destroy.apply(this)
  12812. },
  12813. empty: function () {
  12814. for (var a = this.element.childNodes, b = a.length, c; b--;) c = a[b], c.parentNode.removeChild(c)
  12815. },
  12816. on: function (a, b) {
  12817. this.element["on" + a] = function () {
  12818. var a = ca.event;
  12819. a.target = a.srcElement;
  12820. b(a)
  12821. };
  12822. return this
  12823. },
  12824. shadow: function (a, b) {
  12825. var c = [],
  12826. d, e = this.element,
  12827. f = this.renderer,
  12828. g, h = e.style,
  12829. i, k = e.path;
  12830. k && typeof k.value !== "string" && (k = "x");
  12831. if (a) {
  12832. for (d = 1; d <= 3; d++) i = ['<shape isShadow="true" strokeweight="', 7 - 2 * d, '" filled="false" path="', k, '" coordsize="100,100" style="', e.style.cssText, '" />'], g = Aa(f.prepVML(i), null, {
  12833. left: S(h.left) + 1,
  12834. top: S(h.top) + 1
  12835. }), i = ['<stroke color="black" opacity="', 0.05 * d, '"/>'], Aa(f.prepVML(i), null, null, g), b ? b.element.appendChild(g) : e.parentNode.insertBefore(g, e), c.push(g);
  12836. this.shadows = c
  12837. }
  12838. return this
  12839. }
  12840. }, $a = pa(Sa, $a), w = {
  12841. Element: $a,
  12842. isIE8: kb.indexOf("MSIE 8.0") > -1,
  12843. init: function (a, b, c) {
  12844. var d, e;
  12845. this.alignedObjects = [];
  12846. d = this.createElement(Ra);
  12847. e = d.element;
  12848. e.style.position = mc;
  12849. a.appendChild(d.element);
  12850. this.box = e;
  12851. this.boxWrapper = d;
  12852. this.setSize(b, c, !1);
  12853. if (!x.namespaces.hcv) x.namespaces.add("hcv", "urn:schemas-microsoft-com:vml"), x.createStyleSheet().cssText = "hcv\\:fill, hcv\\:path, hcv\\:shape, hcv\\:stroke{ behavior:url(#default#VML); display: inline-block; } "
  12854. },
  12855. clipRect: function (a, b, c, d) {
  12856. var e = this.createElement();
  12857. return L(e, {
  12858. members: [],
  12859. left: a,
  12860. top: b,
  12861. width: c,
  12862. height: d,
  12863. getCSS: function (a) {
  12864. var b = this.top,
  12865. c = this.left,
  12866. d = c + this.width,
  12867. e = b + this.height,
  12868. b = {
  12869. clip: "rect(" + z(a ? c : b) + "px," + z(a ? e : d) + "px," + z(a ? d : e) + "px," + z(a ? b : c) + "px)"
  12870. };
  12871. !a && Xa && L(b, {
  12872. width: d + ga,
  12873. height: e + ga
  12874. });
  12875. return b
  12876. },
  12877. updateClipping: function () {
  12878. o(e.members, function (a) {
  12879. a.css(e.getCSS(a.inverted))
  12880. })
  12881. }
  12882. })
  12883. },
  12884. color: function (a, b, c) {
  12885. var d, e = /^rgba/;
  12886. if (a && a.linearGradient) {
  12887. var f, g, h = a.linearGradient,
  12888. i = h.x1 || h[0] || 0,
  12889. k = h.y1 || h[1] || 0,
  12890. j = h.x2 || h[2] || 0,
  12891. h = h.y2 || h[3] || 0,
  12892. l, n, p, r;
  12893. o(a.stops, function (a, b) {
  12894. e.test(a[1]) ? (d = ma(a[1]), f = d.get("rgb"), g = d.get("a")) : (f = a[1], g = 1);
  12895. b ? (p = f, r = g) : (l = f, n = g)
  12896. });
  12897. if (c === "fill") a = 90 - oa.atan((h - k) / (j - i)) * 180 / da, a = ['<fill colors="0% ', l, ",100% ", p, '" angle="', a, '" opacity="', r, '" o:opacity2="', n, '" type="gradient" focus="100%" method="sigma" />'], Aa(this.prepVML(a), null, null, b);
  12898. else return f
  12899. } else if (e.test(a) && b.tagName !== "IMG") return d = ma(a), a = ["<", c, ' opacity="', d.get("a"), '"/>'], Aa(this.prepVML(a), null, null, b), d.get("rgb");
  12900. else {
  12901. b = b.getElementsByTagName(c);
  12902. if (b.length) b[0].opacity = 1;
  12903. return a
  12904. }
  12905. },
  12906. prepVML: function (a) {
  12907. var b = this.isIE8,
  12908. a = a.join("");
  12909. b ? (a = a.replace("/>", ' xmlns="urn:schemas-microsoft-com:vml" />'), a = a.indexOf('style="') === -1 ? a.replace("/>", ' style="display:inline-block;behavior:url(#default#VML);" />') : a.replace('style="', 'style="display:inline-block;behavior:url(#default#VML);')) : a = a.replace("<", "<hcv:");
  12910. return a
  12911. },
  12912. text: Eb.prototype.html,
  12913. path: function (a) {
  12914. return this.createElement("shape").attr({
  12915. coordsize: "100 100",
  12916. d: a
  12917. })
  12918. },
  12919. circle: function (a, b, c) {
  12920. return this.symbol("circle").attr({
  12921. x: a - c,
  12922. y: b - c,
  12923. width: 2 * c,
  12924. height: 2 * c
  12925. })
  12926. },
  12927. g: function (a) {
  12928. var b;
  12929. a && (b = {
  12930. className: Ia + a,
  12931. "class": Ia + a
  12932. });
  12933. return this.createElement(Ra).attr(b)
  12934. },
  12935. image: function (a, b, c, d, e) {
  12936. var f = this.createElement("img").attr({
  12937. src: a
  12938. });
  12939. arguments.length > 1 && f.css({
  12940. left: b,
  12941. top: c,
  12942. width: d,
  12943. height: e
  12944. });
  12945. return f
  12946. },
  12947. rect: function (a, b, c, d, e, f) {
  12948. if (mb(a)) b = a.y, c = a.width, d = a.height, f = a.strokeWidth, a = a.x;
  12949. var g = this.symbol("rect");
  12950. g.r = e;
  12951. return g.attr(g.crisp(f, a, b, W(c, 0), W(d, 0)))
  12952. },
  12953. invertChild: function (a, b) {
  12954. var c = b.style;
  12955. P(a, {
  12956. flip: "x",
  12957. left: S(c.width) - 10,
  12958. top: S(c.height) - 10,
  12959. rotation: -90
  12960. })
  12961. },
  12962. symbols: {
  12963. arc: function (a, b, c, d, e) {
  12964. var f = e.start,
  12965. g = e.end,
  12966. c = e.r || c || d,
  12967. d = ja(f),
  12968. h = C(f),
  12969. i = ja(g),
  12970. k = C(g),
  12971. e = e.innerR,
  12972. j = 0.08 / c,
  12973. l = e && 0.25 / e || 0;
  12974. if (g - f === 0) return ["x"];
  12975. else 2 * da - g + f < j ? i = -j : g - f < l && (i = ja(f + l));
  12976. return ["wa", a - c, b - c, a + c, b + c, a + c * d, b + c * h, a + c * i, b + c * k, "at", a - e, b - e, a + e, b + e, a + e * i, b + e * k, a + e * d, b + e * h, "x", "e"]
  12977. },
  12978. circle: function (a, b, c, d) {
  12979. return ["wa", a, b, a + c, b + d, a + c, b + d / 2, a + c, b + d / 2, "e"]
  12980. },
  12981. rect: function (a, b, c, d, e) {
  12982. if (!s(e)) return [];
  12983. var f = a + c,
  12984. g = b + d,
  12985. c = Ua(e.r || 0, c, d);
  12986. return [wa, a + c, b, fa, f - c, b, "wa", f - 2 * c, b, f, b + 2 * c, f - c, b, f, b + c, fa, f, g - c, "wa", f - 2 * c, g - 2 * c, f, g, f, g - c, f - c, g, fa, a + c, g, "wa", a, g - 2 * c, a + 2 * c, g, a + c, g, a, g - c, fa, a, b + c, "wa", a, b, a + 2 * c, b + 2 * c, a, b + c, a + c, b, "x", "e"]
  12987. }
  12988. }
  12989. }, $a = function () {
  12990. this.init.apply(this, arguments)
  12991. }, $a.prototype = K(Eb.prototype, w), Xb = $a;
  12992. var oc, Cc;
  12993. Fa && (oc = function () {}, Cc = function () {
  12994. function a() {
  12995. var a = b.length,
  12996. d;
  12997. for (d = 0; d < a; d++) b[d]();
  12998. b = []
  12999. }
  13000. var b = [];
  13001. return {
  13002. push: function (c, d) {
  13003. b.length === 0 && Hc(d, a);
  13004. b.push(c)
  13005. }
  13006. }
  13007. }());
  13008. Xb = $a || oc || Eb;
  13009. wc.prototype.callbacks = [];
  13010. var lb = function () {};
  13011. lb.prototype = {
  13012. init: function (a, b, c) {
  13013. var d = a.chart.counters;
  13014. this.series = a;
  13015. this.applyOptions(b, c);
  13016. this.pointAttr = {};
  13017. if (a.options.colorByPoint) {
  13018. b = a.chart.options.colors;
  13019. if (!this.options) this.options = {};
  13020. this.color = this.options.color = this.color || b[d.color++];
  13021. d.wrapColor(b.length)
  13022. }
  13023. a.chart.pointCount++;
  13024. return this
  13025. },
  13026. applyOptions: function (a, b) {
  13027. var c = this.series,
  13028. d = typeof a;
  13029. this.config = a;
  13030. if (d === "number" || a === null) this.y = a;
  13031. else if (typeof a[0] === "number") this.x = a[0], this.y = a[1];
  13032. else if (d === "object" && typeof a.length !== "number") {
  13033. if (L(this, a), this.options = a, a.dataLabels) c._hasPointLabels = !0
  13034. } else if (typeof a[0] === "string") this.name = a[0], this.y = a[1];
  13035. if (this.x === X) this.x = b === X ? c.autoIncrement() : b
  13036. },
  13037. destroy: function () {
  13038. var a = this.series,
  13039. b = a.chart.hoverPoints,
  13040. c;
  13041. a.chart.pointCount--;
  13042. b && (this.setState(), Gb(b, this));
  13043. if (this === a.chart.hoverPoint) this.onMouseOut();
  13044. a.chart.hoverPoints = null;
  13045. if (this.graphic || this.dataLabel) Qa(this), this.destroyElements();
  13046. this.legendItem && this.series.chart.legend.destroyItem(this);
  13047. for (c in this) this[c] = null
  13048. },
  13049. destroyElements: function () {
  13050. for (var a = "graphic,tracker,dataLabel,group,connector,shadowGroup".split(","), b, c = 6; c--;) b = a[c], this[b] && (this[b] = this[b].destroy())
  13051. },
  13052. getLabelConfig: function () {
  13053. return {
  13054. x: this.category,
  13055. y: this.y,
  13056. key: this.name || this.category,
  13057. series: this.series,
  13058. point: this,
  13059. percentage: this.percentage,
  13060. total: this.total || this.stackTotal
  13061. }
  13062. },
  13063. select: function (a, b) {
  13064. var c = this,
  13065. d = c.series.chart,
  13066. a = p(a, !c.selected);
  13067. c.firePointEvent(a ? "select" : "unselect", {
  13068. accumulate: b
  13069. }, function () {
  13070. c.selected = a;
  13071. c.setState(a && "select");
  13072. b || o(d.getSelectedPoints(), function (a) {
  13073. if (a.selected && a !== c) a.selected = !1, a.setState(Ka), a.firePointEvent("unselect")
  13074. })
  13075. })
  13076. },
  13077. onMouseOver: function () {
  13078. var a = this.series,
  13079. b = a.chart,
  13080. c = b.tooltip,
  13081. d = b.hoverPoint;
  13082. if (d && d !== this) d.onMouseOut();
  13083. this.firePointEvent("mouseOver");
  13084. c && (!c.shared || a.noSharedTooltip) && c.refresh(this);
  13085. this.setState(ta);
  13086. b.hoverPoint = this
  13087. },
  13088. onMouseOut: function () {
  13089. this.firePointEvent("mouseOut");
  13090. this.setState();
  13091. this.series.chart.hoverPoint = null
  13092. },
  13093. tooltipFormatter: function (a) {
  13094. var b = this.series,
  13095. c = b.tooltipOptions,
  13096. d = String(this.y).split("."),
  13097. d = d[1] ? d[1].length : 0,
  13098. e = a.match(/\{(series|point)\.[a-zA-Z]+\}/g),
  13099. f = /[{\.}]/,
  13100. g, h, i, k;
  13101. for (k in e) h = e[k], Ab(h) && h !== a && (i = (" " + h).split(f), g = {
  13102. point: this,
  13103. series: b
  13104. }[i[1]], i = i[2], g = g === this && (i === "y" || i === "open" || i === "high" || i === "low" || i === "close") ? (c.valuePrefix || c.yPrefix || "") + dc(this[i], p(c.valueDecimals, c.yDecimals, d)) + (c.valueSuffix || c.ySuffix || "") : g[i], a = a.replace(h, g));
  13105. return a
  13106. },
  13107. update: function (a, b, c) {
  13108. var d = this,
  13109. e = d.series,
  13110. f = d.graphic,
  13111. g, h = e.data,
  13112. i = h.length,
  13113. k = e.chart,
  13114. b = p(b, !0);
  13115. d.firePointEvent("update", {
  13116. options: a
  13117. }, function () {
  13118. d.applyOptions(a);
  13119. mb(a) && (e.getAttribs(), f && f.attr(d.pointAttr[e.state]));
  13120. for (g = 0; g < i; g++) if (h[g] === d) {
  13121. e.xData[g] = d.x;
  13122. e.yData[g] = d.y;
  13123. e.options.data[g] = a;
  13124. break
  13125. }
  13126. e.isDirty = !0;
  13127. e.isDirtyData = !0;
  13128. b && k.redraw(c)
  13129. })
  13130. },
  13131. remove: function (a, b) {
  13132. var c = this,
  13133. d = c.series,
  13134. e = d.chart,
  13135. f, g = d.data,
  13136. h = g.length;
  13137. Kb(b, e);
  13138. a = p(a, !0);
  13139. c.firePointEvent("remove", null, function () {
  13140. for (f = 0; f < h; f++) if (g[f] === c) {
  13141. g.splice(f, 1);
  13142. d.options.data.splice(f, 1);
  13143. d.xData.splice(f, 1);
  13144. d.yData.splice(f, 1);
  13145. break
  13146. }
  13147. c.destroy();
  13148. d.isDirty = !0;
  13149. d.isDirtyData = !0;
  13150. a && e.redraw()
  13151. })
  13152. },
  13153. firePointEvent: function (a, b, c) {
  13154. var d = this,
  13155. e = this.series.options;
  13156. (e.point.events[a] || d.options && d.options.events && d.options.events[a]) && this.importEvents();
  13157. a === "click" && e.allowPointSelect && (c = function (a) {
  13158. d.select(null, a.ctrlKey || a.metaKey || a.shiftKey)
  13159. });
  13160. aa(this, a, b, c)
  13161. },
  13162. importEvents: function () {
  13163. if (!this.hasImportedEvents) {
  13164. var a = K(this.series.options.point, this.options).events,
  13165. b;
  13166. this.events = a;
  13167. for (b in a) ha(this, b, a[b]);
  13168. this.hasImportedEvents = !0
  13169. }
  13170. },
  13171. setState: function (a) {
  13172. var b = this.plotX,
  13173. c = this.plotY,
  13174. d = this.series,
  13175. e = d.options.states,
  13176. f = M[d.type].marker && d.options.marker,
  13177. g = f && !f.enabled,
  13178. h = f && f.states[a],
  13179. i = h && h.enabled === !1,
  13180. k = d.stateMarkerGraphic,
  13181. j = d.chart,
  13182. l = this.pointAttr,
  13183. a = a || Ka;
  13184. if (!(a === this.state || this.selected && a !== "select" || e[a] && e[a].enabled === !1 || a && (i || g && !h.enabled))) {
  13185. if (this.graphic) e = f && this.graphic.symbolName && l[a].r, this.graphic.attr(K(l[a], e ? {
  13186. x: b - e,
  13187. y: c - e,
  13188. width: 2 * e,
  13189. height: 2 * e
  13190. } : {}));
  13191. else {
  13192. if (a) {
  13193. if (!k) e = f.radius, d.stateMarkerGraphic = k = j.renderer.symbol(d.symbol, - e, - e, 2 * e, 2 * e).attr(l[a]).add(d.group);
  13194. k.translate(b, c)
  13195. }
  13196. if (k) k[a ? "show" : "hide"]()
  13197. }
  13198. this.state = a
  13199. }
  13200. }
  13201. };
  13202. var $ = function () {};
  13203. $.prototype = {
  13204. isCartesian: !0,
  13205. type: "line",
  13206. pointClass: lb,
  13207. sorted: !0,
  13208. pointAttrToOptions: {
  13209. stroke: "lineColor",
  13210. "stroke-width": "lineWidth",
  13211. fill: "fillColor",
  13212. r: "radius"
  13213. },
  13214. init: function (a, b) {
  13215. var c, d;
  13216. d = a.series.length;
  13217. this.chart = a;
  13218. this.options = b = this.setOptions(b);
  13219. this.bindAxes();
  13220. L(this, {
  13221. index: d,
  13222. name: b.name || "Series " + (d + 1),
  13223. state: Ka,
  13224. pointAttr: {},
  13225. visible: b.visible !== !1,
  13226. selected: b.selected === !0
  13227. });
  13228. if (Fa) b.animation = !1;
  13229. d = b.events;
  13230. for (c in d) ha(this, c, d[c]);
  13231. if (d && d.click || b.point && b.point.events && b.point.events.click || b.allowPointSelect) a.runTrackerClick = !0;
  13232. this.getColor();
  13233. this.getSymbol();
  13234. this.setData(b.data, !1)
  13235. },
  13236. bindAxes: function () {
  13237. var a = this,
  13238. b = a.options,
  13239. c = a.chart,
  13240. d;
  13241. a.isCartesian && o(["xAxis", "yAxis"], function (e) {
  13242. o(c[e], function (c) {
  13243. d = c.options;
  13244. if (b[e] === d.index || b[e] === X && d.index === 0) c.series.push(a), a[e] = c, c.isDirty = !0
  13245. })
  13246. })
  13247. },
  13248. autoIncrement: function () {
  13249. var a = this.options,
  13250. b = this.xIncrement,
  13251. b = p(b, a.pointStart, 0);
  13252. this.pointInterval = p(this.pointInterval, a.pointInterval, 1);
  13253. this.xIncrement = b + this.pointInterval;
  13254. return b
  13255. },
  13256. getSegments: function () {
  13257. var a = -1,
  13258. b = [],
  13259. c, d = this.points,
  13260. e = d.length;
  13261. if (e) if (this.options.connectNulls) {
  13262. for (c = e; c--;) d[c].y === null && d.splice(c, 1);
  13263. d.length && (b = [d])
  13264. } else o(d, function (c, g) {
  13265. c.y === null ? (g > a + 1 && b.push(d.slice(a + 1, g)), a = g) : g === e - 1 && b.push(d.slice(a + 1, g + 1))
  13266. });
  13267. this.segments = b
  13268. },
  13269. setOptions: function (a) {
  13270. var b = this.chart.options,
  13271. c = b.plotOptions,
  13272. d = a.data;
  13273. a.data = null;
  13274. c = K(c[this.type], c.series, a);
  13275. c.data = a.data = d;
  13276. this.tooltipOptions = K(b.tooltip, c.tooltip);
  13277. return c
  13278. },
  13279. getColor: function () {
  13280. var a = this.chart.options.colors,
  13281. b = this.chart.counters;
  13282. this.color = this.options.color || a[b.color++] || "#0000ff";
  13283. b.wrapColor(a.length)
  13284. },
  13285. getSymbol: function () {
  13286. var a = this.options.marker,
  13287. b = this.chart,
  13288. c = b.options.symbols,
  13289. b = b.counters;
  13290. this.symbol = a.symbol || c[b.symbol++];
  13291. if (/^url/.test(this.symbol)) a.radius = 0;
  13292. b.wrapSymbol(c.length)
  13293. },
  13294. addPoint: function (a, b, c, d) {
  13295. var e = this.data,
  13296. f = this.graph,
  13297. g = this.area,
  13298. h = this.chart,
  13299. i = this.xData,
  13300. k = this.yData,
  13301. j = f && f.shift || 0,
  13302. l = this.options.data;
  13303. Kb(d, h);
  13304. if (f && c) f.shift = j + 1;
  13305. if (g) {
  13306. if (c) g.shift = j + 1;
  13307. g.isArea = !0
  13308. }
  13309. b = p(b, !0);
  13310. d = {
  13311. series: this
  13312. };
  13313. this.pointClass.prototype.applyOptions.apply(d, [a]);
  13314. i.push(d.x);
  13315. k.push(this.valueCount === 4 ? [d.open, d.high, d.low, d.close] : d.y);
  13316. l.push(a);
  13317. c && (e[0] ? e[0].remove(!1) : (e.shift(), i.shift(), k.shift(), l.shift()));
  13318. this.getAttribs();
  13319. this.isDirtyData = this.isDirty = !0;
  13320. b && h.redraw()
  13321. },
  13322. setData: function (a, b) {
  13323. var c = this.points,
  13324. d = this.options,
  13325. e = this.initialColor,
  13326. f = this.chart,
  13327. g = null;
  13328. this.xIncrement = null;
  13329. this.pointRange = this.xAxis && this.xAxis.categories && 1 || d.pointRange;
  13330. if (s(e)) f.counters.color = e;
  13331. var h = [],
  13332. i = [],
  13333. k = a ? a.length : [],
  13334. j = this.valueCount === 4;
  13335. if (k > (d.turboThreshold || 1E3)) {
  13336. for (e = 0; g === null && e < k;) g = a[e], e++;
  13337. if (Bb(g)) {
  13338. g = p(d.pointStart, 0);
  13339. d = p(d.pointInterval, 1);
  13340. for (e = 0; e < k; e++) h[e] = g, i[e] = a[e], g += d;
  13341. this.xIncrement = g
  13342. } else if (Fb(g)) if (j) for (e = 0; e < k; e++) d = a[e], h[e] = d[0], i[e] = d.slice(1, 5);
  13343. else for (e = 0; e < k; e++) d = a[e], h[e] = d[0], i[e] = d[1]
  13344. } else for (e = 0; e < k; e++) d = {
  13345. series: this
  13346. }, this.pointClass.prototype.applyOptions.apply(d, [a[e]]), h[e] = d.x, i[e] = j ? [d.open, d.high, d.low, d.close] : d.y;
  13347. this.data = [];
  13348. this.options.data = a;
  13349. this.xData = h;
  13350. this.yData = i;
  13351. for (e = c && c.length || 0; e--;) c[e] && c[e].destroy && c[e].destroy();
  13352. this.isDirty = this.isDirtyData = f.isDirtyBox = !0;
  13353. p(b, !0) && f.redraw(!1)
  13354. },
  13355. remove: function (a, b) {
  13356. var c = this,
  13357. d = c.chart,
  13358. a = p(a, !0);
  13359. if (!c.isRemoving) c.isRemoving = !0, aa(c, "remove", null, function () {
  13360. c.destroy();
  13361. d.isDirtyLegend = d.isDirtyBox = !0;
  13362. a && d.redraw(b)
  13363. });
  13364. c.isRemoving = !1
  13365. },
  13366. processData: function (a) {
  13367. var b = this.xData,
  13368. c = this.yData,
  13369. d = b.length,
  13370. e = 0,
  13371. f = d,
  13372. g, h, i = this.xAxis,
  13373. k = this.options,
  13374. j = k.cropThreshold,
  13375. l = this.isCartesian;
  13376. if (l && !this.isDirty && !i.isDirty && !this.yAxis.isDirty && !a) return !1;
  13377. if (l && this.sorted && (!j || d > j || this.forceCrop)) if (a = i.getExtremes(), i = a.min, j = a.max, b[d - 1] < i || b[0] > j) b = [], c = [];
  13378. else if (b[0] < i || b[d - 1] > j) {
  13379. for (a = 0; a < d; a++) if (b[a] >= i) {
  13380. e = W(0, a - 1);
  13381. break
  13382. }
  13383. for (; a < d; a++) if (b[a] > j) {
  13384. f = a + 1;
  13385. break
  13386. }
  13387. b = b.slice(e, f);
  13388. c = c.slice(e, f);
  13389. g = !0
  13390. }
  13391. for (a = b.length - 1; a > 0; a--) if (d = b[a] - b[a - 1], d > 0 && (h === X || d < h)) h = d;
  13392. this.cropped = g;
  13393. this.cropStart = e;
  13394. this.processedXData = b;
  13395. this.processedYData = c;
  13396. if (k.pointRange === null) this.pointRange = h || 1;
  13397. this.closestPointRange = h
  13398. },
  13399. generatePoints: function () {
  13400. var a = this.options.data,
  13401. b = this.data,
  13402. c, d = this.processedXData,
  13403. e = this.processedYData,
  13404. f = this.pointClass,
  13405. g = d.length,
  13406. h = this.cropStart || 0,
  13407. i, k = this.hasGroupedData,
  13408. j, l = [],
  13409. n;
  13410. if (!b && !k) b = [], b.length = a.length, b = this.data = b;
  13411. for (n = 0; n < g; n++) i = h + n, k ? l[n] = (new f).init(this, [d[n]].concat(Hb(e[n]))) : (b[i] ? j = b[i] : b[i] = j = (new f).init(this, a[i], d[n]), l[n] = j);
  13412. if (b && (g !== (c = b.length) || k)) for (n = 0; n < c; n++) n === h && !k && (n += g), b[n] && b[n].destroyElements();
  13413. this.data = b;
  13414. this.points = l
  13415. },
  13416. translate: function () {
  13417. this.processedXData || this.processData();
  13418. this.generatePoints();
  13419. for (var a = this.chart, b = this.options, c = b.stacking, d = this.xAxis, e = d.categories, f = this.yAxis, g = this.points, h = g.length, i = !! this.modifyValue, k, j = f.series, l = j.length; l--;) if (j[l].visible) {
  13420. l === this.index && (k = !0);
  13421. break
  13422. }
  13423. for (l = 0; l < h; l++) {
  13424. var j = g[l],
  13425. n = j.x,
  13426. o = j.y,
  13427. r = j.low,
  13428. p = f.stacks[(o < b.threshold ? "-" : "") + this.stackKey];
  13429. j.plotX = z(d.translate(n, 0, 0, 0, 1) * 10) / 10;
  13430. if (c && this.visible && p && p[n]) {
  13431. r = p[n];
  13432. n = r.total;
  13433. r.cum = r = r.cum - o;
  13434. o = r + o;
  13435. if (k) r = b.threshold;
  13436. c === "percent" && (r = n ? r * 100 / n : 0, o = n ? o * 100 / n : 0);
  13437. j.percentage = n ? j.y * 100 / n : 0;
  13438. j.stackTotal = n;
  13439. j.stackY = o
  13440. }
  13441. j.yBottom = s(r) ? f.translate(r, 0, 1, 0, 1) : null;
  13442. i && (o = this.modifyValue(o, j));
  13443. j.plotY = typeof o === "number" ? z(f.translate(o, 0, 1, 0, 1) * 10) / 10 : X;
  13444. j.clientX = a.inverted ? a.plotHeight - j.plotX : j.plotX;
  13445. j.category = e && e[j.x] !== X ? e[j.x] : j.x
  13446. }
  13447. this.getSegments()
  13448. },
  13449. setTooltipPoints: function (a) {
  13450. var b = this.chart,
  13451. c = b.inverted,
  13452. d = [],
  13453. b = z((c ? b.plotTop : b.plotLeft) + b.plotSizeX),
  13454. e, f;
  13455. e = this.xAxis;
  13456. var g, h, i = [];
  13457. if (this.options.enableMouseTracking !== !1) {
  13458. if (a) this.tooltipPoints = null;
  13459. o(this.segments || this.points, function (a) {
  13460. d = d.concat(a)
  13461. });
  13462. e && e.reversed && (d = d.reverse());
  13463. a = d.length;
  13464. for (h = 0; h < a; h++) {
  13465. g = d[h];
  13466. e = d[h - 1] ? d[h - 1]._high + 1 : 0;
  13467. for (f = g._high = d[h + 1] ? Ta((g.plotX + (d[h + 1] ? d[h + 1].plotX : b)) / 2) : b; e <= f;) i[c ? b - e++ : e++] = g
  13468. }
  13469. this.tooltipPoints = i
  13470. }
  13471. },
  13472. tooltipHeaderFormatter: function (a) {
  13473. var b = this.tooltipOptions,
  13474. c = b.xDateFormat || "%A, %b %e, %Y",
  13475. d = this.xAxis;
  13476. return b.headerFormat.replace("{point.key}", d && d.options.type === "datetime" ? ac(c, a) : a).replace("{series.name}", this.name).replace("{series.color}", this.color)
  13477. },
  13478. onMouseOver: function () {
  13479. var a = this.chart,
  13480. b = a.hoverSeries;
  13481. if (Ga || !a.mouseIsDown) {
  13482. if (b && b !== this) b.onMouseOut();
  13483. this.options.events.mouseOver && aa(this, "mouseOver");
  13484. this.setState(ta);
  13485. a.hoverSeries = this
  13486. }
  13487. },
  13488. onMouseOut: function () {
  13489. var a = this.options,
  13490. b = this.chart,
  13491. c = b.tooltip,
  13492. d = b.hoverPoint;
  13493. if (d) d.onMouseOut();
  13494. this && a.events.mouseOut && aa(this, "mouseOut");
  13495. c && !a.stickyTracking && !c.shared && c.hide();
  13496. this.setState();
  13497. b.hoverSeries = null
  13498. },
  13499. animate: function (a) {
  13500. var b = this.chart,
  13501. c = this.clipRect,
  13502. d = this.options.animation;
  13503. d && !mb(d) && (d = {});
  13504. if (a) {
  13505. if (!c.isAnimating) c.attr("width", 0), c.isAnimating = !0
  13506. } else c.animate({
  13507. width: b.plotSizeX
  13508. }, d), this.animate = null
  13509. },
  13510. drawPoints: function () {
  13511. var a, b = this.points,
  13512. c = this.chart,
  13513. d, e, f, g, h, i, k, j;
  13514. if (this.options.marker.enabled) for (f = b.length; f--;) if (g = b[f], d = g.plotX, e = g.plotY, j = g.graphic, e !== X && !isNaN(e)) if (a = g.pointAttr[g.selected ? "select" : Ka], h = a.r, i = p(g.marker && g.marker.symbol, this.symbol), k = i.indexOf("url") === 0, j) j.animate(L({
  13515. x: d - h,
  13516. y: e - h
  13517. }, j.symbolName ? {
  13518. width: 2 * h,
  13519. height: 2 * h
  13520. } : {}));
  13521. else if (h > 0 || k) g.graphic = c.renderer.symbol(i, d - h, e - h, 2 * h, 2 * h).attr(a).add(this.group)
  13522. },
  13523. convertAttribs: function (a, b, c, d) {
  13524. var e = this.pointAttrToOptions,
  13525. f, g, h = {}, a = a || {}, b = b || {}, c = c || {}, d = d || {};
  13526. for (f in e) g = e[f], h[f] = p(a[g], b[f], c[f], d[f]);
  13527. return h
  13528. },
  13529. getAttribs: function () {
  13530. var a = this,
  13531. b = M[a.type].marker ? a.options.marker : a.options,
  13532. c = b.states,
  13533. d = c[ta],
  13534. e, f = a.color,
  13535. g = {
  13536. stroke: f,
  13537. fill: f
  13538. }, h = a.points,
  13539. i = [],
  13540. k, j = a.pointAttrToOptions,
  13541. l;
  13542. a.options.marker ? (d.radius = d.radius || b.radius + 2, d.lineWidth = d.lineWidth || b.lineWidth + 1) : d.color = d.color || ma(d.color || f).brighten(d.brightness).get();
  13543. i[Ka] = a.convertAttribs(b, g);
  13544. o([ta, "select"], function (b) {
  13545. i[b] = a.convertAttribs(c[b], i[Ka])
  13546. });
  13547. a.pointAttr = i;
  13548. for (f = h.length; f--;) {
  13549. g = h[f];
  13550. if ((b = g.options && g.options.marker || g.options) && b.enabled === !1) b.radius = 0;
  13551. e = !1;
  13552. if (g.options) for (l in j) s(b[j[l]]) && (e = !0);
  13553. if (e) {
  13554. k = [];
  13555. c = b.states || {};
  13556. e = c[ta] = c[ta] || {};
  13557. if (!a.options.marker) e.color = ma(e.color || g.options.color).brighten(e.brightness || d.brightness).get();
  13558. k[Ka] = a.convertAttribs(b, i[Ka]);
  13559. k[ta] = a.convertAttribs(c[ta], i[ta], k[Ka]);
  13560. k.select = a.convertAttribs(c.select, i.select, k[Ka])
  13561. } else k = i;
  13562. g.pointAttr = k
  13563. }
  13564. },
  13565. destroy: function () {
  13566. var a = this,
  13567. b = a.chart,
  13568. c = a.clipRect,
  13569. d = /AppleWebKit\/533/.test(kb),
  13570. e, f, g = a.data || [],
  13571. h, i, k;
  13572. aa(a, "destroy");
  13573. Qa(a);
  13574. o(["xAxis", "yAxis"], function (b) {
  13575. if (k = a[b]) Gb(k.series, a), k.isDirty = !0
  13576. });
  13577. a.legendItem && a.chart.legend.destroyItem(a);
  13578. for (f = g.length; f--;)(h = g[f]) && h.destroy && h.destroy();
  13579. a.points = null;
  13580. if (c && c !== b.clipRect) a.clipRect = c.destroy();
  13581. o(["area", "graph", "dataLabelsGroup", "group", "tracker"], function (b) {
  13582. a[b] && (e = d && b === "group" ? "hide" : "destroy", a[b][e]())
  13583. });
  13584. if (b.hoverSeries === a) b.hoverSeries = null;
  13585. Gb(b.series, a);
  13586. for (i in a) delete a[i]
  13587. },
  13588. drawDataLabels: function () {
  13589. var a = this,
  13590. b = a.options,
  13591. c = b.dataLabels;
  13592. if (c.enabled || a._hasPointLabels) {
  13593. var d, e, f = a.points,
  13594. g, h, i, k = a.dataLabelsGroup,
  13595. j = a.chart,
  13596. l = a.xAxis,
  13597. l = l ? l.left : j.plotLeft,
  13598. n = a.yAxis,
  13599. n = n ? n.top : j.plotTop,
  13600. t = j.renderer,
  13601. r = j.inverted,
  13602. Z = a.type,
  13603. V = b.stacking,
  13604. v = Z === "column" || Z === "bar",
  13605. y = c.verticalAlign === null,
  13606. q = c.y === null,
  13607. T = t.fontMetrics(c.style.fontSize),
  13608. A = T.h,
  13609. x = T.b,
  13610. w, ia;
  13611. v && (T = {
  13612. top: x,
  13613. middle: x - A / 2,
  13614. bottom: -A + x
  13615. }, V ? (y && (c = K(c, {
  13616. verticalAlign: "middle"
  13617. })), q && (c = K(c, {
  13618. y: T[c.verticalAlign]
  13619. }))) : y ? c = K(c, {
  13620. verticalAlign: "top"
  13621. }) : q && (c = K(c, {
  13622. y: T[c.verticalAlign]
  13623. })));
  13624. k ? k.translate(l, n) : k = a.dataLabelsGroup = t.g("data-labels").attr({
  13625. visibility: a.visible ? eb : ab,
  13626. zIndex: 6
  13627. }).translate(l, n).add();
  13628. h = c;
  13629. o(f, function (f) {
  13630. w = f.dataLabel;
  13631. c = h;
  13632. (g = f.options) && g.dataLabels && (c = K(c, g.dataLabels));
  13633. if (ia = c.enabled) {
  13634. var l = f.barX && f.barX + f.barW / 2 || p(f.plotX, - 999),
  13635. n = p(f.plotY, - 999),
  13636. o = c.y === null ? f.y >= b.threshold ? -A + x : x : c.y;
  13637. d = (r ? j.plotWidth - n : l) + c.x;
  13638. e = z((r ? j.plotHeight - l : n) + o)
  13639. }
  13640. if (w && a.isCartesian && (!j.isInsidePlot(d, e) || !ia)) f.dataLabel = w.destroy();
  13641. else if (ia) {
  13642. l = c.align;
  13643. i = c.formatter.call(f.getLabelConfig(), c);
  13644. Z === "column" && (d += {
  13645. left: -1,
  13646. right: 1
  13647. }[l] * f.barW / 2 || 0);
  13648. !V && r && f.y < 0 && (l = "right", d -= 10);
  13649. c.style.color = p(c.color, c.style.color, a.color, "black");
  13650. if (w) w.attr({
  13651. text: i
  13652. }).animate({
  13653. x: d,
  13654. y: e
  13655. });
  13656. else if (s(i)) w = f.dataLabel = t[c.rotation ? "text" : "label"](i, d, e, null, null, null, c.useHTML, !0).attr({
  13657. align: l,
  13658. fill: c.backgroundColor,
  13659. stroke: c.borderColor,
  13660. "stroke-width": c.borderWidth,
  13661. r: c.borderRadius,
  13662. rotation: c.rotation,
  13663. padding: c.padding,
  13664. zIndex: 1
  13665. }).css(c.style).add(k).shadow(c.shadow);
  13666. if (v && b.stacking && w) l = f.barX, n = f.barY, o = f.barW, f = f.barH, w.align(c, null, {
  13667. x: r ? j.plotWidth - n - f : l,
  13668. y: r ? j.plotHeight - l - o : n,
  13669. width: r ? f : o,
  13670. height: r ? o : f
  13671. })
  13672. }
  13673. })
  13674. }
  13675. },
  13676. drawGraph: function () {
  13677. var a = this,
  13678. b = a.options,
  13679. c = a.graph,
  13680. d = [],
  13681. e, f = a.area,
  13682. g = a.group,
  13683. h = b.lineColor || a.color,
  13684. i = b.lineWidth,
  13685. k = b.dashStyle,
  13686. j, l = a.chart.renderer,
  13687. n = a.yAxis.getThreshold(b.threshold),
  13688. t = /^area/.test(a.type),
  13689. r = [],
  13690. s = [];
  13691. o(a.segments, function (c) {
  13692. j = [];
  13693. o(c, function (d, e) {
  13694. a.getPointSpline ? j.push.apply(j, a.getPointSpline(c, d, e)) : (j.push(e ? fa : wa), e && b.step && j.push(d.plotX, c[e - 1].plotY), j.push(d.plotX, d.plotY))
  13695. });
  13696. c.length > 1 ? d = d.concat(j) : r.push(c[0]);
  13697. if (t) {
  13698. var e = [],
  13699. f, g = j.length;
  13700. for (f = 0; f < g; f++) e.push(j[f]);
  13701. g === 3 && e.push(fa, j[1], j[2]);
  13702. if (b.stacking && a.type !== "areaspline") for (f = c.length - 1; f >= 0; f--) f < c.length - 1 && b.step && e.push(c[f + 1].plotX, c[f].yBottom), e.push(c[f].plotX, c[f].yBottom);
  13703. else e.push(fa, c[c.length - 1].plotX, n, fa, c[0].plotX, n);
  13704. s = s.concat(e)
  13705. }
  13706. });
  13707. a.graphPath = d;
  13708. a.singlePoints = r;
  13709. if (t) e = p(b.fillColor, ma(a.color).setOpacity(b.fillOpacity || 0.75).get()), f ? f.animate({
  13710. d: s
  13711. }) : a.area = a.chart.renderer.path(s).attr({
  13712. fill: e
  13713. }).add(g);
  13714. if (c) Ob(c), c.animate({
  13715. d: d
  13716. });
  13717. else if (i) {
  13718. c = {
  13719. stroke: h,
  13720. "stroke-width": i
  13721. };
  13722. if (k) c.dashstyle = k;
  13723. a.graph = l.path(d).attr(c).add(g).shadow(b.shadow)
  13724. }
  13725. },
  13726. invertGroups: function () {
  13727. function a() {
  13728. var a = {
  13729. width: b.yAxis.len,
  13730. height: b.xAxis.len
  13731. };
  13732. c.attr(a).invert();
  13733. d && d.attr(a).invert()
  13734. }
  13735. var b = this,
  13736. c = b.group,
  13737. d = b.trackerGroup,
  13738. e = b.chart;
  13739. ha(e, "resize", a);
  13740. ha(b, "destroy", function () {
  13741. Qa(e, "resize", a)
  13742. });
  13743. a();
  13744. b.invertGroups = a
  13745. },
  13746. render: function () {
  13747. var a = this,
  13748. b = a.chart,
  13749. c, d = a.options,
  13750. e = d.clip !== !1,
  13751. f = d.animation,
  13752. g = f && a.animate,
  13753. f = g ? f && f.duration || 500 : 0,
  13754. h = a.clipRect,
  13755. i = b.renderer;
  13756. if (!h && (h = a.clipRect = !b.hasRendered && b.clipRect ? b.clipRect : i.clipRect(0, 0, b.plotSizeX, b.plotSizeY + 1), !b.clipRect)) b.clipRect = h;
  13757. if (!a.group) c = a.group = i.g("series"), c.attr({
  13758. visibility: a.visible ? eb : ab,
  13759. zIndex: d.zIndex
  13760. }).translate(a.xAxis.left, a.yAxis.top).add(b.seriesGroup);
  13761. a.drawDataLabels();
  13762. g && a.animate(!0);
  13763. a.getAttribs();
  13764. a.drawGraph && a.drawGraph();
  13765. a.drawPoints();
  13766. a.options.enableMouseTracking !== !1 && a.drawTracker();
  13767. b.inverted && a.invertGroups();
  13768. e && !a.hasRendered && (c.clip(h), a.trackerGroup && a.trackerGroup.clip(b.clipRect));
  13769. g && a.animate();
  13770. setTimeout(function () {
  13771. h.isAnimating = !1;
  13772. if ((c = a.group) && h !== b.clipRect && h.renderer) {
  13773. if (e) c.clip(a.clipRect = b.clipRect);
  13774. h.destroy()
  13775. }
  13776. }, f);
  13777. a.isDirty = a.isDirtyData = !1;
  13778. a.hasRendered = !0
  13779. },
  13780. redraw: function () {
  13781. var a = this.chart,
  13782. b = this.isDirtyData,
  13783. c = this.group;
  13784. c && (a.inverted && c.attr({
  13785. width: a.plotWidth,
  13786. height: a.plotHeight
  13787. }), c.animate({
  13788. translateX: this.xAxis.left,
  13789. translateY: this.yAxis.top
  13790. }));
  13791. this.translate();
  13792. this.setTooltipPoints(!0);
  13793. this.render();
  13794. b && aa(this, "updatedData")
  13795. },
  13796. setState: function (a) {
  13797. var b = this.options,
  13798. c = this.graph,
  13799. d = b.states,
  13800. b = b.lineWidth,
  13801. a = a || Ka;
  13802. if (this.state !== a) this.state = a, d[a] && d[a].enabled === !1 || (a && (b = d[a].lineWidth || b + 1), c && !c.dashstyle && c.attr({
  13803. "stroke-width": b
  13804. }, a ? 0 : 500))
  13805. },
  13806. setVisible: function (a, b) {
  13807. var c = this.chart,
  13808. d = this.legendItem,
  13809. e = this.group,
  13810. f = this.tracker,
  13811. g = this.dataLabelsGroup,
  13812. h, i = this.points,
  13813. k = c.options.chart.ignoreHiddenSeries;
  13814. h = this.visible;
  13815. h = (this.visible = a = a === X ? !h : a) ? "show" : "hide";
  13816. if (e) e[h]();
  13817. if (f) f[h]();
  13818. else if (i) for (e = i.length; e--;) if (f = i[e], f.tracker) f.tracker[h]();
  13819. if (g) g[h]();
  13820. d && c.legend.colorizeItem(this, a);
  13821. this.isDirty = !0;
  13822. this.options.stacking && o(c.series, function (a) {
  13823. if (a.options.stacking && a.visible) a.isDirty = !0
  13824. });
  13825. if (k) c.isDirtyBox = !0;
  13826. b !== !1 && c.redraw();
  13827. aa(this, h)
  13828. },
  13829. show: function () {
  13830. this.setVisible(!0)
  13831. },
  13832. hide: function () {
  13833. this.setVisible(!1)
  13834. },
  13835. select: function (a) {
  13836. this.selected = a = a === X ? !this.selected : a;
  13837. if (this.checkbox) this.checkbox.checked = a;
  13838. aa(this, a ? "select" : "unselect")
  13839. },
  13840. drawTrackerGroup: function () {
  13841. var a = this.trackerGroup,
  13842. b = this.chart;
  13843. if (this.isCartesian) {
  13844. if (!a) this.trackerGroup = a = b.renderer.g().attr({
  13845. zIndex: this.options.zIndex || 1
  13846. }).add(b.trackerGroup);
  13847. a.translate(this.xAxis.left, this.yAxis.top)
  13848. }
  13849. return a
  13850. },
  13851. drawTracker: function () {
  13852. var a = this,
  13853. b = a.options,
  13854. c = [].concat(a.graphPath),
  13855. d = c.length,
  13856. e = a.chart,
  13857. f = e.renderer,
  13858. g = e.options.tooltip.snap,
  13859. h = a.tracker,
  13860. i = b.cursor,
  13861. i = i && {
  13862. cursor: i
  13863. }, k = a.singlePoints,
  13864. j = a.drawTrackerGroup(),
  13865. l;
  13866. if (d) for (l = d + 1; l--;) c[l] === wa && c.splice(l + 1, 0, c[l + 1] - g, c[l + 2], fa), (l && c[l] === wa || l === d) && c.splice(l, 0, fa, c[l - 2] + g, c[l - 1]);
  13867. for (l = 0; l < k.length; l++) d = k[l], c.push(wa, d.plotX - g, d.plotY, fa, d.plotX + g, d.plotY);
  13868. h ? h.attr({
  13869. d: c
  13870. }) : a.tracker = f.path(c).attr({
  13871. isTracker: !0,
  13872. stroke: Gc,
  13873. fill: Ma,
  13874. "stroke-linejoin": "bevel",
  13875. "stroke-width": b.lineWidth + 2 * g,
  13876. visibility: a.visible ? eb : ab
  13877. }).on(Ga ? "touchstart" : "mouseover", function () {
  13878. if (e.hoverSeries !== a) a.onMouseOver()
  13879. }).on("mouseout", function () {
  13880. if (!b.stickyTracking) a.onMouseOut()
  13881. }).css(i).add(j)
  13882. }
  13883. };
  13884. w = pa($);
  13885. Ha.line = w;
  13886. w = pa($, {
  13887. type: "area"
  13888. });
  13889. Ha.area = w;
  13890. w = pa($, {
  13891. type: "spline",
  13892. getPointSpline: function (a, b, c) {
  13893. var d = b.plotX,
  13894. e = b.plotY,
  13895. f = a[c - 1],
  13896. g = a[c + 1],
  13897. h, i, k, j;
  13898. if (c && c < a.length - 1) {
  13899. a = f.plotY;
  13900. k = g.plotX;
  13901. var g = g.plotY,
  13902. l;
  13903. h = (1.5 * d + f.plotX) / 2.5;
  13904. i = (1.5 * e + a) / 2.5;
  13905. k = (1.5 * d + k) / 2.5;
  13906. j = (1.5 * e + g) / 2.5;
  13907. l = (j - i) * (k - d) / (k - h) + e - j;
  13908. i += l;
  13909. j += l;
  13910. i > a && i > e ? (i = W(a, e), j = 2 * e - i) : i < a && i < e && (i = Ua(a, e), j = 2 * e - i);
  13911. j > g && j > e ? (j = W(g, e), i = 2 * e - j) : j < g && j < e && (j = Ua(g, e), i = 2 * e - j);
  13912. b.rightContX = k;
  13913. b.rightContY = j
  13914. }
  13915. c ? (b = ["C", f.rightContX || f.plotX, f.rightContY || f.plotY, h || d, i || e, d, e], f.rightContX = f.rightContY = null) : b = [wa, d, e];
  13916. return b
  13917. }
  13918. });
  13919. Ha.spline = w;
  13920. w = pa(w, {
  13921. type: "areaspline"
  13922. });
  13923. Ha.areaspline = w;
  13924. var zb = pa($, {
  13925. type: "column",
  13926. tooltipOutsidePlot: !0,
  13927. pointAttrToOptions: {
  13928. stroke: "borderColor",
  13929. "stroke-width": "borderWidth",
  13930. fill: "color",
  13931. r: "borderRadius"
  13932. },
  13933. init: function () {
  13934. $.prototype.init.apply(this, arguments);
  13935. var a = this,
  13936. b = a.chart;
  13937. b.hasRendered && o(b.series, function (b) {
  13938. if (b.type === a.type) b.isDirty = !0
  13939. })
  13940. },
  13941. translate: function () {
  13942. var a = this,
  13943. b = a.chart,
  13944. c = a.options,
  13945. d = c.stacking,
  13946. e = c.borderWidth,
  13947. f = 0,
  13948. g = a.xAxis,
  13949. h = g.reversed,
  13950. i = {}, k, j;
  13951. $.prototype.translate.apply(a);
  13952. o(b.series, function (b) {
  13953. if (b.type === a.type && b.visible && a.options.group === b.options.group) b.options.stacking ? (k = b.stackKey, i[k] === X && (i[k] = f++), j = i[k]) : j = f++, b.columnIndex = j
  13954. });
  13955. var b = a.points,
  13956. g = Ba(g.translationSlope) * (g.ordinalSlope || g.closestPointRange || 1),
  13957. l = g * c.groupPadding,
  13958. n = (g - 2 * l) / f,
  13959. t = c.pointWidth,
  13960. r = s(t) ? (n - t) / 2 : n * c.pointPadding,
  13961. w = Yb(W(p(t, n - 2 * r), 1 + 2 * e)),
  13962. x = r + (l + ((h ? f - a.columnIndex : a.columnIndex) || 0) * n - g / 2) * (h ? -1 : 1),
  13963. v = a.yAxis.getThreshold(c.threshold),
  13964. y = p(c.minPointLength, 5);
  13965. o(b, function (b) {
  13966. var f = b.plotY,
  13967. g = p(b.yBottom, v),
  13968. h = b.plotX + x,
  13969. i = Yb(Ua(f, g)),
  13970. j = Yb(W(f, g) - i),
  13971. k = a.yAxis.stacks[(b.y < 0 ? "-" : "") + a.stackKey];
  13972. d && a.visible && k && k[b.x] && k[b.x].setOffset(x, w);
  13973. Ba(j) < y && y && (j = y, i = Ba(i - v) > y ? g - y : v - (f <= v ? y : 0));
  13974. L(b, {
  13975. barX: h,
  13976. barY: i,
  13977. barW: w,
  13978. barH: j
  13979. });
  13980. b.shapeType = "rect";
  13981. f = {
  13982. x: h,
  13983. y: i,
  13984. width: w,
  13985. height: j,
  13986. r: c.borderRadius,
  13987. strokeWidth: e
  13988. };
  13989. e % 2 && (f.y -= 1, f.height += 1);
  13990. b.shapeArgs = f;
  13991. b.trackerArgs = Ba(j) < 3 && K(b.shapeArgs, {
  13992. height: 6,
  13993. y: i - 3
  13994. })
  13995. })
  13996. },
  13997. getSymbol: function () {},
  13998. drawGraph: function () {},
  13999. drawPoints: function () {
  14000. var a = this,
  14001. b = a.options,
  14002. c = a.chart.renderer,
  14003. d, e;
  14004. o(a.points, function (f) {
  14005. var g = f.plotY;
  14006. if (g !== X && !isNaN(g) && f.y !== null) d = f.graphic, e = f.shapeArgs, d ? (Ob(d), d.animate(c.Element.prototype.crisp.apply({}, [e.strokeWidth, e.x, e.y, e.width, e.height]))) : f.graphic = d = c[f.shapeType](e).attr(f.pointAttr[f.selected ? "select" : Ka]).add(a.group).shadow(b.shadow)
  14007. })
  14008. },
  14009. drawTracker: function () {
  14010. var a = this,
  14011. b = a.chart,
  14012. c = b.renderer,
  14013. d, e, f = +new Date,
  14014. g = a.options,
  14015. h = g.cursor,
  14016. i = h && {
  14017. cursor: h
  14018. }, k = a.drawTrackerGroup(),
  14019. j;
  14020. o(a.points, function (h) {
  14021. e = h.tracker;
  14022. d = h.trackerArgs || h.shapeArgs;
  14023. delete d.strokeWidth;
  14024. if (h.y !== null) e ? e.attr(d) : h.tracker = c[h.shapeType](d).attr({
  14025. isTracker: f,
  14026. fill: Gc,
  14027. visibility: a.visible ? eb : ab
  14028. }).on(Ga ? "touchstart" : "mouseover", function (c) {
  14029. j = c.relatedTarget || c.fromElement;
  14030. if (b.hoverSeries !== a && A(j, "isTracker") !== f) a.onMouseOver();
  14031. h.onMouseOver()
  14032. }).on("mouseout", function (b) {
  14033. if (!g.stickyTracking && (j = b.relatedTarget || b.toElement, A(j, "isTracker") !== f)) a.onMouseOut()
  14034. }).css(i).add(h.group || k)
  14035. })
  14036. },
  14037. animate: function (a) {
  14038. var b = this,
  14039. c = b.points,
  14040. d = b.options;
  14041. if (!a) o(c, function (a) {
  14042. var c = a.graphic,
  14043. a = a.shapeArgs,
  14044. g = b.yAxis,
  14045. h = d.threshold;
  14046. c && (c.attr({
  14047. height: 0,
  14048. y: s(h) ? g.getThreshold(h) : g.translate(g.getExtremes().min, 0, 1, 0, 1)
  14049. }), c.animate({
  14050. height: a.height,
  14051. y: a.y
  14052. }, d.animation))
  14053. }), b.animate = null
  14054. },
  14055. remove: function () {
  14056. var a = this,
  14057. b = a.chart;
  14058. b.hasRendered && o(b.series, function (b) {
  14059. if (b.type === a.type) b.isDirty = !0
  14060. });
  14061. $.prototype.remove.apply(a, arguments)
  14062. }
  14063. });
  14064. Ha.column = zb;
  14065. w = pa(zb, {
  14066. type: "bar",
  14067. init: function () {
  14068. this.inverted = !0;
  14069. zb.prototype.init.apply(this, arguments)
  14070. }
  14071. });
  14072. Ha.bar = w;
  14073. w = pa($, {
  14074. type: "scatter",
  14075. sorted: !1,
  14076. translate: function () {
  14077. var a = this;
  14078. $.prototype.translate.apply(a);
  14079. o(a.points, function (b) {
  14080. b.shapeType = "circle";
  14081. b.shapeArgs = {
  14082. x: b.plotX,
  14083. y: b.plotY,
  14084. r: a.chart.options.tooltip.snap
  14085. }
  14086. })
  14087. },
  14088. drawTracker: function () {
  14089. for (var a = this, b = a.options.cursor, b = b && {
  14090. cursor: b
  14091. }, c = a.points, d = c.length, e; d--;) if (e = c[d].graphic) e.element._i = d;
  14092. a._hasTracking ? a._hasTracking = !0 : a.group.attr({
  14093. isTracker: !0
  14094. }).on(Ga ? "touchstart" : "mouseover", function (b) {
  14095. a.onMouseOver();
  14096. if (b.target._i !== X) c[b.target._i].onMouseOver()
  14097. }).on("mouseout", function () {
  14098. if (!a.options.stickyTracking) a.onMouseOut()
  14099. }).css(b)
  14100. }
  14101. });
  14102. Ha.scatter = w;
  14103. w = pa(lb, {
  14104. init: function () {
  14105. lb.prototype.init.apply(this, arguments);
  14106. var a = this,
  14107. b;
  14108. L(a, {
  14109. visible: a.visible !== !1,
  14110. name: p(a.name, "Slice")
  14111. });
  14112. b = function () {
  14113. a.slice()
  14114. };
  14115. ha(a, "select", b);
  14116. ha(a, "unselect", b);
  14117. return a
  14118. },
  14119. setVisible: function (a) {
  14120. var b = this.series.chart,
  14121. c = this.tracker,
  14122. d = this.dataLabel,
  14123. e = this.connector,
  14124. f = this.shadowGroup,
  14125. g;
  14126. g = (this.visible = a = a === X ? !this.visible : a) ? "show" : "hide";
  14127. this.group[g]();
  14128. if (c) c[g]();
  14129. if (d) d[g]();
  14130. if (e) e[g]();
  14131. if (f) f[g]();
  14132. this.legendItem && b.legend.colorizeItem(this, a)
  14133. },
  14134. slice: function (a, b, c) {
  14135. var d = this.series.chart,
  14136. e = this.slicedTranslation;
  14137. Kb(c, d);
  14138. p(b, !0);
  14139. a = this.sliced = s(a) ? a : !this.sliced;
  14140. a = {
  14141. translateX: a ? e[0] : d.plotLeft,
  14142. translateY: a ? e[1] : d.plotTop
  14143. };
  14144. this.group.animate(a);
  14145. this.shadowGroup && this.shadowGroup.animate(a)
  14146. }
  14147. });
  14148. w = pa($, {
  14149. type: "pie",
  14150. isCartesian: !1,
  14151. pointClass: w,
  14152. pointAttrToOptions: {
  14153. stroke: "borderColor",
  14154. "stroke-width": "borderWidth",
  14155. fill: "color"
  14156. },
  14157. getColor: function () {
  14158. this.initialColor = this.chart.counters.color
  14159. },
  14160. animate: function () {
  14161. var a = this;
  14162. o(a.points, function (b) {
  14163. var c = b.graphic,
  14164. b = b.shapeArgs,
  14165. d = -da / 2;
  14166. c && (c.attr({
  14167. r: 0,
  14168. start: d,
  14169. end: d
  14170. }), c.animate({
  14171. r: b.r,
  14172. start: b.start,
  14173. end: b.end
  14174. }, a.options.animation))
  14175. });
  14176. a.animate = null
  14177. },
  14178. setData: function () {
  14179. $.prototype.setData.apply(this, arguments);
  14180. this.processData();
  14181. this.generatePoints()
  14182. },
  14183. translate: function () {
  14184. this.generatePoints();
  14185. var a = 0,
  14186. b = -0.25,
  14187. c = this.options,
  14188. d = c.slicedOffset,
  14189. e = d + c.borderWidth,
  14190. f = c.center.concat([c.size, c.innerSize || 0]),
  14191. g = this.chart,
  14192. h = g.plotWidth,
  14193. i = g.plotHeight,
  14194. k, j, l, n = this.points,
  14195. p = 2 * da,
  14196. r, s = Ua(h, i),
  14197. w, v, y, q = c.dataLabels.distance,
  14198. f = Vb(f, function (a, b) {
  14199. return (w = /%$/.test(a)) ? [h, i, s, s][b] * S(a) / 100 : a
  14200. });
  14201. this.getX = function (a, b) {
  14202. l = oa.asin((a - f[1]) / (f[2] / 2 + q));
  14203. return f[0] + (b ? -1 : 1) * ja(l) * (f[2] / 2 + q)
  14204. };
  14205. this.center = f;
  14206. o(n, function (b) {
  14207. a += b.y
  14208. });
  14209. o(n, function (c) {
  14210. r = a ? c.y / a : 0;
  14211. k = z(b * p * 1E3) / 1E3;
  14212. b += r;
  14213. j = z(b * p * 1E3) / 1E3;
  14214. c.shapeType = "arc";
  14215. c.shapeArgs = {
  14216. x: f[0],
  14217. y: f[1],
  14218. r: f[2] / 2,
  14219. innerR: f[3] / 2,
  14220. start: k,
  14221. end: j
  14222. };
  14223. l = (j + k) / 2;
  14224. c.slicedTranslation = Vb([ja(l) * d + g.plotLeft, C(l) * d + g.plotTop], z);
  14225. v = ja(l) * f[2] / 2;
  14226. y = C(l) * f[2] / 2;
  14227. c.tooltipPos = [f[0] + v * 0.7, f[1] + y * 0.7];
  14228. c.labelPos = [f[0] + v + ja(l) * q, f[1] + y + C(l) * q, f[0] + v + ja(l) * e, f[1] + y + C(l) * e, f[0] + v, f[1] + y, q < 0 ? "center" : l < p / 4 ? "left" : "right", l];
  14229. c.percentage = r * 100;
  14230. c.total = a
  14231. });
  14232. this.setTooltipPoints()
  14233. },
  14234. render: function () {
  14235. this.getAttribs();
  14236. this.drawPoints();
  14237. this.options.enableMouseTracking !== !1 && this.drawTracker();
  14238. this.drawDataLabels();
  14239. this.options.animation && this.animate && this.animate();
  14240. this.isDirty = !1
  14241. },
  14242. drawPoints: function () {
  14243. var a = this.chart,
  14244. b = a.renderer,
  14245. c, d, e, f = this.options.shadow,
  14246. g, h;
  14247. o(this.points, function (i) {
  14248. d = i.graphic;
  14249. h = i.shapeArgs;
  14250. e = i.group;
  14251. g = i.shadowGroup;
  14252. if (f && !g) g = i.shadowGroup = b.g("shadow").attr({
  14253. zIndex: 4
  14254. }).add();
  14255. if (!e) e = i.group = b.g("point").attr({
  14256. zIndex: 5
  14257. }).add();
  14258. c = i.sliced ? i.slicedTranslation : [a.plotLeft, a.plotTop];
  14259. e.translate(c[0], c[1]);
  14260. g && g.translate(c[0], c[1]);
  14261. d ? d.animate(h) : i.graphic = b.arc(h).attr(L(i.pointAttr[Ka], {
  14262. "stroke-linejoin": "round"
  14263. })).add(i.group).shadow(f, g);
  14264. i.visible === !1 && i.setVisible(!1)
  14265. })
  14266. },
  14267. drawDataLabels: function () {
  14268. var a = this.data,
  14269. b, c = this.chart,
  14270. d = this.options.dataLabels,
  14271. e = p(d.connectorPadding, 10),
  14272. f = p(d.connectorWidth, 1),
  14273. g, h, i = p(d.softConnector, !0),
  14274. k = d.distance,
  14275. j = this.center,
  14276. l = j[2] / 2,
  14277. j = j[1],
  14278. n = k > 0,
  14279. t = [
  14280. [],
  14281. []
  14282. ],
  14283. r, s, w, v, y = 2,
  14284. q;
  14285. if (d.enabled) {
  14286. $.prototype.drawDataLabels.apply(this);
  14287. o(a, function (a) {
  14288. a.dataLabel && t[a.labelPos[7] < da / 2 ? 0 : 1].push(a)
  14289. });
  14290. t[1].reverse();
  14291. v = function (a, b) {
  14292. return b.y - a.y
  14293. };
  14294. for (a = t[0][0] && t[0][0].dataLabel && t[0][0].dataLabel.getBBox().height; y--;) {
  14295. var x = [],
  14296. A = [],
  14297. z = t[y],
  14298. E = z.length,
  14299. C;
  14300. for (q = j - l - k; q <= j + l + k; q += a) x.push(q);
  14301. w = x.length;
  14302. if (E > w) {
  14303. h = [].concat(z);
  14304. h.sort(v);
  14305. for (q = E; q--;) h[q].rank = q;
  14306. for (q = E; q--;) z[q].rank >= w && z.splice(q, 1);
  14307. E = z.length
  14308. }
  14309. for (q = 0; q < E; q++) {
  14310. b = z[q];
  14311. h = b.labelPos;
  14312. b = 9999;
  14313. for (s = 0; s < w; s++) g = Ba(x[s] - h[1]), g < b && (b = g, C = s);
  14314. if (C < q && x[q] !== null) C = q;
  14315. else for (w < E - q + C && x[q] !== null && (C = w - E + q); x[C] === null;) C++;
  14316. A.push({
  14317. i: C,
  14318. y: x[C]
  14319. });
  14320. x[C] = null
  14321. }
  14322. A.sort(v);
  14323. for (q = 0; q < E; q++) {
  14324. b = z[q];
  14325. h = b.labelPos;
  14326. g = b.dataLabel;
  14327. s = A.pop();
  14328. r = h[1];
  14329. w = b.visible === !1 ? ab : eb;
  14330. C = s.i;
  14331. s = s.y;
  14332. if (r > s && x[C + 1] !== null || r < s && x[C - 1] !== null) s = r;
  14333. r = this.getX(C === 0 || C === x.length - 1 ? r : s, y);
  14334. g.attr({
  14335. visibility: w,
  14336. align: h[6]
  14337. })[g.moved ? "animate" : "attr"]({
  14338. x: r + d.x + ({
  14339. left: e,
  14340. right: -e
  14341. }[h[6]] || 0),
  14342. y: s + d.y
  14343. });
  14344. g.moved = !0;
  14345. if (n && f) g = b.connector, h = i ? [wa, r + (h[6] === "left" ? 5 : -5), s, "C", r, s, 2 * h[2] - h[4], 2 * h[3] - h[5], h[2], h[3], fa, h[4], h[5]] : [wa, r + (h[6] === "left" ? 5 : -5), s, fa, h[2], h[3], fa, h[4], h[5]], g ? (g.animate({
  14346. d: h
  14347. }), g.attr("visibility", w)) : b.connector = g = this.chart.renderer.path(h).attr({
  14348. "stroke-width": f,
  14349. stroke: d.connectorColor || b.color || "#606060",
  14350. visibility: w,
  14351. zIndex: 3
  14352. }).translate(c.plotLeft, c.plotTop).add()
  14353. }
  14354. }
  14355. }
  14356. },
  14357. drawTracker: zb.prototype.drawTracker,
  14358. getSymbol: function () {}
  14359. });
  14360. Ha.pie = w;
  14361. L(Highcharts, {
  14362. Chart: wc,
  14363. dateFormat: ac,
  14364. pathAnim: La,
  14365. getOptions: function () {
  14366. return Ea
  14367. },
  14368. hasBidiBug: Qc,
  14369. numberFormat: dc,
  14370. Point: lb,
  14371. Color: ma,
  14372. Renderer: Xb,
  14373. SVGRenderer: Eb,
  14374. VMLRenderer: $a,
  14375. CanVGRenderer: oc,
  14376. seriesTypes: Ha,
  14377. setOptions: function (a) {
  14378. $b = K($b, a.xAxis);
  14379. kc = K(kc, a.yAxis);
  14380. a.xAxis = a.yAxis = X;
  14381. Ea = K(Ea, a);
  14382. vc();
  14383. return Ea
  14384. },
  14385. Series: $,
  14386. addEvent: ha,
  14387. removeEvent: Qa,
  14388. createElement: Aa,
  14389. discardElement: Tb,
  14390. css: P,
  14391. each: o,
  14392. extend: L,
  14393. map: Vb,
  14394. merge: K,
  14395. pick: p,
  14396. splat: Hb,
  14397. extendClass: pa,
  14398. placeBox: uc,
  14399. product: "Highcharts",
  14400. version: "2.2.1"
  14401. })
  14402. })();
  14403. DoChart = function (what, data, hideafter, formatter, tpl, extendo) {
  14404. var t = $('#' + what);
  14405. t.html('');
  14406. var formatn = function (v) {
  14407. return Highcharts.numberFormat(v, 0, ',');
  14408. }, format = formatter ? formatter(Highcharts.numberFormat, formatn) : function (v) {
  14409. return v > 1000000 ? (formatn(v / 1000000) + ' M') : (v > 1000 ? (formatn(v / 1000) + 'k') : formatn(v));
  14410. };
  14411. var styles = {
  14412. 'greenareasolo': {
  14413. area: {
  14414. color: '#009900',
  14415. lineWidth: 4.5,
  14416. fillOpacity: 0,
  14417. marker: {
  14418. lineColor: '#fff',
  14419. lineWidth: 0,
  14420. radius: 2,
  14421. symbol: 'circle'
  14422. },
  14423. shadow: false,
  14424. animation: false
  14425. }
  14426. },
  14427. 'greensolo': {
  14428. area: {
  14429. color: '#66a6ff',
  14430. lineWidth: 4.5,
  14431. fillOpacity: .60,
  14432. marker: {
  14433. lineColor: '#fff',
  14434. lineWidth: 0,
  14435. radius: 2,
  14436. symbol: 'circle'
  14437. },
  14438. shadow: false
  14439. },
  14440. line: {
  14441. color: '#009900',
  14442. lineWidth: 4.5,
  14443. marker: {
  14444. lineColor: '#fff',
  14445. lineWidth: 0,
  14446. radius: 2,
  14447. symbol: 'circle'
  14448. },
  14449. shadow: false
  14450. }
  14451. },
  14452. 'area2': {
  14453. area: {
  14454. lineWidth: 2.5,
  14455. fillOpacity: .60,
  14456. marker: {
  14457. lineColor: '#fff',
  14458. lineWidth: 1,
  14459. radius: 3.5,
  14460. symbol: 'circle'
  14461. },
  14462. shadow: false
  14463. }
  14464. },
  14465. 'compare': {
  14466. pie: {
  14467. allowPointSelect: true,
  14468. cursor: 'pointer',
  14469. size: '100%',
  14470. dataLabels: {
  14471. enabled: false
  14472. },
  14473. showInLegend: true,
  14474. animation: false
  14475. }
  14476. },
  14477. };
  14478. var chartoptions = {
  14479. chart: {
  14480. renderTo: what,
  14481. defaultSeriesType: 'area',
  14482. margin: [-1, 10, 25, 10],
  14483. borderRadius: 0,
  14484. backgroundColor: '#ffffff'
  14485. },
  14486. title: {
  14487. text: null
  14488. },
  14489. colors: ['#66a6ff', '#63A625', '#ece129'],
  14490. credits: {
  14491. enabled: false
  14492. },
  14493. legend: {
  14494. enabled: false,
  14495. borderWidth: 0,
  14496. borderRadius: 0,
  14497. align: 'left',
  14498. verticalAlign: 'top',
  14499. y: -5,
  14500. x: 0,
  14501. },
  14502. plotOptions: {
  14503. area: {
  14504. lineWidth: 2.5,
  14505. fillOpacity: .1,
  14506. marker: {
  14507. lineColor: '#fff',
  14508. lineWidth: 1,
  14509. radius: 3.5,
  14510. symbol: 'circle'
  14511. },
  14512. shadow: false
  14513. },
  14514. column: {
  14515. lineWidth: 16,
  14516. shadow: false,
  14517. borderWidth: 0,
  14518. groupPadding: .05,
  14519. },
  14520. pie: {
  14521. allowPointSelect: true,
  14522. cursor: 'pointer',
  14523. dataLabels: {
  14524. enabled: false
  14525. },
  14526. showInLegend: true
  14527. }
  14528. },
  14529. xAxis: {
  14530. type: 'datetime',
  14531. title: {
  14532. text: null
  14533. },
  14534. tickmarkPlacement: 'on',
  14535. dateTimeLabelFormats: {
  14536. day: '%b %e'
  14537. },
  14538. gridLineColor: '#f2f2f2',
  14539. gridLineWidth: .5,
  14540. labels: {
  14541. style: {
  14542. color: '#777777'
  14543. }
  14544. }
  14545. },
  14546. yAxis: [{
  14547. offset: -30,
  14548. showFirstLabel: false,
  14549. showLastLabel: false,
  14550. title: {
  14551. text: null
  14552. },
  14553. gridLineColor: '#f2f2f2',
  14554. gridLineWidth: .5,
  14555. zIndex: 2,
  14556. labels: {
  14557. align: 'right',
  14558. style: {
  14559. color: '#555555'
  14560. },
  14561. formatter: function () {
  14562. return format(this.value, - 1);
  14563. }
  14564. }
  14565. }, {
  14566. offset: 80,
  14567. showFirstLabel: false,
  14568. showLastLabel: false,
  14569. title: {
  14570. text: null
  14571. },
  14572. opposite: true,
  14573. gridLineColor: '#f2f2f2',
  14574. gridLineWidth: .5,
  14575. zIndex: 2,
  14576. labels: {
  14577. align: 'right',
  14578. style: {
  14579. color: '#555555'
  14580. },
  14581. formatter: function () {
  14582. return format(this.value, - 1);
  14583. }
  14584. }
  14585. }, {
  14586. offset: -30,
  14587. showFirstLabel: false,
  14588. showLastLabel: false,
  14589. title: {
  14590. text: null
  14591. },
  14592. opposite: true,
  14593. gridLineColor: '#f2f2f2',
  14594. gridLineWidth: .5,
  14595. zIndex: 1,
  14596. labels: {
  14597. align: 'right',
  14598. style: {
  14599. color: '#555555'
  14600. },
  14601. formatter: function () {
  14602. return Highcharts.numberFormat(this.value, 2, '.') + '%';
  14603. }
  14604. }
  14605. }],
  14606. tooltip: {
  14607. shadow: false,
  14608. borderRadius: 3,
  14609. formatter: function () {
  14610. return this.series.index == 2 ? Highcharts.numberFormat(this.y, 2, '.') + '%' : format(this.y, this.series.index);
  14611. }
  14612. },
  14613. series: []
  14614. };
  14615. var load = function (lines) {
  14616. var first = lines[0];
  14617. if (!first) return;
  14618. for (var i = 1; i < first.length; i++) {
  14619. var colinfo = (tpl && tpl[i - 1] ? tpl[i - 1] : ':').split(':');
  14620. chartoptions.series.push($.extend({
  14621. name: 'series' + i,
  14622. yAxis: i - 1,
  14623. pointStart: Date.parse(lines[1][0]),
  14624. pointInterval: 24 * 3600 * 1000,
  14625. type: colinfo[1] || (i == 1 ? 'column' : 'area'),
  14626. data: []
  14627. }, styles[colinfo[0]] && styles[colinfo[0]][colinfo[1]] ? styles[colinfo[0]][colinfo[1]] : {}));
  14628. }
  14629. var firstdate = null;
  14630. $.each(lines, function (lineNo, items) {
  14631. if (lineNo == 0 || items.length < first.length) return;
  14632. if (!firstdate) firstdate = items[0];
  14633. for (var i = 1; i < first.length; i++) {
  14634. if (typeof (items[i]) == 'object') chartoptions.series[i - 1].data.push(items[i]);
  14635. else {
  14636. var fv = parseFloat(items[i]),
  14637. n = (fv > 0 && fv <= 1) ? fv : parseInt(items[i], 10);
  14638. chartoptions.series[i - 1].data.push(isNaN(n) ? 0 : n);
  14639. }
  14640. }
  14641. });
  14642. new Highcharts.Chart($.extend(chartoptions, extendo));
  14643. if (hideafter) t.css('display', 'none');
  14644. };
  14645. if (typeof (data) == 'string') {
  14646. $.get(data, function (ret) {
  14647. var lines = ret.split('\n');
  14648. for (var i = 0; i < lines.length; i++)
  14649. lines[i] = lines[i].split(';');
  14650. load(lines);
  14651. });
  14652. } else load(data);
  14653. }
  14654. jQuery.cookie = function (key, value, options) {
  14655. if (arguments.length > 1 && String(value) !== "[object Object]") {
  14656. options = jQuery.extend({}, options);
  14657. if (value === null || value === undefined) {
  14658. options.expires = -1;
  14659. }
  14660. if (typeof options.expires === 'number') {
  14661. var days = options.expires,
  14662. t = options.expires = new Date();
  14663. t.setDate(t.getDate() + days);
  14664. }
  14665. value = String(value);
  14666. return (document.cookie = [encodeURIComponent(key), '=', options.raw ? value : encodeURIComponent(value), options.expires ? '; expires=' + options.expires.toUTCString() : '', options.path ? '; path=' + options.path : '', options.domain ? '; domain=' + options.domain : '', options.secure ? '; secure' : ''].join(''));
  14667. }
  14668. options = value || {};
  14669. var result, decode = options.raw ? function (s) {
  14670. return s;
  14671. } : decodeURIComponent;
  14672. return (result = new RegExp('(?:^|; )' + encodeURIComponent(key) + '=([^;]*)').exec(document.cookie)) ? decode(result[1]) : null;
  14673. };
  14674. String.prototype.score = function (abbreviation, offset) {
  14675. offset = offset || 0
  14676. if (abbreviation.length == 0) return 0.9
  14677. if (abbreviation.length > this.length) return 0.0
  14678. for (var i = abbreviation.length; i > 0; i--) {
  14679. var sub_abbreviation = abbreviation.substring(0, i)
  14680. var index = this.indexOf(sub_abbreviation)
  14681. if (index < 0) continue;
  14682. if (index + abbreviation.length > this.length + offset) continue;
  14683. var next_string = this.substring(index + sub_abbreviation.length)
  14684. var next_abbreviation = null
  14685. if (i >= abbreviation.length) next_abbreviation = ''
  14686. else next_abbreviation = abbreviation.substring(i)
  14687. var remaining_score = next_string.score(next_abbreviation, offset + index)
  14688. if (remaining_score > 0) {
  14689. var score = this.length - next_string.length;
  14690. if (index != 0) {
  14691. var j = 0;
  14692. var c = this.charCodeAt(index - 1)
  14693. if (c == 32 || c == 9) {
  14694. for (var j = (index - 2); j >= 0; j--) {
  14695. c = this.charCodeAt(j)
  14696. score -= ((c == 32 || c == 9) ? 1 : 0.15)
  14697. }
  14698. } else {
  14699. score -= index
  14700. }
  14701. }
  14702. score += remaining_score * next_string.length
  14703. score /= this.length;
  14704. return score
  14705. }
  14706. }
  14707. return 0.0
  14708. }
  14709. jQuery.fn.liveUpdate = function (list) {
  14710. list = jQuery(list);
  14711. if (list.length) {
  14712. var rows = list.children('li'),
  14713. cache = rows.map(function () {
  14714. return this.innerHTML.toLowerCase();
  14715. });
  14716. this.keyup(filter).keyup().parents('form').submit(function () {
  14717. return false;
  14718. });
  14719. }
  14720. return this;
  14721. function filter() {
  14722. var term = jQuery.trim(jQuery(this).val().toLowerCase()),
  14723. scores = [];
  14724. if (!term) {
  14725. rows.show();
  14726. } else {
  14727. rows.hide();
  14728. cache.each(function (i) {
  14729. var score = this.score(term);
  14730. if (score > 0) {
  14731. scores.push([score, i]);
  14732. }
  14733. });
  14734. jQuery.each(scores.sort(function (a, b) {
  14735. return b[0] - a[0];
  14736. }), function () {
  14737. jQuery(rows[this[1]]).show();
  14738. });
  14739. }
  14740. }
  14741. };
  14742. SetErr = function (err) {
  14743. $('.flashme .ferr, .flashme #file').remove();
  14744. $('.flashme').append($('<div/>').attr('class', 'ferr').text(err));
  14745. }
  14746. ShowImage = function (file) {
  14747. $('.flashme .ferr').remove();
  14748. $('#show-creative').css('display', 'block');
  14749. $('#show-creative img').attr('src', '/pub/nosvn/uploads/temp/' + file).load(function () {
  14750. $(this).parent().fadeIn(250);
  14751. });
  14752. $('#newf').attr('checked', 'checked');
  14753. $('#form1 button').removeAttr('disabled').find('em').text($('#form1 button em').data('orgtext'));
  14754. $('.flashme #file').remove();
  14755. $('.flashme').append($('<input type="hidden"/>').attr('id', 'file').attr('name', 'newfile-file').val(file));
  14756. }
  14757. $(document).ready(function () {
  14758. var flashme = $('.flashme');
  14759. $('input', flashme).change(function () {
  14760. $('#form1').attr('target', 'previewframe');
  14761. $('#previewsubmitid').click();
  14762. $('#form1').attr('target', '');
  14763. $('#form1 button').attr('disabled', 'disabled').find('.em').data('orgtext', $('#form1 button em').text()).text('Uploading...');
  14764. });
  14765. flashme.append($('<input type="submit"/>').css('display', 'none').attr('id', 'previewsubmitid').attr('name', 'previewsubmit'));
  14766. flashme.append($('<iframe/>').css('display', 'none').attr('name', 'previewframe'));
  14767. $('li.checkme').click(function () {
  14768. $('li', $(this).parent()).removeClass('selected');
  14769. $('input.radio', $(this).parent()).attr('checked', false);
  14770. $(this).addClass('selected');
  14771. $('input.radio', $(this)).attr('checked', true);
  14772. if ($('#samplead_image').length) {
  14773. $('#show-creative img').attr('src', $(this).find('label img').attr('src'));
  14774. }
  14775. return false;
  14776. });
  14777. $('input.clearselection').click(function () {
  14778. $('ul.selections li').removeClass('selected');
  14779. $('ul.selections li input.radio').attr('checked', false);
  14780. });
  14781. $('#imageid').focus(function () {
  14782. $('ul.selections li').removeClass('selected');
  14783. $('ul.selections li input.radio').attr('checked', false);
  14784. });
  14785. });
  14786. var inits = [];
  14787. function OnInit(func) {
  14788. inits.push(func);
  14789. }
  14790. function ReInit() {
  14791. for (var i = 0; i < inits.length; i++)
  14792. inits[i]();
  14793. }
  14794. $(function () {
  14795. ReInit();
  14796. var loading, setPage = function (newurl) {
  14797. loading = newurl;
  14798. $.post(newurl, {
  14799. 'js': 1
  14800. }, (function (newurl) {
  14801. return function (d) {
  14802. if (newurl == loading) {
  14803. $('#realpage').html(d);
  14804. document.title = $('#realpagetitle').attr('rel');
  14805. window.history.pushState({}, '', newurl);
  14806. ReInit();
  14807. }
  14808. }
  14809. })(newurl));
  14810. };
  14811. });
  14812. function Format(num, dec) {
  14813. num += '';
  14814. x = num.split('.');
  14815. x1 = x[0];
  14816. x2 = x.length > 1 ? x[1] : '';
  14817. var rgx = /(\d+)(\d{3})/;
  14818. while (rgx.test(x1))
  14819. x1 = x1.replace(rgx, '$1' + ',' + '$2');
  14820. while (dec && x2.length < dec)
  14821. x2 += '0';
  14822. return x1 + (x2.length > 0 ? ('.' + x2.substring(0, dec || x2.length)) : '');
  14823. }
  14824. function SetupBuy(ctx) {
  14825. var waitingList;
  14826. if ($('#advLists').length > 0) waitingList = $('#advLists').children('option[value=1]').first();
  14827. $('.listbtn', ctx).click(function (event) {
  14828. event.preventDefault();
  14829. event.stopPropagation();
  14830. $('#zoneid').val($(this).attr('id'));
  14831. $('#siteid').val($(this).attr('name'));
  14832. if ($('#lists').css('display') == 'block' && $(this).hasClass('listbtnon')) {
  14833. $('#lists').slideUp(200);
  14834. $(this).removeClass('listbtnon');
  14835. return;
  14836. }
  14837. $('.listbtn').removeClass('listbtnon');
  14838. $(this).addClass('listbtnon');
  14839. if (typeof (waitingList) != "undefined" && $(this).next('em').is('.soldout')) $('#advLists option[value=0]').after(waitingList);
  14840. else if ($('#advLists option[value=1]').length > 0) $('#advLists option[value=1]').remove();
  14841. var height = $('#lists').height();
  14842. $('#lists').css({
  14843. 'position': 'absolute',
  14844. 'height': '1px',
  14845. 'overflow': 'hidden',
  14846. 'z-index': 98,
  14847. 'display': 'block'
  14848. }).position({
  14849. my: 'left top',
  14850. at: 'left top',
  14851. of: $(this),
  14852. offset: '0 27'
  14853. }).animate({
  14854. 'height': height
  14855. }, 200, function () {
  14856. $(this).css('height', 'auto');
  14857. });
  14858. });
  14859. $('#advLists', ctx).change(function (e) {
  14860. e.stopPropagation();
  14861. $(this).val() == -1 ? $('.addlist').slideDown(300) : $('.addlist').slideUp(300);
  14862. });
  14863. $('#lists .button', ctx).click(function (e) {
  14864. var t = $('#advLists :selected').text();
  14865. if ($('#advLists').val() == -1) {
  14866. t = $('#listName').val();
  14867. var v = $('#advLists option').length - 1,
  14868. opt = $('<option/>').attr({
  14869. 'value': v,
  14870. 'selected': 'selected'
  14871. }).text(t);
  14872. $('#advNew').before(opt);
  14873. }
  14874. $('#advList').val(t);
  14875. return true;
  14876. });
  14877. $('.add-to-list').each(function () {
  14878. var add = $(this);
  14879. QuickSubmit(add, function (ctx) {
  14880. $('#lists').slideUp(200);
  14881. $('.listbtn .listbtnon').removeClass('listbtnon');
  14882. setTimeout(function () {
  14883. $('.modalclose a').click();
  14884. }, 3000);
  14885. });
  14886. });
  14887. $('.flyout').css('top', - $('.flyout').outerHeight() / 2 + $('.flyout').parent().parent().outerHeight() / 2);
  14888. $('.zoneflyout.global').fadeOut();
  14889. $('table.zone-listing tr').hover(function () {
  14890. var desc = $(this).find('.flyoutdesc')
  14891. if (desc.text()) {
  14892. $('.zoneflyout.global').find('.data').text(desc.text()).end().css({
  14893. 'opacity': 1,
  14894. 'display': 'block',
  14895. 'top': $(this).offset().top,
  14896. 'left': $(this).offset().left - 250
  14897. });
  14898. }
  14899. }, function () {
  14900. $('.zoneflyout.global').css({
  14901. 'display': 'none',
  14902. 'opacity': 0
  14903. });
  14904. });
  14905. $('.inquire a').click(function (event) {
  14906. $.get($(this).attr('href'), function (data) {
  14907. $('.iform').html(data).slideToggle(800);
  14908. QuickSubmit($('.iform .quicksubmit'));
  14909. });
  14910. return false;
  14911. });
  14912. var path = window.location.pathname.split('/').slice(1, 3).join('-');
  14913. $('.add-to-cart', ctx).click(function (event) {
  14914. $.get($(this).attr('href') + '/js/1/', function (data) {
  14915. $('#successmodal div.pad').html(data);
  14916. $('.cart-total').text('$' + $('#newtotalcart').text());
  14917. $('.cart-quantity').text($('#newtotalquantity').text());
  14918. $('#in-cart-' + $(this).attr('id')).show();
  14919. $('#in-bundle-' + $(this).attr('id')).hide();
  14920. });
  14921. if (!$('body').hasClass('cart')) {
  14922. $('.headerpad').animate({
  14923. marginRight: '+=156'
  14924. }, 300, function () {
  14925. $('.carttab').slideDown(400, 'swing');
  14926. }).animate({
  14927. marginRight: '-=20'
  14928. }, 300).delay(1500).parent().find('.cart-total').css('color', '#ffffcc').delay(1000).effect('pulsate', {
  14929. times: 2
  14930. }, 500).css('color', '#fff');
  14931. $('body').delay(3000).addClass('cart');
  14932. } else {
  14933. $(this).effect('transfer', {
  14934. to: $('.carttab')
  14935. }, 800, function () {
  14936. $('.cart-total').effect('pulsate', {
  14937. times: 2
  14938. }, 800);
  14939. });
  14940. }
  14941. _gaq.push(['_trackPageview', '/addtocart/' + path]);
  14942. return false;
  14943. });
  14944. }
  14945. SetupAnalytics = function () {
  14946. var path = window.location.pathname.replace(/\/$/, '').slice(1).split('/').join('-');
  14947. $('#submitbutton', 'form.register').click(function () {
  14948. _gaq.push(['_trackPageview', '/users/register/' + path]);
  14949. });
  14950. }
  14951. function searchinit() {
  14952. $('.turnon, .turnoff').change(function () {
  14953. $.get('/buy/notifysearch/id/' + $(this).attr('rel') + '/set/' + ($(this).is('.turnon') ? 'on' : 'off') + '/js/1');
  14954. });
  14955. $('.radio-switch label').click(function () {
  14956. $(this).parent().find('label').removeClass('selected');
  14957. $(this).addClass('selected');;
  14958. });
  14959. };
  14960. function LoadListing(id, medium) {
  14961. var siteid = id.substring(1);
  14962. $('.site-shell').append('<div id="pane-' + siteid + '" class="sitepane"></div>').addClass('open');
  14963. $('#pane-' + siteid).animate({
  14964. width: $('.browse').width() + 20
  14965. }, 500, 'easeOutQuint', function () {
  14966. $.get('/buy/view/id/' + siteid + '/medium/' + (medium || 0) + '/js/1/', function (data) {
  14967. var pane = $('#pane-' + siteid).append(data).css({
  14968. backgroundImage: 'none'
  14969. });
  14970. pane.height(pane.find('.panepad').height());
  14971. if ((pane.height() + 50) > $(window).height()) {
  14972. pane.height($(window).height() - 8).find('.scrollable').height($(window).height() - 200);
  14973. }
  14974. pane.stickyPanel();
  14975. SetupBuy($('body'));
  14976. });
  14977. });
  14978. $(window).trigger('scroll.stickyPanel');
  14979. }
  14980. function LoadView(id, url) {
  14981. $('.basic-shell').append('<div id="pane-' + id + '" class="pane"><div class="panepad"></div></div>').addClass('open');
  14982. $('#pane-' + id).animate({
  14983. width: $('.rightcol').width()
  14984. }, 500, 'easeOutQuint', function () {
  14985. $.get(url + '/js/1/', function (data) {
  14986. $('#pane-' + id + ' .panepad').append(data).parent().css({
  14987. backgroundImage: 'none'
  14988. });
  14989. UtcDate();
  14990. });
  14991. });
  14992. }
  14993. function QuickEdit(url, cb, cb2, extraclass) {
  14994. $('.loading').show();
  14995. $('.modalscreen').show();
  14996. var oldextra = $('.modal').data('extraclass');
  14997. if (oldextra) $('.modal').removeClass(oldextra);
  14998. if (extraclass) $('.modal').data('extraclass', extraclass).addClass(extraclass);
  14999. $.get(url + '/js/1/', function (data) {
  15000. var stop = false;
  15001. if (cb) {
  15002. if (!cb(data)) stop = true;
  15003. }
  15004. if (!stop) $('.modalpad').html(data).parent().show(0, function () {
  15005. $('.loading').hide();
  15006. QuickSubmitAll($('.modalpad .quicksubmit'));
  15007. if (cb2) cb2();
  15008. });
  15009. });
  15010. }
  15011. function QuickSubmitAll(el) {
  15012. el.each(function () {
  15013. QuickSubmit($(this));
  15014. });
  15015. }
  15016. function QuickSubmit(el, cb) {
  15017. el.submit(function () {
  15018. var self = $(this);
  15019. $('.loading').show();
  15020. $('.modalscreen').show();
  15021. $.post($(this).attr('action') + '/submit1/1/js/1', $(this).serialize(), function (d) {
  15022. $('.modalpad').html(d).parent().show(0, function () {
  15023. $('.loading').hide();
  15024. QuickSubmitAll($('.modalpad .quicksubmit'));
  15025. if (cb) cb(self);
  15026. });
  15027. });
  15028. return false;
  15029. });
  15030. }
  15031. function CloseMe(el, cb) {
  15032. var func = function (e) {
  15033. $(window).unbind('click', func);
  15034. cb.call(el);
  15035. e.stopPropagation();
  15036. };
  15037. $(window).bind('click', func);
  15038. }
  15039. function PrettyDate(d) {
  15040. var pretty = $.datepicker.formatDate('M d, yy', d);
  15041. pretty += ' at ' + d.toLocaleTimeString() + ' (' + (String(String(new Date()).split("(")[1]).split(")")[0]) + ')';
  15042. return pretty;
  15043. }
  15044. function UtcDate() {
  15045. $('.utcdate').each(function () {
  15046. var d = new Date();
  15047. d.setTime($(this).attr('rel') * 1000);
  15048. $(this).after($('<span/>').addClass('utcdateextra').text(PrettyDate(d)).hide());
  15049. $(this).hover(function (e) {
  15050. var x = e.pageX - $(this).offset().left,
  15051. y = e.pageY - $(this).offset().top;
  15052. $(this).nextAll('.utcdateextra').eq(0).css({
  15053. top: y - 32,
  15054. left: x - 65
  15055. }).show();
  15056. }, function () {
  15057. $(this).nextAll('.utcdateextra').eq(0).hide();
  15058. }).mousemove(function (e) {
  15059. var x = e.pageX - $(this).offset().left,
  15060. y = e.pageY - $(this).offset().top;
  15061. $(this).nextAll('.utcdateextra').eq(0).css({
  15062. top: y - 32,
  15063. left: x - 65
  15064. });
  15065. });
  15066. });
  15067. }
  15068. OnInit(function () {
  15069. var prettify = false;
  15070. $('pre.api').each(function () {
  15071. $(this).addClass('prettyprint');
  15072. prettify = true;
  15073. });
  15074. if (prettify) {
  15075. $.getScript('/stuff/pretty.js', function () {
  15076. prettyPrint();
  15077. });
  15078. }
  15079. $('.magnify').each(function () {
  15080. $(this).hover(function (e) {
  15081. $('.bubble .img').html($(this).html()).css({
  15082. display: 'block'
  15083. });
  15084. $('.bubble').css({
  15085. 'top': $(this).offset().top - $('.bubble').outerHeight() - 15,
  15086. 'left': $(this).offset().left - 20
  15087. });
  15088. $('.bubble').stop(true, true).delay(700).fadeIn(200);
  15089. }, function () {
  15090. $('.bubble').stop(true, true).fadeOut(200);
  15091. $('.bubble .img').html('').hide();
  15092. });
  15093. });
  15094. $('.hidedefault').focus(function () {
  15095. if ($(this).val() == $(this).attr('rel')) $(this).val('');
  15096. }).blur(function () {
  15097. if ($(this).val().length == 0) $(this).val($(this).attr('rel'));
  15098. });
  15099. $('.button.disabled').live('click', function () {
  15100. return false;
  15101. });
  15102. Agree = function (ctx) {
  15103. if ($('input[name=agree]', ctx).is(':checked')) $('.button.checkout', ctx).removeClass('disabled');
  15104. else $('.button.checkout', ctx).addClass('disabled');
  15105. }
  15106. $('input[name=agree]').live('change', function () {
  15107. Agree($(this).parents('.billing'));
  15108. });
  15109. UtcDate();
  15110. $('.daterangeme').datepicker();
  15111. $('a.cal').live('click', function (e) {
  15112. $(this).toggleClass('on');
  15113. var picker = $('.fullcal', $(this).parent()),
  15114. start = null,
  15115. end = null,
  15116. maxdate = parseInt(picker.attr('rel'), 10);
  15117. picker.toggle().find('.pad').datepicker({
  15118. autoSize: false,
  15119. defaultDate: 'today',
  15120. maxDate: maxdate > 0 ? new Date(maxdate * 1000) : null,
  15121. changeMonth: false,
  15122. numberOfMonths: 2,
  15123. beforeShowDay: function (date) {
  15124. if ((start && end && date >= start && date < end) || (start && !end && date - start == 0)) return [true, 'highlight'];
  15125. return [true, ''];
  15126. },
  15127. onSelect: function (selectedDate) {
  15128. var instance = $(this).data('datepicker'),
  15129. date = $.datepicker.parseDate(instance.settings.dateFormat || $.datepicker._defaults.dateFormat, selectedDate, instance.settings);
  15130. if (!start) start = date;
  15131. else if (!end && date > start) end = date;
  15132. else {
  15133. end = null;
  15134. start = date;
  15135. }
  15136. $('#from').val(start ? $.datepicker.formatDate('M d, yy', start) : '');
  15137. $('#to').val(end ? $.datepicker.formatDate('M d, yy', end) : '');
  15138. if (start && end) $('#applydate').addClass('primary');
  15139. }
  15140. }).click(function (e) {
  15141. e.stopPropagation();
  15142. });
  15143. $('#applydate').click(function () {
  15144. var from = $('#from').val(),
  15145. to = $('#to').val();
  15146. if (!from || !to) return false;
  15147. $(this).attr('href', $(this).attr('href').replace('[val]', from + '|' + to));
  15148. });
  15149. var defaults = function () {
  15150. var date = null;
  15151. try {
  15152. date = $.datepicker.parseDate('M d, yy', $(this).val());
  15153. } catch (e) {}
  15154. if (date) {
  15155. if ($(this).is('#from')) start = date;
  15156. else end = date;
  15157. picker.find('.pad').datepicker('refresh');
  15158. }
  15159. }
  15160. $('input', picker).click(function () {
  15161. return false;
  15162. }).change(defaults).each(defaults);
  15163. if (picker.is(':visible')) CloseMe($(this), function () {
  15164. $(this).click();
  15165. });
  15166. return false;
  15167. });
  15168. $('ul.propdrop > li').click(function (e) {
  15169. if ($(this).is('.open')) return true;
  15170. $(this).addClass('on open');
  15171. CloseMe($(this), function () {
  15172. $(this).removeClass('on open');
  15173. });
  15174. return false;
  15175. });
  15176. var mlm = function () {
  15177. var t = $(this),
  15178. fd = t.parent(),
  15179. left = parseInt(t.attr('maxlength'), 10) - t.val().length;
  15180. if (!$('.limit', fd).length) fd.append($('<div/>').addClass('limit').append($('<span/>').attr('class', 'remaining').addClass('good')).append(' characters remaining'));
  15181. $('.limit .remaining', fd).text(left);
  15182. if (left < 0) $('.limit', fd).addClass('bad');
  15183. else $('.limit', fd).removeClass('good');
  15184. };
  15185. $('.maxlengthme').each(mlm).keypress(mlm);
  15186. $('#changemood').click(function (e) {
  15187. $('#editingmood').slideDown(300);
  15188. $('#normalmood').hide();
  15189. return false;
  15190. });
  15191. $('#savemood').click(function () {
  15192. $.get('/users/mood/extent/' + $('#selectextent').val() + '/mood/' + $('#selectmood').val() + '/moodmessage/' + escape($('#moodmessage').val() || '0'), function (d) {
  15193. $('#normalmood').css('display', 'block');
  15194. $('#editingmood').css('display', 'none');
  15195. $('#extent').text($('#selectextent :selected').text());
  15196. $('#mood').text($('#selectmood :selected').text());
  15197. _gaq.push(['_trackEvent', 'Mood', $('#selectextent :selected').text(), $('#selectmood :selected').text()]);
  15198. });
  15199. return false;
  15200. });
  15201. $('#selectmood, #selectextent').change(function (e) {
  15202. $('#savemood').show();
  15203. });
  15204. $('.adv-addtag').click(function () {
  15205. $(this).parent().parent().find('div.addtag').css('display', 'block');
  15206. return false;
  15207. });
  15208. $('.closeaddtag').click(function () {
  15209. $(this).parent().parent().parent().find('div.addtag').css('display', 'none');
  15210. return false;
  15211. });
  15212. $('form.addtagform').submit(function () {
  15213. var me = $(this);
  15214. $.get($(this).attr('action') + '/mytags/' + encodeURIComponent($('input[name=mytags]', me).val()) + '/js/1', function (d) {
  15215. var pubkey = $('.newtags', d).attr('id'),
  15216. tags = $('#tags-' + pubkey),
  15217. newtags = $('.newtags', d).text().split(' ');
  15218. for (var i = 0; i < newtags.length; i++)
  15219. if (newtags[i].length > 0) tags.append($('<span/>').addClass('advtag').text(newtags[i]).append($('<sup/>').append($('<a/>').addClass('dojs deltag').attr('href', '/myads/deltag/id/' + pubkey + '/tag/' + newtags[i]).text('x'))));
  15220. $('input[name=mytags]', me).val('');
  15221. $('#row-' + pubkey + ' .closeaddtag').click();
  15222. });
  15223. return false;
  15224. });
  15225. $('.deltag').live('click', function () {
  15226. var me = $(this);
  15227. $.get($(this).attr('href') + '/js/1', function (d) {
  15228. me.parents('.advtag').remove();
  15229. });
  15230. return false;
  15231. });
  15232. $('.addqty .save').css('display', 'none');
  15233. $('.addqty select').change(function () {
  15234. $('#' + $(this).attr('id').replace('qty', 'cost')).text('$' + Format($(this).attr('class').substring(3) * $(this).val(), 2));
  15235. $(this).parents('.addqty').submit();
  15236. });
  15237. $('.addqty').submit(function () {
  15238. var me = $(this),
  15239. qty = $('select', me).val(),
  15240. l = $(this).attr('action') + '/qty/' + qty + '/js/1';
  15241. $.get(l, function (d) {
  15242. if (d == 0) window.location = l;
  15243. else {
  15244. $('.save', me).css('display', 'none');
  15245. $('.cart-total').text('$' + d);
  15246. }
  15247. });
  15248. return false;
  15249. });
  15250. $('.remove-item').click(function () {
  15251. var me = $(this);
  15252. $.get($(this).attr('href') + '/js/1', function (d) {
  15253. $('#item' + me.attr('id')).css('display', 'none');
  15254. $('.cart-total').text('$' + $('#newtotalcart', d).text());
  15255. $('.cart-quantity').text($('#newtotalquantity', d).text());
  15256. $('#nbanners').text(parseInt($('#nbanners').text()) - 1);
  15257. if ($('#nbanners').text() == '0') {
  15258. $('#emptycart').css('display', 'block');
  15259. $('#allcart, #allcreativesmsg').css('display', 'none');
  15260. $('.cart-total').parent().removeClass('active');
  15261. } else if ($('#gotallcreatives', d).text() == '1') {
  15262. $('#checkout-submit, #checkout-submit-express').removeClass('disabled');
  15263. $('#allcreativesmsg').css('display', 'none');
  15264. }
  15265. });
  15266. return false;
  15267. });
  15268. $('.remove-listitem').click(function () {
  15269. var me = $(this);
  15270. $.get(me.attr('href') + '/js/1', function (d) {
  15271. me.parents('tr').remove();
  15272. });
  15273. return false;
  15274. });
  15275. var loaded = false;
  15276. function ClosePane() {
  15277. $('.site-shell').removeClass('open');
  15278. $('.sitepane').remove();
  15279. $('.browsemask').hide();
  15280. }
  15281. $('.site-shell').stickyPanel();
  15282. $('#site-closepane').live('click', function (e) {
  15283. ClosePane();
  15284. loaded = window.location.hash = '/';
  15285. return false;
  15286. });
  15287. $('a.site').live('click', function (e) {
  15288. $('.sitepane').hide();
  15289. $('.browsemask').show();
  15290. loaded = window.location.hash = '#view-' + $(this).attr('id');
  15291. LoadListing($(this).parent().attr('id'), parseInt($(this).parents('.sites').attr('rel'), 10));
  15292. return false;
  15293. });
  15294. function LoadHash() {
  15295. if (window.location.hash.length > 5 && window.location.hash.substr(0, 6) == '#view-') setTimeout(function () {
  15296. $('#' + window.location.hash.substr(6)).click();
  15297. }, 100);
  15298. }
  15299. LoadHash();
  15300. $(window).bind('hashchange', function (e) {
  15301. if (loaded && loaded != window.location.hash) {
  15302. if (window.location.hash.substring(0, 5) != '#view') ClosePane();
  15303. else LoadHash();
  15304. }
  15305. });
  15306. $('#basic-closepane').live('click', function (e) {
  15307. $('.basic-shell').removeClass('open');
  15308. $('.pane').remove();
  15309. $('.browsemask').hide();
  15310. return false;
  15311. });
  15312. $('.quickpane').live('click', function (e) {
  15313. $('.pane').hide();
  15314. $('.browsemask').show();
  15315. LoadView($(this).attr('id'), $(this).attr('href'));
  15316. return false;
  15317. });
  15318. var page = 0,
  15319. pages = Math.floor($('.similarsection li').length / 8);
  15320. function ShowSimilar() {
  15321. $('.similarsection li').each(function (k, v) {
  15322. $(this).css('display', k >= (page * 8) && k < ((page + 1) * 8) ? 'block' : 'none');
  15323. });
  15324. }
  15325. $('.simprev').click(function () {
  15326. if (page > 0) page--;
  15327. ShowSimilar();
  15328. });
  15329. $('.simnext').click(function () {
  15330. if (page < pages) page++;
  15331. ShowSimilar();
  15332. });
  15333. ShowSimilar();
  15334. $('.tempcreative').css('display', 'none');
  15335. $('.showlive').click(function () {
  15336. var p = $(this).parent().parent().parent();
  15337. $('.tempcreative', p).css('display', 'none');
  15338. $('.livecreative', p).css('display', 'block');
  15339. $('.creativenote', p).text('This is a live creative.');
  15340. return false;
  15341. });
  15342. $('.showtemp').click(function () {
  15343. var p = $(this).parent().parent().parent();
  15344. $('.livecreative', p).css('display', 'none');
  15345. $('.tempcreative', p).css('display', 'block');
  15346. $('.creativenote', p).text('This is a pending creative.');
  15347. return false;
  15348. });
  15349. $('.ignorerec').live('click', function () {
  15350. $(this).parents('tr').removeClass('recommended');
  15351. $(this).parents('.recommendedflag').remove();
  15352. $.get($(this).attr('href') + '/js/1', function () {});
  15353. return false;
  15354. });
  15355. $('.remove-dirnotice').click(function () {
  15356. $.cookie('notnewheredamnit', 1, {
  15357. path: '/',
  15358. expires: 365
  15359. });
  15360. $(this).parents('.newhere').slideUp();
  15361. return false;
  15362. });
  15363. $('.gatrack').live('click', function () {
  15364. var tracking = $(this).attr('rel').split(';');
  15365. if (tracking.length == 3) {
  15366. _gaq.push(['_trackEvent', tracking[0], tracking[1], tracking[2]]);
  15367. }
  15368. });
  15369. $('.header .search input[name="tagsearch_post"]').live('focus', function (e) {
  15370. if ($(this).val() == 'search the marketplace') $(this).val('').css({
  15371. color: '#444'
  15372. });
  15373. });
  15374. $('.header .search input[name="tagsearch_post"]').live('blur', function (e) {
  15375. if ($(this).val() == '') $(this).val('search the marketplace').css({
  15376. color: '#bbb'
  15377. });
  15378. });
  15379. $('.sidebar .search input[name="tagsearch_post"]').live('focus', function (e) {
  15380. if ($(this).val() == 'enter keyword') $(this).val('').css({
  15381. color: '#444'
  15382. });
  15383. });
  15384. $('.sidebar .search input[name="tagsearch_post"]').live('blur', function (e) {
  15385. if ($(this).val() == '') $(this).val('enter keyword').css({
  15386. color: '#bbb'
  15387. });
  15388. });
  15389. $('.quickedit').live('click', function (e) {
  15390. QuickEdit($(this).attr('href'));
  15391. return false;
  15392. });
  15393. $('.modalclose a').live('click', function (e) {
  15394. $('.modal').hide();
  15395. $('.modalscreen').hide();
  15396. return false;
  15397. });
  15398. $('.updateme').change(function () {
  15399. if ($(this).val() != '') window.location = $(this).attr('rel').replace('[val]', $(this).val());
  15400. });
  15401. $('.tip').each(function () {
  15402. var text = $(this).attr('title').split('::');
  15403. $(this).hover(function (e) {
  15404. $('.bubble .text').html((text.length > 1 ? '<strong>' + text[0] + '</strong><em>' + text[1] + '</em>' : '<em>' + text[0] + '</em>'));
  15405. $('.bubble').css({
  15406. 'top': $(this).offset().top - $('.bubble').outerHeight() - 15,
  15407. 'left': $(this).offset().left - 20
  15408. });
  15409. $('.bubble').stop(true, true).fadeIn(200);
  15410. $(this).removeAttr('title');
  15411. }, function () {
  15412. $('.bubble').stop(true, true).fadeOut(200);
  15413. $('.bubble .text').html('');
  15414. $(this).attr('title', text);
  15415. });
  15416. });
  15417. $('div.removemsg').delay(500).slideDown(350, 'easeInExpo').append('<span class="ticktock"></span>').parent().find('.ticktock').delay(1000).animate({
  15418. width: '480px'
  15419. }, 3000, function () {
  15420. $('.removemsg').slideUp(200, 'easeOutExpo')
  15421. });
  15422. $('span.closemsg').click(function () {
  15423. $(this).parent('.message').hide();
  15424. });
  15425. $('.removemsg .close').click(function () {
  15426. $(this).parent().parent().remove();
  15427. return false;
  15428. });
  15429. SetupLoginStrip = function () {
  15430. $('ul#notLoggedIn li#login').click(function () {
  15431. $('form#loginForm').slideToggle(100);
  15432. return false;
  15433. });
  15434. $('form#loginForm').submit(function () {
  15435. $('form#loginForm .processing').show();
  15436. });
  15437. var login = function (what) {
  15438. return function () {
  15439. $('#successmodal').addClass('loginsignup');
  15440. QuickEdit('/users/loginsignup' + $(this).attr(what), function (d) {
  15441. $('.modalloginform').submit(function () {
  15442. var self = this;
  15443. if ($(this).is('.goahead')) return true;
  15444. $.get('/users/authenticate/email/' + $('.modalloginform input[name=email]').val() + '/password/' + $('.modalloginform input[name=password]').val() + '/js/1', function (d) {
  15445. if (d == 'T') $(self).addClass('goahead').submit();
  15446. else $('.authwrong').css('display', 'block');
  15447. });
  15448. return false;
  15449. });
  15450. return true;
  15451. });
  15452. return false;
  15453. };
  15454. };
  15455. $('.notloggedin a.logmein').click(login('href')).removeClass('dojs').removeClass('abusedojs');
  15456. $('.notloggedin form.logmein').submit(login('action'));
  15457. }
  15458. SetupLoginStrip();
  15459. $('a.advancedtrigger').live('click', function (e) {
  15460. var txt = $('.advanced').is(':visible') ? 'show advanced options' : 'hide advanced options';
  15461. $('.advancedtrigger').text(txt);
  15462. $('.advanced').slideToggle();
  15463. return false;
  15464. });
  15465. $('li.tiledview').live('click', function (e) {
  15466. $('li.tiledview').addClass('on');
  15467. $('li.listview').removeClass('on');
  15468. $('ul.sites').addClass('tiledview');
  15469. $('ul.sites').removeClass('listview');
  15470. $.cookie('buyview', 0, {
  15471. path: '/'
  15472. });
  15473. return false;
  15474. });
  15475. $('li.listview').live('click', function (e) {
  15476. $('li.listview').addClass('on');
  15477. $('li.tiledview').removeClass('on');
  15478. $('ul.sites').addClass('listview');
  15479. $('ul.sites').removeClass('tiledview');
  15480. $.cookie('buyview', 1, {
  15481. path: '/'
  15482. });
  15483. return false;
  15484. });
  15485. });