").append(ce.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lt,type:"GET",isLocal:Ft.test(Dt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,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":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,ce.ajaxSettings),t):q(ce.ajaxSettings,e)},ajaxPrefilter:L($t),ajaxTransport:L(It),ajax:function(e,n){function r(e,n,r,i){var o,f,v,b,T,C=n;2!==x&&(x=2,u&&clearTimeout(u),c=t,s=i||"",w.readyState=e>0?4:0,o=e>=200&&300>e||304===e,r&&(b=_(p,w,r)),b=M(p,b,w,o),o?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(ce.lastModified[a]=T),T=w.getResponseHeader("etag"),T&&(ce.etag[a]=T)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=b.state,f=b.data,v=b.error,o=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),w.status=e,w.statusText=(n||C)+"",o?g.resolveWith(d,[f,C,w]):g.rejectWith(d,[w,C,v]),w.statusCode(y),y=t,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[w,p,o?f:v]),m.fireWith(d,[w,C]),l&&(h.trigger("ajaxComplete",[w,p]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=ce.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?ce(d):ce.event,g=ce.Deferred(),m=ce.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!f)for(f={};t=Ot.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)y[t]=[y[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||T;return c&&c.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Lt)+"").replace(_t,"").replace(Pt,Dt[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=ce.trim(p.dataType||"*").toLowerCase().match(pe)||[""],null==p.crossDomain&&(i=Rt.exec(p.url.toLowerCase()),p.crossDomain=!(!i||i[1]===Dt[1]&&i[2]===Dt[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Dt[3]||("http:"===Dt[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ce.param(p.data,p.traditional)),H($t,p,n,w),2===x)return w;l=p.global,l&&0===ce.active++&&ce.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Bt.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(qt.test(a)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=Mt.test(a)?a.replace(Mt,"$1_="+Ht++):a+(qt.test(a)?"&":"?")+"_="+Ht++)),p.ifModified&&(ce.lastModified[a]&&w.setRequestHeader("If-Modified-Since",ce.lastModified[a]),ce.etag[a]&&w.setRequestHeader("If-None-Match",ce.etag[a])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)w.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x))return w.abort();T="abort";for(o in{success:1,error:1,complete:1})w[o](p[o]);if(c=H(It,p,n,w)){w.readyState=1,l&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,c.send(v,r)}catch(C){if(!(2>x))throw C;r(-1,C)}}else r(-1,"No Transport");return w},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,n){return ce.get(e,t,n,"script")}}),ce.each(["get","post"],function(e,n){ce[n]=function(e,r,i,o){return ce.isFunction(r)&&(o=o||i,i=r,r=t),ce.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ce.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=G.head||ce("head")[0]||G.documentElement;return{send:function(t,i){n=G.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Ut=[],Vt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ut.pop()||ce.expando+"_"+Ht++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Vt.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=ce.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Vt,"$1"+o):n.jsonp!==!1&&(n.url+=(qt.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||ce.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Ut.push(o)),s&&ce.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Yt,Jt,Gt=0,Qt=e.ActiveXObject&&function(){var e;for(e in Yt)Yt[e](t,!0)};ce.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&O()||F()}:O,Jt=ce.ajaxSettings.xhr(),ce.support.cors=!!Jt&&"withCredentials"in Jt,Jt=ce.support.ajax=!!Jt,Jt&&ce.ajaxTransport(function(n){if(!n.crossDomain||ce.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=ce.noop,Qt&&delete Yt[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(f.text=u.responseText);try{c=u.statusText}catch(p){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(d){i||o(-1,d)}f&&o(s,c,f,l)},n.async?4===u.readyState?setTimeout(r):(a=++Gt,Qt&&(Yt||(Yt={},ce(e).unload(Qt)),Yt[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Kt,Zt,en=/^(?:toggle|show|hide)$/,tn=RegExp("^(?:([+-])=|)("+fe+")([a-z%]*)$","i"),nn=/queueHooks$/,rn=[$],on={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=tn.exec(t),o=i&&i[3]||(ce.cssNumber[e]?"":"px"),a=(ce.cssNumber[e]||"px"!==o&&+r)&&tn.exec(ce.css(n.elem,e)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,ce.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};ce.Animation=ce.extend(R,{tweener:function(e,t){ce.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],on[n]=on[n]||[],on[n].unshift(t)},prefilter:function(e,t){t?rn.unshift(e):rn.push(e)}}),ce.Tween=I,I.prototype={constructor:I,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.pos=t=this.options.duration?ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ce.cssProps[e.prop]]||ce.cssHooks[e.prop])?ce.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.each(["toggle","show","hide"],function(e,t){var n=ce.fn[t];ce.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(z(t,!0),e,r,i)}}),ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(C).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ce.isEmptyObject(e),o=ce.speed(t,n,r),a=function(){var t=R(this,ce.extend({},e),o);(i||ce._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=ce.timers,a=ce._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&nn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&ce.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ce._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ce.timers,a=r?r.length:0;for(n.finish=!0,ce.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ce.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ce.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||ce.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ce.isFunction(t)&&t};return r.duration=ce.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ce.fx.speeds?ce.fx.speeds[r.duration]:ce.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){ce.isFunction(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ce.timers=[],ce.fx=I.prototype.init,ce.fx.tick=function(){var e,n=ce.timers,r=0;for(Kt=ce.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||ce.fx.stop(),Kt=t},ce.fx.timer=function(e){e()&&ce.timers.push(e)&&ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){Zt||(Zt=setInterval(ce.fx.tick,ce.fx.interval))},ce.fx.stop=function(){clearInterval(Zt),Zt=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fx.step={},ce.expr&&ce.expr.filters&&(ce.expr.filters.animated=function(e){return ce.grep(ce.timers,function(t){return e===t.elem}).length}),ce.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){ce.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;return a?(n=a.documentElement,ce.contains(n,o)?(typeof o.getBoundingClientRect!==Y&&(i=o.getBoundingClientRect()),r=X(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i):void 0},ce.offset={setOffset:function(e,t,n){var r=ce.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=ce(e),s=a.offset(),u=ce.css(e,"top"),l=ce.css(e,"left"),c=("absolute"===r||"fixed"===r)&&ce.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),ce.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},ce.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===ce.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ce.nodeName(e[0],"html")||(n=e.offset()),n.top+=ce.css(e[0],"borderTopWidth",!0),n.left+=ce.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ce.css(r,"marginTop",!0),left:t.left-n.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Q;e&&!ce.nodeName(e,"html")&&"static"===ce.css(e,"position");)e=e.offsetParent;return e||Q})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);ce.fn[e]=function(i){return ce.access(this,function(e,i,o){var a=X(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?ce(a).scrollLeft():o,r?o:ce(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),ce.each({Height:"height",Width:"width"},function(e,n){ce.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){ce.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return ce.access(this,function(n,r,i){var o;return ce.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?ce.css(n,r,s):ce.style(n,r,i,s)},n,a?i:t,a,null)}})}),ce.fn.size=function(){return this.length},ce.fn.andSelf=ce.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=ce:(e.jQuery=e.$=ce,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce}))}(window);
+var t=V[e+" "];return t||(t=RegExp("(^|"+ue+")"+e+"("+ue+"|$)"))&&V(e,function(e){return t.test("string"==typeof e.className&&e.className||typeof e.getAttribute!==K&&e.getAttribute("class")||"")})},ATTR:function(e,t,r){return function(i){var o=n.attr(i,e);return null==o?"!="===t:t?(o+="","="===t?o===r:"!="===t?o!==r:"^="===t?r&&0===o.indexOf(r):"*="===t?r&&o.indexOf(r)>-1:"$="===t?r&&o.slice(-r.length)===r:"~="===t?(" "+o+" ").indexOf(r)>-1:"|="===t?o===r||o.slice(0,r.length+1)===r+"-":!1):!0}},CHILD:function(e,t,n,r,i){var o="nth"!==e.slice(0,3),a="last"!==e.slice(-4),s="of-type"===t;return 1===r&&0===i?function(e){return!!e.parentNode}:function(t,n,u){var l,c,f,p,d,h,g=o!==a?"nextSibling":"previousSibling",m=t.parentNode,y=s&&t.nodeName.toLowerCase(),v=!u&&!s;if(m){if(o){for(;g;){for(f=t;f=f[g];)if(s?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;h=g="only"===e&&!h&&"nextSibling"}return!0}if(h=[a?m.firstChild:m.lastChild],a&&v){for(c=m[I]||(m[I]={}),l=c[e]||[],d=l[0]===X&&l[1],p=l[0]===X&&l[2],f=d&&m.childNodes[d];f=++d&&f&&f[g]||(p=d=0)||h.pop();)if(1===f.nodeType&&++p&&f===t){c[e]=[X,d,p];break}}else if(v&&(l=(t[I]||(t[I]={}))[e])&&l[0]===X)p=l[1];else for(;(f=++d&&f&&f[g]||(p=d=0)||h.pop())&&((s?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++p||(v&&((f[I]||(f[I]={}))[e]=[X,p]),f!==t)););return p-=i,p===r||0===p%r&&p/r>=0}}},PSEUDO:function(e,t){var r,i=j.pseudos[e]||j.setFilters[e.toLowerCase()]||n.error("unsupported pseudo: "+e);return i[I]?i(t):i.length>1?(r=[e,e,"",t],j.setFilters.hasOwnProperty(e.toLowerCase())?o(function(e,n){for(var r,o=i(e,t),a=o.length;a--;)r=ae.call(e,o[a]),e[r]=!(n[r]=o[a])}):function(e){return i(e,0,r)}):i}},pseudos:{not:o(function(e){var t=[],n=[],r=H(e.replace(he,"$1"));return r[I]?o(function(e,t,n,i){for(var o,a=r(e,null,i,[]),s=e.length;s--;)(o=a[s])&&(e[s]=!(t[s]=o))}):function(e,i,o){return t[0]=e,r(t,null,o,n),!n.pop()}}),has:o(function(e){return function(t){return n(e,t).length>0}}),contains:o(function(e){return function(t){return(t.textContent||t.innerText||D(t)).indexOf(e)>-1}}),lang:o(function(e){return xe.test(e||"")||n.error("unsupported lang: "+e),e=e.replace(Se,Ae).toLowerCase(),function(t){var n;do if(n=B?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===F},focus:function(e){return e===O.activeElement&&(!O.hasFocus||O.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeName>"@"||3===e.nodeType||4===e.nodeType)return!1;return!0},parent:function(e){return!j.pseudos.empty(e)},header:function(e){return ke.test(e.nodeName)},input:function(e){return Ne.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||t.toLowerCase()===e.type)},first:h(function(){return[0]}),last:h(function(e,t){return[t-1]}),eq:h(function(e,t,n){return[0>n?n+t:n]}),even:h(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:h(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:h(function(e,t,n){for(var r=0>n?n+t:n;--r>=0;)e.push(r);return e}),gt:h(function(e,t,n){for(var r=0>n?n+t:n;t>++r;)e.push(r);return e})}};for(E in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})j.pseudos[E]=p(E);for(E in{submit:!0,reset:!0})j.pseudos[E]=d(E);H=n.compile=function(e,t){var n,r=[],i=[],o=J[e+" "];if(!o){for(t||(t=g(e)),n=t.length;n--;)o=T(t[n]),o[I]?r.push(o):i.push(o);o=J(e,w(i,r))}return o},j.pseudos.nth=j.pseudos.eq,k.prototype=j.filters=j.pseudos,j.setFilters=new k,S.sortStable=I.split("").sort(Q).join("")===I,M(),[0,0].sort(Q),S.detectDuplicates=G,ce.find=n,ce.expr=n.selectors,ce.expr[":"]=ce.expr.pseudos,ce.unique=n.uniqueSort,ce.text=n.getText,ce.isXMLDoc=n.isXML,ce.contains=n.contains}(e);var ke={};ce.Callbacks=function(e){e="string"==typeof e?ke[e]||r(e):ce.extend({},e);var n,i,o,a,s,u,l=[],c=!e.once&&[],f=function(t){for(i=e.memory&&t,o=!0,s=u||0,u=0,a=l.length,n=!0;l&&a>s;s++)if(l[s].apply(t[0],t[1])===!1&&e.stopOnFalse){i=!1;break}n=!1,l&&(c?c.length&&f(c.shift()):i?l=[]:p.disable())},p={add:function(){if(l){var t=l.length;!function r(t){ce.each(t,function(t,n){var i=ce.type(n);"function"===i?e.unique&&p.has(n)||l.push(n):n&&n.length&&"string"!==i&&r(n)})}(arguments),n?a=l.length:i&&(u=t,f(i))}return this},remove:function(){return l&&ce.each(arguments,function(e,t){for(var r;(r=ce.inArray(t,l,r))>-1;)l.splice(r,1),n&&(a>=r&&a--,s>=r&&s--)}),this},has:function(e){return e?ce.inArray(e,l)>-1:!(!l||!l.length)},empty:function(){return l=[],a=0,this},disable:function(){return l=c=i=t,this},disabled:function(){return!l},lock:function(){return c=t,i||p.disable(),this},locked:function(){return!c},fireWith:function(e,t){return t=t||[],t=[e,t.slice?t.slice():t],!l||o&&!c||(n?c.push(t):f(t)),this},fire:function(){return p.fireWith(this,arguments),this},fired:function(){return!!o}};return p},ce.extend({Deferred:function(e){var t=[["resolve","done",ce.Callbacks("once memory"),"resolved"],["reject","fail",ce.Callbacks("once memory"),"rejected"],["notify","progress",ce.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var e=arguments;return ce.Deferred(function(n){ce.each(t,function(t,o){var a=o[0],s=ce.isFunction(e[t])&&e[t];i[o[1]](function(){var e=s&&s.apply(this,arguments);e&&ce.isFunction(e.promise)?e.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[a+"With"](this===r?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?ce.extend(e,r):r}},i={};return r.pipe=r.then,ce.each(t,function(e,o){var a=o[2],s=o[3];r[o[1]]=a.add,s&&a.add(function(){n=s},t[1^e][2].disable,t[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=a.fireWith}),r.promise(i),e&&e.call(i,i),i},when:function(e){var t,n,r,i=0,o=oe.call(arguments),a=o.length,s=1!==a||e&&ce.isFunction(e.promise)?a:0,u=1===s?e:ce.Deferred(),l=function(e,n,r){return function(i){n[e]=this,r[e]=arguments.length>1?oe.call(arguments):i,r===t?u.notifyWith(n,r):--s||u.resolveWith(n,r)}};if(a>1)for(t=Array(a),n=Array(a),r=Array(a);a>i;i++)o[i]&&ce.isFunction(o[i].promise)?o[i].promise().done(l(i,r,o)).fail(u.reject).progress(l(i,n,t)):--s;return s||u.resolveWith(r,o),u.promise()}}),ce.support=function(t){var n,r,i,o,a,s,u,l,c,f=G.createElement("div");if(f.setAttribute("className","t"),f.innerHTML="
a ",n=f.getElementsByTagName("*")||[],r=f.getElementsByTagName("a")[0],!r||!r.style||!n.length)return t;o=G.createElement("select"),s=o.appendChild(G.createElement("option")),i=f.getElementsByTagName("input")[0],r.style.cssText="top:1px;float:left;opacity:.5",t.getSetAttribute="t"!==f.className,t.leadingWhitespace=3===f.firstChild.nodeType,t.tbody=!f.getElementsByTagName("tbody").length,t.htmlSerialize=!!f.getElementsByTagName("link").length,t.style=/top/.test(r.getAttribute("style")),t.hrefNormalized="/a"===r.getAttribute("href"),t.opacity=/^0.5/.test(r.style.opacity),t.cssFloat=!!r.style.cssFloat,t.checkOn=!!i.value,t.optSelected=s.selected,t.enctype=!!G.createElement("form").enctype,t.html5Clone="<:nav>"!==G.createElement("nav").cloneNode(!0).outerHTML,t.inlineBlockNeedsLayout=!1,t.shrinkWrapBlocks=!1,t.pixelPosition=!1,t.deleteExpando=!0,t.noCloneEvent=!0,t.reliableMarginRight=!0,t.boxSizingReliable=!0,i.checked=!0,t.noCloneChecked=i.cloneNode(!0).checked,o.disabled=!0,t.optDisabled=!s.disabled;try{delete f.test}catch(p){t.deleteExpando=!1}i=G.createElement("input"),i.setAttribute("value",""),t.input=""===i.getAttribute("value"),i.value="t",i.setAttribute("type","radio"),t.radioValue="t"===i.value,i.setAttribute("checked","t"),i.setAttribute("name","t"),a=G.createDocumentFragment(),a.appendChild(i),t.appendChecked=i.checked,t.checkClone=a.cloneNode(!0).cloneNode(!0).lastChild.checked,f.attachEvent&&(f.attachEvent("onclick",function(){t.noCloneEvent=!1}),f.cloneNode(!0).click());for(c in{submit:!0,change:!0,focusin:!0})f.setAttribute(u="on"+c,"t"),t[c+"Bubbles"]=u in e||f.attributes[u].expando===!1;f.style.backgroundClip="content-box",f.cloneNode(!0).style.backgroundClip="",t.clearCloneStyle="content-box"===f.style.backgroundClip;for(c in ce(t))break;return t.ownLast="0"!==c,ce(function(){var n,r,i,o="padding:0;margin:0;border:0;display:block;box-sizing:content-box;-moz-box-sizing:content-box;-webkit-box-sizing:content-box;",a=G.getElementsByTagName("body")[0];a&&(n=G.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",a.appendChild(n).appendChild(f),f.innerHTML="
",i=f.getElementsByTagName("td"),i[0].style.cssText="padding:0;margin:0;border:0;display:none",l=0===i[0].offsetHeight,i[0].style.display="",i[1].style.display="none",t.reliableHiddenOffsets=l&&0===i[0].offsetHeight,f.innerHTML="",f.style.cssText="box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%;",ce.swap(a,null!=a.style.zoom?{zoom:1}:{},function(){t.boxSizing=4===f.offsetWidth}),e.getComputedStyle&&(t.pixelPosition="1%"!==(e.getComputedStyle(f,null)||{}).top,t.boxSizingReliable="4px"===(e.getComputedStyle(f,null)||{width:"4px"}).width,r=f.appendChild(G.createElement("div")),r.style.cssText=f.style.cssText=o,r.style.marginRight=r.style.width="0",f.style.width="1px",t.reliableMarginRight=!parseFloat((e.getComputedStyle(r,null)||{}).marginRight)),typeof f.style.zoom!==Y&&(f.innerHTML="",f.style.cssText=o+"width:1px;padding:1px;display:inline;zoom:1",t.inlineBlockNeedsLayout=3===f.offsetWidth,f.style.display="block",f.innerHTML="
",f.firstChild.style.width="5px",t.shrinkWrapBlocks=3!==f.offsetWidth,t.inlineBlockNeedsLayout&&(a.style.zoom=1)),a.removeChild(n),n=f=i=r=null)}),n=o=a=s=r=i=null,t}({});var Ee=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,Se=/([A-Z])/g;ce.extend({cache:{},noData:{applet:!0,embed:!0,object:"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"},hasData:function(e){return e=e.nodeType?ce.cache[e[ce.expando]]:e[ce.expando],!!e&&!s(e)},data:function(e,t,n){return i(e,t,n)},removeData:function(e,t){return o(e,t)},_data:function(e,t,n){return i(e,t,n,!0)},_removeData:function(e,t){return o(e,t,!0)},acceptData:function(e){if(e.nodeType&&1!==e.nodeType&&9!==e.nodeType)return!1;var t=e.nodeName&&ce.noData[e.nodeName.toLowerCase()];return!t||t!==!0&&e.getAttribute("classid")===t}}),ce.fn.extend({data:function(e,n){var r,i,o=null,s=0,u=this[0];if(e===t){if(this.length&&(o=ce.data(u),1===u.nodeType&&!ce._data(u,"parsedAttrs"))){for(r=u.attributes;r.length>s;s++)i=r[s].name,0===i.indexOf("data-")&&(i=ce.camelCase(i.slice(5)),a(u,i,o[i]));ce._data(u,"parsedAttrs",!0)}return o}return"object"==typeof e?this.each(function(){ce.data(this,e)}):arguments.length>1?this.each(function(){ce.data(this,e,n)}):u?a(u,e,ce.data(u,e)):null},removeData:function(e){return this.each(function(){ce.removeData(this,e)})}}),ce.extend({queue:function(e,n,r){var i;return e?(n=(n||"fx")+"queue",i=ce._data(e,n),r&&(!i||ce.isArray(r)?i=ce._data(e,n,ce.makeArray(r)):i.push(r)),i||[]):t},dequeue:function(e,t){t=t||"fx";var n=ce.queue(e,t),r=n.length,i=n.shift(),o=ce._queueHooks(e,t),a=function(){ce.dequeue(e,t)};"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===t&&n.unshift("inprogress"),delete o.stop,i.call(e,a,o)),!r&&o&&o.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return ce._data(e,n)||ce._data(e,n,{empty:ce.Callbacks("once memory").add(function(){ce._removeData(e,t+"queue"),ce._removeData(e,n)})})}}),ce.fn.extend({queue:function(e,n){var r=2;return"string"!=typeof e&&(n=e,e="fx",r--),r>arguments.length?ce.queue(this[0],e):n===t?this:this.each(function(){var t=ce.queue(this,e,n);ce._queueHooks(this,e),"fx"===e&&"inprogress"!==t[0]&&ce.dequeue(this,e)})},dequeue:function(e){return this.each(function(){ce.dequeue(this,e)})},delay:function(e,t){return e=ce.fx?ce.fx.speeds[e]||e:e,t=t||"fx",this.queue(t,function(t,n){var r=setTimeout(t,e);n.stop=function(){clearTimeout(r)}})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,n){var r,i=1,o=ce.Deferred(),a=this,s=this.length,u=function(){--i||o.resolveWith(a,[a])};for("string"!=typeof e&&(n=e,e=t),e=e||"fx";s--;)r=ce._data(a[s],e+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var Ae,je,De=/[\t\r\n\f]/g,Le=/\r/g,He=/^(?:input|select|textarea|button|object)$/i,qe=/^(?:a|area)$/i,_e=/^(?:checked|selected)$/i,Me=ce.support.getSetAttribute,Oe=ce.support.input;ce.fn.extend({attr:function(e,t){return ce.access(this,ce.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){ce.removeAttr(this,e)})},prop:function(e,t){return ce.access(this,ce.prop,e,t,arguments.length>1)},removeProp:function(e){return e=ce.propFix[e]||e,this.each(function(){try{this[e]=t,delete this[e]}catch(n){}})},addClass:function(e){var t,n,r,i,o,a=0,s=this.length,u="string"==typeof e&&e;if(ce.isFunction(e))return this.each(function(t){ce(this).addClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(pe)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(De," "):" ")){for(o=0;i=t[o++];)0>r.indexOf(" "+i+" ")&&(r+=i+" ");n.className=ce.trim(r)}return this},removeClass:function(e){var t,n,r,i,o,a=0,s=this.length,u=0===arguments.length||"string"==typeof e&&e;if(ce.isFunction(e))return this.each(function(t){ce(this).removeClass(e.call(this,t,this.className))});if(u)for(t=(e||"").match(pe)||[];s>a;a++)if(n=this[a],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(De," "):"")){for(o=0;i=t[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=e?ce.trim(r):""}return this},toggleClass:function(e,t){var n=typeof e,r="boolean"==typeof t;return this.each(ce.isFunction(e)?function(n){ce(this).toggleClass(e.call(this,n,this.className,t),t)}:function(){if("string"===n)for(var i,o=0,a=ce(this),s=t,u=e.match(pe)||[];i=u[o++];)s=r?s:!a.hasClass(i),a[s?"addClass":"removeClass"](i);else(n===Y||"boolean"===n)&&(this.className&&ce._data(this,"__className__",this.className),this.className=this.className||e===!1?"":ce._data(this,"__className__")||"")})},hasClass:function(e){for(var t=" "+e+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(De," ").indexOf(t)>=0)return!0;return!1},val:function(e){var n,r,i,o=this[0];return arguments.length?(i=ce.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,ce(this).val()):e,null==o?o="":"number"==typeof o?o+="":ce.isArray(o)&&(o=ce.map(o,function(e){return null==e?"":e+""})),r=ce.valHooks[this.type]||ce.valHooks[this.nodeName.toLowerCase()],r&&"set"in r&&r.set(this,o,"value")!==t||(this.value=o))})):o?(r=ce.valHooks[o.type]||ce.valHooks[o.nodeName.toLowerCase()],r&&"get"in r&&(n=r.get(o,"value"))!==t?n:(n=o.value,"string"==typeof n?n.replace(Le,""):null==n?"":n)):void 0}}),ce.extend({valHooks:{option:{get:function(e){var t=ce.find.attr(e,"value");return null!=t?t:e.text}},select:{get:function(e){for(var t,n,r=e.options,i=e.selectedIndex,o="select-one"===e.type||0>i,a=o?null:[],s=o?i+1:r.length,u=0>i?s:o?i:0;s>u;u++)if(n=r[u],!(!n.selected&&u!==i||(ce.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&ce.nodeName(n.parentNode,"optgroup"))){if(t=ce(n).val(),o)return t;a.push(t)}return a},set:function(e,t){for(var n,r,i=e.options,o=ce.makeArray(t),a=i.length;a--;)r=i[a],(r.selected=ce.inArray(ce(r).val(),o)>=0)&&(n=!0);return n||(e.selectedIndex=-1),o}}},attr:function(e,n,r){var i,o,a=e.nodeType;return e&&3!==a&&8!==a&&2!==a?typeof e.getAttribute===Y?ce.prop(e,n,r):(1===a&&ce.isXMLDoc(e)||(n=n.toLowerCase(),i=ce.attrHooks[n]||(ce.expr.match.bool.test(n)?je:Ae)),r===t?i&&"get"in i&&null!==(o=i.get(e,n))?o:(o=ce.find.attr(e,n),null==o?t:o):null!==r?i&&"set"in i&&(o=i.set(e,r,n))!==t?o:(e.setAttribute(n,r+""),r):(ce.removeAttr(e,n),t)):void 0},removeAttr:function(e,t){var n,r,i=0,o=t&&t.match(pe);if(o&&1===e.nodeType)for(;n=o[i++];)r=ce.propFix[n]||n,ce.expr.match.bool.test(n)?Oe&&Me||!_e.test(n)?e[r]=!1:e[ce.camelCase("default-"+n)]=e[r]=!1:ce.attr(e,n,""),e.removeAttribute(Me?n:r)},attrHooks:{type:{set:function(e,t){if(!ce.support.radioValue&&"radio"===t&&ce.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(e,n,r){var i,o,a,s=e.nodeType;return e&&3!==s&&8!==s&&2!==s?(a=1!==s||!ce.isXMLDoc(e),a&&(n=ce.propFix[n]||n,o=ce.propHooks[n]),r!==t?o&&"set"in o&&(i=o.set(e,r,n))!==t?i:e[n]=r:o&&"get"in o&&null!==(i=o.get(e,n))?i:e[n]):void 0},propHooks:{tabIndex:{get:function(e){var t=ce.find.attr(e,"tabindex");return t?parseInt(t,10):He.test(e.nodeName)||qe.test(e.nodeName)&&e.href?0:-1}}}}),je={set:function(e,t,n){return t===!1?ce.removeAttr(e,n):Oe&&Me||!_e.test(n)?e.setAttribute(!Me&&ce.propFix[n]||n,n):e[ce.camelCase("default-"+n)]=e[n]=!0,n}},ce.each(ce.expr.match.bool.source.match(/\w+/g),function(e,n){var r=ce.expr.attrHandle[n]||ce.find.attr;ce.expr.attrHandle[n]=Oe&&Me||!_e.test(n)?function(e,n,i){var o=ce.expr.attrHandle[n],a=i?t:(ce.expr.attrHandle[n]=t)!=r(e,n,i)?n.toLowerCase():null;return ce.expr.attrHandle[n]=o,a}:function(e,n,r){return r?t:e[ce.camelCase("default-"+n)]?n.toLowerCase():null}}),Oe&&Me||(ce.attrHooks.value={set:function(e,n,r){return ce.nodeName(e,"input")?(e.defaultValue=n,t):Ae&&Ae.set(e,n,r)}}),Me||(Ae={set:function(e,n,r){var i=e.getAttributeNode(r);return i||e.setAttributeNode(i=e.ownerDocument.createAttribute(r)),i.value=n+="","value"===r||n===e.getAttribute(r)?n:t}},ce.expr.attrHandle.id=ce.expr.attrHandle.name=ce.expr.attrHandle.coords=function(e,n,r){var i;return r?t:(i=e.getAttributeNode(n))&&""!==i.value?i.value:null},ce.valHooks.button={get:function(e,n){var r=e.getAttributeNode(n);return r&&r.specified?r.value:t},set:Ae.set},ce.attrHooks.contenteditable={set:function(e,t,n){Ae.set(e,""===t?!1:t,n)}},ce.each(["width","height"],function(e,n){ce.attrHooks[n]={set:function(e,r){return""===r?(e.setAttribute(n,"auto"),r):t}}})),ce.support.hrefNormalized||ce.each(["href","src"],function(e,t){ce.propHooks[t]={get:function(e){return e.getAttribute(t,4)}}}),ce.support.style||(ce.attrHooks.style={get:function(e){return e.style.cssText||t},set:function(e,t){return e.style.cssText=t+""}}),ce.support.optSelected||(ce.propHooks.selected={get:function(e){var t=e.parentNode;return t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex),null}}),ce.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){ce.propFix[this.toLowerCase()]=this}),ce.support.enctype||(ce.propFix.enctype="encoding"),ce.each(["radio","checkbox"],function(){ce.valHooks[this]={set:function(e,n){return ce.isArray(n)?e.checked=ce.inArray(ce(e).val(),n)>=0:t}},ce.support.checkOn||(ce.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var Fe=/^(?:input|select|textarea)$/i,Be=/^key/,Pe=/^(?:mouse|contextmenu)|click/,Re=/^(?:focusinfocus|focusoutblur)$/,We=/^([^.]*)(?:\.(.+)|)$/;ce.event={global:{},add:function(e,n,r,i,o){var a,s,u,l,c,f,p,d,h,g,m,y=ce._data(e);if(y){for(r.handler&&(l=r,r=l.handler,o=l.selector),r.guid||(r.guid=ce.guid++),(s=y.events)||(s=y.events={}),(f=y.handle)||(f=y.handle=function(e){return typeof ce===Y||e&&ce.event.triggered===e.type?t:ce.event.dispatch.apply(f.elem,arguments)},f.elem=e),n=(n||"").match(pe)||[""],u=n.length;u--;)a=We.exec(n[u])||[],h=m=a[1],g=(a[2]||"").split(".").sort(),h&&(c=ce.event.special[h]||{},h=(o?c.delegateType:c.bindType)||h,c=ce.event.special[h]||{},p=ce.extend({type:h,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&ce.expr.match.needsContext.test(o),namespace:g.join(".")},l),(d=s[h])||(d=s[h]=[],d.delegateCount=0,c.setup&&c.setup.call(e,i,g,f)!==!1||(e.addEventListener?e.addEventListener(h,f,!1):e.attachEvent&&e.attachEvent("on"+h,f))),c.add&&(c.add.call(e,p),p.handler.guid||(p.handler.guid=r.guid)),o?d.splice(d.delegateCount++,0,p):d.push(p),ce.event.global[h]=!0);e=null}},remove:function(e,t,n,r,i){var o,a,s,u,l,c,f,p,d,h,g,m=ce.hasData(e)&&ce._data(e);if(m&&(c=m.events)){for(t=(t||"").match(pe)||[""],l=t.length;l--;)if(s=We.exec(t[l])||[],d=g=s[1],h=(s[2]||"").split(".").sort(),d){for(f=ce.event.special[d]||{},d=(r?f.delegateType:f.bindType)||d,p=c[d]||[],s=s[2]&&RegExp("(^|\\.)"+h.join("\\.(?:.*\\.|)")+"(\\.|$)"),u=o=p.length;o--;)a=p[o],!i&&g!==a.origType||n&&n.guid!==a.guid||s&&!s.test(a.namespace)||r&&r!==a.selector&&("**"!==r||!a.selector)||(p.splice(o,1),a.selector&&p.delegateCount--,f.remove&&f.remove.call(e,a));u&&!p.length&&(f.teardown&&f.teardown.call(e,h,m.handle)!==!1||ce.removeEvent(e,d,m.handle),delete c[d])}else for(d in c)ce.event.remove(e,d+t[l],n,r,!0);ce.isEmptyObject(c)&&(delete m.handle,ce._removeData(e,"events"))}},trigger:function(n,r,i,o){var a,s,u,l,c,f,p,d=[i||G],h=ue.call(n,"type")?n.type:n,g=ue.call(n,"namespace")?n.namespace.split("."):[];if(u=f=i=i||G,3!==i.nodeType&&8!==i.nodeType&&!Re.test(h+ce.event.triggered)&&(h.indexOf(".")>=0&&(g=h.split("."),h=g.shift(),g.sort()),s=0>h.indexOf(":")&&"on"+h,n=n[ce.expando]?n:new ce.Event(h,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=g.join("."),n.namespace_re=n.namespace?RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=t,n.target||(n.target=i),r=null==r?[n]:ce.makeArray(r,[n]),c=ce.event.special[h]||{},o||!c.trigger||c.trigger.apply(i,r)!==!1)){if(!o&&!c.noBubble&&!ce.isWindow(i)){for(l=c.delegateType||h,Re.test(l+h)||(u=u.parentNode);u;u=u.parentNode)d.push(u),f=u;f===(i.ownerDocument||G)&&d.push(f.defaultView||f.parentWindow||e)}for(p=0;(u=d[p++])&&!n.isPropagationStopped();)n.type=p>1?l:c.bindType||h,a=(ce._data(u,"events")||{})[n.type]&&ce._data(u,"handle"),a&&a.apply(u,r),a=s&&u[s],a&&ce.acceptData(u)&&a.apply&&a.apply(u,r)===!1&&n.preventDefault();if(n.type=h,!o&&!n.isDefaultPrevented()&&(!c._default||c._default.apply(d.pop(),r)===!1)&&ce.acceptData(i)&&s&&i[h]&&!ce.isWindow(i)){f=i[s],f&&(i[s]=null),ce.event.triggered=h;try{i[h]()}catch(m){}ce.event.triggered=t,f&&(i[s]=f)}return n.result}},dispatch:function(e){e=ce.event.fix(e);var n,r,i,o,a,s=[],u=oe.call(arguments),l=(ce._data(this,"events")||{})[e.type]||[],c=ce.event.special[e.type]||{};if(u[0]=e,e.delegateTarget=this,!c.preDispatch||c.preDispatch.call(this,e)!==!1){for(s=ce.event.handlers.call(this,e,l),n=0;(o=s[n++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,a=0;(i=o.handlers[a++])&&!e.isImmediatePropagationStopped();)(!e.namespace_re||e.namespace_re.test(i.namespace))&&(e.handleObj=i,e.data=i.data,r=((ce.event.special[i.origType]||{}).handle||i.handler).apply(o.elem,u),r!==t&&(e.result=r)===!1&&(e.preventDefault(),e.stopPropagation()));return c.postDispatch&&c.postDispatch.call(this,e),e.result}},handlers:function(e,n){var r,i,o,a,s=[],u=n.delegateCount,l=e.target;if(u&&l.nodeType&&(!e.button||"click"!==e.type))for(;l!=this;l=l.parentNode||this)if(1===l.nodeType&&(l.disabled!==!0||"click"!==e.type)){for(o=[],a=0;u>a;a++)i=n[a],r=i.selector+" ",o[r]===t&&(o[r]=i.needsContext?ce(r,this).index(l)>=0:ce.find(r,this,null,[l]).length),o[r]&&o.push(i);o.length&&s.push({elem:l,handlers:o})}return n.length>u&&s.push({elem:this,handlers:n.slice(u)}),s},fix:function(e){if(e[ce.expando])return e;var t,n,r,i=e.type,o=e,a=this.fixHooks[i];for(a||(this.fixHooks[i]=a=Pe.test(i)?this.mouseHooks:Be.test(i)?this.keyHooks:{}),r=a.props?this.props.concat(a.props):this.props,e=new ce.Event(o),t=r.length;t--;)n=r[t],e[n]=o[n];return e.target||(e.target=o.srcElement||G),3===e.target.nodeType&&(e.target=e.target.parentNode),e.metaKey=!!e.metaKey,a.filter?a.filter(e,o):e},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(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY fromElement offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,n){var r,i,o,a=n.button,s=n.fromElement;return null==e.pageX&&null!=n.clientX&&(i=e.target.ownerDocument||G,o=i.documentElement,r=i.body,e.pageX=n.clientX+(o&&o.scrollLeft||r&&r.scrollLeft||0)-(o&&o.clientLeft||r&&r.clientLeft||0),e.pageY=n.clientY+(o&&o.scrollTop||r&&r.scrollTop||0)-(o&&o.clientTop||r&&r.clientTop||0)),!e.relatedTarget&&s&&(e.relatedTarget=s===e.target?n.toElement:s),e.which||a===t||(e.which=1&a?1:2&a?3:4&a?2:0),e}},special:{load:{noBubble:!0},focus:{trigger:function(){if(this!==c()&&this.focus)try{return this.focus(),!1}catch(e){}},delegateType:"focusin"},blur:{trigger:function(){return this===c()&&this.blur?(this.blur(),!1):t},delegateType:"focusout"},click:{trigger:function(){return ce.nodeName(this,"input")&&"checkbox"===this.type&&this.click?(this.click(),!1):t},_default:function(e){return ce.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){e.result!==t&&(e.originalEvent.returnValue=e.result)}}},simulate:function(e,t,n,r){var i=ce.extend(new ce.Event,n,{type:e,isSimulated:!0,originalEvent:{}});r?ce.event.trigger(i,null,t):ce.event.dispatch.call(t,i),i.isDefaultPrevented()&&n.preventDefault()}},ce.removeEvent=G.removeEventListener?function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n,!1)}:function(e,t,n){var r="on"+t;e.detachEvent&&(typeof e[r]===Y&&(e[r]=null),e.detachEvent(r,n))},ce.Event=function(e,n){return this instanceof ce.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||e.returnValue===!1||e.getPreventDefault&&e.getPreventDefault()?u:l):this.type=e,n&&ce.extend(this,n),this.timeStamp=e&&e.timeStamp||ce.now(),this[ce.expando]=!0,t):new ce.Event(e,n)},ce.Event.prototype={isDefaultPrevented:l,isPropagationStopped:l,isImmediatePropagationStopped:l,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=u,e&&(e.preventDefault?e.preventDefault():e.returnValue=!1)},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=u,e&&(e.stopPropagation&&e.stopPropagation(),e.cancelBubble=!0)},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=u,this.stopPropagation()}},ce.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(e,t){ce.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,r=this,i=e.relatedTarget,o=e.handleObj;return(!i||i!==r&&!ce.contains(r,i))&&(e.type=o.origType,n=o.handler.apply(this,arguments),e.type=t),n}}}),ce.support.submitBubbles||(ce.event.special.submit={setup:function(){return ce.nodeName(this,"form")?!1:(ce.event.add(this,"click._submit keypress._submit",function(e){var n=e.target,r=ce.nodeName(n,"input")||ce.nodeName(n,"button")?n.form:t;r&&!ce._data(r,"submitBubbles")&&(ce.event.add(r,"submit._submit",function(e){e._submit_bubble=!0}),ce._data(r,"submitBubbles",!0))}),t)},postDispatch:function(e){e._submit_bubble&&(delete e._submit_bubble,this.parentNode&&!e.isTrigger&&ce.event.simulate("submit",this.parentNode,e,!0))},teardown:function(){return ce.nodeName(this,"form")?!1:(ce.event.remove(this,"._submit"),t)}}),ce.support.changeBubbles||(ce.event.special.change={setup:function(){return Fe.test(this.nodeName)?(("checkbox"===this.type||"radio"===this.type)&&(ce.event.add(this,"propertychange._change",function(e){"checked"===e.originalEvent.propertyName&&(this._just_changed=!0)}),ce.event.add(this,"click._change",function(e){this._just_changed&&!e.isTrigger&&(this._just_changed=!1),ce.event.simulate("change",this,e,!0)})),!1):(ce.event.add(this,"beforeactivate._change",function(e){var t=e.target;Fe.test(t.nodeName)&&!ce._data(t,"changeBubbles")&&(ce.event.add(t,"change._change",function(e){!this.parentNode||e.isSimulated||e.isTrigger||ce.event.simulate("change",this.parentNode,e,!0)}),ce._data(t,"changeBubbles",!0))}),t)},handle:function(e){var n=e.target;return this!==n||e.isSimulated||e.isTrigger||"radio"!==n.type&&"checkbox"!==n.type?e.handleObj.handler.apply(this,arguments):t},teardown:function(){return ce.event.remove(this,"._change"),!Fe.test(this.nodeName)}}),ce.support.focusinBubbles||ce.each({focus:"focusin",blur:"focusout"},function(e,t){var n=0,r=function(e){ce.event.simulate(t,e.target,ce.event.fix(e),!0)};ce.event.special[t]={setup:function(){0===n++&&G.addEventListener(e,r,!0)},teardown:function(){0===--n&&G.removeEventListener(e,r,!0)}}}),ce.fn.extend({on:function(e,n,r,i,o){var a,s;if("object"==typeof e){"string"!=typeof n&&(r=r||n,n=t);for(a in e)this.on(a,n,r,e[a],o);return this}if(null==r&&null==i?(i=n,r=n=t):null==i&&("string"==typeof n?(i=r,r=t):(i=r,r=n,n=t)),i===!1)i=l;else if(!i)return this;return 1===o&&(s=i,i=function(e){return ce().off(e),s.apply(this,arguments)},i.guid=s.guid||(s.guid=ce.guid++)),this.each(function(){ce.event.add(this,e,i,r,n)})},one:function(e,t,n,r){return this.on(e,t,n,r,1)},off:function(e,n,r){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,ce(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,n,e[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=t),r===!1&&(r=l),this.each(function(){ce.event.remove(this,e,r,n)})},trigger:function(e,t){return this.each(function(){ce.event.trigger(e,t,this)})},triggerHandler:function(e,n){var r=this[0];return r?ce.event.trigger(e,n,r,!0):t}});var $e=/^.[^:#\[\.,]*$/,Ie=/^(?:parents|prev(?:Until|All))/,ze=ce.expr.match.needsContext,Xe={children:!0,contents:!0,next:!0,prev:!0};ce.fn.extend({find:function(e){var t,n=[],r=this,i=r.length;if("string"!=typeof e)return this.pushStack(ce(e).filter(function(){for(t=0;i>t;t++)if(ce.contains(r[t],this))return!0}));for(t=0;i>t;t++)ce.find(e,r[t],n);return n=this.pushStack(i>1?ce.unique(n):n),n.selector=this.selector?this.selector+" "+e:e,n},has:function(e){var t,n=ce(e,this),r=n.length;return this.filter(function(){for(t=0;r>t;t++)if(ce.contains(this,n[t]))return!0})},not:function(e){return this.pushStack(p(this,e||[],!0))},filter:function(e){return this.pushStack(p(this,e||[],!1))},is:function(e){return!!p(this,"string"==typeof e&&ze.test(e)?ce(e):e||[],!1).length},closest:function(e,t){for(var n,r=0,i=this.length,o=[],a=ze.test(e)||"string"!=typeof e?ce(e,t||this.context):0;i>r;r++)for(n=this[r];n&&n!==t;n=n.parentNode)if(11>n.nodeType&&(a?a.index(n)>-1:1===n.nodeType&&ce.find.matchesSelector(n,e))){n=o.push(n);break}return this.pushStack(o.length>1?ce.unique(o):o)},index:function(e){return e?"string"==typeof e?ce.inArray(this[0],ce(e)):ce.inArray(e.jquery?e[0]:e,this):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){var n="string"==typeof e?ce(e,t):ce.makeArray(e&&e.nodeType?[e]:e),r=ce.merge(this.get(),n);return this.pushStack(ce.unique(r))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),ce.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return ce.dir(e,"parentNode")},parentsUntil:function(e,t,n){return ce.dir(e,"parentNode",n)},next:function(e){return f(e,"nextSibling")},prev:function(e){return f(e,"previousSibling");
+
+},nextAll:function(e){return ce.dir(e,"nextSibling")},prevAll:function(e){return ce.dir(e,"previousSibling")},nextUntil:function(e,t,n){return ce.dir(e,"nextSibling",n)},prevUntil:function(e,t,n){return ce.dir(e,"previousSibling",n)},siblings:function(e){return ce.sibling((e.parentNode||{}).firstChild,e)},children:function(e){return ce.sibling(e.firstChild)},contents:function(e){return ce.nodeName(e,"iframe")?e.contentDocument||e.contentWindow.document:ce.merge([],e.childNodes)}},function(e,t){ce.fn[e]=function(n,r){var i=ce.map(this,t,n);return"Until"!==e.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=ce.filter(r,i)),this.length>1&&(Xe[e]||(i=ce.unique(i)),Ie.test(e)&&(i=i.reverse())),this.pushStack(i)}}),ce.extend({filter:function(e,t,n){var r=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===r.nodeType?ce.find.matchesSelector(r,e)?[r]:[]:ce.find.matches(e,ce.grep(t,function(e){return 1===e.nodeType}))},dir:function(e,n,r){for(var i=[],o=e[n];o&&9!==o.nodeType&&(r===t||1!==o.nodeType||!ce(o).is(r));)1===o.nodeType&&i.push(o),o=o[n];return i},sibling:function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n}});var Ue="abbr|article|aside|audio|bdi|canvas|data|datalist|details|figcaption|figure|footer|header|hgroup|mark|meter|nav|output|progress|section|summary|time|video",Ve=/ jQuery\d+="(?:null|\d+)"/g,Ye=RegExp("<(?:"+Ue+")[\\s/>]","i"),Je=/^\s+/,Ge=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Qe=/<([\w:]+)/,Ke=/
\s*$/g,at={option:[1,""," "],legend:[1,""," "],area:[1,""," "],param:[1,""," "],thead:[1,""],tr:[2,""],col:[2,""],td:[3,""],_default:ce.support.htmlSerialize?[0,"",""]:[1,"X","
"]},st=d(G),ut=st.appendChild(G.createElement("div"));at.optgroup=at.option,at.tbody=at.tfoot=at.colgroup=at.caption=at.thead,at.th=at.td,ce.fn.extend({text:function(e){return ce.access(this,function(e){return e===t?ce.text(this):this.empty().append((this[0]&&this[0].ownerDocument||G).createTextNode(e))},null,e,arguments.length)},append:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.appendChild(e)}})},prepend:function(){return this.domManip(arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=h(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return this.domManip(arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},remove:function(e,t){for(var n,r=e?ce.filter(e,this):this,i=0;null!=(n=r[i]);i++)t||1!==n.nodeType||ce.cleanData(x(n)),n.parentNode&&(t&&ce.contains(n.ownerDocument,n)&&y(x(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var e,t=0;null!=(e=this[t]);t++){for(1===e.nodeType&&ce.cleanData(x(e,!1));e.firstChild;)e.removeChild(e.firstChild);e.options&&ce.nodeName(e,"select")&&(e.options.length=0)}return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return ce.clone(this,e,t)})},html:function(e){return ce.access(this,function(e){var n=this[0]||{},r=0,i=this.length;if(e===t)return 1===n.nodeType?n.innerHTML.replace(Ve,""):t;if(!("string"!=typeof e||et.test(e)||!ce.support.htmlSerialize&&Ye.test(e)||!ce.support.leadingWhitespace&&Je.test(e)||at[(Qe.exec(e)||["",""])[1].toLowerCase()])){e=e.replace(Ge,"<$1>$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(ce.cleanData(x(n,!1)),n.innerHTML=e);n=0}catch(o){}}n&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=ce.map(this,function(e){return[e.nextSibling,e.parentNode]}),t=0;return this.domManip(arguments,function(n){var r=e[t++],i=e[t++];i&&(r&&r.parentNode!==i&&(r=this.nextSibling),ce(this).remove(),i.insertBefore(n,r))},!0),t?this:this.remove()},detach:function(e){return this.remove(e,!0)},domManip:function(e,t,n){e=re.apply([],e);var r,i,o,a,s,u,l=0,c=this.length,f=this,p=c-1,d=e[0],h=ce.isFunction(d);if(h||!(1>=c||"string"!=typeof d||ce.support.checkClone)&&nt.test(d))return this.each(function(r){var i=f.eq(r);h&&(e[0]=d.call(this,r,i.html())),i.domManip(e,t,n)});if(c&&(u=ce.buildFragment(e,this[0].ownerDocument,!1,!n&&this),r=u.firstChild,1===u.childNodes.length&&(u=r),r)){for(a=ce.map(x(u,"script"),g),o=a.length;c>l;l++)i=u,l!==p&&(i=ce.clone(i,!0,!0),o&&ce.merge(a,x(i,"script"))),t.call(this[l],i,l);if(o)for(s=a[a.length-1].ownerDocument,ce.map(a,m),l=0;o>l;l++)i=a[l],rt.test(i.type||"")&&!ce._data(i,"globalEval")&&ce.contains(s,i)&&(i.src?ce._evalUrl(i.src):ce.globalEval((i.text||i.textContent||i.innerHTML||"").replace(ot,"")));u=r=null}return this}}),ce.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){ce.fn[e]=function(e){for(var n,r=0,i=[],o=ce(e),a=o.length-1;a>=r;r++)n=r===a?this:this.clone(!0),ce(o[r])[t](n),ie.apply(i,n.get());return this.pushStack(i)}}),ce.extend({clone:function(e,t,n){var r,i,o,a,s,u=ce.contains(e.ownerDocument,e);if(ce.support.html5Clone||ce.isXMLDoc(e)||!Ye.test("<"+e.nodeName+">")?o=e.cloneNode(!0):(ut.innerHTML=e.outerHTML,ut.removeChild(o=ut.firstChild)),!(ce.support.noCloneEvent&&ce.support.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||ce.isXMLDoc(e)))for(r=x(o),s=x(e),a=0;null!=(i=s[a]);++a)r[a]&&b(i,r[a]);if(t)if(n)for(s=s||x(e),r=r||x(o),a=0;null!=(i=s[a]);a++)v(i,r[a]);else v(e,o);return r=x(o,"script"),r.length>0&&y(r,!u&&x(e,"script")),r=s=i=null,o},buildFragment:function(e,t,n,r){for(var i,o,a,s,u,l,c,f=e.length,p=d(t),h=[],g=0;f>g;g++)if(o=e[g],o||0===o)if("object"===ce.type(o))ce.merge(h,o.nodeType?[o]:o);else if(Ze.test(o)){for(s=s||p.appendChild(t.createElement("div")),u=(Qe.exec(o)||["",""])[1].toLowerCase(),c=at[u]||at._default,s.innerHTML=c[1]+o.replace(Ge,"<$1>$2>")+c[2],i=c[0];i--;)s=s.lastChild;if(!ce.support.leadingWhitespace&&Je.test(o)&&h.push(t.createTextNode(Je.exec(o)[0])),!ce.support.tbody)for(o="table"!==u||Ke.test(o)?""!==c[1]||Ke.test(o)?0:s:s.firstChild,i=o&&o.childNodes.length;i--;)ce.nodeName(l=o.childNodes[i],"tbody")&&!l.childNodes.length&&o.removeChild(l);for(ce.merge(h,s.childNodes),s.textContent="";s.firstChild;)s.removeChild(s.firstChild);s=p.lastChild}else h.push(t.createTextNode(o));for(s&&p.removeChild(s),ce.support.appendChecked||ce.grep(x(h,"input"),T),g=0;o=h[g++];)if((!r||-1===ce.inArray(o,r))&&(a=ce.contains(o.ownerDocument,o),s=x(p.appendChild(o),"script"),a&&y(s),n))for(i=0;o=s[i++];)rt.test(o.type||"")&&n.push(o);return s=null,p},cleanData:function(e,t){for(var n,r,i,o,a=0,s=ce.expando,u=ce.cache,l=ce.support.deleteExpando,c=ce.event.special;null!=(n=e[a]);a++)if((t||ce.acceptData(n))&&(i=n[s],o=i&&u[i])){if(o.events)for(r in o.events)c[r]?ce.event.remove(n,r):ce.removeEvent(n,r,o.handle);u[i]&&(delete u[i],l?delete n[s]:typeof n.removeAttribute!==Y?n.removeAttribute(s):n[s]=null,te.push(i))}},_evalUrl:function(e){return ce.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})}}),ce.fn.extend({wrapAll:function(e){if(ce.isFunction(e))return this.each(function(t){ce(this).wrapAll(e.call(this,t))});if(this[0]){var t=ce(e,this[0].ownerDocument).eq(0).clone(!0);this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstChild&&1===e.firstChild.nodeType;)e=e.firstChild;return e}).append(this)}return this},wrapInner:function(e){return this.each(ce.isFunction(e)?function(t){ce(this).wrapInner(e.call(this,t))}:function(){var t=ce(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=ce.isFunction(e);return this.each(function(n){ce(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){ce.nodeName(this,"body")||ce(this).replaceWith(this.childNodes)}).end()}});var lt,ct,ft,pt=/alpha\([^)]*\)/i,dt=/opacity\s*=\s*([^)]*)/,ht=/^(top|right|bottom|left)$/,gt=/^(none|table(?!-c[ea]).+)/,mt=/^margin/,yt=RegExp("^("+fe+")(.*)$","i"),vt=RegExp("^("+fe+")(?!px)[a-z%]+$","i"),bt=RegExp("^([+-])=("+fe+")","i"),xt={BODY:"block"},Tt={position:"absolute",visibility:"hidden",display:"block"},wt={letterSpacing:0,fontWeight:400},Ct=["Top","Right","Bottom","Left"],Nt=["Webkit","O","Moz","ms"];ce.fn.extend({css:function(e,n){return ce.access(this,function(e,n,r){var i,o,a={},s=0;if(ce.isArray(n)){for(o=ct(e),i=n.length;i>s;s++)a[n[s]]=ce.css(e,n[s],!1,o);return a}return r!==t?ce.style(e,n,r):ce.css(e,n)},e,n,arguments.length>1)},show:function(){return N(this,!0)},hide:function(){return N(this)},toggle:function(e){var t="boolean"==typeof e;return this.each(function(){(t?e:C(this))?ce(this).show():ce(this).hide()})}}),ce.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=ft(e,"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":ce.support.cssFloat?"cssFloat":"styleFloat"},style:function(e,n,r,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,a,s,u=ce.camelCase(n),l=e.style;if(n=ce.cssProps[u]||(ce.cssProps[u]=w(l,u)),s=ce.cssHooks[n]||ce.cssHooks[u],r===t)return s&&"get"in s&&(o=s.get(e,!1,i))!==t?o:l[n];if(a=typeof r,"string"===a&&(o=bt.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(ce.css(e,n)),a="number"),!(null==r||"number"===a&&isNaN(r)||("number"!==a||ce.cssNumber[u]||(r+="px"),ce.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(l[n]="inherit"),s&&"set"in s&&(r=s.set(e,r,i))===t)))try{l[n]=r}catch(c){}}},css:function(e,n,r,i){var o,a,s,u=ce.camelCase(n);return n=ce.cssProps[u]||(ce.cssProps[u]=w(e.style,u)),s=ce.cssHooks[n]||ce.cssHooks[u],s&&"get"in s&&(a=s.get(e,!0,r)),a===t&&(a=ft(e,n,i)),"normal"===a&&n in wt&&(a=wt[n]),""===r||r?(o=parseFloat(a),r===!0||ce.isNumeric(o)?o||0:a):a}}),e.getComputedStyle?(ct=function(t){return e.getComputedStyle(t,null)},ft=function(e,n,r){var i,o,a,s=r||ct(e),u=s?s.getPropertyValue(n)||s[n]:t,l=e.style;return s&&(""!==u||ce.contains(e.ownerDocument,e)||(u=ce.style(e,n)),vt.test(u)&&mt.test(n)&&(i=l.width,o=l.minWidth,a=l.maxWidth,l.minWidth=l.maxWidth=l.width=u,u=s.width,l.width=i,l.minWidth=o,l.maxWidth=a)),u}):G.documentElement.currentStyle&&(ct=function(e){return e.currentStyle},ft=function(e,n,r){var i,o,a,s=r||ct(e),u=s?s[n]:t,l=e.style;return null==u&&l&&l[n]&&(u=l[n]),vt.test(u)&&!ht.test(n)&&(i=l.left,o=e.runtimeStyle,a=o&&o.left,a&&(o.left=e.currentStyle.left),l.left="fontSize"===n?"1em":u,u=l.pixelLeft+"px",l.left=i,a&&(o.left=a)),""===u?"auto":u}),ce.each(["height","width"],function(e,n){ce.cssHooks[n]={get:function(e,r,i){return r?0===e.offsetWidth&>.test(ce.css(e,"display"))?ce.swap(e,Tt,function(){return S(e,n,i)}):S(e,n,i):t},set:function(e,t,r){var i=r&&ct(e);return k(e,t,r?E(e,n,r,ce.support.boxSizing&&"border-box"===ce.css(e,"boxSizing",!1,i),i):0)}}}),ce.support.opacity||(ce.cssHooks.opacity={get:function(e,t){return dt.test((t&&e.currentStyle?e.currentStyle.filter:e.style.filter)||"")?.01*parseFloat(RegExp.$1)+"":t?"1":""},set:function(e,t){var n=e.style,r=e.currentStyle,i=ce.isNumeric(t)?"alpha(opacity="+100*t+")":"",o=r&&r.filter||n.filter||"";n.zoom=1,(t>=1||""===t)&&""===ce.trim(o.replace(pt,""))&&n.removeAttribute&&(n.removeAttribute("filter"),""===t||r&&!r.filter)||(n.filter=pt.test(o)?o.replace(pt,i):o+" "+i)}}),ce(function(){ce.support.reliableMarginRight||(ce.cssHooks.marginRight={get:function(e,n){return n?ce.swap(e,{display:"inline-block"},ft,[e,"marginRight"]):t}}),!ce.support.pixelPosition&&ce.fn.position&&ce.each(["top","left"],function(e,n){ce.cssHooks[n]={get:function(e,r){return r?(r=ft(e,n),vt.test(r)?ce(e).position()[n]+"px":r):t}}})}),ce.expr&&ce.expr.filters&&(ce.expr.filters.hidden=function(e){return 0>=e.offsetWidth&&0>=e.offsetHeight||!ce.support.reliableHiddenOffsets&&"none"===(e.style&&e.style.display||ce.css(e,"display"))},ce.expr.filters.visible=function(e){return!ce.expr.filters.hidden(e)}),ce.each({margin:"",padding:"",border:"Width"},function(e,t){ce.cssHooks[e+t]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[e+Ct[r]+t]=o[r]||o[r-2]||o[0];return i}},mt.test(e)||(ce.cssHooks[e+t].set=k)});var kt=/%20/g,Et=/\[\]$/,St=/\r?\n/g,At=/^(?:submit|button|image|reset|file)$/i,jt=/^(?:input|select|textarea|keygen)/i;ce.fn.extend({serialize:function(){return ce.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=ce.prop(this,"elements");return e?ce.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!ce(this).is(":disabled")&&jt.test(this.nodeName)&&!At.test(e)&&(this.checked||!tt.test(e))}).map(function(e,t){var n=ce(this).val();return null==n?null:ce.isArray(n)?ce.map(n,function(e){return{name:t.name,value:e.replace(St,"\r\n")}}):{name:t.name,value:n.replace(St,"\r\n")}}).get()}}),ce.param=function(e,n){var r,i=[],o=function(e,t){t=ce.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(n===t&&(n=ce.ajaxSettings&&ce.ajaxSettings.traditional),ce.isArray(e)||e.jquery&&!ce.isPlainObject(e))ce.each(e,function(){o(this.name,this.value)});else for(r in e)D(r,e[r],n,o);return i.join("&").replace(kt,"+")},ce.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(e,t){ce.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),ce.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)},bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)}});var Dt,Lt,Ht=ce.now(),qt=/\?/,_t=/#.*$/,Mt=/([?&])_=[^&]*/,Ot=/^(.*?):[ \t]*([^\r\n]*)\r?$/gm,Ft=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Bt=/^(?:GET|HEAD)$/,Pt=/^\/\//,Rt=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,Wt=ce.fn.load,$t={},It={},zt="*/".concat("*");try{Lt=J.href}catch(Xt){Lt=G.createElement("a"),Lt.href="",Lt=Lt.href}Dt=Rt.exec(Lt.toLowerCase())||[],ce.fn.load=function(e,n,r){if("string"!=typeof e&&Wt)return Wt.apply(this,arguments);var i,o,a,s=this,u=e.indexOf(" ");return u>=0&&(i=e.slice(u,e.length),e=e.slice(0,u)),ce.isFunction(n)?(r=n,n=t):n&&"object"==typeof n&&(a="POST"),s.length>0&&ce.ajax({url:e,type:a,dataType:"html",data:n}).done(function(e){o=arguments,s.html(i?ce("").append(ce.parseHTML(e)).find(i):e)}).complete(r&&function(e,t){s.each(r,o||[e.responseText,t,e])}),this},ce.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){ce.fn[t]=function(e){return this.on(t,e)}}),ce.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Lt,type:"GET",isLocal:Ft.test(Dt[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":zt,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":ce.parseJSON,"text xml":ce.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?q(q(e,ce.ajaxSettings),t):q(ce.ajaxSettings,e)},ajaxPrefilter:L($t),ajaxTransport:L(It),ajax:function(e,n){function r(e,n,r,i){var o,f,v,b,T,C=n;2!==x&&(x=2,u&&clearTimeout(u),c=t,s=i||"",w.readyState=e>0?4:0,o=e>=200&&300>e||304===e,r&&(b=_(p,w,r)),b=M(p,b,w,o),o?(p.ifModified&&(T=w.getResponseHeader("Last-Modified"),T&&(ce.lastModified[a]=T),T=w.getResponseHeader("etag"),T&&(ce.etag[a]=T)),204===e||"HEAD"===p.type?C="nocontent":304===e?C="notmodified":(C=b.state,f=b.data,v=b.error,o=!v)):(v=C,(e||!C)&&(C="error",0>e&&(e=0))),w.status=e,w.statusText=(n||C)+"",o?g.resolveWith(d,[f,C,w]):g.rejectWith(d,[w,C,v]),w.statusCode(y),y=t,l&&h.trigger(o?"ajaxSuccess":"ajaxError",[w,p,o?f:v]),m.fireWith(d,[w,C]),l&&(h.trigger("ajaxComplete",[w,p]),--ce.active||ce.event.trigger("ajaxStop")))}"object"==typeof e&&(n=e,e=t),n=n||{};var i,o,a,s,u,l,c,f,p=ce.ajaxSetup({},n),d=p.context||p,h=p.context&&(d.nodeType||d.jquery)?ce(d):ce.event,g=ce.Deferred(),m=ce.Callbacks("once memory"),y=p.statusCode||{},v={},b={},x=0,T="canceled",w={readyState:0,getResponseHeader:function(e){var t;if(2===x){if(!f)for(f={};t=Ot.exec(s);)f[t[1].toLowerCase()]=t[2];t=f[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===x?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return x||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return x||(p.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>x)for(t in e)y[t]=[y[t],e[t]];else w.always(e[w.status]);return this},abort:function(e){var t=e||T;return c&&c.abort(t),r(0,t),this}};if(g.promise(w).complete=m.add,w.success=w.done,w.error=w.fail,p.url=((e||p.url||Lt)+"").replace(_t,"").replace(Pt,Dt[1]+"//"),p.type=n.method||n.type||p.method||p.type,p.dataTypes=ce.trim(p.dataType||"*").toLowerCase().match(pe)||[""],null==p.crossDomain&&(i=Rt.exec(p.url.toLowerCase()),p.crossDomain=!(!i||i[1]===Dt[1]&&i[2]===Dt[2]&&(i[3]||("http:"===i[1]?"80":"443"))===(Dt[3]||("http:"===Dt[1]?"80":"443")))),p.data&&p.processData&&"string"!=typeof p.data&&(p.data=ce.param(p.data,p.traditional)),H($t,p,n,w),2===x)return w;l=p.global,l&&0===ce.active++&&ce.event.trigger("ajaxStart"),p.type=p.type.toUpperCase(),p.hasContent=!Bt.test(p.type),a=p.url,p.hasContent||(p.data&&(a=p.url+=(qt.test(a)?"&":"?")+p.data,delete p.data),p.cache===!1&&(p.url=Mt.test(a)?a.replace(Mt,"$1_="+Ht++):a+(qt.test(a)?"&":"?")+"_="+Ht++)),p.ifModified&&(ce.lastModified[a]&&w.setRequestHeader("If-Modified-Since",ce.lastModified[a]),ce.etag[a]&&w.setRequestHeader("If-None-Match",ce.etag[a])),(p.data&&p.hasContent&&p.contentType!==!1||n.contentType)&&w.setRequestHeader("Content-Type",p.contentType),w.setRequestHeader("Accept",p.dataTypes[0]&&p.accepts[p.dataTypes[0]]?p.accepts[p.dataTypes[0]]+("*"!==p.dataTypes[0]?", "+zt+"; q=0.01":""):p.accepts["*"]);for(o in p.headers)w.setRequestHeader(o,p.headers[o]);if(p.beforeSend&&(p.beforeSend.call(d,w,p)===!1||2===x))return w.abort();T="abort";for(o in{success:1,error:1,complete:1})w[o](p[o]);if(c=H(It,p,n,w)){w.readyState=1,l&&h.trigger("ajaxSend",[w,p]),p.async&&p.timeout>0&&(u=setTimeout(function(){w.abort("timeout")},p.timeout));try{x=1,c.send(v,r)}catch(C){if(!(2>x))throw C;r(-1,C)}}else r(-1,"No Transport");return w},getJSON:function(e,t,n){return ce.get(e,t,n,"json")},getScript:function(e,n){return ce.get(e,t,n,"script")}}),ce.each(["get","post"],function(e,n){ce[n]=function(e,r,i,o){return ce.isFunction(r)&&(o=o||i,i=r,r=t),ce.ajax({url:e,type:n,dataType:o,data:r,success:i})}}),ce.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(e){return ce.globalEval(e),e}}}),ce.ajaxPrefilter("script",function(e){e.cache===t&&(e.cache=!1),e.crossDomain&&(e.type="GET",e.global=!1)}),ce.ajaxTransport("script",function(e){if(e.crossDomain){var n,r=G.head||ce("head")[0]||G.documentElement;return{send:function(t,i){n=G.createElement("script"),n.async=!0,e.scriptCharset&&(n.charset=e.scriptCharset),n.src=e.url,n.onload=n.onreadystatechange=function(e,t){(t||!n.readyState||/loaded|complete/.test(n.readyState))&&(n.onload=n.onreadystatechange=null,n.parentNode&&n.parentNode.removeChild(n),n=null,t||i(200,"success"))},r.insertBefore(n,r.firstChild)},abort:function(){n&&n.onload(t,!0)}}}});var Ut=[],Vt=/(=)\?(?=&|$)|\?\?/;ce.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Ut.pop()||ce.expando+"_"+Ht++;return this[e]=!0,e}}),ce.ajaxPrefilter("json jsonp",function(n,r,i){var o,a,s,u=n.jsonp!==!1&&(Vt.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=ce.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Vt,"$1"+o):n.jsonp!==!1&&(n.url+=(qt.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return s||ce.error(o+" was not called"),s[0]},n.dataTypes[0]="json",a=e[o],e[o]=function(){s=arguments},i.always(function(){e[o]=a,n[o]&&(n.jsonpCallback=r.jsonpCallback,Ut.push(o)),s&&ce.isFunction(a)&&a(s[0]),s=a=t}),"script"):t});var Yt,Jt,Gt=0,Qt=e.ActiveXObject&&function(){var e;for(e in Yt)Yt[e](t,!0)};ce.ajaxSettings.xhr=e.ActiveXObject?function(){return!this.isLocal&&O()||F()}:O,Jt=ce.ajaxSettings.xhr(),ce.support.cors=!!Jt&&"withCredentials"in Jt,Jt=ce.support.ajax=!!Jt,Jt&&ce.ajaxTransport(function(n){if(!n.crossDomain||ce.support.cors){var r;return{send:function(i,o){var a,s,u=n.xhr();if(n.username?u.open(n.type,n.url,n.async,n.username,n.password):u.open(n.type,n.url,n.async),n.xhrFields)for(s in n.xhrFields)u[s]=n.xhrFields[s];n.mimeType&&u.overrideMimeType&&u.overrideMimeType(n.mimeType),n.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest");try{for(s in i)u.setRequestHeader(s,i[s])}catch(l){}u.send(n.hasContent&&n.data||null),r=function(e,i){var s,l,c,f;try{if(r&&(i||4===u.readyState))if(r=t,a&&(u.onreadystatechange=ce.noop,Qt&&delete Yt[a]),i)4!==u.readyState&&u.abort();else{f={},s=u.status,l=u.getAllResponseHeaders(),"string"==typeof u.responseText&&(f.text=u.responseText);try{c=u.statusText}catch(p){c=""}s||!n.isLocal||n.crossDomain?1223===s&&(s=204):s=f.text?200:404}}catch(d){i||o(-1,d)}f&&o(s,c,f,l)},n.async?4===u.readyState?setTimeout(r):(a=++Gt,Qt&&(Yt||(Yt={},ce(e).unload(Qt)),Yt[a]=r),u.onreadystatechange=r):r()},abort:function(){r&&r(t,!0)}}}});var Kt,Zt,en=/^(?:toggle|show|hide)$/,tn=RegExp("^(?:([+-])=|)("+fe+")([a-z%]*)$","i"),nn=/queueHooks$/,rn=[$],on={"*":[function(e,t){var n=this.createTween(e,t),r=n.cur(),i=tn.exec(t),o=i&&i[3]||(ce.cssNumber[e]?"":"px"),a=(ce.cssNumber[e]||"px"!==o&&+r)&&tn.exec(ce.css(n.elem,e)),s=1,u=20;if(a&&a[3]!==o){o=o||a[3],i=i||[],a=+r||1;do s=s||".5",a/=s,ce.style(n.elem,e,a+o);while(s!==(s=n.cur()/r)&&1!==s&&--u)}return i&&(a=n.start=+a||+r||0,n.unit=o,n.end=i[1]?a+(i[1]+1)*i[2]:+i[2]),n}]};ce.Animation=ce.extend(R,{tweener:function(e,t){ce.isFunction(e)?(t=e,e=["*"]):e=e.split(" ");for(var n,r=0,i=e.length;i>r;r++)n=e[r],on[n]=on[n]||[],on[n].unshift(t)},prefilter:function(e,t){t?rn.unshift(e):rn.push(e)}}),ce.Tween=I,I.prototype={constructor:I,init:function(e,t,n,r,i,o){this.elem=e,this.prop=n,this.easing=i||"swing",this.options=t,this.start=this.now=this.cur(),this.end=r,this.unit=o||(ce.cssNumber[n]?"":"px")},cur:function(){var e=I.propHooks[this.prop];return e&&e.get?e.get(this):I.propHooks._default.get(this)},run:function(e){var t,n=I.propHooks[this.prop];return this.pos=t=this.options.duration?ce.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):I.propHooks._default.set(this),this}},I.prototype.init.prototype=I.prototype,I.propHooks={_default:{get:function(e){var t;return null==e.elem[e.prop]||e.elem.style&&null!=e.elem.style[e.prop]?(t=ce.css(e.elem,e.prop,""),t&&"auto"!==t?t:0):e.elem[e.prop]},set:function(e){ce.fx.step[e.prop]?ce.fx.step[e.prop](e):e.elem.style&&(null!=e.elem.style[ce.cssProps[e.prop]]||ce.cssHooks[e.prop])?ce.style(e.elem,e.prop,e.now+e.unit):e.elem[e.prop]=e.now}}},I.propHooks.scrollTop=I.propHooks.scrollLeft={set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},ce.each(["toggle","show","hide"],function(e,t){var n=ce.fn[t];ce.fn[t]=function(e,r,i){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(z(t,!0),e,r,i)}}),ce.fn.extend({fadeTo:function(e,t,n,r){return this.filter(C).css("opacity",0).show().end().animate({opacity:t},e,n,r)},animate:function(e,t,n,r){var i=ce.isEmptyObject(e),o=ce.speed(t,n,r),a=function(){var t=R(this,ce.extend({},e),o);(i||ce._data(this,"finish"))&&t.stop(!0)};return a.finish=a,i||o.queue===!1?this.each(a):this.queue(o.queue,a)},stop:function(e,n,r){var i=function(e){var t=e.stop;delete e.stop,t(r)};return"string"!=typeof e&&(r=n,n=e,e=t),n&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,n=null!=e&&e+"queueHooks",o=ce.timers,a=ce._data(this);if(n)a[n]&&a[n].stop&&i(a[n]);else for(n in a)a[n]&&a[n].stop&&nn.test(n)&&i(a[n]);for(n=o.length;n--;)o[n].elem!==this||null!=e&&o[n].queue!==e||(o[n].anim.stop(r),t=!1,o.splice(n,1));(t||!r)&&ce.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=ce._data(this),r=n[e+"queue"],i=n[e+"queueHooks"],o=ce.timers,a=r?r.length:0;for(n.finish=!0,ce.queue(this,e,[]),i&&i.stop&&i.stop.call(this,!0),t=o.length;t--;)o[t].elem===this&&o[t].queue===e&&(o[t].anim.stop(!0),o.splice(t,1));for(t=0;a>t;t++)r[t]&&r[t].finish&&r[t].finish.call(this);delete n.finish})}}),ce.each({slideDown:z("show"),slideUp:z("hide"),slideToggle:z("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){ce.fn[e]=function(e,n,r){return this.animate(t,e,n,r)}}),ce.speed=function(e,t,n){var r=e&&"object"==typeof e?ce.extend({},e):{complete:n||!n&&t||ce.isFunction(e)&&e,duration:e,easing:n&&t||t&&!ce.isFunction(t)&&t};return r.duration=ce.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in ce.fx.speeds?ce.fx.speeds[r.duration]:ce.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){ce.isFunction(r.old)&&r.old.call(this),r.queue&&ce.dequeue(this,r.queue)},r},ce.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2}},ce.timers=[],ce.fx=I.prototype.init,ce.fx.tick=function(){var e,n=ce.timers,r=0;for(Kt=ce.now();n.length>r;r++)e=n[r],e()||n[r]!==e||n.splice(r--,1);n.length||ce.fx.stop(),Kt=t},ce.fx.timer=function(e){e()&&ce.timers.push(e)&&ce.fx.start()},ce.fx.interval=13,ce.fx.start=function(){Zt||(Zt=setInterval(ce.fx.tick,ce.fx.interval))},ce.fx.stop=function(){clearInterval(Zt),Zt=null},ce.fx.speeds={slow:600,fast:200,_default:400},ce.fx.step={},ce.expr&&ce.expr.filters&&(ce.expr.filters.animated=function(e){return ce.grep(ce.timers,function(t){return e===t.elem}).length}),ce.fn.offset=function(e){if(arguments.length)return e===t?this:this.each(function(t){ce.offset.setOffset(this,e,t)});var n,r,i={top:0,left:0},o=this[0],a=o&&o.ownerDocument;return a?(n=a.documentElement,ce.contains(n,o)?(typeof o.getBoundingClientRect!==Y&&(i=o.getBoundingClientRect()),r=X(a),{top:i.top+(r.pageYOffset||n.scrollTop)-(n.clientTop||0),left:i.left+(r.pageXOffset||n.scrollLeft)-(n.clientLeft||0)}):i):void 0},ce.offset={setOffset:function(e,t,n){var r=ce.css(e,"position");"static"===r&&(e.style.position="relative");var i,o,a=ce(e),s=a.offset(),u=ce.css(e,"top"),l=ce.css(e,"left"),c=("absolute"===r||"fixed"===r)&&ce.inArray("auto",[u,l])>-1,f={},p={};c?(p=a.position(),i=p.top,o=p.left):(i=parseFloat(u)||0,o=parseFloat(l)||0),ce.isFunction(t)&&(t=t.call(e,n,s)),null!=t.top&&(f.top=t.top-s.top+i),null!=t.left&&(f.left=t.left-s.left+o),"using"in t?t.using.call(e,f):a.css(f)}},ce.fn.extend({position:function(){if(this[0]){var e,t,n={top:0,left:0},r=this[0];return"fixed"===ce.css(r,"position")?t=r.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),ce.nodeName(e[0],"html")||(n=e.offset()),n.top+=ce.css(e[0],"borderTopWidth",!0),n.left+=ce.css(e[0],"borderLeftWidth",!0)),{top:t.top-n.top-ce.css(r,"marginTop",!0),left:t.left-n.left-ce.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent||Q;e&&!ce.nodeName(e,"html")&&"static"===ce.css(e,"position");)e=e.offsetParent;return e||Q})}}),ce.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,n){var r=/Y/.test(n);ce.fn[e]=function(i){return ce.access(this,function(e,i,o){var a=X(e);return o===t?a?n in a?a[n]:a.document.documentElement[i]:e[i]:(a?a.scrollTo(r?ce(a).scrollLeft():o,r?o:ce(a).scrollTop()):e[i]=o,t)},e,i,arguments.length,null)}}),ce.each({Height:"height",Width:"width"},function(e,n){ce.each({padding:"inner"+e,content:n,"":"outer"+e},function(r,i){ce.fn[i]=function(i,o){var a=arguments.length&&(r||"boolean"!=typeof i),s=r||(i===!0||o===!0?"margin":"border");return ce.access(this,function(n,r,i){var o;return ce.isWindow(n)?n.document.documentElement["client"+e]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+e],o["scroll"+e],n.body["offset"+e],o["offset"+e],o["client"+e])):i===t?ce.css(n,r,s):ce.style(n,r,i,s)},n,a?i:t,a,null)}})}),ce.fn.size=function(){return this.length},ce.fn.andSelf=ce.fn.addBack,"object"==typeof module&&module&&"object"==typeof module.exports?module.exports=ce:(e.jQuery=e.$=ce,"function"==typeof define&&define.amd&&define("jquery",[],function(){return ce}))}(window);
!function(e){"function"==typeof define&&define.amd?define(["jquery"],e):e("object"==typeof exports?require("jquery"):jQuery)}(function(e){function n(e){return u.raw?e:encodeURIComponent(e)}function o(e){return u.raw?e:decodeURIComponent(e)}function i(e){return n(u.json?JSON.stringify(e):String(e))}function r(e){0===e.indexOf('"')&&(e=e.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\"));try{return e=decodeURIComponent(e.replace(c," ")),u.json?JSON.parse(e):e}catch(n){}}function t(n,o){var i=u.raw?n:r(n);return e.isFunction(o)?o(i):i}var c=/\+/g,u=e.cookie=function(r,c,a){if(arguments.length>1&&!e.isFunction(c)){if(a=e.extend({},u.defaults,a),"number"==typeof a.expires){var f=a.expires,s=a.expires=new Date;s.setTime(+s+864e5*f)}return document.cookie=[n(r),"=",i(c),a.expires?"; expires="+a.expires.toUTCString():"",a.path?"; path="+a.path:"",a.domain?"; domain="+a.domain:"",a.secure?"; secure":""].join("")}for(var d=r?void 0:{},p=document.cookie?document.cookie.split("; "):[],m=0,x=p.length;x>m;m++){var l=p[m].split("="),g=o(l.shift()),k=l.join("=");if(r&&r===g){d=t(k,c);break}r||void 0===(k=t(k))||(d[g]=k)}return d};u.defaults={},e.removeCookie=function(n,o){return void 0===e.cookie(n)?!1:(e.cookie(n,"",e.extend({},o,{expires:-1})),!e.cookie(n))}});
-var Handlebars=function(){var t=function(){"use strict";function t(t){this.string=t}var e;return t.prototype.toString=function(){return""+this.string},e=t}(),e=function(t){"use strict";function e(t){return a[t]||"&"}function s(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}function i(t){return t instanceof o?t.toString():t||0===t?(t=""+t,p.test(t)?t.replace(h,e):t):""}function n(t){return t||0===t?u(t)&&0===t.length?!0:!1:!0}var r={},o=t,a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},h=/[&<>"'`]/g,p=/[&<>"'`]/;r.extend=s;var l=Object.prototype.toString;r.toString=l;var c=function(t){return"function"==typeof t};c(/x/)&&(c=function(t){return"function"==typeof t&&"[object Function]"===l.call(t)});var c;r.isFunction=c;var u=Array.isArray||function(t){return t&&"object"==typeof t?"[object Array]"===l.call(t):!1};return r.isArray=u,r.escapeExpression=i,r.isEmpty=n,r}(t),s=function(){"use strict";function t(t,e){var i;e&&e.firstLine&&(i=e.firstLine,t+=" - "+i+":"+e.firstColumn);for(var n=Error.prototype.constructor.call(this,t),r=0;r
0?t.helpers.each(e,s):i(this):n(e)}),t.registerHelper("each",function(t,e){var s,i=e.fn,n=e.inverse,r=0,o="";if(u(t)&&(t=t.call(this)),e.data&&(s=m(e.data)),t&&"object"==typeof t)if(c(t))for(var a=t.length;a>r;r++)s&&(s.index=r,s.first=0===r,s.last=r===t.length-1),o+=i(t[r],{data:s});else for(var h in t)t.hasOwnProperty(h)&&(s&&(s.key=h,s.index=r,s.first=0===r),o+=i(t[h],{data:s}),r++);return 0===r&&(o=n(this)),o}),t.registerHelper("if",function(t,e){return u(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||o.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,s){return t.helpers["if"].call(this,e,{fn:s.inverse,inverse:s.fn,hash:s.hash})}),t.registerHelper("with",function(t,e){return u(t)&&(t=t.call(this)),o.isEmpty(t)?void 0:e.fn(t)}),t.registerHelper("log",function(e,s){var i=s.data&&null!=s.data.level?parseInt(s.data.level,10):1;t.log(i,e)})}function n(t,e){g.log(t,e)}var r={},o=t,a=e,h="1.3.0";r.VERSION=h;var p=4;r.COMPILER_REVISION=p;var l={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};r.REVISION_CHANGES=l;var c=o.isArray,u=o.isFunction,f=o.toString,d="[object Object]";r.HandlebarsEnvironment=s,s.prototype={constructor:s,logger:g,log:n,registerHelper:function(t,e,s){if(f.call(t)===d){if(s||e)throw new a("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else s&&(e.not=s),this.helpers[t]=e},registerPartial:function(t,e){f.call(t)===d?o.extend(this.partials,t):this.partials[t]=e}};var g={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(t,e){if(g.level<=t){var s=g.methodMap[t];"undefined"!=typeof console&&console[s]&&console[s].call(console,e)}}};r.logger=g,r.log=n;var m=function(t){var e={};return o.extend(e,t),e};return r.createFrame=m,r}(e,s),n=function(t,e,s){"use strict";function i(t){var e=t&&t[0]||1,s=u;if(e!==s){if(s>e){var i=f[s],n=f[e];throw new c("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+n+").")}throw new c("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function n(t,e){if(!e)throw new c("No environment passed to template");var s=function(t,s,i,n,r,o){var a=e.VM.invokePartial.apply(this,arguments);if(null!=a)return a;if(e.compile){var h={helpers:n,partials:r,data:o};return r[s]=e.compile(t,{data:void 0!==o},e),r[s](i,h)}throw new c("The partial "+s+" could not be compiled when running in runtime-only mode")},i={escapeExpression:l.escapeExpression,invokePartial:s,programs:[],program:function(t,e,s){var i=this.programs[t];return s?i=o(t,e,s):i||(i=this.programs[t]=o(t,e)),i},merge:function(t,e){var s=t||e;return t&&e&&t!==e&&(s={},l.extend(s,e),l.extend(s,t)),s},programWithDepth:e.VM.programWithDepth,noop:e.VM.noop,compilerInfo:null};return function(s,n){n=n||{};var r,o,a=n.partial?n:e;n.partial||(r=n.helpers,o=n.partials);var h=t.call(i,a,s,r,o,n.data);return n.partial||e.VM.checkRevision(i.compilerInfo),h}}function r(t,e,s){var i=Array.prototype.slice.call(arguments,3),n=function(t,n){return n=n||{},e.apply(this,[t,n.data||s].concat(i))};return n.program=t,n.depth=i.length,n}function o(t,e,s){var i=function(t,i){return i=i||{},e(t,i.data||s)};return i.program=t,i.depth=0,i}function a(t,e,s,i,n,r){var o={partial:!0,helpers:i,partials:n,data:r};if(void 0===t)throw new c("The partial "+e+" could not be found");return t instanceof Function?t(s,o):void 0}function h(){return""}var p={},l=t,c=e,u=s.COMPILER_REVISION,f=s.REVISION_CHANGES;return p.checkRevision=i,p.template=n,p.programWithDepth=r,p.program=o,p.invokePartial=a,p.noop=h,p}(e,s,i),r=function(t,e,s,i,n){"use strict";var r,o=t,a=e,h=s,p=i,l=n,c=function(){var t=new o.HandlebarsEnvironment;return p.extend(t,o),t.SafeString=a,t.Exception=h,t.Utils=p,t.VM=l,t.template=function(e){return l.template(e,t)},t},u=c();return u.create=c,r=u}(i,t,s,e,n),o=function(t){"use strict";function e(t){t=t||{},this.firstLine=t.first_line,this.firstColumn=t.first_column,this.lastColumn=t.last_column,this.lastLine=t.last_line}var s,i=t,n={ProgramNode:function(t,s,i,r){var o,a;3===arguments.length?(r=i,i=null):2===arguments.length&&(r=s,s=null),e.call(this,r),this.type="program",this.statements=t,this.strip={},i?(a=i[0],a?(o={first_line:a.firstLine,last_line:a.lastLine,last_column:a.lastColumn,first_column:a.firstColumn},this.inverse=new n.ProgramNode(i,s,o)):this.inverse=new n.ProgramNode(i,s),this.strip.right=s.left):s&&(this.strip.left=s.right)},MustacheNode:function(t,s,i,r,o){if(e.call(this,o),this.type="mustache",this.strip=r,null!=i&&i.charAt){var a=i.charAt(3)||i.charAt(2);this.escaped="{"!==a&&"&"!==a}else this.escaped=!!i;t instanceof n.SexprNode?this.sexpr=t:this.sexpr=new n.SexprNode(t,s),this.sexpr.isRoot=!0,this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(t,s,i){e.call(this,i),this.type="sexpr",this.hash=s;var n=this.id=t[0],r=this.params=t.slice(1),o=this.eligibleHelper=n.isSimple;this.isHelper=o&&(r.length||s)},PartialNode:function(t,s,i,n){e.call(this,n),this.type="partial",this.partialName=t,this.context=s,this.strip=i},BlockNode:function(t,s,n,r,o){if(e.call(this,o),t.sexpr.id.original!==r.path.original)throw new i(t.sexpr.id.original+" doesn't match "+r.path.original,this);this.type="block",this.mustache=t,this.program=s,this.inverse=n,this.strip={left:t.strip.left,right:r.strip.right},(s||n).strip.left=t.strip.right,(n||s).strip.right=r.strip.left,n&&!s&&(this.isInverse=!0)},ContentNode:function(t,s){e.call(this,s),this.type="content",this.string=t},HashNode:function(t,s){e.call(this,s),this.type="hash",this.pairs=t},IdNode:function(t,s){e.call(this,s),this.type="ID";for(var n="",r=[],o=0,a=0,h=t.length;h>a;a++){var p=t[a].part;if(n+=(t[a].separator||"")+p,".."===p||"."===p||"this"===p){if(r.length>0)throw new i("Invalid path: "+n,this);".."===p?o++:this.isScoped=!0}else r.push(p)}this.original=n,this.parts=r,this.string=r.join("."),this.depth=o,this.isSimple=1===t.length&&!this.isScoped&&0===o,this.stringModeValue=this.string},PartialNameNode:function(t,s){e.call(this,s),this.type="PARTIAL_NAME",this.name=t.original},DataNode:function(t,s){e.call(this,s),this.type="DATA",this.id=t},StringNode:function(t,s){e.call(this,s),this.type="STRING",this.original=this.string=this.stringModeValue=t},IntegerNode:function(t,s){e.call(this,s),this.type="INTEGER",this.original=this.integer=t,this.stringModeValue=Number(t)},BooleanNode:function(t,s){e.call(this,s),this.type="BOOLEAN",this.bool=t,this.stringModeValue="true"===t},CommentNode:function(t,s){e.call(this,s),this.type="comment",this.comment=t}};return s=n}(s),a=function(){"use strict";var t,e=function(){function t(t,e){return{left:"~"===t.charAt(2),right:"~"===e.charAt(0)||"~"===e.charAt(1)}}function e(){this.yy={}}var s={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,sexpr:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,sexpr_repetition0:28,sexpr_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,OPEN_SEXPR:35,CLOSE_SEXPR:36,hash:37,hash_repetition_plus0:38,hashSegment:39,ID:40,EQUALS:41,DATA:42,pathSegments:43,SEP:44,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],performAction:function(e,s,i,n,r,o,a){var h=o.length-1;switch(r){case 1:return new n.ProgramNode(o[h-1],this._$);case 2:return new n.ProgramNode([],this._$);case 3:this.$=new n.ProgramNode([],o[h-1],o[h],this._$);break;case 4:this.$=new n.ProgramNode(o[h-2],o[h-1],o[h],this._$);break;case 5:this.$=new n.ProgramNode(o[h-1],o[h],[],this._$);break;case 6:this.$=new n.ProgramNode(o[h],this._$);break;case 7:this.$=new n.ProgramNode([],this._$);break;case 8:this.$=new n.ProgramNode([],this._$);break;case 9:this.$=[o[h]];break;case 10:o[h-1].push(o[h]),this.$=o[h-1];break;case 11:this.$=new n.BlockNode(o[h-2],o[h-1].inverse,o[h-1],o[h],this._$);break;case 12:this.$=new n.BlockNode(o[h-2],o[h-1],o[h-1].inverse,o[h],this._$);break;case 13:this.$=o[h];break;case 14:this.$=o[h];break;case 15:this.$=new n.ContentNode(o[h],this._$);break;case 16:this.$=new n.CommentNode(o[h],this._$);break;case 17:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 18:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 19:this.$={path:o[h-1],strip:t(o[h-2],o[h])};break;case 20:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 21:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 22:this.$=new n.PartialNode(o[h-2],o[h-1],t(o[h-3],o[h]),this._$);break;case 23:this.$=t(o[h-1],o[h]);break;case 24:this.$=new n.SexprNode([o[h-2]].concat(o[h-1]),o[h],this._$);break;case 25:this.$=new n.SexprNode([o[h]],null,this._$);break;case 26:this.$=o[h];break;case 27:this.$=new n.StringNode(o[h],this._$);break;case 28:this.$=new n.IntegerNode(o[h],this._$);break;case 29:this.$=new n.BooleanNode(o[h],this._$);break;case 30:this.$=o[h];break;case 31:o[h-1].isHelper=!0,this.$=o[h-1];break;case 32:this.$=new n.HashNode(o[h],this._$);break;case 33:this.$=[o[h-2],o[h]];break;case 34:this.$=new n.PartialNameNode(o[h],this._$);break;case 35:this.$=new n.PartialNameNode(new n.StringNode(o[h],this._$),this._$);break;case 36:this.$=new n.PartialNameNode(new n.IntegerNode(o[h],this._$));break;case 37:this.$=new n.DataNode(o[h],this._$);break;case 38:this.$=new n.IdNode(o[h],this._$);break;case 39:o[h-2].push({part:o[h],separator:o[h-1]}),this.$=o[h-2];break;case 40:this.$=[{part:o[h]}];break;case 43:this.$=[];break;case 44:o[h-1].push(o[h]);break;case 47:this.$=[o[h]];break;case 48:o[h-1].push(o[h])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],defaultActions:{3:[2,2],16:[2,1],50:[2,42]},parseError:function(t,e){throw new Error(t)},parse:function(t){function e(){var t;return t=s.lexer.lex()||1,"number"!=typeof t&&(t=s.symbols_[t]||t),t}var s=this,i=[0],n=[null],r=[],o=this.table,a="",h=0,p=0,l=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;r.push(c);var u=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,d,g,m,v,y,S,k,x,b={};;){if(g=i[i.length-1],this.defaultActions[g]?m=this.defaultActions[g]:((null===f||"undefined"==typeof f)&&(f=e()),m=o[g]&&o[g][f]),"undefined"==typeof m||!m.length||!m[0]){var _="";if(!l){x=[];for(y in o[g])this.terminals_[y]&&y>2&&x.push("'"+this.terminals_[y]+"'");_=this.lexer.showPosition?"Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:c,expected:x})}}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+f);switch(m[0]){case 1:i.push(f),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(m[1]),f=null,d?(f=d,d=null):(p=this.lexer.yyleng,a=this.lexer.yytext,h=this.lexer.yylineno,c=this.lexer.yylloc,l>0&&l--);break;case 2:if(S=this.productions_[m[1]][1],b.$=n[n.length-S],b._$={first_line:r[r.length-(S||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(S||1)].first_column,last_column:r[r.length-1].last_column},u&&(b._$.range=[r[r.length-(S||1)].range[0],r[r.length-1].range[1]]),v=this.performAction.call(b,a,p,h,this.yy,m[1],n,r),"undefined"!=typeof v)return v;S&&(i=i.slice(0,-1*S*2),n=n.slice(0,-1*S),r=r.slice(0,-1*S)),i.push(this.productions_[m[1]][0]),n.push(b.$),r.push(b._$),k=o[i[i.length-2]][i[i.length-1]],i.push(k);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,s,i,n;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)||(e=s,i=o,this.options.flex));o++);return e?(n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t?t:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return"undefined"!=typeof t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,s,i){function n(t,s){return e.yytext=e.yytext.substr(t,e.yyleng-s)}switch(s){case 0:if("\\\\"===e.yytext.slice(-2)?(n(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(n(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return n(0,4),this.popState(),15;case 4:return 35;case 5:return 36;case 6:return 25;case 7:return 16;case 8:return 20;case 9:return 19;case 10:return 19;case 11:return 23;case 12:return 22;case 13:this.popState(),this.begin("com");break;case 14:return n(3,5),this.popState(),15;case 15:return 22;case 16:return 41;case 17:return 40;case 18:return 40;case 19:return 44;case 20:break;case 21:return this.popState(),24;case 22:return this.popState(),18;case 23:return e.yytext=n(1,2).replace(/\\"/g,'"'),32;case 24:return e.yytext=n(1,2).replace(/\\'/g,"'"),32;case 25:return 42;case 26:return 34;case 27:return 34;case 28:return 33;case 29:return 40;case 30:return e.yytext=n(1,2),40;case 31:return"INVALID";case 32:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}},t}();return s.lexer=i,e.prototype=s,s.Parser=e,new e}();return t=e}(),h=function(t,e){"use strict";function s(t){return t.constructor===r.ProgramNode?t:(n.yy=r,n.parse(t))}var i={},n=t,r=e;return i.parser=n,i.parse=s,i}(a,o),p=function(t){"use strict";function e(){}function s(t,e,s){if(null==t||"string"!=typeof t&&t.constructor!==s.AST.ProgramNode)throw new r("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0);var i=s.parse(t),n=(new s.Compiler).compile(i,e);return(new s.JavaScriptCompiler).compile(n,e)}function i(t,e,s){function i(){var i=s.parse(t),n=(new s.Compiler).compile(i,e),r=(new s.JavaScriptCompiler).compile(n,e,void 0,!0);return s.template(r)}if(null==t||"string"!=typeof t&&t.constructor!==s.AST.ProgramNode)throw new r("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=e||{},"data"in e||(e.data=!0);var n;return function(t,e){return n||(n=i()),n.call(this,t,e)}}var n={},r=t;return n.Compiler=e,e.prototype={compiler:e,disassemble:function(){for(var t,e,s,i=this.opcodes,n=[],r=0,o=i.length;o>r;r++)if(t=i[r],"DECLARE"===t.opcode)n.push("DECLARE "+t.name+"="+t.value);else{e=[];for(var a=0;as;s++){var i=this.opcodes[s],n=t.opcodes[s];if(i.opcode!==n.opcode||i.args.length!==n.args.length)return!1;for(var r=0;rs;s++)if(!this.children[s].equals(t.children[s]))return!1;return!0},guid:0,compile:function(t,e){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=e;var s=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0},s)for(var i in s)this.options.knownHelpers[i]=s[i];return this.accept(t)},accept:function(t){var e,s=t.strip||{};return s.left&&this.opcode("strip"),e=this[t.type](t),s.right&&this.opcode("strip"),e},program:function(t){for(var e=t.statements,s=0,i=e.length;i>s;s++)this.accept(e[s]);return this.isSimple=1===i,this.depths.list=this.depths.list.sort(function(t,e){return t-e}),this},compileProgram:function(t){var e,s=(new this.compiler).compile(t,this.options),i=this.guid++;this.usePartial=this.usePartial||s.usePartial,this.children[i]=s;for(var n=0,r=s.depths.list.length;r>n;n++)e=s.depths.list[n],2>e||this.addDepth(e-1);return i},block:function(t){var e=t.mustache,s=t.program,i=t.inverse;s&&(s=this.compileProgram(s)),i&&(i=this.compileProgram(i));var n=e.sexpr,r=this.classifySexpr(n);"helper"===r?this.helperSexpr(n,s,i):"simple"===r?(this.simpleSexpr(n),this.opcode("pushProgram",s),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousSexpr(n,s,i),this.opcode("pushProgram",s),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(t){var e,s,i=t.pairs;this.opcode("pushHash");for(var n=0,r=i.length;r>n;n++)e=i[n],s=e[1],this.options.stringParams?(s.depth&&this.addDepth(s.depth),this.opcode("getContext",s.depth||0),this.opcode("pushStringParam",s.stringModeValue,s.type),"sexpr"===s.type&&this.sexpr(s)):this.accept(s),this.opcode("assignToHash",e[0]);this.opcode("popHash")},partial:function(t){var e=t.partialName;this.usePartial=!0,t.context?this.ID(t.context):this.opcode("push","depth0"),this.opcode("invokePartial",e.name),this.opcode("append")},content:function(t){this.opcode("appendContent",t.string)},mustache:function(t){this.sexpr(t.sexpr),t.escaped&&!this.options.noEscape?this.opcode("appendEscaped"):this.opcode("append")},ambiguousSexpr:function(t,e,s){var i=t.id,n=i.parts[0],r=null!=e||null!=s;this.opcode("getContext",i.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",s),this.opcode("invokeAmbiguous",n,r)},simpleSexpr:function(t){var e=t.id;"DATA"===e.type?this.DATA(e):e.parts.length?this.ID(e):(this.addDepth(e.depth),this.opcode("getContext",e.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,s){var i=this.setupFullMustacheParams(t,e,s),n=t.id.parts[0];if(this.options.knownHelpers[n])this.opcode("invokeKnownHelper",i.length,n);else{if(this.options.knownHelpersOnly)throw new r("You specified knownHelpersOnly, but used the unknown helper "+n,t);this.opcode("invokeHelper",i.length,n,t.isRoot)}},sexpr:function(t){var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ID:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0];e?this.opcode("lookupOnContext",t.parts[0]):this.opcode("pushContext");for(var s=1,i=t.parts.length;i>s;s++)this.opcode("lookup",t.parts[s])},DATA:function(t){if(this.options.data=!0,t.id.isScoped||t.id.depth)throw new r("Scoped data references are not supported: "+t.original,t);this.opcode("lookupData");for(var e=t.id.parts,s=0,i=e.length;i>s;s++)this.opcode("lookup",e[s])},STRING:function(t){this.opcode("pushString",t.string)},INTEGER:function(t){this.opcode("pushLiteral",t.integer)},BOOLEAN:function(t){this.opcode("pushLiteral",t.bool)},comment:function(){},opcode:function(t){this.opcodes.push({opcode:t,args:[].slice.call(arguments,1)})},declare:function(t,e){this.opcodes.push({opcode:"DECLARE",name:t,value:e})},addDepth:function(t){0!==t&&(this.depths[t]||(this.depths[t]=!0,this.depths.list.push(t)))},classifySexpr:function(t){var e=t.isHelper,s=t.eligibleHelper,i=this.options;if(s&&!e){var n=t.id.parts[0];i.knownHelpers[n]?e=!0:i.knownHelpersOnly&&(s=!1)}return e?"helper":s?"ambiguous":"simple"},pushParams:function(t){for(var e,s=t.length;s--;)e=t[s],this.options.stringParams?(e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",e.stringModeValue,e.type),"sexpr"===e.type&&this.sexpr(e)):this[e.type](e)},setupFullMustacheParams:function(t,e,s){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",e),this.opcode("pushProgram",s),t.hash?this.hash(t.hash):this.opcode("emptyHash"),i}},n.precompile=s,n.compile=i,n}(s),l=function(t,e){"use strict";function s(t){this.value=t}function i(){}var n,r=t.COMPILER_REVISION,o=t.REVISION_CHANGES,a=t.log,h=e;i.prototype={nameLookup:function(t,e){var s,n;return 0===t.indexOf("depth")&&(s=!0),n=/^[0-9]+$/.test(e)?t+"["+e+"]":i.isValidJavaScriptVariableName(e)?t+"."+e:t+"['"+e+"']",s?"("+t+" && "+n+")":n},compilerInfo:function(){var t=r,e=o[t];return"this.compilerInfo = ["+t+",'"+e+"'];\n"},appendToBuffer:function(t){return this.environment.isSimple?"return "+t+";":{appendToBuffer:!0,content:t,toString:function(){return"buffer += "+t+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(t,e,s,i){this.environment=t,this.options=e||{},a("debug",this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!s,this.context=s||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.hashes=[],
-this.compileStack=[],this.inlineStack=[],this.compileChildren(t,e);var n,r=t.opcodes;this.i=0;for(var o=r.length;this.in;n++)i.push("depth"+this.environment.depths.list[n]);var o=this.mergeSource();if(this.isChild||(o=this.compilerInfo()+o),t)return i.push(o),Function.apply(this,i);var h="function "+(this.name||"")+"("+i.join(",")+") {\n "+o+"}";return a("debug",h+"\n\n"),h},mergeSource:function(){for(var t,e="",s=0,i=this.source.length;i>s;s++){var n=this.source[s];n.appendToBuffer?t=t?t+"\n + "+n.content:n.content:(t&&(e+="buffer += "+t+";\n ",t=void 0),e+=n+"\n ")}return e},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var t=["depth0"];this.setupParams(0,t),this.replaceStack(function(e){return t.splice(1,0,e),"blockHelperMissing.call("+t.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var t=["depth0"];this.setupParams(0,t);var e=this.topStack();t.splice(1,0,e),this.pushSource("if (!"+this.lastHelper+") { "+e+" = blockHelperMissing.call("+t.join(", ")+"); }")},appendContent:function(t){this.pendingContent&&(t=this.pendingContent+t),this.stripNext&&(t=t.replace(/^\s+/,"")),this.pendingContent=t},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,"")),this.stripNext="strip"},append:function(){this.flushInline();var t=this.popStack();this.pushSource("if("+t+" || "+t+" === 0) { "+this.appendToBuffer(t)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(t){this.lastContext!==t&&(this.lastContext=t)},lookupOnContext:function(t){this.push(this.nameLookup("depth"+this.lastContext,t,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(t){return"typeof "+t+" === functionType ? "+t+".apply(depth0) : "+t})},lookup:function(t){this.replaceStack(function(e){return e+" == null || "+e+" === false ? "+e+" : "+this.nameLookup(e,t,"context")})},lookupData:function(){this.pushStackLiteral("data")},pushStringParam:function(t,e){this.pushStackLiteral("depth"+this.lastContext),this.pushString(e),"sexpr"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.options.stringParams&&(this.push("{"+t.contexts.join(",")+"}"),this.push("{"+t.types.join(",")+"}")),this.push("{\n "+t.values.join(",\n ")+"\n }")},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},push:function(t){return this.inlineStack.push(t),t},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){null!=t?this.pushStackLiteral(this.programExpression(t)):this.pushStackLiteral(null)},invokeHelper:function(t,e,s){this.context.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var i=this.lastHelper=this.setupHelper(t,e,!0),n=this.nameLookup("depth"+this.lastContext,e,"context"),r="helper = "+i.name+" || "+n;i.paramsInit&&(r+=","+i.paramsInit),this.push("("+r+",helper ? helper.call("+i.callParams+") : helperMissing.call("+i.helperMissingParams+"))"),s||this.flushInline()},invokeKnownHelper:function(t,e){var s=this.setupHelper(t,e);this.push(s.name+".call("+s.callParams+")")},invokeAmbiguous:function(t,e){this.context.aliases.functionType='"function"',this.useRegister("helper"),this.emptyHash();var s=this.setupHelper(0,t,e),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),n=this.nameLookup("depth"+this.lastContext,t,"context"),r=this.nextStack();s.paramsInit&&this.pushSource(s.paramsInit),this.pushSource("if (helper = "+i+") { "+r+" = helper.call("+s.callParams+"); }"),this.pushSource("else { helper = "+n+"; "+r+" = typeof helper === functionType ? helper.call("+s.callParams+") : helper; }")},invokePartial:function(t){var e=[this.nameLookup("partials",t,"partial"),"'"+t+"'",this.popStack(),"helpers","partials"];this.options.data&&e.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+e.join(", ")+")")},assignToHash:function(t){var e,s,i=this.popStack();this.options.stringParams&&(s=this.popStack(),e=this.popStack());var n=this.hash;e&&n.contexts.push("'"+t+"': "+e),s&&n.types.push("'"+t+"': "+s),n.values.push("'"+t+"': ("+i+")")},compiler:i,compileChildren:function(t,e){for(var s,i,n=t.children,r=0,o=n.length;o>r;r++){s=n[r],i=new this.compiler;var a=this.matchExistingProgram(s);null==a?(this.context.programs.push(""),a=this.context.programs.length,s.index=a,s.name="program"+a,this.context.programs[a]=i.compile(s,e,this.context),this.context.environments[a]=s):(s.index=a,s.name="program"+a)}},matchExistingProgram:function(t){for(var e=0,s=this.context.environments.length;s>e;e++){var i=this.context.environments[e];if(i&&i.equals(t))return e}},programExpression:function(t){if(this.context.aliases.self="this",null==t)return"self.noop";for(var e,s=this.environment.children[t],i=s.depths.list,n=[s.index,s.name,"data"],r=0,o=i.length;o>r;r++)e=i[r],1===e?n.push("depth0"):n.push("depth"+(e-1));return(0===i.length?"self.program(":"self.programWithDepth(")+n.join(", ")+")"},register:function(t,e){this.useRegister(t),this.pushSource(t+" = "+e+";")},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},pushStackLiteral:function(t){return this.push(new s(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),t&&this.source.push(t)},pushStack:function(t){this.flushInline();var e=this.incrStack();return t&&this.pushSource(e+" = "+t+";"),this.compileStack.push(e),e},replaceStack:function(t){var e,i,n,r="",o=this.isInline();if(o){var a=this.popStack(!0);if(a instanceof s)e=a.value,n=!0;else{i=!this.stackSlot;var h=i?this.incrStack():this.topStackName();r="("+this.push(h)+" = "+a+"),",e=this.topStack()}}else e=this.topStack();var p=t.call(this,e);return o?(n||this.popStack(),i&&this.stackSlot--,this.push("("+r+p+")")):(/^stack/.test(e)||(e=this.nextStack()),this.pushSource(e+" = ("+r+p+");")),e},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;if(t.length){this.inlineStack=[];for(var e=0,i=t.length;i>e;e++){var n=t[e];n instanceof s?this.compileStack.push(n):this.pushStack(n)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),i=(e?this.inlineStack:this.compileStack).pop();if(!t&&i instanceof s)return i.value;if(!e){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return i},topStack:function(t){var e=this.isInline()?this.inlineStack:this.compileStack,i=e[e.length-1];return!t&&i instanceof s?i.value:i},quotedString:function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(t,e,s){var i=[],n=this.setupParams(t,i,s),r=this.nameLookup("helpers",e,"helper");return{params:i,paramsInit:n,name:r,callParams:["depth0"].concat(i).join(", "),helperMissingParams:s&&["depth0",this.quotedString(e)].concat(i).join(", ")}},setupOptions:function(t,e){var s,i,n,r=[],o=[],a=[];r.push("hash:"+this.popStack()),this.options.stringParams&&(r.push("hashTypes:"+this.popStack()),r.push("hashContexts:"+this.popStack())),i=this.popStack(),n=this.popStack(),(n||i)&&(n||(this.context.aliases.self="this",n="self.noop"),i||(this.context.aliases.self="this",i="self.noop"),r.push("inverse:"+i),r.push("fn:"+n));for(var h=0;t>h;h++)s=this.popStack(),e.push(s),this.options.stringParams&&(a.push(this.popStack()),o.push(this.popStack()));return this.options.stringParams&&(r.push("contexts:["+o.join(",")+"]"),r.push("types:["+a.join(",")+"]")),this.options.data&&r.push("data:data"),r},setupParams:function(t,e,s){var i="{"+this.setupOptions(t,e).join(",")+"}";return s?(this.useRegister("options"),e.push("options"),"options="+i):(e.push(i),"")}};for(var p="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),l=i.RESERVED_WORDS={},c=0,u=p.length;u>c;c++)l[p[c]]=!0;return i.isValidJavaScriptVariableName=function(t){return!i.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)?!0:!1},n=i}(i,s),c=function(t,e,s,i,n){"use strict";var r,o=t,a=e,h=s.parser,p=s.parse,l=i.Compiler,c=i.compile,u=i.precompile,f=n,d=o.create,g=function(){var t=d();return t.compile=function(e,s){return c(e,s,t)},t.precompile=function(e,s){return u(e,s,t)},t.AST=a,t.Compiler=l,t.JavaScriptCompiler=f,t.Parser=h,t.parse=p,t};return o=g(),o.create=g,r=o}(r,o,h,p,l);return c}();
-!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):$.sammy=window.Sammy=t($)}(function(t){var e,n="([^/]+)",i=/:([\w\d]+)/g,r=/\?([^#]*)?$/,o=function(t){return Array.prototype.slice.call(t)},a=function(t){return"[object Function]"===Object.prototype.toString.call(t)},s=function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},c=function(t){return decodeURIComponent((t||"").replace(/\+/g," "))},h=encodeURIComponent,p=function(t){return String(t).replace(/&(?!\w+;)/g,"&").replace(//g,">").replace(/"/g,""")},l=function(t){return function(){return this.route.apply(this,[t].concat(Array.prototype.slice.call(arguments)))}},f={},g=!(!window.history||!history.pushState),d=[];return e=function(){var n,i,r=o(arguments);return e.apps=e.apps||{},0===r.length||r[0]&&a(r[0])?e.apply(e,["body"].concat(r)):"string"==typeof(i=r.shift())?(n=e.apps[i]||new e.Application,n.element_selector=i,r.length>0&&t.each(r,function(t,e){n.use(e)}),n.element_selector!=i&&delete e.apps[i],e.apps[n.element_selector]=n,n):void 0},e.VERSION="0.7.4",e.addLogger=function(t){d.push(t)},e.log=function(){var n=o(arguments);n.unshift("["+Date()+"]"),t.each(d,function(t,i){i.apply(e,n)})},"undefined"!=typeof window.console?a(window.console.log.apply)?e.addLogger(function(){window.console.log.apply(window.console,arguments)}):e.addLogger(function(){window.console.log(arguments)}):"undefined"!=typeof console&&e.addLogger(function(){console.log.apply(console,arguments)}),t.extend(e,{makeArray:o,isFunction:a,isArray:s}),e.Object=function(e){return t.extend(this,e||{})},t.extend(e.Object.prototype,{escapeHTML:p,h:p,toHash:function(){var e={};return t.each(this,function(t,n){a(n)||(e[t]=n)}),e},toHTML:function(){var e="";return t.each(this,function(t,n){a(n)||(e+=""+t+" "+n+" ")}),e},keys:function(t){var e=[];for(var n in this)a(this[n])&&t||e.push(n);return e},has:function(e){return this[e]&&""!==t.trim(this[e].toString())},join:function(){var t=o(arguments),e=t.shift();return t.join(e)},log:function(){e.log.apply(e,arguments)},toString:function(e){var n=[];return t.each(this,function(t,i){(!a(i)||e)&&n.push('"'+t+'": '+i.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),e.targetIsThisWindow=function(e){var n=t(e.target).attr("target");return n&&n!==window.name&&"_self"!==n?"_blank"===n?!1:"top"===n&&window===window.top?!0:!1:!0},e.DefaultLocationProxy=function(t,e){this.app=t,this.is_native=!1,this.has_history=g,this._startPolling(e)},e.DefaultLocationProxy.fullPath=function(t){var e=t.toString().match(/^[^#]*(#.+)$/),n=e?e[1]:"";return[t.pathname,t.search,n].join("")},t.extend(e.DefaultLocationProxy.prototype,{bind:function(){var n=this,i=this.app,r=e.DefaultLocationProxy;t(window).bind("hashchange."+this.app.eventNamespace(),function(t,e){n.is_native!==!1||e||(n.is_native=!0,window.clearInterval(r._interval),r._interval=null),i.trigger("location-changed")}),g&&!i.disable_push_state&&(t(window).bind("popstate."+this.app.eventNamespace(),function(t){i.trigger("location-changed")}),t(document).delegate("a","click.history-"+this.app.eventNamespace(),function(t){if(!(t.isDefaultPrevented()||t.metaKey||t.ctrlKey)){var o=r.fullPath(this),a=this.hostname?this.hostname:function(t){var e=document.createElement("a");return e.href=t.href,e.hostname}(this);return a==window.location.hostname&&i.lookupRoute("get",o)&&e.targetIsThisWindow(t)?(t.preventDefault(),n.setLocation(o),!1):void 0}})),r._bindings||(r._bindings=0),r._bindings++},unbind:function(){t(window).unbind("hashchange."+this.app.eventNamespace()),t(window).unbind("popstate."+this.app.eventNamespace()),t(document).undelegate("a","click.history-"+this.app.eventNamespace()),e.DefaultLocationProxy._bindings--,e.DefaultLocationProxy._bindings<=0&&(window.clearInterval(e.DefaultLocationProxy._interval),e.DefaultLocationProxy._interval=null)},getLocation:function(){return e.DefaultLocationProxy.fullPath(window.location)},setLocation:function(t){if(/^([^#\/]|$)/.test(t)&&(t=g&&!this.app.disable_push_state?"/"+t:"#!/"+t),t!=this.getLocation()){if(!g||this.app.disable_push_state||!/^\//.test(t))return window.location=t;history.pushState({path:t},window.title,t),this.app.trigger("location-changed")}},_startPolling:function(n){var i=this;if(!e.DefaultLocationProxy._interval){n||(n=10);var r=function(){var n=i.getLocation();("undefined"==typeof e.DefaultLocationProxy._last_location||n!=e.DefaultLocationProxy._last_location)&&window.setTimeout(function(){t(window).trigger("hashchange",[!0])},0),e.DefaultLocationProxy._last_location=n};r(),e.DefaultLocationProxy._interval=window.setInterval(r,n)}}}),e.Application=function(t){var n=this;this.routes={},this.listeners=new e.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(1e3*Math.random(),10),this.context_prototype=function(){e.EventContext.apply(this,arguments)},this.context_prototype.prototype=new e.EventContext,a(t)&&t.apply(this,[this]),this._location_proxy||this.setLocationProxy(new e.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(t,e){n.log(n.toString(),t.cleaned_type,e||{})})},e.Application.prototype=t.extend({},e.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(e){return e?t(this.element_selector).find(e):t(this.element_selector)},use:function(){var t=o(arguments),n=t.shift(),i=n||"";try{t.unshift(this),"string"==typeof n&&(i="Sammy."+n,n=e[n]),n.apply(this,t)}catch(r){"undefined"==typeof n?this.error("Plugin Error: called use() but plugin ("+i.toString()+") is not defined",r):a(n)?this.error("Plugin Error",r):this.error("Plugin Error: called use() but '"+i.toString()+"' is not a function",r)}return this},setLocationProxy:function(t){var e=this._location_proxy;this._location_proxy=t,this.isRunning()&&(e&&e.unbind(),this._location_proxy.bind())},log:function(){e.log.apply(e,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(e,r){var o,s,u=this,c=[],h=Array.prototype.slice.call(arguments,2);if(0===h.length&&a(r)&&(r=e,h=[r],e="any"),e=e.toLowerCase(),r.constructor==String){for(i.lastIndex=0;null!==(s=i.exec(r));)c.push(s[1]);r=new RegExp(r.replace(i,n)+"$")}return t.each(h,function(t,e){"string"==typeof e&&(h[t]=u[e])}),o=function(t){var e={verb:t,path:r,callback:h,param_names:c};u.routes[t]=u.routes[t]||[],u.routes[t].push(e)},"any"===e?t.each(this.ROUTE_VERBS,function(t,e){o(e)}):o(e),this},get:l("get"),post:l("post"),put:l("put"),del:l("delete"),any:l("any"),mapRoutes:function(e){var n=this;return t.each(e,function(t,e){n.route.apply(n,e)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(t,e,n){var i=this;"undefined"==typeof n&&(n=e);var r=function(){var t,e,r;t=arguments[0],r=arguments[1],r&&r.context?(e=r.context,delete r.context):e=new i.context_prototype(i,"bind",t.type,r,t.target),t.cleaned_type=t.type.replace(i.eventNamespace(),""),n.apply(e,[t,r])};return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(r),this.isRunning()&&this._listen(t,r),this},trigger:function(t,e){return this.$element().trigger([t,this.eventNamespace()].join("."),[e]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(t,e){return a(t)&&(e=t,t={}),this.befores.push([t,e]),this},after:function(t){return this.bind("event-context-after",t)},around:function(t){return this.arounds.push(t),this},onComplete:function(t){return this._onComplete=t,this},isRunning:function(){return this._running},helpers:function(e){return t.extend(this.context_prototype.prototype,e),this},helper:function(t,e){return this.context_prototype.prototype[t]=e,this},run:function(n){if(this.isRunning())return!1;var i=this;return t.each(this.listeners.toHash(),function(e,n){t.each(n,function(t,n){i._listen(e,n)})}),this.trigger("run",{start_url:n}),this._running=!0,this.last_location=null,/\#(.+)/.test(this.getLocation())||"undefined"==typeof n||this.setLocation(n),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){i._checkLocation()}),this.bind("submit",function(n){if(!e.targetIsThisWindow(n))return!0;var r=i._checkFormSubmission(t(n.target).closest("form"));return r===!1?n.preventDefault():!1}),t(window).bind("unload",function(){i.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var e=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(e.eventNamespace()),t.each(this.listeners.toHash(),function(n,i){t.each(i,function(t,i){e._unlisten(n,i)})}),this._running=!1,this},destroy:function(){return this.unload(),delete e.apps[this.element_selector],this},bindToAllEvents:function(e){var n=this;return t.each(this.APP_EVENTS,function(t,i){n.bind(i,e)}),t.each(this.listeners.keys(!0),function(i,r){-1==t.inArray(r,n.APP_EVENTS)&&n.bind(r,e)}),this},routablePath:function(t){return t.replace(r,"")},lookupRoute:function(t,e){var n,i,r=this,o=!1,a=0;if("undefined"!=typeof this.routes[t])for(n=this.routes[t].length;n>a;a++)if(i=this.routes[t][a],r.routablePath(e).match(i.path)){o=i;break}return o},runRoute:function(e,n,i,r){var o,a,s,u,h,p,l,f,g=this,d=this.lookupRoute(e,n);if(this.debug&&this.log("runRoute",[e,n].join(" ")),this.trigger("run-route",{verb:e,path:n,params:i}),"undefined"==typeof i&&(i={}),t.extend(i,this._parseQueryString(n)),d){this.trigger("route-found",{route:d}),null!==(l=d.path.exec(this.routablePath(n)))&&(l.shift(),t.each(l,function(t,e){d.param_names[t]?i[d.param_names[t]]=c(e):(i.splat||(i.splat=[]),i.splat.push(c(e)))})),o=new this.context_prototype(this,e,n,i,r),s=this.arounds.slice(0),u=this.befores.slice(0),p=[o],i.splat&&(p=p.concat(i.splat)),a=function(){for(var t,e,n;u.length>0;)if(h=u.shift(),g.contextMatchesOptions(o,h[0])&&(t=h[1].apply(o,[o]),t===!1))return!1;return g.last_route=d,o.trigger("event-context-before",{context:o}),"function"==typeof d.callback&&(d.callback=[d.callback]),d.callback&&d.callback.length&&(e=-1,n=function(){e++,d.callback[e]?t=d.callback[e].apply(o,p):g._onComplete&&g._onComplete(o)},p.push(n),n()),o.trigger("event-context-after",{context:o}),t},t.each(s.reverse(),function(t,e){var n=a;a=function(){return e.apply(o,[n])}});try{f=a()}catch(m){this.error(["500 Error",e,n].join(" "),m)}return f}return this.notFound(e,n)},contextMatchesOptions:function(e,n,i){var r=n;if(("string"==typeof r||u(r))&&(r={path:r}),"undefined"==typeof i&&(i=!0),t.isEmptyObject(r))return!0;if(s(r.path)){var o,a,c,h;for(o=[],a=0,h=r.path.length;h>a;a+=1)c=t.extend({},r,{path:r.path[a]}),o.push(this.contextMatchesOptions(e,c));var p=t.inArray(!0,o)>-1?!0:!1;return i?p:!p}if(r.only)return this.contextMatchesOptions(e,r.only,!0);if(r.except)return this.contextMatchesOptions(e,r.except,!1);var l=!0,f=!0;return r.path&&(u(r.path)||(r.path=new RegExp(r.path.toString()+"$")),l=r.path.test(e.path)),r.verb&&(f="string"==typeof r.verb?r.verb===e.verb:r.verb.indexOf(e.verb)>-1),i?f&&l:!(f&&l)},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(t){return this._location_proxy.setLocation(t)},swap:function(t,e){var n=this.$element().html(t);return a(e)&&e(t),n},templateCache:function(t,e){return"undefined"!=typeof e?f[t]=e:f[t]},clearTemplateCache:function(){return f={}},notFound:function(t,e){var n=this.error(["404 Not Found",t,e].join(" "));return"get"===t?n:!0},error:function(t,e){if(e||(e=new Error),e.message=[t,e.message].join(" "),this.trigger("error",{message:e.message,error:e}),this.raise_errors)throw e;this.log(e.message,e)},_checkLocation:function(){var t,e;return t=this.getLocation(),this.last_location&&"get"==this.last_location[0]&&this.last_location[1]==t||(this.last_location=["get",t],e=this.runRoute("get",t)),e},_getFormVerb:function(e){var n,i,r=t(e);return i=r.find('input[name="_method"]'),i.length>0&&(n=i.val()),n||(n=r[0].getAttribute("method")),n&&""!==n||(n="get"),t.trim(n.toString().toLowerCase())},_checkFormSubmission:function(e){var n,i,r,o,a;return this.trigger("check-form-submission",{form:e}),n=t(e),i=n.attr("action")||"",r=this._getFormVerb(n),this.debug&&this.log("_checkFormSubmission",n,i,r),"get"===r?(o=this._serializeFormParams(n),""!==o&&(i+="?"+o),this.setLocation(i),a=!1):(o=t.extend({},this._parseFormParams(n)),a=this.runRoute(r,i,o,e.get(0))),"undefined"==typeof a?!1:a},_serializeFormParams:function(t){var e,n="",i=t.serializeArray();if(i.length>0)for(n=this._encodeFormPair(i[0].name,i[0].value),e=1;e0&&this.then(this.callbacks.shift())},load:function(e,n,i){var r=this;return this.then(function(){var o,s,u;return a(n)?(i=n,n={}):n=t.extend({},n),i&&this.then(i),"string"==typeof e?(u=e.match(/\.json$/)||n.json,o=u?n.cache===!0:n.cache!==!1,r.next_engine=r.event_context.engineFor(e),delete n.cache,delete n.json,n.engine&&(r.next_engine=n.engine,delete n.engine),o&&(s=this.event_context.app.templateCache(e))?s:(this.wait(),t.ajax(t.extend({url:e,data:{},dataType:u?"json":"text",type:"get",success:function(t){o&&r.event_context.app.templateCache(e,t),r.next(t)}},n)),!1)):e.nodeType?e.innerHTML:e.selector?(r.next_engine=e.attr("data-engine"),n.clone===!1?e.remove()[0].innerHTML.toString():e[0].innerHTML.toString()):void 0})},loadPartials:function(t){var e;if(t){this.partials=this.partials||{};for(e in t)!function(e,n){e.load(t[n]).then(function(t){this.partials[n]=t})}(this,e)}return this},render:function(t,e,n,i){return a(t)&&!e?this.then(t):(a(e)?(i=n,n=e,e=null):n&&!a(n)&&(i=n,n=null),this.loadPartials(i).load(t).interpolate(e,t).then(n))},partial:function(t,e,n,i){return a(n)?this.render(t,e,i).swap(n):a(e)?this.render(t,{},n).swap(e):this.render(t,e,n).swap()},send:function(){var t=this,e=o(arguments),n=e.shift();return s(e[0])&&(e=e[0]),this.then(function(i){return e.push(function(e){t.next(e)}),t.wait(),n.apply(n,e),!1})},collect:function(e,n,i){var r=this,o=function(){a(e)&&(n=e,e=this.content);var i=[],o=!1;return t.each(e,function(t,e){var a=n.apply(r,[t,e]);return a.jquery&&1==a.length&&(a=a[0],o=!0),i.push(a),a}),o?i:i.join("")};return i?o():this.then(o)},renderEach:function(e,n,i,r){return s(n)&&(r=i,i=n,n=null),this.load(e).then(function(o){var a=this;return i||(i=s(this.previous_content)?this.previous_content:[]),r?void t.each(i,function(t,i){var s={},u=this.next_engine||e;n?s[n]=i:s=i,r(i,a.event_context.interpolate(o,s,u))}):this.collect(i,function(t,i){var r={},a=this.next_engine||e;return n?r[n]=i:r=i,this.event_context.interpolate(o,r,a)},!0)})},interpolate:function(t,e,n){var i=this;return this.then(function(r,o){!t&&o&&(t=o),this.next_engine&&(e=this.next_engine,this.next_engine=!1);var a=i.event_context.interpolate(r,t,e,this.partials);return n?o+a:a})},swap:function(t){return this.then(function(e){return this.event_context.swap(e,t),e}).trigger("changed",{})},appendTo:function(e){return this.then(function(n){t(e).append(n)}).trigger("changed",{})},prependTo:function(e){return this.then(function(n){t(e).prepend(n)}).trigger("changed",{})},replace:function(e){return this.then(function(n){t(e).html(n)}).trigger("changed",{})},trigger:function(t,e){return this.then(function(n){return"undefined"==typeof e&&(e={content:n}),this.event_context.trigger(t,e),n})}}),e.EventContext=function(t,n,i,r,o){this.app=t,this.verb=n,this.path=i,this.params=new e.Object(r),this.target=o},e.EventContext.prototype=t.extend({},e.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(t){var e,n=this;return a(t)?t:(t=(t||n.app.template_engine).toString(),(e=t.match(/\.([^\.\?\#]+)$/))&&(t=e[1]),t&&a(n[t])?n[t]:n.app.template_engine?this.engineFor(n.app.template_engine):function(t,e){return t})},interpolate:function(t,e,n,i){return this.engineFor(n).apply(this,[t,e,i])},render:function(t,n,i,r){return new e.RenderContext(this).render(t,n,i,r)},renderEach:function(t,n,i,r){return new e.RenderContext(this).renderEach(t,n,i,r)},load:function(t,n,i){return new e.RenderContext(this).load(t,n,i)},loadPartials:function(t){return new e.RenderContext(this).loadPartials(t)},partial:function(t,n,i,r){return new e.RenderContext(this).partial(t,n,i,r)},send:function(){var t=new e.RenderContext(this);return t.send.apply(t,arguments)},redirect:function(){var e,n=o(arguments),i=this.app.getLocation(),r=n.length;if(r>1){for(var a=0,s=[],u=[],c={},h=!1;r>a;a++)"string"==typeof n[a]?s.push(n[a]):(t.extend(c,n[a]),h=!0);if(e=s.join("/"),h){for(var p in c)u.push(this.app._encodeFormPair(p,c[p]));e+="?"+u.join("&")}}else e=n[0];this.trigger("redirect",{to:e}),this.app.last_location=[this.verb,this.path],this.app.setLocation(e),new RegExp(e).test(i)&&this.app.trigger("location-changed")},trigger:function(t,e){return"undefined"==typeof e&&(e={}),e.context||(e.context=this),this.app.trigger(t,e)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(t,e){return this.app.swap(t,e)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(e){return t.parseJSON(e)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),e});
+var Handlebars=function(){var t=function(){"use strict";function t(t){this.string=t}var e;return t.prototype.toString=function(){return""+this.string},e=t}(),e=function(t){"use strict";function e(t){return a[t]||"&"}function s(t,e){for(var s in e)Object.prototype.hasOwnProperty.call(e,s)&&(t[s]=e[s])}function i(t){return t instanceof o?t.toString():t||0===t?(t=""+t,p.test(t)?t.replace(h,e):t):""}function n(t){return t||0===t?u(t)&&0===t.length?!0:!1:!0}var r={},o=t,a={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`"},h=/[&<>"'`]/g,p=/[&<>"'`]/;r.extend=s;var l=Object.prototype.toString;r.toString=l;var c=function(t){return"function"==typeof t};c(/x/)&&(c=function(t){return"function"==typeof t&&"[object Function]"===l.call(t)});var c;r.isFunction=c;var u=Array.isArray||function(t){return t&&"object"==typeof t?"[object Array]"===l.call(t):!1};return r.isArray=u,r.escapeExpression=i,r.isEmpty=n,r}(t),s=function(){"use strict";function t(t,e){var i;e&&e.firstLine&&(i=e.firstLine,t+=" - "+i+":"+e.firstColumn);for(var n=Error.prototype.constructor.call(this,t),r=0;r0?t.helpers.each(e,s):i(this):n(e)}),t.registerHelper("each",function(t,e){var s,i=e.fn,n=e.inverse,r=0,o="";if(u(t)&&(t=t.call(this)),e.data&&(s=m(e.data)),t&&"object"==typeof t)if(c(t))for(var a=t.length;a>r;r++)s&&(s.index=r,s.first=0===r,s.last=r===t.length-1),o+=i(t[r],{data:s});else for(var h in t)t.hasOwnProperty(h)&&(s&&(s.key=h,s.index=r,s.first=0===r),o+=i(t[h],{data:s}),r++);return 0===r&&(o=n(this)),o}),t.registerHelper("if",function(t,e){return u(t)&&(t=t.call(this)),!e.hash.includeZero&&!t||o.isEmpty(t)?e.inverse(this):e.fn(this)}),t.registerHelper("unless",function(e,s){return t.helpers["if"].call(this,e,{fn:s.inverse,inverse:s.fn,hash:s.hash})}),t.registerHelper("with",function(t,e){return u(t)&&(t=t.call(this)),o.isEmpty(t)?void 0:e.fn(t)}),t.registerHelper("log",function(e,s){var i=s.data&&null!=s.data.level?parseInt(s.data.level,10):1;t.log(i,e)})}function n(t,e){g.log(t,e)}var r={},o=t,a=e,h="1.3.0";r.VERSION=h;var p=4;r.COMPILER_REVISION=p;var l={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:">= 1.0.0"};r.REVISION_CHANGES=l;var c=o.isArray,u=o.isFunction,f=o.toString,d="[object Object]";r.HandlebarsEnvironment=s,s.prototype={constructor:s,logger:g,log:n,registerHelper:function(t,e,s){if(f.call(t)===d){if(s||e)throw new a("Arg not supported with multiple helpers");o.extend(this.helpers,t)}else s&&(e.not=s),this.helpers[t]=e},registerPartial:function(t,e){f.call(t)===d?o.extend(this.partials,t):this.partials[t]=e}};var g={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(t,e){if(g.level<=t){var s=g.methodMap[t];"undefined"!=typeof console&&console[s]&&console[s].call(console,e)}}};r.logger=g,r.log=n;var m=function(t){var e={};return o.extend(e,t),e};return r.createFrame=m,r}(e,s),n=function(t,e,s){"use strict";function i(t){var e=t&&t[0]||1,s=u;if(e!==s){if(s>e){var i=f[s],n=f[e];throw new c("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+i+") or downgrade your runtime to an older version ("+n+").")}throw new c("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+t[1]+").")}}function n(t,e){if(!e)throw new c("No environment passed to template");var s=function(t,s,i,n,r,o){var a=e.VM.invokePartial.apply(this,arguments);if(null!=a)return a;if(e.compile){var h={helpers:n,partials:r,data:o};return r[s]=e.compile(t,{data:void 0!==o},e),r[s](i,h)}throw new c("The partial "+s+" could not be compiled when running in runtime-only mode")},i={escapeExpression:l.escapeExpression,invokePartial:s,programs:[],program:function(t,e,s){var i=this.programs[t];return s?i=o(t,e,s):i||(i=this.programs[t]=o(t,e)),i},merge:function(t,e){var s=t||e;return t&&e&&t!==e&&(s={},l.extend(s,e),l.extend(s,t)),s},programWithDepth:e.VM.programWithDepth,noop:e.VM.noop,compilerInfo:null};return function(s,n){n=n||{};var r,o,a=n.partial?n:e;n.partial||(r=n.helpers,o=n.partials);var h=t.call(i,a,s,r,o,n.data);return n.partial||e.VM.checkRevision(i.compilerInfo),h}}function r(t,e,s){var i=Array.prototype.slice.call(arguments,3),n=function(t,n){return n=n||{},e.apply(this,[t,n.data||s].concat(i))};return n.program=t,n.depth=i.length,n}function o(t,e,s){var i=function(t,i){return i=i||{},e(t,i.data||s)};return i.program=t,i.depth=0,i}function a(t,e,s,i,n,r){var o={partial:!0,helpers:i,partials:n,data:r};if(void 0===t)throw new c("The partial "+e+" could not be found");return t instanceof Function?t(s,o):void 0}function h(){return""}var p={},l=t,c=e,u=s.COMPILER_REVISION,f=s.REVISION_CHANGES;return p.checkRevision=i,p.template=n,p.programWithDepth=r,p.program=o,p.invokePartial=a,p.noop=h,p}(e,s,i),r=function(t,e,s,i,n){"use strict";var r,o=t,a=e,h=s,p=i,l=n,c=function(){var t=new o.HandlebarsEnvironment;return p.extend(t,o),t.SafeString=a,t.Exception=h,t.Utils=p,t.VM=l,t.template=function(e){return l.template(e,t)},t},u=c();return u.create=c,r=u}(i,t,s,e,n),o=function(t){"use strict";function e(t){t=t||{},this.firstLine=t.first_line,this.firstColumn=t.first_column,this.lastColumn=t.last_column,this.lastLine=t.last_line}var s,i=t,n={ProgramNode:function(t,s,i,r){var o,a;3===arguments.length?(r=i,i=null):2===arguments.length&&(r=s,s=null),e.call(this,r),this.type="program",this.statements=t,this.strip={},i?(a=i[0],a?(o={first_line:a.firstLine,last_line:a.lastLine,last_column:a.lastColumn,first_column:a.firstColumn},this.inverse=new n.ProgramNode(i,s,o)):this.inverse=new n.ProgramNode(i,s),this.strip.right=s.left):s&&(this.strip.left=s.right)},MustacheNode:function(t,s,i,r,o){if(e.call(this,o),this.type="mustache",this.strip=r,null!=i&&i.charAt){var a=i.charAt(3)||i.charAt(2);this.escaped="{"!==a&&"&"!==a}else this.escaped=!!i;this.sexpr=t instanceof n.SexprNode?t:new n.SexprNode(t,s),this.sexpr.isRoot=!0,this.id=this.sexpr.id,this.params=this.sexpr.params,this.hash=this.sexpr.hash,this.eligibleHelper=this.sexpr.eligibleHelper,this.isHelper=this.sexpr.isHelper},SexprNode:function(t,s,i){e.call(this,i),this.type="sexpr",this.hash=s;var n=this.id=t[0],r=this.params=t.slice(1),o=this.eligibleHelper=n.isSimple;this.isHelper=o&&(r.length||s)},PartialNode:function(t,s,i,n){e.call(this,n),this.type="partial",this.partialName=t,this.context=s,this.strip=i},BlockNode:function(t,s,n,r,o){if(e.call(this,o),t.sexpr.id.original!==r.path.original)throw new i(t.sexpr.id.original+" doesn't match "+r.path.original,this);this.type="block",this.mustache=t,this.program=s,this.inverse=n,this.strip={left:t.strip.left,right:r.strip.right},(s||n).strip.left=t.strip.right,(n||s).strip.right=r.strip.left,n&&!s&&(this.isInverse=!0)},ContentNode:function(t,s){e.call(this,s),this.type="content",this.string=t},HashNode:function(t,s){e.call(this,s),this.type="hash",this.pairs=t},IdNode:function(t,s){e.call(this,s),this.type="ID";for(var n="",r=[],o=0,a=0,h=t.length;h>a;a++){var p=t[a].part;if(n+=(t[a].separator||"")+p,".."===p||"."===p||"this"===p){if(r.length>0)throw new i("Invalid path: "+n,this);".."===p?o++:this.isScoped=!0}else r.push(p)}this.original=n,this.parts=r,this.string=r.join("."),this.depth=o,this.isSimple=1===t.length&&!this.isScoped&&0===o,this.stringModeValue=this.string},PartialNameNode:function(t,s){e.call(this,s),this.type="PARTIAL_NAME",this.name=t.original},DataNode:function(t,s){e.call(this,s),this.type="DATA",this.id=t},StringNode:function(t,s){e.call(this,s),this.type="STRING",this.original=this.string=this.stringModeValue=t},IntegerNode:function(t,s){e.call(this,s),this.type="INTEGER",this.original=this.integer=t,this.stringModeValue=Number(t)},BooleanNode:function(t,s){e.call(this,s),this.type="BOOLEAN",this.bool=t,this.stringModeValue="true"===t},CommentNode:function(t,s){e.call(this,s),this.type="comment",this.comment=t}};return s=n}(s),a=function(){"use strict";var t,e=function(){function t(t,e){return{left:"~"===t.charAt(2),right:"~"===e.charAt(0)||"~"===e.charAt(1)}}function e(){this.yy={}}var s={trace:function(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openInverse:9,closeBlock:10,openBlock:11,mustache:12,partial:13,CONTENT:14,COMMENT:15,OPEN_BLOCK:16,sexpr:17,CLOSE:18,OPEN_INVERSE:19,OPEN_ENDBLOCK:20,path:21,OPEN:22,OPEN_UNESCAPED:23,CLOSE_UNESCAPED:24,OPEN_PARTIAL:25,partialName:26,partial_option0:27,sexpr_repetition0:28,sexpr_option0:29,dataName:30,param:31,STRING:32,INTEGER:33,BOOLEAN:34,OPEN_SEXPR:35,CLOSE_SEXPR:36,hash:37,hash_repetition_plus0:38,hashSegment:39,ID:40,EQUALS:41,DATA:42,pathSegments:43,SEP:44,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",14:"CONTENT",15:"COMMENT",16:"OPEN_BLOCK",18:"CLOSE",19:"OPEN_INVERSE",20:"OPEN_ENDBLOCK",22:"OPEN",23:"OPEN_UNESCAPED",24:"CLOSE_UNESCAPED",25:"OPEN_PARTIAL",32:"STRING",33:"INTEGER",34:"BOOLEAN",35:"OPEN_SEXPR",36:"CLOSE_SEXPR",40:"ID",41:"EQUALS",42:"DATA",44:"SEP"},productions_:[0,[3,2],[3,1],[6,2],[6,3],[6,2],[6,1],[6,1],[6,0],[4,1],[4,2],[8,3],[8,3],[8,1],[8,1],[8,1],[8,1],[11,3],[9,3],[10,3],[12,3],[12,3],[13,4],[7,2],[17,3],[17,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[37,1],[39,3],[26,1],[26,1],[26,1],[30,2],[21,1],[43,3],[43,1],[27,0],[27,1],[28,0],[28,2],[29,0],[29,1],[38,1],[38,2]],performAction:function(e,s,i,n,r,o,a){var h=o.length-1;switch(r){case 1:return new n.ProgramNode(o[h-1],this._$);case 2:return new n.ProgramNode([],this._$);case 3:this.$=new n.ProgramNode([],o[h-1],o[h],this._$);break;case 4:this.$=new n.ProgramNode(o[h-2],o[h-1],o[h],this._$);break;case 5:this.$=new n.ProgramNode(o[h-1],o[h],[],this._$);break;case 6:this.$=new n.ProgramNode(o[h],this._$);break;case 7:this.$=new n.ProgramNode([],this._$);break;case 8:this.$=new n.ProgramNode([],this._$);break;case 9:this.$=[o[h]];break;case 10:o[h-1].push(o[h]),this.$=o[h-1];break;case 11:this.$=new n.BlockNode(o[h-2],o[h-1].inverse,o[h-1],o[h],this._$);break;case 12:this.$=new n.BlockNode(o[h-2],o[h-1],o[h-1].inverse,o[h],this._$);break;case 13:this.$=o[h];break;case 14:this.$=o[h];break;case 15:this.$=new n.ContentNode(o[h],this._$);break;case 16:this.$=new n.CommentNode(o[h],this._$);break;case 17:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 18:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 19:this.$={path:o[h-1],strip:t(o[h-2],o[h])};break;case 20:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 21:this.$=new n.MustacheNode(o[h-1],null,o[h-2],t(o[h-2],o[h]),this._$);break;case 22:this.$=new n.PartialNode(o[h-2],o[h-1],t(o[h-3],o[h]),this._$);break;case 23:this.$=t(o[h-1],o[h]);break;case 24:this.$=new n.SexprNode([o[h-2]].concat(o[h-1]),o[h],this._$);break;case 25:this.$=new n.SexprNode([o[h]],null,this._$);break;case 26:this.$=o[h];break;case 27:this.$=new n.StringNode(o[h],this._$);break;case 28:this.$=new n.IntegerNode(o[h],this._$);break;case 29:this.$=new n.BooleanNode(o[h],this._$);break;case 30:this.$=o[h];break;case 31:o[h-1].isHelper=!0,this.$=o[h-1];break;case 32:this.$=new n.HashNode(o[h],this._$);break;case 33:this.$=[o[h-2],o[h]];break;case 34:this.$=new n.PartialNameNode(o[h],this._$);break;case 35:this.$=new n.PartialNameNode(new n.StringNode(o[h],this._$),this._$);break;case 36:this.$=new n.PartialNameNode(new n.IntegerNode(o[h],this._$));break;case 37:this.$=new n.DataNode(o[h],this._$);break;case 38:this.$=new n.IdNode(o[h],this._$);break;case 39:o[h-2].push({part:o[h],separator:o[h-1]}),this.$=o[h-2];break;case 40:this.$=[{part:o[h]}];break;case 43:this.$=[];break;case 44:o[h-1].push(o[h]);break;case 47:this.$=[o[h]];break;case 48:o[h-1].push(o[h])}},table:[{3:1,4:2,5:[1,3],8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[3]},{5:[1,16],8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],22:[1,13],23:[1,14],25:[1,15]},{1:[2,2]},{5:[2,9],14:[2,9],15:[2,9],16:[2,9],19:[2,9],20:[2,9],22:[2,9],23:[2,9],25:[2,9]},{4:20,6:18,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{4:20,6:22,7:19,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,8],22:[1,13],23:[1,14],25:[1,15]},{5:[2,13],14:[2,13],15:[2,13],16:[2,13],19:[2,13],20:[2,13],22:[2,13],23:[2,13],25:[2,13]},{5:[2,14],14:[2,14],15:[2,14],16:[2,14],19:[2,14],20:[2,14],22:[2,14],23:[2,14],25:[2,14]},{5:[2,15],14:[2,15],15:[2,15],16:[2,15],19:[2,15],20:[2,15],22:[2,15],23:[2,15],25:[2,15]},{5:[2,16],14:[2,16],15:[2,16],16:[2,16],19:[2,16],20:[2,16],22:[2,16],23:[2,16],25:[2,16]},{17:23,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:29,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:30,21:24,30:25,40:[1,28],42:[1,27],43:26},{17:31,21:24,30:25,40:[1,28],42:[1,27],43:26},{21:33,26:32,32:[1,34],33:[1,35],40:[1,28],43:26},{1:[2,1]},{5:[2,10],14:[2,10],15:[2,10],16:[2,10],19:[2,10],20:[2,10],22:[2,10],23:[2,10],25:[2,10]},{10:36,20:[1,37]},{4:38,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,7],22:[1,13],23:[1,14],25:[1,15]},{7:39,8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,21],20:[2,6],22:[1,13],23:[1,14],25:[1,15]},{17:23,18:[1,40],21:24,30:25,40:[1,28],42:[1,27],43:26},{10:41,20:[1,37]},{18:[1,42]},{18:[2,43],24:[2,43],28:43,32:[2,43],33:[2,43],34:[2,43],35:[2,43],36:[2,43],40:[2,43],42:[2,43]},{18:[2,25],24:[2,25],36:[2,25]},{18:[2,38],24:[2,38],32:[2,38],33:[2,38],34:[2,38],35:[2,38],36:[2,38],40:[2,38],42:[2,38],44:[1,44]},{21:45,40:[1,28],43:26},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],42:[2,40],44:[2,40]},{18:[1,46]},{18:[1,47]},{24:[1,48]},{18:[2,41],21:50,27:49,40:[1,28],43:26},{18:[2,34],40:[2,34]},{18:[2,35],40:[2,35]},{18:[2,36],40:[2,36]},{5:[2,11],14:[2,11],15:[2,11],16:[2,11],19:[2,11],20:[2,11],22:[2,11],23:[2,11],25:[2,11]},{21:51,40:[1,28],43:26},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,3],22:[1,13],23:[1,14],25:[1,15]},{4:52,8:4,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,5],22:[1,13],23:[1,14],25:[1,15]},{14:[2,23],15:[2,23],16:[2,23],19:[2,23],20:[2,23],22:[2,23],23:[2,23],25:[2,23]},{5:[2,12],14:[2,12],15:[2,12],16:[2,12],19:[2,12],20:[2,12],22:[2,12],23:[2,12],25:[2,12]},{14:[2,18],15:[2,18],16:[2,18],19:[2,18],20:[2,18],22:[2,18],23:[2,18],25:[2,18]},{18:[2,45],21:56,24:[2,45],29:53,30:60,31:54,32:[1,57],33:[1,58],34:[1,59],35:[1,61],36:[2,45],37:55,38:62,39:63,40:[1,64],42:[1,27],43:26},{40:[1,65]},{18:[2,37],24:[2,37],32:[2,37],33:[2,37],34:[2,37],35:[2,37],36:[2,37],40:[2,37],42:[2,37]},{14:[2,17],15:[2,17],16:[2,17],19:[2,17],20:[2,17],22:[2,17],23:[2,17],25:[2,17]},{5:[2,20],14:[2,20],15:[2,20],16:[2,20],19:[2,20],20:[2,20],22:[2,20],23:[2,20],25:[2,20]},{5:[2,21],14:[2,21],15:[2,21],16:[2,21],19:[2,21],20:[2,21],22:[2,21],23:[2,21],25:[2,21]},{18:[1,66]},{18:[2,42]},{18:[1,67]},{8:17,9:5,11:6,12:7,13:8,14:[1,9],15:[1,10],16:[1,12],19:[1,11],20:[2,4],22:[1,13],23:[1,14],25:[1,15]},{18:[2,24],24:[2,24],36:[2,24]},{18:[2,44],24:[2,44],32:[2,44],33:[2,44],34:[2,44],35:[2,44],36:[2,44],40:[2,44],42:[2,44]},{18:[2,46],24:[2,46],36:[2,46]},{18:[2,26],24:[2,26],32:[2,26],33:[2,26],34:[2,26],35:[2,26],36:[2,26],40:[2,26],42:[2,26]},{18:[2,27],24:[2,27],32:[2,27],33:[2,27],34:[2,27],35:[2,27],36:[2,27],40:[2,27],42:[2,27]},{18:[2,28],24:[2,28],32:[2,28],33:[2,28],34:[2,28],35:[2,28],36:[2,28],40:[2,28],42:[2,28]},{18:[2,29],24:[2,29],32:[2,29],33:[2,29],34:[2,29],35:[2,29],36:[2,29],40:[2,29],42:[2,29]},{18:[2,30],24:[2,30],32:[2,30],33:[2,30],34:[2,30],35:[2,30],36:[2,30],40:[2,30],42:[2,30]},{17:68,21:24,30:25,40:[1,28],42:[1,27],43:26},{18:[2,32],24:[2,32],36:[2,32],39:69,40:[1,70]},{18:[2,47],24:[2,47],36:[2,47],40:[2,47]},{18:[2,40],24:[2,40],32:[2,40],33:[2,40],34:[2,40],35:[2,40],36:[2,40],40:[2,40],41:[1,71],42:[2,40],44:[2,40]},{18:[2,39],24:[2,39],32:[2,39],33:[2,39],34:[2,39],35:[2,39],36:[2,39],40:[2,39],42:[2,39],44:[2,39]},{5:[2,22],14:[2,22],15:[2,22],16:[2,22],19:[2,22],20:[2,22],22:[2,22],23:[2,22],25:[2,22]},{5:[2,19],14:[2,19],15:[2,19],16:[2,19],19:[2,19],20:[2,19],22:[2,19],23:[2,19],25:[2,19]},{36:[1,72]},{18:[2,48],24:[2,48],36:[2,48],40:[2,48]},{41:[1,71]},{21:56,30:60,31:73,32:[1,57],33:[1,58],34:[1,59],35:[1,61],40:[1,28],42:[1,27],43:26},{18:[2,31],24:[2,31],32:[2,31],33:[2,31],34:[2,31],35:[2,31],36:[2,31],40:[2,31],42:[2,31]},{18:[2,33],24:[2,33],36:[2,33],40:[2,33]}],defaultActions:{3:[2,2],16:[2,1],50:[2,42]},parseError:function(t,e){throw new Error(t)},parse:function(t){function e(){var t;return t=s.lexer.lex()||1,"number"!=typeof t&&(t=s.symbols_[t]||t),t}var s=this,i=[0],n=[null],r=[],o=this.table,a="",h=0,p=0,l=0;this.lexer.setInput(t),this.lexer.yy=this.yy,this.yy.lexer=this.lexer,this.yy.parser=this,"undefined"==typeof this.lexer.yylloc&&(this.lexer.yylloc={});var c=this.lexer.yylloc;r.push(c);var u=this.lexer.options&&this.lexer.options.ranges;"function"==typeof this.yy.parseError&&(this.parseError=this.yy.parseError);for(var f,d,g,m,v,y,S,k,x,b={};;){if(g=i[i.length-1],this.defaultActions[g]?m=this.defaultActions[g]:((null===f||"undefined"==typeof f)&&(f=e()),m=o[g]&&o[g][f]),"undefined"==typeof m||!m.length||!m[0]){var _="";if(!l){x=[];for(y in o[g])this.terminals_[y]&&y>2&&x.push("'"+this.terminals_[y]+"'");_=this.lexer.showPosition?"Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+x.join(", ")+", got '"+(this.terminals_[f]||f)+"'":"Parse error on line "+(h+1)+": Unexpected "+(1==f?"end of input":"'"+(this.terminals_[f]||f)+"'"),this.parseError(_,{text:this.lexer.match,token:this.terminals_[f]||f,line:this.lexer.yylineno,loc:c,expected:x})}}if(m[0]instanceof Array&&m.length>1)throw new Error("Parse Error: multiple actions possible at state: "+g+", token: "+f);switch(m[0]){case 1:i.push(f),n.push(this.lexer.yytext),r.push(this.lexer.yylloc),i.push(m[1]),f=null,d?(f=d,d=null):(p=this.lexer.yyleng,a=this.lexer.yytext,h=this.lexer.yylineno,c=this.lexer.yylloc,l>0&&l--);break;case 2:if(S=this.productions_[m[1]][1],b.$=n[n.length-S],b._$={first_line:r[r.length-(S||1)].first_line,last_line:r[r.length-1].last_line,first_column:r[r.length-(S||1)].first_column,last_column:r[r.length-1].last_column},u&&(b._$.range=[r[r.length-(S||1)].range[0],r[r.length-1].range[1]]),v=this.performAction.call(b,a,p,h,this.yy,m[1],n,r),"undefined"!=typeof v)return v;S&&(i=i.slice(0,-1*S*2),n=n.slice(0,-1*S),r=r.slice(0,-1*S)),i.push(this.productions_[m[1]][0]),n.push(b.$),r.push(b._$),k=o[i[i.length-2]][i[i.length-1]],i.push(k);break;case 3:return!0}}return!0}},i=function(){var t={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t){return this._input=t,this._more=this._less=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t;var e=t.match(/(?:\r\n?|\n).*/g);return e?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,s=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e-1),this.offset-=e;var i=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),s.length-1&&(this.yylineno-=s.length-1);var n=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:s?(s.length===i.length?this.yylloc.first_column:0)+i[i.length-s.length].length-s[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[n[0],n[0]+this.yyleng-e]),this},more:function(){return this._more=!0,this},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var t,e,s,i,n;this._more||(this.yytext="",this.match="");for(var r=this._currentRules(),o=0;oe[0].length)||(e=s,i=o,this.options.flex));o++);return e?(n=e[0].match(/(?:\r\n?|\n).*/g),n&&(this.yylineno+=n.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:n?n[n.length-1].length-n[n.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+e[0].length},this.yytext+=e[0],this.match+=e[0],this.matches=e,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._input=this._input.slice(e[0].length),this.matched+=e[0],t=this.performAction.call(this,this.yy,this,r[i],this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),t?t:void 0):""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return"undefined"!=typeof t?t:this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.pop()},_currentRules:function(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function(t){this.begin(t)}};return t.options={},t.performAction=function(t,e,s,i){function n(t,s){return e.yytext=e.yytext.substr(t,e.yyleng-s)}switch(s){case 0:if("\\\\"===e.yytext.slice(-2)?(n(0,1),this.begin("mu")):"\\"===e.yytext.slice(-1)?(n(0,1),this.begin("emu")):this.begin("mu"),e.yytext)return 14;break;case 1:return 14;case 2:return this.popState(),14;case 3:return n(0,4),this.popState(),15;case 4:return 35;case 5:return 36;case 6:return 25;case 7:return 16;case 8:return 20;case 9:return 19;case 10:return 19;case 11:return 23;case 12:return 22;case 13:this.popState(),this.begin("com");break;case 14:return n(3,5),this.popState(),15;case 15:return 22;case 16:return 41;case 17:return 40;case 18:return 40;case 19:return 44;case 20:break;case 21:return this.popState(),24;case 22:return this.popState(),18;case 23:return e.yytext=n(1,2).replace(/\\"/g,'"'),32;case 24:return e.yytext=n(1,2).replace(/\\'/g,"'"),32;case 25:return 42;case 26:return 34;case 27:return 34;case 28:return 33;case 29:return 40;case 30:return e.yytext=n(1,2),40;case 31:return"INVALID";case 32:return 5}},t.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/],t.conditions={mu:{rules:[4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32],inclusive:!1},emu:{rules:[2],inclusive:!1},com:{rules:[3],inclusive:!1},INITIAL:{rules:[0,1,32],inclusive:!0}},t}();return s.lexer=i,e.prototype=s,s.Parser=e,new e}();return t=e}(),h=function(t,e){"use strict";function s(t){return t.constructor===r.ProgramNode?t:(n.yy=r,n.parse(t))}var i={},n=t,r=e;return i.parser=n,i.parse=s,i}(a,o),p=function(t){"use strict";function e(){}function s(t,e,s){if(null==t||"string"!=typeof t&&t.constructor!==s.AST.ProgramNode)throw new r("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+t);e=e||{},"data"in e||(e.data=!0);var i=s.parse(t),n=(new s.Compiler).compile(i,e);return(new s.JavaScriptCompiler).compile(n,e)}function i(t,e,s){function i(){var i=s.parse(t),n=(new s.Compiler).compile(i,e),r=(new s.JavaScriptCompiler).compile(n,e,void 0,!0);return s.template(r)}if(null==t||"string"!=typeof t&&t.constructor!==s.AST.ProgramNode)throw new r("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+t);e=e||{},"data"in e||(e.data=!0);var n;return function(t,e){return n||(n=i()),n.call(this,t,e)}}var n={},r=t;return n.Compiler=e,e.prototype={compiler:e,disassemble:function(){for(var t,e,s,i=this.opcodes,n=[],r=0,o=i.length;o>r;r++)if(t=i[r],"DECLARE"===t.opcode)n.push("DECLARE "+t.name+"="+t.value);else{e=[];for(var a=0;as;s++){var i=this.opcodes[s],n=t.opcodes[s];if(i.opcode!==n.opcode||i.args.length!==n.args.length)return!1;for(var r=0;rs;s++)if(!this.children[s].equals(t.children[s]))return!1;return!0},guid:0,compile:function(t,e){this.opcodes=[],this.children=[],this.depths={list:[]},this.options=e;var s=this.options.knownHelpers;if(this.options.knownHelpers={helperMissing:!0,blockHelperMissing:!0,each:!0,"if":!0,unless:!0,"with":!0,log:!0},s)for(var i in s)this.options.knownHelpers[i]=s[i];return this.accept(t)},accept:function(t){var e,s=t.strip||{};return s.left&&this.opcode("strip"),e=this[t.type](t),s.right&&this.opcode("strip"),e},program:function(t){for(var e=t.statements,s=0,i=e.length;i>s;s++)this.accept(e[s]);return this.isSimple=1===i,this.depths.list=this.depths.list.sort(function(t,e){return t-e}),this},compileProgram:function(t){var e,s=(new this.compiler).compile(t,this.options),i=this.guid++;this.usePartial=this.usePartial||s.usePartial,this.children[i]=s;for(var n=0,r=s.depths.list.length;r>n;n++)e=s.depths.list[n],2>e||this.addDepth(e-1);return i},block:function(t){var e=t.mustache,s=t.program,i=t.inverse;s&&(s=this.compileProgram(s)),i&&(i=this.compileProgram(i));var n=e.sexpr,r=this.classifySexpr(n);"helper"===r?this.helperSexpr(n,s,i):"simple"===r?(this.simpleSexpr(n),this.opcode("pushProgram",s),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("blockValue")):(this.ambiguousSexpr(n,s,i),this.opcode("pushProgram",s),this.opcode("pushProgram",i),this.opcode("emptyHash"),this.opcode("ambiguousBlockValue")),this.opcode("append")},hash:function(t){var e,s,i=t.pairs;this.opcode("pushHash");for(var n=0,r=i.length;r>n;n++)e=i[n],s=e[1],this.options.stringParams?(s.depth&&this.addDepth(s.depth),this.opcode("getContext",s.depth||0),this.opcode("pushStringParam",s.stringModeValue,s.type),"sexpr"===s.type&&this.sexpr(s)):this.accept(s),this.opcode("assignToHash",e[0]);this.opcode("popHash")},partial:function(t){var e=t.partialName;this.usePartial=!0,t.context?this.ID(t.context):this.opcode("push","depth0"),this.opcode("invokePartial",e.name),this.opcode("append")},content:function(t){this.opcode("appendContent",t.string)},mustache:function(t){this.sexpr(t.sexpr),this.opcode(t.escaped&&!this.options.noEscape?"appendEscaped":"append")},ambiguousSexpr:function(t,e,s){var i=t.id,n=i.parts[0],r=null!=e||null!=s;this.opcode("getContext",i.depth),this.opcode("pushProgram",e),this.opcode("pushProgram",s),this.opcode("invokeAmbiguous",n,r)},simpleSexpr:function(t){var e=t.id;"DATA"===e.type?this.DATA(e):e.parts.length?this.ID(e):(this.addDepth(e.depth),this.opcode("getContext",e.depth),this.opcode("pushContext")),this.opcode("resolvePossibleLambda")},helperSexpr:function(t,e,s){var i=this.setupFullMustacheParams(t,e,s),n=t.id.parts[0];if(this.options.knownHelpers[n])this.opcode("invokeKnownHelper",i.length,n);else{if(this.options.knownHelpersOnly)throw new r("You specified knownHelpersOnly, but used the unknown helper "+n,t);this.opcode("invokeHelper",i.length,n,t.isRoot)}},sexpr:function(t){var e=this.classifySexpr(t);"simple"===e?this.simpleSexpr(t):"helper"===e?this.helperSexpr(t):this.ambiguousSexpr(t)},ID:function(t){this.addDepth(t.depth),this.opcode("getContext",t.depth);var e=t.parts[0];e?this.opcode("lookupOnContext",t.parts[0]):this.opcode("pushContext");for(var s=1,i=t.parts.length;i>s;s++)this.opcode("lookup",t.parts[s])},DATA:function(t){if(this.options.data=!0,t.id.isScoped||t.id.depth)throw new r("Scoped data references are not supported: "+t.original,t);this.opcode("lookupData");for(var e=t.id.parts,s=0,i=e.length;i>s;s++)this.opcode("lookup",e[s])},STRING:function(t){this.opcode("pushString",t.string)},INTEGER:function(t){this.opcode("pushLiteral",t.integer)},BOOLEAN:function(t){this.opcode("pushLiteral",t.bool)},comment:function(){},opcode:function(t){this.opcodes.push({opcode:t,args:[].slice.call(arguments,1)})},declare:function(t,e){this.opcodes.push({opcode:"DECLARE",name:t,value:e})},addDepth:function(t){0!==t&&(this.depths[t]||(this.depths[t]=!0,this.depths.list.push(t)))},classifySexpr:function(t){var e=t.isHelper,s=t.eligibleHelper,i=this.options;if(s&&!e){var n=t.id.parts[0];i.knownHelpers[n]?e=!0:i.knownHelpersOnly&&(s=!1)}return e?"helper":s?"ambiguous":"simple"},pushParams:function(t){for(var e,s=t.length;s--;)e=t[s],this.options.stringParams?(e.depth&&this.addDepth(e.depth),this.opcode("getContext",e.depth||0),this.opcode("pushStringParam",e.stringModeValue,e.type),"sexpr"===e.type&&this.sexpr(e)):this[e.type](e)},setupFullMustacheParams:function(t,e,s){var i=t.params;return this.pushParams(i),this.opcode("pushProgram",e),this.opcode("pushProgram",s),t.hash?this.hash(t.hash):this.opcode("emptyHash"),i}},n.precompile=s,n.compile=i,n}(s),l=function(t,e){"use strict";function s(t){this.value=t}function i(){}var n,r=t.COMPILER_REVISION,o=t.REVISION_CHANGES,a=t.log,h=e;i.prototype={nameLookup:function(t,e){var s,n;return 0===t.indexOf("depth")&&(s=!0),n=/^[0-9]+$/.test(e)?t+"["+e+"]":i.isValidJavaScriptVariableName(e)?t+"."+e:t+"['"+e+"']",s?"("+t+" && "+n+")":n},compilerInfo:function(){var t=r,e=o[t];return"this.compilerInfo = ["+t+",'"+e+"'];\n"},appendToBuffer:function(t){return this.environment.isSimple?"return "+t+";":{appendToBuffer:!0,content:t,toString:function(){return"buffer += "+t+";"}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(t,e,s,i){this.environment=t,this.options=e||{},a("debug",this.environment.disassemble()+"\n\n"),this.name=this.environment.name,this.isChild=!!s,this.context=s||{programs:[],environments:[],aliases:{}},this.preamble(),this.stackSlot=0,this.stackVars=[],this.registers={list:[]},this.hashes=[],this.compileStack=[],this.inlineStack=[],
+this.compileChildren(t,e);var n,r=t.opcodes;this.i=0;for(var o=r.length;this.in;n++)i.push("depth"+this.environment.depths.list[n]);var o=this.mergeSource();if(this.isChild||(o=this.compilerInfo()+o),t)return i.push(o),Function.apply(this,i);var h="function "+(this.name||"")+"("+i.join(",")+") {\n "+o+"}";return a("debug",h+"\n\n"),h},mergeSource:function(){for(var t,e="",s=0,i=this.source.length;i>s;s++){var n=this.source[s];n.appendToBuffer?t=t?t+"\n + "+n.content:n.content:(t&&(e+="buffer += "+t+";\n ",t=void 0),e+=n+"\n ")}return e},blockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var t=["depth0"];this.setupParams(0,t),this.replaceStack(function(e){return t.splice(1,0,e),"blockHelperMissing.call("+t.join(", ")+")"})},ambiguousBlockValue:function(){this.context.aliases.blockHelperMissing="helpers.blockHelperMissing";var t=["depth0"];this.setupParams(0,t);var e=this.topStack();t.splice(1,0,e),this.pushSource("if (!"+this.lastHelper+") { "+e+" = blockHelperMissing.call("+t.join(", ")+"); }")},appendContent:function(t){this.pendingContent&&(t=this.pendingContent+t),this.stripNext&&(t=t.replace(/^\s+/,"")),this.pendingContent=t},strip:function(){this.pendingContent&&(this.pendingContent=this.pendingContent.replace(/\s+$/,"")),this.stripNext="strip"},append:function(){this.flushInline();var t=this.popStack();this.pushSource("if("+t+" || "+t+" === 0) { "+this.appendToBuffer(t)+" }"),this.environment.isSimple&&this.pushSource("else { "+this.appendToBuffer("''")+" }")},appendEscaped:function(){this.context.aliases.escapeExpression="this.escapeExpression",this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(t){this.lastContext!==t&&(this.lastContext=t)},lookupOnContext:function(t){this.push(this.nameLookup("depth"+this.lastContext,t,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.context.aliases.functionType='"function"',this.replaceStack(function(t){return"typeof "+t+" === functionType ? "+t+".apply(depth0) : "+t})},lookup:function(t){this.replaceStack(function(e){return e+" == null || "+e+" === false ? "+e+" : "+this.nameLookup(e,t,"context")})},lookupData:function(){this.pushStackLiteral("data")},pushStringParam:function(t,e){this.pushStackLiteral("depth"+this.lastContext),this.pushString(e),"sexpr"!==e&&("string"==typeof t?this.pushString(t):this.pushStackLiteral(t))},emptyHash:function(){this.pushStackLiteral("{}"),this.options.stringParams&&(this.push("{}"),this.push("{}"))},pushHash:function(){this.hash&&this.hashes.push(this.hash),this.hash={values:[],types:[],contexts:[]}},popHash:function(){var t=this.hash;this.hash=this.hashes.pop(),this.options.stringParams&&(this.push("{"+t.contexts.join(",")+"}"),this.push("{"+t.types.join(",")+"}")),this.push("{\n "+t.values.join(",\n ")+"\n }")},pushString:function(t){this.pushStackLiteral(this.quotedString(t))},push:function(t){return this.inlineStack.push(t),t},pushLiteral:function(t){this.pushStackLiteral(t)},pushProgram:function(t){this.pushStackLiteral(null!=t?this.programExpression(t):null)},invokeHelper:function(t,e,s){this.context.aliases.helperMissing="helpers.helperMissing",this.useRegister("helper");var i=this.lastHelper=this.setupHelper(t,e,!0),n=this.nameLookup("depth"+this.lastContext,e,"context"),r="helper = "+i.name+" || "+n;i.paramsInit&&(r+=","+i.paramsInit),this.push("("+r+",helper ? helper.call("+i.callParams+") : helperMissing.call("+i.helperMissingParams+"))"),s||this.flushInline()},invokeKnownHelper:function(t,e){var s=this.setupHelper(t,e);this.push(s.name+".call("+s.callParams+")")},invokeAmbiguous:function(t,e){this.context.aliases.functionType='"function"',this.useRegister("helper"),this.emptyHash();var s=this.setupHelper(0,t,e),i=this.lastHelper=this.nameLookup("helpers",t,"helper"),n=this.nameLookup("depth"+this.lastContext,t,"context"),r=this.nextStack();s.paramsInit&&this.pushSource(s.paramsInit),this.pushSource("if (helper = "+i+") { "+r+" = helper.call("+s.callParams+"); }"),this.pushSource("else { helper = "+n+"; "+r+" = typeof helper === functionType ? helper.call("+s.callParams+") : helper; }")},invokePartial:function(t){var e=[this.nameLookup("partials",t,"partial"),"'"+t+"'",this.popStack(),"helpers","partials"];this.options.data&&e.push("data"),this.context.aliases.self="this",this.push("self.invokePartial("+e.join(", ")+")")},assignToHash:function(t){var e,s,i=this.popStack();this.options.stringParams&&(s=this.popStack(),e=this.popStack());var n=this.hash;e&&n.contexts.push("'"+t+"': "+e),s&&n.types.push("'"+t+"': "+s),n.values.push("'"+t+"': ("+i+")")},compiler:i,compileChildren:function(t,e){for(var s,i,n=t.children,r=0,o=n.length;o>r;r++){s=n[r],i=new this.compiler;var a=this.matchExistingProgram(s);null==a?(this.context.programs.push(""),a=this.context.programs.length,s.index=a,s.name="program"+a,this.context.programs[a]=i.compile(s,e,this.context),this.context.environments[a]=s):(s.index=a,s.name="program"+a)}},matchExistingProgram:function(t){for(var e=0,s=this.context.environments.length;s>e;e++){var i=this.context.environments[e];if(i&&i.equals(t))return e}},programExpression:function(t){if(this.context.aliases.self="this",null==t)return"self.noop";for(var e,s=this.environment.children[t],i=s.depths.list,n=[s.index,s.name,"data"],r=0,o=i.length;o>r;r++)e=i[r],n.push(1===e?"depth0":"depth"+(e-1));return(0===i.length?"self.program(":"self.programWithDepth(")+n.join(", ")+")"},register:function(t,e){this.useRegister(t),this.pushSource(t+" = "+e+";")},useRegister:function(t){this.registers[t]||(this.registers[t]=!0,this.registers.list.push(t))},pushStackLiteral:function(t){return this.push(new s(t))},pushSource:function(t){this.pendingContent&&(this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent))),this.pendingContent=void 0),t&&this.source.push(t)},pushStack:function(t){this.flushInline();var e=this.incrStack();return t&&this.pushSource(e+" = "+t+";"),this.compileStack.push(e),e},replaceStack:function(t){var e,i,n,r="",o=this.isInline();if(o){var a=this.popStack(!0);if(a instanceof s)e=a.value,n=!0;else{i=!this.stackSlot;var h=i?this.incrStack():this.topStackName();r="("+this.push(h)+" = "+a+"),",e=this.topStack()}}else e=this.topStack();var p=t.call(this,e);return o?(n||this.popStack(),i&&this.stackSlot--,this.push("("+r+p+")")):(/^stack/.test(e)||(e=this.nextStack()),this.pushSource(e+" = ("+r+p+");")),e},nextStack:function(){return this.pushStack()},incrStack:function(){return this.stackSlot++,this.stackSlot>this.stackVars.length&&this.stackVars.push("stack"+this.stackSlot),this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var t=this.inlineStack;if(t.length){this.inlineStack=[];for(var e=0,i=t.length;i>e;e++){var n=t[e];n instanceof s?this.compileStack.push(n):this.pushStack(n)}}},isInline:function(){return this.inlineStack.length},popStack:function(t){var e=this.isInline(),i=(e?this.inlineStack:this.compileStack).pop();if(!t&&i instanceof s)return i.value;if(!e){if(!this.stackSlot)throw new h("Invalid stack pop");this.stackSlot--}return i},topStack:function(t){var e=this.isInline()?this.inlineStack:this.compileStack,i=e[e.length-1];return!t&&i instanceof s?i.value:i},quotedString:function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},setupHelper:function(t,e,s){var i=[],n=this.setupParams(t,i,s),r=this.nameLookup("helpers",e,"helper");return{params:i,paramsInit:n,name:r,callParams:["depth0"].concat(i).join(", "),helperMissingParams:s&&["depth0",this.quotedString(e)].concat(i).join(", ")}},setupOptions:function(t,e){var s,i,n,r=[],o=[],a=[];r.push("hash:"+this.popStack()),this.options.stringParams&&(r.push("hashTypes:"+this.popStack()),r.push("hashContexts:"+this.popStack())),i=this.popStack(),n=this.popStack(),(n||i)&&(n||(this.context.aliases.self="this",n="self.noop"),i||(this.context.aliases.self="this",i="self.noop"),r.push("inverse:"+i),r.push("fn:"+n));for(var h=0;t>h;h++)s=this.popStack(),e.push(s),this.options.stringParams&&(a.push(this.popStack()),o.push(this.popStack()));return this.options.stringParams&&(r.push("contexts:["+o.join(",")+"]"),r.push("types:["+a.join(",")+"]")),this.options.data&&r.push("data:data"),r},setupParams:function(t,e,s){var i="{"+this.setupOptions(t,e).join(",")+"}";return s?(this.useRegister("options"),e.push("options"),"options="+i):(e.push(i),"")}};for(var p="break else new var case finally return void catch for switch while continue function this with default if throw delete in try do instanceof typeof abstract enum int short boolean export interface static byte extends long super char final native synchronized class float package throws const goto private transient debugger implements protected volatile double import public let yield".split(" "),l=i.RESERVED_WORDS={},c=0,u=p.length;u>c;c++)l[p[c]]=!0;return i.isValidJavaScriptVariableName=function(t){return!i.RESERVED_WORDS[t]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(t)?!0:!1},n=i}(i,s),c=function(t,e,s,i,n){"use strict";var r,o=t,a=e,h=s.parser,p=s.parse,l=i.Compiler,c=i.compile,u=i.precompile,f=n,d=o.create,g=function(){var t=d();return t.compile=function(e,s){return c(e,s,t)},t.precompile=function(e,s){return u(e,s,t)},t.AST=a,t.Compiler=l,t.JavaScriptCompiler=f,t.Parser=h,t.parse=p,t};return o=g(),o.create=g,r=o}(r,o,h,p,l);return c}();
+!function(t){"function"==typeof define&&define.amd?define(["jquery"],t):$.sammy=window.Sammy=t($)}(function(t){var e,n="([^/]+)",i=/:([\w\d]+)/g,r=/\?([^#]*)?$/,o=function(t){return Array.prototype.slice.call(t)},a=function(t){return"[object Function]"===Object.prototype.toString.call(t)},s=function(t){return"[object Array]"===Object.prototype.toString.call(t)},u=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},c=function(t){return decodeURIComponent((t||"").replace(/\+/g," "))},h=encodeURIComponent,p=function(t){return String(t).replace(/&(?!\w+;)/g,"&").replace(//g,">").replace(/"/g,""")},l=function(t){return function(){return this.route.apply(this,[t].concat(Array.prototype.slice.call(arguments)))}},f={},g=!(!window.history||!history.pushState),d=[];return e=function(){var n,i,r=o(arguments);return e.apps=e.apps||{},0===r.length||r[0]&&a(r[0])?e.apply(e,["body"].concat(r)):"string"==typeof(i=r.shift())?(n=e.apps[i]||new e.Application,n.element_selector=i,r.length>0&&t.each(r,function(t,e){n.use(e)}),n.element_selector!=i&&delete e.apps[i],e.apps[n.element_selector]=n,n):void 0},e.VERSION="0.7.4",e.addLogger=function(t){d.push(t)},e.log=function(){var n=o(arguments);n.unshift("["+Date()+"]"),t.each(d,function(t,i){i.apply(e,n)})},"undefined"!=typeof window.console?e.addLogger(a(window.console.log.apply)?function(){window.console.log.apply(window.console,arguments)}:function(){window.console.log(arguments)}):"undefined"!=typeof console&&e.addLogger(function(){console.log.apply(console,arguments)}),t.extend(e,{makeArray:o,isFunction:a,isArray:s}),e.Object=function(e){return t.extend(this,e||{})},t.extend(e.Object.prototype,{escapeHTML:p,h:p,toHash:function(){var e={};return t.each(this,function(t,n){a(n)||(e[t]=n)}),e},toHTML:function(){var e="";return t.each(this,function(t,n){a(n)||(e+=""+t+" "+n+" ")}),e},keys:function(t){var e=[];for(var n in this)a(this[n])&&t||e.push(n);return e},has:function(e){return this[e]&&""!==t.trim(this[e].toString())},join:function(){var t=o(arguments),e=t.shift();return t.join(e)},log:function(){e.log.apply(e,arguments)},toString:function(e){var n=[];return t.each(this,function(t,i){(!a(i)||e)&&n.push('"'+t+'": '+i.toString())}),"Sammy.Object: {"+n.join(",")+"}"}}),e.targetIsThisWindow=function(e){var n=t(e.target).attr("target");return n&&n!==window.name&&"_self"!==n?"_blank"===n?!1:"top"===n&&window===window.top?!0:!1:!0},e.DefaultLocationProxy=function(t,e){this.app=t,this.is_native=!1,this.has_history=g,this._startPolling(e)},e.DefaultLocationProxy.fullPath=function(t){var e=t.toString().match(/^[^#]*(#.+)$/),n=e?e[1]:"";return[t.pathname,t.search,n].join("")},t.extend(e.DefaultLocationProxy.prototype,{bind:function(){var n=this,i=this.app,r=e.DefaultLocationProxy;t(window).bind("hashchange."+this.app.eventNamespace(),function(t,e){n.is_native!==!1||e||(n.is_native=!0,window.clearInterval(r._interval),r._interval=null),i.trigger("location-changed")}),g&&!i.disable_push_state&&(t(window).bind("popstate."+this.app.eventNamespace(),function(t){i.trigger("location-changed")}),t(document).delegate("a","click.history-"+this.app.eventNamespace(),function(t){if(!(t.isDefaultPrevented()||t.metaKey||t.ctrlKey)){var o=r.fullPath(this),a=this.hostname?this.hostname:function(t){var e=document.createElement("a");return e.href=t.href,e.hostname}(this);return a==window.location.hostname&&i.lookupRoute("get",o)&&e.targetIsThisWindow(t)?(t.preventDefault(),n.setLocation(o),!1):void 0}})),r._bindings||(r._bindings=0),r._bindings++},unbind:function(){t(window).unbind("hashchange."+this.app.eventNamespace()),t(window).unbind("popstate."+this.app.eventNamespace()),t(document).undelegate("a","click.history-"+this.app.eventNamespace()),e.DefaultLocationProxy._bindings--,e.DefaultLocationProxy._bindings<=0&&(window.clearInterval(e.DefaultLocationProxy._interval),e.DefaultLocationProxy._interval=null)},getLocation:function(){return e.DefaultLocationProxy.fullPath(window.location)},setLocation:function(t){if(/^([^#\/]|$)/.test(t)&&(t=g&&!this.app.disable_push_state?"/"+t:"#!/"+t),t!=this.getLocation()){if(!g||this.app.disable_push_state||!/^\//.test(t))return window.location=t;history.pushState({path:t},window.title,t),this.app.trigger("location-changed")}},_startPolling:function(n){var i=this;if(!e.DefaultLocationProxy._interval){n||(n=10);var r=function(){var n=i.getLocation();("undefined"==typeof e.DefaultLocationProxy._last_location||n!=e.DefaultLocationProxy._last_location)&&window.setTimeout(function(){t(window).trigger("hashchange",[!0])},0),e.DefaultLocationProxy._last_location=n};r(),e.DefaultLocationProxy._interval=window.setInterval(r,n)}}}),e.Application=function(t){var n=this;this.routes={},this.listeners=new e.Object({}),this.arounds=[],this.befores=[],this.namespace=(new Date).getTime()+"-"+parseInt(1e3*Math.random(),10),this.context_prototype=function(){e.EventContext.apply(this,arguments)},this.context_prototype.prototype=new e.EventContext,a(t)&&t.apply(this,[this]),this._location_proxy||this.setLocationProxy(new e.DefaultLocationProxy(this,this.run_interval_every)),this.debug&&this.bindToAllEvents(function(t,e){n.log(n.toString(),t.cleaned_type,e||{})})},e.Application.prototype=t.extend({},e.Object.prototype,{ROUTE_VERBS:["get","post","put","delete"],APP_EVENTS:["run","unload","lookup-route","run-route","route-found","event-context-before","event-context-after","changed","error","check-form-submission","redirect","location-changed"],_last_route:null,_location_proxy:null,_running:!1,element_selector:"body",debug:!1,raise_errors:!1,run_interval_every:50,disable_push_state:!1,template_engine:null,toString:function(){return"Sammy.Application:"+this.element_selector},$element:function(e){return e?t(this.element_selector).find(e):t(this.element_selector)},use:function(){var t=o(arguments),n=t.shift(),i=n||"";try{t.unshift(this),"string"==typeof n&&(i="Sammy."+n,n=e[n]),n.apply(this,t)}catch(r){"undefined"==typeof n?this.error("Plugin Error: called use() but plugin ("+i.toString()+") is not defined",r):a(n)?this.error("Plugin Error",r):this.error("Plugin Error: called use() but '"+i.toString()+"' is not a function",r)}return this},setLocationProxy:function(t){var e=this._location_proxy;this._location_proxy=t,this.isRunning()&&(e&&e.unbind(),this._location_proxy.bind())},log:function(){e.log.apply(e,Array.prototype.concat.apply([this.element_selector],arguments))},route:function(e,r){var o,s,u=this,c=[],h=Array.prototype.slice.call(arguments,2);if(0===h.length&&a(r)&&(r=e,h=[r],e="any"),e=e.toLowerCase(),r.constructor==String){for(i.lastIndex=0;null!==(s=i.exec(r));)c.push(s[1]);r=new RegExp(r.replace(i,n)+"$")}return t.each(h,function(t,e){"string"==typeof e&&(h[t]=u[e])}),o=function(t){var e={verb:t,path:r,callback:h,param_names:c};u.routes[t]=u.routes[t]||[],u.routes[t].push(e)},"any"===e?t.each(this.ROUTE_VERBS,function(t,e){o(e)}):o(e),this},get:l("get"),post:l("post"),put:l("put"),del:l("delete"),any:l("any"),mapRoutes:function(e){var n=this;return t.each(e,function(t,e){n.route.apply(n,e)}),this},eventNamespace:function(){return["sammy-app",this.namespace].join("-")},bind:function(t,e,n){var i=this;"undefined"==typeof n&&(n=e);var r=function(){var t,e,r;t=arguments[0],r=arguments[1],r&&r.context?(e=r.context,delete r.context):e=new i.context_prototype(i,"bind",t.type,r,t.target),t.cleaned_type=t.type.replace(i.eventNamespace(),""),n.apply(e,[t,r])};return this.listeners[t]||(this.listeners[t]=[]),this.listeners[t].push(r),this.isRunning()&&this._listen(t,r),this},trigger:function(t,e){return this.$element().trigger([t,this.eventNamespace()].join("."),[e]),this},refresh:function(){return this.last_location=null,this.trigger("location-changed"),this},before:function(t,e){return a(t)&&(e=t,t={}),this.befores.push([t,e]),this},after:function(t){return this.bind("event-context-after",t)},around:function(t){return this.arounds.push(t),this},onComplete:function(t){return this._onComplete=t,this},isRunning:function(){return this._running},helpers:function(e){return t.extend(this.context_prototype.prototype,e),this},helper:function(t,e){return this.context_prototype.prototype[t]=e,this},run:function(n){if(this.isRunning())return!1;var i=this;return t.each(this.listeners.toHash(),function(e,n){t.each(n,function(t,n){i._listen(e,n)})}),this.trigger("run",{start_url:n}),this._running=!0,this.last_location=null,/\#(.+)/.test(this.getLocation())||"undefined"==typeof n||this.setLocation(n),this._checkLocation(),this._location_proxy.bind(),this.bind("location-changed",function(){i._checkLocation()}),this.bind("submit",function(n){if(!e.targetIsThisWindow(n))return!0;var r=i._checkFormSubmission(t(n.target).closest("form"));return r===!1?n.preventDefault():!1}),t(window).bind("unload",function(){i.unload()}),this.trigger("changed")},unload:function(){if(!this.isRunning())return!1;var e=this;return this.trigger("unload"),this._location_proxy.unbind(),this.$element().unbind("submit").removeClass(e.eventNamespace()),t.each(this.listeners.toHash(),function(n,i){t.each(i,function(t,i){e._unlisten(n,i)})}),this._running=!1,this},destroy:function(){return this.unload(),delete e.apps[this.element_selector],this},bindToAllEvents:function(e){var n=this;return t.each(this.APP_EVENTS,function(t,i){n.bind(i,e)}),t.each(this.listeners.keys(!0),function(i,r){-1==t.inArray(r,n.APP_EVENTS)&&n.bind(r,e)}),this},routablePath:function(t){return t.replace(r,"")},lookupRoute:function(t,e){var n,i,r=this,o=!1,a=0;if("undefined"!=typeof this.routes[t])for(n=this.routes[t].length;n>a;a++)if(i=this.routes[t][a],r.routablePath(e).match(i.path)){o=i;break}return o},runRoute:function(e,n,i,r){var o,a,s,u,h,p,l,f,g=this,d=this.lookupRoute(e,n);if(this.debug&&this.log("runRoute",[e,n].join(" ")),this.trigger("run-route",{verb:e,path:n,params:i}),"undefined"==typeof i&&(i={}),t.extend(i,this._parseQueryString(n)),d){this.trigger("route-found",{route:d}),null!==(l=d.path.exec(this.routablePath(n)))&&(l.shift(),t.each(l,function(t,e){d.param_names[t]?i[d.param_names[t]]=c(e):(i.splat||(i.splat=[]),i.splat.push(c(e)))})),o=new this.context_prototype(this,e,n,i,r),s=this.arounds.slice(0),u=this.befores.slice(0),p=[o],i.splat&&(p=p.concat(i.splat)),a=function(){for(var t,e,n;u.length>0;)if(h=u.shift(),g.contextMatchesOptions(o,h[0])&&(t=h[1].apply(o,[o]),t===!1))return!1;return g.last_route=d,o.trigger("event-context-before",{context:o}),"function"==typeof d.callback&&(d.callback=[d.callback]),d.callback&&d.callback.length&&(e=-1,n=function(){e++,d.callback[e]?t=d.callback[e].apply(o,p):g._onComplete&&g._onComplete(o)},p.push(n),n()),o.trigger("event-context-after",{context:o}),t},t.each(s.reverse(),function(t,e){var n=a;a=function(){return e.apply(o,[n])}});try{f=a()}catch(m){this.error(["500 Error",e,n].join(" "),m)}return f}return this.notFound(e,n)},contextMatchesOptions:function(e,n,i){var r=n;if(("string"==typeof r||u(r))&&(r={path:r}),"undefined"==typeof i&&(i=!0),t.isEmptyObject(r))return!0;if(s(r.path)){var o,a,c,h;for(o=[],a=0,h=r.path.length;h>a;a+=1)c=t.extend({},r,{path:r.path[a]}),o.push(this.contextMatchesOptions(e,c));var p=t.inArray(!0,o)>-1?!0:!1;return i?p:!p}if(r.only)return this.contextMatchesOptions(e,r.only,!0);if(r.except)return this.contextMatchesOptions(e,r.except,!1);var l=!0,f=!0;return r.path&&(u(r.path)||(r.path=new RegExp(r.path.toString()+"$")),l=r.path.test(e.path)),r.verb&&(f="string"==typeof r.verb?r.verb===e.verb:r.verb.indexOf(e.verb)>-1),i?f&&l:!(f&&l)},getLocation:function(){return this._location_proxy.getLocation()},setLocation:function(t){return this._location_proxy.setLocation(t)},swap:function(t,e){var n=this.$element().html(t);return a(e)&&e(t),n},templateCache:function(t,e){return"undefined"!=typeof e?f[t]=e:f[t]},clearTemplateCache:function(){return f={}},notFound:function(t,e){var n=this.error(["404 Not Found",t,e].join(" "));return"get"===t?n:!0},error:function(t,e){if(e||(e=new Error),e.message=[t,e.message].join(" "),this.trigger("error",{message:e.message,error:e}),this.raise_errors)throw e;this.log(e.message,e)},_checkLocation:function(){var t,e;return t=this.getLocation(),this.last_location&&"get"==this.last_location[0]&&this.last_location[1]==t||(this.last_location=["get",t],e=this.runRoute("get",t)),e},_getFormVerb:function(e){var n,i,r=t(e);return i=r.find('input[name="_method"]'),i.length>0&&(n=i.val()),n||(n=r[0].getAttribute("method")),n&&""!==n||(n="get"),t.trim(n.toString().toLowerCase())},_checkFormSubmission:function(e){var n,i,r,o,a;return this.trigger("check-form-submission",{form:e}),n=t(e),i=n.attr("action")||"",r=this._getFormVerb(n),this.debug&&this.log("_checkFormSubmission",n,i,r),"get"===r?(o=this._serializeFormParams(n),""!==o&&(i+="?"+o),this.setLocation(i),a=!1):(o=t.extend({},this._parseFormParams(n)),a=this.runRoute(r,i,o,e.get(0))),"undefined"==typeof a?!1:a},_serializeFormParams:function(t){var e,n="",i=t.serializeArray();if(i.length>0)for(n=this._encodeFormPair(i[0].name,i[0].value),e=1;e0&&this.then(this.callbacks.shift())},load:function(e,n,i){var r=this;return this.then(function(){var o,s,u;return a(n)?(i=n,n={}):n=t.extend({},n),i&&this.then(i),"string"==typeof e?(u=e.match(/\.json$/)||n.json,o=u?n.cache===!0:n.cache!==!1,r.next_engine=r.event_context.engineFor(e),delete n.cache,delete n.json,n.engine&&(r.next_engine=n.engine,delete n.engine),o&&(s=this.event_context.app.templateCache(e))?s:(this.wait(),t.ajax(t.extend({url:e,data:{},dataType:u?"json":"text",type:"get",success:function(t){o&&r.event_context.app.templateCache(e,t),r.next(t)}},n)),!1)):e.nodeType?e.innerHTML:e.selector?(r.next_engine=e.attr("data-engine"),n.clone===!1?e.remove()[0].innerHTML.toString():e[0].innerHTML.toString()):void 0})},loadPartials:function(t){var e;if(t){this.partials=this.partials||{};for(e in t)!function(e,n){e.load(t[n]).then(function(t){this.partials[n]=t})}(this,e)}return this},render:function(t,e,n,i){return a(t)&&!e?this.then(t):(a(e)?(i=n,n=e,e=null):n&&!a(n)&&(i=n,n=null),this.loadPartials(i).load(t).interpolate(e,t).then(n))},partial:function(t,e,n,i){return a(n)?this.render(t,e,i).swap(n):a(e)?this.render(t,{},n).swap(e):this.render(t,e,n).swap()},send:function(){var t=this,e=o(arguments),n=e.shift();return s(e[0])&&(e=e[0]),this.then(function(i){return e.push(function(e){t.next(e)}),t.wait(),n.apply(n,e),!1})},collect:function(e,n,i){var r=this,o=function(){a(e)&&(n=e,e=this.content);var i=[],o=!1;return t.each(e,function(t,e){var a=n.apply(r,[t,e]);return a.jquery&&1==a.length&&(a=a[0],o=!0),i.push(a),a}),o?i:i.join("")};return i?o():this.then(o)},renderEach:function(e,n,i,r){return s(n)&&(r=i,i=n,n=null),this.load(e).then(function(o){var a=this;return i||(i=s(this.previous_content)?this.previous_content:[]),r?void t.each(i,function(t,i){var s={},u=this.next_engine||e;n?s[n]=i:s=i,r(i,a.event_context.interpolate(o,s,u))}):this.collect(i,function(t,i){var r={},a=this.next_engine||e;return n?r[n]=i:r=i,this.event_context.interpolate(o,r,a)},!0)})},interpolate:function(t,e,n){var i=this;return this.then(function(r,o){!t&&o&&(t=o),this.next_engine&&(e=this.next_engine,this.next_engine=!1);var a=i.event_context.interpolate(r,t,e,this.partials);return n?o+a:a})},swap:function(t){return this.then(function(e){return this.event_context.swap(e,t),e}).trigger("changed",{})},appendTo:function(e){return this.then(function(n){t(e).append(n)}).trigger("changed",{})},prependTo:function(e){return this.then(function(n){t(e).prepend(n)}).trigger("changed",{})},replace:function(e){return this.then(function(n){t(e).html(n)}).trigger("changed",{})},trigger:function(t,e){return this.then(function(n){return"undefined"==typeof e&&(e={content:n}),this.event_context.trigger(t,e),n})}}),e.EventContext=function(t,n,i,r,o){this.app=t,this.verb=n,this.path=i,this.params=new e.Object(r),this.target=o},e.EventContext.prototype=t.extend({},e.Object.prototype,{$element:function(){return this.app.$element(o(arguments).shift())},engineFor:function(t){var e,n=this;return a(t)?t:(t=(t||n.app.template_engine).toString(),(e=t.match(/\.([^\.\?\#]+)$/))&&(t=e[1]),t&&a(n[t])?n[t]:n.app.template_engine?this.engineFor(n.app.template_engine):function(t,e){return t})},interpolate:function(t,e,n,i){return this.engineFor(n).apply(this,[t,e,i])},render:function(t,n,i,r){return new e.RenderContext(this).render(t,n,i,r)},renderEach:function(t,n,i,r){return new e.RenderContext(this).renderEach(t,n,i,r)},load:function(t,n,i){return new e.RenderContext(this).load(t,n,i)},loadPartials:function(t){return new e.RenderContext(this).loadPartials(t)},partial:function(t,n,i,r){return new e.RenderContext(this).partial(t,n,i,r)},send:function(){var t=new e.RenderContext(this);return t.send.apply(t,arguments)},redirect:function(){var e,n=o(arguments),i=this.app.getLocation(),r=n.length;if(r>1){for(var a=0,s=[],u=[],c={},h=!1;r>a;a++)"string"==typeof n[a]?s.push(n[a]):(t.extend(c,n[a]),h=!0);if(e=s.join("/"),h){for(var p in c)u.push(this.app._encodeFormPair(p,c[p]));e+="?"+u.join("&")}}else e=n[0];this.trigger("redirect",{to:e}),this.app.last_location=[this.verb,this.path],this.app.setLocation(e),new RegExp(e).test(i)&&this.app.trigger("location-changed")},trigger:function(t,e){return"undefined"==typeof e&&(e={}),e.context||(e.context=this),this.app.trigger(t,e)},eventNamespace:function(){return this.app.eventNamespace()},swap:function(t,e){return this.app.swap(t,e)},notFound:function(){return this.app.notFound(this.verb,this.path)},json:function(e){return t.parseJSON(e)},toString:function(){return"Sammy.EventContext: "+[this.verb,this.path,this.params].join(" ")}}),e});
!function(n){"function"==typeof define&&define.amd?define(["jquery","sammy","handlebars"],n):(window.Sammy=window.Sammy||{}).Handlebars=n(window.jQuery,window.Sammy)}(function(n,e,a){return a=a||window.Handlebars,e.Handlebars=function(e,d){var i={},r=function(e,d,r,t){"undefined"==typeof t&&(t=e);var o=i[t];return o||(o=i[t]=a.compile(e)),d=n.extend({},this,d),r=n.extend({},d.partials,r),o(d,{partials:r})};d||(d="handlebars"),e.helper(d,r)},e.Handlebars});
!function(t){"function"==typeof define&&define.amd?define(["jquery","sammy"],t):(window.Sammy=window.Sammy||{}).JSON=t(window.jQuery,window.Sammy)}(function($,Sammy){return window.JSON||(window.JSON={}),function(){function f(t){return 10>t?"0"+t:t}function quote(t){return escapable.lastIndex=0,escapable.test(t)?'"'+t.replace(escapable,function(t){var e=meta[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function str(t,e){var n,r,o,f,u,i=gap,a=e[t];switch(a&&"object"==typeof a&&"function"==typeof a.toJSON&&(a=a.toJSON(t)),"function"==typeof rep&&(a=rep.call(e,t,a)),typeof a){case"string":return quote(a);case"number":return isFinite(a)?String(a):"null";case"boolean":case"null":return String(a);case"object":if(!a)return"null";if(gap+=indent,u=[],"[object Array]"===Object.prototype.toString.apply(a)){for(f=a.length,n=0;f>n;n+=1)u[n]=str(n,a)||"null";return o=0===u.length?"[]":gap?"[\n"+gap+u.join(",\n"+gap)+"\n"+i+"]":"["+u.join(",")+"]",gap=i,o}if(rep&&"object"==typeof rep)for(f=rep.length,n=0;f>n;n+=1)r=rep[n],"string"==typeof r&&(o=str(r,a),o&&u.push(quote(r)+(gap?": ":":")+o));else for(r in a)Object.hasOwnProperty.call(a,r)&&(o=str(r,a),o&&u.push(quote(r)+(gap?": ":":")+o));return o=0===u.length?"{}":gap?"{\n"+gap+u.join(",\n"+gap)+"\n"+i+"}":"{"+u.join(",")+"}",gap=i,o}}"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(t){return this.getUTCFullYear()+"-"+f(this.getUTCMonth()+1)+"-"+f(this.getUTCDate())+"T"+f(this.getUTCHours())+":"+f(this.getUTCMinutes())+":"+f(this.getUTCSeconds())+"Z"},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(t){return this.valueOf()});var cx=/[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,escapable=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,gap,indent,meta={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},rep;"function"!=typeof JSON.stringify&&(JSON.stringify=function(t,e,n){var r;if(gap="",indent="","number"==typeof n)for(r=0;n>r;r+=1)indent+=" ";else"string"==typeof n&&(indent=n);if(rep=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON.stringify");return str("",{"":t})}),"function"!=typeof JSON.parse&&(JSON.parse=function(text,reviver){function walk(t,e){var n,r,o=t[e];if(o&&"object"==typeof o)for(n in o)Object.hasOwnProperty.call(o,n)&&(r=walk(o,n),void 0!==r?o[n]=r:delete o[n]);return reviver.call(t,e,o)}var j;if(cx.lastIndex=0,cx.test(text)&&(text=text.replace(cx,function(t){return"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})),/^[\],:{}\s]*$/.test(text.replace(/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,"@").replace(/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,"]").replace(/(?:^|:|,)(?:\s*\[)+/g,"")))return j=eval("("+text+")"),"function"==typeof reviver?walk({"":j},""):j;throw new SyntaxError("JSON.parse")})}(),Sammy.JSON=function(t){t.helpers({json:function(t){return"string"==typeof t?JSON.parse(t):JSON.stringify(t)}})},Sammy.JSON});
!function(t){"function"==typeof define&&define.amd?define(["jquery","sammy"],t):(window.Sammy=window.Sammy||{}).Storage=t(window.jQuery,window.Sammy)}(function(t,e){return e.Store=function(i){var n=this;this.options=i||{},this.name=this.options.name||"store",this.element=this.options.element||"body",this.$element=t(this.element),t.isArray(this.options.type)?t.each(this.options.type,function(t,i){return e.Store.isAvailable(i)?(n.type=i,!1):void 0}):this.type=this.options.type||"memory",this.meta_key=this.options.meta_key||"__keys__",this.storage=new e.Store[e.Store.stores[this.type]](this.name,this.element,this.options)},e.Store.stores={memory:"Memory",data:"Data",local:"LocalStorage",session:"SessionStorage",cookie:"Cookie"},t.extend(e.Store.prototype,{isAvailable:function(){return t.isFunction(this.storage.isAvailable)?this.storage.isAvailable():!0},exists:function(t){return this.storage.exists(t)},set:function(t,e){var i="string"==typeof e?e:JSON.stringify(e);return t=t.toString(),this.storage.set(t,i),t!=this.meta_key&&(this._addKey(t),this.$element.trigger("set-"+this.name,{key:t,value:e}),this.$element.trigger("set-"+this.name+"-"+t,{key:t,value:e})),e},get:function(t){var e=this.storage.get(t);if("undefined"==typeof e||null==e||""==e)return e;try{return JSON.parse(e)}catch(i){return e}},clear:function(t){return this._removeKey(t),this.storage.clear(t)},clearAll:function(){var t=this;this.each(function(e,i){t.clear(e)})},keys:function(){return this.get(this.meta_key)||[]},each:function(t){var e,i=0,n=this.keys();for(i;ithis.$items.length-1||0>e?void 0:this.sliding?this.$element.one("slid",function(){i.to(e)}):o==e?this.pause().cycle():this.slide(e>o?"next":"prev",t(this.$items[e]))},e.prototype.pause=function(e){return e||(this.paused=!0),this.$element.find(".next, .prev").length&&t.support.transition.end&&(this.$element.trigger(t.support.transition.end),this.cycle(!0)),this.interval=clearInterval(this.interval),this},e.prototype.next=function(){return this.sliding?void 0:this.slide("next")},e.prototype.prev=function(){return this.sliding?void 0:this.slide("prev")},e.prototype.slide=function(e,i){var o=this.$element.find(".item.active"),n=i||o[e](),s=this.interval,a="next"==e?"left":"right",r="next"==e?"first":"last",l=this;if(!n.length){if(!this.options.wrap)return;n=this.$element.find(".item")[r]()}this.sliding=!0,s&&this.pause();var h=t.Event("slide.bs.carousel",{relatedTarget:n[0],direction:a});if(!n.hasClass("active")){if(this.$indicators.length&&(this.$indicators.find(".active").removeClass("active"),this.$element.one("slid",function(){var e=t(l.$indicators.children()[l.getActiveIndex()]);e&&e.addClass("active")})),t.support.transition&&this.$element.hasClass("slide")){if(this.$element.trigger(h),h.isDefaultPrevented())return;n.addClass(e),n[0].offsetWidth,o.addClass(a),n.addClass(a),o.one(t.support.transition.end,function(){n.removeClass([e,a].join(" ")).addClass("active"),o.removeClass(["active",a].join(" ")),l.sliding=!1,setTimeout(function(){l.$element.trigger("slid")},0)}).emulateTransitionEnd(600)}else{if(this.$element.trigger(h),h.isDefaultPrevented())return;o.removeClass("active"),n.addClass("active"),this.sliding=!1,this.$element.trigger("slid")}return s&&this.cycle(),this}};var i=t.fn.carousel;t.fn.carousel=function(i){return this.each(function(){var o=t(this),n=o.data("bs.carousel"),s=t.extend({},e.DEFAULTS,o.data(),"object"==typeof i&&i),a="string"==typeof i?i:s.slide;n||o.data("bs.carousel",n=new e(this,s)),"number"==typeof i?n.to(i):a?n[a]():s.interval&&n.pause().cycle()})},t.fn.carousel.Constructor=e,t.fn.carousel.noConflict=function(){return t.fn.carousel=i,this},t(document).on("click.bs.carousel.data-api","[data-slide], [data-slide-to]",function(e){var i,o=t(this),n=t(o.attr("data-target")||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,"")),s=t.extend({},n.data(),o.data()),a=o.attr("data-slide-to");a&&(s.interval=!1),n.carousel(s),(a=o.attr("data-slide-to"))&&n.data("bs.carousel").to(a),e.preventDefault()}),t(window).on("load",function(){t('[data-ride="carousel"]').each(function(){var e=t(this);e.carousel(e.data())})})}(window.jQuery),+function(t){"use strict";var e=function(i,o){this.$element=t(i),this.options=t.extend({},e.DEFAULTS,o),this.transitioning=null,this.options.parent&&(this.$parent=t(this.options.parent)),this.options.toggle&&this.toggle()};e.DEFAULTS={toggle:!0},e.prototype.dimension=function(){var t=this.$element.hasClass("width");return t?"width":"height"},e.prototype.show=function(){if(!this.transitioning&&!this.$element.hasClass("in")){var e=t.Event("show.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.$parent&&this.$parent.find("> .panel > .in");if(i&&i.length){var o=i.data("bs.collapse");if(o&&o.transitioning)return;i.collapse("hide"),o||i.data("bs.collapse",null)}var n=this.dimension();this.$element.removeClass("collapse").addClass("collapsing")[n](0),this.transitioning=1;var s=function(){this.$element.removeClass("collapsing").addClass("in")[n]("auto"),this.transitioning=0,this.$element.trigger("shown.bs.collapse")};if(!t.support.transition)return s.call(this);var a=t.camelCase(["scroll",n].join("-"));this.$element.one(t.support.transition.end,t.proxy(s,this)).emulateTransitionEnd(350)[n](this.$element[0][a])}}},e.prototype.hide=function(){if(!this.transitioning&&this.$element.hasClass("in")){var e=t.Event("hide.bs.collapse");if(this.$element.trigger(e),!e.isDefaultPrevented()){var i=this.dimension();this.$element[i](this.$element[i]())[0].offsetHeight,this.$element.addClass("collapsing").removeClass("collapse").removeClass("in"),this.transitioning=1;var o=function(){this.transitioning=0,this.$element.trigger("hidden.bs.collapse").removeClass("collapsing").addClass("collapse")};return t.support.transition?void this.$element[i](0).one(t.support.transition.end,t.proxy(o,this)).emulateTransitionEnd(350):o.call(this)}}},e.prototype.toggle=function(){this[this.$element.hasClass("in")?"hide":"show"]()};var i=t.fn.collapse;t.fn.collapse=function(i){return this.each(function(){var o=t(this),n=o.data("bs.collapse"),s=t.extend({},e.DEFAULTS,o.data(),"object"==typeof i&&i);n||o.data("bs.collapse",n=new e(this,s)),"string"==typeof i&&n[i]()})},t.fn.collapse.Constructor=e,t.fn.collapse.noConflict=function(){return t.fn.collapse=i,this},t(document).on("click.bs.collapse.data-api","[data-toggle=collapse]",function(e){var i,o=t(this),n=o.attr("data-target")||e.preventDefault()||(i=o.attr("href"))&&i.replace(/.*(?=#[^\s]+$)/,""),s=t(n),a=s.data("bs.collapse"),r=a?"toggle":o.data(),l=o.attr("data-parent"),h=l&&t(l);a&&a.transitioning||(h&&h.find('[data-toggle=collapse][data-parent="'+l+'"]').not(o).addClass("collapsed"),o[s.hasClass("in")?"addClass":"removeClass"]("collapsed")),s.collapse(r)})}(window.jQuery),+function(t){"use strict";function e(){t(o).remove(),t(n).each(function(e){var o=i(t(this));o.hasClass("open")&&(o.trigger(e=t.Event("hide.bs.dropdown")),e.isDefaultPrevented()||o.removeClass("open").trigger("hidden.bs.dropdown"))})}function i(e){var i=e.attr("data-target");i||(i=e.attr("href"),i=i&&/#/.test(i)&&i.replace(/.*(?=#[^\s]*$)/,""));var o=i&&t(i);return o&&o.length?o:e.parent()}var o=".dropdown-backdrop",n="[data-toggle=dropdown]",s=function(e){t(e).on("click.bs.dropdown",this.toggle)};s.prototype.toggle=function(o){var n=t(this);if(!n.is(".disabled, :disabled")){var s=i(n),a=s.hasClass("open");if(e(),!a){if("ontouchstart"in document.documentElement&&!s.closest(".navbar-nav").length&&t('
').insertAfter(t(this)).on("click",e),s.trigger(o=t.Event("show.bs.dropdown")),o.isDefaultPrevented())return;s.toggleClass("open").trigger("shown.bs.dropdown"),n.focus()}return!1}},s.prototype.keydown=function(e){if(/(38|40|27)/.test(e.keyCode)){var o=t(this);if(e.preventDefault(),e.stopPropagation(),!o.is(".disabled, :disabled")){var s=i(o),a=s.hasClass("open");if(!a||a&&27==e.keyCode)return 27==e.which&&s.find(n).focus(),o.click();var r=t("[role=menu] li:not(.divider):visible a",s);if(r.length){var l=r.index(r.filter(":focus"));38==e.keyCode&&l>0&&l--,40==e.keyCode&&l ').appendTo(document.body),this.$element.on("click.dismiss.modal",t.proxy(function(t){t.target===t.currentTarget&&("static"==this.options.backdrop?this.$element[0].focus.call(this.$element[0]):this.hide.call(this))},this)),o&&this.$backdrop[0].offsetWidth,this.$backdrop.addClass("in"),!e)return;o?this.$backdrop.one(t.support.transition.end,e).emulateTransitionEnd(150):e()}else!this.isShown&&this.$backdrop?(this.$backdrop.removeClass("in"),t.support.transition&&this.$element.hasClass("fade")?this.$backdrop.one(t.support.transition.end,e).emulateTransitionEnd(150):e()):e&&e()};var i=t.fn.modal;t.fn.modal=function(i,o){return this.each(function(){var n=t(this),s=n.data("bs.modal"),a=t.extend({},e.DEFAULTS,n.data(),"object"==typeof i&&i);s||n.data("bs.modal",s=new e(this,a)),"string"==typeof i?s[i](o):a.show&&s.show(o)})},t.fn.modal.Constructor=e,t.fn.modal.noConflict=function(){return t.fn.modal=i,this},t(document).on("click.bs.modal.data-api",'[data-toggle="modal"]',function(e){var i=t(this),o=i.attr("href"),n=t(i.attr("data-target")||o&&o.replace(/.*(?=#[^\s]+$)/,"")),s=n.data("modal")?"toggle":t.extend({remote:!/#/.test(o)&&o},n.data(),i.data());e.preventDefault(),n.modal(s,this).one("hide",function(){i.is(":visible")&&i.focus()})}),t(document).on("show.bs.modal",".modal",function(){t(document.body).addClass("modal-open")}).on("hidden.bs.modal",".modal",function(){t(document.body).removeClass("modal-open")})}(window.jQuery),+function(t){"use strict";var e=function(t,e){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null,this.init("tooltip",t,e)};e.DEFAULTS={animation:!0,placement:"top",selector:!1,template:'',trigger:"hover focus",title:"",delay:0,html:!1,container:!1},e.prototype.init=function(e,i,o){this.enabled=!0,this.type=e,this.$element=t(i),this.options=this.getOptions(o);for(var n=this.options.trigger.split(" "),s=n.length;s--;){var a=n[s];if("click"==a)this.$element.on("click."+this.type,this.options.selector,t.proxy(this.toggle,this));else if("manual"!=a){var r="hover"==a?"mouseenter":"focus",l="hover"==a?"mouseleave":"blur";this.$element.on(r+"."+this.type,this.options.selector,t.proxy(this.enter,this)),this.$element.on(l+"."+this.type,this.options.selector,t.proxy(this.leave,this))}}this.options.selector?this._options=t.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()},e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.getOptions=function(e){return e=t.extend({},this.getDefaults(),this.$element.data(),e),e.delay&&"number"==typeof e.delay&&(e.delay={show:e.delay,hide:e.delay}),e},e.prototype.getDelegateOptions=function(){var e={},i=this.getDefaults();return this._options&&t.each(this._options,function(t,o){i[t]!=o&&(e[t]=o)}),e},e.prototype.enter=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="in",i.options.delay&&i.options.delay.show?void(i.timeout=setTimeout(function(){"in"==i.hoverState&&i.show()},i.options.delay.show)):i.show()},e.prototype.leave=function(e){var i=e instanceof this.constructor?e:t(e.currentTarget)[this.type](this.getDelegateOptions()).data("bs."+this.type);return clearTimeout(i.timeout),i.hoverState="out",i.options.delay&&i.options.delay.hide?void(i.timeout=setTimeout(function(){"out"==i.hoverState&&i.hide()},i.options.delay.hide)):i.hide()},e.prototype.show=function(){var e=t.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){if(this.$element.trigger(e),e.isDefaultPrevented())return;var i=this.tip();this.setContent(),this.options.animation&&i.addClass("fade");var o="function"==typeof this.options.placement?this.options.placement.call(this,i[0],this.$element[0]):this.options.placement,n=/\s?auto?\s?/i,s=n.test(o);s&&(o=o.replace(n,"")||"top"),i.detach().css({top:0,left:0,display:"block"}).addClass(o),this.options.container?i.appendTo(this.options.container):i.insertAfter(this.$element);var a=this.getPosition(),r=i[0].offsetWidth,l=i[0].offsetHeight;if(s){var h=this.$element.parent(),p=o,d=document.documentElement.scrollTop||document.body.scrollTop,c="body"==this.options.container?window.innerWidth:h.outerWidth(),f="body"==this.options.container?window.innerHeight:h.outerHeight(),u="body"==this.options.container?0:h.offset().left;o="bottom"==o&&a.top+a.height+l-d>f?"top":"top"==o&&a.top-d-l<0?"bottom":"right"==o&&a.right+r>c?"left":"left"==o&&a.left-r
'}),e.prototype=t.extend({},t.fn.tooltip.Constructor.prototype),e.prototype.constructor=e,e.prototype.getDefaults=function(){return e.DEFAULTS},e.prototype.setContent=function(){var t=this.tip(),e=this.getTitle(),i=this.getContent();t.find(".popover-title")[this.options.html?"html":"text"](e),t.find(".popover-content")[this.options.html?"html":"text"](i),t.removeClass("fade top bottom left right in"),t.find(".popover-title").html()||t.find(".popover-title").hide()},e.prototype.hasContent=function(){return this.getTitle()||this.getContent()},e.prototype.getContent=function(){var t=this.$element,e=this.options;return t.attr("data-content")||("function"==typeof e.content?e.content.call(t[0]):e.content)},e.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".arrow")},e.prototype.tip=function(){return this.$tip||(this.$tip=t(this.options.template)),this.$tip};var i=t.fn.popover;t.fn.popover=function(i){return this.each(function(){var o=t(this),n=o.data("bs.popover"),s="object"==typeof i&&i;n||o.data("bs.popover",n=new e(this,s)),"string"==typeof i&&n[i]()})},t.fn.popover.Constructor=e,t.fn.popover.noConflict=function(){return t.fn.popover=i,this}}(window.jQuery),+function(t){"use strict";function e(i,o){var n,s=t.proxy(this.process,this);this.$element=t(t(i).is("body")?window:i),this.$body=t("body"),this.$scrollElement=this.$element.on("scroll.bs.scroll-spy.data-api",s),this.options=t.extend({},e.DEFAULTS,o),this.selector=(this.options.target||(n=t(i).attr("href"))&&n.replace(/.*(?=#[^\s]+$)/,"")||"")+" .nav li > a",this.offsets=t([]),this.targets=t([]),this.activeTarget=null,this.refresh(),this.process()}e.DEFAULTS={offset:10},e.prototype.refresh=function(){var e=this.$element[0]==window?"offset":"position";this.offsets=t([]),this.targets=t([]);var i=this;this.$body.find(this.selector).map(function(){var o=t(this),n=o.data("target")||o.attr("href"),s=/^#\w/.test(n)&&t(n);return s&&s.length&&[[s[e]().top+(!t.isWindow(i.$scrollElement.get(0))&&i.$scrollElement.scrollTop()),n]]||null}).sort(function(t,e){return t[0]-e[0]}).each(function(){i.offsets.push(this[0]),i.targets.push(this[1])})},e.prototype.process=function(){var t,e=this.$scrollElement.scrollTop()+this.options.offset,i=this.$scrollElement[0].scrollHeight||this.$body[0].scrollHeight,o=i-this.$scrollElement.height(),n=this.offsets,s=this.targets,a=this.activeTarget;if(e>=o)return a!=(t=s.last()[0])&&this.activate(t);for(t=n.length;t--;)a!=s[t]&&e>=n[t]&&(!n[t+1]||e<=n[t+1])&&this.activate(s[t])},e.prototype.activate=function(e){this.activeTarget=e,t(this.selector).parents(".active").removeClass("active");var i=this.selector+'[data-target="'+e+'"],'+this.selector+'[href="'+e+'"]',o=t(i).parents("li").addClass("active");o.parent(".dropdown-menu").length&&(o=o.closest("li.dropdown").addClass("active")),o.trigger("activate")};var i=t.fn.scrollspy;t.fn.scrollspy=function(i){return this.each(function(){var o=t(this),n=o.data("bs.scrollspy"),s="object"==typeof i&&i;n||o.data("bs.scrollspy",n=new e(this,s)),"string"==typeof i&&n[i]()})},t.fn.scrollspy.Constructor=e,t.fn.scrollspy.noConflict=function(){return t.fn.scrollspy=i,this},t(window).on("load",function(){t('[data-spy="scroll"]').each(function(){var e=t(this);e.scrollspy(e.data())})})}(window.jQuery),+function(t){"use strict";var e=function(e){this.element=t(e)};e.prototype.show=function(){var e=this.element,i=e.closest("ul:not(.dropdown-menu)"),o=e.attr("data-target");if(o||(o=e.attr("href"),o=o&&o.replace(/.*(?=#[^\s]*$)/,"")),!e.parent("li").hasClass("active")){var n=i.find(".active:last a")[0],s=t.Event("show.bs.tab",{relatedTarget:n});if(e.trigger(s),!s.isDefaultPrevented()){var a=t(o);this.activate(e.parent("li"),i),this.activate(a,a.parent(),function(){e.trigger({type:"shown.bs.tab",relatedTarget:n})})}}},e.prototype.activate=function(e,i,o){function n(){s.removeClass("active").find("> .dropdown-menu > .active").removeClass("active"),e.addClass("active"),a?(e[0].offsetWidth,e.addClass("in")):e.removeClass("fade"),e.parent(".dropdown-menu")&&e.closest("li.dropdown").addClass("active"),o&&o()}var s=i.find("> .active"),a=o&&t.support.transition&&s.hasClass("fade");a?s.one(t.support.transition.end,n).emulateTransitionEnd(150):n(),s.removeClass("in")};var i=t.fn.tab;t.fn.tab=function(i){return this.each(function(){var o=t(this),n=o.data("bs.tab");n||o.data("bs.tab",n=new e(this)),"string"==typeof i&&n[i]()})},t.fn.tab.Constructor=e,t.fn.tab.noConflict=function(){return t.fn.tab=i,this},t(document).on("click.bs.tab.data-api",'[data-toggle="tab"], [data-toggle="pill"]',function(e){e.preventDefault(),t(this).tab("show")})}(window.jQuery),+function(t){"use strict";var e=function(i,o){this.options=t.extend({},e.DEFAULTS,o),this.$window=t(window).on("scroll.bs.affix.data-api",t.proxy(this.checkPosition,this)).on("click.bs.affix.data-api",t.proxy(this.checkPositionWithEventLoop,this)),this.$element=t(i),this.affixed=this.unpin=null,this.checkPosition()};e.RESET="affix affix-top affix-bottom",e.DEFAULTS={offset:0},e.prototype.checkPositionWithEventLoop=function(){setTimeout(t.proxy(this.checkPosition,this),1)},e.prototype.checkPosition=function(){if(this.$element.is(":visible")){var i=t(document).height(),o=this.$window.scrollTop(),n=this.$element.offset(),s=this.options.offset,a=s.top,r=s.bottom;"object"!=typeof s&&(r=a=s),"function"==typeof a&&(a=s.top()),"function"==typeof r&&(r=s.bottom());var l=null!=this.unpin&&o+this.unpin<=n.top?!1:null!=r&&n.top+this.$element.height()>=i-r?"bottom":null!=a&&a>=o?"top":!1;this.affixed!==l&&(this.unpin&&this.$element.css("top",""),this.affixed=l,this.unpin="bottom"==l?n.top-o:null,this.$element.removeClass(e.RESET).addClass("affix"+(l?"-"+l:"")),"bottom"==l&&this.$element.offset({top:document.body.offsetHeight-r-this.$element.height()}))}};var i=t.fn.affix;t.fn.affix=function(i){return this.each(function(){var o=t(this),n=o.data("bs.affix"),s="object"==typeof i&&i;n||o.data("bs.affix",n=new e(this,s)),"string"==typeof i&&n[i]()})},t.fn.affix.Constructor=e,t.fn.affix.noConflict=function(){return t.fn.affix=i,this},t(window).on("load",function(){t('[data-spy="affix"]').each(function(){var e=t(this),i=e.data();i.offset=i.offset||{},i.offsetBottom&&(i.offset.bottom=i.offsetBottom),i.offsetTop&&(i.offset.top=i.offsetTop),e.affix(i)})})}(window.jQuery);
!function(t){"use strict";var e={defaultLocale:"en",locale:"en",placeholder:/(?:\{\{|%\{)(.*?)(?:\}\}?)/gm,translations:{}};t.init=function(){for(var n in e)t[n]="undefined"!=typeof t[n]?t[n]:e[n]},t.init(),t.translateInlineHTML=function(){[].forEach.call(document.querySelectorAll("[data-y18n]"),function(e){e.innerHTML=t.translate(e.getAttribute("data-y18n"))}),[].forEach.call(document.querySelectorAll("[data-y18n-title]"),function(e){e.title=t.translate(e.getAttribute("data-y18n-title"))})},t.translate=function(e,n){n=n||{locale:t.locale},n.locale=n.locale||t.locale;var l=this.lookup(e,n);return"undefined"!=typeof l&&l!==e||n.locale===t.defaultLocale?l?l.printf(n):e:(n.locale=t.defaultLocale,this.translate(e,n))},t.lookup=function(e,n){return"undefined"==typeof n.locale&&(n.locale=t.locale),"undefined"!=typeof t.translations[n.locale]&&"undefined"!=typeof t.translations[n.locale][e]?t.translations[n.locale][e]:void 0},t.t=t.translate}("undefined"==typeof exports?this.y18n||(this.y18n={}):exports),String.prototype.printf=function(t){var e=!1,n=arguments,l=-1;return"string"==typeof n[0]&&(e=!0),t instanceof Array||e?this.replace(/\%s/g,function(a,o){if(l++,e){if("string"==typeof n[l])return n[l];throw new Error("Arguments element is an invalid type")}return t[l]}):this.replace(/{([^{}]*)}/g,function(e,n){var l=t[n];return"string"==typeof l||"number"==typeof l?l:e})};
-var app=Sammy("#main",function(a){a.use("Handlebars","ms"),Handlebars.registerHelper("ucwords",function(a){return(a+"").replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g,function(a){return a.toUpperCase()})}),Handlebars.registerHelper("humanSize",function(a){var e=["Bytes","KB","MB","GB","TB"];if(0===a)return"n/a";var s=parseInt(Math.floor(Math.log(a)/Math.log(1024)));return Math.round(a/Math.pow(1024,s),2)+" "+e[[s]]}),Handlebars.registerHelper("humanTime",function(a){return Math.round(a)+"s"}),Handlebars.registerHelper("bitRate",function(a,e){var s=["b","Kb","Mb","Gb","Tb"];if(0===e)return"n/a";var n=a/e*8,t=parseInt(Math.floor(Math.log(n)/Math.log(1024)));return Math.round(n/Math.pow(1024,t),2)+" "+s[[t]]+"/s"}),Handlebars.registerHelper("t",function(a){var e=y18n.t(a,Array.prototype.slice.call(arguments,1));return new Handlebars.SafeString(e)});var e;e=Sammy.Store.isAvailable("session")?"session":Sammy.Store.isAvailable("cookie")?"cookie":"memory";var s=new Sammy.Store({name:"storage",type:e}),n=!1,t=3;a.helpers({serialize:function(a){var e=[];for(var s in a)a.hasOwnProperty(s)&&e.push(encodeURIComponent(s)+"="+encodeURIComponent(a[s]));return e.join("&")},flash:function(a,e){s.get("flash")||s.set("flash",!0),"fail"==a?alertClass="alert-danger":alertClass="alert-"+a,$("#flash .alert").last().hasClass(alertClass)?"log"==a?$("#flash .alert").last().append(''+e+"
"):$("#flash .alert").last().append(""+e+"
"):("log"==a?$("#flash").append('× '+y18n.t("log")+' '+e+"
").show():$("#flash").append('").show(),$("#flash .alert").last().fadeIn()),document.body.scrollTop=document.documentElement.scrollTop=0,$('#flash [data-show="log"]').on("click",function(){$(this).hide().nextAll("p").fadeIn()})},checkInstall:function(a){domain=window.location.hostname,$.ajax({dataType:"json",url:"https://"+domain+"/yunohost/api/installed",timeout:3e3}).success(function(e){a(e.installed)}).fail(function(){a(void 0)})},api:function(a,e,t,i,r){c=this,call=function(a,e,t,i){t="undefined"!=typeof t?t:"GET",i="undefined"!=typeof i?i:{},window.navigator&&window.navigator.language&&"undefined"==typeof i.locale&&(i.locale=y18n.locale||window.navigator.language.substr(0,2));var r=i;if("/postinstall"===a){var o=!1;setInterval(function(){o=!0},1500)}n=!1,0===$("div.loader").length&&setInterval(function(){n||0!==$("div.loader").length||$("#main").append('
')},500),jQuery.ajax({url:"https://"+s.get("url")+a,type:t,crossdomain:!0,data:i,traditional:!0,dataType:"json"}).always(function(a,e,s){}).done(function(a){a=a||{},e(a)}).fail(function(n){200==n.status?e({}):401==n.status?"/login"===a?c.flash("fail",y18n.t("wrong_password")):(c.flash("fail",y18n.t("unauthorized")),c.redirect("#/login")):"undefined"!=typeof n.responseJSON?c.flash("fail",n.responseJSON.error):"undefined"!=typeof n.responseText&&"/postinstall"!==a?c.flash("fail",n.responseText):"/postinstall"===a?o?(interval=window.location.hostname===r.domain?2e4:5e3,checkInstall=setInterval(function(){c.checkInstall(function(a){(a||"undefined"==typeof a)&&(c.flash("success",y18n.t("installation_complete")),clearInterval(checkInstall),window.location.href="https://"+window.location.hostname+"/yunohost/admin/")})},interval)):c.flash("fail",y18n.t("error_occured")):c.flash("fail",y18n.t("error_server")),"/postinstall"!==a&&(s.clear("slide"),c.redirect(s.get("path-1")))})},r="undefined"!=typeof r?r:!0,r?(ws=new WebSocket("wss://"+s.get("url")+"/messages"),ws.onmessage=function(a){$.each($.parseJSON(a.data),function(a,e){c.flash(a,e)})},ws.onerror=ws.onopen,ws.onclose=function(){s.clear("flash")},ws.onopen=call(a,e,t,i)):call(a,e,t,i)},view:function(a,e,t){if(t="undefined"!=typeof t?t:function(){},rendered=this.render("views/"+a+".ms",e),enableSlide=!0,n=!0,$("div.loader").remove(),$("#modal").modal("hide"),enableSlide){var i=function(){rendered.swap(function(){$(".slide, .btn-breadcrumb a:not(:last-child)").on("click",function(){$(this).addClass("active"),$(this).hasClass("back")||$(this).parent(".btn-breadcrumb").length?s.set("slide","back"):s.set("slide","to")}),t(),$("html, body").scrollTop(0)})};blockSize=$("#slider").width(),"back"==s.get("slide")?(s.clear("slide"),$("#slideBack").css("display","none"),$("#slider-container").removeClass("move").css("margin-left","-"+blockSize+"px"),$("#slideTo").show().html($("#main").html()),i(),$("#slider-container").addClass("move").css("margin-left","0px")):"to"==s.get("slide")?(s.clear("slide"),$("#slideTo").css("display","none"),$("#slider-container").removeClass("move").css("margin-left","-"+blockSize+"px"),$("#slider-container").removeClass("move").css("margin-left","0px"),$("#slideBack").show().html($("#main").html()),i(),$("#slider-container").addClass("move").css("margin-left","-"+blockSize+"px")):i()}else rendered.swap(function(){t(),$("html, body").scrollTop(0)})},confirm:function(a,e,s,n){return s="undefined"!=typeof s?s:function(){},n="undefined"!=typeof n?n:function(){},box=$("#modal"),"string"==typeof a&&a.length?$(".title",box).html(a):box.addClass("no-title"),$(".content",box).html(e),$("footer button",box).click(function(a){a.preventDefault(),$("#modal footer button").unbind("click"),box.removeClass("no-title").modal("hide"),"confirm"==$(this).data("action")?s():n()}),box.modal("show")},arraySortById:function(a){a.sort(function(a,e){return a.id>e.id?1:a.id'+y18n.t("read_more")+")";a.flash("warning",l),s.push(o.guid)}}),$.cookie("ynhSecurityViewedItems",s,{expire:7})}).fail(function(){a.flash("fail",y18n.t("error_retrieve_feed",[s]))}),a.view("home")})}),a.get("#/login",function(a){$("#masthead").show(),$(".logout-button").hide(),s.set("path-1","#/login"),0===$("div.loader").length&&setInterval(function(){n||0!==$("div.loader").length||$("#main").append('
')},500),a.checkInstall(function(e){e?(domain=window.location.hostname,$("div.loader").remove(),a.view("login",{domain:domain})):"undefined"==typeof e?t>0?(t--,n=!1,setTimeout(function(){a.redirect("#/")},5e3)):(t=3,$(document).ajaxError(function(e,s,n){200!==s.status&&a.flash("fail",y18n.t("api_not_responding",[s.status+" "+s.statusText])),$(document).off("ajaxError")}),n=!0,$("div.loader").remove()):($("div.loader").remove(),a.redirect("#/postinstall"))})}),a.post("#/login",function(a){s.set("url",a.params.domain+"/yunohost/api"),params={password:a.params.password},a.api("/login",function(e){s.set("connected",!0),$(".logout-button").fadeIn(),a.flash("success",y18n.t("logged_in")),s.get("path")?a.redirect(s.get("path")):a.redirect("#/")},"POST",params,!1)}),a.get("#/logout",function(a){a.api("/logout",function(e){s.clear("url"),s.clear("connected"),s.set("path","#/"),a.flash("success",y18n.t("logged_out")),a.redirect("#/login")},"GET",{},!1)}),a.get("#/postinstall",function(a){$("#masthead").hide(),a.checkInstall(function(e){e||"undefined"==typeof e?a.redirect("#/login"):a.view("postinstall/postinstall_1")})}),a.get("#/postinstall/domain",function(a){$("#masthead").hide(),$.get("https://dyndns.yunohost.org/domains",function(){}).done(function(e){a.params.ddomains=e.map(function(a){return"."+a})}).fail(function(){a.params.ddomains=[".nohost.me",".noho.st"]}).always(function(){a.view("postinstall/postinstall_2",a.params,function(){$("#domain, #ddomain").keyup(function(a){13==a.keyCode&&$("a.savedomain").click()}),$("a.savedomain").on("click",function(e){""===$("#domain").val()?""===$("#ddomain").val()?(e.preventDefault(),s.clear("slide"),a.flash("fail",y18n.t("error_select_domain"))):domain=$("#ddomain").val()+$('select[name="ddomain-ext"]').val():domain=$("#domain").val(),s.set("maindomain",domain)})})})}),a.get("#/postinstall/password",function(a){$("#masthead").hide(),$("#flash .alert").remove(),s.get("maindomain")?a.view("postinstall/postinstall_3",{domain:s.get("maindomain").toLowerCase()}):(s.clear("slide"),a.redirect("#/postinstall/domain"))}),a.post("#/postinstall",function(a){""===a.params.password||""===a.params.confirmation?a.flash("fail",y18n.t("password_empty")):a.params.password==a.params.confirmation?(""===a.params.domain?(a.flash("fail",y18n.t("error_select_domain")),s.clear("slide"),a.redirect("#/postinstall/domain")):params={domain:a.params.domain.toLowerCase()},a.confirm(y18n.t("postinstall"),y18n.t("confirm_postinstall",[a.params.domain]),function(){params.password=a.params.password,s.set("url",window.location.hostname+"/yunohost/api"),s.set("user","admin"),a.api("/postinstall",function(e){a.redirect("#/login")},"POST",params)},function(){})):a.flash("fail",y18n.t("passwords_dont_match"))}),a.get("#/users",function(a){a.api("/users",function(e){a.view("user/user_list",e)})}),a.get("#/users/create",function(a){a.api("/domains",function(e){a.view("user/user_create",e)})}),a.post("#/users",function(a){a.params.password==a.params.confirmation?a.params.password.length<4?(a.flash("fail",y18n.t("password_too_short")),s.clear("slide")):(a.params.mail=a.params.email+a.params.domain,a.api("/users",function(e){a.redirect("#/users")},"POST",a.params.toHash())):(a.flash("fail",y18n.t("passwords_dont_match")),s.clear("slide"))}),a.get("#/users/:user",function(a){a.api("/users/"+a.params.user,function(e){a.view("user/user_info",e)})}),a.get("#/users/:user/edit",function(a){a.api("/users/"+a.params.user,function(e){a.api("/domains",function(s){email=e.mail.split("@"),e.email={username:email[0],domain:email[1]},e.domains=[],$.each(s.domains,function(a,s){e.domains.push({domain:s,selected:s==e.email.domain?!0:!1})}),a.view("user/user_edit",e)})})}),a.put("#/users/:user",function(a){a.api("/users/"+a.params.user,function(e){a.params.mail!==a.params.email+a.params.domain?a.params.mail=a.params.email+a.params.domain:a.params.mail="",a.params.email=a.params.domain="","string"==typeof a.params.mailalias&&(a.params.mailalias=[a.params.mailalias]),"string"==typeof a.params.mailforward&&(a.params.mailforward=[a.params.mailforward]),a.params.add_mailalias=a.arrayDiff(a.params.mailalias,e["mail-aliases"]),a.params.remove_mailalias=a.arrayDiff(e["mail-aliases"],a.params.mailalias),a.params.add_mailforward=a.arrayDiff(a.params.mailforward,e["mail-forward"]),a.params.remove_mailforward=a.arrayDiff(e["mail-forward"],a.params.mailforward),a.params.mailalias=a.params.mailforward="",params={},$.each(a.params.toHash(),function(a,e){e.length>0&&"user"!==a&&(params[a]=e)}),$.isEmptyObject(params)?(a.flash("fail",y18n.t("error_modify_something")),s.clear("slide"),a.redirect("#/users/"+a.params.user+"/edit")):params.password?params.password==params.confirmation?params.password.length<4?(a.flash("fail",y18n.t("password_too_short")),s.clear("slide"),a.redirect("#/users/"+a.params.user+"/edit")):(params.change_password=params.password,a.api("/users/"+a.params.user,function(e){a.redirect("#/users/"+a.params.user)},"PUT",params)):(a.flash("fail",y18n.t("passwords_dont_match")),s.clear("slide"),a.redirect("#/users/"+a.params.user+"/edit")):a.api("/users/"+a.params.user,function(e){a.redirect("#/users/"+a.params.user)},"PUT",params)},"GET")}),a.get("#/users/:user/delete",function(a){a.confirm(y18n.t("users"),y18n.t("confirm_delete",[a.params.user]),function(){a.api("/users/"+a.params.user,function(e){a.redirect("#/users")},"DELETE")},function(){s.clear("slide"),a.redirect("#/users/"+a.params.user)})}),a.get("#/domains",function(a){a.api("/domains",function(e){a.api("/domains/main",function(s){domains=[],$.each(e.domains,function(a,e){domains.push({url:e,main:e==s.current_main_domain?!0:!1})}),main_domain_form=domains.length>1?!0:!1,domains.sort(function(a,e){return-2*a.main+1}),a.view("domain/domain_list",{domains:domains,main_domain_form:main_domain_form})},"PUT")})}),a.get("#/domains/add",function(a){$.get("https://dyndns.yunohost.org/domains",function(){}).done(function(e){a.params.ddomains=e.map(function(a){return"."+a})}).fail(function(){a.params.ddomains=[".nohost.me",".noho.st"]}).always(function(){data={ddomains:a.params.ddomains,domains:a.params.domains,allowDyndnsDomain:!0};var e=data.ddomains.join("|");$.each(data.domains,function(a,s){s.search(e)>0&&(data.allowDyndnsDomain=!1)}),a.view("domain/domain_add",data)})}),a.post("#/domains/add",function(a){""===a.params.domain?(""===a.params.ddomain&&(a.flash("fail",y18n.t("error_select_domain")),s.clear("slide"),a.redirect("#/domains/add")),params={domain:a.params.ddomain+a.params["ddomain-ext"]},endurl="dyndns"):(params={domain:a.params.domain},endurl=""),a.api("/domains?"+endurl,function(e){a.redirect("#/domains")},"POST",params)}),a.get("#/domains/:domain/delete",function(a){a.confirm(y18n.t("domains"),y18n.t("confirm_delete",[a.params.domain]),function(){a.api("/domains/"+a.params.domain,function(e){s.clear("slide"),a.redirect("#/domains")},"DELETE")},function(){s.clear("slide"),a.redirect("#/domains")})}),a.post("#/domains",function(a){""===a.params.domain?(a.flash("fail",y18n.t("error_select_domain")),s.clear("slide"),a.redirect("#/domains")):a.confirm(y18n.t("domains"),y18n.t("confirm_change_maindomain"),function(){params={new_domain:a.params.domain},a.api("/domains/main",function(e){s.clear("slide"),a.redirect("#/domains")},"PUT",params),refreshDomain=window.setTimeout(function(){s.clear("slide"),a.redirect("#/domains")},15e3)},function(){s.clear("slide"),a.redirect("#/domains")})}),a.get("#/apps",function(a){a.api("/apps",function(e){data2={apps:[],installed_apps:!0},$.each(e.apps,function(a,e){e.installed&&data2.apps.push(e)}),a.arraySortById(data2.apps),a.view("app/app_list",data2)})}),a.get("#/apps/install",function(a){a.api("/apps",function(e){a.api("/apps?raw",function(s){data2={apps:[],installed_apps:!1},$.each(e.apps,function(a,e){e.installed&&"true"!=s[e.id].manifest.multi_instance||e.id.match(/__[0-9]{1,5}$/)||(e.install_link=!0,data2.apps.push(e))}),a.arraySortById(data2.apps),a.view("app/app_list",data2)})})}),a.get("#/apps/refresh",function(a){a.api("/appslists",function(e){a.redirect("#/apps/install")},"PUT")}),a.get("#/apps/:app",function(a){a.api("/apps/"+a.params.app+"?raw",function(e){e.settings.allowed_users=e.settings.allowed_users?e.settings.allowed_users.replace(",",", ")+".":y18n.t("everyone_has_access"),e.description="undefined"!=typeof e.manifest.description[y18n.locale]?e.manifest.description[y18n.locale]:e.manifest.description.en,e.manifest.multi_instance="true"==e.manifest.multi_instance?y18n.t("yes"):y18n.t("no");var s=new Date(1e3*e.settings.install_time);e.install_time=s.getDate()+"/"+(s.getMonth()+1)+"/"+s.getFullYear(),a.view("app/app_info",e)})}),a.get("#/apps/install/custom",function(a){a.redirect("#/apps/install")}),a.helper("appInstallForm",function(a,e,s){data={id:a,manifest:e},"undefined"!=typeof data.manifest.arguments.install&&$.each(data.manifest.arguments.install,function(a,e){data.manifest.arguments.install[a].type="undefined"!=typeof e.type?e.type:"string",data.manifest.arguments.install[a].inputType="text",data.manifest.arguments.install[a].required="undefined"!=typeof e.optional&&"true"==e.optional?"":"required","undefined"!=typeof data.manifest.arguments.install[a].choices&&$.each(data.manifest.arguments.install[a].choices,function(e,s){data.manifest.arguments.install[a].choices[e]={value:s,label:s,selected:s==data.manifest.arguments.install[a]["default"]?!0:!1}}),("domain"==e.name||"domain"==data.manifest.arguments.install[a].type)&&(data.manifest.arguments.install[a].choices=[],$.each(s.domains,function(e,s){data.manifest.arguments.install[a].choices.push({value:s,label:s,selected:!1})}),data.manifest.arguments.install[a].help=""+y18n.t("manage_domains")+" "),("admin"==e.name||"user"==data.manifest.arguments.install[a].type)&&(data.manifest.arguments.install[a].choices=[],$.each(s.users,function(e,s){data.manifest.arguments.install[a].choices.push({value:e,label:s.fullname+" ("+s.mail+")",selected:!1})}),data.manifest.arguments.install[a].help=""+y18n.t("manage_users")+" "),"app"==data.manifest.arguments.install[a].type&&(data.manifest.arguments.install[a].choices=[],$.each(s.apps,function(e,s){data.manifest.arguments.install[a].choices.push({value:s.id,label:s.name,selected:!1})}),data.manifest.arguments.install[a].help=""+y18n.t("manage_apps")+" "),("password"==e.name||"password"==data.manifest.arguments.install[a].type)&&(data.manifest.arguments.install[a].inputType="password"),data.manifest.arguments.install[a].label="undefined"!=typeof data.manifest.arguments.install[a].ask[y18n.locale]?data.manifest.arguments.install[a].ask[y18n.locale]:data.manifest.arguments.install[a].ask.en}),data.description="undefined"!=typeof data.manifest.description[y18n.locale]?data.manifest.description[y18n.locale]:data.manifest.description.en,data.manifest.multi_instance="true"==data.manifest.multi_instance?y18n.t("yes"):y18n.t("no"),c.view("app/app_install",data)}),a.get("#/apps/install/:app",function(a){a.api("/apps?raw",function(e){a.appInstallForm(a.params.app,e[a.params.app].manifest,a.params)})}),a.post("#/apps",function(a){"/"!==a.params.path||confirm(y18n.t("confirm_install_domain_root",[a.params.domain]))?(params={label:a.params.label,app:a.params.app},delete a.params.label,delete a.params.app,params.args=a.serialize(a.params.toHash()),""===params.args&&delete params.args,a.api("/apps",function(){a.redirect("#/apps")},"POST",params)):(a.flash("warning",y18n.t("app_install_cancel")),s.clear("slide"),a.redirect("#/apps/install"))}),a.post("#/apps/install/custom",function(a){params={label:a.params.label,app:a.params.url},delete a.params.label,delete a.params.url,a.confirm(y18n.t("applications"),y18n.t("confirm_install_custom_app"),function(){params.app=params.app.replace(/\/?$/,"/"),jQuery.ajax({url:params.app.replace("github.com","raw.githubusercontent.com")+"master/manifest.json",type:"GET"}).done(function(e){e=jQuery.parseJSON(e)||{},a.appInstallForm(params.app,e,a.params)}).fail(function(e){a.flash("fail",y18n.t("app_install_custom_no_manifest")),s.clear("slide"),a.redirect("#/apps/install")})},function(){a.flash("warning",y18n.t("app_install_cancel")),s.clear("slide"),a.redirect("#/apps/install")})}),a.get("#/apps/:app/uninstall",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_uninstall",[a.params.app]),function(){a.api("/apps/"+a.params.app,function(){a.redirect("#/apps")},"DELETE")},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app)})}),a.get("#/apps/:app/access",function(a){a.api("/apps/"+a.params.app+"?raw",function(e){a.api("/users",function(s){"undefined"!=typeof e.settings.allowed_users?0===e.settings.allowed_users.length?e.settings.allowed_users=[]:e.settings.allowed_users=e.settings.allowed_users.split(","):(e.settings.allowed_users=[],e.settings.allow_everyone=!0),e.users=[],$.each(s.users,function(a,s){-1===e.settings.allowed_users.indexOf(a)?e.users.push({value:a,label:s.fullname+" ("+s.mail+")"}):e.settings.allowed_users[e.settings.allowed_users.indexOf(a)]={username:a,fullname:s.fullname,mail:s.mail}}),a.view("app/app_access",e)})})}),a.get("#/apps/:app/access/remove",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_remove_all",[a.params.app]),function(){params={apps:a.params.app,users:[]},a.api("/access?"+a.serialize(params),function(e){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"DELETE",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.get("#/apps/:app/access/remove/:user",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_remove_user",[a.params.app,a.params.user]),function(){params={apps:a.params.app,users:a.params.user},a.api("/access?"+a.serialize(params),function(e){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"DELETE",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.get("#/apps/:app/access/add",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_add",[a.params.app]),function(){params={apps:a.params.app,users:null},a.api("/access",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"PUT",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.post("#/apps/:app/access/add",function(a){params={users:a.params.user,apps:a.params.app},a.api("/access",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"PUT",params)}),a.get("#/apps/:app/access/clear",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_clear",[a.params.app]),function(){params={apps:a.params.app},a.api("/access",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"POST",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.get("#/apps/:app/default",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_app_default"),function(){a.api("/apps/"+a.params.app+"/default",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app)},"PUT")},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app)})}),a.get("#/services",function(a){a.api("/services",function(e){data2={services:[]},$.each(e,function(a,e){e.name=a,e.is_loaded="enabled"==e.loaded?!0:!1,e.is_running="running"==e.status?!0:!1,data2.services.push(e)}),a.view("service/service_list",data2)})}),a.get("#/services/:service",function(a){a.api("/services/"+a.params.service,function(e){data2={service:e},data2.service.name=a.params.service,data2.service.is_loaded="enabled"==e.loaded?!0:!1,data2.service.is_running="running"==e.status?!0:!1,s.clear("slide"),a.view("service/service_info",data2)},"GET")}),a.get("#/services/:service/log",function(a){params={number:50},a.api("/services/"+a.params.service+"/log",function(e){data2={logs:[],name:a.params.service},$.each(e,function(a,e){data2.logs.push({filename:a,filecontent:e.join("\n")})}),a.view("service/service_log",data2)},"GET",params)}),a.get("#/services/:service/:action",function(a){a.confirm("Service",y18n.t("confirm_service_action",[y18n.t(a.params.action),a.params.service]),function(){var e=null,n=a.params.service;switch(a.params.action){case"start":e="PUT";break;case"stop":e="DELETE";break;case"enable":e="PUT",n+="/enable";break;case"disable":e="DELETE",n+="/enable";break;default:a.flash("fail",y18n.t("unknown_action",[a.params.action])),s.clear("slide"),a.redirect("#/services/"+a.params.service)}e&&n?a.api("/services/"+n,function(e){s.clear("slide"),a.redirect("#/services/"+a.params.service)},e):(s.clear("slide"),a.redirect("#/services/"+a.params.service))},function(){s.clear("slide"),a.redirect("#/services/"+a.params.service)})}),a.get("#/tools/firewall",function(a){a.api("/firewall?raw",function(e){var s={ports:{},upnp:!1};$.each(["ipv4","ipv6","uPnP"],function(a,n){$.each(["TCP","UDP"],function(a,t){s.ports[t]=s.ports[t]||{},$.each(e[n][t],function(a,e){s.ports[t][e]=s.ports[t][e]||{},s.ports[t][e][n]=!0})})}),s.upnp=e.uPnP.enabled,a.view("tools/tools_firewall",s)})}),a.get("#/tools/firewall/upnp/:action",function(a){a.confirm(y18n.t("firewall"),y18n.t("confirm_upnp_action",[y18n.t(a.params.action)]),function(){params={action:a.params.action},a.api("/firewall/upnp",function(e){s.clear("slide"),a.redirect("#/tools/firewall")},"GET",params)},function(){s.clear("slide"),a.redirect("#/tools/firewall")})}),a.helper("togglePort",function(a,e,n,t){var i=null,r=[],o=this;switch((a!=parseInt(a)||0>a||a>65535)&&(o.flash("fail",y18n.t("unknown_argument",[a])),s.clear("slide"),o.redirect("#/tools/firewall")),n){case"ipv4":r="ipv4_only";break;case"ipv6":r="ipv6_only"}switch(e){case"udp":e="UDP";break;case"both":e="Both";break;default:e="TCP"}switch(t){case"open":i="POST";break;case"close":i="DELETE";break;default:o.flash("fail",y18n.t("unknown_action",[t])),s.clear("slide"),o.redirect("#/tools/firewall")}if(null!==i&&null!==e&&null!==a){var l={port:a,protocol:e};o.api("/firewall/port?"+r,function(a){s.clear("slide"),o.redirect("#/tools/firewall")},i,l)}else s.clear("slide"),o.redirect("#/tools/firewall")}),a.get("#/tools/firewall/port/:port/:protocol/:connection/:action",function(a){a.confirm(y18n.t("firewall"),y18n.t("confirm_firewall",[y18n.t(a.params.action),a.params.port,y18n.t(a.params.protocol),y18n.t(a.params.connection)]),function(){a.togglePort(a.params.port,a.params.protocol,a.params.connection,a.params.action)},function(){s.clear("slide"),a.redirect("#/tools/firewall")})}),a.post("#/tools/firewall/port",function(a){a.confirm(y18n.t("firewall"),y18n.t("confirm_firewall",[y18n.t(a.params.action),a.params.port,y18n.t(a.params.protocol),y18n.t(a.params.connection)]),function(){a.togglePort(a.params.port,a.params.protocol,a.params.connection,a.params.action)},function(){s.clear("slide"),a.redirect("#/tools/firewall")})}),a.get("#/tools/monitor",function(a){monitorData={},a.api("/services/glances",function(e){monitorData.status=!0,"running"==e.status?a.api("/monitor/system",function(e){monitorData.system=e,a.api("/monitor/disk",function(e){monitorData.disk=e,a.api("/monitor/network",function(e){monitorData.network=e,delete monitorData.network.usage.lo,a.view("monitor/monitor",monitorData)})})}):(monitorData.status=!1,a.view("tools/tools_monitor",monitorData))},"GET")}),a.get("#/tools",function(a){a.view("tools/tools_list")}),a.get("#/tools/adminpw",function(a){a.view("tools/tools_adminpw")}),a.put("#/tools/adminpw",function(a){params={},$.each(a.params.toHash(),function(a,e){""!==e&&(params[a]=e)}),$.isEmptyObject(params)?(a.flash("fail",y18n.t("error_modify_something")),s.clear("slide"),a.redirect("#/tools/adminpw")):params.new_password!==params.confirm_new_password?(a.flash("fail",y18n.t("passwords_dont_match")),s.clear("slide"),a.redirect("#/tools/adminpw")):a.api("/login",function(e){delete params.old_password,delete params.confirm_new_password,a.api("/adminpw",function(e){a.redirect("#/logout")},"PUT",params)},"POST",{password:params.old_password},!1)}),a.get("#/update",function(a){a.api("/update",function(e){packagesLength=e.packages.length;for(var s=0;s "),-1!=["moulinette","moulinette-yunohost","yunohost-admin","yunohost-config-nginx","ssowat","python"].indexOf(e.packages[s].name)&&(a.flash("warning",y18n.t("system_delayed_upgrade_warning",[e.packages[s].name])),e.packages[s].delayed=!0);a.view("update/update",e)},"PUT")}),a.get("#/upgrade/:type",function(a){"apps"!==a.params.type&&"packages"!==a.params.type?(a.flash("fail",y18n.t("unknown_argument",[a.params.type])),s.clear("slide"),a.redirect("#/update")):a.confirm(y18n.t("tools"),y18n.t("confirm_update_type",[y18n.t("system_"+a.params.type).toLowerCase()]),function(){endurl="","packages"==a.params.type?endurl="ignore_apps":"apps"==a.params.type&&(endurl="ignore_packages"),a.api("/upgrade?"+endurl,function(e){e.logs=e.log,a.view("upgrade/upgrade",e)},"PUT")},function(){s.clear("slide"),a.redirect("#/update")})}),a.get("#/tools/ca",function(a){a.view("tools/tools_ca")}),a.get("#/tools/security-feed",function(a){data={items:[]};var e="https://forum.yunohost.org",s="https://forum.yunohost.org/c/security",n="https://yunohost.org/security.rss";data.url={web:s,rss:n},$.ajax({url:n,dataType:"xml"}).done(function(s){$("item",s).each(function(a,s){var n=$("link",s)[0].innerHTML;"string"==typeof n&&""!==n&&"/"==n.charAt(0)&&(n=e+n);var t=$("description",s)[0].textContent;t=t.replace('href="/','href="'+e+"/");var i={guid:$("guid",s)[0].innerHTML,title:$("title",s)[0].innerHTML,url:n,desc:t,date:$("pubDate",s)[0].innerHTML.split(" +")[0]};data.items.push(i)}),a.view("tools/tools_security_feed",data)}).fail(function(){a.flash("fail",y18n.t("error_retrieve_feed",[n]))})});a.get("#/backup",function(a){var e=[],s={id:"local",name:y18n.t("local_archives"),uri:"/home/yunohost.backup/"};e.push(s),a.view("backup/backup",{storages:e})}),a.get("#/storages/create",function(a){a.view("backup/storage_create",{})}),a.post("#/storages",function(a){s.clear("slide"),a.redirect("#/storages")}),a.get("#/backup/:storage/create",function(a){var e=[];e.storage={id:a.params.storage,name:y18n.t("local_archives")},a.api("/hooks/backup",function(s){e.hooks=a.groupHooks(s.hooks),e.apps={},a.api("/apps?raw",function(s){$.each(s,function(a,s){s.installed&&(e.apps[a]={name:s.manifest.name})}),a.view("backup/backup_create",e)})})}),a.post("#/backup/:storage",function(a){var e=a.ungroupHooks(a.params.hooks,a.params.apps);a.api("/backup",function(){s.clear("slide"),a.redirect("#/backup/"+a.params.storage)},"POST",e)}),a.post("#/backup/:storage/:archive/restore",function(a){a.confirm(y18n.t("backup"),y18n.t("confirm_restore",[a.params.archive]),$.proxy(function(a){var e=a.ungroupHooks(a.params.hooks,a.params.apps);e.force="",a.api("/backup/restore/"+a.params.archive,function(e){s.clear("slide"),a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)},"POST",e)},this,a),function(){s.clear("slide"),a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)})}),a.get("#/backup/:storage/:archive/delete",function(a){a.confirm(y18n.t("backup"),y18n.t("confirm_delete",[a.params.archive]),function(){a.api("/backup/archives/"+a.params.archive,function(e){
+var app=Sammy("#main",function(a){a.use("Handlebars","ms"),Handlebars.registerHelper("ucwords",function(a){return(a+"").replace(/^([a-z\u00E0-\u00FC])|\s+([a-z\u00E0-\u00FC])/g,function(a){return a.toUpperCase()})}),Handlebars.registerHelper("humanSize",function(a){var e=["Bytes","KB","MB","GB","TB"];if(0===a)return"n/a";var s=parseInt(Math.floor(Math.log(a)/Math.log(1024)));return Math.round(a/Math.pow(1024,s),2)+" "+e[[s]]}),Handlebars.registerHelper("humanTime",function(a){return Math.round(a)+"s"}),Handlebars.registerHelper("bitRate",function(a,e){var s=["b","Kb","Mb","Gb","Tb"];if(0===e)return"n/a";var n=a/e*8,t=parseInt(Math.floor(Math.log(n)/Math.log(1024)));return Math.round(n/Math.pow(1024,t),2)+" "+s[[t]]+"/s"}),Handlebars.registerHelper("t",function(a){var e=y18n.t(a,Array.prototype.slice.call(arguments,1));return new Handlebars.SafeString(e)});var e;e=Sammy.Store.isAvailable("session")?"session":Sammy.Store.isAvailable("cookie")?"cookie":"memory";var s=new Sammy.Store({name:"storage",type:e}),n=!1,t=3;a.helpers({serialize:function(a){var e=[];for(var s in a)a.hasOwnProperty(s)&&e.push(encodeURIComponent(s)+"="+encodeURIComponent(a[s]));return e.join("&")},flash:function(a,e){s.get("flash")||s.set("flash",!0),alertClass="fail"==a?"alert-danger":"alert-"+a,$("#flash .alert").last().hasClass(alertClass)?$("#flash .alert").last().append("log"==a?''+e+"
":""+e+"
"):("log"==a?$("#flash").append('× '+y18n.t("log")+' '+e+"
").show():$("#flash").append('").show(),$("#flash .alert").last().fadeIn()),document.body.scrollTop=document.documentElement.scrollTop=0,$('#flash [data-show="log"]').on("click",function(){$(this).hide().nextAll("p").fadeIn()})},checkInstall:function(a){domain=window.location.hostname,$.ajax({dataType:"json",url:"https://"+domain+"/yunohost/api/installed",timeout:3e3}).success(function(e){a(e.installed)}).fail(function(){a(void 0)})},api:function(a,e,t,i,r){c=this,call=function(a,e,t,i){t="undefined"!=typeof t?t:"GET",i="undefined"!=typeof i?i:{},window.navigator&&window.navigator.language&&"undefined"==typeof i.locale&&(i.locale=y18n.locale||window.navigator.language.substr(0,2));var r=i;if("/postinstall"===a){var o=!1;setInterval(function(){o=!0},1500)}n=!1,0===$("div.loader").length&&setInterval(function(){n||0!==$("div.loader").length||$("#main").append('
')},500),jQuery.ajax({url:"https://"+s.get("url")+a,type:t,crossdomain:!0,data:i,traditional:!0,dataType:"json"}).always(function(a,e,s){}).done(function(a){a=a||{},e(a)}).fail(function(n){200==n.status?e({}):401==n.status?"/login"===a?c.flash("fail",y18n.t("wrong_password")):(c.flash("fail",y18n.t("unauthorized")),c.redirect("#/login")):"undefined"!=typeof n.responseJSON?c.flash("fail",n.responseJSON.error):"undefined"!=typeof n.responseText&&"/postinstall"!==a?c.flash("fail",n.responseText):"/postinstall"===a?o?(interval=window.location.hostname===r.domain?2e4:5e3,checkInstall=setInterval(function(){c.checkInstall(function(a){(a||"undefined"==typeof a)&&(c.flash("success",y18n.t("installation_complete")),clearInterval(checkInstall),window.location.href="https://"+window.location.hostname+"/yunohost/admin/")})},interval)):c.flash("fail",y18n.t("error_occured")):c.flash("fail",y18n.t("error_server")),"/postinstall"!==a&&(s.clear("slide"),c.redirect(s.get("path-1")))})},r="undefined"!=typeof r?r:!0,r?(ws=new WebSocket("wss://"+s.get("url")+"/messages"),ws.onmessage=function(a){$.each($.parseJSON(a.data),function(a,e){c.flash(a,e)})},ws.onerror=ws.onopen,ws.onclose=function(){s.clear("flash")},ws.onopen=call(a,e,t,i)):call(a,e,t,i)},view:function(a,e,t){if(t="undefined"!=typeof t?t:function(){},rendered=this.render("views/"+a+".ms",e),enableSlide=!0,n=!0,$("div.loader").remove(),$("#modal").modal("hide"),enableSlide){var i=function(){rendered.swap(function(){$(".slide, .btn-breadcrumb a:not(:last-child)").on("click",function(){$(this).addClass("active"),$(this).hasClass("back")||$(this).parent(".btn-breadcrumb").length?s.set("slide","back"):s.set("slide","to")}),t(),$("html, body").scrollTop(0)})};blockSize=$("#slider").width(),"back"==s.get("slide")?(s.clear("slide"),$("#slideBack").css("display","none"),$("#slider-container").removeClass("move").css("margin-left","-"+blockSize+"px"),$("#slideTo").show().html($("#main").html()),i(),$("#slider-container").addClass("move").css("margin-left","0px")):"to"==s.get("slide")?(s.clear("slide"),$("#slideTo").css("display","none"),$("#slider-container").removeClass("move").css("margin-left","-"+blockSize+"px"),$("#slider-container").removeClass("move").css("margin-left","0px"),$("#slideBack").show().html($("#main").html()),i(),$("#slider-container").addClass("move").css("margin-left","-"+blockSize+"px")):i()}else rendered.swap(function(){t(),$("html, body").scrollTop(0)})},confirm:function(a,e,s,n){return s="undefined"!=typeof s?s:function(){},n="undefined"!=typeof n?n:function(){},box=$("#modal"),"string"==typeof a&&a.length?$(".title",box).html(a):box.addClass("no-title"),$(".content",box).html(e),$("footer button",box).click(function(a){a.preventDefault(),$("#modal footer button").unbind("click"),box.removeClass("no-title").modal("hide"),"confirm"==$(this).data("action")?s():n()}),box.modal("show")},arraySortById:function(a){a.sort(function(a,e){return a.id>e.id?1:a.id'+y18n.t("read_more")+")";a.flash("warning",l),s.push(o.guid)}}),$.cookie("ynhSecurityViewedItems",s,{expire:7})}).fail(function(){a.flash("fail",y18n.t("error_retrieve_feed",[s]))}),a.view("home")})}),a.get("#/login",function(a){$("#masthead").show(),$(".logout-button").hide(),s.set("path-1","#/login"),0===$("div.loader").length&&setInterval(function(){n||0!==$("div.loader").length||$("#main").append('
')},500),a.checkInstall(function(e){e?(domain=window.location.hostname,$("div.loader").remove(),a.view("login",{domain:domain})):"undefined"==typeof e?t>0?(t--,n=!1,setTimeout(function(){a.redirect("#/")},5e3)):(t=3,$(document).ajaxError(function(e,s,n){200!==s.status&&a.flash("fail",y18n.t("api_not_responding",[s.status+" "+s.statusText])),$(document).off("ajaxError")}),n=!0,$("div.loader").remove()):($("div.loader").remove(),a.redirect("#/postinstall"))})}),a.post("#/login",function(a){s.set("url",a.params.domain+"/yunohost/api"),params={password:a.params.password},a.api("/login",function(e){s.set("connected",!0),$(".logout-button").fadeIn(),a.flash("success",y18n.t("logged_in")),a.redirect(s.get("path")?s.get("path"):"#/")},"POST",params,!1)}),a.get("#/logout",function(a){a.api("/logout",function(e){s.clear("url"),s.clear("connected"),s.set("path","#/"),a.flash("success",y18n.t("logged_out")),a.redirect("#/login")},"GET",{},!1)}),a.get("#/postinstall",function(a){$("#masthead").hide(),a.checkInstall(function(e){e||"undefined"==typeof e?a.redirect("#/login"):a.view("postinstall/postinstall_1")})}),a.get("#/postinstall/domain",function(a){$("#masthead").hide(),$.get("https://dyndns.yunohost.org/domains",function(){}).done(function(e){a.params.ddomains=e.map(function(a){return"."+a})}).fail(function(){a.params.ddomains=[".nohost.me",".noho.st"]}).always(function(){a.view("postinstall/postinstall_2",a.params,function(){$("#domain, #ddomain").keyup(function(a){13==a.keyCode&&$("a.savedomain").click()}),$("a.savedomain").on("click",function(e){""===$("#domain").val()?""===$("#ddomain").val()?(e.preventDefault(),s.clear("slide"),a.flash("fail",y18n.t("error_select_domain"))):domain=$("#ddomain").val()+$('select[name="ddomain-ext"]').val():domain=$("#domain").val(),s.set("maindomain",domain)})})})}),a.get("#/postinstall/password",function(a){$("#masthead").hide(),$("#flash .alert").remove(),s.get("maindomain")?a.view("postinstall/postinstall_3",{domain:s.get("maindomain").toLowerCase()}):(s.clear("slide"),a.redirect("#/postinstall/domain"))}),a.post("#/postinstall",function(a){""===a.params.password||""===a.params.confirmation?a.flash("fail",y18n.t("password_empty")):a.params.password==a.params.confirmation?(""===a.params.domain?(a.flash("fail",y18n.t("error_select_domain")),s.clear("slide"),a.redirect("#/postinstall/domain")):params={domain:a.params.domain.toLowerCase()},a.confirm(y18n.t("postinstall"),y18n.t("confirm_postinstall",[a.params.domain]),function(){params.password=a.params.password,s.set("url",window.location.hostname+"/yunohost/api"),s.set("user","admin"),a.api("/postinstall",function(e){a.redirect("#/login")},"POST",params)},function(){})):a.flash("fail",y18n.t("passwords_dont_match"))}),a.get("#/users",function(a){a.api("/users",function(e){a.view("user/user_list",e)})}),a.get("#/users/create",function(a){a.api("/domains",function(e){a.view("user/user_create",e)})}),a.post("#/users",function(a){a.params.password==a.params.confirmation?a.params.password.length<4?(a.flash("fail",y18n.t("password_too_short")),s.clear("slide")):(a.params.mail=a.params.email+a.params.domain,a.api("/users",function(e){a.redirect("#/users")},"POST",a.params.toHash())):(a.flash("fail",y18n.t("passwords_dont_match")),s.clear("slide"))}),a.get("#/users/:user",function(a){a.api("/users/"+a.params.user,function(e){a.view("user/user_info",e)})}),a.get("#/users/:user/edit",function(a){a.api("/users/"+a.params.user,function(e){a.api("/domains",function(s){email=e.mail.split("@"),e.email={username:email[0],domain:email[1]},e.domains=[],$.each(s.domains,function(a,s){e.domains.push({domain:s,selected:s==e.email.domain?!0:!1})}),a.view("user/user_edit",e)})})}),a.put("#/users/:user",function(a){a.api("/users/"+a.params.user,function(e){a.params.mail=a.params.mail!==a.params.email+a.params.domain?a.params.email+a.params.domain:"",a.params.email=a.params.domain="","string"==typeof a.params.mailalias&&(a.params.mailalias=[a.params.mailalias]),"string"==typeof a.params.mailforward&&(a.params.mailforward=[a.params.mailforward]),a.params.add_mailalias=a.arrayDiff(a.params.mailalias,e["mail-aliases"]),a.params.remove_mailalias=a.arrayDiff(e["mail-aliases"],a.params.mailalias),a.params.add_mailforward=a.arrayDiff(a.params.mailforward,e["mail-forward"]),a.params.remove_mailforward=a.arrayDiff(e["mail-forward"],a.params.mailforward),a.params.mailalias=a.params.mailforward="",params={},$.each(a.params.toHash(),function(a,e){e.length>0&&"user"!==a&&(params[a]=e)}),$.isEmptyObject(params)?(a.flash("fail",y18n.t("error_modify_something")),s.clear("slide"),a.redirect("#/users/"+a.params.user+"/edit")):params.password?params.password==params.confirmation?params.password.length<4?(a.flash("fail",y18n.t("password_too_short")),s.clear("slide"),a.redirect("#/users/"+a.params.user+"/edit")):(params.change_password=params.password,a.api("/users/"+a.params.user,function(e){a.redirect("#/users/"+a.params.user)},"PUT",params)):(a.flash("fail",y18n.t("passwords_dont_match")),s.clear("slide"),a.redirect("#/users/"+a.params.user+"/edit")):a.api("/users/"+a.params.user,function(e){a.redirect("#/users/"+a.params.user)},"PUT",params)},"GET")}),a.get("#/users/:user/delete",function(a){a.confirm(y18n.t("users"),y18n.t("confirm_delete",[a.params.user]),function(){a.api("/users/"+a.params.user,function(e){a.redirect("#/users")},"DELETE")},function(){s.clear("slide"),a.redirect("#/users/"+a.params.user)})}),a.get("#/domains",function(a){a.api("/domains",function(e){a.api("/domains/main",function(s){domains=[],$.each(e.domains,function(a,e){domains.push({url:e,main:e==s.current_main_domain?!0:!1})}),main_domain_form=domains.length>1?!0:!1,domains.sort(function(a,e){return-2*a.main+1}),a.view("domain/domain_list",{domains:domains,main_domain_form:main_domain_form})},"PUT")})}),a.get("#/domains/add",function(a){$.get("https://dyndns.yunohost.org/domains",function(){}).done(function(e){a.params.ddomains=e.map(function(a){return"."+a})}).fail(function(){a.params.ddomains=[".nohost.me",".noho.st"]}).always(function(){data={ddomains:a.params.ddomains,domains:a.params.domains,allowDyndnsDomain:!0};var e=data.ddomains.join("|");$.each(data.domains,function(a,s){s.search(e)>0&&(data.allowDyndnsDomain=!1)}),a.view("domain/domain_add",data)})}),a.post("#/domains/add",function(a){""===a.params.domain?(""===a.params.ddomain&&(a.flash("fail",y18n.t("error_select_domain")),s.clear("slide"),a.redirect("#/domains/add")),params={domain:a.params.ddomain+a.params["ddomain-ext"]},endurl="dyndns"):(params={domain:a.params.domain},endurl=""),a.api("/domains?"+endurl,function(e){a.redirect("#/domains")},"POST",params)}),a.get("#/domains/:domain/delete",function(a){a.confirm(y18n.t("domains"),y18n.t("confirm_delete",[a.params.domain]),function(){a.api("/domains/"+a.params.domain,function(e){s.clear("slide"),a.redirect("#/domains")},"DELETE")},function(){s.clear("slide"),a.redirect("#/domains")})}),a.post("#/domains",function(a){""===a.params.domain?(a.flash("fail",y18n.t("error_select_domain")),s.clear("slide"),a.redirect("#/domains")):a.confirm(y18n.t("domains"),y18n.t("confirm_change_maindomain"),function(){params={new_domain:a.params.domain},a.api("/domains/main",function(e){s.clear("slide"),a.redirect("#/domains")},"PUT",params),refreshDomain=window.setTimeout(function(){s.clear("slide"),a.redirect("#/domains")},15e3)},function(){s.clear("slide"),a.redirect("#/domains")})}),a.get("#/apps",function(a){a.api("/apps",function(e){data2={apps:[],installed_apps:!0},$.each(e.apps,function(a,e){e.installed&&data2.apps.push(e)}),a.arraySortById(data2.apps),a.view("app/app_list",data2)})}),a.get("#/apps/install",function(a){a.api("/apps",function(e){a.api("/apps?raw",function(s){data2={apps:[],installed_apps:!1},$.each(e.apps,function(a,e){e.installed&&"true"!=s[e.id].manifest.multi_instance||e.id.match(/__[0-9]{1,5}$/)||(e.install_link=!0,data2.apps.push(e))}),a.arraySortById(data2.apps),a.view("app/app_list",data2)})})}),a.get("#/apps/refresh",function(a){a.api("/appslists",function(e){a.redirect("#/apps/install")},"PUT")}),a.get("#/apps/:app",function(a){a.api("/apps/"+a.params.app+"?raw",function(e){e.settings.allowed_users=e.settings.allowed_users?e.settings.allowed_users.replace(",",", ")+".":y18n.t("everyone_has_access"),e.description="undefined"!=typeof e.manifest.description[y18n.locale]?e.manifest.description[y18n.locale]:e.manifest.description.en,e.manifest.multi_instance=y18n.t("true"==e.manifest.multi_instance?"yes":"no");var s=new Date(1e3*e.settings.install_time);e.install_time=s.getDate()+"/"+(s.getMonth()+1)+"/"+s.getFullYear(),a.view("app/app_info",e)})}),a.get("#/apps/install/custom",function(a){a.redirect("#/apps/install")}),a.helper("appInstallForm",function(a,e,s){data={id:a,manifest:e},"undefined"!=typeof data.manifest.arguments.install&&$.each(data.manifest.arguments.install,function(a,e){data.manifest.arguments.install[a].type="undefined"!=typeof e.type?e.type:"string",data.manifest.arguments.install[a].inputType="text",data.manifest.arguments.install[a].required="undefined"!=typeof e.optional&&"true"==e.optional?"":"required","undefined"!=typeof data.manifest.arguments.install[a].choices&&$.each(data.manifest.arguments.install[a].choices,function(e,s){data.manifest.arguments.install[a].choices[e]={value:s,label:s,selected:s==data.manifest.arguments.install[a]["default"]?!0:!1}}),("domain"==e.name||"domain"==data.manifest.arguments.install[a].type)&&(data.manifest.arguments.install[a].choices=[],$.each(s.domains,function(e,s){data.manifest.arguments.install[a].choices.push({value:s,label:s,selected:!1})}),data.manifest.arguments.install[a].help=""+y18n.t("manage_domains")+" "),("admin"==e.name||"user"==data.manifest.arguments.install[a].type)&&(data.manifest.arguments.install[a].choices=[],$.each(s.users,function(e,s){data.manifest.arguments.install[a].choices.push({value:e,label:s.fullname+" ("+s.mail+")",selected:!1})}),data.manifest.arguments.install[a].help=""+y18n.t("manage_users")+" "),"app"==data.manifest.arguments.install[a].type&&(data.manifest.arguments.install[a].choices=[],$.each(s.apps,function(e,s){data.manifest.arguments.install[a].choices.push({value:s.id,label:s.name,selected:!1})}),data.manifest.arguments.install[a].help=""+y18n.t("manage_apps")+" "),("password"==e.name||"password"==data.manifest.arguments.install[a].type)&&(data.manifest.arguments.install[a].inputType="password"),data.manifest.arguments.install[a].label="undefined"!=typeof data.manifest.arguments.install[a].ask[y18n.locale]?data.manifest.arguments.install[a].ask[y18n.locale]:data.manifest.arguments.install[a].ask.en}),data.description="undefined"!=typeof data.manifest.description[y18n.locale]?data.manifest.description[y18n.locale]:data.manifest.description.en,data.manifest.multi_instance=y18n.t("true"==data.manifest.multi_instance?"yes":"no"),c.view("app/app_install",data)}),a.get("#/apps/install/:app",function(a){a.api("/apps?raw",function(e){a.appInstallForm(a.params.app,e[a.params.app].manifest,a.params)})}),a.post("#/apps",function(a){"/"!==a.params.path||confirm(y18n.t("confirm_install_domain_root",[a.params.domain]))?(params={label:a.params.label,app:a.params.app},delete a.params.label,delete a.params.app,params.args=a.serialize(a.params.toHash()),""===params.args&&delete params.args,a.api("/apps",function(){a.redirect("#/apps")},"POST",params)):(a.flash("warning",y18n.t("app_install_cancel")),s.clear("slide"),a.redirect("#/apps/install"))}),a.post("#/apps/install/custom",function(a){params={label:a.params.label,app:a.params.url},delete a.params.label,delete a.params.url,a.confirm(y18n.t("applications"),y18n.t("confirm_install_custom_app"),function(){params.app=params.app.replace(/\/?$/,"/"),jQuery.ajax({url:params.app.replace("github.com","raw.githubusercontent.com")+"master/manifest.json",type:"GET"}).done(function(e){e=jQuery.parseJSON(e)||{},a.appInstallForm(params.app,e,a.params)}).fail(function(e){a.flash("fail",y18n.t("app_install_custom_no_manifest")),s.clear("slide"),a.redirect("#/apps/install")})},function(){a.flash("warning",y18n.t("app_install_cancel")),s.clear("slide"),a.redirect("#/apps/install")})}),a.get("#/apps/:app/uninstall",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_uninstall",[a.params.app]),function(){a.api("/apps/"+a.params.app,function(){a.redirect("#/apps")},"DELETE")},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app)})}),a.get("#/apps/:app/access",function(a){a.api("/apps/"+a.params.app+"?raw",function(e){a.api("/users",function(s){"undefined"!=typeof e.settings.allowed_users?e.settings.allowed_users=0===e.settings.allowed_users.length?[]:e.settings.allowed_users.split(","):(e.settings.allowed_users=[],e.settings.allow_everyone=!0),e.users=[],$.each(s.users,function(a,s){-1===e.settings.allowed_users.indexOf(a)?e.users.push({value:a,label:s.fullname+" ("+s.mail+")"}):e.settings.allowed_users[e.settings.allowed_users.indexOf(a)]={username:a,fullname:s.fullname,mail:s.mail}}),a.view("app/app_access",e)})})}),a.get("#/apps/:app/access/remove",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_remove_all",[a.params.app]),function(){params={apps:a.params.app,users:[]},a.api("/access?"+a.serialize(params),function(e){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"DELETE",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.get("#/apps/:app/access/remove/:user",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_remove_user",[a.params.app,a.params.user]),function(){params={apps:a.params.app,users:a.params.user},a.api("/access?"+a.serialize(params),function(e){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"DELETE",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.get("#/apps/:app/access/add",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_add",[a.params.app]),function(){params={apps:a.params.app,users:null},a.api("/access",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"PUT",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.post("#/apps/:app/access/add",function(a){params={users:a.params.user,apps:a.params.app},a.api("/access",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"PUT",params)}),a.get("#/apps/:app/access/clear",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_access_clear",[a.params.app]),function(){params={apps:a.params.app},a.api("/access",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")},"POST",params)},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app+"/access")})}),a.get("#/apps/:app/default",function(a){a.confirm(y18n.t("applications"),y18n.t("confirm_app_default"),function(){a.api("/apps/"+a.params.app+"/default",function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app)},"PUT")},function(){s.clear("slide"),a.redirect("#/apps/"+a.params.app)})}),a.get("#/services",function(a){a.api("/services",function(e){data2={services:[]},$.each(e,function(a,e){e.name=a,e.is_loaded="enabled"==e.loaded?!0:!1,e.is_running="running"==e.status?!0:!1,e.status=y18n.t(e.status),e.loaded=y18n.t(e.loaded),data2.services.push(e)}),a.view("service/service_list",data2)})}),a.get("#/services/:service",function(a){a.api("/services/"+a.params.service,function(e){data2={service:e},data2.service.name=a.params.service,data2.service.is_loaded="enabled"==e.loaded?!0:!1,data2.service.is_running="running"==e.status?!0:!1,data2.service.status=y18n.t(e.status),data2.service.loaded=y18n.t(e.loaded),s.clear("slide"),a.view("service/service_info",data2)},"GET")}),a.get("#/services/:service/log",function(a){params={number:50},a.api("/services/"+a.params.service+"/log",function(e){data2={logs:[],name:a.params.service},$.each(e,function(a,e){data2.logs.push({filename:a,filecontent:e.join("\n")})}),a.view("service/service_log",data2)},"GET",params)}),a.get("#/services/:service/:action",function(a){a.confirm("Service",y18n.t("confirm_service_action",[y18n.t(a.params.action),a.params.service]),function(){var e=null,n=a.params.service;switch(a.params.action){case"start":e="PUT";break;case"stop":e="DELETE";break;case"enable":e="PUT",n+="/enable";break;case"disable":e="DELETE",n+="/enable";break;default:a.flash("fail",y18n.t("unknown_action",[a.params.action])),s.clear("slide"),a.redirect("#/services/"+a.params.service)}e&&n?a.api("/services/"+n,function(e){s.clear("slide"),a.redirect("#/services/"+a.params.service)},e):(s.clear("slide"),a.redirect("#/services/"+a.params.service))},function(){s.clear("slide"),a.redirect("#/services/"+a.params.service)})}),a.get("#/tools/firewall",function(a){a.api("/firewall?raw",function(e){var s={ports:{},upnp:!1};$.each(["ipv4","ipv6","uPnP"],function(a,n){$.each(["TCP","UDP"],function(a,t){s.ports[t]=s.ports[t]||{},$.each(e[n][t],function(a,e){s.ports[t][e]=s.ports[t][e]||{},s.ports[t][e][n]=!0})})}),s.upnp=e.uPnP.enabled,a.view("tools/tools_firewall",s)})}),a.get("#/tools/firewall/upnp/:action",function(a){a.confirm(y18n.t("firewall"),y18n.t("confirm_upnp_action",[y18n.t(a.params.action)]),function(){params={action:a.params.action},a.api("/firewall/upnp",function(e){s.clear("slide"),a.redirect("#/tools/firewall")},"GET",params)},function(){s.clear("slide"),a.redirect("#/tools/firewall")})}),a.helper("togglePort",function(a,e,n,t){var i=null,r=[],o=this;switch((a!=parseInt(a)||0>a||a>65535)&&(o.flash("fail",y18n.t("unknown_argument",[a])),s.clear("slide"),o.redirect("#/tools/firewall")),n){case"ipv4":r="ipv4_only";break;case"ipv6":r="ipv6_only"}switch(e){case"udp":e="UDP";break;case"both":e="Both";break;default:e="TCP"}switch(t){case"open":i="POST";break;case"close":i="DELETE";break;default:o.flash("fail",y18n.t("unknown_action",[t])),s.clear("slide"),o.redirect("#/tools/firewall")}if(null!==i&&null!==e&&null!==a){var l={port:a,protocol:e};o.api("/firewall/port?"+r,function(a){s.clear("slide"),o.redirect("#/tools/firewall")},i,l)}else s.clear("slide"),o.redirect("#/tools/firewall")}),a.get("#/tools/firewall/port/:port/:protocol/:connection/:action",function(a){a.confirm(y18n.t("firewall"),y18n.t("confirm_firewall",[y18n.t(a.params.action),a.params.port,y18n.t(a.params.protocol),y18n.t(a.params.connection)]),function(){a.togglePort(a.params.port,a.params.protocol,a.params.connection,a.params.action)},function(){s.clear("slide"),a.redirect("#/tools/firewall")})}),a.post("#/tools/firewall/port",function(a){a.confirm(y18n.t("firewall"),y18n.t("confirm_firewall",[y18n.t(a.params.action),a.params.port,y18n.t(a.params.protocol),y18n.t(a.params.connection)]),function(){a.togglePort(a.params.port,a.params.protocol,a.params.connection,a.params.action)},function(){s.clear("slide"),a.redirect("#/tools/firewall")})}),a.get("#/tools/monitor",function(a){monitorData={},a.api("/services/glances",function(e){monitorData.status=!0,"running"==e.status?a.api("/monitor/system",function(e){monitorData.system=e,a.api("/monitor/disk",function(e){monitorData.disk=e,a.api("/monitor/network",function(e){monitorData.network=e,delete monitorData.network.usage.lo,a.view("monitor/monitor",monitorData)})})}):(monitorData.status=!1,a.view("tools/tools_monitor",monitorData))},"GET")}),a.get("#/tools",function(a){a.view("tools/tools_list")}),a.get("#/tools/adminpw",function(a){a.view("tools/tools_adminpw")}),a.put("#/tools/adminpw",function(a){params={},$.each(a.params.toHash(),function(a,e){""!==e&&(params[a]=e)}),$.isEmptyObject(params)?(a.flash("fail",y18n.t("error_modify_something")),s.clear("slide"),a.redirect("#/tools/adminpw")):params.new_password!==params.confirm_new_password?(a.flash("fail",y18n.t("passwords_dont_match")),s.clear("slide"),a.redirect("#/tools/adminpw")):a.api("/login",function(e){delete params.old_password,delete params.confirm_new_password,a.api("/adminpw",function(e){a.redirect("#/logout")},"PUT",params)},"POST",{password:params.old_password},!1)}),a.get("#/update",function(a){a.api("/update",function(e){packagesLength=e.packages.length;for(var s=0;s "),-1!=["moulinette","moulinette-yunohost","yunohost-admin","yunohost-config-nginx","ssowat","python"].indexOf(e.packages[s].name)&&(a.flash("warning",y18n.t("system_delayed_upgrade_warning",[e.packages[s].name])),e.packages[s].delayed=!0);a.view("update/update",e)},"PUT")}),a.get("#/upgrade/:type",function(a){"apps"!==a.params.type&&"packages"!==a.params.type?(a.flash("fail",y18n.t("unknown_argument",[a.params.type])),s.clear("slide"),a.redirect("#/update")):a.confirm(y18n.t("tools"),y18n.t("confirm_update_type",[y18n.t("system_"+a.params.type).toLowerCase()]),function(){endurl="","packages"==a.params.type?endurl="ignore_apps":"apps"==a.params.type&&(endurl="ignore_packages"),a.api("/upgrade?"+endurl,function(e){e.logs=e.log,a.view("upgrade/upgrade",e)},"PUT")},function(){s.clear("slide"),a.redirect("#/update")})}),a.get("#/tools/ca",function(a){a.view("tools/tools_ca")}),a.get("#/tools/security-feed",function(a){data={items:[]};var e="https://forum.yunohost.org",s="https://forum.yunohost.org/c/security",n="https://yunohost.org/security.rss";data.url={web:s,rss:n},$.ajax({url:n,dataType:"xml"}).done(function(s){$("item",s).each(function(a,s){var n=$("link",s)[0].innerHTML;"string"==typeof n&&""!==n&&"/"==n.charAt(0)&&(n=e+n);var t=$("description",s)[0].textContent;t=t.replace('href="/','href="'+e+"/");var i={guid:$("guid",s)[0].innerHTML,title:$("title",s)[0].innerHTML,url:n,desc:t,date:$("pubDate",s)[0].innerHTML.split(" +")[0]};data.items.push(i)}),a.view("tools/tools_security_feed",data)}).fail(function(){a.flash("fail",y18n.t("error_retrieve_feed",[n]))})});a.get("#/backup",function(a){var e=[],s={id:"local",name:y18n.t("local_archives"),uri:"/home/yunohost.backup/"};e.push(s),a.view("backup/backup",{storages:e})}),a.get("#/storages/create",function(a){a.view("backup/storage_create",{})}),a.post("#/storages",function(a){s.clear("slide"),a.redirect("#/storages")}),a.get("#/backup/:storage/create",function(a){var e=[];e.storage={id:a.params.storage,name:y18n.t("local_archives")},a.api("/hooks/backup",function(s){e.hooks=a.groupHooks(s.hooks),e.apps={},a.api("/apps?raw",function(s){$.each(s,function(a,s){s.installed&&(e.apps[a]={name:s.manifest.name})}),a.view("backup/backup_create",e)})})}),a.post("#/backup/:storage",function(a){var e=a.ungroupHooks(a.params.hooks,a.params.apps);a.api("/backup",function(){s.clear("slide"),a.redirect("#/backup/"+a.params.storage)},"POST",e)}),a.post("#/backup/:storage/:archive/restore",function(a){a.confirm(y18n.t("backup"),y18n.t("confirm_restore",[a.params.archive]),$.proxy(function(a){var e=a.ungroupHooks(a.params.hooks,a.params.apps);e.force="",a.api("/backup/restore/"+a.params.archive,function(e){s.clear("slide"),a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)},"POST",e)},this,a),function(){s.clear("slide"),a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)})}),a.get("#/backup/:storage/:archive/delete",function(a){a.confirm(y18n.t("backup"),y18n.t("confirm_delete",[a.params.archive]),function(){a.api("/backup/archives/"+a.params.archive,function(e){
a.redirect("#/backup/"+a.params.storage)},"DELETE")},function(){s.clear("slide"),a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)})}),a.get("#/backup/:storage/:archive/download",function(a){a.api("/backup/"+a.params.archive+"/download",function(e){a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)},"GET")}),a.get("#/backup/:storage/:archive/copy",function(a){s.clear("slide"),a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)}),a.get("#/backup/:storage/:archive/upload",function(a){s.clear("slide"),a.redirect("#/backup/"+a.params.storage+"/"+a.params.archive)}),a.get("#/backup/:storage/:archive",function(a){a.api("/backup/archives/"+a.params.archive+"?with_details",function(e){e.storage={id:a.params.storage,name:y18n.t("local_archives")},e.other_storages=[],e.name=a.params.archive,e.hooks=a.groupHooks(Object.keys(e.hooks)),e.items=e.hooks!={}||e.apps!=[],a.view("backup/backup_info",e)})}),a.get("#/backup/:storage",function(a){a.api("/backup/archives?with_info",function(e){e.storage={id:"local",name:y18n.t("local_archives")},e.archives2=[],$.each(e.archives,function(a,s){s.name=a,e.archives2.unshift(s)}),e.archives=e.archives2,a.view("backup/backup_list",e)})})});$.getJSON("locales/en.json",function(a){y18n.translations.en=a,y18n.translateInlineHTML()}),window.navigator&&window.navigator.language&&(y18n.locale=window.navigator.language.substr(0,2),"en"!==y18n.locale&&$.getJSON("locales/"+y18n.locale+".json",function(a){y18n.translations[y18n.locale]=a,y18n.translateInlineHTML()})),$(document).ready(function(){app.run("#/"),$("#slider-container").width(2*$("#slider").width()+"px"),$(window).resize(function(){$("#slideBack").css("display","none"),$("#slideTo").css("display","none"),$("#slider-container").width(2*$("#slider").width()+"px").removeClass("move").css("margin-left","0px")})});
\ No newline at end of file
diff --git a/src/js/app.js b/src/js/app.js
index 6e11ddd5..2cabaa19 100644
--- a/src/js/app.js
+++ b/src/js/app.js
@@ -1444,8 +1444,12 @@ var app = Sammy('#main', function (sam) {
data2 = { 'services': [] };
$.each(data, function(k, v) {
v.name = k;
+ // Handlebars want booleans
v.is_loaded = (v.loaded=='enabled') ? true : false;
v.is_running = (v.status=='running') ? true : false;
+ // Translate status and loaded state
+ v.status = y18n.t(v.status);
+ v.loaded = y18n.t(v.loaded);
data2.services.push(v);
});
c.view('service/service_list', data2);
@@ -1457,9 +1461,12 @@ var app = Sammy('#main', function (sam) {
c.api('/services/'+ c.params['service'], function(data) { // ?
data2 = { 'service': data };
data2.service.name = c.params['service'];
+ // Handlebars want booleans
data2.service.is_loaded = (data.loaded=='enabled') ? true : false;
data2.service.is_running = (data.status=='running') ? true : false;
-
+ // Translate status and loaded state
+ data2.service.status = y18n.t(data.status);
+ data2.service.loaded = y18n.t(data.loaded);
store.clear('slide');
c.view('service/service_info', data2);
}, 'GET');
diff --git a/src/locales/en.json b/src/locales/en.json
index bc574c5e..94b559b4 100644
--- a/src/locales/en.json
+++ b/src/locales/en.json
@@ -27,6 +27,8 @@
"status" : "Status",
"disable" : "Disable",
"enable" : "Enable",
+ "disabled" : "Disabled",
+ "enabled" : "Enabled",
"start" : "Start",
"stop" : "Stop",
"log" : "Log",
@@ -156,7 +158,7 @@
"count_min" : "%s min",
"process" : "Process",
"running" : "Running",
- "sleeping" : "Sleeping",
+ "inactive" : "Inactive",
"network" : "Network",
"public_ip" : "Public IP: ",
"local_ip" : "Local IP",
diff --git a/src/locales/fr.json b/src/locales/fr.json
index 7bf83a91..93c5b833 100644
--- a/src/locales/fr.json
+++ b/src/locales/fr.json
@@ -27,6 +27,8 @@
"status": "Statut",
"disable": "Désactiver",
"enable": "Activer",
+ "disabled": "Désactivé",
+ "enabled": "Activé",
"start": "Démarrer",
"stop": "Arrêter",
"log": "Journal",
@@ -147,8 +149,8 @@
"cpu_load": "Charge CPU",
"count_min": "%s min",
"process": "Process",
- "running": "Running",
- "sleeping": "Sleeping",
+ "running": "En cours d'execution",
+ "inactive": "Inactif",
"network": "Réseau",
"public_ip": "IP publique : ",
"local_ip": "IP locale",