function KwsSdk(e){if(!(this instanceof KwsSdk))return new KwsSdk(e);var t="2.3.0",n=this;if(n.opts=e,!n.opts)throw new Error("opts param missing");if(!n.opts.clientId)throw new Error("clientId missing");if(!n.opts.clubUrl)throw new Error("clubUrl missing");if(!n.opts.kwsApiHost)throw new Error("kwsApiHost missing");if(n.jQuery=jQueryKws.noConflict(),n.currentApiVersion=2,n.unordered={v1:{"app.leader.list":{alias:null},"app.user.appData.list":{alias:null},"app.user.appData.set":{alias:null},"app.user.appData.deleteByName":{alias:null},"app.user.getHasDeviceToken":{alias:null},"app.webhook.getNames":{alias:null},"user.notification.list":{alias:null},"user.notification.read":{alias:null},"user.create":{alias:null},"user.get":{alias:null},"user.update":{alias:null},"user.triggerEvent":{alias:null},"user.hasTriggeredEvent":{alias:null},"user.requestPermissions":{alias:null},"user.inviteUser":{alias:null},"webhook.getNames":{alias:null}},v2:{"app.user.get":{alias:null},"app.user.getPoints":{alias:"app.user.getAppPoints"},"app.user.getScore":{alias:null},"app.getRandomDisplayName":{alias:null},"user.getPoints":{alias:"app.user.getGlobalPoints"}}},n.opts.endpoints&&Object.keys(n.opts.endpoints).forEach(function(e){var t=n.opts.endpoints[e];void 0===n.unordered[e]?n.unordered[e]=t:Object.keys(t).forEach(function(i){n.unordered[e][i]=t[i]})}),n.endpoints={},Object.keys(n.unordered).sort(function(e,t){return parseInt(e.split("v")[1])>parseInt(t.split("v")[1])}).forEach(function(e){n.endpoints[e]=n.unordered[e]}),n.singularList=["appData"].concat(n.opts.singularList||[]),n.opts.language=n.opts.language||"en",n.opts.withoutNotifications=n.opts.withoutNotifications||!1,n.opts.callbackHost=n.opts.callbackHost||window.location.protocol+"//"+window.location.host,n.opts.implicit=n.opts.implicit||!1,n.opts.websocketsHost?n.opts.kwsWebsocketsHost=n.opts.websocketsHost:(-1===n.opts.kwsApiHost.indexOf("kwsapi")&&console.warn('Option "websocketsHost" not passed and could not be detected from kwsApiHost value. Websockets will not be used and functionality of notifications will be reduced until this is rectified.'),n.opts.kwsWebsocketsHost=n.opts.kwsApiHost.replace("kwsapi","kwswebsockets")),n.opts.token&&(n.userToken=n.opts.token),!n.userToken&&n.opts.implicit&&0===window.location.hash.indexOf("#token=")){var i=window.location.hash.substring("#token=".length);n.userToken=i,n.saveTokens()}n.getUserListeners=[],n.apiFunctionFactory(n.endpoints,n.singularList),n.jQuery("<link />").appendTo("head").attr({rel:"stylesheet",type:"text/css",href:"https://kws-sdk.superawesome.tv?v="+t+"&assets"}),n.init()}!function(e,t){"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQueryKws requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(e,t){function n(e){var t=!!e&&"length"in e&&e.length,n=re.type(e);return"function"===n||re.isWindow(e)?!1:"array"===n||0===t||"number"==typeof t&&t>0&&t-1 in e}function i(e,t,n){if(re.isFunction(t))return re.grep(e,function(e,i){return!!t.call(e,i,e)!==n});if(t.nodeType)return re.grep(e,function(e){return e===t!==n});if("string"==typeof t){if(ge.test(t))return re.filter(t,e,n);t=re.filter(t,e)}return re.grep(e,function(e){return Z.call(t,e)>-1!==n})}function o(e,t){for(;(e=e[t])&&1!==e.nodeType;);return e}function r(e){var t={};return re.each(e.match(xe)||[],function(e,n){t[n]=!0}),t}function s(){V.removeEventListener("DOMContentLoaded",s),e.removeEventListener("load",s),re.ready()}function a(){this.expando=re.expando+a.uid++}function c(e,t,n){var i;if(void 0===n&&1===e.nodeType)if(i="data-"+t.replace(Ne,"-$&").toLowerCase(),n=e.getAttribute(i),"string"==typeof n){try{n="true"===n?!0:"false"===n?!1:"null"===n?null:+n+""===n?+n:Se.test(n)?re.parseJSON(n):n}catch(o){}Ae.set(e,t,n)}else n=void 0;return n}function u(e,t,n,i){var o,r=1,s=20,a=i?function(){return i.cur()}:function(){return re.css(e,t,"")},c=a(),u=n&&n[3]||(re.cssNumber[t]?"":"px"),l=(re.cssNumber[t]||"px"!==u&&+c)&&je.exec(re.css(e,t));if(l&&l[3]!==u){u=u||l[3],n=n||[],l=+c||1;do r=r||".5",l/=r,re.style(e,t,l+u);while(r!==(r=a()/c)&&1!==r&&--s)}return n&&(l=+l||+c||0,o=n[1]?l+(n[1]+1)*n[2]:+n[2],i&&(i.unit=u,i.start=l,i.end=o)),o}function l(e,t){var n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[];return void 0===t||t&&re.nodeName(e,t)?re.merge([e],n):n}function p(e,t){for(var n=0,i=e.length;i>n;n++)Ee.set(e[n],"globalEval",!t||Ee.get(t[n],"globalEval"))}function f(e,t,n,i,o){for(var r,s,a,c,u,f,h=t.createDocumentFragment(),d=[],g=0,m=e.length;m>g;g++)if(r=e[g],r||0===r)if("object"===re.type(r))re.merge(d,r.nodeType?[r]:r);else if(Le.test(r)){for(s=s||h.appendChild(t.createElement("div")),a=(Oe.exec(r)||["",""])[1].toLowerCase(),c=Be[a]||Be._default,s.innerHTML=c[1]+re.htmlPrefilter(r)+c[2],f=c[0];f--;)s=s.lastChild;re.merge(d,s.childNodes),s=h.firstChild,s.textContent=""}else d.push(t.createTextNode(r));for(h.textContent="",g=0;r=d[g++];)if(i&&re.inArray(r,i)>-1)o&&o.push(r);else if(u=re.contains(r.ownerDocument,r),s=l(h.appendChild(r),"script"),u&&p(s),n)for(f=0;r=s[f++];)qe.test(r.type||"")&&n.push(r);return h}function h(){return!0}function d(){return!1}function g(){try{return V.activeElement}catch(e){}}function m(e,t,n,i,o,r){var s,a;if("object"==typeof t){"string"!=typeof n&&(i=i||n,n=void 0);for(a in t)m(e,a,n,i,t[a],r);return e}if(null==i&&null==o?(o=n,i=n=void 0):null==o&&("string"==typeof n?(o=i,i=void 0):(o=i,i=n,n=void 0)),o===!1)o=d;else if(!o)return e;return 1===r&&(s=o,o=function(e){return re().off(e),s.apply(this,arguments)},o.guid=s.guid||(s.guid=re.guid++)),e.each(function(){re.event.add(this,t,o,i,n)})}function y(e,t){return re.nodeName(e,"table")&&re.nodeName(11!==t.nodeType?t:t.firstChild,"tr")?e.getElementsByTagName("tbody")[0]||e.appendChild(e.ownerDocument.createElement("tbody")):e}function v(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function b(e){var t=ze.exec(e.type);return t?e.type=t[1]:e.removeAttribute("type"),e}function w(e,t){var n,i,o,r,s,a,c,u;if(1===t.nodeType){if(Ee.hasData(e)&&(r=Ee.access(e),s=Ee.set(t,r),u=r.events)){delete s.handle,s.events={};for(o in u)for(n=0,i=u[o].length;i>n;n++)re.event.add(t,o,u[o][n])}Ae.hasData(e)&&(a=Ae.access(e),c=re.extend({},a),Ae.set(t,c))}}function x(e,t){var n=t.nodeName.toLowerCase();"input"===n&&Pe.test(e.type)?t.checked=e.checked:("input"===n||"textarea"===n)&&(t.defaultValue=e.defaultValue)}function k(e,t,n,i){t=Q.apply([],t);var o,r,s,a,c,u,p=0,h=e.length,d=h-1,g=t[0],m=re.isFunction(g);if(m||h>1&&"string"==typeof g&&!ie.checkClone&&Ue.test(g))return e.each(function(o){var r=e.eq(o);m&&(t[0]=g.call(this,o,r.html())),k(r,t,n,i)});if(h&&(o=f(t,e[0].ownerDocument,!1,e,i),r=o.firstChild,1===o.childNodes.length&&(o=r),r||i)){for(s=re.map(l(o,"script"),v),a=s.length;h>p;p++)c=o,p!==d&&(c=re.clone(c,!0,!0),a&&re.merge(s,l(c,"script"))),n.call(e[p],c,p);if(a)for(u=s[s.length-1].ownerDocument,re.map(s,b),p=0;a>p;p++)c=s[p],qe.test(c.type||"")&&!Ee.access(c,"globalEval")&&re.contains(u,c)&&(c.src?re._evalUrl&&re._evalUrl(c.src):re.globalEval(c.textContent.replace(Ke,"")))}return e}function T(e,t,n){for(var i,o=t?re.filter(t,e):e,r=0;null!=(i=o[r]);r++)n||1!==i.nodeType||re.cleanData(l(i)),i.parentNode&&(n&&re.contains(i.ownerDocument,i)&&p(l(i,"script")),i.parentNode.removeChild(i));return e}function C(e,t){var n=re(t.createElement(e)).appendTo(t.body),i=re.css(n[0],"display");return n.detach(),i}function E(e){var t=V,n=Xe[e];return n||(n=C(e,t),"none"!==n&&n||(We=(We||re("<iframe frameborder='0' width='0' height='0'/>")).appendTo(t.documentElement),t=We[0].contentDocument,t.write(),t.close(),n=C(e,t),We.detach()),Xe[e]=n),n}function A(e,t,n){var i,o,r,s,a=e.style;return n=n||Ye(e),s=n?n.getPropertyValue(t)||n[t]:void 0,""!==s&&void 0!==s||re.contains(e.ownerDocument,e)||(s=re.style(e,t)),n&&!ie.pixelMarginRight()&&Ve.test(s)&&Je.test(t)&&(i=a.width,o=a.minWidth,r=a.maxWidth,a.minWidth=a.maxWidth=a.width=s,s=n.width,a.width=i,a.minWidth=o,a.maxWidth=r),void 0!==s?s+"":s}function S(e,t){return{get:function(){return e()?void delete this.get:(this.get=t).apply(this,arguments)}}}function N(e){if(e in it)return e;for(var t=e[0].toUpperCase()+e.slice(1),n=nt.length;n--;)if(e=nt[n]+t,e in it)return e}function _(e,t,n){var i=je.exec(t);return i?Math.max(0,i[2]-(n||0))+(i[3]||"px"):t}function j(e,t,n,i,o){for(var r=n===(i?"border":"content")?4:"width"===t?1:0,s=0;4>r;r+=2)"margin"===n&&(s+=re.css(e,n+Re[r],!0,o)),i?("content"===n&&(s-=re.css(e,"padding"+Re[r],!0,o)),"margin"!==n&&(s-=re.css(e,"border"+Re[r]+"Width",!0,o))):(s+=re.css(e,"padding"+Re[r],!0,o),"padding"!==n&&(s+=re.css(e,"border"+Re[r]+"Width",!0,o)));return s}function R(t,n,i){var o=!0,r="width"===n?t.offsetWidth:t.offsetHeight,s=Ye(t),a="border-box"===re.css(t,"boxSizing",!1,s);if(V.msFullscreenElement&&e.top!==e&&t.getClientRects().length&&(r=Math.round(100*t.getBoundingClientRect()[n])),0>=r||null==r){if(r=A(t,n,s),(0>r||null==r)&&(r=t.style[n]),Ve.test(r))return r;o=a&&(ie.boxSizingReliable()||r===t.style[n]),r=parseFloat(r)||0}return r+j(t,n,i||(a?"border":"content"),o,s)+"px"}function D(e,t){for(var n,i,o,r=[],s=0,a=e.length;a>s;s++)i=e[s],i.style&&(r[s]=Ee.get(i,"olddisplay"),n=i.style.display,t?(r[s]||"none"!==n||(i.style.display=""),""===i.style.display&&De(i)&&(r[s]=Ee.access(i,"olddisplay",E(i.nodeName)))):(o=De(i),"none"===n&&o||Ee.set(i,"olddisplay",o?n:re.css(i,"display"))));for(s=0;a>s;s++)i=e[s],i.style&&(t&&"none"!==i.style.display&&""!==i.style.display||(i.style.display=t?r[s]||"":"none"));return e}function P(e,t,n,i,o){return new P.prototype.init(e,t,n,i,o)}function O(){return e.setTimeout(function(){ot=void 0}),ot=re.now()}function q(e,t){var n,i=0,o={height:e};for(t=t?1:0;4>i;i+=2-t)n=Re[i],o["margin"+n]=o["padding"+n]=e;return t&&(o.opacity=o.width=e),o}function B(e,t,n){for(var i,o=(H.tweeners[t]||[]).concat(H.tweeners["*"]),r=0,s=o.length;s>r;r++)if(i=o[r].call(n,t,e))return i}function L(e,t,n){var i,o,r,s,a,c,u,l,p=this,f={},h=e.style,d=e.nodeType&&De(e),g=Ee.get(e,"fxshow");n.queue||(a=re._queueHooks(e,"fx"),null==a.unqueued&&(a.unqueued=0,c=a.empty.fire,a.empty.fire=function(){a.unqueued||c()}),a.unqueued++,p.always(function(){p.always(function(){a.unqueued--,re.queue(e,"fx").length||a.empty.fire()})})),1===e.nodeType&&("height"in t||"width"in t)&&(n.overflow=[h.overflow,h.overflowX,h.overflowY],u=re.css(e,"display"),l="none"===u?Ee.get(e,"olddisplay")||E(e.nodeName):u,"inline"===l&&"none"===re.css(e,"float")&&(h.display="inline-block")),n.overflow&&(h.overflow="hidden",p.always(function(){h.overflow=n.overflow[0],h.overflowX=n.overflow[1],h.overflowY=n.overflow[2]}));for(i in t)if(o=t[i],st.exec(o)){if(delete t[i],r=r||"toggle"===o,o===(d?"hide":"show")){if("show"!==o||!g||void 0===g[i])continue;d=!0}f[i]=g&&g[i]||re.style(e,i)}else u=void 0;if(re.isEmptyObject(f))"inline"===("none"===u?E(e.nodeName):u)&&(h.display=u);else{g?"hidden"in g&&(d=g.hidden):g=Ee.access(e,"fxshow",{}),r&&(g.hidden=!d),d?re(e).show():p.done(function(){re(e).hide()}),p.done(function(){var t;Ee.remove(e,"fxshow");for(t in f)re.style(e,t,f[t])});for(i in f)s=B(d?g[i]:0,i,p),i in g||(g[i]=s.start,d&&(s.end=s.start,s.start="width"===i||"height"===i?1:0))}}function $(e,t){var n,i,o,r,s;for(n in e)if(i=re.camelCase(n),o=t[i],r=e[n],re.isArray(r)&&(o=r[1],r=e[n]=r[0]),n!==i&&(e[i]=r,delete e[n]),s=re.cssHooks[i],s&&"expand"in s){r=s.expand(r),delete e[i];for(n in r)n in e||(e[n]=r[n],t[n]=o)}else t[i]=o}function H(e,t,n){var i,o,r=0,s=H.prefilters.length,a=re.Deferred().always(function(){delete c.elem}),c=function(){if(o)return!1;for(var t=ot||O(),n=Math.max(0,u.startTime+u.duration-t),i=n/u.duration||0,r=1-i,s=0,c=u.tweens.length;c>s;s++)u.tweens[s].run(r);return a.notifyWith(e,[u,r,n]),1>r&&c?n:(a.resolveWith(e,[u]),!1)},u=a.promise({elem:e,props:re.extend({},t),opts:re.extend(!0,{specialEasing:{},easing:re.easing._default},n),originalProperties:t,originalOptions:n,startTime:ot||O(),duration:n.duration,tweens:[],createTween:function(t,n){var i=re.Tween(e,u.opts,t,n,u.opts.specialEasing[t]||u.opts.easing);return u.tweens.push(i),i},stop:function(t){var n=0,i=t?u.tweens.length:0;if(o)return this;for(o=!0;i>n;n++)u.tweens[n].run(1);return t?(a.notifyWith(e,[u,1,0]),a.resolveWith(e,[u,t])):a.rejectWith(e,[u,t]),this}}),l=u.props;for($(l,u.opts.specialEasing);s>r;r++)if(i=H.prefilters[r].call(u,e,l,u.opts))return re.isFunction(i.stop)&&(re._queueHooks(u.elem,u.opts.queue).stop=re.proxy(i.stop,i)),i;return re.map(l,B,u),re.isFunction(u.opts.start)&&u.opts.start.call(e,u),re.fx.timer(re.extend(c,{elem:e,anim:u,queue:u.opts.queue})),u.progress(u.opts.progress).done(u.opts.done,u.opts.complete).fail(u.opts.fail).always(u.opts.always)}function I(e){return e.getAttribute&&e.getAttribute("class")||""}function M(e){return function(t,n){"string"!=typeof t&&(n=t,t="*");var i,o=0,r=t.toLowerCase().match(xe)||[];if(re.isFunction(n))for(;i=r[o++];)"+"===i[0]?(i=i.slice(1)||"*",(e[i]=e[i]||[]).unshift(n)):(e[i]=e[i]||[]).push(n)}}function F(e,t,n,i){function o(a){var c;return r[a]=!0,re.each(e[a]||[],function(e,a){var u=a(t,n,i);return"string"!=typeof u||s||r[u]?s?!(c=u):void 0:(t.dataTypes.unshift(u),o(u),!1)}),c}var r={},s=e===At;return o(t.dataTypes[0])||!r["*"]&&o("*")}function U(e,t){var n,i,o=re.ajaxSettings.flatOptions||{};for(n in t)void 0!==t[n]&&((o[n]?e:i||(i={}))[n]=t[n]);return i&&re.extend(!0,e,i),e}function z(e,t,n){for(var i,o,r,s,a=e.contents,c=e.dataTypes;"*"===c[0];)c.shift(),void 0===i&&(i=e.mimeType||t.getResponseHeader("Content-Type"));if(i)for(o in a)if(a[o]&&a[o].test(i)){c.unshift(o);break}if(c[0]in n)r=c[0];else{for(o in n){if(!c[0]||e.converters[o+" "+c[0]]){r=o;break}s||(s=o)}r=r||s}return r?(r!==c[0]&&c.unshift(r),n[r]):void 0}function K(e,t,n,i){var o,r,s,a,c,u={},l=e.dataTypes.slice();if(l[1])for(s in e.converters)u[s.toLowerCase()]=e.converters[s];for(r=l.shift();r;)if(e.responseFields[r]&&(n[e.responseFields[r]]=t),!c&&i&&e.dataFilter&&(t=e.dataFilter(t,e.dataType)),c=r,r=l.shift())if("*"===r)r=c;else if("*"!==c&&c!==r){if(s=u[c+" "+r]||u["* "+r],!s)for(o in u)if(a=o.split(" "),a[1]===r&&(s=u[c+" "+a[0]]||u["* "+a[0]])){s===!0?s=u[o]:u[o]!==!0&&(r=a[0],l.unshift(a[1]));break}if(s!==!0)if(s&&e["throws"])t=s(t);else try{t=s(t)}catch(p){return{state:"parsererror",error:s?p:"No conversion from "+c+" to "+r}}}return{state:"success",data:t}}function W(e,t,n,i){var o;if(re.isArray(t))re.each(t,function(t,o){n||jt.test(e)?i(e,o):W(e+"["+("object"==typeof o&&null!=o?t:"")+"]",o,n,i)});else if(n||"object"!==re.type(t))i(e,t);else for(o in t)W(e+"["+o+"]",t[o],n,i)}function X(e){return re.isWindow(e)?e:9===e.nodeType&&e.defaultView}var J=[],V=e.document,Y=J.slice,Q=J.concat,G=J.push,Z=J.indexOf,ee={},te=ee.toString,ne=ee.hasOwnProperty,ie={},oe="2.2.3",re=function(e,t){return new re.fn.init(e,t)},se=/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,ae=/^-ms-/,ce=/-([\da-z])/gi,ue=function(e,t){return t.toUpperCase()};re.fn=re.prototype={jquerykws:oe,constructor:re,selector:"",length:0,toArray:function(){return Y.call(this)},get:function(e){return null!=e?0>e?this[e+this.length]:this[e]:Y.call(this)},pushStack:function(e){var t=re.merge(this.constructor(),e);return t.prevObject=this,t.context=this.context,t},each:function(e){return re.each(this,e)},map:function(e){return this.pushStack(re.map(this,function(t,n){return e.call(t,n,t)}))},slice:function(){return this.pushStack(Y.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(e){var t=this.length,n=+e+(0>e?t:0);return this.pushStack(n>=0&&t>n?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:G,sort:J.sort,splice:J.splice},re.extend=re.fn.extend=function(){var e,t,n,i,o,r,s=arguments[0]||{},a=1,c=arguments.length,u=!1;for("boolean"==typeof s&&(u=s,s=arguments[a]||{},a++),"object"==typeof s||re.isFunction(s)||(s={}),a===c&&(s=this,a--);c>a;a++)if(null!=(e=arguments[a]))for(t in e)n=s[t],i=e[t],s!==i&&(u&&i&&(re.isPlainObject(i)||(o=re.isArray(i)))?(o?(o=!1,r=n&&re.isArray(n)?n:[]):r=n&&re.isPlainObject(n)?n:{},s[t]=re.extend(u,r,i)):void 0!==i&&(s[t]=i));return s},re.extend({expando:"jQueryKws"+(oe+Math.random()).replace(/\D/g,""),isReady:!0,error:function(e){throw new Error(e)},noop:function(){},isFunction:function(e){return"function"===re.type(e)},isArray:Array.isArray,isWindow:function(e){return null!=e&&e===e.window},isNumeric:function(e){var t=e&&e.toString();return!re.isArray(e)&&t-parseFloat(t)+1>=0},isPlainObject:function(e){var t;if("object"!==re.type(e)||e.nodeType||re.isWindow(e))return!1;if(e.constructor&&!ne.call(e,"constructor")&&!ne.call(e.constructor.prototype||{},"isPrototypeOf"))return!1;for(t in e);return void 0===t||ne.call(e,t)},isEmptyObject:function(e){var t;for(t in e)return!1;return!0},type:function(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?ee[te.call(e)]||"object":typeof e},globalEval:function(e){var t,n=eval;e=re.trim(e),e&&(1===e.indexOf("use strict")?(t=V.createElement("script"),t.text=e,V.head.appendChild(t).parentNode.removeChild(t)):n(e))},camelCase:function(e){return e.replace(ae,"ms-").replace(ce,ue)},nodeName:function(e,t){return e.nodeName&&e.nodeName.toLowerCase()===t.toLowerCase()},each:function(e,t){var i,o=0;if(n(e))for(i=e.length;i>o&&t.call(e[o],o,e[o])!==!1;o++);else for(o in e)if(t.call(e[o],o,e[o])===!1)break;return e},trim:function(e){return null==e?"":(e+"").replace(se,"")},makeArray:function(e,t){var i=t||[];return null!=e&&(n(Object(e))?re.merge(i,"string"==typeof e?[e]:e):G.call(i,e)),i},inArray:function(e,t,n){return null==t?-1:Z.call(t,e,n)},merge:function(e,t){for(var n=+t.length,i=0,o=e.length;n>i;i++)e[o++]=t[i];return e.length=o,e},grep:function(e,t,n){for(var i,o=[],r=0,s=e.length,a=!n;s>r;r++)i=!t(e[r],r),i!==a&&o.push(e[r]);return o},map:function(e,t,i){var o,r,s=0,a=[];if(n(e))for(o=e.length;o>s;s++)r=t(e[s],s,i),null!=r&&a.push(r);else for(s in e)r=t(e[s],s,i),null!=r&&a.push(r);return Q.apply([],a)},guid:1,proxy:function(e,t){var n,i,o;return"string"==typeof t&&(n=e[t],t=e,e=n),re.isFunction(e)?(i=Y.call(arguments,2),o=function(){return e.apply(t||this,i.concat(Y.call(arguments)))},o.guid=e.guid=e.guid||re.guid++,o):void 0},now:Date.now,support:ie}),"function"==typeof Symbol&&(re.fn[Symbol.iterator]=J[Symbol.iterator]),re.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),function(e,t){ee["[object "+t+"]"]=t.toLowerCase()});var le=function(e){function t(e,t,n,i){var o,r,s,a,c,u,p,h,d=t&&t.ownerDocument,g=t?t.nodeType:9;if(n=n||[],"string"!=typeof e||!e||1!==g&&9!==g&&11!==g)return n;if(!i&&((t?t.ownerDocument||t:I)!==D&&R(t),t=t||D,O)){if(11!==g&&(u=ye.exec(e)))if(o=u[1]){if(9===g){if(!(s=t.getElementById(o)))return n;if(s.id===o)return n.push(s),n}else if(d&&(s=d.getElementById(o))&&$(t,s)&&s.id===o)return n.push(s),n}else{if(u[2])return G.apply(n,t.getElementsByTagName(e)),n;if((o=u[3])&&x.getElementsByClassName&&t.getElementsByClassName)return G.apply(n,t.getElementsByClassName(o)),n}if(x.qsa&&!K[e+" "]&&(!q||!q.test(e))){if(1!==g)d=t,h=e;else if("object"!==t.nodeName.toLowerCase()){for((a=t.getAttribute("id"))?a=a.replace(be,"\\$&"):t.setAttribute("id",a=H),p=E(e),r=p.length,c=fe.test(a)?"#"+a:"[id='"+a+"']";r--;)p[r]=c+" "+f(p[r]);h=p.join(","),d=ve.test(e)&&l(t.parentNode)||t}if(h)try{return G.apply(n,d.querySelectorAll(h)),n}catch(m){}finally{a===H&&t.removeAttribute("id")}}}return S(e.replace(ae,"$1"),t,n,i)}function n(){function e(n,i){return t.push(n+" ")>k.cacheLength&&delete e[t.shift()],e[n+" "]=i}var t=[];return e}function i(e){return e[H]=!0,e}function o(e){var t=D.createElement("div");try{return!!e(t)}catch(n){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function r(e,t){for(var n=e.split("|"),i=n.length;i--;)k.attrHandle[n[i]]=t}function s(e,t){var n=t&&e,i=n&&1===e.nodeType&&1===t.nodeType&&(~t.sourceIndex||X)-(~e.sourceIndex||X);if(i)return i;if(n)for(;n=n.nextSibling;)if(n===t)return-1;return e?1:-1}function a(e){return function(t){var n=t.nodeName.toLowerCase();return"input"===n&&t.type===e}}function c(e){return function(t){var n=t.nodeName.toLowerCase();return("input"===n||"button"===n)&&t.type===e}}function u(e){return i(function(t){return t=+t,i(function(n,i){for(var o,r=e([],n.length,t),s=r.length;s--;)n[o=r[s]]&&(n[o]=!(i[o]=n[o]))})})}function l(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}function p(){}function f(e){for(var t=0,n=e.length,i="";n>t;t++)i+=e[t].value;return i}function h(e,t,n){var i=t.dir,o=n&&"parentNode"===i,r=F++;return t.first?function(t,n,r){for(;t=t[i];)if(1===t.nodeType||o)return e(t,n,r)}:function(t,n,s){var a,c,u,l=[M,r];if(s){for(;t=t[i];)if((1===t.nodeType||o)&&e(t,n,s))return!0}else for(;t=t[i];)if(1===t.nodeType||o){if(u=t[H]||(t[H]={}),c=u[t.uniqueID]||(u[t.uniqueID]={}),(a=c[i])&&a[0]===M&&a[1]===r)return l[2]=a[2];if(c[i]=l,l[2]=e(t,n,s))return!0}}}function d(e){return e.length>1?function(t,n,i){for(var o=e.length;o--;)if(!e[o](t,n,i))return!1;return!0}:e[0]}function g(e,n,i){for(var o=0,r=n.length;r>o;o++)t(e,n[o],i);return i}function m(e,t,n,i,o){for(var r,s=[],a=0,c=e.length,u=null!=t;c>a;a++)(r=e[a])&&(!n||n(r,i,o))&&(s.push(r),u&&t.push(a));return s}function y(e,t,n,o,r,s){return o&&!o[H]&&(o=y(o)),r&&!r[H]&&(r=y(r,s)),i(function(i,s,a,c){var u,l,p,f=[],h=[],d=s.length,y=i||g(t||"*",a.nodeType?[a]:a,[]),v=!e||!i&&t?y:m(y,f,e,a,c),b=n?r||(i?e:d||o)?[]:s:v;if(n&&n(v,b,a,c),o)for(u=m(b,h),o(u,[],a,c),l=u.length;l--;)(p=u[l])&&(b[h[l]]=!(v[h[l]]=p));if(i){if(r||e){if(r){for(u=[],l=b.length;l--;)(p=b[l])&&u.push(v[l]=p);r(null,b=[],u,c)}for(l=b.length;l--;)(p=b[l])&&(u=r?ee(i,p):f[l])>-1&&(i[u]=!(s[u]=p))}}else b=m(b===s?b.splice(d,b.length):b),r?r(null,s,b,c):G.apply(s,b)})}function v(e){for(var t,n,i,o=e.length,r=k.relative[e[0].type],s=r||k.relative[" "],a=r?1:0,c=h(function(e){return e===t},s,!0),u=h(function(e){return ee(t,e)>-1},s,!0),l=[function(e,n,i){var o=!r&&(i||n!==N)||((t=n).nodeType?c(e,n,i):u(e,n,i));return t=null,o}];o>a;a++)if(n=k.relative[e[a].type])l=[h(d(l),n)];else{if(n=k.filter[e[a].type].apply(null,e[a].matches),n[H]){for(i=++a;o>i&&!k.relative[e[i].type];i++);return y(a>1&&d(l),a>1&&f(e.slice(0,a-1).concat({value:" "===e[a-2].type?"*":""})).replace(ae,"$1"),n,i>a&&v(e.slice(a,i)),o>i&&v(e=e.slice(i)),o>i&&f(e))}l.push(n)}return d(l)}function b(e,n){var o=n.length>0,r=e.length>0,s=function(i,s,a,c,u){var l,p,f,h=0,d="0",g=i&&[],y=[],v=N,b=i||r&&k.find.TAG("*",u),w=M+=null==v?1:Math.random()||.1,x=b.length;for(u&&(N=s===D||s||u);d!==x&&null!=(l=b[d]);d++){if(r&&l){for(p=0,s||l.ownerDocument===D||(R(l),a=!O);f=e[p++];)if(f(l,s||D,a)){c.push(l);break}u&&(M=w)}o&&((l=!f&&l)&&h--,i&&g.push(l))}if(h+=d,o&&d!==h){for(p=0;f=n[p++];)f(g,y,s,a);if(i){if(h>0)for(;d--;)g[d]||y[d]||(y[d]=Y.call(c));y=m(y)}G.apply(c,y),u&&!i&&y.length>0&&h+n.length>1&&t.uniqueSort(c)}return u&&(M=w,N=v),g};return o?i(s):s}var w,x,k,T,C,E,A,S,N,_,j,R,D,P,O,q,B,L,$,H="sizzle"+1*new Date,I=e.document,M=0,F=0,U=n(),z=n(),K=n(),W=function(e,t){return e===t&&(j=!0),0},X=1<<31,J={}.hasOwnProperty,V=[],Y=V.pop,Q=V.push,G=V.push,Z=V.slice,ee=function(e,t){for(var n=0,i=e.length;i>n;n++)if(e[n]===t)return n;return-1},te="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",ne="[\\x20\\t\\r\\n\\f]",ie="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",oe="\\["+ne+"*("+ie+")(?:"+ne+"*([*^$|!~]?=)"+ne+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+ie+"))|)"+ne+"*\\]",re=":("+ie+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+oe+")*)|.*)\\)|)",se=new RegExp(ne+"+","g"),ae=new RegExp("^"+ne+"+|((?:^|[^\\\\])(?:\\\\.)*)"+ne+"+$","g"),ce=new RegExp("^"+ne+"*,"+ne+"*"),ue=new RegExp("^"+ne+"*([>+~]|"+ne+")"+ne+"*"),le=new RegExp("="+ne+"*([^\\]'\"]*?)"+ne+"*\\]","g"),pe=new RegExp(re),fe=new RegExp("^"+ie+"$"),he={ID:new RegExp("^#("+ie+")"),CLASS:new RegExp("^\\.("+ie+")"),TAG:new RegExp("^("+ie+"|[*])"),ATTR:new RegExp("^"+oe),PSEUDO:new RegExp("^"+re),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+ne+"*(even|odd|(([+-]|)(\\d*)n|)"+ne+"*(?:([+-]|)"+ne+"*(\\d+)|))"+ne+"*\\)|)","i"),bool:new RegExp("^(?:"+te+")$","i"),needsContext:new RegExp("^"+ne+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+ne+"*((?:-\\d)?\\d*)"+ne+"*\\)|)(?=[^-]|$)","i")},de=/^(?:input|select|textarea|button)$/i,ge=/^h\d$/i,me=/^[^{]+\{\s*\[native \w/,ye=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ve=/[+~]/,be=/'|\\/g,we=new RegExp("\\\\([\\da-f]{1,6}"+ne+"?|("+ne+")|.)","ig"),xe=function(e,t,n){var i="0x"+t-65536;return i!==i||n?t:0>i?String.fromCharCode(i+65536):String.fromCharCode(i>>10|55296,1023&i|56320)},ke=function(){R()};try{G.apply(V=Z.call(I.childNodes),I.childNodes),V[I.childNodes.length].nodeType}catch(Te){G={apply:V.length?function(e,t){Q.apply(e,Z.call(t))}:function(e,t){for(var n=e.length,i=0;e[n++]=t[i++];);e.length=n-1}}}x=t.support={},C=t.isXML=function(e){var t=e&&(e.ownerDocument||e).documentElement;return t?"HTML"!==t.nodeName:!1},R=t.setDocument=function(e){var t,n,i=e?e.ownerDocument||e:I;return i!==D&&9===i.nodeType&&i.documentElement?(D=i,P=D.documentElement,O=!C(D),(n=D.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",ke,!1):n.attachEvent&&n.attachEvent("onunload",ke)),x.attributes=o(function(e){return e.className="i",!e.getAttribute("className")}),x.getElementsByTagName=o(function(e){return e.appendChild(D.createComment("")),!e.getElementsByTagName("*").length}),x.getElementsByClassName=me.test(D.getElementsByClassName),x.getById=o(function(e){return P.appendChild(e).id=H,!D.getElementsByName||!D.getElementsByName(H).length}),x.getById?(k.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&O){var n=t.getElementById(e);return n?[n]:[]}},k.filter.ID=function(e){var t=e.replace(we,xe);return function(e){return e.getAttribute("id")===t}}):(delete k.find.ID,k.filter.ID=function(e){var t=e.replace(we,xe);return function(e){var n="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return n&&n.value===t}}),k.find.TAG=x.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):x.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,i=[],o=0,r=t.getElementsByTagName(e);if("*"===e){for(;n=r[o++];)1===n.nodeType&&i.push(n);return i}return r},k.find.CLASS=x.getElementsByClassName&&function(e,t){return"undefined"!=typeof t.getElementsByClassName&&O?t.getElementsByClassName(e):void 0},B=[],q=[],(x.qsa=me.test(D.querySelectorAll))&&(o(function(e){P.appendChild(e).innerHTML="<a id='"+H+"'></a><select id='"+H+"-\r\\' msallowcapture=''><option selected=''></option></select>",e.querySelectorAll("[msallowcapture^='']").length&&q.push("[*^$]="+ne+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||q.push("\\["+ne+"*(?:value|"+te+")"),e.querySelectorAll("[id~="+H+"-]").length||q.push("~="),e.querySelectorAll(":checked").length||q.push(":checked"),e.querySelectorAll("a#"+H+"+*").length||q.push(".#.+[+~]")}),o(function(e){var t=D.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&q.push("name"+ne+"*[*^$|!~]?="),e.querySelectorAll(":enabled").length||q.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),q.push(",.*:")})),(x.matchesSelector=me.test(L=P.matches||P.webkitMatchesSelector||P.mozMatchesSelector||P.oMatchesSelector||P.msMatchesSelector))&&o(function(e){x.disconnectedMatch=L.call(e,"div"),L.call(e,"[s!='']:x"),B.push("!=",re)}),q=q.length&&new RegExp(q.join("|")),B=B.length&&new RegExp(B.join("|")),t=me.test(P.compareDocumentPosition),$=t||me.test(P.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,i=t&&t.parentNode;return e===i||!(!i||1!==i.nodeType||!(n.contains?n.contains(i):e.compareDocumentPosition&&16&e.compareDocumentPosition(i)))}:function(e,t){if(t)for(;t=t.parentNode;)if(t===e)return!0;return!1},W=t?function(e,t){if(e===t)return j=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n?n:(n=(e.ownerDocument||e)===(t.ownerDocument||t)?e.compareDocumentPosition(t):1,1&n||!x.sortDetached&&t.compareDocumentPosition(e)===n?e===D||e.ownerDocument===I&&$(I,e)?-1:t===D||t.ownerDocument===I&&$(I,t)?1:_?ee(_,e)-ee(_,t):0:4&n?-1:1)}:function(e,t){if(e===t)return j=!0,0;var n,i=0,o=e.parentNode,r=t.parentNode,a=[e],c=[t];if(!o||!r)return e===D?-1:t===D?1:o?-1:r?1:_?ee(_,e)-ee(_,t):0;if(o===r)return s(e,t);for(n=e;n=n.parentNode;)a.unshift(n);for(n=t;n=n.parentNode;)c.unshift(n);for(;a[i]===c[i];)i++;return i?s(a[i],c[i]):a[i]===I?-1:c[i]===I?1:0},D):D},t.matches=function(e,n){return t(e,null,null,n)},t.matchesSelector=function(e,n){if((e.ownerDocument||e)!==D&&R(e),n=n.replace(le,"='$1']"),x.matchesSelector&&O&&!K[n+" "]&&(!B||!B.test(n))&&(!q||!q.test(n)))try{var i=L.call(e,n);if(i||x.disconnectedMatch||e.document&&11!==e.document.nodeType)return i}catch(o){}return t(n,D,null,[e]).length>0},t.contains=function(e,t){return(e.ownerDocument||e)!==D&&R(e),$(e,t)},t.attr=function(e,t){(e.ownerDocument||e)!==D&&R(e);var n=k.attrHandle[t.toLowerCase()],i=n&&J.call(k.attrHandle,t.toLowerCase())?n(e,t,!O):void 0;return void 0!==i?i:x.attributes||!O?e.getAttribute(t):(i=e.getAttributeNode(t))&&i.specified?i.value:null},t.error=function(e){throw new Error("Syntax error, unrecognized expression: "+e)},t.uniqueSort=function(e){var t,n=[],i=0,o=0;if(j=!x.detectDuplicates,_=!x.sortStable&&e.slice(0),e.sort(W),j){for(;t=e[o++];)t===e[o]&&(i=n.push(o));for(;i--;)e.splice(n[i],1)}return _=null,e},T=t.getText=function(e){var t,n="",i=0,o=e.nodeType;if(o){if(1===o||9===o||11===o){if("string"==typeof e.textContent)return e.textContent;for(e=e.firstChild;e;e=e.nextSibling)n+=T(e)}else if(3===o||4===o)return e.nodeValue}else for(;t=e[i++];)n+=T(t);return n},k=t.selectors={cacheLength:50,createPseudo:i,match:he,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(we,xe),e[3]=(e[3]||e[4]||e[5]||"").replace(we,xe),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||t.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&t.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return he.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&pe.test(n)&&(t=E(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(we,xe).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=U[e+" "];return t||(t=new RegExp("(^|"+ne+")"+e+"("+ne+"|$)"))&&U(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(e,n,i){return function(o){var r=t.attr(o,e);return null==r?"!="===n:n?(r+="","="===n?r===i:"!="===n?r!==i:"^="===n?i&&0===r.indexOf(i):"*="===n?i&&r.indexOf(i)>-1:"$="===n?i&&r.slice(-i.length)===i:"~="===n?(" "+r.replace(se," ")+" ").indexOf(i)>-1:"|="===n?r===i||r.slice(0,i.length+1)===i+"-":!1):!0}},CHILD:function(e,t,n,i,o){var r="nth"!==e.slice(0,3),s="last"!==e.slice(-4),a="of-type"===t;return 1===i&&0===o?function(e){return!!e.parentNode}:function(t,n,c){var u,l,p,f,h,d,g=r!==s?"nextSibling":"previousSibling",m=t.parentNode,y=a&&t.nodeName.toLowerCase(),v=!c&&!a,b=!1;if(m){if(r){for(;g;){for(f=t;f=f[g];)if(a?f.nodeName.toLowerCase()===y:1===f.nodeType)return!1;d=g="only"===e&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],
s&&v){for(f=m,p=f[H]||(f[H]={}),l=p[f.uniqueID]||(p[f.uniqueID]={}),u=l[e]||[],h=u[0]===M&&u[1],b=h&&u[2],f=h&&m.childNodes[h];f=++h&&f&&f[g]||(b=h=0)||d.pop();)if(1===f.nodeType&&++b&&f===t){l[e]=[M,h,b];break}}else if(v&&(f=t,p=f[H]||(f[H]={}),l=p[f.uniqueID]||(p[f.uniqueID]={}),u=l[e]||[],h=u[0]===M&&u[1],b=h),b===!1)for(;(f=++h&&f&&f[g]||(b=h=0)||d.pop())&&((a?f.nodeName.toLowerCase()!==y:1!==f.nodeType)||!++b||(v&&(p=f[H]||(f[H]={}),l=p[f.uniqueID]||(p[f.uniqueID]={}),l[e]=[M,b]),f!==t)););return b-=o,b===i||b%i===0&&b/i>=0}}},PSEUDO:function(e,n){var o,r=k.pseudos[e]||k.setFilters[e.toLowerCase()]||t.error("unsupported pseudo: "+e);return r[H]?r(n):r.length>1?(o=[e,e,"",n],k.setFilters.hasOwnProperty(e.toLowerCase())?i(function(e,t){for(var i,o=r(e,n),s=o.length;s--;)i=ee(e,o[s]),e[i]=!(t[i]=o[s])}):function(e){return r(e,0,o)}):r}},pseudos:{not:i(function(e){var t=[],n=[],o=A(e.replace(ae,"$1"));return o[H]?i(function(e,t,n,i){for(var r,s=o(e,null,i,[]),a=e.length;a--;)(r=s[a])&&(e[a]=!(t[a]=r))}):function(e,i,r){return t[0]=e,o(t,null,r,n),t[0]=null,!n.pop()}}),has:i(function(e){return function(n){return t(e,n).length>0}}),contains:i(function(e){return e=e.replace(we,xe),function(t){return(t.textContent||t.innerText||T(t)).indexOf(e)>-1}}),lang:i(function(e){return fe.test(e||"")||t.error("unsupported lang: "+e),e=e.replace(we,xe).toLowerCase(),function(t){var n;do if(n=O?t.lang:t.getAttribute("xml:lang")||t.getAttribute("lang"))return n=n.toLowerCase(),n===e||0===n.indexOf(e+"-");while((t=t.parentNode)&&1===t.nodeType);return!1}}),target:function(t){var n=e.location&&e.location.hash;return n&&n.slice(1)===t.id},root:function(e){return e===P},focus:function(e){return e===D.activeElement&&(!D.hasFocus||D.hasFocus())&&!!(e.type||e.href||~e.tabIndex)},enabled:function(e){return e.disabled===!1},disabled:function(e){return e.disabled===!0},checked:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&!!e.checked||"option"===t&&!!e.selected},selected:function(e){return e.parentNode&&e.parentNode.selectedIndex,e.selected===!0},empty:function(e){for(e=e.firstChild;e;e=e.nextSibling)if(e.nodeType<6)return!1;return!0},parent:function(e){return!k.pseudos.empty(e)},header:function(e){return ge.test(e.nodeName)},input:function(e){return de.test(e.nodeName)},button:function(e){var t=e.nodeName.toLowerCase();return"input"===t&&"button"===e.type||"button"===t},text:function(e){var t;return"input"===e.nodeName.toLowerCase()&&"text"===e.type&&(null==(t=e.getAttribute("type"))||"text"===t.toLowerCase())},first:u(function(){return[0]}),last:u(function(e,t){return[t-1]}),eq:u(function(e,t,n){return[0>n?n+t:n]}),even:u(function(e,t){for(var n=0;t>n;n+=2)e.push(n);return e}),odd:u(function(e,t){for(var n=1;t>n;n+=2)e.push(n);return e}),lt:u(function(e,t,n){for(var i=0>n?n+t:n;--i>=0;)e.push(i);return e}),gt:u(function(e,t,n){for(var i=0>n?n+t:n;++i<t;)e.push(i);return e})}},k.pseudos.nth=k.pseudos.eq;for(w in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[w]=a(w);for(w in{submit:!0,reset:!0})k.pseudos[w]=c(w);return p.prototype=k.filters=k.pseudos,k.setFilters=new p,E=t.tokenize=function(e,n){var i,o,r,s,a,c,u,l=z[e+" "];if(l)return n?0:l.slice(0);for(a=e,c=[],u=k.preFilter;a;){(!i||(o=ce.exec(a)))&&(o&&(a=a.slice(o[0].length)||a),c.push(r=[])),i=!1,(o=ue.exec(a))&&(i=o.shift(),r.push({value:i,type:o[0].replace(ae," ")}),a=a.slice(i.length));for(s in k.filter)!(o=he[s].exec(a))||u[s]&&!(o=u[s](o))||(i=o.shift(),r.push({value:i,type:s,matches:o}),a=a.slice(i.length));if(!i)break}return n?a.length:a?t.error(e):z(e,c).slice(0)},A=t.compile=function(e,t){var n,i=[],o=[],r=K[e+" "];if(!r){for(t||(t=E(e)),n=t.length;n--;)r=v(t[n]),r[H]?i.push(r):o.push(r);r=K(e,b(o,i)),r.selector=e}return r},S=t.select=function(e,t,n,i){var o,r,s,a,c,u="function"==typeof e&&e,p=!i&&E(e=u.selector||e);if(n=n||[],1===p.length){if(r=p[0]=p[0].slice(0),r.length>2&&"ID"===(s=r[0]).type&&x.getById&&9===t.nodeType&&O&&k.relative[r[1].type]){if(t=(k.find.ID(s.matches[0].replace(we,xe),t)||[])[0],!t)return n;u&&(t=t.parentNode),e=e.slice(r.shift().value.length)}for(o=he.needsContext.test(e)?0:r.length;o--&&(s=r[o],!k.relative[a=s.type]);)if((c=k.find[a])&&(i=c(s.matches[0].replace(we,xe),ve.test(r[0].type)&&l(t.parentNode)||t))){if(r.splice(o,1),e=i.length&&f(r),!e)return G.apply(n,i),n;break}}return(u||A(e,p))(i,t,!O,n,!t||ve.test(e)&&l(t.parentNode)||t),n},x.sortStable=H.split("").sort(W).join("")===H,x.detectDuplicates=!!j,R(),x.sortDetached=o(function(e){return 1&e.compareDocumentPosition(D.createElement("div"))}),o(function(e){return e.innerHTML="<a href='#'></a>","#"===e.firstChild.getAttribute("href")})||r("type|href|height|width",function(e,t,n){return n?void 0:e.getAttribute(t,"type"===t.toLowerCase()?1:2)}),x.attributes&&o(function(e){return e.innerHTML="<input/>",e.firstChild.setAttribute("value",""),""===e.firstChild.getAttribute("value")})||r("value",function(e,t,n){return n||"input"!==e.nodeName.toLowerCase()?void 0:e.defaultValue}),o(function(e){return null==e.getAttribute("disabled")})||r(te,function(e,t,n){var i;return n?void 0:e[t]===!0?t.toLowerCase():(i=e.getAttributeNode(t))&&i.specified?i.value:null}),t}(e);re.find=le,re.expr=le.selectors,re.expr[":"]=re.expr.pseudos,re.uniqueSort=re.unique=le.uniqueSort,re.text=le.getText,re.isXMLDoc=le.isXML,re.contains=le.contains;var pe=function(e,t,n){for(var i=[],o=void 0!==n;(e=e[t])&&9!==e.nodeType;)if(1===e.nodeType){if(o&&re(e).is(n))break;i.push(e)}return i},fe=function(e,t){for(var n=[];e;e=e.nextSibling)1===e.nodeType&&e!==t&&n.push(e);return n},he=re.expr.match.needsContext,de=/^<([\w-]+)\s*\/?>(?:<\/\1>|)$/,ge=/^.[^:#\[\.,]*$/;re.filter=function(e,t,n){var i=t[0];return n&&(e=":not("+e+")"),1===t.length&&1===i.nodeType?re.find.matchesSelector(i,e)?[i]:[]:re.find.matches(e,re.grep(t,function(e){return 1===e.nodeType}))},re.fn.extend({find:function(e){var t,n=this.length,i=[],o=this;if("string"!=typeof e)return this.pushStack(re(e).filter(function(){for(t=0;n>t;t++)if(re.contains(o[t],this))return!0}));for(t=0;n>t;t++)re.find(e,o[t],i);return i=this.pushStack(n>1?re.unique(i):i),i.selector=this.selector?this.selector+" "+e:e,i},filter:function(e){return this.pushStack(i(this,e||[],!1))},not:function(e){return this.pushStack(i(this,e||[],!0))},is:function(e){return!!i(this,"string"==typeof e&&he.test(e)?re(e):e||[],!1).length}});var me,ye=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]*))$/,ve=re.fn.init=function(e,t,n){var i,o;if(!e)return this;if(n=n||me,"string"==typeof e){if(i="<"===e[0]&&">"===e[e.length-1]&&e.length>=3?[null,e,null]:ye.exec(e),!i||!i[1]&&t)return!t||t.jquerykws?(t||n).find(e):this.constructor(t).find(e);if(i[1]){if(t=t instanceof re?t[0]:t,re.merge(this,re.parseHTML(i[1],t&&t.nodeType?t.ownerDocument||t:V,!0)),de.test(i[1])&&re.isPlainObject(t))for(i in t)re.isFunction(this[i])?this[i](t[i]):this.attr(i,t[i]);return this}return o=V.getElementById(i[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=V,this.selector=e,this}return e.nodeType?(this.context=this[0]=e,this.length=1,this):re.isFunction(e)?void 0!==n.ready?n.ready(e):e(re):(void 0!==e.selector&&(this.selector=e.selector,this.context=e.context),re.makeArray(e,this))};ve.prototype=re.fn,me=re(V);var be=/^(?:parents|prev(?:Until|All))/,we={children:!0,contents:!0,next:!0,prev:!0};re.fn.extend({has:function(e){var t=re(e,this),n=t.length;return this.filter(function(){for(var e=0;n>e;e++)if(re.contains(this,t[e]))return!0})},closest:function(e,t){for(var n,i=0,o=this.length,r=[],s=he.test(e)||"string"!=typeof e?re(e,t||this.context):0;o>i;i++)for(n=this[i];n&&n!==t;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&re.find.matchesSelector(n,e))){r.push(n);break}return this.pushStack(r.length>1?re.uniqueSort(r):r)},index:function(e){return e?"string"==typeof e?Z.call(re(e),this[0]):Z.call(this,e.jquerykws?e[0]:e):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(e,t){return this.pushStack(re.uniqueSort(re.merge(this.get(),re(e,t))))},addBack:function(e){return this.add(null==e?this.prevObject:this.prevObject.filter(e))}}),re.each({parent:function(e){var t=e.parentNode;return t&&11!==t.nodeType?t:null},parents:function(e){return pe(e,"parentNode")},parentsUntil:function(e,t,n){return pe(e,"parentNode",n)},next:function(e){return o(e,"nextSibling")},prev:function(e){return o(e,"previousSibling")},nextAll:function(e){return pe(e,"nextSibling")},prevAll:function(e){return pe(e,"previousSibling")},nextUntil:function(e,t,n){return pe(e,"nextSibling",n)},prevUntil:function(e,t,n){return pe(e,"previousSibling",n)},siblings:function(e){return fe((e.parentNode||{}).firstChild,e)},children:function(e){return fe(e.firstChild)},contents:function(e){return e.contentDocument||re.merge([],e.childNodes)}},function(e,t){re.fn[e]=function(n,i){var o=re.map(this,t,n);return"Until"!==e.slice(-5)&&(i=n),i&&"string"==typeof i&&(o=re.filter(i,o)),this.length>1&&(we[e]||re.uniqueSort(o),be.test(e)&&o.reverse()),this.pushStack(o)}});var xe=/\S+/g;re.Callbacks=function(e){e="string"==typeof e?r(e):re.extend({},e);var t,n,i,o,s=[],a=[],c=-1,u=function(){for(o=e.once,i=t=!0;a.length;c=-1)for(n=a.shift();++c<s.length;)s[c].apply(n[0],n[1])===!1&&e.stopOnFalse&&(c=s.length,n=!1);e.memory||(n=!1),t=!1,o&&(s=n?[]:"")},l={add:function(){return s&&(n&&!t&&(c=s.length-1,a.push(n)),function i(t){re.each(t,function(t,n){re.isFunction(n)?e.unique&&l.has(n)||s.push(n):n&&n.length&&"string"!==re.type(n)&&i(n)})}(arguments),n&&!t&&u()),this},remove:function(){return re.each(arguments,function(e,t){for(var n;(n=re.inArray(t,s,n))>-1;)s.splice(n,1),c>=n&&c--}),this},has:function(e){return e?re.inArray(e,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return o=a=[],s=n="",this},disabled:function(){return!s},lock:function(){return o=a=[],n||(s=n=""),this},locked:function(){return!!o},fireWith:function(e,n){return o||(n=n||[],n=[e,n.slice?n.slice():n],a.push(n),t||u()),this},fire:function(){return l.fireWith(this,arguments),this},fired:function(){return!!i}};return l},re.extend({Deferred:function(e){var t=[["resolve","done",re.Callbacks("once memory"),"resolved"],["reject","fail",re.Callbacks("once memory"),"rejected"],["notify","progress",re.Callbacks("memory")]],n="pending",i={state:function(){return n},"catch":function(){return o.fail(arguments),this},always:function(){return o.done(arguments).fail(arguments),this},"finally":function(){return o.done(arguments).fail(arguments),this},then:function(){var e=arguments;return re.Deferred(function(n){re.each(t,function(t,r){var s=re.isFunction(e[t])&&e[t];o[r[1]](function(){var e=s&&s.apply(this,arguments);e&&re.isFunction(e.promise)?e.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this===i?n.promise():this,s?[e]:arguments)})}),e=null}).promise()},promise:function(e){return null!=e?re.extend(e,i):i}},o={};return i.pipe=i.then,re.each(t,function(e,r){var s=r[2],a=r[3];i[r[1]]=s.add,a&&s.add(function(){n=a},t[1^e][2].disable,t[2][2].lock),o[r[0]]=function(){return o[r[0]+"With"](this===o?i:this,arguments),this},o[r[0]+"With"]=s.fireWith}),i.promise(o),e&&e.call(o,o),o},when:function(e){var t,n,i,o=0,r=Y.call(arguments),s=r.length,a=1!==s||e&&re.isFunction(e.promise)?s:0,c=1===a?e:re.Deferred(),u=function(e,n,i){return function(o){n[e]=this,i[e]=arguments.length>1?Y.call(arguments):o,i===t?c.notifyWith(n,i):--a||c.resolveWith(n,i)}};if(s>1)for(t=new Array(s),n=new Array(s),i=new Array(s);s>o;o++)r[o]&&re.isFunction(r[o].promise)?r[o].promise().progress(u(o,n,t)).done(u(o,i,r)).fail(c.reject):--a;return a||c.resolveWith(i,r),c.promise()}});var ke;re.fn.ready=function(e){return re.ready.promise().done(e),this},re.extend({isReady:!1,readyWait:1,holdReady:function(e){e?re.readyWait++:re.ready(!0)},ready:function(e){(e===!0?--re.readyWait:re.isReady)||(re.isReady=!0,e!==!0&&--re.readyWait>0||(ke.resolveWith(V,[re]),re.fn.triggerHandler&&(re(V).triggerHandler("ready"),re(V).off("ready"))))}}),re.ready.promise=function(t){return ke||(ke=re.Deferred(),"complete"===V.readyState||"loading"!==V.readyState&&!V.documentElement.doScroll?e.setTimeout(re.ready):(V.addEventListener("DOMContentLoaded",s),e.addEventListener("load",s))),ke.promise(t)},re.ready.promise();var Te=function(e,t,n,i,o,r,s){var a=0,c=e.length,u=null==n;if("object"===re.type(n)){o=!0;for(a in n)Te(e,t,a,n[a],!0,r,s)}else if(void 0!==i&&(o=!0,re.isFunction(i)||(s=!0),u&&(s?(t.call(e,i),t=null):(u=t,t=function(e,t,n){return u.call(re(e),n)})),t))for(;c>a;a++)t(e[a],n,s?i:i.call(e[a],a,t(e[a],n)));return o?e:u?t.call(e):c?t(e[0],n):r},Ce=function(e){return 1===e.nodeType||9===e.nodeType||!+e.nodeType};a.uid=1,a.prototype={register:function(e,t){var n=t||{};return e.nodeType?e[this.expando]=n:Object.defineProperty(e,this.expando,{value:n,writable:!0,configurable:!0}),e[this.expando]},cache:function(e){if(!Ce(e))return{};var t=e[this.expando];return t||(t={},Ce(e)&&(e.nodeType?e[this.expando]=t:Object.defineProperty(e,this.expando,{value:t,configurable:!0}))),t},set:function(e,t,n){var i,o=this.cache(e);if("string"==typeof t)o[t]=n;else for(i in t)o[i]=t[i];return o},get:function(e,t){return void 0===t?this.cache(e):e[this.expando]&&e[this.expando][t]},access:function(e,t,n){var i;return void 0===t||t&&"string"==typeof t&&void 0===n?(i=this.get(e,t),void 0!==i?i:this.get(e,re.camelCase(t))):(this.set(e,t,n),void 0!==n?n:t)},remove:function(e,t){var n,i,o,r=e[this.expando];if(void 0!==r){if(void 0===t)this.register(e);else{re.isArray(t)?i=t.concat(t.map(re.camelCase)):(o=re.camelCase(t),t in r?i=[t,o]:(i=o,i=i in r?[i]:i.match(xe)||[])),n=i.length;for(;n--;)delete r[i[n]]}(void 0===t||re.isEmptyObject(r))&&(e.nodeType?e[this.expando]=void 0:delete e[this.expando])}},hasData:function(e){var t=e[this.expando];return void 0!==t&&!re.isEmptyObject(t)}};var Ee=new a,Ae=new a,Se=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,Ne=/[A-Z]/g;re.extend({hasData:function(e){return Ae.hasData(e)||Ee.hasData(e)},data:function(e,t,n){return Ae.access(e,t,n)},removeData:function(e,t){Ae.remove(e,t)},_data:function(e,t,n){return Ee.access(e,t,n)},_removeData:function(e,t){Ee.remove(e,t)}}),re.fn.extend({data:function(e,t){var n,i,o,r=this[0],s=r&&r.attributes;if(void 0===e){if(this.length&&(o=Ae.get(r),1===r.nodeType&&!Ee.get(r,"hasDataAttrs"))){for(n=s.length;n--;)s[n]&&(i=s[n].name,0===i.indexOf("data-")&&(i=re.camelCase(i.slice(5)),c(r,i,o[i])));Ee.set(r,"hasDataAttrs",!0)}return o}return"object"==typeof e?this.each(function(){Ae.set(this,e)}):Te(this,function(t){var n,i;if(r&&void 0===t){if(n=Ae.get(r,e)||Ae.get(r,e.replace(Ne,"-$&").toLowerCase()),void 0!==n)return n;if(i=re.camelCase(e),n=Ae.get(r,i),void 0!==n)return n;if(n=c(r,i,void 0),void 0!==n)return n}else i=re.camelCase(e),this.each(function(){var n=Ae.get(this,i);Ae.set(this,i,t),e.indexOf("-")>-1&&void 0!==n&&Ae.set(this,e,t)})},null,t,arguments.length>1,null,!0)},removeData:function(e){return this.each(function(){Ae.remove(this,e)})}}),re.extend({queue:function(e,t,n){var i;return e?(t=(t||"fx")+"queue",i=Ee.get(e,t),n&&(!i||re.isArray(n)?i=Ee.access(e,t,re.makeArray(n)):i.push(n)),i||[]):void 0},dequeue:function(e,t){t=t||"fx";var n=re.queue(e,t),i=n.length,o=n.shift(),r=re._queueHooks(e,t),s=function(){re.dequeue(e,t)};"inprogress"===o&&(o=n.shift(),i--),o&&("fx"===t&&n.unshift("inprogress"),delete r.stop,o.call(e,s,r)),!i&&r&&r.empty.fire()},_queueHooks:function(e,t){var n=t+"queueHooks";return Ee.get(e,n)||Ee.access(e,n,{empty:re.Callbacks("once memory").add(function(){Ee.remove(e,[t+"queue",n])})})}}),re.fn.extend({queue:function(e,t){var n=2;return"string"!=typeof e&&(t=e,e="fx",n--),arguments.length<n?re.queue(this[0],e):void 0===t?this:this.each(function(){var n=re.queue(this,e,t);re._queueHooks(this,e),"fx"===e&&"inprogress"!==n[0]&&re.dequeue(this,e)})},dequeue:function(e){return this.each(function(){re.dequeue(this,e)})},clearQueue:function(e){return this.queue(e||"fx",[])},promise:function(e,t){var n,i=1,o=re.Deferred(),r=this,s=this.length,a=function(){--i||o.resolveWith(r,[r])};for("string"!=typeof e&&(t=e,e=void 0),e=e||"fx";s--;)n=Ee.get(r[s],e+"queueHooks"),n&&n.empty&&(i++,n.empty.add(a));return a(),o.promise(t)}});var _e=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,je=new RegExp("^(?:([+-])=|)("+_e+")([a-z%]*)$","i"),Re=["Top","Right","Bottom","Left"],De=function(e,t){return e=t||e,"none"===re.css(e,"display")||!re.contains(e.ownerDocument,e)},Pe=/^(?:checkbox|radio)$/i,Oe=/<([\w:-]+)/,qe=/^$|\/(?:java|ecma)script/i,Be={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,"",""]};Be.optgroup=Be.option,Be.tbody=Be.tfoot=Be.colgroup=Be.caption=Be.thead,Be.th=Be.td;var Le=/<|&#?\w+;/;!function(){var e=V.createDocumentFragment(),t=e.appendChild(V.createElement("div")),n=V.createElement("input");n.setAttribute("type","radio"),n.setAttribute("checked","checked"),n.setAttribute("name","t"),t.appendChild(n),ie.checkClone=t.cloneNode(!0).cloneNode(!0).lastChild.checked,t.innerHTML="<textarea>x</textarea>",ie.noCloneChecked=!!t.cloneNode(!0).lastChild.defaultValue}();var $e=/^key/,He=/^(?:mouse|pointer|contextmenu|drag|drop)|click/,Ie=/^([^.]*)(?:\.(.+)|)/;re.event={global:{},add:function(e,t,n,i,o){var r,s,a,c,u,l,p,f,h,d,g,m=Ee.get(e);if(m)for(n.handler&&(r=n,n=r.handler,o=r.selector),n.guid||(n.guid=re.guid++),(c=m.events)||(c=m.events={}),(s=m.handle)||(s=m.handle=function(t){return"undefined"!=typeof re&&re.event.triggered!==t.type?re.event.dispatch.apply(e,arguments):void 0}),t=(t||"").match(xe)||[""],u=t.length;u--;)a=Ie.exec(t[u])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h&&(p=re.event.special[h]||{},h=(o?p.delegateType:p.bindType)||h,p=re.event.special[h]||{},l=re.extend({type:h,origType:g,data:i,handler:n,guid:n.guid,selector:o,needsContext:o&&re.expr.match.needsContext.test(o),namespace:d.join(".")},r),(f=c[h])||(f=c[h]=[],f.delegateCount=0,p.setup&&p.setup.call(e,i,d,s)!==!1||e.addEventListener&&e.addEventListener(h,s)),p.add&&(p.add.call(e,l),l.handler.guid||(l.handler.guid=n.guid)),o?f.splice(f.delegateCount++,0,l):f.push(l),re.event.global[h]=!0)},remove:function(e,t,n,i,o){var r,s,a,c,u,l,p,f,h,d,g,m=Ee.hasData(e)&&Ee.get(e);if(m&&(c=m.events)){for(t=(t||"").match(xe)||[""],u=t.length;u--;)if(a=Ie.exec(t[u])||[],h=g=a[1],d=(a[2]||"").split(".").sort(),h){for(p=re.event.special[h]||{},h=(i?p.delegateType:p.bindType)||h,f=c[h]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=r=f.length;r--;)l=f[r],!o&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||i&&i!==l.selector&&("**"!==i||!l.selector)||(f.splice(r,1),l.selector&&f.delegateCount--,p.remove&&p.remove.call(e,l));s&&!f.length&&(p.teardown&&p.teardown.call(e,d,m.handle)!==!1||re.removeEvent(e,h,m.handle),delete c[h])}else for(h in c)re.event.remove(e,h+t[u],n,i,!0);re.isEmptyObject(c)&&Ee.remove(e,"handle events")}},dispatch:function(e){e=re.event.fix(e);var t,n,i,o,r,s=[],a=Y.call(arguments),c=(Ee.get(this,"events")||{})[e.type]||[],u=re.event.special[e.type]||{};if(a[0]=e,e.delegateTarget=this,!u.preDispatch||u.preDispatch.call(this,e)!==!1){for(s=re.event.handlers.call(this,e,c),t=0;(o=s[t++])&&!e.isPropagationStopped();)for(e.currentTarget=o.elem,n=0;(r=o.handlers[n++])&&!e.isImmediatePropagationStopped();)(!e.rnamespace||e.rnamespace.test(r.namespace))&&(e.handleObj=r,e.data=r.data,i=((re.event.special[r.origType]||{}).handle||r.handler).apply(o.elem,a),void 0!==i&&(e.result=i)===!1&&(e.preventDefault(),e.stopPropagation()));return u.postDispatch&&u.postDispatch.call(this,e),e.result}},handlers:function(e,t){var n,i,o,r,s=[],a=t.delegateCount,c=e.target;if(a&&c.nodeType&&("click"!==e.type||isNaN(e.button)||e.button<1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&(c.disabled!==!0||"click"!==e.type)){for(i=[],n=0;a>n;n++)r=t[n],o=r.selector+" ",void 0===i[o]&&(i[o]=r.needsContext?re(o,this).index(c)>-1:re.find(o,this,null,[c]).length),i[o]&&i.push(r);i.length&&s.push({elem:c,handlers:i})}return a<t.length&&s.push({elem:this,handlers:t.slice(a)}),s},props:"altKey bubbles cancelable ctrlKey currentTarget detail eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(e,t){return null==e.which&&(e.which=null!=t.charCode?t.charCode:t.keyCode),e}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(e,t){var n,i,o,r=t.button;return null==e.pageX&&null!=t.clientX&&(n=e.target.ownerDocument||V,i=n.documentElement,o=n.body,e.pageX=t.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),e.pageY=t.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),e.which||void 0===r||(e.which=1&r?1:2&r?3:4&r?2:0),e}},fix:function(e){if(e[re.expando])return e;var t,n,i,o=e.type,r=e,s=this.fixHooks[o];for(s||(this.fixHooks[o]=s=He.test(o)?this.mouseHooks:$e.test(o)?this.keyHooks:{}),i=s.props?this.props.concat(s.props):this.props,e=new re.Event(r),t=i.length;t--;)n=i[t],e[n]=r[n];return e.target||(e.target=V),3===e.target.nodeType&&(e.target=e.target.parentNode),s.filter?s.filter(e,r):e},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==g()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===g()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&re.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(e){return re.nodeName(e.target,"a")}},beforeunload:{postDispatch:function(e){void 0!==e.result&&e.originalEvent&&(e.originalEvent.returnValue=e.result)}}}},re.removeEvent=function(e,t,n){e.removeEventListener&&e.removeEventListener(t,n)},re.Event=function(e,t){return this instanceof re.Event?(e&&e.type?(this.originalEvent=e,this.type=e.type,this.isDefaultPrevented=e.defaultPrevented||void 0===e.defaultPrevented&&e.returnValue===!1?h:d):this.type=e,t&&re.extend(this,t),this.timeStamp=e&&e.timeStamp||re.now(),void(this[re.expando]=!0)):new re.Event(e,t)},re.Event.prototype={constructor:re.Event,isDefaultPrevented:d,isPropagationStopped:d,isImmediatePropagationStopped:d,preventDefault:function(){var e=this.originalEvent;this.isDefaultPrevented=h,e&&e.preventDefault()},stopPropagation:function(){var e=this.originalEvent;this.isPropagationStopped=h,e&&e.stopPropagation()},stopImmediatePropagation:function(){var e=this.originalEvent;this.isImmediatePropagationStopped=h,e&&e.stopImmediatePropagation(),this.stopPropagation()}},re.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},function(e,t){re.event.special[e]={delegateType:t,bindType:t,handle:function(e){var n,i=this,o=e.relatedTarget,r=e.handleObj;return(!o||o!==i&&!re.contains(i,o))&&(e.type=r.origType,n=r.handler.apply(this,arguments),e.type=t),n}}}),re.fn.extend({on:function(e,t,n,i){return m(this,e,t,n,i)},one:function(e,t,n,i){return m(this,e,t,n,i,1)},off:function(e,t,n){var i,o;if(e&&e.preventDefault&&e.handleObj)return i=e.handleObj,re(e.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof e){for(o in e)this.off(o,t,e[o]);return this}return(t===!1||"function"==typeof t)&&(n=t,t=void 0),n===!1&&(n=d),this.each(function(){re.event.remove(this,e,n,t)})}});var Me=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,Fe=/<script|<style|<link/i,Ue=/checked\s*(?:[^=]|=\s*.checked.)/i,ze=/^true\/(.*)/,Ke=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g;re.extend({htmlPrefilter:function(e){return e.replace(Me,"<$1></$2>")},clone:function(e,t,n){var i,o,r,s,a=e.cloneNode(!0),c=re.contains(e.ownerDocument,e);if(!(ie.noCloneChecked||1!==e.nodeType&&11!==e.nodeType||re.isXMLDoc(e)))for(s=l(a),r=l(e),i=0,o=r.length;o>i;i++)x(r[i],s[i]);if(t)if(n)for(r=r||l(e),s=s||l(a),i=0,o=r.length;o>i;i++)w(r[i],s[i]);else w(e,a);return s=l(a,"script"),s.length>0&&p(s,!c&&l(e,"script")),a},cleanData:function(e){for(var t,n,i,o=re.event.special,r=0;void 0!==(n=e[r]);r++)if(Ce(n)){if(t=n[Ee.expando]){if(t.events)for(i in t.events)o[i]?re.event.remove(n,i):re.removeEvent(n,i,t.handle);n[Ee.expando]=void 0}n[Ae.expando]&&(n[Ae.expando]=void 0)}}}),re.fn.extend({domManip:k,detach:function(e){return T(this,e,!0)},remove:function(e){return T(this,e)},text:function(e){return Te(this,function(e){return void 0===e?re.text(this):this.empty().each(function(){(1===this.nodeType||11===this.nodeType||9===this.nodeType)&&(this.textContent=e)})},null,e,arguments.length)},append:function(){return k(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.appendChild(e)}})},prepend:function(){return k(this,arguments,function(e){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var t=y(this,e);t.insertBefore(e,t.firstChild)}})},before:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this)})},after:function(){return k(this,arguments,function(e){this.parentNode&&this.parentNode.insertBefore(e,this.nextSibling)})},empty:function(){for(var e,t=0;null!=(e=this[t]);t++)1===e.nodeType&&(re.cleanData(l(e,!1)),e.textContent="");return this},clone:function(e,t){return e=null==e?!1:e,t=null==t?e:t,this.map(function(){return re.clone(this,e,t)})},html:function(e){return Te(this,function(e){var t=this[0]||{},n=0,i=this.length;if(void 0===e&&1===t.nodeType)return t.innerHTML;if("string"==typeof e&&!Fe.test(e)&&!Be[(Oe.exec(e)||["",""])[1].toLowerCase()]){e=re.htmlPrefilter(e);try{for(;i>n;n++)t=this[n]||{},1===t.nodeType&&(re.cleanData(l(t,!1)),t.innerHTML=e);t=0}catch(o){}}t&&this.empty().append(e)},null,e,arguments.length)},replaceWith:function(){var e=[];return k(this,arguments,function(t){var n=this.parentNode;re.inArray(this,e)<0&&(re.cleanData(l(this)),n&&n.replaceChild(t,this))},e)}}),re.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(e,t){re.fn[e]=function(e){for(var n,i=[],o=re(e),r=o.length-1,s=0;r>=s;s++)n=s===r?this:this.clone(!0),re(o[s])[t](n),G.apply(i,n.get());return this.pushStack(i)}});var We,Xe={HTML:"block",BODY:"block"},Je=/^margin/,Ve=new RegExp("^("+_e+")(?!px)[a-z%]+$","i"),Ye=function(t){var n=t.ownerDocument.defaultView;return n&&n.opener||(n=e),n.getComputedStyle(t)},Qe=function(e,t,n,i){var o,r,s={};for(r in t)s[r]=e.style[r],e.style[r]=t[r];o=n.apply(e,i||[]);for(r in t)e.style[r]=s[r];return o},Ge=V.documentElement;!function(){function t(){a.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;position:relative;display:block;margin:auto;border:1px;padding:1px;top:1%;width:50%",a.innerHTML="",Ge.appendChild(s);var t=e.getComputedStyle(a);n="1%"!==t.top,r="2px"===t.marginLeft,i="4px"===t.width,a.style.marginRight="50%",o="4px"===t.marginRight,Ge.removeChild(s)}var n,i,o,r,s=V.createElement("div"),a=V.createElement("div");a.style&&(a.style.backgroundClip="content-box",a.cloneNode(!0).style.backgroundClip="",ie.clearCloneStyle="content-box"===a.style.backgroundClip,s.style.cssText="border:0;width:8px;height:0;top:0;left:-9999px;padding:0;margin-top:1px;position:absolute",s.appendChild(a),re.extend(ie,{pixelPosition:function(){return t(),n},boxSizingReliable:function(){return null==i&&t(),i},pixelMarginRight:function(){return null==i&&t(),o},reliableMarginLeft:function(){return null==i&&t(),r},reliableMarginRight:function(){var t,n=a.appendChild(V.createElement("div"));return n.style.cssText=a.style.cssText="-webkit-box-sizing:content-box;box-sizing:content-box;display:block;margin:0;border:0;padding:0",n.style.marginRight=n.style.width="0",a.style.width="1px",Ge.appendChild(s),t=!parseFloat(e.getComputedStyle(n).marginRight),Ge.removeChild(s),a.removeChild(n),t}}))}();var Ze=/^(none|table(?!-c[ea]).+)/,et={position:"absolute",visibility:"hidden",display:"block"},tt={letterSpacing:"0",fontWeight:"400"},nt=["Webkit","O","Moz","ms"],it=V.createElement("div").style;re.extend({cssHooks:{opacity:{get:function(e,t){if(t){var n=A(e,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,columnCount:!0,fillOpacity:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(e,t,n,i){if(e&&3!==e.nodeType&&8!==e.nodeType&&e.style){var o,r,s,a=re.camelCase(t),c=e.style;return t=re.cssProps[a]||(re.cssProps[a]=N(a)||a),s=re.cssHooks[t]||re.cssHooks[a],void 0===n?s&&"get"in s&&void 0!==(o=s.get(e,!1,i))?o:c[t]:(r=typeof n,"string"===r&&(o=je.exec(n))&&o[1]&&(n=u(e,t,o),r="number"),null!=n&&n===n&&("number"===r&&(n+=o&&o[3]||(re.cssNumber[a]?"":"px")),ie.clearCloneStyle||""!==n||0!==t.indexOf("background")||(c[t]="inherit"),s&&"set"in s&&void 0===(n=s.set(e,n,i))||(c[t]=n)),void 0)}},css:function(e,t,n,i){var o,r,s,a=re.camelCase(t);return t=re.cssProps[a]||(re.cssProps[a]=N(a)||a),s=re.cssHooks[t]||re.cssHooks[a],s&&"get"in s&&(o=s.get(e,!0,n)),void 0===o&&(o=A(e,t,i)),"normal"===o&&t in tt&&(o=tt[t]),""===n||n?(r=parseFloat(o),n===!0||isFinite(r)?r||0:o):o}}),re.each(["height","width"],function(e,t){re.cssHooks[t]={get:function(e,n,i){return n?Ze.test(re.css(e,"display"))&&0===e.offsetWidth?Qe(e,et,function(){return R(e,t,i)}):R(e,t,i):void 0},set:function(e,n,i){var o,r=i&&Ye(e),s=i&&j(e,t,i,"border-box"===re.css(e,"boxSizing",!1,r),r);return s&&(o=je.exec(n))&&"px"!==(o[3]||"px")&&(e.style[t]=n,n=re.css(e,t)),_(e,n,s)}}}),re.cssHooks.marginLeft=S(ie.reliableMarginLeft,function(e,t){return t?(parseFloat(A(e,"marginLeft"))||e.getBoundingClientRect().left-Qe(e,{marginLeft:0},function(){return e.getBoundingClientRect().left}))+"px":void 0}),re.cssHooks.marginRight=S(ie.reliableMarginRight,function(e,t){return t?Qe(e,{display:"inline-block"},A,[e,"marginRight"]):void 0}),re.each({margin:"",padding:"",border:"Width"},function(e,t){re.cssHooks[e+t]={expand:function(n){for(var i=0,o={},r="string"==typeof n?n.split(" "):[n];4>i;i++)o[e+Re[i]+t]=r[i]||r[i-2]||r[0];return o}},Je.test(e)||(re.cssHooks[e+t].set=_)}),re.fn.extend({css:function(e,t){return Te(this,function(e,t,n){var i,o,r={},s=0;if(re.isArray(t)){for(i=Ye(e),o=t.length;o>s;s++)r[t[s]]=re.css(e,t[s],!1,i);return r}return void 0!==n?re.style(e,t,n):re.css(e,t)},e,t,arguments.length>1)},show:function(){return D(this,!0)},hide:function(){return D(this)},toggle:function(e){return"boolean"==typeof e?e?this.show():this.hide():this.each(function(){De(this)?re(this).show():re(this).hide()})}}),re.Tween=P,P.prototype={constructor:P,init:function(e,t,n,i,o,r){this.elem=e,this.prop=n,this.easing=o||re.easing._default,this.options=t,this.start=this.now=this.cur(),this.end=i,this.unit=r||(re.cssNumber[n]?"":"px")},cur:function(){var e=P.propHooks[this.prop];return e&&e.get?e.get(this):P.propHooks._default.get(this)},run:function(e){var t,n=P.propHooks[this.prop];return this.options.duration?this.pos=t=re.easing[this.easing](e,this.options.duration*e,0,1,this.options.duration):this.pos=t=e,this.now=(this.end-this.start)*t+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):P.propHooks._default.set(this),this}},P.prototype.init.prototype=P.prototype,P.propHooks={_default:{get:function(e){var t;return 1!==e.elem.nodeType||null!=e.elem[e.prop]&&null==e.elem.style[e.prop]?e.elem[e.prop]:(t=re.css(e.elem,e.prop,""),t&&"auto"!==t?t:0)},set:function(e){re.fx.step[e.prop]?re.fx.step[e.prop](e):1!==e.elem.nodeType||null==e.elem.style[re.cssProps[e.prop]]&&!re.cssHooks[e.prop]?e.elem[e.prop]=e.now:re.style(e.elem,e.prop,e.now+e.unit)}}},P.propHooks.scrollTop=P.propHooks.scrollLeft={
set:function(e){e.elem.nodeType&&e.elem.parentNode&&(e.elem[e.prop]=e.now)}},re.easing={linear:function(e){return e},swing:function(e){return.5-Math.cos(e*Math.PI)/2},_default:"swing"},re.fx=P.prototype.init,re.fx.step={};var ot,rt,st=/^(?:toggle|show|hide)$/,at=/queueHooks$/;re.Animation=re.extend(H,{tweeners:{"*":[function(e,t){var n=this.createTween(e,t);return u(n.elem,e,je.exec(t),n),n}]},tweener:function(e,t){re.isFunction(e)?(t=e,e=["*"]):e=e.match(xe);for(var n,i=0,o=e.length;o>i;i++)n=e[i],H.tweeners[n]=H.tweeners[n]||[],H.tweeners[n].unshift(t)},prefilters:[L],prefilter:function(e,t){t?H.prefilters.unshift(e):H.prefilters.push(e)}}),re.speed=function(e,t,n){var i=e&&"object"==typeof e?re.extend({},e):{complete:n||!n&&t||re.isFunction(e)&&e,duration:e,easing:n&&t||t&&!re.isFunction(t)&&t};return i.duration=re.fx.off?0:"number"==typeof i.duration?i.duration:i.duration in re.fx.speeds?re.fx.speeds[i.duration]:re.fx.speeds._default,(null==i.queue||i.queue===!0)&&(i.queue="fx"),i.old=i.complete,i.complete=function(){re.isFunction(i.old)&&i.old.call(this),i.queue&&re.dequeue(this,i.queue)},i},re.fn.extend({fadeTo:function(e,t,n,i){return this.filter(De).css("opacity",0).show().end().animate({opacity:t},e,n,i)},animate:function(e,t,n,i){var o=re.isEmptyObject(e),r=re.speed(t,n,i),s=function(){var t=H(this,re.extend({},e),r);(o||Ee.get(this,"finish"))&&t.stop(!0)};return s.finish=s,o||r.queue===!1?this.each(s):this.queue(r.queue,s)},stop:function(e,t,n){var i=function(e){var t=e.stop;delete e.stop,t(n)};return"string"!=typeof e&&(n=t,t=e,e=void 0),t&&e!==!1&&this.queue(e||"fx",[]),this.each(function(){var t=!0,o=null!=e&&e+"queueHooks",r=re.timers,s=Ee.get(this);if(o)s[o]&&s[o].stop&&i(s[o]);else for(o in s)s[o]&&s[o].stop&&at.test(o)&&i(s[o]);for(o=r.length;o--;)r[o].elem!==this||null!=e&&r[o].queue!==e||(r[o].anim.stop(n),t=!1,r.splice(o,1));(t||!n)&&re.dequeue(this,e)})},finish:function(e){return e!==!1&&(e=e||"fx"),this.each(function(){var t,n=Ee.get(this),i=n[e+"queue"],o=n[e+"queueHooks"],r=re.timers,s=i?i.length:0;for(n.finish=!0,re.queue(this,e,[]),o&&o.stop&&o.stop.call(this,!0),t=r.length;t--;)r[t].elem===this&&r[t].queue===e&&(r[t].anim.stop(!0),r.splice(t,1));for(t=0;s>t;t++)i[t]&&i[t].finish&&i[t].finish.call(this);delete n.finish})}}),re.each(["toggle","show","hide"],function(e,t){var n=re.fn[t];re.fn[t]=function(e,i,o){return null==e||"boolean"==typeof e?n.apply(this,arguments):this.animate(q(t,!0),e,i,o)}}),re.each({slideDown:q("show"),slideUp:q("hide"),slideToggle:q("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(e,t){re.fn[e]=function(e,n,i){return this.animate(t,e,n,i)}}),re.timers=[],re.fx.tick=function(){var e,t=0,n=re.timers;for(ot=re.now();t<n.length;t++)e=n[t],e()||n[t]!==e||n.splice(t--,1);n.length||re.fx.stop(),ot=void 0},re.fx.timer=function(e){re.timers.push(e),e()?re.fx.start():re.timers.pop()},re.fx.interval=13,re.fx.start=function(){rt||(rt=e.setInterval(re.fx.tick,re.fx.interval))},re.fx.stop=function(){e.clearInterval(rt),rt=null},re.fx.speeds={slow:600,fast:200,_default:400},re.fn.delay=function(t,n){return t=re.fx?re.fx.speeds[t]||t:t,n=n||"fx",this.queue(n,function(n,i){var o=e.setTimeout(n,t);i.stop=function(){e.clearTimeout(o)}})},function(){var e=V.createElement("input"),t=V.createElement("select"),n=t.appendChild(V.createElement("option"));e.type="checkbox",ie.checkOn=""!==e.value,ie.optSelected=n.selected,t.disabled=!0,ie.optDisabled=!n.disabled,e=V.createElement("input"),e.value="t",e.type="radio",ie.radioValue="t"===e.value}();var ct,ut=re.expr.attrHandle;re.fn.extend({attr:function(e,t){return Te(this,re.attr,e,t,arguments.length>1)},removeAttr:function(e){return this.each(function(){re.removeAttr(this,e)})}}),re.extend({attr:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return"undefined"==typeof e.getAttribute?re.prop(e,t,n):(1===r&&re.isXMLDoc(e)||(t=t.toLowerCase(),o=re.attrHooks[t]||(re.expr.match.bool.test(t)?ct:void 0)),void 0!==n?null===n?void re.removeAttr(e,t):o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:(e.setAttribute(t,n+""),n):o&&"get"in o&&null!==(i=o.get(e,t))?i:(i=re.find.attr(e,t),null==i?void 0:i))},attrHooks:{type:{set:function(e,t){if(!ie.radioValue&&"radio"===t&&re.nodeName(e,"input")){var n=e.value;return e.setAttribute("type",t),n&&(e.value=n),t}}}},removeAttr:function(e,t){var n,i,o=0,r=t&&t.match(xe);if(r&&1===e.nodeType)for(;n=r[o++];)i=re.propFix[n]||n,re.expr.match.bool.test(n)&&(e[i]=!1),e.removeAttribute(n)}}),ct={set:function(e,t,n){return t===!1?re.removeAttr(e,n):e.setAttribute(n,n),n}},re.each(re.expr.match.bool.source.match(/\w+/g),function(e,t){var n=ut[t]||re.find.attr;ut[t]=function(e,t,i){var o,r;return i||(r=ut[t],ut[t]=o,o=null!=n(e,t,i)?t.toLowerCase():null,ut[t]=r),o}});var lt=/^(?:input|select|textarea|button)$/i,pt=/^(?:a|area)$/i;re.fn.extend({prop:function(e,t){return Te(this,re.prop,e,t,arguments.length>1)},removeProp:function(e){return this.each(function(){delete this[re.propFix[e]||e]})}}),re.extend({prop:function(e,t,n){var i,o,r=e.nodeType;if(3!==r&&8!==r&&2!==r)return 1===r&&re.isXMLDoc(e)||(t=re.propFix[t]||t,o=re.propHooks[t]),void 0!==n?o&&"set"in o&&void 0!==(i=o.set(e,n,t))?i:e[t]=n:o&&"get"in o&&null!==(i=o.get(e,t))?i:e[t]},propHooks:{tabIndex:{get:function(e){var t=re.find.attr(e,"tabindex");return t?parseInt(t,10):lt.test(e.nodeName)||pt.test(e.nodeName)&&e.href?0:-1}}},propFix:{"for":"htmlFor","class":"className"}}),ie.optSelected||(re.propHooks.selected={get:function(e){var t=e.parentNode;return t&&t.parentNode&&t.parentNode.selectedIndex,null},set:function(e){var t=e.parentNode;t&&(t.selectedIndex,t.parentNode&&t.parentNode.selectedIndex)}}),re.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){re.propFix[this.toLowerCase()]=this});var ft=/[\t\r\n\f]/g;re.fn.extend({addClass:function(e){var t,n,i,o,r,s,a,c=0;if(re.isFunction(e))return this.each(function(t){re(this).addClass(e.call(this,t,I(this)))});if("string"==typeof e&&e)for(t=e.match(xe)||[];n=this[c++];)if(o=I(n),i=1===n.nodeType&&(" "+o+" ").replace(ft," ")){for(s=0;r=t[s++];)i.indexOf(" "+r+" ")<0&&(i+=r+" ");a=re.trim(i),o!==a&&n.setAttribute("class",a)}return this},removeClass:function(e){var t,n,i,o,r,s,a,c=0;if(re.isFunction(e))return this.each(function(t){re(this).removeClass(e.call(this,t,I(this)))});if(!arguments.length)return this.attr("class","");if("string"==typeof e&&e)for(t=e.match(xe)||[];n=this[c++];)if(o=I(n),i=1===n.nodeType&&(" "+o+" ").replace(ft," ")){for(s=0;r=t[s++];)for(;i.indexOf(" "+r+" ")>-1;)i=i.replace(" "+r+" "," ");a=re.trim(i),o!==a&&n.setAttribute("class",a)}return this},toggleClass:function(e,t){var n=typeof e;return"boolean"==typeof t&&"string"===n?t?this.addClass(e):this.removeClass(e):re.isFunction(e)?this.each(function(n){re(this).toggleClass(e.call(this,n,I(this),t),t)}):this.each(function(){var t,i,o,r;if("string"===n)for(i=0,o=re(this),r=e.match(xe)||[];t=r[i++];)o.hasClass(t)?o.removeClass(t):o.addClass(t);else(void 0===e||"boolean"===n)&&(t=I(this),t&&Ee.set(this,"__className__",t),this.setAttribute&&this.setAttribute("class",t||e===!1?"":Ee.get(this,"__className__")||""))})},hasClass:function(e){var t,n,i=0;for(t=" "+e+" ";n=this[i++];)if(1===n.nodeType&&(" "+I(n)+" ").replace(ft," ").indexOf(t)>-1)return!0;return!1}});var ht=/\r/g,dt=/[\x20\t\r\n\f]+/g;re.fn.extend({val:function(e){var t,n,i,o=this[0];{if(arguments.length)return i=re.isFunction(e),this.each(function(n){var o;1===this.nodeType&&(o=i?e.call(this,n,re(this).val()):e,null==o?o="":"number"==typeof o?o+="":re.isArray(o)&&(o=re.map(o,function(e){return null==e?"":e+""})),t=re.valHooks[this.type]||re.valHooks[this.nodeName.toLowerCase()],t&&"set"in t&&void 0!==t.set(this,o,"value")||(this.value=o))});if(o)return t=re.valHooks[o.type]||re.valHooks[o.nodeName.toLowerCase()],t&&"get"in t&&void 0!==(n=t.get(o,"value"))?n:(n=o.value,"string"==typeof n?n.replace(ht,""):null==n?"":n)}}}),re.extend({valHooks:{option:{get:function(e){var t=re.find.attr(e,"value");return null!=t?t:re.trim(re.text(e)).replace(dt," ")}},select:{get:function(e){for(var t,n,i=e.options,o=e.selectedIndex,r="select-one"===e.type||0>o,s=r?null:[],a=r?o+1:i.length,c=0>o?a:r?o:0;a>c;c++)if(n=i[c],(n.selected||c===o)&&(ie.optDisabled?!n.disabled:null===n.getAttribute("disabled"))&&(!n.parentNode.disabled||!re.nodeName(n.parentNode,"optgroup"))){if(t=re(n).val(),r)return t;s.push(t)}return s},set:function(e,t){for(var n,i,o=e.options,r=re.makeArray(t),s=o.length;s--;)i=o[s],(i.selected=re.inArray(re.valHooks.option.get(i),r)>-1)&&(n=!0);return n||(e.selectedIndex=-1),r}}}}),re.each(["radio","checkbox"],function(){re.valHooks[this]={set:function(e,t){return re.isArray(t)?e.checked=re.inArray(re(e).val(),t)>-1:void 0}},ie.checkOn||(re.valHooks[this].get=function(e){return null===e.getAttribute("value")?"on":e.value})});var gt=/^(?:focusinfocus|focusoutblur)$/;re.extend(re.event,{trigger:function(t,n,i,o){var r,s,a,c,u,l,p,f=[i||V],h=ne.call(t,"type")?t.type:t,d=ne.call(t,"namespace")?t.namespace.split("."):[];if(s=a=i=i||V,3!==i.nodeType&&8!==i.nodeType&&!gt.test(h+re.event.triggered)&&(h.indexOf(".")>-1&&(d=h.split("."),h=d.shift(),d.sort()),u=h.indexOf(":")<0&&"on"+h,t=t[re.expando]?t:new re.Event(h,"object"==typeof t&&t),t.isTrigger=o?2:3,t.namespace=d.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=i),n=null==n?[t]:re.makeArray(n,[t]),p=re.event.special[h]||{},o||!p.trigger||p.trigger.apply(i,n)!==!1)){if(!o&&!p.noBubble&&!re.isWindow(i)){for(c=p.delegateType||h,gt.test(c+h)||(s=s.parentNode);s;s=s.parentNode)f.push(s),a=s;a===(i.ownerDocument||V)&&f.push(a.defaultView||a.parentWindow||e)}for(r=0;(s=f[r++])&&!t.isPropagationStopped();)t.type=r>1?c:p.bindType||h,l=(Ee.get(s,"events")||{})[t.type]&&Ee.get(s,"handle"),l&&l.apply(s,n),l=u&&s[u],l&&l.apply&&Ce(s)&&(t.result=l.apply(s,n),t.result===!1&&t.preventDefault());return t.type=h,o||t.isDefaultPrevented()||p._default&&p._default.apply(f.pop(),n)!==!1||!Ce(i)||u&&re.isFunction(i[h])&&!re.isWindow(i)&&(a=i[u],a&&(i[u]=null),re.event.triggered=h,i[h](),re.event.triggered=void 0,a&&(i[u]=a)),t.result}},simulate:function(e,t,n){var i=re.extend(new re.Event,n,{type:e,isSimulated:!0});re.event.trigger(i,null,t),i.isDefaultPrevented()&&n.preventDefault()}}),re.fn.extend({trigger:function(e,t){return this.each(function(){re.event.trigger(e,t,this)})},triggerHandler:function(e,t){var n=this[0];return n?re.event.trigger(e,t,n,!0):void 0}}),re.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(e,t){re.fn[t]=function(e,n){return arguments.length>0?this.on(t,null,e,n):this.trigger(t)}}),re.fn.extend({hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),ie.focusin="onfocusin"in e,ie.focusin||re.each({focus:"focusin",blur:"focusout"},function(e,t){var n=function(e){re.event.simulate(t,e.target,re.event.fix(e))};re.event.special[t]={setup:function(){var i=this.ownerDocument||this,o=Ee.access(i,t);o||i.addEventListener(e,n,!0),Ee.access(i,t,(o||0)+1)},teardown:function(){var i=this.ownerDocument||this,o=Ee.access(i,t)-1;o?Ee.access(i,t,o):(i.removeEventListener(e,n,!0),Ee.remove(i,t))}}});var mt=e.location,yt=re.now(),vt=/\?/;re.parseJSON=function(e){return JSON.parse(e+"")},re.parseXML=function(t){var n;if(!t||"string"!=typeof t)return null;try{n=(new e.DOMParser).parseFromString(t,"text/xml")}catch(i){n=void 0}return(!n||n.getElementsByTagName("parsererror").length)&&re.error("Invalid XML: "+t),n};var bt=/#.*$/,wt=/([?&])_=[^&]*/,xt=/^(.*?):[ \t]*([^\r\n]*)$/gm,kt=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,Tt=/^(?:GET|HEAD)$/,Ct=/^\/\//,Et={},At={},St="*/".concat("*"),Nt=V.createElement("a");Nt.href=mt.href,re.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:mt.href,type:"GET",isLocal:kt.test(mt.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":St,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":re.parseJSON,"text xml":re.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(e,t){return t?U(U(e,re.ajaxSettings),t):U(re.ajaxSettings,e)},ajaxPrefilter:M(Et),ajaxTransport:M(At),ajax:function(t,n){function i(t,n,i,a){var u,p,v,b,x,T=n;2!==w&&(w=2,c&&e.clearTimeout(c),o=void 0,s=a||"",k.readyState=t>0?4:0,u=t>=200&&300>t||304===t,i&&(b=z(f,k,i)),b=K(f,b,k,u),u?(f.ifModified&&(x=k.getResponseHeader("Last-Modified"),x&&(re.lastModified[r]=x),x=k.getResponseHeader("etag"),x&&(re.etag[r]=x)),204===t||"HEAD"===f.type?T="nocontent":304===t?T="notmodified":(T=b.state,p=b.data,v=b.error,u=!v)):(v=T,(t||!T)&&(T="error",0>t&&(t=0))),k.status=t,k.statusText=(n||T)+"",u?g.resolveWith(h,[p,T,k]):g.rejectWith(h,[k,T,v]),k.statusCode(y),y=void 0,l&&d.trigger(u?"ajaxSuccess":"ajaxError",[k,f,u?p:v]),m.fireWith(h,[k,T]),l&&(d.trigger("ajaxComplete",[k,f]),--re.active||re.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=void 0),n=n||{};var o,r,s,a,c,u,l,p,f=re.ajaxSetup({},n),h=f.context||f,d=f.context&&(h.nodeType||h.jquerykws)?re(h):re.event,g=re.Deferred(),m=re.Callbacks("once memory"),y=f.statusCode||{},v={},b={},w=0,x="canceled",k={readyState:0,getResponseHeader:function(e){var t;if(2===w){if(!a)for(a={};t=xt.exec(s);)a[t[1].toLowerCase()]=t[2];t=a[e.toLowerCase()]}return null==t?null:t},getAllResponseHeaders:function(){return 2===w?s:null},setRequestHeader:function(e,t){var n=e.toLowerCase();return w||(e=b[n]=b[n]||e,v[e]=t),this},overrideMimeType:function(e){return w||(f.mimeType=e),this},statusCode:function(e){var t;if(e)if(2>w)for(t in e)y[t]=[y[t],e[t]];else k.always(e[k.status]);return this},abort:function(e){var t=e||x;return o&&o.abort(t),i(0,t),this}};if(g.promise(k).complete=m.add,k.success=k.done,k.error=k.fail,f.url=((t||f.url||mt.href)+"").replace(bt,"").replace(Ct,mt.protocol+"//"),f.type=n.method||n.type||f.method||f.type,f.dataTypes=re.trim(f.dataType||"*").toLowerCase().match(xe)||[""],null==f.crossDomain){u=V.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=Nt.protocol+"//"+Nt.host!=u.protocol+"//"+u.host}catch(T){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=re.param(f.data,f.traditional)),F(Et,f,n,k),2===w)return k;l=re.event&&f.global,l&&0===re.active++&&re.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Tt.test(f.type),r=f.url,f.hasContent||(f.data&&(r=f.url+=(vt.test(r)?"&":"?")+f.data,delete f.data),f.cache===!1&&(f.url=wt.test(r)?r.replace(wt,"$1_="+yt++):r+(vt.test(r)?"&":"?")+"_="+yt++)),f.ifModified&&(re.lastModified[r]&&k.setRequestHeader("If-Modified-Since",re.lastModified[r]),re.etag[r]&&k.setRequestHeader("If-None-Match",re.etag[r])),(f.data&&f.hasContent&&f.contentType!==!1||n.contentType)&&k.setRequestHeader("Content-Type",f.contentType),k.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+St+"; q=0.01":""):f.accepts["*"]);for(p in f.headers)k.setRequestHeader(p,f.headers[p]);if(f.beforeSend&&(f.beforeSend.call(h,k,f)===!1||2===w))return k.abort();x="abort";for(p in{success:1,error:1,complete:1})k[p](f[p]);if(o=F(At,f,n,k)){if(k.readyState=1,l&&d.trigger("ajaxSend",[k,f]),2===w)return k;f.async&&f.timeout>0&&(c=e.setTimeout(function(){k.abort("timeout")},f.timeout));try{w=1,o.send(v,i)}catch(T){if(!(2>w))throw T;i(-1,T)}}else i(-1,"No Transport");return k},getJSON:function(e,t,n){return re.get(e,t,n,"json")},getScript:function(e,t){return re.get(e,void 0,t,"script")}}),re.each(["get","post"],function(e,t){re[t]=function(e,n,i,o){return re.isFunction(n)&&(o=o||i,i=n,n=void 0),re.ajax(re.extend({url:e,type:t,dataType:o,data:n,success:i},re.isPlainObject(e)&&e))}}),re._evalUrl=function(e){return re.ajax({url:e,type:"GET",dataType:"script",async:!1,global:!1,"throws":!0})},re.fn.extend({wrapAll:function(e){var t;return re.isFunction(e)?this.each(function(t){re(this).wrapAll(e.call(this,t))}):(this[0]&&(t=re(e,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&t.insertBefore(this[0]),t.map(function(){for(var e=this;e.firstElementChild;)e=e.firstElementChild;return e}).append(this)),this)},wrapInner:function(e){return re.isFunction(e)?this.each(function(t){re(this).wrapInner(e.call(this,t))}):this.each(function(){var t=re(this),n=t.contents();n.length?n.wrapAll(e):t.append(e)})},wrap:function(e){var t=re.isFunction(e);return this.each(function(n){re(this).wrapAll(t?e.call(this,n):e)})},unwrap:function(){return this.parent().each(function(){re.nodeName(this,"body")||re(this).replaceWith(this.childNodes)}).end()}}),re.expr.filters.hidden=function(e){return!re.expr.filters.visible(e)},re.expr.filters.visible=function(e){return e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0};var _t=/%20/g,jt=/\[\]$/,Rt=/\r?\n/g,Dt=/^(?:submit|button|image|reset|file)$/i,Pt=/^(?:input|select|textarea|keygen)/i;re.param=function(e,t){var n,i=[],o=function(e,t){t=re.isFunction(t)?t():null==t?"":t,i[i.length]=encodeURIComponent(e)+"="+encodeURIComponent(t)};if(void 0===t&&(t=re.ajaxSettings&&re.ajaxSettings.traditional),re.isArray(e)||e.jquerykws&&!re.isPlainObject(e))re.each(e,function(){o(this.name,this.value)});else for(n in e)W(n,e[n],t,o);return i.join("&").replace(_t,"+")},re.fn.extend({serialize:function(){return re.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var e=re.prop(this,"elements");return e?re.makeArray(e):this}).filter(function(){var e=this.type;return this.name&&!re(this).is(":disabled")&&Pt.test(this.nodeName)&&!Dt.test(e)&&(this.checked||!Pe.test(e))}).map(function(e,t){var n=re(this).val();return null==n?null:re.isArray(n)?re.map(n,function(e){return{name:t.name,value:e.replace(Rt,"\r\n")}}):{name:t.name,value:n.replace(Rt,"\r\n")}}).get()}}),re.ajaxSettings.xhr=function(){try{return new e.XMLHttpRequest}catch(t){}};var Ot={0:200,1223:204},qt=re.ajaxSettings.xhr();ie.cors=!!qt&&"withCredentials"in qt,ie.ajax=qt=!!qt,re.ajaxTransport(function(t){var n,i;return ie.cors||qt&&!t.crossDomain?{send:function(o,r){var s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(s in t.xhrFields)a[s]=t.xhrFields[s];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||o["X-Requested-With"]||(o["X-Requested-With"]="XMLHttpRequest");for(s in o)a.setRequestHeader(s,o[s]);n=function(e){return function(){n&&(n=i=a.onload=a.onerror=a.onabort=a.onreadystatechange=null,"abort"===e?a.abort():"error"===e?"number"!=typeof a.status?r(0,"error"):r(a.status,a.statusText):r(Ot[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=n(),i=a.onerror=n("error"),void 0!==a.onabort?a.onabort=i:a.onreadystatechange=function(){4===a.readyState&&e.setTimeout(function(){n&&i()})},n=n("abort");try{a.send(t.hasContent&&t.data||null)}catch(c){if(n)throw c}},abort:function(){n&&n()}}:void 0}),re.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(e){return re.globalEval(e),e}}}),re.ajaxPrefilter("script",function(e){void 0===e.cache&&(e.cache=!1),e.crossDomain&&(e.type="GET")}),re.ajaxTransport("script",function(e){if(e.crossDomain){var t,n;return{send:function(i,o){t=re("<script>").prop({charset:e.scriptCharset,src:e.url}).on("load error",n=function(e){t.remove(),n=null,e&&o("error"===e.type?404:200,e.type)}),V.head.appendChild(t[0])},abort:function(){n&&n()}}}});var Bt=[],Lt=/(=)\?(?=&|$)|\?\?/;re.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Bt.pop()||re.expando+"_"+yt++;return this[e]=!0,e}}),re.ajaxPrefilter("json jsonp",function(t,n,i){var o,r,s,a=t.jsonp!==!1&&(Lt.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&Lt.test(t.data)&&"data");return a||"jsonp"===t.dataTypes[0]?(o=t.jsonpCallback=re.isFunction(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(Lt,"$1"+o):t.jsonp!==!1&&(t.url+=(vt.test(t.url)?"&":"?")+t.jsonp+"="+o),t.converters["script json"]=function(){return s||re.error(o+" was not called"),s[0]},t.dataTypes[0]="json",r=e[o],e[o]=function(){s=arguments},i.always(function(){void 0===r?re(e).removeProp(o):e[o]=r,t[o]&&(t.jsonpCallback=n.jsonpCallback,Bt.push(o)),s&&re.isFunction(r)&&r(s[0]),s=r=void 0}),"script"):void 0}),re.parseHTML=function(e,t,n){if(!e||"string"!=typeof e)return null;"boolean"==typeof t&&(n=t,t=!1),t=t||V;var i=de.exec(e),o=!n&&[];return i?[t.createElement(i[1])]:(i=f([e],t,o),o&&o.length&&re(o).remove(),re.merge([],i.childNodes))};var $t=re.fn.load;re.fn.load=function(e,t,n){if("string"!=typeof e&&$t)return $t.apply(this,arguments);var i,o,r,s=this,a=e.indexOf(" ");return a>-1&&(i=re.trim(e.slice(a)),e=e.slice(0,a)),re.isFunction(t)?(n=t,t=void 0):t&&"object"==typeof t&&(o="POST"),s.length>0&&re.ajax({url:e,type:o||"GET",dataType:"html",data:t}).done(function(e){r=arguments,s.html(i?re("<div>").append(re.parseHTML(e)).find(i):e)}).always(n&&function(e,t){s.each(function(){n.apply(this,r||[e.responseText,t,e])})}),this},re.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){re.fn[t]=function(e){return this.on(t,e)}}),re.expr.filters.animated=function(e){return re.grep(re.timers,function(t){return e===t.elem}).length},re.offset={setOffset:function(e,t,n){var i,o,r,s,a,c,u,l=re.css(e,"position"),p=re(e),f={};"static"===l&&(e.style.position="relative"),a=p.offset(),r=re.css(e,"top"),c=re.css(e,"left"),u=("absolute"===l||"fixed"===l)&&(r+c).indexOf("auto")>-1,u?(i=p.position(),s=i.top,o=i.left):(s=parseFloat(r)||0,o=parseFloat(c)||0),re.isFunction(t)&&(t=t.call(e,n,re.extend({},a))),null!=t.top&&(f.top=t.top-a.top+s),null!=t.left&&(f.left=t.left-a.left+o),"using"in t?t.using.call(e,f):p.css(f)}},re.fn.extend({offset:function(e){if(arguments.length)return void 0===e?this:this.each(function(t){re.offset.setOffset(this,e,t)});var t,n,i=this[0],o={top:0,left:0},r=i&&i.ownerDocument;if(r)return t=r.documentElement,re.contains(t,i)?(o=i.getBoundingClientRect(),n=X(r),{top:o.top+n.pageYOffset-t.clientTop,left:o.left+n.pageXOffset-t.clientLeft}):o},position:function(){if(this[0]){var e,t,n=this[0],i={top:0,left:0};return"fixed"===re.css(n,"position")?t=n.getBoundingClientRect():(e=this.offsetParent(),t=this.offset(),re.nodeName(e[0],"html")||(i=e.offset()),i.top+=re.css(e[0],"borderTopWidth",!0),i.left+=re.css(e[0],"borderLeftWidth",!0)),{top:t.top-i.top-re.css(n,"marginTop",!0),left:t.left-i.left-re.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var e=this.offsetParent;e&&"static"===re.css(e,"position");)e=e.offsetParent;return e||Ge})}}),re.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(e,t){var n="pageYOffset"===t;re.fn[e]=function(i){return Te(this,function(e,i,o){var r=X(e);return void 0===o?r?r[t]:e[i]:void(r?r.scrollTo(n?r.pageXOffset:o,n?o:r.pageYOffset):e[i]=o)},e,i,arguments.length)}}),re.each(["top","left"],function(e,t){re.cssHooks[t]=S(ie.pixelPosition,function(e,n){return n?(n=A(e,t),Ve.test(n)?re(e).position()[t]+"px":n):void 0})}),re.each({Height:"height",Width:"width"},function(e,t){re.each({padding:"inner"+e,content:t,"":"outer"+e},function(n,i){re.fn[i]=function(i,o){var r=arguments.length&&(n||"boolean"!=typeof i),s=n||(i===!0||o===!0?"margin":"border");return Te(this,function(t,n,i){var o;return re.isWindow(t)?t.document.documentElement["client"+e]:9===t.nodeType?(o=t.documentElement,Math.max(t.body["scroll"+e],o["scroll"+e],t.body["offset"+e],o["offset"+e],o["client"+e])):void 0===i?re.css(t,n,s):re.style(t,n,i,s)},t,r?i:void 0,r,null)}})}),re.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,i){return this.on(t,e,n,i)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},size:function(){return this.length}}),re.fn.andSelf=re.fn.addBack,"function"==typeof define&&define.amd&&define("jquerykws",[],function(){return re});var Ht=e.jQueryKws,It=e.$;return re.noConflict=function(t){return e.$===re&&(e.$=It),t&&e.jQueryKws===re&&(e.jQueryKws=Ht),re},t||(e.jQueryKws=e.$=re),re}),!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.io=e()}}(function(){var e;return function t(e,n,i){function o(s,a){if(!n[s]){if(!e[s]){var c="function"==typeof require&&require;if(!a&&c)return c(s,!0);if(r)return r(s,!0);throw new Error("Cannot find module '"+s+"'")}var u=n[s]={exports:{}};e[s][0].call(u.exports,function(t){var n=e[s][1][t];return o(n?n:t)},u,u.exports,t,e,n,i)}return n[s].exports}for(var r="function"==typeof require&&require,s=0;s<i.length;s++)o(i[s]);return o}({1:[function(e,t){t.exports=e("./lib/")},{"./lib/":2}],2:[function(e,t,n){function i(e,t){"object"==typeof e&&(t=e,e=void 0),t=t||{};var n,i=o(e),r=i.source,u=i.id;return t.forceNew||t["force new connection"]||!1===t.multiplex?(a("ignoring socket cache for %s",r),n=s(r,t)):(c[u]||(a("new io instance for %s",r),c[u]=s(r,t)),n=c[u]),n.socket(i.path)}var o=e("./url"),r=e("socket.io-parser"),s=e("./manager"),a=e("debug")("socket.io-client");t.exports=n=i;var c=n.managers={};n.protocol=r.protocol,n.connect=i,n.Manager=e("./manager"),n.Socket=e("./socket")},{"./manager":3,"./socket":5,"./url":6,debug:10,"socket.io-parser":46}],3:[function(e,t){function n(e,t){return this instanceof n?(e&&"object"==typeof e&&(t=e,e=void 0),t=t||{},t.path=t.path||"/socket.io",this.nsps={},this.subs=[],this.opts=t,this.reconnection(t.reconnection!==!1),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(t.randomizationFactor||.5),this.backoff=new p({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this.readyState="closed",this.uri=e,this.connected=[],this.encoding=!1,this.packetBuffer=[],this.encoder=new s.Encoder,this.decoder=new s.Decoder,this.autoConnect=t.autoConnect!==!1,void(this.autoConnect&&this.open())):new n(e,t)}var i=(e("./url"),e("engine.io-client")),o=e("./socket"),r=e("component-emitter"),s=e("socket.io-parser"),a=e("./on"),c=e("component-bind"),u=(e("object-component"),e("debug")("socket.io-client:manager")),l=e("indexof"),p=e("backo2");t.exports=n,n.prototype.emitAll=function(){this.emit.apply(this,arguments);for(var e in this.nsps)this.nsps[e].emit.apply(this.nsps[e],arguments)},n.prototype.updateSocketIds=function(){for(var e in this.nsps)this.nsps[e].id=this.engine.id},r(n.prototype),n.prototype.reconnection=function(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection},n.prototype.reconnectionAttempts=function(e){return arguments.length?(this._reconnectionAttempts=e,this):this._reconnectionAttempts},n.prototype.reconnectionDelay=function(e){return arguments.length?(this._reconnectionDelay=e,this.backoff&&this.backoff.setMin(e),this):this._reconnectionDelay},n.prototype.randomizationFactor=function(e){return arguments.length?(this._randomizationFactor=e,this.backoff&&this.backoff.setJitter(e),this):this._randomizationFactor},n.prototype.reconnectionDelayMax=function(e){return arguments.length?(this._reconnectionDelayMax=e,this.backoff&&this.backoff.setMax(e),this):this._reconnectionDelayMax},n.prototype.timeout=function(e){return arguments.length?(this._timeout=e,this):this._timeout},n.prototype.maybeReconnectOnOpen=function(){!this.reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()},n.prototype.open=n.prototype.connect=function(e){if(u("readyState %s",this.readyState),~this.readyState.indexOf("open"))return this;u("opening %s",this.uri),this.engine=i(this.uri,this.opts);var t=this.engine,n=this;this.readyState="opening",this.skipReconnect=!1;var o=a(t,"open",function(){n.onopen(),e&&e()}),r=a(t,"error",function(t){if(u("connect_error"),n.cleanup(),n.readyState="closed",n.emitAll("connect_error",t),e){var i=new Error("Connection error");i.data=t,e(i)}else n.maybeReconnectOnOpen()});if(!1!==this._timeout){var s=this._timeout;u("connect attempt will timeout after %d",s);var c=setTimeout(function(){u("connect attempt timed out after %d",s),o.destroy(),t.close(),t.emit("error","timeout"),n.emitAll("connect_timeout",s)},s);this.subs.push({destroy:function(){clearTimeout(c)}})}return this.subs.push(o),this.subs.push(r),this},n.prototype.onopen=function(){u("open"),this.cleanup(),this.readyState="open",this.emit("open");var e=this.engine;this.subs.push(a(e,"data",c(this,"ondata"))),this.subs.push(a(this.decoder,"decoded",c(this,"ondecoded"))),this.subs.push(a(e,"error",c(this,"onerror"))),this.subs.push(a(e,"close",c(this,"onclose")))},n.prototype.ondata=function(e){this.decoder.add(e)},n.prototype.ondecoded=function(e){this.emit("packet",e)},n.prototype.onerror=function(e){u("error",e),this.emitAll("error",e)},n.prototype.socket=function(e){var t=this.nsps[e];if(!t){t=new o(this,e),this.nsps[e]=t;var n=this;t.on("connect",function(){t.id=n.engine.id,~l(n.connected,t)||n.connected.push(t)})}return t},n.prototype.destroy=function(e){var t=l(this.connected,e);~t&&this.connected.splice(t,1),this.connected.length||this.close()},n.prototype.packet=function(e){u("writing packet %j",e);var t=this;t.encoding?t.packetBuffer.push(e):(t.encoding=!0,this.encoder.encode(e,function(e){for(var n=0;n<e.length;n++)t.engine.write(e[n]);t.encoding=!1,t.processPacketQueue()}))},n.prototype.processPacketQueue=function(){if(this.packetBuffer.length>0&&!this.encoding){var e=this.packetBuffer.shift();this.packet(e)}},n.prototype.cleanup=function(){for(var e;e=this.subs.shift();)e.destroy();this.packetBuffer=[],this.encoding=!1,this.decoder.destroy()},n.prototype.close=n.prototype.disconnect=function(){this.skipReconnect=!0,this.backoff.reset(),this.readyState="closed",this.engine&&this.engine.close()},n.prototype.onclose=function(e){u("close"),this.cleanup(),this.backoff.reset(),this.readyState="closed",this.emit("close",e),this._reconnection&&!this.skipReconnect&&this.reconnect()},n.prototype.reconnect=function(){if(this.reconnecting||this.skipReconnect)return this;var e=this;if(this.backoff.attempts>=this._reconnectionAttempts)u("reconnect failed"),this.backoff.reset(),this.emitAll("reconnect_failed"),this.reconnecting=!1;else{var t=this.backoff.duration();u("will wait %dms before reconnect attempt",t),this.reconnecting=!0;var n=setTimeout(function(){e.skipReconnect||(u("attempting reconnect"),e.emitAll("reconnect_attempt",e.backoff.attempts),e.emitAll("reconnecting",e.backoff.attempts),e.skipReconnect||e.open(function(t){t?(u("reconnect attempt error"),e.reconnecting=!1,e.reconnect(),e.emitAll("reconnect_error",t.data)):(u("reconnect success"),e.onreconnect())}))},t);this.subs.push({destroy:function(){clearTimeout(n)}})}},n.prototype.onreconnect=function(){var e=this.backoff.attempts;this.reconnecting=!1,this.backoff.reset(),this.updateSocketIds(),this.emitAll("reconnect",e)}},{"./on":4,"./socket":5,"./url":6,backo2:7,"component-bind":8,
"component-emitter":9,debug:10,"engine.io-client":11,indexof:42,"object-component":43,"socket.io-parser":46}],4:[function(e,t){function n(e,t,n){return e.on(t,n),{destroy:function(){e.removeListener(t,n)}}}t.exports=n},{}],5:[function(e,t,n){function i(e,t){this.io=e,this.nsp=t,this.json=this,this.ids=0,this.acks={},this.io.autoConnect&&this.open(),this.receiveBuffer=[],this.sendBuffer=[],this.connected=!1,this.disconnected=!0}var o=e("socket.io-parser"),r=e("component-emitter"),s=e("to-array"),a=e("./on"),c=e("component-bind"),u=e("debug")("socket.io-client:socket"),l=e("has-binary");t.exports=n=i;var p={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},f=r.prototype.emit;r(i.prototype),i.prototype.subEvents=function(){if(!this.subs){var e=this.io;this.subs=[a(e,"open",c(this,"onopen")),a(e,"packet",c(this,"onpacket")),a(e,"close",c(this,"onclose"))]}},i.prototype.open=i.prototype.connect=function(){return this.connected?this:(this.subEvents(),this.io.open(),"open"==this.io.readyState&&this.onopen(),this)},i.prototype.send=function(){var e=s(arguments);return e.unshift("message"),this.emit.apply(this,e),this},i.prototype.emit=function(e){if(p.hasOwnProperty(e))return f.apply(this,arguments),this;var t=s(arguments),n=o.EVENT;l(t)&&(n=o.BINARY_EVENT);var i={type:n,data:t};return"function"==typeof t[t.length-1]&&(u("emitting packet with ack id %d",this.ids),this.acks[this.ids]=t.pop(),i.id=this.ids++),this.connected?this.packet(i):this.sendBuffer.push(i),this},i.prototype.packet=function(e){e.nsp=this.nsp,this.io.packet(e)},i.prototype.onopen=function(){u("transport is open - connecting"),"/"!=this.nsp&&this.packet({type:o.CONNECT})},i.prototype.onclose=function(e){u("close (%s)",e),this.connected=!1,this.disconnected=!0,delete this.id,this.emit("disconnect",e)},i.prototype.onpacket=function(e){if(e.nsp==this.nsp)switch(e.type){case o.CONNECT:this.onconnect();break;case o.EVENT:this.onevent(e);break;case o.BINARY_EVENT:this.onevent(e);break;case o.ACK:this.onack(e);break;case o.BINARY_ACK:this.onack(e);break;case o.DISCONNECT:this.ondisconnect();break;case o.ERROR:this.emit("error",e.data)}},i.prototype.onevent=function(e){var t=e.data||[];u("emitting event %j",t),null!=e.id&&(u("attaching ack callback to event"),t.push(this.ack(e.id))),this.connected?f.apply(this,t):this.receiveBuffer.push(t)},i.prototype.ack=function(e){var t=this,n=!1;return function(){if(!n){n=!0;var i=s(arguments);u("sending ack %j",i);var r=l(i)?o.BINARY_ACK:o.ACK;t.packet({type:r,id:e,data:i})}}},i.prototype.onack=function(e){u("calling ack %s with %j",e.id,e.data);var t=this.acks[e.id];t.apply(this,e.data),delete this.acks[e.id]},i.prototype.onconnect=function(){this.connected=!0,this.disconnected=!1,this.emit("connect"),this.emitBuffered()},i.prototype.emitBuffered=function(){var e;for(e=0;e<this.receiveBuffer.length;e++)f.apply(this,this.receiveBuffer[e]);for(this.receiveBuffer=[],e=0;e<this.sendBuffer.length;e++)this.packet(this.sendBuffer[e]);this.sendBuffer=[]},i.prototype.ondisconnect=function(){u("server disconnect (%s)",this.nsp),this.destroy(),this.onclose("io server disconnect")},i.prototype.destroy=function(){if(this.subs){for(var e=0;e<this.subs.length;e++)this.subs[e].destroy();this.subs=null}this.io.destroy(this)},i.prototype.close=i.prototype.disconnect=function(){return this.connected&&(u("performing disconnect (%s)",this.nsp),this.packet({type:o.DISCONNECT})),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}},{"./on":4,"component-bind":8,"component-emitter":9,debug:10,"has-binary":38,"socket.io-parser":46,"to-array":50}],6:[function(e,t){(function(n){function i(e,t){var i=e,t=t||n.location;return null==e&&(e=t.protocol+"//"+t.host),"string"==typeof e&&("/"==e.charAt(0)&&(e="/"==e.charAt(1)?t.protocol+e:t.hostname+e),/^(https?|wss?):\/\//.test(e)||(r("protocol-less url %s",e),e="undefined"!=typeof t?t.protocol+"//"+e:"https://"+e),r("parse %s",e),i=o(e)),i.port||(/^(http|ws)$/.test(i.protocol)?i.port="80":/^(http|ws)s$/.test(i.protocol)&&(i.port="443")),i.path=i.path||"/",i.id=i.protocol+"://"+i.host+":"+i.port,i.href=i.protocol+"://"+i.host+(t&&t.port==i.port?"":":"+i.port),i}var o=e("parseuri"),r=e("debug")("socket.io-client:url");t.exports=i}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{debug:10,parseuri:44}],7:[function(e,t){function n(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}t.exports=n,n.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=0==(1&Math.floor(10*t))?e-n:e+n}return 0|Math.min(e,this.max)},n.prototype.reset=function(){this.attempts=0},n.prototype.setMin=function(e){this.ms=e},n.prototype.setMax=function(e){this.max=e},n.prototype.setJitter=function(e){this.jitter=e}},{}],8:[function(e,t){var n=[].slice;t.exports=function(e,t){if("string"==typeof t&&(t=e[t]),"function"!=typeof t)throw new Error("bind() requires a function");var i=n.call(arguments,2);return function(){return t.apply(e,i.concat(n.call(arguments)))}}},{}],9:[function(e,t){function n(e){return e?i(e):void 0}function i(e){for(var t in n.prototype)e[t]=n.prototype[t];return e}t.exports=n,n.prototype.on=n.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks[e]=this._callbacks[e]||[]).push(t),this},n.prototype.once=function(e,t){function n(){i.off(e,n),t.apply(this,arguments)}var i=this;return this._callbacks=this._callbacks||{},n.fn=t,this.on(e,n),this},n.prototype.off=n.prototype.removeListener=n.prototype.removeAllListeners=n.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},0==arguments.length)return this._callbacks={},this;var n=this._callbacks[e];if(!n)return this;if(1==arguments.length)return delete this._callbacks[e],this;for(var i,o=0;o<n.length;o++)if(i=n[o],i===t||i.fn===t){n.splice(o,1);break}return this},n.prototype.emit=function(e){this._callbacks=this._callbacks||{};var t=[].slice.call(arguments,1),n=this._callbacks[e];if(n){n=n.slice(0);for(var i=0,o=n.length;o>i;++i)n[i].apply(this,t)}return this},n.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks[e]||[]},n.prototype.hasListeners=function(e){return!!this.listeners(e).length}},{}],10:[function(e,t){function n(e){return n.enabled(e)?function(t){t=i(t);var o=new Date,r=o-(n[e]||o);n[e]=o,t=e+" "+t+" +"+n.humanize(r),window.console&&console.log&&Function.prototype.apply.call(console.log,console,arguments)}:function(){}}function i(e){return e instanceof Error?e.stack||e.message:e}t.exports=n,n.names=[],n.skips=[],n.enable=function(e){try{localStorage.debug=e}catch(t){}for(var i=(e||"").split(/[\s,]+/),o=i.length,r=0;o>r;r++)e=i[r].replace("*",".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$"))},n.disable=function(){n.enable("")},n.humanize=function(e){var t=1e3,n=6e4,i=60*n;return e>=i?(e/i).toFixed(1)+"h":e>=n?(e/n).toFixed(1)+"m":e>=t?(e/t|0)+"s":e+"ms"},n.enabled=function(e){for(var t=0,i=n.skips.length;i>t;t++)if(n.skips[t].test(e))return!1;for(var t=0,i=n.names.length;i>t;t++)if(n.names[t].test(e))return!0;return!1};try{window.localStorage&&n.enable(localStorage.debug)}catch(o){}},{}],11:[function(e,t){t.exports=e("./lib/")},{"./lib/":12}],12:[function(e,t){t.exports=e("./socket"),t.exports.parser=e("engine.io-parser")},{"./socket":13,"engine.io-parser":25}],13:[function(e,t){(function(n){function i(e,t){if(!(this instanceof i))return new i(e,t);if(t=t||{},e&&"object"==typeof e&&(t=e,e=null),e&&(e=l(e),t.host=e.host,t.secure="https"==e.protocol||"wss"==e.protocol,t.port=e.port,e.query&&(t.query=e.query)),this.secure=null!=t.secure?t.secure:n.location&&"https:"==location.protocol,t.host){var o=t.host.split(":");t.hostname=o.shift(),o.length?t.port=o.pop():t.port||(t.port=this.secure?"443":"80")}this.agent=t.agent||!1,this.hostname=t.hostname||(n.location?location.hostname:"localhost"),this.port=t.port||(n.location&&location.port?location.port:this.secure?443:80),this.query=t.query||{},"string"==typeof this.query&&(this.query=f.decode(this.query)),this.upgrade=!1!==t.upgrade,this.path=(t.path||"/engine.io").replace(/\/$/,"")+"/",this.forceJSONP=!!t.forceJSONP,this.jsonp=!1!==t.jsonp,this.forceBase64=!!t.forceBase64,this.enablesXDR=!!t.enablesXDR,this.timestampParam=t.timestampParam||"t",this.timestampRequests=t.timestampRequests,this.transports=t.transports||["polling","websocket"],this.readyState="",this.writeBuffer=[],this.callbackBuffer=[],this.policyPort=t.policyPort||843,this.rememberUpgrade=t.rememberUpgrade||!1,this.binaryType=null,this.onlyBinaryUpgrades=t.onlyBinaryUpgrades,this.pfx=t.pfx||null,this.key=t.key||null,this.passphrase=t.passphrase||null,this.cert=t.cert||null,this.ca=t.ca||null,this.ciphers=t.ciphers||null,this.rejectUnauthorized=t.rejectUnauthorized||null,this.open()}function o(e){var t={};for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n]);return t}var r=e("./transports"),s=e("component-emitter"),a=e("debug")("engine.io-client:socket"),c=e("indexof"),u=e("engine.io-parser"),l=e("parseuri"),p=e("parsejson"),f=e("parseqs");t.exports=i,i.priorWebsocketSuccess=!1,s(i.prototype),i.protocol=u.protocol,i.Socket=i,i.Transport=e("./transport"),i.transports=e("./transports"),i.parser=e("engine.io-parser"),i.prototype.createTransport=function(e){a('creating transport "%s"',e);var t=o(this.query);t.EIO=u.protocol,t.transport=e,this.id&&(t.sid=this.id);var n=new r[e]({agent:this.agent,hostname:this.hostname,port:this.port,secure:this.secure,path:this.path,query:t,forceJSONP:this.forceJSONP,jsonp:this.jsonp,forceBase64:this.forceBase64,enablesXDR:this.enablesXDR,timestampRequests:this.timestampRequests,timestampParam:this.timestampParam,policyPort:this.policyPort,socket:this,pfx:this.pfx,key:this.key,passphrase:this.passphrase,cert:this.cert,ca:this.ca,ciphers:this.ciphers,rejectUnauthorized:this.rejectUnauthorized});return n},i.prototype.open=function(){var e;if(this.rememberUpgrade&&i.priorWebsocketSuccess&&-1!=this.transports.indexOf("websocket"))e="websocket";else{if(0==this.transports.length){var t=this;return void setTimeout(function(){t.emit("error","No transports available")},0)}e=this.transports[0]}this.readyState="opening";var e;try{e=this.createTransport(e)}catch(n){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)},i.prototype.setTransport=function(e){a("setting transport %s",e.name);var t=this;this.transport&&(a("clearing existing transport %s",this.transport.name),this.transport.removeAllListeners()),this.transport=e,e.on("drain",function(){t.onDrain()}).on("packet",function(e){t.onPacket(e)}).on("error",function(e){t.onError(e)}).on("close",function(){t.onClose("transport close")})},i.prototype.probe=function(e){function t(){if(f.onlyBinaryUpgrades){var t=!this.supportsBinary&&f.transport.supportsBinary;p=p||t}p||(a('probe transport "%s" opened',e),l.send([{type:"ping",data:"probe"}]),l.once("packet",function(t){if(!p)if("pong"==t.type&&"probe"==t.data){if(a('probe transport "%s" pong',e),f.upgrading=!0,f.emit("upgrading",l),!l)return;i.priorWebsocketSuccess="websocket"==l.name,a('pausing current transport "%s"',f.transport.name),f.transport.pause(function(){p||"closed"!=f.readyState&&(a("changing transport and sending upgrade packet"),u(),f.setTransport(l),l.send([{type:"upgrade"}]),f.emit("upgrade",l),l=null,f.upgrading=!1,f.flush())})}else{a('probe transport "%s" failed',e);var n=new Error("probe error");n.transport=l.name,f.emit("upgradeError",n)}}))}function n(){p||(p=!0,u(),l.close(),l=null)}function o(t){var i=new Error("probe error: "+t);i.transport=l.name,n(),a('probe transport "%s" failed because of error: %s',e,t),f.emit("upgradeError",i)}function r(){o("transport closed")}function s(){o("socket closed")}function c(e){l&&e.name!=l.name&&(a('"%s" works - aborting "%s"',e.name,l.name),n())}function u(){l.removeListener("open",t),l.removeListener("error",o),l.removeListener("close",r),f.removeListener("close",s),f.removeListener("upgrading",c)}a('probing transport "%s"',e);var l=this.createTransport(e,{probe:1}),p=!1,f=this;i.priorWebsocketSuccess=!1,l.once("open",t),l.once("error",o),l.once("close",r),this.once("close",s),this.once("upgrading",c),l.open()},i.prototype.onOpen=function(){if(a("socket open"),this.readyState="open",i.priorWebsocketSuccess="websocket"==this.transport.name,this.emit("open"),this.flush(),"open"==this.readyState&&this.upgrade&&this.transport.pause){a("starting upgrade probes");for(var e=0,t=this.upgrades.length;t>e;e++)this.probe(this.upgrades[e])}},i.prototype.onPacket=function(e){if("opening"==this.readyState||"open"==this.readyState)switch(a('socket receive: type "%s", data "%s"',e.type,e.data),this.emit("packet",e),this.emit("heartbeat"),e.type){case"open":this.onHandshake(p(e.data));break;case"pong":this.setPing();break;case"error":var t=new Error("server error");t.code=e.data,this.emit("error",t);break;case"message":this.emit("data",e.data),this.emit("message",e.data)}else a('packet received with socket readyState "%s"',this.readyState)},i.prototype.onHandshake=function(e){this.emit("handshake",e),this.id=e.sid,this.transport.query.sid=e.sid,this.upgrades=this.filterUpgrades(e.upgrades),this.pingInterval=e.pingInterval,this.pingTimeout=e.pingTimeout,this.onOpen(),"closed"!=this.readyState&&(this.setPing(),this.removeListener("heartbeat",this.onHeartbeat),this.on("heartbeat",this.onHeartbeat))},i.prototype.onHeartbeat=function(e){clearTimeout(this.pingTimeoutTimer);var t=this;t.pingTimeoutTimer=setTimeout(function(){"closed"!=t.readyState&&t.onClose("ping timeout")},e||t.pingInterval+t.pingTimeout)},i.prototype.setPing=function(){var e=this;clearTimeout(e.pingIntervalTimer),e.pingIntervalTimer=setTimeout(function(){a("writing ping packet - expecting pong within %sms",e.pingTimeout),e.ping(),e.onHeartbeat(e.pingTimeout)},e.pingInterval)},i.prototype.ping=function(){this.sendPacket("ping")},i.prototype.onDrain=function(){for(var e=0;e<this.prevBufferLen;e++)this.callbackBuffer[e]&&this.callbackBuffer[e]();this.writeBuffer.splice(0,this.prevBufferLen),this.callbackBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0==this.writeBuffer.length?this.emit("drain"):this.flush()},i.prototype.flush=function(){"closed"!=this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length&&(a("flushing %d packets in socket",this.writeBuffer.length),this.transport.send(this.writeBuffer),this.prevBufferLen=this.writeBuffer.length,this.emit("flush"))},i.prototype.write=i.prototype.send=function(e,t){return this.sendPacket("message",e,t),this},i.prototype.sendPacket=function(e,t,n){if("closing"!=this.readyState&&"closed"!=this.readyState){var i={type:e,data:t};this.emit("packetCreate",i),this.writeBuffer.push(i),this.callbackBuffer.push(n),this.flush()}},i.prototype.close=function(){function e(){i.onClose("forced close"),a("socket closing - telling transport to close"),i.transport.close()}function t(){i.removeListener("upgrade",t),i.removeListener("upgradeError",t),e()}function n(){i.once("upgrade",t),i.once("upgradeError",t)}if("opening"==this.readyState||"open"==this.readyState){this.readyState="closing";var i=this;this.writeBuffer.length?this.once("drain",function(){this.upgrading?n():e()}):this.upgrading?n():e()}return this},i.prototype.onError=function(e){a("socket error %j",e),i.priorWebsocketSuccess=!1,this.emit("error",e),this.onClose("transport error",e)},i.prototype.onClose=function(e,t){if("opening"==this.readyState||"open"==this.readyState||"closing"==this.readyState){a('socket close with reason: "%s"',e);var n=this;clearTimeout(this.pingIntervalTimer),clearTimeout(this.pingTimeoutTimer),setTimeout(function(){n.writeBuffer=[],n.callbackBuffer=[],n.prevBufferLen=0},0),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),this.readyState="closed",this.id=null,this.emit("close",e,t)}},i.prototype.filterUpgrades=function(e){for(var t=[],n=0,i=e.length;i>n;n++)~c(this.transports,e[n])&&t.push(e[n]);return t}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./transport":14,"./transports":15,"component-emitter":9,debug:22,"engine.io-parser":25,indexof:42,parsejson:34,parseqs:35,parseuri:36}],14:[function(e,t){function n(e){this.path=e.path,this.hostname=e.hostname,this.port=e.port,this.secure=e.secure,this.query=e.query,this.timestampParam=e.timestampParam,this.timestampRequests=e.timestampRequests,this.readyState="",this.agent=e.agent||!1,this.socket=e.socket,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized}var i=e("engine.io-parser"),o=e("component-emitter");t.exports=n,o(n.prototype),n.timestamps=0,n.prototype.onError=function(e,t){var n=new Error(e);return n.type="TransportError",n.description=t,this.emit("error",n),this},n.prototype.open=function(){return("closed"==this.readyState||""==this.readyState)&&(this.readyState="opening",this.doOpen()),this},n.prototype.close=function(){return("opening"==this.readyState||"open"==this.readyState)&&(this.doClose(),this.onClose()),this},n.prototype.send=function(e){if("open"!=this.readyState)throw new Error("Transport not open");this.write(e)},n.prototype.onOpen=function(){this.readyState="open",this.writable=!0,this.emit("open")},n.prototype.onData=function(e){var t=i.decodePacket(e,this.socket.binaryType);this.onPacket(t)},n.prototype.onPacket=function(e){this.emit("packet",e)},n.prototype.onClose=function(){this.readyState="closed",this.emit("close")}},{"component-emitter":9,"engine.io-parser":25}],15:[function(e,t,n){(function(t){function i(e){var n,i=!1,a=!1,c=!1!==e.jsonp;if(t.location){var u="https:"==location.protocol,l=location.port;l||(l=u?443:80),i=e.hostname!=location.hostname||l!=e.port,a=e.secure!=u}if(e.xdomain=i,e.xscheme=a,n=new o(e),"open"in n&&!e.forceJSONP)return new r(e);if(!c)throw new Error("JSONP disabled");return new s(e)}var o=e("xmlhttprequest"),r=e("./polling-xhr"),s=e("./polling-jsonp"),a=e("./websocket");n.polling=i,n.websocket=a}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling-jsonp":16,"./polling-xhr":17,"./websocket":19,xmlhttprequest:20}],16:[function(e,t){(function(n){function i(){}function o(e){r.call(this,e),this.query=this.query||{},a||(n.___eio||(n.___eio=[]),a=n.___eio),this.index=a.length;var t=this;a.push(function(e){t.onData(e)}),this.query.j=this.index,n.document&&n.addEventListener&&n.addEventListener("beforeunload",function(){t.script&&(t.script.onerror=i)},!1)}var r=e("./polling"),s=e("component-inherit");t.exports=o;var a,c=/\n/g,u=/\\n/g;s(o,r),o.prototype.supportsBinary=!1,o.prototype.doClose=function(){this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),this.form&&(this.form.parentNode.removeChild(this.form),this.form=null,this.iframe=null),r.prototype.doClose.call(this)},o.prototype.doPoll=function(){var e=this,t=document.createElement("script");this.script&&(this.script.parentNode.removeChild(this.script),this.script=null),t.async=!0,t.src=this.uri(),t.onerror=function(t){e.onError("jsonp poll error",t)};var n=document.getElementsByTagName("script")[0];n.parentNode.insertBefore(t,n),this.script=t;var i="undefined"!=typeof navigator&&/gecko/i.test(navigator.userAgent);i&&setTimeout(function(){var e=document.createElement("iframe");document.body.appendChild(e),document.body.removeChild(e)},100)},o.prototype.doWrite=function(e,t){function n(){i(),t()}function i(){if(o.iframe)try{o.form.removeChild(o.iframe)}catch(e){o.onError("jsonp polling iframe removal error",e)}try{var t='<iframe src="javascript:0" name="'+o.iframeId+'">';r=document.createElement(t)}catch(e){r=document.createElement("iframe"),r.name=o.iframeId,r.src="javascript:0"}r.id=o.iframeId,o.form.appendChild(r),o.iframe=r}var o=this;if(!this.form){var r,s=document.createElement("form"),a=document.createElement("textarea"),l=this.iframeId="eio_iframe_"+this.index;s.className="socketio",s.style.position="absolute",s.style.top="-1000px",s.style.left="-1000px",s.target=l,s.method="POST",s.setAttribute("accept-charset","utf-8"),a.name="d",s.appendChild(a),document.body.appendChild(s),this.form=s,this.area=a}this.form.action=this.uri(),i(),e=e.replace(u,"\\\n"),this.area.value=e.replace(c,"\\n");try{this.form.submit()}catch(p){}this.iframe.attachEvent?this.iframe.onreadystatechange=function(){"complete"==o.iframe.readyState&&n()}:this.iframe.onload=n}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-inherit":21}],17:[function(e,t){(function(n){function i(){}function o(e){if(c.call(this,e),n.location){var t="https:"==location.protocol,i=location.port;i||(i=t?443:80),this.xd=e.hostname!=n.location.hostname||i!=e.port,this.xs=e.secure!=t}}function r(e){this.method=e.method||"GET",this.uri=e.uri,this.xd=!!e.xd,this.xs=!!e.xs,this.async=!1!==e.async,this.data=void 0!=e.data?e.data:null,this.agent=e.agent,this.isBinary=e.isBinary,this.supportsBinary=e.supportsBinary,this.enablesXDR=e.enablesXDR,this.pfx=e.pfx,this.key=e.key,this.passphrase=e.passphrase,this.cert=e.cert,this.ca=e.ca,this.ciphers=e.ciphers,this.rejectUnauthorized=e.rejectUnauthorized,this.create()}function s(){for(var e in r.requests)r.requests.hasOwnProperty(e)&&r.requests[e].abort()}var a=e("xmlhttprequest"),c=e("./polling"),u=e("component-emitter"),l=e("component-inherit"),p=e("debug")("engine.io-client:polling-xhr");t.exports=o,t.exports.Request=r,l(o,c),o.prototype.supportsBinary=!0,o.prototype.request=function(e){return e=e||{},e.uri=this.uri(),e.xd=this.xd,e.xs=this.xs,e.agent=this.agent||!1,e.supportsBinary=this.supportsBinary,e.enablesXDR=this.enablesXDR,e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized,new r(e)},o.prototype.doWrite=function(e,t){var n="string"!=typeof e&&void 0!==e,i=this.request({method:"POST",data:e,isBinary:n}),o=this;i.on("success",t),i.on("error",function(e){o.onError("xhr post error",e)}),this.sendXhr=i},o.prototype.doPoll=function(){p("xhr poll");var e=this.request(),t=this;e.on("data",function(e){t.onData(e)}),e.on("error",function(e){t.onError("xhr poll error",e)}),this.pollXhr=e},u(r.prototype),r.prototype.create=function(){var e={agent:this.agent,xdomain:this.xd,xscheme:this.xs,enablesXDR:this.enablesXDR};e.pfx=this.pfx,e.key=this.key,e.passphrase=this.passphrase,e.cert=this.cert,e.ca=this.ca,e.ciphers=this.ciphers,e.rejectUnauthorized=this.rejectUnauthorized;var t=this.xhr=new a(e),i=this;try{if(p("xhr open %s: %s",this.method,this.uri),t.open(this.method,this.uri,this.async),this.supportsBinary&&(t.responseType="arraybuffer"),"POST"==this.method)try{this.isBinary?t.setRequestHeader("Content-type","application/octet-stream"):t.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}"withCredentials"in t&&(t.withCredentials=!0),this.hasXDR()?(t.onload=function(){i.onLoad()},t.onerror=function(){i.onError(t.responseText)}):t.onreadystatechange=function(){4==t.readyState&&(200==t.status||1223==t.status?i.onLoad():setTimeout(function(){i.onError(t.status)},0))},p("xhr data %s",this.data),t.send(this.data)}catch(o){return void setTimeout(function(){i.onError(o)},0)}n.document&&(this.index=r.requestsCount++,r.requests[this.index]=this)},r.prototype.onSuccess=function(){this.emit("success"),this.cleanup()},r.prototype.onData=function(e){this.emit("data",e),this.onSuccess()},r.prototype.onError=function(e){this.emit("error",e),this.cleanup(!0)},r.prototype.cleanup=function(e){if("undefined"!=typeof this.xhr&&null!==this.xhr){if(this.hasXDR()?this.xhr.onload=this.xhr.onerror=i:this.xhr.onreadystatechange=i,e)try{this.xhr.abort()}catch(t){}n.document&&delete r.requests[this.index],this.xhr=null}},r.prototype.onLoad=function(){var e;try{var t;try{t=this.xhr.getResponseHeader("Content-Type").split(";")[0]}catch(n){}e="application/octet-stream"===t?this.xhr.response:this.supportsBinary?"ok":this.xhr.responseText}catch(n){this.onError(n)}null!=e&&this.onData(e)},r.prototype.hasXDR=function(){return"undefined"!=typeof n.XDomainRequest&&!this.xs&&this.enablesXDR},r.prototype.abort=function(){this.cleanup()},n.document&&(r.requestsCount=0,r.requests={},n.attachEvent?n.attachEvent("onunload",s):n.addEventListener&&n.addEventListener("beforeunload",s,!1))}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./polling":18,"component-emitter":9,"component-inherit":21,debug:22,xmlhttprequest:20}],18:[function(e,t){function n(e){var t=e&&e.forceBase64;(!c||t)&&(this.supportsBinary=!1),i.call(this,e)}var i=e("../transport"),o=e("parseqs"),r=e("engine.io-parser"),s=e("component-inherit"),a=e("debug")("engine.io-client:polling");t.exports=n;var c=function(){var t=e("xmlhttprequest"),n=new t({xdomain:!1});return null!=n.responseType}();s(n,i),n.prototype.name="polling",n.prototype.doOpen=function(){this.poll()},n.prototype.pause=function(e){function t(){a("paused"),n.readyState="paused",e()}var n=this;if(this.readyState="pausing",this.polling||!this.writable){var i=0;this.polling&&(a("we are currently polling - waiting to pause"),i++,this.once("pollComplete",function(){a("pre-pause polling complete"),--i||t()})),this.writable||(a("we are currently writing - waiting to pause"),i++,this.once("drain",function(){a("pre-pause writing complete"),--i||t()}))}else t()},n.prototype.poll=function(){a("polling"),this.polling=!0,this.doPoll(),this.emit("poll")},n.prototype.onData=function(e){var t=this;a("polling got data %s",e);var n=function(e){return"opening"==t.readyState&&t.onOpen(),"close"==e.type?(t.onClose(),!1):void t.onPacket(e)};r.decodePayload(e,this.socket.binaryType,n),"closed"!=this.readyState&&(this.polling=!1,this.emit("pollComplete"),"open"==this.readyState?this.poll():a('ignoring poll - transport state "%s"',this.readyState))},n.prototype.doClose=function(){function e(){a("writing close packet"),t.write([{type:"close"}])}var t=this;"open"==this.readyState?(a("transport open - closing"),e()):(a("transport not open - deferring close"),this.once("open",e))},n.prototype.write=function(e){var t=this;this.writable=!1;var n=function(){t.writable=!0,t.emit("drain")},t=this;r.encodePayload(e,this.supportsBinary,function(e){t.doWrite(e,n)})},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"https":"http",n="";return!1!==this.timestampRequests&&(e[this.timestampParam]=+new Date+"-"+i.timestamps++),this.supportsBinary||e.sid||(e.b64=1),e=o.encode(e),this.port&&("https"==t&&443!=this.port||"http"==t&&80!=this.port)&&(n=":"+this.port),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:35,xmlhttprequest:20}],19:[function(e,t){function n(e){var t=e&&e.forceBase64;t&&(this.supportsBinary=!1),i.call(this,e)}var i=e("../transport"),o=e("engine.io-parser"),r=e("parseqs"),s=e("component-inherit"),a=e("debug")("engine.io-client:websocket"),c=e("ws");t.exports=n,s(n,i),n.prototype.name="websocket",n.prototype.supportsBinary=!0,n.prototype.doOpen=function(){if(this.check()){var e=this.uri(),t=void 0,n={agent:this.agent};n.pfx=this.pfx,n.key=this.key,n.passphrase=this.passphrase,n.cert=this.cert,n.ca=this.ca,n.ciphers=this.ciphers,n.rejectUnauthorized=this.rejectUnauthorized,this.ws=new c(e,t,n),void 0===this.ws.binaryType&&(this.supportsBinary=!1),this.ws.binaryType="arraybuffer",this.addEventListeners()}},n.prototype.addEventListeners=function(){var e=this;this.ws.onopen=function(){e.onOpen()},this.ws.onclose=function(){e.onClose()},this.ws.onmessage=function(t){e.onData(t.data)},this.ws.onerror=function(t){e.onError("websocket error",t)}},"undefined"!=typeof navigator&&/iPad|iPhone|iPod/i.test(navigator.userAgent)&&(n.prototype.onData=function(e){var t=this;setTimeout(function(){i.prototype.onData.call(t,e)},0)}),n.prototype.write=function(e){function t(){n.writable=!0,n.emit("drain")}var n=this;this.writable=!1;for(var i=0,r=e.length;r>i;i++)o.encodePacket(e[i],this.supportsBinary,function(e){try{n.ws.send(e)}catch(t){a("websocket closed before onclose event")}});setTimeout(t,0)},n.prototype.onClose=function(){i.prototype.onClose.call(this)},n.prototype.doClose=function(){"undefined"!=typeof this.ws&&this.ws.close()},n.prototype.uri=function(){var e=this.query||{},t=this.secure?"wss":"ws",n="";return this.port&&("wss"==t&&443!=this.port||"ws"==t&&80!=this.port)&&(n=":"+this.port),this.timestampRequests&&(e[this.timestampParam]=+new Date),this.supportsBinary||(e.b64=1),e=r.encode(e),e.length&&(e="?"+e),t+"://"+this.hostname+n+this.path+e},n.prototype.check=function(){return!(!c||"__initialize"in c&&this.name===n.prototype.name)}},{"../transport":14,"component-inherit":21,debug:22,"engine.io-parser":25,parseqs:35,ws:37}],20:[function(e,t){var n=e("has-cors");t.exports=function(e){var t=e.xdomain,i=e.xscheme,o=e.enablesXDR;try{if("undefined"!=typeof XMLHttpRequest&&(!t||n))return new XMLHttpRequest}catch(r){}try{if("undefined"!=typeof XDomainRequest&&!i&&o)return new XDomainRequest}catch(r){}if(!t)try{return new ActiveXObject("Microsoft.XMLHTTP")}catch(r){}}},{"has-cors":40}],21:[function(e,t){t.exports=function(e,t){var n=function(){};n.prototype=t.prototype,e.prototype=new n,e.prototype.constructor=e}},{}],22:[function(e,t,n){function i(){return"WebkitAppearance"in document.documentElement.style||window.console&&(console.firebug||console.exception&&console.table)||navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31}function o(){var e=arguments,t=this.useColors;if(e[0]=(t?"%c":"")+this.namespace+(t?" %c":" ")+e[0]+(t?"%c ":" ")+"+"+n.humanize(this.diff),!t)return e;var i="color: "+this.color;e=[e[0],i,"color: inherit"].concat(Array.prototype.slice.call(e,1));var o=0,r=0;return e[0].replace(/%[a-z%]/g,function(e){"%"!==e&&(o++,"%c"===e&&(r=o))}),e.splice(r,0,i),e}function r(){return"object"==typeof console&&"function"==typeof console.log&&Function.prototype.apply.call(console.log,console,arguments)}function s(e){try{null==e?localStorage.removeItem("debug"):localStorage.debug=e}catch(t){}}function a(){var e;try{e=localStorage.debug}catch(t){}return e}n=t.exports=e("./debug"),n.log=r,n.formatArgs=o,n.save=s,n.load=a,n.useColors=i,n.colors=["lightseagreen","forestgreen","goldenrod","dodgerblue","darkorchid","crimson"],n.formatters.j=function(e){return JSON.stringify(e)},n.enable(a())},{"./debug":23}],23:[function(e,t,n){function i(){return n.colors[l++%n.colors.length]}function o(e){function t(){}function o(){var e=o,t=+new Date,r=t-(u||t);e.diff=r,e.prev=u,e.curr=t,u=t,null==e.useColors&&(e.useColors=n.useColors()),null==e.color&&e.useColors&&(e.color=i());var s=Array.prototype.slice.call(arguments);s[0]=n.coerce(s[0]),"string"!=typeof s[0]&&(s=["%o"].concat(s));var a=0;s[0]=s[0].replace(/%([a-z%])/g,function(t,i){if("%"===t)return t;a++;var o=n.formatters[i];if("function"==typeof o){var r=s[a];t=o.call(e,r),s.splice(a,1),a--}return t}),"function"==typeof n.formatArgs&&(s=n.formatArgs.apply(e,s));var c=o.log||n.log||console.log.bind(console);c.apply(e,s)}t.enabled=!1,o.enabled=!0;var r=n.enabled(e)?o:t;return r.namespace=e,r}function r(e){n.save(e);for(var t=(e||"").split(/[\s,]+/),i=t.length,o=0;i>o;o++)t[o]&&(e=t[o].replace(/\*/g,".*?"),"-"===e[0]?n.skips.push(new RegExp("^"+e.substr(1)+"$")):n.names.push(new RegExp("^"+e+"$")))}function s(){n.enable("")}function a(e){var t,i;for(t=0,i=n.skips.length;i>t;t++)if(n.skips[t].test(e))return!1;for(t=0,i=n.names.length;i>t;t++)if(n.names[t].test(e))return!0;return!1}function c(e){
return e instanceof Error?e.stack||e.message:e}n=t.exports=o,n.coerce=c,n.disable=s,n.enable=r,n.enabled=a,n.humanize=e("ms"),n.names=[],n.skips=[],n.formatters={};var u,l=0},{ms:24}],24:[function(e,t){function n(e){var t=/^((?:\d+)?\.?\d+) *(ms|seconds?|s|minutes?|m|hours?|h|days?|d|years?|y)?$/i.exec(e);if(t){var n=parseFloat(t[1]),i=(t[2]||"ms").toLowerCase();switch(i){case"years":case"year":case"y":return n*l;case"days":case"day":case"d":return n*u;case"hours":case"hour":case"h":return n*c;case"minutes":case"minute":case"m":return n*a;case"seconds":case"second":case"s":return n*s;case"ms":return n}}}function i(e){return e>=u?Math.round(e/u)+"d":e>=c?Math.round(e/c)+"h":e>=a?Math.round(e/a)+"m":e>=s?Math.round(e/s)+"s":e+"ms"}function o(e){return r(e,u,"day")||r(e,c,"hour")||r(e,a,"minute")||r(e,s,"second")||e+" ms"}function r(e,t,n){return t>e?void 0:1.5*t>e?Math.floor(e/t)+" "+n:Math.ceil(e/t)+" "+n+"s"}var s=1e3,a=60*s,c=60*a,u=24*c,l=365.25*u;t.exports=function(e,t){return t=t||{},"string"==typeof e?n(e):t["long"]?o(e):i(e)}},{}],25:[function(e,t,n){(function(t){function i(e,t){var i="b"+n.packets[e.type]+e.data.data;return t(i)}function o(e,t,i){if(!t)return n.encodeBase64Packet(e,i);var o=e.data,r=new Uint8Array(o),s=new Uint8Array(1+o.byteLength);s[0]=y[e.type];for(var a=0;a<r.length;a++)s[a+1]=r[a];return i(s.buffer)}function r(e,t,i){if(!t)return n.encodeBase64Packet(e,i);var o=new FileReader;return o.onload=function(){e.data=o.result,n.encodePacket(e,t,!0,i)},o.readAsArrayBuffer(e.data)}function s(e,t,i){if(!t)return n.encodeBase64Packet(e,i);if(m)return r(e,t,i);var o=new Uint8Array(1);o[0]=y[e.type];var s=new w([o.buffer,e.data]);return i(s)}function a(e,t,n){for(var i=new Array(e.length),o=f(e.length,n),r=function(e,n,o){t(n,function(t,n){i[e]=n,o(t,i)})},s=0;s<e.length;s++)r(s,e[s],o)}var c=e("./keys"),u=e("has-binary"),l=e("arraybuffer.slice"),p=e("base64-arraybuffer"),f=e("after"),h=e("utf8"),d=navigator.userAgent.match(/Android/i),g=/PhantomJS/i.test(navigator.userAgent),m=d||g;n.protocol=3;var y=n.packets={open:0,close:1,ping:2,pong:3,message:4,upgrade:5,noop:6},v=c(y),b={type:"error",data:"parser error"},w=e("blob");n.encodePacket=function(e,n,r,a){"function"==typeof n&&(a=n,n=!1),"function"==typeof r&&(a=r,r=null);var c=void 0===e.data?void 0:e.data.buffer||e.data;if(t.ArrayBuffer&&c instanceof ArrayBuffer)return o(e,n,a);if(w&&c instanceof t.Blob)return s(e,n,a);if(c&&c.base64)return i(e,a);var u=y[e.type];return void 0!==e.data&&(u+=r?h.encode(String(e.data)):String(e.data)),a(""+u)},n.encodeBase64Packet=function(e,i){var o="b"+n.packets[e.type];if(w&&e.data instanceof w){var r=new FileReader;return r.onload=function(){var e=r.result.split(",")[1];i(o+e)},r.readAsDataURL(e.data)}var s;try{s=String.fromCharCode.apply(null,new Uint8Array(e.data))}catch(a){for(var c=new Uint8Array(e.data),u=new Array(c.length),l=0;l<c.length;l++)u[l]=c[l];s=String.fromCharCode.apply(null,u)}return o+=t.btoa(s),i(o)},n.decodePacket=function(e,t,i){if("string"==typeof e||void 0===e){if("b"==e.charAt(0))return n.decodeBase64Packet(e.substr(1),t);if(i)try{e=h.decode(e)}catch(o){return b}var r=e.charAt(0);return Number(r)==r&&v[r]?e.length>1?{type:v[r],data:e.substring(1)}:{type:v[r]}:b}var s=new Uint8Array(e),r=s[0],a=l(e,1);return w&&"blob"===t&&(a=new w([a])),{type:v[r],data:a}},n.decodeBase64Packet=function(e,n){var i=v[e.charAt(0)];if(!t.ArrayBuffer)return{type:i,data:{base64:!0,data:e.substr(1)}};var o=p.decode(e.substr(1));return"blob"===n&&w&&(o=new w([o])),{type:i,data:o}},n.encodePayload=function(e,t,i){function o(e){return e.length+":"+e}function r(e,i){n.encodePacket(e,s?t:!1,!0,function(e){i(null,o(e))})}"function"==typeof t&&(i=t,t=null);var s=u(e);return t&&s?w&&!m?n.encodePayloadAsBlob(e,i):n.encodePayloadAsArrayBuffer(e,i):e.length?void a(e,r,function(e,t){return i(t.join(""))}):i("0:")},n.decodePayload=function(e,t,i){if("string"!=typeof e)return n.decodePayloadAsBinary(e,t,i);"function"==typeof t&&(i=t,t=null);var o;if(""==e)return i(b,0,1);for(var r,s,a="",c=0,u=e.length;u>c;c++){var l=e.charAt(c);if(":"!=l)a+=l;else{if(""==a||a!=(r=Number(a)))return i(b,0,1);if(s=e.substr(c+1,r),a!=s.length)return i(b,0,1);if(s.length){if(o=n.decodePacket(s,t,!0),b.type==o.type&&b.data==o.data)return i(b,0,1);var p=i(o,c+r,u);if(!1===p)return}c+=r,a=""}}return""!=a?i(b,0,1):void 0},n.encodePayloadAsArrayBuffer=function(e,t){function i(e,t){n.encodePacket(e,!0,!0,function(e){return t(null,e)})}return e.length?void a(e,i,function(e,n){var i=n.reduce(function(e,t){var n;return n="string"==typeof t?t.length:t.byteLength,e+n.toString().length+n+2},0),o=new Uint8Array(i),r=0;return n.forEach(function(e){var t="string"==typeof e,n=e;if(t){for(var i=new Uint8Array(e.length),s=0;s<e.length;s++)i[s]=e.charCodeAt(s);n=i.buffer}o[r++]=t?0:1;for(var a=n.byteLength.toString(),s=0;s<a.length;s++)o[r++]=parseInt(a[s]);o[r++]=255;for(var i=new Uint8Array(n),s=0;s<i.length;s++)o[r++]=i[s]}),t(o.buffer)}):t(new ArrayBuffer(0))},n.encodePayloadAsBlob=function(e,t){function i(e,t){n.encodePacket(e,!0,!0,function(e){var n=new Uint8Array(1);if(n[0]=1,"string"==typeof e){for(var i=new Uint8Array(e.length),o=0;o<e.length;o++)i[o]=e.charCodeAt(o);e=i.buffer,n[0]=0}for(var r=e instanceof ArrayBuffer?e.byteLength:e.size,s=r.toString(),a=new Uint8Array(s.length+1),o=0;o<s.length;o++)a[o]=parseInt(s[o]);if(a[s.length]=255,w){var c=new w([n.buffer,a.buffer,e]);t(null,c)}})}a(e,i,function(e,n){return t(new w(n))})},n.decodePayloadAsBinary=function(e,t,i){"function"==typeof t&&(i=t,t=null);for(var o=e,r=[],s=!1;o.byteLength>0;){for(var a=new Uint8Array(o),c=0===a[0],u="",p=1;255!=a[p];p++){if(u.length>310){s=!0;break}u+=a[p]}if(s)return i(b,0,1);o=l(o,2+u.length),u=parseInt(u);var f=l(o,0,u);if(c)try{f=String.fromCharCode.apply(null,new Uint8Array(f))}catch(h){var d=new Uint8Array(f);f="";for(var p=0;p<d.length;p++)f+=String.fromCharCode(d[p])}r.push(f),o=l(o,u)}var g=r.length;r.forEach(function(e,o){i(n.decodePacket(e,t,!0),o,g)})}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./keys":26,after:27,"arraybuffer.slice":28,"base64-arraybuffer":29,blob:30,"has-binary":31,utf8:33}],26:[function(e,t){t.exports=Object.keys||function(e){var t=[],n=Object.prototype.hasOwnProperty;for(var i in e)n.call(e,i)&&t.push(i);return t}},{}],27:[function(e,t){function n(e,t,n){function o(e,i){if(o.count<=0)throw new Error("after called too many times");--o.count,e?(r=!0,t(e),t=n):0!==o.count||r||t(null,i)}var r=!1;return n=n||i,o.count=e,0===e?t():o}function i(){}t.exports=n},{}],28:[function(e,t){t.exports=function(e,t,n){var i=e.byteLength;if(t=t||0,n=n||i,e.slice)return e.slice(t,n);if(0>t&&(t+=i),0>n&&(n+=i),n>i&&(n=i),t>=i||t>=n||0===i)return new ArrayBuffer(0);for(var o=new Uint8Array(e),r=new Uint8Array(n-t),s=t,a=0;n>s;s++,a++)r[a]=o[s];return r.buffer}},{}],29:[function(e,t,n){!function(e){"use strict";n.encode=function(t){var n,i=new Uint8Array(t),o=i.length,r="";for(n=0;o>n;n+=3)r+=e[i[n]>>2],r+=e[(3&i[n])<<4|i[n+1]>>4],r+=e[(15&i[n+1])<<2|i[n+2]>>6],r+=e[63&i[n+2]];return o%3===2?r=r.substring(0,r.length-1)+"=":o%3===1&&(r=r.substring(0,r.length-2)+"=="),r},n.decode=function(t){var n,i,o,r,s,a=.75*t.length,c=t.length,u=0;"="===t[t.length-1]&&(a--,"="===t[t.length-2]&&a--);var l=new ArrayBuffer(a),p=new Uint8Array(l);for(n=0;c>n;n+=4)i=e.indexOf(t[n]),o=e.indexOf(t[n+1]),r=e.indexOf(t[n+2]),s=e.indexOf(t[n+3]),p[u++]=i<<2|o>>4,p[u++]=(15&o)<<4|r>>2,p[u++]=(3&r)<<6|63&s;return l}}("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/")},{}],30:[function(e,t){(function(e){function n(e,t){t=t||{};for(var n=new i,o=0;o<e.length;o++)n.append(e[o]);return t.type?n.getBlob(t.type):n.getBlob()}var i=e.BlobBuilder||e.WebKitBlobBuilder||e.MSBlobBuilder||e.MozBlobBuilder,o=function(){try{var e=new Blob(["hi"]);return 2==e.size}catch(t){return!1}}(),r=i&&i.prototype.append&&i.prototype.getBlob;t.exports=function(){return o?e.Blob:r?n:void 0}()}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],31:[function(e,t){(function(n){function i(e){function t(e){if(!e)return!1;if(n.Buffer&&n.Buffer.isBuffer(e)||n.ArrayBuffer&&e instanceof ArrayBuffer||n.Blob&&e instanceof Blob||n.File&&e instanceof File)return!0;if(o(e)){for(var i=0;i<e.length;i++)if(t(e[i]))return!0}else if(e&&"object"==typeof e){e.toJSON&&(e=e.toJSON());for(var r in e)if(e.hasOwnProperty(r)&&t(e[r]))return!0}return!1}return t(e)}var o=e("isarray");t.exports=i}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{isarray:32}],32:[function(e,t){t.exports=Array.isArray||function(e){return"[object Array]"==Object.prototype.toString.call(e)}},{}],33:[function(t,n,i){(function(t){!function(o){function r(e){for(var t,n,i=[],o=0,r=e.length;r>o;)t=e.charCodeAt(o++),t>=55296&&56319>=t&&r>o?(n=e.charCodeAt(o++),56320==(64512&n)?i.push(((1023&t)<<10)+(1023&n)+65536):(i.push(t),o--)):i.push(t);return i}function s(e){for(var t,n=e.length,i=-1,o="";++i<n;)t=e[i],t>65535&&(t-=65536,o+=b(t>>>10&1023|55296),t=56320|1023&t),o+=b(t);return o}function a(e,t){return b(e>>t&63|128)}function c(e){if(0==(4294967168&e))return b(e);var t="";return 0==(4294965248&e)?t=b(e>>6&31|192):0==(4294901760&e)?(t=b(e>>12&15|224),t+=a(e,6)):0==(4292870144&e)&&(t=b(e>>18&7|240),t+=a(e,12),t+=a(e,6)),t+=b(63&e|128)}function u(e){for(var t,n=r(e),i=n.length,o=-1,s="";++o<i;)t=n[o],s+=c(t);return s}function l(){if(v>=y)throw Error("Invalid byte index");var e=255&m[v];if(v++,128==(192&e))return 63&e;throw Error("Invalid continuation byte")}function p(){var e,t,n,i,o;if(v>y)throw Error("Invalid byte index");if(v==y)return!1;if(e=255&m[v],v++,0==(128&e))return e;if(192==(224&e)){var t=l();if(o=(31&e)<<6|t,o>=128)return o;throw Error("Invalid continuation byte")}if(224==(240&e)){if(t=l(),n=l(),o=(15&e)<<12|t<<6|n,o>=2048)return o;throw Error("Invalid continuation byte")}if(240==(248&e)&&(t=l(),n=l(),i=l(),o=(15&e)<<18|t<<12|n<<6|i,o>=65536&&1114111>=o))return o;throw Error("Invalid UTF-8 detected")}function f(e){m=r(e),y=m.length,v=0;for(var t,n=[];(t=p())!==!1;)n.push(t);return s(n)}var h="object"==typeof i&&i,d="object"==typeof n&&n&&n.exports==h&&n,g="object"==typeof t&&t;(g.global===g||g.window===g)&&(o=g);var m,y,v,b=String.fromCharCode,w={version:"2.0.0",encode:u,decode:f};if("function"==typeof e&&"object"==typeof e.amd&&e.amd)e(function(){return w});else if(h&&!h.nodeType)if(d)d.exports=w;else{var x={},k=x.hasOwnProperty;for(var T in w)k.call(w,T)&&(h[T]=w[T])}else o.utf8=w}(this)}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],34:[function(e,t){(function(e){var n=/^[\],:{}\s]*$/,i=/\\(?:["\\\/bfnrt]|u[0-9a-fA-F]{4})/g,o=/"[^"\\\n\r]*"|true|false|null|-?\d+(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,r=/(?:^|:|,)(?:\s*\[)+/g,s=/^\s+/,a=/\s+$/;t.exports=function(t){return"string"==typeof t&&t?(t=t.replace(s,"").replace(a,""),e.JSON&&JSON.parse?JSON.parse(t):n.test(t.replace(i,"@").replace(o,"]").replace(r,""))?new Function("return "+t)():void 0):null}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],35:[function(e,t,n){n.encode=function(e){var t="";for(var n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t},n.decode=function(e){for(var t={},n=e.split("&"),i=0,o=n.length;o>i;i++){var r=n[i].split("=");t[decodeURIComponent(r[0])]=decodeURIComponent(r[1])}return t}},{}],36:[function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(e){var t=e,o=e.indexOf("["),r=e.indexOf("]");-1!=o&&-1!=r&&(e=e.substring(0,o)+e.substring(o,r).replace(/:/g,";")+e.substring(r,e.length));for(var s=n.exec(e||""),a={},c=14;c--;)a[i[c]]=s[c]||"";return-1!=o&&-1!=r&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a}},{}],37:[function(e,t){function n(e,t){var n;return n=t?new o(e,t):new o(e)}var i=function(){return this}(),o=i.WebSocket||i.MozWebSocket;t.exports=o?n:null,o&&(n.prototype=o.prototype)},{}],38:[function(e,t){(function(n){function i(e){function t(e){if(!e)return!1;if(n.Buffer&&n.Buffer.isBuffer(e)||n.ArrayBuffer&&e instanceof ArrayBuffer||n.Blob&&e instanceof Blob||n.File&&e instanceof File)return!0;if(o(e)){for(var i=0;i<e.length;i++)if(t(e[i]))return!0}else if(e&&"object"==typeof e){e.toJSON&&(e=e.toJSON());for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)&&t(e[r]))return!0}return!1}return t(e)}var o=e("isarray");t.exports=i}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{isarray:39}],39:[function(e,t){t.exports=e(32)},{}],40:[function(e,t){var n=e("global");try{t.exports="XMLHttpRequest"in n&&"withCredentials"in new n.XMLHttpRequest}catch(i){t.exports=!1}},{global:41}],41:[function(e,t){t.exports=function(){return this}()},{}],42:[function(e,t){var n=[].indexOf;t.exports=function(e,t){if(n)return e.indexOf(t);for(var i=0;i<e.length;++i)if(e[i]===t)return i;return-1}},{}],43:[function(e,t,n){var i=Object.prototype.hasOwnProperty;n.keys=Object.keys||function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(n);return t},n.values=function(e){var t=[];for(var n in e)i.call(e,n)&&t.push(e[n]);return t},n.merge=function(e,t){for(var n in t)i.call(t,n)&&(e[n]=t[n]);return e},n.length=function(e){return n.keys(e).length},n.isEmpty=function(e){return 0==n.length(e)}},{}],44:[function(e,t){var n=/^(?:(?![^:@]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@]*)(?::([^:@]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,i=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];t.exports=function(e){for(var t=n.exec(e||""),o={},r=14;r--;)o[i[r]]=t[r]||"";return o}},{}],45:[function(e,t,n){(function(t){var i=e("isarray"),o=e("./is-buffer");n.deconstructPacket=function(e){function t(e){if(!e)return e;if(o(e)){var r={_placeholder:!0,num:n.length};return n.push(e),r}if(i(e)){for(var s=new Array(e.length),a=0;a<e.length;a++)s[a]=t(e[a]);return s}if("object"==typeof e&&!(e instanceof Date)){var s={};for(var c in e)s[c]=t(e[c]);return s}return e}var n=[],r=e.data,s=e;return s.data=t(r),s.attachments=n.length,{packet:s,buffers:n}},n.reconstructPacket=function(e,t){function n(e){if(e&&e._placeholder){var o=t[e.num];return o}if(i(e)){for(var r=0;r<e.length;r++)e[r]=n(e[r]);return e}if(e&&"object"==typeof e){for(var s in e)e[s]=n(e[s]);return e}return e}return e.data=n(e.data),e.attachments=void 0,e},n.removeBlobs=function(e,n){function r(e,c,u){if(!e)return e;if(t.Blob&&e instanceof Blob||t.File&&e instanceof File){s++;var l=new FileReader;l.onload=function(){u?u[c]=this.result:a=this.result,--s||n(a)},l.readAsArrayBuffer(e)}else if(i(e))for(var p=0;p<e.length;p++)r(e[p],p,e);else if(e&&"object"==typeof e&&!o(e))for(var f in e)r(e[f],f,e)}var s=0,a=e;r(a),s||n(a)}}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{"./is-buffer":47,isarray:48}],46:[function(e,t,n){function i(){}function o(e){var t="",i=!1;return t+=e.type,(n.BINARY_EVENT==e.type||n.BINARY_ACK==e.type)&&(t+=e.attachments,t+="-"),e.nsp&&"/"!=e.nsp&&(i=!0,t+=e.nsp),null!=e.id&&(i&&(t+=",",i=!1),t+=e.id),null!=e.data&&(i&&(t+=","),t+=p.stringify(e.data)),l("encoded %j as %s",e,t),t}function r(e,t){function n(e){var n=h.deconstructPacket(e),i=o(n.packet),r=n.buffers;r.unshift(i),t(r)}h.removeBlobs(e,n)}function s(){this.reconstructor=null}function a(e){var t={},i=0;if(t.type=Number(e.charAt(0)),null==n.types[t.type])return u();if(n.BINARY_EVENT==t.type||n.BINARY_ACK==t.type){for(var o="";"-"!=e.charAt(++i)&&(o+=e.charAt(i),i!=e.length););if(o!=Number(o)||"-"!=e.charAt(i))throw new Error("Illegal attachments");t.attachments=Number(o)}if("/"==e.charAt(i+1))for(t.nsp="";++i;){var r=e.charAt(i);if(","==r)break;if(t.nsp+=r,i==e.length)break}else t.nsp="/";var s=e.charAt(i+1);if(""!==s&&Number(s)==s){for(t.id="";++i;){var r=e.charAt(i);if(null==r||Number(r)!=r){--i;break}if(t.id+=e.charAt(i),i==e.length)break}t.id=Number(t.id)}if(e.charAt(++i))try{t.data=p.parse(e.substr(i))}catch(a){return u()}return l("decoded %s as %j",e,t),t}function c(e){this.reconPack=e,this.buffers=[]}function u(){return{type:n.ERROR,data:"parser error"}}var l=e("debug")("socket.io-parser"),p=e("json3"),f=(e("isarray"),e("component-emitter")),h=e("./binary"),d=e("./is-buffer");n.protocol=4,n.types=["CONNECT","DISCONNECT","EVENT","BINARY_EVENT","ACK","BINARY_ACK","ERROR"],n.CONNECT=0,n.DISCONNECT=1,n.EVENT=2,n.ACK=3,n.ERROR=4,n.BINARY_EVENT=5,n.BINARY_ACK=6,n.Encoder=i,n.Decoder=s,i.prototype.encode=function(e,t){if(l("encoding packet %j",e),n.BINARY_EVENT==e.type||n.BINARY_ACK==e.type)r(e,t);else{var i=o(e);t([i])}},f(s.prototype),s.prototype.add=function(e){var t;if("string"==typeof e)t=a(e),n.BINARY_EVENT==t.type||n.BINARY_ACK==t.type?(this.reconstructor=new c(t),0===this.reconstructor.reconPack.attachments&&this.emit("decoded",t)):this.emit("decoded",t);else{if(!d(e)&&!e.base64)throw new Error("Unknown type: "+e);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");t=this.reconstructor.takeBinaryData(e),t&&(this.reconstructor=null,this.emit("decoded",t))}},s.prototype.destroy=function(){this.reconstructor&&this.reconstructor.finishedReconstruction()},c.prototype.takeBinaryData=function(e){if(this.buffers.push(e),this.buffers.length==this.reconPack.attachments){var t=h.reconstructPacket(this.reconPack,this.buffers);return this.finishedReconstruction(),t}return null},c.prototype.finishedReconstruction=function(){this.reconPack=null,this.buffers=[]}},{"./binary":45,"./is-buffer":47,"component-emitter":9,debug:10,isarray:48,json3:49}],47:[function(e,t){(function(e){function n(t){return e.Buffer&&e.Buffer.isBuffer(t)||e.ArrayBuffer&&t instanceof ArrayBuffer}t.exports=n}).call(this,"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],48:[function(e,t){t.exports=e(32)},{}],49:[function(t,n,i){!function(t){function n(e){if(n[e]!==s)return n[e];var t;if("bug-string-char-index"==e)t="a"!="a"[0];else if("json"==e)t=n("json-stringify")&&n("json-parse");else{var i,o='{"a":[1,true,false,null,"\\u0000\\b\\n\\f\\r\\t"]}';if("json-stringify"==e){var r=l.stringify,c="function"==typeof r&&p;if(c){(i=function(){return 1}).toJSON=i;try{c="0"===r(0)&&"0"===r(new Number)&&'""'==r(new String)&&r(a)===s&&r(s)===s&&r()===s&&"1"===r(i)&&"[1]"==r([i])&&"[null]"==r([s])&&"null"==r(null)&&"[null,null,null]"==r([s,a,null])&&r({a:[i,!0,!1,null,"\x00\b\n\f\r	"]})==o&&"1"===r(null,i)&&"[\n 1,\n 2\n]"==r([1,2],null,1)&&'"-271821-04-20T00:00:00.000Z"'==r(new Date(-864e13))&&'"+275760-09-13T00:00:00.000Z"'==r(new Date(864e13))&&'"-000001-01-01T00:00:00.000Z"'==r(new Date(-621987552e5))&&'"1969-12-31T23:59:59.999Z"'==r(new Date(-1))}catch(u){c=!1}}t=c}if("json-parse"==e){var f=l.parse;if("function"==typeof f)try{if(0===f("0")&&!f(!1)){i=f(o);var h=5==i.a.length&&1===i.a[0];if(h){try{h=!f('"	"')}catch(u){}if(h)try{h=1!==f("01")}catch(u){}if(h)try{h=1!==f("1.")}catch(u){}}}}catch(u){h=!1}t=h}}return n[e]=!!t}var o,r,s,a={}.toString,c="function"==typeof e&&e.amd,u="object"==typeof JSON&&JSON,l="object"==typeof i&&i&&!i.nodeType&&i;l&&u?(l.stringify=u.stringify,l.parse=u.parse):l=t.JSON=u||{};var p=new Date(-0xc782b5b800cec);try{p=-109252==p.getUTCFullYear()&&0===p.getUTCMonth()&&1===p.getUTCDate()&&10==p.getUTCHours()&&37==p.getUTCMinutes()&&6==p.getUTCSeconds()&&708==p.getUTCMilliseconds()}catch(f){}if(!n("json")){var h="[object Function]",d="[object Date]",g="[object Number]",m="[object String]",y="[object Array]",v="[object Boolean]",b=n("bug-string-char-index");if(!p)var w=Math.floor,x=[0,31,59,90,120,151,181,212,243,273,304,334],k=function(e,t){return x[t]+365*(e-1970)+w((e-1969+(t=+(t>1)))/4)-w((e-1901+t)/100)+w((e-1601+t)/400)};(o={}.hasOwnProperty)||(o=function(e){var t,n={};return(n.__proto__=null,n.__proto__={toString:1},n).toString!=a?o=function(e){var t=this.__proto__,n=e in(this.__proto__=null,this);return this.__proto__=t,n}:(t=n.constructor,o=function(e){var n=(this.constructor||t).prototype;return e in this&&!(e in n&&this[e]===n[e])}),n=null,o.call(this,e)});var T={"boolean":1,number:1,string:1,undefined:1},C=function(e,t){var n=typeof e[t];return"object"==n?!!e[t]:!T[n]};if(r=function(e,t){var n,i,s,c=0;(n=function(){this.valueOf=0}).prototype.valueOf=0,i=new n;for(s in i)o.call(i,s)&&c++;return n=i=null,c?r=2==c?function(e,t){var n,i={},r=a.call(e)==h;for(n in e)r&&"prototype"==n||o.call(i,n)||!(i[n]=1)||!o.call(e,n)||t(n)}:function(e,t){var n,i,r=a.call(e)==h;for(n in e)r&&"prototype"==n||!o.call(e,n)||(i="constructor"===n)||t(n);(i||o.call(e,n="constructor"))&&t(n)}:(i=["valueOf","toString","toLocaleString","propertyIsEnumerable","isPrototypeOf","hasOwnProperty","constructor"],r=function(e,t){var n,r,s=a.call(e)==h,c=!s&&"function"!=typeof e.constructor&&C(e,"hasOwnProperty")?e.hasOwnProperty:o;for(n in e)s&&"prototype"==n||!c.call(e,n)||t(n);for(r=i.length;n=i[--r];c.call(e,n)&&t(n));}),r(e,t)},!n("json-stringify")){var E={92:"\\\\",34:'\\"',8:"\\b",12:"\\f",10:"\\n",13:"\\r",9:"\\t"},A="000000",S=function(e,t){return(A+(t||0)).slice(-e)},N="\\u00",_=function(e){var t,n='"',i=0,o=e.length,r=o>10&&b;for(r&&(t=e.split(""));o>i;i++){var s=e.charCodeAt(i);switch(s){case 8:case 9:case 10:case 12:case 13:case 34:case 92:n+=E[s];break;default:if(32>s){n+=N+S(2,s.toString(16));break}n+=r?t[i]:b?e.charAt(i):e[i]}}return n+'"'},j=function(e,t,n,i,c,u,l){var p,f,h,b,x,T,C,E,A,N,R,D,P,O,q,B;try{p=t[e]}catch(L){}if("object"==typeof p&&p)if(f=a.call(p),f!=d||o.call(p,"toJSON"))"function"==typeof p.toJSON&&(f!=g&&f!=m&&f!=y||o.call(p,"toJSON"))&&(p=p.toJSON(e));else if(p>-1/0&&1/0>p){if(k){for(x=w(p/864e5),h=w(x/365.2425)+1970-1;k(h+1,0)<=x;h++);for(b=w((x-k(h,0))/30.42);k(h,b+1)<=x;b++);x=1+x-k(h,b),T=(p%864e5+864e5)%864e5,C=w(T/36e5)%24,E=w(T/6e4)%60,A=w(T/1e3)%60,N=T%1e3}else h=p.getUTCFullYear(),b=p.getUTCMonth(),x=p.getUTCDate(),C=p.getUTCHours(),E=p.getUTCMinutes(),A=p.getUTCSeconds(),N=p.getUTCMilliseconds();p=(0>=h||h>=1e4?(0>h?"-":"+")+S(6,0>h?-h:h):S(4,h))+"-"+S(2,b+1)+"-"+S(2,x)+"T"+S(2,C)+":"+S(2,E)+":"+S(2,A)+"."+S(3,N)+"Z"}else p=null;if(n&&(p=n.call(t,e,p)),null===p)return"null";if(f=a.call(p),f==v)return""+p;if(f==g)return p>-1/0&&1/0>p?""+p:"null";if(f==m)return _(""+p);if("object"==typeof p){for(O=l.length;O--;)if(l[O]===p)throw TypeError();if(l.push(p),R=[],q=u,u+=c,f==y){for(P=0,O=p.length;O>P;P++)D=j(P,p,n,i,c,u,l),R.push(D===s?"null":D);B=R.length?c?"[\n"+u+R.join(",\n"+u)+"\n"+q+"]":"["+R.join(",")+"]":"[]"}else r(i||p,function(e){var t=j(e,p,n,i,c,u,l);t!==s&&R.push(_(e)+":"+(c?" ":"")+t)}),B=R.length?c?"{\n"+u+R.join(",\n"+u)+"\n"+q+"}":"{"+R.join(",")+"}":"{}";return l.pop(),B}};l.stringify=function(e,t,n){var i,o,r,s;if("function"==typeof t||"object"==typeof t&&t)if((s=a.call(t))==h)o=t;else if(s==y){r={};for(var c,u=0,l=t.length;l>u;c=t[u++],s=a.call(c),(s==m||s==g)&&(r[c]=1));}if(n)if((s=a.call(n))==g){if((n-=n%1)>0)for(i="",n>10&&(n=10);i.length<n;i+=" ");}else s==m&&(i=n.length<=10?n:n.slice(0,10));return j("",(c={},c[""]=e,c),o,r,i,"",[])}}if(!n("json-parse")){var R,D,P=String.fromCharCode,O={92:"\\",34:'"',47:"/",98:"\b",116:"	",110:"\n",102:"\f",114:"\r"},q=function(){throw R=D=null,SyntaxError()},B=function(){for(var e,t,n,i,o,r=D,s=r.length;s>R;)switch(o=r.charCodeAt(R)){case 9:case 10:case 13:case 32:R++;break;case 123:case 125:case 91:case 93:case 58:case 44:return e=b?r.charAt(R):r[R],R++,e;case 34:for(e="@",R++;s>R;)if(o=r.charCodeAt(R),32>o)q();else if(92==o)switch(o=r.charCodeAt(++R)){case 92:case 34:case 47:case 98:case 116:case 110:case 102:case 114:e+=O[o],R++;break;case 117:for(t=++R,n=R+4;n>R;R++)o=r.charCodeAt(R),o>=48&&57>=o||o>=97&&102>=o||o>=65&&70>=o||q();e+=P("0x"+r.slice(t,R));break;default:q()}else{if(34==o)break;for(o=r.charCodeAt(R),t=R;o>=32&&92!=o&&34!=o;)o=r.charCodeAt(++R);e+=r.slice(t,R)}if(34==r.charCodeAt(R))return R++,e;q();default:if(t=R,45==o&&(i=!0,o=r.charCodeAt(++R)),o>=48&&57>=o){for(48==o&&(o=r.charCodeAt(R+1),o>=48&&57>=o)&&q(),i=!1;s>R&&(o=r.charCodeAt(R),o>=48&&57>=o);R++);if(46==r.charCodeAt(R)){for(n=++R;s>n&&(o=r.charCodeAt(n),o>=48&&57>=o);n++);n==R&&q(),R=n}if(o=r.charCodeAt(R),101==o||69==o){for(o=r.charCodeAt(++R),(43==o||45==o)&&R++,n=R;s>n&&(o=r.charCodeAt(n),o>=48&&57>=o);n++);n==R&&q(),R=n}return+r.slice(t,R)}if(i&&q(),"true"==r.slice(R,R+4))return R+=4,!0;if("false"==r.slice(R,R+5))return R+=5,!1;if("null"==r.slice(R,R+4))return R+=4,null;q()}return"$"},L=function(e){var t,n;if("$"==e&&q(),"string"==typeof e){if("@"==(b?e.charAt(0):e[0]))return e.slice(1);if("["==e){for(t=[];e=B(),"]"!=e;n||(n=!0))n&&(","==e?(e=B(),"]"==e&&q()):q()),","==e&&q(),t.push(L(e));return t}if("{"==e){for(t={};e=B(),"}"!=e;n||(n=!0))n&&(","==e?(e=B(),"}"==e&&q()):q()),(","==e||"string"!=typeof e||"@"!=(b?e.charAt(0):e[0])||":"!=B())&&q(),t[e.slice(1)]=L(B());return t}q()}return e},$=function(e,t,n){var i=H(e,t,n);i===s?delete e[t]:e[t]=i},H=function(e,t,n){var i,o=e[t];if("object"==typeof o&&o)if(a.call(o)==y)for(i=o.length;i--;)$(o,i,n);else r(o,function(e){$(o,e,n)});return n.call(e,t,o)};l.parse=function(e,t){var n,i;return R=0,D=""+e,n=L(B()),"$"!=B()&&q(),R=D=null,t&&a.call(t)==h?H((i={},i[""]=n,i),"",t):n}}}c&&e(function(){return l})}(this)},{}],50:[function(e,t){function n(e,t){var n=[];t=t||0;for(var i=t||0;i<e.length;i++)n[i-t]=e[i];return n}t.exports=n},{}]},{},[1])(1)}),function(e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("jquerykws")):"function"==typeof define&&define.amd?define("pnotify",["jquerykws"],e):e(jQueryKws)}(function(e){var t,n,i={dir1:"down",dir2:"left",push:"bottom",spacing1:25,spacing2:25,context:e("body")},o=e(window),r=function(){n=e("body"),PNotify.prototype.options.stack.context=n,o=e(window),o.bind("resize",function(){t&&clearTimeout(t),t=setTimeout(function(){PNotify.positionAll(!0)},10)})};return PNotify=function(e){this.parseOptions(e),this.init()},e.extend(PNotify.prototype,{version:"2.1.0",options:{title:!1,title_escape:!1,text:!1,text_escape:!1,styling:"brighttheme",addclass:"",cornerclass:"",auto_display:!0,width:"300px",min_height:"16px",type:"notice",icon:!0,opacity:1,animation:"fade",animate_speed:"slow",position_animate_speed:500,shadow:!0,hide:!0,delay:8e3,mouse_reset:!0,remove:!0,insert_brs:!0,destroy:!0,stack:i},modules:{},runModules:function(e,t){var n,i;for(i in this.modules)n="object"==typeof t&&i in t?t[i]:t,"function"==typeof this.modules[i][e]&&this.modules[i][e](this,"object"==typeof this.options[i]?this.options[i]:{},n)},state:"initializing",timer:null,styles:null,elem:null,container:null,title_container:null,text_container:null,animating:!1,timerHide:!1,init:function(){var t=this;return this.modules={},e.extend(!0,this.modules,PNotify.prototype.modules),this.styles="object"==typeof this.options.styling?this.options.styling:PNotify.styling[this.options.styling],this.elem=e("<div />",{"class":"ui-pnotify "+this.options.addclass,css:{display:"none"},"aria-live":"assertive",mouseenter:function(e){if(t.options.mouse_reset&&"out"===t.animating){if(!t.timerHide)return;t.cancelRemove()}t.options.hide&&t.options.mouse_reset&&t.cancelRemove()},mouseleave:function(e){t.options.hide&&t.options.mouse_reset&&"out"!==t.animating&&t.queueRemove(),PNotify.positionAll()}}),this.container=e("<div />",{"class":this.styles.container+" ui-pnotify-container "+("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),role:"alert"}).appendTo(this.elem),""!==this.options.cornerclass&&this.container.removeClass("ui-corner-all").addClass(this.options.cornerclass),this.options.shadow&&this.container.addClass("ui-pnotify-shadow"),!1!==this.options.icon&&e("<div />",{"class":"ui-pnotify-icon"}).append(e("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container),this.title_container=e("<h4 />",{"class":"ui-pnotify-title"}).appendTo(this.container),!1===this.options.title?this.title_container.hide():this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),this.text_container=e("<div />",{"class":"ui-pnotify-text"}).appendTo(this.container),!1===this.options.text?this.text_container.hide():this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),"string"==typeof this.options.width&&this.elem.css("width",this.options.width),"string"==typeof this.options.min_height&&this.container.css("min-height",this.options.min_height),PNotify.notices="top"===this.options.stack.push?e.merge([this],PNotify.notices):e.merge(PNotify.notices,[this]),"top"===this.options.stack.push&&this.queuePosition(!1,1),this.options.stack.animation=!1,this.runModules("init"),this.options.auto_display&&this.open(),this},update:function(t){var n=this.options;return this.parseOptions(n,t),this.options.cornerclass!==n.cornerclass&&this.container.removeClass("ui-corner-all "+n.cornerclass).addClass(this.options.cornerclass),this.options.shadow!==n.shadow&&(this.options.shadow?this.container.addClass("ui-pnotify-shadow"):this.container.removeClass("ui-pnotify-shadow")),!1===this.options.addclass?this.elem.removeClass(n.addclass):this.options.addclass!==n.addclass&&this.elem.removeClass(n.addclass).addClass(this.options.addclass),!1===this.options.title?this.title_container.slideUp("fast"):this.options.title!==n.title&&(this.options.title_escape?this.title_container.text(this.options.title):this.title_container.html(this.options.title),!1===n.title&&this.title_container.slideDown(200)),!1===this.options.text?this.text_container.slideUp("fast"):this.options.text!==n.text&&(this.options.text_escape?this.text_container.text(this.options.text):this.text_container.html(this.options.insert_brs?String(this.options.text).replace(/\n/g,"<br />"):this.options.text),!1===n.text&&this.text_container.slideDown(200)),this.options.type!==n.type&&this.container.removeClass(this.styles.error+" "+this.styles.notice+" "+this.styles.success+" "+this.styles.info).addClass("error"===this.options.type?this.styles.error:"info"===this.options.type?this.styles.info:"success"===this.options.type?this.styles.success:this.styles.notice),(this.options.icon!==n.icon||!0===this.options.icon&&this.options.type!==n.type)&&(this.container.find("div.ui-pnotify-icon").remove(),!1!==this.options.icon&&e("<div />",{"class":"ui-pnotify-icon"}).append(e("<span />",{"class":!0===this.options.icon?"error"===this.options.type?this.styles.error_icon:"info"===this.options.type?this.styles.info_icon:"success"===this.options.type?this.styles.success_icon:this.styles.notice_icon:this.options.icon})).prependTo(this.container)),this.options.width!==n.width&&this.elem.animate({width:this.options.width}),this.options.min_height!==n.min_height&&this.container.animate({minHeight:this.options.min_height}),this.options.opacity!==n.opacity&&this.elem.fadeTo(this.options.animate_speed,this.options.opacity),this.options.hide?n.hide||this.queueRemove():this.cancelRemove(),this.queuePosition(!0),this.runModules("update",n),this},open:function(){this.state="opening",
this.runModules("beforeOpen");var e=this;return this.elem.parent().length||this.elem.appendTo(this.options.stack.context?this.options.stack.context:n),"top"!==this.options.stack.push&&this.position(!0),"fade"===this.options.animation||"fade"===this.options.animation.effect_in?this.elem.show().fadeTo(0,0).hide():1!==this.options.opacity&&this.elem.show().fadeTo(0,this.options.opacity).hide(),this.animateIn(function(){e.queuePosition(!0),e.options.hide&&e.queueRemove(),e.state="open",e.runModules("afterOpen")}),this},remove:function(t){this.state="closing",this.timerHide=!!t,this.runModules("beforeClose");var n=this;return this.timer&&(window.clearTimeout(this.timer),this.timer=null),this.animateOut(function(){if(n.state="closed",n.runModules("afterClose"),n.queuePosition(!0),n.options.remove&&n.elem.detach(),n.runModules("beforeDestroy"),n.options.destroy&&null!==PNotify.notices){var t=e.inArray(n,PNotify.notices);-1!==t&&PNotify.notices.splice(t,1)}n.runModules("afterDestroy")}),this},get:function(){return this.elem},parseOptions:function(t,n){this.options=e.extend(!0,{},PNotify.prototype.options),this.options.stack=PNotify.prototype.options.stack;for(var i,o=[t,n],r=0;r<o.length&&(i=o[r],"undefined"!=typeof i);r++)if("object"!=typeof i)this.options.text=i;else for(var s in i)this.modules[s]?e.extend(!0,this.options[s],i[s]):this.options[s]=i[s]},animateIn:function(e){this.animating="in";var t;t="undefined"!=typeof this.options.animation.effect_in?this.options.animation.effect_in:this.options.animation,"none"===t?(this.elem.show(),e()):"show"===t?this.elem.show(this.options.animate_speed,e):"fade"===t?this.elem.show().fadeTo(this.options.animate_speed,this.options.opacity,e):"slide"===t?this.elem.slideDown(this.options.animate_speed,e):"function"==typeof t?t("in",e,this.elem):this.elem.show(t,"object"==typeof this.options.animation.options_in?this.options.animation.options_in:{},this.options.animate_speed,e),this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"}),"slide"!==t&&this.elem.css("overflow","visible"),this.container.css("overflow","hidden")},animateOut:function(e){this.animating="out";var t;t="undefined"!=typeof this.options.animation.effect_out?this.options.animation.effect_out:this.options.animation,"none"===t?(this.elem.hide(),e()):"show"===t?this.elem.hide(this.options.animate_speed,e):"fade"===t?this.elem.fadeOut(this.options.animate_speed,e):"slide"===t?this.elem.slideUp(this.options.animate_speed,e):"function"==typeof t?t("out",e,this.elem):this.elem.hide(t,"object"==typeof this.options.animation.options_out?this.options.animation.options_out:{},this.options.animate_speed,e),this.elem.parent().hasClass("ui-effects-wrapper")&&this.elem.parent().css({position:"fixed",overflow:"visible"}),"slide"!==t&&this.elem.css("overflow","visible"),this.container.css("overflow","hidden")},position:function(e){var t=this.options.stack,i=this.elem;if(i.parent().hasClass("ui-effects-wrapper")&&(i=this.elem.css({left:"0",top:"0",right:"0",bottom:"0"}).parent()),"undefined"==typeof t.context&&(t.context=n),t){"number"!=typeof t.nextpos1&&(t.nextpos1=t.firstpos1),"number"!=typeof t.nextpos2&&(t.nextpos2=t.firstpos2),"number"!=typeof t.addpos2&&(t.addpos2=0);var r="none"===i.css("display");if(!r||e){var s,a,c={};switch(t.dir1){case"down":a="top";break;case"up":a="bottom";break;case"left":a="right";break;case"right":a="left"}e=parseInt(i.css(a).replace(/(?:\..*|[^0-9.])/g,"")),isNaN(e)&&(e=0),"undefined"!=typeof t.firstpos1||r||(t.firstpos1=e,t.nextpos1=t.firstpos1);var u;switch(t.dir2){case"down":u="top";break;case"up":u="bottom";break;case"left":u="right";break;case"right":u="left"}if(s=parseInt(i.css(u).replace(/(?:\..*|[^0-9.])/g,"")),isNaN(s)&&(s=0),"undefined"!=typeof t.firstpos2||r||(t.firstpos2=s,t.nextpos2=t.firstpos2),("down"===t.dir1&&t.nextpos1+i.height()>(t.context.is(n)?o.height():t.context.prop("scrollHeight"))||"up"===t.dir1&&t.nextpos1+i.height()>(t.context.is(n)?o.height():t.context.prop("scrollHeight"))||"left"===t.dir1&&t.nextpos1+i.width()>(t.context.is(n)?o.width():t.context.prop("scrollWidth"))||"right"===t.dir1&&t.nextpos1+i.width()>(t.context.is(n)?o.width():t.context.prop("scrollWidth")))&&(t.nextpos1=t.firstpos1,t.nextpos2+=t.addpos2+("undefined"==typeof t.spacing2?25:t.spacing2),t.addpos2=0),t.animation&&t.nextpos2<s)switch(t.dir2){case"down":c.top=t.nextpos2+"px";break;case"up":c.bottom=t.nextpos2+"px";break;case"left":c.right=t.nextpos2+"px";break;case"right":c.left=t.nextpos2+"px"}else"number"==typeof t.nextpos2&&i.css(u,t.nextpos2+"px");switch(t.dir2){case"down":case"up":i.outerHeight(!0)>t.addpos2&&(t.addpos2=i.height());break;case"left":case"right":i.outerWidth(!0)>t.addpos2&&(t.addpos2=i.width())}if("number"==typeof t.nextpos1)if(t.animation&&(e>t.nextpos1||c.top||c.bottom||c.right||c.left))switch(t.dir1){case"down":c.top=t.nextpos1+"px";break;case"up":c.bottom=t.nextpos1+"px";break;case"left":c.right=t.nextpos1+"px";break;case"right":c.left=t.nextpos1+"px"}else i.css(a,t.nextpos1+"px");switch((c.top||c.bottom||c.right||c.left)&&i.animate(c,{duration:this.options.position_animate_speed,queue:!1}),t.dir1){case"down":case"up":t.nextpos1+=i.height()+("undefined"==typeof t.spacing1?25:t.spacing1);break;case"left":case"right":t.nextpos1+=i.width()+("undefined"==typeof t.spacing1?25:t.spacing1)}}return this}},queuePosition:function(e,n){return t&&clearTimeout(t),n||(n=10),t=setTimeout(function(){PNotify.positionAll(e)},n),this},cancelRemove:function(){return this.timer&&window.clearTimeout(this.timer),"closing"===this.state&&(this.elem.stop(!0),this.state="open",this.animating="in",this.elem.css("height","auto").animate({width:this.options.width,opacity:this.options.opacity},"fast")),this},queueRemove:function(){var e=this;return this.cancelRemove(),this.timer=window.setTimeout(function(){e.remove(!0)},isNaN(this.options.delay)?0:this.options.delay),this}}),e.extend(PNotify,{notices:[],removeAll:function(){e.each(PNotify.notices,function(){this.remove&&this.remove(!1)})},positionAll:function(n){if(t&&clearTimeout(t),t=null,PNotify.notices&&PNotify.notices.length)e.each(PNotify.notices,function(){var e=this.options.stack;e&&(e.nextpos1=e.firstpos1,e.nextpos2=e.firstpos2,e.addpos2=0,e.animation=n)}),e.each(PNotify.notices,function(){this.position()});else{var i=PNotify.prototype.options.stack;i&&(delete i.nextpos1,delete i.nextpos2)}},styling:{brighttheme:{container:"brighttheme",notice:"brighttheme-notice",notice_icon:"brighttheme-icon-notice",info:"brighttheme-info",info_icon:"brighttheme-icon-info",success:"brighttheme-success",success_icon:"brighttheme-icon-success",error:"brighttheme-error",error_icon:"brighttheme-icon-error"},jquerykwsui:{container:"ui-widget ui-widget-content ui-corner-all",notice:"ui-state-highlight",notice_icon:"ui-icon ui-icon-info",info:"",info_icon:"ui-icon ui-icon-info",success:"ui-state-default",success_icon:"ui-icon ui-icon-circle-check",error:"ui-state-error",error_icon:"ui-icon ui-icon-alert"},bootstrap2:{container:"alert",notice:"",notice_icon:"icon-exclamation-sign",info:"alert-info",info_icon:"icon-info-sign",success:"alert-success",success_icon:"icon-ok-sign",error:"alert-error",error_icon:"icon-warning-sign"},bootstrap3:{container:"alert",notice:"alert-warning",notice_icon:"glyphicon glyphicon-exclamation-sign",info:"alert-info",info_icon:"glyphicon glyphicon-info-sign",success:"alert-success",success_icon:"glyphicon glyphicon-ok-sign",error:"alert-danger",error_icon:"glyphicon glyphicon-warning-sign"}}}),PNotify.styling.fontawesome=e.extend({},PNotify.styling.bootstrap3),e.extend(PNotify.styling.fontawesome,{notice_icon:"fa fa-exclamation-circle",info_icon:"fa fa-info",success_icon:"fa fa-check",error_icon:"fa fa-warning"}),document.body?r():e(r),PNotify}),function(e,t){"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?module.exports=t():e.inflection=t()}(this,function(){var e=["accommodation","adulthood","advertising","advice","aggression","aid","air","aircraft","alcohol","anger","applause","arithmetic","assistance","athletics","bacon","baggage","beef","biology","blood","botany","bread","butter","carbon","cardboard","cash","chalk","chaos","chess","crossroads","countryside","dancing","deer","dignity","dirt","dust","economics","education","electricity","engineering","enjoyment","envy","equipment","ethics","evidence","evolution","fame","fiction","flour","flu","food","fuel","fun","furniture","gallows","garbage","garlic","genetics","gold","golf","gossip","grammar","gratitude","grief","guilt","gymnastics","happiness","hardware","harm","hate","hatred","health","heat","help","homework","honesty","honey","hospitality","housework","humour","hunger","hydrogen","ice","importance","inflation","information","innocence","iron","irony","jam","jewelry","judo","karate","knowledge","lack","laughter","lava","leather","leisure","lightning","linguine","linguini","linguistics","literature","litter","livestock","logic","loneliness","luck","luggage","macaroni","machinery","magic","management","mankind","marble","mathematics","mayonnaise","measles","methane","milk","money","mud","music","mumps","nature","news","nitrogen","nonsense","nurture","nutrition","obedience","obesity","oxygen","pasta","patience","physics","poetry","pollution","poverty","pride","psychology","publicity","punctuation","quartz","racism","relaxation","reliability","research","respect","revenge","rice","rubbish","rum","safety","scenery","seafood","seaside","series","shame","sheep","shopping","sleep","smoke","smoking","snow","soap","software","soil","spaghetti","species","steam","stuff","stupidity","sunshine","symmetry","tennis","thirst","thunder","timber","traffic","transportation","trust","underwear","unemployment","unity","validity","veal","vegetation","vegetarianism","vengeance","violence","vitality","warmth","wealth","weather","welfare","wheat","wildlife","wisdom","yoga","zinc","zoology"],t={plural:{men:new RegExp("^(m|wom)en$","gi"),people:new RegExp("(pe)ople$","gi"),children:new RegExp("(child)ren$","gi"),tia:new RegExp("([ti])a$","gi"),analyses:new RegExp("((a)naly|(b)a|(d)iagno|(p)arenthe|(p)rogno|(s)ynop|(t)he)ses$","gi"),hives:new RegExp("(hi|ti)ves$","gi"),curves:new RegExp("(curve)s$","gi"),lrves:new RegExp("([lr])ves$","gi"),foves:new RegExp("([^fo])ves$","gi"),movies:new RegExp("(m)ovies$","gi"),aeiouyies:new RegExp("([^aeiouy]|qu)ies$","gi"),series:new RegExp("(s)eries$","gi"),xes:new RegExp("(x|ch|ss|sh)es$","gi"),mice:new RegExp("([m|l])ice$","gi"),buses:new RegExp("(bus)es$","gi"),oes:new RegExp("(o)es$","gi"),shoes:new RegExp("(shoe)s$","gi"),crises:new RegExp("(cris|ax|test)es$","gi"),octopi:new RegExp("(octop|vir)i$","gi"),aliases:new RegExp("(alias|canvas|status|campus)es$","gi"),summonses:new RegExp("^(summons)es$","gi"),oxen:new RegExp("^(ox)en","gi"),matrices:new RegExp("(matr)ices$","gi"),vertices:new RegExp("(vert|ind)ices$","gi"),feet:new RegExp("^feet$","gi"),teeth:new RegExp("^teeth$","gi"),geese:new RegExp("^geese$","gi"),quizzes:new RegExp("(quiz)zes$","gi"),whereases:new RegExp("^(whereas)es$","gi"),criteria:new RegExp("^(criteri)a$","gi"),genera:new RegExp("^genera$","gi"),ss:new RegExp("ss$","gi"),s:new RegExp("s$","gi")},singular:{man:new RegExp("^(m|wom)an$","gi"),person:new RegExp("(pe)rson$","gi"),child:new RegExp("(child)$","gi"),ox:new RegExp("^(ox)$","gi"),axis:new RegExp("(ax|test)is$","gi"),octopus:new RegExp("(octop|vir)us$","gi"),alias:new RegExp("(alias|status|canvas|campus)$","gi"),summons:new RegExp("^(summons)$","gi"),bus:new RegExp("(bu)s$","gi"),buffalo:new RegExp("(buffal|tomat|potat)o$","gi"),tium:new RegExp("([ti])um$","gi"),sis:new RegExp("sis$","gi"),ffe:new RegExp("(?:([^f])fe|([lr])f)$","gi"),hive:new RegExp("(hi|ti)ve$","gi"),aeiouyy:new RegExp("([^aeiouy]|qu)y$","gi"),x:new RegExp("(x|ch|ss|sh)$","gi"),matrix:new RegExp("(matr)ix$","gi"),vertex:new RegExp("(vert|ind)ex$","gi"),mouse:new RegExp("([m|l])ouse$","gi"),foot:new RegExp("^foot$","gi"),tooth:new RegExp("^tooth$","gi"),goose:new RegExp("^goose$","gi"),quiz:new RegExp("(quiz)$","gi"),whereas:new RegExp("^(whereas)$","gi"),criterion:new RegExp("^(criteri)on$","gi"),genus:new RegExp("^genus$","gi"),s:new RegExp("s$","gi"),common:new RegExp("$","gi")}},n=[[t.plural.men],[t.plural.people],[t.plural.children],[t.plural.tia],[t.plural.analyses],[t.plural.hives],[t.plural.curves],[t.plural.lrves],[t.plural.foves],[t.plural.aeiouyies],[t.plural.series],[t.plural.movies],[t.plural.xes],[t.plural.mice],[t.plural.buses],[t.plural.oes],[t.plural.shoes],[t.plural.crises],[t.plural.octopi],[t.plural.aliases],[t.plural.summonses],[t.plural.oxen],[t.plural.matrices],[t.plural.feet],[t.plural.teeth],[t.plural.geese],[t.plural.quizzes],[t.plural.whereases],[t.plural.criteria],[t.plural.genera],[t.singular.man,"$1en"],[t.singular.person,"$1ople"],[t.singular.child,"$1ren"],[t.singular.ox,"$1en"],[t.singular.axis,"$1es"],[t.singular.octopus,"$1i"],[t.singular.alias,"$1es"],[t.singular.summons,"$1es"],[t.singular.bus,"$1ses"],[t.singular.buffalo,"$1oes"],[t.singular.tium,"$1a"],[t.singular.sis,"ses"],[t.singular.ffe,"$1$2ves"],[t.singular.hive,"$1ves"],[t.singular.aeiouyy,"$1ies"],[t.singular.matrix,"$1ices"],[t.singular.vertex,"$1ices"],[t.singular.x,"$1es"],[t.singular.mouse,"$1ice"],[t.singular.foot,"feet"],[t.singular.tooth,"teeth"],[t.singular.goose,"geese"],[t.singular.quiz,"$1zes"],[t.singular.whereas,"$1es"],[t.singular.criterion,"$1a"],[t.singular.genus,"genera"],[t.singular.s,"s"],[t.singular.common,"s"]],i=[[t.singular.man],[t.singular.person],[t.singular.child],[t.singular.ox],[t.singular.axis],[t.singular.octopus],[t.singular.alias],[t.singular.summons],[t.singular.bus],[t.singular.buffalo],[t.singular.tium],[t.singular.sis],[t.singular.ffe],[t.singular.hive],[t.singular.aeiouyy],[t.singular.x],[t.singular.matrix],[t.singular.mouse],[t.singular.foot],[t.singular.tooth],[t.singular.goose],[t.singular.quiz],[t.singular.whereas],[t.singular.criterion],[t.singular.genus],[t.plural.men,"$1an"],[t.plural.people,"$1rson"],[t.plural.children,"$1"],[t.plural.genera,"genus"],[t.plural.criteria,"$1on"],[t.plural.tia,"$1um"],[t.plural.analyses,"$1$2sis"],[t.plural.hives,"$1ve"],[t.plural.curves,"$1"],[t.plural.lrves,"$1f"],[t.plural.foves,"$1fe"],[t.plural.movies,"$1ovie"],[t.plural.aeiouyies,"$1y"],[t.plural.series,"$1eries"],[t.plural.xes,"$1"],[t.plural.mice,"$1ouse"],[t.plural.buses,"$1"],[t.plural.oes,"$1"],[t.plural.shoes,"$1"],[t.plural.crises,"$1is"],[t.plural.octopi,"$1us"],[t.plural.aliases,"$1"],[t.plural.summonses,"$1"],[t.plural.oxen,"$1"],[t.plural.matrices,"$1ix"],[t.plural.vertices,"$1ex"],[t.plural.feet,"foot"],[t.plural.teeth,"tooth"],[t.plural.geese,"goose"],[t.plural.quizzes,"$1"],[t.plural.whereases,"$1"],[t.plural.ss,"ss"],[t.plural.s,""]],o=["and","or","nor","a","an","the","so","but","to","of","at","by","from","into","on","onto","off","out","in","over","with","for"],r=new RegExp("(_ids|_id)$","g"),s=new RegExp("_","g"),a=new RegExp("[ _]","g"),c=new RegExp("([A-Z])","g"),u=new RegExp("^_"),l={_apply_rules:function(e,t,n,i){if(i)e=i;else{var o=l.indexOf(n,e.toLowerCase())>-1;if(!o)for(var r=0,s=t.length;s>r;r++)if(e.match(t[r][0])){void 0!==t[r][1]&&(e=e.replace(t[r][0],t[r][1]));break}}return e},indexOf:function(e,t,n,i){n||(n=-1);for(var o=-1,r=n,s=e.length;s>r;r++)if(e[r]===t||i&&i(e[r],t)){o=r;break}return o},pluralize:function(t,i){return l._apply_rules(t,n,e,i)},singularize:function(t,n){return l._apply_rules(t,i,e,n)},inflect:function(t,o,r,s){return o=parseInt(o,10),isNaN(o)?t:0===o||o>1?l._apply_rules(t,n,e,s):l._apply_rules(t,i,e,r)},camelize:function(e,t){for(var n,i,o,r,s=e.split("/"),a=0,c=s.length;c>a;a++){for(n=s[a].split("_"),i=0,o=n.length;o>i;i++)0!==i&&(n[i]=n[i].toLowerCase()),r=n[i].charAt(0),r=t&&0===a&&0===i?r.toLowerCase():r.toUpperCase(),n[i]=r+n[i].substring(1);s[a]=n.join("")}return s.join("::")},underscore:function(e,t){if(t&&e===e.toUpperCase())return e;for(var n=e.split("::"),i=0,o=n.length;o>i;i++)n[i]=n[i].replace(c,"_$1"),n[i]=n[i].replace(u,"");return n.join("/").toLowerCase()},humanize:function(e,t){return e=e.toLowerCase(),e=e.replace(r,""),e=e.replace(s," "),t||(e=l.capitalize(e)),e},capitalize:function(e){return e=e.toLowerCase(),e.substring(0,1).toUpperCase()+e.substring(1)},dasherize:function(e){return e.replace(a,"-")},titleize:function(e){e=e.toLowerCase().replace(s," ");for(var t,n,i,r=e.split(" "),a=0,c=r.length;c>a;a++){for(t=r[a].split("-"),n=0,i=t.length;i>n;n++)l.indexOf(o,t[n].toLowerCase())<0&&(t[n]=l.capitalize(t[n]));r[a]=t.join("-")}return e=r.join(" "),e=e.substring(0,1).toUpperCase()+e.substring(1)},demodulize:function(e){var t=e.split("::");return t[t.length-1]},tableize:function(e){return e=l.underscore(e),e=l.pluralize(e)},classify:function(e){return e=l.camelize(e),e=l.singularize(e)},foreign_key:function(e,t){return e=l.demodulize(e),e=l.underscore(e)+(t?"":"_")+"id"},ordinalize:function(e){for(var t=e.split(" "),n=0,i=t.length;i>n;n++){var o=parseInt(t[n],10);if(!isNaN(o)){var r=t[n].substring(t[n].length-2),s=t[n].substring(t[n].length-1),a="th";"11"!=r&&"12"!=r&&"13"!=r&&("1"===s?a="st":"2"===s?a="nd":"3"===s&&(a="rd")),t[n]+=a}}return t.join(" ")},transform:function(e,t){for(var n=0,i=t.length;i>n;n++){var o=t[n];l.hasOwnProperty(o)&&(e=l[o](e))}return e}};return l.version="1.11.0",window.inflector=l,l});var base64={};base64.PADCHAR="=",base64.ALPHA="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",base64.makeDOMException=function(){try{return new DOMException(DOMException.INVALID_CHARACTER_ERR)}catch(e){var t=new Error("DOM Exception 5");return t.code=t.number=5,t.name=t.description="INVALID_CHARACTER_ERR",t.toString=function(){return"Error: "+t.name+": "+t.message},t}},base64.getbyte64=function(e,t){var n=base64.ALPHA.indexOf(e.charAt(t));if(-1===n)throw base64.makeDOMException();return n},base64.decode=function(e){e=""+e;var t,n,i,o=base64.getbyte64,r=e.length;if(0===r)return e;if(r%4!==0)throw base64.makeDOMException();t=0,e.charAt(r-1)===base64.PADCHAR&&(t=1,e.charAt(r-2)===base64.PADCHAR&&(t=2),r-=4);var s=[];for(n=0;r>n;n+=4)i=o(e,n)<<18|o(e,n+1)<<12|o(e,n+2)<<6|o(e,n+3),s.push(String.fromCharCode(i>>16,i>>8&255,255&i));switch(t){case 1:i=o(e,n)<<18|o(e,n+1)<<12|o(e,n+2)<<6,s.push(String.fromCharCode(i>>16,i>>8&255));break;case 2:i=o(e,n)<<18|o(e,n+1)<<12,s.push(String.fromCharCode(i>>16))}return s.join("")},base64.getbyte=function(e,t){var n=e.charCodeAt(t);if(n>255)throw base64.makeDOMException();return n},base64.encode=function(e){if(1!==arguments.length)throw new SyntaxError("Not enough arguments");var t,n,i=base64.PADCHAR,o=base64.ALPHA,r=base64.getbyte,s=[];e=""+e;var a=e.length-e.length%3;if(0===e.length)return e;for(t=0;a>t;t+=3)n=r(e,t)<<16|r(e,t+1)<<8|r(e,t+2),s.push(o.charAt(n>>18)),s.push(o.charAt(n>>12&63)),s.push(o.charAt(n>>6&63)),s.push(o.charAt(63&n));switch(e.length-a){case 1:n=r(e,t)<<16,s.push(o.charAt(n>>18)+o.charAt(n>>12&63)+i+i);break;case 2:n=r(e,t)<<16|r(e,t+1)<<8,s.push(o.charAt(n>>18)+o.charAt(n>>12&63)+o.charAt(n>>6&63)+i)}return s.join("")},window.btoa||(window.btoa=base64.encode),window.atob||(window.atob=base64.decode),KwsSdk.base64Decode=function(e){function t(e){var t=e.length%4;if(0!==t)for(var n=4-t,i=0;n>i;i++)e+="=";return e}return window.atob(t(e))},KwsSdk.parseTokenData=function(e){var t;try{t=e.split(".");var n=KwsSdk.base64Decode(t[1]);t=JSON.parse(n)}catch(i){t=null}return t},KwsSdk.tokenActive=function(e){var t=!1;try{var n=KwsSdk.parseTokenData(e),i=1e3*n.exp;t=(new Date).getTime()<i?!0:!1}catch(o){t=!1}return t},KwsSdk.isActionCustom=function(e){switch(e){case"get":case"list":case"create":case"update":case"delete":return!1;default:return!0}},KwsSdk.getMethodFromAction=function(e){switch(e){case"get":case"list":return"GET";case"create":return"POST";case"update":return"PUT";case"delete":return"DELETE"}return"get"===e.substring(0,3)&&e.charAt(3).toLowerCase()!==e.charAt(3)?"GET":"POST"},KwsSdk.decamelize=function(e){return e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase()},KwsSdk.getUrlFromAction=function(e){var t;return t=KwsSdk.isActionCustom(e)?"get"===e.substring(0,3)&&e.charAt(3).toLowerCase()!==e.charAt(3)?e.charAt(3).toLowerCase()+e.substring(4):e:"",KwsSdk.decamelize(t,"-")},KwsSdk.createPathFromEndpoint=function(e,t,n,i,o){var r="/"+e,s=t.split("."),a=KwsSdk.parseTokenData(o)||{},c=s[s.length-1];i=i||{};for(var u=0;u<s.length-1;u++){var l=KwsSdk.decamelize(s[u],"-");if(!s[u].match(/^v[\d]+$/)&&(-1===n.indexOf(s[u])&&(l=window.inflector.pluralize(l)),r+="/"+l,u<s.length-2||"list"!==c&&"create"!==c)){var p=s[u]+"Id";i[p]?(r+="/"+i[p],delete i[p]):a[p]&&(r+="/"+a[p])}}var f=KwsSdk.getUrlFromAction(c);return r+=f?"/"+f:"",console.log("path",r),r},KwsSdk.getTokenFromLocalStorage=function(e){var t=localStorage[e]||"";return t=t.replace(/(^\')|('$)/gi,""),KwsSdk.tokenActive(t)?t:(localStorage.removeItem(e),null)},KwsSdk.getCookie=function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return""},KwsSdk.deleteCookie=function(e){document.cookie=e+"=; expires=Thu, 01 Jan 1970 00:00:00 UTC"},KwsSdk.getTokenFromCookie=function(e){var t=KwsSdk.getCookie(e);return KwsSdk.tokenActive(t)?t:(KwsSdk.deleteCookie(e),null)},KwsSdk.USER_TOKEN_NAME="sa.kws.user.token",KwsSdk.APP_TOKEN_NAME="sa.kws.app.token",KwsSdk.prototype.saveTokens=function(){var e=this;e.userToken&&localStorage.setItem(KwsSdk.USER_TOKEN_NAME,e.userToken),e.appToken&&localStorage.setItem(KwsSdk.APP_TOKEN_NAME,e.appToken)},KwsSdk.prototype.deleteTokens=function(){var e=this;delete e.userToken,delete e.appToken,localStorage.removeItem(KwsSdk.USER_TOKEN_NAME),localStorage.removeItem(KwsSdk.APP_TOKEN_NAME)},KwsSdk.prototype.getAppToken=function(){var e=this,t={url:e.opts.callbackHost+"/sa/authentication/frontend-app-token",method:"POST",dataType:"json",contentType:"application/json; charset=utf-8",data:{}};return e.jQuery.ajax(t)},KwsSdk.prototype.getOauthTokensFromJsonp=function(){function e(){o=null,n.resolve()}var t=this,n=t.jQuery.Deferred(),i={url:t.opts.callbackHost+"/sa/oauth/token",method:"GET",dataType:"jsonp",crossDomain:!0},o=setTimeout(function(){e()},2e3);return t.jQuery.ajax(i).then(function(e){e.userToken&&(t.userToken=e.userToken),e.appToken&&(t.appToken=e.appToken)})["finally"](function(){e()}),n},KwsSdk.prototype.getOauthTokens=function(){function e(){delete t.getOauthTokensPromise,n.resolve()}var t=this;if(t.getOauthTokensPromise)return t.getOauthTokensPromise;var n=t.jQuery.Deferred();if(t.getOauthTokensPromise=n,t.userToken||t.appToken)e();else if(t.opts.implicit&&0===window.location.hash.indexOf("#token=")){var i=window.location.hash.substring("#token=".length);t.userToken=i,t.saveTokens(),window.location.href=window.location.href.split("#")[0]}else t.getAppToken()["finally"](function(){t.appToken=t.appToken||KwsSdk.getTokenFromLocalStorage(KwsSdk.APP_TOKEN_NAME),t.userToken=KwsSdk.getTokenFromCookie(KwsSdk.USER_TOKEN_NAME)||KwsSdk.getTokenFromLocalStorage(KwsSdk.USER_TOKEN_NAME),!t.userToken&&t.opts.crossDomain?t.getOauthTokensFromJsonp()["finally"](function(){t.saveTokens(),e()}):(t.saveTokens(),e())});return n},KwsSdk.prototype.createApiFunction=function(e,t,n,i){var o=this;e!=="v"+o.currentApiVersion&&(t=e+"."+t,null!==n.alias&&(n.alias=e+"."+n.alias));for(var r=t.split("."),s=n.alias?n.alias.split("."):null,a=r[r.length-1],c=KwsSdk.getMethodFromAction(a),u=function(n){return o.getOauthTokens().then(function(){n=n||{};var r=o.opts.kwsApiHost+KwsSdk.createPathFromEndpoint(e,t,i,n,o.userToken||o.appToken),s={json:"GET"===c?null:n,qs:"GET"===c?n:null};return o.makeRequest(c,r,s)})},l=o,p=0;p<r.length-1;p++)l[r[p]]=l[r[p]]||{},l=l[r[p]];if(l[a]=u,null!==s){for(var f=o,h=0;h<s.length-1;h++)f[s[h]]=f[s[h]]||{},f=f[s[h]];f[a]=u}},KwsSdk.prototype.apiFunctionFactory=function(e,t){var n=this;for(var i in e)for(var o in e[i]){var r=e[i][o];n.createApiFunction(i,o,r,t)}},KwsSdk.prototype.makeRequest=function(e,t,n){var i=this,o={url:t,method:e,dataType:"json"};return n.json?(o.data=JSON.stringify(n.json),o.contentType="application/json; charset=utf-8"):n.qs&&(o.data=n.qs),o.beforeSend=function(e){e.setRequestHeader("Accept-Language",i.opts.language);var t=i.userToken||i.appToken;e.setRequestHeader("Authorization","Bearer "+t)},i.jQuery.ajax(o)},KwsSdk.prototype.signIn=function(e){var t=this;e=e||{};var n=t.opts.callbackHost;t.opts.implicit||(n+="/sa/oauth/callback"),location.href=t.opts.clubUrl+"/oauth?clientId="+encodeURIComponent(t.opts.clientId)+"&state="+encodeURIComponent(e.state||"")+"&redirectUri="+n+"&language="+t.opts.language},KwsSdk.prototype.signOut=function(){var e=this;e.deleteTokens(),e.opts.implicit?location.reload():location.href=e.opts.callbackHost+"/sa/authentication/logout"},KwsSdk.prototype.getUserId=function(){var e=this;if(!KwsSdk.tokenActive(e.userToken))return null;var t=KwsSdk.parseTokenData(e.userToken);return t?t.userId:null},KwsSdk.prototype.setLanguage=function(e){var t=this;t.opts.language=e},KwsSdk.prototype.init=function(){var e=this;e.opts.withoutNotifications||e.initNotifications()},KwsSdk.prototype.initBar=function(){function e(){function e(e){var t="",n=[];for(var i in e){var o=e[i];n.push(encodeURIComponent(i)+"="+encodeURIComponent(o))}return t="?"+n.join("&")}var n=e({clientId:t.opts.clientId,clubUrl:t.opts.clubUrl,kwsApiHost:t.opts.kwsApiHost,token:t.userToken});t.jQuery(".sa_bar_v2").remove(),t.jQuery('<div class="sa_bar_v2 sa_bar_v2 hidden"><div class="sa_bar_v2_iframe_container hidden"><iframe class="superawesome_iframe superawesome_club_iframe sa_bar_v2_iframe" allowTransparency="true"  frameborder="0" hspace="0" vspace="0" marginheight="0" marginwidth="0" scrolling="no" src="https://s3-eu-west-1.amazonaws.com/sa-bar/v1.1.0/index.html#/'+t.opts.language+"/bar"+n+'" /><div class="sa_bar_v2_iframe_close"><span>x</span></div></div><div class="sa_bar_v2_toggle '+t.opts.clientId+'"></div"></div>').appendTo("body"),t.jQuery(".sa_bar_v2_toggle").click(function(){t.jQuery(".sa_bar_v2_iframe_container").toggleClass("hidden")}),t.jQuery(".sa_bar_v2_iframe_close").click(function(){t.jQuery(".sa_bar_v2_iframe_container").addClass("hidden")}),t.jQuery(".sa_bar_v2").removeClass("hidden"),t.jQuery(".sa_bar_v2_toggle").animate({right:"+=20px"},100).animate({right:"-=40px"},100).animate({right:"+=40px"},100).animate({right:"-=40px"},100).animate({right:"+=40px"},100).animate({right:"-=40px"},100).animate({right:"+=20px"},100)}var t=this;t.getOauthTokens().then(function(){t.userToken&&e()})},KwsSdk.prototype.initNotifications=function(){function e(){0!==o.getUserListeners.length&&o.user.get().then(function(e){for(var t=0;t<o.getUserListeners.length;t++)"function"==typeof o.getUserListeners[t]&&o.getUserListeners[t](e)})}function t(e){o.showNotification(e)}function n(i){if(i&&!o.socket){var r=o.opts.kwsWebsocketsHost+"?token="+encodeURIComponent(i);o.socket=io.connect(r,{}),o.socket.on("UserApi.authentication.getUser",e),o.socket.on("UserApi.notifications.new",t),o.socket.on("error",function(){o.socket=null,setTimeout(function(){n(i)},5e3)}),o.socket.on("disconnect",function(){o.socket=null,setTimeout(function(){n(i)},5e3)})}}function i(){o.userToken&&o.v1.user.notification.list().then(function(e){var t;for(t=0;t<e.results.length;t++)e.results[t].read||o.showNotification(e.results[t])})}var o=this;o.getOauthTokens().then(function(){n(o.userToken),i()})},KwsSdk.prototype.showNotification=function(e){function t(){return['<div class="sa-notification">','<div class="sa-notification-container">','<div class="sa-notification-icon sa-notification-icon-info">','<i class="icon sa-fa sa-fa-info sa-fa-2x"></i>',"</div>",'<div class="sa-notification-icon sa-notification-icon-success">','<i class="icon sa-fa sa-fa-checkmark sa-fa-2x"></i>',"</div>",'<div class="sa-notification-icon sa-notification-icon-error">','<i class="icon sa-fa sa-fa-blocked sa-fa-2x"></i>',"</div>",'<div class="sa-notification-icon sa-notification-icon-warning">','<i class="icon sa-fa sa-fa-warning sa-fa-2x"></i>',"</div>",'<div class="sa-notification-body">','<h4 class="sa-notification-title" role="title"></h4>','<div class="sa-notification-message" role="description"></div>',"</div>","</div>","</div>"].join("")}function n(e,t){var n=i.jQuery("<div>"+e+"</div>");i.jQuery('[role="title"]',n).html(t.title);var o;return o=t.url?'<a href="'+t.url+'" target="_parent" class="notification"><div>'+t.description+"</div></a>":t.description,i.jQuery('[role="description"]',n).html(o),n=n.html()}var i=this;e.level=e.level||"success";var o=e.level?"sa-notification-level-"+e.level:"",r="sa-notification-wrapper",s=t(),a=n(s,e),c=new PNotify({text:a,addclass:r+" "+o,buttons:{closer:!1,sticker:!1},icon:!1,mouse_reset:!1});c.get().click(function(){c.remove()}),e.id&&setTimeout(function(){i.v1.user.notification.read({notificationId:e.id})},1e3)},KwsSdk.prototype.addUserListener=function(e){var t=this;t.getUserListeners.push(e)},KwsSdk.prototype.removeUserListener=function(e){function t(e,t){if(e)for(var n=0;n<e.length;n++)if(e[n]===t)return e.splice(n,1)}var n=this;t(n.getUserListeners,e)};