Shuo/client/js/libs.min.js

11 lines
316 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,p,q;o={};o.ff=typeof InstallTrigger!="undefined";o.chrome=!!window.chrome;o.opera=!!window.opera||navigator.userAgent.indexOf("Opera")>=0;o.ie=false;o.safari=Object.prototype.toString.call(window.HTMLElement).indexOf("Constructor")>0;o.supported=o.chrome||o.ff||o.opera;var r=[];m=function(){};j=n=false;var s=function(){c=D(b,a);c.bgColor=C(c.bgColor);c.textColor=C(c.textColor);c.position=c.position.toLowerCase();c.animation=F.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<F.types[""+c.animation].length;l++){var m=F.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)}}F.types[""+c.animation][l]=m}}c.type=u[""+c.type]?c.type:b.type;try{d=B.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");t.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");t.ready()}}catch(n){throw"Error initializing favico. Message: "+n.message}};var t={};t.ready=function(){j=true;t.reset();m()};t.reset=function(){if(!j){return}r=[];k=false;h.clearRect(0,0,f,e);h.drawImage(i,0,0,f,e);B.setIcon(g);window.clearTimeout(p);window.clearTimeout(q)};t.start=function(){if(!j||l){return}var a=function(){k=r[0];l=false;if(r.length>0){r.shift();t.start()}else{}};if(r.length>0){l=true;var b=function(){["type","animation","bgColor","textColor","fontFamily","fontStyle"].forEach(function(a){if(a in r[0].options){c[a]=r[0].options[a]}});F.run(r[0].options,function(){a()},false)};if(k){F.run(k.options,function(){b()},true)}else{b()}}};var u={};var v=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};u.circle=function(a){a=v(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()};u.rectangle=function(a){a=v(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?.9:1))+"px "+c.fontFamily;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.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()};var w=function(a,b){b=(typeof b==="string"?{animation:b}:b)||{};m=function(){try{if(typeof a==="number"?a>0:a!==""){var c={type:"badge",options:{n:a}};if("animation"in b&&F.types[""+b.animation]){c.options.animation=""+b.animation}if("type"in b&&u[""+b.type]){c.options.type=""+b.type}["bgColor","textColor"].forEach(function(a){if(a in b){c.options[a]=C(b[a])}});["fontStyle","fontFamily"].forEach(function(a){if(a in b){c.options[a]=b[a]}});r.push(c);if(r.length>100){throw"Too many badges requests in queue."}t.start()}else{t.reset()}}catch(d){throw"Error setting badge. Message: "+d.message}};if(j){m()}};var x=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);B.setIcon(g)}catch(j){throw"Error setting image. Message: "+j.message}};if(j){m()}};var y=function(a){m=function(){try{if(a==="stop"){n=true;t.reset();n=false;return}a.addEventListener("play",function(){A(this)},false)}catch(b){throw"Error setting video. Message: "+b.message}};if(j){m()}};var z=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;t.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();A(b)},function(){})}catch(c){throw"Error setting webcam. Message: "+c.message}};if(j){m()}}};function A(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){}q=setTimeout(A,F.duration,a);B.setIcon(g)}var B={};B.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(/(^|\s)icon(\s|$)/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.substr(0,5)!=="data:"&&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};B.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 C(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 D(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 E(){return document.hidden||document.msHidden||document.webkitHidden||document.mozHidden}var F={};F.duration=40;F.types={};F.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}];F.types.none=[{x:.4,y:.4,w:.6,h:.6,o:1}];F.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}];F.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}];F.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}];F.run=function(a,b,d,e){var f=F.types[E()?"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){u[c.type](D(a,f[e]));p=setTimeout(function(){if(d){e=e-1}else{e=e+1}F.run(a,b,d,e)},F.duration);B.setIcon(g)}else{b();return}};s();return{badge:w,video:y,image:x,webcam:z,reset:t.reset,browser:{supported:o.supported}}};if(typeof define!=="undefined"&&define.amd){define([],function(){return a})}else if(typeof module!=="undefined"&&module.exports){module.exports=a}else{this.Favico=a}})();(function(a,b){if(typeof define==="function"&&define.amd){define([],b)}else if(typeof exports==="object"){module.exports=b()}else{a.Handlebars=a.Handlebars||b()}})(this,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]}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==null){return""}else if(!a){return a+""}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";c.VERSION=f;var g=6;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-alpha.x",6:">= 2.0.0-beta.1"};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){if(k.call(a)===l){if(b){throw new e("Arg not supported with multiple helpers")}d.extend(this.helpers,a)}else{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,f=c.fn;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){throw new e("Must pass iterator to #each")}var c=b.fn,f=b.inverse;var g=0,h="",k;var l;if(b.data&&b.ids){l=d.appendContextPath(b.data.contextPath,b.ids[0])+"."}if(j(a)){a=a.call(this)}if(b.data){k=q(b.data)}if(a&&typeof a==="object"){if(i(a)){for(var m=a.length;g<m;g++){if(k){k.index=g;k.first=g===0;k.last=g===a.length-1;if(l){k.contextPath=l+g}}h=h+c(a[g],{data:k})}}else{for(var n in a){if(a.hasOwnProperty(n)){if(k){k.key=n;k.index=g;k.first=g===0;if(l){k.contextPath=l+n}}h=h+c(a[n],{data:k});g++}}}}if(g===0){h=f(this)}return h});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)}else{return b.inverse(this)}});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){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;var p=o.log;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")}if(!a||!a.main){throw new f("Unknown template object: "+typeof a)}b.VM.checkRevision(a.compiler);var c=function(c,d,g,h,i,j,k,l,m){if(i){h=e.extend({},h,i)}var n=b.VM.invokePartial.call(this,c,g,h,j,k,l,m);if(n==null&&b.compile){var o={helpers:j,partials:k,data:l,depths:m};k[g]=b.compile(c,{data:l!==undefined,compat:a.compat},b);n=k[g](h,o)}if(n!=null){if(d){var p=n.split("\n");for(var q=0,r=p.length;q<r;q++){if(!p[q]&&q+1===r){break}p[q]=d+p[q]}n=p.join("\n")}return n}else{throw new f("The partial "+g+" could not be compiled when running in runtime-only mode")}};var d={lookup:function(a,b){var c=a.length;for(var d=0;d<c;d++){if(a[d]&&a[d][b]!=null){return a[d][b]}}},lambda:function(a,b){return typeof a==="function"?a.call(b):a},escapeExpression:e.escapeExpression,invokePartial:c,fn:function(b){return a[b]},programs:[],program:function(a,b,c){var d=this.programs[a],e=this.fn(a);if(b||c){d=l(this,a,e,b,c)}else if(!d){d=this.programs[a]=l(this,a,e)}return d},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=c.data;g._setup(c);if(!c.partial&&a.useData){e=o(b,e)}var f;if(a.useDepths){f=c.depths?[b].concat(c.depths):[b]}return a.main.call(d,b,d.helpers,d.partials,e,f)};g.isTop=true;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(b,c,e){if(a.useDepths&&!e){throw new f("must pass parent depths")}return l(d,b,a[b],c,e)};return g}d.template=k;function l(a,b,c,d,e){var f=function(b,f){f=f||{};return c.call(a,b,a.helpers,a.partials,f.data||d,e&&[b].concat(e))};f.program=b;f.depth=e?e.length:0;return f}d.program=l;function m(a,b,c,d,e,g,h){var i={partial:true,helpers:d,partials:e,data:g,depths:h};if(a===undefined){throw new f("The partial "+b+" could not be found")}else if(a instanceof Function){return a(c,i)}}d.invokePartial=m;function n(){return""}d.noop=n;function o(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.escapeExpression=j.escapeExpression;a.VM=k;a.template=function(b){return k.template(b,a)};return a};var m=l();m.create=l;m["default"]=m;f=m;return f}(d,a,c,b,e);return f});var diff;Handlebars.registerHelper("diff",function(a,b){if(a!=diff){diff=a;return b.fn(this)}else{return b.inverse(this)}});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("modes",function(a){var b={"~":"owner","&":"admin","@":"op","%":"half-op","+":"voice","":"normal"};return b[a]});Handlebars.registerHelper("parse",function(a){var b=wraplong(a);a=escape(a);a=colors(a);a=uri(a);if(b){return"<i class='wrap'>"+a+"</i>"}else{return a}});function wraplong(a){var b=false;var c=a.split(" ");for(var d in c){if(c[d].length>40){b=true}}return b}function escape(a){var b={"<":"&lt;",">":"&gt;","'":"&#39;"};return a.replace(/[<>']/g,function(a){return b[a]})}function uri(a){return URI.withinString(a,function(a,b,c,d){if(a.indexOf("javascript:")===0){return a}var e=a.split("<");a="<a href='"+e[0].replace(/^www/,"//www")+"' target='_blank'>"+e[0]+"</a>";if(e.length>1){a+="<"+e.slice(1).join("<")}return a})}var regex={color:/\003([0-9]{1,2})[,]?([0-9]{1,2})?([^\003]+)/,terminator:/\x0D/,styles:[[/\002([^\002]+)(\002)?/,["<b>","</b>"]],[/\037([^\037]+)(\037)?/,["<u>","</u>"]]]};function colors(a){if(!a){return a}if(regex.terminator.test(a)){return $.map(a.split(regex.terminator),colors)}if(regex.color.test(a)){var b,c;while(b=regex.color.exec(a)){var d="color-"+b[1];if(b[2]){c=b[2]}if(c){d+=" bg-"+c}var a=a.replace(b[0],"<span class='"+d+"'>"+b[3]+"</span>")}}for(var e in regex.styles){var f=regex.styles[e][0];var g=regex.styles[e][1];if(f.test(a)){var b;while(b=f.exec(a)){a=a.replace(b[0],g[0]+b[1]+g[1])}}}return a}Handlebars.registerHelper("stringcolor",function(a){return stringcolor(a)});Handlebars.registerHelper("tz",function(a){if(a){var b=moment.utc(a,"HH:mm:ss").toDate();return moment(b).format("HH:mm")}else{return""}});Handlebars.registerHelper("users",function(a){return a+" "+(a==1?"user":"users")});(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){if(typeof define==="function"&&define.amd){define(["jquery"],a)}else{a(jQuery)}})(function(a){a.ui=a.ui||{};a.extend(a.ui,{version:"1.11.1",keyCode:{BACKSPACE:8,COMMA:188,DELETE:46,DOWN:40,END:35,ENTER:13,ESCAPE:27,HOME:36,LEFT:37,PAGE_DOWN:34,PAGE_UP:33,PERIOD:190,RIGHT:39,SPACE:32,TAB:9,UP:38}});a.fn.extend({scrollParent:function(b){var c=this.css("position"),d=c==="absolute",e=b?/(auto|scroll|hidden)/:/(auto|scroll)/,f=this.parents().filter(function(){var b=a(this);if(d&&b.css("position")==="static"){return false}return e.test(b.css("overflow")+b.css("overflow-y")+b.css("overflow-x"))}).eq(0);return c==="fixed"||!f.length?a(this[0].ownerDocument||document):f},uniqueId:function(){var a=0;return function(){return this.each(function(){if(!this.id){this.id="ui-id-"+ ++a}})}}(),removeUniqueId:function(){return this.each(function(){if(/^ui-id-\d+$/.test(this.id)){a(this).removeAttr("id")}})}});function b(b,d){var e,f,g,h=b.nodeName.toLowerCase();if("area"===h){e=b.parentNode;f=e.name;if(!b.href||!f||e.nodeName.toLowerCase()!=="map"){return false}g=a("img[usemap='#"+f+"']")[0];return!!g&&c(g)}return(/input|select|textarea|button|object/.test(h)?!b.disabled:"a"===h?b.href||d:d)&&c(b)}function c(b){return a.expr.filters.visible(b)&&!a(b).parents().addBack().filter(function(){return a.css(this,"visibility")==="hidden"}).length}a.extend(a.expr[":"],{data:a.expr.createPseudo?a.expr.createPseudo(function(b){return function(c){return!!a.data(c,b)}}):function(b,c,d){return!!a.data(b,d[3])},focusable:function(c){return b(c,!isNaN(a.attr(c,"tabindex")))},tabbable:function(c){var d=a.attr(c,"tabindex"),e=isNaN(d);return(e||d>=0)&&b(c,!e)}});if(!a("<a>").outerWidth(1).jquery){a.each(["Width","Height"],function(b,c){var d=c==="Width"?["Left","Right"]:["Top","Bottom"],e=c.toLowerCase(),f={innerWidth:a.fn.innerWidth,innerHeight:a.fn.innerHeight,outerWidth:a.fn.outerWidth,outerHeight:a.fn.outerHeight};function g(b,c,e,f){a.each(d,function(){c-=parseFloat(a.css(b,"padding"+this))||0;if(e){c-=parseFloat(a.css(b,"border"+this+"Width"))||0}if(f){c-=parseFloat(a.css(b,"margin"+this))||0}});return c}a.fn["inner"+c]=function(b){if(b===undefined){return f["inner"+c].call(this)}return this.each(function(){a(this).css(e,g(this,b)+"px")})};a.fn["outer"+c]=function(b,d){if(typeof b!=="number"){return f["outer"+c].call(this,b)}return this.each(function(){a(this).css(e,g(this,b,true,d)+"px")})}})}if(!a.fn.addBack){a.fn.addBack=function(a){return this.add(a==null?this.prevObject:this.prevObject.filter(a))}}if(a("<a>").data("a-b","a").removeData("a-b").data("a-b")){a.fn.removeData=function(b){return function(c){if(arguments.length){return b.call(this,a.camelCase(c))}else{return b.call(this)}}}(a.fn.removeData)}a.ui.ie=!!/msie [\w.]+/.exec(navigator.userAgent.toLowerCase());a.fn.extend({focus:function(b){return function(c,d){return typeof c==="number"?this.each(function(){var b=this;setTimeout(function(){a(b).focus();if(d){d.call(b)}},c)}):b.apply(this,arguments)}}(a.fn.focus),disableSelection:function(){var a="onselectstart"in document.createElement("div")?"selectstart":"mousedown";return function(){return this.bind(a+".ui-disableSelection",function(a){a.preventDefault()})}}(),enableSelection:function(){return this.unbind(".ui-disableSelection")},zIndex:function(b){if(b!==undefined){return this.css("zIndex",b)}if(this.length){var c=a(this[0]),d,e;while(c.length&&c[0]!==document){d=c.css("position");if(d==="absolute"||d==="relative"||d==="fixed"){e=parseInt(c.css("zIndex"),10);if(!isNaN(e)&&e!==0){return e}}c=c.parent()}}return 0}});a.ui.plugin={add:function(b,c,d){var e,f=a.ui[b].prototype;for(e in d){f.plugins[e]=f.plugins[e]||[];f.plugins[e].push([c,d[e]])}},call:function(a,b,c,d){var e,f=a.plugins[b];if(!f){return}if(!d&&(!a.element[0].parentNode||a.element[0].parentNode.nodeType===11)){return}for(e=0;e<f.length;e++){if(a.options[f[e][0]]){f[e][1].apply(a.element,c)}}}};var d=0,e=Array.prototype.slice;a.cleanData=function(b){return function(c){var d,e,f;for(f=0;(e=c[f])!=null;f++){try{d=a._data(e,"events");if(d&&d.remove){a(e).triggerHandler("remove")}}catch(g){}}b(c)}}(a.cleanData);a.widget=function(b,c,d){var e,f,g,h,i={},j=b.split(".")[0];b=b.split(".")[1];e=j+"-"+b;if(!d){d=c;c=a.Widget}a.expr[":"][e.toLowerCase()]=function(b){return!!a.data(b,e)};a[j]=a[j]||{};f=a[j][b];g=a[j][b]=function(a,b){if(!this._createWidget){return new g(a,b)}if(arguments.length){this._createWidget(a,b)}};a.extend(g,f,{version:d.version,_proto:a.extend({},d),_childConstructors:[]});h=new c;h.options=a.widget.extend({},h.options);a.each(d,function(b,d){if(!a.isFunction(d)){i[b]=d;return}i[b]=function(){var a=function(){return c.prototype[b].apply(this,arguments)},e=function(a){return c.prototype[b].apply(this,a)};return function(){var b=this._super,c=this._superApply,f;this._super=a;this._superApply=e;f=d.apply(this,arguments);this._super=b;this._superApply=c;return f}}()});g.prototype=a.widget.extend(h,{widgetEventPrefix:f?h.widgetEventPrefix||b:b},i,{constructor:g,namespace:j,widgetName:b,widgetFullName:e});if(f){a.each(f._childConstructors,function(b,c){var d=c.prototype;a.widget(d.namespace+"."+d.widgetName,g,c._proto)});delete f._childConstructors}else{c._childConstructors.push(g)}a.widget.bridge(b,g);return g};a.widget.extend=function(b){var c=e.call(arguments,1),d=0,f=c.length,g,h;for(;d<f;d++){for(g in c[d]){h=c[d][g];if(c[d].hasOwnProperty(g)&&h!==undefined){if(a.isPlainObject(h)){b[g]=a.isPlainObject(b[g])?a.widget.extend({},b[g],h):a.widget.extend({},h)}else{b[g]=h}}}}return b};a.widget.bridge=function(b,c){var d=c.prototype.widgetFullName||b;a.fn[b]=function(f){var g=typeof f==="string",h=e.call(arguments,1),i=this;f=!g&&h.length?a.widget.extend.apply(null,[f].concat(h)):f;if(g){this.each(function(){var c,e=a.data(this,d);if(f==="instance"){i=e;return false}if(!e){return a.error("cannot call methods on "+b+" prior to initialization; "+"attempted to call method '"+f+"'")}if(!a.isFunction(e[f])||f.charAt(0)==="_"){return a.error("no such method '"+f+"' for "+b+" widget instance")}c=e[f].apply(e,h);if(c!==e&&c!==undefined){i=c&&c.jquery?i.pushStack(c.get()):c;return false}})}else{this.each(function(){var b=a.data(this,d);if(b){b.option(f||{});if(b._init){b._init()}}else{a.data(this,d,new c(f,this))}})}return i}};a.Widget=function(){};a.Widget._childConstructors=[];a.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{disabled:false,create:null},_createWidget:function(b,c){c=a(c||this.defaultElement||this)[0];this.element=a(c);this.uuid=d++;this.eventNamespace="."+this.widgetName+this.uuid;this.options=a.widget.extend({},this.options,this._getCreateOptions(),b);this.bindings=a();this.hoverable=a();this.focusable=a();if(c!==this){a.data(c,this.widgetFullName,this);this._on(true,this.element,{remove:function(a){if(a.target===c){this.destroy()}}});this.document=a(c.style?c.ownerDocument:c.document||c);this.window=a(this.document[0].defaultView||this.document[0].parentWindow)}this._create();this._trigger("create",null,this._getCreateEventData());this._init()},_getCreateOptions:a.noop,_getCreateEventData:a.noop,_create:a.noop,_init:a.noop,destroy:function(){this._destroy();this.element.unbind(this.eventNamespace).removeData(this.widgetFullName).removeData(a.camelCase(this.widgetFullName));this.widget().unbind(this.eventNamespace).removeAttr("aria-disabled").removeClass(this.widgetFullName+"-disabled "+"ui-state-disabled");this.bindings.unbind(this.eventNamespace);this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")},_destroy:a.noop,widget:function(){return this.element},option:function(b,c){var d=b,e,f,g;if(arguments.length===0){return a.widget.extend({},this.options)}if(typeof b==="string"){d={};e=b.split(".");b=e.shift();if(e.length){f=d[b]=a.widget.extend({},this.options[b]);for(g=0;g<e.length-1;g++){f[e[g]]=f[e[g]]||{};f=f[e[g]]}b=e.pop();if(arguments.length===1){return f[b]===undefined?null:f[b]}f[b]=c}else{if(arguments.length===1){return this.options[b]===undefined?null:this.options[b]}d[b]=c}}this._setOptions(d);return this},_setOptions:function(a){var b;for(b in a){this._setOption(b,a[b])}return this},_setOption:function(a,b){this.options[a]=b;if(a==="disabled"){this.widget().toggleClass(this.widgetFullName+"-disabled",!!b);if(b){this.hoverable.removeClass("ui-state-hover");this.focusable.removeClass("ui-state-focus")}}return this},enable:function(){return this._setOptions({disabled:false})},disable:function(){return this._setOptions({disabled:true})},_on:function(b,c,d){var e,f=this;if(typeof b!=="boolean"){d=c;c=b;b=false}if(!d){d=c;c=this.element;e=this.widget()}else{c=e=a(c);this.bindings=this.bindings.add(c)}a.each(d,function(d,g){function h(){if(!b&&(f.options.disabled===true||a(this).hasClass("ui-state-disabled"))){return}return(typeof g==="string"?f[g]:g).apply(f,arguments)}if(typeof g!=="string"){h.guid=g.guid=g.guid||h.guid||a.guid++}var i=d.match(/^([\w:-]*)\s*(.*)$/),j=i[1]+f.eventNamespace,k=i[2];if(k){e.delegate(k,j,h)}else{c.bind(j,h)}})},_off:function(a,b){b=(b||"").split(" ").join(this.eventNamespace+" ")+this.eventNamespace;a.unbind(b).undelegate(b)},_delay:function(a,b){function c(){return(typeof a==="string"?d[a]:a).apply(d,arguments)}var d=this;return setTimeout(c,b||0)},_hoverable:function(b){this.hoverable=this.hoverable.add(b);this._on(b,{mouseenter:function(b){a(b.currentTarget).addClass("ui-state-hover")},mouseleave:function(b){a(b.currentTarget).removeClass("ui-state-hover")}})},_focusable:function(b){this.focusable=this.focusable.add(b);this._on(b,{focusin:function(b){a(b.currentTarget).addClass("ui-state-focus")},focusout:function(b){a(b.currentTarget).removeClass("ui-state-focus")}})},_trigger:function(b,c,d){var e,f,g=this.options[b];d=d||{};c=a.Event(c);c.type=(b===this.widgetEventPrefix?b:this.widgetEventPrefix+b).toLowerCase();c.target=this.element[0];f=c.originalEvent;if(f){for(e in f){if(!(e in c)){c[e]=f[e]}}}this.element.trigger(c,d);return!(a.isFunction(g)&&g.apply(this.element[0],[c].concat(d))===false||c.isDefaultPrevented())}};a.each({show:"fadeIn",hide:"fadeOut"},function(b,c){a.Widget.prototype["_"+b]=function(d,e,f){if(typeof e==="string"){e={effect:e}}var g,h=!e?b:e===true||typeof e==="number"?c:e.effect||c;
e=e||{};if(typeof e==="number"){e={duration:e}}g=!a.isEmptyObject(e);e.complete=f;if(e.delay){d.delay(e.delay)}if(g&&a.effects&&a.effects.effect[h]){d[b](e)}else if(h!==b&&d[h]){d[h](e.duration,e.easing,f)}else{d.queue(function(c){a(this)[b]();if(f){f.call(d[0])}c()})}}});var f=a.widget;var g=false;a(document).mouseup(function(){g=false});var h=a.widget("ui.mouse",{version:"1.11.1",options:{cancel:"input,textarea,button,select,option",distance:1,delay:0},_mouseInit:function(){var b=this;this.element.bind("mousedown."+this.widgetName,function(a){return b._mouseDown(a)}).bind("click."+this.widgetName,function(c){if(true===a.data(c.target,b.widgetName+".preventClickEvent")){a.removeData(c.target,b.widgetName+".preventClickEvent");c.stopImmediatePropagation();return false}});this.started=false},_mouseDestroy:function(){this.element.unbind("."+this.widgetName);if(this._mouseMoveDelegate){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate)}},_mouseDown:function(b){if(g){return}this._mouseStarted&&this._mouseUp(b);this._mouseDownEvent=b;var c=this,d=b.which===1,e=typeof this.options.cancel==="string"&&b.target.nodeName?a(b.target).closest(this.options.cancel).length:false;if(!d||e||!this._mouseCapture(b)){return true}this.mouseDelayMet=!this.options.delay;if(!this.mouseDelayMet){this._mouseDelayTimer=setTimeout(function(){c.mouseDelayMet=true},this.options.delay)}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(b)!==false;if(!this._mouseStarted){b.preventDefault();return true}}if(true===a.data(b.target,this.widgetName+".preventClickEvent")){a.removeData(b.target,this.widgetName+".preventClickEvent")}this._mouseMoveDelegate=function(a){return c._mouseMove(a)};this._mouseUpDelegate=function(a){return c._mouseUp(a)};this.document.bind("mousemove."+this.widgetName,this._mouseMoveDelegate).bind("mouseup."+this.widgetName,this._mouseUpDelegate);b.preventDefault();g=true;return true},_mouseMove:function(b){if(a.ui.ie&&(!document.documentMode||document.documentMode<9)&&!b.button){return this._mouseUp(b)}else if(!b.which){return this._mouseUp(b)}if(this._mouseStarted){this._mouseDrag(b);return b.preventDefault()}if(this._mouseDistanceMet(b)&&this._mouseDelayMet(b)){this._mouseStarted=this._mouseStart(this._mouseDownEvent,b)!==false;this._mouseStarted?this._mouseDrag(b):this._mouseUp(b)}return!this._mouseStarted},_mouseUp:function(b){this.document.unbind("mousemove."+this.widgetName,this._mouseMoveDelegate).unbind("mouseup."+this.widgetName,this._mouseUpDelegate);if(this._mouseStarted){this._mouseStarted=false;if(b.target===this._mouseDownEvent.target){a.data(b.target,this.widgetName+".preventClickEvent",true)}this._mouseStop(b)}g=false;return false},_mouseDistanceMet:function(a){return Math.max(Math.abs(this._mouseDownEvent.pageX-a.pageX),Math.abs(this._mouseDownEvent.pageY-a.pageY))>=this.options.distance},_mouseDelayMet:function(){return this.mouseDelayMet},_mouseStart:function(){},_mouseDrag:function(){},_mouseStop:function(){},_mouseCapture:function(){return true}});a.widget("ui.draggable",a.ui.mouse,{version:"1.11.1",widgetEventPrefix:"drag",options:{addClasses:true,appendTo:"parent",axis:false,connectToSortable:false,containment:false,cursor:"auto",cursorAt:false,grid:false,handle:false,helper:"original",iframeFix:false,opacity:false,refreshPositions:false,revert:false,revertDuration:500,scope:"default",scroll:true,scrollSensitivity:20,scrollSpeed:20,snap:false,snapMode:"both",snapTolerance:20,stack:false,zIndex:false,drag:null,start:null,stop:null},_create:function(){if(this.options.helper==="original"&&!/^(?:r|a|f)/.test(this.element.css("position"))){this.element[0].style.position="relative"}if(this.options.addClasses){this.element.addClass("ui-draggable")}if(this.options.disabled){this.element.addClass("ui-draggable-disabled")}this._setHandleClassName();this._mouseInit()},_setOption:function(a,b){this._super(a,b);if(a==="handle"){this._removeHandleClassName();this._setHandleClassName()}},_destroy:function(){if((this.helper||this.element).is(".ui-draggable-dragging")){this.destroyOnClear=true;return}this.element.removeClass("ui-draggable ui-draggable-dragging ui-draggable-disabled");this._removeHandleClassName();this._mouseDestroy()},_mouseCapture:function(b){var c=this.document[0],d=this.options;try{if(c.activeElement&&c.activeElement.nodeName.toLowerCase()!=="body"){a(c.activeElement).blur()}}catch(e){}if(this.helper||d.disabled||a(b.target).closest(".ui-resizable-handle").length>0){return false}this.handle=this._getHandle(b);if(!this.handle){return false}a(d.iframeFix===true?"iframe":d.iframeFix).each(function(){a("<div class='ui-draggable-iframeFix' style='background: #fff;'></div>").css({width:this.offsetWidth+"px",height:this.offsetHeight+"px",position:"absolute",opacity:"0.001",zIndex:1e3}).css(a(this).offset()).appendTo("body")});return true},_mouseStart:function(b){var c=this.options;this.helper=this._createHelper(b);this.helper.addClass("ui-draggable-dragging");this._cacheHelperProportions();if(a.ui.ddmanager){a.ui.ddmanager.current=this}this._cacheMargins();this.cssPosition=this.helper.css("position");this.scrollParent=this.helper.scrollParent(true);this.offsetParent=this.helper.offsetParent();this.offsetParentCssPosition=this.offsetParent.css("position");this.offset=this.positionAbs=this.element.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};this.offset.scroll=false;a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.originalPosition=this.position=this._generatePosition(b,false);this.originalPageX=b.pageX;this.originalPageY=b.pageY;c.cursorAt&&this._adjustOffsetFromHelper(c.cursorAt);this._setContainment();if(this._trigger("start",b)===false){this._clear();return false}this._cacheHelperProportions();if(a.ui.ddmanager&&!c.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this._mouseDrag(b,true);if(a.ui.ddmanager){a.ui.ddmanager.dragStart(this,b)}return true},_mouseDrag:function(b,c){if(this.offsetParentCssPosition==="fixed"){this.offset.parent=this._getParentOffset()}this.position=this._generatePosition(b,true);this.positionAbs=this._convertPositionTo("absolute");if(!c){var d=this._uiHash();if(this._trigger("drag",b,d)===false){this._mouseUp({});return false}this.position=d.position}this.helper[0].style.left=this.position.left+"px";this.helper[0].style.top=this.position.top+"px";if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}return false},_mouseStop:function(b){var c=this,d=false;if(a.ui.ddmanager&&!this.options.dropBehaviour){d=a.ui.ddmanager.drop(this,b)}if(this.dropped){d=this.dropped;this.dropped=false}if(this.options.revert==="invalid"&&!d||this.options.revert==="valid"&&d||this.options.revert===true||a.isFunction(this.options.revert)&&this.options.revert.call(this.element,d)){a(this.helper).animate(this.originalPosition,parseInt(this.options.revertDuration,10),function(){if(c._trigger("stop",b)!==false){c._clear()}})}else{if(this._trigger("stop",b)!==false){this._clear()}}return false},_mouseUp:function(b){a("div.ui-draggable-iframeFix").each(function(){this.parentNode.removeChild(this)});if(a.ui.ddmanager){a.ui.ddmanager.dragStop(this,b)}this.element.focus();return a.ui.mouse.prototype._mouseUp.call(this,b)},cancel:function(){if(this.helper.is(".ui-draggable-dragging")){this._mouseUp({})}else{this._clear()}return this},_getHandle:function(b){return this.options.handle?!!a(b.target).closest(this.element.find(this.options.handle)).length:true},_setHandleClassName:function(){this.handleElement=this.options.handle?this.element.find(this.options.handle):this.element;this.handleElement.addClass("ui-draggable-handle")},_removeHandleClassName:function(){this.handleElement.removeClass("ui-draggable-handle")},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b])):c.helper==="clone"?this.element.clone().removeAttr("id"):this.element;if(!d.parents("body").length){d.appendTo(c.appendTo==="parent"?this.element[0].parentNode:c.appendTo)}if(d[0]!==this.element[0]&&!/(fixed|absolute)/.test(d.css("position"))){d.css("position","absolute")}return d},_adjustOffsetFromHelper:function(b){if(typeof b==="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left"in b){this.offset.click.left=b.left+this.margins.left}if("right"in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top"in b){this.offset.click.top=b.top+this.margins.top}if("bottom"in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_isRootNode:function(a){return/(html|body)/i.test(a.tagName)||a===this.document[0]},_getParentOffset:function(){var b=this.offsetParent.offset(),c=this.document[0];if(this.cssPosition==="absolute"&&this.scrollParent[0]!==c&&a.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this._isRootNode(this.offsetParent[0])){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition!=="relative"){return{top:0,left:0}}var a=this.element.position(),b=this._isRootNode(this.scrollParent[0]);return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+(!b?this.scrollParent.scrollTop():0),left:a.left-(parseInt(this.helper.css("left"),10)||0)+(!b?this.scrollParent.scrollLeft():0)}},_cacheMargins:function(){this.margins={left:parseInt(this.element.css("marginLeft"),10)||0,top:parseInt(this.element.css("marginTop"),10)||0,right:parseInt(this.element.css("marginRight"),10)||0,bottom:parseInt(this.element.css("marginBottom"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options,f=this.document[0];this.relativeContainer=null;if(!e.containment){this.containment=null;return}if(e.containment==="window"){this.containment=[a(window).scrollLeft()-this.offset.relative.left-this.offset.parent.left,a(window).scrollTop()-this.offset.relative.top-this.offset.parent.top,a(window).scrollLeft()+a(window).width()-this.helperProportions.width-this.margins.left,a(window).scrollTop()+(a(window).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(e.containment==="document"){this.containment=[0,0,a(f).width()-this.helperProportions.width-this.margins.left,(a(f).height()||f.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top];return}if(e.containment.constructor===Array){this.containment=e.containment;return}if(e.containment==="parent"){e.containment=this.helper[0].parentNode}c=a(e.containment);d=c[0];if(!d){return}b=c.css("overflow")!=="hidden";this.containment=[(parseInt(c.css("borderLeftWidth"),10)||0)+(parseInt(c.css("paddingLeft"),10)||0),(parseInt(c.css("borderTopWidth"),10)||0)+(parseInt(c.css("paddingTop"),10)||0),(b?Math.max(d.scrollWidth,d.offsetWidth):d.offsetWidth)-(parseInt(c.css("borderRightWidth"),10)||0)-(parseInt(c.css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left-this.margins.right,(b?Math.max(d.scrollHeight,d.offsetHeight):d.offsetHeight)-(parseInt(c.css("borderBottomWidth"),10)||0)-(parseInt(c.css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top-this.margins.bottom];this.relativeContainer=c},_convertPositionTo:function(a,b){if(!b){b=this.position}var c=a==="absolute"?1:-1,d=this._isRootNode(this.scrollParent[0]);return{top:b.top+this.offset.relative.top*c+this.offset.parent.top*c-(this.cssPosition==="fixed"?-this.offset.scroll.top:d?0:this.offset.scroll.top)*c,left:b.left+this.offset.relative.left*c+this.offset.parent.left*c-(this.cssPosition==="fixed"?-this.offset.scroll.left:d?0:this.offset.scroll.left)*c}},_generatePosition:function(a,b){var c,d,e,f,g=this.options,h=this._isRootNode(this.scrollParent[0]),i=a.pageX,j=a.pageY;if(!h||!this.offset.scroll){this.offset.scroll={top:this.scrollParent.scrollTop(),left:this.scrollParent.scrollLeft()}}if(b){if(this.containment){if(this.relativeContainer){d=this.relativeContainer.offset();c=[this.containment[0]+d.left,this.containment[1]+d.top,this.containment[2]+d.left,this.containment[3]+d.top]}else{c=this.containment}if(a.pageX-this.offset.click.left<c[0]){i=c[0]+this.offset.click.left}if(a.pageY-this.offset.click.top<c[1]){j=c[1]+this.offset.click.top}if(a.pageX-this.offset.click.left>c[2]){i=c[2]+this.offset.click.left}if(a.pageY-this.offset.click.top>c[3]){j=c[3]+this.offset.click.top}}if(g.grid){e=g.grid[1]?this.originalPageY+Math.round((j-this.originalPageY)/g.grid[1])*g.grid[1]:this.originalPageY;j=c?e-this.offset.click.top>=c[1]||e-this.offset.click.top>c[3]?e:e-this.offset.click.top>=c[1]?e-g.grid[1]:e+g.grid[1]:e;f=g.grid[0]?this.originalPageX+Math.round((i-this.originalPageX)/g.grid[0])*g.grid[0]:this.originalPageX;i=c?f-this.offset.click.left>=c[0]||f-this.offset.click.left>c[2]?f:f-this.offset.click.left>=c[0]?f-g.grid[0]:f+g.grid[0]:f}if(g.axis==="y"){i=this.originalPageX}if(g.axis==="x"){j=this.originalPageY}}return{top:j-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.offset.scroll.top:h?0:this.offset.scroll.top),left:i-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.offset.scroll.left:h?0:this.offset.scroll.left)}},_clear:function(){this.helper.removeClass("ui-draggable-dragging");if(this.helper[0]!==this.element[0]&&!this.cancelHelperRemoval){this.helper.remove()}this.helper=null;this.cancelHelperRemoval=false;if(this.destroyOnClear){this.destroy()}},_trigger:function(b,c,d){d=d||this._uiHash();a.ui.plugin.call(this,b,[c,d,this],true);if(b==="drag"){this.positionAbs=this._convertPositionTo("absolute")}return a.Widget.prototype._trigger.call(this,b,c,d)},plugins:{},_uiHash:function(){return{helper:this.helper,position:this.position,originalPosition:this.originalPosition,offset:this.positionAbs}}});a.ui.plugin.add("draggable","connectToSortable",{start:function(b,c,d){var e=d.options,f=a.extend({},c,{item:d.element});d.sortables=[];a(e.connectToSortable).each(function(){var c=a(this).sortable("instance");if(c&&!c.options.disabled){d.sortables.push({instance:c,shouldRevert:c.options.revert});c.refreshPositions();c._trigger("activate",b,f)}})},stop:function(b,c,d){var e=a.extend({},c,{item:d.element});a.each(d.sortables,function(){if(this.instance.isOver){this.instance.isOver=0;d.cancelHelperRemoval=true;this.instance.cancelHelperRemoval=false;if(this.shouldRevert){this.instance.options.revert=this.shouldRevert}this.instance._mouseStop(b);this.instance.options.helper=this.instance.options._helper;if(d.options.helper==="original"){this.instance.currentItem.css({top:"auto",left:"auto"})}}else{this.instance.cancelHelperRemoval=false;this.instance._trigger("deactivate",b,e)}})},drag:function(b,c,d){var e=this;a.each(d.sortables,function(){var f=false,g=this;this.instance.positionAbs=d.positionAbs;this.instance.helperProportions=d.helperProportions;this.instance.offset.click=d.offset.click;if(this.instance._intersectsWith(this.instance.containerCache)){f=true;a.each(d.sortables,function(){this.instance.positionAbs=d.positionAbs;this.instance.helperProportions=d.helperProportions;this.instance.offset.click=d.offset.click;if(this!==g&&this.instance._intersectsWith(this.instance.containerCache)&&a.contains(g.instance.element[0],this.instance.element[0])){f=false}return f})}if(f){if(!this.instance.isOver){this.instance.isOver=1;this.instance.currentItem=a(e).clone().removeAttr("id").appendTo(this.instance.element).data("ui-sortable-item",true);this.instance.options._helper=this.instance.options.helper;this.instance.options.helper=function(){return c.helper[0]};b.target=this.instance.currentItem[0];this.instance._mouseCapture(b,true);this.instance._mouseStart(b,true,true);this.instance.offset.click.top=d.offset.click.top;this.instance.offset.click.left=d.offset.click.left;this.instance.offset.parent.left-=d.offset.parent.left-this.instance.offset.parent.left;this.instance.offset.parent.top-=d.offset.parent.top-this.instance.offset.parent.top;d._trigger("toSortable",b);d.dropped=this.instance.element;d.currentItem=d.element;this.instance.fromOutside=d}if(this.instance.currentItem){this.instance._mouseDrag(b)}}else{if(this.instance.isOver){this.instance.isOver=0;this.instance.cancelHelperRemoval=true;this.instance.options.revert=false;this.instance._trigger("out",b,this.instance._uiHash(this.instance));this.instance._mouseStop(b,true);this.instance.options.helper=this.instance.options._helper;this.instance.currentItem.remove();if(this.instance.placeholder){this.instance.placeholder.remove()}d._trigger("fromSortable",b);d.dropped=false}}})}});a.ui.plugin.add("draggable","cursor",{start:function(b,c,d){var e=a("body"),f=d.options;if(e.css("cursor")){f._cursor=e.css("cursor")}e.css("cursor",f.cursor)},stop:function(b,c,d){var e=d.options;if(e._cursor){a("body").css("cursor",e._cursor)}}});a.ui.plugin.add("draggable","opacity",{start:function(b,c,d){var e=a(c.helper),f=d.options;if(e.css("opacity")){f._opacity=e.css("opacity")}e.css("opacity",f.opacity)},stop:function(b,c,d){var e=d.options;if(e._opacity){a(c.helper).css("opacity",e._opacity)}}});a.ui.plugin.add("draggable","scroll",{start:function(a,b,c){if(!c.scrollParentNotHidden){c.scrollParentNotHidden=c.helper.scrollParent(false)}if(c.scrollParentNotHidden[0]!==c.document[0]&&c.scrollParentNotHidden[0].tagName!=="HTML"){c.overflowOffset=c.scrollParentNotHidden.offset()}},drag:function(b,c,d){var e=d.options,f=false,g=d.scrollParentNotHidden[0],h=d.document[0];if(g!==h&&g.tagName!=="HTML"){if(!e.axis||e.axis!=="x"){if(d.overflowOffset.top+g.offsetHeight-b.pageY<e.scrollSensitivity){g.scrollTop=f=g.scrollTop+e.scrollSpeed}else if(b.pageY-d.overflowOffset.top<e.scrollSensitivity){g.scrollTop=f=g.scrollTop-e.scrollSpeed}}if(!e.axis||e.axis!=="y"){if(d.overflowOffset.left+g.offsetWidth-b.pageX<e.scrollSensitivity){g.scrollLeft=f=g.scrollLeft+e.scrollSpeed}else if(b.pageX-d.overflowOffset.left<e.scrollSensitivity){g.scrollLeft=f=g.scrollLeft-e.scrollSpeed}}}else{if(!e.axis||e.axis!=="x"){if(b.pageY-a(h).scrollTop()<e.scrollSensitivity){f=a(h).scrollTop(a(h).scrollTop()-e.scrollSpeed)}else if(a(window).height()-(b.pageY-a(h).scrollTop())<e.scrollSensitivity){f=a(h).scrollTop(a(h).scrollTop()+e.scrollSpeed)}}if(!e.axis||e.axis!=="y"){if(b.pageX-a(h).scrollLeft()<e.scrollSensitivity){f=a(h).scrollLeft(a(h).scrollLeft()-e.scrollSpeed)}else if(a(window).width()-(b.pageX-a(h).scrollLeft())<e.scrollSensitivity){f=a(h).scrollLeft(a(h).scrollLeft()+e.scrollSpeed)}}}if(f!==false&&a.ui.ddmanager&&!e.dropBehaviour){a.ui.ddmanager.prepareOffsets(d,b)}}});a.ui.plugin.add("draggable","snap",{start:function(b,c,d){var e=d.options;d.snapElements=[];a(e.snap.constructor!==String?e.snap.items||":data(ui-draggable)":e.snap).each(function(){var b=a(this),c=b.offset();if(this!==d.element[0]){d.snapElements.push({item:this,width:b.outerWidth(),height:b.outerHeight(),top:c.top,left:c.left})}})},drag:function(b,c,d){var e,f,g,h,i,j,k,l,m,n,o=d.options,p=o.snapTolerance,q=c.offset.left,r=q+d.helperProportions.width,s=c.offset.top,t=s+d.helperProportions.height;for(m=d.snapElements.length-1;m>=0;m--){i=d.snapElements[m].left;j=i+d.snapElements[m].width;k=d.snapElements[m].top;l=k+d.snapElements[m].height;if(r<i-p||q>j+p||t<k-p||s>l+p||!a.contains(d.snapElements[m].item.ownerDocument,d.snapElements[m].item)){if(d.snapElements[m].snapping){d.options.snap.release&&d.options.snap.release.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item}))}d.snapElements[m].snapping=false;continue}if(o.snapMode!=="inner"){e=Math.abs(k-t)<=p;f=Math.abs(l-s)<=p;g=Math.abs(i-r)<=p;h=Math.abs(j-q)<=p;if(e){c.position.top=d._convertPositionTo("relative",{top:k-d.helperProportions.height,left:0}).top-d.margins.top}if(f){c.position.top=d._convertPositionTo("relative",{top:l,left:0}).top-d.margins.top}if(g){c.position.left=d._convertPositionTo("relative",{top:0,left:i-d.helperProportions.width}).left-d.margins.left}if(h){c.position.left=d._convertPositionTo("relative",{top:0,left:j}).left-d.margins.left}}n=e||f||g||h;if(o.snapMode!=="outer"){e=Math.abs(k-s)<=p;f=Math.abs(l-t)<=p;g=Math.abs(i-q)<=p;h=Math.abs(j-r)<=p;if(e){c.position.top=d._convertPositionTo("relative",{top:k,left:0}).top-d.margins.top}if(f){c.position.top=d._convertPositionTo("relative",{top:l-d.helperProportions.height,left:0}).top-d.margins.top}if(g){c.position.left=d._convertPositionTo("relative",{top:0,left:i}).left-d.margins.left}if(h){c.position.left=d._convertPositionTo("relative",{top:0,left:j-d.helperProportions.width}).left-d.margins.left}}if(!d.snapElements[m].snapping&&(e||f||g||h||n)){d.options.snap.snap&&d.options.snap.snap.call(d.element,b,a.extend(d._uiHash(),{snapItem:d.snapElements[m].item}))}d.snapElements[m].snapping=e||f||g||h||n}}});a.ui.plugin.add("draggable","stack",{start:function(b,c,d){var e,f=d.options,g=a.makeArray(a(f.stack)).sort(function(b,c){return(parseInt(a(b).css("zIndex"),10)||0)-(parseInt(a(c).css("zIndex"),10)||0)});if(!g.length){return}e=parseInt(a(g[0]).css("zIndex"),10)||0;a(g).each(function(b){a(this).css("zIndex",e+b)});this.css("zIndex",e+g.length)}});a.ui.plugin.add("draggable","zIndex",{start:function(b,c,d){var e=a(c.helper),f=d.options;if(e.css("zIndex")){f._zIndex=e.css("zIndex")}e.css("zIndex",f.zIndex)},stop:function(b,c,d){var e=d.options;if(e._zIndex){a(c.helper).css("zIndex",e._zIndex)}}});var i=a.ui.draggable;a.widget("ui.resizable",a.ui.mouse,{version:"1.11.1",widgetEventPrefix:"resize",options:{alsoResize:false,animate:false,animateDuration:"slow",animateEasing:"swing",aspectRatio:false,autoHide:false,containment:false,ghost:false,grid:false,handles:"e,s,se",helper:false,maxHeight:null,maxWidth:null,minHeight:10,minWidth:10,zIndex:90,resize:null,start:null,stop:null},_num:function(a){return parseInt(a,10)||0},_isNumber:function(a){return!isNaN(parseInt(a,10))},_hasScroll:function(b,c){if(a(b).css("overflow")==="hidden"){return false}var d=c&&c==="left"?"scrollLeft":"scrollTop",e=false;if(b[d]>0){return true}b[d]=1;e=b[d]>0;b[d]=0;return e},_create:function(){var b,c,d,e,f,g=this,h=this.options;this.element.addClass("ui-resizable");a.extend(this,{_aspectRatio:!!h.aspectRatio,aspectRatio:h.aspectRatio,originalElement:this.element,_proportionallyResizeElements:[],_helper:h.helper||h.ghost||h.animate?h.helper||"ui-resizable-helper":null});if(this.element[0].nodeName.match(/canvas|textarea|input|select|button|img/i)){this.element.wrap(a("<div class='ui-wrapper' style='overflow: hidden;'></div>").css({position:this.element.css("position"),width:this.element.outerWidth(),height:this.element.outerHeight(),top:this.element.css("top"),left:this.element.css("left")}));this.element=this.element.parent().data("ui-resizable",this.element.resizable("instance"));this.elementIsWrapper=true;this.element.css({marginLeft:this.originalElement.css("marginLeft"),marginTop:this.originalElement.css("marginTop"),marginRight:this.originalElement.css("marginRight"),marginBottom:this.originalElement.css("marginBottom")});this.originalElement.css({marginLeft:0,marginTop:0,marginRight:0,marginBottom:0});this.originalResizeStyle=this.originalElement.css("resize");this.originalElement.css("resize","none");this._proportionallyResizeElements.push(this.originalElement.css({position:"static",zoom:1,display:"block"}));this.originalElement.css({margin:this.originalElement.css("margin")});this._proportionallyResize()}this.handles=h.handles||(!a(".ui-resizable-handle",this.element).length?"e,s,se":{n:".ui-resizable-n",e:".ui-resizable-e",s:".ui-resizable-s",w:".ui-resizable-w",se:".ui-resizable-se",sw:".ui-resizable-sw",ne:".ui-resizable-ne",nw:".ui-resizable-nw"});if(this.handles.constructor===String){if(this.handles==="all"){this.handles="n,e,s,w,se,sw,ne,nw"}b=this.handles.split(",");this.handles={};for(c=0;c<b.length;c++){d=a.trim(b[c]);f="ui-resizable-"+d;e=a("<div class='ui-resizable-handle "+f+"'></div>");e.css({zIndex:h.zIndex});if("se"===d){e.addClass("ui-icon ui-icon-gripsmall-diagonal-se")}this.handles[d]=".ui-resizable-"+d;this.element.append(e)}}this._renderAxis=function(b){var c,d,e,f;b=b||this.element;for(c in this.handles){if(this.handles[c].constructor===String){this.handles[c]=this.element.children(this.handles[c]).first().show()}if(this.elementIsWrapper&&this.originalElement[0].nodeName.match(/textarea|input|select|button/i)){d=a(this.handles[c],this.element);f=/sw|ne|nw|se|n|s/.test(c)?d.outerHeight():d.outerWidth();e=["padding",/ne|nw|n/.test(c)?"Top":/se|sw|s/.test(c)?"Bottom":/^e$/.test(c)?"Right":"Left"].join("");b.css(e,f);this._proportionallyResize()}if(!a(this.handles[c]).length){continue}}};this._renderAxis(this.element);this._handles=a(".ui-resizable-handle",this.element).disableSelection();this._handles.mouseover(function(){if(!g.resizing){if(this.className){e=this.className.match(/ui-resizable-(se|sw|ne|nw|n|e|s|w)/i)}g.axis=e&&e[1]?e[1]:"se"}});if(h.autoHide){this._handles.hide();a(this.element).addClass("ui-resizable-autohide").mouseenter(function(){if(h.disabled){return}a(this).removeClass("ui-resizable-autohide");g._handles.show()}).mouseleave(function(){if(h.disabled){return}if(!g.resizing){a(this).addClass("ui-resizable-autohide");g._handles.hide()}})}this._mouseInit()},_destroy:function(){this._mouseDestroy();var b,c=function(b){a(b).removeClass("ui-resizable ui-resizable-disabled ui-resizable-resizing").removeData("resizable").removeData("ui-resizable").unbind(".resizable").find(".ui-resizable-handle").remove()};if(this.elementIsWrapper){c(this.element);b=this.element;this.originalElement.css({position:b.css("position"),width:b.outerWidth(),height:b.outerHeight(),top:b.css("top"),left:b.css("left")}).insertAfter(b);b.remove()}this.originalElement.css("resize",this.originalResizeStyle);c(this.originalElement);return this},_mouseCapture:function(b){var c,d,e=false;for(c in this.handles){d=a(this.handles[c])[0];if(d===b.target||a.contains(d,b.target)){e=true}}return!this.options.disabled&&e},_mouseStart:function(b){var c,d,e,f=this.options,g=this.element;this.resizing=true;this._renderProxy();c=this._num(this.helper.css("left"));d=this._num(this.helper.css("top"));if(f.containment){c+=a(f.containment).scrollLeft()||0;d+=a(f.containment).scrollTop()||0}this.offset=this.helper.offset();this.position={left:c,top:d};this.size=this._helper?{width:this.helper.width(),height:this.helper.height()}:{width:g.width(),height:g.height()};this.originalSize=this._helper?{width:g.outerWidth(),height:g.outerHeight()}:{width:g.width(),height:g.height()};this.sizeDiff={width:g.outerWidth()-g.width(),height:g.outerHeight()-g.height()};this.originalPosition={left:c,top:d};this.originalMousePosition={left:b.pageX,top:b.pageY};this.aspectRatio=typeof f.aspectRatio==="number"?f.aspectRatio:this.originalSize.width/this.originalSize.height||1;e=a(".ui-resizable-"+this.axis).css("cursor");a("body").css("cursor",e==="auto"?this.axis+"-resize":e);g.addClass("ui-resizable-resizing");this._propagate("start",b);return true},_mouseDrag:function(b){var c,d,e=this.originalMousePosition,f=this.axis,g=b.pageX-e.left||0,h=b.pageY-e.top||0,i=this._change[f];this._updatePrevProperties();if(!i){return false}c=i.apply(this,[b,g,h]);this._updateVirtualBoundaries(b.shiftKey);if(this._aspectRatio||b.shiftKey){c=this._updateRatio(c,b)}c=this._respectSize(c,b);this._updateCache(c);this._propagate("resize",b);d=this._applyChanges();if(!this._helper&&this._proportionallyResizeElements.length){this._proportionallyResize()}if(!a.isEmptyObject(d)){this._updatePrevProperties();this._trigger("resize",b,this.ui());this._applyChanges()}return false},_mouseStop:function(b){this.resizing=false;var c,d,e,f,g,h,i,j=this.options,k=this;if(this._helper){c=this._proportionallyResizeElements;d=c.length&&/textarea/i.test(c[0].nodeName);e=d&&this._hasScroll(c[0],"left")?0:k.sizeDiff.height;f=d?0:k.sizeDiff.width;g={width:k.helper.width()-f,height:k.helper.height()-e};h=parseInt(k.element.css("left"),10)+(k.position.left-k.originalPosition.left)||null;i=parseInt(k.element.css("top"),10)+(k.position.top-k.originalPosition.top)||null;if(!j.animate){this.element.css(a.extend(g,{top:i,left:h}))}k.helper.height(k.size.height);k.helper.width(k.size.width);if(this._helper&&!j.animate){this._proportionallyResize()}}a("body").css("cursor","auto");this.element.removeClass("ui-resizable-resizing");this._propagate("stop",b);if(this._helper){this.helper.remove()}return false},_updatePrevProperties:function(){this.prevPosition={top:this.position.top,left:this.position.left};this.prevSize={width:this.size.width,height:this.size.height}},_applyChanges:function(){var a={};if(this.position.top!==this.prevPosition.top){a.top=this.position.top+"px"}if(this.position.left!==this.prevPosition.left){a.left=this.position.left+"px"}if(this.size.width!==this.prevSize.width){a.width=this.size.width+"px"}if(this.size.height!==this.prevSize.height){a.height=this.size.height+"px"}this.helper.css(a);return a},_updateVirtualBoundaries:function(a){var b,c,d,e,f,g=this.options;f={minWidth:this._isNumber(g.minWidth)?g.minWidth:0,maxWidth:this._isNumber(g.maxWidth)?g.maxWidth:Infinity,minHeight:this._isNumber(g.minHeight)?g.minHeight:0,maxHeight:this._isNumber(g.maxHeight)?g.maxHeight:Infinity};if(this._aspectRatio||a){b=f.minHeight*this.aspectRatio;d=f.minWidth/this.aspectRatio;c=f.maxHeight*this.aspectRatio;e=f.maxWidth/this.aspectRatio;if(b>f.minWidth){f.minWidth=b}if(d>f.minHeight){f.minHeight=d}if(c<f.maxWidth){f.maxWidth=c}if(e<f.maxHeight){f.maxHeight=e}}this._vBoundaries=f},_updateCache:function(a){this.offset=this.helper.offset();if(this._isNumber(a.left)){this.position.left=a.left}if(this._isNumber(a.top)){this.position.top=a.top}if(this._isNumber(a.height)){this.size.height=a.height}if(this._isNumber(a.width)){this.size.width=a.width}},_updateRatio:function(a){var b=this.position,c=this.size,d=this.axis;if(this._isNumber(a.height)){a.width=a.height*this.aspectRatio}else if(this._isNumber(a.width)){a.height=a.width/this.aspectRatio}if(d==="sw"){a.left=b.left+(c.width-a.width);a.top=null}if(d==="nw"){a.top=b.top+(c.height-a.height);a.left=b.left+(c.width-a.width)}return a},_respectSize:function(a){var b=this._vBoundaries,c=this.axis,d=this._isNumber(a.width)&&b.maxWidth&&b.maxWidth<a.width,e=this._isNumber(a.height)&&b.maxHeight&&b.maxHeight<a.height,f=this._isNumber(a.width)&&b.minWidth&&b.minWidth>a.width,g=this._isNumber(a.height)&&b.minHeight&&b.minHeight>a.height,h=this.originalPosition.left+this.originalSize.width,i=this.position.top+this.size.height,j=/sw|nw|w/.test(c),k=/nw|ne|n/.test(c);if(f){a.width=b.minWidth}if(g){a.height=b.minHeight}if(d){a.width=b.maxWidth}if(e){a.height=b.maxHeight}if(f&&j){a.left=h-b.minWidth}if(d&&j){a.left=h-b.maxWidth}if(g&&k){a.top=i-b.minHeight}if(e&&k){a.top=i-b.maxHeight}if(!a.width&&!a.height&&!a.left&&a.top){a.top=null}else if(!a.width&&!a.height&&!a.top&&a.left){a.left=null}return a},_getPaddingPlusBorderDimensions:function(a){var b=0,c=[],d=[a.css("borderTopWidth"),a.css("borderRightWidth"),a.css("borderBottomWidth"),a.css("borderLeftWidth")],e=[a.css("paddingTop"),a.css("paddingRight"),a.css("paddingBottom"),a.css("paddingLeft")];for(;b<4;b++){c[b]=parseInt(d[b],10)||0;c[b]+=parseInt(e[b],10)||0}return{height:c[0]+c[2],width:c[1]+c[3]}},_proportionallyResize:function(){if(!this._proportionallyResizeElements.length){return}var a,b=0,c=this.helper||this.element;for(;b<this._proportionallyResizeElements.length;b++){a=this._proportionallyResizeElements[b];if(!this.outerDimensions){this.outerDimensions=this._getPaddingPlusBorderDimensions(a)
}a.css({height:c.height()-this.outerDimensions.height||0,width:c.width()-this.outerDimensions.width||0})}},_renderProxy:function(){var b=this.element,c=this.options;this.elementOffset=b.offset();if(this._helper){this.helper=this.helper||a("<div style='overflow:hidden;'></div>");this.helper.addClass(this._helper).css({width:this.element.outerWidth()-1,height:this.element.outerHeight()-1,position:"absolute",left:this.elementOffset.left+"px",top:this.elementOffset.top+"px",zIndex:++c.zIndex});this.helper.appendTo("body").disableSelection()}else{this.helper=this.element}},_change:{e:function(a,b){return{width:this.originalSize.width+b}},w:function(a,b){var c=this.originalSize,d=this.originalPosition;return{left:d.left+b,width:c.width-b}},n:function(a,b,c){var d=this.originalSize,e=this.originalPosition;return{top:e.top+c,height:d.height-c}},s:function(a,b,c){return{height:this.originalSize.height+c}},se:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},sw:function(b,c,d){return a.extend(this._change.s.apply(this,arguments),this._change.w.apply(this,[b,c,d]))},ne:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.e.apply(this,[b,c,d]))},nw:function(b,c,d){return a.extend(this._change.n.apply(this,arguments),this._change.w.apply(this,[b,c,d]))}},_propagate:function(b,c){a.ui.plugin.call(this,b,[c,this.ui()]);b!=="resize"&&this._trigger(b,c,this.ui())},plugins:{},ui:function(){return{originalElement:this.originalElement,element:this.element,helper:this.helper,position:this.position,size:this.size,originalSize:this.originalSize,originalPosition:this.originalPosition}}});a.ui.plugin.add("resizable","animate",{stop:function(b){var c=a(this).resizable("instance"),d=c.options,e=c._proportionallyResizeElements,f=e.length&&/textarea/i.test(e[0].nodeName),g=f&&c._hasScroll(e[0],"left")?0:c.sizeDiff.height,h=f?0:c.sizeDiff.width,i={width:c.size.width-h,height:c.size.height-g},j=parseInt(c.element.css("left"),10)+(c.position.left-c.originalPosition.left)||null,k=parseInt(c.element.css("top"),10)+(c.position.top-c.originalPosition.top)||null;c.element.animate(a.extend(i,k&&j?{top:k,left:j}:{}),{duration:d.animateDuration,easing:d.animateEasing,step:function(){var d={width:parseInt(c.element.css("width"),10),height:parseInt(c.element.css("height"),10),top:parseInt(c.element.css("top"),10),left:parseInt(c.element.css("left"),10)};if(e&&e.length){a(e[0]).css({width:d.width,height:d.height})}c._updateCache(d);c._propagate("resize",b)}})}});a.ui.plugin.add("resizable","containment",{start:function(){var b,c,d,e,f,g,h,i=a(this).resizable("instance"),j=i.options,k=i.element,l=j.containment,m=l instanceof a?l.get(0):/parent/.test(l)?k.parent().get(0):l;if(!m){return}i.containerElement=a(m);if(/document/.test(l)||l===document){i.containerOffset={left:0,top:0};i.containerPosition={left:0,top:0};i.parentData={element:a(document),left:0,top:0,width:a(document).width(),height:a(document).height()||document.body.parentNode.scrollHeight}}else{b=a(m);c=[];a(["Top","Right","Left","Bottom"]).each(function(a,d){c[a]=i._num(b.css("padding"+d))});i.containerOffset=b.offset();i.containerPosition=b.position();i.containerSize={height:b.innerHeight()-c[3],width:b.innerWidth()-c[1]};d=i.containerOffset;e=i.containerSize.height;f=i.containerSize.width;g=i._hasScroll(m,"left")?m.scrollWidth:f;h=i._hasScroll(m)?m.scrollHeight:e;i.parentData={element:m,left:d.left,top:d.top,width:g,height:h}}},resize:function(b){var c,d,e,f,g=a(this).resizable("instance"),h=g.options,i=g.containerOffset,j=g.position,k=g._aspectRatio||b.shiftKey,l={top:0,left:0},m=g.containerElement,n=true;if(m[0]!==document&&/static/.test(m.css("position"))){l=i}if(j.left<(g._helper?i.left:0)){g.size.width=g.size.width+(g._helper?g.position.left-i.left:g.position.left-l.left);if(k){g.size.height=g.size.width/g.aspectRatio;n=false}g.position.left=h.helper?i.left:0}if(j.top<(g._helper?i.top:0)){g.size.height=g.size.height+(g._helper?g.position.top-i.top:g.position.top);if(k){g.size.width=g.size.height*g.aspectRatio;n=false}g.position.top=g._helper?i.top:0}e=g.containerElement.get(0)===g.element.parent().get(0);f=/relative|absolute/.test(g.containerElement.css("position"));if(e&&f){g.offset.left=g.parentData.left+g.position.left;g.offset.top=g.parentData.top+g.position.top}else{g.offset.left=g.element.offset().left;g.offset.top=g.element.offset().top}c=Math.abs(g.sizeDiff.width+(g._helper?g.offset.left-l.left:g.offset.left-i.left));d=Math.abs(g.sizeDiff.height+(g._helper?g.offset.top-l.top:g.offset.top-i.top));if(c+g.size.width>=g.parentData.width){g.size.width=g.parentData.width-c;if(k){g.size.height=g.size.width/g.aspectRatio;n=false}}if(d+g.size.height>=g.parentData.height){g.size.height=g.parentData.height-d;if(k){g.size.width=g.size.height*g.aspectRatio;n=false}}if(!n){g.position.left=g.prevPosition.left;g.position.top=g.prevPosition.top;g.size.width=g.prevSize.width;g.size.height=g.prevSize.height}},stop:function(){var b=a(this).resizable("instance"),c=b.options,d=b.containerOffset,e=b.containerPosition,f=b.containerElement,g=a(b.helper),h=g.offset(),i=g.outerWidth()-b.sizeDiff.width,j=g.outerHeight()-b.sizeDiff.height;if(b._helper&&!c.animate&&/relative/.test(f.css("position"))){a(this).css({left:h.left-e.left-d.left,width:i,height:j})}if(b._helper&&!c.animate&&/static/.test(f.css("position"))){a(this).css({left:h.left-e.left-d.left,width:i,height:j})}}});a.ui.plugin.add("resizable","alsoResize",{start:function(){var b=a(this).resizable("instance"),c=b.options,d=function(b){a(b).each(function(){var b=a(this);b.data("ui-resizable-alsoresize",{width:parseInt(b.width(),10),height:parseInt(b.height(),10),left:parseInt(b.css("left"),10),top:parseInt(b.css("top"),10)})})};if(typeof c.alsoResize==="object"&&!c.alsoResize.parentNode){if(c.alsoResize.length){c.alsoResize=c.alsoResize[0];d(c.alsoResize)}else{a.each(c.alsoResize,function(a){d(a)})}}else{d(c.alsoResize)}},resize:function(b,c){var d=a(this).resizable("instance"),e=d.options,f=d.originalSize,g=d.originalPosition,h={height:d.size.height-f.height||0,width:d.size.width-f.width||0,top:d.position.top-g.top||0,left:d.position.left-g.left||0},i=function(b,d){a(b).each(function(){var b=a(this),e=a(this).data("ui-resizable-alsoresize"),f={},g=d&&d.length?d:b.parents(c.originalElement[0]).length?["width","height"]:["width","height","top","left"];a.each(g,function(a,b){var c=(e[b]||0)+(h[b]||0);if(c&&c>=0){f[b]=c||null}});b.css(f)})};if(typeof e.alsoResize==="object"&&!e.alsoResize.nodeType){a.each(e.alsoResize,function(a,b){i(a,b)})}else{i(e.alsoResize)}},stop:function(){a(this).removeData("resizable-alsoresize")}});a.ui.plugin.add("resizable","ghost",{start:function(){var b=a(this).resizable("instance"),c=b.options,d=b.size;b.ghost=b.originalElement.clone();b.ghost.css({opacity:.25,display:"block",position:"relative",height:d.height,width:d.width,margin:0,left:0,top:0}).addClass("ui-resizable-ghost").addClass(typeof c.ghost==="string"?c.ghost:"");b.ghost.appendTo(b.helper)},resize:function(){var b=a(this).resizable("instance");if(b.ghost){b.ghost.css({position:"relative",height:b.size.height,width:b.size.width})}},stop:function(){var b=a(this).resizable("instance");if(b.ghost&&b.helper){b.helper.get(0).removeChild(b.ghost.get(0))}}});a.ui.plugin.add("resizable","grid",{resize:function(){var b,c=a(this).resizable("instance"),d=c.options,e=c.size,f=c.originalSize,g=c.originalPosition,h=c.axis,i=typeof d.grid==="number"?[d.grid,d.grid]:d.grid,j=i[0]||1,k=i[1]||1,l=Math.round((e.width-f.width)/j)*j,m=Math.round((e.height-f.height)/k)*k,n=f.width+l,o=f.height+m,p=d.maxWidth&&d.maxWidth<n,q=d.maxHeight&&d.maxHeight<o,r=d.minWidth&&d.minWidth>n,s=d.minHeight&&d.minHeight>o;d.grid=i;if(r){n+=j}if(s){o+=k}if(p){n-=j}if(q){o-=k}if(/^(se|s|e)$/.test(h)){c.size.width=n;c.size.height=o}else if(/^(ne)$/.test(h)){c.size.width=n;c.size.height=o;c.position.top=g.top-m}else if(/^(sw)$/.test(h)){c.size.width=n;c.size.height=o;c.position.left=g.left-l}else{if(o-k<=0||n-j<=0){b=c._getPaddingPlusBorderDimensions(this)}if(o-k>0){c.size.height=o;c.position.top=g.top-m}else{o=k-b.height;c.size.height=o;c.position.top=g.top+f.height-o}if(n-j>0){c.size.width=n;c.position.left=g.left-l}else{n=k-b.height;c.size.width=n;c.position.left=g.left+f.width-n}}}});var j=a.ui.resizable;var k=a.widget("ui.sortable",a.ui.mouse,{version:"1.11.1",widgetEventPrefix:"sort",ready:false,options:{appendTo:"parent",axis:false,connectWith:false,containment:false,cursor:"auto",cursorAt:false,dropOnEmpty:true,forcePlaceholderSize:false,forceHelperSize:false,grid:false,handle:false,helper:"original",items:"> *",opacity:false,placeholder:false,revert:false,scroll:true,scrollSensitivity:20,scrollSpeed:20,scope:"default",tolerance:"intersect",zIndex:1e3,activate:null,beforeStop:null,change:null,deactivate:null,out:null,over:null,receive:null,remove:null,sort:null,start:null,stop:null,update:null},_isOverAxis:function(a,b,c){return a>=b&&a<b+c},_isFloating:function(a){return/left|right/.test(a.css("float"))||/inline|table-cell/.test(a.css("display"))},_create:function(){var a=this.options;this.containerCache={};this.element.addClass("ui-sortable");this.refresh();this.floating=this.items.length?a.axis==="x"||this._isFloating(this.items[0].item):false;this.offset=this.element.offset();this._mouseInit();this._setHandleClassName();this.ready=true},_setOption:function(a,b){this._super(a,b);if(a==="handle"){this._setHandleClassName()}},_setHandleClassName:function(){this.element.find(".ui-sortable-handle").removeClass("ui-sortable-handle");a.each(this.items,function(){(this.instance.options.handle?this.item.find(this.instance.options.handle):this.item).addClass("ui-sortable-handle")})},_destroy:function(){this.element.removeClass("ui-sortable ui-sortable-disabled").find(".ui-sortable-handle").removeClass("ui-sortable-handle");this._mouseDestroy();for(var a=this.items.length-1;a>=0;a--){this.items[a].item.removeData(this.widgetName+"-item")}return this},_mouseCapture:function(b,c){var d=null,e=false,f=this;if(this.reverting){return false}if(this.options.disabled||this.options.type==="static"){return false}this._refreshItems(b);a(b.target).parents().each(function(){if(a.data(this,f.widgetName+"-item")===f){d=a(this);return false}});if(a.data(b.target,f.widgetName+"-item")===f){d=a(b.target)}if(!d){return false}if(this.options.handle&&!c){a(this.options.handle,d).find("*").addBack().each(function(){if(this===b.target){e=true}});if(!e){return false}}this.currentItem=d;this._removeCurrentsFromItems();return true},_mouseStart:function(b,c,d){var e,f,g=this.options;this.currentContainer=this;this.refreshPositions();this.helper=this._createHelper(b);this._cacheHelperProportions();this._cacheMargins();this.scrollParent=this.helper.scrollParent();this.offset=this.currentItem.offset();this.offset={top:this.offset.top-this.margins.top,left:this.offset.left-this.margins.left};a.extend(this.offset,{click:{left:b.pageX-this.offset.left,top:b.pageY-this.offset.top},parent:this._getParentOffset(),relative:this._getRelativeOffset()});this.helper.css("position","absolute");this.cssPosition=this.helper.css("position");this.originalPosition=this._generatePosition(b);this.originalPageX=b.pageX;this.originalPageY=b.pageY;g.cursorAt&&this._adjustOffsetFromHelper(g.cursorAt);this.domPosition={prev:this.currentItem.prev()[0],parent:this.currentItem.parent()[0]};if(this.helper[0]!==this.currentItem[0]){this.currentItem.hide()}this._createPlaceholder();if(g.containment){this._setContainment()}if(g.cursor&&g.cursor!=="auto"){f=this.document.find("body");this.storedCursor=f.css("cursor");f.css("cursor",g.cursor);this.storedStylesheet=a("<style>*{ cursor: "+g.cursor+" !important; }</style>").appendTo(f)}if(g.opacity){if(this.helper.css("opacity")){this._storedOpacity=this.helper.css("opacity")}this.helper.css("opacity",g.opacity)}if(g.zIndex){if(this.helper.css("zIndex")){this._storedZIndex=this.helper.css("zIndex")}this.helper.css("zIndex",g.zIndex)}if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){this.overflowOffset=this.scrollParent.offset()}this._trigger("start",b,this._uiHash());if(!this._preserveHelperProportions){this._cacheHelperProportions()}if(!d){for(e=this.containers.length-1;e>=0;e--){this.containers[e]._trigger("activate",b,this._uiHash(this))}}if(a.ui.ddmanager){a.ui.ddmanager.current=this}if(a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}this.dragging=true;this.helper.addClass("ui-sortable-helper");this._mouseDrag(b);return true},_mouseDrag:function(b){var c,d,e,f,g=this.options,h=false;this.position=this._generatePosition(b);this.positionAbs=this._convertPositionTo("absolute");if(!this.lastPositionAbs){this.lastPositionAbs=this.positionAbs}if(this.options.scroll){if(this.scrollParent[0]!==document&&this.scrollParent[0].tagName!=="HTML"){if(this.overflowOffset.top+this.scrollParent[0].offsetHeight-b.pageY<g.scrollSensitivity){this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop+g.scrollSpeed}else if(b.pageY-this.overflowOffset.top<g.scrollSensitivity){this.scrollParent[0].scrollTop=h=this.scrollParent[0].scrollTop-g.scrollSpeed}if(this.overflowOffset.left+this.scrollParent[0].offsetWidth-b.pageX<g.scrollSensitivity){this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft+g.scrollSpeed}else if(b.pageX-this.overflowOffset.left<g.scrollSensitivity){this.scrollParent[0].scrollLeft=h=this.scrollParent[0].scrollLeft-g.scrollSpeed}}else{if(b.pageY-a(document).scrollTop()<g.scrollSensitivity){h=a(document).scrollTop(a(document).scrollTop()-g.scrollSpeed)}else if(a(window).height()-(b.pageY-a(document).scrollTop())<g.scrollSensitivity){h=a(document).scrollTop(a(document).scrollTop()+g.scrollSpeed)}if(b.pageX-a(document).scrollLeft()<g.scrollSensitivity){h=a(document).scrollLeft(a(document).scrollLeft()-g.scrollSpeed)}else if(a(window).width()-(b.pageX-a(document).scrollLeft())<g.scrollSensitivity){h=a(document).scrollLeft(a(document).scrollLeft()+g.scrollSpeed)}}if(h!==false&&a.ui.ddmanager&&!g.dropBehaviour){a.ui.ddmanager.prepareOffsets(this,b)}}this.positionAbs=this._convertPositionTo("absolute");if(!this.options.axis||this.options.axis!=="y"){this.helper[0].style.left=this.position.left+"px"}if(!this.options.axis||this.options.axis!=="x"){this.helper[0].style.top=this.position.top+"px"}for(c=this.items.length-1;c>=0;c--){d=this.items[c];e=d.item[0];f=this._intersectsWithPointer(d);if(!f){continue}if(d.instance!==this.currentContainer){continue}if(e!==this.currentItem[0]&&this.placeholder[f===1?"next":"prev"]()[0]!==e&&!a.contains(this.placeholder[0],e)&&(this.options.type==="semi-dynamic"?!a.contains(this.element[0],e):true)){this.direction=f===1?"down":"up";if(this.options.tolerance==="pointer"||this._intersectsWithSides(d)){this._rearrange(b,d)}else{break}this._trigger("change",b,this._uiHash());break}}this._contactContainers(b);if(a.ui.ddmanager){a.ui.ddmanager.drag(this,b)}this._trigger("sort",b,this._uiHash());this.lastPositionAbs=this.positionAbs;return false},_mouseStop:function(b,c){if(!b){return}if(a.ui.ddmanager&&!this.options.dropBehaviour){a.ui.ddmanager.drop(this,b)}if(this.options.revert){var d=this,e=this.placeholder.offset(),f=this.options.axis,g={};if(!f||f==="x"){g.left=e.left-this.offset.parent.left-this.margins.left+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollLeft)}if(!f||f==="y"){g.top=e.top-this.offset.parent.top-this.margins.top+(this.offsetParent[0]===document.body?0:this.offsetParent[0].scrollTop)}this.reverting=true;a(this.helper).animate(g,parseInt(this.options.revert,10)||500,function(){d._clear(b)})}else{this._clear(b,c)}return false},cancel:function(){if(this.dragging){this._mouseUp({target:null});if(this.options.helper==="original"){this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}for(var b=this.containers.length-1;b>=0;b--){this.containers[b]._trigger("deactivate",null,this._uiHash(this));if(this.containers[b].containerCache.over){this.containers[b]._trigger("out",null,this._uiHash(this));this.containers[b].containerCache.over=0}}}if(this.placeholder){if(this.placeholder[0].parentNode){this.placeholder[0].parentNode.removeChild(this.placeholder[0])}if(this.options.helper!=="original"&&this.helper&&this.helper[0].parentNode){this.helper.remove()}a.extend(this,{helper:null,dragging:false,reverting:false,_noFinalSort:null});if(this.domPosition.prev){a(this.domPosition.prev).after(this.currentItem)}else{a(this.domPosition.parent).prepend(this.currentItem)}}return this},serialize:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{};a(c).each(function(){var c=(a(b.item||this).attr(b.attribute||"id")||"").match(b.expression||/(.+)[\-=_](.+)/);if(c){d.push((b.key||c[1]+"[]")+"="+(b.key&&b.expression?c[1]:c[2]))}});if(!d.length&&b.key){d.push(b.key+"=")}return d.join("&")},toArray:function(b){var c=this._getItemsAsjQuery(b&&b.connected),d=[];b=b||{};c.each(function(){d.push(a(b.item||this).attr(b.attribute||"id")||"")});return d},_intersectsWith:function(a){var b=this.positionAbs.left,c=b+this.helperProportions.width,d=this.positionAbs.top,e=d+this.helperProportions.height,f=a.left,g=f+a.width,h=a.top,i=h+a.height,j=this.offset.click.top,k=this.offset.click.left,l=this.options.axis==="x"||d+j>h&&d+j<i,m=this.options.axis==="y"||b+k>f&&b+k<g,n=l&&m;if(this.options.tolerance==="pointer"||this.options.forcePointerForContainers||this.options.tolerance!=="pointer"&&this.helperProportions[this.floating?"width":"height"]>a[this.floating?"width":"height"]){return n}else{return f<b+this.helperProportions.width/2&&c-this.helperProportions.width/2<g&&h<d+this.helperProportions.height/2&&e-this.helperProportions.height/2<i}},_intersectsWithPointer:function(a){var b=this.options.axis==="x"||this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top,a.height),c=this.options.axis==="y"||this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left,a.width),d=b&&c,e=this._getDragVerticalDirection(),f=this._getDragHorizontalDirection();if(!d){return false}return this.floating?f&&f==="right"||e==="down"?2:1:e&&(e==="down"?2:1)},_intersectsWithSides:function(a){var b=this._isOverAxis(this.positionAbs.top+this.offset.click.top,a.top+a.height/2,a.height),c=this._isOverAxis(this.positionAbs.left+this.offset.click.left,a.left+a.width/2,a.width),d=this._getDragVerticalDirection(),e=this._getDragHorizontalDirection();if(this.floating&&e){return e==="right"&&c||e==="left"&&!c}else{return d&&(d==="down"&&b||d==="up"&&!b)}},_getDragVerticalDirection:function(){var a=this.positionAbs.top-this.lastPositionAbs.top;return a!==0&&(a>0?"down":"up")},_getDragHorizontalDirection:function(){var a=this.positionAbs.left-this.lastPositionAbs.left;return a!==0&&(a>0?"right":"left")},refresh:function(a){this._refreshItems(a);this._setHandleClassName();this.refreshPositions();return this},_connectWith:function(){var a=this.options;return a.connectWith.constructor===String?[a.connectWith]:a.connectWith},_getItemsAsjQuery:function(b){var c,d,e,f,g=[],h=[],i=this._connectWith();if(i&&b){for(c=i.length-1;c>=0;c--){e=a(i[c]);for(d=e.length-1;d>=0;d--){f=a.data(e[d],this.widgetFullName);if(f&&f!==this&&!f.options.disabled){h.push([a.isFunction(f.options.items)?f.options.items.call(f.element):a(f.options.items,f.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),f])}}}}h.push([a.isFunction(this.options.items)?this.options.items.call(this.element,null,{options:this.options,item:this.currentItem}):a(this.options.items,this.element).not(".ui-sortable-helper").not(".ui-sortable-placeholder"),this]);function j(){g.push(this)}for(c=h.length-1;c>=0;c--){h[c][0].each(j)}return a(g)},_removeCurrentsFromItems:function(){var b=this.currentItem.find(":data("+this.widgetName+"-item)");this.items=a.grep(this.items,function(a){for(var c=0;c<b.length;c++){if(b[c]===a.item[0]){return false}}return true})},_refreshItems:function(b){this.items=[];this.containers=[this];var c,d,e,f,g,h,i,j,k=this.items,l=[[a.isFunction(this.options.items)?this.options.items.call(this.element[0],b,{item:this.currentItem}):a(this.options.items,this.element),this]],m=this._connectWith();if(m&&this.ready){for(c=m.length-1;c>=0;c--){e=a(m[c]);for(d=e.length-1;d>=0;d--){f=a.data(e[d],this.widgetFullName);if(f&&f!==this&&!f.options.disabled){l.push([a.isFunction(f.options.items)?f.options.items.call(f.element[0],b,{item:this.currentItem}):a(f.options.items,f.element),f]);this.containers.push(f)}}}}for(c=l.length-1;c>=0;c--){g=l[c][1];h=l[c][0];for(d=0,j=h.length;d<j;d++){i=a(h[d]);i.data(this.widgetName+"-item",g);k.push({item:i,instance:g,width:0,height:0,left:0,top:0})}}},refreshPositions:function(b){if(this.offsetParent&&this.helper){this.offset.parent=this._getParentOffset()}var c,d,e,f;for(c=this.items.length-1;c>=0;c--){d=this.items[c];if(d.instance!==this.currentContainer&&this.currentContainer&&d.item[0]!==this.currentItem[0]){continue}e=this.options.toleranceElement?a(this.options.toleranceElement,d.item):d.item;if(!b){d.width=e.outerWidth();d.height=e.outerHeight()}f=e.offset();d.left=f.left;d.top=f.top}if(this.options.custom&&this.options.custom.refreshContainers){this.options.custom.refreshContainers.call(this)}else{for(c=this.containers.length-1;c>=0;c--){f=this.containers[c].element.offset();this.containers[c].containerCache.left=f.left;this.containers[c].containerCache.top=f.top;this.containers[c].containerCache.width=this.containers[c].element.outerWidth();this.containers[c].containerCache.height=this.containers[c].element.outerHeight()}}return this},_createPlaceholder:function(b){b=b||this;var c,d=b.options;if(!d.placeholder||d.placeholder.constructor===String){c=d.placeholder;d.placeholder={element:function(){var d=b.currentItem[0].nodeName.toLowerCase(),e=a("<"+d+">",b.document[0]).addClass(c||b.currentItem[0].className+" ui-sortable-placeholder").removeClass("ui-sortable-helper");if(d==="tr"){b.currentItem.children().each(function(){a("<td>&#160;</td>",b.document[0]).attr("colspan",a(this).attr("colspan")||1).appendTo(e)})}else if(d==="img"){e.attr("src",b.currentItem.attr("src"))}if(!c){e.css("visibility","hidden")}return e},update:function(a,e){if(c&&!d.forcePlaceholderSize){return}if(!e.height()){e.height(b.currentItem.innerHeight()-parseInt(b.currentItem.css("paddingTop")||0,10)-parseInt(b.currentItem.css("paddingBottom")||0,10))}if(!e.width()){e.width(b.currentItem.innerWidth()-parseInt(b.currentItem.css("paddingLeft")||0,10)-parseInt(b.currentItem.css("paddingRight")||0,10))}}}}b.placeholder=a(d.placeholder.element.call(b.element,b.currentItem));b.currentItem.after(b.placeholder);d.placeholder.update(b,b.placeholder)},_contactContainers:function(b){var c,d,e,f,g,h,i,j,k,l,m=null,n=null;for(c=this.containers.length-1;c>=0;c--){if(a.contains(this.currentItem[0],this.containers[c].element[0])){continue}if(this._intersectsWith(this.containers[c].containerCache)){if(m&&a.contains(this.containers[c].element[0],m.element[0])){continue}m=this.containers[c];n=c}else{if(this.containers[c].containerCache.over){this.containers[c]._trigger("out",b,this._uiHash(this));this.containers[c].containerCache.over=0}}}if(!m){return}if(this.containers.length===1){if(!this.containers[n].containerCache.over){this.containers[n]._trigger("over",b,this._uiHash(this));this.containers[n].containerCache.over=1}}else{e=1e4;f=null;k=m.floating||this._isFloating(this.currentItem);g=k?"left":"top";h=k?"width":"height";l=k?"clientX":"clientY";for(d=this.items.length-1;d>=0;d--){if(!a.contains(this.containers[n].element[0],this.items[d].item[0])){continue}if(this.items[d].item[0]===this.currentItem[0]){continue}i=this.items[d].item.offset()[g];j=false;if(b[l]-i>this.items[d][h]/2){j=true}if(Math.abs(b[l]-i)<e){e=Math.abs(b[l]-i);f=this.items[d];this.direction=j?"up":"down"}}if(!f&&!this.options.dropOnEmpty){return}if(this.currentContainer===this.containers[n]){return}f?this._rearrange(b,f,null,true):this._rearrange(b,null,this.containers[n].element,true);this._trigger("change",b,this._uiHash());this.containers[n]._trigger("change",b,this._uiHash(this));this.currentContainer=this.containers[n];this.options.placeholder.update(this.currentContainer,this.placeholder);this.containers[n]._trigger("over",b,this._uiHash(this));this.containers[n].containerCache.over=1}},_createHelper:function(b){var c=this.options,d=a.isFunction(c.helper)?a(c.helper.apply(this.element[0],[b,this.currentItem])):c.helper==="clone"?this.currentItem.clone():this.currentItem;if(!d.parents("body").length){a(c.appendTo!=="parent"?c.appendTo:this.currentItem[0].parentNode)[0].appendChild(d[0])}if(d[0]===this.currentItem[0]){this._storedCSS={width:this.currentItem[0].style.width,height:this.currentItem[0].style.height,position:this.currentItem.css("position"),top:this.currentItem.css("top"),left:this.currentItem.css("left")}}if(!d[0].style.width||c.forceHelperSize){d.width(this.currentItem.width())}if(!d[0].style.height||c.forceHelperSize){d.height(this.currentItem.height())}return d},_adjustOffsetFromHelper:function(b){if(typeof b==="string"){b=b.split(" ")}if(a.isArray(b)){b={left:+b[0],top:+b[1]||0}}if("left"in b){this.offset.click.left=b.left+this.margins.left}if("right"in b){this.offset.click.left=this.helperProportions.width-b.right+this.margins.left}if("top"in b){this.offset.click.top=b.top+this.margins.top}if("bottom"in b){this.offset.click.top=this.helperProportions.height-b.bottom+this.margins.top}},_getParentOffset:function(){this.offsetParent=this.helper.offsetParent();var b=this.offsetParent.offset();if(this.cssPosition==="absolute"&&this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0])){b.left+=this.scrollParent.scrollLeft();b.top+=this.scrollParent.scrollTop()}if(this.offsetParent[0]===document.body||this.offsetParent[0].tagName&&this.offsetParent[0].tagName.toLowerCase()==="html"&&a.ui.ie){b={top:0,left:0}}return{top:b.top+(parseInt(this.offsetParent.css("borderTopWidth"),10)||0),left:b.left+(parseInt(this.offsetParent.css("borderLeftWidth"),10)||0)}},_getRelativeOffset:function(){if(this.cssPosition==="relative"){var a=this.currentItem.position();return{top:a.top-(parseInt(this.helper.css("top"),10)||0)+this.scrollParent.scrollTop(),left:a.left-(parseInt(this.helper.css("left"),10)||0)+this.scrollParent.scrollLeft()}}else{return{top:0,left:0}}},_cacheMargins:function(){this.margins={left:parseInt(this.currentItem.css("marginLeft"),10)||0,top:parseInt(this.currentItem.css("marginTop"),10)||0}},_cacheHelperProportions:function(){this.helperProportions={width:this.helper.outerWidth(),height:this.helper.outerHeight()}},_setContainment:function(){var b,c,d,e=this.options;if(e.containment==="parent"){e.containment=this.helper[0].parentNode}if(e.containment==="document"||e.containment==="window"){this.containment=[0-this.offset.relative.left-this.offset.parent.left,0-this.offset.relative.top-this.offset.parent.top,a(e.containment==="document"?document:window).width()-this.helperProportions.width-this.margins.left,(a(e.containment==="document"?document:window).height()||document.body.parentNode.scrollHeight)-this.helperProportions.height-this.margins.top]}if(!/^(document|window|parent)$/.test(e.containment)){b=a(e.containment)[0];c=a(e.containment).offset();d=a(b).css("overflow")!=="hidden";this.containment=[c.left+(parseInt(a(b).css("borderLeftWidth"),10)||0)+(parseInt(a(b).css("paddingLeft"),10)||0)-this.margins.left,c.top+(parseInt(a(b).css("borderTopWidth"),10)||0)+(parseInt(a(b).css("paddingTop"),10)||0)-this.margins.top,c.left+(d?Math.max(b.scrollWidth,b.offsetWidth):b.offsetWidth)-(parseInt(a(b).css("borderLeftWidth"),10)||0)-(parseInt(a(b).css("paddingRight"),10)||0)-this.helperProportions.width-this.margins.left,c.top+(d?Math.max(b.scrollHeight,b.offsetHeight):b.offsetHeight)-(parseInt(a(b).css("borderTopWidth"),10)||0)-(parseInt(a(b).css("paddingBottom"),10)||0)-this.helperProportions.height-this.margins.top]}},_convertPositionTo:function(b,c){if(!c){c=this.position}var d=b==="absolute"?1:-1,e=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,f=/(html|body)/i.test(e[0].tagName);return{top:c.top+this.offset.relative.top*d+this.offset.parent.top*d-(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():f?0:e.scrollTop())*d,left:c.left+this.offset.relative.left*d+this.offset.parent.left*d-(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():f?0:e.scrollLeft())*d}},_generatePosition:function(b){var c,d,e=this.options,f=b.pageX,g=b.pageY,h=this.cssPosition==="absolute"&&!(this.scrollParent[0]!==document&&a.contains(this.scrollParent[0],this.offsetParent[0]))?this.offsetParent:this.scrollParent,i=/(html|body)/i.test(h[0].tagName);if(this.cssPosition==="relative"&&!(this.scrollParent[0]!==document&&this.scrollParent[0]!==this.offsetParent[0])){this.offset.relative=this._getRelativeOffset()}if(this.originalPosition){if(this.containment){if(b.pageX-this.offset.click.left<this.containment[0]){f=this.containment[0]+this.offset.click.left}if(b.pageY-this.offset.click.top<this.containment[1]){g=this.containment[1]+this.offset.click.top}if(b.pageX-this.offset.click.left>this.containment[2]){f=this.containment[2]+this.offset.click.left}if(b.pageY-this.offset.click.top>this.containment[3]){g=this.containment[3]+this.offset.click.top}}if(e.grid){c=this.originalPageY+Math.round((g-this.originalPageY)/e.grid[1])*e.grid[1];g=this.containment?c-this.offset.click.top>=this.containment[1]&&c-this.offset.click.top<=this.containment[3]?c:c-this.offset.click.top>=this.containment[1]?c-e.grid[1]:c+e.grid[1]:c;d=this.originalPageX+Math.round((f-this.originalPageX)/e.grid[0])*e.grid[0];f=this.containment?d-this.offset.click.left>=this.containment[0]&&d-this.offset.click.left<=this.containment[2]?d:d-this.offset.click.left>=this.containment[0]?d-e.grid[0]:d+e.grid[0]:d}}return{top:g-this.offset.click.top-this.offset.relative.top-this.offset.parent.top+(this.cssPosition==="fixed"?-this.scrollParent.scrollTop():i?0:h.scrollTop()),left:f-this.offset.click.left-this.offset.relative.left-this.offset.parent.left+(this.cssPosition==="fixed"?-this.scrollParent.scrollLeft():i?0:h.scrollLeft())}},_rearrange:function(a,b,c,d){c?c[0].appendChild(this.placeholder[0]):b.item[0].parentNode.insertBefore(this.placeholder[0],this.direction==="down"?b.item[0]:b.item[0].nextSibling);this.counter=this.counter?++this.counter:1;var e=this.counter;this._delay(function(){if(e===this.counter){this.refreshPositions(!d)}})},_clear:function(a,b){this.reverting=false;var c,d=[];if(!this._noFinalSort&&this.currentItem.parent().length){this.placeholder.before(this.currentItem)}this._noFinalSort=null;if(this.helper[0]===this.currentItem[0]){for(c in this._storedCSS){if(this._storedCSS[c]==="auto"||this._storedCSS[c]==="static"){this._storedCSS[c]=""}}this.currentItem.css(this._storedCSS).removeClass("ui-sortable-helper")}else{this.currentItem.show()}if(this.fromOutside&&!b){d.push(function(a){this._trigger("receive",a,this._uiHash(this.fromOutside))})}if((this.fromOutside||this.domPosition.prev!==this.currentItem.prev().not(".ui-sortable-helper")[0]||this.domPosition.parent!==this.currentItem.parent()[0])&&!b){d.push(function(a){this._trigger("update",a,this._uiHash())})}if(this!==this.currentContainer){if(!b){d.push(function(a){this._trigger("remove",a,this._uiHash())});d.push(function(a){return function(b){a._trigger("receive",b,this._uiHash(this))}}.call(this,this.currentContainer));d.push(function(a){return function(b){a._trigger("update",b,this._uiHash(this))}}.call(this,this.currentContainer))}}function e(a,b,c){return function(d){c._trigger(a,d,b._uiHash(b))}}for(c=this.containers.length-1;c>=0;c--){if(!b){d.push(e("deactivate",this,this.containers[c]))}if(this.containers[c].containerCache.over){d.push(e("out",this,this.containers[c]));
this.containers[c].containerCache.over=0}}if(this.storedCursor){this.document.find("body").css("cursor",this.storedCursor);this.storedStylesheet.remove()}if(this._storedOpacity){this.helper.css("opacity",this._storedOpacity)}if(this._storedZIndex){this.helper.css("zIndex",this._storedZIndex==="auto"?"":this._storedZIndex)}this.dragging=false;if(this.cancelHelperRemoval){if(!b){this._trigger("beforeStop",a,this._uiHash());for(c=0;c<d.length;c++){d[c].call(this,a)}this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return false}if(!b){this._trigger("beforeStop",a,this._uiHash())}this.placeholder[0].parentNode.removeChild(this.placeholder[0]);if(this.helper[0]!==this.currentItem[0]){this.helper.remove()}this.helper=null;if(!b){for(c=0;c<d.length;c++){d[c].call(this,a)}this._trigger("stop",a,this._uiHash())}this.fromOutside=false;return true},_trigger:function(){if(a.Widget.prototype._trigger.apply(this,arguments)===false){this.cancel()}},_uiHash:function(b){var c=b||this;return{helper:c.helper,placeholder:c.placeholder||a([]),position:c.position,originalPosition:c.originalPosition,offset:c.positionAbs,item:c.currentItem,sender:b?b.element:null}}})});(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)})};a.fn.isScrollBottom=b;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="TrackpadScrollEmulator";function c(c,d){var e=c;var f=a(c);var g;var h=f.find(".tse-content");var i;var j;var k;var l;var m=7/8;var n="vert";var o="scrollTop";var p="height";var q="top";d=a.extend({},a.fn[b].defaults,d);function r(){if(f.hasClass("horizontal")){n="horiz";o="scrollLeft";p="width";q="left"}f.prepend('<div class="tse-scrollbar"><div class="drag-handle"></div></div>');i=f.find(".tse-scrollbar");j=f.find(".drag-handle");if(d.wrapContent){h.wrap('<div class="tse-scroll-content" />')}g=f.find(".tse-scroll-content");B();if(d.autoHide){f.on("mouseenter",y)}j.on("mousedown",s);i.on("mousedown",v);g.on("scroll",w);x();a(window).on("resize",function(){D()});if(!d.autoHide){z()}}function s(b){b.preventDefault();var c=a(this);c.trigger("startDrag");var d=b.pageY;if(n==="horiz"){d=b.pageX}k=d-j.offset()[q];a(document).on("mousemove",t);a(document).on("mouseup",function(){u.call(c)})}function t(a){a.preventDefault();var b=a.pageY;if(n==="horiz"){b=a.pageX}var c=b-i.offset()[q]-k;var d=c/i[p]();var e=d*h[p]();g[o](e)}function u(){a(this).trigger("endDrag");a(document).off("mousemove",t);a(document).off("mouseup",u)}function v(a){if(a.target===j[0]){return}var b=m*g[p]();var c=n==="vert"?a.originalEvent.layerY:a.originalEvent.layerX;var d=j.position()[q];var e=c<d?g[o]()-b:g[o]()+b;g[o](e)}function w(a){y()}function x(){var a=h[p]();var b=g[o]();var c=i[p]();var d=c/a;var e=Math.round(d*b)+2;var f=Math.floor(d*(c-2))-2;if(c<a){if(n==="vert"){j.css({top:e,height:f})}else{j.css({left:e,width:f})}i.show()}else{i.hide()}}function y(){x();z()}function z(){j.addClass("visible");if(!d.autoHide){return}if(typeof l==="number"){window.clearTimeout(l)}l=window.setTimeout(function(){A()},1e3)}function A(){j.removeClass("visible");if(typeof l==="number"){window.clearTimeout(l)}}function B(){if(n==="vert"){g.width(f.width()+C());g.height(f.height())}else{g.width(f.width());g.height(f.height()+C());h.height(f.height())}}function C(){var b=a('<div class="scrollbar-width-tester" style="width:50px;height:50px;overflow-y:scroll;position:absolute;top:-200px;left:-200px;"><div style="height:100px;"></div>');a("body").append(b);var c=a(b).innerWidth();var d=a("div",b).innerWidth();b.remove();if(c===d&&navigator.userAgent.toLowerCase().indexOf("firefox")>-1){return 17}return c-d}function D(){B();x()}function E(a,b){if(b){d[a]=b}else{return d[a]}}function F(){h.insertBefore(i);i.remove();g.remove();h.css({height:f.height()+"px","overflow-y":"scroll"});G("onDestroy");f.removeData("plugin_"+b)}function G(a){if(d[a]!==undefined){d[a].call(e)}}r();return{option:E,destroy:F,recalculate:D}}a.fn[b]=function(d){if(typeof arguments[0]==="string"){var e=arguments[0];var f=Array.prototype.slice.call(arguments,1);var g;this.each(function(){if(a.data(this,"plugin_"+b)&&typeof a.data(this,"plugin_"+b)[e]==="function"){g=a.data(this,"plugin_"+b)[e].apply(this,f)}else{throw new Error("Method "+e+" does not exist on jQuery."+b)}});if(g!==undefined){return g}else{return this}}else if(typeof d==="object"||!d){return this.each(function(){if(!a.data(this,"plugin_"+b)){a.data(this,"plugin_"+b,new c(this,d))}})}};a.fn[b].defaults={onInit:function(){},onDestroy:function(){},wrapContent:true,autoHide:true}})(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,b){var c="granted",d="denied",e="unknown";var f=[],g,h=0;function i(a){if(f.length===0){f=[b.title]}f.push(a);if(!g){g=setInterval(function(){if(f.indexOf(b.title)===-1){f[0]=b.title}b.title=f[++h%f.length]},1e3)}}function j(){if(f.length===0){return}if("external"in a&&"msSiteModeClearIconOverlay"in a.external){a.external.msSiteModeClearIconOverlay()}clearInterval(g);g=false;b.title=f[0];f=[]}function k(a,b,c){if(b.match(" ")){var d=b.split(" ");for(var e=0;e<d.length;e++){k(a,d[e],c)}}if(a.addEventListener){a.removeEventListener(b,c,false);a.addEventListener(b,c,false)}else{a.detachEvent("on"+b,c);a.attachEvent("on"+b,c)}}function l(){if("external"in a&&"msIsSiteMode"in a.external){return a.external.msIsSiteMode()?c:e}else if("webkitNotifications"in a){return a.webkitNotifications.checkPermission()===0?c:d}else if("mozNotification"in a.navigator){return c}else{return e}}function m(){a.Notification.permission=l();return a.Notification.permission}if(!Object(a.Notification).permission){k(a,"focus scroll click",j);a.Notification=function(b,c){if(!(this instanceof a.Notification)){return new a.Notification(b,c)}var d,e=this;c=c||{};this.body=c.body||"";this.icon=c.icon||"";this.lang=c.lang||"";this.tag=c.tag||"";this.close=function(){j();if(Object(d).close){d.close()}e.onclose()};this.onclick=function(){};this.onclose=function(){};i(b);if("external"in a&&"msIsSiteMode"in a.external){if(a.external.msIsSiteMode()){a.external.msSiteModeActivate();if(this.icon){a.external.msSiteModeSetIconOverlay(this.icon,b)}}}else if("webkitNotifications"in a){if(a.webkitNotifications.checkPermission()===0){d=a.webkitNotifications.createNotification(this.icon,b,this.body);d.show();d.onclick=function(){e.onclick();a.focus();setTimeout(function(){d.cancel()},1e3)}}}else if("mozNotification"in a.navigator){var f=a.navigator.mozNotification.createNotification(b,this.body,this.icon);f.show()}};a.Notification.requestPermission=function(b){b=b||function(){};if("external"in a&&"msIsSiteMode"in a.external){try{if(!a.external.msIsSiteMode()){a.external.msAddSiteMode();b(e)}}catch(c){}b(m())}else if("webkitNotifications"in a){a.webkitNotifications.requestPermission(function(){b(m())})}else{b(m())}};m()}})(window,document);!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){a.stringcolor=function(a){return"#"+stringcolor(a)};a.fn.stringcolor=function(b,c){if(!b||!c){throw new Error("$(selector).string_to_color() takes 2 arguments")}return this.each(function(){var d=[].concat(b);var e=a(this);a.map(d,function(b){e.css(b,a.stringcolor(c))})})}})(jQuery);function string_to_color(a){var b=function(a){var b=0;for(var c=0;c<a.length;c++){b=a.charCodeAt(c)+((b<<5)-b)}return b};var c=function(a,b){var c=parseInt(a,16),d=Math.round(2.55*b),e=(c>>16)+d,f=(c>>8&255)+d,g=(c&255)+d;return(16777216+(e<255?e<1?0:e:255)*65536+(f<255?f<1?0:f:255)*256+(g<255?g<1?0:g:255)).toString(16).slice(1)};var d=function(a){var b=(a>>24&255).toString(16)+(a>>16&255).toString(16)+(a>>8&255).toString(16)+(a&255).toString(16);return b};return c(d(b(a)),-10)}var cache={};function stringcolor(a){return cache[a]=cache[a]||string_to_color(a)}(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.14.1";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",audio:"src",video:"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){try{return f[b](c+"").replace(f.characters[a][b].expression,function(c){return f.characters[a][b].map[c]})}catch(d){return 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(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=a.lastIndexOf("@",c>-1?c:a.length-1);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,i,j;for(var k=0;k<e;k++){g=d[k].split("=");i=f.decodeQuery(g.shift(),b);j=g.length?f.decodeQuery(g.join("="),b):null;if(h.call(c,i)){if(typeof c[i]==="string"){c[i]=[c[i]]}c[i].push(j)}else{c[i]=j}}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};function t(a){return function(b,c){if(b===undefined){return this._parts[a]||""}else{this._parts[a]=b||null;this.build(!c);return this}}}function u(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}}}g.protocol=t("protocol");g.username=t("username");g.password=t("password");g.hostname=t("hostname");g.port=t("port");g.query=u("query","?");g.fragment=u("fragment","#");g.search=function(a,b){var c=this.query(a,b);return typeof c==="string"&&c.length?"?"+c:c};g.hash=function(a,b){var c=this.fragment(a,b);return typeof c==="string"&&c.length?"#"+c:c};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"||a instanceof String){this._parts=f.parse(String(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 v=g.protocol;var w=g.port;var x=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 v.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 w.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 x.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){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"||b instanceof 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 y=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 y.call(this,a,b)}};g.setQuery=function(a,b,c){var d=f.parseQuery(this._parts.query,this._parts.escapeQuerySpace);if(typeof a==="string"||a instanceof String){d[a]=b!==undefined?b:null}else if(typeof a==="object"){for(var e in a){if(h.call(a,e)){d[e]=a[e]}}}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});