thelounge/client/dist/build.js
2014-08-25 16:13:47 -07:00

10 lines
No EOL
286 KiB
JavaScript

(function(){var a=function(a){"use strict";a=a?a:{};var b={bgColor:"#d00",textColor:"#fff",fontFamily:"sans-serif",fontStyle:"bold",type:"circle",position:"down",animation:"slide",elementId:false};var c,d,e,f,g,h,i,j,k,l,m,n,o;o={};o.ff=/firefox/i.test(navigator.userAgent.toLowerCase());o.chrome=/chrome/i.test(navigator.userAgent.toLowerCase());o.opera=/opera/i.test(navigator.userAgent.toLowerCase());o.ie=/msie/i.test(navigator.userAgent.toLowerCase())||/trident/i.test(navigator.userAgent.toLowerCase());o.supported=o.chrome||o.ff||o.opera;var p=[];m=function(){};j=n=false;var q=function(){c=B(b,a);c.bgColor=A(c.bgColor);c.textColor=A(c.textColor);c.position=c.position.toLowerCase();c.animation=D.types[""+c.animation]?c.animation:b.animation;var j=c.position.indexOf("up")>-1;var k=c.position.indexOf("left")>-1;if(j||k){for(var l=0;l<D.types[""+c.animation].length;l++){var m=D.types[""+c.animation][l];if(j){if(m.y<.6){m.y=m.y-.4}else{m.y=m.y-2*m.y+(1-m.w)}}if(k){if(m.x<.6){m.x=m.x-.4}else{m.x=m.x-2*m.x+(1-m.h)}}D.types[""+c.animation][l]=m}}c.type=s[""+c.type]?c.type:b.type;try{d=z.getIcon();g=document.createElement("canvas");i=document.createElement("img");if(d.hasAttribute("href")){i.setAttribute("src",d.getAttribute("href"));i.onload=function(){e=i.height>0?i.height:32;f=i.width>0?i.width:32;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}else{i.setAttribute("src","");e=32;f=32;i.height=e;i.width=f;g.height=e;g.width=f;h=g.getContext("2d");r.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var r={};r.ready=function(){j=true;r.reset();m()};r.reset=function(){p=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);z.setIcon(g)};r.start=function(){if(!j||l){return}var a=function(){k=p[0];l=false;if(p.length>0){p.shift();r.start()}else{}};if(p.length>0){l=true;if(k){D.run(k.options,function(){D.run(p[0].options,function(){a()},false)},true)}else{D.run(p[0].options,function(){a()},false)}}};var s={};var t=function(a){a.n=typeof a.n==="number"?Math.abs(a.n|0):a.n;a.x=f*a.x;a.y=e*a.y;a.w=f*a.w;a.h=e*a.h;a.len=(""+a.n).length;return a};s.circle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font=c.fontStyle+" "+Math.floor(a.h*(a.n>99?.85:1))+"px "+c.fontFamily;h.textAlign="center";if(b){h.moveTo(a.x+a.w/2,a.y);h.lineTo(a.x+a.w-a.h/2,a.y);h.quadraticCurveTo(a.x+a.w,a.y,a.x+a.w,a.y+a.h/2);h.lineTo(a.x+a.w,a.y+a.h-a.h/2);h.quadraticCurveTo(a.x+a.w,a.y+a.h,a.x+a.w-a.h/2,a.y+a.h);h.lineTo(a.x+a.h/2,a.y+a.h);h.quadraticCurveTo(a.x,a.y+a.h,a.x,a.y+a.h-a.h/2);h.lineTo(a.x,a.y+a.h/2);h.quadraticCurveTo(a.x,a.y,a.x+a.h/2,a.y)}else{h.arc(a.x+a.w/2,a.y+a.h/2,a.h/2,0,2*Math.PI)}h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fill();h.closePath();h.beginPath();h.stroke();h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.n>999){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};s.rectangle=function(a){a=t(a);var b=false;if(a.len===2){a.x=a.x-a.w*.4;a.w=a.w*1.4;b=true}else if(a.len>=3){a.x=a.x-a.w*.65;a.w=a.w*1.65;b=true}h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);h.beginPath();h.font="bold "+Math.floor(a.h*(a.n>99?.9:1))+"px sans-serif";h.textAlign="center";h.fillStyle="rgba("+c.bgColor.r+","+c.bgColor.g+","+c.bgColor.b+","+a.o+")";h.fillRect(a.x,a.y,a.w,a.h);h.fillStyle="rgba("+c.textColor.r+","+c.textColor.g+","+c.textColor.b+","+a.o+")";if(typeof a.n==="number"&&a.len>3){h.fillText((a.n>9999?9:Math.floor(a.n/1e3))+"k+",Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.2))}else{h.fillText(a.n,Math.floor(a.x+a.w/2),Math.floor(a.y+a.h-a.h*.15))}h.closePath()};var u=function(a,b){m=function(){try{if(typeof a==="number"?a>0:a!==""){if(D.types[""+b]){c.animation=b}p.push({type:"badge",options:{n:a}});if(p.length>100){throw"Too many badges requests in queue."}r.start()}else{r.reset()}}catch(d){throw"Error setting badge. Message: "+d.message}};if(j){m()}};var v=function(a){m=function(){try{var b=a.width;var c=a.height;var d=document.createElement("img");var i=b/f<c/e?b/f:c/e;d.setAttribute("src",a.getAttribute("src"));d.height=c/i;d.width=b/i;h.clearRect(0,0,f,e);h.drawImage(d,0,0,f,e);z.setIcon(g)}catch(j){throw"Error setting image. Message: "+j.message}};if(j){m()}};var w=function(a){m=function(){try{if(a==="stop"){n=true;r.reset();n=false;return}a.addEventListener("play",function(){y(this)},false)}catch(b){throw"Error setting video. Message: "+b.message}};if(j){m()}};var x=function(a){if(!window.URL||!window.URL.createObjectURL){window.URL=window.URL||{};window.URL.createObjectURL=function(a){return a}}if(o.supported){var b=false;navigator.getUserMedia=navigator.getUserMedia||navigator.oGetUserMedia||navigator.msGetUserMedia||navigator.mozGetUserMedia||navigator.webkitGetUserMedia;m=function(){try{if(a==="stop"){n=true;r.reset();n=false;return}b=document.createElement("video");b.width=f;b.height=e;navigator.getUserMedia({video:true,audio:false},function(a){b.src=URL.createObjectURL(a);b.play();y(b)},function(){})}catch(c){throw"Error setting webcam. Message: "+c.message}};if(j){m()}}};function y(a){if(a.paused||a.ended||n){return false}try{h.clearRect(0,0,f,e);h.drawImage(a,0,0,f,e)}catch(b){}setTimeout(y,D.duration,a);z.setIcon(g)}var z={};z.getIcon=function(){var a=false;var b="";var d=function(){var a=document.getElementsByTagName("head")[0].getElementsByTagName("link");for(var b=a.length,c=b-1;c>=0;c--){if(/icon/i.test(a[c].getAttribute("rel"))){return a[c]}}return false};if(c.elementId){a=document.getElementById(c.elementId);a.setAttribute("href",a.getAttribute("src"))}else{a=d();if(a===false){a=document.createElement("link");a.setAttribute("rel","icon");document.getElementsByTagName("head")[0].appendChild(a)}}b=c.elementId?a.src:a.href;if(b.indexOf(document.location.hostname)===-1){throw new Error("Error setting favicon. Favicon image is on different domain (Icon: "+b+", Domain: "+document.location.hostname+")")}a.setAttribute("type","image/png");return a};z.setIcon=function(a){var b=a.toDataURL("image/png");if(c.elementId){document.getElementById(c.elementId).setAttribute("src",b)}else{if(o.ff||o.opera){var e=d;d=document.createElement("link");if(o.opera){d.setAttribute("rel","icon")}d.setAttribute("rel","icon");d.setAttribute("type","image/png");document.getElementsByTagName("head")[0].appendChild(d);d.setAttribute("href",b);if(e.parentNode){e.parentNode.removeChild(e)}}else{d.setAttribute("href",b)}}};function A(a){var b=/^#?([a-f\d])([a-f\d])([a-f\d])$/i;a=a.replace(b,function(a,b,c,d){return b+b+c+c+d+d});var c=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(a);return c?{r:parseInt(c[1],16),g:parseInt(c[2],16),b:parseInt(c[3],16)}:false}function B(a,b){var c={};var d;for(d in a){c[d]=a[d]}for(d in b){c[d]=b[d]}return c}function C(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}var D={};D.duration=40;D.types={};D.types.fade=[{x:.4,y:.4,w:.6,h:.6,o:0},{x:.4,y:.4,w:.6,h:.6,o:.1},{x:.4,y:.4,w:.6,h:.6,o:.2},{x:.4,y:.4,w:.6,h:.6,o:.3},{x:.4,y:.4,w:.6,h:.6,o:.4},{x:.4,y:.4,w:.6,h:.6,o:.5},{x:.4,y:.4,w:.6,h:.6,o:.6},{x:.4,y:.4,w:.6,h:.6,o:.7},{x:.4,y:.4,w:.6,h:.6,o:.8},{x:.4,y:.4,w:.6,h:.6,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.pop=[{x:1,y:1,w:0,h:0,o:1},{x:.9,y:.9,w:.1,h:.1,o:1},{x:.8,y:.8,w:.2,h:.2,o:1},{x:.7,y:.7,w:.3,h:.3,o:1},{x:.6,y:.6,w:.4,h:.4,o:1},{x:.5,y:.5,w:.5,h:.5,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.popFade=[{x:.75,y:.75,w:0,h:0,o:0},{x:.65,y:.65,w:.1,h:.1,o:.2},{x:.6,y:.6,w:.2,h:.2,o:.4},{x:.55,y:.55,w:.3,h:.3,o:.6},{x:.5,y:.5,w:.4,h:.4,o:.8},{x:.45,y:.45,w:.5,h:.5,o:.9},{x:.4,y:.4,w:.6,h:.6,o:1}];D.types.slide=[{x:.4,y:1,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.9,w:.6,h:.6,o:1},{x:.4,y:.8,w:.6,h:.6,o:1},{x:.4,y:.7,w:.6,h:.6,o:1},{x:.4,y:.6,w:.6,h:.6,o:1},{x:.4,y:.5,w:.6,h:.6,o:1},{x:.4,y:.4,w:.6,h:.6,o:1}];D.run=function(a,b,d,e){var f=D.types[C()?"none":c.animation];if(d===true){e=typeof e!=="undefined"?e:f.length-1}else{e=typeof e!=="undefined"?e:0}b=b?b:function(){};if(e<f.length&&e>=0){s[c.type](B(a,f[e]));setTimeout(function(){if(d){e=e-1}else{e=e+1}D.run(a,b,d,e)},D.duration);z.setIcon(g)}else{b();return}};q();return{badge:u,video:w,image:v,webcam:x,reset:r.reset}};if(typeof define!=="undefined"&&define.amd){define([],function(){return a})}else if(typeof module!=="undefined"&&module.exports){module.exports=a}else{this.Favico=a}})();this.Handlebars=function(){var a=function(){"use strict";var a;function b(a){this.string=a}b.prototype.toString=function(){return""+this.string};a=b;return a}();var b=function(a){"use strict";var b={};var c=a;var d={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"};var e=/[&<>"'`]/g;var f=/[&<>"'`]/;function g(a){return d[a]||"&amp;"}function h(a){for(var b=1;b<arguments.length;b++){for(var c in arguments[b]){if(Object.prototype.hasOwnProperty.call(arguments[b],c)){a[c]=arguments[b][c]}}}return a}b.extend=h;var i=Object.prototype.toString;b.toString=i;var j=function(a){return typeof a==="function"};if(j(/x/)){j=function(a){return typeof a==="function"&&i.call(a)==="[object Function]"}}var j;b.isFunction=j;var k=Array.isArray||function(a){return a&&typeof a==="object"?i.call(a)==="[object Array]":false};b.isArray=k;function l(a){if(a instanceof c){return a.toString()}else if(!a&&a!==0){return""}a=""+a;if(!f.test(a)){return a}return a.replace(e,g)}b.escapeExpression=l;function m(a){if(!a&&a!==0){return true}else if(k(a)&&a.length===0){return true}else{return false}}b.isEmpty=m;function n(a,b){return(a?a+".":"")+b}b.appendContextPath=n;return b}(a);var c=function(){"use strict";var a;var b=["description","fileName","lineNumber","message","name","number","stack"];function c(a,c){var d;if(c&&c.firstLine){d=c.firstLine;a+=" - "+d+":"+c.firstColumn}var e=Error.prototype.constructor.call(this,a);for(var f=0;f<b.length;f++){this[b[f]]=e[b[f]]}if(d){this.lineNumber=d;this.column=c.firstColumn}}c.prototype=new Error;a=c;return a}();var d=function(a,b){"use strict";var c={};var d=a;var e=b;var f="2.0.0-alpha.4";c.VERSION=f;var g=5;c.COMPILER_REVISION=g;var h={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:">= 2.0.0"};c.REVISION_CHANGES=h;var i=d.isArray,j=d.isFunction,k=d.toString,l="[object Object]";function m(a,b){this.helpers=a||{};this.partials=b||{};n(this)}c.HandlebarsEnvironment=m;m.prototype={constructor:m,logger:o,log:p,registerHelper:function(a,b,c){if(k.call(a)===l){if(c||b){throw new e("Arg not supported with multiple helpers")}d.extend(this.helpers,a)}else{if(c){b.not=c}this.helpers[a]=b}},unregisterHelper:function(a){delete this.helpers[a]},registerPartial:function(a,b){if(k.call(a)===l){d.extend(this.partials,a)}else{this.partials[a]=b}},unregisterPartial:function(a){delete this.partials[a]}};function n(a){a.registerHelper("helperMissing",function(){if(arguments.length===1){return undefined}else{throw new e("Missing helper: '"+arguments[arguments.length-1].name+"'")}});a.registerHelper("blockHelperMissing",function(b,c){var e=c.inverse||function(){},f=c.fn;if(j(b)){b=b.call(this)}if(b===true){return f(this)}else if(b===false||b==null){return e(this)}else if(i(b)){if(b.length>0){if(c.ids){c.ids=[c.name]}return a.helpers.each(b,c)}else{return e(this)}}else{if(c.data&&c.ids){var g=q(c.data);g.contextPath=d.appendContextPath(c.data.contextPath,c.name);c={data:g}}return f(b,c)}});a.registerHelper("each",function(a,b){if(!b){b=a;a=this}var c=b.fn,e=b.inverse;var f=0,g="",h;var k;if(b.data&&b.ids){k=d.appendContextPath(b.data.contextPath,b.ids[0])+"."}if(j(a)){a=a.call(this)}if(b.data){h=q(b.data)}if(a&&typeof a==="object"){if(i(a)){for(var l=a.length;f<l;f++){if(h){h.index=f;h.first=f===0;h.last=f===a.length-1;if(k){h.contextPath=k+f}}g=g+c(a[f],{data:h})}}else{for(var m in a){if(a.hasOwnProperty(m)){if(h){h.key=m;h.index=f;h.first=f===0;if(k){h.contextPath=k+m}}g=g+c(a[m],{data:h});f++}}}}if(f===0){g=e(this)}return g});a.registerHelper("if",function(a,b){if(j(a)){a=a.call(this)}if(!b.hash.includeZero&&!a||d.isEmpty(a)){return b.inverse(this)}else{return b.fn(this)}});a.registerHelper("unless",function(b,c){return a.helpers["if"].call(this,b,{fn:c.inverse,inverse:c.fn,hash:c.hash})});a.registerHelper("with",function(a,b){if(j(a)){a=a.call(this)}var c=b.fn;if(!d.isEmpty(a)){if(b.data&&b.ids){var e=q(b.data);e.contextPath=d.appendContextPath(b.data.contextPath,b.ids[0]);b={data:e}}return c(a,b)}});a.registerHelper("log",function(b,c){var d=c.data&&c.data.level!=null?parseInt(c.data.level,10):1;a.log(d,b)});a.registerHelper("lookup",function(a,b,c){return a&&a[b]})}var o={methodMap:{0:"debug",1:"info",2:"warn",3:"error"},DEBUG:0,INFO:1,WARN:2,ERROR:3,level:3,log:function(a,b){if(o.level<=a){var c=o.methodMap[a];if(typeof console!=="undefined"&&console[c]){console[c].call(console,b)}}}};c.logger=o;function p(a,b){o.log(a,b)}c.log=p;var q=function(a){var b=d.extend({},a);b._parent=a;return b};c.createFrame=q;return c}(b,c);var e=function(a,b,c){"use strict";var d={};var e=a;var f=b;var g=c.COMPILER_REVISION;var h=c.REVISION_CHANGES;var i=c.createFrame;function j(a){var b=a&&a[0]||1,c=g;if(b!==c){if(b<c){var d=h[c],e=h[b];throw new f("Template was precompiled with an older version of Handlebars than the current runtime. "+"Please update your precompiler to a newer version ("+d+") or downgrade your runtime to an older version ("+e+").")}else{throw new f("Template was precompiled with a newer version of Handlebars than the current runtime. "+"Please update your runtime to a newer version ("+a[1]+").")}}}d.checkRevision=j;function k(a,b){if(!b){throw new f("No environment passed to template")}b.VM.checkRevision(a.compiler);var c=function(a,c,d,g,h,i,j){if(g){d=e.extend({},d,g)}var k=b.VM.invokePartial.call(this,a,c,d,h,i,j);if(k!=null){return k}if(b.compile){var l={helpers:h,partials:i,data:j};i[c]=b.compile(a,{data:j!==undefined},b);return i[c](d,l)}else{throw new f("The partial "+c+" could not be compiled when running in runtime-only mode")}};var d={escapeExpression:e.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b){var c=this.programs[a],d=this.fn(a);if(b){c=m(this,a,d,b)}else if(!c){c=this.programs[a]=m(this,a,d)}return c},programWithDepth:b.VM.programWithDepth,data:function(a,b){while(a&&b--){a=a._parent}return a},merge:function(a,b){var c=a||b;if(a&&b&&a!==b){c=e.extend({},b,a)}return c},noop:b.VM.noop,compilerInfo:a.compiler};var g=function(b,c){c=c||{};var e,f,h=c.data;g._setup(c);if(!c.partial&&a.useData){h=p(b,h)}return a.main.call(d,b,d.helpers,d.partials,h)};g._setup=function(c){if(!c.partial){d.helpers=d.merge(c.helpers,b.helpers);if(a.usePartial){d.partials=d.merge(c.partials,b.partials)}}else{d.helpers=c.helpers;d.partials=c.partials}};g._child=function(a){return d.programWithDepth(a)};return g}d.template=k;function l(a,b){var c=Array.prototype.slice.call(arguments,2),d=this,e=d.fn(a);var f=function(a,f){f=f||{};return e.apply(d,[a,d.helpers,d.partials,f.data||b].concat(c))};f.program=a;f.depth=c.length;return f}d.programWithDepth=l;function m(a,b,c,d){var e=function(b,e){e=e||{};return c.call(a,b,a.helpers,a.partials,e.data||d)};e.program=b;e.depth=0;return e}d.program=m;function n(a,b,c,d,e,g){var h={partial:true,helpers:d,partials:e,data:g};if(a===undefined){throw new f("The partial "+b+" could not be found")}else if(a instanceof Function){return a(c,h)}}d.invokePartial=n;function o(){return""}d.noop=o;function p(a,b){if(!b||!("root"in b)){b=b?i(b):{};b.root=a}return b}return d}(b,c,d);var f=function(a,b,c,d,e){"use strict";var f;var g=a;var h=b;var i=c;var j=d;var k=e;var l=function(){var a=new g.HandlebarsEnvironment;j.extend(a,g);a.SafeString=h;a.Exception=i;a.Utils=j;a.VM=k;a.template=function(b){return k.template(b,a)};return a};var m=l();m.create=l;f=m;return f}(d,a,c,b,e);var g=function(a){"use strict";var b;var c=a;function d(a){a=a||{};this.firstLine=a.first_line;this.firstColumn=a.first_column;this.lastColumn=a.last_column;this.lastLine=a.last_line}var e={ProgramNode:function(a,b,c,f){var g,h;if(arguments.length===3){f=c;c=null}else if(arguments.length===2){f=b;b=null}d.call(this,f);this.type="program";this.statements=a;this.strip={};if(c){h=c[0];if(h){g={first_line:h.firstLine,last_line:h.lastLine,last_column:h.lastColumn,first_column:h.firstColumn};this.inverse=new e.ProgramNode(c,b,g)}else{this.inverse=new e.ProgramNode(c,b)}this.strip.right=b.left}else if(b){this.strip.left=b.right}},MustacheNode:function(a,b,c,f,g){d.call(this,g);this.type="mustache";this.strip=f;if(c!=null&&c.charAt){var h=c.charAt(3)||c.charAt(2);this.escaped=h!=="{"&&h!=="&"}else{this.escaped=!!c}if(a instanceof e.SexprNode){this.sexpr=a}else{this.sexpr=new e.SexprNode(a,b)}this.sexpr.isRoot=true;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(a,b,c){d.call(this,c);this.type="sexpr";this.hash=b;var e=this.id=a[0];var f=this.params=a.slice(1);this.isHelper=!!(f.length||b);this.eligibleHelper=this.isHelper||e.isSimple},PartialNode:function(a,b,c,e,f){d.call(this,f);this.type="partial";this.partialName=a;this.context=b;this.hash=c;this.strip=e},BlockNode:function(a,b,e,f,g){d.call(this,g);if(a.sexpr.id.original!==f.path.original){throw new c(a.sexpr.id.original+" doesn't match "+f.path.original,this)}this.type="block";this.mustache=a;this.program=b;this.inverse=e;this.strip={left:a.strip.left,right:f.strip.right};(b||e).strip.left=a.strip.right;(e||b).strip.right=f.strip.left;if(e&&!b){this.isInverse=true}},RawBlockNode:function(a,b,f,g){d.call(this,g);if(a.sexpr.id.original!==f){throw new c(a.sexpr.id.original+" doesn't match "+f,this)}b=new e.ContentNode(b,g);this.type="block";this.mustache=a;this.program=new e.ProgramNode([b],g)},ContentNode:function(a,b){d.call(this,b);this.type="content";this.string=a},HashNode:function(a,b){d.call(this,b);this.type="hash";this.pairs=a},IdNode:function(a,b){d.call(this,b);this.type="ID";var e="",f=[],g=0,h="";for(var i=0,j=a.length;i<j;i++){var k=a[i].part;e+=(a[i].separator||"")+k;if(k===".."||k==="."||k==="this"){if(f.length>0){throw new c("Invalid path: "+e,this)}else if(k===".."){g++;h+="../"}else{this.isScoped=true}}else{f.push(k)}}this.original=e;this.parts=f;this.string=f.join(".");this.depth=g;this.idName=h+this.string;this.isSimple=a.length===1&&!this.isScoped&&g===0;this.stringModeValue=this.string},PartialNameNode:function(a,b){d.call(this,b);this.type="PARTIAL_NAME";this.name=a.original},DataNode:function(a,b){d.call(this,b);this.type="DATA";this.id=a;this.stringModeValue=a.stringModeValue;this.idName="@"+a.stringModeValue},StringNode:function(a,b){d.call(this,b);this.type="STRING";this.original=this.string=this.stringModeValue=a},NumberNode:function(a,b){d.call(this,b);this.type="NUMBER";this.original=this.number=a;this.stringModeValue=Number(a)},BooleanNode:function(a,b){d.call(this,b);this.type="BOOLEAN";this.bool=a;this.stringModeValue=a==="true"},CommentNode:function(a,b){d.call(this,b);this.type="comment";this.comment=a}};b=e;return b}(c);var h=function(){"use strict";var a;var b=function(){var a={trace:function e(){},yy:{},symbols_:{error:2,root:3,statements:4,EOF:5,program:6,simpleInverse:7,statement:8,openRawBlock:9,CONTENT:10,END_RAW_BLOCK:11,openInverse:12,closeBlock:13,openBlock:14,mustache:15,partial:16,COMMENT:17,OPEN_RAW_BLOCK:18,sexpr:19,CLOSE_RAW_BLOCK:20,OPEN_BLOCK:21,CLOSE:22,OPEN_INVERSE:23,OPEN_ENDBLOCK:24,path:25,OPEN:26,OPEN_UNESCAPED:27,CLOSE_UNESCAPED:28,OPEN_PARTIAL:29,partialName:30,param:31,partial_option0:32,partial_option1:33,sexpr_repetition0:34,sexpr_option0:35,dataName:36,STRING:37,NUMBER:38,BOOLEAN:39,OPEN_SEXPR:40,CLOSE_SEXPR:41,hash:42,hash_repetition_plus0:43,hashSegment:44,ID:45,EQUALS:46,DATA:47,pathSegments:48,SEP:49,$accept:0,$end:1},terminals_:{2:"error",5:"EOF",10:"CONTENT",11:"END_RAW_BLOCK",17:"COMMENT",18:"OPEN_RAW_BLOCK",20:"CLOSE_RAW_BLOCK",21:"OPEN_BLOCK",22:"CLOSE",23:"OPEN_INVERSE",24:"OPEN_ENDBLOCK",26:"OPEN",27:"OPEN_UNESCAPED",28:"CLOSE_UNESCAPED",29:"OPEN_PARTIAL",37:"STRING",38:"NUMBER",39:"BOOLEAN",40:"OPEN_SEXPR",41:"CLOSE_SEXPR",45:"ID",46:"EQUALS",47:"DATA",49:"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,3],[8,1],[8,1],[8,1],[8,1],[9,3],[14,3],[12,3],[13,3],[15,3],[15,3],[16,5],[16,4],[7,2],[19,3],[19,1],[31,1],[31,1],[31,1],[31,1],[31,1],[31,3],[42,1],[44,3],[30,1],[30,1],[30,1],[36,2],[25,1],[48,3],[48,1],[32,0],[32,1],[33,0],[33,1],[34,0],[34,2],[35,0],[35,1],[43,1],[43,2]],performAction:function f(a,c,d,e,g,h,i){var j=h.length-1;switch(g){case 1:return new e.ProgramNode(h[j-1],this._$);break;case 2:return new e.ProgramNode([],this._$);break;case 3:this.$=new e.ProgramNode([],h[j-1],h[j],this._$);break;case 4:this.$=new e.ProgramNode(h[j-2],h[j-1],h[j],this._$);break;case 5:this.$=new e.ProgramNode(h[j-1],h[j],[],this._$);break;case 6:this.$=new e.ProgramNode(h[j],this._$);break;case 7:this.$=new e.ProgramNode([],this._$);break;case 8:this.$=new e.ProgramNode([],this._$);break;case 9:this.$=[h[j]];break;case 10:h[j-1].push(h[j]);this.$=h[j-1];break;case 11:this.$=new e.RawBlockNode(h[j-2],h[j-1],h[j],this._$);break;case 12:this.$=new e.BlockNode(h[j-2],h[j-1].inverse,h[j-1],h[j],this._$);break;case 13:this.$=new e.BlockNode(h[j-2],h[j-1],h[j-1].inverse,h[j],this._$);break;case 14:this.$=h[j];break;case 15:this.$=h[j];break;case 16:this.$=new e.ContentNode(h[j],this._$);break;case 17:this.$=new e.CommentNode(h[j],this._$);break;case 18:this.$=new e.MustacheNode(h[j-1],null,"","",this._$);break;case 19:this.$=new e.MustacheNode(h[j-1],null,h[j-2],b(h[j-2],h[j]),this._$);break;case 20:this.$=new e.MustacheNode(h[j-1],null,h[j-2],b(h[j-2],h[j]),this._$);break;case 21:this.$={path:h[j-1],strip:b(h[j-2],h[j])};break;case 22:this.$=new e.MustacheNode(h[j-1],null,h[j-2],b(h[j-2],h[j]),this._$);break;case 23:this.$=new e.MustacheNode(h[j-1],null,h[j-2],b(h[j-2],h[j]),this._$);break;case 24:this.$=new e.PartialNode(h[j-3],h[j-2],h[j-1],b(h[j-4],h[j]),this._$);break;case 25:this.$=new e.PartialNode(h[j-2],undefined,h[j-1],b(h[j-3],h[j]),this._$);break;case 26:this.$=b(h[j-1],h[j]);break;case 27:this.$=new e.SexprNode([h[j-2]].concat(h[j-1]),h[j],this._$);break;case 28:this.$=new e.SexprNode([h[j]],null,this._$);break;case 29:this.$=h[j];break;case 30:this.$=new e.StringNode(h[j],this._$);break;case 31:this.$=new e.NumberNode(h[j],this._$);break;case 32:this.$=new e.BooleanNode(h[j],this._$);break;case 33:this.$=h[j];break;case 34:h[j-1].isHelper=true;this.$=h[j-1];break;case 35:this.$=new e.HashNode(h[j],this._$);break;case 36:this.$=[h[j-2],h[j]];break;case 37:this.$=new e.PartialNameNode(h[j],this._$);break;case 38:this.$=new e.PartialNameNode(new e.StringNode(h[j],this._$),this._$);break;case 39:this.$=new e.PartialNameNode(new e.NumberNode(h[j],this._$));break;case 40:this.$=new e.DataNode(h[j],this._$);break;case 41:this.$=new e.IdNode(h[j],this._$);break;case 42:h[j-2].push({part:h[j],separator:h[j-1]});this.$=h[j-2];break;case 43:this.$=[{part:h[j]}];break;case 48:this.$=[];break;case 49:h[j-1].push(h[j]);break;case 52:this.$=[h[j]];break;case 53:h[j-1].push(h[j]);break}},table:[{3:1,4:2,5:[1,3],8:4,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,13],26:[1,15],27:[1,16],29:[1,17]},{1:[3]},{5:[1,18],8:19,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,13],26:[1,15],27:[1,16],29:[1,17]},{1:[2,2]},{5:[2,9],10:[2,9],17:[2,9],18:[2,9],21:[2,9],23:[2,9],24:[2,9],26:[2,9],27:[2,9],29:[2,9]},{10:[1,20]},{4:23,6:21,7:22,8:4,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,24],24:[2,8],26:[1,15],27:[1,16],29:[1,17]},{4:23,6:25,7:22,8:4,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,24],24:[2,8],26:[1,15],27:[1,16],29:[1,17]},{5:[2,14],10:[2,14],17:[2,14],18:[2,14],21:[2,14],23:[2,14],24:[2,14],26:[2,14],27:[2,14],29:[2,14]},{5:[2,15],10:[2,15],17:[2,15],18:[2,15],21:[2,15],23:[2,15],24:[2,15],26:[2,15],27:[2,15],29:[2,15]},{5:[2,16],10:[2,16],17:[2,16],18:[2,16],21:[2,16],23:[2,16],24:[2,16],26:[2,16],27:[2,16],29:[2,16]},{5:[2,17],10:[2,17],17:[2,17],18:[2,17],21:[2,17],23:[2,17],24:[2,17],26:[2,17],27:[2,17],29:[2,17]},{19:26,25:27,36:28,45:[1,31],47:[1,30],48:29},{19:32,25:27,36:28,45:[1,31],47:[1,30],48:29},{19:33,25:27,36:28,45:[1,31],47:[1,30],48:29},{19:34,25:27,36:28,45:[1,31],47:[1,30],48:29},{19:35,25:27,36:28,45:[1,31],47:[1,30],48:29},{25:37,30:36,37:[1,38],38:[1,39],45:[1,31],48:29},{1:[2,1]},{5:[2,10],10:[2,10],17:[2,10],18:[2,10],21:[2,10],23:[2,10],24:[2,10],26:[2,10],27:[2,10],29:[2,10]},{11:[1,40]},{13:41,24:[1,42]},{4:43,8:4,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,13],24:[2,7],26:[1,15],27:[1,16],29:[1,17]},{7:44,8:19,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,24],24:[2,6],26:[1,15],27:[1,16],29:[1,17]},{19:32,22:[1,45],25:27,36:28,45:[1,31],47:[1,30],48:29},{13:46,24:[1,42]},{20:[1,47]},{20:[2,48],22:[2,48],28:[2,48],34:48,37:[2,48],38:[2,48],39:[2,48],40:[2,48],41:[2,48],45:[2,48],47:[2,48]},{20:[2,28],22:[2,28],28:[2,28],41:[2,28]},{20:[2,41],22:[2,41],28:[2,41],37:[2,41],38:[2,41],39:[2,41],40:[2,41],41:[2,41],45:[2,41],47:[2,41],49:[1,49]},{25:50,45:[1,31],48:29},{20:[2,43],22:[2,43],28:[2,43],37:[2,43],38:[2,43],39:[2,43],40:[2,43],41:[2,43],45:[2,43],47:[2,43],49:[2,43]},{22:[1,51]},{22:[1,52]},{22:[1,53]},{28:[1,54]},{22:[2,46],25:57,31:55,33:56,36:61,37:[1,58],38:[1,59],39:[1,60],40:[1,62],42:63,43:64,44:66,45:[1,65],47:[1,30],48:29},{22:[2,37],37:[2,37],38:[2,37],39:[2,37],40:[2,37],45:[2,37],47:[2,37]},{22:[2,38],37:[2,38],38:[2,38],39:[2,38],40:[2,38],45:[2,38],47:[2,38]},{22:[2,39],37:[2,39],38:[2,39],39:[2,39],40:[2,39],45:[2,39],47:[2,39]},{5:[2,11],10:[2,11],17:[2,11],18:[2,11],21:[2,11],23:[2,11],24:[2,11],26:[2,11],27:[2,11],29:[2,11]},{5:[2,12],10:[2,12],17:[2,12],18:[2,12],21:[2,12],23:[2,12],24:[2,12],26:[2,12],27:[2,12],29:[2,12]},{25:67,45:[1,31],48:29},{8:19,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,13],24:[2,3],26:[1,15],27:[1,16],29:[1,17]},{4:68,8:4,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,13],24:[2,5],26:[1,15],27:[1,16],29:[1,17]},{10:[2,26],17:[2,26],18:[2,26],21:[2,26],23:[2,26],24:[2,26],26:[2,26],27:[2,26],29:[2,26]},{5:[2,13],10:[2,13],17:[2,13],18:[2,13],21:[2,13],23:[2,13],24:[2,13],26:[2,13],27:[2,13],29:[2,13]},{10:[2,18]},{20:[2,50],22:[2,50],25:57,28:[2,50],31:70,35:69,36:61,37:[1,58],38:[1,59],39:[1,60],40:[1,62],41:[2,50],42:71,43:64,44:66,45:[1,65],47:[1,30],48:29},{45:[1,72]},{20:[2,40],22:[2,40],28:[2,40],37:[2,40],38:[2,40],39:[2,40],40:[2,40],41:[2,40],45:[2,40],47:[2,40]},{10:[2,20],17:[2,20],18:[2,20],21:[2,20],23:[2,20],24:[2,20],26:[2,20],27:[2,20],29:[2,20]},{10:[2,19],17:[2,19],18:[2,19],21:[2,19],23:[2,19],24:[2,19],26:[2,19],27:[2,19],29:[2,19]},{5:[2,22],10:[2,22],17:[2,22],18:[2,22],21:[2,22],23:[2,22],24:[2,22],26:[2,22],27:[2,22],29:[2,22]},{5:[2,23],10:[2,23],17:[2,23],18:[2,23],21:[2,23],23:[2,23],24:[2,23],26:[2,23],27:[2,23],29:[2,23]},{22:[2,44],32:73,42:74,43:64,44:66,45:[1,75]},{22:[1,76]},{20:[2,29],22:[2,29],28:[2,29],37:[2,29],38:[2,29],39:[2,29],40:[2,29],41:[2,29],45:[2,29],47:[2,29]},{20:[2,30],22:[2,30],28:[2,30],37:[2,30],38:[2,30],39:[2,30],40:[2,30],41:[2,30],45:[2,30],47:[2,30]},{20:[2,31],22:[2,31],28:[2,31],37:[2,31],38:[2,31],39:[2,31],40:[2,31],41:[2,31],45:[2,31],47:[2,31]},{20:[2,32],22:[2,32],28:[2,32],37:[2,32],38:[2,32],39:[2,32],40:[2,32],41:[2,32],45:[2,32],47:[2,32]},{20:[2,33],22:[2,33],28:[2,33],37:[2,33],38:[2,33],39:[2,33],40:[2,33],41:[2,33],45:[2,33],47:[2,33]},{19:77,25:27,36:28,45:[1,31],47:[1,30],48:29},{22:[2,47]},{20:[2,35],22:[2,35],28:[2,35],41:[2,35],44:78,45:[1,75]},{20:[2,43],22:[2,43],28:[2,43],37:[2,43],38:[2,43],39:[2,43],40:[2,43],41:[2,43],45:[2,43],46:[1,79],47:[2,43],49:[2,43]},{20:[2,52],22:[2,52],28:[2,52],41:[2,52],45:[2,52]},{22:[1,80]},{8:19,9:5,10:[1,10],12:6,14:7,15:8,16:9,17:[1,11],18:[1,12],21:[1,14],23:[1,13],24:[2,4],26:[1,15],27:[1,16],29:[1,17]},{20:[2,27],22:[2,27],28:[2,27],41:[2,27]},{20:[2,49],22:[2,49],28:[2,49],37:[2,49],38:[2,49],39:[2,49],40:[2,49],41:[2,49],45:[2,49],47:[2,49]},{20:[2,51],22:[2,51],28:[2,51],41:[2,51]},{20:[2,42],22:[2,42],28:[2,42],37:[2,42],38:[2,42],39:[2,42],40:[2,42],41:[2,42],45:[2,42],47:[2,42],49:[2,42]},{22:[1,81]},{22:[2,45]},{46:[1,79]},{5:[2,25],10:[2,25],17:[2,25],18:[2,25],21:[2,25],23:[2,25],24:[2,25],26:[2,25],27:[2,25],29:[2,25]},{41:[1,82]},{20:[2,53],22:[2,53],28:[2,53],41:[2,53],45:[2,53]},{25:57,31:83,36:61,37:[1,58],38:[1,59],39:[1,60],40:[1,62],45:[1,31],47:[1,30],48:29},{5:[2,21],10:[2,21],17:[2,21],18:[2,21],21:[2,21],23:[2,21],24:[2,21],26:[2,21],27:[2,21],29:[2,21]},{5:[2,24],10:[2,24],17:[2,24],18:[2,24],21:[2,24],23:[2,24],24:[2,24],26:[2,24],27:[2,24],29:[2,24]},{20:[2,34],22:[2,34],28:[2,34],37:[2,34],38:[2,34],39:[2,34],40:[2,34],41:[2,34],45:[2,34],47:[2,34]},{20:[2,36],22:[2,36],28:[2,36],41:[2,36],45:[2,36]}],defaultActions:{3:[2,2],18:[2,1],47:[2,18],63:[2,47],74:[2,45]},parseError:function g(a,b){throw new Error(a)},parse:function h(a){var b=this,c=[0],d=[null],e=[],f=this.table,g="",h=0,i=0,j=0,k=2,l=1;this.lexer.setInput(a);this.lexer.yy=this.yy;this.yy.lexer=this.lexer;this.yy.parser=this;if(typeof this.lexer.yylloc=="undefined")this.lexer.yylloc={};var m=this.lexer.yylloc;e.push(m);var n=this.lexer.options&&this.lexer.options.ranges;if(typeof this.yy.parseError==="function")this.parseError=this.yy.parseError;function o(a){c.length=c.length-2*a;d.length=d.length-a;e.length=e.length-a}function p(){var a;a=b.lexer.lex()||1;if(typeof a!=="number"){a=b.symbols_[a]||a}return a}var q,r,s,t,u,v,w={},x,y,z,A;while(true){s=c[c.length-1];if(this.defaultActions[s]){t=this.defaultActions[s]}else{if(q===null||typeof q=="undefined"){q=p()}t=f[s]&&f[s][q]}if(typeof t==="undefined"||!t.length||!t[0]){var B="";if(!j){A=[];for(x in f[s])if(this.terminals_[x]&&x>2){A.push("'"+this.terminals_[x]+"'")}if(this.lexer.showPosition){B="Parse error on line "+(h+1)+":\n"+this.lexer.showPosition()+"\nExpecting "+A.join(", ")+", got '"+(this.terminals_[q]||q)+"'"}else{B="Parse error on line "+(h+1)+": Unexpected "+(q==1?"end of input":"'"+(this.terminals_[q]||q)+"'")}this.parseError(B,{text:this.lexer.match,token:this.terminals_[q]||q,line:this.lexer.yylineno,loc:m,expected:A})}}if(t[0]instanceof Array&&t.length>1){throw new Error("Parse Error: multiple actions possible at state: "+s+", token: "+q)}switch(t[0]){case 1:c.push(q);d.push(this.lexer.yytext);e.push(this.lexer.yylloc);c.push(t[1]);q=null;if(!r){i=this.lexer.yyleng;g=this.lexer.yytext;h=this.lexer.yylineno;m=this.lexer.yylloc;if(j>0)j--}else{q=r;r=null}break;case 2:y=this.productions_[t[1]][1];w.$=d[d.length-y];w._$={first_line:e[e.length-(y||1)].first_line,last_line:e[e.length-1].last_line,first_column:e[e.length-(y||1)].first_column,last_column:e[e.length-1].last_column};if(n){w._$.range=[e[e.length-(y||1)].range[0],e[e.length-1].range[1]]}v=this.performAction.call(w,g,i,h,this.yy,t[1],d,e);if(typeof v!=="undefined"){return v}if(y){c=c.slice(0,-1*y*2);d=d.slice(0,-1*y);e=e.slice(0,-1*y)}c.push(this.productions_[t[1]][0]);d.push(w.$);e.push(w._$);z=f[c[c.length-2]][c[c.length-1]];c.push(z);break;case 3:return true}}return true}};function b(a,b){return{left:a.charAt(2)==="~",right:b.charAt(0)==="~"||b.charAt(1)==="~"}}var c=function(){var a={EOF:1,parseError:function b(a,c){if(this.yy.parser){this.yy.parser.parseError(a,c)}else{throw new Error(a)}},setInput:function(a){this._input=a;this._more=this._less=this.done=false;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};if(this.options.ranges)this.yylloc.range=[0,0];this.offset=0;return this},input:function(){var a=this._input[0];this.yytext+=a;this.yyleng++;this.offset++;this.match+=a;this.matched+=a;var b=a.match(/(?:\r\n?|\n).*/g);if(b){this.yylineno++;this.yylloc.last_line++}else{this.yylloc.last_column++}if(this.options.ranges)this.yylloc.range[1]++;this._input=this._input.slice(1);return a},unput:function(a){var b=a.length;var c=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input;this.yytext=this.yytext.substr(0,this.yytext.length-b-1);this.offset-=b;var d=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);if(c.length-1)this.yylineno-=c.length-1;var e=this.yylloc.range;this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:c?(c.length===d.length?this.yylloc.first_column:0)+d[d.length-c.length].length-c[0].length:this.yylloc.first_column-b};if(this.options.ranges){this.yylloc.range=[e[0],e[0]+this.yyleng-b]}return this},more:function(){this._more=true;return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;if(a.length<20){a+=this._input.substr(0,20-a.length)}return(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput();var b=new Array(a.length+1).join("-");return a+this.upcomingInput()+"\n"+b+"^"},next:function(){if(this.done){return this.EOF}if(!this._input)this.done=true;var a,b,c,d,e,f;if(!this._more){this.yytext="";this.match=""}var g=this._currentRules();for(var h=0;h<g.length;h++){c=this._input.match(this.rules[g[h]]);if(c&&(!b||c[0].length>b[0].length)){b=c;d=h;if(!this.options.flex)break}}if(b){f=b[0].match(/(?:\r\n?|\n).*/g);if(f)this.yylineno+=f.length;this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:f?f[f.length-1].length-f[f.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+b[0].length};this.yytext+=b[0];this.match+=b[0];this.matches=b;this.yyleng=this.yytext.length;if(this.options.ranges){this.yylloc.range=[this.offset,this.offset+=this.yyleng]}this._more=false;this._input=this._input.slice(b[0].length);this.matched+=b[0];a=this.performAction.call(this,this.yy,this,g[d],this.conditionStack[this.conditionStack.length-1]);if(this.done&&this._input)this.done=false;if(a)return a;else return}if(this._input===""){return this.EOF}else{return this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})}},lex:function c(){var a=this.next();if(typeof a!=="undefined"){return a}else{return this.lex()}},begin:function d(a){this.conditionStack.push(a)},popState:function e(){return this.conditionStack.pop()},_currentRules:function f(){return this.conditions[this.conditionStack[this.conditionStack.length-1]].rules},topState:function(){return this.conditionStack[this.conditionStack.length-2]},pushState:function g(a){this.begin(a)}};a.options={};a.performAction=function h(a,b,c,d){function e(a,c){return b.yytext=b.yytext.substr(a,b.yyleng-c)}var f=d;switch(c){case 0:if(b.yytext.slice(-2)==="\\\\"){e(0,1);this.begin("mu")}else if(b.yytext.slice(-1)==="\\"){e(0,1);this.begin("emu")}else{this.begin("mu")}if(b.yytext)return 10;break;case 1:return 10;break;case 2:this.popState();return 10;break;case 3:b.yytext=b.yytext.substr(5,b.yyleng-9);this.popState();return 11;break;case 4:return 10;break;case 5:e(0,4);this.popState();return 17;break;case 6:return 40;break;case 7:return 41;break;case 8:return 18;break;case 9:this.popState();this.begin("raw");return 20;break;case 10:b.yytext=b.yytext.substr(4,b.yyleng-8);this.popState();return"RAW_BLOCK";break;case 11:return 29;break;case 12:return 21;break;case 13:return 24;break;case 14:return 23;break;case 15:return 23;break;case 16:return 27;break;case 17:return 26;break;case 18:this.popState();this.begin("com");break;case 19:e(3,5);this.popState();return 17;break;case 20:return 26;break;case 21:return 46;break;case 22:return 45;break;case 23:return 45;break;case 24:return 49;break;case 25:break;case 26:this.popState();return 28;break;case 27:this.popState();return 22;break;case 28:b.yytext=e(1,2).replace(/\\"/g,'"');return 37;break;case 29:b.yytext=e(1,2).replace(/\\'/g,"'");return 37;break;case 30:return 47;break;case 31:return 39;break;case 32:return 39;break;case 33:return 38;break;case 34:return 45;break;case 35:b.yytext=e(1,2);return 45;break;case 36:return"INVALID";break;case 37:return 5;break}};a.rules=[/^(?:[^\x00]*?(?=(\{\{)))/,/^(?:[^\x00]+)/,/^(?:[^\x00]{2,}?(?=(\{\{|\\\{\{|\\\\\{\{|$)))/,/^(?:\{\{\{\{\/[^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=[=}\s\/.])\}\}\}\})/,/^(?:[^\x00]*?(?=(\{\{\{\{\/)))/,/^(?:[\s\S]*?--\}\})/,/^(?:\()/,/^(?:\))/,/^(?:\{\{\{\{)/,/^(?:\}\}\}\})/,/^(?:\{\{\{\{[^\x00]*\}\}\}\})/,/^(?:\{\{(~)?>)/,/^(?:\{\{(~)?#)/,/^(?:\{\{(~)?\/)/,/^(?:\{\{(~)?\^)/,/^(?:\{\{(~)?\s*else\b)/,/^(?:\{\{(~)?\{)/,/^(?:\{\{(~)?&)/,/^(?:\{\{!--)/,/^(?:\{\{![\s\S]*?\}\})/,/^(?:\{\{(~)?)/,/^(?:=)/,/^(?:\.\.)/,/^(?:\.(?=([=~}\s\/.)])))/,/^(?:[\/.])/,/^(?:\s+)/,/^(?:\}(~)?\}\})/,/^(?:(~)?\}\})/,/^(?:"(\\["]|[^"])*")/,/^(?:'(\\[']|[^'])*')/,/^(?:@)/,/^(?:true(?=([~}\s)])))/,/^(?:false(?=([~}\s)])))/,/^(?:-?[0-9]+(?:\.[0-9]+)?(?=([~}\s)])))/,/^(?:([^\s!"#%-,\.\/;->@\[-\^`\{-~]+(?=([=~}\s\/.)]))))/,/^(?:\[[^\]]*\])/,/^(?:.)/,/^(?:$)/];a.conditions={mu:{rules:[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,33,34,35,36,37],inclusive:false},emu:{rules:[2],inclusive:false},com:{rules:[5],inclusive:false},raw:{rules:[3,4],inclusive:false},INITIAL:{rules:[0,1,37],inclusive:true}};return a}();a.lexer=c;function d(){this.yy={}}d.prototype=a;a.Parser=d;return new d}();a=b;return a}();var i=function(a,b){"use strict";var c={};var d=a;var e=b;c.parser=d;function f(a){if(a.constructor===e.ProgramNode){return a}d.yy=e;return d.parse(a)}c.parse=f;return c}(h,g);var j=function(a){"use strict";var b={};var c=a;function d(){}b.Compiler=d;d.prototype={compiler:d,disassemble:function(){var a=this.opcodes,b,c=[],d,e;for(var f=0,g=a.length;f<g;f++){b=a[f];if(b.opcode==="DECLARE"){c.push("DECLARE "+b.name+"="+b.value)}else{d=[];for(var h=0;h<b.args.length;h++){e=b.args[h];if(typeof e==="string"){e='"'+e.replace("\n","\\n")+'"'}d.push(e)}c.push(b.opcode+" "+d.join(" "))}}return c.join("\n")},equals:function(a){var b=this.opcodes.length;if(a.opcodes.length!==b){return false}for(var c=0;c<b;c++){var d=this.opcodes[c],e=a.opcodes[c];if(d.opcode!==e.opcode||d.args.length!==e.args.length){return false}for(var f=0;f<d.args.length;f++){if(d.args[f]!==e.args[f]){return false}}}b=this.children.length;if(a.children.length!==b){return false}for(c=0;c<b;c++){if(!this.children[c].equals(a.children[c])){return false}}return true},guid:0,compile:function(a,b){this.opcodes=[];this.children=[];this.depths={list:[]};this.options=b;this.stringParams=b.stringParams;this.trackIds=b.trackIds;var c=this.options.knownHelpers;this.options.knownHelpers={helperMissing:true,blockHelperMissing:true,each:true,"if":true,unless:true,"with":true,log:true,lookup:true};if(c){for(var d in c){this.options.knownHelpers[d]=c[d]}}return this.accept(a)},accept:function(a){var b=a.strip||{},c;if(b.left){this.opcode("strip")}c=this[a.type](a);if(b.right){this.opcode("strip")}return c},program:function(a){var b=a.statements;for(var c=0,d=b.length;c<d;c++){this.accept(b[c])}this.isSimple=d===1;this.depths.list=this.depths.list.sort(function(a,b){return a-b});return this},compileProgram:function(a){var b=(new this.compiler).compile(a,this.options);var c=this.guid++,d;this.usePartial=this.usePartial||b.usePartial;this.children[c]=b;for(var e=0,f=b.depths.list.length;e<f;e++){d=b.depths.list[e];if(d<2){continue}else{this.addDepth(d-1)}}return c},block:function(a){var b=a.mustache,c=a.program,d=a.inverse;if(c){c=this.compileProgram(c)}if(d){d=this.compileProgram(d)}var e=b.sexpr;var f=this.classifySexpr(e);if(f==="helper"){this.helperSexpr(e,c,d)}else if(f==="simple"){this.simpleSexpr(e);this.opcode("pushProgram",c);this.opcode("pushProgram",d);this.opcode("emptyHash");this.opcode("blockValue",e.id.original)}else{this.ambiguousSexpr(e,c,d);this.opcode("pushProgram",c);this.opcode("pushProgram",d);this.opcode("emptyHash");this.opcode("ambiguousBlockValue")}this.opcode("append")},hash:function(a){var b=a.pairs,c,d;this.opcode("pushHash");for(c=0,d=b.length;c<d;c++){this.pushParam(b[c][1])}while(c--){this.opcode("assignToHash",b[c][0])}this.opcode("popHash")},partial:function(a){var b=a.partialName;this.usePartial=true;if(a.hash){this.accept(a.hash)}else{this.opcode("push","undefined")}if(a.context){this.accept(a.context)}else{this.opcode("push","depth0")}this.opcode("invokePartial",b.name);this.opcode("append")},content:function(a){this.opcode("appendContent",a.string)},mustache:function(a){this.sexpr(a.sexpr);if(a.escaped&&!this.options.noEscape){this.opcode("appendEscaped")}else{this.opcode("append")}},ambiguousSexpr:function(a,b,c){var d=a.id,e=d.parts[0],f=b!=null||c!=null;this.opcode("getContext",d.depth);this.opcode("pushProgram",b);this.opcode("pushProgram",c);this.opcode("invokeAmbiguous",e,f)},simpleSexpr:function(a){var b=a.id;if(b.type==="DATA"){this.DATA(b)}else if(b.parts.length){this.ID(b)}else{this.addDepth(b.depth);this.opcode("getContext",b.depth);this.opcode("pushContext")}this.opcode("resolvePossibleLambda")},helperSexpr:function(a,b,d){var e=this.setupFullMustacheParams(a,b,d),f=a.id,g=f.parts[0];if(this.options.knownHelpers[g]){this.opcode("invokeKnownHelper",e.length,g)}else if(this.options.knownHelpersOnly){throw new c("You specified knownHelpersOnly, but used the unknown helper "+g,a)}else{this.ID(f);this.opcode("invokeHelper",e.length,f.original,a.isRoot)}},sexpr:function(a){var b=this.classifySexpr(a);if(b==="simple"){this.simpleSexpr(a)}else if(b==="helper"){this.helperSexpr(a)}else{this.ambiguousSexpr(a)}},ID:function(a){this.addDepth(a.depth);this.opcode("getContext",a.depth);var b=a.parts[0];if(!b){this.opcode("pushContext")}else{this.opcode("lookupOnContext",a.parts[0])}for(var c=1,d=a.parts.length;c<d;c++){this.opcode("lookup",a.parts[c])}},DATA:function(a){this.options.data=true;this.opcode("lookupData",a.id.depth);var b=a.id.parts;for(var c=0,d=b.length;c<d;c++){this.opcode("lookup",b[c])}},STRING:function(a){this.opcode("pushString",a.string)},NUMBER:function(a){this.opcode("pushLiteral",a.number)},BOOLEAN:function(a){this.opcode("pushLiteral",a.bool)},comment:function(){},opcode:function(a){this.opcodes.push({opcode:a,args:[].slice.call(arguments,1)})},declare:function(a,b){this.opcodes.push({opcode:"DECLARE",name:a,value:b})},addDepth:function(a){if(a===0){return}if(!this.depths[a]){this.depths[a]=true;this.depths.list.push(a)}},classifySexpr:function(a){var b=a.isHelper;var c=a.eligibleHelper;var d=this.options;if(c&&!b){var e=a.id.parts[0];if(d.knownHelpers[e]){b=true}else if(d.knownHelpersOnly){c=false}}if(b){return"helper"}else if(c){return"ambiguous"}else{return"simple"}},pushParams:function(a){for(var b=0,c=a.length;b<c;b++){this.pushParam(a[b])}},pushParam:function(a){if(this.stringParams){if(a.depth){this.addDepth(a.depth)}this.opcode("getContext",a.depth||0);this.opcode("pushStringParam",a.stringModeValue,a.type);if(a.type==="sexpr"){this.sexpr(a)}}else{if(this.trackIds){this.opcode("pushId",a.type,a.idName||a.stringModeValue)}this.accept(a)}},setupFullMustacheParams:function(a,b,c){var d=a.params;this.pushParams(d);this.opcode("pushProgram",b);this.opcode("pushProgram",c);if(a.hash){this.hash(a.hash)}else{this.opcode("emptyHash")}return d}};function e(a,b,d){if(a==null||typeof a!=="string"&&a.constructor!==d.AST.ProgramNode){throw new c("You must pass a string or Handlebars AST to Handlebars.precompile. You passed "+a)}b=b||{};if(!("data"in b)){b.data=true}var e=d.parse(a);var f=(new d.Compiler).compile(e,b);return(new d.JavaScriptCompiler).compile(f,b)}b.precompile=e;function f(a,b,d){if(a==null||typeof a!=="string"&&a.constructor!==d.AST.ProgramNode){throw new c("You must pass a string or Handlebars AST to Handlebars.compile. You passed "+a)}b=b||{};if(!("data"in b)){b.data=true}var e;function f(){var c=d.parse(a);var e=(new d.Compiler).compile(c,b);var f=(new d.JavaScriptCompiler).compile(e,b,undefined,true);return d.template(f)}var g=function(a,b){if(!e){e=f()}return e.call(this,a,b)};g._setup=function(a){if(!e){e=f()}return e._setup(a)};g._child=function(a){if(!e){e=f()}return e._child(a)};return g}b.compile=f;return b}(c);var k=function(a,b){"use strict";var c;var d=a.COMPILER_REVISION;var e=a.REVISION_CHANGES;var f=a.log;var g=b;function h(a){this.value=a}function i(){}i.prototype={nameLookup:function(a,b){var c,d;if(a.indexOf("depth")===0){c=true}if(i.isValidJavaScriptVariableName(b)){d=a+"."+b}else{d=a+"['"+b+"']"}if(c){return"("+a+" && "+d+")"}else{return d}},compilerInfo:function(){var a=d,b=e[a];return[a,b]},appendToBuffer:function(a){if(this.environment.isSimple){return"return "+a+";"}else{return{appendToBuffer:true,content:a,toString:function(){return"buffer += "+a+";"}}}},initializeBuffer:function(){return this.quotedString("")},namespace:"Handlebars",compile:function(a,b,c,d){this.environment=a;this.options=b||{};this.stringParams=this.options.stringParams;this.trackIds=this.options.trackIds;this.precompile=!d;f("debug",this.environment.disassemble()+"\n\n");this.name=this.environment.name;this.isChild=!!c;this.context=c||{programs:[],environments:[]};this.preamble();this.stackSlot=0;this.stackVars=[];this.aliases={};this.registers={list:[]};this.hashes=[];this.compileStack=[];this.inlineStack=[];this.compileChildren(a,b);var e=a.opcodes,h,i,j;for(i=0,j=e.length;i<j;i++){h=e[i];if(h.opcode==="DECLARE"){this[h.name]=h.value}else{this[h.opcode].apply(this,h.args)}if(h.opcode!==this.stripNext){this.stripNext=false}}this.pushSource("");if(this.stackSlot||this.inlineStack.length||this.compileStack.length){throw new g("Compile completed with content left on stack")}var k=this.createFunctionContext(d);if(!this.isChild){var l={compiler:this.compilerInfo(),main:k};var m=this.context.programs;for(i=0,j=m.length;i<j;i++){if(m[i]){l[i]=m[i]}}if(this.environment.usePartial){l.usePartial=true}if(this.options.data){l.useData=true}if(!d){l.compiler=JSON.stringify(l.compiler);l=this.objectLiteral(l)}return l}else{return k}},preamble:function(){this.lastContext=0;this.source=[]},createFunctionContext:function(a){var b="";var c=this.stackVars.concat(this.registers.list);if(c.length>0){b+=", "+c.join(", ")}for(var d in this.aliases){if(this.aliases.hasOwnProperty(d)){b+=", "+d+"="+this.aliases[d]}}var e=["depth0","helpers","partials","data"];for(var f=0,g=this.environment.depths.list.length;f<g;f++){e.push("depth"+this.environment.depths.list[f])}var h=this.mergeSource(b);if(a){e.push(h);return Function.apply(this,e)}else{return"function("+e.join(",")+") {\n "+h+"}"}},mergeSource:function(a){var b="",c,d=!this.forceBuffer,e;for(var f=0,g=this.source.length;f<g;f++){var h=this.source[f];if(h.appendToBuffer){if(c){c=c+"\n + "+h.content}else{c=h.content}}else{if(c){if(!b){e=true;b=c+";\n "}else{b+="buffer += "+c+";\n "}c=undefined}b+=h+"\n ";if(!this.environment.isSimple){d=false}}}if(d){if(c||!b){b+="return "+(c||'""')+";\n"}}else{a+=", buffer = "+(e?"":this.initializeBuffer());if(c){b+="return buffer + "+c+";\n"}else{b+="return buffer;\n"}}if(a){b="var "+a.substring(2)+(e?"":";\n ")+b}return b},blockValue:function(a){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var b=["depth0"];this.setupParams(a,0,b);this.replaceStack(function(a){b.splice(1,0,a);return"blockHelperMissing.call("+b.join(", ")+")"})},ambiguousBlockValue:function(){this.aliases.blockHelperMissing="helpers.blockHelperMissing";var a=["depth0"];this.setupParams("",0,a,true);this.flushInline();var b=this.topStack();a.splice(1,0,b);this.pushSource("if (!"+this.lastHelper+") { "+b+" = blockHelperMissing.call("+a.join(", ")+"); }")},appendContent:function(a){if(this.pendingContent){a=this.pendingContent+a}if(this.stripNext){a=a.replace(/^\s+/,"")}this.pendingContent=a},strip:function(){if(this.pendingContent){this.pendingContent=this.pendingContent.replace(/\s+$/,"")}this.stripNext="strip"},append:function(){this.flushInline();var a=this.popStack();this.pushSource("if("+a+" || "+a+" === 0) { "+this.appendToBuffer(a)+" }");if(this.environment.isSimple){this.pushSource("else { "+this.appendToBuffer("''")+" }")}},appendEscaped:function(){this.aliases.escapeExpression="this.escapeExpression";this.pushSource(this.appendToBuffer("escapeExpression("+this.popStack()+")"))},getContext:function(a){if(this.lastContext!==a){this.lastContext=a}},lookupOnContext:function(a){this.push(this.nameLookup("depth"+this.lastContext,a,"context"))},pushContext:function(){this.pushStackLiteral("depth"+this.lastContext)},resolvePossibleLambda:function(){this.aliases.functionType='"function"';this.replaceStack(function(a){return"typeof "+a+" === functionType ? "+a+".apply(depth0) : "+a})},lookup:function(a){this.replaceStack(function(b){return b+" == null || "+b+" === false ? "+b+" : "+this.nameLookup(b,a,"context")})},lookupData:function(a){if(!a){this.pushStackLiteral("data")}else{this.pushStackLiteral("this.data(data, "+a+")")}},pushStringParam:function(a,b){this.pushStackLiteral("depth"+this.lastContext);this.pushString(b);if(b!=="sexpr"){if(typeof a==="string"){this.pushString(a)}else{this.pushStackLiteral(a)}}},emptyHash:function(){this.pushStackLiteral("{}");if(this.trackIds){this.push("{}")}if(this.stringParams){this.push("{}");this.push("{}")}},pushHash:function(){if(this.hash){this.hashes.push(this.hash)}this.hash={values:[],types:[],contexts:[],ids:[]}},popHash:function(){var a=this.hash;this.hash=this.hashes.pop();if(this.trackIds){this.push("{"+a.ids.join(",")+"}")}if(this.stringParams){this.push("{"+a.contexts.join(",")+"}");this.push("{"+a.types.join(",")+"}")}this.push("{\n "+a.values.join(",\n ")+"\n }")},pushString:function(a){this.pushStackLiteral(this.quotedString(a))},push:function(a){this.inlineStack.push(a);return a},pushLiteral:function(a){this.pushStackLiteral(a)},pushProgram:function(a){if(a!=null){this.pushStackLiteral(this.programExpression(a))}else{this.pushStackLiteral(null)}},invokeHelper:function(a,b,c){this.aliases.helperMissing="helpers.helperMissing";this.useRegister("helper");var d=this.popStack();var e=this.setupHelper(a,b);var f="helper = "+e.name+" || "+d+" || helperMissing";if(e.paramsInit){f+=","+e.paramsInit}this.push("("+f+",helper.call("+e.callParams+"))");if(!c){this.flushInline()}},invokeKnownHelper:function(a,b){var c=this.setupHelper(a,b);this.push(c.name+".call("+c.callParams+")")},invokeAmbiguous:function(a,b){this.aliases.functionType='"function"';this.useRegister("helper");this.emptyHash();var c=this.setupHelper(0,a,b);var d=this.lastHelper=this.nameLookup("helpers",a,"helper");var e=this.nameLookup("depth"+this.lastContext,a,"context");this.push("((helper = "+d+" || "+e+(c.paramsInit?"),("+c.paramsInit:"")+"),"+"(typeof helper === functionType ? helper.call("+c.callParams+") : helper))")},invokePartial:function(a){var b=[this.nameLookup("partials",a,"partial"),"'"+a+"'",this.popStack(),this.popStack(),"helpers","partials"];if(this.options.data){b.push("data")}this.push("this.invokePartial("+b.join(", ")+")")},assignToHash:function(a){var b=this.popStack(),c,d,e;if(this.trackIds){e=this.popStack()}if(this.stringParams){d=this.popStack();c=this.popStack()}var f=this.hash;if(c){f.contexts.push("'"+a+"': "+c)}if(d){f.types.push("'"+a+"': "+d)}if(e){f.ids.push("'"+a+"': "+e)}f.values.push("'"+a+"': ("+b+")")},pushId:function(a,b){if(a==="ID"||a==="DATA"){this.pushString(b)}else if(a==="sexpr"){this.pushStackLiteral("true")}else{this.pushStackLiteral("null")}},compiler:i,compileChildren:function(a,b){var c=a.children,d,e;for(var f=0,g=c.length;f<g;f++){d=c[f];e=new this.compiler;var h=this.matchExistingProgram(d);if(h==null){this.context.programs.push("");h=this.context.programs.length;d.index=h;d.name="program"+h;this.context.programs[h]=e.compile(d,b,this.context,!this.precompile);this.context.environments[h]=d}else{d.index=h;d.name="program"+h}}},matchExistingProgram:function(a){for(var b=0,c=this.context.environments.length;b<c;b++){var d=this.context.environments[b];if(d&&d.equals(a)){return b}}},programExpression:function(a){if(a==null){return"this.noop"}var b=this.environment.children[a],c=b.depths.list,d;var e=[b.index,"data"];for(var f=0,g=c.length;f<g;f++){d=c[f];e.push("depth"+(d-1))}return(c.length===0?"this.program(":"this.programWithDepth(")+e.join(", ")+")"},register:function(a,b){this.useRegister(a);this.pushSource(a+" = "+b+";")},useRegister:function(a){if(!this.registers[a]){this.registers[a]=true;this.registers.list.push(a)}},pushStackLiteral:function(a){return this.push(new h(a))},pushSource:function(a){if(this.pendingContent){this.source.push(this.appendToBuffer(this.quotedString(this.pendingContent)));this.pendingContent=undefined}if(a){this.source.push(a)}},pushStack:function(a){this.flushInline();var b=this.incrStack();if(a){this.pushSource(b+" = "+a+";")}this.compileStack.push(b);return b},replaceStack:function(a){var b="",c=this.isInline(),d,e,f;if(c){var g=this.popStack(true);if(g instanceof h){d=g.value;f=true}else{e=!this.stackSlot;var i=!e?this.topStackName():this.incrStack();b="("+this.push(i)+" = "+g+"),";d=this.topStack()}}else{d=this.topStack()}var j=a.call(this,d);if(c){if(!f){this.popStack()}if(e){this.stackSlot--}this.push("("+b+j+")")}else{if(!/^stack/.test(d)){d=this.nextStack()}this.pushSource(d+" = ("+b+j+");")}return d},nextStack:function(){return this.pushStack()},incrStack:function(){this.stackSlot++;if(this.stackSlot>this.stackVars.length){this.stackVars.push("stack"+this.stackSlot)}return this.topStackName()},topStackName:function(){return"stack"+this.stackSlot},flushInline:function(){var a=this.inlineStack;if(a.length){this.inlineStack=[];for(var b=0,c=a.length;b<c;b++){var d=a[b];if(d instanceof h){this.compileStack.push(d)}else{this.pushStack(d)}}}},isInline:function(){return this.inlineStack.length},popStack:function(a){var b=this.isInline(),c=(b?this.inlineStack:this.compileStack).pop();if(!a&&c instanceof h){return c.value}else{if(!b){if(!this.stackSlot){throw new g("Invalid stack pop")}this.stackSlot--}return c}},topStack:function(a){var b=this.isInline()?this.inlineStack:this.compileStack,c=b[b.length-1];if(!a&&c instanceof h){return c.value}else{return c}},quotedString:function(a){return'"'+a.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\u2028/g,"\\u2028").replace(/\u2029/g,"\\u2029")+'"'},objectLiteral:function(a){var b=[];for(var c in a){if(a.hasOwnProperty(c)){b.push(this.quotedString(c)+":"+a[c])}}return"{"+b.join(",")+"}"},setupHelper:function(a,b,c){var d=[],e=this.setupParams(b,a,d,c);var f=this.nameLookup("helpers",b,"helper");return{params:d,paramsInit:e,name:f,callParams:["depth0"].concat(d).join(", ")}},setupOptions:function(a,b,c){var d={},e=[],f=[],g=[],h,i,j;d.name=this.quotedString(a);d.hash=this.popStack();if(this.trackIds){d.hashIds=this.popStack()}if(this.stringParams){d.hashTypes=this.popStack();d.hashContexts=this.popStack()}i=this.popStack();j=this.popStack();if(j||i){if(!j){j="this.noop"}if(!i){i="this.noop"}d.fn=j;d.inverse=i}var k=b;while(k--){h=this.popStack();c[k]=h;if(this.trackIds){g[k]=this.popStack()}if(this.stringParams){f[k]=this.popStack();e[k]=this.popStack()}}if(this.trackIds){d.ids="["+g.join(",")+"]"}if(this.stringParams){d.types="["+f.join(",")+"]";d.contexts="["+e.join(",")+"]"}if(this.options.data){d.data="data"}return d},setupParams:function(a,b,c,d){var e=this.objectLiteral(this.setupOptions(a,b,c));if(d){this.useRegister("options");c.push("options");return"options="+e}else{c.push(e);return""}}};var j=("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(" ");var k=i.RESERVED_WORDS={};for(var l=0,m=j.length;l<m;l++){k[j[l]]=true}i.isValidJavaScriptVariableName=function(a){return!i.RESERVED_WORDS[a]&&/^[a-zA-Z_$][0-9a-zA-Z_$]*$/.test(a)};c=i;return c}(d,c);var l=function(a,b,c,d,e){"use strict";var f;var g=a;var h=b;var i=c.parser;var j=c.parse;var k=d.Compiler;var l=d.compile;var m=d.precompile;var n=e;var o=g.create;var p=function(){var a=o();a.compile=function(b,c){return l(b,c,a)};a.precompile=function(b,c){return m(b,c,a)};a.AST=h;a.Compiler=k;a.JavaScriptCompiler=n;a.Parser=i;a.parse=j;return a};g=p();g.create=p;f=g;return f}(f,g,i,j,k);return l}();Handlebars.registerHelper("equal",function(a,b,c){a=a.toString();b=b.toString();if(a==b){return c.fn(this)}else{return c.inverse(this)}});Handlebars.registerHelper("tz",function(a){var b=moment.utc(a,"HH:mm:ss").toDate();return moment(b).format("HH:mm")});function escape(a){var b={"<":"&lt;",">":"&gt;"};return a.replace(/[<>]/g,function(a){return b[a]})}Handlebars.registerHelper("uri",function(a){var b=[];a=URI.withinString(a,function(a){b.push(a);return"$("+(b.length-1)+")"});a=escape(a);for(var c in b){var d=escape(b[c]);a=a.replace("$("+c+")","<a href='"+d.replace(/^www/,"//www")+"' target='_blank'>"+d+"</a>")}return a});(function(a,b){if(typeof module==="object"&&typeof module.exports==="object"){module.exports=a.document?b(a,true):function(a){if(!a.document){throw new Error("jQuery requires a window with a document")}return b(a)}}else{b(a)}})(typeof window!=="undefined"?window:this,function(a,b){var c=[];var d=c.slice;var e=c.concat;var f=c.push;var g=c.indexOf;var h={};var i=h.toString;var j=h.hasOwnProperty;var k={};var l=a.document,m="2.1.1",n=function(a,b){return new n.fn.init(a,b)},o=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,p=/^-ms-/,q=/-([\da-z])/gi,r=function(a,b){return b.toUpperCase()};n.fn=n.prototype={jquery:m,constructor:n,selector:"",length:0,toArray:function(){return d.call(this)},get:function(a){return a!=null?a<0?this[a+this.length]:this[a]:d.call(this)},pushStack:function(a){var b=n.merge(this.constructor(),a);b.prevObject=this;b.context=this.context;return b},each:function(a,b){return n.each(this,a,b)},map:function(a){return this.pushStack(n.map(this,function(b,c){return a.call(b,c,b)}))},slice:function(){return this.pushStack(d.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(a){var b=this.length,c=+a+(a<0?b:0);return this.pushStack(c>=0&&c<b?[this[c]]:[])},end:function(){return this.prevObject||this.constructor(null)},push:f,sort:c.sort,splice:c.splice};n.extend=n.fn.extend=function(){var a,b,c,d,e,f,g=arguments[0]||{},h=1,i=arguments.length,j=false;if(typeof g==="boolean"){j=g;g=arguments[h]||{};h++}if(typeof g!=="object"&&!n.isFunction(g)){g={}}if(h===i){g=this;h--}for(;h<i;h++){if((a=arguments[h])!=null){for(b in a){c=g[b];d=a[b];if(g===d){continue}if(j&&d&&(n.isPlainObject(d)||(e=n.isArray(d)))){if(e){e=false;f=c&&n.isArray(c)?c:[]}else{f=c&&n.isPlainObject(c)?c:{}}g[b]=n.extend(j,f,d)}else if(d!==undefined){g[b]=d}}}}return g};n.extend({expando:"jQuery"+(m+Math.random()).replace(/\D/g,""),isReady:true,error:function(a){throw new Error(a)},noop:function(){},isFunction:function(a){return n.type(a)==="function"},isArray:Array.isArray,isWindow:function(a){return a!=null&&a===a.window},isNumeric:function(a){return!n.isArray(a)&&a-parseFloat(a)>=0},isPlainObject:function(a){if(n.type(a)!=="object"||a.nodeType||n.isWindow(a)){return false}if(a.constructor&&!j.call(a.constructor.prototype,"isPrototypeOf")){return false}return true},isEmptyObject:function(a){var b;for(b in a){return false}return true},type:function(a){if(a==null){return a+""}return typeof a==="object"||typeof a==="function"?h[i.call(a)]||"object":typeof a},globalEval:function(a){var b,c=eval;a=n.trim(a);if(a){if(a.indexOf("use strict")===1){b=l.createElement("script");b.text=a;l.head.appendChild(b).parentNode.removeChild(b)}else{c(a)}}},camelCase:function(a){return a.replace(p,"ms-").replace(q,r)},nodeName:function(a,b){return a.nodeName&&a.nodeName.toLowerCase()===b.toLowerCase()},each:function(a,b,c){var d,e=0,f=a.length,g=s(a);if(c){if(g){for(;e<f;e++){d=b.apply(a[e],c);if(d===false){break}}}else{for(e in a){d=b.apply(a[e],c);if(d===false){break}}}}else{if(g){for(;e<f;e++){d=b.call(a[e],e,a[e]);if(d===false){break}}}else{for(e in a){d=b.call(a[e],e,a[e]);if(d===false){break}}}}return a},trim:function(a){return a==null?"":(a+"").replace(o,"")},makeArray:function(a,b){var c=b||[];if(a!=null){if(s(Object(a))){n.merge(c,typeof a==="string"?[a]:a)}else{f.call(c,a)}}return c},inArray:function(a,b,c){return b==null?-1:g.call(b,a,c)},merge:function(a,b){var c=+b.length,d=0,e=a.length;for(;d<c;d++){a[e++]=b[d]}a.length=e;return a},grep:function(a,b,c){var d,e=[],f=0,g=a.length,h=!c;for(;f<g;f++){d=!b(a[f],f);if(d!==h){e.push(a[f])}}return e},map:function(a,b,c){var d,f=0,g=a.length,h=s(a),i=[];if(h){for(;f<g;f++){d=b(a[f],f,c);if(d!=null){i.push(d)}}}else{for(f in a){d=b(a[f],f,c);if(d!=null){i.push(d)}}}return e.apply([],i)},guid:1,proxy:function(a,b){var c,e,f;if(typeof b==="string"){c=a[b];b=a;a=c}if(!n.isFunction(a)){return undefined}e=d.call(arguments,2);f=function(){return a.apply(b||this,e.concat(d.call(arguments)))};f.guid=a.guid=a.guid||n.guid++;return f},now:Date.now,support:k});n.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(a,b){h["[object "+b+"]"]=b.toLowerCase()});function s(a){var b=a.length,c=n.type(a);if(c==="function"||n.isWindow(a)){return false}if(a.nodeType===1&&b){return true}return c==="array"||b===0||typeof b==="number"&&b>0&&b-1 in a}var t=function(a){var b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u="sizzle"+-new Date,v=a.document,w=0,x=0,y=gb(),z=gb(),A=gb(),B=function(a,b){if(a===b){l=true}return 0},C=typeof undefined,D=1<<31,E={}.hasOwnProperty,F=[],G=F.pop,H=F.push,I=F.push,J=F.slice,K=F.indexOf||function(a){var b=0,c=this.length;for(;b<c;b++){if(this[b]===a){return b}}return-1},L="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",M="[\\x20\\t\\r\\n\\f]",N="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",O=N.replace("w","w#"),P="\\["+M+"*("+N+")(?:"+M+"*([*^$|!~]?=)"+M+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+O+"))|)"+M+"*\\]",Q=":("+N+")(?:\\(("+"('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|"+"((?:\\\\.|[^\\\\()[\\]]|"+P+")*)|"+".*"+")\\)|)",R=new RegExp("^"+M+"+|((?:^|[^\\\\])(?:\\\\.)*)"+M+"+$","g"),S=new RegExp("^"+M+"*,"+M+"*"),T=new RegExp("^"+M+"*([>+~]|"+M+")"+M+"*"),U=new RegExp("="+M+"*([^\\]'\"]*?)"+M+"*\\]","g"),V=new RegExp(Q),W=new RegExp("^"+O+"$"),X={ID:new RegExp("^#("+N+")"),CLASS:new RegExp("^\\.("+N+")"),TAG:new RegExp("^("+N.replace("w","w*")+")"),ATTR:new RegExp("^"+P),PSEUDO:new RegExp("^"+Q),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+L+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,Z=/^h\d$/i,$=/^[^{]+\{\s*\[native \w/,_=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ab=/[+~]/,bb=/'|\\/g,cb=new RegExp("\\\\([\\da-f]{1,6}"+M+"?|("+M+")|.)","ig"),db=function(a,b,c){var d="0x"+b-65536;
return d!==d||c?b:d<0?String.fromCharCode(d+65536):String.fromCharCode(d>>10|55296,d&1023|56320)};try{I.apply(F=J.call(v.childNodes),v.childNodes);F[v.childNodes.length].nodeType}catch(eb){I={apply:F.length?function(a,b){H.apply(a,J.call(b))}:function(a,b){var c=a.length,d=0;while(a[c++]=b[d++]){}a.length=c-1}}}function fb(a,b,d,e){var f,h,j,k,l,o,r,s,w,x;if((b?b.ownerDocument||b:v)!==n){m(b)}b=b||n;d=d||[];if(!a||typeof a!=="string"){return d}if((k=b.nodeType)!==1&&k!==9){return[]}if(p&&!e){if(f=_.exec(a)){if(j=f[1]){if(k===9){h=b.getElementById(j);if(h&&h.parentNode){if(h.id===j){d.push(h);return d}}else{return d}}else{if(b.ownerDocument&&(h=b.ownerDocument.getElementById(j))&&t(b,h)&&h.id===j){d.push(h);return d}}}else if(f[2]){I.apply(d,b.getElementsByTagName(a));return d}else if((j=f[3])&&c.getElementsByClassName&&b.getElementsByClassName){I.apply(d,b.getElementsByClassName(j));return d}}if(c.qsa&&(!q||!q.test(a))){s=r=u;w=b;x=k===9&&a;if(k===1&&b.nodeName.toLowerCase()!=="object"){o=g(a);if(r=b.getAttribute("id")){s=r.replace(bb,"\\$&")}else{b.setAttribute("id",s)}s="[id='"+s+"'] ";l=o.length;while(l--){o[l]=s+qb(o[l])}w=ab.test(a)&&ob(b.parentNode)||b;x=o.join(",")}if(x){try{I.apply(d,w.querySelectorAll(x));return d}catch(y){}finally{if(!r){b.removeAttribute("id")}}}}}return i(a.replace(R,"$1"),b,d,e)}function gb(){var a=[];function b(c,e){if(a.push(c+" ")>d.cacheLength){delete b[a.shift()]}return b[c+" "]=e}return b}function hb(a){a[u]=true;return a}function ib(a){var b=n.createElement("div");try{return!!a(b)}catch(c){return false}finally{if(b.parentNode){b.parentNode.removeChild(b)}b=null}}function jb(a,b){var c=a.split("|"),e=a.length;while(e--){d.attrHandle[c[e]]=b}}function kb(a,b){var c=b&&a,d=c&&a.nodeType===1&&b.nodeType===1&&(~b.sourceIndex||D)-(~a.sourceIndex||D);if(d){return d}if(c){while(c=c.nextSibling){if(c===b){return-1}}}return a?1:-1}function lb(a){return function(b){var c=b.nodeName.toLowerCase();return c==="input"&&b.type===a}}function mb(a){return function(b){var c=b.nodeName.toLowerCase();return(c==="input"||c==="button")&&b.type===a}}function nb(a){return hb(function(b){b=+b;return hb(function(c,d){var e,f=a([],c.length,b),g=f.length;while(g--){if(c[e=f[g]]){c[e]=!(d[e]=c[e])}}})})}function ob(a){return a&&typeof a.getElementsByTagName!==C&&a}c=fb.support={};f=fb.isXML=function(a){var b=a&&(a.ownerDocument||a).documentElement;return b?b.nodeName!=="HTML":false};m=fb.setDocument=function(a){var b,e=a?a.ownerDocument||a:v,g=e.defaultView;if(e===n||e.nodeType!==9||!e.documentElement){return n}n=e;o=e.documentElement;p=!f(e);if(g&&g!==g.top){if(g.addEventListener){g.addEventListener("unload",function(){m()},false)}else if(g.attachEvent){g.attachEvent("onunload",function(){m()})}}c.attributes=ib(function(a){a.className="i";return!a.getAttribute("className")});c.getElementsByTagName=ib(function(a){a.appendChild(e.createComment(""));return!a.getElementsByTagName("*").length});c.getElementsByClassName=$.test(e.getElementsByClassName)&&ib(function(a){a.innerHTML="<div class='a'></div><div class='a i'></div>";a.firstChild.className="i";return a.getElementsByClassName("i").length===2});c.getById=ib(function(a){o.appendChild(a).id=u;return!e.getElementsByName||!e.getElementsByName(u).length});if(c.getById){d.find["ID"]=function(a,b){if(typeof b.getElementById!==C&&p){var c=b.getElementById(a);return c&&c.parentNode?[c]:[]}};d.filter["ID"]=function(a){var b=a.replace(cb,db);return function(a){return a.getAttribute("id")===b}}}else{delete d.find["ID"];d.filter["ID"]=function(a){var b=a.replace(cb,db);return function(a){var c=typeof a.getAttributeNode!==C&&a.getAttributeNode("id");return c&&c.value===b}}}d.find["TAG"]=c.getElementsByTagName?function(a,b){if(typeof b.getElementsByTagName!==C){return b.getElementsByTagName(a)}}:function(a,b){var c,d=[],e=0,f=b.getElementsByTagName(a);if(a==="*"){while(c=f[e++]){if(c.nodeType===1){d.push(c)}}return d}return f};d.find["CLASS"]=c.getElementsByClassName&&function(a,b){if(typeof b.getElementsByClassName!==C&&p){return b.getElementsByClassName(a)}};r=[];q=[];if(c.qsa=$.test(e.querySelectorAll)){ib(function(a){a.innerHTML="<select msallowclip=''><option selected=''></option></select>";if(a.querySelectorAll("[msallowclip^='']").length){q.push("[*^$]="+M+"*(?:''|\"\")")}if(!a.querySelectorAll("[selected]").length){q.push("\\["+M+"*(?:value|"+L+")")}if(!a.querySelectorAll(":checked").length){q.push(":checked")}});ib(function(a){var b=e.createElement("input");b.setAttribute("type","hidden");a.appendChild(b).setAttribute("name","D");if(a.querySelectorAll("[name=d]").length){q.push("name"+M+"*[*^$|!~]?=")}if(!a.querySelectorAll(":enabled").length){q.push(":enabled",":disabled")}a.querySelectorAll("*,:x");q.push(",.*:")})}if(c.matchesSelector=$.test(s=o.matches||o.webkitMatchesSelector||o.mozMatchesSelector||o.oMatchesSelector||o.msMatchesSelector)){ib(function(a){c.disconnectedMatch=s.call(a,"div");s.call(a,"[s!='']:x");r.push("!=",Q)})}q=q.length&&new RegExp(q.join("|"));r=r.length&&new RegExp(r.join("|"));b=$.test(o.compareDocumentPosition);t=b||$.test(o.contains)?function(a,b){var c=a.nodeType===9?a.documentElement:a,d=b&&b.parentNode;return a===d||!!(d&&d.nodeType===1&&(c.contains?c.contains(d):a.compareDocumentPosition&&a.compareDocumentPosition(d)&16))}:function(a,b){if(b){while(b=b.parentNode){if(b===a){return true}}}return false};B=b?function(a,b){if(a===b){l=true;return 0}var d=!a.compareDocumentPosition-!b.compareDocumentPosition;if(d){return d}d=(a.ownerDocument||a)===(b.ownerDocument||b)?a.compareDocumentPosition(b):1;if(d&1||!c.sortDetached&&b.compareDocumentPosition(a)===d){if(a===e||a.ownerDocument===v&&t(v,a)){return-1}if(b===e||b.ownerDocument===v&&t(v,b)){return 1}return k?K.call(k,a)-K.call(k,b):0}return d&4?-1:1}:function(a,b){if(a===b){l=true;return 0}var c,d=0,f=a.parentNode,g=b.parentNode,h=[a],i=[b];if(!f||!g){return a===e?-1:b===e?1:f?-1:g?1:k?K.call(k,a)-K.call(k,b):0}else if(f===g){return kb(a,b)}c=a;while(c=c.parentNode){h.unshift(c)}c=b;while(c=c.parentNode){i.unshift(c)}while(h[d]===i[d]){d++}return d?kb(h[d],i[d]):h[d]===v?-1:i[d]===v?1:0};return e};fb.matches=function(a,b){return fb(a,null,null,b)};fb.matchesSelector=function(a,b){if((a.ownerDocument||a)!==n){m(a)}b=b.replace(U,"='$1']");if(c.matchesSelector&&p&&(!r||!r.test(b))&&(!q||!q.test(b))){try{var d=s.call(a,b);if(d||c.disconnectedMatch||a.document&&a.document.nodeType!==11){return d}}catch(e){}}return fb(b,n,null,[a]).length>0};fb.contains=function(a,b){if((a.ownerDocument||a)!==n){m(a)}return t(a,b)};fb.attr=function(a,b){if((a.ownerDocument||a)!==n){m(a)}var e=d.attrHandle[b.toLowerCase()],f=e&&E.call(d.attrHandle,b.toLowerCase())?e(a,b,!p):undefined;return f!==undefined?f:c.attributes||!p?a.getAttribute(b):(f=a.getAttributeNode(b))&&f.specified?f.value:null};fb.error=function(a){throw new Error("Syntax error, unrecognized expression: "+a)};fb.uniqueSort=function(a){var b,d=[],e=0,f=0;l=!c.detectDuplicates;k=!c.sortStable&&a.slice(0);a.sort(B);if(l){while(b=a[f++]){if(b===a[f]){e=d.push(f)}}while(e--){a.splice(d[e],1)}}k=null;return a};e=fb.getText=function(a){var b,c="",d=0,f=a.nodeType;if(!f){while(b=a[d++]){c+=e(b)}}else if(f===1||f===9||f===11){if(typeof a.textContent==="string"){return a.textContent}else{for(a=a.firstChild;a;a=a.nextSibling){c+=e(a)}}}else if(f===3||f===4){return a.nodeValue}return c};d=fb.selectors={cacheLength:50,createPseudo:hb,match:X,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:true}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:true},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(a){a[1]=a[1].replace(cb,db);a[3]=(a[3]||a[4]||a[5]||"").replace(cb,db);if(a[2]==="~="){a[3]=" "+a[3]+" "}return a.slice(0,4)},CHILD:function(a){a[1]=a[1].toLowerCase();if(a[1].slice(0,3)==="nth"){if(!a[3]){fb.error(a[0])}a[4]=+(a[4]?a[5]+(a[6]||1):2*(a[3]==="even"||a[3]==="odd"));a[5]=+(a[7]+a[8]||a[3]==="odd")}else if(a[3]){fb.error(a[0])}return a},PSEUDO:function(a){var b,c=!a[6]&&a[2];if(X["CHILD"].test(a[0])){return null}if(a[3]){a[2]=a[4]||a[5]||""}else if(c&&V.test(c)&&(b=g(c,true))&&(b=c.indexOf(")",c.length-b)-c.length)){a[0]=a[0].slice(0,b);a[2]=c.slice(0,b)}return a.slice(0,3)}},filter:{TAG:function(a){var b=a.replace(cb,db).toLowerCase();return a==="*"?function(){return true}:function(a){return a.nodeName&&a.nodeName.toLowerCase()===b}},CLASS:function(a){var b=y[a+" "];return b||(b=new RegExp("(^|"+M+")"+a+"("+M+"|$)"))&&y(a,function(a){return b.test(typeof a.className==="string"&&a.className||typeof a.getAttribute!==C&&a.getAttribute("class")||"")})},ATTR:function(a,b,c){return function(d){var e=fb.attr(d,a);if(e==null){return b==="!="}if(!b){return true}e+="";return b==="="?e===c:b==="!="?e!==c:b==="^="?c&&e.indexOf(c)===0:b==="*="?c&&e.indexOf(c)>-1:b==="$="?c&&e.slice(-c.length)===c:b==="~="?(" "+e+" ").indexOf(c)>-1:b==="|="?e===c||e.slice(0,c.length+1)===c+"-":false}},CHILD:function(a,b,c,d,e){var f=a.slice(0,3)!=="nth",g=a.slice(-4)!=="last",h=b==="of-type";return d===1&&e===0?function(a){return!!a.parentNode}:function(b,c,i){var j,k,l,m,n,o,p=f!==g?"nextSibling":"previousSibling",q=b.parentNode,r=h&&b.nodeName.toLowerCase(),s=!i&&!h;if(q){if(f){while(p){l=b;while(l=l[p]){if(h?l.nodeName.toLowerCase()===r:l.nodeType===1){return false}}o=p=a==="only"&&!o&&"nextSibling"}return true}o=[g?q.firstChild:q.lastChild];if(g&&s){k=q[u]||(q[u]={});j=k[a]||[];n=j[0]===w&&j[1];m=j[0]===w&&j[2];l=n&&q.childNodes[n];while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if(l.nodeType===1&&++m&&l===b){k[a]=[w,n,m];break}}}else if(s&&(j=(b[u]||(b[u]={}))[a])&&j[0]===w){m=j[1]}else{while(l=++n&&l&&l[p]||(m=n=0)||o.pop()){if((h?l.nodeName.toLowerCase()===r:l.nodeType===1)&&++m){if(s){(l[u]||(l[u]={}))[a]=[w,m]}if(l===b){break}}}}m-=e;return m===d||m%d===0&&m/d>=0}}},PSEUDO:function(a,b){var c,e=d.pseudos[a]||d.setFilters[a.toLowerCase()]||fb.error("unsupported pseudo: "+a);if(e[u]){return e(b)}if(e.length>1){c=[a,a,"",b];return d.setFilters.hasOwnProperty(a.toLowerCase())?hb(function(a,c){var d,f=e(a,b),g=f.length;while(g--){d=K.call(a,f[g]);a[d]=!(c[d]=f[g])}}):function(a){return e(a,0,c)}}return e}},pseudos:{not:hb(function(a){var b=[],c=[],d=h(a.replace(R,"$1"));return d[u]?hb(function(a,b,c,e){var f,g=d(a,null,e,[]),h=a.length;while(h--){if(f=g[h]){a[h]=!(b[h]=f)}}}):function(a,e,f){b[0]=a;d(b,null,f,c);return!c.pop()}}),has:hb(function(a){return function(b){return fb(a,b).length>0}}),contains:hb(function(a){return function(b){return(b.textContent||b.innerText||e(b)).indexOf(a)>-1}}),lang:hb(function(a){if(!W.test(a||"")){fb.error("unsupported lang: "+a)}a=a.replace(cb,db).toLowerCase();return function(b){var c;do{if(c=p?b.lang:b.getAttribute("xml:lang")||b.getAttribute("lang")){c=c.toLowerCase();return c===a||c.indexOf(a+"-")===0}}while((b=b.parentNode)&&b.nodeType===1);return false}}),target:function(b){var c=a.location&&a.location.hash;return c&&c.slice(1)===b.id},root:function(a){return a===o},focus:function(a){return a===n.activeElement&&(!n.hasFocus||n.hasFocus())&&!!(a.type||a.href||~a.tabIndex)},enabled:function(a){return a.disabled===false},disabled:function(a){return a.disabled===true},checked:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&!!a.checked||b==="option"&&!!a.selected},selected:function(a){if(a.parentNode){a.parentNode.selectedIndex}return a.selected===true},empty:function(a){for(a=a.firstChild;a;a=a.nextSibling){if(a.nodeType<6){return false}}return true},parent:function(a){return!d.pseudos["empty"](a)},header:function(a){return Z.test(a.nodeName)},input:function(a){return Y.test(a.nodeName)},button:function(a){var b=a.nodeName.toLowerCase();return b==="input"&&a.type==="button"||b==="button"},text:function(a){var b;return a.nodeName.toLowerCase()==="input"&&a.type==="text"&&((b=a.getAttribute("type"))==null||b.toLowerCase()==="text")},first:nb(function(){return[0]}),last:nb(function(a,b){return[b-1]}),eq:nb(function(a,b,c){return[c<0?c+b:c]}),even:nb(function(a,b){var c=0;for(;c<b;c+=2){a.push(c)}return a}),odd:nb(function(a,b){var c=1;for(;c<b;c+=2){a.push(c)}return a}),lt:nb(function(a,b,c){var d=c<0?c+b:c;for(;--d>=0;){a.push(d)}return a}),gt:nb(function(a,b,c){var d=c<0?c+b:c;for(;++d<b;){a.push(d)}return a})}};d.pseudos["nth"]=d.pseudos["eq"];for(b in{radio:true,checkbox:true,file:true,password:true,image:true}){d.pseudos[b]=lb(b)}for(b in{submit:true,reset:true}){d.pseudos[b]=mb(b)}function pb(){}pb.prototype=d.filters=d.pseudos;d.setFilters=new pb;g=fb.tokenize=function(a,b){var c,e,f,g,h,i,j,k=z[a+" "];if(k){return b?0:k.slice(0)}h=a;i=[];j=d.preFilter;while(h){if(!c||(e=S.exec(h))){if(e){h=h.slice(e[0].length)||h}i.push(f=[])}c=false;if(e=T.exec(h)){c=e.shift();f.push({value:c,type:e[0].replace(R," ")});h=h.slice(c.length)}for(g in d.filter){if((e=X[g].exec(h))&&(!j[g]||(e=j[g](e)))){c=e.shift();f.push({value:c,type:g,matches:e});h=h.slice(c.length)}}if(!c){break}}return b?h.length:h?fb.error(a):z(a,i).slice(0)};function qb(a){var b=0,c=a.length,d="";for(;b<c;b++){d+=a[b].value}return d}function rb(a,b,c){var d=b.dir,e=c&&d==="parentNode",f=x++;return b.first?function(b,c,f){while(b=b[d]){if(b.nodeType===1||e){return a(b,c,f)}}}:function(b,c,g){var h,i,j=[w,f];if(g){while(b=b[d]){if(b.nodeType===1||e){if(a(b,c,g)){return true}}}}else{while(b=b[d]){if(b.nodeType===1||e){i=b[u]||(b[u]={});if((h=i[d])&&h[0]===w&&h[1]===f){return j[2]=h[2]}else{i[d]=j;if(j[2]=a(b,c,g)){return true}}}}}}}function sb(a){return a.length>1?function(b,c,d){var e=a.length;while(e--){if(!a[e](b,c,d)){return false}}return true}:a[0]}function tb(a,b,c){var d=0,e=b.length;for(;d<e;d++){fb(a,b[d],c)}return c}function ub(a,b,c,d,e){var f,g=[],h=0,i=a.length,j=b!=null;for(;h<i;h++){if(f=a[h]){if(!c||c(f,d,e)){g.push(f);if(j){b.push(h)}}}}return g}function vb(a,b,c,d,e,f){if(d&&!d[u]){d=vb(d)}if(e&&!e[u]){e=vb(e,f)}return hb(function(f,g,h,i){var j,k,l,m=[],n=[],o=g.length,p=f||tb(b||"*",h.nodeType?[h]:h,[]),q=a&&(f||!b)?ub(p,m,a,h,i):p,r=c?e||(f?a:o||d)?[]:g:q;if(c){c(q,r,h,i)}if(d){j=ub(r,n);d(j,[],h,i);k=j.length;while(k--){if(l=j[k]){r[n[k]]=!(q[n[k]]=l)}}}if(f){if(e||a){if(e){j=[];k=r.length;while(k--){if(l=r[k]){j.push(q[k]=l)}}e(null,r=[],j,i)}k=r.length;while(k--){if((l=r[k])&&(j=e?K.call(f,l):m[k])>-1){f[j]=!(g[j]=l)}}}}else{r=ub(r===g?r.splice(o,r.length):r);if(e){e(null,g,r,i)}else{I.apply(g,r)}}})}function wb(a){var b,c,e,f=a.length,g=d.relative[a[0].type],h=g||d.relative[" "],i=g?1:0,k=rb(function(a){return a===b},h,true),l=rb(function(a){return K.call(b,a)>-1},h,true),m=[function(a,c,d){return!g&&(d||c!==j)||((b=c).nodeType?k(a,c,d):l(a,c,d))}];for(;i<f;i++){if(c=d.relative[a[i].type]){m=[rb(sb(m),c)]}else{c=d.filter[a[i].type].apply(null,a[i].matches);if(c[u]){e=++i;for(;e<f;e++){if(d.relative[a[e].type]){break}}return vb(i>1&&sb(m),i>1&&qb(a.slice(0,i-1).concat({value:a[i-2].type===" "?"*":""})).replace(R,"$1"),c,i<e&&wb(a.slice(i,e)),e<f&&wb(a=a.slice(e)),e<f&&qb(a))}m.push(c)}}return sb(m)}function xb(a,b){var c=b.length>0,e=a.length>0,f=function(f,g,h,i,k){var l,m,o,p=0,q="0",r=f&&[],s=[],t=j,u=f||e&&d.find["TAG"]("*",k),v=w+=t==null?1:Math.random()||.1,x=u.length;if(k){j=g!==n&&g}for(;q!==x&&(l=u[q])!=null;q++){if(e&&l){m=0;while(o=a[m++]){if(o(l,g,h)){i.push(l);break}}if(k){w=v}}if(c){if(l=!o&&l){p--}if(f){r.push(l)}}}p+=q;if(c&&q!==p){m=0;while(o=b[m++]){o(r,s,g,h)}if(f){if(p>0){while(q--){if(!(r[q]||s[q])){s[q]=G.call(i)}}}s=ub(s)}I.apply(i,s);if(k&&!f&&s.length>0&&p+b.length>1){fb.uniqueSort(i)}}if(k){w=v;j=t}return r};return c?hb(f):f}h=fb.compile=function(a,b){var c,d=[],e=[],f=A[a+" "];if(!f){if(!b){b=g(a)}c=b.length;while(c--){f=wb(b[c]);if(f[u]){d.push(f)}else{e.push(f)}}f=A(a,xb(e,d));f.selector=a}return f};i=fb.select=function(a,b,e,f){var i,j,k,l,m,n=typeof a==="function"&&a,o=!f&&g(a=n.selector||a);e=e||[];if(o.length===1){j=o[0]=o[0].slice(0);if(j.length>2&&(k=j[0]).type==="ID"&&c.getById&&b.nodeType===9&&p&&d.relative[j[1].type]){b=(d.find["ID"](k.matches[0].replace(cb,db),b)||[])[0];if(!b){return e}else if(n){b=b.parentNode}a=a.slice(j.shift().value.length)}i=X["needsContext"].test(a)?0:j.length;while(i--){k=j[i];if(d.relative[l=k.type]){break}if(m=d.find[l]){if(f=m(k.matches[0].replace(cb,db),ab.test(j[0].type)&&ob(b.parentNode)||b)){j.splice(i,1);a=f.length&&qb(j);if(!a){I.apply(e,f);return e}break}}}}(n||h(a,o))(f,b,!p,e,ab.test(a)&&ob(b.parentNode)||b);return e};c.sortStable=u.split("").sort(B).join("")===u;c.detectDuplicates=!!l;m();c.sortDetached=ib(function(a){return a.compareDocumentPosition(n.createElement("div"))&1});if(!ib(function(a){a.innerHTML="<a href='#'></a>";return a.firstChild.getAttribute("href")==="#"})){jb("type|href|height|width",function(a,b,c){if(!c){return a.getAttribute(b,b.toLowerCase()==="type"?1:2)}})}if(!c.attributes||!ib(function(a){a.innerHTML="<input/>";a.firstChild.setAttribute("value","");return a.firstChild.getAttribute("value")===""})){jb("value",function(a,b,c){if(!c&&a.nodeName.toLowerCase()==="input"){return a.defaultValue}})}if(!ib(function(a){return a.getAttribute("disabled")==null})){jb(L,function(a,b,c){var d;if(!c){return a[b]===true?b.toLowerCase():(d=a.getAttributeNode(b))&&d.specified?d.value:null}})}return fb}(a);n.find=t;n.expr=t.selectors;n.expr[":"]=n.expr.pseudos;n.unique=t.uniqueSort;n.text=t.getText;n.isXMLDoc=t.isXML;n.contains=t.contains;var u=n.expr.match.needsContext;var v=/^<(\w+)\s*\/?>(?:<\/\1>|)$/;var w=/^.[^:#\[\.,]*$/;function x(a,b,c){if(n.isFunction(b)){return n.grep(a,function(a,d){return!!b.call(a,d,a)!==c})}if(b.nodeType){return n.grep(a,function(a){return a===b!==c})}if(typeof b==="string"){if(w.test(b)){return n.filter(b,a,c)}b=n.filter(b,a)}return n.grep(a,function(a){return g.call(b,a)>=0!==c})}n.filter=function(a,b,c){var d=b[0];if(c){a=":not("+a+")"}return b.length===1&&d.nodeType===1?n.find.matchesSelector(d,a)?[d]:[]:n.find.matches(a,n.grep(b,function(a){return a.nodeType===1}))};n.fn.extend({find:function(a){var b,c=this.length,d=[],e=this;if(typeof a!=="string"){return this.pushStack(n(a).filter(function(){for(b=0;b<c;b++){if(n.contains(e[b],this)){return true}}}))}for(b=0;b<c;b++){n.find(a,e[b],d)}d=this.pushStack(c>1?n.unique(d):d);d.selector=this.selector?this.selector+" "+a:a;return d},filter:function(a){return this.pushStack(x(this,a||[],false))},not:function(a){return this.pushStack(x(this,a||[],true))},is:function(a){return!!x(this,typeof a==="string"&&u.test(a)?n(a):a||[],false).length}});var y,z=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,A=n.fn.init=function(a,b){var c,d;if(!a){return this}if(typeof a==="string"){if(a[0]==="<"&&a[a.length-1]===">"&&a.length>=3){c=[null,a,null]}else{c=z.exec(a)}if(c&&(c[1]||!b)){if(c[1]){b=b instanceof n?b[0]:b;n.merge(this,n.parseHTML(c[1],b&&b.nodeType?b.ownerDocument||b:l,true));if(v.test(c[1])&&n.isPlainObject(b)){for(c in b){if(n.isFunction(this[c])){this[c](b[c])}else{this.attr(c,b[c])}}}return this}else{d=l.getElementById(c[2]);if(d&&d.parentNode){this.length=1;this[0]=d}this.context=l;this.selector=a;return this}}else if(!b||b.jquery){return(b||y).find(a)}else{return this.constructor(b).find(a)}}else if(a.nodeType){this.context=this[0]=a;this.length=1;return this}else if(n.isFunction(a)){return typeof y.ready!=="undefined"?y.ready(a):a(n)}if(a.selector!==undefined){this.selector=a.selector;this.context=a.context}return n.makeArray(a,this)};A.prototype=n.fn;y=n(l);var B=/^(?:parents|prev(?:Until|All))/,C={children:true,contents:true,next:true,prev:true};n.extend({dir:function(a,b,c){var d=[],e=c!==undefined;while((a=a[b])&&a.nodeType!==9){if(a.nodeType===1){if(e&&n(a).is(c)){break}d.push(a)}}return d},sibling:function(a,b){var c=[];for(;a;a=a.nextSibling){if(a.nodeType===1&&a!==b){c.push(a)}}return c}});n.fn.extend({has:function(a){var b=n(a,this),c=b.length;return this.filter(function(){var a=0;for(;a<c;a++){if(n.contains(this,b[a])){return true}}})},closest:function(a,b){var c,d=0,e=this.length,f=[],g=u.test(a)||typeof a!=="string"?n(a,b||this.context):0;for(;d<e;d++){for(c=this[d];c&&c!==b;c=c.parentNode){if(c.nodeType<11&&(g?g.index(c)>-1:c.nodeType===1&&n.find.matchesSelector(c,a))){f.push(c);break}}}return this.pushStack(f.length>1?n.unique(f):f)},index:function(a){if(!a){return this[0]&&this[0].parentNode?this.first().prevAll().length:-1}if(typeof a==="string"){return g.call(n(a),this[0])}return g.call(this,a.jquery?a[0]:a)},add:function(a,b){return this.pushStack(n.unique(n.merge(this.get(),n(a,b))))},addBack:function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}});function D(a,b){while((a=a[b])&&a.nodeType!==1){}return a}n.each({parent:function(a){var b=a.parentNode;return b&&b.nodeType!==11?b:null},parents:function(a){return n.dir(a,"parentNode")},parentsUntil:function(a,b,c){return n.dir(a,"parentNode",c)},next:function(a){return D(a,"nextSibling")},prev:function(a){return D(a,"previousSibling")},nextAll:function(a){return n.dir(a,"nextSibling")},prevAll:function(a){return n.dir(a,"previousSibling")},nextUntil:function(a,b,c){return n.dir(a,"nextSibling",c)},prevUntil:function(a,b,c){return n.dir(a,"previousSibling",c)},siblings:function(a){return n.sibling((a.parentNode||{}).firstChild,a)},children:function(a){return n.sibling(a.firstChild)},contents:function(a){return a.contentDocument||n.merge([],a.childNodes)}},function(a,b){n.fn[a]=function(c,d){var e=n.map(this,b,c);if(a.slice(-5)!=="Until"){d=c}if(d&&typeof d==="string"){e=n.filter(d,e)}if(this.length>1){if(!C[a]){n.unique(e)}if(B.test(a)){e.reverse()}}return this.pushStack(e)}});var E=/\S+/g;var F={};function G(a){var b=F[a]={};n.each(a.match(E)||[],function(a,c){b[c]=true});return b}n.Callbacks=function(a){a=typeof a==="string"?F[a]||G(a):n.extend({},a);var b,c,d,e,f,g,h=[],i=!a.once&&[],j=function(l){b=a.memory&&l;c=true;g=e||0;e=0;f=h.length;d=true;for(;h&&g<f;g++){if(h[g].apply(l[0],l[1])===false&&a.stopOnFalse){b=false;break}}d=false;if(h){if(i){if(i.length){j(i.shift())}}else if(b){h=[]}else{k.disable()}}},k={add:function(){if(h){var c=h.length;(function g(b){n.each(b,function(b,c){var d=n.type(c);if(d==="function"){if(!a.unique||!k.has(c)){h.push(c)}}else if(c&&c.length&&d!=="string"){g(c)}})})(arguments);if(d){f=h.length}else if(b){e=c;j(b)}}return this},remove:function(){if(h){n.each(arguments,function(a,b){var c;while((c=n.inArray(b,h,c))>-1){h.splice(c,1);if(d){if(c<=f){f--}if(c<=g){g--}}}})}return this},has:function(a){return a?n.inArray(a,h)>-1:!!(h&&h.length)},empty:function(){h=[];f=0;return this},disable:function(){h=i=b=undefined;return this},disabled:function(){return!h},lock:function(){i=undefined;if(!b){k.disable()}return this},locked:function(){return!i},fireWith:function(a,b){if(h&&(!c||i)){b=b||[];b=[a,b.slice?b.slice():b];if(d){i.push(b)}else{j(b)}}return this},fire:function(){k.fireWith(this,arguments);return this},fired:function(){return!!c}};return k};n.extend({Deferred:function(a){var b=[["resolve","done",n.Callbacks("once memory"),"resolved"],["reject","fail",n.Callbacks("once memory"),"rejected"],["notify","progress",n.Callbacks("memory")]],c="pending",d={state:function(){return c},always:function(){e.done(arguments).fail(arguments);return this},then:function(){var a=arguments;return n.Deferred(function(c){n.each(b,function(b,f){var g=n.isFunction(a[b])&&a[b];e[f[1]](function(){var a=g&&g.apply(this,arguments);if(a&&n.isFunction(a.promise)){a.promise().done(c.resolve).fail(c.reject).progress(c.notify)}else{c[f[0]+"With"](this===d?c.promise():this,g?[a]:arguments)}})});a=null}).promise()},promise:function(a){return a!=null?n.extend(a,d):d}},e={};d.pipe=d.then;n.each(b,function(a,f){var g=f[2],h=f[3];d[f[1]]=g.add;if(h){g.add(function(){c=h},b[a^1][2].disable,b[2][2].lock)}e[f[0]]=function(){e[f[0]+"With"](this===e?d:this,arguments);return this};e[f[0]+"With"]=g.fireWith});d.promise(e);if(a){a.call(e,e)}return e},when:function(a){var b=0,c=d.call(arguments),e=c.length,f=e!==1||a&&n.isFunction(a.promise)?e:0,g=f===1?a:n.Deferred(),h=function(a,b,c){return function(e){b[a]=this;c[a]=arguments.length>1?d.call(arguments):e;if(c===i){g.notifyWith(b,c)}else if(!--f){g.resolveWith(b,c)}}},i,j,k;if(e>1){i=new Array(e);j=new Array(e);k=new Array(e);for(;b<e;b++){if(c[b]&&n.isFunction(c[b].promise)){c[b].promise().done(h(b,k,c)).fail(g.reject).progress(h(b,j,i))}else{--f}}}if(!f){g.resolveWith(k,c)}return g.promise()}});var H;n.fn.ready=function(a){n.ready.promise().done(a);return this};n.extend({isReady:false,readyWait:1,holdReady:function(a){if(a){n.readyWait++}else{n.ready(true)}},ready:function(a){if(a===true?--n.readyWait:n.isReady){return}n.isReady=true;if(a!==true&&--n.readyWait>0){return}H.resolveWith(l,[n]);if(n.fn.triggerHandler){n(l).triggerHandler("ready");n(l).off("ready")}}});function I(){l.removeEventListener("DOMContentLoaded",I,false);a.removeEventListener("load",I,false);n.ready()}n.ready.promise=function(b){if(!H){H=n.Deferred();if(l.readyState==="complete"){setTimeout(n.ready)}else{l.addEventListener("DOMContentLoaded",I,false);a.addEventListener("load",I,false)}}return H.promise(b)};n.ready.promise();var J=n.access=function(a,b,c,d,e,f,g){var h=0,i=a.length,j=c==null;if(n.type(c)==="object"){e=true;for(h in c){n.access(a,b,h,c[h],true,f,g)}}else if(d!==undefined){e=true;if(!n.isFunction(d)){g=true}if(j){if(g){b.call(a,d);b=null}else{j=b;b=function(a,b,c){return j.call(n(a),c)}}}if(b){for(;h<i;h++){b(a[h],c,g?d:d.call(a[h],h,b(a[h],c)))}}}return e?a:j?b.call(a):i?b(a[0],c):f};n.acceptData=function(a){return a.nodeType===1||a.nodeType===9||!+a.nodeType};function K(){Object.defineProperty(this.cache={},0,{get:function(){return{}}});this.expando=n.expando+Math.random()}K.uid=1;K.accepts=n.acceptData;K.prototype={key:function(a){if(!K.accepts(a)){return 0}var b={},c=a[this.expando];if(!c){c=K.uid++;try{b[this.expando]={value:c};Object.defineProperties(a,b)}catch(d){b[this.expando]=c;n.extend(a,b)}}if(!this.cache[c]){this.cache[c]={}}return c},set:function(a,b,c){var d,e=this.key(a),f=this.cache[e];if(typeof b==="string"){f[b]=c}else{if(n.isEmptyObject(f)){n.extend(this.cache[e],b)}else{for(d in b){f[d]=b[d]}}}return f},get:function(a,b){var c=this.cache[this.key(a)];return b===undefined?c:c[b]},access:function(a,b,c){var d;if(b===undefined||b&&typeof b==="string"&&c===undefined){d=this.get(a,b);return d!==undefined?d:this.get(a,n.camelCase(b))}this.set(a,b,c);return c!==undefined?c:b},remove:function(a,b){var c,d,e,f=this.key(a),g=this.cache[f];if(b===undefined){this.cache[f]={}}else{if(n.isArray(b)){d=b.concat(b.map(n.camelCase))}else{e=n.camelCase(b);if(b in g){d=[b,e]}else{d=e;d=d in g?[d]:d.match(E)||[]}}c=d.length;while(c--){delete g[d[c]]}}},hasData:function(a){return!n.isEmptyObject(this.cache[a[this.expando]]||{})},discard:function(a){if(a[this.expando]){delete this.cache[a[this.expando]]}}};var L=new K;var M=new K;var N=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,O=/([A-Z])/g;function P(a,b,c){var d;if(c===undefined&&a.nodeType===1){d="data-"+b.replace(O,"-$1").toLowerCase();c=a.getAttribute(d);if(typeof c==="string"){try{c=c==="true"?true:c==="false"?false:c==="null"?null:+c+""===c?+c:N.test(c)?n.parseJSON(c):c}catch(e){}M.set(a,b,c)}else{c=undefined}}return c}n.extend({hasData:function(a){return M.hasData(a)||L.hasData(a)},data:function(a,b,c){return M.access(a,b,c)},removeData:function(a,b){M.remove(a,b)},_data:function(a,b,c){return L.access(a,b,c)},_removeData:function(a,b){L.remove(a,b)}});n.fn.extend({data:function(a,b){var c,d,e,f=this[0],g=f&&f.attributes;if(a===undefined){if(this.length){e=M.get(f);if(f.nodeType===1&&!L.get(f,"hasDataAttrs")){c=g.length;while(c--){if(g[c]){d=g[c].name;if(d.indexOf("data-")===0){d=n.camelCase(d.slice(5));P(f,d,e[d])}}}L.set(f,"hasDataAttrs",true)}}return e}if(typeof a==="object"){return this.each(function(){M.set(this,a)})}return J(this,function(b){var c,d=n.camelCase(a);if(f&&b===undefined){c=M.get(f,a);if(c!==undefined){return c}c=M.get(f,d);if(c!==undefined){return c}c=P(f,d,undefined);if(c!==undefined){return c}return}this.each(function(){var c=M.get(this,d);M.set(this,d,b);if(a.indexOf("-")!==-1&&c!==undefined){M.set(this,a,b)}})},null,b,arguments.length>1,null,true)},removeData:function(a){return this.each(function(){M.remove(this,a)})}});n.extend({queue:function(a,b,c){var d;if(a){b=(b||"fx")+"queue";d=L.get(a,b);if(c){if(!d||n.isArray(c)){d=L.access(a,b,n.makeArray(c))}else{d.push(c)}}return d||[]}},dequeue:function(a,b){b=b||"fx";var c=n.queue(a,b),d=c.length,e=c.shift(),f=n._queueHooks(a,b),g=function(){n.dequeue(a,b)};if(e==="inprogress"){e=c.shift();d--}if(e){if(b==="fx"){c.unshift("inprogress")}delete f.stop;e.call(a,g,f)}if(!d&&f){f.empty.fire()}},_queueHooks:function(a,b){var c=b+"queueHooks";return L.get(a,c)||L.access(a,c,{empty:n.Callbacks("once memory").add(function(){L.remove(a,[b+"queue",c])})})}});n.fn.extend({queue:function(a,b){var c=2;if(typeof a!=="string"){b=a;a="fx";c--}if(arguments.length<c){return n.queue(this[0],a)}return b===undefined?this:this.each(function(){var c=n.queue(this,a,b);n._queueHooks(this,a);if(a==="fx"&&c[0]!=="inprogress"){n.dequeue(this,a)}})},dequeue:function(a){return this.each(function(){n.dequeue(this,a)})},clearQueue:function(a){return this.queue(a||"fx",[])},promise:function(a,b){var c,d=1,e=n.Deferred(),f=this,g=this.length,h=function(){if(!--d){e.resolveWith(f,[f])}};if(typeof a!=="string"){b=a;a=undefined}a=a||"fx";while(g--){c=L.get(f[g],a+"queueHooks");if(c&&c.empty){d++;c.empty.add(h)}}h();return e.promise(b)}});var Q=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source;var R=["Top","Right","Bottom","Left"];var S=function(a,b){a=b||a;return n.css(a,"display")==="none"||!n.contains(a.ownerDocument,a)};var T=/^(?:checkbox|radio)$/i;(function(){var a=l.createDocumentFragment(),b=a.appendChild(l.createElement("div")),c=l.createElement("input");c.setAttribute("type","radio");c.setAttribute("checked","checked");c.setAttribute("name","t");b.appendChild(c);k.checkClone=b.cloneNode(true).cloneNode(true).lastChild.checked;b.innerHTML="<textarea>x</textarea>";k.noCloneChecked=!!b.cloneNode(true).lastChild.defaultValue})();var U=typeof undefined;k.focusinBubbles="onfocusin"in a;var V=/^key/,W=/^(?:mouse|pointer|contextmenu)|click/,X=/^(?:focusinfocus|focusoutblur)$/,Y=/^([^.]*)(?:\.(.+)|)$/;function Z(){return true}function $(){return false}function _(){try{return l.activeElement}catch(a){}}n.event={global:{},add:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.get(a);if(!r){return}if(c.handler){f=c;c=f.handler;e=f.selector}if(!c.guid){c.guid=n.guid++}if(!(i=r.events)){i=r.events={}}if(!(g=r.handle)){g=r.handle=function(b){return typeof n!==U&&n.event.triggered!==b.type?n.event.dispatch.apply(a,arguments):undefined}}b=(b||"").match(E)||[""];j=b.length;while(j--){h=Y.exec(b[j])||[];o=q=h[1];p=(h[2]||"").split(".").sort();if(!o){continue}l=n.event.special[o]||{};o=(e?l.delegateType:l.bindType)||o;l=n.event.special[o]||{};k=n.extend({type:o,origType:q,data:d,handler:c,guid:c.guid,selector:e,needsContext:e&&n.expr.match.needsContext.test(e),namespace:p.join(".")},f);if(!(m=i[o])){m=i[o]=[];m.delegateCount=0;if(!l.setup||l.setup.call(a,d,p,g)===false){if(a.addEventListener){a.addEventListener(o,g,false)}}}if(l.add){l.add.call(a,k);if(!k.handler.guid){k.handler.guid=c.guid}}if(e){m.splice(m.delegateCount++,0,k)}else{m.push(k)}n.event.global[o]=true}},remove:function(a,b,c,d,e){var f,g,h,i,j,k,l,m,o,p,q,r=L.hasData(a)&&L.get(a);if(!r||!(i=r.events)){return}b=(b||"").match(E)||[""];j=b.length;while(j--){h=Y.exec(b[j])||[];o=q=h[1];p=(h[2]||"").split(".").sort();if(!o){for(o in i){n.event.remove(a,o+b[j],c,d,true)}continue}l=n.event.special[o]||{};o=(d?l.delegateType:l.bindType)||o;m=i[o]||[];h=h[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)");g=f=m.length;while(f--){k=m[f];if((e||q===k.origType)&&(!c||c.guid===k.guid)&&(!h||h.test(k.namespace))&&(!d||d===k.selector||d==="**"&&k.selector)){m.splice(f,1);if(k.selector){m.delegateCount--}if(l.remove){l.remove.call(a,k)}}}if(g&&!m.length){if(!l.teardown||l.teardown.call(a,p,r.handle)===false){n.removeEvent(a,o,r.handle)
}delete i[o]}}if(n.isEmptyObject(i)){delete r.handle;L.remove(a,"events")}},trigger:function(b,c,d,e){var f,g,h,i,k,m,o,p=[d||l],q=j.call(b,"type")?b.type:b,r=j.call(b,"namespace")?b.namespace.split("."):[];g=h=d=d||l;if(d.nodeType===3||d.nodeType===8){return}if(X.test(q+n.event.triggered)){return}if(q.indexOf(".")>=0){r=q.split(".");q=r.shift();r.sort()}k=q.indexOf(":")<0&&"on"+q;b=b[n.expando]?b:new n.Event(q,typeof b==="object"&&b);b.isTrigger=e?2:3;b.namespace=r.join(".");b.namespace_re=b.namespace?new RegExp("(^|\\.)"+r.join("\\.(?:.*\\.|)")+"(\\.|$)"):null;b.result=undefined;if(!b.target){b.target=d}c=c==null?[b]:n.makeArray(c,[b]);o=n.event.special[q]||{};if(!e&&o.trigger&&o.trigger.apply(d,c)===false){return}if(!e&&!o.noBubble&&!n.isWindow(d)){i=o.delegateType||q;if(!X.test(i+q)){g=g.parentNode}for(;g;g=g.parentNode){p.push(g);h=g}if(h===(d.ownerDocument||l)){p.push(h.defaultView||h.parentWindow||a)}}f=0;while((g=p[f++])&&!b.isPropagationStopped()){b.type=f>1?i:o.bindType||q;m=(L.get(g,"events")||{})[b.type]&&L.get(g,"handle");if(m){m.apply(g,c)}m=k&&g[k];if(m&&m.apply&&n.acceptData(g)){b.result=m.apply(g,c);if(b.result===false){b.preventDefault()}}}b.type=q;if(!e&&!b.isDefaultPrevented()){if((!o._default||o._default.apply(p.pop(),c)===false)&&n.acceptData(d)){if(k&&n.isFunction(d[q])&&!n.isWindow(d)){h=d[k];if(h){d[k]=null}n.event.triggered=q;d[q]();n.event.triggered=undefined;if(h){d[k]=h}}}}return b.result},dispatch:function(a){a=n.event.fix(a);var b,c,e,f,g,h=[],i=d.call(arguments),j=(L.get(this,"events")||{})[a.type]||[],k=n.event.special[a.type]||{};i[0]=a;a.delegateTarget=this;if(k.preDispatch&&k.preDispatch.call(this,a)===false){return}h=n.event.handlers.call(this,a,j);b=0;while((f=h[b++])&&!a.isPropagationStopped()){a.currentTarget=f.elem;c=0;while((g=f.handlers[c++])&&!a.isImmediatePropagationStopped()){if(!a.namespace_re||a.namespace_re.test(g.namespace)){a.handleObj=g;a.data=g.data;e=((n.event.special[g.origType]||{}).handle||g.handler).apply(f.elem,i);if(e!==undefined){if((a.result=e)===false){a.preventDefault();a.stopPropagation()}}}}}if(k.postDispatch){k.postDispatch.call(this,a)}return a.result},handlers:function(a,b){var c,d,e,f,g=[],h=b.delegateCount,i=a.target;if(h&&i.nodeType&&(!a.button||a.type!=="click")){for(;i!==this;i=i.parentNode||this){if(i.disabled!==true||a.type!=="click"){d=[];for(c=0;c<h;c++){f=b[c];e=f.selector+" ";if(d[e]===undefined){d[e]=f.needsContext?n(e,this).index(i)>=0:n.find(e,this,null,[i]).length}if(d[e]){d.push(f)}}if(d.length){g.push({elem:i,handlers:d})}}}}if(h<b.length){g.push({elem:this,handlers:b.slice(h)})}return g},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(a,b){if(a.which==null){a.which=b.charCode!=null?b.charCode:b.keyCode}return a}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(a,b){var c,d,e,f=b.button;if(a.pageX==null&&b.clientX!=null){c=a.target.ownerDocument||l;d=c.documentElement;e=c.body;a.pageX=b.clientX+(d&&d.scrollLeft||e&&e.scrollLeft||0)-(d&&d.clientLeft||e&&e.clientLeft||0);a.pageY=b.clientY+(d&&d.scrollTop||e&&e.scrollTop||0)-(d&&d.clientTop||e&&e.clientTop||0)}if(!a.which&&f!==undefined){a.which=f&1?1:f&2?3:f&4?2:0}return a}},fix:function(a){if(a[n.expando]){return a}var b,c,d,e=a.type,f=a,g=this.fixHooks[e];if(!g){this.fixHooks[e]=g=W.test(e)?this.mouseHooks:V.test(e)?this.keyHooks:{}}d=g.props?this.props.concat(g.props):this.props;a=new n.Event(f);b=d.length;while(b--){c=d[b];a[c]=f[c]}if(!a.target){a.target=l}if(a.target.nodeType===3){a.target=a.target.parentNode}return g.filter?g.filter(a,f):a},special:{load:{noBubble:true},focus:{trigger:function(){if(this!==_()&&this.focus){this.focus();return false}},delegateType:"focusin"},blur:{trigger:function(){if(this===_()&&this.blur){this.blur();return false}},delegateType:"focusout"},click:{trigger:function(){if(this.type==="checkbox"&&this.click&&n.nodeName(this,"input")){this.click();return false}},_default:function(a){return n.nodeName(a.target,"a")}},beforeunload:{postDispatch:function(a){if(a.result!==undefined&&a.originalEvent){a.originalEvent.returnValue=a.result}}}},simulate:function(a,b,c,d){var e=n.extend(new n.Event,c,{type:a,isSimulated:true,originalEvent:{}});if(d){n.event.trigger(e,null,b)}else{n.event.dispatch.call(b,e)}if(e.isDefaultPrevented()){c.preventDefault()}}};n.removeEvent=function(a,b,c){if(a.removeEventListener){a.removeEventListener(b,c,false)}};n.Event=function(a,b){if(!(this instanceof n.Event)){return new n.Event(a,b)}if(a&&a.type){this.originalEvent=a;this.type=a.type;this.isDefaultPrevented=a.defaultPrevented||a.defaultPrevented===undefined&&a.returnValue===false?Z:$}else{this.type=a}if(b){n.extend(this,b)}this.timeStamp=a&&a.timeStamp||n.now();this[n.expando]=true};n.Event.prototype={isDefaultPrevented:$,isPropagationStopped:$,isImmediatePropagationStopped:$,preventDefault:function(){var a=this.originalEvent;this.isDefaultPrevented=Z;if(a&&a.preventDefault){a.preventDefault()}},stopPropagation:function(){var a=this.originalEvent;this.isPropagationStopped=Z;if(a&&a.stopPropagation){a.stopPropagation()}},stopImmediatePropagation:function(){var a=this.originalEvent;this.isImmediatePropagationStopped=Z;if(a&&a.stopImmediatePropagation){a.stopImmediatePropagation()}this.stopPropagation()}};n.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(a,b){n.event.special[a]={delegateType:b,bindType:b,handle:function(a){var c,d=this,e=a.relatedTarget,f=a.handleObj;if(!e||e!==d&&!n.contains(d,e)){a.type=f.origType;c=f.handler.apply(this,arguments);a.type=b}return c}}});if(!k.focusinBubbles){n.each({focus:"focusin",blur:"focusout"},function(a,b){var c=function(a){n.event.simulate(b,a.target,n.event.fix(a),true)};n.event.special[b]={setup:function(){var d=this.ownerDocument||this,e=L.access(d,b);if(!e){d.addEventListener(a,c,true)}L.access(d,b,(e||0)+1)},teardown:function(){var d=this.ownerDocument||this,e=L.access(d,b)-1;if(!e){d.removeEventListener(a,c,true);L.remove(d,b)}else{L.access(d,b,e)}}}})}n.fn.extend({on:function(a,b,c,d,e){var f,g;if(typeof a==="object"){if(typeof b!=="string"){c=c||b;b=undefined}for(g in a){this.on(g,b,c,a[g],e)}return this}if(c==null&&d==null){d=b;c=b=undefined}else if(d==null){if(typeof b==="string"){d=c;c=undefined}else{d=c;c=b;b=undefined}}if(d===false){d=$}else if(!d){return this}if(e===1){f=d;d=function(a){n().off(a);return f.apply(this,arguments)};d.guid=f.guid||(f.guid=n.guid++)}return this.each(function(){n.event.add(this,a,d,c,b)})},one:function(a,b,c,d){return this.on(a,b,c,d,1)},off:function(a,b,c){var d,e;if(a&&a.preventDefault&&a.handleObj){d=a.handleObj;n(a.delegateTarget).off(d.namespace?d.origType+"."+d.namespace:d.origType,d.selector,d.handler);return this}if(typeof a==="object"){for(e in a){this.off(e,b,a[e])}return this}if(b===false||typeof b==="function"){c=b;b=undefined}if(c===false){c=$}return this.each(function(){n.event.remove(this,a,c,b)})},trigger:function(a,b){return this.each(function(){n.event.trigger(a,b,this)})},triggerHandler:function(a,b){var c=this[0];if(c){return n.event.trigger(a,b,c,true)}}});var ab=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,bb=/<([\w:]+)/,cb=/<|&#?\w+;/,db=/<(?:script|style|link)/i,eb=/checked\s*(?:[^=]|=\s*.checked.)/i,fb=/^$|\/(?:java|ecma)script/i,gb=/^true\/(.*)/,hb=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ib={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ib.optgroup=ib.option;ib.tbody=ib.tfoot=ib.colgroup=ib.caption=ib.thead;ib.th=ib.td;function jb(a,b){return n.nodeName(a,"table")&&n.nodeName(b.nodeType!==11?b:b.firstChild,"tr")?a.getElementsByTagName("tbody")[0]||a.appendChild(a.ownerDocument.createElement("tbody")):a}function kb(a){a.type=(a.getAttribute("type")!==null)+"/"+a.type;return a}function lb(a){var b=gb.exec(a.type);if(b){a.type=b[1]}else{a.removeAttribute("type")}return a}function mb(a,b){var c=0,d=a.length;for(;c<d;c++){L.set(a[c],"globalEval",!b||L.get(b[c],"globalEval"))}}function nb(a,b){var c,d,e,f,g,h,i,j;if(b.nodeType!==1){return}if(L.hasData(a)){f=L.access(a);g=L.set(b,f);j=f.events;if(j){delete g.handle;g.events={};for(e in j){for(c=0,d=j[e].length;c<d;c++){n.event.add(b,e,j[e][c])}}}}if(M.hasData(a)){h=M.access(a);i=n.extend({},h);M.set(b,i)}}function ob(a,b){var c=a.getElementsByTagName?a.getElementsByTagName(b||"*"):a.querySelectorAll?a.querySelectorAll(b||"*"):[];return b===undefined||b&&n.nodeName(a,b)?n.merge([a],c):c}function pb(a,b){var c=b.nodeName.toLowerCase();if(c==="input"&&T.test(a.type)){b.checked=a.checked}else if(c==="input"||c==="textarea"){b.defaultValue=a.defaultValue}}n.extend({clone:function(a,b,c){var d,e,f,g,h=a.cloneNode(true),i=n.contains(a.ownerDocument,a);if(!k.noCloneChecked&&(a.nodeType===1||a.nodeType===11)&&!n.isXMLDoc(a)){g=ob(h);f=ob(a);for(d=0,e=f.length;d<e;d++){pb(f[d],g[d])}}if(b){if(c){f=f||ob(a);g=g||ob(h);for(d=0,e=f.length;d<e;d++){nb(f[d],g[d])}}else{nb(a,h)}}g=ob(h,"script");if(g.length>0){mb(g,!i&&ob(a,"script"))}return h},buildFragment:function(a,b,c,d){var e,f,g,h,i,j,k=b.createDocumentFragment(),l=[],m=0,o=a.length;for(;m<o;m++){e=a[m];if(e||e===0){if(n.type(e)==="object"){n.merge(l,e.nodeType?[e]:e)}else if(!cb.test(e)){l.push(b.createTextNode(e))}else{f=f||k.appendChild(b.createElement("div"));g=(bb.exec(e)||["",""])[1].toLowerCase();h=ib[g]||ib._default;f.innerHTML=h[1]+e.replace(ab,"<$1></$2>")+h[2];j=h[0];while(j--){f=f.lastChild}n.merge(l,f.childNodes);f=k.firstChild;f.textContent=""}}}k.textContent="";m=0;while(e=l[m++]){if(d&&n.inArray(e,d)!==-1){continue}i=n.contains(e.ownerDocument,e);f=ob(k.appendChild(e),"script");if(i){mb(f)}if(c){j=0;while(e=f[j++]){if(fb.test(e.type||"")){c.push(e)}}}}return k},cleanData:function(a){var b,c,d,e,f=n.event.special,g=0;for(;(c=a[g])!==undefined;g++){if(n.acceptData(c)){e=c[L.expando];if(e&&(b=L.cache[e])){if(b.events){for(d in b.events){if(f[d]){n.event.remove(c,d)}else{n.removeEvent(c,d,b.handle)}}}if(L.cache[e]){delete L.cache[e]}}}delete M.cache[c[M.expando]]}}});n.fn.extend({text:function(a){return J(this,function(a){return a===undefined?n.text(this):this.empty().each(function(){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){this.textContent=a}})},null,a,arguments.length)},append:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.appendChild(a)}})},prepend:function(){return this.domManip(arguments,function(a){if(this.nodeType===1||this.nodeType===11||this.nodeType===9){var b=jb(this,a);b.insertBefore(a,b.firstChild)}})},before:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this)}})},after:function(){return this.domManip(arguments,function(a){if(this.parentNode){this.parentNode.insertBefore(a,this.nextSibling)}})},remove:function(a,b){var c,d=a?n.filter(a,this):this,e=0;for(;(c=d[e])!=null;e++){if(!b&&c.nodeType===1){n.cleanData(ob(c))}if(c.parentNode){if(b&&n.contains(c.ownerDocument,c)){mb(ob(c,"script"))}c.parentNode.removeChild(c)}}return this},empty:function(){var a,b=0;for(;(a=this[b])!=null;b++){if(a.nodeType===1){n.cleanData(ob(a,false));a.textContent=""}}return this},clone:function(a,b){a=a==null?false:a;b=b==null?a:b;return this.map(function(){return n.clone(this,a,b)})},html:function(a){return J(this,function(a){var b=this[0]||{},c=0,d=this.length;if(a===undefined&&b.nodeType===1){return b.innerHTML}if(typeof a==="string"&&!db.test(a)&&!ib[(bb.exec(a)||["",""])[1].toLowerCase()]){a=a.replace(ab,"<$1></$2>");try{for(;c<d;c++){b=this[c]||{};if(b.nodeType===1){n.cleanData(ob(b,false));b.innerHTML=a}}b=0}catch(e){}}if(b){this.empty().append(a)}},null,a,arguments.length)},replaceWith:function(){var a=arguments[0];this.domManip(arguments,function(b){a=this.parentNode;n.cleanData(ob(this));if(a){a.replaceChild(b,this)}});return a&&(a.length||a.nodeType)?this:this.remove()},detach:function(a){return this.remove(a,true)},domManip:function(a,b){a=e.apply([],a);var c,d,f,g,h,i,j=0,l=this.length,m=this,o=l-1,p=a[0],q=n.isFunction(p);if(q||l>1&&typeof p==="string"&&!k.checkClone&&eb.test(p)){return this.each(function(c){var d=m.eq(c);if(q){a[0]=p.call(this,c,d.html())}d.domManip(a,b)})}if(l){c=n.buildFragment(a,this[0].ownerDocument,false,this);d=c.firstChild;if(c.childNodes.length===1){c=d}if(d){f=n.map(ob(c,"script"),kb);g=f.length;for(;j<l;j++){h=c;if(j!==o){h=n.clone(h,true,true);if(g){n.merge(f,ob(h,"script"))}}b.call(this[j],h,j)}if(g){i=f[f.length-1].ownerDocument;n.map(f,lb);for(j=0;j<g;j++){h=f[j];if(fb.test(h.type||"")&&!L.access(h,"globalEval")&&n.contains(i,h)){if(h.src){if(n._evalUrl){n._evalUrl(h.src)}}else{n.globalEval(h.textContent.replace(hb,""))}}}}}}return this}});n.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(a,b){n.fn[a]=function(a){var c,d=[],e=n(a),g=e.length-1,h=0;for(;h<=g;h++){c=h===g?this:this.clone(true);n(e[h])[b](c);f.apply(d,c.get())}return this.pushStack(d)}});var qb,rb={};function sb(b,c){var d,e=n(c.createElement(b)).appendTo(c.body),f=a.getDefaultComputedStyle&&(d=a.getDefaultComputedStyle(e[0]))?d.display:n.css(e[0],"display");e.detach();return f}function tb(a){var b=l,c=rb[a];if(!c){c=sb(a,b);if(c==="none"||!c){qb=(qb||n("<iframe frameborder='0' width='0' height='0'/>")).appendTo(b.documentElement);b=qb[0].contentDocument;b.write();b.close();c=sb(a,b);qb.detach()}rb[a]=c}return c}var ub=/^margin/;var vb=new RegExp("^("+Q+")(?!px)[a-z%]+$","i");var wb=function(a){return a.ownerDocument.defaultView.getComputedStyle(a,null)};function xb(a,b,c){var d,e,f,g,h=a.style;c=c||wb(a);if(c){g=c.getPropertyValue(b)||c[b]}if(c){if(g===""&&!n.contains(a.ownerDocument,a)){g=n.style(a,b)}if(vb.test(g)&&ub.test(b)){d=h.width;e=h.minWidth;f=h.maxWidth;h.minWidth=h.maxWidth=h.width=g;g=c.width;h.width=d;h.minWidth=e;h.maxWidth=f}}return g!==undefined?g+"":g}function yb(a,b){return{get:function(){if(a()){delete this.get;return}return(this.get=b).apply(this,arguments)}}}(function(){var b,c,d=l.documentElement,e=l.createElement("div"),f=l.createElement("div");if(!f.style){return}f.style.backgroundClip="content-box";f.cloneNode(true).style.backgroundClip="";k.clearCloneStyle=f.style.backgroundClip==="content-box";e.style.cssText="border:0;width:0;height:0;top:0;left:-9999px;margin-top:1px;"+"position:absolute";e.appendChild(f);function g(){f.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;"+"box-sizing:border-box;display:block;margin-top:1%;top:1%;"+"border:1px;padding:1px;width:4px;position:absolute";f.innerHTML="";d.appendChild(e);var g=a.getComputedStyle(f,null);b=g.top!=="1%";c=g.width==="4px";d.removeChild(e)}if(a.getComputedStyle){n.extend(k,{pixelPosition:function(){g();return b},boxSizingReliable:function(){if(c==null){g()}return c},reliableMarginRight:function(){var b,c=f.appendChild(l.createElement("div"));c.style.cssText=f.style.cssText="-webkit-box-sizing:content-box;-moz-box-sizing:content-box;"+"box-sizing:content-box;display:block;margin:0;border:0;padding:0";c.style.marginRight=c.style.width="0";f.style.width="1px";d.appendChild(e);b=!parseFloat(a.getComputedStyle(c,null).marginRight);d.removeChild(e);return b}})}})();n.swap=function(a,b,c,d){var e,f,g={};for(f in b){g[f]=a.style[f];a.style[f]=b[f]}e=c.apply(a,d||[]);for(f in b){a.style[f]=g[f]}return e};var zb=/^(none|table(?!-c[ea]).+)/,Ab=new RegExp("^("+Q+")(.*)$","i"),Bb=new RegExp("^([+-])=("+Q+")","i"),Cb={position:"absolute",visibility:"hidden",display:"block"},Db={letterSpacing:"0",fontWeight:"400"},Eb=["Webkit","O","Moz","ms"];function Fb(a,b){if(b in a){return b}var c=b[0].toUpperCase()+b.slice(1),d=b,e=Eb.length;while(e--){b=Eb[e]+c;if(b in a){return b}}return d}function Gb(a,b,c){var d=Ab.exec(b);return d?Math.max(0,d[1]-(c||0))+(d[2]||"px"):b}function Hb(a,b,c,d,e){var f=c===(d?"border":"content")?4:b==="width"?1:0,g=0;for(;f<4;f+=2){if(c==="margin"){g+=n.css(a,c+R[f],true,e)}if(d){if(c==="content"){g-=n.css(a,"padding"+R[f],true,e)}if(c!=="margin"){g-=n.css(a,"border"+R[f]+"Width",true,e)}}else{g+=n.css(a,"padding"+R[f],true,e);if(c!=="padding"){g+=n.css(a,"border"+R[f]+"Width",true,e)}}}return g}function Ib(a,b,c){var d=true,e=b==="width"?a.offsetWidth:a.offsetHeight,f=wb(a),g=n.css(a,"boxSizing",false,f)==="border-box";if(e<=0||e==null){e=xb(a,b,f);if(e<0||e==null){e=a.style[b]}if(vb.test(e)){return e}d=g&&(k.boxSizingReliable()||e===a.style[b]);e=parseFloat(e)||0}return e+Hb(a,b,c||(g?"border":"content"),d,f)+"px"}function Jb(a,b){var c,d,e,f=[],g=0,h=a.length;for(;g<h;g++){d=a[g];if(!d.style){continue}f[g]=L.get(d,"olddisplay");c=d.style.display;if(b){if(!f[g]&&c==="none"){d.style.display=""}if(d.style.display===""&&S(d)){f[g]=L.access(d,"olddisplay",tb(d.nodeName))}}else{e=S(d);if(c!=="none"||!e){L.set(d,"olddisplay",e?c:n.css(d,"display"))}}}for(g=0;g<h;g++){d=a[g];if(!d.style){continue}if(!b||d.style.display==="none"||d.style.display===""){d.style.display=b?f[g]||"":"none"}}return a}n.extend({cssHooks:{opacity:{get:function(a,b){if(b){var c=xb(a,"opacity");return c===""?"1":c}}}},cssNumber:{columnCount:true,fillOpacity:true,flexGrow:true,flexShrink:true,fontWeight:true,lineHeight:true,opacity:true,order:true,orphans:true,widows:true,zIndex:true,zoom:true},cssProps:{"float":"cssFloat"},style:function(a,b,c,d){if(!a||a.nodeType===3||a.nodeType===8||!a.style){return}var e,f,g,h=n.camelCase(b),i=a.style;b=n.cssProps[h]||(n.cssProps[h]=Fb(i,h));g=n.cssHooks[b]||n.cssHooks[h];if(c!==undefined){f=typeof c;if(f==="string"&&(e=Bb.exec(c))){c=(e[1]+1)*e[2]+parseFloat(n.css(a,b));f="number"}if(c==null||c!==c){return}if(f==="number"&&!n.cssNumber[h]){c+="px"}if(!k.clearCloneStyle&&c===""&&b.indexOf("background")===0){i[b]="inherit"}if(!g||!("set"in g)||(c=g.set(a,c,d))!==undefined){i[b]=c}}else{if(g&&"get"in g&&(e=g.get(a,false,d))!==undefined){return e}return i[b]}},css:function(a,b,c,d){var e,f,g,h=n.camelCase(b);b=n.cssProps[h]||(n.cssProps[h]=Fb(a.style,h));g=n.cssHooks[b]||n.cssHooks[h];if(g&&"get"in g){e=g.get(a,true,c)}if(e===undefined){e=xb(a,b,d)}if(e==="normal"&&b in Db){e=Db[b]}if(c===""||c){f=parseFloat(e);return c===true||n.isNumeric(f)?f||0:e}return e}});n.each(["height","width"],function(a,b){n.cssHooks[b]={get:function(a,c,d){if(c){return zb.test(n.css(a,"display"))&&a.offsetWidth===0?n.swap(a,Cb,function(){return Ib(a,b,d)}):Ib(a,b,d)}},set:function(a,c,d){var e=d&&wb(a);return Gb(a,c,d?Hb(a,b,d,n.css(a,"boxSizing",false,e)==="border-box",e):0)}}});n.cssHooks.marginRight=yb(k.reliableMarginRight,function(a,b){if(b){return n.swap(a,{display:"inline-block"},xb,[a,"marginRight"])}});n.each({margin:"",padding:"",border:"Width"},function(a,b){n.cssHooks[a+b]={expand:function(c){var d=0,e={},f=typeof c==="string"?c.split(" "):[c];for(;d<4;d++){e[a+R[d]+b]=f[d]||f[d-2]||f[0]}return e}};if(!ub.test(a)){n.cssHooks[a+b].set=Gb}});n.fn.extend({css:function(a,b){return J(this,function(a,b,c){var d,e,f={},g=0;if(n.isArray(b)){d=wb(a);e=b.length;for(;g<e;g++){f[b[g]]=n.css(a,b[g],false,d)}return f}return c!==undefined?n.style(a,b,c):n.css(a,b)},a,b,arguments.length>1)},show:function(){return Jb(this,true)},hide:function(){return Jb(this)},toggle:function(a){if(typeof a==="boolean"){return a?this.show():this.hide()}return this.each(function(){if(S(this)){n(this).show()}else{n(this).hide()}})}});function Kb(a,b,c,d,e){return new Kb.prototype.init(a,b,c,d,e)}n.Tween=Kb;Kb.prototype={constructor:Kb,init:function(a,b,c,d,e,f){this.elem=a;this.prop=c;this.easing=e||"swing";this.options=b;this.start=this.now=this.cur();this.end=d;this.unit=f||(n.cssNumber[c]?"":"px")},cur:function(){var a=Kb.propHooks[this.prop];return a&&a.get?a.get(this):Kb.propHooks._default.get(this)},run:function(a){var b,c=Kb.propHooks[this.prop];if(this.options.duration){this.pos=b=n.easing[this.easing](a,this.options.duration*a,0,1,this.options.duration)}else{this.pos=b=a}this.now=(this.end-this.start)*b+this.start;if(this.options.step){this.options.step.call(this.elem,this.now,this)}if(c&&c.set){c.set(this)}else{Kb.propHooks._default.set(this)}return this}};Kb.prototype.init.prototype=Kb.prototype;Kb.propHooks={_default:{get:function(a){var b;if(a.elem[a.prop]!=null&&(!a.elem.style||a.elem.style[a.prop]==null)){return a.elem[a.prop]}b=n.css(a.elem,a.prop,"");return!b||b==="auto"?0:b},set:function(a){if(n.fx.step[a.prop]){n.fx.step[a.prop](a)}else if(a.elem.style&&(a.elem.style[n.cssProps[a.prop]]!=null||n.cssHooks[a.prop])){n.style(a.elem,a.prop,a.now+a.unit)}else{a.elem[a.prop]=a.now}}}};Kb.propHooks.scrollTop=Kb.propHooks.scrollLeft={set:function(a){if(a.elem.nodeType&&a.elem.parentNode){a.elem[a.prop]=a.now}}};n.easing={linear:function(a){return a},swing:function(a){return.5-Math.cos(a*Math.PI)/2}};n.fx=Kb.prototype.init;n.fx.step={};var Lb,Mb,Nb=/^(?:toggle|show|hide)$/,Ob=new RegExp("^(?:([+-])=|)("+Q+")([a-z%]*)$","i"),Pb=/queueHooks$/,Qb=[Vb],Rb={"*":[function(a,b){var c=this.createTween(a,b),d=c.cur(),e=Ob.exec(b),f=e&&e[3]||(n.cssNumber[a]?"":"px"),g=(n.cssNumber[a]||f!=="px"&&+d)&&Ob.exec(n.css(c.elem,a)),h=1,i=20;if(g&&g[3]!==f){f=f||g[3];e=e||[];g=+d||1;do{h=h||".5";g=g/h;n.style(c.elem,a,g+f)}while(h!==(h=c.cur()/d)&&h!==1&&--i)}if(e){g=c.start=+g||+d||0;c.unit=f;c.end=e[1]?g+(e[1]+1)*e[2]:+e[2]}return c}]};function Sb(){setTimeout(function(){Lb=undefined});return Lb=n.now()}function Tb(a,b){var c,d=0,e={height:a};b=b?1:0;for(;d<4;d+=2-b){c=R[d];e["margin"+c]=e["padding"+c]=a}if(b){e.opacity=e.width=a}return e}function Ub(a,b,c){var d,e=(Rb[b]||[]).concat(Rb["*"]),f=0,g=e.length;for(;f<g;f++){if(d=e[f].call(c,b,a)){return d}}}function Vb(a,b,c){var d,e,f,g,h,i,j,k,l=this,m={},o=a.style,p=a.nodeType&&S(a),q=L.get(a,"fxshow");if(!c.queue){h=n._queueHooks(a,"fx");if(h.unqueued==null){h.unqueued=0;i=h.empty.fire;h.empty.fire=function(){if(!h.unqueued){i()}}}h.unqueued++;l.always(function(){l.always(function(){h.unqueued--;if(!n.queue(a,"fx").length){h.empty.fire()}})})}if(a.nodeType===1&&("height"in b||"width"in b)){c.overflow=[o.overflow,o.overflowX,o.overflowY];j=n.css(a,"display");k=j==="none"?L.get(a,"olddisplay")||tb(a.nodeName):j;if(k==="inline"&&n.css(a,"float")==="none"){o.display="inline-block"}}if(c.overflow){o.overflow="hidden";l.always(function(){o.overflow=c.overflow[0];o.overflowX=c.overflow[1];o.overflowY=c.overflow[2]})}for(d in b){e=b[d];if(Nb.exec(e)){delete b[d];f=f||e==="toggle";if(e===(p?"hide":"show")){if(e==="show"&&q&&q[d]!==undefined){p=true}else{continue}}m[d]=q&&q[d]||n.style(a,d)}else{j=undefined}}if(!n.isEmptyObject(m)){if(q){if("hidden"in q){p=q.hidden}}else{q=L.access(a,"fxshow",{})}if(f){q.hidden=!p}if(p){n(a).show()}else{l.done(function(){n(a).hide()})}l.done(function(){var b;L.remove(a,"fxshow");for(b in m){n.style(a,b,m[b])}});for(d in m){g=Ub(p?q[d]:0,d,l);if(!(d in q)){q[d]=g.start;if(p){g.end=g.start;g.start=d==="width"||d==="height"?1:0}}}}else if((j==="none"?tb(a.nodeName):j)==="inline"){o.display=j}}function Wb(a,b){var c,d,e,f,g;for(c in a){d=n.camelCase(c);e=b[d];f=a[c];if(n.isArray(f)){e=f[1];f=a[c]=f[0]}if(c!==d){a[d]=f;delete a[c]}g=n.cssHooks[d];if(g&&"expand"in g){f=g.expand(f);delete a[d];for(c in f){if(!(c in a)){a[c]=f[c];b[c]=e}}}else{b[d]=e}}}function Xb(a,b,c){var d,e,f=0,g=Qb.length,h=n.Deferred().always(function(){delete i.elem}),i=function(){if(e){return false}var b=Lb||Sb(),c=Math.max(0,j.startTime+j.duration-b),d=c/j.duration||0,f=1-d,g=0,i=j.tweens.length;for(;g<i;g++){j.tweens[g].run(f)}h.notifyWith(a,[j,f,c]);if(f<1&&i){return c}else{h.resolveWith(a,[j]);return false}},j=h.promise({elem:a,props:n.extend({},b),opts:n.extend(true,{specialEasing:{}},c),originalProperties:b,originalOptions:c,startTime:Lb||Sb(),duration:c.duration,tweens:[],createTween:function(b,c){var d=n.Tween(a,j.opts,b,c,j.opts.specialEasing[b]||j.opts.easing);j.tweens.push(d);return d},stop:function(b){var c=0,d=b?j.tweens.length:0;if(e){return this}e=true;for(;c<d;c++){j.tweens[c].run(1)}if(b){h.resolveWith(a,[j,b])}else{h.rejectWith(a,[j,b])}return this}}),k=j.props;Wb(k,j.opts.specialEasing);for(;f<g;f++){d=Qb[f].call(j,a,k,j.opts);if(d){return d}}n.map(k,Ub,j);if(n.isFunction(j.opts.start)){j.opts.start.call(a,j)}n.fx.timer(n.extend(i,{elem:a,anim:j,queue:j.opts.queue}));return j.progress(j.opts.progress).done(j.opts.done,j.opts.complete).fail(j.opts.fail).always(j.opts.always)}n.Animation=n.extend(Xb,{tweener:function(a,b){if(n.isFunction(a)){b=a;a=["*"]}else{a=a.split(" ")}var c,d=0,e=a.length;for(;d<e;d++){c=a[d];Rb[c]=Rb[c]||[];Rb[c].unshift(b)}},prefilter:function(a,b){if(b){Qb.unshift(a)}else{Qb.push(a)}}});n.speed=function(a,b,c){var d=a&&typeof a==="object"?n.extend({},a):{complete:c||!c&&b||n.isFunction(a)&&a,duration:a,easing:c&&b||b&&!n.isFunction(b)&&b};d.duration=n.fx.off?0:typeof d.duration==="number"?d.duration:d.duration in n.fx.speeds?n.fx.speeds[d.duration]:n.fx.speeds._default;if(d.queue==null||d.queue===true){d.queue="fx"}d.old=d.complete;d.complete=function(){if(n.isFunction(d.old)){d.old.call(this)}if(d.queue){n.dequeue(this,d.queue)}};return d};n.fn.extend({fadeTo:function(a,b,c,d){return this.filter(S).css("opacity",0).show().end().animate({opacity:b},a,c,d)},animate:function(a,b,c,d){var e=n.isEmptyObject(a),f=n.speed(b,c,d),g=function(){var b=Xb(this,n.extend({},a),f);if(e||L.get(this,"finish")){b.stop(true)}};g.finish=g;return e||f.queue===false?this.each(g):this.queue(f.queue,g)},stop:function(a,b,c){var d=function(a){var b=a.stop;delete a.stop;b(c)};if(typeof a!=="string"){c=b;b=a;a=undefined}if(b&&a!==false){this.queue(a||"fx",[])}return this.each(function(){var b=true,e=a!=null&&a+"queueHooks",f=n.timers,g=L.get(this);if(e){if(g[e]&&g[e].stop){d(g[e])}}else{for(e in g){if(g[e]&&g[e].stop&&Pb.test(e)){d(g[e])}}}for(e=f.length;e--;){if(f[e].elem===this&&(a==null||f[e].queue===a)){f[e].anim.stop(c);b=false;f.splice(e,1)}}if(b||!c){n.dequeue(this,a)}})},finish:function(a){if(a!==false){a=a||"fx"}return this.each(function(){var b,c=L.get(this),d=c[a+"queue"],e=c[a+"queueHooks"],f=n.timers,g=d?d.length:0;c.finish=true;n.queue(this,a,[]);if(e&&e.stop){e.stop.call(this,true)}for(b=f.length;b--;){if(f[b].elem===this&&f[b].queue===a){f[b].anim.stop(true);f.splice(b,1)}}for(b=0;b<g;b++){if(d[b]&&d[b].finish){d[b].finish.call(this)}}delete c.finish})}});n.each(["toggle","show","hide"],function(a,b){var c=n.fn[b];n.fn[b]=function(a,d,e){return a==null||typeof a==="boolean"?c.apply(this,arguments):this.animate(Tb(b,true),a,d,e)}});n.each({slideDown:Tb("show"),slideUp:Tb("hide"),slideToggle:Tb("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(a,b){n.fn[a]=function(a,c,d){return this.animate(b,a,c,d)}});n.timers=[];n.fx.tick=function(){var a,b=0,c=n.timers;Lb=n.now();for(;b<c.length;b++){a=c[b];if(!a()&&c[b]===a){c.splice(b--,1)}}if(!c.length){n.fx.stop()}Lb=undefined};n.fx.timer=function(a){n.timers.push(a);if(a()){n.fx.start()}else{n.timers.pop()}};n.fx.interval=13;n.fx.start=function(){if(!Mb){Mb=setInterval(n.fx.tick,n.fx.interval)}};n.fx.stop=function(){clearInterval(Mb);Mb=null};n.fx.speeds={slow:600,fast:200,_default:400};n.fn.delay=function(a,b){a=n.fx?n.fx.speeds[a]||a:a;b=b||"fx";return this.queue(b,function(b,c){var d=setTimeout(b,a);c.stop=function(){clearTimeout(d)}})};(function(){var a=l.createElement("input"),b=l.createElement("select"),c=b.appendChild(l.createElement("option"));a.type="checkbox";k.checkOn=a.value!=="";k.optSelected=c.selected;b.disabled=true;k.optDisabled=!c.disabled;a=l.createElement("input");a.value="t";a.type="radio";k.radioValue=a.value==="t"})();var Yb,Zb,$b=n.expr.attrHandle;n.fn.extend({attr:function(a,b){return J(this,n.attr,a,b,arguments.length>1)},removeAttr:function(a){return this.each(function(){n.removeAttr(this,a)})}});n.extend({attr:function(a,b,c){var d,e,f=a.nodeType;if(!a||f===3||f===8||f===2){return}if(typeof a.getAttribute===U){return n.prop(a,b,c)}if(f!==1||!n.isXMLDoc(a)){b=b.toLowerCase();d=n.attrHooks[b]||(n.expr.match.bool.test(b)?Zb:Yb)}if(c!==undefined){if(c===null){n.removeAttr(a,b)}else if(d&&"set"in d&&(e=d.set(a,c,b))!==undefined){return e}else{a.setAttribute(b,c+"");return c}}else if(d&&"get"in d&&(e=d.get(a,b))!==null){return e}else{e=n.find.attr(a,b);return e==null?undefined:e}},removeAttr:function(a,b){var c,d,e=0,f=b&&b.match(E);if(f&&a.nodeType===1){while(c=f[e++]){d=n.propFix[c]||c;if(n.expr.match.bool.test(c)){a[d]=false}a.removeAttribute(c)}}},attrHooks:{type:{set:function(a,b){if(!k.radioValue&&b==="radio"&&n.nodeName(a,"input")){var c=a.value;a.setAttribute("type",b);if(c){a.value=c}return b}}}}});Zb={set:function(a,b,c){if(b===false){n.removeAttr(a,c)}else{a.setAttribute(c,c)}return c}};n.each(n.expr.match.bool.source.match(/\w+/g),function(a,b){var c=$b[b]||n.find.attr;$b[b]=function(a,b,d){var e,f;if(!d){f=$b[b];$b[b]=e;e=c(a,b,d)!=null?b.toLowerCase():null;$b[b]=f}return e}});var _b=/^(?:input|select|textarea|button)$/i;n.fn.extend({prop:function(a,b){return J(this,n.prop,a,b,arguments.length>1)},removeProp:function(a){return this.each(function(){delete this[n.propFix[a]||a]})}});n.extend({propFix:{"for":"htmlFor","class":"className"},prop:function(a,b,c){var d,e,f,g=a.nodeType;if(!a||g===3||g===8||g===2){return}f=g!==1||!n.isXMLDoc(a);if(f){b=n.propFix[b]||b;e=n.propHooks[b]}if(c!==undefined){return e&&"set"in e&&(d=e.set(a,c,b))!==undefined?d:a[b]=c}else{return e&&"get"in e&&(d=e.get(a,b))!==null?d:a[b]}},propHooks:{tabIndex:{get:function(a){return a.hasAttribute("tabindex")||_b.test(a.nodeName)||a.href?a.tabIndex:-1}}}});if(!k.optSelected){n.propHooks.selected={get:function(a){var b=a.parentNode;if(b&&b.parentNode){b.parentNode.selectedIndex}return null}}}n.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){n.propFix[this.toLowerCase()]=this});var ac=/[\t\r\n\f]/g;n.fn.extend({addClass:function(a){var b,c,d,e,f,g,h=typeof a==="string"&&a,i=0,j=this.length;if(n.isFunction(a)){return this.each(function(b){n(this).addClass(a.call(this,b,this.className))})}if(h){b=(a||"").match(E)||[];for(;i<j;i++){c=this[i];d=c.nodeType===1&&(c.className?(" "+c.className+" ").replace(ac," "):" ");if(d){f=0;while(e=b[f++]){if(d.indexOf(" "+e+" ")<0){d+=e+" "}}g=n.trim(d);if(c.className!==g){c.className=g}}}}return this},removeClass:function(a){var b,c,d,e,f,g,h=arguments.length===0||typeof a==="string"&&a,i=0,j=this.length;if(n.isFunction(a)){return this.each(function(b){n(this).removeClass(a.call(this,b,this.className))})}if(h){b=(a||"").match(E)||[];for(;i<j;i++){c=this[i];d=c.nodeType===1&&(c.className?(" "+c.className+" ").replace(ac," "):"");if(d){f=0;while(e=b[f++]){while(d.indexOf(" "+e+" ")>=0){d=d.replace(" "+e+" "," ")}}g=a?n.trim(d):"";if(c.className!==g){c.className=g}}}}return this},toggleClass:function(a,b){var c=typeof a;if(typeof b==="boolean"&&c==="string"){return b?this.addClass(a):this.removeClass(a)}if(n.isFunction(a)){return this.each(function(c){n(this).toggleClass(a.call(this,c,this.className,b),b)})}return this.each(function(){if(c==="string"){var b,d=0,e=n(this),f=a.match(E)||[];while(b=f[d++]){if(e.hasClass(b)){e.removeClass(b)}else{e.addClass(b)}}}else if(c===U||c==="boolean"){if(this.className){L.set(this,"__className__",this.className)}this.className=this.className||a===false?"":L.get(this,"__className__")||""}})},hasClass:function(a){var b=" "+a+" ",c=0,d=this.length;for(;c<d;c++){if(this[c].nodeType===1&&(" "+this[c].className+" ").replace(ac," ").indexOf(b)>=0){return true}}return false}});var bc=/\r/g;
n.fn.extend({val:function(a){var b,c,d,e=this[0];if(!arguments.length){if(e){b=n.valHooks[e.type]||n.valHooks[e.nodeName.toLowerCase()];if(b&&"get"in b&&(c=b.get(e,"value"))!==undefined){return c}c=e.value;return typeof c==="string"?c.replace(bc,""):c==null?"":c}return}d=n.isFunction(a);return this.each(function(c){var e;if(this.nodeType!==1){return}if(d){e=a.call(this,c,n(this).val())}else{e=a}if(e==null){e=""}else if(typeof e==="number"){e+=""}else if(n.isArray(e)){e=n.map(e,function(a){return a==null?"":a+""})}b=n.valHooks[this.type]||n.valHooks[this.nodeName.toLowerCase()];if(!b||!("set"in b)||b.set(this,e,"value")===undefined){this.value=e}})}});n.extend({valHooks:{option:{get:function(a){var b=n.find.attr(a,"value");return b!=null?b:n.trim(n.text(a))}},select:{get:function(a){var b,c,d=a.options,e=a.selectedIndex,f=a.type==="select-one"||e<0,g=f?null:[],h=f?e+1:d.length,i=e<0?h:f?e:0;for(;i<h;i++){c=d[i];if((c.selected||i===e)&&(k.optDisabled?!c.disabled:c.getAttribute("disabled")===null)&&(!c.parentNode.disabled||!n.nodeName(c.parentNode,"optgroup"))){b=n(c).val();if(f){return b}g.push(b)}}return g},set:function(a,b){var c,d,e=a.options,f=n.makeArray(b),g=e.length;while(g--){d=e[g];if(d.selected=n.inArray(d.value,f)>=0){c=true}}if(!c){a.selectedIndex=-1}return f}}}});n.each(["radio","checkbox"],function(){n.valHooks[this]={set:function(a,b){if(n.isArray(b)){return a.checked=n.inArray(n(a).val(),b)>=0}}};if(!k.checkOn){n.valHooks[this].get=function(a){return a.getAttribute("value")===null?"on":a.value}}});n.each(("blur focus focusin focusout load resize scroll unload click dblclick "+"mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave "+"change select submit keydown keypress keyup error contextmenu").split(" "),function(a,b){n.fn[b]=function(a,c){return arguments.length>0?this.on(b,null,a,c):this.trigger(b)}});n.fn.extend({hover:function(a,b){return this.mouseenter(a).mouseleave(b||a)},bind:function(a,b,c){return this.on(a,null,b,c)},unbind:function(a,b){return this.off(a,null,b)},delegate:function(a,b,c,d){return this.on(b,a,c,d)},undelegate:function(a,b,c){return arguments.length===1?this.off(a,"**"):this.off(b,a||"**",c)}});var cc=n.now();var dc=/\?/;n.parseJSON=function(a){return JSON.parse(a+"")};n.parseXML=function(a){var b,c;if(!a||typeof a!=="string"){return null}try{c=new DOMParser;b=c.parseFromString(a,"text/xml")}catch(d){b=undefined}if(!b||b.getElementsByTagName("parsererror").length){n.error("Invalid XML: "+a)}return b};var ec,fc,gc=/#.*$/,hc=/([?&])_=[^&]*/,ic=/^(.*?):[ \t]*([^\r\n]*)$/gm,jc=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,kc=/^(?:GET|HEAD)$/,lc=/^\/\//,mc=/^([\w.+-]+:)(?:\/\/(?:[^\/?#]*@|)([^\/?#:]*)(?::(\d+)|)|)/,nc={},oc={},pc="*/".concat("*");try{fc=location.href}catch(qc){fc=l.createElement("a");fc.href="";fc=fc.href}ec=mc.exec(fc.toLowerCase())||[];function rc(a){return function(b,c){if(typeof b!=="string"){c=b;b="*"}var d,e=0,f=b.toLowerCase().match(E)||[];if(n.isFunction(c)){while(d=f[e++]){if(d[0]==="+"){d=d.slice(1)||"*";(a[d]=a[d]||[]).unshift(c)}else{(a[d]=a[d]||[]).push(c)}}}}}function sc(a,b,c,d){var e={},f=a===oc;function g(h){var i;e[h]=true;n.each(a[h]||[],function(a,h){var j=h(b,c,d);if(typeof j==="string"&&!f&&!e[j]){b.dataTypes.unshift(j);g(j);return false}else if(f){return!(i=j)}});return i}return g(b.dataTypes[0])||!e["*"]&&g("*")}function tc(a,b){var c,d,e=n.ajaxSettings.flatOptions||{};for(c in b){if(b[c]!==undefined){(e[c]?a:d||(d={}))[c]=b[c]}}if(d){n.extend(true,a,d)}return a}function uc(a,b,c){var d,e,f,g,h=a.contents,i=a.dataTypes;while(i[0]==="*"){i.shift();if(d===undefined){d=a.mimeType||b.getResponseHeader("Content-Type")}}if(d){for(e in h){if(h[e]&&h[e].test(d)){i.unshift(e);break}}}if(i[0]in c){f=i[0]}else{for(e in c){if(!i[0]||a.converters[e+" "+i[0]]){f=e;break}if(!g){g=e}}f=f||g}if(f){if(f!==i[0]){i.unshift(f)}return c[f]}}function vc(a,b,c,d){var e,f,g,h,i,j={},k=a.dataTypes.slice();if(k[1]){for(g in a.converters){j[g.toLowerCase()]=a.converters[g]}}f=k.shift();while(f){if(a.responseFields[f]){c[a.responseFields[f]]=b}if(!i&&d&&a.dataFilter){b=a.dataFilter(b,a.dataType)}i=f;f=k.shift();if(f){if(f==="*"){f=i}else if(i!=="*"&&i!==f){g=j[i+" "+f]||j["* "+f];if(!g){for(e in j){h=e.split(" ");if(h[1]===f){g=j[i+" "+h[0]]||j["* "+h[0]];if(g){if(g===true){g=j[e]}else if(j[e]!==true){f=h[0];k.unshift(h[1])}break}}}}if(g!==true){if(g&&a["throws"]){b=g(b)}else{try{b=g(b)}catch(l){return{state:"parsererror",error:g?l:"No conversion from "+i+" to "+f}}}}}}}return{state:"success",data:b}}n.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:fc,type:"GET",isLocal:jc.test(ec[1]),global:true,processData:true,async:true,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":pc,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":true,"text json":n.parseJSON,"text xml":n.parseXML},flatOptions:{url:true,context:true}},ajaxSetup:function(a,b){return b?tc(tc(a,n.ajaxSettings),b):tc(n.ajaxSettings,a)},ajaxPrefilter:rc(nc),ajaxTransport:rc(oc),ajax:function(a,b){if(typeof a==="object"){b=a;a=undefined}b=b||{};var c,d,e,f,g,h,i,j,k=n.ajaxSetup({},b),l=k.context||k,m=k.context&&(l.nodeType||l.jquery)?n(l):n.event,o=n.Deferred(),p=n.Callbacks("once memory"),q=k.statusCode||{},r={},s={},t=0,u="canceled",v={readyState:0,getResponseHeader:function(a){var b;if(t===2){if(!f){f={};while(b=ic.exec(e)){f[b[1].toLowerCase()]=b[2]}}b=f[a.toLowerCase()]}return b==null?null:b},getAllResponseHeaders:function(){return t===2?e:null},setRequestHeader:function(a,b){var c=a.toLowerCase();if(!t){a=s[c]=s[c]||a;r[a]=b}return this},overrideMimeType:function(a){if(!t){k.mimeType=a}return this},statusCode:function(a){var b;if(a){if(t<2){for(b in a){q[b]=[q[b],a[b]]}}else{v.always(a[v.status])}}return this},abort:function(a){var b=a||u;if(c){c.abort(b)}x(0,b);return this}};o.promise(v).complete=p.add;v.success=v.done;v.error=v.fail;k.url=((a||k.url||fc)+"").replace(gc,"").replace(lc,ec[1]+"//");k.type=b.method||b.type||k.method||k.type;k.dataTypes=n.trim(k.dataType||"*").toLowerCase().match(E)||[""];if(k.crossDomain==null){h=mc.exec(k.url.toLowerCase());k.crossDomain=!!(h&&(h[1]!==ec[1]||h[2]!==ec[2]||(h[3]||(h[1]==="http:"?"80":"443"))!==(ec[3]||(ec[1]==="http:"?"80":"443"))))}if(k.data&&k.processData&&typeof k.data!=="string"){k.data=n.param(k.data,k.traditional)}sc(nc,k,b,v);if(t===2){return v}i=k.global;if(i&&n.active++===0){n.event.trigger("ajaxStart")}k.type=k.type.toUpperCase();k.hasContent=!kc.test(k.type);d=k.url;if(!k.hasContent){if(k.data){d=k.url+=(dc.test(d)?"&":"?")+k.data;delete k.data}if(k.cache===false){k.url=hc.test(d)?d.replace(hc,"$1_="+cc++):d+(dc.test(d)?"&":"?")+"_="+cc++}}if(k.ifModified){if(n.lastModified[d]){v.setRequestHeader("If-Modified-Since",n.lastModified[d])}if(n.etag[d]){v.setRequestHeader("If-None-Match",n.etag[d])}}if(k.data&&k.hasContent&&k.contentType!==false||b.contentType){v.setRequestHeader("Content-Type",k.contentType)}v.setRequestHeader("Accept",k.dataTypes[0]&&k.accepts[k.dataTypes[0]]?k.accepts[k.dataTypes[0]]+(k.dataTypes[0]!=="*"?", "+pc+"; q=0.01":""):k.accepts["*"]);for(j in k.headers){v.setRequestHeader(j,k.headers[j])}if(k.beforeSend&&(k.beforeSend.call(l,v,k)===false||t===2)){return v.abort()}u="abort";for(j in{success:1,error:1,complete:1}){v[j](k[j])}c=sc(oc,k,b,v);if(!c){x(-1,"No Transport")}else{v.readyState=1;if(i){m.trigger("ajaxSend",[v,k])}if(k.async&&k.timeout>0){g=setTimeout(function(){v.abort("timeout")},k.timeout)}try{t=1;c.send(r,x)}catch(w){if(t<2){x(-1,w)}else{throw w}}}function x(a,b,f,h){var j,r,s,u,w,x=b;if(t===2){return}t=2;if(g){clearTimeout(g)}c=undefined;e=h||"";v.readyState=a>0?4:0;j=a>=200&&a<300||a===304;if(f){u=uc(k,v,f)}u=vc(k,u,v,j);if(j){if(k.ifModified){w=v.getResponseHeader("Last-Modified");if(w){n.lastModified[d]=w}w=v.getResponseHeader("etag");if(w){n.etag[d]=w}}if(a===204||k.type==="HEAD"){x="nocontent"}else if(a===304){x="notmodified"}else{x=u.state;r=u.data;s=u.error;j=!s}}else{s=x;if(a||!x){x="error";if(a<0){a=0}}}v.status=a;v.statusText=(b||x)+"";if(j){o.resolveWith(l,[r,x,v])}else{o.rejectWith(l,[v,x,s])}v.statusCode(q);q=undefined;if(i){m.trigger(j?"ajaxSuccess":"ajaxError",[v,k,j?r:s])}p.fireWith(l,[v,x]);if(i){m.trigger("ajaxComplete",[v,k]);if(!--n.active){n.event.trigger("ajaxStop")}}}return v},getJSON:function(a,b,c){return n.get(a,b,c,"json")},getScript:function(a,b){return n.get(a,undefined,b,"script")}});n.each(["get","post"],function(a,b){n[b]=function(a,c,d,e){if(n.isFunction(c)){e=e||d;d=c;c=undefined}return n.ajax({url:a,type:b,dataType:e,data:c,success:d})}});n.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(a,b){n.fn[b]=function(a){return this.on(b,a)}});n._evalUrl=function(a){return n.ajax({url:a,type:"GET",dataType:"script",async:false,global:false,"throws":true})};n.fn.extend({wrapAll:function(a){var b;if(n.isFunction(a)){return this.each(function(b){n(this).wrapAll(a.call(this,b))})}if(this[0]){b=n(a,this[0].ownerDocument).eq(0).clone(true);if(this[0].parentNode){b.insertBefore(this[0])}b.map(function(){var a=this;while(a.firstElementChild){a=a.firstElementChild}return a}).append(this)}return this},wrapInner:function(a){if(n.isFunction(a)){return this.each(function(b){n(this).wrapInner(a.call(this,b))})}return this.each(function(){var b=n(this),c=b.contents();if(c.length){c.wrapAll(a)}else{b.append(a)}})},wrap:function(a){var b=n.isFunction(a);return this.each(function(c){n(this).wrapAll(b?a.call(this,c):a)})},unwrap:function(){return this.parent().each(function(){if(!n.nodeName(this,"body")){n(this).replaceWith(this.childNodes)}}).end()}});n.expr.filters.hidden=function(a){return a.offsetWidth<=0&&a.offsetHeight<=0};n.expr.filters.visible=function(a){return!n.expr.filters.hidden(a)};var wc=/%20/g,xc=/\[\]$/,yc=/\r?\n/g,zc=/^(?:submit|button|image|reset|file)$/i,Ac=/^(?:input|select|textarea|keygen)/i;function Bc(a,b,c,d){var e;if(n.isArray(b)){n.each(b,function(b,e){if(c||xc.test(a)){d(a,e)}else{Bc(a+"["+(typeof e==="object"?b:"")+"]",e,c,d)}})}else if(!c&&n.type(b)==="object"){for(e in b){Bc(a+"["+e+"]",b[e],c,d)}}else{d(a,b)}}n.param=function(a,b){var c,d=[],e=function(a,b){b=n.isFunction(b)?b():b==null?"":b;d[d.length]=encodeURIComponent(a)+"="+encodeURIComponent(b)};if(b===undefined){b=n.ajaxSettings&&n.ajaxSettings.traditional}if(n.isArray(a)||a.jquery&&!n.isPlainObject(a)){n.each(a,function(){e(this.name,this.value)})}else{for(c in a){Bc(c,a[c],b,e)}}return d.join("&").replace(wc,"+")};n.fn.extend({serialize:function(){return n.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var a=n.prop(this,"elements");return a?n.makeArray(a):this}).filter(function(){var a=this.type;return this.name&&!n(this).is(":disabled")&&Ac.test(this.nodeName)&&!zc.test(a)&&(this.checked||!T.test(a))}).map(function(a,b){var c=n(this).val();return c==null?null:n.isArray(c)?n.map(c,function(a){return{name:b.name,value:a.replace(yc,"\r\n")}}):{name:b.name,value:c.replace(yc,"\r\n")}}).get()}});n.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(a){}};var Cc=0,Dc={},Ec={0:200,1223:204},Fc=n.ajaxSettings.xhr();if(a.ActiveXObject){n(a).on("unload",function(){for(var a in Dc){Dc[a]()}})}k.cors=!!Fc&&"withCredentials"in Fc;k.ajax=Fc=!!Fc;n.ajaxTransport(function(a){var b;if(k.cors||Fc&&!a.crossDomain){return{send:function(c,d){var e,f=a.xhr(),g=++Cc;f.open(a.type,a.url,a.async,a.username,a.password);if(a.xhrFields){for(e in a.xhrFields){f[e]=a.xhrFields[e]}}if(a.mimeType&&f.overrideMimeType){f.overrideMimeType(a.mimeType)}if(!a.crossDomain&&!c["X-Requested-With"]){c["X-Requested-With"]="XMLHttpRequest"}for(e in c){f.setRequestHeader(e,c[e])}b=function(a){return function(){if(b){delete Dc[g];b=f.onload=f.onerror=null;if(a==="abort"){f.abort()}else if(a==="error"){d(f.status,f.statusText)}else{d(Ec[f.status]||f.status,f.statusText,typeof f.responseText==="string"?{text:f.responseText}:undefined,f.getAllResponseHeaders())}}}};f.onload=b();f.onerror=b("error");b=Dc[g]=b("abort");try{f.send(a.hasContent&&a.data||null)}catch(h){if(b){throw h}}},abort:function(){if(b){b()}}}}});n.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(a){n.globalEval(a);return a}}});n.ajaxPrefilter("script",function(a){if(a.cache===undefined){a.cache=false}if(a.crossDomain){a.type="GET"}});n.ajaxTransport("script",function(a){if(a.crossDomain){var b,c;return{send:function(d,e){b=n("<script>").prop({async:true,charset:a.scriptCharset,src:a.url}).on("load error",c=function(a){b.remove();c=null;if(a){e(a.type==="error"?404:200,a.type)}});l.head.appendChild(b[0])},abort:function(){if(c){c()}}}}});var Gc=[],Hc=/(=)\?(?=&|$)|\?\?/;n.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var a=Gc.pop()||n.expando+"_"+cc++;this[a]=true;return a}});n.ajaxPrefilter("json jsonp",function(b,c,d){var e,f,g,h=b.jsonp!==false&&(Hc.test(b.url)?"url":typeof b.data==="string"&&!(b.contentType||"").indexOf("application/x-www-form-urlencoded")&&Hc.test(b.data)&&"data");if(h||b.dataTypes[0]==="jsonp"){e=b.jsonpCallback=n.isFunction(b.jsonpCallback)?b.jsonpCallback():b.jsonpCallback;if(h){b[h]=b[h].replace(Hc,"$1"+e)}else if(b.jsonp!==false){b.url+=(dc.test(b.url)?"&":"?")+b.jsonp+"="+e}b.converters["script json"]=function(){if(!g){n.error(e+" was not called")}return g[0]};b.dataTypes[0]="json";f=a[e];a[e]=function(){g=arguments};d.always(function(){a[e]=f;if(b[e]){b.jsonpCallback=c.jsonpCallback;Gc.push(e)}if(g&&n.isFunction(f)){f(g[0])}g=f=undefined});return"script"}});n.parseHTML=function(a,b,c){if(!a||typeof a!=="string"){return null}if(typeof b==="boolean"){c=b;b=false}b=b||l;var d=v.exec(a),e=!c&&[];if(d){return[b.createElement(d[1])]}d=n.buildFragment([a],b,e);if(e&&e.length){n(e).remove()}return n.merge([],d.childNodes)};var Ic=n.fn.load;n.fn.load=function(a,b,c){if(typeof a!=="string"&&Ic){return Ic.apply(this,arguments)}var d,e,f,g=this,h=a.indexOf(" ");if(h>=0){d=n.trim(a.slice(h));a=a.slice(0,h)}if(n.isFunction(b)){c=b;b=undefined}else if(b&&typeof b==="object"){e="POST"}if(g.length>0){n.ajax({url:a,type:e,dataType:"html",data:b}).done(function(a){f=arguments;g.html(d?n("<div>").append(n.parseHTML(a)).find(d):a)}).complete(c&&function(a,b){g.each(c,f||[a.responseText,b,a])})}return this};n.expr.filters.animated=function(a){return n.grep(n.timers,function(b){return a===b.elem}).length};var Jc=a.document.documentElement;function Kc(a){return n.isWindow(a)?a:a.nodeType===9&&a.defaultView}n.offset={setOffset:function(a,b,c){var d,e,f,g,h,i,j,k=n.css(a,"position"),l=n(a),m={};if(k==="static"){a.style.position="relative"}h=l.offset();f=n.css(a,"top");i=n.css(a,"left");j=(k==="absolute"||k==="fixed")&&(f+i).indexOf("auto")>-1;if(j){d=l.position();g=d.top;e=d.left}else{g=parseFloat(f)||0;e=parseFloat(i)||0}if(n.isFunction(b)){b=b.call(a,c,h)}if(b.top!=null){m.top=b.top-h.top+g}if(b.left!=null){m.left=b.left-h.left+e}if("using"in b){b.using.call(a,m)}else{l.css(m)}}};n.fn.extend({offset:function(a){if(arguments.length){return a===undefined?this:this.each(function(b){n.offset.setOffset(this,a,b)})}var b,c,d=this[0],e={top:0,left:0},f=d&&d.ownerDocument;if(!f){return}b=f.documentElement;if(!n.contains(b,d)){return e}if(typeof d.getBoundingClientRect!==U){e=d.getBoundingClientRect()}c=Kc(f);return{top:e.top+c.pageYOffset-b.clientTop,left:e.left+c.pageXOffset-b.clientLeft}},position:function(){if(!this[0]){return}var a,b,c=this[0],d={top:0,left:0};if(n.css(c,"position")==="fixed"){b=c.getBoundingClientRect()}else{a=this.offsetParent();b=this.offset();if(!n.nodeName(a[0],"html")){d=a.offset()}d.top+=n.css(a[0],"borderTopWidth",true);d.left+=n.css(a[0],"borderLeftWidth",true)}return{top:b.top-d.top-n.css(c,"marginTop",true),left:b.left-d.left-n.css(c,"marginLeft",true)}},offsetParent:function(){return this.map(function(){var a=this.offsetParent||Jc;while(a&&(!n.nodeName(a,"html")&&n.css(a,"position")==="static")){a=a.offsetParent}return a||Jc})}});n.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(b,c){var d="pageYOffset"===c;n.fn[b]=function(e){return J(this,function(b,e,f){var g=Kc(b);if(f===undefined){return g?g[c]:b[e]}if(g){g.scrollTo(!d?f:a.pageXOffset,d?f:a.pageYOffset)}else{b[e]=f}},b,e,arguments.length,null)}});n.each(["top","left"],function(a,b){n.cssHooks[b]=yb(k.pixelPosition,function(a,c){if(c){c=xb(a,b);return vb.test(c)?n(a).position()[b]+"px":c}})});n.each({Height:"height",Width:"width"},function(a,b){n.each({padding:"inner"+a,content:b,"":"outer"+a},function(c,d){n.fn[d]=function(d,e){var f=arguments.length&&(c||typeof d!=="boolean"),g=c||(d===true||e===true?"margin":"border");return J(this,function(b,c,d){var e;if(n.isWindow(b)){return b.document.documentElement["client"+a]}if(b.nodeType===9){e=b.documentElement;return Math.max(b.body["scroll"+a],e["scroll"+a],b.body["offset"+a],e["offset"+a],e["client"+a])}return d===undefined?n.css(b,c,g):n.style(b,c,d,g)},b,f?d:undefined,f,null)}})});n.fn.size=function(){return this.length};n.fn.andSelf=n.fn.addBack;if(typeof define==="function"&&define.amd){define("jquery",[],function(){return n})}var Lc=a.jQuery,Mc=a.$;n.noConflict=function(b){if(a.$===n){a.$=Mc}if(b&&a.jQuery===n){a.jQuery=Lc}return n};if(typeof b===U){a.jQuery=a.$=n}return n});if(typeof jQuery==="undefined"){throw new Error("Bootstrap's JavaScript requires jQuery")}+function(a){"use strict";var b=function(a,b){this.type=this.options=this.enabled=this.timeout=this.hoverState=this.$element=null;this.init("tooltip",a,b)};b.VERSION="3.2.0";b.DEFAULTS={animation:true,placement:"top",selector:false,template:'<div class="tooltip" role="tooltip"><div class="tooltip-arrow"></div><div class="tooltip-inner"></div></div>',trigger:"hover focus",title:"",delay:0,html:false,container:false,viewport:{selector:"body",padding:0}};b.prototype.init=function(b,c,d){this.enabled=true;this.type=b;this.$element=a(c);this.options=this.getOptions(d);this.$viewport=this.options.viewport&&a(this.options.viewport.selector||this.options.viewport);var e=this.options.trigger.split(" ");for(var f=e.length;f--;){var g=e[f];if(g=="click"){this.$element.on("click."+this.type,this.options.selector,a.proxy(this.toggle,this))}else if(g!="manual"){var h=g=="hover"?"mouseenter":"focusin";var i=g=="hover"?"mouseleave":"focusout";this.$element.on(h+"."+this.type,this.options.selector,a.proxy(this.enter,this));this.$element.on(i+"."+this.type,this.options.selector,a.proxy(this.leave,this))}}this.options.selector?this._options=a.extend({},this.options,{trigger:"manual",selector:""}):this.fixTitle()};b.prototype.getDefaults=function(){return b.DEFAULTS};b.prototype.getOptions=function(b){b=a.extend({},this.getDefaults(),this.$element.data(),b);if(b.delay&&typeof b.delay=="number"){b.delay={show:b.delay,hide:b.delay}}return b};b.prototype.getDelegateOptions=function(){var b={};var c=this.getDefaults();this._options&&a.each(this._options,function(a,d){if(c[a]!=d)b[a]=d});return b};b.prototype.enter=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(!c){c=new this.constructor(b.currentTarget,this.getDelegateOptions());a(b.currentTarget).data("bs."+this.type,c)}clearTimeout(c.timeout);c.hoverState="in";if(!c.options.delay||!c.options.delay.show)return c.show();c.timeout=setTimeout(function(){if(c.hoverState=="in")c.show()},c.options.delay.show)};b.prototype.leave=function(b){var c=b instanceof this.constructor?b:a(b.currentTarget).data("bs."+this.type);if(!c){c=new this.constructor(b.currentTarget,this.getDelegateOptions());a(b.currentTarget).data("bs."+this.type,c)}clearTimeout(c.timeout);c.hoverState="out";if(!c.options.delay||!c.options.delay.hide)return c.hide();c.timeout=setTimeout(function(){if(c.hoverState=="out")c.hide()},c.options.delay.hide)};b.prototype.show=function(){var b=a.Event("show.bs."+this.type);if(this.hasContent()&&this.enabled){this.$element.trigger(b);var c=a.contains(document.documentElement,this.$element[0]);if(b.isDefaultPrevented()||!c)return;var d=this;var e=this.tip();var f=this.getUID(this.type);this.setContent();e.attr("id",f);this.$element.attr("aria-describedby",f);if(this.options.animation)e.addClass("fade");var g=typeof this.options.placement=="function"?this.options.placement.call(this,e[0],this.$element[0]):this.options.placement;var h=/\s?auto?\s?/i;var i=h.test(g);if(i)g=g.replace(h,"")||"top";e.detach().css({top:0,left:0,display:"block"}).addClass(g).data("bs."+this.type,this);this.options.container?e.appendTo(this.options.container):e.insertAfter(this.$element);var j=this.getPosition();var k=e[0].offsetWidth;var l=e[0].offsetHeight;if(i){var m=g;var n=this.$element.parent();var o=this.getPosition(n);g=g=="bottom"&&j.top+j.height+l-o.scroll>o.height?"top":g=="top"&&j.top-o.scroll-l<0?"bottom":g=="right"&&j.right+k>o.width?"left":g=="left"&&j.left-k<o.left?"right":g;e.removeClass(m).addClass(g)}var p=this.getCalculatedOffset(g,j,k,l);this.applyPlacement(p,g);var q=function(){d.$element.trigger("shown.bs."+d.type);d.hoverState=null};a.support.transition&&this.$tip.hasClass("fade")?e.one("bsTransitionEnd",q).emulateTransitionEnd(150):q()}};b.prototype.applyPlacement=function(b,c){var d=this.tip();var e=d[0].offsetWidth;var f=d[0].offsetHeight;var g=parseInt(d.css("margin-top"),10);var h=parseInt(d.css("margin-left"),10);if(isNaN(g))g=0;if(isNaN(h))h=0;b.top=b.top+g;b.left=b.left+h;a.offset.setOffset(d[0],a.extend({using:function(a){d.css({top:Math.round(a.top),left:Math.round(a.left)})}},b),0);d.addClass("in");var i=d[0].offsetWidth;var j=d[0].offsetHeight;if(c=="top"&&j!=f){b.top=b.top+f-j}var k=this.getViewportAdjustedDelta(c,b,i,j);if(k.left)b.left+=k.left;else b.top+=k.top;var l=k.left?k.left*2-e+i:k.top*2-f+j;var m=k.left?"left":"top";var n=k.left?"offsetWidth":"offsetHeight";d.offset(b);this.replaceArrow(l,d[0][n],m)};b.prototype.replaceArrow=function(a,b,c){this.arrow().css(c,a?50*(1-a/b)+"%":"")};b.prototype.setContent=function(){var a=this.tip();var b=this.getTitle();a.find(".tooltip-inner")[this.options.html?"html":"text"](b);a.removeClass("fade in top bottom left right")};b.prototype.hide=function(){var b=this;var c=this.tip();var d=a.Event("hide.bs."+this.type);this.$element.removeAttr("aria-describedby");function e(){if(b.hoverState!="in")c.detach();b.$element.trigger("hidden.bs."+b.type)}this.$element.trigger(d);if(d.isDefaultPrevented())return;c.removeClass("in");a.support.transition&&this.$tip.hasClass("fade")?c.one("bsTransitionEnd",e).emulateTransitionEnd(150):e();this.hoverState=null;return this};b.prototype.fixTitle=function(){var a=this.$element;if(a.attr("title")||typeof a.attr("data-original-title")!="string"){a.attr("data-original-title",a.attr("title")||"").attr("title","")}};b.prototype.hasContent=function(){return this.getTitle()};b.prototype.getPosition=function(b){b=b||this.$element;var c=b[0];var d=c.tagName=="BODY";return a.extend({},typeof c.getBoundingClientRect=="function"?c.getBoundingClientRect():null,{scroll:d?document.documentElement.scrollTop||document.body.scrollTop:b.scrollTop(),width:d?a(window).width():b.outerWidth(),height:d?a(window).height():b.outerHeight()},d?{top:0,left:0}:b.offset())};b.prototype.getCalculatedOffset=function(a,b,c,d){return a=="bottom"?{top:b.top+b.height,left:b.left+b.width/2-c/2}:a=="top"?{top:b.top-d,left:b.left+b.width/2-c/2}:a=="left"?{top:b.top+b.height/2-d/2,left:b.left-c}:{top:b.top+b.height/2-d/2,left:b.left+b.width}};b.prototype.getViewportAdjustedDelta=function(a,b,c,d){var e={top:0,left:0};if(!this.$viewport)return e;var f=this.options.viewport&&this.options.viewport.padding||0;var g=this.getPosition(this.$viewport);if(/right|left/.test(a)){var h=b.top-f-g.scroll;var i=b.top+f-g.scroll+d;if(h<g.top){e.top=g.top-h}else if(i>g.top+g.height){e.top=g.top+g.height-i}}else{var j=b.left-f;var k=b.left+f+c;if(j<g.left){e.left=g.left-j}else if(k>g.width){e.left=g.left+g.width-k}}return e};b.prototype.getTitle=function(){var a;var b=this.$element;var c=this.options;a=b.attr("data-original-title")||(typeof c.title=="function"?c.title.call(b[0]):c.title);return a};b.prototype.getUID=function(a){do a+=~~(Math.random()*1e6);while(document.getElementById(a));return a};b.prototype.tip=function(){return this.$tip=this.$tip||a(this.options.template)};b.prototype.arrow=function(){return this.$arrow=this.$arrow||this.tip().find(".tooltip-arrow")};b.prototype.validate=function(){if(!this.$element[0].parentNode){this.hide();this.$element=null;this.options=null}};b.prototype.enable=function(){this.enabled=true};b.prototype.disable=function(){this.enabled=false};b.prototype.toggleEnabled=function(){this.enabled=!this.enabled};b.prototype.toggle=function(b){var c=this;if(b){c=a(b.currentTarget).data("bs."+this.type);if(!c){c=new this.constructor(b.currentTarget,this.getDelegateOptions());a(b.currentTarget).data("bs."+this.type,c)}}c.tip().hasClass("in")?c.leave(c):c.enter(c)};b.prototype.destroy=function(){clearTimeout(this.timeout);this.hide().$element.off("."+this.type).removeData("bs."+this.type)};function c(c){return this.each(function(){var d=a(this);var e=d.data("bs.tooltip");var f=typeof c=="object"&&c;if(!e&&c=="destroy")return;if(!e)d.data("bs.tooltip",e=new b(this,f));if(typeof c=="string")e[c]()})}var d=a.fn.tooltip;a.fn.tooltip=c;a.fn.tooltip.Constructor=b;a.fn.tooltip.noConflict=function(){a.fn.tooltip=d;return this}}(jQuery);+function(a){"use strict";function b(){var a=document.createElement("bootstrap");var b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b){if(a.style[c]!==undefined){return{end:b[c]}}}return false}a.fn.emulateTransitionEnd=function(b){var c=false;var d=this;a(this).one("bsTransitionEnd",function(){c=true});var e=function(){if(!c)a(d).trigger(a.support.transition.end)};setTimeout(e,b);return this};a(function(){a.support.transition=b();if(!a.support.transition)return;a.event.special.bsTransitionEnd={bindType:a.support.transition.end,delegateType:a.support.transition.end,handle:function(b){if(a(b.target).is(this))return b.handleObj.handler.apply(this,arguments)}}})}(jQuery);(function(a){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else if(typeof exports==="object"){a(require("jquery"))}else{a(jQuery)}})(function(a){var b=/\+/g;function c(a){return h.raw?a:encodeURIComponent(a)}function d(a){return h.raw?a:decodeURIComponent(a)}function e(a){return c(h.json?JSON.stringify(a):String(a))}function f(a){if(a.indexOf('"')===0){a=a.slice(1,-1).replace(/\\"/g,'"').replace(/\\\\/g,"\\")}try{a=decodeURIComponent(a.replace(b," "));return h.json?JSON.parse(a):a}catch(c){}}function g(b,c){var d=h.raw?b:f(b);return a.isFunction(c)?c(d):d}var h=a.cookie=function(b,f,i){if(f!==undefined&&!a.isFunction(f)){i=a.extend({},h.defaults,i);if(typeof i.expires==="number"){var j=i.expires,k=i.expires=new Date;k.setTime(+k+j*864e5)}return document.cookie=[c(b),"=",e(f),i.expires?"; expires="+i.expires.toUTCString():"",i.path?"; path="+i.path:"",i.domain?"; domain="+i.domain:"",i.secure?"; secure":""].join("")}var l=b?undefined:{};var m=document.cookie?document.cookie.split("; "):[];for(var n=0,o=m.length;n<o;n++){var p=m[n].split("=");var q=d(p.shift());var r=p.join("=");if(b&&b===q){l=g(r,f);break}if(!b&&(r=g(r))!==undefined){l[q]=r}}return l};h.defaults={};a.removeCookie=function(b,c){if(a.cookie(b)===undefined){return false}a.cookie(b,"",a.extend({},c,{expires:-1}));return!a.cookie(b)}});(function(a){a.inputhistory={};a.inputhistory.defaultOptions={history:[],preventSubmit:false};a.fn.history=a.fn.inputhistory=function(b){b=a.extend(a.inputhistory.defaultOptions,b);var c=this;if(c.size()>1){return c.each(function(){a(this).history(b)})}var d=b.history;d.push("");var e=0;c.on("keydown",function(a){var f=a.which;switch(f){case 13:if(c.val()!=""){e=d.length;d[e-1]=c.val();d.push("");if(d[e-1]==d[e-2]){d.splice(-2,1);e--}}if(!b.preventSubmit){c.parents("form").eq(0).submit()}c.val("");break;case 38:case 40:if(a.ctrlKey||a.metaKey){break}d[e]=c.val();if(f==38&&e!=0){e--}else if(f==40&&e<d.length-1){e++}c.val(d[e]);break;default:return}a.preventDefault()});return this}})(jQuery);(function(a,b,c){var d={8:"backspace",9:"tab",13:"enter",16:"shift",17:"ctrl",18:"alt",20:"capslock",27:"esc",32:"space",33:"pageup",34:"pagedown",35:"end",36:"home",37:"left",38:"up",39:"right",40:"down",45:"ins",46:"del",91:"meta",93:"meta",224:"meta"},e={106:"*",107:"+",109:"-",110:".",111:"/",186:";",187:"=",188:",",189:"-",190:".",191:"/",192:"`",219:"[",220:"\\",221:"]",222:"'"},f={"~":"`","!":"1","@":"2","#":"3",$:"4","%":"5","^":"6","&":"7","*":"8","(":"9",")":"0",_:"-","+":"=",":":";",'"':"'","<":",",">":".","?":"/","|":"\\"},g={option:"alt",command:"meta","return":"enter",escape:"esc",mod:/Mac|iPod|iPhone|iPad/.test(navigator.platform)?"meta":"ctrl"},h,i={},j={},k={},l,m=false,n=false,o=false;for(var p=1;p<20;++p){d[111+p]="f"+p}for(p=0;p<=9;++p){d[p+96]=p}function q(a,b,c){if(a.addEventListener){a.addEventListener(b,c,false);return}a.attachEvent("on"+b,c)}function r(a){if(a.type=="keypress"){var b=String.fromCharCode(a.which);if(!a.shiftKey){b=b.toLowerCase()}return b}if(d[a.which]){return d[a.which]}if(e[a.which]){return e[a.which]}return String.fromCharCode(a.which).toLowerCase()}function s(a,b){return a.sort().join(",")===b.sort().join(",")}function t(a){a=a||{};var b=false,c;for(c in k){if(a[c]){b=true;continue}k[c]=0}if(!b){o=false}}function u(a,b,c,d,e,f){var g,h,j=[],l=c.type;if(!i[a]){return[]}if(l=="keyup"&&B(a)){b=[a]}for(g=0;g<i[a].length;++g){h=i[a][g];if(!d&&h.seq&&k[h.seq]!=h.level){continue}if(l!=h.action){continue}if(l=="keypress"&&!c.metaKey&&!c.ctrlKey||s(b,h.modifiers)){var m=!d&&h.combo==e;var n=d&&h.seq==d&&h.level==f;if(m||n){i[a].splice(g,1)}j.push(h)}}return j}function v(a){var b=[];if(a.shiftKey){b.push("shift")}if(a.altKey){b.push("alt")}if(a.ctrlKey){b.push("ctrl")}if(a.metaKey){b.push("meta")}return b}function w(a){if(a.preventDefault){a.preventDefault();return}a.returnValue=false}function x(a){if(a.stopPropagation){a.stopPropagation();return}a.cancelBubble=true}function y(a,b,c,d){if(K.stopCallback(b,b.target||b.srcElement,c,d)){return}if(a(b,c)===false){w(b);x(b)}}function z(a,b,c){var d=u(a,b,c),e,f={},g=0,h=false;for(e=0;e<d.length;++e){if(d[e].seq){g=Math.max(g,d[e].level)}}for(e=0;e<d.length;++e){if(d[e].seq){if(d[e].level!=g){continue}h=true;f[d[e].seq]=1;y(d[e].callback,c,d[e].combo,d[e].seq);continue}if(!h){y(d[e].callback,c,d[e].combo)}}var i=c.type=="keypress"&&n;if(c.type==o&&!B(a)&&!i){t(f)}n=h&&c.type=="keydown"}function A(a){if(typeof a.which!=="number"){a.which=a.keyCode}var b=r(a);if(!b){return}if(a.type=="keyup"&&m===b){m=false;return}K.handleKey(b,v(a),a)}function B(a){return a=="shift"||a=="ctrl"||a=="alt"||a=="meta"}function C(){clearTimeout(l);l=setTimeout(t,1e3)}function D(){if(!h){h={};for(var a in d){if(a>95&&a<112){continue}if(d.hasOwnProperty(a)){h[d[a]]=a}}}return h}function E(a,b,c){if(!c){c=D()[a]?"keydown":"keypress"}if(c=="keypress"&&b.length){c="keydown"}return c}function F(a,b,c,d){k[a]=0;function e(b){return function(){o=b;++k[a];C()}}function f(b){y(c,b,a);if(d!=="keyup"){m=r(b)}setTimeout(t,10)}for(var g=0;g<b.length;++g){var h=g+1===b.length;var i=h?f:e(d||H(b[g+1]).action);I(b[g],i,d,a,g)}}function G(a){if(a==="+"){return["+"]}return a.split("+")}function H(a,b){var c,d,e,h=[];c=G(a);for(e=0;e<c.length;++e){d=c[e];if(g[d]){d=g[d]}if(b&&b!="keypress"&&f[d]){d=f[d];h.push("shift")}if(B(d)){h.push(d)}}b=E(d,h,b);return{key:d,modifiers:h,action:b}}function I(a,b,c,d,e){j[a+":"+c]=b;a=a.replace(/\s+/g," ");var f=a.split(" "),g;if(f.length>1){F(a,f,b,c);
return}g=H(a,c);i[g.key]=i[g.key]||[];u(g.key,g.modifiers,{type:g.action},d,a,e);i[g.key][d?"unshift":"push"]({callback:b,modifiers:g.modifiers,action:g.action,seq:d,level:e,combo:a})}function J(a,b,c){for(var d=0;d<a.length;++d){I(a[d],b,c)}}q(b,"keypress",A);q(b,"keydown",A);q(b,"keyup",A);var K={bind:function(a,b,c){a=a instanceof Array?a:[a];J(a,b,c);return this},unbind:function(a,b){return K.bind(a,function(){},b)},trigger:function(a,b){if(j[a+":"+b]){j[a+":"+b]({},a)}return this},reset:function(){i={};j={};return this},stopCallback:function(a,b){if((" "+b.className+" ").indexOf(" mousetrap ")>-1){return false}return b.tagName=="INPUT"||b.tagName=="SELECT"||b.tagName=="TEXTAREA"||b.isContentEditable},handleKey:z};a.Mousetrap=K;if(typeof define==="function"&&define.amd){define(K)}})(window,document);(function(a){a.fn.sticky=function(){if(this.size()>1){return this.each(function(){a(this).sticky(options)})}var c=false;var d=this;this.unbind(".sticky");this.on("beforeAppend.sticky",function(){c=b.call(d)});this.on("afterAppend.sticky",function(){if(c){d.scrollBottom()}});var e=this.css("overflow-y");if(e=="visible"){e="auto"}this.css({"overflow-y":e});a(window).unbind(".sticky");a(window).on("resize.sticky",function(){d.scrollBottom()});this.scrollBottom();return this};a.fn.scrollBottom=function(){return this.each(function(){a(this).animate({scrollTop:this.scrollHeight},0)})};function b(){if(this.scrollTop()+this.outerHeight()+1>=this.prop("scrollHeight")){return true}else{return false}}var c=a.fn.append;a.fn.append=function(){this.trigger("beforeAppend");c.apply(this,arguments).trigger("afterAppend");return this}})(jQuery);(function(a){var b={backspace:8,tab:9,up:38,down:40};a.tabcomplete={};a.tabcomplete.defaultOptions={after:"",arrowKeys:false,caseSensitive:false,hint:"placeholder",minLength:1};a.fn.tab=a.fn.tabcomplete=function(f,g){if(this.length>1){return this.each(function(){a(this).tabcomplete(f,g)})}var h=this.prop("tagName");if(h!="INPUT"&&h!="TEXTAREA"){return}g=a.extend(a.tabcomplete.defaultOptions,g);this.unbind(".tabcomplete");this.prev(".hint").remove();var i=this;var j=false;var k=-1;var l=[];var m="";var n=a.noop;switch(g.hint){case"placeholder":n=d;break;case"select":n=e;break}this.on("input.tabcomplete",function(){var b=i.val();var d=b.split(/ |\n/).pop();k=-1;m="";l=[];if(i[0].selectionStart==b.length&&d.length){if(typeof f==="function"){l=f(d)}else{l=c(d,f,g.caseSensitive)}if(g.after){l=a.map(l,function(a){return a+g.after})}}i.trigger("match",l.length);if(g.hint){if(!(g.hint=="select"&&j)&&d.length>=g.minLength){n.call(i,l[0])}else{n.call(i,"")}}if(j){j=false}});this.on("keydown.tabcomplete",function(a){var c=a.which;if(c==b.tab||g.arrowKeys&&(c==b.up||c==b.down)){a.preventDefault();if(c!=b.up){k++}else{if(k==-1)return;if(k==0){k=l.length-1}else{k--}}var d=l[k%l.length];if(!d){return}var e=i.val();m=m||e.split(/ |\n/).pop();if(m.length<g.minLength){return}var f=e.substr(0,i[0].selectionStart-m.length)+d;i.val(f);if(g.hint=="select"){i[0].selectionStart=f.length}m=d;i.trigger("tabcomplete",m);if(g.hint){n.call(i,"")}}else if(a.which==b.backspace){j=true;k=-1;m=""}});if(g.hint){n.call(this,"")}return this};function c(b,c,d){return a.grep(c,function(a){if(d){return!a.indexOf(b)}else{return!a.toLowerCase().indexOf(b.toLowerCase())}})}function d(b){var c=this;var d=c.prev(".hint");c.css({backgroundColor:"transparent",position:"relative"});if(!d.length){c.wrap(a("<div>").css({position:"relative",height:c.css("height")}));d=c.clone().attr("tabindex",-1).removeAttr("id name placeholder").addClass("hint").insertBefore(c);d.css({position:"absolute"})}var e="";if(typeof b!=="undefined"){var f=c.val();e=f+b.substr(f.split(/ |\n/).pop().length)}d.val(e)}function e(a){var b=this;var c=b.val();if(a){b.val(c+a.substr(c.split(/ |\n/).pop().length));b[0].selectionStart=c.length}}})(jQuery);(function(a){var b,c="2.7.0",d=typeof global!=="undefined"?global:this,e,f=Math.round,g,h=0,i=1,j=2,k=3,l=4,m=5,n=6,o={},p={_isAMomentObject:null,_i:null,_f:null,_l:null,_strict:null,_tzm:null,_isUTC:null,_offset:null,_pf:null,_lang:null},q=typeof module!=="undefined"&&module.exports,r=/^\/?Date\((\-?\d+)/i,s=/(\-)?(?:(\d*)\.)?(\d+)\:(\d+)(?:\:(\d+)\.?(\d{3})?)?/,t=/^(-)?P(?:(?:([0-9,.]*)Y)?(?:([0-9,.]*)M)?(?:([0-9,.]*)D)?(?:T(?:([0-9,.]*)H)?(?:([0-9,.]*)M)?(?:([0-9,.]*)S)?)?|([0-9,.]*)W)$/,u=/(\[[^\[]*\])|(\\)?(Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Q|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|mm?|ss?|S{1,4}|X|zz?|ZZ?|.)/g,v=/(\[[^\[]*\])|(\\)?(LT|LL?L?L?|l{1,4})/g,w=/\d\d?/,x=/\d{1,3}/,y=/\d{1,4}/,z=/[+\-]?\d{1,6}/,A=/\d+/,B=/[0-9]*['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]+|[\u0600-\u06FF\/]+(\s*?[\u0600-\u06FF]+){1,2}/i,C=/Z|[\+\-]\d\d:?\d\d/gi,D=/T/i,E=/[\+\-]?\d+(\.\d{1,3})?/,F=/\d{1,2}/,G=/\d/,H=/\d\d/,I=/\d{3}/,J=/\d{4}/,K=/[+-]?\d{6}/,L=/[+-]?\d+/,M=/^\s*(?:[+-]\d{6}|\d{4})-(?:(\d\d-\d\d)|(W\d\d$)|(W\d\d-\d)|(\d\d\d))((T| )(\d\d(:\d\d(:\d\d(\.\d+)?)?)?)?([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,N="YYYY-MM-DDTHH:mm:ssZ",O=[["YYYYYY-MM-DD",/[+-]\d{6}-\d{2}-\d{2}/],["YYYY-MM-DD",/\d{4}-\d{2}-\d{2}/],["GGGG-[W]WW-E",/\d{4}-W\d{2}-\d/],["GGGG-[W]WW",/\d{4}-W\d{2}/],["YYYY-DDD",/\d{4}-\d{3}/]],P=[["HH:mm:ss.SSSS",/(T| )\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss",/(T| )\d\d:\d\d:\d\d/],["HH:mm",/(T| )\d\d:\d\d/],["HH",/(T| )\d\d/]],Q=/([\+\-]|\d\d)/gi,R="Date|Hours|Minutes|Seconds|Milliseconds".split("|"),S={Milliseconds:1,Seconds:1e3,Minutes:6e4,Hours:36e5,Days:864e5,Months:2592e6,Years:31536e6},T={ms:"millisecond",s:"second",m:"minute",h:"hour",d:"day",D:"date",w:"week",W:"isoWeek",M:"month",Q:"quarter",y:"year",DDD:"dayOfYear",e:"weekday",E:"isoWeekday",gg:"weekYear",GG:"isoWeekYear"},U={dayofyear:"dayOfYear",isoweekday:"isoWeekday",isoweek:"isoWeek",weekyear:"weekYear",isoweekyear:"isoWeekYear"},V={},W={s:45,m:45,h:22,dd:25,dm:45,dy:345},X="DDD w W M D d".split(" "),Y="M D H h m s w W".split(" "),Z={M:function(){return this.month()+1},MMM:function(a){return this.lang().monthsShort(this,a)},MMMM:function(a){return this.lang().months(this,a)},D:function(){return this.date()},DDD:function(){return this.dayOfYear()},d:function(){return this.day()},dd:function(a){return this.lang().weekdaysMin(this,a)},ddd:function(a){return this.lang().weekdaysShort(this,a)},dddd:function(a){return this.lang().weekdays(this,a)},w:function(){return this.week()},W:function(){return this.isoWeek()},YY:function(){return kb(this.year()%100,2)},YYYY:function(){return kb(this.year(),4)},YYYYY:function(){return kb(this.year(),5)},YYYYYY:function(){var a=this.year(),b=a>=0?"+":"-";return b+kb(Math.abs(a),6)},gg:function(){return kb(this.weekYear()%100,2)},gggg:function(){return kb(this.weekYear(),4)},ggggg:function(){return kb(this.weekYear(),5)},GG:function(){return kb(this.isoWeekYear()%100,2)},GGGG:function(){return kb(this.isoWeekYear(),4)},GGGGG:function(){return kb(this.isoWeekYear(),5)},e:function(){return this.weekday()},E:function(){return this.isoWeekday()},a:function(){return this.lang().meridiem(this.hours(),this.minutes(),true)},A:function(){return this.lang().meridiem(this.hours(),this.minutes(),false)},H:function(){return this.hours()},h:function(){return this.hours()%12||12},m:function(){return this.minutes()},s:function(){return this.seconds()},S:function(){return sb(this.milliseconds()/100)},SS:function(){return kb(sb(this.milliseconds()/10),2)},SSS:function(){return kb(this.milliseconds(),3)},SSSS:function(){return kb(this.milliseconds(),3)},Z:function(){var a=-this.zone(),b="+";if(a<0){a=-a;b="-"}return b+kb(sb(a/60),2)+":"+kb(sb(a)%60,2)},ZZ:function(){var a=-this.zone(),b="+";if(a<0){a=-a;b="-"}return b+kb(sb(a/60),2)+kb(sb(a)%60,2)},z:function(){return this.zoneAbbr()},zz:function(){return this.zoneName()},X:function(){return this.unix()},Q:function(){return this.quarter()}},$=["months","monthsShort","weekdays","weekdaysShort","weekdaysMin"];function _(a,b,c){switch(arguments.length){case 2:return a!=null?a:b;case 3:return a!=null?a:b!=null?b:c;default:throw new Error("Implement me")}}function ab(){return{empty:false,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:false,invalidMonth:null,invalidFormat:false,userInvalidated:false,iso:false}}function bb(a,c){var d=true;function e(){if(b.suppressDeprecationWarnings===false&&typeof console!=="undefined"&&console.warn){console.warn("Deprecation warning: "+a)}}return hb(function(){if(d){e();d=false}return c.apply(this,arguments)},c)}function cb(a,b){return function(c){return kb(a.call(this,c),b)}}function db(a,b){return function(c){return this.lang().ordinal(a.call(this,c),b)}}while(X.length){g=X.pop();Z[g+"o"]=db(Z[g],g)}while(Y.length){g=Y.pop();Z[g+g]=cb(Z[g],2)}Z.DDDD=cb(Z.DDD,3);function eb(){}function fb(a){xb(a);hb(this,a)}function gb(a){var b=qb(a),c=b.year||0,d=b.quarter||0,e=b.month||0,f=b.week||0,g=b.day||0,h=b.hour||0,i=b.minute||0,j=b.second||0,k=b.millisecond||0;this._milliseconds=+k+j*1e3+i*6e4+h*36e5;this._days=+g+f*7;this._months=+e+d*3+c*12;this._data={};this._bubble()}function hb(a,b){for(var c in b){if(b.hasOwnProperty(c)){a[c]=b[c]}}if(b.hasOwnProperty("toString")){a.toString=b.toString}if(b.hasOwnProperty("valueOf")){a.valueOf=b.valueOf}return a}function ib(a){var b={},c;for(c in a){if(a.hasOwnProperty(c)&&p.hasOwnProperty(c)){b[c]=a[c]}}return b}function jb(a){if(a<0){return Math.ceil(a)}else{return Math.floor(a)}}function kb(a,b,c){var d=""+Math.abs(a),e=a>=0;while(d.length<b){d="0"+d}return(e?c?"+":"":"-")+d}function lb(a,c,d,e){var f=c._milliseconds,g=c._days,h=c._months;e=e==null?true:e;if(f){a._d.setTime(+a._d+f*d)}if(g){fc(a,"Date",ec(a,"Date")+g*d)}if(h){dc(a,ec(a,"Month")+h*d)}if(e){b.updateOffset(a,g||h)}}function mb(a){return Object.prototype.toString.call(a)==="[object Array]"}function nb(a){return Object.prototype.toString.call(a)==="[object Date]"||a instanceof Date}function ob(a,b,c){var d=Math.min(a.length,b.length),e=Math.abs(a.length-b.length),f=0,g;for(g=0;g<d;g++){if(c&&a[g]!==b[g]||!c&&sb(a[g])!==sb(b[g])){f++}}return f+e}function pb(a){if(a){var b=a.toLowerCase().replace(/(.)s$/,"$1");a=T[a]||U[b]||b}return a}function qb(a){var b={},c,d;for(d in a){if(a.hasOwnProperty(d)){c=pb(d);if(c){b[c]=a[d]}}}return b}function rb(c){var d,e;if(c.indexOf("week")===0){d=7;e="day"}else if(c.indexOf("month")===0){d=12;e="month"}else{return}b[c]=function(f,g){var h,i,j=b.fn._lang[c],k=[];if(typeof f==="number"){g=f;f=a}i=function(a){var c=b().utc().set(e,a);return j.call(b.fn._lang,c,f||"")};if(g!=null){return i(g)}else{for(h=0;h<d;h++){k.push(i(h))}return k}}}function sb(a){var b=+a,c=0;if(b!==0&&isFinite(b)){if(b>=0){c=Math.floor(b)}else{c=Math.ceil(b)}}return c}function tb(a,b){return new Date(Date.UTC(a,b+1,0)).getUTCDate()}function ub(a,c,d){return _b(b([a,11,31+c-d]),c,d).week}function vb(a){return wb(a)?366:365}function wb(a){return a%4===0&&a%100!==0||a%400===0}function xb(a){var b;if(a._a&&a._pf.overflow===-2){b=a._a[i]<0||a._a[i]>11?i:a._a[j]<1||a._a[j]>tb(a._a[h],a._a[i])?j:a._a[k]<0||a._a[k]>23?k:a._a[l]<0||a._a[l]>59?l:a._a[m]<0||a._a[m]>59?m:a._a[n]<0||a._a[n]>999?n:-1;if(a._pf._overflowDayOfYear&&(b<h||b>j)){b=j}a._pf.overflow=b}}function yb(a){if(a._isValid==null){a._isValid=!isNaN(a._d.getTime())&&a._pf.overflow<0&&!a._pf.empty&&!a._pf.invalidMonth&&!a._pf.nullInput&&!a._pf.invalidFormat&&!a._pf.userInvalidated;if(a._strict){a._isValid=a._isValid&&a._pf.charsLeftOver===0&&a._pf.unusedTokens.length===0}}return a._isValid}function zb(a){return a?a.toLowerCase().replace("_","-"):a}function Ab(a,c){return c._isUTC?b(a).zone(c._offset||0):b(a).local()}hb(eb.prototype,{set:function(a){var b,c;for(c in a){b=a[c];if(typeof b==="function"){this[c]=b}else{this["_"+c]=b}}},_months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),months:function(a){return this._months[a.month()]},_monthsShort:"Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),monthsShort:function(a){return this._monthsShort[a.month()]},monthsParse:function(a){var c,d,e;if(!this._monthsParse){this._monthsParse=[]}for(c=0;c<12;c++){if(!this._monthsParse[c]){d=b.utc([2e3,c]);e="^"+this.months(d,"")+"|^"+this.monthsShort(d,"");this._monthsParse[c]=new RegExp(e.replace(".",""),"i")}if(this._monthsParse[c].test(a)){return c}}},_weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),weekdays:function(a){return this._weekdays[a.day()]},_weekdaysShort:"Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),weekdaysShort:function(a){return this._weekdaysShort[a.day()]},_weekdaysMin:"Su_Mo_Tu_We_Th_Fr_Sa".split("_"),weekdaysMin:function(a){return this._weekdaysMin[a.day()]},weekdaysParse:function(a){var c,d,e;if(!this._weekdaysParse){this._weekdaysParse=[]}for(c=0;c<7;c++){if(!this._weekdaysParse[c]){d=b([2e3,1]).day(c);e="^"+this.weekdays(d,"")+"|^"+this.weekdaysShort(d,"")+"|^"+this.weekdaysMin(d,"");this._weekdaysParse[c]=new RegExp(e.replace(".",""),"i")}if(this._weekdaysParse[c].test(a)){return c}}},_longDateFormat:{LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D YYYY",LLL:"MMMM D YYYY LT",LLLL:"dddd, MMMM D YYYY LT"},longDateFormat:function(a){var b=this._longDateFormat[a];if(!b&&this._longDateFormat[a.toUpperCase()]){b=this._longDateFormat[a.toUpperCase()].replace(/MMMM|MM|DD|dddd/g,function(a){return a.slice(1)});this._longDateFormat[a]=b}return b},isPM:function(a){return(a+"").toLowerCase().charAt(0)==="p"},_meridiemParse:/[ap]\.?m?\.?/i,meridiem:function(a,b,c){if(a>11){return c?"pm":"PM"}else{return c?"am":"AM"}},_calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},calendar:function(a,b){var c=this._calendar[a];return typeof c==="function"?c.apply(b):c},_relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},relativeTime:function(a,b,c,d){var e=this._relativeTime[c];return typeof e==="function"?e(a,b,c,d):e.replace(/%d/i,a)},pastFuture:function(a,b){var c=this._relativeTime[a>0?"future":"past"];return typeof c==="function"?c(b):c.replace(/%s/i,b)},ordinal:function(a){return this._ordinal.replace("%d",a)},_ordinal:"%d",preparse:function(a){return a},postformat:function(a){return a},week:function(a){return _b(a,this._week.dow,this._week.doy).week},_week:{dow:0,doy:6},_invalidDate:"Invalid date",invalidDate:function(){return this._invalidDate}});function Bb(a,b){b.abbr=a;if(!o[a]){o[a]=new eb}o[a].set(b);return o[a]}function Cb(a){delete o[a]}function Db(a){var c=0,d,e,f,g,h=function(a){if(!o[a]&&q){try{require("./lang/"+a)}catch(b){}}return o[a]};if(!a){return b.fn._lang}if(!mb(a)){e=h(a);if(e){return e}a=[a]}while(c<a.length){g=zb(a[c]).split("-");d=g.length;f=zb(a[c+1]);f=f?f.split("-"):null;while(d>0){e=h(g.slice(0,d).join("-"));if(e){return e}if(f&&f.length>=d&&ob(g,f,true)>=d-1){break}d--}c++}return b.fn._lang}function Eb(a){if(a.match(/\[[\s\S]/)){return a.replace(/^\[|\]$/g,"")}return a.replace(/\\/g,"")}function Fb(a){var b=a.match(u),c,d;for(c=0,d=b.length;c<d;c++){if(Z[b[c]]){b[c]=Z[b[c]]}else{b[c]=Eb(b[c])}}return function(e){var f="";for(c=0;c<d;c++){f+=b[c]instanceof Function?b[c].call(e,a):b[c]}return f}}function Gb(a,b){if(!a.isValid()){return a.lang().invalidDate()}b=Hb(b,a.lang());if(!V[b]){V[b]=Fb(b)}return V[b](a)}function Hb(a,b){var c=5;function d(a){return b.longDateFormat(a)||a}v.lastIndex=0;while(c>=0&&v.test(a)){a=a.replace(v,d);v.lastIndex=0;c-=1}return a}function Ib(a,b){var c,d=b._strict;switch(a){case"Q":return G;case"DDDD":return I;case"YYYY":case"GGGG":case"gggg":return d?J:y;case"Y":case"G":case"g":return L;case"YYYYYY":case"YYYYY":case"GGGGG":case"ggggg":return d?K:z;case"S":if(d){return G}case"SS":if(d){return H}case"SSS":if(d){return I}case"DDD":return x;case"MMM":case"MMMM":case"dd":case"ddd":case"dddd":return B;case"a":case"A":return Db(b._l)._meridiemParse;case"X":return E;case"Z":case"ZZ":return C;case"T":return D;case"SSSS":return A;case"MM":case"DD":case"YY":case"GG":case"gg":case"HH":case"hh":case"mm":case"ss":case"ww":case"WW":return d?H:w;case"M":case"D":case"d":case"H":case"h":case"m":case"s":case"w":case"W":case"e":case"E":return w;case"Do":return F;default:c=new RegExp(Rb(Qb(a.replace("\\","")),"i"));return c}}function Jb(a){a=a||"";var b=a.match(C)||[],c=b[b.length-1]||[],d=(c+"").match(Q)||["-",0,0],e=+(d[1]*60)+sb(d[2]);return d[0]==="+"?-e:e}function Kb(a,c,d){var e,f=d._a;switch(a){case"Q":if(c!=null){f[i]=(sb(c)-1)*3}break;case"M":case"MM":if(c!=null){f[i]=sb(c)-1}break;case"MMM":case"MMMM":e=Db(d._l).monthsParse(c);if(e!=null){f[i]=e}else{d._pf.invalidMonth=c}break;case"D":case"DD":if(c!=null){f[j]=sb(c)}break;case"Do":if(c!=null){f[j]=sb(parseInt(c,10))}break;case"DDD":case"DDDD":if(c!=null){d._dayOfYear=sb(c)}break;case"YY":f[h]=b.parseTwoDigitYear(c);break;case"YYYY":case"YYYYY":case"YYYYYY":f[h]=sb(c);break;case"a":case"A":d._isPm=Db(d._l).isPM(c);break;case"H":case"HH":case"h":case"hh":f[k]=sb(c);break;case"m":case"mm":f[l]=sb(c);break;case"s":case"ss":f[m]=sb(c);break;case"S":case"SS":case"SSS":case"SSSS":f[n]=sb(("0."+c)*1e3);break;case"X":d._d=new Date(parseFloat(c)*1e3);break;case"Z":case"ZZ":d._useUTC=true;d._tzm=Jb(c);break;case"dd":case"ddd":case"dddd":e=Db(d._l).weekdaysParse(c);if(e!=null){d._w=d._w||{};d._w["d"]=e}else{d._pf.invalidWeekday=c}break;case"w":case"ww":case"W":case"WW":case"d":case"e":case"E":a=a.substr(0,1);case"gggg":case"GGGG":case"GGGGG":a=a.substr(0,2);if(c){d._w=d._w||{};d._w[a]=sb(c)}break;case"gg":case"GG":d._w=d._w||{};d._w[a]=b.parseTwoDigitYear(c)}}function Lb(a){var c,d,e,f,g,i,j,k;c=a._w;if(c.GG!=null||c.W!=null||c.E!=null){g=1;i=4;d=_(c.GG,a._a[h],_b(b(),1,4).year);e=_(c.W,1);f=_(c.E,1)}else{k=Db(a._l);g=k._week.dow;i=k._week.doy;d=_(c.gg,a._a[h],_b(b(),g,i).year);e=_(c.w,1);if(c.d!=null){f=c.d;if(f<g){++e}}else if(c.e!=null){f=c.e+g}else{f=g}}j=ac(d,e,f,i,g);a._a[h]=j.year;a._dayOfYear=j.dayOfYear}function Mb(a){var b,c,d=[],e,f;if(a._d){return}e=Ob(a);if(a._w&&a._a[j]==null&&a._a[i]==null){Lb(a)}if(a._dayOfYear){f=_(a._a[h],e[h]);if(a._dayOfYear>vb(f)){a._pf._overflowDayOfYear=true}c=Xb(f,0,a._dayOfYear);a._a[i]=c.getUTCMonth();a._a[j]=c.getUTCDate()}for(b=0;b<3&&a._a[b]==null;++b){a._a[b]=d[b]=e[b]}for(;b<7;b++){a._a[b]=d[b]=a._a[b]==null?b===2?1:0:a._a[b]}a._d=(a._useUTC?Xb:Wb).apply(null,d);if(a._tzm!=null){a._d.setUTCMinutes(a._d.getUTCMinutes()+a._tzm)}}function Nb(a){var b;if(a._d){return}b=qb(a._i);a._a=[b.year,b.month,b.day,b.hour,b.minute,b.second,b.millisecond];Mb(a)}function Ob(a){var b=new Date;if(a._useUTC){return[b.getUTCFullYear(),b.getUTCMonth(),b.getUTCDate()]}else{return[b.getFullYear(),b.getMonth(),b.getDate()]}}function Pb(a){if(a._f===b.ISO_8601){Tb(a);return}a._a=[];a._pf.empty=true;var c=Db(a._l),d=""+a._i,e,f,g,h,i,j=d.length,l=0;g=Hb(a._f,c).match(u)||[];for(e=0;e<g.length;e++){h=g[e];f=(d.match(Ib(h,a))||[])[0];if(f){i=d.substr(0,d.indexOf(f));if(i.length>0){a._pf.unusedInput.push(i)}d=d.slice(d.indexOf(f)+f.length);l+=f.length}if(Z[h]){if(f){a._pf.empty=false}else{a._pf.unusedTokens.push(h)}Kb(h,f,a)}else if(a._strict&&!f){a._pf.unusedTokens.push(h)}}a._pf.charsLeftOver=j-l;if(d.length>0){a._pf.unusedInput.push(d)}if(a._isPm&&a._a[k]<12){a._a[k]+=12}if(a._isPm===false&&a._a[k]===12){a._a[k]=0}Mb(a);xb(a)}function Qb(a){return a.replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(a,b,c,d,e){return b||c||d||e})}function Rb(a){return a.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}function Sb(a){var b,c,d,e,f;if(a._f.length===0){a._pf.invalidFormat=true;a._d=new Date(NaN);return}for(e=0;e<a._f.length;e++){f=0;b=hb({},a);b._pf=ab();b._f=a._f[e];Pb(b);if(!yb(b)){continue}f+=b._pf.charsLeftOver;f+=b._pf.unusedTokens.length*10;b._pf.score=f;if(d==null||f<d){d=f;c=b}}hb(a,c||b)}function Tb(a){var b,c,d=a._i,e=M.exec(d);if(e){a._pf.iso=true;for(b=0,c=O.length;b<c;b++){if(O[b][1].exec(d)){a._f=O[b][0]+(e[6]||" ");break}}for(b=0,c=P.length;b<c;b++){if(P[b][1].exec(d)){a._f+=P[b][0];break}}if(d.match(C)){a._f+="Z"}Pb(a)}else{a._isValid=false}}function Ub(a){Tb(a);if(a._isValid===false){delete a._isValid;b.createFromInputFallback(a)}}function Vb(c){var d=c._i,e=r.exec(d);if(d===a){c._d=new Date}else if(e){c._d=new Date(+e[1])}else if(typeof d==="string"){Ub(c)}else if(mb(d)){c._a=d.slice(0);Mb(c)}else if(nb(d)){c._d=new Date(+d)}else if(typeof d==="object"){Nb(c)}else if(typeof d==="number"){c._d=new Date(d)}else{b.createFromInputFallback(c)}}function Wb(a,b,c,d,e,f,g){var h=new Date(a,b,c,d,e,f,g);if(a<1970){h.setFullYear(a)}return h}function Xb(a){var b=new Date(Date.UTC.apply(null,arguments));if(a<1970){b.setUTCFullYear(a)}return b}function Yb(a,b){if(typeof a==="string"){if(!isNaN(a)){a=parseInt(a,10)}else{a=b.weekdaysParse(a);if(typeof a!=="number"){return null}}}return a}function Zb(a,b,c,d,e){return e.relativeTime(b||1,!!c,a,d)}function $b(a,b,c){var d=f(Math.abs(a)/1e3),e=f(d/60),g=f(e/60),h=f(g/24),i=f(h/365),j=d<W.s&&["s",d]||e===1&&["m"]||e<W.m&&["mm",e]||g===1&&["h"]||g<W.h&&["hh",g]||h===1&&["d"]||h<=W.dd&&["dd",h]||h<=W.dm&&["M"]||h<W.dy&&["MM",f(h/30)]||i===1&&["y"]||["yy",i];j[2]=b;j[3]=a>0;j[4]=c;return Zb.apply({},j)}function _b(a,c,d){var e=d-c,f=d-a.day(),g;if(f>e){f-=7}if(f<e-7){f+=7}g=b(a).add("d",f);return{week:Math.ceil(g.dayOfYear()/7),year:g.year()}}function ac(a,b,c,d,e){var f=Xb(a,0,1).getUTCDay(),g,h;f=f===0?7:f;c=c!=null?c:e;g=e-f+(f>d?7:0)-(f<e?7:0);h=7*(b-1)+(c-e)+g+1;return{year:h>0?a:a-1,dayOfYear:h>0?h:vb(a-1)+h}}function bc(c){var d=c._i,e=c._f;if(d===null||e===a&&d===""){return b.invalid({nullInput:true})}if(typeof d==="string"){c._i=d=Db().preparse(d)}if(b.isMoment(d)){c=ib(d);c._d=new Date(+d._d)}else if(e){if(mb(e)){Sb(c)}else{Pb(c)}}else{Vb(c)}return new fb(c)}b=function(b,c,d,e){var f;if(typeof d==="boolean"){e=d;d=a}f={};f._isAMomentObject=true;f._i=b;f._f=c;f._l=d;f._strict=e;f._isUTC=false;f._pf=ab();return bc(f)};b.suppressDeprecationWarnings=false;b.createFromInputFallback=bb("moment construction falls back to js Date. This is "+"discouraged and will be removed in upcoming major "+"release. Please refer to "+"https://github.com/moment/moment/issues/1407 for more info.",function(a){a._d=new Date(a._i)});function cc(a,c){var d,e;if(c.length===1&&mb(c[0])){c=c[0]}if(!c.length){return b()}d=c[0];for(e=1;e<c.length;++e){if(c[e][a](d)){d=c[e]}}return d}b.min=function(){var a=[].slice.call(arguments,0);return cc("isBefore",a)};b.max=function(){var a=[].slice.call(arguments,0);return cc("isAfter",a)};b.utc=function(b,c,d,e){var f;if(typeof d==="boolean"){e=d;d=a}f={};f._isAMomentObject=true;f._useUTC=true;f._isUTC=true;f._l=d;f._i=b;f._f=c;f._strict=e;f._pf=ab();return bc(f).utc()};b.unix=function(a){return b(a*1e3)};b.duration=function(a,c){var d=a,e=null,f,g,h;if(b.isDuration(a)){d={ms:a._milliseconds,d:a._days,M:a._months}}else if(typeof a==="number"){d={};if(c){d[c]=a}else{d.milliseconds=a}}else if(!!(e=s.exec(a))){f=e[1]==="-"?-1:1;d={y:0,d:sb(e[j])*f,h:sb(e[k])*f,m:sb(e[l])*f,s:sb(e[m])*f,ms:sb(e[n])*f}}else if(!!(e=t.exec(a))){f=e[1]==="-"?-1:1;h=function(a){var b=a&&parseFloat(a.replace(",","."));return(isNaN(b)?0:b)*f};d={y:h(e[2]),M:h(e[3]),d:h(e[4]),h:h(e[5]),m:h(e[6]),s:h(e[7]),w:h(e[8])}}g=new gb(d);if(b.isDuration(a)&&a.hasOwnProperty("_lang")){g._lang=a._lang}return g};b.version=c;b.defaultFormat=N;b.ISO_8601=function(){};b.momentProperties=p;b.updateOffset=function(){};b.relativeTimeThreshold=function(b,c){if(W[b]===a){return false}W[b]=c;return true};b.lang=function(a,c){var d;if(!a){return b.fn._lang._abbr}if(c){Bb(zb(a),c)}else if(c===null){Cb(a);a="en"}else if(!o[a]){Db(a)}d=b.duration.fn._lang=b.fn._lang=Db(a);return d._abbr};b.langData=function(a){if(a&&a._lang&&a._lang._abbr){a=a._lang._abbr}return Db(a)};b.isMoment=function(a){return a instanceof fb||a!=null&&a.hasOwnProperty("_isAMomentObject")};b.isDuration=function(a){return a instanceof gb};for(g=$.length-1;g>=0;--g){rb($[g])}b.normalizeUnits=function(a){return pb(a)};b.invalid=function(a){var c=b.utc(NaN);if(a!=null){hb(c._pf,a)}else{c._pf.userInvalidated=true}return c};b.parseZone=function(){return b.apply(null,arguments).parseZone()};b.parseTwoDigitYear=function(a){return sb(a)+(sb(a)>68?1900:2e3)};hb(b.fn=fb.prototype,{clone:function(){return b(this)},valueOf:function(){return+this._d+(this._offset||0)*6e4},unix:function(){return Math.floor(+this/1e3)},toString:function(){return this.clone().lang("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},toDate:function(){return this._offset?new Date(+this):this._d},toISOString:function(){var a=b(this).utc();if(0<a.year()&&a.year()<=9999){return Gb(a,"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}else{return Gb(a,"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]")}},toArray:function(){var a=this;return[a.year(),a.month(),a.date(),a.hours(),a.minutes(),a.seconds(),a.milliseconds()]},isValid:function(){return yb(this)},isDSTShifted:function(){if(this._a){return this.isValid()&&ob(this._a,(this._isUTC?b.utc(this._a):b(this._a)).toArray())>0}return false},parsingFlags:function(){return hb({},this._pf)},invalidAt:function(){return this._pf.overflow},utc:function(){return this.zone(0)},local:function(){this.zone(0);this._isUTC=false;return this},format:function(a){var c=Gb(this,a||b.defaultFormat);return this.lang().postformat(c)},add:function(a,c){var d;if(typeof a==="string"&&typeof c==="string"){d=b.duration(isNaN(+c)?+a:+c,isNaN(+c)?c:a)}else if(typeof a==="string"){d=b.duration(+c,a)}else{d=b.duration(a,c)}lb(this,d,1);return this},subtract:function(a,c){var d;if(typeof a==="string"&&typeof c==="string"){d=b.duration(isNaN(+c)?+a:+c,isNaN(+c)?c:a)}else if(typeof a==="string"){d=b.duration(+c,a)}else{d=b.duration(a,c)}lb(this,d,-1);return this},diff:function(a,c,d){var e=Ab(a,this),f=(this.zone()-e.zone())*6e4,g,h;c=pb(c);if(c==="year"||c==="month"){g=(this.daysInMonth()+e.daysInMonth())*432e5;h=(this.year()-e.year())*12+(this.month()-e.month());h+=(this-b(this).startOf("month")-(e-b(e).startOf("month")))/g;h-=(this.zone()-b(this).startOf("month").zone()-(e.zone()-b(e).startOf("month").zone()))*6e4/g;if(c==="year"){h=h/12}}else{g=this-e;h=c==="second"?g/1e3:c==="minute"?g/6e4:c==="hour"?g/36e5:c==="day"?(g-f)/864e5:c==="week"?(g-f)/6048e5:g}return d?h:jb(h)},from:function(a,c){return b.duration(this.diff(a)).lang(this.lang()._abbr).humanize(!c)},fromNow:function(a){return this.from(b(),a)},calendar:function(a){var c=a||b(),d=Ab(c,this).startOf("day"),e=this.diff(d,"days",true),f=e<-6?"sameElse":e<-1?"lastWeek":e<0?"lastDay":e<1?"sameDay":e<2?"nextDay":e<7?"nextWeek":"sameElse";return this.format(this.lang().calendar(f,this))},isLeapYear:function(){return wb(this.year())},isDST:function(){return this.zone()<this.clone().month(0).zone()||this.zone()<this.clone().month(5).zone()},day:function(a){var b=this._isUTC?this._d.getUTCDay():this._d.getDay();if(a!=null){a=Yb(a,this.lang());return this.add({d:a-b})}else{return b}},month:gc("Month",true),startOf:function(a){a=pb(a);switch(a){case"year":this.month(0);case"quarter":case"month":this.date(1);case"week":case"isoWeek":case"day":this.hours(0);case"hour":this.minutes(0);case"minute":this.seconds(0);case"second":this.milliseconds(0)}if(a==="week"){this.weekday(0)}else if(a==="isoWeek"){this.isoWeekday(1)}if(a==="quarter"){this.month(Math.floor(this.month()/3)*3)}return this},endOf:function(a){a=pb(a);return this.startOf(a).add(a==="isoWeek"?"week":a,1).subtract("ms",1)},isAfter:function(a,c){c=typeof c!=="undefined"?c:"millisecond";return+this.clone().startOf(c)>+b(a).startOf(c)},isBefore:function(a,c){c=typeof c!=="undefined"?c:"millisecond";return+this.clone().startOf(c)<+b(a).startOf(c)},isSame:function(a,b){b=b||"ms";return+this.clone().startOf(b)===+Ab(a,this).startOf(b)},min:bb("moment().min is deprecated, use moment.min instead. https://github.com/moment/moment/issues/1548",function(a){a=b.apply(null,arguments);return a<this?this:a}),max:bb("moment().max is deprecated, use moment.max instead. https://github.com/moment/moment/issues/1548",function(a){a=b.apply(null,arguments);return a>this?this:a}),zone:function(a,c){var d=this._offset||0;if(a!=null){if(typeof a==="string"){a=Jb(a)}if(Math.abs(a)<16){a=a*60}this._offset=a;this._isUTC=true;if(d!==a){if(!c||this._changeInProgress){lb(this,b.duration(d-a,"m"),1,false)}else if(!this._changeInProgress){this._changeInProgress=true;b.updateOffset(this,true);this._changeInProgress=null}}}else{return this._isUTC?d:this._d.getTimezoneOffset()}return this},zoneAbbr:function(){return this._isUTC?"UTC":""},zoneName:function(){return this._isUTC?"Coordinated Universal Time":""},parseZone:function(){if(this._tzm){this.zone(this._tzm)}else if(typeof this._i==="string"){this.zone(this._i)}return this},hasAlignedHourOffset:function(a){if(!a){a=0}else{a=b(a).zone()}return(this.zone()-a)%60===0},daysInMonth:function(){return tb(this.year(),this.month())},dayOfYear:function(a){var c=f((b(this).startOf("day")-b(this).startOf("year"))/864e5)+1;return a==null?c:this.add("d",a-c)},quarter:function(a){return a==null?Math.ceil((this.month()+1)/3):this.month((a-1)*3+this.month()%3)},weekYear:function(a){var b=_b(this,this.lang()._week.dow,this.lang()._week.doy).year;return a==null?b:this.add("y",a-b)},isoWeekYear:function(a){var b=_b(this,1,4).year;return a==null?b:this.add("y",a-b)},week:function(a){var b=this.lang().week(this);return a==null?b:this.add("d",(a-b)*7)},isoWeek:function(a){var b=_b(this,1,4).week;return a==null?b:this.add("d",(a-b)*7)},weekday:function(a){var b=(this.day()+7-this.lang()._week.dow)%7;return a==null?b:this.add("d",a-b)},isoWeekday:function(a){return a==null?this.day()||7:this.day(this.day()%7?a:a-7)},isoWeeksInYear:function(){return ub(this.year(),1,4)},weeksInYear:function(){var a=this._lang._week;return ub(this.year(),a.dow,a.doy)},get:function(a){a=pb(a);return this[a]()},set:function(a,b){a=pb(a);if(typeof this[a]==="function"){this[a](b)}return this},lang:function(b){if(b===a){return this._lang}else{this._lang=Db(b);return this}}});function dc(a,b){var c;if(typeof b==="string"){b=a.lang().monthsParse(b);if(typeof b!=="number"){return a}}c=Math.min(a.date(),tb(a.year(),b));a._d["set"+(a._isUTC?"UTC":"")+"Month"](b,c);return a}function ec(a,b){return a._d["get"+(a._isUTC?"UTC":"")+b]()}function fc(a,b,c){if(b==="Month"){return dc(a,c)}else{return a._d["set"+(a._isUTC?"UTC":"")+b](c)}}function gc(a,c){return function(d){if(d!=null){fc(this,a,d);b.updateOffset(this,c);return this}else{return ec(this,a)}}}b.fn.millisecond=b.fn.milliseconds=gc("Milliseconds",false);b.fn.second=b.fn.seconds=gc("Seconds",false);b.fn.minute=b.fn.minutes=gc("Minutes",false);b.fn.hour=b.fn.hours=gc("Hours",true);b.fn.date=gc("Date",true);b.fn.dates=bb("dates accessor is deprecated. Use date instead.",gc("Date",true));b.fn.year=gc("FullYear",true);b.fn.years=bb("years accessor is deprecated. Use year instead.",gc("FullYear",true));b.fn.days=b.fn.day;b.fn.months=b.fn.month;b.fn.weeks=b.fn.week;b.fn.isoWeeks=b.fn.isoWeek;b.fn.quarters=b.fn.quarter;b.fn.toJSON=b.fn.toISOString;hb(b.duration.fn=gb.prototype,{_bubble:function(){var a=this._milliseconds,b=this._days,c=this._months,d=this._data,e,f,g,h;d.milliseconds=a%1e3;e=jb(a/1e3);d.seconds=e%60;f=jb(e/60);d.minutes=f%60;g=jb(f/60);d.hours=g%24;b+=jb(g/24);d.days=b%30;c+=jb(b/30);d.months=c%12;h=jb(c/12);d.years=h},weeks:function(){return jb(this.days()/7)},valueOf:function(){return this._milliseconds+this._days*864e5+this._months%12*2592e6+sb(this._months/12)*31536e6},humanize:function(a){var b=+this,c=$b(b,!a,this.lang());if(a){c=this.lang().pastFuture(b,c)}return this.lang().postformat(c)},add:function(a,c){var d=b.duration(a,c);this._milliseconds+=d._milliseconds;this._days+=d._days;this._months+=d._months;this._bubble();return this},subtract:function(a,c){var d=b.duration(a,c);this._milliseconds-=d._milliseconds;this._days-=d._days;this._months-=d._months;this._bubble();return this},get:function(a){a=pb(a);return this[a.toLowerCase()+"s"]()},as:function(a){a=pb(a);
return this["as"+a.charAt(0).toUpperCase()+a.slice(1)+"s"]()},lang:b.fn.lang,toIsoString:function(){var a=Math.abs(this.years()),b=Math.abs(this.months()),c=Math.abs(this.days()),d=Math.abs(this.hours()),e=Math.abs(this.minutes()),f=Math.abs(this.seconds()+this.milliseconds()/1e3);if(!this.asSeconds()){return"P0D"}return(this.asSeconds()<0?"-":"")+"P"+(a?a+"Y":"")+(b?b+"M":"")+(c?c+"D":"")+(d||e||f?"T":"")+(d?d+"H":"")+(e?e+"M":"")+(f?f+"S":"")}});function hc(a){b.duration.fn[a]=function(){return this._data[a]}}function ic(a,c){b.duration.fn["as"+a]=function(){return+this/c}}for(g in S){if(S.hasOwnProperty(g)){ic(g,S[g]);hc(g.toLowerCase())}}ic("Weeks",6048e5);b.duration.fn.asMonths=function(){return(+this-this.years()*31536e6)/2592e6+this.years()*12};b.lang("en",{ordinal:function(a){var b=a%10,c=sb(a%100/10)===1?"th":b===1?"st":b===2?"nd":b===3?"rd":"th";return a+c}});function jc(a){if(typeof ender!=="undefined"){return}e=d.moment;if(a){d.moment=bb("Accessing Moment through the global scope is "+"deprecated, and will be removed in an upcoming "+"release.",b)}else{d.moment=b}}if(q){module.exports=b}else if(typeof define==="function"&&define.amd){define("moment",function(a,c,f){if(f.config&&f.config()&&f.config().noGlobal===true){d.moment=e}return b});jc(true)}else{jc()}}).call(this);!function(a){"object"==typeof exports?module.exports=a():"function"==typeof define&&define.amd?define(a):"undefined"!=typeof window?window.io=a():"undefined"!=typeof global?global.io=a():"undefined"!=typeof self&&(self.io=a())}(function(){var a,b,c;return function d(a,b,c){function e(g,h){if(!b[g]){if(!a[g]){var i=typeof require=="function"&&require;if(!h&&i)return i(g,!0);if(f)return f(g,!0);throw new Error("Cannot find module '"+g+"'")}var j=b[g]={exports:{}};a[g][0].call(j.exports,function(b){var c=a[g][1][b];return e(c?c:b)},j,j.exports,d,a,b,c)}return b[g].exports}var f=typeof require=="function"&&require;for(var g=0;g<c.length;g++)e(c[g]);return e}({1:[function(a,b,c){b.exports=a("./lib/")},{"./lib/":2}],2:[function(a,b,c){var d=a("./url");var e=a("socket.io-parser");var f=a("./manager");var g=a("debug")("socket.io-client");b.exports=c=i;var h=c.managers={};function i(a,b){if(typeof a=="object"){b=a;a=undefined}b=b||{};var c=d(a);var e=c.source;var i=c.id;var j;if(b.forceNew||b["force new connection"]||false===b.multiplex){g("ignoring socket cache for %s",e);j=f(e,b)}else{if(!h[i]){g("new io instance for %s",e);h[i]=f(e,b)}j=h[i]}return j.socket(c.path)}c.protocol=e.protocol;c.connect=i;c.Manager=a("./manager");c.Socket=a("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:9,"socket.io-parser":40}],3:[function(a,b,c){var d=a("./url");var e=a("engine.io-client");var f=a("./socket");var g=a("component-emitter");var h=a("socket.io-parser");var i=a("./on");var j=a("component-bind");var k=a("object-component");var l=a("debug")("socket.io-client:manager");b.exports=m;function m(a,b){if(!(this instanceof m))return new m(a,b);if(a&&"object"==typeof a){b=a;a=undefined}b=b||{};b.path=b.path||"/socket.io";this.nsps={};this.subs=[];this.opts=b;this.reconnection(b.reconnection!==false);this.reconnectionAttempts(b.reconnectionAttempts||Infinity);this.reconnectionDelay(b.reconnectionDelay||1e3);this.reconnectionDelayMax(b.reconnectionDelayMax||5e3);this.timeout(null==b.timeout?2e4:b.timeout);this.readyState="closed";this.uri=a;this.connected=0;this.attempts=0;this.encoding=false;this.packetBuffer=[];this.encoder=new h.Encoder;this.decoder=new h.Decoder;this.open()}m.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var a in this.nsps){this.nsps[a].emit.apply(this.nsps[a],arguments)}};g(m.prototype);m.prototype.reconnection=function(a){if(!arguments.length)return this._reconnection;this._reconnection=!!a;return this};m.prototype.reconnectionAttempts=function(a){if(!arguments.length)return this._reconnectionAttempts;this._reconnectionAttempts=a;return this};m.prototype.reconnectionDelay=function(a){if(!arguments.length)return this._reconnectionDelay;this._reconnectionDelay=a;return this};m.prototype.reconnectionDelayMax=function(a){if(!arguments.length)return this._reconnectionDelayMax;this._reconnectionDelayMax=a;return this};m.prototype.timeout=function(a){if(!arguments.length)return this._timeout;this._timeout=a;return this};m.prototype.maybeReconnectOnOpen=function(){if(!this.openReconnect&&!this.reconnecting&&this._reconnection){this.openReconnect=true;this.reconnect()}};m.prototype.open=m.prototype.connect=function(a){l("readyState %s",this.readyState);if(~this.readyState.indexOf("open"))return this;l("opening %s",this.uri);this.engine=e(this.uri,this.opts);var b=this.engine;var c=this;this.readyState="opening";var d=i(b,"open",function(){c.onopen();a&&a()});var f=i(b,"error",function(b){l("connect_error");c.cleanup();c.readyState="closed";c.emitAll("connect_error",b);if(a){var d=new Error("Connection error");d.data=b;a(d)}c.maybeReconnectOnOpen()});if(false!==this._timeout){var g=this._timeout;l("connect attempt will timeout after %d",g);var h=setTimeout(function(){l("connect attempt timed out after %d",g);d.destroy();b.close();b.emit("error","timeout");c.emitAll("connect_timeout",g)},g);this.subs.push({destroy:function(){clearTimeout(h)}})}this.subs.push(d);this.subs.push(f);return this};m.prototype.onopen=function(){l("open");this.cleanup();this.readyState="open";this.emit("open");var a=this.engine;this.subs.push(i(a,"data",j(this,"ondata")));this.subs.push(i(this.decoder,"decoded",j(this,"ondecoded")));this.subs.push(i(a,"error",j(this,"onerror")));this.subs.push(i(a,"close",j(this,"onclose")))};m.prototype.ondata=function(a){this.decoder.add(a)};m.prototype.ondecoded=function(a){this.emit("packet",a)};m.prototype.onerror=function(a){l("error",a);this.emitAll("error",a)};m.prototype.socket=function(a){var b=this.nsps[a];if(!b){b=new f(this,a);this.nsps[a]=b;var c=this;b.on("connect",function(){c.connected++})}return b};m.prototype.destroy=function(a){--this.connected||this.close()};m.prototype.packet=function(a){l("writing packet %j",a);var b=this;if(!b.encoding){b.encoding=true;this.encoder.encode(a,function(a){for(var c=0;c<a.length;c++){b.engine.write(a[c])}b.encoding=false;b.processPacketQueue()})}else{b.packetBuffer.push(a)}};m.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var a=this.packetBuffer.shift();this.packet(a)}};m.prototype.cleanup=function(){var a;while(a=this.subs.shift())a.destroy();this.packetBuffer=[];this.encoding=false;this.decoder.destroy()};m.prototype.close=m.prototype.disconnect=function(){this.skipReconnect=true;this.engine.close()};m.prototype.onclose=function(a){l("close");this.cleanup();this.readyState="closed";this.emit("close",a);if(this._reconnection&&!this.skipReconnect){this.reconnect()}};m.prototype.reconnect=function(){if(this.reconnecting)return this;var a=this;this.attempts++;if(this.attempts>this._reconnectionAttempts){l("reconnect failed");this.emitAll("reconnect_failed");this.reconnecting=false}else{var b=this.attempts*this.reconnectionDelay();b=Math.min(b,this.reconnectionDelayMax());l("will wait %dms before reconnect attempt",b);this.reconnecting=true;var c=setTimeout(function(){l("attempting reconnect");a.emitAll("reconnect_attempt",a.attempts);a.emitAll("reconnecting",a.attempts);a.open(function(b){if(b){l("reconnect attempt error");a.reconnecting=false;a.reconnect();a.emitAll("reconnect_error",b.data)}else{l("reconnect success");a.onreconnect()}})},b);this.subs.push({destroy:function(){clearTimeout(c)}})}};m.prototype.onreconnect=function(){var a=this.attempts;this.attempts=0;this.reconnecting=false;this.emitAll("reconnect",a)}},{"./on":4,"./socket":5,"./url":6,"component-bind":7,"component-emitter":8,debug:9,"engine.io-client":11,"object-component":37,"socket.io-parser":40}],4:[function(a,b,c){b.exports=d;function d(a,b,c){a.on(b,c);return{destroy:function(){a.removeListener(b,c)}}}},{}],5:[function(a,b,c){var d=a("socket.io-parser");var e=a("component-emitter");var f=a("to-array");var g=a("./on");var h=a("component-bind");var i=a("debug")("socket.io-client:socket");var j=a("has-binary-data");var k=a("indexof");b.exports=c=n;var l={connect:1,connect_error:1,connect_timeout:1,disconnect:1,error:1,reconnect:1,reconnect_attempt:1,reconnect_failed:1,reconnect_error:1,reconnecting:1};var m=e.prototype.emit;function n(a,b){this.io=a;this.nsp=b;this.json=this;this.ids=0;this.acks={};this.open();this.receiveBuffer=[];this.sendBuffer=[];this.connected=false;this.disconnected=true;this.subEvents()}e(n.prototype);n.prototype.subEvents=function(){var a=this.io;this.subs=[g(a,"open",h(this,"onopen")),g(a,"packet",h(this,"onpacket")),g(a,"close",h(this,"onclose"))]};n.prototype.open=n.prototype.connect=function(){if(this.connected)return this;this.io.open();if("open"==this.io.readyState)this.onopen();return this};n.prototype.send=function(){var a=f(arguments);a.unshift("message");this.emit.apply(this,a);return this};n.prototype.emit=function(a){if(l.hasOwnProperty(a)){m.apply(this,arguments);return this}var b=f(arguments);var c=d.EVENT;if(j(b)){c=d.BINARY_EVENT}var e={type:c,data:b};if("function"==typeof b[b.length-1]){i("emitting packet with ack id %d",this.ids);this.acks[this.ids]=b.pop();e.id=this.ids++}if(this.connected){this.packet(e)}else{this.sendBuffer.push(e)}return this};n.prototype.packet=function(a){a.nsp=this.nsp;this.io.packet(a)};n.prototype.onopen=function(){i("transport is open - connecting");if("/"!=this.nsp){this.packet({type:d.CONNECT})}};n.prototype.onclose=function(a){i("close (%s)",a);this.connected=false;this.disconnected=true;this.emit("disconnect",a)};n.prototype.onpacket=function(a){if(a.nsp!=this.nsp)return;switch(a.type){case d.CONNECT:this.onconnect();break;case d.EVENT:this.onevent(a);break;case d.BINARY_EVENT:this.onevent(a);break;case d.ACK:this.onack(a);break;case d.BINARY_ACK:this.onack(a);break;case d.DISCONNECT:this.ondisconnect();break;case d.ERROR:this.emit("error",a.data);break}};n.prototype.onevent=function(a){var b=a.data||[];i("emitting event %j",b);if(null!=a.id){i("attaching ack callback to event");b.push(this.ack(a.id))}if(this.connected){m.apply(this,b)}else{this.receiveBuffer.push(b)}};n.prototype.ack=function(a){var b=this;var c=false;return function(){if(c)return;c=true;var e=f(arguments);i("sending ack %j",e);var g=j(e)?d.BINARY_ACK:d.ACK;b.packet({type:g,id:a,data:e})}};n.prototype.onack=function(a){i("calling ack %s with %j",a.id,a.data);var b=this.acks[a.id];b.apply(this,a.data);delete this.acks[a.id]};n.prototype.onconnect=function(){this.connected=true;this.disconnected=false;this.emit("connect");this.emitBuffered()};n.prototype.emitBuffered=function(){var a;for(a=0;a<this.receiveBuffer.length;a++){m.apply(this,this.receiveBuffer[a])}this.receiveBuffer=[];for(a=0;a<this.sendBuffer.length;a++){this.packet(this.sendBuffer[a])}this.sendBuffer=[]};n.prototype.ondisconnect=function(){i("server disconnect (%s)",this.nsp);this.destroy();this.onclose("io server disconnect")};n.prototype.destroy=function(){for(var a=0;a<this.subs.length;a++){this.subs[a].destroy()}this.io.destroy(this)};n.prototype.close=n.prototype.disconnect=function(){if(!this.connected)return this;i("performing disconnect (%s)",this.nsp);this.packet({type:d.DISCONNECT});this.destroy();this.onclose("io client disconnect");return this}},{"./on":4,"component-bind":7,"component-emitter":8,debug:9,"has-binary-data":32,indexof:36,"socket.io-parser":40,"to-array":43}],6:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("parseuri");var f=a("debug")("socket.io-client:url");b.exports=g;function g(a,b){var c=a;var b=b||d.location;if(null==a)a=b.protocol+"//"+b.hostname;if("string"==typeof a){if("/"==a.charAt(0)){if("undefined"!=typeof b){a=b.hostname+a}}if(!/^(https?|wss?):\/\//.test(a)){f("protocol-less url %s",a);if("undefined"!=typeof b){a=b.protocol+"//"+a}else{a="https://"+a}}f("parse %s",a);c=e(a)}if(!c.port){if(/^(http|ws)$/.test(c.protocol)){c.port="80"}else if(/^(http|ws)s$/.test(c.protocol)){c.port="443"}}c.path=c.path||"/";c.id=c.protocol+"://"+c.host+":"+c.port;c.href=c.protocol+"://"+c.host+(b&&b.port==c.port?"":":"+c.port);return c}},{debug:9,parseuri:38}],7:[function(a,b,c){var d=[].slice;b.exports=function(a,b){if("string"==typeof b)b=a[b];if("function"!=typeof b)throw new Error("bind() requires a function");var c=d.call(arguments,2);return function(){return b.apply(a,c.concat(d.call(arguments)))}}},{}],8:[function(a,b,c){b.exports=d;function d(a){if(a)return e(a)}function e(a){for(var b in d.prototype){a[b]=d.prototype[b]}return a}d.prototype.on=d.prototype.addEventListener=function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);return this};d.prototype.once=function(a,b){var c=this;this._callbacks=this._callbacks||{};function d(){c.off(a,d);b.apply(this,arguments)}d.fn=b;this.on(a,d);return this};d.prototype.off=d.prototype.removeListener=d.prototype.removeAllListeners=d.prototype.removeEventListener=function(a,b){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var c=this._callbacks[a];if(!c)return this;if(1==arguments.length){delete this._callbacks[a];return this}var d;for(var e=0;e<c.length;e++){d=c[e];if(d===b||d.fn===b){c.splice(e,1);break}}return this};d.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c){c=c.slice(0);for(var d=0,e=c.length;d<e;++d){c[d].apply(this,b)}}return this};d.prototype.listeners=function(a){this._callbacks=this._callbacks||{};return this._callbacks[a]||[]};d.prototype.hasListeners=function(a){return!!this.listeners(a).length}},{}],9:[function(a,b,c){b.exports=d;function d(a){if(!d.enabled(a))return function(){};return function(b){b=e(b);var c=new Date;var f=c-(d[a]||c);d[a]=c;b=a+" "+b+" +"+d.humanize(f);window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}}d.names=[];d.skips=[];d.enable=function(a){try{localStorage.debug=a}catch(b){}var c=(a||"").split(/[\s,]+/),e=c.length;for(var f=0;f<e;f++){a=c[f].replace("*",".*?");if(a[0]==="-"){d.skips.push(new RegExp("^"+a.substr(1)+"$"))}else{d.names.push(new RegExp("^"+a+"$"))}}};d.disable=function(){d.enable("")};d.humanize=function(a){var b=1e3,c=60*1e3,d=60*c;if(a>=d)return(a/d).toFixed(1)+"h";if(a>=c)return(a/c).toFixed(1)+"m";if(a>=b)return(a/b|0)+"s";return a+"ms"};d.enabled=function(a){for(var b=0,c=d.skips.length;b<c;b++){if(d.skips[b].test(a)){return false}}for(var b=0,c=d.names.length;b<c;b++){if(d.names[b].test(a)){return true}}return false};function e(a){if(a instanceof Error)return a.stack||a.message;return a}try{if(window.localStorage)d.enable(localStorage.debug)}catch(f){}},{}],10:[function(a,b,c){var d=a("indexof");b.exports=e;function e(a){if(a)return f(a)}function f(a){for(var b in e.prototype){a[b]=e.prototype[b]}return a}e.prototype.on=function(a,b){this._callbacks=this._callbacks||{};(this._callbacks[a]=this._callbacks[a]||[]).push(b);return this};e.prototype.once=function(a,b){var c=this;this._callbacks=this._callbacks||{};function d(){c.off(a,d);b.apply(this,arguments)}b._off=d;this.on(a,d);return this};e.prototype.off=e.prototype.removeListener=e.prototype.removeAllListeners=function(a,b){this._callbacks=this._callbacks||{};if(0==arguments.length){this._callbacks={};return this}var c=this._callbacks[a];if(!c)return this;if(1==arguments.length){delete this._callbacks[a];return this}var e=d(c,b._off||b);if(~e)c.splice(e,1);return this};e.prototype.emit=function(a){this._callbacks=this._callbacks||{};var b=[].slice.call(arguments,1),c=this._callbacks[a];if(c){c=c.slice(0);for(var d=0,e=c.length;d<e;++d){c[d].apply(this,b)}}return this};e.prototype.listeners=function(a){this._callbacks=this._callbacks||{};return this._callbacks[a]||[]};e.prototype.hasListeners=function(a){return!!this.listeners(a).length}},{indexof:36}],11:[function(a,b,c){b.exports=a("./lib/")},{"./lib/":12}],12:[function(a,b,c){b.exports=a("./socket");b.exports.parser=a("engine.io-parser")},{"./socket":13,"engine.io-parser":22}],13:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("./transports");var f=a("component-emitter");var g=a("debug")("engine.io-client:socket");var h=a("indexof");var i=a("engine.io-parser");var j=a("parseuri");var k=a("parsejson");var l=a("parseqs");b.exports=n;function m(){}function n(a,b){if(!(this instanceof n))return new n(a,b);b=b||{};if(a&&"object"==typeof a){b=a;a=null}if(a){a=j(a);b.host=a.host;b.secure=a.protocol=="https"||a.protocol=="wss";b.port=a.port;if(a.query)b.query=a.query}this.secure=null!=b.secure?b.secure:d.location&&"https:"==location.protocol;if(b.host){var c=b.host.split(":");b.hostname=c.shift();if(c.length)b.port=c.pop()}this.agent=b.agent||false;this.hostname=b.hostname||(d.location?location.hostname:"localhost");this.port=b.port||(d.location&&location.port?location.port:this.secure?443:80);this.query=b.query||{};if("string"==typeof this.query)this.query=l.decode(this.query);this.upgrade=false!==b.upgrade;this.path=(b.path||"/engine.io").replace(/\/$/,"")+"/";this.forceJSONP=!!b.forceJSONP;this.forceBase64=!!b.forceBase64;this.timestampParam=b.timestampParam||"t";this.timestampRequests=b.timestampRequests;this.transports=b.transports||["polling","websocket"];this.readyState="";this.writeBuffer=[];this.callbackBuffer=[];this.policyPort=b.policyPort||843;this.rememberUpgrade=b.rememberUpgrade||false;this.open();this.binaryType=null;this.onlyBinaryUpgrades=b.onlyBinaryUpgrades}n.priorWebsocketSuccess=false;f(n.prototype);n.protocol=i.protocol;n.Socket=n;n.Transport=a("./transport");n.transports=a("./transports");n.parser=a("engine.io-parser");n.prototype.createTransport=function(a){g('creating transport "%s"',a);var b=o(this.query);b.EIO=i.protocol;b.transport=a;if(this.id)b.sid=this.id;var c=new e[a]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:b,forceJSONP:this.forceJSONP,forceBase64:this.forceBase64,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this});return c};function o(a){var b={};for(var c in a){if(a.hasOwnProperty(c)){b[c]=a[c]}}return b}n.prototype.open=function(){var a;if(this.rememberUpgrade&&n.priorWebsocketSuccess&&this.transports.indexOf("websocket")!=-1){a="websocket"}else{a=this.transports[0]}this.readyState="opening";var a=this.createTransport(a);a.open();this.setTransport(a)};n.prototype.setTransport=function(a){g("setting transport %s",a.name);var b=this;if(this.transport){g("clearing existing transport %s",this.transport.name);this.transport.removeAllListeners()}this.transport=a;a.on("drain",function(){b.onDrain()}).on("packet",function(a){b.onPacket(a)}).on("error",function(a){b.onError(a)}).on("close",function(){b.onClose("transport close")})};n.prototype.probe=function(a){g('probing transport "%s"',a);var b=this.createTransport(a,{probe:1}),c=false,d=this;n.priorWebsocketSuccess=false;function e(){if(d.onlyBinaryUpgrades){var e=!this.supportsBinary&&d.transport.supportsBinary;c=c||e}if(c)return;g('probe transport "%s" opened',a);b.send([{type:"ping",data:"probe"}]);b.once("packet",function(e){if(c)return;if("pong"==e.type&&"probe"==e.data){g('probe transport "%s" pong',a);d.upgrading=true;d.emit("upgrading",b);n.priorWebsocketSuccess="websocket"==b.name;g('pausing current transport "%s"',d.transport.name);d.transport.pause(function(){if(c)return;if("closed"==d.readyState||"closing"==d.readyState){return}g("changing transport and sending upgrade packet");l();d.setTransport(b);b.send([{type:"upgrade"}]);d.emit("upgrade",b);b=null;d.upgrading=false;d.flush()})}else{g('probe transport "%s" failed',a);var f=new Error("probe error");f.transport=b.name;d.emit("upgradeError",f)}})}function f(){if(c)return;c=true;l();b.close();b=null}function h(c){var e=new Error("probe error: "+c);e.transport=b.name;f();g('probe transport "%s" failed because of error: %s',a,c);d.emit("upgradeError",e)}function i(){h("transport closed")}function j(){h("socket closed")}function k(a){if(b&&a.name!=b.name){g('"%s" works - aborting "%s"',a.name,b.name);f()}}function l(){b.removeListener("open",e);b.removeListener("error",h);b.removeListener("close",i);d.removeListener("close",j);d.removeListener("upgrading",k)}b.once("open",e);b.once("error",h);b.once("close",i);this.once("close",j);this.once("upgrading",k);b.open()};n.prototype.onOpen=function(){g("socket open");this.readyState="open";n.priorWebsocketSuccess="websocket"==this.transport.name;this.emit("open");this.flush();if("open"==this.readyState&&this.upgrade&&this.transport.pause){g("starting upgrade probes");for(var a=0,b=this.upgrades.length;a<b;a++){this.probe(this.upgrades[a])}}};n.prototype.onPacket=function(a){if("opening"==this.readyState||"open"==this.readyState){g('socket receive: type "%s", data "%s"',a.type,a.data);this.emit("packet",a);this.emit("heartbeat");switch(a.type){case"open":this.onHandshake(k(a.data));break;case"pong":this.setPing();break;case"error":var b=new Error("server error");b.code=a.data;this.emit("error",b);break;case"message":this.emit("data",a.data);this.emit("message",a.data);break}}else{g('packet received with socket readyState "%s"',this.readyState)}};n.prototype.onHandshake=function(a){this.emit("handshake",a);this.id=a.sid;this.transport.query.sid=a.sid;this.upgrades=this.filterUpgrades(a.upgrades);this.pingInterval=a.pingInterval;this.pingTimeout=a.pingTimeout;this.onOpen();if("closed"==this.readyState)return;this.setPing();this.removeListener("heartbeat",this.onHeartbeat);this.on("heartbeat",this.onHeartbeat)};n.prototype.onHeartbeat=function(a){clearTimeout(this.pingTimeoutTimer);var b=this;b.pingTimeoutTimer=setTimeout(function(){if("closed"==b.readyState)return;b.onClose("ping timeout")},a||b.pingInterval+b.pingTimeout)};n.prototype.setPing=function(){var a=this;clearTimeout(a.pingIntervalTimer);a.pingIntervalTimer=setTimeout(function(){g("writing ping packet - expecting pong within %sms",a.pingTimeout);a.ping();a.onHeartbeat(a.pingTimeout)},a.pingInterval)};n.prototype.ping=function(){this.sendPacket("ping")};n.prototype.onDrain=function(){for(var a=0;a<this.prevBufferLen;a++){if(this.callbackBuffer[a]){this.callbackBuffer[a]()}}this.writeBuffer.splice(0,this.prevBufferLen);this.callbackBuffer.splice(0,this.prevBufferLen);this.prevBufferLen=0;if(this.writeBuffer.length==0){this.emit("drain")}else{this.flush()}};n.prototype.flush=function(){if("closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){g("flushing %d packets in socket",this.writeBuffer.length);this.transport.send(this.writeBuffer);this.prevBufferLen=this.writeBuffer.length;this.emit("flush")}};n.prototype.write=n.prototype.send=function(a,b){this.sendPacket("message",a,b);return this};n.prototype.sendPacket=function(a,b,c){var d={type:a,data:b};this.emit("packetCreate",d);this.writeBuffer.push(d);this.callbackBuffer.push(c);this.flush()};n.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.onClose("forced close");g("socket closing - telling transport to close");this.transport.close()}return this};n.prototype.onError=function(a){g("socket error %j",a);n.priorWebsocketSuccess=false;this.emit("error",a);this.onClose("transport error",a)};n.prototype.onClose=function(a,b){if("opening"==this.readyState||"open"==this.readyState){g('socket close with reason: "%s"',a);var c=this;clearTimeout(this.pingIntervalTimer);clearTimeout(this.pingTimeoutTimer);setTimeout(function(){c.writeBuffer=[];c.callbackBuffer=[];c.prevBufferLen=0},0);this.transport.removeAllListeners("close");this.transport.close();this.transport.removeAllListeners();this.readyState="closed";this.id=null;this.emit("close",a,b)}};n.prototype.filterUpgrades=function(a){var b=[];for(var c=0,d=a.length;c<d;c++){if(~h(this.transports,a[c]))b.push(a[c])}return b}},{"./transport":14,"./transports":15,"component-emitter":8,debug:9,"engine.io-parser":22,indexof:36,parsejson:29,parseqs:30,parseuri:38}],14:[function(a,b,c){var d=a("engine.io-parser");var e=a("component-emitter");b.exports=f;function f(a){this.path=a.path;this.hostname=a.hostname;this.port=a.port;this.secure=a.secure;this.query=a.query;this.timestampParam=a.timestampParam;this.timestampRequests=a.timestampRequests;this.readyState="";this.agent=a.agent||false;this.socket=a.socket}e(f.prototype);f.timestamps=0;f.prototype.onError=function(a,b){var c=new Error(a);c.type="TransportError";c.description=b;this.emit("error",c);return this};f.prototype.open=function(){if("closed"==this.readyState||""==this.readyState){this.readyState="opening";this.doOpen()}return this};f.prototype.close=function(){if("opening"==this.readyState||"open"==this.readyState){this.doClose();this.onClose()}return this};f.prototype.send=function(a){if("open"==this.readyState){this.write(a)}else{throw new Error("Transport not open")}};f.prototype.onOpen=function(){this.readyState="open";this.writable=true;this.emit("open")};f.prototype.onData=function(a){try{var b=d.decodePacket(a,this.socket.binaryType);this.onPacket(b)}catch(c){c.data=a;this.onError("parser decode error",c)}};f.prototype.onPacket=function(a){this.emit("packet",a)};f.prototype.onClose=function(){this.readyState="closed";this.emit("close")}},{"component-emitter":8,"engine.io-parser":22}],15:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("xmlhttprequest");var f=a("./polling-xhr");var g=a("./polling-jsonp");var h=a("./websocket");c.polling=i;c.websocket=h;function i(a){var b;var c=false;if(d.location){var h="https:"==location.protocol;var i=location.port;if(!i){i=h?443:80}c=a.hostname!=location.hostname||i!=a.port}a.xdomain=c;b=new e(a);if("open"in b&&!a.forceJSONP){return new f(a)}else{return new g(a)}}},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("./polling");var f=a("component-inherit");b.exports=l;var g=/\n/g;var h=/\\n/g;var i;var j=0;function k(){}function l(a){e.call(this,a);this.query=this.query||{};if(!i){if(!d.___eio)d.___eio=[];i=d.___eio}this.index=i.length;var b=this;i.push(function(a){b.onData(a)});this.query.j=this.index;if(d.document&&d.addEventListener){d.addEventListener("beforeunload",function(){if(b.script)b.script.onerror=k})}}f(l,e);l.prototype.supportsBinary=false;l.prototype.doClose=function(){if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}if(this.form){this.form.parentNode.removeChild(this.form);this.form=null}e.prototype.doClose.call(this)};l.prototype.doPoll=function(){var a=this;var b=document.createElement("script");if(this.script){this.script.parentNode.removeChild(this.script);this.script=null}b.async=true;b.src=this.uri();b.onerror=function(b){a.onError("jsonp poll error",b)};var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(b,c);this.script=b;var d="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);if(d){setTimeout(function(){var a=document.createElement("iframe");document.body.appendChild(a);document.body.removeChild(a)},100)}};l.prototype.doWrite=function(a,b){var c=this;if(!this.form){var d=document.createElement("form");var e=document.createElement("textarea");var f=this.iframeId="eio_iframe_"+this.index;var i;d.className="socketio";d.style.position="absolute";d.style.top="-1000px";d.style.left="-1000px";d.target=f;d.method="POST";d.setAttribute("accept-charset","utf-8");e.name="d";d.appendChild(e);document.body.appendChild(d);this.form=d;this.area=e}this.form.action=this.uri();function j(){k();b()}function k(){if(c.iframe){try{c.form.removeChild(c.iframe)}catch(a){c.onError("jsonp polling iframe removal error",a)}}try{var b='<iframe src="javascript:0" name="'+c.iframeId+'">';i=document.createElement(b)}catch(a){i=document.createElement("iframe");i.name=c.iframeId;i.src="javascript:0"}i.id=c.iframeId;c.form.appendChild(i);c.iframe=i}k();a=a.replace(h,"\\\n");this.area.value=a.replace(g,"\\n");try{this.form.submit()}catch(l){}if(this.iframe.attachEvent){this.iframe.onreadystatechange=function(){if(c.iframe.readyState=="complete"){j()}}}else{this.iframe.onload=j}}},{"./polling":18,"component-inherit":21}],17:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("xmlhttprequest");var f=a("./polling");var g=a("component-emitter");var h=a("component-inherit");var i=a("debug")("engine.io-client:polling-xhr");b.exports=k;b.exports.Request=l;function j(){}function k(a){f.call(this,a);if(d.location){var b="https:"==location.protocol;var c=location.port;if(!c){c=b?443:80}this.xd=a.hostname!=d.location.hostname||c!=a.port}}h(k,f);k.prototype.supportsBinary=true;k.prototype.request=function(a){a=a||{};a.uri=this.uri();a.xd=this.xd;a.agent=this.agent||false;a.supportsBinary=this.supportsBinary;return new l(a)};k.prototype.doWrite=function(a,b){var c=typeof a!=="string"&&a!==undefined;var d=this.request({method:"POST",data:a,isBinary:c});var e=this;d.on("success",b);d.on("error",function(a){e.onError("xhr post error",a)});this.sendXhr=d};k.prototype.doPoll=function(){i("xhr poll");var a=this.request();var b=this;a.on("data",function(a){b.onData(a)});a.on("error",function(a){b.onError("xhr poll error",a)});this.pollXhr=a};function l(a){this.method=a.method||"GET";this.uri=a.uri;this.xd=!!a.xd;this.async=false!==a.async;this.data=undefined!=a.data?a.data:null;this.agent=a.agent;this.create(a.isBinary,a.supportsBinary)}g(l.prototype);l.prototype.create=function(a,b){var c=this.xhr=new e({agent:this.agent,xdomain:this.xd});var f=this;try{i("xhr open %s: %s",this.method,this.uri);c.open(this.method,this.uri,this.async);if(b){c.responseType="arraybuffer"}if("POST"==this.method){try{if(a){c.setRequestHeader("Content-type","application/octet-stream")}else{c.setRequestHeader("Content-type","text/plain;charset=UTF-8")}}catch(g){}}if("withCredentials"in c){c.withCredentials=true}c.onreadystatechange=function(){var a;try{if(4!=c.readyState)return;if(200==c.status||1223==c.status){var d=c.getResponseHeader("Content-Type");if(d==="application/octet-stream"){a=c.response}else{if(!b){a=c.responseText}else{a="ok"}}}else{setTimeout(function(){f.onError(c.status)},0)}}catch(e){f.onError(e)}if(null!=a){f.onData(a)}};i("xhr data %s",this.data);c.send(this.data)}catch(g){setTimeout(function(){f.onError(g)},0);return}if(d.document){this.index=l.requestsCount++;l.requests[this.index]=this}};l.prototype.onSuccess=function(){this.emit("success");this.cleanup()};l.prototype.onData=function(a){this.emit("data",a);this.onSuccess()};l.prototype.onError=function(a){this.emit("error",a);this.cleanup()};l.prototype.cleanup=function(){if("undefined"==typeof this.xhr||null===this.xhr){return}this.xhr.onreadystatechange=j;try{this.xhr.abort()}catch(a){}if(d.document){delete l.requests[this.index]}this.xhr=null};l.prototype.abort=function(){this.cleanup()};if(d.document){l.requestsCount=0;l.requests={};if(d.attachEvent){d.attachEvent("onunload",m)}else if(d.addEventListener){d.addEventListener("beforeunload",m)}}function m(){for(var a in l.requests){if(l.requests.hasOwnProperty(a)){l.requests[a].abort()}}}},{"./polling":18,"component-emitter":8,"component-inherit":21,debug:9,xmlhttprequest:20}],18:[function(a,b,c){var d=a("../transport");var e=a("parseqs");var f=a("engine.io-parser");var g=a("component-inherit");var h=a("debug")("engine.io-client:polling");b.exports=j;var i=function(){var b=a("xmlhttprequest");var c=new b({agent:this.agent,xdomain:false});return null!=c.responseType}();function j(a){var b=a&&a.forceBase64;if(!i||b){this.supportsBinary=false}d.call(this,a)}g(j,d);j.prototype.name="polling";j.prototype.doOpen=function(){this.poll()};j.prototype.pause=function(a){var b=0;var c=this;this.readyState="pausing";
function d(){h("paused");c.readyState="paused";a()}if(this.polling||!this.writable){var e=0;if(this.polling){h("we are currently polling - waiting to pause");e++;this.once("pollComplete",function(){h("pre-pause polling complete");--e||d()})}if(!this.writable){h("we are currently writing - waiting to pause");e++;this.once("drain",function(){h("pre-pause writing complete");--e||d()})}}else{d()}};j.prototype.poll=function(){h("polling");this.polling=true;this.doPoll();this.emit("poll")};j.prototype.onData=function(a){var b=this;h("polling got data %s",a);var c=function(a,c,d){if("opening"==b.readyState){b.onOpen()}if("close"==a.type){b.onClose();return false}b.onPacket(a)};f.decodePayload(a,this.socket.binaryType,c);if("closed"!=this.readyState){this.polling=false;this.emit("pollComplete");if("open"==this.readyState){this.poll()}else{h('ignoring poll - transport state "%s"',this.readyState)}}};j.prototype.doClose=function(){var a=this;function b(){h("writing close packet");a.write([{type:"close"}])}if("open"==this.readyState){h("transport open - closing");b()}else{h("transport not open - deferring close");this.once("open",b)}};j.prototype.write=function(a){var b=this;this.writable=false;var c=function(){b.writable=true;b.emit("drain")};var b=this;f.encodePayload(a,this.supportsBinary,function(a){b.doWrite(a,c)})};j.prototype.uri=function(){var a=this.query||{};var b=this.secure?"https":"http";var c="";if(false!==this.timestampRequests){a[this.timestampParam]=+new Date+"-"+d.timestamps++}if(!this.supportsBinary&&!a.sid){a.b64=1}a=e.encode(a);if(this.port&&("https"==b&&this.port!=443||"http"==b&&this.port!=80)){c=":"+this.port}if(a.length){a="?"+a}return b+"://"+this.hostname+c+this.path+a}},{"../transport":14,"component-inherit":21,debug:9,"engine.io-parser":22,parseqs:30,xmlhttprequest:20}],19:[function(a,b,c){var d=a("../transport");var e=a("engine.io-parser");var f=a("parseqs");var g=a("component-inherit");var h=a("debug")("engine.io-client:websocket");var i=a("ws");b.exports=j;function j(a){var b=a&&a.forceBase64;if(b){this.supportsBinary=false}d.call(this,a)}g(j,d);j.prototype.name="websocket";j.prototype.supportsBinary=true;j.prototype.doOpen=function(){if(!this.check()){return}var a=this;var b=this.uri();var c=void 0;var d={agent:this.agent};this.ws=new i(b,c,d);if(this.ws.binaryType===undefined){this.supportsBinary=false}this.ws.binaryType="arraybuffer";this.addEventListeners()};j.prototype.addEventListeners=function(){var a=this;this.ws.onopen=function(){a.onOpen()};this.ws.onclose=function(){a.onClose()};this.ws.onmessage=function(b){a.onData(b.data)};this.ws.onerror=function(b){a.onError("websocket error",b)}};if("undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)){j.prototype.onData=function(a){var b=this;setTimeout(function(){d.prototype.onData.call(b,a)},0)}}j.prototype.write=function(a){var b=this;this.writable=false;for(var c=0,d=a.length;c<d;c++){e.encodePacket(a[c],this.supportsBinary,function(a){try{b.ws.send(a)}catch(c){h("websocket closed before onclose event")}})}function f(){b.writable=true;b.emit("drain")}setTimeout(f,0)};j.prototype.onClose=function(){d.prototype.onClose.call(this)};j.prototype.doClose=function(){if(typeof this.ws!=="undefined"){this.ws.close()}};j.prototype.uri=function(){var a=this.query||{};var b=this.secure?"wss":"ws";var c="";if(this.port&&("wss"==b&&this.port!=443||"ws"==b&&this.port!=80)){c=":"+this.port}if(this.timestampRequests){a[this.timestampParam]=+new Date}if(!this.supportsBinary){a.b64=1}a=f.encode(a);if(a.length){a="?"+a}return b+"://"+this.hostname+c+this.path+a};j.prototype.check=function(){return!!i&&!("__initialize"in i&&this.name===j.prototype.name)}},{"../transport":14,"component-inherit":21,debug:9,"engine.io-parser":22,parseqs:30,ws:31}],20:[function(a,b,c){var d=a("has-cors");b.exports=function(a){var b=a.xdomain;try{if("undefined"!=typeof XMLHttpRequest&&(!b||d)){return new XMLHttpRequest}}catch(c){}if(!b){try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(c){}}}},{"has-cors":34}],21:[function(a,b,c){b.exports=function(a,b){var c=function(){};c.prototype=b.prototype;a.prototype=new c;a.prototype.constructor=a}},{}],22:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("./keys");var f=a("arraybuffer.slice");var g=a("base64-arraybuffer");var h=a("after");var i=a("utf8");var j=navigator.userAgent.match(/Android/i);c.protocol=2;var k=c.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6};var l=e(k);var m={type:"error",data:"parser error"};var n=a("blob");c.encodePacket=function(a,b,c){if(typeof b=="function"){c=b;b=false}var e=a.data===undefined?undefined:a.data.buffer||a.data;if(d.ArrayBuffer&&e instanceof ArrayBuffer){return o(a,b,c)}else if(n&&e instanceof d.Blob){return q(a,b,c)}var f=k[a.type];if(undefined!==a.data){f+=i.encode(String(a.data))}return c(""+f)};function o(a,b,d){if(!b){return c.encodeBase64Packet(a,d)}var e=a.data;var f=new Uint8Array(e);var g=new Uint8Array(1+e.byteLength);g[0]=k[a.type];for(var h=0;h<f.length;h++){g[h+1]=f[h]}return d(g.buffer)}function p(a,b,d){if(!b){return c.encodeBase64Packet(a,d)}var e=new FileReader;e.onload=function(){a.data=e.result;c.encodePacket(a,b,d)};return e.readAsArrayBuffer(a.data)}function q(a,b,d){if(!b){return c.encodeBase64Packet(a,d)}if(j){return p(a,b,d)}var e=new Uint8Array(1);e[0]=k[a.type];var f=new n([e.buffer,a.data]);return d(f)}c.encodeBase64Packet=function(a,b){var e="b"+c.packets[a.type];if(n&&a.data instanceof n){var f=new FileReader;f.onload=function(){var a=f.result.split(",")[1];b(e+a)};return f.readAsDataURL(a.data)}var g;try{g=String.fromCharCode.apply(null,new Uint8Array(a.data))}catch(h){var i=new Uint8Array(a.data);var j=new Array(i.length);for(var k=0;k<i.length;k++){j[k]=i[k]}g=String.fromCharCode.apply(null,j)}e+=d.btoa(g);return b(e)};c.decodePacket=function(a,b){if(typeof a=="string"||a===undefined){if(a.charAt(0)=="b"){return c.decodeBase64Packet(a.substr(1),b)}a=i.decode(a);var d=a.charAt(0);if(Number(d)!=d||!l[d]){return m}if(a.length>1){return{type:l[d],data:a.substring(1)}}else{return{type:l[d]}}}var e=new Uint8Array(a);var d=e[0];var g=f(a,1);if(n&&b==="blob"){g=new n([g])}return{type:l[d],data:g}};c.decodeBase64Packet=function(a,b){var c=l[a.charAt(0)];if(!d.ArrayBuffer){return{type:c,data:{base64:true,data:a.substr(1)}}}var e=g.decode(a.substr(1));if(b==="blob"&&n){e=new n([e])}return{type:c,data:e}};c.encodePayload=function(a,b,d){if(typeof b=="function"){d=b;b=null}if(b){if(n&&!j){return c.encodePayloadAsBlob(a,d)}return c.encodePayloadAsArrayBuffer(a,d)}if(!a.length){return d("0:")}function e(a){return a.length+":"+a}function f(a,d){c.encodePacket(a,b,function(a){d(null,e(a))})}r(a,f,function(a,b){return d(b.join(""))})};function r(a,b,c){var d=new Array(a.length);var e=h(a.length,c);var f=function(a,c,e){b(c,function(b,c){d[a]=c;e(b,d)})};for(var g=0;g<a.length;g++){f(g,a[g],e)}}c.decodePayload=function(a,b,d){if(typeof a!="string"){return c.decodePayloadAsBinary(a,b,d)}if(typeof b==="function"){d=b;b=null}var e;if(a==""){return d(m,0,1)}var f="",g,h;for(var i=0,j=a.length;i<j;i++){var k=a.charAt(i);if(":"!=k){f+=k}else{if(""==f||f!=(g=Number(f))){return d(m,0,1)}h=a.substr(i+1,g);if(f!=h.length){return d(m,0,1)}if(h.length){e=c.decodePacket(h,b);if(m.type==e.type&&m.data==e.data){return d(m,0,1)}var l=d(e,i+g,j);if(false===l)return}i+=g;f=""}}if(f!=""){return d(m,0,1)}};c.encodePayloadAsArrayBuffer=function(a,b){if(!a.length){return b(new ArrayBuffer(0))}function d(a,b){c.encodePacket(a,true,function(a){return b(null,a)})}r(a,d,function(a,c){var d=c.reduce(function(a,b){var c;if(typeof b==="string"){c=b.length}else{c=b.byteLength}return a+c.toString().length+c+2},0);var e=new Uint8Array(d);var f=0;c.forEach(function(a){var b=typeof a==="string";var c=a;if(b){var d=new Uint8Array(a.length);for(var g=0;g<a.length;g++){d[g]=a.charCodeAt(g)}c=d.buffer}if(b){e[f++]=0}else{e[f++]=1}var h=c.byteLength.toString();for(var g=0;g<h.length;g++){e[f++]=parseInt(h[g])}e[f++]=255;var d=new Uint8Array(c);for(var g=0;g<d.length;g++){e[f++]=d[g]}});return b(e.buffer)})};c.encodePayloadAsBlob=function(a,b){function d(a,b){c.encodePacket(a,true,function(a){var c=new Uint8Array(1);c[0]=1;if(typeof a==="string"){var d=new Uint8Array(a.length);for(var e=0;e<a.length;e++){d[e]=a.charCodeAt(e)}a=d.buffer;c[0]=0}var f=a instanceof ArrayBuffer?a.byteLength:a.size;var g=f.toString();var h=new Uint8Array(g.length+1);for(var e=0;e<g.length;e++){h[e]=parseInt(g[e])}h[g.length]=255;if(n){var i=new n([c.buffer,h.buffer,a]);b(null,i)}})}r(a,d,function(a,c){return b(new n(c))})};c.decodePayloadAsBinary=function(a,b,d){if(typeof b==="function"){d=b;b=null}var e=a;var g=[];while(e.byteLength>0){var h=new Uint8Array(e);var i=h[0]===0;var j="";for(var k=1;;k++){if(h[k]==255)break;j+=h[k]}e=f(e,2+j.length);j=parseInt(j);var l=f(e,0,j);if(i){try{l=String.fromCharCode.apply(null,new Uint8Array(l))}catch(m){var n=new Uint8Array(l);l="";for(var k=0;k<n.length;k++){l+=String.fromCharCode(n[k])}}}g.push(l);e=f(e,j)}var o=g.length;g.forEach(function(a,e){d(c.decodePacket(a,b),e,o)})}},{"./keys":23,after:24,"arraybuffer.slice":25,"base64-arraybuffer":26,blob:27,utf8:28}],23:[function(a,b,c){b.exports=Object.keys||function d(a){var b=[];var c=Object.prototype.hasOwnProperty;for(var d in a){if(c.call(a,d)){b.push(d)}}return b}},{}],24:[function(a,b,c){b.exports=d;function d(a,b,c){var d=false;c=c||e;f.count=a;return a===0?b():f;function f(a,e){if(f.count<=0){throw new Error("after called too many times")}--f.count;if(a){d=true;b(a);b=c}else if(f.count===0&&!d){b(null,e)}}}function e(){}},{}],25:[function(a,b,c){b.exports=function(a,b,c){var d=a.byteLength;b=b||0;c=c||d;if(a.slice){return a.slice(b,c)}if(b<0){b+=d}if(c<0){c+=d}if(c>d){c=d}if(b>=d||b>=c||d===0){return new ArrayBuffer(0)}var e=new Uint8Array(a);var f=new Uint8Array(c-b);for(var g=b,h=0;g<c;g++,h++){f[h]=e[g]}return f.buffer}},{}],26:[function(a,b,c){(function(a){"use strict";c.encode=function(b){var c=new Uint8Array(b),d,e=c.length,f="";for(d=0;d<e;d+=3){f+=a[c[d]>>2];f+=a[(c[d]&3)<<4|c[d+1]>>4];f+=a[(c[d+1]&15)<<2|c[d+2]>>6];f+=a[c[d+2]&63]}if(e%3===2){f=f.substring(0,f.length-1)+"="}else if(e%3===1){f=f.substring(0,f.length-2)+"=="}return f};c.decode=function(b){var c=b.length*.75,d=b.length,e,f=0,g,h,i,j;if(b[b.length-1]==="="){c--;if(b[b.length-2]==="="){c--}}var k=new ArrayBuffer(c),l=new Uint8Array(k);for(e=0;e<d;e+=4){g=a.indexOf(b[e]);h=a.indexOf(b[e+1]);i=a.indexOf(b[e+2]);j=a.indexOf(b[e+3]);l[f++]=g<<2|h>>4;l[f++]=(h&15)<<4|i>>2;l[f++]=(i&3)<<6|j&63}return k}})("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],27:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=d.BlobBuilder||d.WebKitBlobBuilder||d.MSBlobBuilder||d.MozBlobBuilder;var f=function(){try{var a=new Blob(["hi"]);return a.size==2}catch(b){return false}}();var g=e&&e.prototype.append&&e.prototype.getBlob;function h(a,b){b=b||{};var c=new e;for(var d=0;d<a.length;d++){c.append(a[d])}return b.type?c.getBlob(b.type):c.getBlob()}b.exports=function(){if(f){return d.Blob}else if(g){return h}else{return undefined}}()},{}],28:[function(b,c,d){var e=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};(function(b){var f=typeof d=="object"&&d;var g=typeof c=="object"&&c&&c.exports==f&&c;var h=typeof e=="object"&&e;if(h.global===h||h.window===h){b=h}var i=String.fromCharCode;function j(a){var b=[];var c=0;var d=a.length;var e;var f;while(c<d){e=a.charCodeAt(c++);if(e>=55296&&e<=56319&&c<d){f=a.charCodeAt(c++);if((f&64512)==56320){b.push(((e&1023)<<10)+(f&1023)+65536)}else{b.push(e);c--}}else{b.push(e)}}return b}function k(a){var b=a.length;var c=-1;var d;var e="";while(++c<b){d=a[c];if(d>65535){d-=65536;e+=i(d>>>10&1023|55296);d=56320|d&1023}e+=i(d)}return e}function l(a,b){return i(a>>b&63|128)}function m(a){if((a&4294967168)==0){return i(a)}var b="";if((a&4294965248)==0){b=i(a>>6&31|192)}else if((a&4294901760)==0){b=i(a>>12&15|224);b+=l(a,6)}else if((a&4292870144)==0){b=i(a>>18&7|240);b+=l(a,12);b+=l(a,6)}b+=i(a&63|128);return b}function n(a){var b=j(a);var c=b.length;var d=-1;var e;var f="";while(++d<c){e=b[d];f+=m(e)}return f}function o(){if(s>=r){throw Error("Invalid byte index")}var a=q[s]&255;s++;if((a&192)==128){return a&63}throw Error("Invalid continuation byte")}function p(){var a;var b;var c;var d;var e;if(s>r){throw Error("Invalid byte index")}if(s==r){return false}a=q[s]&255;s++;if((a&128)==0){return a}if((a&224)==192){var b=o();e=(a&31)<<6|b;if(e>=128){return e}else{throw Error("Invalid continuation byte")}}if((a&240)==224){b=o();c=o();e=(a&15)<<12|b<<6|c;if(e>=2048){return e}else{throw Error("Invalid continuation byte")}}if((a&248)==240){b=o();c=o();d=o();e=(a&15)<<18|b<<12|c<<6|d;if(e>=65536&&e<=1114111){return e}}throw Error("Invalid UTF-8 detected")}var q;var r;var s;function t(a){q=j(a);r=q.length;s=0;var b=[];var c;while((c=p())!==false){b.push(c)}return k(b)}var u={version:"2.0.0",encode:n,decode:t};if(typeof a=="function"&&typeof a.amd=="object"&&a.amd){a(function(){return u})}else if(f&&!f.nodeType){if(g){g.exports=u}else{var v={};var w=v.hasOwnProperty;for(var x in u){w.call(u,x)&&(f[x]=u[x])}}}else{b.utf8=u}})(this)},{}],29:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=/^[\],:{}\s]*$/;var f=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g;var g=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g;var h=/(?:^|:|,)(?:\s*\[)+/g;var i=/^\s+/;var j=/\s+$/;b.exports=function k(a){if("string"!=typeof a||!a){return null}a=a.replace(i,"").replace(j,"");if(d.JSON&&JSON.parse){return JSON.parse(a)}if(e.test(a.replace(f,"@").replace(g,"]").replace(h,""))){return new Function("return "+a)()}}},{}],30:[function(a,b,c){c.encode=function(a){var b="";for(var c in a){if(a.hasOwnProperty(c)){if(b.length)b+="&";b+=encodeURIComponent(c)+"="+encodeURIComponent(a[c])}}return b};c.decode=function(a){var b={};var c=a.split("&");for(var d=0,e=c.length;d<e;d++){var f=c[d].split("=");b[decodeURIComponent(f[0])]=decodeURIComponent(f[1])}return b}},{}],31:[function(a,b,c){var d=function(){return this}();var e=d.WebSocket||d.MozWebSocket;b.exports=e?f:null;function f(a,b,c){var d;if(b){d=new e(a,b)}else{d=new e(a)}return d}if(e)f.prototype=e.prototype},{}],32:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("isarray");b.exports=f;function f(a){function b(a){if(!a)return false;if(d.Buffer&&Buffer.isBuffer(a)||d.ArrayBuffer&&a instanceof ArrayBuffer||d.Blob&&a instanceof Blob||d.File&&a instanceof File){return true}if(e(a)){for(var c=0;c<a.length;c++){if(b(a[c])){return true}}}else if(a&&"object"==typeof a){if(a.toJSON){a=a.toJSON()}for(var f in a){if(b(a[f])){return true}}}return false}return b(a)}},{isarray:33}],33:[function(a,b,c){b.exports=Array.isArray||function(a){return Object.prototype.toString.call(a)=="[object Array]"}},{}],34:[function(a,b,c){var d=a("global");try{b.exports="XMLHttpRequest"in d&&"withCredentials"in new d.XMLHttpRequest}catch(e){b.exports=false}},{global:35}],35:[function(a,b,c){b.exports=function(){return this}()},{}],36:[function(a,b,c){var d=[].indexOf;b.exports=function(a,b){if(d)return a.indexOf(b);for(var c=0;c<a.length;++c){if(a[c]===b)return c}return-1}},{}],37:[function(a,b,c){var d=Object.prototype.hasOwnProperty;c.keys=Object.keys||function(a){var b=[];for(var c in a){if(d.call(a,c)){b.push(c)}}return b};c.values=function(a){var b=[];for(var c in a){if(d.call(a,c)){b.push(a[c])}}return b};c.merge=function(a,b){for(var c in b){if(d.call(b,c)){a[c]=b[c]}}return a};c.length=function(a){return c.keys(a).length};c.isEmpty=function(a){return 0==c.length(a)}},{}],38:[function(a,b,c){var d=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/;var e=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];b.exports=function f(a){var b=d.exec(a||""),c={},f=14;while(f--){c[e[f]]=b[f]||""}return c}},{}],39:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("isarray");c.deconstructPacket=function(a){var b=[];var c=a.data;function f(a){if(!a)return a;if(d.Buffer&&Buffer.isBuffer(a)||d.ArrayBuffer&&a instanceof ArrayBuffer){var c={_placeholder:true,num:b.length};b.push(a);return c}else if(e(a)){var g=new Array(a.length);for(var h=0;h<a.length;h++){g[h]=f(a[h])}return g}else if("object"==typeof a&&!(a instanceof Date)){var g={};for(var i in a){g[i]=f(a[i])}return g}return a}var g=a;g.data=f(c);g.attachments=b.length;return{packet:g,buffers:b}};c.reconstructPacket=function(a,b){var c=0;function d(a){if(a&&a._placeholder){var c=b[a.num];return c}else if(e(a)){for(var f=0;f<a.length;f++){a[f]=d(a[f])}return a}else if(a&&"object"==typeof a){for(var g in a){a[g]=d(a[g])}return a}return a}a.data=d(a.data);a.attachments=undefined;return a};c.removeBlobs=function(a,b){function c(a,i,j){if(!a)return a;if(d.Blob&&a instanceof Blob||d.File&&a instanceof File){g++;var k=new FileReader;k.onload=function(){if(j){j[i]=this.result}else{h=this.result}if(!--g){b(h)}};k.readAsArrayBuffer(a)}if(e(a)){for(var l=0;l<a.length;l++){c(a[l],l,a)}}else if(a&&"object"==typeof a&&!f(a)){for(var m in a){c(a[m],m,a)}}}var g=0;var h=a;c(h);if(!g){b(h)}};function f(a){return d.Buffer&&Buffer.isBuffer(a)||d.ArrayBuffer&&a instanceof ArrayBuffer}},{isarray:41}],40:[function(a,b,c){var d=typeof self!=="undefined"?self:typeof window!=="undefined"?window:{};var e=a("debug")("socket.io-parser");var f=a("json3");var g=a("isarray");var h=a("emitter");var i=a("./binary");c.protocol=3;c.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"];c.CONNECT=0;c.DISCONNECT=1;c.EVENT=2;c.ACK=3;c.ERROR=4;c.BINARY_EVENT=5;c.BINARY_ACK=6;c.Encoder=j;function j(){}j.prototype.encode=function(a,b){e("encoding packet %j",a);if(c.BINARY_EVENT==a.type||c.BINARY_ACK==a.type){l(a,b)}else{var d=k(a);b([d])}};function k(a){var b="";var d=false;b+=a.type;if(c.BINARY_EVENT==a.type||c.BINARY_ACK==a.type){b+=a.attachments;b+="-"}if(a.nsp&&"/"!=a.nsp){d=true;b+=a.nsp}if(null!=a.id){if(d){b+=",";d=false}b+=a.id}if(null!=a.data){if(d)b+=",";b+=f.stringify(a.data)}e("encoded %j as %s",a,b);return b}function l(a,b){function c(a){var c=i.deconstructPacket(a);var d=k(c.packet);var e=c.buffers;e.unshift(d);b(e)}i.removeBlobs(a,c)}c.Decoder=m;function m(){this.reconstructor=null}h(m.prototype);m.prototype.add=function(a){var b;if("string"==typeof a){b=n(a);if(c.BINARY_EVENT==b.type||c.BINARY_ACK==b.type){this.reconstructor=new o(b);if(this.reconstructor.reconPack.attachments==0){this.emit("decoded",b)}}else{this.emit("decoded",b)}}else if(d.Buffer&&Buffer.isBuffer(a)||d.ArrayBuffer&&a instanceof ArrayBuffer||a.base64){if(!this.reconstructor){throw new Error("got binary data when not reconstructing a packet")}else{b=this.reconstructor.takeBinaryData(a);if(b){this.reconstructor=null;this.emit("decoded",b)}}}else{throw new Error("Unknown type: "+a)}};function n(a){var b={};var d=0;b.type=Number(a.charAt(0));if(null==c.types[b.type])return p();if(c.BINARY_EVENT==b.type||c.BINARY_ACK==b.type){b.attachments="";while(a.charAt(++d)!="-"){b.attachments+=a.charAt(d)}b.attachments=Number(b.attachments)}if("/"==a.charAt(d+1)){b.nsp="";while(++d){var g=a.charAt(d);if(","==g)break;b.nsp+=g;if(d+1==a.length)break}}else{b.nsp="/"}var h=a.charAt(d+1);if(""!=h&&Number(h)==h){b.id="";while(++d){var g=a.charAt(d);if(null==g||Number(g)!=g){--d;break}b.id+=a.charAt(d);if(d+1==a.length)break}b.id=Number(b.id)}if(a.charAt(++d)){try{b.data=f.parse(a.substr(d))}catch(i){return p()}}e("decoded %s as %j",a,b);return b}m.prototype.destroy=function(){if(this.reconstructor){this.reconstructor.finishedReconstruction()}};function o(a){this.reconPack=a;this.buffers=[]}o.prototype.takeBinaryData=function(a){this.buffers.push(a);if(this.buffers.length==this.reconPack.attachments){var b=i.reconstructPacket(this.reconPack,this.buffers);this.finishedReconstruction();return b}return null};o.prototype.finishedReconstruction=function(){this.reconPack=null;this.buffers=[]};function p(a){return{type:c.ERROR,data:"parser error"}}},{"./binary":39,debug:9,emitter:10,isarray:41,json3:42}],41:[function(a,b,c){b.exports=a(33)},{}],42:[function(b,c,d){(function(b){var c={}.toString,e,f,g;var h=typeof a==="function"&&a.amd;var i=typeof JSON=="object"&&JSON;var j=typeof d=="object"&&d&&!d.nodeType&&d;if(j&&i){j.stringify=i.stringify;j.parse=i.parse}else{j=b.JSON=i||{}}var k=new Date(-0xc782b5b800cec);try{k=k.getUTCFullYear()==-109252&&k.getUTCMonth()===0&&k.getUTCDate()===1&&k.getUTCHours()==10&&k.getUTCMinutes()==37&&k.getUTCSeconds()==6&&k.getUTCMilliseconds()==708}catch(l){}function m(a){if(m[a]!==g){return m[a]}var b;if(a=="bug-string-char-index"){b="a"[0]!="a"}else if(a=="json"){b=m("json-stringify")&&m("json-parse")}else{var d,e='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if(a=="json-stringify"){var f=j.stringify,h=typeof f=="function"&&k;if(h){(d=function(){return 1}).toJSON=d;try{h=f(0)==="0"&&f(new Number)==="0"&&f(new String)=='""'&&f(c)===g&&f(g)===g&&f()===g&&f(d)==="1"&&f([d])=="[1]"&&f([g])=="[null]"&&f(null)=="null"&&f([g,c,null])=="[null,null,null]"&&f({a:[d,true,false,null,"\x00\b\n\f\r "]})==e&&f(null,d)==="1"&&f([1,2],null,1)=="[\n 1,\n 2\n]"&&f(new Date(-864e13))=='"-271821-04-20T00:00:00.000Z"'&&f(new Date(864e13))=='"+275760-09-13T00:00:00.000Z"'&&f(new Date(-621987552e5))=='"-000001-01-01T00:00:00.000Z"'&&f(new Date(-1))=='"1969-12-31T23:59:59.999Z"'}catch(i){h=false}}b=h}if(a=="json-parse"){var l=j.parse;if(typeof l=="function"){try{if(l("0")===0&&!l(false)){d=l(e);var n=d["a"].length==5&&d["a"][0]===1;if(n){try{n=!l('" "')}catch(i){}if(n){try{n=l("01")!==1}catch(i){}}if(n){try{n=l("1.")!==1}catch(i){}}}}}catch(i){n=false}}b=n}}return m[a]=!!b}if(!m("json")){var n="[object Function]";var o="[object Date]";var p="[object Number]";var q="[object String]";var r="[object Array]";var s="[object Boolean]";var t=m("bug-string-char-index");if(!k){var u=Math.floor;var v=[0,31,59,90,120,151,181,212,243,273,304,334];var w=function(a,b){return v[b]+365*(a-1970)+u((a-1969+(b=+(b>1)))/4)-u((a-1901+b)/100)+u((a-1601+b)/400)}}if(!(e={}.hasOwnProperty)){e=function(a){var b={},d;if((b.__proto__=null,b.__proto__={toString:1},b).toString!=c){e=function(a){var b=this.__proto__,c=a in(this.__proto__=null,this);this.__proto__=b;return c}}else{d=b.constructor;e=function(a){var b=(this.constructor||d).prototype;return a in this&&!(a in b&&this[a]===b[a])}}b=null;return e.call(this,a)}}var x={"boolean":1,number:1,string:1,undefined:1};var y=function(a,b){var c=typeof a[b];return c=="object"?!!a[b]:!x[c]};f=function(a,b){var d=0,g,h,i;(g=function(){this.valueOf=0}).prototype.valueOf=0;h=new g;for(i in h){if(e.call(h,i)){d++}}g=h=null;if(!d){h=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"];f=function(a,b){var d=c.call(a)==n,f,g;var i=!d&&typeof a.constructor!="function"&&y(a,"hasOwnProperty")?a.hasOwnProperty:e;for(f in a){if(!(d&&f=="prototype")&&i.call(a,f)){b(f)}}for(g=h.length;f=h[--g];i.call(a,f)&&b(f));}}else if(d==2){f=function(a,b){var d={},f=c.call(a)==n,g;for(g in a){if(!(f&&g=="prototype")&&!e.call(d,g)&&(d[g]=1)&&e.call(a,g)){b(g)}}}}else{f=function(a,b){var d=c.call(a)==n,f,g;for(f in a){if(!(d&&f=="prototype")&&e.call(a,f)&&!(g=f==="constructor")){b(f)}}if(g||e.call(a,f="constructor")){b(f)}}}return f(a,b)};if(!m("json-stringify")){var z={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"};var A="000000";var B=function(a,b){return(A+(b||0)).slice(-a)};var C="\\u00";var D=function(a){var b='"',c=0,d=a.length,e=d>10&&t,f;if(e){f=a.split("")}for(;c<d;c++){var g=a.charCodeAt(c);switch(g){case 8:case 9:case 10:case 12:case 13:case 34:case 92:b+=z[g];break;default:if(g<32){b+=C+B(2,g.toString(16));break}b+=e?f[c]:t?a.charAt(c):a[c]}}return b+'"'};var E=function(a,b,d,h,i,j,k){var l,m,n,t,v,x,y,z,A,C,F,G,H,I,J,K;try{l=b[a]}catch(L){}if(typeof l=="object"&&l){m=c.call(l);if(m==o&&!e.call(l,"toJSON")){if(l>-1/0&&l<1/0){if(w){v=u(l/864e5);for(n=u(v/365.2425)+1970-1;w(n+1,0)<=v;n++);for(t=u((v-w(n,0))/30.42);w(n,t+1)<=v;t++);v=1+v-w(n,t);x=(l%864e5+864e5)%864e5;y=u(x/36e5)%24;z=u(x/6e4)%60;A=u(x/1e3)%60;C=x%1e3}else{n=l.getUTCFullYear();t=l.getUTCMonth();v=l.getUTCDate();y=l.getUTCHours();z=l.getUTCMinutes();A=l.getUTCSeconds();C=l.getUTCMilliseconds()}l=(n<=0||n>=1e4?(n<0?"-":"+")+B(6,n<0?-n:n):B(4,n))+"-"+B(2,t+1)+"-"+B(2,v)+"T"+B(2,y)+":"+B(2,z)+":"+B(2,A)+"."+B(3,C)+"Z"}else{l=null}}else if(typeof l.toJSON=="function"&&(m!=p&&m!=q&&m!=r||e.call(l,"toJSON"))){l=l.toJSON(a)}}if(d){l=d.call(b,a,l)}if(l===null){return"null"}m=c.call(l);if(m==s){return""+l}else if(m==p){return l>-1/0&&l<1/0?""+l:"null"}else if(m==q){return D(""+l)}if(typeof l=="object"){for(I=k.length;I--;){if(k[I]===l){throw TypeError()}}k.push(l);F=[];J=j;j+=i;if(m==r){for(H=0,I=l.length;H<I;H++){G=E(H,l,d,h,i,j,k);F.push(G===g?"null":G)}K=F.length?i?"[\n"+j+F.join(",\n"+j)+"\n"+J+"]":"["+F.join(",")+"]":"[]"}else{f(h||l,function(a){var b=E(a,l,d,h,i,j,k);if(b!==g){F.push(D(a)+":"+(i?" ":"")+b)}});K=F.length?i?"{\n"+j+F.join(",\n"+j)+"\n"+J+"}":"{"+F.join(",")+"}":"{}"}k.pop();return K}};j.stringify=function(a,b,d){var e,f,g,h;if(typeof b=="function"||typeof b=="object"&&b){if((h=c.call(b))==n){f=b}else if(h==r){g={};for(var i=0,j=b.length,k;i<j;k=b[i++],(h=c.call(k),h==q||h==p)&&(g[k]=1));}}if(d){if((h=c.call(d))==p){if((d-=d%1)>0){for(e="",d>10&&(d=10);e.length<d;e+=" ");}}else if(h==q){e=d.length<=10?d:d.slice(0,10)}}return E("",(k={},k[""]=a,k),f,g,e,"",[])}}if(!m("json-parse")){var F=String.fromCharCode;var G={92:"\\",34:'"',47:"/",98:"\b",116:" ",110:"\n",102:"\f",114:"\r"};var H,I;var J=function(){H=I=null;throw SyntaxError()};var K=function(){var a=I,b=a.length,c,d,e,f,g;while(H<b){g=a.charCodeAt(H);switch(g){case 9:case 10:case 13:case 32:H++;break;case 123:case 125:case 91:case 93:case 58:case 44:c=t?a.charAt(H):a[H];H++;return c;case 34:for(c="@",H++;H<b;){g=a.charCodeAt(H);if(g<32){J()}else if(g==92){g=a.charCodeAt(++H);switch(g){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:c+=G[g];H++;break;case 117:d=++H;for(e=H+4;H<e;H++){g=a.charCodeAt(H);if(!(g>=48&&g<=57||g>=97&&g<=102||g>=65&&g<=70)){J()}}c+=F("0x"+a.slice(d,H));break;default:J()}}else{if(g==34){break}g=a.charCodeAt(H);d=H;while(g>=32&&g!=92&&g!=34){g=a.charCodeAt(++H)}c+=a.slice(d,H)}}if(a.charCodeAt(H)==34){H++;return c}J();default:d=H;if(g==45){f=true;g=a.charCodeAt(++H)}if(g>=48&&g<=57){if(g==48&&(g=a.charCodeAt(H+1),g>=48&&g<=57)){J()}f=false;for(;H<b&&(g=a.charCodeAt(H),g>=48&&g<=57);H++);if(a.charCodeAt(H)==46){e=++H;for(;e<b&&(g=a.charCodeAt(e),g>=48&&g<=57);e++);if(e==H){J()}H=e}g=a.charCodeAt(H);if(g==101||g==69){g=a.charCodeAt(++H);if(g==43||g==45){H++}for(e=H;e<b&&(g=a.charCodeAt(e),g>=48&&g<=57);e++);if(e==H){J()}H=e}return+a.slice(d,H)}if(f){J()}if(a.slice(H,H+4)=="true"){H+=4;return true}else if(a.slice(H,H+5)=="false"){H+=5;return false}else if(a.slice(H,H+4)=="null"){H+=4;return null}J()}}return"$"};var L=function(a){var b,c;if(a=="$"){J()}if(typeof a=="string"){if((t?a.charAt(0):a[0])=="@"){return a.slice(1)}if(a=="["){b=[];for(;;c||(c=true)){a=K();if(a=="]"){break}if(c){if(a==","){a=K();if(a=="]"){J()}}else{J()}}if(a==","){J()}b.push(L(a))}return b}else if(a=="{"){b={};for(;;c||(c=true)){a=K();if(a=="}"){break}if(c){if(a==","){a=K();if(a=="}"){J()}}else{J()}}if(a==","||typeof a!="string"||(t?a.charAt(0):a[0])!="@"||K()!=":"){J()}b[a.slice(1)]=L(K())}return b}J()}return a};var M=function(a,b,c){var d=N(a,b,c);if(d===g){delete a[b]}else{a[b]=d}};var N=function(a,b,d){var e=a[b],g;if(typeof e=="object"&&e){if(c.call(e)==r){for(g=e.length;g--;){M(e,g,d)}}else{f(e,function(a){M(e,a,d)})}}return d.call(a,b,e)};j.parse=function(a,b){var d,e;H=0;I=""+a;d=L(K());if(K()!="$"){J()}H=I=null;return b&&c.call(b)==n?N((e={},e[""]=d,e),"",b):d}}}if(h){a(function(){return j})}})(this)},{}],43:[function(a,b,c){b.exports=d;function d(a,b){var c=[];b=b||0;for(var d=b||0;d<a.length;d++){c[d-b]=a[d]}return c}},{}]},{},[1])(1)});String.prototype.contains=function(){var a=arguments;for(var b in a){var c=a[b];if(typeof c==="string"&&this.indexOf(c)>-1){return true}}return false};(function(a,b){"use strict";if(typeof exports==="object"){module.exports=b(require("./punycode"),require("./IPv6"),require("./SecondLevelDomains"))}else if(typeof define==="function"&&define.amd){define(["./punycode","./IPv6","./SecondLevelDomains"],b)}else{a.URI=b(a.punycode,a.IPv6,a.SecondLevelDomains,a)}})(this,function(a,b,c,d){"use strict";var e=d&&d.URI;function f(a,b){if(!(this instanceof f)){return new f(a,b)}if(a===undefined){if(typeof location!=="undefined"){a=location.href+""}else{a=""}}this.href(a);if(b!==undefined){return this.absoluteTo(b)}return this}f.version="1.13.2";var g=f.prototype;var h=Object.prototype.hasOwnProperty;function i(a){return a.replace(/([.*+?^=!:${}()|[\]\/\\])/g,"\\$1")}function j(a){if(a===undefined){return"Undefined"}return String(Object.prototype.toString.call(a)).slice(8,-1)}function k(a){return j(a)==="Array"}function l(a,b){var c={};var d,e;if(k(b)){for(d=0,e=b.length;d<e;d++){c[b[d]]=true}}else{c[b]=true}for(d=0,e=a.length;d<e;d++){if(c[a[d]]!==undefined){a.splice(d,1);e--;d--}}return a}function m(a,b){var c,d;if(k(b)){for(c=0,d=b.length;c<d;c++){if(!m(a,b[c])){return false}}return true}var e=j(b);for(c=0,d=a.length;c<d;c++){if(e==="RegExp"){if(typeof a[c]==="string"&&a[c].match(b)){return true}}else if(a[c]===b){return true}}return false}function n(a,b){if(!k(a)||!k(b)){return false}if(a.length!==b.length){return false}a.sort();b.sort();for(var c=0,d=a.length;c<d;c++){if(a[c]!==b[c]){return false}}return true}f._parts=function(){return{protocol:null,username:null,password:null,hostname:null,urn:null,port:null,path:null,query:null,fragment:null,duplicateQueryParameters:f.duplicateQueryParameters,escapeQuerySpace:f.escapeQuerySpace}};f.duplicateQueryParameters=false;f.escapeQuerySpace=true;f.protocol_expression=/^[a-z][a-z0-9.+-]*$/i;f.idn_expression=/[^a-z0-9\.-]/i;f.punycode_expression=/(xn--)/i;f.ip4_expression=/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/;f.ip6_expression=/^\s*((([0-9A-Fa-f]{1,4}:){7}([0-9A-Fa-f]{1,4}|:))|(([0-9A-Fa-f]{1,4}:){6}(:[0-9A-Fa-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){5}(((:[0-9A-Fa-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9A-Fa-f]{1,4}:){4}(((:[0-9A-Fa-f]{1,4}){1,3})|((:[0-9A-Fa-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){3}(((:[0-9A-Fa-f]{1,4}){1,4})|((:[0-9A-Fa-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){2}(((:[0-9A-Fa-f]{1,4}){1,5})|((:[0-9A-Fa-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9A-Fa-f]{1,4}:){1}(((:[0-9A-Fa-f]{1,4}){1,6})|((:[0-9A-Fa-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9A-Fa-f]{1,4}){1,7})|((:[0-9A-Fa-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))(%.+)?\s*$/;f.find_uri_expression=/\b((?:[a-z][\w-]+:(?:\/{1,3}|[a-z0-9%])|www\d{0,3}[.]|[a-z0-9.\-]+[.][a-z]{2,4}\/)(?:[^\s()<>]+|\(([^\s()<>]+|(\([^\s()<>]+\)))*\))+(?:\(([^\s()<>]+|(\([^\s()<>]+\)))*\)|[^\s`!()\[\]{};:'".,<>?«»“”‘’]))/gi;f.findUri={start:/\b(?:([a-z][a-z0-9.+-]*:\/\/)|www\.)/gi,end:/[\s\r\n]|$/,trim:/[`!()\[\]{};:'".,<>?«»“”„‘’]+$/};f.defaultPorts={http:"80",https:"443",ftp:"21",gopher:"70",ws:"80",wss:"443"};
f.invalid_hostname_characters=/[^a-zA-Z0-9\.-]/;f.domAttributes={a:"href",blockquote:"cite",link:"href",base:"href",script:"src",form:"action",img:"src",area:"href",iframe:"src",embed:"src",source:"src",track:"src",input:"src"};f.getDomAttribute=function(a){if(!a||!a.nodeName){return undefined}var b=a.nodeName.toLowerCase();if(b==="input"&&a.type!=="image"){return undefined}return f.domAttributes[b]};function o(a){return escape(a)}function p(a){return encodeURIComponent(a).replace(/[!'()*]/g,o).replace(/\*/g,"%2A")}f.encode=p;f.decode=decodeURIComponent;f.iso8859=function(){f.encode=escape;f.decode=unescape};f.unicode=function(){f.encode=p;f.decode=decodeURIComponent};f.characters={pathname:{encode:{expression:/%(24|26|2B|2C|3B|3D|3A|40)/gi,map:{"%24":"$","%26":"&","%2B":"+","%2C":",","%3B":";","%3D":"=","%3A":":","%40":"@"}},decode:{expression:/[\/\?#]/g,map:{"/":"%2F","?":"%3F","#":"%23"}}},reserved:{encode:{expression:/%(21|23|24|26|27|28|29|2A|2B|2C|2F|3A|3B|3D|3F|40|5B|5D)/gi,map:{"%3A":":","%2F":"/","%3F":"?","%23":"#","%5B":"[","%5D":"]","%40":"@","%21":"!","%24":"$","%26":"&","%27":"'","%28":"(","%29":")","%2A":"*","%2B":"+","%2C":",","%3B":";","%3D":"="}}}};f.encodeQuery=function(a,b){var c=f.encode(a+"");if(b===undefined){b=f.escapeQuerySpace}return b?c.replace(/%20/g,"+"):c};f.decodeQuery=function(a,b){a+="";if(b===undefined){b=f.escapeQuerySpace}try{return f.decode(b?a.replace(/\+/g,"%20"):a)}catch(c){return a}};f.recodePath=function(a){var b=(a+"").split("/");for(var c=0,d=b.length;c<d;c++){b[c]=f.encodePathSegment(f.decode(b[c]))}return b.join("/")};f.decodePath=function(a){var b=(a+"").split("/");for(var c=0,d=b.length;c<d;c++){b[c]=f.decodePathSegment(b[c])}return b.join("/")};var q={encode:"encode",decode:"decode"};var r;var s=function(a,b){return function(c){return f[b](c+"").replace(f.characters[a][b].expression,function(c){return f.characters[a][b].map[c]})}};for(r in q){f[r+"PathSegment"]=s("pathname",q[r])}f.encodeReserved=s("reserved","encode");f.parse=function(a,b){var c;if(!b){b={}}c=a.indexOf("#");if(c>-1){b.fragment=a.substring(c+1)||null;a=a.substring(0,c)}c=a.indexOf("?");if(c>-1){b.query=a.substring(c+1)||null;a=a.substring(0,c)}if(a.substring(0,2)==="//"){b.protocol=null;a=a.substring(2);a=f.parseAuthority(a,b)}else{c=a.indexOf(":");if(c>-1){b.protocol=a.substring(0,c)||null;if(b.protocol&&!b.protocol.match(f.protocol_expression)){b.protocol=undefined}else if(b.protocol==="file"){a=a.substring(c+3)}else if(a.substring(c+1,c+3)==="//"){a=a.substring(c+3);a=f.parseAuthority(a,b)}else{a=a.substring(c+1);b.urn=true}}}b.path=a;return b};f.parseHost=function(a,b){var c=a.indexOf("/");var d;var e;if(c===-1){c=a.length}if(a.charAt(0)==="["){d=a.indexOf("]");b.hostname=a.substring(1,d)||null;b.port=a.substring(d+2,c)||null;if(b.port==="/"){b.port=null}}else if(a.indexOf(":")!==a.lastIndexOf(":")){b.hostname=a.substring(0,c)||null;b.port=null}else{e=a.substring(0,c).split(":");b.hostname=e[0]||null;b.port=e[1]||null}if(b.hostname&&a.substring(c).charAt(0)!=="/"){c++;a="/"+a}return a.substring(c)||"/"};f.parseAuthority=function(a,b){a=f.parseUserinfo(a,b);return f.parseHost(a,b)};f.parseUserinfo=function(a,b){var c=a.indexOf("/");var d=c>-1?a.lastIndexOf("@",c):a.indexOf("@");var e;if(d>-1&&(c===-1||d<c)){e=a.substring(0,d).split(":");b.username=e[0]?f.decode(e[0]):null;e.shift();b.password=e[0]?f.decode(e.join(":")):null;a=a.substring(d+1)}else{b.username=null;b.password=null}return a};f.parseQuery=function(a,b){if(!a){return{}}a=a.replace(/&+/g,"&").replace(/^\?*&*|&+$/g,"");if(!a){return{}}var c={};var d=a.split("&");var e=d.length;var g,h,i;for(var j=0;j<e;j++){g=d[j].split("=");h=f.decodeQuery(g.shift(),b);i=g.length?f.decodeQuery(g.join("="),b):null;if(c[h]){if(typeof c[h]==="string"){c[h]=[c[h]]}c[h].push(i)}else{c[h]=i}}return c};f.build=function(a){var b="";if(a.protocol){b+=a.protocol+":"}if(!a.urn&&(b||a.hostname)){b+="//"}b+=f.buildAuthority(a)||"";if(typeof a.path==="string"){if(a.path.charAt(0)!=="/"&&typeof a.hostname==="string"){b+="/"}b+=a.path}if(typeof a.query==="string"&&a.query){b+="?"+a.query}if(typeof a.fragment==="string"&&a.fragment){b+="#"+a.fragment}return b};f.buildHost=function(a){var b="";if(!a.hostname){return""}else if(f.ip6_expression.test(a.hostname)){b+="["+a.hostname+"]"}else{b+=a.hostname}if(a.port){b+=":"+a.port}return b};f.buildAuthority=function(a){return f.buildUserinfo(a)+f.buildHost(a)};f.buildUserinfo=function(a){var b="";if(a.username){b+=f.encode(a.username);if(a.password){b+=":"+f.encode(a.password)}b+="@"}return b};f.buildQuery=function(a,b,c){var d="";var e,g,i,j;for(g in a){if(h.call(a,g)&&g){if(k(a[g])){e={};for(i=0,j=a[g].length;i<j;i++){if(a[g][i]!==undefined&&e[a[g][i]+""]===undefined){d+="&"+f.buildQueryParameter(g,a[g][i],c);if(b!==true){e[a[g][i]+""]=true}}}}else if(a[g]!==undefined){d+="&"+f.buildQueryParameter(g,a[g],c)}}}return d.substring(1)};f.buildQueryParameter=function(a,b,c){return f.encodeQuery(a,c)+(b!==null?"="+f.encodeQuery(b,c):"")};f.addQuery=function(a,b,c){if(typeof b==="object"){for(var d in b){if(h.call(b,d)){f.addQuery(a,d,b[d])}}}else if(typeof b==="string"){if(a[b]===undefined){a[b]=c;return}else if(typeof a[b]==="string"){a[b]=[a[b]]}if(!k(c)){c=[c]}a[b]=a[b].concat(c)}else{throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")}};f.removeQuery=function(a,b,c){var d,e,g;if(k(b)){for(d=0,e=b.length;d<e;d++){a[b[d]]=undefined}}else if(typeof b==="object"){for(g in b){if(h.call(b,g)){f.removeQuery(a,g,b[g])}}}else if(typeof b==="string"){if(c!==undefined){if(a[b]===c){a[b]=undefined}else if(k(a[b])){a[b]=l(a[b],c)}}else{a[b]=undefined}}else{throw new TypeError("URI.addQuery() accepts an object, string as the first parameter")}};f.hasQuery=function(a,b,c,d){if(typeof b==="object"){for(var e in b){if(h.call(b,e)){if(!f.hasQuery(a,e,b[e])){return false}}}return true}else if(typeof b!=="string"){throw new TypeError("URI.hasQuery() accepts an object, string as the name parameter")}switch(j(c)){case"Undefined":return b in a;case"Boolean":var g=Boolean(k(a[b])?a[b].length:a[b]);return c===g;case"Function":return!!c(a[b],b,a);case"Array":if(!k(a[b])){return false}var i=d?m:n;return i(a[b],c);case"RegExp":if(!k(a[b])){return Boolean(a[b]&&a[b].match(c))}if(!d){return false}return m(a[b],c);case"Number":c=String(c);case"String":if(!k(a[b])){return a[b]===c}if(!d){return false}return m(a[b],c);default:throw new TypeError("URI.hasQuery() accepts undefined, boolean, string, number, RegExp, Function as the value parameter")}};f.commonPath=function(a,b){var c=Math.min(a.length,b.length);var d;for(d=0;d<c;d++){if(a.charAt(d)!==b.charAt(d)){d--;break}}if(d<1){return a.charAt(0)===b.charAt(0)&&a.charAt(0)==="/"?"/":""}if(a.charAt(d)!=="/"||b.charAt(d)!=="/"){d=a.substring(0,d).lastIndexOf("/")}return a.substring(0,d+1)};f.withinString=function(a,b,c){c||(c={});var d=c.start||f.findUri.start;var e=c.end||f.findUri.end;var g=c.trim||f.findUri.trim;var h=/[a-z0-9-]=["']?$/i;d.lastIndex=0;while(true){var i=d.exec(a);if(!i){break}var j=i.index;if(c.ignoreHtml){var k=a.slice(Math.max(j-3,0),j);if(k&&h.test(k)){continue}}var l=j+a.slice(j).search(e);var m=a.slice(j,l).replace(g,"");if(c.ignore&&c.ignore.test(m)){continue}l=j+m.length;var n=b(m,j,l,a);a=a.slice(0,j)+n+a.slice(l);d.lastIndex=j+n.length}d.lastIndex=0;return a};f.ensureValidHostname=function(b){if(b.match(f.invalid_hostname_characters)){if(!a){throw new TypeError('Hostname "'+b+'" contains characters other than [A-Z0-9.-] and Punycode.js is not available')}if(a.toASCII(b).match(f.invalid_hostname_characters)){throw new TypeError('Hostname "'+b+'" contains characters other than [A-Z0-9.-]')}}};f.noConflict=function(a){if(a){var b={URI:this.noConflict()};if(d.URITemplate&&typeof d.URITemplate.noConflict==="function"){b.URITemplate=d.URITemplate.noConflict()}if(d.IPv6&&typeof d.IPv6.noConflict==="function"){b.IPv6=d.IPv6.noConflict()}if(d.SecondLevelDomains&&typeof d.SecondLevelDomains.noConflict==="function"){b.SecondLevelDomains=d.SecondLevelDomains.noConflict()}return b}else if(d.URI===this){d.URI=e}return this};g.build=function(a){if(a===true){this._deferred_build=true}else if(a===undefined||this._deferred_build){this._string=f.build(this._parts);this._deferred_build=false}return this};g.clone=function(){return new f(this)};g.valueOf=g.toString=function(){return this.build(false)._string};q={protocol:"protocol",username:"username",password:"password",hostname:"hostname",port:"port"};s=function(a){return function(b,c){if(b===undefined){return this._parts[a]||""}else{this._parts[a]=b||null;this.build(!c);return this}}};for(r in q){g[r]=s(q[r])}q={query:"?",fragment:"#"};s=function(a,b){return function(c,d){if(c===undefined){return this._parts[a]||""}else{if(c!==null){c=c+"";if(c.charAt(0)===b){c=c.substring(1)}}this._parts[a]=c;this.build(!d);return this}}};for(r in q){g[r]=s(r,q[r])}q={search:["?","query"],hash:["#","fragment"]};s=function(a,b){return function(c,d){var e=this[a](c,d);return typeof e==="string"&&e.length?b+e:e}};for(r in q){g[r]=s(q[r][1],q[r][0])}g.pathname=function(a,b){if(a===undefined||a===true){var c=this._parts.path||(this._parts.hostname?"/":"");return a?f.decodePath(c):c}else{this._parts.path=a?f.recodePath(a):"/";this.build(!b);return this}};g.path=g.pathname;g.href=function(a,b){var c;if(a===undefined){return this.toString()}this._string="";this._parts=f._parts();var d=a instanceof f;var e=typeof a==="object"&&(a.hostname||a.path||a.pathname);if(a.nodeName){var g=f.getDomAttribute(a);a=a[g]||"";e=false}if(!d&&e&&a.pathname!==undefined){a=a.toString()}if(typeof a==="string"){this._parts=f.parse(a,this._parts)}else if(d||e){var i=d?a._parts:a;for(c in i){if(h.call(this._parts,c)){this._parts[c]=i[c]}}}else{throw new TypeError("invalid input")}this.build(!b);return this};g.is=function(a){var b=false;var d=false;var e=false;var g=false;var h=false;var i=false;var j=false;var k=!this._parts.urn;if(this._parts.hostname){k=false;d=f.ip4_expression.test(this._parts.hostname);e=f.ip6_expression.test(this._parts.hostname);b=d||e;g=!b;h=g&&c&&c.has(this._parts.hostname);i=g&&f.idn_expression.test(this._parts.hostname);j=g&&f.punycode_expression.test(this._parts.hostname)}switch(a.toLowerCase()){case"relative":return k;case"absolute":return!k;case"domain":case"name":return g;case"sld":return h;case"ip":return b;case"ip4":case"ipv4":case"inet4":return d;case"ip6":case"ipv6":case"inet6":return e;case"idn":return i;case"url":return!this._parts.urn;case"urn":return!!this._parts.urn;case"punycode":return j}return null};var t=g.protocol;var u=g.port;var v=g.hostname;g.protocol=function(a,b){if(a!==undefined){if(a){a=a.replace(/:(\/\/)?$/,"");if(!a.match(f.protocol_expression)){throw new TypeError('Protocol "'+a+"\" contains characters other than [A-Z0-9.+-] or doesn't start with [A-Z]")}}}return t.call(this,a,b)};g.scheme=g.protocol;g.port=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a!==undefined){if(a===0){a=null}if(a){a+="";if(a.charAt(0)===":"){a=a.substring(1)}if(a.match(/[^0-9]/)){throw new TypeError('Port "'+a+'" contains characters other than [0-9]')}}}return u.call(this,a,b)};g.hostname=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a!==undefined){var c={};f.parseHost(a,c);a=c.hostname}return v.call(this,a,b)};g.host=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){return this._parts.hostname?f.buildHost(this._parts):""}else{f.parseHost(a,this._parts);this.build(!b);return this}};g.authority=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){return this._parts.hostname?f.buildAuthority(this._parts):""}else{f.parseAuthority(a,this._parts);this.build(!b);return this}};g.userinfo=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){if(!this._parts.username){return""}var c=f.buildUserinfo(this._parts);return c.substring(0,c.length-1)}else{if(a[a.length-1]!=="@"){a+="@"}f.parseUserinfo(a,this._parts);this.build(!b);return this}};g.resource=function(a,b){var c;if(a===undefined){return this.path()+this.search()+this.hash()}c=f.parse(a);this._parts.path=c.path;this._parts.query=c.query;this._parts.fragment=c.fragment;this.build(!b);return this};g.subdomain=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}var c=this._parts.hostname.length-this.domain().length-1;return this._parts.hostname.substring(0,c)||""}else{var d=this._parts.hostname.length-this.domain().length;var e=this._parts.hostname.substring(0,d);var g=new RegExp("^"+i(e));if(a&&a.charAt(a.length-1)!=="."){a+="."}if(a){f.ensureValidHostname(a)}this._parts.hostname=this._parts.hostname.replace(g,a);this.build(!b);return this}};g.domain=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(typeof a==="boolean"){b=a;a=undefined}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}var c=this._parts.hostname.match(/\./g);if(c&&c.length<2){return this._parts.hostname}var d=this._parts.hostname.length-this.tld(b).length-1;d=this._parts.hostname.lastIndexOf(".",d-1)+1;return this._parts.hostname.substring(d)||""}else{if(!a){throw new TypeError("cannot set domain empty")}f.ensureValidHostname(a);if(!this._parts.hostname||this.is("IP")){this._parts.hostname=a}else{var e=new RegExp(i(this.domain())+"$");this._parts.hostname=this._parts.hostname.replace(e,a)}this.build(!b);return this}};g.tld=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(typeof a==="boolean"){b=a;a=undefined}if(a===undefined){if(!this._parts.hostname||this.is("IP")){return""}var d=this._parts.hostname.lastIndexOf(".");var e=this._parts.hostname.substring(d+1);if(b!==true&&c&&c.list[e.toLowerCase()]){return c.get(this._parts.hostname)||e}return e}else{var f;if(!a){throw new TypeError("cannot set TLD empty")}else if(a.match(/[^a-zA-Z0-9-]/)){if(c&&c.is(a)){f=new RegExp(i(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(f,a)}else{throw new TypeError('TLD "'+a+'" contains characters other than [A-Z0-9]')}}else if(!this._parts.hostname||this.is("IP")){throw new ReferenceError("cannot set TLD on non-domain host")}else{f=new RegExp(i(this.tld())+"$");this._parts.hostname=this._parts.hostname.replace(f,a)}this.build(!b);return this}};g.directory=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined||a===true){if(!this._parts.path&&!this._parts.hostname){return""}if(this._parts.path==="/"){return"/"}var c=this._parts.path.length-this.filename().length-1;var d=this._parts.path.substring(0,c)||(this._parts.hostname?"/":"");return a?f.decodePath(d):d}else{var e=this._parts.path.length-this.filename().length;var g=this._parts.path.substring(0,e);var h=new RegExp("^"+i(g));if(!this.is("relative")){if(!a){a="/"}if(a.charAt(0)!=="/"){a="/"+a}}if(a&&a.charAt(a.length-1)!=="/"){a+="/"}a=f.recodePath(a);this._parts.path=this._parts.path.replace(h,a);this.build(!b);return this}};g.filename=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined||a===true){if(!this._parts.path||this._parts.path==="/"){return""}var c=this._parts.path.lastIndexOf("/");var d=this._parts.path.substring(c+1);return a?f.decodePathSegment(d):d}else{var e=false;if(a.charAt(0)==="/"){a=a.substring(1)}if(a.match(/\.?\//)){e=true}var g=new RegExp(i(this.filename())+"$");a=f.recodePath(a);this._parts.path=this._parts.path.replace(g,a);if(e){this.normalizePath(b)}else{this.build(!b)}return this}};g.suffix=function(a,b){if(this._parts.urn){return a===undefined?"":this}if(a===undefined||a===true){if(!this._parts.path||this._parts.path==="/"){return""}var c=this.filename();var d=c.lastIndexOf(".");var e,g;if(d===-1){return""}e=c.substring(d+1);g=/^[a-z0-9%]+$/i.test(e)?e:"";return a?f.decodePathSegment(g):g}else{if(a.charAt(0)==="."){a=a.substring(1)}var h=this.suffix();var j;if(!h){if(!a){return this}this._parts.path+="."+f.recodePath(a)}else if(!a){j=new RegExp(i("."+h)+"$")}else{j=new RegExp(i(h)+"$")}if(j){a=f.recodePath(a);this._parts.path=this._parts.path.replace(j,a)}this.build(!b);return this}};g.segment=function(a,b,c){var d=this._parts.urn?":":"/";var e=this.path();var f=e.substring(0,1)==="/";var g=e.split(d);if(a!==undefined&&typeof a!=="number"){c=b;b=a;a=undefined}if(a!==undefined&&typeof a!=="number"){throw new Error('Bad segment "'+a+'", must be 0-based integer')}if(f){g.shift()}if(a<0){a=Math.max(g.length+a,0)}if(b===undefined){return a===undefined?g:g[a]}else if(a===null||g[a]===undefined){if(k(b)){g=[];for(var h=0,i=b.length;h<i;h++){if(!b[h].length&&(!g.length||!g[g.length-1].length)){continue}if(g.length&&!g[g.length-1].length){g.pop()}g.push(b[h])}}else if(b||typeof b==="string"){if(g[g.length-1]===""){g[g.length-1]=b}else{g.push(b)}}}else{if(b||typeof b==="string"&&b.length){g[a]=b}else{g.splice(a,1)}}if(f){g.unshift("")}return this.path(g.join(d),c)};g.segmentCoded=function(a,b,c){var d,e,g;if(typeof a!=="number"){c=b;b=a;a=undefined}if(b===undefined){d=this.segment(a,b,c);if(!k(d)){d=d!==undefined?f.decode(d):undefined}else{for(e=0,g=d.length;e<g;e++){d[e]=f.decode(d[e])}}return d}if(!k(b)){b=typeof b==="string"?f.encode(b):b}else{for(e=0,g=b.length;e<g;e++){b[e]=f.decode(b[e])}}return this.segment(a,b,c)};var w=g.query;g.query=function(a,b){if(a===true){return f.parseQuery(this._parts.query,this._parts.escapeQuerySpace)}else if(typeof a==="function"){var c=f.parseQuery(this._parts.query,this._parts.escapeQuerySpace);var d=a.call(this,c);this._parts.query=f.buildQuery(d||c,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!b);return this}else if(a!==undefined&&typeof a!=="string"){this._parts.query=f.buildQuery(a,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);this.build(!b);return this}else{return w.call(this,a,b)}};g.setQuery=function(a,b,c){var d=f.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof a==="object"){for(var e in a){if(h.call(a,e)){d[e]=a[e]}}}else if(typeof a==="string"){d[a]=b!==undefined?b:null}else{throw new TypeError("URI.addQuery() accepts an object, string as the name parameter")}this._parts.query=f.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);if(typeof a!=="string"){c=b}this.build(!c);return this};g.addQuery=function(a,b,c){var d=f.parseQuery(this._parts.query,this._parts.escapeQuerySpace);f.addQuery(d,a,b===undefined?null:b);this._parts.query=f.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);if(typeof a!=="string"){c=b}this.build(!c);return this};g.removeQuery=function(a,b,c){var d=f.parseQuery(this._parts.query,this._parts.escapeQuerySpace);f.removeQuery(d,a,b);this._parts.query=f.buildQuery(d,this._parts.duplicateQueryParameters,this._parts.escapeQuerySpace);if(typeof a!=="string"){c=b}this.build(!c);return this};g.hasQuery=function(a,b,c){var d=f.parseQuery(this._parts.query,this._parts.escapeQuerySpace);return f.hasQuery(d,a,b,c)};g.setSearch=g.setQuery;g.addSearch=g.addQuery;g.removeSearch=g.removeQuery;g.hasSearch=g.hasQuery;g.normalize=function(){if(this._parts.urn){return this.normalizeProtocol(false).normalizeQuery(false).normalizeFragment(false).build()}return this.normalizeProtocol(false).normalizeHostname(false).normalizePort(false).normalizePath(false).normalizeQuery(false).normalizeFragment(false).build()};g.normalizeProtocol=function(a){if(typeof this._parts.protocol==="string"){this._parts.protocol=this._parts.protocol.toLowerCase();this.build(!a)}return this};g.normalizeHostname=function(c){if(this._parts.hostname){if(this.is("IDN")&&a){this._parts.hostname=a.toASCII(this._parts.hostname)}else if(this.is("IPv6")&&b){this._parts.hostname=b.best(this._parts.hostname)}this._parts.hostname=this._parts.hostname.toLowerCase();this.build(!c)}return this};g.normalizePort=function(a){if(typeof this._parts.protocol==="string"&&this._parts.port===f.defaultPorts[this._parts.protocol]){this._parts.port=null;this.build(!a)}return this};g.normalizePath=function(a){if(this._parts.urn){return this}if(!this._parts.path||this._parts.path==="/"){return this}var b;var c=this._parts.path;var d="";var e,g;if(c.charAt(0)!=="/"){b=true;c="/"+c}c=c.replace(/(\/(\.\/)+)|(\/\.$)/g,"/").replace(/\/{2,}/g,"/");if(b){d=c.substring(1).match(/^(\.\.\/)+/)||"";if(d){d=d[0]}}while(true){e=c.indexOf("/..");if(e===-1){break}else if(e===0){c=c.substring(3);continue}g=c.substring(0,e).lastIndexOf("/");if(g===-1){g=e}c=c.substring(0,g)+c.substring(e+3)}if(b&&this.is("relative")){c=d+c.substring(1)}c=f.recodePath(c);this._parts.path=c;this.build(!a);return this};g.normalizePathname=g.normalizePath;g.normalizeQuery=function(a){if(typeof this._parts.query==="string"){if(!this._parts.query.length){this._parts.query=null}else{this.query(f.parseQuery(this._parts.query,this._parts.escapeQuerySpace))}this.build(!a)}return this};g.normalizeFragment=function(a){if(!this._parts.fragment){this._parts.fragment=null;this.build(!a)}return this};g.normalizeSearch=g.normalizeQuery;g.normalizeHash=g.normalizeFragment;g.iso8859=function(){var a=f.encode;var b=f.decode;f.encode=escape;f.decode=decodeURIComponent;this.normalize();f.encode=a;f.decode=b;return this};g.unicode=function(){var a=f.encode;var b=f.decode;f.encode=p;f.decode=unescape;this.normalize();f.encode=a;f.decode=b;return this};g.readable=function(){var b=this.clone();b.username("").password("").normalize();var c="";if(b._parts.protocol){c+=b._parts.protocol+"://"}if(b._parts.hostname){if(b.is("punycode")&&a){c+=a.toUnicode(b._parts.hostname);if(b._parts.port){c+=":"+b._parts.port}}else{c+=b.host()}}if(b._parts.hostname&&b._parts.path&&b._parts.path.charAt(0)!=="/"){c+="/"}c+=b.path(true);if(b._parts.query){var d="";for(var e=0,g=b._parts.query.split("&"),h=g.length;e<h;e++){var i=(g[e]||"").split("=");d+="&"+f.decodeQuery(i[0],this._parts.escapeQuerySpace).replace(/&/g,"%26");if(i[1]!==undefined){d+="="+f.decodeQuery(i[1],this._parts.escapeQuerySpace).replace(/&/g,"%26")}}c+="?"+d.substring(1)}c+=f.decodeQuery(b.hash(),true);return c};g.absoluteTo=function(a){var b=this.clone();var c=["protocol","username","password","hostname","port"];var d,e,g;if(this._parts.urn){throw new Error("URNs do not have any generally defined hierarchical components")}if(!(a instanceof f)){a=new f(a)}if(!b._parts.protocol){b._parts.protocol=a._parts.protocol}if(this._parts.hostname){return b}for(e=0;g=c[e];e++){b._parts[g]=a._parts[g]}if(!b._parts.path){b._parts.path=a._parts.path;if(!b._parts.query){b._parts.query=a._parts.query}}else if(b._parts.path.substring(-2)===".."){b._parts.path+="/"}if(b.path().charAt(0)!=="/"){d=a.directory();b._parts.path=(d?d+"/":"")+b._parts.path;b.normalizePath()}b.build();return b};g.relativeTo=function(a){var b=this.clone().normalize();var c,d,e,g,h;if(b._parts.urn){throw new Error("URNs do not have any generally defined hierarchical components")}a=new f(a).normalize();c=b._parts;d=a._parts;g=b.path();h=a.path();if(g.charAt(0)!=="/"){throw new Error("URI is already relative")}if(h.charAt(0)!=="/"){throw new Error("Cannot calculate a URI relative to another relative URI")}if(c.protocol===d.protocol){c.protocol=null}if(c.username!==d.username||c.password!==d.password){return b.build()}if(c.protocol!==null||c.username!==null||c.password!==null){return b.build()}if(c.hostname===d.hostname&&c.port===d.port){c.hostname=null;c.port=null}else{return b.build()}if(g===h){c.path="";return b.build()}e=f.commonPath(b.path(),a.path());if(!e){return b.build()}var i=d.path.substring(e.length).replace(/[^\/]*$/,"").replace(/.*?\//g,"../");c.path=i+c.path.substring(e.length);return b.build()};g.equals=function(a){var b=this.clone();var c=new f(a);var d={};var e={};var g={};var i,j,l;b.normalize();c.normalize();if(b.toString()===c.toString()){return true}i=b.query();j=c.query();b.query("");c.query("");if(b.toString()!==c.toString()){return false}if(i.length!==j.length){return false}d=f.parseQuery(i,this._parts.escapeQuerySpace);e=f.parseQuery(j,this._parts.escapeQuerySpace);for(l in d){if(h.call(d,l)){if(!k(d[l])){if(d[l]!==e[l]){return false}}else if(!n(d[l],e[l])){return false}g[l]=true}}for(l in e){if(h.call(e,l)){if(!g[l]){return false}}}return true};g.duplicateQueryParameters=function(a){this._parts.duplicateQueryParameters=!!a;return this};g.escapeQuerySpace=function(a){this._parts.escapeQuerySpace=!!a;return this};return f});$(function(){var a=io();var b=["/close","/connect","/deop","/devoice","/disconnect","/invite","/join","/kick","/leave","/mode","/msg","/nick","/notice","/op","/part","/query","/quit","/raw","/say","/send","/server","/slap","/topic","/voice","/whois"];var c=$("#sidebar");var d=$("#chat");var e=new Audio;e.src="/audio/pop.ogg";$("#play").on("click",function(){e.play()});$("#footer .icon").tooltip();var f=new Favico({animation:"none"});function g(a,b){return Handlebars.templates[a](b)}Handlebars.registerHelper("partial",function(a){return new Handlebars.SafeString(g(a,this))});a.on("error",function(a){console.log(a)});a.on("auth",function(a){var b=$("body");var d=$("#sign-in");if(b.hasClass("signed-out")){var e=d.find(".error");e.show().closest("form").one("submit",function(){e.hide()})}b.addClass("signed-out");d.find("input[name='user']").val($.cookie("user")||"");c.find(".sign-in").click().end().find(".networks").html("").next().show()});a.on("init",function(a){if(a.networks.length===0){$("#footer").find(".connect").trigger("click");return}c.find(".networks").html(g("network",{networks:a.networks}));var b=$.map(a.networks,function(a){return a.channels});d.html(g("chat",{channels:b}));c.find(".empty").hide();$("body").removeClass("signed-out");var e=$.cookie("target");var f=c.find("[data-target='"+e+"']").trigger("click");if(f.length===0){var h=c.find(".chan").eq(0).trigger("click");if(h.length===0){$("#footer").find(".connect").trigger("click")}}});a.on("join",function(a){var b=a.network;var e=c.find("#network-"+b);e.append(g("chan",{channels:[a.chan]}));d.append(g("chat",{channels:[a.chan]}));c.find(".chan").sort(function(a,b){return $(a).data("id")-$(b).data("id")}).last().trigger("click")});a.on("msg",function(a){var b=a.chan;if(a.msg.type=="error"){b=d.find(".active").data("id")}b="#chan-"+b;d.find(b).find(".messages").append(g("msg",{messages:[a.msg]})).trigger("msg",[b,a.msg])});a.on("showMore",function(a){var b=a.chan;d.find("#chan-"+b).find(".show-more").remove().end().find(".messages").prepend(g("msg",{messages:a.messages})).end()});a.on("network",function(a){c.find(".empty").hide();c.find(".networks").append(g("network",{networks:[a.network]}));d.append(g("chat",{channels:a.network.channels}));c.find(".chan").last().trigger("click");$("#connect").find(".btn").prop("disabled",false).end().find("input").each(function(){var a=$(this);a.val(a.data("default"))})});a.on("nick",function(a){console.log(a)});a.on("part",function(a){var b=a.chan;c.find("[data-target=#chan-"+b+"]").remove().end().find(".chan").eq(0).trigger("click")});a.on("quit",function(a){var b=a.network;c.find("#network-"+b).remove().end();var d=c.find(".chan").eq(0).trigger("click");if(d.length===0){c.find(".empty").show()}});a.on("users",function(a){d.find("#chan-"+a.chan).find(".users").html(g("user",a))});$("#connect").find("input").each(function(){var a=$(this);a.data("default",a.val())});$.cookie.json=true;var h=$("#settings");var i=$.extend({notification:true},$.cookie("settings"));for(var j in i){if(i[j]){h.find("input[name="+j+"]").prop("checked",true)}}h.on("change","input",function(){var a=$(this);i[a.attr("name")]=a.prop("checked");$.cookie("settings",i)}).find("input").eq(0).trigger("change");var k=$("#viewport");k.on("click",".lt, .rt",function(a){var b=$(this);k.toggleClass(b.attr("class"));if(k.is(".lt, .rt")){a.stopPropagation();d.find(".chat").one("click",function(){k.removeClass("lt rt")})}});var l=$("#input").history().tab(q,{hint:false});var m=$("#form").on("submit",function(b){b.preventDefault();var c=l.val();l.val("");a.emit("input",{target:d.data("id"),text:c})});var n=1;c.on("click","button",function(){var a=$(this);var b=a.data("target");if(!b){return}if(a.hasClass("chan")){$.cookie("target",b)}d.data("id",a.data("id"));c.find(".active").removeClass("active");a.addClass("active").find(".badge").removeClass("highlight").empty();if(c.find(".highlight").length==0){f.badge("")}k.removeClass();$("#windows .active").removeClass("active");var e=$(b).addClass("active").trigger("show").css("z-index",n++).find(".chat").sticky().end();if(screen.width>768&&e.hasClass("chan")){l.focus()}});c.on("click","#sign-out",function(){location.reload()});c.on("click",".close",function(){var b="/close";var c=$(this).closest(".chan");if(c.hasClass("lobby")){b="/quit";var d=c.clone().remove("span").text().trim();if(!confirm("Disconnect from "+d+"?")){return false}}a.emit("input",{target:c.data("id"),text:b});c.css({transition:"none",opacity:.4});return false});d.on("input",".search",function(){var a=$(this).val();var b=$(this).closest(".users").find(".names");b.find("button").each(function(){var b=$(this);var c=b.text().toLowerCase().replace(/[+%@~]/,"");if(c.indexOf(a)===0){b.show()}else{b.hide()}})});d.on("click",".user",function(){var b=$(this).html().trim().replace(/[+%@~]/,"");if(b.indexOf("#")!==-1){return}var c="/whois "+b;a.emit("input",{target:d.data("id"),text:c})});d.on("msg",".messages",function(a,b,d){var g=c.find(".chan[data-target="+b+"]:not(.active)");var h=g.hasClass("query");var i=d.type;var j=i.contains("highlight");if(j||h){e.play();if(document.hidden||!$(b).hasClass("active")){f.badge("!")}}if(g.length===0){return}var k=["join","part","quit","nick"];if($.inArray(i,k)!==-1){return}var l=g.find(".badge");if(l.length!==0){var m=(parseInt(l.html())||0)+1;l.html(m);if(j||h){l.addClass("highlight")}}});d.on("click",".show-more",function(){var b=$(this);var c=b.data("id");var d=b.next(".messages").children().length;a.emit("showMore",{target:c,count:d})});var o=$("#windows");var p=$("#sign-in, #connect");o.on("show","#sign-in",function(){var a=$(this);var b=a.find("input");b.each(function(){var a=$(this);if(a.val()===""){a.focus();return false}})});o.on("click",".input",function(){$(this).select()});p.on("submit","form",function(b){b.preventDefault();var c="auth";var d=$(this);if(d.closest(".window").attr("id")=="connect"){c="conn";d.find(".btn").attr("disabled",true).end()}var e={};$.each(d.serializeArray(),function(a,b){if(b.value!==""){e[b.name]=b.value}});if(e.user){$.cookie("user",e.user)}a.emit(c,e)});Mousetrap.bind(["command+up","command+down","ctrl+up","ctrl+down"],function(a,b){var d=c.find(".chan");var e=d.index(d.filter(".active"));var f=b.split("+").pop();switch(f){case"up":var g=Math.max(0,e-1);d.eq(g).click();break;case"down":var g=Math.min(d.length,e+1);d.eq(g).click();break}});function q(a){var e=b.slice();var f=d.find(".active").find(".names").children().each(function(){e.push($(this).text().replace(/[+%@~]/,""))});var g=c.find(".channel").each(function(){var a=$(this).clone().remove("span").text().trim();e.push(a)});return $.grep(e,function(b){return!b.toLowerCase().indexOf(a.toLowerCase())})}document.addEventListener("visibilitychange",function(){if(c.find(".highlight").length==0){f.badge("")}})});(function(){var a=Handlebars.template,b=Handlebars.templates=Handlebars.templates||{};b["chan"]=a({1:function(a,b,c,d){var e,f="function",g=this.escapeExpression;return'\n<button data-id="'+g((e=b.id||a&&a.id,typeof e===f?e.call(a,{name:"id",hash:{},data:d}):e))+'" data-target="#chan-'+g((e=b.id||a&&a.id,typeof e===f?e.call(a,{name:"id",hash:{},data:d}):e))+'" data-title="'+g((e=b.name||a&&a.name,typeof e===f?e.call(a,{name:"name",hash:{},data:d}):e))+'" class="chan '+g((e=b.type||a&&a.type,typeof e===f?e.call(a,{name:"type",hash:{},data:d}):e))+'">\n <span class="badge"></span>\n <span class="close"></span>\n '+g((e=b.name||a&&a.name,typeof e===f?e.call(a,{name:"name",hash:{},data:d}):e))+"\n</button>\n"},compiler:[5,">= 2.0.0"],main:function(a,b,c,d){var e,f="";
e=b.each.call(a,a&&a.channels,{name:"each",hash:{},fn:this.program(1,d),inverse:this.noop,data:d});if(e||e===0){f+=e}return f+"\n"},useData:true});b["chat"]=a({1:function(a,b,c,d){var e,f,g="function",h=this.escapeExpression,i=b.helperMissing,j='\n<div id="chan-'+h((f=b.id||a&&a.id,typeof f===g?f.call(a,{name:"id",hash:{},data:d}):f))+'" data-id="'+h((f=b.id||a&&a.id,typeof f===g?f.call(a,{name:"id",hash:{},data:d}):f))+'" data-type="'+h((f=b.type||a&&a.type,typeof f===g?f.call(a,{name:"type",hash:{},data:d}):f))+'" class="chan '+h((f=b.type||a&&a.type,typeof f===g?f.call(a,{name:"type",hash:{},data:d}):f))+'">\n <div class="header">\n <button class="lt"></button>\n <button class="rt"></button>\n <span class="title">'+h((f=b.name||a&&a.name,typeof f===g?f.call(a,{name:"name",hash:{},data:d}):f))+'</span>\n <span class="topic">'+h((f=b.type||a&&a.type,typeof f===g?f.call(a,{name:"type",hash:{},data:d}):f))+' </span>\n </div>\n <div class="chat">\n ';e=(f=b.equal||a&&a.equal||i,f.call(a,100,(e=a&&a.messages,e==null||e===false?e:e.length),{name:"equal",hash:{},fn:this.program(2,d),inverse:this.noop,data:d}));if(e||e===0){j+=e}return j+'\n <div class="messages">\n '+h((f=b.partial||a&&a.partial||i,f.call(a,"msg",{name:"partial",hash:{},data:d})))+'\n </div>\n </div>\n <aside class="sidebar">\n <div class="users">\n '+h((f=b.partial||a&&a.partial||i,f.call(a,"user",{name:"partial",hash:{},data:d})))+"\n </div>\n </aside>\n</div>\n"},2:function(a,b,c,d){var e,f="function",g=this.escapeExpression;return'\n <button class="show-more" data-id="'+g((e=b.id||a&&a.id,typeof e===f?e.call(a,{name:"id",hash:{},data:d}):e))+'">\n Show more\n </button>\n '},compiler:[5,">= 2.0.0"],main:function(a,b,c,d){var e,f="";e=b.each.call(a,a&&a.channels,{name:"each",hash:{},fn:this.program(1,d),inverse:this.noop,data:d});if(e||e===0){f+=e}return f+"\n"},useData:true});b["msg"]=a({1:function(a,b,c,d){var e,f,g="function",h=this.escapeExpression,i=b.helperMissing,j='\n<div class="msg '+h((f=b.type||a&&a.type,typeof f===g?f.call(a,{name:"type",hash:{},data:d}):f))+'">\n <span class="time">\n '+h((f=b.tz||a&&a.tz||i,f.call(a,a&&a.time,{name:"tz",hash:{},data:d})))+'\n </span>\n <span class="from">\n ';e=b["if"].call(a,a&&a.from,{name:"if",hash:{},fn:this.program(2,d),inverse:this.noop,data:d});if(e||e===0){j+=e}j+='\n </span>\n <span class="text">\n <em class="type">'+h((f=b.type||a&&a.type,typeof f===g?f.call(a,{name:"type",hash:{},data:d}):f))+"</em>\n ";e=(f=b.equal||a&&a.equal||i,f.call(a,a&&a.type,"image",{name:"equal",hash:{},fn:this.program(4,d),inverse:this.program(6,d),data:d}));if(e||e===0){j+=e}return j+"\n </span>\n</div>\n"},2:function(a,b,c,d){var e,f="function",g=this.escapeExpression;return'\n <button class="user">'+g((e=b.from||a&&a.from,typeof e===f?e.call(a,{name:"from",hash:{},data:d}):e))+"</button>\n "},4:function(a,b,c,d){var e,f="function",g=this.escapeExpression;return'\n <img src="'+g((e=b.text||a&&a.text,typeof e===f?e.call(a,{name:"text",hash:{},data:d}):e))+'" class="image">\n '},6:function(a,b,c,d){var e,f,g=b.helperMissing,h="\n ";e=(f=b.uri||a&&a.uri||g,f.call(a,a&&a.text,{name:"uri",hash:{},data:d}));if(e||e===0){h+=e}return h+"\n "},compiler:[5,">= 2.0.0"],main:function(a,b,c,d){var e,f="";e=b.each.call(a,a&&a.messages,{name:"each",hash:{},fn:this.program(1,d),inverse:this.noop,data:d});if(e||e===0){f+=e}return f+"\n"},useData:true});b["network"]=a({1:function(a,b,c,d){var e,f="function",g=this.escapeExpression,h=b.helperMissing;return'\n<section id="network-'+g((e=b.id||a&&a.id,typeof e===f?e.call(a,{name:"id",hash:{},data:d}):e))+'" class="network">\n '+g((e=b.partial||a&&a.partial||h,e.call(a,"chan",{name:"partial",hash:{},data:d})))+"\n</section>\n"},compiler:[5,">= 2.0.0"],main:function(a,b,c,d){var e,f="";e=b.each.call(a,a&&a.networks,{name:"each",hash:{},fn:this.program(1,d),inverse:this.noop,data:d});if(e||e===0){f+=e}return f+"\n"},useData:true});b["user"]=a({1:function(a,b,c,d){var e,f="function",g=this.escapeExpression;return'\n<div class="count">\n <input class="search" placeholder="'+g((e=(e=a&&a.users,e==null||e===false?e:e.length),typeof e===f?e.apply(a):e))+' users">\n</div>\n'},3:function(a,b,c,d){var e,f="function",g=this.escapeExpression;return'\n <button class="user">'+g((e=b.mode||a&&a.mode,typeof e===f?e.call(a,{name:"mode",hash:{},data:d}):e))+g((e=b.name||a&&a.name,typeof e===f?e.call(a,{name:"name",hash:{},data:d}):e))+"</button>\n "},compiler:[5,">= 2.0.0"],main:function(a,b,c,d){var e,f="";e=b["if"].call(a,(e=a&&a.users,e==null||e===false?e:e.length),{name:"if",hash:{},fn:this.program(1,d),inverse:this.noop,data:d});if(e||e===0){f+=e}f+='\n<div class="names">\n ';e=b.each.call(a,a&&a.users,{name:"each",hash:{},fn:this.program(3,d),inverse:this.noop,data:d});if(e||e===0){f+=e}return f+"\n</div>\n"},useData:true})})();