nutcracker-web 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49e8ab18d97bc2f3644bea2238f90aa57128bbfd
4
- data.tar.gz: 8366f3e27aed2da9900d70beae24b0a2ba75b87b
3
+ metadata.gz: 7da79d2bdd31fc4e9a89ec0c2575f29134dc4d0e
4
+ data.tar.gz: 8888dec6ec5b5ee66da2708b05497c1037f486b0
5
5
  SHA512:
6
- metadata.gz: 2365f9ef5a01e110659ca9176a7ec056de1d23b1dd538e91f1595555a76fb3604a2eb62ad1af1fac09df40dee1a8b3c51d08839001569d10fb895561dfe8c57b
7
- data.tar.gz: 16992a1a4ee4f59f3641de8b7f7919622161c0749628b6eca2b4496dc2d942eb76a5412766f2f9413fcc57b4d40d2aa9e25704e5142950f99cdbe7a936ab232d
6
+ metadata.gz: 54c8feea6d4a60662c1356b558fc73fec4ccf8d286dfc2605f448d9effb367f3c92b0d935598371b8ca5583c14a6172883b9e8d52dd8582432f3d30da92629af
7
+ data.tar.gz: 72d3ba4d4985216a490d9ae632a5fab7423be4013cee1ced2f611cc4670cc5ab66c5a0956301e9af082b0166c15f992a972b0e081c2566af47cbc9d83206d491
@@ -1,3 +1,5 @@
1
+ require 'open-uri'
2
+ require 'json'
1
3
  require 'haml'
2
4
  require 'sinatra'
3
5
  require 'json'
@@ -8,8 +10,9 @@ module Nutcracker
8
10
  enable :inline_templates
9
11
  set :root, File.expand_path('../'*4,__FILE__)
10
12
 
11
- def initialize(nutcracker = nil)
13
+ def initialize(nutcracker, external_servers = [])
12
14
  @nutcracker = nutcracker
15
+ @external_servers = external_servers
13
16
  super()
14
17
  end
15
18
 
@@ -21,12 +24,7 @@ module Nutcracker
21
24
  content_type :json
22
25
  overview.to_json
23
26
  end
24
-
25
- def overview
26
- @nutcracker.overview rescue
27
- JSON.parse File.read File.join(settings.root,"example.json")
28
- end
29
-
27
+
30
28
  def self.assets
31
29
  require 'sprockets'
32
30
  Sprockets::Environment.new { |env|
@@ -35,7 +33,26 @@ module Nutcracker
35
33
  }
36
34
  }
37
35
  end
38
-
36
+
37
+ private
38
+
39
+ def overview
40
+ JSON.parse(@nutcracker.overview.to_json).tap do |internal|
41
+ internal["clusters"] += overview_from_external_servers["clusters"]
42
+ end
43
+ end
44
+
45
+ def overview_from_external_servers
46
+ {"clusters" => []}.tap do |data|
47
+ Queue.new.tap do |q|
48
+ @external_servers.map do |server|
49
+ Thread.new { q.push JSON.parse(open("http://#{server}/overview.json").read) }
50
+ end.each(&:join)
51
+ data["clusters"] += q.pop["clusters"] while not q.empty?
52
+ end # queue
53
+ end # data
54
+ end # def
55
+
39
56
  end
40
57
  end
41
58
  end
@@ -1,5 +1,5 @@
1
1
  module Nutcracker
2
2
  module Web
3
- VERSION="0.0.4"
3
+ VERSION="0.0.5"
4
4
  end
5
5
  end
@@ -7,7 +7,7 @@ module Nutcracker
7
7
  Thread.current.abort_on_exception=true
8
8
  Rack::Server.start(
9
9
  {
10
- :app => App.new(nutcracker),
10
+ :app => App.new(nutcracker, options[:external_servers] || []),
11
11
  :environment => 'production',
12
12
  :pid => nil,
13
13
  :Port => 9292,
@@ -11,7 +11,7 @@
11
11
  *
12
12
  * Date: 2013-05-30T21:25Z
13
13
  */
14
- !function(t,e){function n(t){var e=t.length,n=oe.type(t);return oe.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||"function"!==n&&(0===e||"number"==typeof e&&e>0&&e-1 in t)}function r(t){var e=de[t]={};return oe.each(t.match(ae)||[],function(t,n){e[n]=!0}),e}function i(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=oe.expando+Math.random()}function o(t,n,r){var i;if(r===e&&1===t.nodeType)if(i="data-"+n.replace(ye,"-$1").toLowerCase(),r=t.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ve.test(r)?JSON.parse(r):r}catch(o){}me.set(t,n,r)}else r=e;return r}function s(){return!0}function a(){return!1}function u(){try{return U.activeElement}catch(t){}}function l(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function c(t,e,n){if(oe.isFunction(e))return oe.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return oe.grep(t,function(t){return t===e!==n});if("string"==typeof e){if($e.test(e))return oe.filter(e,t,n);e=oe.filter(e,t)}return oe.grep(t,function(t){return ee.call(e,t)>=0!==n})}function h(t,e){return oe.nodeName(t,"table")&&oe.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function f(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function p(t){var e=Fe.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function d(t,e){for(var n=t.length,r=0;n>r;r++)ge.set(t[r],"globalEval",!e||ge.get(e[r],"globalEval"))}function m(t,e){var n,r,i,o,s,a,u,l;if(1===e.nodeType){if(ge.hasData(t)&&(o=ge.access(t),s=ge.set(e,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)oe.event.add(e,i,l[i][n])}me.hasData(t)&&(a=me.access(t),u=oe.extend({},a),me.set(e,u))}}function g(t,n){var r=t.getElementsByTagName?t.getElementsByTagName(n||"*"):t.querySelectorAll?t.querySelectorAll(n||"*"):[];return n===e||n&&oe.nodeName(t,n)?oe.merge([t],r):r}function v(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Le.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function y(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=Ze.length;i--;)if(e=Ze[i]+n,e in t)return e;return r}function b(t,e){return t=e||t,"none"===oe.css(t,"display")||!oe.contains(t.ownerDocument,t)}function w(e){return t.getComputedStyle(e,null)}function x(t,e){for(var n,r,i,o=[],s=0,a=t.length;a>s;s++)r=t[s],r.style&&(o[s]=ge.get(r,"olddisplay"),n=r.style.display,e?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&b(r)&&(o[s]=ge.access(r,"olddisplay",_(r.nodeName)))):o[s]||(i=b(r),(n&&"none"!==n||!i)&&ge.set(r,"olddisplay",i?n:oe.css(r,"display"))));for(s=0;a>s;s++)r=t[s],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?o[s]||"":"none"));return t}function C(t,e,n){var r=Je.exec(e);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):e}function k(t,e,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=oe.css(t,n+Ke[o],!0,i)),r?("content"===n&&(s-=oe.css(t,"padding"+Ke[o],!0,i)),"margin"!==n&&(s-=oe.css(t,"border"+Ke[o]+"Width",!0,i))):(s+=oe.css(t,"padding"+Ke[o],!0,i),"padding"!==n&&(s+=oe.css(t,"border"+Ke[o]+"Width",!0,i)));return s}function T(t,e,n){var r=!0,i="width"===e?t.offsetWidth:t.offsetHeight,o=w(t),s=oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,o);if(0>=i||null==i){if(i=Ie(t,e,o),(0>i||null==i)&&(i=t.style[e]),Ve.test(i))return i;r=s&&(oe.support.boxSizingReliable||i===t.style[e]),i=parseFloat(i)||0}return i+k(t,e,n||(s?"border":"content"),r,o)+"px"}function _(t){var e=U,n=Ge[t];return n||(n=N(t,e),"none"!==n&&n||(Be=(Be||oe("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(e.documentElement),e=(Be[0].contentWindow||Be[0].contentDocument).document,e.write("<!doctype html><html><body>"),e.close(),n=N(t,e),Be.detach()),Ge[t]=n),n}function N(t,e){var n=oe(e.createElement(t)).appendTo(e.body),r=oe.css(n[0],"display");return n.remove(),r}function S(t,e,n,r){var i;if(oe.isArray(e))oe.each(e,function(e,i){n||en.test(t)?r(t,i):S(t+"["+("object"==typeof i?e:"")+"]",i,n,r)});else if(n||"object"!==oe.type(e))r(t,e);else for(i in e)S(t+"["+i+"]",e[i],n,r)}function $(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(ae)||[];if(oe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function E(t,e,n,r){function i(a){var u;return o[a]=!0,oe.each(t[a]||[],function(t,a){var l=a(e,n,r);return"string"!=typeof l||s||o[l]?s?!(u=l):void 0:(e.dataTypes.unshift(l),i(l),!1)}),u}var o={},s=t===bn;return i(e.dataTypes[0])||!o["*"]&&i("*")}function j(t,n){var r,i,o=oe.ajaxSettings.flatOptions||{};for(r in n)n[r]!==e&&((o[r]?t:i||(i={}))[r]=n[r]);return i&&oe.extend(!0,t,i),t}function M(t,n,r){for(var i,o,s,a,u=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),i===e&&(i=t.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){l.unshift(o);break}if(l[0]in r)s=l[0];else{for(o in r){if(!l[0]||t.converters[o+" "+l[0]]){s=o;break}a||(a=o)}s=s||a}return s?(s!==l[0]&&l.unshift(s),r[s]):void 0}function D(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}function A(){return setTimeout(function(){$n=e}),$n=oe.now()}function O(t,e,n){for(var r,i=(On[e]||[]).concat(On["*"]),o=0,s=i.length;s>o;o++)if(r=i[o].call(n,e,t))return r}function P(t,e,n){var r,i,o=0,s=An.length,a=oe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var e=$n||A(),n=Math.max(0,l.startTime+l.duration-e),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(o);return a.notifyWith(t,[l,o,n]),1>o&&u?n:(a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:oe.extend({},e),opts:oe.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:$n||A(),duration:n.duration,tweens:[],createTween:function(e,n){var r=oe.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return e?a.resolveWith(t,[l,e]):a.rejectWith(t,[l,e]),this}}),c=l.props;for(L(c,l.opts.specialEasing);s>o;o++)if(r=An[o].call(l,t,c,l.opts))return r;return oe.map(c,O,l),oe.isFunction(l.opts.start)&&l.opts.start.call(t,l),oe.fx.timer(oe.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function L(t,e){var n,r,i,o,s;for(n in t)if(r=oe.camelCase(n),i=e[r],o=t[n],oe.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),s=oe.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete t[r];for(n in o)n in t||(t[n]=o[n],e[n]=i)}else e[r]=i}function H(t,n,r){var i,o,s,a,u,l,c=this,h={},f=t.style,p=t.nodeType&&b(t),d=ge.get(t,"fxshow");r.queue||(u=oe._queueHooks(t,"fx"),null==u.unqueued&&(u.unqueued=0,l=u.empty.fire,u.empty.fire=function(){u.unqueued||l()}),u.unqueued++,c.always(function(){c.always(function(){u.unqueued--,oe.queue(t,"fx").length||u.empty.fire()})})),1===t.nodeType&&("height"in n||"width"in n)&&(r.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===oe.css(t,"display")&&"none"===oe.css(t,"float")&&(f.display="inline-block")),r.overflow&&(f.overflow="hidden",c.always(function(){f.overflow=r.overflow[0],f.overflowX=r.overflow[1],f.overflowY=r.overflow[2]}));for(i in n)if(o=n[i],jn.exec(o)){if(delete n[i],s=s||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||!d||d[i]===e)continue;p=!0}h[i]=d&&d[i]||oe.style(t,i)}if(!oe.isEmptyObject(h)){d?"hidden"in d&&(p=d.hidden):d=ge.access(t,"fxshow",{}),s&&(d.hidden=!p),p?oe(t).show():c.done(function(){oe(t).hide()}),c.done(function(){var e;ge.remove(t,"fxshow");for(e in h)oe.style(t,e,h[e])});for(i in h)a=O(p?d[i]:0,i,c),i in d||(d[i]=a.start,p&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function q(t,e,n,r,i){return new q.prototype.init(t,e,n,r,i)}function F(t,e){var n,r={height:t},i=0;for(e=e?1:0;4>i;i+=2-e)n=Ke[i],r["margin"+n]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function R(t){return oe.isWindow(t)?t:9===t.nodeType&&t.defaultView}var z,I,B=typeof e,W=t.location,U=t.document,J=U.documentElement,V=t.jQuery,X=t.$,G={},Y=[],Q="2.0.2",K=Y.concat,Z=Y.push,te=Y.slice,ee=Y.indexOf,ne=G.toString,re=G.hasOwnProperty,ie=Q.trim,oe=function(t,e){return new oe.fn.init(t,e,z)},se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ae=/\S+/g,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,le=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ce=/^-ms-/,he=/-([\da-z])/gi,fe=function(t,e){return e.toUpperCase()},pe=function(){U.removeEventListener("DOMContentLoaded",pe,!1),t.removeEventListener("load",pe,!1),oe.ready()};oe.fn=oe.prototype={jquery:Q,constructor:oe,init:function(t,n,r){var i,o;if(!t)return this;if("string"==typeof t){if(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:ue.exec(t),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(t):this.constructor(n).find(t);if(i[1]){if(n=n instanceof oe?n[0]:n,oe.merge(this,oe.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:U,!0)),le.test(i[1])&&oe.isPlainObject(n))for(i in n)oe.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}return o=U.getElementById(i[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=U,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):oe.isFunction(t)?r.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),oe.makeArray(t,this))},selector:"",length:0,toArray:function(){return te.call(this)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t){var e=oe.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return oe.each(this,t,e)},ready:function(t){return oe.ready.promise().done(t),this},slice:function(){return this.pushStack(te.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},map:function(t){return this.pushStack(oe.map(this,function(e,n){return t.call(e,n,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:Z,sort:[].sort,splice:[].splice},oe.fn.init.prototype=oe.fn,oe.extend=oe.fn.extend=function(){var t,n,r,i,o,s,a=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},u=2),"object"==typeof a||oe.isFunction(a)||(a={}),l===u&&(a=this,--u);l>u;u++)if(null!=(t=arguments[u]))for(n in t)r=a[n],i=t[n],a!==i&&(c&&i&&(oe.isPlainObject(i)||(o=oe.isArray(i)))?(o?(o=!1,s=r&&oe.isArray(r)?r:[]):s=r&&oe.isPlainObject(r)?r:{},a[n]=oe.extend(c,s,i)):i!==e&&(a[n]=i));return a},oe.extend({expando:"jQuery"+(Q+Math.random()).replace(/\D/g,""),noConflict:function(e){return t.$===oe&&(t.$=X),e&&t.jQuery===oe&&(t.jQuery=V),oe},isReady:!1,readyWait:1,holdReady:function(t){t?oe.readyWait++:oe.ready(!0)},ready:function(t){(t===!0?--oe.readyWait:oe.isReady)||(oe.isReady=!0,t!==!0&&--oe.readyWait>0||(I.resolveWith(U,[oe]),oe.fn.trigger&&oe(U).trigger("ready").off("ready")))},isFunction:function(t){return"function"===oe.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):"object"==typeof t||"function"==typeof t?G[ne.call(t)]||"object":typeof t},isPlainObject:function(t){if("object"!==oe.type(t)||t.nodeType||oe.isWindow(t))return!1;try{if(t.constructor&&!re.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}return!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||U;var r=le.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=oe.buildFragment([t],e,i),i&&oe(i).remove(),oe.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(t){var n,r;if(!t||"string"!=typeof t)return null;try{r=new DOMParser,n=r.parseFromString(t,"text/xml")}catch(i){n=e}return(!n||n.getElementsByTagName("parsererror").length)&&oe.error("Invalid XML: "+t),n},noop:function(){},globalEval:function(t){var e,n=eval;t=oe.trim(t),t&&(1===t.indexOf("use strict")?(e=U.createElement("script"),e.text=t,U.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(ce,"ms-").replace(he,fe)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,r){var i,o=0,s=t.length,a=n(t);if(r){if(a)for(;s>o&&(i=e.apply(t[o],r),i!==!1);o++);else for(o in t)if(i=e.apply(t[o],r),i===!1)break}else if(a)for(;s>o&&(i=e.call(t[o],o,t[o]),i!==!1);o++);else for(o in t)if(i=e.call(t[o],o,t[o]),i===!1)break;return t},trim:function(t){return null==t?"":ie.call(t)},makeArray:function(t,e){var r=e||[];return null!=t&&(n(Object(t))?oe.merge(r,"string"==typeof t?[t]:t):Z.call(r,t)),r},inArray:function(t,e,n){return null==e?-1:ee.call(e,t,n)},merge:function(t,n){var r=n.length,i=t.length,o=0;if("number"==typeof r)for(;r>o;o++)t[i++]=n[o];else for(;n[o]!==e;)t[i++]=n[o++];return t.length=i,t},grep:function(t,e,n){var r,i=[],o=0,s=t.length;for(n=!!n;s>o;o++)r=!!e(t[o],o),n!==r&&i.push(t[o]);return i},map:function(t,e,r){var i,o=0,s=t.length,a=n(t),u=[];if(a)for(;s>o;o++)i=e(t[o],o,r),null!=i&&(u[u.length]=i);else for(o in t)i=e(t[o],o,r),null!=i&&(u[u.length]=i);return K.apply([],u)},guid:1,proxy:function(t,n){var r,i,o;return"string"==typeof n&&(r=t[n],n=t,t=r),oe.isFunction(t)?(i=te.call(arguments,2),o=function(){return t.apply(n||this,i.concat(te.call(arguments)))},o.guid=t.guid=t.guid||oe.guid++,o):e},access:function(t,n,r,i,o,s,a){var u=0,l=t.length,c=null==r;if("object"===oe.type(r)){o=!0;for(u in r)oe.access(t,n,u,r[u],!0,s,a)}else if(i!==e&&(o=!0,oe.isFunction(i)||(a=!0),c&&(a?(n.call(t,i),n=null):(c=n,n=function(t,e,n){return c.call(oe(t),n)})),n))for(;l>u;u++)n(t[u],r,a?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):s},now:Date.now,swap:function(t,e,n,r){var i,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];i=n.apply(t,r||[]);for(o in e)t.style[o]=s[o];return i}}),oe.ready.promise=function(e){return I||(I=oe.Deferred(),"complete"===U.readyState?setTimeout(oe.ready):(U.addEventListener("DOMContentLoaded",pe,!1),t.addEventListener("load",pe,!1))),I.promise(e)},oe.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){G["[object "+e+"]"]=e.toLowerCase()}),z=oe(U),/*!
14
+ !function(t,e){function n(t){var e=t.length,n=oe.type(t);return oe.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||"function"!==n&&(0===e||"number"==typeof e&&e>0&&e-1 in t)}function r(t){var e=de[t]={};return oe.each(t.match(ae)||[],function(t,n){e[n]=!0}),e}function i(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=oe.expando+Math.random()}function o(t,n,r){var i;if(r===e&&1===t.nodeType)if(i="data-"+n.replace(ye,"-$1").toLowerCase(),r=t.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ve.test(r)?JSON.parse(r):r}catch(o){}me.set(t,n,r)}else r=e;return r}function s(){return!0}function a(){return!1}function u(){try{return U.activeElement}catch(t){}}function l(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function c(t,e,n){if(oe.isFunction(e))return oe.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return oe.grep(t,function(t){return t===e!==n});if("string"==typeof e){if($e.test(e))return oe.filter(e,t,n);e=oe.filter(e,t)}return oe.grep(t,function(t){return ee.call(e,t)>=0!==n})}function h(t,e){return oe.nodeName(t,"table")&&oe.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function f(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function p(t){var e=ze.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function d(t,e){for(var n=t.length,r=0;n>r;r++)ge.set(t[r],"globalEval",!e||ge.get(e[r],"globalEval"))}function m(t,e){var n,r,i,o,s,a,u,l;if(1===e.nodeType){if(ge.hasData(t)&&(o=ge.access(t),s=ge.set(e,o),l=o.events)){delete s.handle,s.events={};for(i in l)for(n=0,r=l[i].length;r>n;n++)oe.event.add(e,i,l[i][n])}me.hasData(t)&&(a=me.access(t),u=oe.extend({},a),me.set(e,u))}}function g(t,n){var r=t.getElementsByTagName?t.getElementsByTagName(n||"*"):t.querySelectorAll?t.querySelectorAll(n||"*"):[];return n===e||n&&oe.nodeName(t,n)?oe.merge([t],r):r}function v(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Pe.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function y(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=Ze.length;i--;)if(e=Ze[i]+n,e in t)return e;return r}function b(t,e){return t=e||t,"none"===oe.css(t,"display")||!oe.contains(t.ownerDocument,t)}function w(e){return t.getComputedStyle(e,null)}function x(t,e){for(var n,r,i,o=[],s=0,a=t.length;a>s;s++)r=t[s],r.style&&(o[s]=ge.get(r,"olddisplay"),n=r.style.display,e?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&b(r)&&(o[s]=ge.access(r,"olddisplay",_(r.nodeName)))):o[s]||(i=b(r),(n&&"none"!==n||!i)&&ge.set(r,"olddisplay",i?n:oe.css(r,"display"))));for(s=0;a>s;s++)r=t[s],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?o[s]||"":"none"));return t}function C(t,e,n){var r=Je.exec(e);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):e}function k(t,e,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=oe.css(t,n+Ke[o],!0,i)),r?("content"===n&&(s-=oe.css(t,"padding"+Ke[o],!0,i)),"margin"!==n&&(s-=oe.css(t,"border"+Ke[o]+"Width",!0,i))):(s+=oe.css(t,"padding"+Ke[o],!0,i),"padding"!==n&&(s+=oe.css(t,"border"+Ke[o]+"Width",!0,i)));return s}function T(t,e,n){var r=!0,i="width"===e?t.offsetWidth:t.offsetHeight,o=w(t),s=oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,o);if(0>=i||null==i){if(i=Ie(t,e,o),(0>i||null==i)&&(i=t.style[e]),Ve.test(i))return i;r=s&&(oe.support.boxSizingReliable||i===t.style[e]),i=parseFloat(i)||0}return i+k(t,e,n||(s?"border":"content"),r,o)+"px"}function _(t){var e=U,n=Ge[t];return n||(n=N(t,e),"none"!==n&&n||(Be=(Be||oe("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(e.documentElement),e=(Be[0].contentWindow||Be[0].contentDocument).document,e.write("<!doctype html><html><body>"),e.close(),n=N(t,e),Be.detach()),Ge[t]=n),n}function N(t,e){var n=oe(e.createElement(t)).appendTo(e.body),r=oe.css(n[0],"display");return n.remove(),r}function S(t,e,n,r){var i;if(oe.isArray(e))oe.each(e,function(e,i){n||en.test(t)?r(t,i):S(t+"["+("object"==typeof i?e:"")+"]",i,n,r)});else if(n||"object"!==oe.type(e))r(t,e);else for(i in e)S(t+"["+i+"]",e[i],n,r)}function $(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(ae)||[];if(oe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function E(t,e,n,r){function i(a){var u;return o[a]=!0,oe.each(t[a]||[],function(t,a){var l=a(e,n,r);return"string"!=typeof l||s||o[l]?s?!(u=l):void 0:(e.dataTypes.unshift(l),i(l),!1)}),u}var o={},s=t===bn;return i(e.dataTypes[0])||!o["*"]&&i("*")}function j(t,n){var r,i,o=oe.ajaxSettings.flatOptions||{};for(r in n)n[r]!==e&&((o[r]?t:i||(i={}))[r]=n[r]);return i&&oe.extend(!0,t,i),t}function M(t,n,r){for(var i,o,s,a,u=t.contents,l=t.dataTypes;"*"===l[0];)l.shift(),i===e&&(i=t.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){l.unshift(o);break}if(l[0]in r)s=l[0];else{for(o in r){if(!l[0]||t.converters[o+" "+l[0]]){s=o;break}a||(a=o)}s=s||a}return s?(s!==l[0]&&l.unshift(s),r[s]):void 0}function D(t,e,n,r){var i,o,s,a,u,l={},c=t.dataTypes.slice();if(c[1])for(s in t.converters)l[s.toLowerCase()]=t.converters[s];for(o=c.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=c.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=l[u+" "+o]||l["* "+o],!s)for(i in l)if(a=i.split(" "),a[1]===o&&(s=l[u+" "+a[0]]||l["* "+a[0]])){s===!0?s=l[i]:l[i]!==!0&&(o=a[0],c.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(h){return{state:"parsererror",error:s?h:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}function A(){return setTimeout(function(){$n=e}),$n=oe.now()}function O(t,e,n){for(var r,i=(On[e]||[]).concat(On["*"]),o=0,s=i.length;s>o;o++)if(r=i[o].call(n,e,t))return r}function R(t,e,n){var r,i,o=0,s=An.length,a=oe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var e=$n||A(),n=Math.max(0,l.startTime+l.duration-e),r=n/l.duration||0,o=1-r,s=0,u=l.tweens.length;u>s;s++)l.tweens[s].run(o);return a.notifyWith(t,[l,o,n]),1>o&&u?n:(a.resolveWith(t,[l]),!1)},l=a.promise({elem:t,props:oe.extend({},e),opts:oe.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:$n||A(),duration:n.duration,tweens:[],createTween:function(e,n){var r=oe.Tween(t,l.opts,e,n,l.opts.specialEasing[e]||l.opts.easing);return l.tweens.push(r),r},stop:function(e){var n=0,r=e?l.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)l.tweens[n].run(1);return e?a.resolveWith(t,[l,e]):a.rejectWith(t,[l,e]),this}}),c=l.props;for(P(c,l.opts.specialEasing);s>o;o++)if(r=An[o].call(l,t,c,l.opts))return r;return oe.map(c,O,l),oe.isFunction(l.opts.start)&&l.opts.start.call(t,l),oe.fx.timer(oe.extend(u,{elem:t,anim:l,queue:l.opts.queue})),l.progress(l.opts.progress).done(l.opts.done,l.opts.complete).fail(l.opts.fail).always(l.opts.always)}function P(t,e){var n,r,i,o,s;for(n in t)if(r=oe.camelCase(n),i=e[r],o=t[n],oe.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),s=oe.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete t[r];for(n in o)n in t||(t[n]=o[n],e[n]=i)}else e[r]=i}function L(t,n,r){var i,o,s,a,u,l,c=this,h={},f=t.style,p=t.nodeType&&b(t),d=ge.get(t,"fxshow");r.queue||(u=oe._queueHooks(t,"fx"),null==u.unqueued&&(u.unqueued=0,l=u.empty.fire,u.empty.fire=function(){u.unqueued||l()}),u.unqueued++,c.always(function(){c.always(function(){u.unqueued--,oe.queue(t,"fx").length||u.empty.fire()})})),1===t.nodeType&&("height"in n||"width"in n)&&(r.overflow=[f.overflow,f.overflowX,f.overflowY],"inline"===oe.css(t,"display")&&"none"===oe.css(t,"float")&&(f.display="inline-block")),r.overflow&&(f.overflow="hidden",c.always(function(){f.overflow=r.overflow[0],f.overflowX=r.overflow[1],f.overflowY=r.overflow[2]}));for(i in n)if(o=n[i],jn.exec(o)){if(delete n[i],s=s||"toggle"===o,o===(p?"hide":"show")){if("show"!==o||!d||d[i]===e)continue;p=!0}h[i]=d&&d[i]||oe.style(t,i)}if(!oe.isEmptyObject(h)){d?"hidden"in d&&(p=d.hidden):d=ge.access(t,"fxshow",{}),s&&(d.hidden=!p),p?oe(t).show():c.done(function(){oe(t).hide()}),c.done(function(){var e;ge.remove(t,"fxshow");for(e in h)oe.style(t,e,h[e])});for(i in h)a=O(p?d[i]:0,i,c),i in d||(d[i]=a.start,p&&(a.end=a.start,a.start="width"===i||"height"===i?1:0))}}function H(t,e,n,r,i){return new H.prototype.init(t,e,n,r,i)}function z(t,e){var n,r={height:t},i=0;for(e=e?1:0;4>i;i+=2-e)n=Ke[i],r["margin"+n]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function q(t){return oe.isWindow(t)?t:9===t.nodeType&&t.defaultView}var F,I,B=typeof e,W=t.location,U=t.document,J=U.documentElement,V=t.jQuery,X=t.$,G={},Y=[],Q="2.0.2",K=Y.concat,Z=Y.push,te=Y.slice,ee=Y.indexOf,ne=G.toString,re=G.hasOwnProperty,ie=Q.trim,oe=function(t,e){return new oe.fn.init(t,e,F)},se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ae=/\S+/g,ue=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,le=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,ce=/^-ms-/,he=/-([\da-z])/gi,fe=function(t,e){return e.toUpperCase()},pe=function(){U.removeEventListener("DOMContentLoaded",pe,!1),t.removeEventListener("load",pe,!1),oe.ready()};oe.fn=oe.prototype={jquery:Q,constructor:oe,init:function(t,n,r){var i,o;if(!t)return this;if("string"==typeof t){if(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:ue.exec(t),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(t):this.constructor(n).find(t);if(i[1]){if(n=n instanceof oe?n[0]:n,oe.merge(this,oe.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:U,!0)),le.test(i[1])&&oe.isPlainObject(n))for(i in n)oe.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}return o=U.getElementById(i[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=U,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):oe.isFunction(t)?r.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),oe.makeArray(t,this))},selector:"",length:0,toArray:function(){return te.call(this)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t){var e=oe.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return oe.each(this,t,e)},ready:function(t){return oe.ready.promise().done(t),this},slice:function(){return this.pushStack(te.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},map:function(t){return this.pushStack(oe.map(this,function(e,n){return t.call(e,n,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:Z,sort:[].sort,splice:[].splice},oe.fn.init.prototype=oe.fn,oe.extend=oe.fn.extend=function(){var t,n,r,i,o,s,a=arguments[0]||{},u=1,l=arguments.length,c=!1;for("boolean"==typeof a&&(c=a,a=arguments[1]||{},u=2),"object"==typeof a||oe.isFunction(a)||(a={}),l===u&&(a=this,--u);l>u;u++)if(null!=(t=arguments[u]))for(n in t)r=a[n],i=t[n],a!==i&&(c&&i&&(oe.isPlainObject(i)||(o=oe.isArray(i)))?(o?(o=!1,s=r&&oe.isArray(r)?r:[]):s=r&&oe.isPlainObject(r)?r:{},a[n]=oe.extend(c,s,i)):i!==e&&(a[n]=i));return a},oe.extend({expando:"jQuery"+(Q+Math.random()).replace(/\D/g,""),noConflict:function(e){return t.$===oe&&(t.$=X),e&&t.jQuery===oe&&(t.jQuery=V),oe},isReady:!1,readyWait:1,holdReady:function(t){t?oe.readyWait++:oe.ready(!0)},ready:function(t){(t===!0?--oe.readyWait:oe.isReady)||(oe.isReady=!0,t!==!0&&--oe.readyWait>0||(I.resolveWith(U,[oe]),oe.fn.trigger&&oe(U).trigger("ready").off("ready")))},isFunction:function(t){return"function"===oe.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):"object"==typeof t||"function"==typeof t?G[ne.call(t)]||"object":typeof t},isPlainObject:function(t){if("object"!==oe.type(t)||t.nodeType||oe.isWindow(t))return!1;try{if(t.constructor&&!re.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}return!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||U;var r=le.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=oe.buildFragment([t],e,i),i&&oe(i).remove(),oe.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(t){var n,r;if(!t||"string"!=typeof t)return null;try{r=new DOMParser,n=r.parseFromString(t,"text/xml")}catch(i){n=e}return(!n||n.getElementsByTagName("parsererror").length)&&oe.error("Invalid XML: "+t),n},noop:function(){},globalEval:function(t){var e,n=eval;t=oe.trim(t),t&&(1===t.indexOf("use strict")?(e=U.createElement("script"),e.text=t,U.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(ce,"ms-").replace(he,fe)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,r){var i,o=0,s=t.length,a=n(t);if(r){if(a)for(;s>o&&(i=e.apply(t[o],r),i!==!1);o++);else for(o in t)if(i=e.apply(t[o],r),i===!1)break}else if(a)for(;s>o&&(i=e.call(t[o],o,t[o]),i!==!1);o++);else for(o in t)if(i=e.call(t[o],o,t[o]),i===!1)break;return t},trim:function(t){return null==t?"":ie.call(t)},makeArray:function(t,e){var r=e||[];return null!=t&&(n(Object(t))?oe.merge(r,"string"==typeof t?[t]:t):Z.call(r,t)),r},inArray:function(t,e,n){return null==e?-1:ee.call(e,t,n)},merge:function(t,n){var r=n.length,i=t.length,o=0;if("number"==typeof r)for(;r>o;o++)t[i++]=n[o];else for(;n[o]!==e;)t[i++]=n[o++];return t.length=i,t},grep:function(t,e,n){var r,i=[],o=0,s=t.length;for(n=!!n;s>o;o++)r=!!e(t[o],o),n!==r&&i.push(t[o]);return i},map:function(t,e,r){var i,o=0,s=t.length,a=n(t),u=[];if(a)for(;s>o;o++)i=e(t[o],o,r),null!=i&&(u[u.length]=i);else for(o in t)i=e(t[o],o,r),null!=i&&(u[u.length]=i);return K.apply([],u)},guid:1,proxy:function(t,n){var r,i,o;return"string"==typeof n&&(r=t[n],n=t,t=r),oe.isFunction(t)?(i=te.call(arguments,2),o=function(){return t.apply(n||this,i.concat(te.call(arguments)))},o.guid=t.guid=t.guid||oe.guid++,o):e},access:function(t,n,r,i,o,s,a){var u=0,l=t.length,c=null==r;if("object"===oe.type(r)){o=!0;for(u in r)oe.access(t,n,u,r[u],!0,s,a)}else if(i!==e&&(o=!0,oe.isFunction(i)||(a=!0),c&&(a?(n.call(t,i),n=null):(c=n,n=function(t,e,n){return c.call(oe(t),n)})),n))for(;l>u;u++)n(t[u],r,a?i:i.call(t[u],u,n(t[u],r)));return o?t:c?n.call(t):l?n(t[0],r):s},now:Date.now,swap:function(t,e,n,r){var i,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];i=n.apply(t,r||[]);for(o in e)t.style[o]=s[o];return i}}),oe.ready.promise=function(e){return I||(I=oe.Deferred(),"complete"===U.readyState?setTimeout(oe.ready):(U.addEventListener("DOMContentLoaded",pe,!1),t.addEventListener("load",pe,!1))),I.promise(e)},oe.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){G["[object "+e+"]"]=e.toLowerCase()}),F=oe(U),/*!
15
15
  * Sizzle CSS Selector Engine v1.9.4-pre
16
16
  * http://sizzlejs.com/
17
17
  *
@@ -21,10 +21,10 @@
21
21
  *
22
22
  * Date: 2013-05-27
23
23
  */
24
- function(t,e){function n(t,e,n,r){var i,o,s,a,u,l,c,h,f,p;if((e?e.ownerDocument||e:W)!==L&&P(e),e=e||L,n=n||[],!t||"string"!=typeof t)return n;if(1!==(a=e.nodeType)&&9!==a)return[];if(q&&!r){if(i=ke.exec(t))if(s=i[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&I(e,o)&&o.id===s)return n.push(o),n}else{if(i[2])return ie.apply(n,e.getElementsByTagName(t)),n;if((s=i[3])&&S.getElementsByClassName&&e.getElementsByClassName)return ie.apply(n,e.getElementsByClassName(s)),n}if(S.qsa&&(!F||!F.test(t))){if(h=c=B,f=e,p=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(l=m(t),(c=e.getAttribute("id"))?h=c.replace(Ne,"\\$&"):e.setAttribute("id",h),h="[id='"+h+"'] ",u=l.length;u--;)l[u]=h+g(l[u]);f=ve.test(t)&&e.parentNode||e,p=l.join(",")}if(p)try{return ie.apply(n,f.querySelectorAll(p)),n}catch(d){}finally{c||e.removeAttribute("id")}}}return T(t.replace(de,"$1"),e,n,r)}function r(t){return Ce.test(t+"")}function i(){function t(n,r){return e.push(n+=" ")>E.cacheLength&&delete t[e.shift()],t[n]=r}var e=[];return t}function o(t){return t[B]=!0,t}function s(t){var e=L.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function a(t,e,n){t=t.split("|");for(var r,i=t.length,o=n?null:e;i--;)(r=E.attrHandle[t[i]])&&r!==e||(E.attrHandle[t[i]]=o)}function u(t,e){var n=t.getAttributeNode(e);return n&&n.specified?n.value:t[e]===!0?e.toLowerCase():null}function l(t,e){return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}function c(t){return"input"===t.nodeName.toLowerCase()?t.defaultValue:void 0}function h(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Z)-(~t.sourceIndex||Z);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function f(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function p(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function d(t){return o(function(e){return e=+e,o(function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function m(t,e){var r,i,o,s,a,u,l,c=X[t+" "];if(c)return e?0:c.slice(0);for(a=t,u=[],l=E.preFilter;a;){(!r||(i=me.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),r=!1,(i=ge.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(de," ")}),a=a.slice(r.length));for(s in E.filter)!(i=xe[s].exec(a))||l[s]&&!(i=l[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return e?a.length:a?n.error(t):X(t,u).slice(0)}function g(t){for(var e=0,n=t.length,r="";n>e;e++)r+=t[e].value;return r}function v(t,e,n){var r=e.dir,i=n&&"parentNode"===r,o=J++;return e.first?function(e,n,o){for(;e=e[r];)if(1===e.nodeType||i)return t(e,n,o)}:function(e,n,s){var a,u,l,c=U+" "+o;if(s){for(;e=e[r];)if((1===e.nodeType||i)&&t(e,n,s))return!0}else for(;e=e[r];)if(1===e.nodeType||i)if(l=e[B]||(e[B]={}),(u=l[r])&&u[0]===c){if((a=u[1])===!0||a===$)return a===!0}else if(u=l[r]=[c],u[1]=t(e,n,s)||$,u[1]===!0)return!0}}function y(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function b(t,e,n,r,i){for(var o,s=[],a=0,u=t.length,l=null!=e;u>a;a++)(o=t[a])&&(!n||n(o,r,i))&&(s.push(o),l&&e.push(a));return s}function w(t,e,n,r,i,s){return r&&!r[B]&&(r=w(r)),i&&!i[B]&&(i=w(i,s)),o(function(o,s,a,u){var l,c,h,f=[],p=[],d=s.length,m=o||k(e||"*",a.nodeType?[a]:a,[]),g=!t||!o&&e?m:b(m,f,t,a,u),v=n?i||(o?t:d||r)?[]:s:g;if(n&&n(g,v,a,u),r)for(l=b(v,p),r(l,[],a,u),c=l.length;c--;)(h=l[c])&&(v[p[c]]=!(g[p[c]]=h));if(o){if(i||t){if(i){for(l=[],c=v.length;c--;)(h=v[c])&&l.push(g[c]=h);i(null,v=[],l,u)}for(c=v.length;c--;)(h=v[c])&&(l=i?ae.call(o,h):f[c])>-1&&(o[l]=!(s[l]=h))}}else v=b(v===s?v.splice(d,v.length):v),i?i(null,s,v,u):ie.apply(s,v)})}function x(t){for(var e,n,r,i=t.length,o=E.relative[t[0].type],s=o||E.relative[" "],a=o?1:0,u=v(function(t){return t===e},s,!0),l=v(function(t){return ae.call(e,t)>-1},s,!0),c=[function(t,n,r){return!o&&(r||n!==A)||((e=n).nodeType?u(t,n,r):l(t,n,r))}];i>a;a++)if(n=E.relative[t[a].type])c=[v(y(c),n)];else{if(n=E.filter[t[a].type].apply(null,t[a].matches),n[B]){for(r=++a;i>r&&!E.relative[t[r].type];r++);return w(a>1&&y(c),a>1&&g(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(de,"$1"),n,r>a&&x(t.slice(a,r)),i>r&&x(t=t.slice(r)),i>r&&g(t))}c.push(n)}return y(c)}function C(t,e){var r=0,i=e.length>0,s=t.length>0,a=function(o,a,u,l,c){var h,f,p,d=[],m=0,g="0",v=o&&[],y=null!=c,w=A,x=o||s&&E.find.TAG("*",c&&a.parentNode||a),C=U+=null==w?1:Math.random()||.1;for(y&&(A=a!==L&&a,$=r);null!=(h=x[g]);g++){if(s&&h){for(f=0;p=t[f++];)if(p(h,a,u)){l.push(h);break}y&&(U=C,$=++r)}i&&((h=!p&&h)&&m--,o&&v.push(h))}if(m+=g,i&&g!==m){for(f=0;p=e[f++];)p(v,d,a,u);if(o){if(m>0)for(;g--;)v[g]||d[g]||(d[g]=ne.call(l));d=b(d)}ie.apply(l,d),y&&!o&&d.length>0&&m+e.length>1&&n.uniqueSort(l)}return y&&(U=C,A=w),v};return i?o(a):a}function k(t,e,r){for(var i=0,o=e.length;o>i;i++)n(t,e[i],r);return r}function T(t,e,n,r){var i,o,s,a,u,l=m(t);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&S.getById&&9===e.nodeType&&q&&E.relative[o[1].type]){if(e=(E.find.ID(s.matches[0].replace(Se,$e),e)||[])[0],!e)return n;t=t.slice(o.shift().value.length)}for(i=xe.needsContext.test(t)?0:o.length;i--&&(s=o[i],!E.relative[a=s.type]);)if((u=E.find[a])&&(r=u(s.matches[0].replace(Se,$e),ve.test(o[0].type)&&e.parentNode||e))){if(o.splice(i,1),t=r.length&&g(o),!t)return ie.apply(n,r),n;break}}return D(t,l)(r,e,!q,n,ve.test(t)),n}function _(){}var N,S,$,E,j,M,D,A,O,P,L,H,q,F,R,z,I,B="sizzle"+-new Date,W=t.document,U=0,J=0,V=i(),X=i(),G=i(),Y=!1,Q=function(){return 0},K=typeof e,Z=1<<31,te={}.hasOwnProperty,ee=[],ne=ee.pop,re=ee.push,ie=ee.push,se=ee.slice,ae=ee.indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]===t)return e;return-1},ue="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",le="[\\x20\\t\\r\\n\\f]",ce="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",he=ce.replace("w","w#"),fe="\\["+le+"*("+ce+")"+le+"*(?:([*^$|!~]?=)"+le+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+he+")|)|)"+le+"*\\]",pe=":("+ce+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+fe.replace(3,8)+")*)|.*)\\)|)",de=new RegExp("^"+le+"+|((?:^|[^\\\\])(?:\\\\.)*)"+le+"+$","g"),me=new RegExp("^"+le+"*,"+le+"*"),ge=new RegExp("^"+le+"*([>+~]|"+le+")"+le+"*"),ve=new RegExp(le+"*[+~]"),ye=new RegExp("="+le+"*([^\\]'\"]*)"+le+"*\\]","g"),be=new RegExp(pe),we=new RegExp("^"+he+"$"),xe={ID:new RegExp("^#("+ce+")"),CLASS:new RegExp("^\\.("+ce+")"),TAG:new RegExp("^("+ce.replace("w","w*")+")"),ATTR:new RegExp("^"+fe),PSEUDO:new RegExp("^"+pe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+le+"*(even|odd|(([+-]|)(\\d*)n|)"+le+"*(?:([+-]|)"+le+"*(\\d+)|))"+le+"*\\)|)","i"),bool:new RegExp("^(?:"+ue+")$","i"),needsContext:new RegExp("^"+le+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+le+"*((?:-\\d)?\\d*)"+le+"*\\)|)(?=[^-]|$)","i")},Ce=/^[^{]+\{\s*\[native \w/,ke=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Te=/^(?:input|select|textarea|button)$/i,_e=/^h\d$/i,Ne=/'|\\/g,Se=new RegExp("\\\\([\\da-f]{1,6}"+le+"?|("+le+")|.)","ig"),$e=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{ie.apply(ee=se.call(W.childNodes),W.childNodes),ee[W.childNodes.length].nodeType}catch(Ee){ie={apply:ee.length?function(t,e){re.apply(t,se.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}M=n.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},S=n.support={},P=n.setDocument=function(t){var e=t?t.ownerDocument||t:W,n=e.parentWindow;return e!==L&&9===e.nodeType&&e.documentElement?(L=e,H=e.documentElement,q=!M(e),n&&n.frameElement&&n.attachEvent("onbeforeunload",function(){P()}),S.attributes=s(function(t){return t.innerHTML="<a href='#'></a>",a("type|href|height|width",l,"#"===t.firstChild.getAttribute("href")),a(ue,u,null==t.getAttribute("disabled")),t.className="i",!t.getAttribute("className")}),S.input=s(function(t){return t.innerHTML="<input>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}),a("value",c,S.attributes&&S.input),S.getElementsByTagName=s(function(t){return t.appendChild(e.createComment("")),!t.getElementsByTagName("*").length}),S.getElementsByClassName=s(function(t){return t.innerHTML="<div class='a'></div><div class='a i'></div>",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),S.getById=s(function(t){return H.appendChild(t).id=B,!e.getElementsByName||!e.getElementsByName(B).length}),S.getById?(E.find.ID=function(t,e){if(typeof e.getElementById!==K&&q){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},E.filter.ID=function(t){var e=t.replace(Se,$e);return function(t){return t.getAttribute("id")===e}}):(delete E.find.ID,E.filter.ID=function(t){var e=t.replace(Se,$e);return function(t){var n=typeof t.getAttributeNode!==K&&t.getAttributeNode("id");return n&&n.value===e}}),E.find.TAG=S.getElementsByTagName?function(t,e){return typeof e.getElementsByTagName!==K?e.getElementsByTagName(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},E.find.CLASS=S.getElementsByClassName&&function(t,e){return typeof e.getElementsByClassName!==K&&q?e.getElementsByClassName(t):void 0},R=[],F=[],(S.qsa=r(e.querySelectorAll))&&(s(function(t){t.innerHTML="<select><option selected=''></option></select>",t.querySelectorAll("[selected]").length||F.push("\\["+le+"*(?:value|"+ue+")"),t.querySelectorAll(":checked").length||F.push(":checked")}),s(function(t){var n=e.createElement("input");n.setAttribute("type","hidden"),t.appendChild(n).setAttribute("t",""),t.querySelectorAll("[t^='']").length&&F.push("[*^$]="+le+"*(?:''|\"\")"),t.querySelectorAll(":enabled").length||F.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),F.push(",.*:")})),(S.matchesSelector=r(z=H.webkitMatchesSelector||H.mozMatchesSelector||H.oMatchesSelector||H.msMatchesSelector))&&s(function(t){S.disconnectedMatch=z.call(t,"div"),z.call(t,"[s!='']:x"),R.push("!=",pe)}),F=F.length&&new RegExp(F.join("|")),R=R.length&&new RegExp(R.join("|")),I=r(H.contains)||H.compareDocumentPosition?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S.sortDetached=s(function(t){return 1&t.compareDocumentPosition(e.createElement("div"))}),Q=H.compareDocumentPosition?function(t,n){if(t===n)return Y=!0,0;var r=n.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(n);return r?1&r||!S.sortDetached&&n.compareDocumentPosition(t)===r?t===e||I(W,t)?-1:n===e||I(W,n)?1:O?ae.call(O,t)-ae.call(O,n):0:4&r?-1:1:t.compareDocumentPosition?-1:1}:function(t,n){var r,i=0,o=t.parentNode,s=n.parentNode,a=[t],u=[n];if(t===n)return Y=!0,0;if(!o||!s)return t===e?-1:n===e?1:o?-1:s?1:O?ae.call(O,t)-ae.call(O,n):0;if(o===s)return h(t,n);for(r=t;r=r.parentNode;)a.unshift(r);for(r=n;r=r.parentNode;)u.unshift(r);for(;a[i]===u[i];)i++;return i?h(a[i],u[i]):a[i]===W?-1:u[i]===W?1:0},e):L},n.matches=function(t,e){return n(t,null,null,e)},n.matchesSelector=function(t,e){if((t.ownerDocument||t)!==L&&P(t),e=e.replace(ye,"='$1']"),!(!S.matchesSelector||!q||R&&R.test(e)||F&&F.test(e)))try{var r=z.call(t,e);if(r||S.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return n(e,L,null,[t]).length>0},n.contains=function(t,e){return(t.ownerDocument||t)!==L&&P(t),I(t,e)},n.attr=function(t,n){(t.ownerDocument||t)!==L&&P(t);var r=E.attrHandle[n.toLowerCase()],i=r&&te.call(E.attrHandle,n.toLowerCase())?r(t,n,!q):e;return i===e?S.attributes||!q?t.getAttribute(n):(i=t.getAttributeNode(n))&&i.specified?i.value:null:i},n.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},n.uniqueSort=function(t){var e,n=[],r=0,i=0;if(Y=!S.detectDuplicates,O=!S.sortStable&&t.slice(0),t.sort(Q),Y){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return t},j=n.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=j(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r];r++)n+=j(e);return n},E=n.selectors={cacheLength:50,createPseudo:o,match:xe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Se,$e),t[3]=(t[4]||t[5]||"").replace(Se,$e),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||n.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&n.error(t[0]),t},PSEUDO:function(t){var n,r=!t[5]&&t[2];return xe.CHILD.test(t[0])?null:(t[3]&&t[4]!==e?t[2]=t[4]:r&&be.test(r)&&(n=m(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(t[0]=t[0].slice(0,n),t[2]=r.slice(0,n)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Se,$e).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=V[t+" "];return e||(e=new RegExp("(^|"+le+")"+t+"("+le+"|$)"))&&V(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==K&&t.getAttribute("class")||"")})},ATTR:function(t,e,r){return function(i){var o=n.attr(i,t);return null==o?"!="===e:e?(o+="","="===e?o===r:"!="===e?o!==r:"^="===e?r&&0===o.indexOf(r):"*="===e?r&&o.indexOf(r)>-1:"$="===e?r&&o.slice(-r.length)===r:"~="===e?(" "+o+" ").indexOf(r)>-1:"|="===e?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,h,f,p,d,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!u&&!a;if(g){if(o){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;d=m="only"===t&&!d&&"nextSibling"}return!0}if(d=[s?g.firstChild:g.lastChild],s&&y){for(c=g[B]||(g[B]={}),l=c[t]||[],p=l[0]===U&&l[1],f=l[0]===U&&l[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(f=p=0)||d.pop();)if(1===h.nodeType&&++f&&h===e){c[t]=[U,p,f];break}}else if(y&&(l=(e[B]||(e[B]={}))[t])&&l[0]===U)f=l[1];else for(;(h=++p&&h&&h[m]||(f=p=0)||d.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++f||(y&&((h[B]||(h[B]={}))[t]=[U,f]),h!==e)););return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(t,e){var r,i=E.pseudos[t]||E.setFilters[t.toLowerCase()]||n.error("unsupported pseudo: "+t);return i[B]?i(e):i.length>1?(r=[t,t,"",e],E.setFilters.hasOwnProperty(t.toLowerCase())?o(function(t,n){for(var r,o=i(t,e),s=o.length;s--;)r=ae.call(t,o[s]),t[r]=!(n[r]=o[s])}):function(t){return i(t,0,r)}):i}},pseudos:{not:o(function(t){var e=[],n=[],r=D(t.replace(de,"$1"));return r[B]?o(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),!n.pop()}}),has:o(function(t){return function(e){return n(t,e).length>0}}),contains:o(function(t){return function(e){return(e.textContent||e.innerText||j(e)).indexOf(t)>-1}}),lang:o(function(t){return we.test(t||"")||n.error("unsupported lang: "+t),t=t.replace(Se,$e).toLowerCase(),function(e){var n;do if(n=q?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===H},focus:function(t){return t===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!E.pseudos.empty(t)},header:function(t){return _e.test(t.nodeName)},input:function(t){return Te.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:d(function(){return[0]}),last:d(function(t,e){return[e-1]}),eq:d(function(t,e,n){return[0>n?n+e:n]}),even:d(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:d(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:d(function(t,e,n){for(var r=0>n?n+e:n;--r>=0;)t.push(r);return t}),gt:d(function(t,e,n){for(var r=0>n?n+e:n;++r<e;)t.push(r);return t})}};for(N in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})E.pseudos[N]=f(N);for(N in{submit:!0,reset:!0})E.pseudos[N]=p(N);D=n.compile=function(t,e){var n,r=[],i=[],o=G[t+" "];if(!o){for(e||(e=m(t)),n=e.length;n--;)o=x(e[n]),o[B]?r.push(o):i.push(o);o=G(t,C(i,r))}return o},E.pseudos.nth=E.pseudos.eq,_.prototype=E.filters=E.pseudos,E.setFilters=new _,S.sortStable=B.split("").sort(Q).join("")===B,P(),[0,0].sort(Q),S.detectDuplicates=Y,oe.find=n,oe.expr=n.selectors,oe.expr[":"]=oe.expr.pseudos,oe.unique=n.uniqueSort,oe.text=n.getText,oe.isXMLDoc=n.isXML,oe.contains=n.contains}(t);var de={};oe.Callbacks=function(t){t="string"==typeof t?de[t]||r(t):oe.extend({},t);var n,i,o,s,a,u,l=[],c=!t.once&&[],h=function(e){for(n=t.memory&&e,i=!0,u=s||0,s=0,a=l.length,o=!0;l&&a>u;u++)if(l[u].apply(e[0],e[1])===!1&&t.stopOnFalse){n=!1;break}o=!1,l&&(c?c.length&&h(c.shift()):n?l=[]:f.disable())},f={add:function(){if(l){var e=l.length;!function r(e){oe.each(e,function(e,n){var i=oe.type(n);"function"===i?t.unique&&f.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})}(arguments),o?a=l.length:n&&(s=e,h(n))}return this},remove:function(){return l&&oe.each(arguments,function(t,e){for(var n;(n=oe.inArray(e,l,n))>-1;)l.splice(n,1),o&&(a>=n&&a--,u>=n&&u--)}),this},has:function(t){return t?oe.inArray(t,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=n=e,this},disabled:function(){return!l},lock:function(){return c=e,n||f.disable(),this},locked:function(){return!c},fireWith:function(t,e){return e=e||[],e=[t,e.slice?e.slice():e],!l||i&&!c||(o?c.push(e):h(e)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!i}};return f},oe.extend({Deferred:function(t){var e=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return oe.Deferred(function(n){oe.each(e,function(e,o){var s=o[0],a=oe.isFunction(t[e])&&t[e];i[o[1]](function(){var t=a&&a.apply(this,arguments);t&&oe.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?oe.extend(t,r):r}},i={};return r.pipe=r.then,oe.each(e,function(t,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=te.call(arguments),s=o.length,a=1!==s||t&&oe.isFunction(t.promise)?s:0,u=1===a?t:oe.Deferred(),l=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?te.call(arguments):i,r===e?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(e=new Array(s),n=new Array(s),r=new Array(s);s>i;i++)o[i]&&oe.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,e)):--a;return a||u.resolveWith(r,o),u.promise()}}),oe.support=function(e){var n=U.createElement("input"),r=U.createDocumentFragment(),i=U.createElement("div"),o=U.createElement("select"),s=o.appendChild(U.createElement("option"));return n.type?(n.type="checkbox",e.checkOn=""!==n.value,e.optSelected=s.selected,e.reliableMarginRight=!0,e.boxSizingReliable=!0,e.pixelPosition=!1,n.checked=!0,e.noCloneChecked=n.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!s.disabled,n=U.createElement("input"),n.value="t",n.type="radio",e.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),e.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,e.focusinBubbles="onfocusin"in t,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===i.style.backgroundClip,oe(function(){var n,r,o="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",s=U.getElementsByTagName("body")[0];s&&(n=U.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",oe.swap(s,null!=s.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===i.offsetWidth}),t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(i,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(U.createElement("div")),r.style.cssText=i.style.cssText=o,r.style.marginRight=r.style.width="0",i.style.width="1px",e.reliableMarginRight=!parseFloat((t.getComputedStyle(r,null)||{}).marginRight)),s.removeChild(n))}),e):e}({});var me,ge,ve=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,ye=/([A-Z])/g;i.uid=1,i.accepts=function(t){return t.nodeType?1===t.nodeType||9===t.nodeType:!0},i.prototype={key:function(t){if(!i.accepts(t))return 0;var e={},n=t[this.expando];if(!n){n=i.uid++;try{e[this.expando]={value:n},Object.defineProperties(t,e)}catch(r){e[this.expando]=n,oe.extend(t,e)}}return this.cache[n]||(this.cache[n]={}),n},set:function(t,e,n){var r,i=this.key(t),o=this.cache[i];if("string"==typeof e)o[e]=n;else if(oe.isEmptyObject(o))oe.extend(this.cache[i],e);else for(r in e)o[r]=e[r];return o},get:function(t,n){var r=this.cache[this.key(t)];return n===e?r:r[n]},access:function(t,n,r){return n===e||n&&"string"==typeof n&&r===e?this.get(t,n):(this.set(t,n,r),r!==e?r:n)},remove:function(t,n){var r,i,o,s=this.key(t),a=this.cache[s];if(n===e)this.cache[s]={};else{oe.isArray(n)?i=n.concat(n.map(oe.camelCase)):(o=oe.camelCase(n),n in a?i=[n,o]:(i=o,i=i in a?[i]:i.match(ae)||[])),r=i.length;for(;r--;)delete a[i[r]]}},hasData:function(t){return!oe.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}},me=new i,ge=new i,oe.extend({acceptData:i.accepts,hasData:function(t){return me.hasData(t)||ge.hasData(t)},data:function(t,e,n){return me.access(t,e,n)},removeData:function(t,e){me.remove(t,e)},_data:function(t,e,n){return ge.access(t,e,n)},_removeData:function(t,e){ge.remove(t,e)}}),oe.fn.extend({data:function(t,n){var r,i,s=this[0],a=0,u=null;if(t===e){if(this.length&&(u=me.get(s),1===s.nodeType&&!ge.get(s,"hasDataAttrs"))){for(r=s.attributes;a<r.length;a++)i=r[a].name,0===i.indexOf("data-")&&(i=oe.camelCase(i.slice(5)),o(s,i,u[i]));ge.set(s,"hasDataAttrs",!0)}return u}return"object"==typeof t?this.each(function(){me.set(this,t)}):oe.access(this,function(n){var r,i=oe.camelCase(t);if(s&&n===e){if(r=me.get(s,t),r!==e)return r;if(r=me.get(s,i),r!==e)return r;if(r=o(s,i,e),r!==e)return r}else this.each(function(){var r=me.get(this,i);me.set(this,i,n),-1!==t.indexOf("-")&&r!==e&&me.set(this,t,n)})},null,n,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){me.remove(this,t)})}}),oe.extend({queue:function(t,e,n){var r;return t?(e=(e||"fx")+"queue",r=ge.get(t,e),n&&(!r||oe.isArray(n)?r=ge.access(t,e,oe.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=oe.queue(t,e),r=n.length,i=n.shift(),o=oe._queueHooks(t,e),s=function(){oe.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ge.get(t,n)||ge.access(t,n,{empty:oe.Callbacks("once memory").add(function(){ge.remove(t,[e+"queue",n])})})}}),oe.fn.extend({queue:function(t,n){var r=2;return"string"!=typeof t&&(n=t,t="fx",r--),arguments.length<r?oe.queue(this[0],t):n===e?this:this.each(function(){var e=oe.queue(this,t,n);oe._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&oe.dequeue(this,t)})},dequeue:function(t){return this.each(function(){oe.dequeue(this,t)})},delay:function(t,e){return t=oe.fx?oe.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var r=setTimeout(e,t);n.stop=function(){clearTimeout(r)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,n){var r,i=1,o=oe.Deferred(),s=this,a=this.length,u=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof t&&(n=t,t=e),t=t||"fx";a--;)r=ge.get(s[a],t+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var be,we,xe=/[\t\r\n\f]/g,Ce=/\r/g,ke=/^(?:input|select|textarea|button)$/i;oe.fn.extend({attr:function(t,e){return oe.access(this,oe.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){oe.removeAttr(this,t)})},prop:function(t,e){return oe.access(this,oe.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[oe.propFix[t]||t]})},addClass:function(t){var e,n,r,i,o,s=0,a=this.length,u="string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).addClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(ae)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(xe," "):" ")){for(o=0;i=e[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=oe.trim(r)}return this},removeClass:function(t){var e,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).removeClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(ae)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(xe," "):"")){for(o=0;i=e[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=t?oe.trim(r):""}return this},toggleClass:function(t,e){var n=typeof t,r="boolean"==typeof e;return oe.isFunction(t)?this.each(function(n){oe(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var i,o=0,s=oe(this),a=e,u=t.match(ae)||[];i=u[o++];)a=r?a:!s.hasClass(i),s[a?"addClass":"removeClass"](i);else(n===B||"boolean"===n)&&(this.className&&ge.set(this,"__className__",this.className),this.className=this.className||t===!1?"":ge.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(xe," ").indexOf(e)>=0)return!0;return!1},val:function(t){var n,r,i,o=this[0];{if(arguments.length)return i=oe.isFunction(t),this.each(function(r){var o;1===this.nodeType&&(o=i?t.call(this,r,oe(this).val()):t,null==o?o="":"number"==typeof o?o+="":oe.isArray(o)&&(o=oe.map(o,function(t){return null==t?"":t+""})),n=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==e||(this.value=o))});if(o)return n=oe.valHooks[o.type]||oe.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==e?r:(r=o.value,"string"==typeof r?r.replace(Ce,""):null==r?"":r)}}}),oe.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(oe.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&oe.nodeName(n.parentNode,"optgroup"))){if(e=oe(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=oe.makeArray(e),s=i.length;s--;)r=i[s],(r.selected=oe.inArray(oe(r).val(),o)>=0)&&(n=!0);return n||(t.selectedIndex=-1),o}}},attr:function(t,n,r){var i,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return typeof t.getAttribute===B?oe.prop(t,n,r):(1===s&&oe.isXMLDoc(t)||(n=n.toLowerCase(),i=oe.attrHooks[n]||(oe.expr.match.bool.test(n)?we:be)),r===e?i&&"get"in i&&null!==(o=i.get(t,n))?o:(o=oe.find.attr(t,n),null==o?e:o):null!==r?i&&"set"in i&&(o=i.set(t,r,n))!==e?o:(t.setAttribute(n,r+""),r):(oe.removeAttr(t,n),void 0))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(ae);if(o&&1===t.nodeType)for(;n=o[i++];)r=oe.propFix[n]||n,oe.expr.match.bool.test(n)&&(t[r]=!1),t.removeAttribute(n)},attrHooks:{type:{set:function(t,e){if(!oe.support.radioValue&&"radio"===e&&oe.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(t,n,r){var i,o,s,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return s=1!==a||!oe.isXMLDoc(t),s&&(n=oe.propFix[n]||n,o=oe.propHooks[n]),r!==e?o&&"set"in o&&(i=o.set(t,r,n))!==e?i:t[n]=r:o&&"get"in o&&null!==(i=o.get(t,n))?i:t[n]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||ke.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),we={set:function(t,e,n){return e===!1?oe.removeAttr(t,n):t.setAttribute(n,n),n}},oe.each(oe.expr.match.bool.source.match(/\w+/g),function(t,n){var r=oe.expr.attrHandle[n]||oe.find.attr;oe.expr.attrHandle[n]=function(t,n,i){var o=oe.expr.attrHandle[n],s=i?e:(oe.expr.attrHandle[n]=e)!=r(t,n,i)?n.toLowerCase():null;return oe.expr.attrHandle[n]=o,s}}),oe.support.optSelected||(oe.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this}),oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(t,e){return oe.isArray(e)?t.checked=oe.inArray(oe(t).val(),e)>=0:void 0}},oe.support.checkOn||(oe.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Te=/^key/,_e=/^(?:mouse|contextmenu)|click/,Ne=/^(?:focusinfocus|focusoutblur)$/,Se=/^([^.]*)(?:\.(.+)|)$/;oe.event={global:{},add:function(t,n,r,i,o){var s,a,u,l,c,h,f,p,d,m,g,v=ge.get(t);if(v){for(r.handler&&(s=r,r=s.handler,o=s.selector),r.guid||(r.guid=oe.guid++),(l=v.events)||(l=v.events={}),(a=v.handle)||(a=v.handle=function(t){return typeof oe===B||t&&oe.event.triggered===t.type?e:oe.event.dispatch.apply(a.elem,arguments)},a.elem=t),n=(n||"").match(ae)||[""],c=n.length;c--;)u=Se.exec(n[c])||[],d=g=u[1],m=(u[2]||"").split(".").sort(),d&&(f=oe.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=oe.event.special[d]||{},h=oe.extend({type:d,origType:g,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&oe.expr.match.needsContext.test(o),namespace:m.join(".")},s),(p=l[d])||(p=l[d]=[],p.delegateCount=0,f.setup&&f.setup.call(t,i,m,a)!==!1||t.addEventListener&&t.addEventListener(d,a,!1)),f.add&&(f.add.call(t,h),h.handler.guid||(h.handler.guid=r.guid)),o?p.splice(p.delegateCount++,0,h):p.push(h),oe.event.global[d]=!0);t=null}},remove:function(t,e,n,r,i){var o,s,a,u,l,c,h,f,p,d,m,g=ge.hasData(t)&&ge.get(t);if(g&&(u=g.events)){for(e=(e||"").match(ae)||[""],l=e.length;l--;)if(a=Se.exec(e[l])||[],p=m=a[1],d=(a[2]||"").split(".").sort(),p){for(h=oe.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,f=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,h.remove&&h.remove.call(t,c));s&&!f.length&&(h.teardown&&h.teardown.call(t,d,g.handle)!==!1||oe.removeEvent(t,p,g.handle),delete u[p])
25
- }else for(p in u)oe.event.remove(t,p+e[l],n,r,!0);oe.isEmptyObject(u)&&(delete g.handle,ge.remove(t,"events"))}},trigger:function(n,r,i,o){var s,a,u,l,c,h,f,p=[i||U],d=re.call(n,"type")?n.type:n,m=re.call(n,"namespace")?n.namespace.split("."):[];if(a=u=i=i||U,3!==i.nodeType&&8!==i.nodeType&&!Ne.test(d+oe.event.triggered)&&(d.indexOf(".")>=0&&(m=d.split("."),d=m.shift(),m.sort()),c=d.indexOf(":")<0&&"on"+d,n=n[oe.expando]?n:new oe.Event(d,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=e,n.target||(n.target=i),r=null==r?[n]:oe.makeArray(r,[n]),f=oe.event.special[d]||{},o||!f.trigger||f.trigger.apply(i,r)!==!1)){if(!o&&!f.noBubble&&!oe.isWindow(i)){for(l=f.delegateType||d,Ne.test(l+d)||(a=a.parentNode);a;a=a.parentNode)p.push(a),u=a;u===(i.ownerDocument||U)&&p.push(u.defaultView||u.parentWindow||t)}for(s=0;(a=p[s++])&&!n.isPropagationStopped();)n.type=s>1?l:f.bindType||d,h=(ge.get(a,"events")||{})[n.type]&&ge.get(a,"handle"),h&&h.apply(a,r),h=c&&a[c],h&&oe.acceptData(a)&&h.apply&&h.apply(a,r)===!1&&n.preventDefault();return n.type=d,o||n.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),r)!==!1||!oe.acceptData(i)||c&&oe.isFunction(i[d])&&!oe.isWindow(i)&&(u=i[c],u&&(i[c]=null),oe.event.triggered=d,i[d](),oe.event.triggered=e,u&&(i[c]=u)),n.result}},dispatch:function(t){t=oe.event.fix(t);var n,r,i,o,s,a=[],u=te.call(arguments),l=(ge.get(this,"events")||{})[t.type]||[],c=oe.event.special[t.type]||{};if(u[0]=t,t.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,t)!==!1){for(a=oe.event.handlers.call(this,t,l),n=0;(o=a[n++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,i=((oe.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,u),i!==e&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,n){var r,i,o,s,a=[],u=n.delegateCount,l=t.target;if(u&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==t.type){for(i=[],r=0;u>r;r++)s=n[r],o=s.selector+" ",i[o]===e&&(i[o]=s.needsContext?oe(o,this).index(l)>=0:oe.find(o,this,null,[l]).length),i[o]&&i.push(s);i.length&&a.push({elem:l,handlers:i})}return u<n.length&&a.push({elem:this,handlers:n.slice(u)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,n){var r,i,o,s=n.button;return null==t.pageX&&null!=n.clientX&&(r=t.target.ownerDocument||U,i=r.documentElement,o=r.body,t.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),t.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),t.which||s===e||(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[oe.expando])return t;var e,n,r,i=t.type,o=t,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=_e.test(i)?this.mouseHooks:Te.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,t=new oe.Event(o),e=r.length;e--;)n=r[e],t[n]=o[n];return t.target||(t.target=U),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==u()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===u()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&oe.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return oe.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==e&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,r){var i=oe.extend(new oe.Event,n,{type:t,isSimulated:!0,originalEvent:{}});r?oe.event.trigger(i,null,e):oe.event.dispatch.call(e,i),i.isDefaultPrevented()&&n.preventDefault()}},oe.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)},oe.Event=function(t,e){return this instanceof oe.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.getPreventDefault&&t.getPreventDefault()?s:a):this.type=t,e&&oe.extend(this,e),this.timeStamp=t&&t.timeStamp||oe.now(),this[oe.expando]=!0,void 0):new oe.Event(t,e)},oe.Event.prototype={isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=s,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=s,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=s,this.stopPropagation()}},oe.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,e){oe.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return(!i||i!==r&&!oe.contains(r,i))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),oe.support.focusinBubbles||oe.each({focus:"focusin",blur:"focusout"},function(t,e){var n=0,r=function(t){oe.event.simulate(e,t.target,oe.event.fix(t),!0)};oe.event.special[e]={setup:function(){0===n++&&U.addEventListener(t,r,!0)},teardown:function(){0===--n&&U.removeEventListener(t,r,!0)}}}),oe.fn.extend({on:function(t,n,r,i,o){var s,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=e);for(u in t)this.on(u,n,r,t[u],o);return this}if(null==r&&null==i?(i=n,r=n=e):null==i&&("string"==typeof n?(i=r,r=e):(i=r,r=n,n=e)),i===!1)i=a;else if(!i)return this;return 1===o&&(s=i,i=function(t){return oe().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=oe.guid++)),this.each(function(){oe.event.add(this,t,i,r,n)})},one:function(t,e,n,r){return this.on(t,e,n,r,1)},off:function(t,n,r){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,oe(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,n,t[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=e),r===!1&&(r=a),this.each(function(){oe.event.remove(this,t,r,n)})},trigger:function(t,e){return this.each(function(){oe.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?oe.event.trigger(t,e,n,!0):void 0}});var $e=/^.[^:#\[\.,]*$/,Ee=/^(?:parents|prev(?:Until|All))/,je=oe.expr.match.needsContext,Me={children:!0,contents:!0,next:!0,prev:!0};oe.fn.extend({find:function(t){var e,n=[],r=this,i=r.length;if("string"!=typeof t)return this.pushStack(oe(t).filter(function(){for(e=0;i>e;e++)if(oe.contains(r[e],this))return!0}));for(e=0;i>e;e++)oe.find(t,r[e],n);return n=this.pushStack(i>1?oe.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},has:function(t){var e=oe(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(oe.contains(this,e[t]))return!0})},not:function(t){return this.pushStack(c(this,t||[],!0))},filter:function(t){return this.pushStack(c(this,t||[],!1))},is:function(t){return!!c(this,"string"==typeof t&&je.test(t)?oe(t):t||[],!1).length},closest:function(t,e){for(var n,r=0,i=this.length,o=[],s=je.test(t)||"string"!=typeof t?oe(t,e||this.context):0;i>r;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&oe.find.matchesSelector(n,t))){n=o.push(n);break}return this.pushStack(o.length>1?oe.unique(o):o)},index:function(t){return t?"string"==typeof t?ee.call(oe(t),this[0]):ee.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var n="string"==typeof t?oe(t,e):oe.makeArray(t&&t.nodeType?[t]:t),r=oe.merge(this.get(),n);return this.pushStack(oe.unique(r))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),oe.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return oe.dir(t,"parentNode")},parentsUntil:function(t,e,n){return oe.dir(t,"parentNode",n)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return oe.dir(t,"nextSibling")},prevAll:function(t){return oe.dir(t,"previousSibling")},nextUntil:function(t,e,n){return oe.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return oe.dir(t,"previousSibling",n)},siblings:function(t){return oe.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return oe.sibling(t.firstChild)},contents:function(t){return t.contentDocument||oe.merge([],t.childNodes)}},function(t,e){oe.fn[t]=function(n,r){var i=oe.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=oe.filter(r,i)),this.length>1&&(Me[t]||oe.unique(i),Ee.test(t)&&i.reverse()),this.pushStack(i)}}),oe.extend({filter:function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?oe.find.matchesSelector(r,t)?[r]:[]:oe.find.matches(t,oe.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,n,r){for(var i=[],o=r!==e;(t=t[n])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&oe(t).is(r))break;i.push(t)}return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ae=/<([\w:]+)/,Oe=/<|&#?\w+;/,Pe=/<(?:script|style|link)/i,Le=/^(?:checkbox|radio)$/i,He=/checked\s*(?:[^=]|=\s*.checked.)/i,qe=/^$|\/(?:java|ecma)script/i,Fe=/^true\/(.*)/,Re=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ze={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ze.optgroup=ze.option,ze.tbody=ze.tfoot=ze.colgroup=ze.caption=ze.thead,ze.th=ze.td,oe.fn.extend({text:function(t){return oe.access(this,function(t){return t===e?oe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||U).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=h(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=h(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,r=t?oe.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||oe.cleanData(g(n)),n.parentNode&&(e&&oe.contains(n.ownerDocument,n)&&d(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(oe.cleanData(g(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return oe.clone(this,t,e)})},html:function(t){return oe.access(this,function(t){var n=this[0]||{},r=0,i=this.length;if(t===e&&1===n.nodeType)return n.innerHTML;if("string"==typeof t&&!Pe.test(t)&&!ze[(Ae.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(De,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(oe.cleanData(g(n,!1)),n.innerHTML=t);n=0}catch(o){}}n&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=oe.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(n){var r=t[e++],i=t[e++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),oe(this).remove(),i.insertBefore(n,r))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,n){t=K.apply([],t);var r,i,o,s,a,u,l=0,c=this.length,h=this,d=c-1,m=t[0],v=oe.isFunction(m);if(v||!(1>=c||"string"!=typeof m||oe.support.checkClone)&&He.test(m))return this.each(function(r){var i=h.eq(r);v&&(t[0]=m.call(this,r,i.html())),i.domManip(t,e,n)});if(c&&(r=oe.buildFragment(t,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=oe.map(g(r,"script"),f),s=o.length;c>l;l++)a=r,l!==d&&(a=oe.clone(a,!0,!0),s&&oe.merge(o,g(a,"script"))),e.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,oe.map(o,p),l=0;s>l;l++)a=o[l],qe.test(a.type||"")&&!ge.access(a,"globalEval")&&oe.contains(u,a)&&(a.src?oe._evalUrl(a.src):oe.globalEval(a.textContent.replace(Re,"")))}return this}}),oe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){oe.fn[t]=function(t){for(var n,r=[],i=oe(t),o=i.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),oe(i[s])[e](n),Z.apply(r,n.get());return this.pushStack(r)}}),oe.extend({clone:function(t,e,n){var r,i,o,s,a=t.cloneNode(!0),u=oe.contains(t.ownerDocument,t);if(!(oe.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||oe.isXMLDoc(t)))for(s=g(a),o=g(t),r=0,i=o.length;i>r;r++)v(o[r],s[r]);if(e)if(n)for(o=o||g(t),s=s||g(a),r=0,i=o.length;i>r;r++)m(o[r],s[r]);else m(t,a);return s=g(a,"script"),s.length>0&&d(s,!u&&g(t,"script")),a},buildFragment:function(t,e,n,r){for(var i,o,s,a,u,l,c=0,h=t.length,f=e.createDocumentFragment(),p=[];h>c;c++)if(i=t[c],i||0===i)if("object"===oe.type(i))oe.merge(p,i.nodeType?[i]:i);else if(Oe.test(i)){for(o=o||f.appendChild(e.createElement("div")),s=(Ae.exec(i)||["",""])[1].toLowerCase(),a=ze[s]||ze._default,o.innerHTML=a[1]+i.replace(De,"<$1></$2>")+a[2],l=a[0];l--;)o=o.firstChild;oe.merge(p,o.childNodes),o=f.firstChild,o.textContent=""}else p.push(e.createTextNode(i));for(f.textContent="",c=0;i=p[c++];)if((!r||-1===oe.inArray(i,r))&&(u=oe.contains(i.ownerDocument,i),o=g(f.appendChild(i),"script"),u&&d(o),n))for(l=0;i=o[l++];)qe.test(i.type||"")&&n.push(i);return f},cleanData:function(t){for(var n,r,o,s,a,u,l=oe.event.special,c=0;(r=t[c])!==e;c++){if(i.accepts(r)&&(a=r[ge.expando],a&&(n=ge.cache[a]))){if(o=Object.keys(n.events||{}),o.length)for(u=0;(s=o[u])!==e;u++)l[s]?oe.event.remove(r,s):oe.removeEvent(r,s,n.handle);ge.cache[a]&&delete ge.cache[a]}delete me.cache[r[me.expando]]}},_evalUrl:function(t){return oe.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),oe.fn.extend({wrapAll:function(t){var e;return oe.isFunction(t)?this.each(function(e){oe(this).wrapAll(t.call(this,e))}):(this[0]&&(e=oe(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return oe.isFunction(t)?this.each(function(e){oe(this).wrapInner(t.call(this,e))}):this.each(function(){var e=oe(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=oe.isFunction(t);return this.each(function(n){oe(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}});var Ie,Be,We=/^(none|table(?!-c[ea]).+)/,Ue=/^margin/,Je=new RegExp("^("+se+")(.*)$","i"),Ve=new RegExp("^("+se+")(?!px)[a-z%]+$","i"),Xe=new RegExp("^([+-])=("+se+")","i"),Ge={BODY:"block"},Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:0,fontWeight:400},Ke=["Top","Right","Bottom","Left"],Ze=["Webkit","O","Moz","ms"];oe.fn.extend({css:function(t,n){return oe.access(this,function(t,n,r){var i,o,s={},a=0;if(oe.isArray(n)){for(i=w(t),o=n.length;o>a;a++)s[n[a]]=oe.css(t,n[a],!1,i);return s}return r!==e?oe.style(t,n,r):oe.css(t,n)},t,n,arguments.length>1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(t){var e="boolean"==typeof t;return this.each(function(){(e?t:b(this))?oe(this).show():oe(this).hide()})}}),oe.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ie(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,n,r,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,a,u=oe.camelCase(n),l=t.style;return n=oe.cssProps[u]||(oe.cssProps[u]=y(l,u)),a=oe.cssHooks[n]||oe.cssHooks[u],r===e?a&&"get"in a&&(o=a.get(t,!1,i))!==e?o:l[n]:(s=typeof r,"string"===s&&(o=Xe.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(oe.css(t,n)),s="number"),null==r||"number"===s&&isNaN(r)||("number"!==s||oe.cssNumber[u]||(r+="px"),oe.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),a&&"set"in a&&(r=a.set(t,r,i))===e||(l[n]=r)),void 0)}},css:function(t,n,r,i){var o,s,a,u=oe.camelCase(n);return n=oe.cssProps[u]||(oe.cssProps[u]=y(t.style,u)),a=oe.cssHooks[n]||oe.cssHooks[u],a&&"get"in a&&(o=a.get(t,!0,r)),o===e&&(o=Ie(t,n,i)),"normal"===o&&n in Qe&&(o=Qe[n]),""===r||r?(s=parseFloat(o),r===!0||oe.isNumeric(s)?s||0:o):o}}),Ie=function(t,n,r){var i,o,s,a=r||w(t),u=a?a.getPropertyValue(n)||a[n]:e,l=t.style;return a&&(""!==u||oe.contains(t.ownerDocument,t)||(u=oe.style(t,n)),Ve.test(u)&&Ue.test(n)&&(i=l.width,o=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=a.width,l.width=i,l.minWidth=o,l.maxWidth=s)),u},oe.each(["height","width"],function(t,e){oe.cssHooks[e]={get:function(t,n,r){return n?0===t.offsetWidth&&We.test(oe.css(t,"display"))?oe.swap(t,Ye,function(){return T(t,e,r)}):T(t,e,r):void 0},set:function(t,n,r){var i=r&&w(t);return C(t,n,r?k(t,e,r,oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,i),i):0)}}}),oe(function(){oe.support.reliableMarginRight||(oe.cssHooks.marginRight={get:function(t,e){return e?oe.swap(t,{display:"inline-block"},Ie,[t,"marginRight"]):void 0}}),!oe.support.pixelPosition&&oe.fn.position&&oe.each(["top","left"],function(t,e){oe.cssHooks[e]={get:function(t,n){return n?(n=Ie(t,e),Ve.test(n)?oe(t).position()[e]+"px":n):void 0}}})}),oe.expr&&oe.expr.filters&&(oe.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},oe.expr.filters.visible=function(t){return!oe.expr.filters.hidden(t)}),oe.each({margin:"",padding:"",border:"Width"},function(t,e){oe.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[t+Ke[r]+e]=o[r]||o[r-2]||o[0];return i}},Ue.test(t)||(oe.cssHooks[t+e].set=C)});var tn=/%20/g,en=/\[\]$/,nn=/\r?\n/g,rn=/^(?:submit|button|image|reset|file)$/i,on=/^(?:input|select|textarea|keygen)/i;oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=oe.prop(this,"elements");return t?oe.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!oe(this).is(":disabled")&&on.test(this.nodeName)&&!rn.test(t)&&(this.checked||!Le.test(t))}).map(function(t,e){var n=oe(this).val();return null==n?null:oe.isArray(n)?oe.map(n,function(t){return{name:e.name,value:t.replace(nn,"\r\n")}}):{name:e.name,value:n.replace(nn,"\r\n")}}).get()}}),oe.param=function(t,n){var r,i=[],o=function(t,e){e=oe.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(n===e&&(n=oe.ajaxSettings&&oe.ajaxSettings.traditional),oe.isArray(t)||t.jquery&&!oe.isPlainObject(t))oe.each(t,function(){o(this.name,this.value)});else for(r in t)S(r,t[r],n,o);return i.join("&").replace(tn,"+")},oe.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(t,e){oe.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),oe.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var sn,an,un=oe.now(),ln=/\?/,cn=/#.*$/,hn=/([?&])_=[^&]*/,fn=/^(.*?):[ \t]*([^\r\n]*)$/gm,pn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,dn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,vn=oe.fn.load,yn={},bn={},wn="*/".concat("*");try{an=W.href}catch(xn){an=U.createElement("a"),an.href="",an=an.href}sn=gn.exec(an.toLowerCase())||[],oe.fn.load=function(t,n,r){if("string"!=typeof t&&vn)return vn.apply(this,arguments);var i,o,s,a=this,u=t.indexOf(" ");return u>=0&&(i=t.slice(u),t=t.slice(0,u)),oe.isFunction(n)?(r=n,n=e):n&&"object"==typeof n&&(o="POST"),a.length>0&&oe.ajax({url:t,type:o,dataType:"html",data:n}).done(function(t){s=arguments,a.html(i?oe("<div>").append(oe.parseHTML(t)).find(i):t)}).complete(r&&function(t,e){a.each(r,s||[t.responseText,e,t])}),this},oe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){oe.fn[e]=function(t){return this.on(e,t)}}),oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:an,type:"GET",isLocal:pn.test(sn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?j(j(t,oe.ajaxSettings),e):j(oe.ajaxSettings,t)},ajaxPrefilter:$(yn),ajaxTransport:$(bn),ajax:function(t,n){function r(t,n,r,a){var l,h,y,b,x,k=n;2!==w&&(w=2,u&&clearTimeout(u),i=e,s=a||"",C.readyState=t>0?4:0,l=t>=200&&300>t||304===t,r&&(b=M(f,C,r)),b=D(f,b,C,l),l?(f.ifModified&&(x=C.getResponseHeader("Last-Modified"),x&&(oe.lastModified[o]=x),x=C.getResponseHeader("etag"),x&&(oe.etag[o]=x)),204===t||"HEAD"===f.type?k="nocontent":304===t?k="notmodified":(k=b.state,h=b.data,y=b.error,l=!y)):(y=k,(t||!k)&&(k="error",0>t&&(t=0))),C.status=t,C.statusText=(n||k)+"",l?m.resolveWith(p,[h,k,C]):m.rejectWith(p,[C,k,y]),C.statusCode(v),v=e,c&&d.trigger(l?"ajaxSuccess":"ajaxError",[C,f,l?h:y]),g.fireWith(p,[C,k]),c&&(d.trigger("ajaxComplete",[C,f]),--oe.active||oe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=e),n=n||{};var i,o,s,a,u,l,c,h,f=oe.ajaxSetup({},n),p=f.context||f,d=f.context&&(p.nodeType||p.jquery)?oe(p):oe.event,m=oe.Deferred(),g=oe.Callbacks("once memory"),v=f.statusCode||{},y={},b={},w=0,x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!a)for(a={};e=fn.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return w||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return w||(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>w)for(e in t)v[e]=[v[e],t[e]];else C.always(t[C.status]);return this},abort:function(t){var e=t||x;return i&&i.abort(e),r(0,e),this}};if(m.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,f.url=((t||f.url||an)+"").replace(cn,"").replace(mn,sn[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=oe.trim(f.dataType||"*").toLowerCase().match(ae)||[""],null==f.crossDomain&&(l=gn.exec(f.url.toLowerCase()),f.crossDomain=!(!l||l[1]===sn[1]&&l[2]===sn[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(sn[3]||("http:"===sn[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=oe.param(f.data,f.traditional)),E(yn,f,n,C),2===w)return C;c=f.global,c&&0===oe.active++&&oe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!dn.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(ln.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=hn.test(o)?o.replace(hn,"$1_="+un++):o+(ln.test(o)?"&":"?")+"_="+un++)),f.ifModified&&(oe.lastModified[o]&&C.setRequestHeader("If-Modified-Since",oe.lastModified[o]),oe.etag[o]&&C.setRequestHeader("If-None-Match",oe.etag[o])),(f.data&&f.hasContent&&f.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+wn+"; q=0.01":""):f.accepts["*"]);for(h in f.headers)C.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(f.beforeSend.call(p,C,f)===!1||2===w))return C.abort();x="abort";for(h in{success:1,error:1,complete:1})C[h](f[h]);if(i=E(bn,f,n,C)){C.readyState=1,c&&d.trigger("ajaxSend",[C,f]),f.async&&f.timeout>0&&(u=setTimeout(function(){C.abort("timeout")},f.timeout));try{w=1,i.send(y,r)}catch(k){if(!(2>w))throw k;r(-1,k)}}else r(-1,"No Transport");return C},getJSON:function(t,e,n){return oe.get(t,e,n,"json")},getScript:function(t,n){return oe.get(t,e,n,"script")}}),oe.each(["get","post"],function(t,n){oe[n]=function(t,r,i,o){return oe.isFunction(r)&&(o=o||i,i=r,r=e),oe.ajax({url:t,type:n,dataType:o,data:r,success:i})}}),oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return oe.globalEval(t),t}}}),oe.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),oe.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=oe("<script>").prop({async:!0,charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),U.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Cn=[],kn=/(=)\?(?=&|$)|\?\?/;oe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Cn.pop()||oe.expando+"_"+un++;return this[t]=!0,t}}),oe.ajaxPrefilter("json jsonp",function(n,r,i){var o,s,a,u=n.jsonp!==!1&&(kn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&kn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=oe.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(kn,"$1"+o):n.jsonp!==!1&&(n.url+=(ln.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return a||oe.error(o+" was not called"),a[0]},n.dataTypes[0]="json",s=t[o],t[o]=function(){a=arguments},i.always(function(){t[o]=s,n[o]&&(n.jsonpCallback=r.jsonpCallback,Cn.push(o)),a&&oe.isFunction(s)&&s(a[0]),a=s=e}),"script"):void 0}),oe.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var Tn=oe.ajaxSettings.xhr(),_n={0:200,1223:204},Nn=0,Sn={};t.ActiveXObject&&oe(t).on("unload",function(){for(var t in Sn)Sn[t]();Sn=e}),oe.support.cors=!!Tn&&"withCredentials"in Tn,oe.support.ajax=Tn=!!Tn,oe.ajaxTransport(function(t){var n;return oe.support.cors||Tn&&!t.crossDomain?{send:function(r,i){var o,s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)a.setRequestHeader(o,r[o]);n=function(t){return function(){n&&(delete Sn[s],n=a.onload=a.onerror=null,"abort"===t?a.abort():"error"===t?i(a.status||404,a.statusText):i(_n[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:e,a.getAllResponseHeaders()))}},a.onload=n(),a.onerror=n("error"),n=Sn[s=Nn++]=n("abort"),a.send(t.hasContent&&t.data||null)},abort:function(){n&&n()}}:void 0});var $n,En,jn=/^(?:toggle|show|hide)$/,Mn=new RegExp("^(?:([+-])=|)("+se+")([a-z%]*)$","i"),Dn=/queueHooks$/,An=[H],On={"*":[function(t,e){var n=this.createTween(t,e),r=n.cur(),i=Mn.exec(e),o=i&&i[3]||(oe.cssNumber[t]?"":"px"),s=(oe.cssNumber[t]||"px"!==o&&+r)&&Mn.exec(oe.css(n.elem,t)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,oe.style(n.elem,t,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};oe.Animation=oe.extend(P,{tweener:function(t,e){oe.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,r=0,i=t.length;i>r;r++)n=t[r],On[n]=On[n]||[],On[n].unshift(e)},prefilter:function(t,e){e?An.unshift(t):An.push(t)}}),oe.Tween=q,q.prototype={constructor:q,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(oe.cssNumber[n]?"":"px")},cur:function(){var t=q.propHooks[this.prop];return t&&t.get?t.get(this):q.propHooks._default.get(this)},run:function(t){var e,n=q.propHooks[this.prop];return this.pos=e=this.options.duration?oe.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):q.propHooks._default.set(this),this}},q.prototype.init.prototype=q.prototype,q.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=oe.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){oe.fx.step[t.prop]?oe.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[oe.cssProps[t.prop]]||oe.cssHooks[t.prop])?oe.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},q.propHooks.scrollTop=q.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},oe.each(["toggle","show","hide"],function(t,e){var n=oe.fn[e];oe.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(F(e,!0),t,r,i)}}),oe.fn.extend({fadeTo:function(t,e,n,r){return this.filter(b).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=oe.isEmptyObject(t),o=oe.speed(e,n,r),s=function(){var e=P(this,oe.extend({},t),o);(i||ge.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,n,r){var i=function(t){var e=t.stop;delete t.stop,e(r)};return"string"!=typeof t&&(r=n,n=t,t=e),n&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,n=null!=t&&t+"queueHooks",o=oe.timers,s=ge.get(this);if(n)s[n]&&s[n].stop&&i(s[n]);else for(n in s)s[n]&&s[n].stop&&Dn.test(n)&&i(s[n]);for(n=o.length;n--;)o[n].elem!==this||null!=t&&o[n].queue!==t||(o[n].anim.stop(r),e=!1,o.splice(n,1));(e||!r)&&oe.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=ge.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=oe.timers,s=r?r.length:0;for(n.finish=!0,oe.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;s>e;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),oe.each({slideDown:F("show"),slideUp:F("hide"),slideToggle:F("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){oe.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),oe.speed=function(t,e,n){var r=t&&"object"==typeof t?oe.extend({},t):{complete:n||!n&&e||oe.isFunction(t)&&t,duration:t,easing:n&&e||e&&!oe.isFunction(e)&&e};return r.duration=oe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in oe.fx.speeds?oe.fx.speeds[r.duration]:oe.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){oe.isFunction(r.old)&&r.old.call(this),r.queue&&oe.dequeue(this,r.queue)},r},oe.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},oe.timers=[],oe.fx=q.prototype.init,oe.fx.tick=function(){var t,n=oe.timers,r=0;for($n=oe.now();r<n.length;r++)t=n[r],t()||n[r]!==t||n.splice(r--,1);n.length||oe.fx.stop(),$n=e},oe.fx.timer=function(t){t()&&oe.timers.push(t)&&oe.fx.start()},oe.fx.interval=13,oe.fx.start=function(){En||(En=setInterval(oe.fx.tick,oe.fx.interval))},oe.fx.stop=function(){clearInterval(En),En=null},oe.fx.speeds={slow:600,fast:200,_default:400},oe.fx.step={},oe.expr&&oe.expr.filters&&(oe.expr.filters.animated=function(t){return oe.grep(oe.timers,function(e){return t===e.elem}).length}),oe.fn.offset=function(t){if(arguments.length)return t===e?this:this.each(function(e){oe.offset.setOffset(this,t,e)
26
- });var n,r,i=this[0],o={top:0,left:0},s=i&&i.ownerDocument;if(s)return n=s.documentElement,oe.contains(n,i)?(typeof i.getBoundingClientRect!==B&&(o=i.getBoundingClientRect()),r=R(s),{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}):o},oe.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l,c=oe.css(t,"position"),h=oe(t),f={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=oe.css(t,"top"),u=oe.css(t,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=h.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),oe.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(f.top=e.top-a.top+s),null!=e.left&&(f.left=e.left-a.left+i),"using"in e?e.using.call(t,f):h.css(f)}},oe.fn.extend({position:function(){if(this[0]){var t,e,n=this[0],r={top:0,left:0};return"fixed"===oe.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),oe.nodeName(t[0],"html")||(r=t.offset()),r.top+=oe.css(t[0],"borderTopWidth",!0),r.left+=oe.css(t[0],"borderLeftWidth",!0)),{top:e.top-r.top-oe.css(n,"marginTop",!0),left:e.left-r.left-oe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||J;t&&!oe.nodeName(t,"html")&&"static"===oe.css(t,"position");)t=t.offsetParent;return t||J})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var i="pageYOffset"===r;oe.fn[n]=function(o){return oe.access(this,function(n,o,s){var a=R(n);return s===e?a?a[r]:n[o]:(a?a.scrollTo(i?t.pageXOffset:s,i?s:t.pageYOffset):n[o]=s,void 0)},n,o,arguments.length,null)}}),oe.each({Height:"height",Width:"width"},function(t,n){oe.each({padding:"inner"+t,content:n,"":"outer"+t},function(r,i){oe.fn[i]=function(i,o){var s=arguments.length&&(r||"boolean"!=typeof i),a=r||(i===!0||o===!0?"margin":"border");return oe.access(this,function(n,r,i){var o;return oe.isWindow(n)?n.document.documentElement["client"+t]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+t],o["scroll"+t],n.body["offset"+t],o["offset"+t],o["client"+t])):i===e?oe.css(n,r,a):oe.style(n,r,i,a)},n,s?i:e,s,null)}})}),oe.fn.size=function(){return this.length},oe.fn.andSelf=oe.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=oe:"function"==typeof define&&define.amd&&define("jquery",[],function(){return oe}),"object"==typeof t&&"object"==typeof t.document&&(t.jQuery=t.$=oe)}(window),function(){var t=this,e=t._,n={},r=Array.prototype,i=Object.prototype,o=Function.prototype,s=r.push,a=r.slice,u=r.concat,l=i.toString,c=i.hasOwnProperty,h=r.forEach,f=r.map,p=r.reduce,d=r.reduceRight,m=r.filter,g=r.every,v=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,x=Object.keys,C=o.bind,k=function(t){return t instanceof k?t:this instanceof k?(this._wrapped=t,void 0):new k(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=k),exports._=k):t._=k,k.VERSION="1.4.4";var T=k.each=k.forEach=function(t,e,r){if(null!=t)if(h&&t.forEach===h)t.forEach(e,r);else if(t.length===+t.length){for(var i=0,o=t.length;o>i;i++)if(e.call(r,t[i],i,t)===n)return}else for(var s in t)if(k.has(t,s)&&e.call(r,t[s],s,t)===n)return};k.map=k.collect=function(t,e,n){var r=[];return null==t?r:f&&t.map===f?t.map(e,n):(T(t,function(t,i,o){r[r.length]=e.call(n,t,i,o)}),r)};var _="Reduce of empty array with no initial value";k.reduce=k.foldl=k.inject=function(t,e,n,r){var i=arguments.length>2;if(null==t&&(t=[]),p&&t.reduce===p)return r&&(e=k.bind(e,r)),i?t.reduce(e,n):t.reduce(e);if(T(t,function(t,o,s){i?n=e.call(r,n,t,o,s):(n=t,i=!0)}),!i)throw new TypeError(_);return n},k.reduceRight=k.foldr=function(t,e,n,r){var i=arguments.length>2;if(null==t&&(t=[]),d&&t.reduceRight===d)return r&&(e=k.bind(e,r)),i?t.reduceRight(e,n):t.reduceRight(e);var o=t.length;if(o!==+o){var s=k.keys(t);o=s.length}if(T(t,function(a,u,l){u=s?s[--o]:--o,i?n=e.call(r,n,t[u],u,l):(n=t[u],i=!0)}),!i)throw new TypeError(_);return n},k.find=k.detect=function(t,e,n){var r;return N(t,function(t,i,o){return e.call(n,t,i,o)?(r=t,!0):void 0}),r},k.filter=k.select=function(t,e,n){var r=[];return null==t?r:m&&t.filter===m?t.filter(e,n):(T(t,function(t,i,o){e.call(n,t,i,o)&&(r[r.length]=t)}),r)},k.reject=function(t,e,n){return k.filter(t,function(t,r,i){return!e.call(n,t,r,i)},n)},k.every=k.all=function(t,e,r){e||(e=k.identity);var i=!0;return null==t?i:g&&t.every===g?t.every(e,r):(T(t,function(t,o,s){return(i=i&&e.call(r,t,o,s))?void 0:n}),!!i)};var N=k.some=k.any=function(t,e,r){e||(e=k.identity);var i=!1;return null==t?i:v&&t.some===v?t.some(e,r):(T(t,function(t,o,s){return i||(i=e.call(r,t,o,s))?n:void 0}),!!i)};k.contains=k.include=function(t,e){return null==t?!1:y&&t.indexOf===y?-1!=t.indexOf(e):N(t,function(t){return t===e})},k.invoke=function(t,e){var n=a.call(arguments,2),r=k.isFunction(e);return k.map(t,function(t){return(r?e:t[e]).apply(t,n)})},k.pluck=function(t,e){return k.map(t,function(t){return t[e]})},k.where=function(t,e,n){return k.isEmpty(e)?n?null:[]:k[n?"find":"filter"](t,function(t){for(var n in e)if(e[n]!==t[n])return!1;return!0})},k.findWhere=function(t,e){return k.where(t,e,!0)},k.max=function(t,e,n){if(!e&&k.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.max.apply(Math,t);if(!e&&k.isEmpty(t))return-1/0;var r={computed:-1/0,value:-1/0};return T(t,function(t,i,o){var s=e?e.call(n,t,i,o):t;s>=r.computed&&(r={value:t,computed:s})}),r.value},k.min=function(t,e,n){if(!e&&k.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.min.apply(Math,t);if(!e&&k.isEmpty(t))return 1/0;var r={computed:1/0,value:1/0};return T(t,function(t,i,o){var s=e?e.call(n,t,i,o):t;s<r.computed&&(r={value:t,computed:s})}),r.value},k.shuffle=function(t){var e,n=0,r=[];return T(t,function(t){e=k.random(n++),r[n-1]=r[e],r[e]=t}),r};var S=function(t){return k.isFunction(t)?t:function(e){return e[t]}};k.sortBy=function(t,e,n){var r=S(e);return k.pluck(k.map(t,function(t,e,i){return{value:t,index:e,criteria:r.call(n,t,e,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index<e.index?-1:1}),"value")};var $=function(t,e,n,r){var i={},o=S(e||k.identity);return T(t,function(e,s){var a=o.call(n,e,s,t);r(i,a,e)}),i};k.groupBy=function(t,e,n){return $(t,e,n,function(t,e,n){(k.has(t,e)?t[e]:t[e]=[]).push(n)})},k.countBy=function(t,e,n){return $(t,e,n,function(t,e){k.has(t,e)||(t[e]=0),t[e]++})},k.sortedIndex=function(t,e,n,r){n=null==n?k.identity:S(n);for(var i=n.call(r,e),o=0,s=t.length;s>o;){var a=o+s>>>1;n.call(r,t[a])<i?o=a+1:s=a}return o},k.toArray=function(t){return t?k.isArray(t)?a.call(t):t.length===+t.length?k.map(t,k.identity):k.values(t):[]},k.size=function(t){return null==t?0:t.length===+t.length?t.length:k.keys(t).length},k.first=k.head=k.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:a.call(t,0,e)},k.initial=function(t,e,n){return a.call(t,0,t.length-(null==e||n?1:e))},k.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:a.call(t,Math.max(t.length-e,0))},k.rest=k.tail=k.drop=function(t,e,n){return a.call(t,null==e||n?1:e)},k.compact=function(t){return k.filter(t,k.identity)};var E=function(t,e,n){return T(t,function(t){k.isArray(t)?e?s.apply(n,t):E(t,e,n):n.push(t)}),n};k.flatten=function(t,e){return E(t,e,[])},k.without=function(t){return k.difference(t,a.call(arguments,1))},k.uniq=k.unique=function(t,e,n,r){k.isFunction(e)&&(r=n,n=e,e=!1);var i=n?k.map(t,n,r):t,o=[],s=[];return T(i,function(n,r){(e?r&&s[s.length-1]===n:k.contains(s,n))||(s.push(n),o.push(t[r]))}),o},k.union=function(){return k.uniq(u.apply(r,arguments))},k.intersection=function(t){var e=a.call(arguments,1);return k.filter(k.uniq(t),function(t){return k.every(e,function(e){return k.indexOf(e,t)>=0})})},k.difference=function(t){var e=u.apply(r,a.call(arguments,1));return k.filter(t,function(t){return!k.contains(e,t)})},k.zip=function(){for(var t=a.call(arguments),e=k.max(k.pluck(t,"length")),n=new Array(e),r=0;e>r;r++)n[r]=k.pluck(t,""+r);return n},k.object=function(t,e){if(null==t)return{};for(var n={},r=0,i=t.length;i>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},k.indexOf=function(t,e,n){if(null==t)return-1;var r=0,i=t.length;if(n){if("number"!=typeof n)return r=k.sortedIndex(t,e),t[r]===e?r:-1;r=0>n?Math.max(0,i+n):n}if(y&&t.indexOf===y)return t.indexOf(e,n);for(;i>r;r++)if(t[r]===e)return r;return-1},k.lastIndexOf=function(t,e,n){if(null==t)return-1;var r=null!=n;if(b&&t.lastIndexOf===b)return r?t.lastIndexOf(e,n):t.lastIndexOf(e);for(var i=r?n:t.length;i--;)if(t[i]===e)return i;return-1},k.range=function(t,e,n){arguments.length<=1&&(e=t||0,t=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=0,o=new Array(r);r>i;)o[i++]=t,t+=n;return o},k.bind=function(t,e){if(t.bind===C&&C)return C.apply(t,a.call(arguments,1));var n=a.call(arguments,2);return function(){return t.apply(e,n.concat(a.call(arguments)))}},k.partial=function(t){var e=a.call(arguments,1);return function(){return t.apply(this,e.concat(a.call(arguments)))}},k.bindAll=function(t){var e=a.call(arguments,1);return 0===e.length&&(e=k.functions(t)),T(e,function(e){t[e]=k.bind(t[e],t)}),t},k.memoize=function(t,e){var n={};return e||(e=k.identity),function(){var r=e.apply(this,arguments);return k.has(n,r)?n[r]:n[r]=t.apply(this,arguments)}},k.delay=function(t,e){var n=a.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},k.defer=function(t){return k.delay.apply(k,[t,1].concat(a.call(arguments,1)))},k.throttle=function(t,e){var n,r,i,o,s=0,a=function(){s=new Date,i=null,o=t.apply(n,r)};return function(){var u=new Date,l=e-(u-s);return n=this,r=arguments,0>=l?(clearTimeout(i),i=null,s=u,o=t.apply(n,r)):i||(i=setTimeout(a,l)),o}},k.debounce=function(t,e,n){var r,i;return function(){var o=this,s=arguments,a=function(){r=null,n||(i=t.apply(o,s))},u=n&&!r;return clearTimeout(r),r=setTimeout(a,e),u&&(i=t.apply(o,s)),i}},k.once=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}},k.wrap=function(t,e){return function(){var n=[t];return s.apply(n,arguments),e.apply(this,n)}},k.compose=function(){var t=arguments;return function(){for(var e=arguments,n=t.length-1;n>=0;n--)e=[t[n].apply(this,e)];return e[0]}},k.after=function(t,e){return 0>=t?e():function(){return--t<1?e.apply(this,arguments):void 0}},k.keys=x||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var e=[];for(var n in t)k.has(t,n)&&(e[e.length]=n);return e},k.values=function(t){var e=[];for(var n in t)k.has(t,n)&&e.push(t[n]);return e},k.pairs=function(t){var e=[];for(var n in t)k.has(t,n)&&e.push([n,t[n]]);return e},k.invert=function(t){var e={};for(var n in t)k.has(t,n)&&(e[t[n]]=n);return e},k.functions=k.methods=function(t){var e=[];for(var n in t)k.isFunction(t[n])&&e.push(n);return e.sort()},k.extend=function(t){return T(a.call(arguments,1),function(e){if(e)for(var n in e)t[n]=e[n]}),t},k.pick=function(t){var e={},n=u.apply(r,a.call(arguments,1));return T(n,function(n){n in t&&(e[n]=t[n])}),e},k.omit=function(t){var e={},n=u.apply(r,a.call(arguments,1));for(var i in t)k.contains(n,i)||(e[i]=t[i]);return e},k.defaults=function(t){return T(a.call(arguments,1),function(e){if(e)for(var n in e)null==t[n]&&(t[n]=e[n])}),t},k.clone=function(t){return k.isObject(t)?k.isArray(t)?t.slice():k.extend({},t):t},k.tap=function(t,e){return e(t),t};var j=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof k&&(t=t._wrapped),e instanceof k&&(e=e._wrapped);var i=l.call(t);if(i!=l.call(e))return!1;switch(i){case"[object String]":return t==String(e);case"[object Number]":return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object RegExp]":return t.source==e.source&&t.global==e.global&&t.multiline==e.multiline&&t.ignoreCase==e.ignoreCase}if("object"!=typeof t||"object"!=typeof e)return!1;for(var o=n.length;o--;)if(n[o]==t)return r[o]==e;n.push(t),r.push(e);var s=0,a=!0;if("[object Array]"==i){if(s=t.length,a=s==e.length)for(;s--&&(a=j(t[s],e[s],n,r)););}else{var u=t.constructor,c=e.constructor;if(u!==c&&!(k.isFunction(u)&&u instanceof u&&k.isFunction(c)&&c instanceof c))return!1;for(var h in t)if(k.has(t,h)&&(s++,!(a=k.has(e,h)&&j(t[h],e[h],n,r))))break;if(a){for(h in e)if(k.has(e,h)&&!s--)break;a=!s}}return n.pop(),r.pop(),a};k.isEqual=function(t,e){return j(t,e,[],[])},k.isEmpty=function(t){if(null==t)return!0;if(k.isArray(t)||k.isString(t))return 0===t.length;for(var e in t)if(k.has(t,e))return!1;return!0},k.isElement=function(t){return!(!t||1!==t.nodeType)},k.isArray=w||function(t){return"[object Array]"==l.call(t)},k.isObject=function(t){return t===Object(t)},T(["Arguments","Function","String","Number","Date","RegExp"],function(t){k["is"+t]=function(e){return l.call(e)=="[object "+t+"]"}}),k.isArguments(arguments)||(k.isArguments=function(t){return!(!t||!k.has(t,"callee"))}),"function"!=typeof/./&&(k.isFunction=function(t){return"function"==typeof t}),k.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},k.isNaN=function(t){return k.isNumber(t)&&t!=+t},k.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"==l.call(t)},k.isNull=function(t){return null===t},k.isUndefined=function(t){return void 0===t},k.has=function(t,e){return c.call(t,e)},k.noConflict=function(){return t._=e,this},k.identity=function(t){return t},k.times=function(t,e,n){for(var r=Array(t),i=0;t>i;i++)r[i]=e.call(n,i);return r},k.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))};var M={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};M.unescape=k.invert(M.escape);var D={escape:new RegExp("["+k.keys(M.escape).join("")+"]","g"),unescape:new RegExp("("+k.keys(M.unescape).join("|")+")","g")};k.each(["escape","unescape"],function(t){k[t]=function(e){return null==e?"":(""+e).replace(D[t],function(e){return M[t][e]})}}),k.result=function(t,e){if(null==t)return null;var n=t[e];return k.isFunction(n)?n.call(t):n},k.mixin=function(t){T(k.functions(t),function(e){var n=k[e]=t[e];k.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),H.call(this,n.apply(k,t))}})};var A=0;k.uniqueId=function(t){var e=++A+"";return t?t+e:e},k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var O=/(.)^/,P={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},L=/\\|'|\r|\n|\t|\u2028|\u2029/g;k.template=function(t,e,n){var r;n=k.defaults({},n,k.templateSettings);var i=new RegExp([(n.escape||O).source,(n.interpolate||O).source,(n.evaluate||O).source].join("|")+"|$","g"),o=0,s="__p+='";t.replace(i,function(e,n,r,i,a){return s+=t.slice(o,a).replace(L,function(t){return"\\"+P[t]}),n&&(s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(s+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(s+="';\n"+i+"\n__p+='"),o=a+e.length,e}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{r=new Function(n.variable||"obj","_",s)}catch(a){throw a.source=s,a}if(e)return r(e,k);var u=function(t){return r.call(this,t,k)};return u.source="function("+(n.variable||"obj")+"){\n"+s+"}",u},k.chain=function(t){return k(t).chain()};var H=function(t){return this._chain?k(t).chain():t};k.mixin(k),T(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=r[t];k.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!=t&&"splice"!=t||0!==n.length||delete n[0],H.call(this,n)}}),T(["concat","join","slice"],function(t){var e=r[t];k.prototype[t]=function(){return H.call(this,e.apply(this._wrapped,arguments))}}),k.extend(k.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),function(){var t,e=this,n=e.Backbone,r=[],i=r.push,o=r.slice,s=r.splice;t="undefined"!=typeof exports?exports:e.Backbone={},t.VERSION="1.0.0";var a=e._;a||"undefined"==typeof require||(a=require("underscore")),t.$=e.jQuery||e.Zepto||e.ender||e.$,t.noConflict=function(){return e.Backbone=n,this},t.emulateHTTP=!1,t.emulateJSON=!1;var u=t.Events={on:function(t,e,n){if(!c(this,"on",t,[e,n])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);return r.push({callback:e,context:n,ctx:n||this}),this},once:function(t,e,n){if(!c(this,"once",t,[e,n])||!e)return this;var r=this,i=a.once(function(){r.off(t,i),e.apply(this,arguments)});return i._callback=e,this.on(t,i,n)},off:function(t,e,n){var r,i,o,s,u,l,h,f;if(!this._events||!c(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(s=t?[t]:a.keys(this._events),u=0,l=s.length;l>u;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(h=0,f=o.length;f>h;h++)i=o[h],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&h(n,e),r&&h(r,arguments),this},stopListening:function(t,e,n){var r=this._listeners;if(!r)return this;var i=!e&&!n;"object"==typeof e&&(n=this),t&&((r={})[t._listenerId]=t);for(var o in r)r[o].off(e,n,this),i&&delete this._listeners[o];return this}},l=/\s+/,c=function(t,e,n,r){if(!n)return!0;if("object"==typeof n){for(var i in n)t[e].apply(t,[i,n[i]].concat(r));return!1}if(l.test(n)){for(var o=n.split(l),s=0,a=o.length;a>s;s++)t[e].apply(t,[o[s]].concat(r));return!1}return!0},h=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],a=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,a);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}},f={listenTo:"on",listenToOnce:"once"};a.each(f,function(t,e){u[e]=function(e,n,r){var i=this._listeners||(this._listeners={}),o=e._listenerId||(e._listenerId=a.uniqueId("l"));return i[o]=e,"object"==typeof n&&(r=this),e[t](n,r,this),this}}),u.bind=u.on,u.unbind=u.off,a.extend(t,u);var p=t.Model=function(t,e){var n,r=t||{};e||(e={}),this.cid=a.uniqueId("c"),this.attributes={},a.extend(this,a.pick(e,d)),e.parse&&(r=this.parse(r,e)||{}),(n=a.result(this,"defaults"))&&(r=a.defaults({},r,n)),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)},d=["url","urlRoot","collection"];a.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return a.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return a.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,n){var r,i,o,s,u,l,c,h;if(null==t)return this;if("object"==typeof t?(i=t,n=e):(i={})[t]=e,n||(n={}),!this._validate(i,n))return!1;o=n.unset,u=n.silent,s=[],l=this._changing,this._changing=!0,l||(this._previousAttributes=a.clone(this.attributes),this.changed={}),h=this.attributes,c=this._previousAttributes,this.idAttribute in i&&(this.id=i[this.idAttribute]);for(r in i)e=i[r],a.isEqual(h[r],e)||s.push(r),a.isEqual(c[r],e)?delete this.changed[r]:this.changed[r]=e,o?delete h[r]:h[r]=e;if(!u){s.length&&(this._pending=!0);for(var f=0,p=s.length;p>f;f++)this.trigger("change:"+s[f],this,h[s[f]],n)}if(l)return this;if(!u)for(;this._pending;)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,a.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,a.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!a.isEmpty(this.changed):a.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?a.clone(this.changed):!1;var e,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in t)a.isEqual(r[i],e=t[i])||((n||(n={}))[i]=e);return n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return a.clone(this._previousAttributes)},fetch:function(t){t=t?a.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,n=t.success;return t.success=function(r){return e.set(e.parse(r,t),t)?(n&&n(e,r,t),e.trigger("sync",e,r,t),void 0):!1},H(this,t),this.sync("read",this,t)},save:function(t,e,n){var r,i,o,s=this.attributes;if(null==t||"object"==typeof t?(r=t,n=e):(r={})[t]=e,!(!r||n&&n.wait||this.set(r,n)))return!1;if(n=a.extend({validate:!0},n),!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=a.extend({},s,r)),void 0===n.parse&&(n.parse=!0);var u=this,l=n.success;return n.success=function(t){u.attributes=s;var e=u.parse(t,n);return n.wait&&(e=a.extend(r||{},e)),a.isObject(e)&&!u.set(e,n)?!1:(l&&l(u,t,n),u.trigger("sync",u,t,n),void 0)},H(this,n),i=this.isNew()?"create":n.patch?"patch":"update","patch"===i&&(n.attrs=r),o=this.sync(i,this,n),r&&n.wait&&(this.attributes=s),o},destroy:function(t){t=t?a.clone(t):{};var e=this,n=t.success,r=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(i){(t.wait||e.isNew())&&r(),n&&n(e,i,t),e.isNew()||e.trigger("sync",e,i,t)},this.isNew())return t.success(),!1;H(this,t);var i=this.sync("delete",this,t);return t.wait||r(),i},url:function(){var t=a.result(this,"urlRoot")||a.result(this.collection,"url")||L();return this.isNew()?t:t+("/"===t.charAt(t.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(t){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(t){return this._validate({},a.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=a.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return n?(this.trigger("invalid",this,n,a.extend(e||{},{validationError:n})),!1):!0}});var m=["keys","values","pairs","invert","pick","omit"];a.each(m,function(t){p.prototype[t]=function(){var e=o.call(arguments);return e.unshift(this.attributes),a[t].apply(a,e)}});var g=t.Collection=function(t,e){e||(e={}),e.url&&(this.url=e.url),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,a.extend({silent:!0},e))},v={add:!0,remove:!0,merge:!0},y={add:!0,merge:!1,remove:!1};a.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return t.sync.apply(this,arguments)},add:function(t,e){return this.set(t,a.defaults(e||{},y))},remove:function(t,e){t=a.isArray(t)?t.slice():[t],e||(e={});var n,r,i,o;for(n=0,r=t.length;r>n;n++)o=this.get(t[n]),o&&(delete this._byId[o.id],delete this._byId[o.cid],i=this.indexOf(o),this.models.splice(i,1),this.length--,e.silent||(e.index=i,o.trigger("remove",o,this,e)),this._removeReference(o));return this},set:function(t,e){e=a.defaults(e||{},v),e.parse&&(t=this.parse(t,e)),a.isArray(t)||(t=t?[t]:[]);var n,r,o,u,l,c=e.at,h=this.comparator&&null==c&&e.sort!==!1,f=a.isString(this.comparator)?this.comparator:null,p=[],d=[],m={};for(n=0,r=t.length;r>n;n++)(o=this._prepareModel(t[n],e))&&((u=this.get(o))?(e.remove&&(m[u.cid]=!0),e.merge&&(u.set(o.attributes,e),h&&!l&&u.hasChanged(f)&&(l=!0))):e.add&&(p.push(o),o.on("all",this._onModelEvent,this),this._byId[o.cid]=o,null!=o.id&&(this._byId[o.id]=o)));if(e.remove){for(n=0,r=this.length;r>n;++n)m[(o=this.models[n]).cid]||d.push(o);d.length&&this.remove(d,e)}if(p.length&&(h&&(l=!0),this.length+=p.length,null!=c?s.apply(this.models,[c,0].concat(p)):i.apply(this.models,p)),l&&this.sort({silent:!0}),e.silent)return this;for(n=0,r=p.length;r>n;n++)(o=p[n]).trigger("add",o,this,e);return l&&this.trigger("sort",this,e),this},reset:function(t,e){e||(e={});for(var n=0,r=this.models.length;r>n;n++)this._removeReference(this.models[n]);return e.previousModels=this.models,this._reset(),this.add(t,a.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),this},push:function(t,e){return t=this._prepareModel(t,e),this.add(t,a.extend({at:this.length},e)),t},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return t=this._prepareModel(t,e),this.add(t,a.extend({at:0},e)),t},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(t,e){return this.models.slice(t,e)},get:function(t){return null==t?void 0:this._byId[null!=t.id?t.id:t.cid||t]},at:function(t){return this.models[t]},where:function(t,e){return a.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var n in t)if(t[n]!==e.get(n))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),a.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(a.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},sortedIndex:function(t,e,n){e||(e=this.comparator);var r=a.isFunction(e)?e:function(t){return t.get(e)};return a.sortedIndex(this.models,t,r,n)},pluck:function(t){return a.invoke(this.models,"get",t)},fetch:function(t){t=t?a.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,n=this;return t.success=function(r){var i=t.reset?"reset":"set";n[i](r,t),e&&e(n,r,t),n.trigger("sync",n,r,t)},H(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?a.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var n=this,r=e.success;return e.success=function(i){e.wait&&n.add(t,e),r&&r(t,i,e)},t.save(null,e),t},parse:function(t){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t.collection||(t.collection=this),t;e||(e={}),e.collection=this;var n=new this.model(t,e);return n._validate(t,e)?n:(this.trigger("invalid",this,t,e),!1)},_removeReference:function(t){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){("add"!==t&&"remove"!==t||n===this)&&("destroy"===t&&this.remove(e,r),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];a.each(b,function(t){g.prototype[t]=function(){var e=o.call(arguments);return e.unshift(this.models),a[t].apply(a,e)}});var w=["groupBy","countBy","sortBy"];a.each(w,function(t){g.prototype[t]=function(e,n){var r=a.isFunction(e)?e:function(t){return t.get(e)};return a[t](this.models,r,n)}});var x=t.View=function(t){this.cid=a.uniqueId("view"),this._configure(t||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},C=/^(\S+)\s*(.*)$/,k=["model","collection","el","id","attributes","className","tagName","events"];a.extend(x.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=a.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(a.isFunction(n)||(n=this[t[e]]),n){var r=e.match(C),i=r[1],o=r[2];n=a.bind(n,this),i+=".delegateEvents"+this.cid,""===o?this.$el.on(i,n):this.$el.on(i,o,n)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(t){this.options&&(t=a.extend({},a.result(this,"options"),t)),a.extend(this,a.pick(t,k)),this.options=t},_ensureElement:function(){if(this.el)this.setElement(a.result(this,"el"),!1);else{var e=a.extend({},a.result(this,"attributes"));this.id&&(e.id=a.result(this,"id")),this.className&&(e["class"]=a.result(this,"className"));var n=t.$("<"+a.result(this,"tagName")+">").attr(e);this.setElement(n,!1)}}}),t.sync=function(e,n,r){var i=T[e];a.defaults(r||(r={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var o={type:i,dataType:"json"};if(r.url||(o.url=a.result(n,"url")||L()),null!=r.data||!n||"create"!==e&&"update"!==e&&"patch"!==e||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||n.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){o.type="POST",r.emulateJSON&&(o.data._method=i);var s=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",i),s?s.apply(this,arguments):void 0}}"GET"===o.type||r.emulateJSON||(o.processData=!1),"PATCH"!==o.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var u=r.xhr=t.ajax(a.extend(o,r));return n.trigger("request",n,u,r),u};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var _=t.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},N=/\((.*?)\)/g,S=/(\(\?)?:\w+/g,$=/\*\w+/g,E=/[\-{}\[\]+?.,\\\^$|#\s]/g;a.extend(_.prototype,u,{initialize:function(){},route:function(e,n,r){a.isRegExp(e)||(e=this._routeToRegExp(e)),a.isFunction(n)&&(r=n,n=""),r||(r=this[n]);var i=this;return t.history.route(e,function(o){var s=i._extractParameters(e,o);r&&r.apply(i,s),i.trigger.apply(i,["route:"+n].concat(s)),i.trigger("route",n,s),t.history.trigger("route",i,n,s)}),this},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=a.result(this,"routes");for(var t,e=a.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(E,"\\$&").replace(N,"(?:$1)?").replace(S,function(t,e){return e?t:"([^/]+)"}).replace($,"(.*?)"),new RegExp("^"+t+"$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return a.map(n,function(t){return t?decodeURIComponent(t):null})}});var j=t.History=function(){this.handlers=[],a.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},M=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,A=/msie [\w.]+/,O=/\/$/;j.started=!1,a.extend(j.prototype,u,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var n=this.root.replace(O,"");t.indexOf(n)||(t=t.substr(n.length))}else t=this.getHash();return t.replace(M,"")},start:function(e){if(j.started)throw new Error("Backbone.history has already been started");j.started=!0,this.options=a.extend({},{root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var n=this.getFragment(),r=document.documentMode,i=A.exec(navigator.userAgent.toLowerCase())&&(!r||7>=r);this.root=("/"+this.root+"/").replace(D,"/"),i&&this._wantsHashChange&&(this.iframe=t.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(n)),this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!i?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=n;var o=this.location,s=o.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!s?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&s&&o.hash&&(this.fragment=this.getHash().replace(M,""),this.history.replaceState({},document.title,this.root+this.fragment+o.search)),this.options.silent?void 0:this.loadUrl())
27
- },stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),j.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(){var t=this.getFragment();return t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment?!1:(this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash()),void 0)},loadUrl:function(t){var e=this.fragment=this.getFragment(t),n=a.any(this.handlers,function(t){return t.route.test(e)?(t.callback(e),!0):void 0});return n},navigate:function(t,e){if(!j.started)return!1;if(e&&e!==!0||(e={trigger:e}),t=this.getFragment(t||""),this.fragment!==t){this.fragment=t;var n=this.root+t;if(this._hasPushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}e.trigger&&this.loadUrl(t)}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),t.history=new j;var P=function(t,e){var n,r=this;n=t&&a.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},a.extend(n,r,e);var i=function(){this.constructor=n};return i.prototype=r.prototype,n.prototype=new i,t&&a.extend(n.prototype,t),n.__super__=r.prototype,n};p.extend=g.extend=_.extend=x.extend=j.extend=P;var L=function(){throw new Error('A "url" property or function must be specified')},H=function(t,e){var n=e.error;e.error=function(r){n&&n(t,r,e),t.trigger("error",t,r,e)}}}.call(this),/* ===================================================
24
+ function(t,e){function n(t,e,n,r){var i,o,s,a,u,l,c,h,f,p;if((e?e.ownerDocument||e:W)!==P&&R(e),e=e||P,n=n||[],!t||"string"!=typeof t)return n;if(1!==(a=e.nodeType)&&9!==a)return[];if(H&&!r){if(i=ke.exec(t))if(s=i[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&I(e,o)&&o.id===s)return n.push(o),n}else{if(i[2])return ie.apply(n,e.getElementsByTagName(t)),n;if((s=i[3])&&S.getElementsByClassName&&e.getElementsByClassName)return ie.apply(n,e.getElementsByClassName(s)),n}if(S.qsa&&(!z||!z.test(t))){if(h=c=B,f=e,p=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(l=m(t),(c=e.getAttribute("id"))?h=c.replace(Ne,"\\$&"):e.setAttribute("id",h),h="[id='"+h+"'] ",u=l.length;u--;)l[u]=h+g(l[u]);f=ve.test(t)&&e.parentNode||e,p=l.join(",")}if(p)try{return ie.apply(n,f.querySelectorAll(p)),n}catch(d){}finally{c||e.removeAttribute("id")}}}return T(t.replace(de,"$1"),e,n,r)}function r(t){return Ce.test(t+"")}function i(){function t(n,r){return e.push(n+=" ")>E.cacheLength&&delete t[e.shift()],t[n]=r}var e=[];return t}function o(t){return t[B]=!0,t}function s(t){var e=P.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function a(t,e,n){t=t.split("|");for(var r,i=t.length,o=n?null:e;i--;)(r=E.attrHandle[t[i]])&&r!==e||(E.attrHandle[t[i]]=o)}function u(t,e){var n=t.getAttributeNode(e);return n&&n.specified?n.value:t[e]===!0?e.toLowerCase():null}function l(t,e){return t.getAttribute(e,"type"===e.toLowerCase()?1:2)}function c(t){return"input"===t.nodeName.toLowerCase()?t.defaultValue:void 0}function h(t,e){var n=e&&t,r=n&&1===t.nodeType&&1===e.nodeType&&(~e.sourceIndex||Z)-(~t.sourceIndex||Z);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function f(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function p(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function d(t){return o(function(e){return e=+e,o(function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function m(t,e){var r,i,o,s,a,u,l,c=X[t+" "];if(c)return e?0:c.slice(0);for(a=t,u=[],l=E.preFilter;a;){(!r||(i=me.exec(a)))&&(i&&(a=a.slice(i[0].length)||a),u.push(o=[])),r=!1,(i=ge.exec(a))&&(r=i.shift(),o.push({value:r,type:i[0].replace(de," ")}),a=a.slice(r.length));for(s in E.filter)!(i=xe[s].exec(a))||l[s]&&!(i=l[s](i))||(r=i.shift(),o.push({value:r,type:s,matches:i}),a=a.slice(r.length));if(!r)break}return e?a.length:a?n.error(t):X(t,u).slice(0)}function g(t){for(var e=0,n=t.length,r="";n>e;e++)r+=t[e].value;return r}function v(t,e,n){var r=e.dir,i=n&&"parentNode"===r,o=J++;return e.first?function(e,n,o){for(;e=e[r];)if(1===e.nodeType||i)return t(e,n,o)}:function(e,n,s){var a,u,l,c=U+" "+o;if(s){for(;e=e[r];)if((1===e.nodeType||i)&&t(e,n,s))return!0}else for(;e=e[r];)if(1===e.nodeType||i)if(l=e[B]||(e[B]={}),(u=l[r])&&u[0]===c){if((a=u[1])===!0||a===$)return a===!0}else if(u=l[r]=[c],u[1]=t(e,n,s)||$,u[1]===!0)return!0}}function y(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function b(t,e,n,r,i){for(var o,s=[],a=0,u=t.length,l=null!=e;u>a;a++)(o=t[a])&&(!n||n(o,r,i))&&(s.push(o),l&&e.push(a));return s}function w(t,e,n,r,i,s){return r&&!r[B]&&(r=w(r)),i&&!i[B]&&(i=w(i,s)),o(function(o,s,a,u){var l,c,h,f=[],p=[],d=s.length,m=o||k(e||"*",a.nodeType?[a]:a,[]),g=!t||!o&&e?m:b(m,f,t,a,u),v=n?i||(o?t:d||r)?[]:s:g;if(n&&n(g,v,a,u),r)for(l=b(v,p),r(l,[],a,u),c=l.length;c--;)(h=l[c])&&(v[p[c]]=!(g[p[c]]=h));if(o){if(i||t){if(i){for(l=[],c=v.length;c--;)(h=v[c])&&l.push(g[c]=h);i(null,v=[],l,u)}for(c=v.length;c--;)(h=v[c])&&(l=i?ae.call(o,h):f[c])>-1&&(o[l]=!(s[l]=h))}}else v=b(v===s?v.splice(d,v.length):v),i?i(null,s,v,u):ie.apply(s,v)})}function x(t){for(var e,n,r,i=t.length,o=E.relative[t[0].type],s=o||E.relative[" "],a=o?1:0,u=v(function(t){return t===e},s,!0),l=v(function(t){return ae.call(e,t)>-1},s,!0),c=[function(t,n,r){return!o&&(r||n!==A)||((e=n).nodeType?u(t,n,r):l(t,n,r))}];i>a;a++)if(n=E.relative[t[a].type])c=[v(y(c),n)];else{if(n=E.filter[t[a].type].apply(null,t[a].matches),n[B]){for(r=++a;i>r&&!E.relative[t[r].type];r++);return w(a>1&&y(c),a>1&&g(t.slice(0,a-1).concat({value:" "===t[a-2].type?"*":""})).replace(de,"$1"),n,r>a&&x(t.slice(a,r)),i>r&&x(t=t.slice(r)),i>r&&g(t))}c.push(n)}return y(c)}function C(t,e){var r=0,i=e.length>0,s=t.length>0,a=function(o,a,u,l,c){var h,f,p,d=[],m=0,g="0",v=o&&[],y=null!=c,w=A,x=o||s&&E.find.TAG("*",c&&a.parentNode||a),C=U+=null==w?1:Math.random()||.1;for(y&&(A=a!==P&&a,$=r);null!=(h=x[g]);g++){if(s&&h){for(f=0;p=t[f++];)if(p(h,a,u)){l.push(h);break}y&&(U=C,$=++r)}i&&((h=!p&&h)&&m--,o&&v.push(h))}if(m+=g,i&&g!==m){for(f=0;p=e[f++];)p(v,d,a,u);if(o){if(m>0)for(;g--;)v[g]||d[g]||(d[g]=ne.call(l));d=b(d)}ie.apply(l,d),y&&!o&&d.length>0&&m+e.length>1&&n.uniqueSort(l)}return y&&(U=C,A=w),v};return i?o(a):a}function k(t,e,r){for(var i=0,o=e.length;o>i;i++)n(t,e[i],r);return r}function T(t,e,n,r){var i,o,s,a,u,l=m(t);if(!r&&1===l.length){if(o=l[0]=l[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&S.getById&&9===e.nodeType&&H&&E.relative[o[1].type]){if(e=(E.find.ID(s.matches[0].replace(Se,$e),e)||[])[0],!e)return n;t=t.slice(o.shift().value.length)}for(i=xe.needsContext.test(t)?0:o.length;i--&&(s=o[i],!E.relative[a=s.type]);)if((u=E.find[a])&&(r=u(s.matches[0].replace(Se,$e),ve.test(o[0].type)&&e.parentNode||e))){if(o.splice(i,1),t=r.length&&g(o),!t)return ie.apply(n,r),n;break}}return D(t,l)(r,e,!H,n,ve.test(t)),n}function _(){}var N,S,$,E,j,M,D,A,O,R,P,L,H,z,q,F,I,B="sizzle"+-new Date,W=t.document,U=0,J=0,V=i(),X=i(),G=i(),Y=!1,Q=function(){return 0},K=typeof e,Z=1<<31,te={}.hasOwnProperty,ee=[],ne=ee.pop,re=ee.push,ie=ee.push,se=ee.slice,ae=ee.indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]===t)return e;return-1},ue="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",le="[\\x20\\t\\r\\n\\f]",ce="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",he=ce.replace("w","w#"),fe="\\["+le+"*("+ce+")"+le+"*(?:([*^$|!~]?=)"+le+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+he+")|)|)"+le+"*\\]",pe=":("+ce+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+fe.replace(3,8)+")*)|.*)\\)|)",de=new RegExp("^"+le+"+|((?:^|[^\\\\])(?:\\\\.)*)"+le+"+$","g"),me=new RegExp("^"+le+"*,"+le+"*"),ge=new RegExp("^"+le+"*([>+~]|"+le+")"+le+"*"),ve=new RegExp(le+"*[+~]"),ye=new RegExp("="+le+"*([^\\]'\"]*)"+le+"*\\]","g"),be=new RegExp(pe),we=new RegExp("^"+he+"$"),xe={ID:new RegExp("^#("+ce+")"),CLASS:new RegExp("^\\.("+ce+")"),TAG:new RegExp("^("+ce.replace("w","w*")+")"),ATTR:new RegExp("^"+fe),PSEUDO:new RegExp("^"+pe),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+le+"*(even|odd|(([+-]|)(\\d*)n|)"+le+"*(?:([+-]|)"+le+"*(\\d+)|))"+le+"*\\)|)","i"),bool:new RegExp("^(?:"+ue+")$","i"),needsContext:new RegExp("^"+le+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+le+"*((?:-\\d)?\\d*)"+le+"*\\)|)(?=[^-]|$)","i")},Ce=/^[^{]+\{\s*\[native \w/,ke=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,Te=/^(?:input|select|textarea|button)$/i,_e=/^h\d$/i,Ne=/'|\\/g,Se=new RegExp("\\\\([\\da-f]{1,6}"+le+"?|("+le+")|.)","ig"),$e=function(t,e,n){var r="0x"+e-65536;return r!==r||n?e:0>r?String.fromCharCode(r+65536):String.fromCharCode(55296|r>>10,56320|1023&r)};try{ie.apply(ee=se.call(W.childNodes),W.childNodes),ee[W.childNodes.length].nodeType}catch(Ee){ie={apply:ee.length?function(t,e){re.apply(t,se.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}M=n.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},S=n.support={},R=n.setDocument=function(t){var e=t?t.ownerDocument||t:W,n=e.parentWindow;return e!==P&&9===e.nodeType&&e.documentElement?(P=e,L=e.documentElement,H=!M(e),n&&n.frameElement&&n.attachEvent("onbeforeunload",function(){R()}),S.attributes=s(function(t){return t.innerHTML="<a href='#'></a>",a("type|href|height|width",l,"#"===t.firstChild.getAttribute("href")),a(ue,u,null==t.getAttribute("disabled")),t.className="i",!t.getAttribute("className")}),S.input=s(function(t){return t.innerHTML="<input>",t.firstChild.setAttribute("value",""),""===t.firstChild.getAttribute("value")}),a("value",c,S.attributes&&S.input),S.getElementsByTagName=s(function(t){return t.appendChild(e.createComment("")),!t.getElementsByTagName("*").length}),S.getElementsByClassName=s(function(t){return t.innerHTML="<div class='a'></div><div class='a i'></div>",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),S.getById=s(function(t){return L.appendChild(t).id=B,!e.getElementsByName||!e.getElementsByName(B).length}),S.getById?(E.find.ID=function(t,e){if(typeof e.getElementById!==K&&H){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},E.filter.ID=function(t){var e=t.replace(Se,$e);return function(t){return t.getAttribute("id")===e}}):(delete E.find.ID,E.filter.ID=function(t){var e=t.replace(Se,$e);return function(t){var n=typeof t.getAttributeNode!==K&&t.getAttributeNode("id");return n&&n.value===e}}),E.find.TAG=S.getElementsByTagName?function(t,e){return typeof e.getElementsByTagName!==K?e.getElementsByTagName(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},E.find.CLASS=S.getElementsByClassName&&function(t,e){return typeof e.getElementsByClassName!==K&&H?e.getElementsByClassName(t):void 0},q=[],z=[],(S.qsa=r(e.querySelectorAll))&&(s(function(t){t.innerHTML="<select><option selected=''></option></select>",t.querySelectorAll("[selected]").length||z.push("\\["+le+"*(?:value|"+ue+")"),t.querySelectorAll(":checked").length||z.push(":checked")}),s(function(t){var n=e.createElement("input");n.setAttribute("type","hidden"),t.appendChild(n).setAttribute("t",""),t.querySelectorAll("[t^='']").length&&z.push("[*^$]="+le+"*(?:''|\"\")"),t.querySelectorAll(":enabled").length||z.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),z.push(",.*:")})),(S.matchesSelector=r(F=L.webkitMatchesSelector||L.mozMatchesSelector||L.oMatchesSelector||L.msMatchesSelector))&&s(function(t){S.disconnectedMatch=F.call(t,"div"),F.call(t,"[s!='']:x"),q.push("!=",pe)}),z=z.length&&new RegExp(z.join("|")),q=q.length&&new RegExp(q.join("|")),I=r(L.contains)||L.compareDocumentPosition?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},S.sortDetached=s(function(t){return 1&t.compareDocumentPosition(e.createElement("div"))}),Q=L.compareDocumentPosition?function(t,n){if(t===n)return Y=!0,0;var r=n.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(n);return r?1&r||!S.sortDetached&&n.compareDocumentPosition(t)===r?t===e||I(W,t)?-1:n===e||I(W,n)?1:O?ae.call(O,t)-ae.call(O,n):0:4&r?-1:1:t.compareDocumentPosition?-1:1}:function(t,n){var r,i=0,o=t.parentNode,s=n.parentNode,a=[t],u=[n];if(t===n)return Y=!0,0;if(!o||!s)return t===e?-1:n===e?1:o?-1:s?1:O?ae.call(O,t)-ae.call(O,n):0;if(o===s)return h(t,n);for(r=t;r=r.parentNode;)a.unshift(r);for(r=n;r=r.parentNode;)u.unshift(r);for(;a[i]===u[i];)i++;return i?h(a[i],u[i]):a[i]===W?-1:u[i]===W?1:0},e):P},n.matches=function(t,e){return n(t,null,null,e)},n.matchesSelector=function(t,e){if((t.ownerDocument||t)!==P&&R(t),e=e.replace(ye,"='$1']"),!(!S.matchesSelector||!H||q&&q.test(e)||z&&z.test(e)))try{var r=F.call(t,e);if(r||S.disconnectedMatch||t.document&&11!==t.document.nodeType)return r}catch(i){}return n(e,P,null,[t]).length>0},n.contains=function(t,e){return(t.ownerDocument||t)!==P&&R(t),I(t,e)},n.attr=function(t,n){(t.ownerDocument||t)!==P&&R(t);var r=E.attrHandle[n.toLowerCase()],i=r&&te.call(E.attrHandle,n.toLowerCase())?r(t,n,!H):e;return i===e?S.attributes||!H?t.getAttribute(n):(i=t.getAttributeNode(n))&&i.specified?i.value:null:i},n.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},n.uniqueSort=function(t){var e,n=[],r=0,i=0;if(Y=!S.detectDuplicates,O=!S.sortStable&&t.slice(0),t.sort(Q),Y){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return t},j=n.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=j(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r];r++)n+=j(e);return n},E=n.selectors={cacheLength:50,createPseudo:o,match:xe,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Se,$e),t[3]=(t[4]||t[5]||"").replace(Se,$e),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||n.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&n.error(t[0]),t},PSEUDO:function(t){var n,r=!t[5]&&t[2];return xe.CHILD.test(t[0])?null:(t[3]&&t[4]!==e?t[2]=t[4]:r&&be.test(r)&&(n=m(r,!0))&&(n=r.indexOf(")",r.length-n)-r.length)&&(t[0]=t[0].slice(0,n),t[2]=r.slice(0,n)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Se,$e).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=V[t+" "];return e||(e=new RegExp("(^|"+le+")"+t+"("+le+"|$)"))&&V(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==K&&t.getAttribute("class")||"")})},ATTR:function(t,e,r){return function(i){var o=n.attr(i,t);return null==o?"!="===e:e?(o+="","="===e?o===r:"!="===e?o!==r:"^="===e?r&&0===o.indexOf(r):"*="===e?r&&o.indexOf(r)>-1:"$="===e?r&&o.slice(-r.length)===r:"~="===e?(" "+o+" ").indexOf(r)>-1:"|="===e?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var l,c,h,f,p,d,m=o!==s?"nextSibling":"previousSibling",g=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!u&&!a;if(g){if(o){for(;m;){for(h=e;h=h[m];)if(a?h.nodeName.toLowerCase()===v:1===h.nodeType)return!1;d=m="only"===t&&!d&&"nextSibling"}return!0}if(d=[s?g.firstChild:g.lastChild],s&&y){for(c=g[B]||(g[B]={}),l=c[t]||[],p=l[0]===U&&l[1],f=l[0]===U&&l[2],h=p&&g.childNodes[p];h=++p&&h&&h[m]||(f=p=0)||d.pop();)if(1===h.nodeType&&++f&&h===e){c[t]=[U,p,f];break}}else if(y&&(l=(e[B]||(e[B]={}))[t])&&l[0]===U)f=l[1];else for(;(h=++p&&h&&h[m]||(f=p=0)||d.pop())&&((a?h.nodeName.toLowerCase()!==v:1!==h.nodeType)||!++f||(y&&((h[B]||(h[B]={}))[t]=[U,f]),h!==e)););return f-=i,f===r||0===f%r&&f/r>=0}}},PSEUDO:function(t,e){var r,i=E.pseudos[t]||E.setFilters[t.toLowerCase()]||n.error("unsupported pseudo: "+t);return i[B]?i(e):i.length>1?(r=[t,t,"",e],E.setFilters.hasOwnProperty(t.toLowerCase())?o(function(t,n){for(var r,o=i(t,e),s=o.length;s--;)r=ae.call(t,o[s]),t[r]=!(n[r]=o[s])}):function(t){return i(t,0,r)}):i}},pseudos:{not:o(function(t){var e=[],n=[],r=D(t.replace(de,"$1"));return r[B]?o(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),!n.pop()}}),has:o(function(t){return function(e){return n(t,e).length>0}}),contains:o(function(t){return function(e){return(e.textContent||e.innerText||j(e)).indexOf(t)>-1}}),lang:o(function(t){return we.test(t||"")||n.error("unsupported lang: "+t),t=t.replace(Se,$e).toLowerCase(),function(e){var n;do if(n=H?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===L},focus:function(t){return t===P.activeElement&&(!P.hasFocus||P.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!E.pseudos.empty(t)},header:function(t){return _e.test(t.nodeName)},input:function(t){return Te.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:d(function(){return[0]}),last:d(function(t,e){return[e-1]}),eq:d(function(t,e,n){return[0>n?n+e:n]}),even:d(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:d(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t}),lt:d(function(t,e,n){for(var r=0>n?n+e:n;--r>=0;)t.push(r);return t}),gt:d(function(t,e,n){for(var r=0>n?n+e:n;++r<e;)t.push(r);return t})}};for(N in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})E.pseudos[N]=f(N);for(N in{submit:!0,reset:!0})E.pseudos[N]=p(N);D=n.compile=function(t,e){var n,r=[],i=[],o=G[t+" "];if(!o){for(e||(e=m(t)),n=e.length;n--;)o=x(e[n]),o[B]?r.push(o):i.push(o);o=G(t,C(i,r))}return o},E.pseudos.nth=E.pseudos.eq,_.prototype=E.filters=E.pseudos,E.setFilters=new _,S.sortStable=B.split("").sort(Q).join("")===B,R(),[0,0].sort(Q),S.detectDuplicates=Y,oe.find=n,oe.expr=n.selectors,oe.expr[":"]=oe.expr.pseudos,oe.unique=n.uniqueSort,oe.text=n.getText,oe.isXMLDoc=n.isXML,oe.contains=n.contains}(t);var de={};oe.Callbacks=function(t){t="string"==typeof t?de[t]||r(t):oe.extend({},t);var n,i,o,s,a,u,l=[],c=!t.once&&[],h=function(e){for(n=t.memory&&e,i=!0,u=s||0,s=0,a=l.length,o=!0;l&&a>u;u++)if(l[u].apply(e[0],e[1])===!1&&t.stopOnFalse){n=!1;break}o=!1,l&&(c?c.length&&h(c.shift()):n?l=[]:f.disable())},f={add:function(){if(l){var e=l.length;!function r(e){oe.each(e,function(e,n){var i=oe.type(n);"function"===i?t.unique&&f.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})}(arguments),o?a=l.length:n&&(s=e,h(n))}return this},remove:function(){return l&&oe.each(arguments,function(t,e){for(var n;(n=oe.inArray(e,l,n))>-1;)l.splice(n,1),o&&(a>=n&&a--,u>=n&&u--)}),this},has:function(t){return t?oe.inArray(t,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=n=e,this},disabled:function(){return!l},lock:function(){return c=e,n||f.disable(),this},locked:function(){return!c},fireWith:function(t,e){return e=e||[],e=[t,e.slice?e.slice():e],!l||i&&!c||(o?c.push(e):h(e)),this},fire:function(){return f.fireWith(this,arguments),this},fired:function(){return!!i}};return f},oe.extend({Deferred:function(t){var e=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return oe.Deferred(function(n){oe.each(e,function(e,o){var s=o[0],a=oe.isFunction(t[e])&&t[e];i[o[1]](function(){var t=a&&a.apply(this,arguments);t&&oe.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?oe.extend(t,r):r}},i={};return r.pipe=r.then,oe.each(e,function(t,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=te.call(arguments),s=o.length,a=1!==s||t&&oe.isFunction(t.promise)?s:0,u=1===a?t:oe.Deferred(),l=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?te.call(arguments):i,r===e?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(e=new Array(s),n=new Array(s),r=new Array(s);s>i;i++)o[i]&&oe.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,e)):--a;return a||u.resolveWith(r,o),u.promise()}}),oe.support=function(e){var n=U.createElement("input"),r=U.createDocumentFragment(),i=U.createElement("div"),o=U.createElement("select"),s=o.appendChild(U.createElement("option"));return n.type?(n.type="checkbox",e.checkOn=""!==n.value,e.optSelected=s.selected,e.reliableMarginRight=!0,e.boxSizingReliable=!0,e.pixelPosition=!1,n.checked=!0,e.noCloneChecked=n.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!s.disabled,n=U.createElement("input"),n.value="t",n.type="radio",e.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),e.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,e.focusinBubbles="onfocusin"in t,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===i.style.backgroundClip,oe(function(){var n,r,o="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",s=U.getElementsByTagName("body")[0];s&&(n=U.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",oe.swap(s,null!=s.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===i.offsetWidth}),t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(i,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(U.createElement("div")),r.style.cssText=i.style.cssText=o,r.style.marginRight=r.style.width="0",i.style.width="1px",e.reliableMarginRight=!parseFloat((t.getComputedStyle(r,null)||{}).marginRight)),s.removeChild(n))}),e):e}({});var me,ge,ve=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,ye=/([A-Z])/g;i.uid=1,i.accepts=function(t){return t.nodeType?1===t.nodeType||9===t.nodeType:!0},i.prototype={key:function(t){if(!i.accepts(t))return 0;var e={},n=t[this.expando];if(!n){n=i.uid++;try{e[this.expando]={value:n},Object.defineProperties(t,e)}catch(r){e[this.expando]=n,oe.extend(t,e)}}return this.cache[n]||(this.cache[n]={}),n},set:function(t,e,n){var r,i=this.key(t),o=this.cache[i];if("string"==typeof e)o[e]=n;else if(oe.isEmptyObject(o))oe.extend(this.cache[i],e);else for(r in e)o[r]=e[r];return o},get:function(t,n){var r=this.cache[this.key(t)];return n===e?r:r[n]},access:function(t,n,r){return n===e||n&&"string"==typeof n&&r===e?this.get(t,n):(this.set(t,n,r),r!==e?r:n)},remove:function(t,n){var r,i,o,s=this.key(t),a=this.cache[s];if(n===e)this.cache[s]={};else{oe.isArray(n)?i=n.concat(n.map(oe.camelCase)):(o=oe.camelCase(n),n in a?i=[n,o]:(i=o,i=i in a?[i]:i.match(ae)||[])),r=i.length;for(;r--;)delete a[i[r]]}},hasData:function(t){return!oe.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){t[this.expando]&&delete this.cache[t[this.expando]]}},me=new i,ge=new i,oe.extend({acceptData:i.accepts,hasData:function(t){return me.hasData(t)||ge.hasData(t)},data:function(t,e,n){return me.access(t,e,n)},removeData:function(t,e){me.remove(t,e)},_data:function(t,e,n){return ge.access(t,e,n)},_removeData:function(t,e){ge.remove(t,e)}}),oe.fn.extend({data:function(t,n){var r,i,s=this[0],a=0,u=null;if(t===e){if(this.length&&(u=me.get(s),1===s.nodeType&&!ge.get(s,"hasDataAttrs"))){for(r=s.attributes;a<r.length;a++)i=r[a].name,0===i.indexOf("data-")&&(i=oe.camelCase(i.slice(5)),o(s,i,u[i]));ge.set(s,"hasDataAttrs",!0)}return u}return"object"==typeof t?this.each(function(){me.set(this,t)}):oe.access(this,function(n){var r,i=oe.camelCase(t);if(s&&n===e){if(r=me.get(s,t),r!==e)return r;if(r=me.get(s,i),r!==e)return r;if(r=o(s,i,e),r!==e)return r}else this.each(function(){var r=me.get(this,i);me.set(this,i,n),-1!==t.indexOf("-")&&r!==e&&me.set(this,t,n)})},null,n,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){me.remove(this,t)})}}),oe.extend({queue:function(t,e,n){var r;return t?(e=(e||"fx")+"queue",r=ge.get(t,e),n&&(!r||oe.isArray(n)?r=ge.access(t,e,oe.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=oe.queue(t,e),r=n.length,i=n.shift(),o=oe._queueHooks(t,e),s=function(){oe.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return ge.get(t,n)||ge.access(t,n,{empty:oe.Callbacks("once memory").add(function(){ge.remove(t,[e+"queue",n])})})}}),oe.fn.extend({queue:function(t,n){var r=2;return"string"!=typeof t&&(n=t,t="fx",r--),arguments.length<r?oe.queue(this[0],t):n===e?this:this.each(function(){var e=oe.queue(this,t,n);oe._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&oe.dequeue(this,t)})},dequeue:function(t){return this.each(function(){oe.dequeue(this,t)})},delay:function(t,e){return t=oe.fx?oe.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var r=setTimeout(e,t);n.stop=function(){clearTimeout(r)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,n){var r,i=1,o=oe.Deferred(),s=this,a=this.length,u=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof t&&(n=t,t=e),t=t||"fx";a--;)r=ge.get(s[a],t+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var be,we,xe=/[\t\r\n\f]/g,Ce=/\r/g,ke=/^(?:input|select|textarea|button)$/i;oe.fn.extend({attr:function(t,e){return oe.access(this,oe.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){oe.removeAttr(this,t)})},prop:function(t,e){return oe.access(this,oe.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[oe.propFix[t]||t]})},addClass:function(t){var e,n,r,i,o,s=0,a=this.length,u="string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).addClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(ae)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(xe," "):" ")){for(o=0;i=e[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=oe.trim(r)}return this},removeClass:function(t){var e,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).removeClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(ae)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(xe," "):"")){for(o=0;i=e[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=t?oe.trim(r):""}return this},toggleClass:function(t,e){var n=typeof t,r="boolean"==typeof e;return oe.isFunction(t)?this.each(function(n){oe(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var i,o=0,s=oe(this),a=e,u=t.match(ae)||[];i=u[o++];)a=r?a:!s.hasClass(i),s[a?"addClass":"removeClass"](i);else(n===B||"boolean"===n)&&(this.className&&ge.set(this,"__className__",this.className),this.className=this.className||t===!1?"":ge.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(xe," ").indexOf(e)>=0)return!0;return!1},val:function(t){var n,r,i,o=this[0];{if(arguments.length)return i=oe.isFunction(t),this.each(function(r){var o;1===this.nodeType&&(o=i?t.call(this,r,oe(this).val()):t,null==o?o="":"number"==typeof o?o+="":oe.isArray(o)&&(o=oe.map(o,function(t){return null==t?"":t+""})),n=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==e||(this.value=o))});if(o)return n=oe.valHooks[o.type]||oe.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==e?r:(r=o.value,"string"==typeof r?r.replace(Ce,""):null==r?"":r)}}}),oe.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(oe.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&oe.nodeName(n.parentNode,"optgroup"))){if(e=oe(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=oe.makeArray(e),s=i.length;s--;)r=i[s],(r.selected=oe.inArray(oe(r).val(),o)>=0)&&(n=!0);return n||(t.selectedIndex=-1),o}}},attr:function(t,n,r){var i,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return typeof t.getAttribute===B?oe.prop(t,n,r):(1===s&&oe.isXMLDoc(t)||(n=n.toLowerCase(),i=oe.attrHooks[n]||(oe.expr.match.bool.test(n)?we:be)),r===e?i&&"get"in i&&null!==(o=i.get(t,n))?o:(o=oe.find.attr(t,n),null==o?e:o):null!==r?i&&"set"in i&&(o=i.set(t,r,n))!==e?o:(t.setAttribute(n,r+""),r):(oe.removeAttr(t,n),void 0))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(ae);if(o&&1===t.nodeType)for(;n=o[i++];)r=oe.propFix[n]||n,oe.expr.match.bool.test(n)&&(t[r]=!1),t.removeAttribute(n)},attrHooks:{type:{set:function(t,e){if(!oe.support.radioValue&&"radio"===e&&oe.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(t,n,r){var i,o,s,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return s=1!==a||!oe.isXMLDoc(t),s&&(n=oe.propFix[n]||n,o=oe.propHooks[n]),r!==e?o&&"set"in o&&(i=o.set(t,r,n))!==e?i:t[n]=r:o&&"get"in o&&null!==(i=o.get(t,n))?i:t[n]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||ke.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),we={set:function(t,e,n){return e===!1?oe.removeAttr(t,n):t.setAttribute(n,n),n}},oe.each(oe.expr.match.bool.source.match(/\w+/g),function(t,n){var r=oe.expr.attrHandle[n]||oe.find.attr;oe.expr.attrHandle[n]=function(t,n,i){var o=oe.expr.attrHandle[n],s=i?e:(oe.expr.attrHandle[n]=e)!=r(t,n,i)?n.toLowerCase():null;return oe.expr.attrHandle[n]=o,s}}),oe.support.optSelected||(oe.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this}),oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(t,e){return oe.isArray(e)?t.checked=oe.inArray(oe(t).val(),e)>=0:void 0}},oe.support.checkOn||(oe.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Te=/^key/,_e=/^(?:mouse|contextmenu)|click/,Ne=/^(?:focusinfocus|focusoutblur)$/,Se=/^([^.]*)(?:\.(.+)|)$/;oe.event={global:{},add:function(t,n,r,i,o){var s,a,u,l,c,h,f,p,d,m,g,v=ge.get(t);if(v){for(r.handler&&(s=r,r=s.handler,o=s.selector),r.guid||(r.guid=oe.guid++),(l=v.events)||(l=v.events={}),(a=v.handle)||(a=v.handle=function(t){return typeof oe===B||t&&oe.event.triggered===t.type?e:oe.event.dispatch.apply(a.elem,arguments)},a.elem=t),n=(n||"").match(ae)||[""],c=n.length;c--;)u=Se.exec(n[c])||[],d=g=u[1],m=(u[2]||"").split(".").sort(),d&&(f=oe.event.special[d]||{},d=(o?f.delegateType:f.bindType)||d,f=oe.event.special[d]||{},h=oe.extend({type:d,origType:g,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&oe.expr.match.needsContext.test(o),namespace:m.join(".")},s),(p=l[d])||(p=l[d]=[],p.delegateCount=0,f.setup&&f.setup.call(t,i,m,a)!==!1||t.addEventListener&&t.addEventListener(d,a,!1)),f.add&&(f.add.call(t,h),h.handler.guid||(h.handler.guid=r.guid)),o?p.splice(p.delegateCount++,0,h):p.push(h),oe.event.global[d]=!0);t=null}},remove:function(t,e,n,r,i){var o,s,a,u,l,c,h,f,p,d,m,g=ge.hasData(t)&&ge.get(t);if(g&&(u=g.events)){for(e=(e||"").match(ae)||[""],l=e.length;l--;)if(a=Se.exec(e[l])||[],p=m=a[1],d=(a[2]||"").split(".").sort(),p){for(h=oe.event.special[p]||{},p=(r?h.delegateType:h.bindType)||p,f=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=f.length;o--;)c=f[o],!i&&m!==c.origType||n&&n.guid!==c.guid||a&&!a.test(c.namespace)||r&&r!==c.selector&&("**"!==r||!c.selector)||(f.splice(o,1),c.selector&&f.delegateCount--,h.remove&&h.remove.call(t,c));s&&!f.length&&(h.teardown&&h.teardown.call(t,d,g.handle)!==!1||oe.removeEvent(t,p,g.handle),delete u[p])
25
+ }else for(p in u)oe.event.remove(t,p+e[l],n,r,!0);oe.isEmptyObject(u)&&(delete g.handle,ge.remove(t,"events"))}},trigger:function(n,r,i,o){var s,a,u,l,c,h,f,p=[i||U],d=re.call(n,"type")?n.type:n,m=re.call(n,"namespace")?n.namespace.split("."):[];if(a=u=i=i||U,3!==i.nodeType&&8!==i.nodeType&&!Ne.test(d+oe.event.triggered)&&(d.indexOf(".")>=0&&(m=d.split("."),d=m.shift(),m.sort()),c=d.indexOf(":")<0&&"on"+d,n=n[oe.expando]?n:new oe.Event(d,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=m.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+m.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=e,n.target||(n.target=i),r=null==r?[n]:oe.makeArray(r,[n]),f=oe.event.special[d]||{},o||!f.trigger||f.trigger.apply(i,r)!==!1)){if(!o&&!f.noBubble&&!oe.isWindow(i)){for(l=f.delegateType||d,Ne.test(l+d)||(a=a.parentNode);a;a=a.parentNode)p.push(a),u=a;u===(i.ownerDocument||U)&&p.push(u.defaultView||u.parentWindow||t)}for(s=0;(a=p[s++])&&!n.isPropagationStopped();)n.type=s>1?l:f.bindType||d,h=(ge.get(a,"events")||{})[n.type]&&ge.get(a,"handle"),h&&h.apply(a,r),h=c&&a[c],h&&oe.acceptData(a)&&h.apply&&h.apply(a,r)===!1&&n.preventDefault();return n.type=d,o||n.isDefaultPrevented()||f._default&&f._default.apply(p.pop(),r)!==!1||!oe.acceptData(i)||c&&oe.isFunction(i[d])&&!oe.isWindow(i)&&(u=i[c],u&&(i[c]=null),oe.event.triggered=d,i[d](),oe.event.triggered=e,u&&(i[c]=u)),n.result}},dispatch:function(t){t=oe.event.fix(t);var n,r,i,o,s,a=[],u=te.call(arguments),l=(ge.get(this,"events")||{})[t.type]||[],c=oe.event.special[t.type]||{};if(u[0]=t,t.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,t)!==!1){for(a=oe.event.handlers.call(this,t,l),n=0;(o=a[n++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,i=((oe.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,u),i!==e&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,t),t.result}},handlers:function(t,n){var r,i,o,s,a=[],u=n.delegateCount,l=t.target;if(u&&l.nodeType&&(!t.button||"click"!==t.type))for(;l!==this;l=l.parentNode||this)if(l.disabled!==!0||"click"!==t.type){for(i=[],r=0;u>r;r++)s=n[r],o=s.selector+" ",i[o]===e&&(i[o]=s.needsContext?oe(o,this).index(l)>=0:oe.find(o,this,null,[l]).length),i[o]&&i.push(s);i.length&&a.push({elem:l,handlers:i})}return u<n.length&&a.push({elem:this,handlers:n.slice(u)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,n){var r,i,o,s=n.button;return null==t.pageX&&null!=n.clientX&&(r=t.target.ownerDocument||U,i=r.documentElement,o=r.body,t.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),t.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),t.which||s===e||(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[oe.expando])return t;var e,n,r,i=t.type,o=t,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=_e.test(i)?this.mouseHooks:Te.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,t=new oe.Event(o),e=r.length;e--;)n=r[e],t[n]=o[n];return t.target||(t.target=U),3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==u()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===u()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&oe.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return oe.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==e&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,r){var i=oe.extend(new oe.Event,n,{type:t,isSimulated:!0,originalEvent:{}});r?oe.event.trigger(i,null,e):oe.event.dispatch.call(e,i),i.isDefaultPrevented()&&n.preventDefault()}},oe.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)},oe.Event=function(t,e){return this instanceof oe.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.getPreventDefault&&t.getPreventDefault()?s:a):this.type=t,e&&oe.extend(this,e),this.timeStamp=t&&t.timeStamp||oe.now(),this[oe.expando]=!0,void 0):new oe.Event(t,e)},oe.Event.prototype={isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=s,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=s,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=s,this.stopPropagation()}},oe.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,e){oe.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return(!i||i!==r&&!oe.contains(r,i))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),oe.support.focusinBubbles||oe.each({focus:"focusin",blur:"focusout"},function(t,e){var n=0,r=function(t){oe.event.simulate(e,t.target,oe.event.fix(t),!0)};oe.event.special[e]={setup:function(){0===n++&&U.addEventListener(t,r,!0)},teardown:function(){0===--n&&U.removeEventListener(t,r,!0)}}}),oe.fn.extend({on:function(t,n,r,i,o){var s,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=e);for(u in t)this.on(u,n,r,t[u],o);return this}if(null==r&&null==i?(i=n,r=n=e):null==i&&("string"==typeof n?(i=r,r=e):(i=r,r=n,n=e)),i===!1)i=a;else if(!i)return this;return 1===o&&(s=i,i=function(t){return oe().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=oe.guid++)),this.each(function(){oe.event.add(this,t,i,r,n)})},one:function(t,e,n,r){return this.on(t,e,n,r,1)},off:function(t,n,r){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,oe(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,n,t[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=e),r===!1&&(r=a),this.each(function(){oe.event.remove(this,t,r,n)})},trigger:function(t,e){return this.each(function(){oe.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?oe.event.trigger(t,e,n,!0):void 0}});var $e=/^.[^:#\[\.,]*$/,Ee=/^(?:parents|prev(?:Until|All))/,je=oe.expr.match.needsContext,Me={children:!0,contents:!0,next:!0,prev:!0};oe.fn.extend({find:function(t){var e,n=[],r=this,i=r.length;if("string"!=typeof t)return this.pushStack(oe(t).filter(function(){for(e=0;i>e;e++)if(oe.contains(r[e],this))return!0}));for(e=0;i>e;e++)oe.find(t,r[e],n);return n=this.pushStack(i>1?oe.unique(n):n),n.selector=this.selector?this.selector+" "+t:t,n},has:function(t){var e=oe(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(oe.contains(this,e[t]))return!0})},not:function(t){return this.pushStack(c(this,t||[],!0))},filter:function(t){return this.pushStack(c(this,t||[],!1))},is:function(t){return!!c(this,"string"==typeof t&&je.test(t)?oe(t):t||[],!1).length},closest:function(t,e){for(var n,r=0,i=this.length,o=[],s=je.test(t)||"string"!=typeof t?oe(t,e||this.context):0;i>r;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&oe.find.matchesSelector(n,t))){n=o.push(n);break}return this.pushStack(o.length>1?oe.unique(o):o)},index:function(t){return t?"string"==typeof t?ee.call(oe(t),this[0]):ee.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var n="string"==typeof t?oe(t,e):oe.makeArray(t&&t.nodeType?[t]:t),r=oe.merge(this.get(),n);return this.pushStack(oe.unique(r))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),oe.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return oe.dir(t,"parentNode")},parentsUntil:function(t,e,n){return oe.dir(t,"parentNode",n)},next:function(t){return l(t,"nextSibling")},prev:function(t){return l(t,"previousSibling")},nextAll:function(t){return oe.dir(t,"nextSibling")},prevAll:function(t){return oe.dir(t,"previousSibling")},nextUntil:function(t,e,n){return oe.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return oe.dir(t,"previousSibling",n)},siblings:function(t){return oe.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return oe.sibling(t.firstChild)},contents:function(t){return t.contentDocument||oe.merge([],t.childNodes)}},function(t,e){oe.fn[t]=function(n,r){var i=oe.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=oe.filter(r,i)),this.length>1&&(Me[t]||oe.unique(i),Ee.test(t)&&i.reverse()),this.pushStack(i)}}),oe.extend({filter:function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?oe.find.matchesSelector(r,t)?[r]:[]:oe.find.matches(t,oe.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,n,r){for(var i=[],o=r!==e;(t=t[n])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&oe(t).is(r))break;i.push(t)}return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}});var De=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ae=/<([\w:]+)/,Oe=/<|&#?\w+;/,Re=/<(?:script|style|link)/i,Pe=/^(?:checkbox|radio)$/i,Le=/checked\s*(?:[^=]|=\s*.checked.)/i,He=/^$|\/(?:java|ecma)script/i,ze=/^true\/(.*)/,qe=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,Fe={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};Fe.optgroup=Fe.option,Fe.tbody=Fe.tfoot=Fe.colgroup=Fe.caption=Fe.thead,Fe.th=Fe.td,oe.fn.extend({text:function(t){return oe.access(this,function(t){return t===e?oe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||U).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=h(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=h(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,r=t?oe.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||oe.cleanData(g(n)),n.parentNode&&(e&&oe.contains(n.ownerDocument,n)&&d(g(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(oe.cleanData(g(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return oe.clone(this,t,e)})},html:function(t){return oe.access(this,function(t){var n=this[0]||{},r=0,i=this.length;if(t===e&&1===n.nodeType)return n.innerHTML;if("string"==typeof t&&!Re.test(t)&&!Fe[(Ae.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(De,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(oe.cleanData(g(n,!1)),n.innerHTML=t);n=0}catch(o){}}n&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=oe.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(n){var r=t[e++],i=t[e++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),oe(this).remove(),i.insertBefore(n,r))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,n){t=K.apply([],t);var r,i,o,s,a,u,l=0,c=this.length,h=this,d=c-1,m=t[0],v=oe.isFunction(m);if(v||!(1>=c||"string"!=typeof m||oe.support.checkClone)&&Le.test(m))return this.each(function(r){var i=h.eq(r);v&&(t[0]=m.call(this,r,i.html())),i.domManip(t,e,n)});if(c&&(r=oe.buildFragment(t,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=oe.map(g(r,"script"),f),s=o.length;c>l;l++)a=r,l!==d&&(a=oe.clone(a,!0,!0),s&&oe.merge(o,g(a,"script"))),e.call(this[l],a,l);if(s)for(u=o[o.length-1].ownerDocument,oe.map(o,p),l=0;s>l;l++)a=o[l],He.test(a.type||"")&&!ge.access(a,"globalEval")&&oe.contains(u,a)&&(a.src?oe._evalUrl(a.src):oe.globalEval(a.textContent.replace(qe,"")))}return this}}),oe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){oe.fn[t]=function(t){for(var n,r=[],i=oe(t),o=i.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),oe(i[s])[e](n),Z.apply(r,n.get());return this.pushStack(r)}}),oe.extend({clone:function(t,e,n){var r,i,o,s,a=t.cloneNode(!0),u=oe.contains(t.ownerDocument,t);if(!(oe.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||oe.isXMLDoc(t)))for(s=g(a),o=g(t),r=0,i=o.length;i>r;r++)v(o[r],s[r]);if(e)if(n)for(o=o||g(t),s=s||g(a),r=0,i=o.length;i>r;r++)m(o[r],s[r]);else m(t,a);return s=g(a,"script"),s.length>0&&d(s,!u&&g(t,"script")),a},buildFragment:function(t,e,n,r){for(var i,o,s,a,u,l,c=0,h=t.length,f=e.createDocumentFragment(),p=[];h>c;c++)if(i=t[c],i||0===i)if("object"===oe.type(i))oe.merge(p,i.nodeType?[i]:i);else if(Oe.test(i)){for(o=o||f.appendChild(e.createElement("div")),s=(Ae.exec(i)||["",""])[1].toLowerCase(),a=Fe[s]||Fe._default,o.innerHTML=a[1]+i.replace(De,"<$1></$2>")+a[2],l=a[0];l--;)o=o.firstChild;oe.merge(p,o.childNodes),o=f.firstChild,o.textContent=""}else p.push(e.createTextNode(i));for(f.textContent="",c=0;i=p[c++];)if((!r||-1===oe.inArray(i,r))&&(u=oe.contains(i.ownerDocument,i),o=g(f.appendChild(i),"script"),u&&d(o),n))for(l=0;i=o[l++];)He.test(i.type||"")&&n.push(i);return f},cleanData:function(t){for(var n,r,o,s,a,u,l=oe.event.special,c=0;(r=t[c])!==e;c++){if(i.accepts(r)&&(a=r[ge.expando],a&&(n=ge.cache[a]))){if(o=Object.keys(n.events||{}),o.length)for(u=0;(s=o[u])!==e;u++)l[s]?oe.event.remove(r,s):oe.removeEvent(r,s,n.handle);ge.cache[a]&&delete ge.cache[a]}delete me.cache[r[me.expando]]}},_evalUrl:function(t){return oe.ajax({url:t,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),oe.fn.extend({wrapAll:function(t){var e;return oe.isFunction(t)?this.each(function(e){oe(this).wrapAll(t.call(this,e))}):(this[0]&&(e=oe(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return oe.isFunction(t)?this.each(function(e){oe(this).wrapInner(t.call(this,e))}):this.each(function(){var e=oe(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=oe.isFunction(t);return this.each(function(n){oe(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}});var Ie,Be,We=/^(none|table(?!-c[ea]).+)/,Ue=/^margin/,Je=new RegExp("^("+se+")(.*)$","i"),Ve=new RegExp("^("+se+")(?!px)[a-z%]+$","i"),Xe=new RegExp("^([+-])=("+se+")","i"),Ge={BODY:"block"},Ye={position:"absolute",visibility:"hidden",display:"block"},Qe={letterSpacing:0,fontWeight:400},Ke=["Top","Right","Bottom","Left"],Ze=["Webkit","O","Moz","ms"];oe.fn.extend({css:function(t,n){return oe.access(this,function(t,n,r){var i,o,s={},a=0;if(oe.isArray(n)){for(i=w(t),o=n.length;o>a;a++)s[n[a]]=oe.css(t,n[a],!1,i);return s}return r!==e?oe.style(t,n,r):oe.css(t,n)},t,n,arguments.length>1)},show:function(){return x(this,!0)},hide:function(){return x(this)},toggle:function(t){var e="boolean"==typeof t;return this.each(function(){(e?t:b(this))?oe(this).show():oe(this).hide()})}}),oe.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Ie(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,n,r,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,a,u=oe.camelCase(n),l=t.style;return n=oe.cssProps[u]||(oe.cssProps[u]=y(l,u)),a=oe.cssHooks[n]||oe.cssHooks[u],r===e?a&&"get"in a&&(o=a.get(t,!1,i))!==e?o:l[n]:(s=typeof r,"string"===s&&(o=Xe.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(oe.css(t,n)),s="number"),null==r||"number"===s&&isNaN(r)||("number"!==s||oe.cssNumber[u]||(r+="px"),oe.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),a&&"set"in a&&(r=a.set(t,r,i))===e||(l[n]=r)),void 0)}},css:function(t,n,r,i){var o,s,a,u=oe.camelCase(n);return n=oe.cssProps[u]||(oe.cssProps[u]=y(t.style,u)),a=oe.cssHooks[n]||oe.cssHooks[u],a&&"get"in a&&(o=a.get(t,!0,r)),o===e&&(o=Ie(t,n,i)),"normal"===o&&n in Qe&&(o=Qe[n]),""===r||r?(s=parseFloat(o),r===!0||oe.isNumeric(s)?s||0:o):o}}),Ie=function(t,n,r){var i,o,s,a=r||w(t),u=a?a.getPropertyValue(n)||a[n]:e,l=t.style;return a&&(""!==u||oe.contains(t.ownerDocument,t)||(u=oe.style(t,n)),Ve.test(u)&&Ue.test(n)&&(i=l.width,o=l.minWidth,s=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=a.width,l.width=i,l.minWidth=o,l.maxWidth=s)),u},oe.each(["height","width"],function(t,e){oe.cssHooks[e]={get:function(t,n,r){return n?0===t.offsetWidth&&We.test(oe.css(t,"display"))?oe.swap(t,Ye,function(){return T(t,e,r)}):T(t,e,r):void 0},set:function(t,n,r){var i=r&&w(t);return C(t,n,r?k(t,e,r,oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,i),i):0)}}}),oe(function(){oe.support.reliableMarginRight||(oe.cssHooks.marginRight={get:function(t,e){return e?oe.swap(t,{display:"inline-block"},Ie,[t,"marginRight"]):void 0}}),!oe.support.pixelPosition&&oe.fn.position&&oe.each(["top","left"],function(t,e){oe.cssHooks[e]={get:function(t,n){return n?(n=Ie(t,e),Ve.test(n)?oe(t).position()[e]+"px":n):void 0}}})}),oe.expr&&oe.expr.filters&&(oe.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},oe.expr.filters.visible=function(t){return!oe.expr.filters.hidden(t)}),oe.each({margin:"",padding:"",border:"Width"},function(t,e){oe.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[t+Ke[r]+e]=o[r]||o[r-2]||o[0];return i}},Ue.test(t)||(oe.cssHooks[t+e].set=C)});var tn=/%20/g,en=/\[\]$/,nn=/\r?\n/g,rn=/^(?:submit|button|image|reset|file)$/i,on=/^(?:input|select|textarea|keygen)/i;oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=oe.prop(this,"elements");return t?oe.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!oe(this).is(":disabled")&&on.test(this.nodeName)&&!rn.test(t)&&(this.checked||!Pe.test(t))}).map(function(t,e){var n=oe(this).val();return null==n?null:oe.isArray(n)?oe.map(n,function(t){return{name:e.name,value:t.replace(nn,"\r\n")}}):{name:e.name,value:n.replace(nn,"\r\n")}}).get()}}),oe.param=function(t,n){var r,i=[],o=function(t,e){e=oe.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(n===e&&(n=oe.ajaxSettings&&oe.ajaxSettings.traditional),oe.isArray(t)||t.jquery&&!oe.isPlainObject(t))oe.each(t,function(){o(this.name,this.value)});else for(r in t)S(r,t[r],n,o);return i.join("&").replace(tn,"+")},oe.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(t,e){oe.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),oe.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var sn,an,un=oe.now(),ln=/\?/,cn=/#.*$/,hn=/([?&])_=[^&]*/,fn=/^(.*?):[ \t]*([^\r\n]*)$/gm,pn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,dn=/^(?:GET|HEAD)$/,mn=/^\/\//,gn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,vn=oe.fn.load,yn={},bn={},wn="*/".concat("*");try{an=W.href}catch(xn){an=U.createElement("a"),an.href="",an=an.href}sn=gn.exec(an.toLowerCase())||[],oe.fn.load=function(t,n,r){if("string"!=typeof t&&vn)return vn.apply(this,arguments);var i,o,s,a=this,u=t.indexOf(" ");return u>=0&&(i=t.slice(u),t=t.slice(0,u)),oe.isFunction(n)?(r=n,n=e):n&&"object"==typeof n&&(o="POST"),a.length>0&&oe.ajax({url:t,type:o,dataType:"html",data:n}).done(function(t){s=arguments,a.html(i?oe("<div>").append(oe.parseHTML(t)).find(i):t)}).complete(r&&function(t,e){a.each(r,s||[t.responseText,e,t])}),this},oe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){oe.fn[e]=function(t){return this.on(e,t)}}),oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:an,type:"GET",isLocal:pn.test(sn[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":wn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?j(j(t,oe.ajaxSettings),e):j(oe.ajaxSettings,t)},ajaxPrefilter:$(yn),ajaxTransport:$(bn),ajax:function(t,n){function r(t,n,r,a){var l,h,y,b,x,k=n;2!==w&&(w=2,u&&clearTimeout(u),i=e,s=a||"",C.readyState=t>0?4:0,l=t>=200&&300>t||304===t,r&&(b=M(f,C,r)),b=D(f,b,C,l),l?(f.ifModified&&(x=C.getResponseHeader("Last-Modified"),x&&(oe.lastModified[o]=x),x=C.getResponseHeader("etag"),x&&(oe.etag[o]=x)),204===t||"HEAD"===f.type?k="nocontent":304===t?k="notmodified":(k=b.state,h=b.data,y=b.error,l=!y)):(y=k,(t||!k)&&(k="error",0>t&&(t=0))),C.status=t,C.statusText=(n||k)+"",l?m.resolveWith(p,[h,k,C]):m.rejectWith(p,[C,k,y]),C.statusCode(v),v=e,c&&d.trigger(l?"ajaxSuccess":"ajaxError",[C,f,l?h:y]),g.fireWith(p,[C,k]),c&&(d.trigger("ajaxComplete",[C,f]),--oe.active||oe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=e),n=n||{};var i,o,s,a,u,l,c,h,f=oe.ajaxSetup({},n),p=f.context||f,d=f.context&&(p.nodeType||p.jquery)?oe(p):oe.event,m=oe.Deferred(),g=oe.Callbacks("once memory"),v=f.statusCode||{},y={},b={},w=0,x="canceled",C={readyState:0,getResponseHeader:function(t){var e;if(2===w){if(!a)for(a={};e=fn.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===w?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return w||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return w||(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>w)for(e in t)v[e]=[v[e],t[e]];else C.always(t[C.status]);return this},abort:function(t){var e=t||x;return i&&i.abort(e),r(0,e),this}};if(m.promise(C).complete=g.add,C.success=C.done,C.error=C.fail,f.url=((t||f.url||an)+"").replace(cn,"").replace(mn,sn[1]+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=oe.trim(f.dataType||"*").toLowerCase().match(ae)||[""],null==f.crossDomain&&(l=gn.exec(f.url.toLowerCase()),f.crossDomain=!(!l||l[1]===sn[1]&&l[2]===sn[2]&&(l[3]||("http:"===l[1]?"80":"443"))===(sn[3]||("http:"===sn[1]?"80":"443")))),f.data&&f.processData&&"string"!=typeof f.data&&(f.data=oe.param(f.data,f.traditional)),E(yn,f,n,C),2===w)return C;c=f.global,c&&0===oe.active++&&oe.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!dn.test(f.type),o=f.url,f.hasContent||(f.data&&(o=f.url+=(ln.test(o)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=hn.test(o)?o.replace(hn,"$1_="+un++):o+(ln.test(o)?"&":"?")+"_="+un++)),f.ifModified&&(oe.lastModified[o]&&C.setRequestHeader("If-Modified-Since",oe.lastModified[o]),oe.etag[o]&&C.setRequestHeader("If-None-Match",oe.etag[o])),(f.data&&f.hasContent&&f.contentType!==!1||n.contentType)&&C.setRequestHeader("Content-Type",f.contentType),C.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+wn+"; q=0.01":""):f.accepts["*"]);for(h in f.headers)C.setRequestHeader(h,f.headers[h]);if(f.beforeSend&&(f.beforeSend.call(p,C,f)===!1||2===w))return C.abort();x="abort";for(h in{success:1,error:1,complete:1})C[h](f[h]);if(i=E(bn,f,n,C)){C.readyState=1,c&&d.trigger("ajaxSend",[C,f]),f.async&&f.timeout>0&&(u=setTimeout(function(){C.abort("timeout")},f.timeout));try{w=1,i.send(y,r)}catch(k){if(!(2>w))throw k;r(-1,k)}}else r(-1,"No Transport");return C},getJSON:function(t,e,n){return oe.get(t,e,n,"json")},getScript:function(t,n){return oe.get(t,e,n,"script")}}),oe.each(["get","post"],function(t,n){oe[n]=function(t,r,i,o){return oe.isFunction(r)&&(o=o||i,i=r,r=e),oe.ajax({url:t,type:n,dataType:o,data:r,success:i})}}),oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return oe.globalEval(t),t}}}),oe.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),oe.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=oe("<script>").prop({async:!0,charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),U.head.appendChild(e[0])},abort:function(){n&&n()}}}});var Cn=[],kn=/(=)\?(?=&|$)|\?\?/;oe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=Cn.pop()||oe.expando+"_"+un++;return this[t]=!0,t}}),oe.ajaxPrefilter("json jsonp",function(n,r,i){var o,s,a,u=n.jsonp!==!1&&(kn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&kn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=oe.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(kn,"$1"+o):n.jsonp!==!1&&(n.url+=(ln.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return a||oe.error(o+" was not called"),a[0]},n.dataTypes[0]="json",s=t[o],t[o]=function(){a=arguments},i.always(function(){t[o]=s,n[o]&&(n.jsonpCallback=r.jsonpCallback,Cn.push(o)),a&&oe.isFunction(s)&&s(a[0]),a=s=e}),"script"):void 0}),oe.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var Tn=oe.ajaxSettings.xhr(),_n={0:200,1223:204},Nn=0,Sn={};t.ActiveXObject&&oe(t).on("unload",function(){for(var t in Sn)Sn[t]();Sn=e}),oe.support.cors=!!Tn&&"withCredentials"in Tn,oe.support.ajax=Tn=!!Tn,oe.ajaxTransport(function(t){var n;return oe.support.cors||Tn&&!t.crossDomain?{send:function(r,i){var o,s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)a.setRequestHeader(o,r[o]);n=function(t){return function(){n&&(delete Sn[s],n=a.onload=a.onerror=null,"abort"===t?a.abort():"error"===t?i(a.status||404,a.statusText):i(_n[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:e,a.getAllResponseHeaders()))}},a.onload=n(),a.onerror=n("error"),n=Sn[s=Nn++]=n("abort"),a.send(t.hasContent&&t.data||null)},abort:function(){n&&n()}}:void 0});var $n,En,jn=/^(?:toggle|show|hide)$/,Mn=new RegExp("^(?:([+-])=|)("+se+")([a-z%]*)$","i"),Dn=/queueHooks$/,An=[L],On={"*":[function(t,e){var n=this.createTween(t,e),r=n.cur(),i=Mn.exec(e),o=i&&i[3]||(oe.cssNumber[t]?"":"px"),s=(oe.cssNumber[t]||"px"!==o&&+r)&&Mn.exec(oe.css(n.elem,t)),a=1,u=20;if(s&&s[3]!==o){o=o||s[3],i=i||[],s=+r||1;do a=a||".5",s/=a,oe.style(n.elem,t,s+o);while(a!==(a=n.cur()/r)&&1!==a&&--u)}return i&&(s=n.start=+s||+r||0,n.unit=o,n.end=i[1]?s+(i[1]+1)*i[2]:+i[2]),n}]};oe.Animation=oe.extend(R,{tweener:function(t,e){oe.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,r=0,i=t.length;i>r;r++)n=t[r],On[n]=On[n]||[],On[n].unshift(e)},prefilter:function(t,e){e?An.unshift(t):An.push(t)}}),oe.Tween=H,H.prototype={constructor:H,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(oe.cssNumber[n]?"":"px")},cur:function(){var t=H.propHooks[this.prop];return t&&t.get?t.get(this):H.propHooks._default.get(this)},run:function(t){var e,n=H.propHooks[this.prop];return this.pos=e=this.options.duration?oe.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):H.propHooks._default.set(this),this}},H.prototype.init.prototype=H.prototype,H.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=oe.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){oe.fx.step[t.prop]?oe.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[oe.cssProps[t.prop]]||oe.cssHooks[t.prop])?oe.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},H.propHooks.scrollTop=H.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},oe.each(["toggle","show","hide"],function(t,e){var n=oe.fn[e];oe.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(z(e,!0),t,r,i)}}),oe.fn.extend({fadeTo:function(t,e,n,r){return this.filter(b).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=oe.isEmptyObject(t),o=oe.speed(e,n,r),s=function(){var e=R(this,oe.extend({},t),o);(i||ge.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,n,r){var i=function(t){var e=t.stop;delete t.stop,e(r)};return"string"!=typeof t&&(r=n,n=t,t=e),n&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,n=null!=t&&t+"queueHooks",o=oe.timers,s=ge.get(this);if(n)s[n]&&s[n].stop&&i(s[n]);else for(n in s)s[n]&&s[n].stop&&Dn.test(n)&&i(s[n]);for(n=o.length;n--;)o[n].elem!==this||null!=t&&o[n].queue!==t||(o[n].anim.stop(r),e=!1,o.splice(n,1));(e||!r)&&oe.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=ge.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=oe.timers,s=r?r.length:0;for(n.finish=!0,oe.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;s>e;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),oe.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){oe.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),oe.speed=function(t,e,n){var r=t&&"object"==typeof t?oe.extend({},t):{complete:n||!n&&e||oe.isFunction(t)&&t,duration:t,easing:n&&e||e&&!oe.isFunction(e)&&e};return r.duration=oe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in oe.fx.speeds?oe.fx.speeds[r.duration]:oe.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){oe.isFunction(r.old)&&r.old.call(this),r.queue&&oe.dequeue(this,r.queue)},r},oe.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},oe.timers=[],oe.fx=H.prototype.init,oe.fx.tick=function(){var t,n=oe.timers,r=0;for($n=oe.now();r<n.length;r++)t=n[r],t()||n[r]!==t||n.splice(r--,1);n.length||oe.fx.stop(),$n=e},oe.fx.timer=function(t){t()&&oe.timers.push(t)&&oe.fx.start()},oe.fx.interval=13,oe.fx.start=function(){En||(En=setInterval(oe.fx.tick,oe.fx.interval))},oe.fx.stop=function(){clearInterval(En),En=null},oe.fx.speeds={slow:600,fast:200,_default:400},oe.fx.step={},oe.expr&&oe.expr.filters&&(oe.expr.filters.animated=function(t){return oe.grep(oe.timers,function(e){return t===e.elem}).length}),oe.fn.offset=function(t){if(arguments.length)return t===e?this:this.each(function(e){oe.offset.setOffset(this,t,e)
26
+ });var n,r,i=this[0],o={top:0,left:0},s=i&&i.ownerDocument;if(s)return n=s.documentElement,oe.contains(n,i)?(typeof i.getBoundingClientRect!==B&&(o=i.getBoundingClientRect()),r=q(s),{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}):o},oe.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,l,c=oe.css(t,"position"),h=oe(t),f={};"static"===c&&(t.style.position="relative"),a=h.offset(),o=oe.css(t,"top"),u=oe.css(t,"left"),l=("absolute"===c||"fixed"===c)&&(o+u).indexOf("auto")>-1,l?(r=h.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),oe.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(f.top=e.top-a.top+s),null!=e.left&&(f.left=e.left-a.left+i),"using"in e?e.using.call(t,f):h.css(f)}},oe.fn.extend({position:function(){if(this[0]){var t,e,n=this[0],r={top:0,left:0};return"fixed"===oe.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),oe.nodeName(t[0],"html")||(r=t.offset()),r.top+=oe.css(t[0],"borderTopWidth",!0),r.left+=oe.css(t[0],"borderLeftWidth",!0)),{top:e.top-r.top-oe.css(n,"marginTop",!0),left:e.left-r.left-oe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||J;t&&!oe.nodeName(t,"html")&&"static"===oe.css(t,"position");)t=t.offsetParent;return t||J})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var i="pageYOffset"===r;oe.fn[n]=function(o){return oe.access(this,function(n,o,s){var a=q(n);return s===e?a?a[r]:n[o]:(a?a.scrollTo(i?t.pageXOffset:s,i?s:t.pageYOffset):n[o]=s,void 0)},n,o,arguments.length,null)}}),oe.each({Height:"height",Width:"width"},function(t,n){oe.each({padding:"inner"+t,content:n,"":"outer"+t},function(r,i){oe.fn[i]=function(i,o){var s=arguments.length&&(r||"boolean"!=typeof i),a=r||(i===!0||o===!0?"margin":"border");return oe.access(this,function(n,r,i){var o;return oe.isWindow(n)?n.document.documentElement["client"+t]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+t],o["scroll"+t],n.body["offset"+t],o["offset"+t],o["client"+t])):i===e?oe.css(n,r,a):oe.style(n,r,i,a)},n,s?i:e,s,null)}})}),oe.fn.size=function(){return this.length},oe.fn.andSelf=oe.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=oe:"function"==typeof define&&define.amd&&define("jquery",[],function(){return oe}),"object"==typeof t&&"object"==typeof t.document&&(t.jQuery=t.$=oe)}(window),function(){var t=this,e=t._,n={},r=Array.prototype,i=Object.prototype,o=Function.prototype,s=r.push,a=r.slice,u=r.concat,l=i.toString,c=i.hasOwnProperty,h=r.forEach,f=r.map,p=r.reduce,d=r.reduceRight,m=r.filter,g=r.every,v=r.some,y=r.indexOf,b=r.lastIndexOf,w=Array.isArray,x=Object.keys,C=o.bind,k=function(t){return t instanceof k?t:this instanceof k?(this._wrapped=t,void 0):new k(t)};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=k),exports._=k):t._=k,k.VERSION="1.4.4";var T=k.each=k.forEach=function(t,e,r){if(null!=t)if(h&&t.forEach===h)t.forEach(e,r);else if(t.length===+t.length){for(var i=0,o=t.length;o>i;i++)if(e.call(r,t[i],i,t)===n)return}else for(var s in t)if(k.has(t,s)&&e.call(r,t[s],s,t)===n)return};k.map=k.collect=function(t,e,n){var r=[];return null==t?r:f&&t.map===f?t.map(e,n):(T(t,function(t,i,o){r[r.length]=e.call(n,t,i,o)}),r)};var _="Reduce of empty array with no initial value";k.reduce=k.foldl=k.inject=function(t,e,n,r){var i=arguments.length>2;if(null==t&&(t=[]),p&&t.reduce===p)return r&&(e=k.bind(e,r)),i?t.reduce(e,n):t.reduce(e);if(T(t,function(t,o,s){i?n=e.call(r,n,t,o,s):(n=t,i=!0)}),!i)throw new TypeError(_);return n},k.reduceRight=k.foldr=function(t,e,n,r){var i=arguments.length>2;if(null==t&&(t=[]),d&&t.reduceRight===d)return r&&(e=k.bind(e,r)),i?t.reduceRight(e,n):t.reduceRight(e);var o=t.length;if(o!==+o){var s=k.keys(t);o=s.length}if(T(t,function(a,u,l){u=s?s[--o]:--o,i?n=e.call(r,n,t[u],u,l):(n=t[u],i=!0)}),!i)throw new TypeError(_);return n},k.find=k.detect=function(t,e,n){var r;return N(t,function(t,i,o){return e.call(n,t,i,o)?(r=t,!0):void 0}),r},k.filter=k.select=function(t,e,n){var r=[];return null==t?r:m&&t.filter===m?t.filter(e,n):(T(t,function(t,i,o){e.call(n,t,i,o)&&(r[r.length]=t)}),r)},k.reject=function(t,e,n){return k.filter(t,function(t,r,i){return!e.call(n,t,r,i)},n)},k.every=k.all=function(t,e,r){e||(e=k.identity);var i=!0;return null==t?i:g&&t.every===g?t.every(e,r):(T(t,function(t,o,s){return(i=i&&e.call(r,t,o,s))?void 0:n}),!!i)};var N=k.some=k.any=function(t,e,r){e||(e=k.identity);var i=!1;return null==t?i:v&&t.some===v?t.some(e,r):(T(t,function(t,o,s){return i||(i=e.call(r,t,o,s))?n:void 0}),!!i)};k.contains=k.include=function(t,e){return null==t?!1:y&&t.indexOf===y?-1!=t.indexOf(e):N(t,function(t){return t===e})},k.invoke=function(t,e){var n=a.call(arguments,2),r=k.isFunction(e);return k.map(t,function(t){return(r?e:t[e]).apply(t,n)})},k.pluck=function(t,e){return k.map(t,function(t){return t[e]})},k.where=function(t,e,n){return k.isEmpty(e)?n?null:[]:k[n?"find":"filter"](t,function(t){for(var n in e)if(e[n]!==t[n])return!1;return!0})},k.findWhere=function(t,e){return k.where(t,e,!0)},k.max=function(t,e,n){if(!e&&k.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.max.apply(Math,t);if(!e&&k.isEmpty(t))return-1/0;var r={computed:-1/0,value:-1/0};return T(t,function(t,i,o){var s=e?e.call(n,t,i,o):t;s>=r.computed&&(r={value:t,computed:s})}),r.value},k.min=function(t,e,n){if(!e&&k.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.min.apply(Math,t);if(!e&&k.isEmpty(t))return 1/0;var r={computed:1/0,value:1/0};return T(t,function(t,i,o){var s=e?e.call(n,t,i,o):t;s<r.computed&&(r={value:t,computed:s})}),r.value},k.shuffle=function(t){var e,n=0,r=[];return T(t,function(t){e=k.random(n++),r[n-1]=r[e],r[e]=t}),r};var S=function(t){return k.isFunction(t)?t:function(e){return e[t]}};k.sortBy=function(t,e,n){var r=S(e);return k.pluck(k.map(t,function(t,e,i){return{value:t,index:e,criteria:r.call(n,t,e,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index<e.index?-1:1}),"value")};var $=function(t,e,n,r){var i={},o=S(e||k.identity);return T(t,function(e,s){var a=o.call(n,e,s,t);r(i,a,e)}),i};k.groupBy=function(t,e,n){return $(t,e,n,function(t,e,n){(k.has(t,e)?t[e]:t[e]=[]).push(n)})},k.countBy=function(t,e,n){return $(t,e,n,function(t,e){k.has(t,e)||(t[e]=0),t[e]++})},k.sortedIndex=function(t,e,n,r){n=null==n?k.identity:S(n);for(var i=n.call(r,e),o=0,s=t.length;s>o;){var a=o+s>>>1;n.call(r,t[a])<i?o=a+1:s=a}return o},k.toArray=function(t){return t?k.isArray(t)?a.call(t):t.length===+t.length?k.map(t,k.identity):k.values(t):[]},k.size=function(t){return null==t?0:t.length===+t.length?t.length:k.keys(t).length},k.first=k.head=k.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:a.call(t,0,e)},k.initial=function(t,e,n){return a.call(t,0,t.length-(null==e||n?1:e))},k.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:a.call(t,Math.max(t.length-e,0))},k.rest=k.tail=k.drop=function(t,e,n){return a.call(t,null==e||n?1:e)},k.compact=function(t){return k.filter(t,k.identity)};var E=function(t,e,n){return T(t,function(t){k.isArray(t)?e?s.apply(n,t):E(t,e,n):n.push(t)}),n};k.flatten=function(t,e){return E(t,e,[])},k.without=function(t){return k.difference(t,a.call(arguments,1))},k.uniq=k.unique=function(t,e,n,r){k.isFunction(e)&&(r=n,n=e,e=!1);var i=n?k.map(t,n,r):t,o=[],s=[];return T(i,function(n,r){(e?r&&s[s.length-1]===n:k.contains(s,n))||(s.push(n),o.push(t[r]))}),o},k.union=function(){return k.uniq(u.apply(r,arguments))},k.intersection=function(t){var e=a.call(arguments,1);return k.filter(k.uniq(t),function(t){return k.every(e,function(e){return k.indexOf(e,t)>=0})})},k.difference=function(t){var e=u.apply(r,a.call(arguments,1));return k.filter(t,function(t){return!k.contains(e,t)})},k.zip=function(){for(var t=a.call(arguments),e=k.max(k.pluck(t,"length")),n=new Array(e),r=0;e>r;r++)n[r]=k.pluck(t,""+r);return n},k.object=function(t,e){if(null==t)return{};for(var n={},r=0,i=t.length;i>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},k.indexOf=function(t,e,n){if(null==t)return-1;var r=0,i=t.length;if(n){if("number"!=typeof n)return r=k.sortedIndex(t,e),t[r]===e?r:-1;r=0>n?Math.max(0,i+n):n}if(y&&t.indexOf===y)return t.indexOf(e,n);for(;i>r;r++)if(t[r]===e)return r;return-1},k.lastIndexOf=function(t,e,n){if(null==t)return-1;var r=null!=n;if(b&&t.lastIndexOf===b)return r?t.lastIndexOf(e,n):t.lastIndexOf(e);for(var i=r?n:t.length;i--;)if(t[i]===e)return i;return-1},k.range=function(t,e,n){arguments.length<=1&&(e=t||0,t=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=0,o=new Array(r);r>i;)o[i++]=t,t+=n;return o},k.bind=function(t,e){if(t.bind===C&&C)return C.apply(t,a.call(arguments,1));var n=a.call(arguments,2);return function(){return t.apply(e,n.concat(a.call(arguments)))}},k.partial=function(t){var e=a.call(arguments,1);return function(){return t.apply(this,e.concat(a.call(arguments)))}},k.bindAll=function(t){var e=a.call(arguments,1);return 0===e.length&&(e=k.functions(t)),T(e,function(e){t[e]=k.bind(t[e],t)}),t},k.memoize=function(t,e){var n={};return e||(e=k.identity),function(){var r=e.apply(this,arguments);return k.has(n,r)?n[r]:n[r]=t.apply(this,arguments)}},k.delay=function(t,e){var n=a.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},k.defer=function(t){return k.delay.apply(k,[t,1].concat(a.call(arguments,1)))},k.throttle=function(t,e){var n,r,i,o,s=0,a=function(){s=new Date,i=null,o=t.apply(n,r)};return function(){var u=new Date,l=e-(u-s);return n=this,r=arguments,0>=l?(clearTimeout(i),i=null,s=u,o=t.apply(n,r)):i||(i=setTimeout(a,l)),o}},k.debounce=function(t,e,n){var r,i;return function(){var o=this,s=arguments,a=function(){r=null,n||(i=t.apply(o,s))},u=n&&!r;return clearTimeout(r),r=setTimeout(a,e),u&&(i=t.apply(o,s)),i}},k.once=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}},k.wrap=function(t,e){return function(){var n=[t];return s.apply(n,arguments),e.apply(this,n)}},k.compose=function(){var t=arguments;return function(){for(var e=arguments,n=t.length-1;n>=0;n--)e=[t[n].apply(this,e)];return e[0]}},k.after=function(t,e){return 0>=t?e():function(){return--t<1?e.apply(this,arguments):void 0}},k.keys=x||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var e=[];for(var n in t)k.has(t,n)&&(e[e.length]=n);return e},k.values=function(t){var e=[];for(var n in t)k.has(t,n)&&e.push(t[n]);return e},k.pairs=function(t){var e=[];for(var n in t)k.has(t,n)&&e.push([n,t[n]]);return e},k.invert=function(t){var e={};for(var n in t)k.has(t,n)&&(e[t[n]]=n);return e},k.functions=k.methods=function(t){var e=[];for(var n in t)k.isFunction(t[n])&&e.push(n);return e.sort()},k.extend=function(t){return T(a.call(arguments,1),function(e){if(e)for(var n in e)t[n]=e[n]}),t},k.pick=function(t){var e={},n=u.apply(r,a.call(arguments,1));return T(n,function(n){n in t&&(e[n]=t[n])}),e},k.omit=function(t){var e={},n=u.apply(r,a.call(arguments,1));for(var i in t)k.contains(n,i)||(e[i]=t[i]);return e},k.defaults=function(t){return T(a.call(arguments,1),function(e){if(e)for(var n in e)null==t[n]&&(t[n]=e[n])}),t},k.clone=function(t){return k.isObject(t)?k.isArray(t)?t.slice():k.extend({},t):t},k.tap=function(t,e){return e(t),t};var j=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;t instanceof k&&(t=t._wrapped),e instanceof k&&(e=e._wrapped);var i=l.call(t);if(i!=l.call(e))return!1;switch(i){case"[object String]":return t==String(e);case"[object Number]":return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object RegExp]":return t.source==e.source&&t.global==e.global&&t.multiline==e.multiline&&t.ignoreCase==e.ignoreCase}if("object"!=typeof t||"object"!=typeof e)return!1;for(var o=n.length;o--;)if(n[o]==t)return r[o]==e;n.push(t),r.push(e);var s=0,a=!0;if("[object Array]"==i){if(s=t.length,a=s==e.length)for(;s--&&(a=j(t[s],e[s],n,r)););}else{var u=t.constructor,c=e.constructor;if(u!==c&&!(k.isFunction(u)&&u instanceof u&&k.isFunction(c)&&c instanceof c))return!1;for(var h in t)if(k.has(t,h)&&(s++,!(a=k.has(e,h)&&j(t[h],e[h],n,r))))break;if(a){for(h in e)if(k.has(e,h)&&!s--)break;a=!s}}return n.pop(),r.pop(),a};k.isEqual=function(t,e){return j(t,e,[],[])},k.isEmpty=function(t){if(null==t)return!0;if(k.isArray(t)||k.isString(t))return 0===t.length;for(var e in t)if(k.has(t,e))return!1;return!0},k.isElement=function(t){return!(!t||1!==t.nodeType)},k.isArray=w||function(t){return"[object Array]"==l.call(t)},k.isObject=function(t){return t===Object(t)},T(["Arguments","Function","String","Number","Date","RegExp"],function(t){k["is"+t]=function(e){return l.call(e)=="[object "+t+"]"}}),k.isArguments(arguments)||(k.isArguments=function(t){return!(!t||!k.has(t,"callee"))}),"function"!=typeof/./&&(k.isFunction=function(t){return"function"==typeof t}),k.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},k.isNaN=function(t){return k.isNumber(t)&&t!=+t},k.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"==l.call(t)},k.isNull=function(t){return null===t},k.isUndefined=function(t){return void 0===t},k.has=function(t,e){return c.call(t,e)},k.noConflict=function(){return t._=e,this},k.identity=function(t){return t},k.times=function(t,e,n){for(var r=Array(t),i=0;t>i;i++)r[i]=e.call(n,i);return r},k.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))};var M={escape:{"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","/":"&#x2F;"}};M.unescape=k.invert(M.escape);var D={escape:new RegExp("["+k.keys(M.escape).join("")+"]","g"),unescape:new RegExp("("+k.keys(M.unescape).join("|")+")","g")};k.each(["escape","unescape"],function(t){k[t]=function(e){return null==e?"":(""+e).replace(D[t],function(e){return M[t][e]})}}),k.result=function(t,e){if(null==t)return null;var n=t[e];return k.isFunction(n)?n.call(t):n},k.mixin=function(t){T(k.functions(t),function(e){var n=k[e]=t[e];k.prototype[e]=function(){var t=[this._wrapped];return s.apply(t,arguments),L.call(this,n.apply(k,t))}})};var A=0;k.uniqueId=function(t){var e=++A+"";return t?t+e:e},k.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var O=/(.)^/,R={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},P=/\\|'|\r|\n|\t|\u2028|\u2029/g;k.template=function(t,e,n){var r;n=k.defaults({},n,k.templateSettings);var i=new RegExp([(n.escape||O).source,(n.interpolate||O).source,(n.evaluate||O).source].join("|")+"|$","g"),o=0,s="__p+='";t.replace(i,function(e,n,r,i,a){return s+=t.slice(o,a).replace(P,function(t){return"\\"+R[t]}),n&&(s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(s+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(s+="';\n"+i+"\n__p+='"),o=a+e.length,e}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{r=new Function(n.variable||"obj","_",s)}catch(a){throw a.source=s,a}if(e)return r(e,k);var u=function(t){return r.call(this,t,k)};return u.source="function("+(n.variable||"obj")+"){\n"+s+"}",u},k.chain=function(t){return k(t).chain()};var L=function(t){return this._chain?k(t).chain():t};k.mixin(k),T(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=r[t];k.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!=t&&"splice"!=t||0!==n.length||delete n[0],L.call(this,n)}}),T(["concat","join","slice"],function(t){var e=r[t];k.prototype[t]=function(){return L.call(this,e.apply(this._wrapped,arguments))}}),k.extend(k.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this),function(){var t,e=this,n=e.Backbone,r=[],i=r.push,o=r.slice,s=r.splice;t="undefined"!=typeof exports?exports:e.Backbone={},t.VERSION="1.0.0";var a=e._;a||"undefined"==typeof require||(a=require("underscore")),t.$=e.jQuery||e.Zepto||e.ender||e.$,t.noConflict=function(){return e.Backbone=n,this},t.emulateHTTP=!1,t.emulateJSON=!1;var u=t.Events={on:function(t,e,n){if(!c(this,"on",t,[e,n])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);return r.push({callback:e,context:n,ctx:n||this}),this},once:function(t,e,n){if(!c(this,"once",t,[e,n])||!e)return this;var r=this,i=a.once(function(){r.off(t,i),e.apply(this,arguments)});return i._callback=e,this.on(t,i,n)},off:function(t,e,n){var r,i,o,s,u,l,h,f;if(!this._events||!c(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(s=t?[t]:a.keys(this._events),u=0,l=s.length;l>u;u++)if(t=s[u],o=this._events[t]){if(this._events[t]=r=[],e||n)for(h=0,f=o.length;f>h;h++)i=o[h],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=o.call(arguments,1);if(!c(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&h(n,e),r&&h(r,arguments),this},stopListening:function(t,e,n){var r=this._listeners;if(!r)return this;var i=!e&&!n;"object"==typeof e&&(n=this),t&&((r={})[t._listenerId]=t);for(var o in r)r[o].off(e,n,this),i&&delete this._listeners[o];return this}},l=/\s+/,c=function(t,e,n,r){if(!n)return!0;if("object"==typeof n){for(var i in n)t[e].apply(t,[i,n[i]].concat(r));return!1}if(l.test(n)){for(var o=n.split(l),s=0,a=o.length;a>s;s++)t[e].apply(t,[o[s]].concat(r));return!1}return!0},h=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],a=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,a);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}},f={listenTo:"on",listenToOnce:"once"};a.each(f,function(t,e){u[e]=function(e,n,r){var i=this._listeners||(this._listeners={}),o=e._listenerId||(e._listenerId=a.uniqueId("l"));return i[o]=e,"object"==typeof n&&(r=this),e[t](n,r,this),this}}),u.bind=u.on,u.unbind=u.off,a.extend(t,u);var p=t.Model=function(t,e){var n,r=t||{};e||(e={}),this.cid=a.uniqueId("c"),this.attributes={},a.extend(this,a.pick(e,d)),e.parse&&(r=this.parse(r,e)||{}),(n=a.result(this,"defaults"))&&(r=a.defaults({},r,n)),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)},d=["url","urlRoot","collection"];a.extend(p.prototype,u,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return a.clone(this.attributes)},sync:function(){return t.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return a.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,n){var r,i,o,s,u,l,c,h;if(null==t)return this;if("object"==typeof t?(i=t,n=e):(i={})[t]=e,n||(n={}),!this._validate(i,n))return!1;o=n.unset,u=n.silent,s=[],l=this._changing,this._changing=!0,l||(this._previousAttributes=a.clone(this.attributes),this.changed={}),h=this.attributes,c=this._previousAttributes,this.idAttribute in i&&(this.id=i[this.idAttribute]);for(r in i)e=i[r],a.isEqual(h[r],e)||s.push(r),a.isEqual(c[r],e)?delete this.changed[r]:this.changed[r]=e,o?delete h[r]:h[r]=e;if(!u){s.length&&(this._pending=!0);for(var f=0,p=s.length;p>f;f++)this.trigger("change:"+s[f],this,h[s[f]],n)}if(l)return this;if(!u)for(;this._pending;)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,a.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,a.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!a.isEmpty(this.changed):a.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?a.clone(this.changed):!1;var e,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in t)a.isEqual(r[i],e=t[i])||((n||(n={}))[i]=e);return n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return a.clone(this._previousAttributes)},fetch:function(t){t=t?a.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,n=t.success;return t.success=function(r){return e.set(e.parse(r,t),t)?(n&&n(e,r,t),e.trigger("sync",e,r,t),void 0):!1},L(this,t),this.sync("read",this,t)},save:function(t,e,n){var r,i,o,s=this.attributes;if(null==t||"object"==typeof t?(r=t,n=e):(r={})[t]=e,!(!r||n&&n.wait||this.set(r,n)))return!1;if(n=a.extend({validate:!0},n),!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=a.extend({},s,r)),void 0===n.parse&&(n.parse=!0);var u=this,l=n.success;return n.success=function(t){u.attributes=s;var e=u.parse(t,n);return n.wait&&(e=a.extend(r||{},e)),a.isObject(e)&&!u.set(e,n)?!1:(l&&l(u,t,n),u.trigger("sync",u,t,n),void 0)},L(this,n),i=this.isNew()?"create":n.patch?"patch":"update","patch"===i&&(n.attrs=r),o=this.sync(i,this,n),r&&n.wait&&(this.attributes=s),o},destroy:function(t){t=t?a.clone(t):{};var e=this,n=t.success,r=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(i){(t.wait||e.isNew())&&r(),n&&n(e,i,t),e.isNew()||e.trigger("sync",e,i,t)},this.isNew())return t.success(),!1;L(this,t);var i=this.sync("delete",this,t);return t.wait||r(),i},url:function(){var t=a.result(this,"urlRoot")||a.result(this.collection,"url")||P();return this.isNew()?t:t+("/"===t.charAt(t.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(t){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(t){return this._validate({},a.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=a.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return n?(this.trigger("invalid",this,n,a.extend(e||{},{validationError:n})),!1):!0}});var m=["keys","values","pairs","invert","pick","omit"];a.each(m,function(t){p.prototype[t]=function(){var e=o.call(arguments);return e.unshift(this.attributes),a[t].apply(a,e)}});var g=t.Collection=function(t,e){e||(e={}),e.url&&(this.url=e.url),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,a.extend({silent:!0},e))},v={add:!0,remove:!0,merge:!0},y={add:!0,merge:!1,remove:!1};a.extend(g.prototype,u,{model:p,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return t.sync.apply(this,arguments)},add:function(t,e){return this.set(t,a.defaults(e||{},y))},remove:function(t,e){t=a.isArray(t)?t.slice():[t],e||(e={});var n,r,i,o;for(n=0,r=t.length;r>n;n++)o=this.get(t[n]),o&&(delete this._byId[o.id],delete this._byId[o.cid],i=this.indexOf(o),this.models.splice(i,1),this.length--,e.silent||(e.index=i,o.trigger("remove",o,this,e)),this._removeReference(o));return this},set:function(t,e){e=a.defaults(e||{},v),e.parse&&(t=this.parse(t,e)),a.isArray(t)||(t=t?[t]:[]);var n,r,o,u,l,c=e.at,h=this.comparator&&null==c&&e.sort!==!1,f=a.isString(this.comparator)?this.comparator:null,p=[],d=[],m={};for(n=0,r=t.length;r>n;n++)(o=this._prepareModel(t[n],e))&&((u=this.get(o))?(e.remove&&(m[u.cid]=!0),e.merge&&(u.set(o.attributes,e),h&&!l&&u.hasChanged(f)&&(l=!0))):e.add&&(p.push(o),o.on("all",this._onModelEvent,this),this._byId[o.cid]=o,null!=o.id&&(this._byId[o.id]=o)));if(e.remove){for(n=0,r=this.length;r>n;++n)m[(o=this.models[n]).cid]||d.push(o);d.length&&this.remove(d,e)}if(p.length&&(h&&(l=!0),this.length+=p.length,null!=c?s.apply(this.models,[c,0].concat(p)):i.apply(this.models,p)),l&&this.sort({silent:!0}),e.silent)return this;for(n=0,r=p.length;r>n;n++)(o=p[n]).trigger("add",o,this,e);return l&&this.trigger("sort",this,e),this},reset:function(t,e){e||(e={});for(var n=0,r=this.models.length;r>n;n++)this._removeReference(this.models[n]);return e.previousModels=this.models,this._reset(),this.add(t,a.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),this},push:function(t,e){return t=this._prepareModel(t,e),this.add(t,a.extend({at:this.length},e)),t},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return t=this._prepareModel(t,e),this.add(t,a.extend({at:0},e)),t},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(t,e){return this.models.slice(t,e)},get:function(t){return null==t?void 0:this._byId[null!=t.id?t.id:t.cid||t]},at:function(t){return this.models[t]},where:function(t,e){return a.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var n in t)if(t[n]!==e.get(n))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),a.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(a.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},sortedIndex:function(t,e,n){e||(e=this.comparator);var r=a.isFunction(e)?e:function(t){return t.get(e)};return a.sortedIndex(this.models,t,r,n)},pluck:function(t){return a.invoke(this.models,"get",t)},fetch:function(t){t=t?a.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,n=this;return t.success=function(r){var i=t.reset?"reset":"set";n[i](r,t),e&&e(n,r,t),n.trigger("sync",n,r,t)},L(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?a.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var n=this,r=e.success;return e.success=function(i){e.wait&&n.add(t,e),r&&r(t,i,e)},t.save(null,e),t},parse:function(t){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof p)return t.collection||(t.collection=this),t;e||(e={}),e.collection=this;var n=new this.model(t,e);return n._validate(t,e)?n:(this.trigger("invalid",this,t,e),!1)},_removeReference:function(t){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){("add"!==t&&"remove"!==t||n===this)&&("destroy"===t&&this.remove(e,r),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var b=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];a.each(b,function(t){g.prototype[t]=function(){var e=o.call(arguments);return e.unshift(this.models),a[t].apply(a,e)}});var w=["groupBy","countBy","sortBy"];a.each(w,function(t){g.prototype[t]=function(e,n){var r=a.isFunction(e)?e:function(t){return t.get(e)};return a[t](this.models,r,n)}});var x=t.View=function(t){this.cid=a.uniqueId("view"),this._configure(t||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},C=/^(\S+)\s*(.*)$/,k=["model","collection","el","id","attributes","className","tagName","events"];a.extend(x.prototype,u,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(e,n){return this.$el&&this.undelegateEvents(),this.$el=e instanceof t.$?e:t.$(e),this.el=this.$el[0],n!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=a.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(a.isFunction(n)||(n=this[t[e]]),n){var r=e.match(C),i=r[1],o=r[2];n=a.bind(n,this),i+=".delegateEvents"+this.cid,""===o?this.$el.on(i,n):this.$el.on(i,o,n)}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(t){this.options&&(t=a.extend({},a.result(this,"options"),t)),a.extend(this,a.pick(t,k)),this.options=t},_ensureElement:function(){if(this.el)this.setElement(a.result(this,"el"),!1);else{var e=a.extend({},a.result(this,"attributes"));this.id&&(e.id=a.result(this,"id")),this.className&&(e["class"]=a.result(this,"className"));var n=t.$("<"+a.result(this,"tagName")+">").attr(e);this.setElement(n,!1)}}}),t.sync=function(e,n,r){var i=T[e];a.defaults(r||(r={}),{emulateHTTP:t.emulateHTTP,emulateJSON:t.emulateJSON});var o={type:i,dataType:"json"};if(r.url||(o.url=a.result(n,"url")||P()),null!=r.data||!n||"create"!==e&&"update"!==e&&"patch"!==e||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||n.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){o.type="POST",r.emulateJSON&&(o.data._method=i);var s=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",i),s?s.apply(this,arguments):void 0}}"GET"===o.type||r.emulateJSON||(o.processData=!1),"PATCH"!==o.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var u=r.xhr=t.ajax(a.extend(o,r));return n.trigger("request",n,u,r),u};var T={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};t.ajax=function(){return t.$.ajax.apply(t.$,arguments)};var _=t.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},N=/\((.*?)\)/g,S=/(\(\?)?:\w+/g,$=/\*\w+/g,E=/[\-{}\[\]+?.,\\\^$|#\s]/g;a.extend(_.prototype,u,{initialize:function(){},route:function(e,n,r){a.isRegExp(e)||(e=this._routeToRegExp(e)),a.isFunction(n)&&(r=n,n=""),r||(r=this[n]);var i=this;return t.history.route(e,function(o){var s=i._extractParameters(e,o);r&&r.apply(i,s),i.trigger.apply(i,["route:"+n].concat(s)),i.trigger("route",n,s),t.history.trigger("route",i,n,s)}),this},navigate:function(e,n){return t.history.navigate(e,n),this},_bindRoutes:function(){if(this.routes){this.routes=a.result(this,"routes");for(var t,e=a.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(E,"\\$&").replace(N,"(?:$1)?").replace(S,function(t,e){return e?t:"([^/]+)"}).replace($,"(.*?)"),new RegExp("^"+t+"$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return a.map(n,function(t){return t?decodeURIComponent(t):null})}});var j=t.History=function(){this.handlers=[],a.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},M=/^[#\/]|\s+$/g,D=/^\/+|\/+$/g,A=/msie [\w.]+/,O=/\/$/;j.started=!1,a.extend(j.prototype,u,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var n=this.root.replace(O,"");t.indexOf(n)||(t=t.substr(n.length))}else t=this.getHash();return t.replace(M,"")},start:function(e){if(j.started)throw new Error("Backbone.history has already been started");j.started=!0,this.options=a.extend({},{root:"/"},this.options,e),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var n=this.getFragment(),r=document.documentMode,i=A.exec(navigator.userAgent.toLowerCase())&&(!r||7>=r);this.root=("/"+this.root+"/").replace(D,"/"),i&&this._wantsHashChange&&(this.iframe=t.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(n)),this._hasPushState?t.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!i?t.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=n;var o=this.location,s=o.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!s?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&s&&o.hash&&(this.fragment=this.getHash().replace(M,""),this.history.replaceState({},document.title,this.root+this.fragment+o.search)),this.options.silent?void 0:this.loadUrl())
27
+ },stop:function(){t.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),j.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(){var t=this.getFragment();return t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment?!1:(this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash()),void 0)},loadUrl:function(t){var e=this.fragment=this.getFragment(t),n=a.any(this.handlers,function(t){return t.route.test(e)?(t.callback(e),!0):void 0});return n},navigate:function(t,e){if(!j.started)return!1;if(e&&e!==!0||(e={trigger:e}),t=this.getFragment(t||""),this.fragment!==t){this.fragment=t;var n=this.root+t;if(this._hasPushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}e.trigger&&this.loadUrl(t)}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),t.history=new j;var R=function(t,e){var n,r=this;n=t&&a.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},a.extend(n,r,e);var i=function(){this.constructor=n};return i.prototype=r.prototype,n.prototype=new i,t&&a.extend(n.prototype,t),n.__super__=r.prototype,n};p.extend=g.extend=_.extend=x.extend=j.extend=R;var P=function(){throw new Error('A "url" property or function must be specified')},L=function(t,e){var n=e.error;e.error=function(r){n&&n(t,r,e),t.trigger("error",t,r,e)}}}.call(this),/* ===================================================
28
28
  * bootstrap-transition.js v2.3.1
29
29
  * http://twitter.github.com/bootstrap/javascript.html#transitions
30
30
  * ===================================================
@@ -259,5 +259,5 @@ function(t,e){function n(t,e,n,r){var i,o,s,a,u,l,c,h,f,p;if((e?e.ownerDocument|
259
259
  * See the License for the specific language governing permissions and
260
260
  * limitations under the License.
261
261
  * ========================================================== */
262
- !function(t){"use strict";var e=function(e,n){this.options=t.extend({},t.fn.affix.defaults,n),this.$window=t(window).on("scroll.affix.data-api",t.proxy(this.checkPosition,this)).on("click.affix.data-api",t.proxy(function(){setTimeout(t.proxy(this.checkPosition,this),1)},this)),this.$element=t(e),this.checkPosition()};e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e,n=t(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),o=this.options.offset,s=o.bottom,a=o.top,u="affix affix-top affix-bottom";"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof s&&(s=o.bottom()),e=null!=this.unpin&&r+this.unpin<=i.top?!1:null!=s&&i.top+this.$element.height()>=n-s?"bottom":null!=a&&a>=r?"top":!1,this.affixed!==e&&(this.affixed=e,this.unpin="bottom"==e?i.top-r:null,this.$element.removeClass(u).addClass("affix"+(e?"-"+e:"")))}};var n=t.fn.affix;t.fn.affix=function(n){return this.each(function(){var r=t(this),i=r.data("affix"),o="object"==typeof n&&n;i||r.data("affix",i=new e(this,o)),"string"==typeof n&&i[n]()})},t.fn.affix.Constructor=e,t.fn.affix.defaults={offset:0},t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),n=e.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),e.affix(n)})})}(window.jQuery),function(){var t=this,e=t.humanize,n={};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=n),exports.humanize=n):("function"==typeof define&&define.amd&&define("humanize",function(){return n}),t.humanize=n),n.noConflict=function(){return t.humanize=e,this},n.pad=function(t,e,n,r){if(t+="",n?n.length>1&&(n=n.charAt(0)):n=" ",r=void 0===r?"left":"right","right"===r)for(;t.length<e;)t+=n;else for(;t.length<e;)t=n+t;return t},n.time=function(){return(new Date).getTime()/1e3};var r=[0,0,31,59,90,120,151,181,212,243,273,304,334],i=[0,0,31,60,91,121,152,182,213,244,274,305,335];n.date=function(t,e){var o=void 0===e?new Date:e instanceof Date?new Date(e):new Date(1e3*e),s=/\\?([a-z])/gi,a=function(t,e){return c[t]?c[t]():e},u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"],c={d:function(){return n.pad(c.j(),2,"0")},D:function(){return c.l().slice(0,3)},j:function(){return o.getDate()},l:function(){return u[c.w()]},N:function(){return c.w()||7},S:function(){var t=c.j();return t>4&&21>t?"th":{1:"st",2:"nd",3:"rd"}[t%10]||"th"},w:function(){return o.getDay()},z:function(){return(c.L()?i[c.n()]:r[c.n()])+c.j()-1},W:function(){var t=c.z()-c.N()+1.5;return n.pad(1+Math.floor(Math.abs(t)/7)+(t%7>3.5?1:0),2,"0")},F:function(){return l[o.getMonth()]},m:function(){return n.pad(c.n(),2,"0")},M:function(){return c.F().slice(0,3)},n:function(){return o.getMonth()+1},t:function(){return new Date(c.Y(),c.n(),0).getDate()},L:function(){return 1===new Date(c.Y(),1,29).getMonth()?1:0},o:function(){var t=c.n(),e=c.W();return c.Y()+(12===t&&9>e?-1:1===t&&e>9)},Y:function(){return o.getFullYear()},y:function(){return String(c.Y()).slice(-2)},a:function(){return o.getHours()>11?"pm":"am"},A:function(){return c.a().toUpperCase()},B:function(){var t=o.getTime()/1e3,e=t%86400+3600;0>e&&(e+=86400);var n=e/86.4%1e3;return 0>t?Math.ceil(n):Math.floor(n)},g:function(){return c.G()%12||12},G:function(){return o.getHours()},h:function(){return n.pad(c.g(),2,"0")},H:function(){return n.pad(c.G(),2,"0")},i:function(){return n.pad(o.getMinutes(),2,"0")},s:function(){return n.pad(o.getSeconds(),2,"0")},u:function(){return n.pad(1e3*o.getMilliseconds(),6,"0")},O:function(){var t=o.getTimezoneOffset(),e=Math.abs(t);return(t>0?"-":"+")+n.pad(100*Math.floor(e/60)+e%60,4,"0")},P:function(){var t=c.O();return t.substr(0,3)+":"+t.substr(3,2)},Z:function(){return 60*-o.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(s,a)},r:function(){return"D, d M Y H:i:s O".replace(s,a)},U:function(){return o.getTime()/1e3||0}};return t.replace(s,a)},n.numberFormat=function(t,e,n,r){e=isNaN(e)?2:Math.abs(e),n=void 0===n?".":n,r=void 0===r?",":r;var i=0>t?"-":"";t=Math.abs(+t||0);var o=parseInt(t.toFixed(e),10)+"",s=o.length>3?o.length%3:0;return i+(s?o.substr(0,s)+r:"")+o.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+r)+(e?n+Math.abs(t-o).toFixed(e).slice(2):"")},n.naturalDay=function(t,e){t=void 0===t?n.time():t,e=void 0===e?"Y-m-d":e;var r=86400,i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime()/1e3;return o>t&&t>=o-r?"yesterday":t>=o&&o+r>t?"today":t>=o+r&&o+2*r>t?"tomorrow":n.date(e,t)},n.relativeTime=function(t){t=void 0===t?n.time():t;var e=n.time(),r=e-t;if(2>r&&r>-2)return(r>=0?"just ":"")+"now";if(60>r&&r>-60)return r>=0?Math.floor(r)+" seconds ago":"in "+Math.floor(-r)+" seconds";if(120>r&&r>-120)return r>=0?"about a minute ago":"in about a minute";if(3600>r&&r>-3600)return r>=0?Math.floor(r/60)+" minutes ago":"in "+Math.floor(-r/60)+" minutes";if(7200>r&&r>-7200)return r>=0?"about an hour ago":"in about an hour";if(86400>r&&r>-86400)return r>=0?Math.floor(r/3600)+" hours ago":"in "+Math.floor(-r/3600)+" hours";var i=172800;if(i>r&&r>-i)return r>=0?"1 day ago":"in 1 day";var o=2505600;if(o>r&&r>-o)return r>=0?Math.floor(r/86400)+" days ago":"in "+Math.floor(-r/86400)+" days";var s=5184e3;if(s>r&&r>-s)return r>=0?"about a month ago":"in about a month";var a=parseInt(n.date("Y",e),10),u=parseInt(n.date("Y",t),10),l=12*a+parseInt(n.date("n",e),10),c=12*u+parseInt(n.date("n",t),10),h=l-c;if(12>h&&h>-12)return h>=0?h+" months ago":"in "+-h+" months";var f=a-u;return 2>f&&f>-2?f>=0?"a year ago":"in a year":f>=0?f+" years ago":"in "+-f+" years"},n.ordinal=function(t){t=parseInt(t,10),t=isNaN(t)?0:t;var e=0>t?"-":"";t=Math.abs(t);var n=t%100;return e+t+(n>4&&21>n?"th":{1:"st",2:"nd",3:"rd"}[t%10]||"th")},n.filesize=function(t,e,r,i,o){if(e=void 0===e?1024:e,r=isNaN(r)?2:Math.abs(r),i=void 0===i?".":i,o=void 0===o?",":o,0>=t)return"0 bytes";var s=[1],a=["bytes","Kb","Mb","Gb","Tb","Pb"];if(e>t)return n.numberFormat(t,0)+" "+a[0];for(var u=1;u<a.length;u++)if(s[u]=s[u-1]*e,t<s[u])return n.numberFormat(t/s[u-1],r,i,o)+" "+a[u-1];return n.numberFormat(t/s[a.length-1],r,i,o)+" "+a[a.length-1]},n.linebreaks=function(t){return t=t.replace(/^([\n|\r]*)/,""),t=t.replace(/([\n|\r]*)$/,""),t=t.replace(/(\r\n|\n|\r)/g,"\n"),t=t.replace(/(\n{2,})/g,"</p><p>"),t=t.replace(/\n/g,"<br />"),"<p>"+t+"</p>"},n.nl2br=function(t){return t.replace(/(\r\n|\n|\r)/g,"<br />")},n.truncatechars=function(t,e){return t.length<=e?t:t.substr(0,e)+"…"},n.truncatewords=function(t,e){var n=t.split(" ");return n.length<e?t:n.slice(0,e).join(" ")+"…"}}.call(this),function(){this.JST||(this.JST={}),this.JST.cluster=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a;for(n.push("<h3 align=center> "),n.push(r(this.model.get("name"))),n.push(' </h3>\n\n<ul class="pager fixed">\n '),this.prevCluster?(n.push('\n <li class="previous nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(o=this.prevCluster)?o.get("routeURL"):void 0)),n.push('">&larr; Prev</a></li>\n ')):n.push('\n <li class="previous disabled nosel"><a>&larr; Prev</a></li>\n '),n.push("\n \n "),this.nextCluster?(n.push('\n <li class="next nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(s=this.nextCluster)?s.get("routeURL"):void 0)),n.push('">Next &rarr;</a></li>\n ')):n.push('\n <li class="next disabled nosel"><a>Next &rarr;</a></li>\n '),n.push('\n </li>\n</ul>\n\n\n</br>\n<table class="table table-striped table-bordered">\n <tr>\n <th>Client Connections</th>\n <th>Client EOF</th>\n <th>Client Errors</th>\n <th>Forward Errors</th>\n <th>Fragments</th>\n <th>Server Ejects</th>\n </tr>\n <tr>\n <td>'),n.push(r(this.model.get("client_connections"))),n.push("</td>\n <td>"),n.push(r(this.model.get("client_eof"))),n.push("</td>\n <td>"),n.push(r(this.model.get("client_err"))),n.push("</td>\n <td>"),n.push(r(this.model.get("forward_error"))),n.push("</td>\n <td>"),n.push(r(this.model.get("fragments"))),n.push("</td>\n <td>"),n.push(r(this.model.get("server_ejects"))),n.push('</td>\n </tr>\n\n</table>\n\n</br>\n<div class="chartsBox">\n <div class="row">\n <div class="span5">\n <div id="chart1" style="padding-left: 23%"></div>\n </div>\n <div class="span5">\n <div id="chart2" style="padding-left: 40%"></div>\n </div>\n </div>\n</div>\n\n\n</br>\n<table class="table table-striped table-bordered">\n <thead>\n <tr>\n <th>Host</th>\n <th>Used Memory</th>\n <th>Free Memory</th>\n <th>Used Memory RSS</th>\n <th>Max Memory</th>\n <th>Fragmentation</th>\n </tr>\n </thead>\n <tbody>\n '),a=this.model.get("nodes").models,e=0,i=a.length;i>e;e++)t=a[e],n.push('\n <tr>\n <td><a href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("hostname"))),n.push("</a></td>\n <td>"),n.push(r(humanize.filesize(t.get("usedMemory")))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(t.get("freeMemory")))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(t.get("usedMemoryRss")))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(t.get("maxMemory")))),n.push("</td>\n <td>"),n.push(r(t.get("fragmentation"))),n.push("</td>\n </tr>\n ");n.push("\n <tr>\n <td>&nbsp;</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("usedMemory")).sum()))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("freeMemory")).sum()))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("usedMemoryRss")).sum()))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("maxMemory")).sum()))),n.push("</td>\n <td>~"),n.push(r(humanize.numberFormat(_(this.model.get("nodes").pluck("fragmentation")).average(),2))),n.push("</td>\n </tr>\n </tbody>\n</table>\n\n\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.config=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a,u,l;for(n.push("\n<h3> Clusters </h3>\n<br/>\n"),u=_(this.model.get("config")).map(function(t,e){return[e,t]}),i=0,s=u.length;s>i;i++){for(e=u[i],n.push('\n <table class="table table-striped table-bordered">\n <tr><th>Name</th><td>'),n.push("<a href="+Nutcracker.Models.Cluster.routeURL(e[0])+">"+e[0]+"</a>"),n.push("</td></tr>\n <tr><th>Servers</th><td>"),n.push(e[1].servers.map(function(t){return"<a href="+Nutcracker.Models.Node.routeURL(t)+">"+t+"</a>"}).join("<br/>")),n.push("</td></tr>\n "),l=_(e[1]).map(function(t,e){return[e,t]}),o=0,a=l.length;a>o;o++)t=l[o],n.push("\n "),/servers/.test(t[0])||(n.push("\n <tr><th>"),n.push(r(t[0])),n.push("</th><td>"),n.push(r(t[1])),n.push("</td></tr>\n ")),n.push("\n ");n.push("\n </table>\n </br>\n")}n.push("\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.footer=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){n.push("Last Update "),n.push(r(humanize.relativeTime(this.model.get("timestamp")))),n.push("\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.navbar=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a,u,l;for(n.push('<div class="navbar">\n <div class="navbar-inner">\n <div class="container" style="font-size: 17px">\n <a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse">\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n </a>\n <a class="brand" href="#" style="color: #ffffff;font-size: 25px">Nutcracker</a>\n <div class="nav-collapse collapse navbar-responsive-collapse">\n <ul class="nav">\n <li class="divider-vertical"></li>\n <li id="overview" ><a href="#/">Overview</a></li>\n <li class="divider-vertical"></li>\n <li id="config" ><a href="#/config">Config </a></li>\n <li class="divider-vertical"></li>\n <li id="clusters" class="dropdown">\n <a class="dropdown-toggle" id="drop4" style="padding-top: 12px;" role="button" data-toggle="dropdown" href="#">Clusters <b class="caret"></b></a>\n <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">\n <li class=\'divider\'></li>\n '),u=this.model.get("clusters").models,i=0,s=u.length;s>i;i++)t=u[i],n.push('\n <li role="presentation" style="font-size: 15px">\n <a role="menuitem" tabindex="-1" href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("name"))),n.push("</a>\n </li>\n <li class='divider'></li>\n ");for(n.push('\n </ul>\n </li>\n\n <li class="divider-vertical"></li>\n <li id="nodes" class="dropdown">\n <a class="dropdown-toggle" id="drop5" style="padding-top: 12px;" role="button" data-toggle="dropdown" href="#">Nodes <b class="caret"></b></a>\n <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop5">\n <li class=\'divider\'></li>\n '),l=this.model.nodes().models,o=0,a=l.length;a>o;o++)e=l[o],n.push('\n <li role="presentation" style="font-size: 15px">\n <a role="menuitem" tabindex="-1" href="'),n.push(r(e.get("routeURL"))),n.push('">'),n.push(r(e.get("hostname"))),n.push("</a>\n </li>\n <li class='divider'></li>\n ");n.push('\n </ul>\n </li>\n\n <li class="divider-vertical"></li>\n </ul>\n\n <ul class="nav pull-right">\n <li class="divider-vertical"></li>\n <li class="no-hl"><a>Version '),n.push(r(this.model.get("version"))),n.push('</a></li>\n <li class="divider-vertical"></li>\n </ul>\n </div><!-- /.nav-collapse -->\n </div>\n </div><!-- /navbar-inner -->\n</div><!-- /navbar -->\n')}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.node=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a;for(n.push("<h3 align=center>"),n.push(r(this.model.get("hostname"))),n.push('</h3>\n\n<ul class="pager">\n '),this.prevNode?(n.push('\n <li class="previous nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(o=this.prevNode)?o.get("routeURL"):void 0)),n.push('">&larr; Prev</a></li>\n ')):n.push('\n <li class="previous disabled nosel"><a>&larr; Prev</a></li>\n '),n.push("\n \n "),s=this.model.get("clusters"),e=0,i=s.length;i>e;e++)t=s[e],n.push('\n <li class="nosel"><a class="nextPrevButton" href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("name"))),n.push("</a></li>\n ");n.push("\n\n "),this.nextNode?(n.push('\n <li class="next nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(a=this.nextNode)?a.get("routeURL"):void 0)),n.push('">Next &rarr;</a></li>\n ')):n.push('\n <li class="next disabled nosel"><a>Next &rarr;</a></li>\n '),n.push('\n </li>\n</ul>\n</br>\n<div class="chartsBox">\n <div class="row">\n <div class="span5">\n <div id="chart1" style="padding-left: 26%"></div>\n </div>\n <div class="span5">\n <div id="chart2" style="padding-left: 40%"></div>\n </div>\n </div>\n</div>\n\n<br/>\n<div class="row-fluid">\n <div class="span6">\n <h4> Cluster <-> Node Stats </h4>\n <table class="table table-striped table-bordered">\n <tr><th>In-Queue</th><td> '),n.push(r(this.model.get("in_queue"))),n.push("</td></tr>\n <tr><th>In-Queue Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("in_queue_bytes")))),n.push("</td></tr>\n <tr><th>Out-Queue</th><td> "),n.push(r(this.model.get("out_queue"))),n.push("</td></tr>\n <tr><th>Out-Queue Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("out_queue_bytes")))),n.push("</td></tr>\n <tr><th>Requests</th><td> "),n.push(r(this.model.get("requests"))),n.push("</td></tr>\n <tr><th>Requests Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("request_bytes")))),n.push("</td></tr>\n <tr><th>Responses</th><td> "),n.push(r(this.model.get("responses"))),n.push("</td></tr>\n <tr><th>Responses Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("response_bytes")))),n.push("</td></tr>\n <tr><th>Server Connections</th><td> "),n.push(r(this.model.get("server_connections"))),n.push("</td></tr>\n <tr><th>Server EOF</th><td> "),n.push(r(this.model.get("server_eof"))),n.push("</td></tr>\n <tr><th>Server Error</th><td> "),n.push(r(this.model.get("server_err"))),n.push("</td></tr>\n <tr><th>Server Timedout</th><td> "),n.push(r(this.model.get("server_timedout"))),n.push('</td></tr>\n </table>\n </div>\n\n <div class="span6">\n <h4>Node Stats</h3>\n <table class="table table-striped table-bordered">\n <tr><th>Hits</th><td> '),n.push(r(humanize.numberFormat(this.model.get("info").hits,0))),n.push("</td></tr>\n <tr><th>Misses</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").misses,0))),n.push("</td></tr>\n <tr><th>Hit Ratio</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").hit_ratio,2))),n.push("</td></tr>\n <tr><th>Max Memory</th><td> "),n.push(r(humanize.filesize(this.model.get("info").max_memory))),n.push("</td></tr>\n <tr><th>Used Memory</th><td> "),n.push(r(humanize.filesize(this.model.get("info").used_memory))),n.push("</td></tr>\n <tr><th>Used Memory RSS</th><td> "),n.push(r(humanize.filesize(this.model.get("info").used_memory_rss))),n.push("</td></tr>\n <tr><th>Connections</th><td> "),n.push(r(this.model.get("info").connections)),n.push("</td></tr>\n <tr><th>Keys</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").keys,0))),n.push("</td></tr>\n <tr><th>Evicted Keys</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").evicted_keys,0))),n.push("</td></tr>\n <tr><th>Expired Keys</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").expired_keys,0))),n.push("</td></tr>\n <tr><th>Fragmentation</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").fragmentation,2))),n.push("</td></tr>\n <tr><th>&nbsp;</th><td> &nbsp;</td></tr>\n </table>\n </div>\n\n</div>\n\n\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.overview=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a,u,l;for(n.push('<h3> Overview </h3>\n<br/>\n<table class="table table-striped table-bordered">\n <tbody>\n <tr><th>Hostname</th><td>'),n.push(r(this.model.get("source"))),n.push("</td></tr>\n <tr><th>Service</th><td>Nutcracker Ver. "),n.push(r(this.model.get("version"))),n.push("</td></tr>\n <tr><th>Uptime</th><td>"),n.push(r(humanize.relativeTime((new Date-1e3*this.model.get("uptime"))/1e3))),n.push("</td></tr>\n <tr><th>Server Connections</th><td>"),n.push(r(this.model.get("serverConnections"))),n.push("</td></tr>\n <tr><th>Client Connections</th><td>"),n.push(r(this.model.get("clientConnections"))),n.push("</td></tr>\n\n <tr>\n <th>Total Clusters</th>\n <td>\n "),u=this.model.get("clusters").models,i=0,s=u.length;s>i;i++)t=u[i],n.push('\n <a href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("name"))),n.push("</a><br/>\n ");for(n.push("\n </td>\n </tr>\n\n <tr>\n <th>Total Nodes</th>\n <td>\n "),l=this.model.nodes().models,o=0,a=l.length;a>o;o++)e=l[o],n.push('\n <a href="'),n.push(r(e.get("routeURL"))),n.push('">'),n.push(r(e.get("hostname"))),n.push("</a><br/>\n ");n.push("\n </td>\n </tr>\n \n\n </tbody>\n</table>\n\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){window.Nutcracker={Models:{},Collections:{},Views:{},Routers:{},Utils:{},initialize:function(){var t;return t=new Nutcracker.Models.Overview($("#container").data("clusters")),Nutcracker.overview=t,Nutcracker.screen=new Nutcracker.Utils.RegionManager,Nutcracker.screen.navbar(new Nutcracker.Views.Navbar({model:t})),Nutcracker.screen.footer(new Nutcracker.Views.Footer({model:t})),Nutcracker.router=new Nutcracker.Routers.Overview,Backbone.history.start()}},$(document).ready(function(){return Nutcracker.initialize()})}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Collections.Clusters=function(n){function i(){return this.initialize=e(this.initialize,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.initialize=function(){return this.model=Nutcracker.Models.Cluster},i}(Backbone.Collection)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Collections.Nodes=function(n){function i(){return this.usedMemory=e(this.usedMemory,this),this.maxMemory=e(this.maxMemory,this),this.freeMemory=e(this.freeMemory,this),this.serverConnections=e(this.serverConnections,this),this.add=e(this.add,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.initialize=function(){return this.model=Nutcracker.Models.Node},i.prototype.add=function(t){return this.any(function(e){return e.get("server_url")===t[0].server_url})||i.__super__.add.apply(this,arguments)},i.prototype.serverConnections=function(){return _(this.pluck("server_connections")).sum()},i.prototype.freeMemory=function(){return _(this.pluck("freeMemory")).sum()},i.prototype.maxMemory=function(){return _(this.pluck("maxMemory")).sum()},i.prototype.usedMemory=function(){return _(this.pluck("usedMemory")).sum()},i}(Backbone.Collection)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Models.Cluster=function(n){function i(){return this.set=e(this.set,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.routeURL=function(t){return"#/clusters/"+t},i.prototype.initialize=function(){return this.set("routeURL",this.constructor.routeURL(this.get("name")))},i.prototype.set=function(t,e){var n,r=this;return null==t.nodes||t.nodes instanceof Nutcracker.Collections.Nodes||(t.nodes=new Nutcracker.Collections.Nodes(t.nodes)),null!=(n=t.nodes)&&n.map(function(t){return t.get("clusters").push(r),t.set("clusters",_(t.get("clusters")).uniq())}),Backbone.Model.prototype.set.call(this,t,e)},i}(Backbone.Model)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Models.Node=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.routeURL=function(t){return"#/nodes/"+t.split(":").slice(0,2).join(":")},r.prototype.initialize=function(){var t;return this.set("clusters",[]),this.set("hostname",null!=(t=this.get("server_url"))?t.replace(/redis:\/\//,""):void 0),this.set("maxMemory",this.get("info").max_memory),this.set("usedMemory",this.get("info").used_memory),this.set("freeMemory",this.get("info").max_memory-this.get("info").used_memory),this.set("usedMemoryRss",this.get("info").used_memory_rss),this.set("fragmentation",this.get("info").fragmentation),this.get("freeMemory")<0&&this.set("freeMemory",0),this.set("hits",this.get("info").hits),this.set("misses",this.get("info").misses),0===this.get("maxMemory")&&this.set("maxMemory",this.get("usedMemory")),0===this.get("hits")&&this.set("hits",1),this.set("routeURL",this.constructor.routeURL(this.get("hostname")))},r}(Backbone.Model)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Models.Overview=function(n){function i(){return this.clusters=e(this.clusters,this),this.nodes=e(this.nodes,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.initialize=function(){var t,e,n,r,i,o;for(t=_(this.get("clusters").pluck("client_connections")).sum(),n=0,o=this.get("clusters").pluck("nodes"),r=0,i=o.length;i>r;r++)e=o[r],n+=e.serverConnections();return this.set("serverConnections",n),this.set("clientConnections",t)},i.prototype.nodes=function(){return new Backbone.Collection(_(this.get("clusters").pluck("nodes")).chain().pluck("models").uniq(function(t){return t.server_name}).flatten().value())},i.prototype.clusters=function(){return this.get("clusters")},i.prototype.set=function(t,e){return null==t.clusters||t.clusters instanceof Nutcracker.Collections.Clusters||(t.clusters=new Nutcracker.Collections.Clusters(t.clusters)),Backbone.Model.prototype.set.call(this,t,e)},i}(Backbone.Model)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Routers.Overview=function(n){function i(){return this._show=e(this._show,this),this.showConfig=e(this.showConfig,this),this.showNode=e(this.showNode,this),this.showCluster=e(this.showCluster,this),this.showOverview=e(this.showOverview,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.routes={"":"showOverview",config:"showConfig","clusters/:cluster":"showCluster","nodes/:node":"showNode"},i.prototype.initialize=function(){return this.showOverview()},i.prototype.showOverview=function(){return this._show(Nutcracker.Views.Overview)},i.prototype.showCluster=function(t){var e,n;return e=Nutcracker.overview.clusters(),n=e.findWhere({name:t}),this._show(Nutcracker.Views.Cluster,{model:n,collection:e})},i.prototype.showNode=function(t){var e,n;return e=Nutcracker.overview.nodes(),n=e.findWhere({hostname:t}),this._show(Nutcracker.Views.Node,{model:n,collection:e})},i.prototype.showConfig=function(){return this._show(Nutcracker.Views.Config)},i.prototype._show=function(t,e){return null==e&&(e={model:Nutcracker.overview}),Nutcracker.screen.body(new t(e))},i}(Backbone.Router)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Nutcracker.Utils.RegionManager=function(){function e(e,n,r,i){this.navbarID=null!=e?e:"#navbar",this.bodyID=null!=n?n:"#container",this.footerID=null!=r?r:"#footer",this.current=null!=i?i:{},this._render=t(this._render,this),this.footer=t(this.footer,this),this.body=t(this.body,this),this.navbar=t(this.navbar,this)}return e.prototype.navbar=function(t){return this._render(this.navbarID,t)},e.prototype.body=function(t){return this._render(this.bodyID,t)},e.prototype.footer=function(t){return this._render(this.footerID,t)},e.prototype._render=function(t,e){var n;return $(t).html(e.render().el),null!=(n=this.current[t])&&n.remove,this.current[t]=e},e}()}.call(this),function(){_.prototype.sum=function(){return _.reduce(this._wrapped,function(t,e){return t+e},0)},_.prototype.average=function(){return this.sum()/parseFloat(this._wrapped.length)}}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Backbone.GoogleChart=function(n){function i(){return this.listen=e(this.listen,this),this.render=e(this.render,this),this.id=e(this.id,this),this.onGoogleLoad=e(this.onGoogleLoad,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.initialize=function(t){var e,n=this;return e=_.extend({},t),["el","id","attributes","className","tagName"].map(function(t){return delete e[t]}),google.load("visualization","1",{packages:["corechart"],callback:function(){return n.onGoogleLoad("loaded")}}),this.onGoogleLoad(function(){var t,r;return n.google=google.visualization,e.dataTable instanceof Array&&(e.dataTable=n.google.arrayToDataTable(e.dataTable)),(e.beforeDraw||function(){})(n,e),(t=e.formatter)&&function(){r=[];for(var t=0,n=e.dataTable.getNumberOfRows()-1;n>=0?n>=t:t>=n;n>=0?t++:t--)r.push(t);return r}.apply(this).map(function(n){return t.columns.map(function(r){return e.dataTable.setFormattedValue(n,r,t.callback(e.dataTable.getValue(n,r)))})}),n.wrapper=new n.google.ChartWrapper(e),["ready","select","error"].map(n.listen)})},i.prototype.onGoogleLoad=function(t){return"loaded"===t?(this.googleLoaded=!0,_(this.onGoogleLoadItems).map(function(t){return t()})):this.googleLoaded?t():(this.onGoogleLoadItems||(this.onGoogleLoadItems=[])).push(t)},i.watch=function(t,e){var n,r;return(i._list||(i._list={}))[t]=e,i._watching?void 0:(i._watching=!0,r=10,(n=function(){return _(i._list).map(function(t,e){return $(e)[0]?t()||delete i._list[e]:void 0}),_(i._list).isEmpty()?i._watching=!1:setTimeout(n,r+=10)})())},i.prototype.id=function(){var t;return(null!=(t=this.el)?t.id:void 0)||this.randomID()},i.prototype.render=function(){var t=this;return this.onGoogleLoad(function(){return t.constructor.watch("#"+t.el.id,function(){return t.wrapper.draw(t.el.id)})}),this},i.prototype.listen=function(t){var e=this;return this.google.events.addListener(this.wrapper,t,function(){return e.trigger(t,e.wrapper.getChart())})},i.prototype.randomID=function(){return _.uniqueId("gc_")},i}.call(this,Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t
263
- }for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Cluster=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.cluster,r.prototype.render=function(){var t,e,n,r=this;return this.curIndex=this.collection.indexOf(this.model),this.nextCluster=this.collection.at(this.curIndex+1),this.prevCluster=this.collection.at(this.curIndex-1),this.$el.html(this.template({model:this.model,nextCluster:this.nextCluster,prevCluster:this.prevCluster})),n={is3D:!0,titleTextStyle:{fontSize:17.5,color:"#333333"},width:300,height:300,sliceVisibilityThreshold:0,chartArea:{width:"100%",height:"80%"},legend:{position:"bottom"}},e=[["Node","Node"]],this.model.get("nodes").map(function(t){return e.push([t.get("hostname"),t.get("maxMemory")])}),t=new Backbone.GoogleChart({formatter:{callback:humanize.filesize,columns:[1]},chartType:"PieChart",options:n,dataTable:e}),t.on("select",function(t){return Nutcracker.router.navigate(r.model.get("nodes").at(t.getSelection()[0].row).get("routeURL"),{trigger:!0})}),this.$el.find("#chart2").html(t.render().el),this.$el.find("#chart1").html(new Backbone.GoogleChart({formatter:{callback:humanize.filesize,columns:[1]},chartType:"PieChart",options:n,dataTable:[["Memory","Memory"],["Free",this.model.get("nodes").freeMemory()],["Used",this.model.get("nodes").usedMemory()]]}).render().el),this},r}(Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Config=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.config,r.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this},r}(Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Footer=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.className="container navbar navbar-fixed-bottom navbar-inverse",r.prototype.template=JST.footer,r.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this},r}(Backbone.View)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Views.Navbar=function(n){function i(){return this.routeChange=e(this.routeChange,this),this.activate=e(this.activate,this),this.initialize=e(this.initialize,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.className="navbar navbar-inverse navbar-fixed-top",i.prototype.template=JST.navbar,i.prototype.initialize=function(){return Backbone.history.bind("all",this.routeChange)},i.prototype.render=function(){return $(this.el).html(this.template({model:this.model})),this},i.prototype.resetButtons=function(){return this.$el.find("li").removeClass("active")},i.prototype.activate=function(t){return this.$(t).addClass("active")},i.prototype.routeChange=function(t,e,n){return this.resetButtons(),/showOverview/g.test(n)&&this.activate("#overview"),/showConfig/.test(n)?this.activate("#config"):/showCluster/gi.test(n)?this.activate("#clusters"):/showNode/gi.test(n)?this.activate("#nodes"):void 0},i}(Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Node=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.node,r.prototype.render=function(){var t;return this.curIndex=this.collection.indexOf(this.model),this.nextNode=this.collection.at(this.curIndex+1),this.prevNode=this.collection.at(this.curIndex-1),t={is3D:!0,titleTextStyle:{fontSize:17.5,color:"#333333"},titleTextStyle:{fontSize:17.5,color:"#333333"},width:300,height:300,sliceVisibilityThreshold:0,chartArea:{width:"100%",height:"80%"},legend:{position:"bottom"}},this.$el.html(this.template({model:this.model,nextNode:this.nextNode,prevNode:this.prevNode})),this.$el.find("#chart1").append(new Backbone.GoogleChart({chartType:"PieChart",formatter:{callback:humanize.filesize,columns:[1]},options:_({title:"Memory"}).extend(t),dataTable:[["Memory","Memory"],["Free",this.model.get("freeMemory")],["Used",this.model.get("usedMemory")]]}).render().el),this.$el.find("#chart2").append(new Backbone.GoogleChart({formatter:{callback:humanize.numberFormat,columns:[1]},chartType:"PieChart",options:_({title:"Hits"}).extend(t),dataTable:[["Memory","Memory"],["Hits",this.model.get("hits")],["Misses",this.model.get("misses")]]}).render().el),this},r}(Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Overview=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.overview,r.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this},r}(Backbone.View)}.call(this);
262
+ !function(t){"use strict";var e=function(e,n){this.options=t.extend({},t.fn.affix.defaults,n),this.$window=t(window).on("scroll.affix.data-api",t.proxy(this.checkPosition,this)).on("click.affix.data-api",t.proxy(function(){setTimeout(t.proxy(this.checkPosition,this),1)},this)),this.$element=t(e),this.checkPosition()};e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var e,n=t(document).height(),r=this.$window.scrollTop(),i=this.$element.offset(),o=this.options.offset,s=o.bottom,a=o.top,u="affix affix-top affix-bottom";"object"!=typeof o&&(s=a=o),"function"==typeof a&&(a=o.top()),"function"==typeof s&&(s=o.bottom()),e=null!=this.unpin&&r+this.unpin<=i.top?!1:null!=s&&i.top+this.$element.height()>=n-s?"bottom":null!=a&&a>=r?"top":!1,this.affixed!==e&&(this.affixed=e,this.unpin="bottom"==e?i.top-r:null,this.$element.removeClass(u).addClass("affix"+(e?"-"+e:"")))}};var n=t.fn.affix;t.fn.affix=function(n){return this.each(function(){var r=t(this),i=r.data("affix"),o="object"==typeof n&&n;i||r.data("affix",i=new e(this,o)),"string"==typeof n&&i[n]()})},t.fn.affix.Constructor=e,t.fn.affix.defaults={offset:0},t.fn.affix.noConflict=function(){return t.fn.affix=n,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),n=e.data();n.offset=n.offset||{},n.offsetBottom&&(n.offset.bottom=n.offsetBottom),n.offsetTop&&(n.offset.top=n.offsetTop),e.affix(n)})})}(window.jQuery),function(){var t=this,e=t.humanize,n={};"undefined"!=typeof exports?("undefined"!=typeof module&&module.exports&&(exports=module.exports=n),exports.humanize=n):("function"==typeof define&&define.amd&&define("humanize",function(){return n}),t.humanize=n),n.noConflict=function(){return t.humanize=e,this},n.pad=function(t,e,n,r){if(t+="",n?n.length>1&&(n=n.charAt(0)):n=" ",r=void 0===r?"left":"right","right"===r)for(;t.length<e;)t+=n;else for(;t.length<e;)t=n+t;return t},n.time=function(){return(new Date).getTime()/1e3};var r=[0,0,31,59,90,120,151,181,212,243,273,304,334],i=[0,0,31,60,91,121,152,182,213,244,274,305,335];n.date=function(t,e){var o=void 0===e?new Date:e instanceof Date?new Date(e):new Date(1e3*e),s=/\\?([a-z])/gi,a=function(t,e){return c[t]?c[t]():e},u=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],l=["January","February","March","April","May","June","July","August","September","October","November","December"],c={d:function(){return n.pad(c.j(),2,"0")},D:function(){return c.l().slice(0,3)},j:function(){return o.getDate()},l:function(){return u[c.w()]},N:function(){return c.w()||7},S:function(){var t=c.j();return t>4&&21>t?"th":{1:"st",2:"nd",3:"rd"}[t%10]||"th"},w:function(){return o.getDay()},z:function(){return(c.L()?i[c.n()]:r[c.n()])+c.j()-1},W:function(){var t=c.z()-c.N()+1.5;return n.pad(1+Math.floor(Math.abs(t)/7)+(t%7>3.5?1:0),2,"0")},F:function(){return l[o.getMonth()]},m:function(){return n.pad(c.n(),2,"0")},M:function(){return c.F().slice(0,3)},n:function(){return o.getMonth()+1},t:function(){return new Date(c.Y(),c.n(),0).getDate()},L:function(){return 1===new Date(c.Y(),1,29).getMonth()?1:0},o:function(){var t=c.n(),e=c.W();return c.Y()+(12===t&&9>e?-1:1===t&&e>9)},Y:function(){return o.getFullYear()},y:function(){return String(c.Y()).slice(-2)},a:function(){return o.getHours()>11?"pm":"am"},A:function(){return c.a().toUpperCase()},B:function(){var t=o.getTime()/1e3,e=t%86400+3600;0>e&&(e+=86400);var n=e/86.4%1e3;return 0>t?Math.ceil(n):Math.floor(n)},g:function(){return c.G()%12||12},G:function(){return o.getHours()},h:function(){return n.pad(c.g(),2,"0")},H:function(){return n.pad(c.G(),2,"0")},i:function(){return n.pad(o.getMinutes(),2,"0")},s:function(){return n.pad(o.getSeconds(),2,"0")},u:function(){return n.pad(1e3*o.getMilliseconds(),6,"0")},O:function(){var t=o.getTimezoneOffset(),e=Math.abs(t);return(t>0?"-":"+")+n.pad(100*Math.floor(e/60)+e%60,4,"0")},P:function(){var t=c.O();return t.substr(0,3)+":"+t.substr(3,2)},Z:function(){return 60*-o.getTimezoneOffset()},c:function(){return"Y-m-d\\TH:i:sP".replace(s,a)},r:function(){return"D, d M Y H:i:s O".replace(s,a)},U:function(){return o.getTime()/1e3||0}};return t.replace(s,a)},n.numberFormat=function(t,e,n,r){e=isNaN(e)?2:Math.abs(e),n=void 0===n?".":n,r=void 0===r?",":r;var i=0>t?"-":"";t=Math.abs(+t||0);var o=parseInt(t.toFixed(e),10)+"",s=o.length>3?o.length%3:0;return i+(s?o.substr(0,s)+r:"")+o.substr(s).replace(/(\d{3})(?=\d)/g,"$1"+r)+(e?n+Math.abs(t-o).toFixed(e).slice(2):"")},n.naturalDay=function(t,e){t=void 0===t?n.time():t,e=void 0===e?"Y-m-d":e;var r=86400,i=new Date,o=new Date(i.getFullYear(),i.getMonth(),i.getDate()).getTime()/1e3;return o>t&&t>=o-r?"yesterday":t>=o&&o+r>t?"today":t>=o+r&&o+2*r>t?"tomorrow":n.date(e,t)},n.relativeTime=function(t){t=void 0===t?n.time():t;var e=n.time(),r=e-t;if(2>r&&r>-2)return(r>=0?"just ":"")+"now";if(60>r&&r>-60)return r>=0?Math.floor(r)+" seconds ago":"in "+Math.floor(-r)+" seconds";if(120>r&&r>-120)return r>=0?"about a minute ago":"in about a minute";if(3600>r&&r>-3600)return r>=0?Math.floor(r/60)+" minutes ago":"in "+Math.floor(-r/60)+" minutes";if(7200>r&&r>-7200)return r>=0?"about an hour ago":"in about an hour";if(86400>r&&r>-86400)return r>=0?Math.floor(r/3600)+" hours ago":"in "+Math.floor(-r/3600)+" hours";var i=172800;if(i>r&&r>-i)return r>=0?"1 day ago":"in 1 day";var o=2505600;if(o>r&&r>-o)return r>=0?Math.floor(r/86400)+" days ago":"in "+Math.floor(-r/86400)+" days";var s=5184e3;if(s>r&&r>-s)return r>=0?"about a month ago":"in about a month";var a=parseInt(n.date("Y",e),10),u=parseInt(n.date("Y",t),10),l=12*a+parseInt(n.date("n",e),10),c=12*u+parseInt(n.date("n",t),10),h=l-c;if(12>h&&h>-12)return h>=0?h+" months ago":"in "+-h+" months";var f=a-u;return 2>f&&f>-2?f>=0?"a year ago":"in a year":f>=0?f+" years ago":"in "+-f+" years"},n.ordinal=function(t){t=parseInt(t,10),t=isNaN(t)?0:t;var e=0>t?"-":"";t=Math.abs(t);var n=t%100;return e+t+(n>4&&21>n?"th":{1:"st",2:"nd",3:"rd"}[t%10]||"th")},n.filesize=function(t,e,r,i,o){if(e=void 0===e?1024:e,r=isNaN(r)?2:Math.abs(r),i=void 0===i?".":i,o=void 0===o?",":o,0>=t)return"0 bytes";var s=[1],a=["bytes","Kb","Mb","Gb","Tb","Pb"];if(e>t)return n.numberFormat(t,0)+" "+a[0];for(var u=1;u<a.length;u++)if(s[u]=s[u-1]*e,t<s[u])return n.numberFormat(t/s[u-1],r,i,o)+" "+a[u-1];return n.numberFormat(t/s[a.length-1],r,i,o)+" "+a[a.length-1]},n.linebreaks=function(t){return t=t.replace(/^([\n|\r]*)/,""),t=t.replace(/([\n|\r]*)$/,""),t=t.replace(/(\r\n|\n|\r)/g,"\n"),t=t.replace(/(\n{2,})/g,"</p><p>"),t=t.replace(/\n/g,"<br />"),"<p>"+t+"</p>"},n.nl2br=function(t){return t.replace(/(\r\n|\n|\r)/g,"<br />")},n.truncatechars=function(t,e){return t.length<=e?t:t.substr(0,e)+"…"},n.truncatewords=function(t,e){var n=t.split(" ");return n.length<e?t:n.slice(0,e).join(" ")+"…"}}.call(this),function(){this.JST||(this.JST={}),this.JST.cluster=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a;for(n.push("<h3 align=center> "),n.push(r(this.model.get("name"))),n.push(' </h3>\n\n<ul class="pager fixed">\n '),this.prevCluster?(n.push('\n <li class="previous nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(o=this.prevCluster)?o.get("routeURL"):void 0)),n.push('">&larr; Prev</a></li>\n ')):n.push('\n <li class="previous disabled nosel"><a>&larr; Prev</a></li>\n '),n.push("\n \n "),this.nextCluster?(n.push('\n <li class="next nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(s=this.nextCluster)?s.get("routeURL"):void 0)),n.push('">Next &rarr;</a></li>\n ')):n.push('\n <li class="next disabled nosel"><a>Next &rarr;</a></li>\n '),n.push('\n </li>\n</ul>\n\n\n</br>\n<table class="table table-striped table-bordered">\n <tr>\n <th>Client Connections</th>\n <th>Client EOF</th>\n <th>Client Errors</th>\n <th>Forward Errors</th>\n <th>Fragments</th>\n <th>Server Ejects</th>\n </tr>\n <tr>\n <td>'),n.push(r(this.model.get("client_connections"))),n.push("</td>\n <td>"),n.push(r(this.model.get("client_eof"))),n.push("</td>\n <td>"),n.push(r(this.model.get("client_err"))),n.push("</td>\n <td>"),n.push(r(this.model.get("forward_error"))),n.push("</td>\n <td>"),n.push(r(this.model.get("fragments"))),n.push("</td>\n <td>"),n.push(r(this.model.get("server_ejects"))),n.push('</td>\n </tr>\n\n</table>\n\n</br>\n<div class="chartsBox">\n <div class="row">\n <div class="span5">\n <div id="chart1" style="padding-left: 23%"></div>\n </div>\n <div class="span5">\n <div id="chart2" style="padding-left: 40%"></div>\n </div>\n </div>\n</div>\n\n\n</br>\n<table class="table table-striped table-bordered">\n <thead>\n <tr>\n <th>Host</th>\n <th>Used Memory</th>\n <th>Free Memory</th>\n <th>Used Memory RSS</th>\n <th>Max Memory</th>\n <th>Fragmentation</th>\n </tr>\n </thead>\n <tbody>\n '),a=this.model.get("nodes").models,e=0,i=a.length;i>e;e++)t=a[e],n.push('\n <tr>\n <td><a href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("hostname"))),n.push("</a></td>\n <td>"),n.push(r(humanize.filesize(t.get("usedMemory")))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(t.get("freeMemory")))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(t.get("usedMemoryRss")))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(t.get("maxMemory")))),n.push("</td>\n <td>"),n.push(r(t.get("fragmentation"))),n.push("</td>\n </tr>\n ");n.push("\n <tr>\n <td>&nbsp;</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("usedMemory")).sum()))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("freeMemory")).sum()))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("usedMemoryRss")).sum()))),n.push("</td>\n <td>"),n.push(r(humanize.filesize(_(this.model.get("nodes").pluck("maxMemory")).sum()))),n.push("</td>\n <td>~"),n.push(r(humanize.numberFormat(_(this.model.get("nodes").pluck("fragmentation")).average(),2))),n.push("</td>\n </tr>\n </tbody>\n</table>\n\n\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.config=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a,u,l;for(n.push("\n<h3> Clusters </h3>\n<br/>\n"),u=_(this.model.get("config")).map(function(t,e){return[e,t]}),i=0,s=u.length;s>i;i++){for(e=u[i],n.push('\n <table class="table table-striped table-bordered">\n <tr><th>Name</th><td>'),n.push("<a href="+Nutcracker.Models.Cluster.routeURL(e[0])+">"+e[0]+"</a>"),n.push("</td></tr>\n <tr><th>Servers</th><td>"),n.push(e[1].servers.map(function(t){return"<a href="+Nutcracker.Models.Node.routeURL(t)+">"+t+"</a>"}).join("<br/>")),n.push("</td></tr>\n "),l=_(e[1]).map(function(t,e){return[e,t]}),o=0,a=l.length;a>o;o++)t=l[o],n.push("\n "),/servers/.test(t[0])||(n.push("\n <tr><th>"),n.push(r(t[0])),n.push("</th><td>"),n.push(r(t[1])),n.push("</td></tr>\n ")),n.push("\n ");n.push("\n </table>\n </br>\n")}n.push("\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.footer=function(t){t||(t={});var e,n=[],r=t.safe,i=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},i||(i=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){n.push('<div id="lastUpdate"></div>\n')}.call(this)}.call(t),t.safe=r,t.escape=i,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.navbar=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a,u,l;for(n.push('<div class="navbar">\n <div class="navbar-inner">\n <div class="container" style="font-size: 17px">\n <a class="btn btn-navbar" data-toggle="collapse" data-target=".navbar-responsive-collapse">\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n <span class="icon-bar"></span>\n </a>\n <a class="brand" href="#" style="color: #ffffff;font-size: 25px">Nutcracker</a>\n <div class="nav-collapse collapse navbar-responsive-collapse">\n <ul class="nav">\n <li class="divider-vertical"></li>\n <li id="overview" ><a href="#/">Overview</a></li>\n <li class="divider-vertical"></li>\n <li id="config" ><a href="#/config">Config </a></li>\n <li class="divider-vertical"></li>\n <li id="clusters" class="dropdown">\n <a class="dropdown-toggle" id="drop4" style="padding-top: 10px;" role="button" data-toggle="dropdown" href="#">Clusters <b class="caret"></b></a>\n <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop4">\n <li class=\'divider\'></li>\n '),u=this.model.get("clusters").models,i=0,s=u.length;s>i;i++)t=u[i],n.push('\n <li role="presentation" style="font-size: 15px">\n <a role="menuitem" tabindex="-1" href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("name"))),n.push("</a>\n </li>\n <li class='divider'></li>\n ");for(n.push('\n </ul>\n </li>\n\n <li class="divider-vertical"></li>\n <li id="nodes" class="dropdown">\n <a class="dropdown-toggle" id="drop5" style="padding-top: 10px;" role="button" data-toggle="dropdown" href="#">Nodes <b class="caret"></b></a>\n <ul id="menu1" class="dropdown-menu" role="menu" aria-labelledby="drop5">\n <li class=\'divider\'></li>\n '),l=this.model.nodes().models,o=0,a=l.length;a>o;o++)e=l[o],n.push('\n <li role="presentation" style="font-size: 15px">\n <a role="menuitem" tabindex="-1" href="'),n.push(r(e.get("routeURL"))),n.push('">'),n.push(r(e.get("hostname"))),n.push("</a>\n </li>\n <li class='divider'></li>\n ");n.push('\n </ul>\n </li>\n\n <li class="divider-vertical"></li>\n </ul>\n\n <ul class="nav pull-right">\n <li class="divider-vertical"></li>\n <li id="auto-refresh-drop-down" class="dropdown">\n <a class="dropdown-toggle" id="auto-refresh-drop" style="padding-top: 10px;" role="button" data-toggle="dropdown" href="#">Auto Refresh </a>\n <ul id="auto-refresh-menu" class="dropdown-menu" role="menu" aria-labelledby="auto-refresh-drop">\n <li id="auto-refresh-value-30" role="presentation" style="font-size: 15px">\n <a class="auto-refresh-button" value="30" role="menuitem" tabindex="-1" href="">30 Seconds</a>\n </li>\n <li class=\'divider\'></li>\n <li id="auto-refresh-value-60" role="presentation" style="font-size: 15px">\n <a class="auto-refresh-button" value="60" role="menuitem" tabindex="-1" href="">60 Seconds</a>\n </li>\n <li class=\'divider\'></li>\n <li id="auto-refresh-value-300" role="presentation" style="font-size: 15px">\n <a class="auto-refresh-button" value="300" role="menuitem" tabindex="-1" href="">5 Minutes</a>\n </li>\n <li class=\'divider\'></li>\n <li id="auto-refresh-value-3600" role="presentation" style="font-size: 15px">\n <a class="auto-refresh-button" value="3600" role="menuitem" tabindex="-1" href="">1 Hour</a>\n </li>\n </ul>\n </li>\n <li class="divider-vertical"></li>\n </ul>\n\n \n </div><!-- /.nav-collapse -->\n </div>\n </div><!-- /navbar-inner -->\n</div><!-- /navbar -->\n')}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.node=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a;for(n.push("<h3 align=center>"),n.push(r(this.model.get("hostname"))),n.push('</h3>\n\n<ul class="pager">\n '),this.prevNode?(n.push('\n <li class="previous nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(o=this.prevNode)?o.get("routeURL"):void 0)),n.push('">&larr; Prev</a></li>\n ')):n.push('\n <li class="previous disabled nosel"><a>&larr; Prev</a></li>\n '),n.push("\n \n "),s=this.model.get("clusters"),e=0,i=s.length;i>e;e++)t=s[e],n.push('\n <li class="nosel"><a class="nextPrevButton" href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("name"))),n.push("</a></li>\n ");n.push("\n\n "),this.nextNode?(n.push('\n <li class="next nosel"><a class="nextPrevButton" href="'),n.push(r(null!=(a=this.nextNode)?a.get("routeURL"):void 0)),n.push('">Next &rarr;</a></li>\n ')):n.push('\n <li class="next disabled nosel"><a>Next &rarr;</a></li>\n '),n.push('\n </li>\n</ul>\n</br>\n<div class="chartsBox">\n <div class="row">\n <div class="span5">\n <div id="chart1" style="padding-left: 26%"></div>\n </div>\n <div class="span5">\n <div id="chart2" style="padding-left: 40%"></div>\n </div>\n </div>\n</div>\n\n<br/>\n<div class="row-fluid">\n <div class="span6">\n <h4> Cluster <-> Node Stats </h4>\n <table class="table table-striped table-bordered">\n <tr><th>In-Queue</th><td> '),n.push(r(this.model.get("in_queue"))),n.push("</td></tr>\n <tr><th>In-Queue Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("in_queue_bytes")))),n.push("</td></tr>\n <tr><th>Out-Queue</th><td> "),n.push(r(this.model.get("out_queue"))),n.push("</td></tr>\n <tr><th>Out-Queue Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("out_queue_bytes")))),n.push("</td></tr>\n <tr><th>Requests</th><td> "),n.push(r(this.model.get("requests"))),n.push("</td></tr>\n <tr><th>Requests Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("request_bytes")))),n.push("</td></tr>\n <tr><th>Responses</th><td> "),n.push(r(this.model.get("responses"))),n.push("</td></tr>\n <tr><th>Responses Memory Size</th><td> "),n.push(r(humanize.filesize(this.model.get("response_bytes")))),n.push("</td></tr>\n <tr><th>Server Connections</th><td> "),n.push(r(this.model.get("server_connections"))),n.push("</td></tr>\n <tr><th>Server EOF</th><td> "),n.push(r(this.model.get("server_eof"))),n.push("</td></tr>\n <tr><th>Server Error</th><td> "),n.push(r(this.model.get("server_err"))),n.push("</td></tr>\n <tr><th>Server Timedout</th><td> "),n.push(r(this.model.get("server_timedout"))),n.push('</td></tr>\n </table>\n </div>\n\n <div class="span6">\n <h4>Node Stats</h3>\n <table class="table table-striped table-bordered">\n <tr><th>Hits</th><td> '),n.push(r(humanize.numberFormat(this.model.get("info").hits,0))),n.push("</td></tr>\n <tr><th>Misses</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").misses,0))),n.push("</td></tr>\n <tr><th>Hit Ratio</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").hit_ratio,2))),n.push("</td></tr>\n <tr><th>Max Memory</th><td> "),n.push(r(humanize.filesize(this.model.get("info").max_memory))),n.push("</td></tr>\n <tr><th>Used Memory</th><td> "),n.push(r(humanize.filesize(this.model.get("info").used_memory))),n.push("</td></tr>\n <tr><th>Used Memory RSS</th><td> "),n.push(r(humanize.filesize(this.model.get("info").used_memory_rss))),n.push("</td></tr>\n <tr><th>Connections</th><td> "),n.push(r(this.model.get("info").connections)),n.push("</td></tr>\n <tr><th>Keys</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").keys,0))),n.push("</td></tr>\n <tr><th>Evicted Keys</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").evicted_keys,0))),n.push("</td></tr>\n <tr><th>Expired Keys</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").expired_keys,0))),n.push("</td></tr>\n <tr><th>Fragmentation</th><td> "),n.push(r(humanize.numberFormat(this.model.get("info").fragmentation,2))),n.push("</td></tr>\n <tr><th>&nbsp;</th><td> &nbsp;</td></tr>\n </table>\n </div>\n\n</div>\n\n\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){this.JST||(this.JST={}),this.JST.overview=function(t){t||(t={});var e,n=[],r=function(t){return t&&t.ecoSafe?t:"undefined"!=typeof t&&null!=t?o(t):""},i=t.safe,o=t.escape;return e=t.safe=function(t){if(t&&t.ecoSafe)return t;("undefined"==typeof t||null==t)&&(t="");var e=new String(t);return e.ecoSafe=!0,e},o||(o=t.escape=function(t){return(""+t).replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;")}),function(){!function(){var t,e,i,o,s,a,u,l;for(n.push('<h3> Overview </h3>\n<br/>\n<table class="table table-striped table-bordered">\n <tbody>\n <tr><th>Hostname</th><td>'),n.push(r(this.model.get("source"))),n.push("</td></tr>\n <tr><th>Service</th><td>Nutcracker Ver. "),n.push(r(this.model.get("version"))),n.push("</td></tr>\n <tr><th>Uptime</th><td>"),n.push(r(humanize.relativeTime((new Date-1e3*this.model.get("uptime"))/1e3))),n.push("</td></tr>\n <tr><th>Server Connections</th><td>"),n.push(r(this.model.get("serverConnections"))),n.push("</td></tr>\n <tr><th>Client Connections</th><td>"),n.push(r(this.model.get("clientConnections"))),n.push("</td></tr>\n\n <tr>\n <th>Total Clusters</th>\n <td>\n "),u=this.model.get("clusters").models,i=0,s=u.length;s>i;i++)t=u[i],n.push('\n <a href="'),n.push(r(t.get("routeURL"))),n.push('">'),n.push(r(t.get("name"))),n.push("</a><br/>\n ");for(n.push("\n </td>\n </tr>\n\n <tr>\n <th>Total Nodes</th>\n <td>\n "),l=this.model.nodes().models,o=0,a=l.length;a>o;o++)e=l[o],n.push('\n <a href="'),n.push(r(e.get("routeURL"))),n.push('">'),n.push(r(e.get("hostname"))),n.push("</a><br/>\n ");n.push("\n </td>\n </tr>\n \n\n </tbody>\n</table>\n\n")}.call(this)}.call(t),t.safe=i,t.escape=o,n.join("")}}.call(this),function(){window.Nutcracker={Models:{},Collections:{},Views:{},Routers:{},Utils:{},reload:function(){return""===window.location.hash?Nutcracker.router.navigate("/",{trigger:!0}):Nutcracker.router.navigate(window.location.hash,{trigger:!0})},initialize:function(){var t;return t=new Nutcracker.Models.Overview($("#container").data("clusters")),Nutcracker.overview=t,Nutcracker.screen=new Nutcracker.Utils.RegionManager,Nutcracker.screen.navbar(new Nutcracker.Views.Navbar({model:t})),Nutcracker.screen.footer(new Nutcracker.Views.Footer({model:t})),Nutcracker.router=new Nutcracker.Routers.Overview,Backbone.history.start()}},$(document).ready(function(){return Nutcracker.initialize()})}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Collections.Clusters=function(n){function i(){return this.initialize=e(this.initialize,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.initialize=function(){return this.model=Nutcracker.Models.Cluster},i}(Backbone.Collection)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Collections.Nodes=function(n){function i(){return this.usedMemory=e(this.usedMemory,this),this.maxMemory=e(this.maxMemory,this),this.freeMemory=e(this.freeMemory,this),this.serverConnections=e(this.serverConnections,this),this.add=e(this.add,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.initialize=function(){return this.model=Nutcracker.Models.Node},i.prototype.add=function(t){return this.any(function(e){return e.get("server_url")===t[0].server_url})||i.__super__.add.apply(this,arguments)},i.prototype.serverConnections=function(){return _(this.pluck("server_connections")).sum()},i.prototype.freeMemory=function(){return _(this.pluck("freeMemory")).sum()},i.prototype.maxMemory=function(){return _(this.pluck("maxMemory")).sum()},i.prototype.usedMemory=function(){return _(this.pluck("usedMemory")).sum()},i}(Backbone.Collection)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Models.Cluster=function(n){function i(){return this.set=e(this.set,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.routeURL=function(t){return"#/clusters/"+t},i.prototype.initialize=function(){return this.set("routeURL",this.constructor.routeURL(this.get("name")))},i.prototype.set=function(t,e){var n,r=this;return null==t.nodes||t.nodes instanceof Nutcracker.Collections.Nodes||(t.nodes=new Nutcracker.Collections.Nodes(t.nodes)),null!=(n=t.nodes)&&n.map(function(t){return t.get("clusters").push(r),t.set("clusters",_(t.get("clusters")).uniq())}),Backbone.Model.prototype.set.call(this,t,e)},i}(Backbone.Model)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Models.Node=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.routeURL=function(t){return"#/nodes/"+t.split(":").slice(0,2).join(":")},r.prototype.initialize=function(){var t;return this.set("clusters",[]),this.set("hostname",null!=(t=this.get("server_url"))?t.replace(/redis:\/\//,""):void 0),this.set("maxMemory",this.get("info").max_memory),this.set("usedMemory",this.get("info").used_memory),this.set("freeMemory",this.get("info").max_memory-this.get("info").used_memory),this.set("usedMemoryRss",this.get("info").used_memory_rss),this.set("fragmentation",this.get("info").fragmentation),this.get("freeMemory")<0&&this.set("freeMemory",0),this.set("hits",this.get("info").hits),this.set("misses",this.get("info").misses),0===this.get("maxMemory")&&this.set("maxMemory",this.get("usedMemory")),0===this.get("hits")&&this.set("hits",1),this.set("routeURL",this.constructor.routeURL(this.get("hostname")))},r}(Backbone.Model)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Models.Overview=function(n){function i(){return this.postInit=e(this.postInit,this),this.clusters=e(this.clusters,this),this.fetch=e(this.fetch,this),this.nodes=e(this.nodes,this),this.initialize=e(this.initialize,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.url="/overview.json",i.prototype.initialize=function(){return this.postInit()},i.prototype.nodes=function(){return new Backbone.Collection(_(this.get("clusters").pluck("nodes")).chain().pluck("models").flatten().uniq(!1,function(t){return t.get("hostname")}).value())},i.prototype.fetch=function(){return i.__super__.fetch.apply(this,arguments)&&this.postInit(),Nutcracker.reload()},i.prototype.clusters=function(){return this.get("clusters")},i.prototype.postInit=function(){var t,e,n,r,i,o;for(t=_(this.get("clusters").pluck("client_connections")).sum(),n=0,o=this.get("clusters").pluck("nodes"),r=0,i=o.length;i>r;r++)e=o[r],n+=e.serverConnections();return this.set("serverConnections",n),this.set("clientConnections",t),this.set("initializeTime",new Date)},i.prototype.set=function(t,e){return null==t.clusters||t.clusters instanceof Nutcracker.Collections.Clusters||(t.clusters=new Nutcracker.Collections.Clusters(t.clusters)),Backbone.Model.prototype.set.call(this,t,e)},i}(Backbone.Model)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Routers.Overview=function(n){function i(){return this._show=e(this._show,this),this.showConfig=e(this.showConfig,this),this.showNode=e(this.showNode,this),this.showCluster=e(this.showCluster,this),this.showOverview=e(this.showOverview,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.routes={"":"showOverview",config:"showConfig","clusters/:cluster":"showCluster","nodes/:node":"showNode"},i.prototype.initialize=function(){return this.showOverview()},i.prototype.showOverview=function(){return this._show(Nutcracker.Views.Overview)},i.prototype.showCluster=function(t){var e,n;return e=Nutcracker.overview.clusters(),n=e.findWhere({name:t}),this._show(Nutcracker.Views.Cluster,{model:n,collection:e})},i.prototype.showNode=function(t){var e,n;return e=Nutcracker.overview.nodes(),n=e.findWhere({hostname:t}),this._show(Nutcracker.Views.Node,{model:n,collection:e})},i.prototype.showConfig=function(){return this._show(Nutcracker.Views.Config)},i.prototype._show=function(t,e){return null==e&&(e={model:Nutcracker.overview}),Nutcracker.screen.body(new t(e))},i}(Backbone.Router)}.call(this),function(){var t=function(t,e){return function(){return t.apply(e,arguments)}};Nutcracker.Utils.RegionManager=function(){function e(e,n,r,i){this.navbarID=null!=e?e:"#navbar",this.bodyID=null!=n?n:"#container",this.footerID=null!=r?r:"#footer",this.current=null!=i?i:{},this._render=t(this._render,this),this.footer=t(this.footer,this),this.body=t(this.body,this),this.navbar=t(this.navbar,this)}return e.prototype.navbar=function(t){return this._render(this.navbarID,t)},e.prototype.body=function(t){return this._render(this.bodyID,t)},e.prototype.footer=function(t){return this._render(this.footerID,t)},e.prototype._render=function(t,e){var n;return $(t).html(e.render().el),null!=(n=this.current[t])&&n.remove,this.current[t]=e},e}()}.call(this),function(){_.prototype.sum=function(){return _.reduce(this._wrapped,function(t,e){return t+e},0)},_.prototype.average=function(){return this.sum()/parseFloat(this._wrapped.length)}}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Backbone.GoogleChart=function(n){function i(){return this.listen=e(this.listen,this),this.render=e(this.render,this),this.id=e(this.id,this),this.onGoogleLoad=e(this.onGoogleLoad,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.initialize=function(t){var e,n=this;return e=_.extend({},t),["el","id","attributes","className","tagName"].map(function(t){return delete e[t]}),google.load("visualization","1",{packages:["corechart"],callback:function(){return n.onGoogleLoad("loaded")
263
+ }}),this.onGoogleLoad(function(){var t,r;return n.google=google.visualization,e.dataTable instanceof Array&&(e.dataTable=n.google.arrayToDataTable(e.dataTable)),(e.beforeDraw||function(){})(n,e),(t=e.formatter)&&function(){r=[];for(var t=0,n=e.dataTable.getNumberOfRows()-1;n>=0?n>=t:t>=n;n>=0?t++:t--)r.push(t);return r}.apply(this).map(function(n){return t.columns.map(function(r){return e.dataTable.setFormattedValue(n,r,t.callback(e.dataTable.getValue(n,r)))})}),n.wrapper=new n.google.ChartWrapper(e),["ready","select","error"].map(n.listen)})},i.prototype.onGoogleLoad=function(t){return"loaded"===t?(this.googleLoaded=!0,_(this.onGoogleLoadItems).map(function(t){return t()})):this.googleLoaded?t():(this.onGoogleLoadItems||(this.onGoogleLoadItems=[])).push(t)},i.watch=function(t,e){var n,r;return(i._list||(i._list={}))[t]=e,i._watching?void 0:(i._watching=!0,r=10,(n=function(){return _(i._list).map(function(t,e){return $(e)[0]?t()||delete i._list[e]:void 0}),_(i._list).isEmpty()?i._watching=!1:setTimeout(n,r+=10)})())},i.prototype.id=function(){var t;return(null!=(t=this.el)?t.id:void 0)||this.randomID()},i.prototype.render=function(){var t=this;return this.onGoogleLoad(function(){return t.constructor.watch("#"+t.el.id,function(){return t.wrapper.draw(t.el.id)})}),this},i.prototype.listen=function(t){var e=this;return this.google.events.addListener(this.wrapper,t,function(){return e.trigger(t,e.wrapper.getChart())})},i.prototype.randomID=function(){return _.uniqueId("gc_")},i}.call(this,Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Cluster=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.cluster,r.prototype.render=function(){var t,e,n,r=this;return this.curIndex=this.collection.indexOf(this.model),this.nextCluster=this.collection.at(this.curIndex+1),this.prevCluster=this.collection.at(this.curIndex-1),this.$el.html(this.template({model:this.model,nextCluster:this.nextCluster,prevCluster:this.prevCluster})),n={is3D:!0,titleTextStyle:{fontSize:17.5,color:"#333333"},width:300,height:300,sliceVisibilityThreshold:0,chartArea:{width:"100%",height:"80%"},legend:{position:"bottom"}},e=[["Node","Node"]],this.model.get("nodes").map(function(t){return e.push([t.get("hostname"),t.get("maxMemory")])}),t=new Backbone.GoogleChart({formatter:{callback:humanize.filesize,columns:[1]},chartType:"PieChart",options:n,dataTable:e}),t.on("select",function(t){return Nutcracker.router.navigate(r.model.get("nodes").at(t.getSelection()[0].row).get("routeURL"),{trigger:!0})}),this.$el.find("#chart2").html(t.render().el),this.$el.find("#chart1").html(new Backbone.GoogleChart({formatter:{callback:humanize.filesize,columns:[1]},chartType:"PieChart",options:n,dataTable:[["Memory","Memory"],["Free",this.model.get("nodes").freeMemory()],["Used",this.model.get("nodes").usedMemory()]]}).render().el),this},r}(Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Config=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.config,r.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this},r}(Backbone.View)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Views.Footer=function(n){function i(){return this.render=e(this.render,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.className="container navbar navbar-fixed-bottom navbar-inverse",i.prototype.template=JST.footer,i.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this.$el.find("#lastUpdate").html("Last updated: "+humanize.relativeTime(this.model.get("initializeTime")/1e3)),setTimeout(this.render,1e3),this},i}(Backbone.View)}.call(this),function(){var t,e=function(t,e){return function(){return t.apply(e,arguments)}},n={}.hasOwnProperty,r=function(t,e){function r(){this.constructor=t}for(var i in e)n.call(e,i)&&(t[i]=e[i]);return r.prototype=e.prototype,t.prototype=new r,t.__super__=e.prototype,t};Nutcracker.Views.Navbar=function(n){function i(){return this.render=e(this.render,this),this.activate=e(this.activate,this),this.autoRefresh=e(this.autoRefresh,this),this.resetButtons=e(this.resetButtons,this),this.initialize=e(this.initialize,this),t=i.__super__.constructor.apply(this,arguments)}return r(i,n),i.prototype.className="navbar navbar-inverse navbar-fixed-top",i.prototype.template=JST.navbar,i.prototype.events={"click .auto-refresh-button":"autoRefresh"},i.prototype.initialize=function(){return Backbone.history.bind("all",this.resetButtons),this.listenTo(this.model,"change",this.render),this.autoRefreshInterval=null},i.prototype.resetButtons=function(){var t;return this.$el.find("li").removeClass("active"),this.autoRefreshInterval?(this.$("#auto-refresh-drop-down").addClass("active"),this.$("#auto-refresh-value-"+this.autoRefreshInterval).addClass("active")):(this.$("#auto-refresh-drop-down").removeClass("active"),this.$("#auto-refresh-drop-down").find(".active").removeClass("active")),t=window.location.href,/#\/config$/.test(t)?this.activate("#config"):/#\/clusters\//.test(t)?this.activate("#clusters"):/#\/nodes\//.test(t)?this.activate("#nodes"):this.activate("#overview")},i.prototype.autoRefresh=function(t){var e,n=this;return e=parseInt($(t.currentTarget).attr("value")),this.autoRefreshTimer&&clearInterval(this.autoRefreshTimer),e===this.autoRefreshInterval?this.autoRefreshInterval=null:(this.autoRefreshInterval=e,this.autoRefreshTimer=setInterval(function(){return n.model.fetch()},1e3*this.autoRefreshInterval)),this.resetButtons(),t.preventDefault()},i.prototype.activate=function(t){return this.$(t).addClass("active")},i.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this.resetButtons(),this},i}(Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Node=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.node,r.prototype.render=function(){var t;return this.curIndex=this.collection.indexOf(this.model),this.nextNode=this.collection.at(this.curIndex+1),this.prevNode=this.collection.at(this.curIndex-1),t={is3D:!0,titleTextStyle:{fontSize:17.5,color:"#333333"},titleTextStyle:{fontSize:17.5,color:"#333333"},width:300,height:300,sliceVisibilityThreshold:0,chartArea:{width:"100%",height:"80%"},legend:{position:"bottom"}},this.$el.html(this.template({model:this.model,nextNode:this.nextNode,prevNode:this.prevNode})),this.$el.find("#chart1").append(new Backbone.GoogleChart({chartType:"PieChart",formatter:{callback:humanize.filesize,columns:[1]},options:_({title:"Memory"}).extend(t),dataTable:[["Memory","Memory"],["Free",this.model.get("freeMemory")],["Used",this.model.get("usedMemory")]]}).render().el),this.$el.find("#chart2").append(new Backbone.GoogleChart({formatter:{callback:humanize.numberFormat,columns:[1]},chartType:"PieChart",options:_({title:"Hits"}).extend(t),dataTable:[["Memory","Memory"],["Hits",this.model.get("hits")],["Misses",this.model.get("misses")]]}).render().el),this},r}(Backbone.View)}.call(this),function(){var t,e={}.hasOwnProperty,n=function(t,n){function r(){this.constructor=t}for(var i in n)e.call(n,i)&&(t[i]=n[i]);return r.prototype=n.prototype,t.prototype=new r,t.__super__=n.prototype,t};Nutcracker.Views.Overview=function(e){function r(){return t=r.__super__.constructor.apply(this,arguments)}return n(r,e),r.prototype.template=JST.overview,r.prototype.render=function(){return this.$el.html(this.template({model:this.model})),this},r}(Backbone.View)}.call(this);
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nutcracker-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eran Barak Levi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-02 00:00:00.000000000 Z
11
+ date: 2013-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest