mirror of
https://github.com/moparisthebest/kaiwa
synced 2024-11-17 14:55:05 -05:00
13 lines
395 KiB
JavaScript
13 lines
395 KiB
JavaScript
!function(t,e){function n(t){var e=t.length,n=oe.type(t);return oe.isWindow(t)?!1:1===t.nodeType&&e?!0:"array"===n||"function"!==n&&(0===e||"number"==typeof e&&e>0&&e-1 in t)}function r(t){var e=de[t]={};return oe.each(t.match(ae)||[],function(t,n){e[n]=!0}),e}function i(){Object.defineProperty(this.cache={},0,{get:function(){return{}}}),this.expando=oe.expando+Math.random()}function o(t,n,r){var i;if(r===e&&1===t.nodeType)if(i="data-"+n.replace(ye,"-$1").toLowerCase(),r=t.getAttribute(i),"string"==typeof r){try{r="true"===r?!0:"false"===r?!1:"null"===r?null:+r+""===r?+r:ve.test(r)?JSON.parse(r):r}catch(o){}ge.set(t,n,r)}else r=e;return r}function s(){return!0}function a(){return!1}function u(){try{return W.activeElement}catch(t){}}function c(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}function l(t,e,n){if(oe.isFunction(e))return oe.grep(t,function(t,r){return!!e.call(t,r,t)!==n});if(e.nodeType)return oe.grep(t,function(t){return t===e!==n});if("string"==typeof e){if(Ae.test(e))return oe.filter(e,t,n);e=oe.filter(e,t)}return oe.grep(t,function(t){return ee.call(e,t)>=0!==n})}function f(t,e){return oe.nodeName(t,"table")&&oe.nodeName(1===e.nodeType?e:e.firstChild,"tr")?t.getElementsByTagName("tbody")[0]||t.appendChild(t.ownerDocument.createElement("tbody")):t}function h(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function p(t){var e=Fe.exec(t.type);return e?t.type=e[1]:t.removeAttribute("type"),t}function d(t,e){for(var n=t.length,r=0;n>r;r++)me.set(t[r],"globalEval",!e||me.get(e[r],"globalEval"))}function g(t,e){var n,r,i,o,s,a,u,c;if(1===e.nodeType){if(me.hasData(t)&&(o=me.access(t),s=oe.extend({},o),c=o.events,me.set(e,s),c)){delete s.handle,s.events={};for(i in c)for(n=0,r=c[i].length;r>n;n++)oe.event.add(e,i,c[i][n])}ge.hasData(t)&&(a=ge.access(t),u=oe.extend({},a),ge.set(e,u))}}function m(t,n){var r=t.getElementsByTagName?t.getElementsByTagName(n||"*"):t.querySelectorAll?t.querySelectorAll(n||"*"):[];return n===e||n&&oe.nodeName(t,n)?oe.merge([t],r):r}function v(t,e){var n=e.nodeName.toLowerCase();"input"===n&&qe.test(t.type)?e.checked=t.checked:("input"===n||"textarea"===n)&&(e.defaultValue=t.defaultValue)}function y(t,e){if(e in t)return e;for(var n=e.charAt(0).toUpperCase()+e.slice(1),r=e,i=Qe.length;i--;)if(e=Qe[i]+n,e in t)return e;return r}function b(t,e){return t=e||t,"none"===oe.css(t,"display")||!oe.contains(t.ownerDocument,t)}function x(e){return t.getComputedStyle(e,null)}function w(t,e){for(var n,r,i,o=[],s=0,a=t.length;a>s;s++)r=t[s],r.style&&(o[s]=me.get(r,"olddisplay"),n=r.style.display,e?(o[s]||"none"!==n||(r.style.display=""),""===r.style.display&&b(r)&&(o[s]=me.access(r,"olddisplay",N(r.nodeName)))):o[s]||(i=b(r),(n&&"none"!==n||!i)&&me.set(r,"olddisplay",i?n:oe.css(r,"display"))));for(s=0;a>s;s++)r=t[s],r.style&&(e&&"none"!==r.style.display&&""!==r.style.display||(r.style.display=e?o[s]||"":"none"));return t}function S(t,e,n){var r=We.exec(e);return r?Math.max(0,r[1]-(n||0))+(r[2]||"px"):e}function _(t,e,n,r,i){for(var o=n===(r?"border":"content")?4:"width"===e?1:0,s=0;4>o;o+=2)"margin"===n&&(s+=oe.css(t,n+Ke[o],!0,i)),r?("content"===n&&(s-=oe.css(t,"padding"+Ke[o],!0,i)),"margin"!==n&&(s-=oe.css(t,"border"+Ke[o]+"Width",!0,i))):(s+=oe.css(t,"padding"+Ke[o],!0,i),"padding"!==n&&(s+=oe.css(t,"border"+Ke[o]+"Width",!0,i)));return s}function E(t,e,n){var r=!0,i="width"===e?t.offsetWidth:t.offsetHeight,o=x(t),s=oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,o);if(0>=i||null==i){if(i=Pe(t,e,o),(0>i||null==i)&&(i=t.style[e]),$e.test(i))return i;r=s&&(oe.support.boxSizingReliable||i===t.style[e]),i=parseFloat(i)||0}return i+_(t,e,n||(s?"border":"content"),r,o)+"px"}function N(t){var e=W,n=Xe[t];return n||(n=k(t,e),"none"!==n&&n||(Ue=(Ue||oe("<iframe frameborder='0' width='0' height='0'/>").css("cssText","display:block !important")).appendTo(e.documentElement),e=(Ue[0].contentWindow||Ue[0].contentDocument).document,e.write("<!doctype html><html><body>"),e.close(),n=k(t,e),Ue.detach()),Xe[t]=n),n}function k(t,e){var n=oe(e.createElement(t)).appendTo(e.body),r=oe.css(n[0],"display");return n.remove(),r}function j(t,e,n,r){var i;if(oe.isArray(e))oe.each(e,function(e,i){n||tn.test(t)?r(t,i):j(t+"["+("object"==typeof i?e:"")+"]",i,n,r)});else if(n||"object"!==oe.type(e))r(t,e);else for(i in e)j(t+"["+i+"]",e[i],n,r)}function A(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,o=e.toLowerCase().match(ae)||[];if(oe.isFunction(n))for(;r=o[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function O(t,e,n,r){function i(a){var u;return o[a]=!0,oe.each(t[a]||[],function(t,a){var c=a(e,n,r);return"string"!=typeof c||s||o[c]?s?!(u=c):void 0:(e.dataTypes.unshift(c),i(c),!1)}),u}var o={},s=t===yn;return i(e.dataTypes[0])||!o["*"]&&i("*")}function C(t,n){var r,i,o=oe.ajaxSettings.flatOptions||{};for(r in n)n[r]!==e&&((o[r]?t:i||(i={}))[r]=n[r]);return i&&oe.extend(!0,t,i),t}function T(t,n,r){for(var i,o,s,a,u=t.contents,c=t.dataTypes;"*"===c[0];)c.shift(),i===e&&(i=t.mimeType||n.getResponseHeader("Content-Type"));if(i)for(o in u)if(u[o]&&u[o].test(i)){c.unshift(o);break}if(c[0]in r)s=c[0];else{for(o in r){if(!c[0]||t.converters[o+" "+c[0]]){s=o;break}a||(a=o)}s=s||a}return s?(s!==c[0]&&c.unshift(s),r[s]):void 0}function I(t,e,n,r){var i,o,s,a,u,c={},l=t.dataTypes.slice();if(l[1])for(s in t.converters)c[s.toLowerCase()]=t.converters[s];for(o=l.shift();o;)if(t.responseFields[o]&&(n[t.responseFields[o]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=o,o=l.shift())if("*"===o)o=u;else if("*"!==u&&u!==o){if(s=c[u+" "+o]||c["* "+o],!s)for(i in c)if(a=i.split(" "),a[1]===o&&(s=c[u+" "+a[0]]||c["* "+a[0]])){s===!0?s=c[i]:c[i]!==!0&&(o=a[0],l.unshift(a[1]));break}if(s!==!0)if(s&&t["throws"])e=s(e);else try{e=s(e)}catch(f){return{state:"parsererror",error:s?f:"No conversion from "+u+" to "+o}}}return{state:"success",data:e}}function L(){return setTimeout(function(){jn=e}),jn=oe.now()}function M(t,e){oe.each(e,function(e,n){for(var r=(Ln[e]||[]).concat(Ln["*"]),i=0,o=r.length;o>i;i++)if(r[i].call(t,e,n))return})}function q(t,e,n){var r,i,o=0,s=In.length,a=oe.Deferred().always(function(){delete u.elem}),u=function(){if(i)return!1;for(var e=jn||L(),n=Math.max(0,c.startTime+c.duration-e),r=n/c.duration||0,o=1-r,s=0,u=c.tweens.length;u>s;s++)c.tweens[s].run(o);return a.notifyWith(t,[c,o,n]),1>o&&u?n:(a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:oe.extend({},e),opts:oe.extend(!0,{specialEasing:{}},n),originalProperties:e,originalOptions:n,startTime:jn||L(),duration:n.duration,tweens:[],createTween:function(e,n){var r=oe.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;r>n;n++)c.tweens[n].run(1);return e?a.resolveWith(t,[c,e]):a.rejectWith(t,[c,e]),this}}),l=c.props;for(R(l,c.opts.specialEasing);s>o;o++)if(r=In[o].call(c,t,l,c.opts))return r;return M(c,l),oe.isFunction(c.opts.start)&&c.opts.start.call(t,c),oe.fx.timer(oe.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always)}function R(t,e){var n,r,i,o,s;for(n in t)if(r=oe.camelCase(n),i=e[r],o=t[n],oe.isArray(o)&&(i=o[1],o=t[n]=o[0]),n!==r&&(t[r]=o,delete t[n]),s=oe.cssHooks[r],s&&"expand"in s){o=s.expand(o),delete t[r];for(n in o)n in t||(t[n]=o[n],e[n]=i)}else e[r]=i}function D(t,n,r){var i,o,s,a,u,c,l,f,h,p=this,d=t.style,g={},m=[],v=t.nodeType&&b(t);r.queue||(f=oe._queueHooks(t,"fx"),null==f.unqueued&&(f.unqueued=0,h=f.empty.fire,f.empty.fire=function(){f.unqueued||h()}),f.unqueued++,p.always(function(){p.always(function(){f.unqueued--,oe.queue(t,"fx").length||f.empty.fire()})})),1===t.nodeType&&("height"in n||"width"in n)&&(r.overflow=[d.overflow,d.overflowX,d.overflowY],"inline"===oe.css(t,"display")&&"none"===oe.css(t,"float")&&(d.display="inline-block")),r.overflow&&(d.overflow="hidden",p.always(function(){d.overflow=r.overflow[0],d.overflowX=r.overflow[1],d.overflowY=r.overflow[2]})),u=me.get(t,"fxshow");for(i in n)if(s=n[i],On.exec(s)){if(delete n[i],c=c||"toggle"===s,s===(v?"hide":"show")){if("show"!==s||u===e||u[i]===e)continue;v=!0}m.push(i)}if(a=m.length){u=me.get(t,"fxshow")||me.access(t,"fxshow",{}),"hidden"in u&&(v=u.hidden),c&&(u.hidden=!v),v?oe(t).show():p.done(function(){oe(t).hide()}),p.done(function(){var e;me.remove(t,"fxshow");for(e in g)oe.style(t,e,g[e])});for(i=0;a>i;i++)o=m[i],l=p.createTween(o,v?u[o]:0),g[o]=u[o]||oe.style(t,o),o in u||(u[o]=l.start,v&&(l.end=l.start,l.start="width"===o||"height"===o?1:0))}}function F(t,e,n,r,i){return new F.prototype.init(t,e,n,r,i)}function B(t,e){var n,r={height:t},i=0;for(e=e?1:0;4>i;i+=2-e)n=Ke[i],r["margin"+n]=r["padding"+n]=t;return e&&(r.opacity=r.width=t),r}function z(t){return oe.isWindow(t)?t:9===t.nodeType&&t.defaultView}var P,U,J=typeof e,H=t.location,W=t.document,$=W.documentElement,G=t.jQuery,X=t.$,V={},Y=[],K="2.0.0",Q=Y.concat,Z=Y.push,te=Y.slice,ee=Y.indexOf,ne=V.toString,re=V.hasOwnProperty,ie=K.trim,oe=function(t,e){return new oe.fn.init(t,e,P)},se=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ae=/\S+/g,ue=/^(?:(<[\w\W]+>)[^>]*|#([\w-]*))$/,ce=/^<(\w+)\s*\/?>(?:<\/\1>|)$/,le=/^-ms-/,fe=/-([\da-z])/gi,he=function(t,e){return e.toUpperCase()},pe=function(){W.removeEventListener("DOMContentLoaded",pe,!1),t.removeEventListener("load",pe,!1),oe.ready()};oe.fn=oe.prototype={jquery:K,constructor:oe,init:function(t,n,r){var i,o;if(!t)return this;if("string"==typeof t){if(i="<"===t.charAt(0)&&">"===t.charAt(t.length-1)&&t.length>=3?[null,t,null]:ue.exec(t),!i||!i[1]&&n)return!n||n.jquery?(n||r).find(t):this.constructor(n).find(t);if(i[1]){if(n=n instanceof oe?n[0]:n,oe.merge(this,oe.parseHTML(i[1],n&&n.nodeType?n.ownerDocument||n:W,!0)),ce.test(i[1])&&oe.isPlainObject(n))for(i in n)oe.isFunction(this[i])?this[i](n[i]):this.attr(i,n[i]);return this}return o=W.getElementById(i[2]),o&&o.parentNode&&(this.length=1,this[0]=o),this.context=W,this.selector=t,this}return t.nodeType?(this.context=this[0]=t,this.length=1,this):oe.isFunction(t)?r.ready(t):(t.selector!==e&&(this.selector=t.selector,this.context=t.context),oe.makeArray(t,this))},selector:"",length:0,toArray:function(){return te.call(this)},get:function(t){return null==t?this.toArray():0>t?this[this.length+t]:this[t]},pushStack:function(t){var e=oe.merge(this.constructor(),t);return e.prevObject=this,e.context=this.context,e},each:function(t,e){return oe.each(this,t,e)},ready:function(t){return oe.ready.promise().done(t),this},slice:function(){return this.pushStack(te.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},eq:function(t){var e=this.length,n=+t+(0>t?e:0);return this.pushStack(n>=0&&e>n?[this[n]]:[])},map:function(t){return this.pushStack(oe.map(this,function(e,n){return t.call(e,n,e)}))},end:function(){return this.prevObject||this.constructor(null)},push:Z,sort:[].sort,splice:[].splice},oe.fn.init.prototype=oe.fn,oe.extend=oe.fn.extend=function(){var t,n,r,i,o,s,a=arguments[0]||{},u=1,c=arguments.length,l=!1;for("boolean"==typeof a&&(l=a,a=arguments[1]||{},u=2),"object"==typeof a||oe.isFunction(a)||(a={}),c===u&&(a=this,--u);c>u;u++)if(null!=(t=arguments[u]))for(n in t)r=a[n],i=t[n],a!==i&&(l&&i&&(oe.isPlainObject(i)||(o=oe.isArray(i)))?(o?(o=!1,s=r&&oe.isArray(r)?r:[]):s=r&&oe.isPlainObject(r)?r:{},a[n]=oe.extend(l,s,i)):i!==e&&(a[n]=i));return a},oe.extend({expando:"jQuery"+(K+Math.random()).replace(/\D/g,""),noConflict:function(e){return t.$===oe&&(t.$=X),e&&t.jQuery===oe&&(t.jQuery=G),oe},isReady:!1,readyWait:1,holdReady:function(t){t?oe.readyWait++:oe.ready(!0)},ready:function(t){(t===!0?--oe.readyWait:oe.isReady)||(oe.isReady=!0,t!==!0&&--oe.readyWait>0||(U.resolveWith(W,[oe]),oe.fn.trigger&&oe(W).trigger("ready").off("ready")))},isFunction:function(t){return"function"===oe.type(t)},isArray:Array.isArray,isWindow:function(t){return null!=t&&t===t.window},isNumeric:function(t){return!isNaN(parseFloat(t))&&isFinite(t)},type:function(t){return null==t?String(t):"object"==typeof t||"function"==typeof t?V[ne.call(t)]||"object":typeof t},isPlainObject:function(t){if("object"!==oe.type(t)||t.nodeType||oe.isWindow(t))return!1;try{if(t.constructor&&!re.call(t.constructor.prototype,"isPrototypeOf"))return!1}catch(e){return!1}return!0},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},error:function(t){throw new Error(t)},parseHTML:function(t,e,n){if(!t||"string"!=typeof t)return null;"boolean"==typeof e&&(n=e,e=!1),e=e||W;var r=ce.exec(t),i=!n&&[];return r?[e.createElement(r[1])]:(r=oe.buildFragment([t],e,i),i&&oe(i).remove(),oe.merge([],r.childNodes))},parseJSON:JSON.parse,parseXML:function(t){var n,r;if(!t||"string"!=typeof t)return null;try{r=new DOMParser,n=r.parseFromString(t,"text/xml")}catch(i){n=e}return(!n||n.getElementsByTagName("parsererror").length)&&oe.error("Invalid XML: "+t),n},noop:function(){},globalEval:function(t){var e,n=eval;t=oe.trim(t),t&&(1===t.indexOf("use strict")?(e=W.createElement("script"),e.text=t,W.head.appendChild(e).parentNode.removeChild(e)):n(t))},camelCase:function(t){return t.replace(le,"ms-").replace(fe,he)},nodeName:function(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()},each:function(t,e,r){var i,o=0,s=t.length,a=n(t);if(r){if(a)for(;s>o&&(i=e.apply(t[o],r),i!==!1);o++);else for(o in t)if(i=e.apply(t[o],r),i===!1)break}else if(a)for(;s>o&&(i=e.call(t[o],o,t[o]),i!==!1);o++);else for(o in t)if(i=e.call(t[o],o,t[o]),i===!1)break;return t},trim:function(t){return null==t?"":ie.call(t)},makeArray:function(t,e){var r=e||[];return null!=t&&(n(Object(t))?oe.merge(r,"string"==typeof t?[t]:t):Z.call(r,t)),r},inArray:function(t,e,n){return null==e?-1:ee.call(e,t,n)},merge:function(t,n){var r=n.length,i=t.length,o=0;if("number"==typeof r)for(;r>o;o++)t[i++]=n[o];else for(;n[o]!==e;)t[i++]=n[o++];return t.length=i,t},grep:function(t,e,n){var r,i=[],o=0,s=t.length;for(n=!!n;s>o;o++)r=!!e(t[o],o),n!==r&&i.push(t[o]);return i},map:function(t,e,r){var i,o=0,s=t.length,a=n(t),u=[];if(a)for(;s>o;o++)i=e(t[o],o,r),null!=i&&(u[u.length]=i);else for(o in t)i=e(t[o],o,r),null!=i&&(u[u.length]=i);return Q.apply([],u)},guid:1,proxy:function(t,n){var r,i,o;return"string"==typeof n&&(r=t[n],n=t,t=r),oe.isFunction(t)?(i=te.call(arguments,2),o=function(){return t.apply(n||this,i.concat(te.call(arguments)))},o.guid=t.guid=t.guid||oe.guid++,o):e},access:function(t,n,r,i,o,s,a){var u=0,c=t.length,l=null==r;if("object"===oe.type(r)){o=!0;for(u in r)oe.access(t,n,u,r[u],!0,s,a)}else if(i!==e&&(o=!0,oe.isFunction(i)||(a=!0),l&&(a?(n.call(t,i),n=null):(l=n,n=function(t,e,n){return l.call(oe(t),n)})),n))for(;c>u;u++)n(t[u],r,a?i:i.call(t[u],u,n(t[u],r)));return o?t:l?n.call(t):c?n(t[0],r):s},now:Date.now,swap:function(t,e,n,r){var i,o,s={};for(o in e)s[o]=t.style[o],t.style[o]=e[o];i=n.apply(t,r||[]);for(o in e)t.style[o]=s[o];return i}}),oe.ready.promise=function(e){return U||(U=oe.Deferred(),"complete"===W.readyState?setTimeout(oe.ready):(W.addEventListener("DOMContentLoaded",pe,!1),t.addEventListener("load",pe,!1))),U.promise(e)},oe.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){V["[object "+e+"]"]=e.toLowerCase()}),P=oe(W),function(t,e){function n(t){return be.test(t+"")}function r(){var t,e=[];return t=function(n,r){return e.push(n+=" ")>k.cacheLength&&delete t[e.shift()],t[n]=r}}function i(t){return t[z]=!0,t}function o(t){var e=L.createElement("div");try{return!!t(e)}catch(n){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function s(t,e,n,r){var i,o,s,a,u,c,l,f,h,g;if((e?e.ownerDocument||e:P)!==L&&I(e),e=e||L,n=n||[],!t||"string"!=typeof t)return n;if(1!==(a=e.nodeType)&&9!==a)return[];if(q&&!r){if(i=xe.exec(t))if(s=i[1]){if(9===a){if(o=e.getElementById(s),!o||!o.parentNode)return n;if(o.id===s)return n.push(o),n}else if(e.ownerDocument&&(o=e.ownerDocument.getElementById(s))&&B(e,o)&&o.id===s)return n.push(o),n}else{if(i[2])return ee.apply(n,e.getElementsByTagName(t)),n;if((s=i[3])&&U.getElementsByClassName&&e.getElementsByClassName)return ee.apply(n,e.getElementsByClassName(s)),n}if(U.qsa&&(!R||!R.test(t))){if(f=l=z,h=e,g=9===a&&t,1===a&&"object"!==e.nodeName.toLowerCase()){for(c=p(t),(l=e.getAttribute("id"))?f=l.replace(_e,"\\$&"):e.setAttribute("id",f),f="[id='"+f+"'] ",u=c.length;u--;)c[u]=f+d(c[u]);h=de.test(t)&&e.parentNode||e,g=c.join(",")}if(g)try{return ee.apply(n,h.querySelectorAll(g)),n}catch(m){}finally{l||e.removeAttribute("id")}}}return S(t.replace(fe,"$1"),e,n,r)}function a(t,e){var n=e&&t,r=n&&(~e.sourceIndex||K)-(~t.sourceIndex||K);if(r)return r;if(n)for(;n=n.nextSibling;)if(n===e)return-1;return t?1:-1}function u(t,n,r){var i;return r?e:(i=t.getAttributeNode(n))&&i.specified?i.value:t[n]===!0?n.toLowerCase():null}function c(t,n,r){var i;return r?e:i=t.getAttribute(n,"type"===n.toLowerCase()?1:2)}function l(t){return function(e){var n=e.nodeName.toLowerCase();return"input"===n&&e.type===t}}function f(t){return function(e){var n=e.nodeName.toLowerCase();return("input"===n||"button"===n)&&e.type===t}}function h(t){return i(function(e){return e=+e,i(function(n,r){for(var i,o=t([],n.length,e),s=o.length;s--;)n[i=o[s]]&&(n[i]=!(r[i]=n[i]))})})}function p(t,e){var n,r,i,o,a,u,c,l=$[t+" "];if(l)return e?0:l.slice(0);for(a=t,u=[],c=k.preFilter;a;){(!n||(r=he.exec(a)))&&(r&&(a=a.slice(r[0].length)||a),u.push(i=[])),n=!1,(r=pe.exec(a))&&(n=r.shift(),i.push({value:n,type:r[0].replace(fe," ")}),a=a.slice(n.length));for(o in k.filter)!(r=ye[o].exec(a))||c[o]&&!(r=c[o](r))||(n=r.shift(),i.push({value:n,type:o,matches:r}),a=a.slice(n.length));if(!n)break}return e?a.length:a?s.error(t):$(t,u).slice(0)}function d(t){for(var e=0,n=t.length,r="";n>e;e++)r+=t[e].value;return r}function g(t,e,n){var r=e.dir,i=n&&"parentNode"===r,o=H++;return e.first?function(e,n,o){for(;e=e[r];)if(1===e.nodeType||i)return t(e,n,o)}:function(e,n,s){var a,u,c,l=J+" "+o;if(s){for(;e=e[r];)if((1===e.nodeType||i)&&t(e,n,s))return!0}else for(;e=e[r];)if(1===e.nodeType||i)if(c=e[z]||(e[z]={}),(u=c[r])&&u[0]===l){if((a=u[1])===!0||a===N)return a===!0}else if(u=c[r]=[l],u[1]=t(e,n,s)||N,u[1]===!0)return!0}}function m(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function v(t,e,n,r,i){for(var o,s=[],a=0,u=t.length,c=null!=e;u>a;a++)(o=t[a])&&(!n||n(o,r,i))&&(s.push(o),c&&e.push(a));return s}function y(t,e,n,r,o,s){return r&&!r[z]&&(r=y(r)),o&&!o[z]&&(o=y(o,s)),i(function(i,s,a,u){var c,l,f,h=[],p=[],d=s.length,g=i||w(e||"*",a.nodeType?[a]:a,[]),m=!t||!i&&e?g:v(g,h,t,a,u),y=n?o||(i?t:d||r)?[]:s:m;if(n&&n(m,y,a,u),r)for(c=v(y,p),r(c,[],a,u),l=c.length;l--;)(f=c[l])&&(y[p[l]]=!(m[p[l]]=f));if(i){if(o||t){if(o){for(c=[],l=y.length;l--;)(f=y[l])&&c.push(m[l]=f);o(null,y=[],c,u)}for(l=y.length;l--;)(f=y[l])&&(c=o?re.call(i,f):h[l])>-1&&(i[c]=!(s[c]=f))}}else y=v(y===s?y.splice(d,y.length):y),o?o(null,s,y,u):ee.apply(s,y)})}function b(t){for(var e,n,r,i=t.length,o=k.relative[t[0].type],s=o||k.relative[" "],a=o?1:0,u=g(function(t){return t===e},s,!0),c=g(function(t){return re.call(e,t)>-1},s,!0),l=[function(t,n,r){return!o&&(r||n!==C)||((e=n).nodeType?u(t,n,r):c(t,n,r))}];i>a;a++)if(n=k.relative[t[a].type])l=[g(m(l),n)];else{if(n=k.filter[t[a].type].apply(null,t[a].matches),n[z]){for(r=++a;i>r&&!k.relative[t[r].type];r++);return y(a>1&&m(l),a>1&&d(t.slice(0,a-1)).replace(fe,"$1"),n,r>a&&b(t.slice(a,r)),i>r&&b(t=t.slice(r)),i>r&&d(t))}l.push(n)}return m(l)}function x(t,e){var n=0,r=e.length>0,o=t.length>0,a=function(i,a,u,c,l){var f,h,p,d=[],g=0,m="0",y=i&&[],b=null!=l,x=C,w=i||o&&k.find.TAG("*",l&&a.parentNode||a),S=J+=null==x?1:Math.random()||.1;for(b&&(C=a!==L&&a,N=n);null!=(f=w[m]);m++){if(o&&f){for(h=0;p=t[h++];)if(p(f,a,u)){c.push(f);break}b&&(J=S,N=++n)}r&&((f=!p&&f)&&g--,i&&y.push(f))}if(g+=m,r&&m!==g){for(h=0;p=e[h++];)p(y,d,a,u);if(i){if(g>0)for(;m--;)y[m]||d[m]||(d[m]=Z.call(c));d=v(d)}ee.apply(c,d),b&&!i&&d.length>0&&g+e.length>1&&s.uniqueSort(c)}return b&&(J=S,C=x),y};return r?i(a):a}function w(t,e,n){for(var r=0,i=e.length;i>r;r++)s(t,e[r],n);return n}function S(t,e,n,r){var i,o,s,a,u,c=p(t);if(!r&&1===c.length){if(o=c[0]=c[0].slice(0),o.length>2&&"ID"===(s=o[0]).type&&9===e.nodeType&&q&&k.relative[o[1].type]){if(e=(k.find.ID(s.matches[0].replace(Ee,Ne),e)||[])[0],!e)return n;t=t.slice(o.shift().value.length)}for(i=ye.needsContext.test(t)?0:o.length;i--&&(s=o[i],!k.relative[a=s.type]);)if((u=k.find[a])&&(r=u(s.matches[0].replace(Ee,Ne),de.test(o[0].type)&&e.parentNode||e))){if(o.splice(i,1),t=r.length&&d(o),!t)return ee.apply(n,r),n;break}}return O(t,c)(r,e,!q,n,de.test(t)),n}function _(){}var E,N,k,j,A,O,C,T,I,L,M,q,R,D,F,B,z="sizzle"+-new Date,P=t.document,U={},J=0,H=0,W=r(),$=r(),G=r(),X=!1,V=function(){return 0},Y=typeof e,K=1<<31,Q=[],Z=Q.pop,te=Q.push,ee=Q.push,ne=Q.slice,re=Q.indexOf||function(t){for(var e=0,n=this.length;n>e;e++)if(this[e]===t)return e;return-1},ie="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",se="[\\x20\\t\\r\\n\\f]",ae="(?:\\\\.|[\\w-]|[^\\x00-\\xa0])+",ue=ae.replace("w","w#"),ce="\\["+se+"*("+ae+")"+se+"*(?:([*^$|!~]?=)"+se+"*(?:(['\"])((?:\\\\.|[^\\\\])*?)\\3|("+ue+")|)|)"+se+"*\\]",le=":("+ae+")(?:\\(((['\"])((?:\\\\.|[^\\\\])*?)\\3|((?:\\\\.|[^\\\\()[\\]]|"+ce.replace(3,8)+")*)|.*)\\)|)",fe=new RegExp("^"+se+"+|((?:^|[^\\\\])(?:\\\\.)*)"+se+"+$","g"),he=new RegExp("^"+se+"*,"+se+"*"),pe=new RegExp("^"+se+"*([>+~]|"+se+")"+se+"*"),de=new RegExp(se+"*[+~]"),ge=new RegExp("="+se+"*([^\\]'\"]*)"+se+"*\\]","g"),me=new RegExp(le),ve=new RegExp("^"+ue+"$"),ye={ID:new RegExp("^#("+ae+")"),CLASS:new RegExp("^\\.("+ae+")"),TAG:new RegExp("^("+ae.replace("w","w*")+")"),ATTR:new RegExp("^"+ce),PSEUDO:new RegExp("^"+le),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+se+"*(even|odd|(([+-]|)(\\d*)n|)"+se+"*(?:([+-]|)"+se+"*(\\d+)|))"+se+"*\\)|)","i"),"boolean":new RegExp("^(?:"+ie+")$","i"),needsContext:new RegExp("^"+se+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+se+"*((?:-\\d)?\\d*)"+se+"*\\)|)(?=[^-]|$)","i")},be=/^[^{]+\{\s*\[native \w/,xe=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,we=/^(?:input|select|textarea|button)$/i,Se=/^h\d$/i,_e=/'|\\/g,Ee=/\\([\da-fA-F]{1,6}[\x20\t\r\n\f]?|.)/g,Ne=function(t,e){var n="0x"+e-65536;return n!==n?e:0>n?String.fromCharCode(n+65536):String.fromCharCode(55296|n>>10,56320|1023&n)};try{ee.apply(Q=ne.call(P.childNodes),P.childNodes),Q[P.childNodes.length].nodeType}catch(ke){ee={apply:Q.length?function(t,e){te.apply(t,ne.call(e))}:function(t,e){for(var n=t.length,r=0;t[n++]=e[r++];);t.length=n-1}}}A=s.isXML=function(t){var e=t&&(t.ownerDocument||t).documentElement;return e?"HTML"!==e.nodeName:!1},I=s.setDocument=function(t){var r=t?t.ownerDocument||t:P;return r!==L&&9===r.nodeType&&r.documentElement?(L=r,M=r.documentElement,q=!A(r),U.getElementsByTagName=o(function(t){return t.appendChild(r.createComment("")),!t.getElementsByTagName("*").length}),U.attributes=o(function(t){return t.className="i",!t.getAttribute("className")}),U.getElementsByClassName=o(function(t){return t.innerHTML="<div class='a'></div><div class='a i'></div>",t.firstChild.className="i",2===t.getElementsByClassName("i").length}),U.sortDetached=o(function(t){return 1&t.compareDocumentPosition(L.createElement("div"))}),U.getById=o(function(t){return M.appendChild(t).id=z,!r.getElementsByName||!r.getElementsByName(z).length}),U.getById?(k.find.ID=function(t,e){if(typeof e.getElementById!==Y&&q){var n=e.getElementById(t);return n&&n.parentNode?[n]:[]}},k.filter.ID=function(t){var e=t.replace(Ee,Ne);return function(t){return t.getAttribute("id")===e}}):(k.find.ID=function(t,n){if(typeof n.getElementById!==Y&&q){var r=n.getElementById(t);return r?r.id===t||typeof r.getAttributeNode!==Y&&r.getAttributeNode("id").value===t?[r]:e:[]}},k.filter.ID=function(t){var e=t.replace(Ee,Ne);return function(t){var n=typeof t.getAttributeNode!==Y&&t.getAttributeNode("id");return n&&n.value===e}}),k.find.TAG=U.getElementsByTagName?function(t,e){return typeof e.getElementsByTagName!==Y?e.getElementsByTagName(t):void 0}:function(t,e){var n,r=[],i=0,o=e.getElementsByTagName(t);if("*"===t){for(;n=o[i++];)1===n.nodeType&&r.push(n);return r}return o},k.find.CLASS=U.getElementsByClassName&&function(t,e){return typeof e.getElementsByClassName!==Y&&q?e.getElementsByClassName(t):void 0},D=[],R=[],(U.qsa=n(r.querySelectorAll))&&(o(function(t){t.innerHTML="<select><option selected=''></option></select>",t.querySelectorAll("[selected]").length||R.push("\\["+se+"*(?:value|"+ie+")"),t.querySelectorAll(":checked").length||R.push(":checked")}),o(function(t){var e=L.createElement("input");e.setAttribute("type","hidden"),t.appendChild(e).setAttribute("t",""),t.querySelectorAll("[t^='']").length&&R.push("[*^$]="+se+"*(?:''|\"\")"),t.querySelectorAll(":enabled").length||R.push(":enabled",":disabled"),t.querySelectorAll("*,:x"),R.push(",.*:")})),(U.matchesSelector=n(F=M.webkitMatchesSelector||M.mozMatchesSelector||M.oMatchesSelector||M.msMatchesSelector))&&o(function(t){U.disconnectedMatch=F.call(t,"div"),F.call(t,"[s!='']:x"),D.push("!=",le)}),R=R.length&&new RegExp(R.join("|")),D=D.length&&new RegExp(D.join("|")),B=n(M.contains)||M.compareDocumentPosition?function(t,e){var n=9===t.nodeType?t.documentElement:t,r=e&&e.parentNode;return t===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):t.compareDocumentPosition&&16&t.compareDocumentPosition(r)))}:function(t,e){if(e)for(;e=e.parentNode;)if(e===t)return!0;return!1},V=M.compareDocumentPosition?function(t,e){if(t===e)return X=!0,0;var n=e.compareDocumentPosition&&t.compareDocumentPosition&&t.compareDocumentPosition(e);return n?1&n||!U.sortDetached&&e.compareDocumentPosition(t)===n?t===r||B(P,t)?-1:e===r||B(P,e)?1:T?re.call(T,t)-re.call(T,e):0:4&n?-1:1:t.compareDocumentPosition?-1:1}:function(t,e){var n,i=0,o=t.parentNode,s=e.parentNode,u=[t],c=[e];if(t===e)return X=!0,0;if(!o||!s)return t===r?-1:e===r?1:o?-1:s?1:T?re.call(T,t)-re.call(T,e):0;if(o===s)return a(t,e);for(n=t;n=n.parentNode;)u.unshift(n);for(n=e;n=n.parentNode;)c.unshift(n);for(;u[i]===c[i];)i++;return i?a(u[i],c[i]):u[i]===P?-1:c[i]===P?1:0},L):L},s.matches=function(t,e){return s(t,null,null,e)},s.matchesSelector=function(t,e){if((t.ownerDocument||t)!==L&&I(t),e=e.replace(ge,"='$1']"),!(!U.matchesSelector||!q||D&&D.test(e)||R&&R.test(e)))try{var n=F.call(t,e);if(n||U.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(r){}return s(e,L,null,[t]).length>0},s.contains=function(t,e){return(t.ownerDocument||t)!==L&&I(t),B(t,e)},s.attr=function(t,n){(t.ownerDocument||t)!==L&&I(t);var r=k.attrHandle[n.toLowerCase()],i=r&&r(t,n,!q);return i===e?U.attributes||!q?t.getAttribute(n):(i=t.getAttributeNode(n))&&i.specified?i.value:null:i},s.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},s.uniqueSort=function(t){var e,n=[],r=0,i=0;if(X=!U.detectDuplicates,T=!U.sortStable&&t.slice(0),t.sort(V),X){for(;e=t[i++];)e===t[i]&&(r=n.push(i));for(;r--;)t.splice(n[r],1)}return t},j=s.getText=function(t){var e,n="",r=0,i=t.nodeType;if(i){if(1===i||9===i||11===i){if("string"==typeof t.textContent)return t.textContent;for(t=t.firstChild;t;t=t.nextSibling)n+=j(t)}else if(3===i||4===i)return t.nodeValue}else for(;e=t[r];r++)n+=j(e);return n},k=s.selectors={cacheLength:50,createPseudo:i,match:ye,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace(Ee,Ne),t[3]=(t[4]||t[5]||"").replace(Ee,Ne),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||s.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&s.error(t[0]),t},PSEUDO:function(t){var e,n=!t[5]&&t[2];return ye.CHILD.test(t[0])?null:(t[4]?t[2]=t[4]:n&&me.test(n)&&(e=p(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace(Ee,Ne).toLowerCase();return"*"===t?function(){return!0}:function(t){return t.nodeName&&t.nodeName.toLowerCase()===e}},CLASS:function(t){var e=W[t+" "];return e||(e=new RegExp("(^|"+se+")"+t+"("+se+"|$)"))&&W(t,function(t){return e.test("string"==typeof t.className&&t.className||typeof t.getAttribute!==Y&&t.getAttribute("class")||"")})},ATTR:function(t,e,n){return function(r){var i=s.attr(r,t);return null==i?"!="===e:e?(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i+" ").indexOf(n)>-1:"|="===e?i===n||i.slice(0,n.length+1)===n+"-":!1):!0}},CHILD:function(t,e,n,r,i){var o="nth"!==t.slice(0,3),s="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,l,f,h,p,d,g=o!==s?"nextSibling":"previousSibling",m=e.parentNode,v=a&&e.nodeName.toLowerCase(),y=!u&&!a;if(m){if(o){for(;g;){for(f=e;f=f[g];)if(a?f.nodeName.toLowerCase()===v:1===f.nodeType)return!1;d=g="only"===t&&!d&&"nextSibling"}return!0}if(d=[s?m.firstChild:m.lastChild],s&&y){for(l=m[z]||(m[z]={}),c=l[t]||[],p=c[0]===J&&c[1],h=c[0]===J&&c[2],f=p&&m.childNodes[p];f=++p&&f&&f[g]||(h=p=0)||d.pop();)if(1===f.nodeType&&++h&&f===e){l[t]=[J,p,h];break}}else if(y&&(c=(e[z]||(e[z]={}))[t])&&c[0]===J)h=c[1];else for(;(f=++p&&f&&f[g]||(h=p=0)||d.pop())&&((a?f.nodeName.toLowerCase()!==v:1!==f.nodeType)||!++h||(y&&((f[z]||(f[z]={}))[t]=[J,h]),f!==e)););return h-=i,h===r||0===h%r&&h/r>=0}}},PSEUDO:function(t,e){var n,r=k.pseudos[t]||k.setFilters[t.toLowerCase()]||s.error("unsupported pseudo: "+t);return r[z]?r(e):r.length>1?(n=[t,t,"",e],k.setFilters.hasOwnProperty(t.toLowerCase())?i(function(t,n){for(var i,o=r(t,e),s=o.length;s--;)i=re.call(t,o[s]),t[i]=!(n[i]=o[s])}):function(t){return r(t,0,n)}):r}},pseudos:{not:i(function(t){var e=[],n=[],r=O(t.replace(fe,"$1"));return r[z]?i(function(t,e,n,i){for(var o,s=r(t,null,i,[]),a=t.length;a--;)(o=s[a])&&(t[a]=!(e[a]=o))}):function(t,i,o){return e[0]=t,r(e,null,o,n),!n.pop()}}),has:i(function(t){return function(e){return s(t,e).length>0}}),contains:i(function(t){return function(e){return(e.textContent||e.innerText||j(e)).indexOf(t)>-1}}),lang:i(function(t){return ve.test(t||"")||s.error("unsupported lang: "+t),t=t.replace(Ee,Ne).toLowerCase(),function(e){var n;do if(n=q?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return n=n.toLowerCase(),n===t||0===n.indexOf(t+"-");while((e=e.parentNode)&&1===e.nodeType);return!1}}),target:function(e){var n=t.location&&t.location.hash;return n&&n.slice(1)===e.id},root:function(t){return t===M},focus:function(t){return t===L.activeElement&&(!L.hasFocus||L.hasFocus())&&!!(t.type||t.href||~t.tabIndex)},enabled:function(t){return t.disabled===!1},disabled:function(t){return t.disabled===!0},checked:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&!!t.checked||"option"===e&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,t.selected===!0},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeName>"@"||3===t.nodeType||4===t.nodeType)return!1;return!0},parent:function(t){return!k.pseudos.empty(t)},header:function(t){return Se.test(t.nodeName)},input:function(t){return we.test(t.nodeName)},button:function(t){var e=t.nodeName.toLowerCase();return"input"===e&&"button"===t.type||"button"===e},text:function(t){var e;return"input"===t.nodeName.toLowerCase()&&"text"===t.type&&(null==(e=t.getAttribute("type"))||e.toLowerCase()===t.type)},first:h(function(){return[0]}),last:h(function(t,e){return[e-1]}),eq:h(function(t,e,n){return[0>n?n+e:n]}),even:h(function(t,e){for(var n=0;e>n;n+=2)t.push(n);return t}),odd:h(function(t,e){for(var n=1;e>n;n+=2)t.push(n);return t
|
||
}),lt:h(function(t,e,n){for(var r=0>n?n+e:n;--r>=0;)t.push(r);return t}),gt:h(function(t,e,n){for(var r=0>n?n+e:n;++r<e;)t.push(r);return t})}};for(E in{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})k.pseudos[E]=l(E);for(E in{submit:!0,reset:!0})k.pseudos[E]=f(E);O=s.compile=function(t,e){var n,r=[],i=[],o=G[t+" "];if(!o){for(e||(e=p(t)),n=e.length;n--;)o=b(e[n]),o[z]?r.push(o):i.push(o);o=G(t,x(i,r))}return o},k.pseudos.nth=k.pseudos.eq,_.prototype=k.filters=k.pseudos,k.setFilters=new _,U.sortStable=z.split("").sort(V).join("")===z,I(),[0,0].sort(V),U.detectDuplicates=X,o(function(t){if(t.innerHTML="<a href='#'></a>","#"!==t.firstChild.getAttribute("href"))for(var e="type|href|height|width".split("|"),n=e.length;n--;)k.attrHandle[e[n]]=c}),o(function(t){if(null!=t.getAttribute("disabled"))for(var e=ie.split("|"),n=e.length;n--;)k.attrHandle[e[n]]=u}),oe.find=s,oe.expr=s.selectors,oe.expr[":"]=oe.expr.pseudos,oe.unique=s.uniqueSort,oe.text=s.getText,oe.isXMLDoc=s.isXML,oe.contains=s.contains}(t);var de={};oe.Callbacks=function(t){t="string"==typeof t?de[t]||r(t):oe.extend({},t);var n,i,o,s,a,u,c=[],l=!t.once&&[],f=function(e){for(n=t.memory&&e,i=!0,u=s||0,s=0,a=c.length,o=!0;c&&a>u;u++)if(c[u].apply(e[0],e[1])===!1&&t.stopOnFalse){n=!1;break}o=!1,c&&(l?l.length&&f(l.shift()):n?c=[]:h.disable())},h={add:function(){if(c){var e=c.length;!function r(e){oe.each(e,function(e,n){var i=oe.type(n);"function"===i?t.unique&&h.has(n)||c.push(n):n&&n.length&&"string"!==i&&r(n)})}(arguments),o?a=c.length:n&&(s=e,f(n))}return this},remove:function(){return c&&oe.each(arguments,function(t,e){for(var n;(n=oe.inArray(e,c,n))>-1;)c.splice(n,1),o&&(a>=n&&a--,u>=n&&u--)}),this},has:function(t){return t?oe.inArray(t,c)>-1:!(!c||!c.length)},empty:function(){return c=[],a=0,this},disable:function(){return c=l=n=e,this},disabled:function(){return!c},lock:function(){return l=e,n||h.disable(),this},locked:function(){return!l},fireWith:function(t,e){return e=e||[],e=[t,e.slice?e.slice():e],!c||i&&!l||(o?l.push(e):f(e)),this},fire:function(){return h.fireWith(this,arguments),this},fired:function(){return!!i}};return h},oe.extend({Deferred:function(t){var e=[["resolve","done",oe.Callbacks("once memory"),"resolved"],["reject","fail",oe.Callbacks("once memory"),"rejected"],["notify","progress",oe.Callbacks("memory")]],n="pending",r={state:function(){return n},always:function(){return i.done(arguments).fail(arguments),this},then:function(){var t=arguments;return oe.Deferred(function(n){oe.each(e,function(e,o){var s=o[0],a=oe.isFunction(t[e])&&t[e];i[o[1]](function(){var t=a&&a.apply(this,arguments);t&&oe.isFunction(t.promise)?t.promise().done(n.resolve).fail(n.reject).progress(n.notify):n[s+"With"](this===r?n.promise():this,a?[t]:arguments)})}),t=null}).promise()},promise:function(t){return null!=t?oe.extend(t,r):r}},i={};return r.pipe=r.then,oe.each(e,function(t,o){var s=o[2],a=o[3];r[o[1]]=s.add,a&&s.add(function(){n=a},e[1^t][2].disable,e[2][2].lock),i[o[0]]=function(){return i[o[0]+"With"](this===i?r:this,arguments),this},i[o[0]+"With"]=s.fireWith}),r.promise(i),t&&t.call(i,i),i},when:function(t){var e,n,r,i=0,o=te.call(arguments),s=o.length,a=1!==s||t&&oe.isFunction(t.promise)?s:0,u=1===a?t:oe.Deferred(),c=function(t,n,r){return function(i){n[t]=this,r[t]=arguments.length>1?te.call(arguments):i,r===e?u.notifyWith(n,r):--a||u.resolveWith(n,r)}};if(s>1)for(e=new Array(s),n=new Array(s),r=new Array(s);s>i;i++)o[i]&&oe.isFunction(o[i].promise)?o[i].promise().done(c(i,r,o)).fail(u.reject).progress(c(i,n,e)):--a;return a||u.resolveWith(r,o),u.promise()}}),oe.support=function(e){var n=W.createElement("input"),r=W.createDocumentFragment(),i=W.createElement("div"),o=W.createElement("select"),s=o.appendChild(W.createElement("option"));return n.type?(n.type="checkbox",e.checkOn=""!==n.value,e.optSelected=s.selected,e.reliableMarginRight=!0,e.boxSizingReliable=!0,e.pixelPosition=!1,n.checked=!0,e.noCloneChecked=n.cloneNode(!0).checked,o.disabled=!0,e.optDisabled=!s.disabled,n=W.createElement("input"),n.value="t",n.type="radio",e.radioValue="t"===n.value,n.setAttribute("checked","t"),n.setAttribute("name","t"),r.appendChild(n),e.checkClone=r.cloneNode(!0).cloneNode(!0).lastChild.checked,e.focusinBubbles="onfocusin"in t,i.style.backgroundClip="content-box",i.cloneNode(!0).style.backgroundClip="",e.clearCloneStyle="content-box"===i.style.backgroundClip,oe(function(){var n,r,o="padding:0;margin:0;border:0;display:block;-webkit-box-sizing:content-box;-moz-box-sizing:content-box;box-sizing:content-box",s=W.getElementsByTagName("body")[0];s&&(n=W.createElement("div"),n.style.cssText="border:0;width:0;height:0;position:absolute;top:0;left:-9999px;margin-top:1px",s.appendChild(n).appendChild(i),i.innerHTML="",i.style.cssText="-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;padding:1px;border:1px;display:block;width:4px;margin-top:1%;position:absolute;top:1%",oe.swap(s,null!=s.style.zoom?{zoom:1}:{},function(){e.boxSizing=4===i.offsetWidth}),t.getComputedStyle&&(e.pixelPosition="1%"!==(t.getComputedStyle(i,null)||{}).top,e.boxSizingReliable="4px"===(t.getComputedStyle(i,null)||{width:"4px"}).width,r=i.appendChild(W.createElement("div")),r.style.cssText=i.style.cssText=o,r.style.marginRight=r.style.width="0",i.style.width="1px",e.reliableMarginRight=!parseFloat((t.getComputedStyle(r,null)||{}).marginRight)),s.removeChild(n))}),e):e}({});var ge,me,ve=/(?:\{[\s\S]*\}|\[[\s\S]*\])$/,ye=/([A-Z])/g;i.uid=1,i.accepts=function(t){return t.nodeType?1===t.nodeType||9===t.nodeType:!0},i.prototype={key:function(t){if(!i.accepts(t))return 0;var e={},n=t[this.expando];if(!n){n=i.uid++;try{e[this.expando]={value:n},Object.defineProperties(t,e)}catch(r){e[this.expando]=n,oe.extend(t,e)}}return this.cache[n]||(this.cache[n]={}),n},set:function(t,e,n){var r,i=this.key(t),o=this.cache[i];if("string"==typeof e)o[e]=n;else if(oe.isEmptyObject(o))this.cache[i]=e;else for(r in e)o[r]=e[r]},get:function(t,n){var r=this.cache[this.key(t)];return n===e?r:r[n]},access:function(t,n,r){return n===e||n&&"string"==typeof n&&r===e?this.get(t,n):(this.set(t,n,r),r!==e?r:n)},remove:function(t,n){var r,i,o=this.key(t),s=this.cache[o];if(n===e)this.cache[o]={};else{oe.isArray(n)?i=n.concat(n.map(oe.camelCase)):n in s?i=[n]:(i=oe.camelCase(n),i=i in s?[i]:i.match(ae)||[]),r=i.length;for(;r--;)delete s[i[r]]}},hasData:function(t){return!oe.isEmptyObject(this.cache[t[this.expando]]||{})},discard:function(t){delete this.cache[this.key(t)]}},ge=new i,me=new i,oe.extend({acceptData:i.accepts,hasData:function(t){return ge.hasData(t)||me.hasData(t)},data:function(t,e,n){return ge.access(t,e,n)},removeData:function(t,e){ge.remove(t,e)},_data:function(t,e,n){return me.access(t,e,n)},_removeData:function(t,e){me.remove(t,e)}}),oe.fn.extend({data:function(t,n){var r,i,s=this[0],a=0,u=null;if(t===e){if(this.length&&(u=ge.get(s),1===s.nodeType&&!me.get(s,"hasDataAttrs"))){for(r=s.attributes;a<r.length;a++)i=r[a].name,0===i.indexOf("data-")&&(i=oe.camelCase(i.substring(5)),o(s,i,u[i]));me.set(s,"hasDataAttrs",!0)}return u}return"object"==typeof t?this.each(function(){ge.set(this,t)}):oe.access(this,function(n){var r,i=oe.camelCase(t);if(s&&n===e){if(r=ge.get(s,t),r!==e)return r;if(r=ge.get(s,i),r!==e)return r;if(r=o(s,i,e),r!==e)return r}else this.each(function(){var r=ge.get(this,i);ge.set(this,i,n),-1!==t.indexOf("-")&&r!==e&&ge.set(this,t,n)})},null,n,arguments.length>1,null,!0)},removeData:function(t){return this.each(function(){ge.remove(this,t)})}}),oe.extend({queue:function(t,e,n){var r;return t?(e=(e||"fx")+"queue",r=me.get(t,e),n&&(!r||oe.isArray(n)?r=me.access(t,e,oe.makeArray(n)):r.push(n)),r||[]):void 0},dequeue:function(t,e){e=e||"fx";var n=oe.queue(t,e),r=n.length,i=n.shift(),o=oe._queueHooks(t,e),s=function(){oe.dequeue(t,e)};"inprogress"===i&&(i=n.shift(),r--),o.cur=i,i&&("fx"===e&&n.unshift("inprogress"),delete o.stop,i.call(t,s,o)),!r&&o&&o.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return me.get(t,n)||me.access(t,n,{empty:oe.Callbacks("once memory").add(function(){me.remove(t,[e+"queue",n])})})}}),oe.fn.extend({queue:function(t,n){var r=2;return"string"!=typeof t&&(n=t,t="fx",r--),arguments.length<r?oe.queue(this[0],t):n===e?this:this.each(function(){var e=oe.queue(this,t,n);oe._queueHooks(this,t),"fx"===t&&"inprogress"!==e[0]&&oe.dequeue(this,t)})},dequeue:function(t){return this.each(function(){oe.dequeue(this,t)})},delay:function(t,e){return t=oe.fx?oe.fx.speeds[t]||t:t,e=e||"fx",this.queue(e,function(e,n){var r=setTimeout(e,t);n.stop=function(){clearTimeout(r)}})},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,n){var r,i=1,o=oe.Deferred(),s=this,a=this.length,u=function(){--i||o.resolveWith(s,[s])};for("string"!=typeof t&&(n=t,t=e),t=t||"fx";a--;)r=me.get(s[a],t+"queueHooks"),r&&r.empty&&(i++,r.empty.add(u));return u(),o.promise(n)}});var be,xe,we=/[\t\r\n]/g,Se=/\r/g,_e=/^(?:input|select|textarea|button)$/i;oe.fn.extend({attr:function(t,e){return oe.access(this,oe.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each(function(){oe.removeAttr(this,t)})},prop:function(t,e){return oe.access(this,oe.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each(function(){delete this[oe.propFix[t]||t]})},addClass:function(t){var e,n,r,i,o,s=0,a=this.length,u="string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).addClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(ae)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(we," "):" ")){for(o=0;i=e[o++];)r.indexOf(" "+i+" ")<0&&(r+=i+" ");n.className=oe.trim(r)}return this},removeClass:function(t){var e,n,r,i,o,s=0,a=this.length,u=0===arguments.length||"string"==typeof t&&t;if(oe.isFunction(t))return this.each(function(e){oe(this).removeClass(t.call(this,e,this.className))});if(u)for(e=(t||"").match(ae)||[];a>s;s++)if(n=this[s],r=1===n.nodeType&&(n.className?(" "+n.className+" ").replace(we," "):"")){for(o=0;i=e[o++];)for(;r.indexOf(" "+i+" ")>=0;)r=r.replace(" "+i+" "," ");n.className=t?oe.trim(r):""}return this},toggleClass:function(t,e){var n=typeof t,r="boolean"==typeof e;return oe.isFunction(t)?this.each(function(n){oe(this).toggleClass(t.call(this,n,this.className,e),e)}):this.each(function(){if("string"===n)for(var i,o=0,s=oe(this),a=e,u=t.match(ae)||[];i=u[o++];)a=r?a:!s.hasClass(i),s[a?"addClass":"removeClass"](i);else(n===J||"boolean"===n)&&(this.className&&me.set(this,"__className__",this.className),this.className=this.className||t===!1?"":me.get(this,"__className__")||"")})},hasClass:function(t){for(var e=" "+t+" ",n=0,r=this.length;r>n;n++)if(1===this[n].nodeType&&(" "+this[n].className+" ").replace(we," ").indexOf(e)>=0)return!0;return!1},val:function(t){var n,r,i,o=this[0];{if(arguments.length)return i=oe.isFunction(t),this.each(function(r){var o,s=oe(this);1===this.nodeType&&(o=i?t.call(this,r,s.val()):t,null==o?o="":"number"==typeof o?o+="":oe.isArray(o)&&(o=oe.map(o,function(t){return null==t?"":t+""})),n=oe.valHooks[this.type]||oe.valHooks[this.nodeName.toLowerCase()],n&&"set"in n&&n.set(this,o,"value")!==e||(this.value=o))});if(o)return n=oe.valHooks[o.type]||oe.valHooks[o.nodeName.toLowerCase()],n&&"get"in n&&(r=n.get(o,"value"))!==e?r:(r=o.value,"string"==typeof r?r.replace(Se,""):null==r?"":r)}}}),oe.extend({valHooks:{option:{get:function(t){var e=t.attributes.value;return!e||e.specified?t.value:t.text}},select:{get:function(t){for(var e,n,r=t.options,i=t.selectedIndex,o="select-one"===t.type||0>i,s=o?null:[],a=o?i+1:r.length,u=0>i?a:o?i:0;a>u;u++)if(n=r[u],!(!n.selected&&u!==i||(oe.support.optDisabled?n.disabled:null!==n.getAttribute("disabled"))||n.parentNode.disabled&&oe.nodeName(n.parentNode,"optgroup"))){if(e=oe(n).val(),o)return e;s.push(e)}return s},set:function(t,e){for(var n,r,i=t.options,o=oe.makeArray(e),s=i.length;s--;)r=i[s],(r.selected=oe.inArray(oe(r).val(),o)>=0)&&(n=!0);return n||(t.selectedIndex=-1),o}}},attr:function(t,n,r){var i,o,s=t.nodeType;if(t&&3!==s&&8!==s&&2!==s)return typeof t.getAttribute===J?oe.prop(t,n,r):(1===s&&oe.isXMLDoc(t)||(n=n.toLowerCase(),i=oe.attrHooks[n]||(oe.expr.match.boolean.test(n)?xe:be)),r===e?i&&"get"in i&&null!==(o=i.get(t,n))?o:(o=oe.find.attr(t,n),null==o?e:o):null!==r?i&&"set"in i&&(o=i.set(t,r,n))!==e?o:(t.setAttribute(n,r+""),r):(oe.removeAttr(t,n),void 0))},removeAttr:function(t,e){var n,r,i=0,o=e&&e.match(ae);if(o&&1===t.nodeType)for(;n=o[i++];)r=oe.propFix[n]||n,oe.expr.match.boolean.test(n)&&(t[r]=!1),t.removeAttribute(n)},attrHooks:{type:{set:function(t,e){if(!oe.support.radioValue&&"radio"===e&&oe.nodeName(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},propFix:{"for":"htmlFor","class":"className"},prop:function(t,n,r){var i,o,s,a=t.nodeType;if(t&&3!==a&&8!==a&&2!==a)return s=1!==a||!oe.isXMLDoc(t),s&&(n=oe.propFix[n]||n,o=oe.propHooks[n]),r!==e?o&&"set"in o&&(i=o.set(t,r,n))!==e?i:t[n]=r:o&&"get"in o&&null!==(i=o.get(t,n))?i:t[n]},propHooks:{tabIndex:{get:function(t){return t.hasAttribute("tabindex")||_e.test(t.nodeName)||t.href?t.tabIndex:-1}}}}),xe={set:function(t,e,n){return e===!1?oe.removeAttr(t,n):t.setAttribute(n,n),n}},oe.each(oe.expr.match.boolean.source.match(/\w+/g),function(t,n){var r=oe.expr.attrHandle[n]||oe.find.attr;oe.expr.attrHandle[n]=function(t,n,i){var o=oe.expr.attrHandle[n],s=i?e:(oe.expr.attrHandle[n]=e)!=r(t,n,i)?n.toLowerCase():null;return oe.expr.attrHandle[n]=o,s}}),oe.support.optSelected||(oe.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null}}),oe.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],function(){oe.propFix[this.toLowerCase()]=this}),oe.each(["radio","checkbox"],function(){oe.valHooks[this]={set:function(t,e){return oe.isArray(e)?t.checked=oe.inArray(oe(t).val(),e)>=0:void 0}},oe.support.checkOn||(oe.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})});var Ee=/^key/,Ne=/^(?:mouse|contextmenu)|click/,ke=/^(?:focusinfocus|focusoutblur)$/,je=/^([^.]*)(?:\.(.+)|)$/;oe.event={global:{},add:function(t,n,r,i,o){var s,a,u,c,l,f,h,p,d,g,m,v=me.get(t);if(v){for(r.handler&&(s=r,r=s.handler,o=s.selector),r.guid||(r.guid=oe.guid++),(c=v.events)||(c=v.events={}),(a=v.handle)||(a=v.handle=function(t){return typeof oe===J||t&&oe.event.triggered===t.type?e:oe.event.dispatch.apply(a.elem,arguments)},a.elem=t),n=(n||"").match(ae)||[""],l=n.length;l--;)u=je.exec(n[l])||[],d=m=u[1],g=(u[2]||"").split(".").sort(),d&&(h=oe.event.special[d]||{},d=(o?h.delegateType:h.bindType)||d,h=oe.event.special[d]||{},f=oe.extend({type:d,origType:m,data:i,handler:r,guid:r.guid,selector:o,needsContext:o&&oe.expr.match.needsContext.test(o),namespace:g.join(".")},s),(p=c[d])||(p=c[d]=[],p.delegateCount=0,h.setup&&h.setup.call(t,i,g,a)!==!1||t.addEventListener&&t.addEventListener(d,a,!1)),h.add&&(h.add.call(t,f),f.handler.guid||(f.handler.guid=r.guid)),o?p.splice(p.delegateCount++,0,f):p.push(f),oe.event.global[d]=!0);t=null}},remove:function(t,e,n,r,i){var o,s,a,u,c,l,f,h,p,d,g,m=me.hasData(t)&&me.get(t);if(m&&(u=m.events)){for(e=(e||"").match(ae)||[""],c=e.length;c--;)if(a=je.exec(e[c])||[],p=g=a[1],d=(a[2]||"").split(".").sort(),p){for(f=oe.event.special[p]||{},p=(r?f.delegateType:f.bindType)||p,h=u[p]||[],a=a[2]&&new RegExp("(^|\\.)"+d.join("\\.(?:.*\\.|)")+"(\\.|$)"),s=o=h.length;o--;)l=h[o],!i&&g!==l.origType||n&&n.guid!==l.guid||a&&!a.test(l.namespace)||r&&r!==l.selector&&("**"!==r||!l.selector)||(h.splice(o,1),l.selector&&h.delegateCount--,f.remove&&f.remove.call(t,l));s&&!h.length&&(f.teardown&&f.teardown.call(t,d,m.handle)!==!1||oe.removeEvent(t,p,m.handle),delete u[p])}else for(p in u)oe.event.remove(t,p+e[c],n,r,!0);oe.isEmptyObject(u)&&(delete m.handle,me.remove(t,"events"))}},trigger:function(n,r,i,o){var s,a,u,c,l,f,h,p=[i||W],d=re.call(n,"type")?n.type:n,g=re.call(n,"namespace")?n.namespace.split("."):[];if(a=u=i=i||W,3!==i.nodeType&&8!==i.nodeType&&!ke.test(d+oe.event.triggered)&&(d.indexOf(".")>=0&&(g=d.split("."),d=g.shift(),g.sort()),l=d.indexOf(":")<0&&"on"+d,n=n[oe.expando]?n:new oe.Event(d,"object"==typeof n&&n),n.isTrigger=o?2:3,n.namespace=g.join("."),n.namespace_re=n.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,n.result=e,n.target||(n.target=i),r=null==r?[n]:oe.makeArray(r,[n]),h=oe.event.special[d]||{},o||!h.trigger||h.trigger.apply(i,r)!==!1)){if(!o&&!h.noBubble&&!oe.isWindow(i)){for(c=h.delegateType||d,ke.test(c+d)||(a=a.parentNode);a;a=a.parentNode)p.push(a),u=a;u===(i.ownerDocument||W)&&p.push(u.defaultView||u.parentWindow||t)}for(s=0;(a=p[s++])&&!n.isPropagationStopped();)n.type=s>1?c:h.bindType||d,f=(me.get(a,"events")||{})[n.type]&&me.get(a,"handle"),f&&f.apply(a,r),f=l&&a[l],f&&oe.acceptData(a)&&f.apply&&f.apply(a,r)===!1&&n.preventDefault();return n.type=d,o||n.isDefaultPrevented()||h._default&&h._default.apply(p.pop(),r)!==!1||!oe.acceptData(i)||l&&oe.isFunction(i[d])&&!oe.isWindow(i)&&(u=i[l],u&&(i[l]=null),oe.event.triggered=d,i[d](),oe.event.triggered=e,u&&(i[l]=u)),n.result}},dispatch:function(t){t=oe.event.fix(t);var n,r,i,o,s,a=[],u=te.call(arguments),c=(me.get(this,"events")||{})[t.type]||[],l=oe.event.special[t.type]||{};if(u[0]=t,t.delegateTarget=this,!l.preDispatch||l.preDispatch.call(this,t)!==!1){for(a=oe.event.handlers.call(this,t,c),n=0;(o=a[n++])&&!t.isPropagationStopped();)for(t.currentTarget=o.elem,r=0;(s=o.handlers[r++])&&!t.isImmediatePropagationStopped();)(!t.namespace_re||t.namespace_re.test(s.namespace))&&(t.handleObj=s,t.data=s.data,i=((oe.event.special[s.origType]||{}).handle||s.handler).apply(o.elem,u),i!==e&&(t.result=i)===!1&&(t.preventDefault(),t.stopPropagation()));return l.postDispatch&&l.postDispatch.call(this,t),t.result}},handlers:function(t,n){var r,i,o,s,a=[],u=n.delegateCount,c=t.target;if(u&&c.nodeType&&(!t.button||"click"!==t.type))for(;c!==this;c=c.parentNode||this)if(c.disabled!==!0||"click"!==t.type){for(i=[],r=0;u>r;r++)s=n[r],o=s.selector+" ",i[o]===e&&(i[o]=s.needsContext?oe(o,this).index(c)>=0:oe.find(o,this,null,[c]).length),i[o]&&i.push(s);i.length&&a.push({elem:c,handlers:i})}return u<n.length&&a.push({elem:this,handlers:n.slice(u)}),a},props:"altKey bubbles cancelable ctrlKey currentTarget eventPhase metaKey relatedTarget shiftKey target timeStamp view which".split(" "),fixHooks:{},keyHooks:{props:"char charCode key keyCode".split(" "),filter:function(t,e){return null==t.which&&(t.which=null!=e.charCode?e.charCode:e.keyCode),t}},mouseHooks:{props:"button buttons clientX clientY offsetX offsetY pageX pageY screenX screenY toElement".split(" "),filter:function(t,n){var r,i,o,s=n.button;return null==t.pageX&&null!=n.clientX&&(r=t.target.ownerDocument||W,i=r.documentElement,o=r.body,t.pageX=n.clientX+(i&&i.scrollLeft||o&&o.scrollLeft||0)-(i&&i.clientLeft||o&&o.clientLeft||0),t.pageY=n.clientY+(i&&i.scrollTop||o&&o.scrollTop||0)-(i&&i.clientTop||o&&o.clientTop||0)),t.which||s===e||(t.which=1&s?1:2&s?3:4&s?2:0),t}},fix:function(t){if(t[oe.expando])return t;var e,n,r,i=t.type,o=t,s=this.fixHooks[i];for(s||(this.fixHooks[i]=s=Ne.test(i)?this.mouseHooks:Ee.test(i)?this.keyHooks:{}),r=s.props?this.props.concat(s.props):this.props,t=new oe.Event(o),e=r.length;e--;)n=r[e],t[n]=o[n];return 3===t.target.nodeType&&(t.target=t.target.parentNode),s.filter?s.filter(t,o):t},special:{load:{noBubble:!0},focus:{trigger:function(){return this!==u()&&this.focus?(this.focus(),!1):void 0},delegateType:"focusin"},blur:{trigger:function(){return this===u()&&this.blur?(this.blur(),!1):void 0},delegateType:"focusout"},click:{trigger:function(){return"checkbox"===this.type&&this.click&&oe.nodeName(this,"input")?(this.click(),!1):void 0},_default:function(t){return oe.nodeName(t.target,"a")}},beforeunload:{postDispatch:function(t){t.result!==e&&(t.originalEvent.returnValue=t.result)}}},simulate:function(t,e,n,r){var i=oe.extend(new oe.Event,n,{type:t,isSimulated:!0,originalEvent:{}});r?oe.event.trigger(i,null,e):oe.event.dispatch.call(e,i),i.isDefaultPrevented()&&n.preventDefault()}},oe.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n,!1)},oe.Event=function(t,e){return this instanceof oe.Event?(t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||t.getPreventDefault&&t.getPreventDefault()?s:a):this.type=t,e&&oe.extend(this,e),this.timeStamp=t&&t.timeStamp||oe.now(),this[oe.expando]=!0,void 0):new oe.Event(t,e)},oe.Event.prototype={isDefaultPrevented:a,isPropagationStopped:a,isImmediatePropagationStopped:a,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=s,t&&t.preventDefault&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=s,t&&t.stopPropagation&&t.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=s,this.stopPropagation()}},oe.each({mouseenter:"mouseover",mouseleave:"mouseout"},function(t,e){oe.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=this,i=t.relatedTarget,o=t.handleObj;return(!i||i!==r&&!oe.contains(r,i))&&(t.type=o.origType,n=o.handler.apply(this,arguments),t.type=e),n}}}),oe.support.focusinBubbles||oe.each({focus:"focusin",blur:"focusout"},function(t,e){var n=0,r=function(t){oe.event.simulate(e,t.target,oe.event.fix(t),!0)};oe.event.special[e]={setup:function(){0===n++&&W.addEventListener(t,r,!0)},teardown:function(){0===--n&&W.removeEventListener(t,r,!0)}}}),oe.fn.extend({on:function(t,n,r,i,o){var s,u;if("object"==typeof t){"string"!=typeof n&&(r=r||n,n=e);for(u in t)this.on(u,n,r,t[u],o);return this}if(null==r&&null==i?(i=n,r=n=e):null==i&&("string"==typeof n?(i=r,r=e):(i=r,r=n,n=e)),i===!1)i=a;else if(!i)return this;return 1===o&&(s=i,i=function(t){return oe().off(t),s.apply(this,arguments)},i.guid=s.guid||(s.guid=oe.guid++)),this.each(function(){oe.event.add(this,t,i,r,n)})},one:function(t,e,n,r){return this.on(t,e,n,r,1)},off:function(t,n,r){var i,o;if(t&&t.preventDefault&&t.handleObj)return i=t.handleObj,oe(t.delegateTarget).off(i.namespace?i.origType+"."+i.namespace:i.origType,i.selector,i.handler),this;if("object"==typeof t){for(o in t)this.off(o,n,t[o]);return this}return(n===!1||"function"==typeof n)&&(r=n,n=e),r===!1&&(r=a),this.each(function(){oe.event.remove(this,t,r,n)})},trigger:function(t,e){return this.each(function(){oe.event.trigger(t,e,this)})},triggerHandler:function(t,e){var n=this[0];return n?oe.event.trigger(t,e,n,!0):void 0}});var Ae=/^.[^:#\[\.,]*$/,Oe=oe.expr.match.needsContext,Ce={children:!0,contents:!0,next:!0,prev:!0};oe.fn.extend({find:function(t){var e,n,r,i=this.length;if("string"!=typeof t)return e=this,this.pushStack(oe(t).filter(function(){for(r=0;i>r;r++)if(oe.contains(e[r],this))return!0}));for(n=[],r=0;i>r;r++)oe.find(t,this[r],n);return n=this.pushStack(i>1?oe.unique(n):n),n.selector=(this.selector?this.selector+" ":"")+t,n},has:function(t){var e=oe(t,this),n=e.length;return this.filter(function(){for(var t=0;n>t;t++)if(oe.contains(this,e[t]))return!0})},not:function(t){return this.pushStack(l(this,t||[],!0))},filter:function(t){return this.pushStack(l(this,t||[],!1))},is:function(t){return!!t&&("string"==typeof t?Oe.test(t)?oe(t,this.context).index(this[0])>=0:oe.filter(t,this).length>0:this.filter(t).length>0)},closest:function(t,e){for(var n,r=0,i=this.length,o=[],s=Oe.test(t)||"string"!=typeof t?oe(t,e||this.context):0;i>r;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(s?s.index(n)>-1:1===n.nodeType&&oe.find.matchesSelector(n,t))){n=o.push(n);break}return this.pushStack(o.length>1?oe.unique(o):o)},index:function(t){return t?"string"==typeof t?ee.call(oe(t),this[0]):ee.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){var n="string"==typeof t?oe(t,e):oe.makeArray(t&&t.nodeType?[t]:t),r=oe.merge(this.get(),n);return this.pushStack(oe.unique(r))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),oe.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return oe.dir(t,"parentNode")},parentsUntil:function(t,e,n){return oe.dir(t,"parentNode",n)},next:function(t){return c(t,"nextSibling")},prev:function(t){return c(t,"previousSibling")},nextAll:function(t){return oe.dir(t,"nextSibling")},prevAll:function(t){return oe.dir(t,"previousSibling")},nextUntil:function(t,e,n){return oe.dir(t,"nextSibling",n)},prevUntil:function(t,e,n){return oe.dir(t,"previousSibling",n)},siblings:function(t){return oe.sibling((t.parentNode||{}).firstChild,t)},children:function(t){return oe.sibling(t.firstChild)},contents:function(t){return oe.nodeName(t,"iframe")?t.contentDocument||t.contentWindow.document:oe.merge([],t.childNodes)}},function(t,e){oe.fn[t]=function(n,r){var i=oe.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=oe.filter(r,i)),this.length>1&&(Ce[t]||oe.unique(i),"p"===t[0]&&i.reverse()),this.pushStack(i)}}),oe.extend({filter:function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?oe.find.matchesSelector(r,t)?[r]:[]:oe.find.matches(t,oe.grep(e,function(t){return 1===t.nodeType}))},dir:function(t,n,r){for(var i=[],o=r!==e;(t=t[n])&&9!==t.nodeType;)if(1===t.nodeType){if(o&&oe(t).is(r))break;i.push(t)}return i},sibling:function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n}});var Te=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:]+)[^>]*)\/>/gi,Ie=/<([\w:]+)/,Le=/<|&#?\w+;/,Me=/<(?:script|style|link)/i,qe=/^(?:checkbox|radio)$/i,Re=/checked\s*(?:[^=]|=\s*.checked.)/i,De=/^$|\/(?:java|ecma)script/i,Fe=/^true\/(.*)/,Be=/^\s*<!(?:\[CDATA\[|--)|(?:\]\]|--)>\s*$/g,ze={option:[1,"<select multiple='multiple'>","</select>"],thead:[1,"<table>","</table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};ze.optgroup=ze.option,ze.tbody=ze.tfoot=ze.colgroup=ze.caption=ze.col=ze.thead,ze.th=ze.td,oe.fn.extend({text:function(t){return oe.access(this,function(t){return t===e?oe.text(this):this.empty().append((this[0]&&this[0].ownerDocument||W).createTextNode(t))},null,t,arguments.length)},append:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.appendChild(t)}})},prepend:function(){return this.domManip(arguments,function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=f(this,t);e.insertBefore(t,e.firstChild)}})},before:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this)})},after:function(){return this.domManip(arguments,function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)})},remove:function(t,e){for(var n,r=t?oe.filter(t,this):this,i=0;null!=(n=r[i]);i++)e||1!==n.nodeType||oe.cleanData(m(n)),n.parentNode&&(e&&oe.contains(n.ownerDocument,n)&&d(m(n,"script")),n.parentNode.removeChild(n));return this},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(oe.cleanData(m(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null==t?!1:t,e=null==e?t:e,this.map(function(){return oe.clone(this,t,e)})},html:function(t){return oe.access(this,function(t){var n=this[0]||{},r=0,i=this.length;if(t===e&&1===n.nodeType)return n.innerHTML;if("string"==typeof t&&!Me.test(t)&&!ze[(Ie.exec(t)||["",""])[1].toLowerCase()]){t=t.replace(Te,"<$1></$2>");try{for(;i>r;r++)n=this[r]||{},1===n.nodeType&&(oe.cleanData(m(n,!1)),n.innerHTML=t);n=0}catch(o){}}n&&this.empty().append(t)},null,t,arguments.length)},replaceWith:function(){var t=oe.map(this,function(t){return[t.nextSibling,t.parentNode]}),e=0;return this.domManip(arguments,function(n){var r=t[e++],i=t[e++];i&&(oe(this).remove(),i.insertBefore(n,r))},!0),e?this:this.remove()},detach:function(t){return this.remove(t,!0)},domManip:function(t,e,n){t=Q.apply([],t);var r,i,o,s,a,u,c=0,l=this.length,f=this,d=l-1,g=t[0],v=oe.isFunction(g);if(v||!(1>=l||"string"!=typeof g||oe.support.checkClone)&&Re.test(g))return this.each(function(r){var i=f.eq(r);v&&(t[0]=g.call(this,r,i.html())),i.domManip(t,e,n)});if(l&&(r=oe.buildFragment(t,this[0].ownerDocument,!1,!n&&this),i=r.firstChild,1===r.childNodes.length&&(r=i),i)){for(o=oe.map(m(r,"script"),h),s=o.length;l>c;c++)a=r,c!==d&&(a=oe.clone(a,!0,!0),s&&oe.merge(o,m(a,"script"))),e.call(this[c],a,c);if(s)for(u=o[o.length-1].ownerDocument,oe.map(o,p),c=0;s>c;c++)a=o[c],De.test(a.type||"")&&!me.access(a,"globalEval")&&oe.contains(u,a)&&(a.src?oe._evalUrl(a.src):oe.globalEval(a.textContent.replace(Be,"")))}return this}}),oe.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},function(t,e){oe.fn[t]=function(t){for(var n,r=[],i=oe(t),o=i.length-1,s=0;o>=s;s++)n=s===o?this:this.clone(!0),oe(i[s])[e](n),Z.apply(r,n.get());return this.pushStack(r)}}),oe.extend({clone:function(t,e,n){var r,i,o,s,a=t.cloneNode(!0),u=oe.contains(t.ownerDocument,t);if(!(oe.support.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||oe.isXMLDoc(t)))for(s=m(a),o=m(t),r=0,i=o.length;i>r;r++)v(o[r],s[r]);if(e)if(n)for(o=o||m(t),s=s||m(a),r=0,i=o.length;i>r;r++)g(o[r],s[r]);else g(t,a);return s=m(a,"script"),s.length>0&&d(s,!u&&m(t,"script")),a},buildFragment:function(t,e,n,r){for(var i,o,s,a,u,c,l=0,f=t.length,h=e.createDocumentFragment(),p=[];f>l;l++)if(i=t[l],i||0===i)if("object"===oe.type(i))oe.merge(p,i.nodeType?[i]:i);else if(Le.test(i)){for(o=o||h.appendChild(e.createElement("div")),s=(Ie.exec(i)||["",""])[1].toLowerCase(),a=ze[s]||ze._default,o.innerHTML=a[1]+i.replace(Te,"<$1></$2>")+a[2],c=a[0];c--;)o=o.firstChild;oe.merge(p,o.childNodes),o=h.firstChild,o.textContent=""}else p.push(e.createTextNode(i));for(h.textContent="",l=0;i=p[l++];)if((!r||-1===oe.inArray(i,r))&&(u=oe.contains(i.ownerDocument,i),o=m(h.appendChild(i),"script"),u&&d(o),n))for(c=0;i=o[c++];)De.test(i.type||"")&&n.push(i);return h},cleanData:function(t){for(var e,n,r,i=t.length,o=0,s=oe.event.special;i>o;o++){if(n=t[o],oe.acceptData(n)&&(e=me.access(n)))for(r in e.events)s[r]?oe.event.remove(n,r):oe.removeEvent(n,r,e.handle);ge.discard(n),me.discard(n)}},_evalUrl:function(t){return oe.ajax({url:t,type:"GET",dataType:"text",async:!1,global:!1,success:oe.globalEval})}}),oe.fn.extend({wrapAll:function(t){var e;return oe.isFunction(t)?this.each(function(e){oe(this).wrapAll(t.call(this,e))}):(this[0]&&(e=oe(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map(function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t}).append(this)),this)},wrapInner:function(t){return oe.isFunction(t)?this.each(function(e){oe(this).wrapInner(t.call(this,e))}):this.each(function(){var e=oe(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)})},wrap:function(t){var e=oe.isFunction(t);return this.each(function(n){oe(this).wrapAll(e?t.call(this,n):t)})},unwrap:function(){return this.parent().each(function(){oe.nodeName(this,"body")||oe(this).replaceWith(this.childNodes)}).end()}});var Pe,Ue,Je=/^(none|table(?!-c[ea]).+)/,He=/^margin/,We=new RegExp("^("+se+")(.*)$","i"),$e=new RegExp("^("+se+")(?!px)[a-z%]+$","i"),Ge=new RegExp("^([+-])=("+se+")","i"),Xe={BODY:"block"},Ve={position:"absolute",visibility:"hidden",display:"block"},Ye={letterSpacing:0,fontWeight:400},Ke=["Top","Right","Bottom","Left"],Qe=["Webkit","O","Moz","ms"];oe.fn.extend({css:function(t,n){return oe.access(this,function(t,n,r){var i,o,s={},a=0;if(oe.isArray(n)){for(i=x(t),o=n.length;o>a;a++)s[n[a]]=oe.css(t,n[a],!1,i);return s}return r!==e?oe.style(t,n,r):oe.css(t,n)},t,n,arguments.length>1)},show:function(){return w(this,!0)},hide:function(){return w(this)},toggle:function(t){var e="boolean"==typeof t;return this.each(function(){(e?t:b(this))?oe(this).show():oe(this).hide()
|
||
})}}),oe.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Pe(t,"opacity");return""===n?"1":n}}}},cssNumber:{columnCount:!0,fillOpacity:!0,fontWeight:!0,lineHeight:!0,opacity:!0,orphans:!0,widows:!0,zIndex:!0,zoom:!0},cssProps:{"float":"cssFloat"},style:function(t,n,r,i){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var o,s,a,u=oe.camelCase(n),c=t.style;return n=oe.cssProps[u]||(oe.cssProps[u]=y(c,u)),a=oe.cssHooks[n]||oe.cssHooks[u],r===e?a&&"get"in a&&(o=a.get(t,!1,i))!==e?o:c[n]:(s=typeof r,"string"===s&&(o=Ge.exec(r))&&(r=(o[1]+1)*o[2]+parseFloat(oe.css(t,n)),s="number"),null==r||"number"===s&&isNaN(r)||("number"!==s||oe.cssNumber[u]||(r+="px"),oe.support.clearCloneStyle||""!==r||0!==n.indexOf("background")||(c[n]="inherit"),a&&"set"in a&&(r=a.set(t,r,i))===e||(c[n]=r)),void 0)}},css:function(t,n,r,i){var o,s,a,u=oe.camelCase(n);return n=oe.cssProps[u]||(oe.cssProps[u]=y(t.style,u)),a=oe.cssHooks[n]||oe.cssHooks[u],a&&"get"in a&&(o=a.get(t,!0,r)),o===e&&(o=Pe(t,n,i)),"normal"===o&&n in Ye&&(o=Ye[n]),""===r||r?(s=parseFloat(o),r===!0||oe.isNumeric(s)?s||0:o):o}}),Pe=function(t,n,r){var i,o,s,a=r||x(t),u=a?a.getPropertyValue(n)||a[n]:e,c=t.style;return a&&(""!==u||oe.contains(t.ownerDocument,t)||(u=oe.style(t,n)),$e.test(u)&&He.test(n)&&(i=c.width,o=c.minWidth,s=c.maxWidth,c.minWidth=c.maxWidth=c.width=u,u=a.width,c.width=i,c.minWidth=o,c.maxWidth=s)),u},oe.each(["height","width"],function(t,e){oe.cssHooks[e]={get:function(t,n,r){return n?0===t.offsetWidth&&Je.test(oe.css(t,"display"))?oe.swap(t,Ve,function(){return E(t,e,r)}):E(t,e,r):void 0},set:function(t,n,r){var i=r&&x(t);return S(t,n,r?_(t,e,r,oe.support.boxSizing&&"border-box"===oe.css(t,"boxSizing",!1,i),i):0)}}}),oe(function(){oe.support.reliableMarginRight||(oe.cssHooks.marginRight={get:function(t,e){return e?oe.swap(t,{display:"inline-block"},Pe,[t,"marginRight"]):void 0}}),!oe.support.pixelPosition&&oe.fn.position&&oe.each(["top","left"],function(t,e){oe.cssHooks[e]={get:function(t,n){return n?(n=Pe(t,e),$e.test(n)?oe(t).position()[e]+"px":n):void 0}}})}),oe.expr&&oe.expr.filters&&(oe.expr.filters.hidden=function(t){return t.offsetWidth<=0&&t.offsetHeight<=0},oe.expr.filters.visible=function(t){return!oe.expr.filters.hidden(t)}),oe.each({margin:"",padding:"",border:"Width"},function(t,e){oe.cssHooks[t+e]={expand:function(n){for(var r=0,i={},o="string"==typeof n?n.split(" "):[n];4>r;r++)i[t+Ke[r]+e]=o[r]||o[r-2]||o[0];return i}},He.test(t)||(oe.cssHooks[t+e].set=S)});var Ze=/%20/g,tn=/\[\]$/,en=/\r?\n/g,nn=/^(?:submit|button|image|reset|file)$/i,rn=/^(?:input|select|textarea|keygen)/i;oe.fn.extend({serialize:function(){return oe.param(this.serializeArray())},serializeArray:function(){return this.map(function(){var t=oe.prop(this,"elements");return t?oe.makeArray(t):this}).filter(function(){var t=this.type;return this.name&&!oe(this).is(":disabled")&&rn.test(this.nodeName)&&!nn.test(t)&&(this.checked||!qe.test(t))}).map(function(t,e){var n=oe(this).val();return null==n?null:oe.isArray(n)?oe.map(n,function(t){return{name:e.name,value:t.replace(en,"\r\n")}}):{name:e.name,value:n.replace(en,"\r\n")}}).get()}}),oe.param=function(t,n){var r,i=[],o=function(t,e){e=oe.isFunction(e)?e():null==e?"":e,i[i.length]=encodeURIComponent(t)+"="+encodeURIComponent(e)};if(n===e&&(n=oe.ajaxSettings&&oe.ajaxSettings.traditional),oe.isArray(t)||t.jquery&&!oe.isPlainObject(t))oe.each(t,function(){o(this.name,this.value)});else for(r in t)j(r,t[r],n,o);return i.join("&").replace(Ze,"+")},oe.each("blur focus focusin focusout load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup error contextmenu".split(" "),function(t,e){oe.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}),oe.fn.extend({hover:function(t,e){return this.mouseenter(t).mouseleave(e||t)},bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)}});var on,sn,an=oe.now(),un=/\?/,cn=/#.*$/,ln=/([?&])_=[^&]*/,fn=/^(.*?):[ \t]*([^\r\n]*)$/gm,hn=/^(?:about|app|app-storage|.+-extension|file|res|widget):$/,pn=/^(?:GET|HEAD)$/,dn=/^\/\//,gn=/^([\w.+-]+:)(?:\/\/([^\/?#:]*)(?::(\d+)|)|)/,mn=oe.fn.load,vn={},yn={},bn="*/".concat("*");try{sn=H.href}catch(xn){sn=W.createElement("a"),sn.href="",sn=sn.href}on=gn.exec(sn.toLowerCase())||[],oe.fn.load=function(t,n,r){if("string"!=typeof t&&mn)return mn.apply(this,arguments);var i,o,s,a=this,u=t.indexOf(" ");return u>=0&&(i=t.slice(u),t=t.slice(0,u)),oe.isFunction(n)?(r=n,n=e):n&&"object"==typeof n&&(o="POST"),a.length>0&&oe.ajax({url:t,type:o,dataType:"html",data:n}).done(function(t){s=arguments,a.html(i?oe("<div>").append(oe.parseHTML(t)).find(i):t)}).complete(r&&function(t,e){a.each(r,s||[t.responseText,e,t])}),this},oe.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(t,e){oe.fn[e]=function(t){return this.on(e,t)}}),oe.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:sn,type:"GET",isLocal:hn.test(on[1]),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":bn,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/xml/,html:/html/,json:/json/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":oe.parseJSON,"text xml":oe.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?C(C(t,oe.ajaxSettings),e):C(oe.ajaxSettings,t)},ajaxPrefilter:A(vn),ajaxTransport:A(yn),ajax:function(t,n){function r(t,n,r,a){var c,f,y,b,w,_=n;2!==x&&(x=2,u&&clearTimeout(u),i=e,s=a||"",S.readyState=t>0?4:0,c=t>=200&&300>t||304===t,r&&(b=T(h,S,r)),b=I(h,b,S,c),c?(h.ifModified&&(w=S.getResponseHeader("Last-Modified"),w&&(oe.lastModified[o]=w),w=S.getResponseHeader("etag"),w&&(oe.etag[o]=w)),204===t?_="nocontent":304===t?_="notmodified":(_=b.state,f=b.data,y=b.error,c=!y)):(y=_,(t||!_)&&(_="error",0>t&&(t=0))),S.status=t,S.statusText=(n||_)+"",c?g.resolveWith(p,[f,_,S]):g.rejectWith(p,[S,_,y]),S.statusCode(v),v=e,l&&d.trigger(c?"ajaxSuccess":"ajaxError",[S,h,c?f:y]),m.fireWith(p,[S,_]),l&&(d.trigger("ajaxComplete",[S,h]),--oe.active||oe.event.trigger("ajaxStop")))}"object"==typeof t&&(n=t,t=e),n=n||{};var i,o,s,a,u,c,l,f,h=oe.ajaxSetup({},n),p=h.context||h,d=h.context&&(p.nodeType||p.jquery)?oe(p):oe.event,g=oe.Deferred(),m=oe.Callbacks("once memory"),v=h.statusCode||{},y={},b={},x=0,w="canceled",S={readyState:0,getResponseHeader:function(t){var e;if(2===x){if(!a)for(a={};e=fn.exec(s);)a[e[1].toLowerCase()]=e[2];e=a[t.toLowerCase()]}return null==e?null:e},getAllResponseHeaders:function(){return 2===x?s:null},setRequestHeader:function(t,e){var n=t.toLowerCase();return x||(t=b[n]=b[n]||t,y[t]=e),this},overrideMimeType:function(t){return x||(h.mimeType=t),this},statusCode:function(t){var e;if(t)if(2>x)for(e in t)v[e]=[v[e],t[e]];else S.always(t[S.status]);return this},abort:function(t){var e=t||w;return i&&i.abort(e),r(0,e),this}};if(g.promise(S).complete=m.add,S.success=S.done,S.error=S.fail,h.url=((t||h.url||sn)+"").replace(cn,"").replace(dn,on[1]+"//"),h.type=n.method||n.type||h.method||h.type,h.dataTypes=oe.trim(h.dataType||"*").toLowerCase().match(ae)||[""],null==h.crossDomain&&(c=gn.exec(h.url.toLowerCase()),h.crossDomain=!(!c||c[1]===on[1]&&c[2]===on[2]&&(c[3]||("http:"===c[1]?"80":"443"))===(on[3]||("http:"===on[1]?"80":"443")))),h.data&&h.processData&&"string"!=typeof h.data&&(h.data=oe.param(h.data,h.traditional)),O(vn,h,n,S),2===x)return S;l=h.global,l&&0===oe.active++&&oe.event.trigger("ajaxStart"),h.type=h.type.toUpperCase(),h.hasContent=!pn.test(h.type),o=h.url,h.hasContent||(h.data&&(o=h.url+=(un.test(o)?"&":"?")+h.data,delete h.data),h.cache===!1&&(h.url=ln.test(o)?o.replace(ln,"$1_="+an++):o+(un.test(o)?"&":"?")+"_="+an++)),h.ifModified&&(oe.lastModified[o]&&S.setRequestHeader("If-Modified-Since",oe.lastModified[o]),oe.etag[o]&&S.setRequestHeader("If-None-Match",oe.etag[o])),(h.data&&h.hasContent&&h.contentType!==!1||n.contentType)&&S.setRequestHeader("Content-Type",h.contentType),S.setRequestHeader("Accept",h.dataTypes[0]&&h.accepts[h.dataTypes[0]]?h.accepts[h.dataTypes[0]]+("*"!==h.dataTypes[0]?", "+bn+"; q=0.01":""):h.accepts["*"]);for(f in h.headers)S.setRequestHeader(f,h.headers[f]);if(h.beforeSend&&(h.beforeSend.call(p,S,h)===!1||2===x))return S.abort();w="abort";for(f in{success:1,error:1,complete:1})S[f](h[f]);if(i=O(yn,h,n,S)){S.readyState=1,l&&d.trigger("ajaxSend",[S,h]),h.async&&h.timeout>0&&(u=setTimeout(function(){S.abort("timeout")},h.timeout));try{x=1,i.send(y,r)}catch(_){if(!(2>x))throw _;r(-1,_)}}else r(-1,"No Transport");return S},getJSON:function(t,e,n){return oe.get(t,e,n,"json")},getScript:function(t,n){return oe.get(t,e,n,"script")}}),oe.each(["get","post"],function(t,n){oe[n]=function(t,r,i,o){return oe.isFunction(r)&&(o=o||i,i=r,r=e),oe.ajax({url:t,type:n,dataType:o,data:r,success:i})}}),oe.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/(?:java|ecma)script/},converters:{"text script":function(t){return oe.globalEval(t),t}}}),oe.ajaxPrefilter("script",function(t){t.cache===e&&(t.cache=!1),t.crossDomain&&(t.type="GET")}),oe.ajaxTransport("script",function(t){if(t.crossDomain){var e,n;return{send:function(r,i){e=oe("<script>").prop({async:!0,charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),W.head.appendChild(e[0])},abort:function(){n&&n()}}}});var wn=[],Sn=/(=)\?(?=&|$)|\?\?/;oe.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=wn.pop()||oe.expando+"_"+an++;return this[t]=!0,t}}),oe.ajaxPrefilter("json jsonp",function(n,r,i){var o,s,a,u=n.jsonp!==!1&&(Sn.test(n.url)?"url":"string"==typeof n.data&&!(n.contentType||"").indexOf("application/x-www-form-urlencoded")&&Sn.test(n.data)&&"data");return u||"jsonp"===n.dataTypes[0]?(o=n.jsonpCallback=oe.isFunction(n.jsonpCallback)?n.jsonpCallback():n.jsonpCallback,u?n[u]=n[u].replace(Sn,"$1"+o):n.jsonp!==!1&&(n.url+=(un.test(n.url)?"&":"?")+n.jsonp+"="+o),n.converters["script json"]=function(){return a||oe.error(o+" was not called"),a[0]},n.dataTypes[0]="json",s=t[o],t[o]=function(){a=arguments},i.always(function(){t[o]=s,n[o]&&(n.jsonpCallback=r.jsonpCallback,wn.push(o)),a&&oe.isFunction(s)&&s(a[0]),a=s=e}),"script"):void 0}),oe.ajaxSettings.xhr=function(){try{return new XMLHttpRequest}catch(t){}};var _n=oe.ajaxSettings.xhr(),En={0:200,1223:204},Nn=0,kn={};t.ActiveXObject&&oe(t).on("unload",function(){for(var t in kn)kn[t]();kn=e}),oe.support.cors=!!_n&&"withCredentials"in _n,oe.support.ajax=_n=!!_n,oe.ajaxTransport(function(t){var n;return oe.support.cors||_n&&!t.crossDomain?{send:function(r,i){var o,s,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||r["X-Requested-With"]||(r["X-Requested-With"]="XMLHttpRequest");for(o in r)a.setRequestHeader(o,r[o]);n=function(t){return function(){n&&(delete kn[s],n=a.onload=a.onerror=null,"abort"===t?a.abort():"error"===t?i(a.status||404,a.statusText):i(En[a.status]||a.status,a.statusText,"string"==typeof a.responseText?{text:a.responseText}:e,a.getAllResponseHeaders()))}},a.onload=n(),a.onerror=n("error"),n=kn[s=Nn++]=n("abort"),a.send(t.hasContent&&t.data||null)},abort:function(){n&&n()}}:void 0});var jn,An,On=/^(?:toggle|show|hide)$/,Cn=new RegExp("^(?:([+-])=|)("+se+")([a-z%]*)$","i"),Tn=/queueHooks$/,In=[D],Ln={"*":[function(t,e){var n,r,i=this.createTween(t,e),o=Cn.exec(e),s=i.cur(),a=+s||0,u=1,c=20;if(o){if(n=+o[2],r=o[3]||(oe.cssNumber[t]?"":"px"),"px"!==r&&a){a=oe.css(i.elem,t,!0)||n||1;do u=u||".5",a/=u,oe.style(i.elem,t,a+r);while(u!==(u=i.cur()/s)&&1!==u&&--c)}i.unit=r,i.start=a,i.end=o[1]?a+(o[1]+1)*n:n}return i}]};oe.Animation=oe.extend(q,{tweener:function(t,e){oe.isFunction(t)?(e=t,t=["*"]):t=t.split(" ");for(var n,r=0,i=t.length;i>r;r++)n=t[r],Ln[n]=Ln[n]||[],Ln[n].unshift(e)},prefilter:function(t,e){e?In.unshift(t):In.push(t)}}),oe.Tween=F,F.prototype={constructor:F,init:function(t,e,n,r,i,o){this.elem=t,this.prop=n,this.easing=i||"swing",this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=o||(oe.cssNumber[n]?"":"px")},cur:function(){var t=F.propHooks[this.prop];return t&&t.get?t.get(this):F.propHooks._default.get(this)},run:function(t){var e,n=F.propHooks[this.prop];return this.pos=e=this.options.duration?oe.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):F.propHooks._default.set(this),this}},F.prototype.init.prototype=F.prototype,F.propHooks={_default:{get:function(t){var e;return null==t.elem[t.prop]||t.elem.style&&null!=t.elem.style[t.prop]?(e=oe.css(t.elem,t.prop,""),e&&"auto"!==e?e:0):t.elem[t.prop]},set:function(t){oe.fx.step[t.prop]?oe.fx.step[t.prop](t):t.elem.style&&(null!=t.elem.style[oe.cssProps[t.prop]]||oe.cssHooks[t.prop])?oe.style(t.elem,t.prop,t.now+t.unit):t.elem[t.prop]=t.now}}},F.propHooks.scrollTop=F.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},oe.each(["toggle","show","hide"],function(t,e){var n=oe.fn[e];oe.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(B(e,!0),t,r,i)}}),oe.fn.extend({fadeTo:function(t,e,n,r){return this.filter(b).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=oe.isEmptyObject(t),o=oe.speed(e,n,r),s=function(){var e=q(this,oe.extend({},t),o);s.finish=function(){e.stop(!0)},(i||me.get(this,"finish"))&&e.stop(!0)};return s.finish=s,i||o.queue===!1?this.each(s):this.queue(o.queue,s)},stop:function(t,n,r){var i=function(t){var e=t.stop;delete t.stop,e(r)};return"string"!=typeof t&&(r=n,n=t,t=e),n&&t!==!1&&this.queue(t||"fx",[]),this.each(function(){var e=!0,n=null!=t&&t+"queueHooks",o=oe.timers,s=me.get(this);if(n)s[n]&&s[n].stop&&i(s[n]);else for(n in s)s[n]&&s[n].stop&&Tn.test(n)&&i(s[n]);for(n=o.length;n--;)o[n].elem!==this||null!=t&&o[n].queue!==t||(o[n].anim.stop(r),e=!1,o.splice(n,1));(e||!r)&&oe.dequeue(this,t)})},finish:function(t){return t!==!1&&(t=t||"fx"),this.each(function(){var e,n=me.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],o=oe.timers,s=r?r.length:0;for(n.finish=!0,oe.queue(this,t,[]),i&&i.cur&&i.cur.finish&&i.cur.finish.call(this),e=o.length;e--;)o[e].elem===this&&o[e].queue===t&&(o[e].anim.stop(!0),o.splice(e,1));for(e=0;s>e;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish})}}),oe.each({slideDown:B("show"),slideUp:B("hide"),slideToggle:B("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},function(t,e){oe.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}}),oe.speed=function(t,e,n){var r=t&&"object"==typeof t?oe.extend({},t):{complete:n||!n&&e||oe.isFunction(t)&&t,duration:t,easing:n&&e||e&&!oe.isFunction(e)&&e};return r.duration=oe.fx.off?0:"number"==typeof r.duration?r.duration:r.duration in oe.fx.speeds?oe.fx.speeds[r.duration]:oe.fx.speeds._default,(null==r.queue||r.queue===!0)&&(r.queue="fx"),r.old=r.complete,r.complete=function(){oe.isFunction(r.old)&&r.old.call(this),r.queue&&oe.dequeue(this,r.queue)},r},oe.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2}},oe.timers=[],oe.fx=F.prototype.init,oe.fx.tick=function(){var t,n=oe.timers,r=0;for(jn=oe.now();r<n.length;r++)t=n[r],t()||n[r]!==t||n.splice(r--,1);n.length||oe.fx.stop(),jn=e},oe.fx.timer=function(t){t()&&oe.timers.push(t)&&oe.fx.start()},oe.fx.interval=13,oe.fx.start=function(){An||(An=setInterval(oe.fx.tick,oe.fx.interval))},oe.fx.stop=function(){clearInterval(An),An=null},oe.fx.speeds={slow:600,fast:200,_default:400},oe.fx.step={},oe.expr&&oe.expr.filters&&(oe.expr.filters.animated=function(t){return oe.grep(oe.timers,function(e){return t===e.elem}).length}),oe.fn.offset=function(t){if(arguments.length)return t===e?this:this.each(function(e){oe.offset.setOffset(this,t,e)});var n,r,i=this[0],o={top:0,left:0},s=i&&i.ownerDocument;if(s)return n=s.documentElement,oe.contains(n,i)?(typeof i.getBoundingClientRect!==J&&(o=i.getBoundingClientRect()),r=z(s),{top:o.top+r.pageYOffset-n.clientTop,left:o.left+r.pageXOffset-n.clientLeft}):o},oe.offset={setOffset:function(t,e,n){var r,i,o,s,a,u,c,l=oe.css(t,"position"),f=oe(t),h={};"static"===l&&(t.style.position="relative"),a=f.offset(),o=oe.css(t,"top"),u=oe.css(t,"left"),c=("absolute"===l||"fixed"===l)&&(o+u).indexOf("auto")>-1,c?(r=f.position(),s=r.top,i=r.left):(s=parseFloat(o)||0,i=parseFloat(u)||0),oe.isFunction(e)&&(e=e.call(t,n,a)),null!=e.top&&(h.top=e.top-a.top+s),null!=e.left&&(h.left=e.left-a.left+i),"using"in e?e.using.call(t,h):f.css(h)}},oe.fn.extend({position:function(){if(this[0]){var t,e,n=this[0],r={top:0,left:0};return"fixed"===oe.css(n,"position")?e=n.getBoundingClientRect():(t=this.offsetParent(),e=this.offset(),oe.nodeName(t[0],"html")||(r=t.offset()),r.top+=oe.css(t[0],"borderTopWidth",!0),r.left+=oe.css(t[0],"borderLeftWidth",!0)),{top:e.top-r.top-oe.css(n,"marginTop",!0),left:e.left-r.left-oe.css(n,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){for(var t=this.offsetParent||$;t&&!oe.nodeName(t,"html")&&"static"===oe.css(t,"position");)t=t.offsetParent;return t||$})}}),oe.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(n,r){var i="pageYOffset"===r;oe.fn[n]=function(o){return oe.access(this,function(n,o,s){var a=z(n);return s===e?a?a[r]:n[o]:(a?a.scrollTo(i?t.pageXOffset:s,i?s:t.pageYOffset):n[o]=s,void 0)},n,o,arguments.length,null)}}),oe.each({Height:"height",Width:"width"},function(t,n){oe.each({padding:"inner"+t,content:n,"":"outer"+t},function(r,i){oe.fn[i]=function(i,o){var s=arguments.length&&(r||"boolean"!=typeof i),a=r||(i===!0||o===!0?"margin":"border");return oe.access(this,function(n,r,i){var o;return oe.isWindow(n)?n.document.documentElement["client"+t]:9===n.nodeType?(o=n.documentElement,Math.max(n.body["scroll"+t],o["scroll"+t],n.body["offset"+t],o["offset"+t],o["client"+t])):i===e?oe.css(n,r,a):oe.style(n,r,i,a)},n,s?i:e,s,null)}})}),oe.fn.size=function(){return this.length},oe.fn.andSelf=oe.fn.addBack,"object"==typeof module&&"object"==typeof module.exports?module.exports=oe:"function"==typeof define&&define.amd&&define("jquery",[],function(){return oe}),"object"==typeof t&&"object"==typeof t.document&&(t.jQuery=t.$=oe)}(window),function(t){if("function"==typeof bootstrap)bootstrap("xmpp",t);else if("object"==typeof exports)module.exports=t();else if("function"==typeof define&&define.amd)define(t);else if("undefined"!=typeof ses){if(!ses.ok())return;ses.makeXMPP=t}else"undefined"!=typeof window?window.XMPP=t():global.XMPP=t()}(function(){var t;return function(t,e,n){function r(n,o){if(!e[n]){if(!t[n]){var s="function"==typeof require&&require;if(!o&&s)return s(n,!0);if(i)return i(n,!0);throw new Error("Cannot find module '"+n+"'")}var a=e[n]={exports:{}};t[n][0].call(a.exports,function(e){var i=t[n][1][e];return r(i?i:e)},a,a.exports)}return e[n].exports}for(var i="function"==typeof require&&require,o=0;o<n.length;o++)r(n[o]);return r}({1:[function(t,e,n){n.Message=t("./lib/stanza/message"),n.Presence=t("./lib/stanza/presence"),n.Iq=t("./lib/stanza/iq"),n.Client=t("./lib/client"),n.crypto=t("crypto"),n.createClient=function(e){var r=new n.Client(e);return r.use(t("./lib/plugins/disco")),r.use(t("./lib/plugins/chatstates")),r.use(t("./lib/plugins/delayed")),r.use(t("./lib/plugins/forwarding")),r.use(t("./lib/plugins/carbons")),r.use(t("./lib/plugins/time")),r.use(t("./lib/plugins/mam")),r.use(t("./lib/plugins/receipts")),r.use(t("./lib/plugins/idle")),r.use(t("./lib/plugins/correction")),r.use(t("./lib/plugins/attention")),r.use(t("./lib/plugins/version")),r.use(t("./lib/plugins/invisible")),r.use(t("./lib/plugins/muc")),r.use(t("./lib/plugins/webrtc")),r.use(t("./lib/plugins/pubsub")),r.use(t("./lib/plugins/avatar")),r}},{"./lib/client":2,"./lib/plugins/attention":3,"./lib/plugins/avatar":4,"./lib/plugins/carbons":5,"./lib/plugins/chatstates":6,"./lib/plugins/correction":7,"./lib/plugins/delayed":8,"./lib/plugins/disco":9,"./lib/plugins/forwarding":10,"./lib/plugins/idle":11,"./lib/plugins/invisible":12,"./lib/plugins/mam":13,"./lib/plugins/muc":14,"./lib/plugins/pubsub":15,"./lib/plugins/receipts":16,"./lib/plugins/time":17,"./lib/plugins/version":18,"./lib/plugins/webrtc":19,"./lib/stanza/iq":33,"./lib/stanza/message":35,"./lib/stanza/presence":37,crypto:60}],2:[function(t,e){function n(t){var e=this;r.call(this),this.config=t||{},this._idPrefix=s.v4(),this._idCount=0,this.negotiatedFeatures={},this.featureOrder=["sasl","streamManagement","bind","streamManagement","session"],this.features={},this.conn=new f,this.conn.on("*",function(t,n){e.emit(t,n)}),this.on("streamFeatures",function(t){var n=[function(e){e(null,t)}],r=["setup"];e.featureOrder.forEach(function(i){t._extensions[i]&&!e.negotiatedFeatures[i]&&(n.push(function(t,n){!e.negotiatedFeatures[i]&&e.features[i]?e.features[i](t,n):n(null,t)}),r.push(i))}),o.waterfall(n,function(t){"restart"===t?e.conn.restart():"disconnect"===t&&e.disconnect()})}),this.features.sasl=function(t,n){var r=p.create(t.sasl.mechanisms);e.on("sasl:success","sasl",function(){e.negotiatedFeatures.sasl=!0,e.releaseGroup("sasl"),e.emit("auth:success"),n("restart")}),e.on("sasl:challenge","sasl",function(t){r.challenge(t.value),e.send(new a.Response({value:r.response(e.getCredentials())})),n()}),e.on("sasl:failure","sasl",function(){e.releaseGroup("sasl"),e.emit("auth:failed"),n("disconnect")}),e.on("sasl:abort","sasl",function(){e.releaseGroup("sasl"),e.emit("auth:failed"),n("disconnect")});var i={mechanism:r.name};r.clientFirst&&(i.value=r.response(e.getCredentials())),e.send(new a.Auth(i))},this.features.bind=function(t,n){e.sendIq({type:"set",bind:{resource:e.config.resource}},function(r,i){e.negotiatedFeatures.bind=!0,e.emit("session:bound",i.bind.jid),e.jid=i.bind.jid,t._extensions.session||(e.sessionStarted=!0,e.emit("session:started",i.bind.jid)),n(null,t)})},this.features.session=function(t,n){e.sendIq({type:"set",session:{}},function(){e.negotiatedFeatures.session=!0,e.sessionStarted=!0,e.emit("session:started",e.jid),n(null,t)})},this.features.streamManagement=function(t,n){e.on("stream:management:enabled","sm",function(r){e.conn.sm.enabled(r),e.negotiatedFeatures.streamManagement=!0,e.on("stream:management:ack","connection",function(t){e.conn.sm.process(t)}),e.on("stream:management:request","connection",function(){e.conn.sm.ack()}),e.releaseGroup("sm"),n(null,t)}),e.on("stream:management:resumed","sm",function(r){e.conn.sm.enabled(r),e.negotiatedFeatures.streamManagement=!0,e.negotiatedFeatures.bind=!0,e.sessionStarted=!0,e.on("stream:management:ack","connection",function(t){e.conn.sm.process(t)}),e.on("stream:management:request","connection",function(){e.conn.sm.ack()}),e.releaseGroup("sm"),n(null,t)}),e.on("stream:management:failed","sm",function(){e.conn.sm.failed(),e.emit("session:end"),e.releaseGroup("session"),e.releaseGroup("sm"),n(null,t)}),e.conn.sm.id?e.conn.sm.id&&e.conn.sm.allowResume?e.conn.sm.resume():n(null,t):e.negotiatedFeatures.bind?e.conn.sm.enable():n(null,t)},this.on("disconnected",function(){e.sessionStarted=!1,e.negotiatedFeatures.sasl=!1,e.negotiatedFeatures.streamManagement=!1,e.negotiatedFeatures.bind=!1,e.releaseGroup("connection")}),this.on("iq:set:roster",function(t){e.emit("roster:update",t),e.sendIq({id:t.id,type:"result"})}),this.on("iq",function(t){var n=t.type,r=Object.keys(t._extensions),o=t.xml.childNodes,s=0;if(i.each(o,function(t){1===t.nodeType&&(s+=1)}),"get"===t.type||"set"===t.type){if(1!=s)return e.sendIq({id:t.id,type:"error",error:{type:"modify",condition:"bad-request"}});if(!r.length)return e.sendIq({id:t.id,type:"error",error:{type:"cancel",condition:"feature-not-implemented"}});var a="iq:"+n+":"+r[0];e.callbacks[a]?e.emit(a,t):e.sendIq({id:t.id,type:"error",error:{type:"cancel",condition:"feature-not-implemented"}})}}),this.on("message",function(t){Object.keys(t.$body).length&&("chat"===t.type||"normal"===t.type?e.emit("chat",t):"groupchat"===t.type&&e.emit("groupchat",t))}),this.on("presence",function(t){var n=t.type||"available";e.emit(n,t)})}var r=t("wildemitter"),i=t("../vendor/lodash"),o=t("async"),s=t("node-uuid"),a=t("./stanza/sasl"),u=t("./stanza/message"),c=t("./stanza/presence"),l=t("./stanza/iq"),f=t("./websocket"),h=t("hostmeta"),p=t("saslmechanisms");p=new p,p.use(t("sasl-external")),p.use(t("sasl-scram-sha-1")),p.use(t("sasl-digest-md5")),p.use(t("sasl-plain")),p.use(t("sasl-anonymous")),t("./stanza/stream"),t("./stanza/sm"),t("./stanza/roster"),t("./stanza/error"),t("./stanza/streamError"),t("./stanza/streamFeatures"),t("./stanza/bind"),t("./stanza/session"),n.prototype=Object.create(r.prototype,{constructor:{value:n}}),n.prototype.__defineGetter__("stream",function(){return this.conn?this.conn.stream:void 0}),n.prototype.use=function(t){t(this)},n.prototype.nextId=function(){return this._idPrefix+"-"+(this._idCount++).toString(16)},n.prototype.discoverBindings=function(t,e){h(t,function(t,n){if(t)return e(t,[]);var r=[],i=n.links||[];i.forEach(function(t){t.href&&"urn:xmpp:altconnect:websocket"===t.rel&&r.push(t.href)}),e(!1,r)})},n.prototype.getCredentials=function(){var t=this.config.credentials||{},e=this.config.jid,n=t.username||e.slice(0,e.indexOf("@")),r=t.server||e.slice(e.indexOf("@")+1),o={username:n,password:this.config.password,server:r,host:r,realm:r,serviceType:"xmpp",serviceName:r};return i.extend(o,t)},n.prototype.connect=function(t){var e=this;return i.extend(e.config,t||{}),e.config.wsURL?e.conn.connect(e.config):(e.discoverBindings(e.config.server,function(t,n){!t&&n.length?(e.config.wsURL=n[0],e.conn.connect(e.config)):e.disconnect()}),void 0)},n.prototype.disconnect=function(){this.sessionStarted&&(this.emit("session:end"),this.releaseGroup("session")),this.sessionStarted=!1,this.releaseGroup("connection"),this.conn&&this.conn.disconnect()},n.prototype.send=function(t){this.conn.send(t)},n.prototype.sendMessage=function(t){t=t||{},t.id||(t.id=this.nextId());var e=new u(t);this.emit("message:sent",e),this.send(e)},n.prototype.sendPresence=function(t){t=t||{},t.id||(t.id=this.nextId()),this.send(new c(t))},n.prototype.sendIq=function(t,e){t=t||{},e=e||function(){},t.id||(t.id=this.nextId()),("get"===t.type||"set"===t.type)&&this.once("id:"+t.id,"session",function(t){t._extensions.error?e(t,null):e(null,t)}),this.send(new l(t))},n.prototype.getRoster=function(t){var e=this;t=t||function(){},this.sendIq({type:"get",roster:{ver:e.config.rosterVer}},function(n,r){return n?t(n):("result"===r.type&&r.roster.ver&&(e.config.rosterVer=r.roster.ver,e.emit("roster:ver",r.roster.ver)),t(null,r),void 0)})},n.prototype.updateRosterItem=function(t,e){this.sendIq({type:"set",roster:{items:[t]}},e)},n.prototype.removeRosterItem=function(t,e){this.updateRosterItem({jid:t,subscription:"remove"},e)},n.prototype.subscribe=function(t){this.sendPresence({type:"subscribe",to:t})},n.prototype.unsubscribe=function(t){this.sendPresence({type:"unsubscribe",to:t})},n.prototype.acceptSubscription=function(t){this.sendPresence({type:"subscribed",to:t})},n.prototype.denySubscription=function(t){this.sendPresence({type:"unsubscribed",to:t})},e.exports=n},{"../vendor/lodash":90,"./stanza/bind":23,"./stanza/error":30,"./stanza/iq":33,"./stanza/message":35,"./stanza/presence":37,"./stanza/roster":41,"./stanza/sasl":43,"./stanza/session":44,"./stanza/sm":45,"./stanza/stream":46,"./stanza/streamError":47,"./stanza/streamFeatures":48,"./websocket":52,async:53,hostmeta:67,"node-uuid":76,"sasl-anonymous":78,"sasl-digest-md5":80,"sasl-external":82,"sasl-plain":84,"sasl-scram-sha-1":86,saslmechanisms:88,wildemitter:89}],3:[function(t,e){t("../stanza/attention"),e.exports=function(t){t.disco.addFeature("urn:xmpp:attention:0"),t.getAttention=function(e,n){n=n||{},n.to=e,n.type="headline",n.attention=!0,t.sendMessage(n)},t.on("message",function(e){e._extensions._attention&&t.emit("attention",e)})}},{"../stanza/attention":21}],4:[function(t,e){t("../stanza/avatar"),e.exports=function(t){t.disco.addFeature("urn:xmpp:avatar:metadata+notify"),t.on("pubsubEvent",function(e){e.event._extensions.updated&&"urn:xmpp:avatar:metadata"===e.event.updated.node&&t.emit("avatar",{jid:e.from,avatars:e.event.updated.published[0].avatars})}),t.publishAvatar=function(e,n,r){t.publish(null,"urn:xmpp:avatar:data",{id:e,avatarData:n},r)},t.useAvatars=function(e,n){t.publish(null,"urn:xmpp:avatar:metadata",{id:"current",avatars:e},n)},t.getAvatar=function(e,n,r){t.getItem(e,"urn:xmpp:avatar:data",n,r)}}},{"../stanza/avatar":22}],5:[function(t,e){t("../stanza/carbons"),e.exports=function(t){t.disco.addFeature("urn:xmpp:carbons:2"),t.enableCarbons=function(t){this.sendIq({type:"set",enableCarbons:!0},t)},t.disableCarbons=function(t){this.sendIq({type:"set",disableCarbons:!0},t)},t.on("message",function(e){return e._extensions.carbonSent?t.emit("carbon:sent",e):e._extensions.carbonReceived?t.emit("carbon:received",e):void 0})}},{"../stanza/carbons":25}],6:[function(t,e){t("../stanza/chatstates"),e.exports=function(t){t.disco.addFeature("http://jabber.org/protocol/chatstates"),t.on("message",function(e){e.chatState&&t.emit("chatState",{to:e.to,from:e.from,chatState:e.chatState})})}},{"../stanza/chatstates":26}],7:[function(t,e){t("../stanza/replace"),e.exports=function(t){t.disco.addFeature("urn:xmpp:message-correct:0"),t.on("message",function(e){e.replace&&(t.emit("replace",e),t.emit("replace:"+e.id,e))})}},{"../stanza/replace":40}],8:[function(t,e){t("../stanza/delayed"),e.exports=function(t){t.disco.addFeature("urn:xmpp:delay")}},{"../stanza/delayed":28}],9:[function(t,e){function n(t,e){var n="",r=t.features.sort(),a=[],u={},c=[];i.forEach(t.identities,function(t){a.push([t.category||"",t.type||"",t.lang||"",t.name||""].join("/"))});var l=a.length,f=r.length;if(a=i.unique(a,!0),r=i.unique(r,!0),f!=r.length||l!=a.length)return!1;n+=a.join("<")+"<",n+=r.join("<")+"<";var h=!1;if(i.forEach(t.extensions,function(t){for(var e=t.fields,n=0,r=e.length;r>n;n++)if("FORM_TYPE"==e[n].name&&"hidden"==e[n].type){var i=e[n].value;return u[i]?(h=!0,void 0):(u[i]=t,c.push(i),void 0)}}),h)return!1;c.sort(),i.forEach(c,function(t){var e=u[t],r={},o=[];n+="<"+t,i.forEach(e.fields,function(t){var e=t.name;if("FORM_TYPE"!=e){var n=t.value||"";"object"!=typeof n&&(n=n.split("\n")),r[e]=n.sort(),o.push(e)}}),o.sort(),i.forEach(o,function(t){n+="<"+t,i.forEach(r[t],function(t){n+="<"+t})})}),"sha-1"===e&&(e="sha1");var p=o.createHash(e).update(s.encode(n)).digest("base64"),d=4-p.length%4;4===d&&(d=0);for(var g=0;d>g;g++)p+="=";return p}function r(){this.features={},this.identities={},this.extensions={},this.items={},this.caps={}}var i=t("../../vendor/lodash"),o=t("crypto");t("../stanza/disco"),t("../stanza/caps");var s={encode:function(t){return unescape(encodeURIComponent(t))},decode:function(t){return decodeURIComponent(escape(t))}};r.prototype={constructor:{value:r},addFeature:function(t,e){e=e||"",this.features[e]||(this.features[e]=[]),this.features[e].push(t)},addIdentity:function(t,e){e=e||"",this.identities[e]||(this.identities[e]=[]),this.identities[e].push(t)},addItem:function(t,e){e=e||"",this.items[e]||(this.items[e]=[]),this.items[e].push(t)},addExtension:function(t,e){e=e||"",this.extensions[e]||(this.extensions[e]=[]),this.extensions[e].push(t)}},e.exports=function(t){t.disco=new r(t),t.disco.addFeature("http://jabber.org/protocol/disco#info"),t.disco.addIdentity({category:"client",type:"web"}),t.getDiscoInfo=function(t,e,n){this.sendIq({to:t,type:"get",discoInfo:{node:e}},n)
|
||
},t.getDiscoItems=function(t,e,n){this.sendIq({to:t,type:"get",discoItems:{node:e}},n)},t.updateCaps=function(){this.disco.caps={node:this.config.capsNode||"https://stanza.io",hash:"sha-1",ver:n({identities:this.disco.identities[""],features:this.disco.features[""],extensions:this.disco.extensions[""]},"sha-1")}},t.on("iq:get:discoInfo",function(e){var n=e.discoInfo.node,r=e.discoInfo.node;n===t.disco.caps.node+"#"+t.disco.caps.ver&&(r=n,n=""),t.sendIq(e.resultReply({discoInfo:{node:r,identities:t.disco.identities[n]||[],features:t.disco.features[n]||[],extensions:t.disco.extensions[n]||[]}}))}),t.on("iq:get:discoItems",function(e){var n=e.discoInfo.node;t.sendIq(e.resultReply({discoItems:{node:n,items:t.disco.items[n]||[]}}))})}},{"../../vendor/lodash":90,"../stanza/caps":24,"../stanza/disco":29,crypto:60}],10:[function(t,e){t("../stanza/forwarded"),e.exports=function(t){t.disco.addFeature("urn:xmpp:forward:0")}},{"../stanza/forwarded":31}],11:[function(t,e){t("../stanza/idle"),e.exports=function(t){t.disco.addFeature("urn:xmpp:idle:0")}},{"../stanza/idle":32}],12:[function(t,e){t("../stanza/visibility"),e.exports=function(t){t.goInvisible=function(){this.sendIq({type:"set",invisible:!0})},t.goVisible=function(){this.sendIq({type:"set",visible:!0})}}},{"../stanza/visibility":51}],13:[function(t,e){t("../stanza/mam"),e.exports=function(t){t.disco.addFeature("urn:xmpp:mam:tmp"),t.getHistory=function(t,e){var n=this,r=this.nextId();t=t||{},t.queryid=r;var i=[];this.on("mam:"+r,"session",function(t){i.push(t)}),e=e||function(){},this.sendIq({type:"get",id:r,mamQuery:t},function(t,o){t?e(t):(n.off("mam:"+r),o.mamQuery.results=i,e(null,o))})},t.getHistoryPreferences=function(e){t.sendIq({type:"get",mamPrefs:{}},e)},t.setHistoryPreferences=function(e,n){t.sendIq({type:"set",mamPrefs:e},n)},t.on("message",function(e){e._extensions.mam&&t.emit("mam:"+e.mam.queryid,e)})}},{"../stanza/mam":34}],14:[function(t,e){t("../stanza/muc"),e.exports=function(t){t.joinRoom=function(t,e,n){n=n||{},n.to=t+"/"+e,n.caps=this.disco.caps,n.joinMuc=n.joinMuc||{},this.sendPresence(n)},t.leaveRoom=function(t,e,n){n=n||{},n.to=t+"/"+e,n.type="unavailable",this.sendPresence(n)}}},{"../stanza/muc":36}],15:[function(t,e){t("../stanza/pubsub"),e.exports=function(t){t.on("message",function(e){e._extensions.event&&t.emit("pubsubEvent",e)}),t.subscribeToNode=function(e,n,r){t.sendIq({type:"set",to:e,pubsub:{subscribe:{node:n.node,jid:n.jid||t.jid}}},r)},t.unsubscribeFromNode=function(e,n,r){t.sendIq({type:"set",to:e,pubsub:{unsubscribe:{node:n.node,jid:n.jid||t.jid.split("/")[0]}}},r)},t.publish=function(e,n,r,i){t.sendIq({type:"set",to:e,pubsub:{publish:{node:n,item:r}}},i)},t.getItem=function(e,n,r,i){t.sendIq({type:"get",to:e,pubsub:{retrieve:{node:n,item:r}}},i)},t.getItems=function(e,n,r,i){r=r||{},r.node=n,t.sendIq({type:"get",to:e,pubsub:{retrieve:{node:n,max:r.max},rsm:r.rsm}},i)},t.retract=function(e,n,r,i,o){t.sendIq({type:"set",to:e,pubsub:{retract:{node:n,notify:i,id:r}}},o)},t.purgeNode=function(e,n,r){t.sendIq({type:"set",to:e,pubsubOwner:{purge:n}},r)},t.deleteNode=function(e,n,r){t.sendIq({type:"set",to:e,pubsubOwner:{del:n}},r)},t.createNode=function(e,n,r,i){var o={type:"set",to:e,pubsubOwner:{create:n}};r&&(o.pubsubOwner.config={form:r}),t.sendIq(o,i)}}},{"../stanza/pubsub":38}],16:[function(t,e){t("../stanza/receipts"),e.exports=function(t){t.disco.addFeature("urn:xmpp:receipts"),t.on("message",function(e){var n={normal:!0,chat:!0,headline:!0};n[e.type]&&e.requestReceipt&&!e._extensions.receipt&&t.sendMessage({to:e.from,receipt:{id:e.id},id:e.id}),e._extensions.receipt&&t.emit("receipt:"+e.receipt.id)})}},{"../stanza/receipts":39}],17:[function(t,e){t("../stanza/time"),e.exports=function(t){t.disco.addFeature("urn:xmpp:time"),t.getTime=function(t,e){this.sendIq({to:t,type:"get",time:!0},e)},t.on("iq:get:time",function(e){var n=new Date;t.sendIq(e.resultReply({time:{utc:n,tzo:n.getTimezoneOffset()}}))})}},{"../stanza/time":49}],18:[function(t,e){t("../stanza/version"),e.exports=function(t){t.disco.addFeature("jabber:iq:version"),t.on("iq:get:version",function(e){t.sendIq(e.resultReply({version:t.config.version||{name:"stanza.io"}}))}),t.getSoftwareVersion=function(t,e){this.sendIq({to:t,type:"get",version:{}},e)}}},{"../stanza/version":50}],19:[function(t,e){function n(t){var e=this;return this.client=t,this.peerConnectionConfig={iceServers:"firefox"==f?[{url:"stun:124.124.124.2"}]:[{url:"stun:stun.l.google.com:19302"}]},this.peerConnectionConstraints={optional:[{DtlsSrtpKeyAgreement:!0}]},this.media={audio:!0,video:{mandatory:{},optional:[]}},this.sessions={},this.peerSessions={},this.attachMediaStream=c,h?(t.emit("webrtc:supported"),t.disco.addFeature("http://stanza.io/protocol/sox"),t.on("message",function(n){if("error"!==n.type&&n._extensions.sox){var i,o=n.from+":"+n.sox.sid;"offer"===n.sox.type?(console.log("got an offer"),i=new r(t,n.from,n.sox.sid),e.sessions[o]=i,e.peerSessions[n.from]||(e.peerSessions[n.from]=[]),e.peerSessions[n.from].push(o)):"answer"===n.sox.type?(console.log("got an answer"),i=e.sessions[o],i&&(console.log("Setting remote description"),i.conn.setRemoteDescription(new s({type:"answer",sdp:n.sox.sdp})))):"candidate"===n.sox.type&&(i=e.sessions[o],i&&(console.log("Adding new ICE candidate"),i.conn.addIceCandidate(new a({sdpMLineIndex:n.sox.label,candidate:n.sox.sdp})))),t.emit("webrtc:"+n.sox.type,n)}}),void 0):(t.emit("webrtc:unsupported"),e)}function r(t,e,n){var r=this;this.client=t,this.jid=e,this.sid=n,this.closed=!1,this.conn=new o(t.webrtc.peerConnectionConfig,t.webrtc.peerConnectionConstraints),this.conn.addStream(t.webrtc.localStream),this.conn.onicecandidate=function(t){r.closed||(t.candidate?(console.log("Sending candidate"),r.client.sendMessage({mto:r.jid,sox:{type:"candidate",sid:r.sid,label:t.candidate.sdpMLineIndex,id:t.candidate.sdpMid,sdp:t.candidate.candidate}})):console.log("End of ICE candidates"))},this.conn.onaddstream=function(t){r.client.emit("webrtc:stream:added",{stream:t.stream,sid:r.sid,peer:r.jid})},this.conn.onremovestream=function(){r.client.emit("webrtc:stream:removed",{sid:r.sid,peer:r.jid})},this.mediaConstraints={mandatory:{OfferToReceiveAudio:!0,OfferToReceiveVideo:!0}}}var i=t("node-uuid"),o=null,s=null,a=null,u=null,c=null,l=null,f=null,h=!0;navigator.mozGetUserMedia?(f="firefox",o=window.mozRTCPeerConnection,s=window.mozRTCSessionDescription,a=window.mozRTCIceCandidate,u=navigator.mozGetUserMedia.bind(navigator),c=function(t,e){t.mozSrcObject=e,t.play()},l=function(t,e){t.mozSrcObject=e.mozSrcObject,t.play()},MediaStream.prototype.getVideoTracks=function(){return[]},MediaStream.prototype.getAudioTracks=function(){return[]}):navigator.webkitGetUserMedia?(f="chrome",o=window.webkitRTCPeerConnection,u=navigator.webkitGetUserMedia.bind(navigator),c=function(t,e){t.autoplay=!0,t.src=webkitURL.createObjectURL(e)},l=function(t,e){t.src=e.src},webkitMediaStream.prototype.getVideoTracks||(webkitMediaStream.prototype.getVideoTracks=function(){return this.videoTracks},webkitMediaStream.prototype.getAudioTracks=function(){return this.audioTracks}),window.webkitRTCPeerConnection.prototype.getLocalStreams||(window.webkitRTCPeerConnection.prototype.getLocalStreams=function(){return this.localStreams},window.webkitRTCPeerConnection.prototype.getRemoteStreams=function(){return this.remoteStreams})):h=!1,n.prototype={constructor:{value:n},testReadiness:function(){var t=this;this.localStream&&this.client.sessionStarted&&setTimeout(function(){t.client.emit("webrtc:ready")},1e3)},startLocalMedia:function(t){var e=this;u(this.media,function(n){c(t,n),e.localStream=n,e.testReadiness()},function(){throw new Error("Failed to get access to local media.")})},offerSession:function(t){var e=this,n=i.v4(),o=new r(this.client,t,n);this.sessions[t+":"+n]=o,this.peerSessions[t]||(this.peerSessions[t]=[]),this.peerSessions[t].push(t+":"+n),o.conn.createOffer(function(r){console.log("Setting local description"),o.conn.setLocalDescription(r),console.log("Sending offer"),e.client.sendMessage({to:t,sox:{type:"offer",sid:n,sdp:r.sdp}})},null,this.mediaConstraints)},acceptSession:function(t){var e=this,n=e.sessions[t.from+":"+t.sox.sid];n&&(console.log("Setting remote description"),n.conn.setRemoteDescription(new s({type:"offer",sdp:t.sox.sdp})),n.conn.createAnswer(function(t){console.log("Setting local description"),n.conn.setLocalDescription(t),console.log("Sending answer"),e.client.sendMessage({to:n.jid,sox:{type:"answer",sid:n.sid,sdp:t.sdp}})},null,this.mediaConstraints))},declineSession:function(t){this.endSession(t.from,t.sox.sid)},endSession:function(t,e){var n=this.sessions[t+":"+e];if(n){var r=t+":"+e,i=this.peerSessions[t].indexOf(r);-1!=i&&this.peerSessions.splice(i,1),this.sessions[r]=void 0,n.conn.close(),this.client.emit("webrtc:stream:removed",{sid:n.sid,peer:n.jid}),this.client.sendMessage({to:t,sox:{type:"end",sid:e}})}},mute:function(){this._audioEnabled(!1),this.client.emit("webrtc:audio:off")},unmute:function(){this._audioEnabled(!0),this.client.emit("webrtc:audio:on")},pauseVideo:function(){this._videoEnabled(!1),this.client.emit("webrtc:video:off")},resumeVideo:function(){this._videoEnabled(!0),this.client.emit("webrtc:video:on")},pause:function(){this.mute(),this.pauseVideo()},resume:function(){this.unmute(),this.resumeVideo()},_audioEnabled:function(t){this.localStream.getAudioTracks().forEach(function(e){e.enabled=!!t})},_videoEnabled:function(t){this.localStream.getVideoTracks().forEach(function(e){e.enabled=!!t})}},r.prototype={constructor:{value:r}},e.exports=function(t){t.webrtc=new n(t)}},{"node-uuid":76}],20:[function(t,e){function n(t,e){return(t%e+e)%e}function r(t){this.conn=t,this.id=!1,this.allowResume=!0,this.started=!1,this.lastAck=0,this.handled=0,this.windowSize=1,this.windowCount=0,this.unacked=[]}var i=t("./stanza/sm"),o=Math.pow(2,32);r.prototype={constructor:{value:r},enable:function(){var t=new i.Enable;t.resume=this.allowResume,this.conn.send(t),this.handled=0,this.started=!0},resume:function(){var t=new i.Resume({h:this.handled,previd:this.id});this.conn.send(t),this.started=!0},enabled:function(t){this.id=t.id},resumed:function(t){this.id=t.id,t.h&&this.process(t,!0)},failed:function(){this.started=!1,this.id=!1,this.lastAck=0,this.handled=0,this.windowCount=0,this.unacked=[]},ack:function(){this.conn.send(new i.Ack({h:this.handled}))},request:function(){this.conn.send(new i.Request)},process:function(t,e){for(var r=this,i=n(t.h-this.lastAck,o),s=0;i>s&&this.unacked.length>0;s++)this.conn.emit("stanza:acked",this.unacked.shift());if(e){var a=this.unacked;this.unacked=[],a.forEach(function(t){r.conn.send(t)})}this.lastAck=t.h},track:function(t){var e=t._name,n={message:!0,presence:!0,iq:!0};this.started&&n[e]&&(this.unacked.push(t),this.windowCount+=1,this.windowCount==this.windowSize&&(this.request(),this.windowCount=0))},handle:function(){this.started&&(this.handled=n(this.handled+1,o))}},e.exports=r},{"./stanza/sm":45}],21:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./message");n.prototype={constructor:{value:n},NS:"urn:xmpp:attention:0",EL:"attention",_name:"_attention",toString:r.toString,toJSON:void 0},i.prototype.__defineGetter__("attention",function(){return!!this._extensions._attention}),i.prototype.__defineSetter__("attention",function(t){t?this._attention=!0:this._extensions._attention&&(this.xml.removeChild(this._extensions._attention.xml),delete this._extensions._attention)}),r.extend(i,n),e.exports=n},{"./message":35,jxt:74}],22:[function(t,e){function n(){return u.getSubText(this.xml,"urn:xmpp:avatar:data","data")}function r(t){u.setSubText(this.xml,"urn:xmpp:avatar:data","data",t),u.setSubAttribute(this.xml,"urn:xmpp:avatar:data","data","xmlns","urn:xmpp:avatar:data")}function i(){var t=u.find(this.xml,"urn:xmpp:avatar:metadata","metadata"),e=[];if(t.length){var n=u.find(t[0],"urn:xmpp:avatar:metadata","info");a.forEach(n,function(t){e.push(new s({},t))})}return e}function o(t){var e=u.findOrCreate(this.xml,"urn:xmpp:avatar:metadata","metadata");u.setAttribute(e,"xmlns","urn:xmpp:avatar:metadata"),a.forEach(t,function(t){var n=new s(t);e.appendChild(n.xml)})}function s(t,e){return u.init(this,e,t)}var a=t("../../vendor/lodash"),u=t("jxt"),c=t("./pubsub").Item,l=t("./pubsub").EventItem;c.prototype.__defineGetter__("avatarData",n),c.prototype.__defineSetter__("avatarData",r),l.prototype.__defineGetter__("avatarData",n),l.prototype.__defineSetter__("avatarData",r),c.prototype.__defineGetter__("avatars",i),c.prototype.__defineSetter__("avatars",o),l.prototype.__defineGetter__("avatars",i),l.prototype.__defineSetter__("avatars",o),s.prototype={constructor:{value:s},_name:"avatars",NS:"urn:xmpp:avatar:metadata",EL:"info",toString:u.toString,toJSON:u.toJSON,get id(){return u.getAttribute(this.xml,"id")},set id(t){u.setAttribute(this.xml,"id",t)},get bytes(){return u.getAttribute(this.xml,"bytes")},set bytes(t){u.setAttribute(this.xml,"bytes",t)},get height(){return u.getAttribute(this.xml,"height")},set height(t){u.setAttribute(this.xml,"height",t)},get width(){return u.getAttribute(this.xml,"width")},set width(t){u.setAttribute(this.xml,"width",t)},get type(){return u.getAttribute(this.xml,"type","image/png")},set type(t){u.setAttribute(this.xml,"type",t)},get url(){return u.getAttribute(this.xml,"url")},set url(t){u.setAttribute(this.xml,"url",t)}},e.exports=s},{"../../vendor/lodash":90,"./pubsub":38,jxt:74}],23:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./iq"),o=t("./streamFeatures");n.prototype={constructor:{value:n},_name:"bind",NS:"urn:ietf:params:xml:ns:xmpp-bind",EL:"bind",toString:r.toString,toJSON:r.toJSON,get resource(){return r.getSubText(this.xml,this.NS,"resource")},set resource(){r.setSubText(this.xml,this.NS,"resource")},get jid(){return r.getSubText(this.xml,this.NS,"jid")},set jid(){r.setSubText(this.xml,this.NS,"jid")}},r.extend(i,n),r.extend(o,n),e.exports=n},{"./iq":33,"./streamFeatures":48,jxt:74}],24:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./presence"),o=t("./streamFeatures");n.prototype={constructor:{value:n},NS:"http://jabber.org/protocol/caps",EL:"c",_name:"caps",toString:r.toString,toJSON:r.toJSON,get ver(){return r.getAttribute(this.xml,"ver")},set ver(t){r.setAttribute(this.xml,"ver",t)},get node(){return r.getAttribute(this.xml,"node")},set node(t){r.setAttribute(this.xml,"node",t)},get hash(){return r.getAttribute(this.xml,"hash")},set hash(t){r.setAttribute(this.xml,"hash",t)},get ext(){return r.getAttribute(this.xml,"ext")},set ext(t){r.setAttribute(this.xml,"ext",t)}},r.extend(i,n),r.extend(o,n),e.exports=n},{"./presence":37,"./streamFeatures":48,jxt:74}],25:[function(t,e,n){function r(t,e){return u.init(this,e,t)}function i(t,e){return u.init(this,e,t)}function o(t,e){return u.init(this,e,t)}function s(t,e){return u.init(this,e,t)}function a(t,e){return u.init(this,e,t)}var u=t("jxt"),c=t("./message"),l=t("./iq"),f=t("./forwarded");r.prototype={constructor:{value:r},NS:"urn:xmpp:carbons:2",EL:"sent",_name:"carbonSent",_eventname:"carbon:sent",toString:u.toString,toJSON:u.toJSON},i.prototype={constructor:{value:i},NS:"urn:xmpp:carbons:2",EL:"received",_name:"carbonReceived",_eventname:"carbon:received",toString:u.toString,toJSON:u.toJSON},o.prototype={constructor:{value:o},NS:"urn:xmpp:carbons:2",EL:"private",_name:"carbonPrivate",_eventname:"carbon:private",toString:u.toString,toJSON:u.toJSON},s.prototype={constructor:{value:s},NS:"urn:xmpp:carbons:2",EL:"enable",_name:"enableCarbons",toString:u.toString,toJSON:u.toJSON},a.prototype={constructor:{value:a},NS:"urn:xmpp:carbons:2",EL:"disable",_name:"disableCarbons",toString:u.toString,toJSON:u.toJSON},u.extend(r,f),u.extend(i,f),u.extend(c,r),u.extend(c,i),u.extend(c,o),u.extend(l,s),u.extend(l,a),n.Sent=r,n.Received=i,n.Private=o,n.Enable=s,n.Disable=a},{"./forwarded":31,"./iq":33,"./message":35,jxt:74}],26:[function(t){function e(t,e){return s.init(this,e,t)}function n(t,e){return s.init(this,e,t)}function r(t,e){return s.init(this,e,t)}function i(t,e){return s.init(this,e,t)}function o(t,e){return s.init(this,e,t)}var s=t("jxt"),a=t("./message");e.prototype={constructor:{value:e},NS:"http://jabber.org/protocol/chatstates",EL:"active",_name:"chatStateActive",_eventname:"chat:active",toString:s.toString,toJSON:void 0},n.prototype={constructor:{value:n},NS:"http://jabber.org/protocol/chatstates",EL:"composing",_name:"chatStateComposing",_eventname:"chat:composing",toString:s.toString,toJSON:void 0},r.prototype={constructor:{value:r},NS:"http://jabber.org/protocol/chatstates",EL:"paused",_name:"chatStatePaused",_eventname:"chat:paused",toString:s.toString,toJSON:void 0},i.prototype={constructor:{value:i},NS:"http://jabber.org/protocol/chatstates",EL:"inactive",_name:"chatStateInactive",_eventname:"chat:inactive",toString:s.toString,toJSON:void 0},o.prototype={constructor:{value:o},NS:"http://jabber.org/protocol/chatstates",EL:"gone",_name:"chatStateGone",_eventname:"chat:gone",toString:s.toString,toJSON:void 0},s.extend(a,e),s.extend(a,n),s.extend(a,r),s.extend(a,i),s.extend(a,o),a.prototype.__defineGetter__("chatState",function(){for(var t=this,e=["Active","Composing","Paused","Inactive","Gone"],n=0;n<e.length;n++)if(t._extensions["chatState"+e[n]])return e[n].toLowerCase();return""}),a.prototype.__defineSetter__("chatState",function(t){var e=this,n=["Active","Composing","Paused","Inactive","Gone"];n.forEach(function(t){e._extensions["chatState"+t]&&(e.xml.removeChild(e._extensions["chatState"+t].xml),delete e._extensions["chatState"+t])}),t&&this["chatState"+t.charAt(0).toUpperCase()+t.slice(1)]})},{"./message":35,jxt:74}],27:[function(t,e,n){function r(t,e){return s.init(this,e,t)}function i(t,e){return s.init(this,e,t),this._type=t.type||this.type,this}var o=t("../../vendor/lodash"),s=t("jxt"),a=t("./message");r.prototype={constructor:{value:r},NS:"jabber:x:data",EL:"x",_name:"form",toString:s.toString,toJSON:s.toJSON,get title(){return s.getSubText(this.xml,this.NS,"title")},set title(t){s.setSubText(this.xml,this.NS,"title",t)},get instructions(){return s.getMultiSubText(this.xml,this.NS,"title").join("\n")},set instructions(t){s.setMultiSubText(this.xml,this.NS,"title",t.split("\n"))},get type(){return s.getAttribute(this.xml,"type","form")},set type(t){s.setAttribute(this.xml,"type",t)},get fields(){var t=s.find(this.xml,this.NS,"field"),e=[];return o.forEach(t,function(t){e.push(new i({},t).toJSON())}),e},set fields(t){var e=this;o.forEach(t,function(t){e.addField(t)})},addField:function(t){var e=new i(t);this.xml.appendChild(e.xml)}},i.prototype={constructor:{value:i},NS:"jabber:x:data",EL:"field",toString:s.toString,toJSON:s.toJSON,get type(){return s.getAttribute(this.xml,"type","text-single")},set type(t){this._type=t,s.setAttribute(this.xml,"type",t)},get name(){return s.getAttribute(this.xml,"var")},set name(t){s.setAttribute(this.xml,"var",t)},get desc(){return s.getSubText(this.xml,this.NS,"desc")},set desc(t){s.setSubText(this.xml,this.NS,"desc",t)},get value(){var t=s.getMultiSubText(this.xml,this.NS,"value");return"boolean"===this._type?"1"===t[0]||"true"===t[0]:t.length>1?"text-multi"===this._type?t.join("\n"):t:t[0]},set value(t){"boolean"===this._type?s.setSubText(this.xml,this.NS,"value",t?"1":"0"):("text-multi"===this._type&&(t=t.split("\n")),s.setMultiSubText(this.xml,this.NS,"value",t))},get required(){var t=s.find(this.xml,this.NS,"required");return t.length>0},set required(t){var e=s.find(this.xml,this.NS,"required");if(t&&0===e.length){var n=document.createElementNS(this.NS,"required");this.xml.appendChild(n)}else!t&&e.length>0&&o.forEach(e,function(t){this.xml.removeChild(t)})},get label(){return s.getAttribute(this.xml,"label")},set label(t){s.setAttribute(this.xml,"label",t)},get options(){var t=this;return s.getMultiSubText(this.xml,this.NS,"option",function(e){return s.getSubText(e,t.NS,"value")})},set options(t){var e=this;s.setMultiSubText(this.xml,this.NS,"option",t,function(t){var n=document.createElementNS(e.NS,"option"),r=document.createElementNS(e.NS,"value");n.appendChild(r),r.textContent=t,e.xml.appendChild(n)})}},s.extend(a,r),n.DataForm=r,n.Field=i},{"../../vendor/lodash":90,"./message":35,jxt:74}],28:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./message"),o=t("./presence");n.prototype={constructor:{value:n},NS:"urn:xmpp:delay",EL:"delay",_name:"delay",toString:r.toString,toJSON:r.toJSON,get from(){return r.getAttribute(this.xml,"from")},set from(t){r.setAttribute(this.xml,"from",t)},get stamp(){return new Date(r.getAttribute(this.xml,"stamp")||Date.now())},set stamp(t){r.setAttribute(this.xml,"stamp",t.toISOString())},get reason(){return this.xml.textContent||""},set reason(t){this.xml.textContent=t}},r.extend(i,n),r.extend(o,n),e.exports=n},{"./message":35,"./presence":37,jxt:74}],29:[function(t,e,n){function r(t,e){return o.init(this,e,t)}function i(t,e){return o.init(this,e,t)}t("../../vendor/lodash");var o=t("jxt"),s=t("./iq"),a=t("./rsm"),u=t("./dataforms").DataForm;r.prototype={constructor:{value:r},_name:"discoInfo",NS:"http://jabber.org/protocol/disco#info",EL:"query",toString:o.toString,toJSON:o.toJSON,get node(){return o.getAttribute(this.xml,"node")},set node(t){o.setAttribute(this.xml,"node",t)},get identities(){var t=[],e=o.find(this.xml,this.NS,"identity");return e.forEach(function(e){t.push({category:o.getAttribute(e,"category"),type:o.getAttribute(e,"type"),lang:e.getAttributeNS(o.XML_NS,"lang"),name:o.getAttribute(e,"name")})}),t},set identities(t){var e=this,n=o.find(this.xml,this.NS,"identity");n.forEach(function(t){e.xml.removeChild(t)}),t.forEach(function(t){var n=document.createElementNS(e.NS,"identity");o.setAttribute(n,"category",t.category),o.setAttribute(n,"type",t.type),o.setAttribute(n,"name",t.name),t.lang&&n.setAttributeNS(o.XML_NS,"lang",t.lang),e.xml.appendChild(n)})},get features(){var t=[],e=o.find(this.xml,this.NS,"feature");return e.forEach(function(e){t.push(e.getAttribute("var"))}),t},set features(t){var e=this,n=o.find(this.xml,this.NS,"feature");n.forEach(function(t){e.xml.removeChild(t)}),t.forEach(function(t){var n=document.createElementNS(e.NS,"feature");n.setAttribute("var",t),e.xml.appendChild(n)})},get extensions(){var t=[],e=o.find(this.xml,u.NS,u.EL);e.forEach(function(e){var n=new u({},e);t.push(n.toJSON())})},set extensions(t){var e=this,n=o.find(this.xml,u.NS,u.EL);n.forEach(function(t){e.xml.removeChild(t)}),t.forEach(function(t){var n=new u(t);e.xml.appendChild(n.xml)})}},i.prototype={constructor:{value:r},_name:"discoItems",NS:"http://jabber.org/protocol/disco#items",EL:"query",toString:o.toString,toJSON:o.toJSON,get node(){return o.getAttribute(this.xml,"node")},set node(t){o.setAttribute(this.xml,"node",t)},get items(){var t=[],e=o.find(this.xml,this.NS,"item");return e.forEach(function(e){t.push({jid:o.getAttribute(e,"jid"),node:o.getAttribute(e,"node"),name:o.getAttribute(e,"name")})}),t},set items(t){var e=this,n=o.find(this.xml,this.NS,"item");n.forEach(function(t){e.xml.removeChild(t)}),t.forEach(function(t){var n=document.createElementNS(e.NS,"item");o.setAttribute(n,"jid",t.jid),o.setAttribute(n,"node",t.node),o.setAttribute(n,"name",t.name),e.xml.appendChild(n)})}},o.extend(s,r),o.extend(s,i),o.extend(i,a),n.DiscoInfo=r,n.DiscoItems=i},{"../../vendor/lodash":90,"./dataforms":27,"./iq":33,"./rsm":42,jxt:74}],30:[function(t,e){function n(t,e){return r.init(this,e,t)}t("../../vendor/lodash");var r=t("jxt"),i=t("./message"),o=t("./presence"),s=t("./iq");n.prototype={constructor:{value:n},_name:"error",NS:"jabber:client",EL:"error",_ERR_NS:"urn:ietf:params:xml:ns:xmpp-stanzas",_CONDITIONS:["bad-request","conflict","feature-not-implemented","forbidden","gone","internal-server-error","item-not-found","jid-malformed","not-acceptable","not-allowed","not-authorized","payment-required","recipient-unavailable","redirect","registration-required","remote-server-not-found","remote-server-timeout","resource-constraint","service-unavailable","subscription-required","undefined-condition","unexpected-request"],toString:r.toString,toJSON:r.toJSON,get lang(){return this.parent?this.parent.lang:""},get condition(){var t=this,e=[];return this._CONDITIONS.forEach(function(n){var i=r.find(t.xml,t._ERR_NS,n);i.length&&e.push(i[0].tagName)}),e[0]||""},set condition(t){var e=this;if(this._CONDITIONS.forEach(function(t){var n=r.find(e.xml,e._ERR_NS,t);n.length&&e.xml.removeChild(n[0])}),t){var n=document.createElementNS(this._ERR_NS,t);n.setAttribute("xmlns",this._ERR_NS),this.xml.appendChild(n)}},get gone(){return r.getSubText(this.xml,this._ERR_NS,"gone")},set gone(t){this.condition="gone",r.setSubText(this.xml,this._ERR_NS,"gone",t)},get redirect(){return r.getSubText(this.xml,this._ERR_NS,"redirect")},set redirect(t){this.condition="redirect",r.setSubText(this.xml,this._ERR_NS,"redirect",t)},get code(){return r.getAttribute(this.xml,"code")},set code(t){r.setAttribute(this.xml,"code",t)},get type(){return r.getAttribute(this.xml,"type")},set type(t){r.setAttribute(this.xml,"type",t)},get by(){return r.getAttribute(this.xml,"by")},set by(t){r.setAttribute(this.xml,"by",t)},get $text(){return r.getSubLangText(this.xml,this._ERR_NS,"text",this.lang)},set text(t){r.setSubLangText(this.xml,this._ERR_NS,"text",t,this.lang)},get text(){var t=this.$text;return t[this.lang]||""}},r.extend(i,n),r.extend(o,n),r.extend(s,n),e.exports=n},{"../../vendor/lodash":90,"./iq":33,"./message":35,"./presence":37,jxt:74}],31:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./message"),o=t("./presence"),s=t("./iq"),a=t("./delayed");n.prototype={constructor:{value:n},NS:"urn:xmpp:forward:0",EL:"forwarded",_name:"forwarded",_eventname:"forward",toString:r.toString,toJSON:r.toJSON},r.extend(i,n),r.extend(n,i),r.extend(n,o),r.extend(n,s),r.extend(n,a),e.exports=n},{"./delayed":28,"./iq":33,"./message":35,"./presence":37,jxt:74}],32:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./presence");n.prototype={constructor:{value:n},NS:"urn:xmpp:idle:0",EL:"idle",_name:"idle",toString:r.toString,toJSON:r.toJSON,get since(){return new Date(r.getAttribute(this.xml,"since")||Date.now())},set since(t){r.setAttribute(this.xml,"since",t.toISOString())}},r.extend(i,n),e.exports=n},{"./presence":37,jxt:74}],33:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt");n.prototype={constructor:{value:n},_name:"iq",NS:"jabber:client",EL:"iq",toString:r.toString,toJSON:r.toJSON,resultReply:function(t){return t.to=this.from,t.id=this.id,t.type="result",new n(t)},errorReply:function(t){return t.to=this.from,t.id=this.id,t.type="error",new n(t)},get lang(){return this.xml.getAttributeNS(r.XML_NS,"lang")||""},set lang(t){this.xml.setAttributeNS(r.XML_NS,"lang",t)},get id(){return r.getAttribute(this.xml,"id")},set id(t){r.setAttribute(this.xml,"id",t)},get to(){return r.getAttribute(this.xml,"to")},set to(t){r.setAttribute(this.xml,"to",t)},get from(){return r.getAttribute(this.xml,"from")},set from(t){r.setAttribute(this.xml,"from",t)},get type(){return r.getAttribute(this.xml,"type")},set type(t){r.setAttribute(this.xml,"type",t)}},r.topLevel(n),e.exports=n},{jxt:74}],34:[function(t,e,n){function r(t,e){return a.init(this,e,t)}function i(t,e){return a.init(this,e,t)}function o(t,e){return a.init(this,e,t)}function s(t,e){return a.init(this,e,t)}var a=t("jxt"),u=t("./message"),c=t("./iq"),l=t("./forwarded"),f=t("./rsm");r.prototype={constructor:{value:r},NS:"urn:xmpp:mam:tmp",EL:"query",_name:"mamQuery",toString:a.toString,toJSON:a.toJSON,get queryid(){return a.getAttribute(this.xml,"queryid")},set queryid(t){a.setAttribute(this.xml,"queryid",t)},get start(){return new Date(a.getSubText(this.xml,this.NS,"start")||Date.now())},set start(t){a.setSubText(this.xml,this.NS,"start",t.toISOString())},get end(){return new Date(a.getSubText(this.xml,this.NS,"end")||Date.now())},set end(t){a.setSubText(this.xml,this.NS,"end",t.toISOString())}},r.prototype.__defineGetter__("with",function(){return a.getSubText(this.xml,this.NS,"with")}),r.prototype.__defineSetter__("with",function(t){a.setSubText(this.xml,this.NS,"with",t)}),i.prototype={constructor:{value:i},NS:"urn:xmpp:mam:tmp",EL:"result",_name:"mam",_eventname:"mam:result",toString:a.toString,toJSON:a.toJSON,get queryid(){return a.getAttribute(this.xml,"queryid")},set queryid(t){a.setAttribute(this.xml,"queryid",t)},get id(){return a.getAttribute(this.xml,"id")},set id(t){a.setAttribute(this.xml,"id",t)}},o.prototype={constructor:{value:i},NS:"urn:xmpp:mam:tmp",EL:"archived",_name:"archived",_eventname:"mam:archived",toString:a.toString,toJSON:a.toJSON,get by(){return a.getAttribute(this.xml,"by")},set by(t){a.setAttribute(this.xml,"by",t)},get id(){return a.getAttribute(this.xml,"id")},set id(t){a.setAttribute(this.xml,"id",t)}},s.prototype={constructor:{value:s},NS:"urn:xmpp:mam:tmp",EL:"prefs",_name:"mamPrefs",toString:a.toString,toJSON:a.toJSON,get defaultCondition(){return a.getAttribute(this.xml,"default")},set defaultCondition(t){a.setAttribute(this.xml,"default",t)},get always(){var t=[],e=a.find(this.xml,this.NS,"always");if(0===e.length)return t;e=e[0];var n=a.getMultiSubText(e,this.NS,"jid");return n.forEach(function(e){t.push(e.textContent)}),t},set always(t){if(t.length>0){var e=a.find(this.xml,this.NS,"always");a.setMultiSubText(e,this.NS,"jid",t)}},get never(){var t=[],e=a.find(this.xml,this.NS,"always");if(0===e.length)return t;e=e[0];var n=a.getMultiSubText(e,this.NS,"jid");return n.forEach(function(e){t.push(e.textContent)}),t},set never(t){if(t.length>0){var e=a.find(this.xml,this.NS,"never");a.setMultiSubText(e,this.NS,"jid",t)}}},a.extend(c,r),a.extend(c,s),a.extend(u,i),a.extend(u,o),a.extend(i,l),a.extend(r,f),n.MAMQuery=r,n.Result=i},{"./forwarded":31,"./iq":33,"./message":35,"./rsm":42,jxt:74}],35:[function(t,e){function n(t,e){return r.init(this,e,t)}t("../../vendor/lodash");var r=t("jxt");n.prototype={constructor:{value:n},_name:"message",NS:"jabber:client",EL:"message",toString:r.toString,toJSON:r.toJSON,get lang(){return this.xml.getAttributeNS(r.XML_NS,"lang")||""},set lang(t){this.xml.setAttributeNS(r.XML_NS,"lang",t)},get id(){return r.getAttribute(this.xml,"id")},set id(t){r.setAttribute(this.xml,"id",t)},get to(){return r.getAttribute(this.xml,"to")},set to(t){r.setAttribute(this.xml,"to",t)},get from(){return r.getAttribute(this.xml,"from")},set from(t){r.setAttribute(this.xml,"from",t)},get type(){return r.getAttribute(this.xml,"type","normal")},set type(t){r.setAttribute(this.xml,"type",t)},get body(){var t=this.$body;return t[this.lang]||""},get $body(){return r.getSubLangText(this.xml,this.NS,"body",this.lang)},set body(t){r.setSubLangText(this.xml,this.NS,"body",t,this.lang)},get thread(){return r.getSubText(this.xml,this.NS,"thread")},set thread(t){r.setSubText(this.xml,this.NS,"thread",t)},get parentThread(){return r.getSubAttribute(this.xml,this.NS,"thread","parent")},set parentThread(t){r.setSubAttribute(this.xml,this.NS,"thread","parent",t)}},r.topLevel(n),e.exports=n},{"../../vendor/lodash":90,jxt:74}],36:[function(t,e,n){function r(t,e){return i.init(this,e,t)}var i=t("jxt");t("./message");var o=t("./presence");t("./iq"),r.prototype={constructor:{value:r},NS:"http://jabber.org/protocol/muc",EL:"x",_name:"joinMuc",toString:i.toString,toJSON:i.toJSON,get password(){return i.getSubText(this.xml,this.NS,"password")},set password(t){i.setSubText(this.xml,this.NS,"password",t)},get history(){var t={},e=i.find(this.xml,this.NS,"history");if(!e.length)return{};e=e[0];var n=e.getAttribute("maxchars")||"",r=e.getAttribute("maxstanas")||"",o=e.getAttribute("seconds")||"",s=e.getAttribute("since")||"";n&&(t.maxchars=parseInt(n,10)),r&&(t.maxstanzas=parseInt(r,10)),o&&(t.seconds=parseInt(o,10)),s&&(t.since=new Date(s))},set history(t){var e=i.find(this.xml,this.NS,"history");if(e.length)for(var n=0;n<e.length;n++)this.xml.removeChild(e[n]);
|
||
var r=document.createElementNS(this.NS,"history");this.xml.appendChild(r),t.maxchars&&r.setAttribute(""+t.maxchars),t.maxstanzas&&r.setAttribute(""+t.maxstanzas),t.seconds&&r.setAttribute(""+t.seconds),t.since&&r.setAttribute(t.since.toISOString())}},i.extend(o,r),n.MUCJoin=r},{"./iq":33,"./message":35,"./presence":37,jxt:74}],37:[function(t,e){function n(t,e){return r.init(this,e,t)}t("../../vendor/lodash");var r=t("jxt");n.prototype={constructor:{value:n},_name:"presence",NS:"jabber:client",EL:"presence",toString:r.toString,toJSON:r.toJSON,get lang(){return this.xml.getAttributeNS(r.XML_NS,"lang")||""},set lang(t){this.xml.setAttributeNS(r.XML_NS,"lang",t)},get id(){return r.getAttribute(this.xml,"id")},set id(t){r.setAttribute(this.xml,"id",t)},get to(){return r.getAttribute(this.xml,"to")},set to(t){r.setAttribute(this.xml,"to",t)},get from(){return r.getAttribute(this.xml,"from")},set from(t){r.setAttribute(this.xml,"from",t)},get type(){return r.getAttribute(this.xml,"type","available")},set type(t){"available"===t&&(t=!1),r.setAttribute(this.xml,"type",t)},get status(){var t=this.$status;return t[this.lang]||""},get $status(){return r.getSubLangText(this.xml,this.NS,"status",this.lang)},set status(t){r.setSubLangText(this.xml,this.NS,"status",t,this.lang)},get priority(){return r.getSubText(this.xml,this.NS,"priority")},set priority(t){r.setSubText(this.xml,this.NS,"priority",t)},get show(){return r.getSubText(this.xml,this.NS,"show")},set show(t){r.setSubText(this.xml,this.NS,"show",t)}},r.topLevel(n),e.exports=n},{"../../vendor/lodash":90,jxt:74}],38:[function(t,e,n){function r(t,e){return v.init(this,e,t)}function i(t,e){return v.init(this,e,t)}function o(t,e){return v.init(this,e,t)}function s(t,e){return v.init(this,e,t)}function a(t,e){return v.init(this,e,t)}function u(t,e){return v.init(this,e,t)}function c(t,e){return v.init(this,e,t)}function l(t,e){return v.init(this,e,t)}function f(t,e){return v.init(this,e,t)}function h(t,e){return v.init(this,e,t)}function p(t,e){return v.init(this,e,t)}function d(t,e){return v.init(this,e,t)}function g(t,e){return v.init(this,e,t)}var m=t("../../vendor/lodash"),v=t("jxt"),y=t("./iq"),b=t("./message"),x=t("./dataforms").DataForm,w=t("./rsm");r.prototype={constructor:{value:r},_name:"pubsub",NS:"http://jabber.org/protocol/pubsub",EL:"pubsub",toString:v.toString,toJSON:v.toJSON,get publishOptions(){var t=v.find(this.xml,this.NS,"publish-options");return t.length&&t[0].childNodes.length?new x({},t[0].childNodes[0]):void 0},set publishOptions(t){var e=v.findOrCreate(this.xml,this.NS,"publish-options");if(t){var n=new x(t);e.appendChild(n.xml)}}},i.prototype={constructor:{value:i},_name:"pubsubOwner",NS:"http://jabber.org/protocol/pubsub#owner",EL:"pubsub",toString:v.toString,toJSON:v.toJSON,get create(){return v.getSubAttribute(this.xml,this.NS,"create","node")},set create(t){v.setSubAttribute(this.xml,this.NS,"create","node",t)},get purge(){return v.getSubAttribute(this.xml,this.NS,"purge","node")},set purge(t){v.setSubAttribute(this.xml,this.NS,"purge","node",t)},get del(){return v.getSubAttribute(this.xml,this.NS,"delete","node")},set del(t){v.setSubAttribute(this.xml,this.NS,"delete","node",t)},get redirect(){var t=v.find(this.xml,this.NS,"delete");return t.length?v.getSubAttribute(t,this.NS,"redirect","uri"):""},set redirect(t){var e=v.findOrCreate(this.xml,this.NS,"delete");v.setSubAttribute(e,this.NS,"redirect","uri",t)}},o.prototype={constructor:{value:o},_name:"config",NS:"http://jabber.org/protocol/pubsub#owner",EL:"configure",toString:v.toString,toJSON:v.toJSON,get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)}},s.prototype={constructor:{value:s},_name:"event",NS:"http://jabber.org/protocol/pubsub#event",EL:"event",toString:v.toString,toJSON:v.toJSON},a.prototype={constructor:{value:a},_name:"subscribe",NS:"http://jabber.org/protocol/pubsub",EL:"subscribe",toString:v.toString,toJSON:v.toJSON,get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get jid(){return v.getAttribute(this.xml,"jid")},set jid(t){v.setAttribute(this.xml,"jid",t)}},u.prototype={constructor:{value:u},_name:"subscription",NS:"http://jabber.org/protocol/pubsub",EL:"subscription",toString:v.toString,toJSON:v.toJSON,get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get jid(){return v.getAttribute(this.xml,"jid")},set jid(t){v.setAttribute(this.xml,"jid",t)},get subid(){return v.getAttribute(this.xml,"subid")},set subid(t){v.setAttribute(this.xml,"subid",t)},get type(){return v.getAttribute(this.xml,"subscription")},set type(t){v.setAttribute(this.xml,"subscription",t)}},c.prototype={constructor:{value:c},_name:"unsubscribe",NS:"http://jabber.org/protocol/pubsub",EL:"unsubscribe",toString:v.toString,toJSON:v.toJSON,get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get jid(){return v.getAttribute(this.xml,"jid")},set jid(t){v.setAttribute(this.xml,"jid",t)}},l.prototype={constructor:{value:l},_name:"publish",NS:"http://jabber.org/protocol/pubsub",EL:"publish",toString:v.toString,toJSON:v.toJSON,get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get item(){var t=this.items;return t.length?t[0]:void 0},set item(t){this.items=[t]}},f.prototype={constructor:{value:f},_name:"retract",NS:"http://jabber.org/protocol/pubsub",EL:"retract",toString:v.toString,toJSON:v.toJSON,get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get notify(){var t=v.getAttribute(this.xml,"notify");return"true"===t||"1"===t},set notify(t){t&&(t="1"),v.setAttribute(this.xml,"notify",t)},get id(){return v.getSubAttribute(this.xml,this.NS,"item","id")},set id(t){v.setSubAttribute(this.xml,this.NS,"item","id",t)}},h.prototype={constructor:{value:h},_name:"retrieve",NS:"http://jabber.org/protocol/pubsub",EL:"items",toString:v.toString,toJSON:v.toJSON,get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get max(){return v.getAttribute(this.xml,"max_items")},set max(t){v.setAttribute(this.xml,"max_items",t)}},p.prototype={constructor:{value:p},_name:"item",NS:"http://jabber.org/protocol/pubsub",EL:"item",toString:v.toString,toJSON:v.toJSON,get id(){return v.getAttribute(this.xml,"id")},set id(t){v.setAttribute(this.xml,"id",t)}},d.prototype={constructor:{value:d},_name:"updated",NS:"http://jabber.org/protocol/pubsub#event",EL:"items",toString:v.toString,toJSON:function(){var t=v.toJSON.apply(this),e=[];return m.forEach(t.published,function(t){e.push(t.toJSON())}),t.published=e,t},get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get published(){var t=[],e=v.find(this.xml,this.NS,"item");return m.forEach(e,function(e){t.push(new g({},e))}),t},set published(t){m.forEach(t,function(t){var e=new g(t);this.xml.appendChild(e.xml)})},get retracted(){var t=[],e=v.find(this.xml,this.NS,"retract");return m.forEach(e,function(e){t.push(e.getAttribute("id"))}),t},set retracted(t){var e=this;m.forEach(t,function(t){var n=document.createElementNS(e.NS,"retract");n.setAttribute("id",t),this.xml.appendChild(n)})}},g.prototype={constructor:{value:g},_name:"eventItem",NS:"http://jabber.org/protocol/pubsub#event",EL:"item",toString:v.toString,toJSON:v.toJSON,get id(){return v.getAttribute(this.xml,"id")},set id(t){v.setAttribute(this.xml,"id",t)},get node(){return v.getAttribute(this.xml,"node")},set node(t){v.setAttribute(this.xml,"node",t)},get publisher(){return v.getAttribute(this.xml,"publisher")},set publisher(t){v.setAttribute(this.xml,"publisher",t)}},v.extend(r,a),v.extend(r,c),v.extend(r,l),v.extend(r,h),v.extend(r,u),v.extend(i,o),v.extend(l,p),v.extend(o,x),v.extend(r,w),v.extend(s,d),v.extend(b,s),v.extend(y,r),v.extend(y,i),n.Pubsub=r,n.Item=p,n.EventItem=g},{"../../vendor/lodash":90,"./dataforms":27,"./iq":33,"./message":35,"./rsm":42,jxt:74}],39:[function(t,e,n){function r(t,e){return o.init(this,e,t)}function i(t,e){return o.init(this,e,t)}var o=t("jxt"),s=t("./message");r.prototype={constructor:{value:r},NS:"urn:xmpp:receipts",EL:"request",_name:"_requestReceipt",toString:o.toString,toJSON:void 0},i.prototype={constructor:{value:i},NS:"urn:xmpp:receipts",EL:"received",_name:"receipt",toString:o.toString,toJSON:o.toJSON,get id(){return o.getAttribute(this.xml,"id")},set id(t){o.setAttribute(this.xml,"id",t)}},s.prototype.__defineGetter__("requestReceipt",function(){return!!this._extensions._requestReceipt}),s.prototype.__defineSetter__("requestReceipt",function(t){t?this._requestReceipt=!0:this._extensions._requestReceipt&&(this.xml.removeChild(this._extensions._requestReceipt.xml),delete this._extensions._requestReceipt)}),o.extend(s,i),o.extend(s,r),n.Request=r,n.Received=i},{"./message":35,jxt:74}],40:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./message");n.prototype={constructor:{value:n},NS:"urn:xmpp:message-correct:0",EL:"replace",_name:"_replace",toString:r.toString,toJSON:void 0,get id(){return r.getAttribute(this.xml,"id")},set id(t){r.setAttribute(this.xml,"id",t)}},r.extend(i,n),i.prototype.__defineGetter__("replace",function(){return this._extensions._replace?this._replace.id:""}),i.prototype.__defineSetter__("replace",function(t){t?this._replace.id=t:this._extensions._replace&&(this.xml.removeChild(this._extensions._replace.xml),delete this._extensions._replace)}),e.exports=n},{"./message":35,jxt:74}],41:[function(t,e){function n(t,e){return r.init(this,e,t)}t("../../vendor/lodash");var r=t("jxt"),i=t("./iq");n.prototype={constructor:{value:n},_name:"roster",NS:"jabber:iq:roster",EL:"query",toString:r.toString,toJSON:r.toJSON,get ver(){return r.getAttribute(this.xml,"ver")},set ver(t){var e=""===t;r.setAttribute(this.xml,"ver",t,e)},get items(){var t=this,e=r.find(this.xml,this.NS,"item");if(!e.length)return[];var n=[];return e.forEach(function(e){var i={jid:r.getAttribute(e,"jid",void 0),name:r.getAttribute(e,"name",void 0),subscription:r.getAttribute(e,"subscription","none"),ask:r.getAttribute(e,"ask",void 0),groups:[]},o=r.find(e,t.NS,"group");o.forEach(function(t){i.groups.push(t.textContent)}),n.push(i)}),n},set items(t){var e=this;t.forEach(function(t){var n=document.createElementNS(e.NS,"item");r.setAttribute(n,"jid",t.jid),r.setAttribute(n,"name",t.name),r.setAttribute(n,"subscription",t.subscription),r.setAttribute(n,"ask",t.ask),(t.groups||[]).forEach(function(t){var r=document.createElementNS(e.NS,"group");r.textContent=t,n.appendChild(r)}),e.xml.appendChild(n)})}},r.extend(i,n),e.exports=n},{"../../vendor/lodash":90,"./iq":33,jxt:74}],42:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt");n.prototype={constructor:{value:n},NS:"http://jabber.org/protocol/rsm",EL:"set",_name:"rsm",toString:r.toString,toJSON:r.toJSON,get after(){return r.getSubText(this.xml,this.NS,"after")},set after(t){r.setSubText(this.xml,this.NS,"after",t)},get before(){return r.getSubText(this.xml,this.NS,"before")},set before(t){t===!0?r.findOrCreate(this.xml,this.NS,"before"):r.setSubText(this.xml,this.NS,"before",t)},get count(){return parseInt(r.getSubText(this.xml,this.NS,"count")||"0",10)},set count(t){r.setSubText(this.xml,this.NS,"count",t.toString())},get first(){return r.getSubText(this.xml,this.NS,"first")},set first(t){r.setSubText(this.xml,this.NS,"first",t)},get firstIndex(){return r.getSubAttribute(this.xml,this.NS,"first","index")},set firstIndex(t){r.setSubAttribute(this.xml,this.NS,"first","index",t)},get index(){return r.getSubText(this.xml,this.NS,"index")},set index(t){r.setSubText(this.xml,this.NS,"index",t)},get last(){return r.getSubText(this.xml,this.NS,"last")},set last(t){r.setSubText(this.xml,this.NS,"last",t)},get max(){return r.getSubText(this.xml,this.NS,"max")},set max(t){r.setSubText(this.xml,this.NS,"max",t.toString())}},e.exports=n},{jxt:74}],43:[function(t,e,n){function r(t,e){return l.init(this,e,t)}function i(t,e){return l.init(this,e,t)}function o(t,e){return l.init(this,e,t)}function s(t,e){return l.init(this,e,t)}function a(t,e){return l.init(this,e,t)}function u(t,e){return l.init(this,e,t)}function c(t,e){return l.init(this,e,t)}var l=t("jxt");t("../../vendor/lodash");var f=t("./streamFeatures");r.prototype={constructor:{value:r},_name:"sasl",NS:"urn:ietf:params:xml:ns:xmpp-sasl",EL:"mechanisms",toString:l.toString,toJSON:l.toJSON,required:!0,get mechanisms(){var t=[],e=l.find(this.xml,this.NS,"mechanism");return e.forEach(function(e){t.push(e.textContent)}),t},set mechanisms(t){var e=this,n=l.find(this.xml,this.NS,"mechanism");n.forEach(function(t){e.xml.remove(t)}),t.forEach(function(t){var n=document.createElementNS(e.NS,"mechanism");n.textContent=t,e.xml.appendChild(n)})}},i.prototype={constructor:{value:i},_name:"saslAuth",_eventname:"sasl:auth",NS:"urn:ietf:params:xml:ns:xmpp-sasl",EL:"auth",toString:l.toString,toJSON:l.toJSON,get value(){return this.xml.textContent&&"="!=this.xml.textContent?atob(this.xml.textContent):""},set value(t){this.xml.textContent=btoa(t)||"="},get mechanism(){return l.getAttribute(this.xml,"mechanism")},set mechanism(t){l.setAttribute(this.xml,"mechanism",t)}},o.prototype={constructor:{value:o},_name:"saslChallenge",_eventname:"sasl:challenge",NS:"urn:ietf:params:xml:ns:xmpp-sasl",EL:"challenge",toString:l.toString,toJSON:l.toJSON,get value(){return this.xml.textContent&&"="!=this.xml.textContent?atob(this.xml.textContent):""},set value(t){this.xml.textContent=btoa(t)||"="}},s.prototype={constructor:{value:s},_name:"saslResponse",_eventname:"sasl:response",NS:"urn:ietf:params:xml:ns:xmpp-sasl",EL:"response",toString:l.toString,toJSON:l.toJSON,get value(){return this.xml.textContent&&"="!=this.xml.textContent?atob(this.xml.textContent):""},set value(t){this.xml.textContent=btoa(t)||"="}},a.prototype={constructor:{value:a},_name:"saslSuccess",_eventname:"sasl:success",NS:"urn:ietf:params:xml:ns:xmpp-sasl",EL:"success",toString:l.toString,toJSON:l.toJSON,get value(){return this.xml.textContent&&"="!=this.xml.textContent?atob(this.xml.textContent):""},set value(t){this.xml.textContent=btoa(t)||"="}},u.prototype={constructor:{value:a},_CONDITIONS:["aborted","account-disabled","credentials-expired","encryption-required","incorrect-encoding","invalid-authzid","invalid-mechanism","malformed-request","mechanism-too-weak","not-authorized","temporary-auth-failure"],_name:"saslFailure",_eventname:"sasl:failure",NS:"urn:ietf:params:xml:ns:xmpp-sasl",EL:"failure",toString:l.toString,toJSON:l.toJSON,get lang(){return this._lang||""},set lang(t){this._lang=t},get condition(){var t=this,e=[];return this._CONDITIONS.forEach(function(n){var r=l.find(t.xml,this.NS,n);r.length&&e.push(r[0].tagName)}),e[0]||""},set condition(t){var e=this;if(this._CONDITIONS.forEach(function(t){var n=l.find(e.xml,e.NS,t);n.length&&e.xml.removeChild(n[0])}),t){var n=document.createElementNS(this.NS,t);n.setAttribute("xmlns",this.NS),this.xml.appendChild(n)}},get text(){var t=this.$text;return t[this.lang]||""},get $text(){return l.getSubLangText(this.xml,this.NS,"text",this.lang)},set text(t){l.setSubLangText(this.xml,this.NS,"text",t,this.lang)}},c.prototype={constructor:{value:c},_name:"saslAbort",_eventname:"sasl:abort",NS:"urn:ietf:params:xml:ns:xmpp-sasl",EL:"abort",toString:l.toString,toJSON:l.toJSON},l.extend(f,r,"sasl"),l.topLevel(i),l.topLevel(o),l.topLevel(s),l.topLevel(a),l.topLevel(u),l.topLevel(c),n.Mechanisms=r,n.Auth=i,n.Challenge=o,n.Response=s,n.Success=a,n.Failure=u,n.Abort=c},{"../../vendor/lodash":90,"./streamFeatures":48,jxt:74}],44:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./iq"),o=t("./streamFeatures");n.prototype={constructor:{value:n},_name:"session",NS:"urn:ietf:params:xml:ns:xmpp-session",EL:"session",toString:r.toString,toJSON:r.toJSON},r.extend(o,n),r.extend(i,n),e.exports=n},{"./iq":33,"./streamFeatures":48,jxt:74}],45:[function(t,e,n){function r(t,e){return f.init(this,e,t)}function i(t,e){return f.init(this,e,t)}function o(t,e){return f.init(this,e,t)}function s(t,e){return f.init(this,e,t)}function a(t,e){return f.init(this,e,t)}function u(t,e){return f.init(this,e,t)}function c(t,e){return f.init(this,e,t)}function l(t,e){return f.init(this,e,t)}var f=t("jxt"),h=t("./streamFeatures");r.prototype={constructor:{value:r},_name:"streamManagement",NS:"urn:xmpp:sm:3",EL:"sm",toString:f.toString,toJSON:f.toJSON},i.prototype={constructor:{value:i},_name:"smEnable",_eventname:"stream:management:enable",NS:"urn:xmpp:sm:3",EL:"enable",toString:f.toString,toJSON:f.toJSON,get resume(){return f.getBoolAttribute(this.xml,"resume")},set resume(t){f.setBoolAttribute(this.xml,"resume",t)}},o.prototype={constructor:{value:o},_name:"smEnabled",_eventname:"stream:management:enabled",NS:"urn:xmpp:sm:3",EL:"enabled",toString:f.toString,toJSON:f.toJSON,get id(){return f.getAttribute(this.xml,"id")},set id(t){f.setAttribute(this.xml,"id",t)},get resume(){return f.getBoolAttribute(this.xml,"resume")},set resume(t){f.setBoolAttribute(this.xml,"resume",t)}},s.prototype={constructor:{value:s},_name:"smResume",_eventname:"stream:management:resume",NS:"urn:xmpp:sm:3",EL:"resume",toString:f.toString,toJSON:f.toJSON,get h(){return parseInt(f.getAttribute(this.xml,"h","0"),10)},set h(t){f.setAttribute(this.xml,"h",""+t)},get previd(){return f.getAttribute(this.xml,"previd")},set previd(t){f.setAttribute(this.xml,"previd",t)}},a.prototype={constructor:{value:a},_name:"smResumed",_eventname:"stream:management:resumed",NS:"urn:xmpp:sm:3",EL:"resumed",toString:f.toString,toJSON:f.toJSON,get h(){return parseInt(f.getAttribute(this.xml,"h","0"),10)},set h(t){f.setAttribute(this.xml,"h",""+t)},get previd(){return f.getAttribute(this.xml,"previd")},set previd(t){f.setAttribute(this.xml,"previd",t)}},u.prototype={constructor:{value:u},_name:"smFailed",_eventname:"stream:management:failed",NS:"urn:xmpp:sm:3",EL:"failed",toString:f.toString,toJSON:f.toJSON},c.prototype={constructor:{value:c},_name:"smAck",_eventname:"stream:management:ack",NS:"urn:xmpp:sm:3",EL:"a",toString:f.toString,toJSON:f.toJSON,get h(){return parseInt(f.getAttribute(this.xml,"h","0"),10)},set h(t){f.setAttribute(this.xml,"h",""+t)}},l.prototype={constructor:{value:l},_name:"smRequest",_eventname:"stream:management:request",NS:"urn:xmpp:sm:3",EL:"r",toString:f.toString,toJSON:f.toJSON},f.extend(h,r),f.topLevel(c),f.topLevel(l),f.topLevel(i),f.topLevel(o),f.topLevel(s),f.topLevel(a),f.topLevel(u),n.SMFeature=r,n.Enable=i,n.Enabled=o,n.Resume=s,n.Resumed=a,n.Failed=u,n.Ack=c,n.Request=l},{"./streamFeatures":48,jxt:74}],46:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt");n.prototype={constructor:{value:n},_name:"stream",NS:"http://etherx.jabber.org/streams",EL:"stream",toString:r.toString,toJSON:r.toJSON,get lang(){return this.xml.getAttributeNS(r.XML_NS,"lang")||""},set lang(t){this.xml.setAttributeNS(r.XML_NS,"lang",t)},get id(){return r.getAttribute(this.xml,"id")},set id(t){r.setAttribute(this.xml,"id",t)},get version(){return r.getAttribute(this.xml,"version","1.0")},set version(t){r.setAttribute(this.xml,"version",t)},get to(){return r.getAttribute(this.xml,"to")},set to(t){r.setAttribute(this.xml,"to",t)},get from(){return r.getAttribute(this.xml,"from")},set from(t){r.setAttribute(this.xml,"from",t)}},e.exports=n},{jxt:74}],47:[function(t,e){function n(t,e){return r.init(this,e,t)}t("../../vendor/lodash");var r=t("jxt");n.prototype={constructor:{value:n},_name:"streamError",NS:"http://etherx.jabber.org/streams",EL:"error",_ERR_NS:"urn:ietf:params:xml:ns:xmpp-streams",_CONDITIONS:["bad-format","bad-namespace-prefix","conflict","connection-timeout","host-gone","host-unknown","improper-addressing","internal-server-error","invalid-from","invalid-namespace","invalid-xml","not-authorized","not-well-formed","policy-violation","remote-connection-failed","reset","resource-constraint","restricted-xml","see-other-host","system-shutdown","undefined-condition","unsupported-encoding","unsupported-feature","unsupported-stanza-type","unsupported-version"],toString:r.toString,toJSON:r.toJSON,get lang(){return this._lang||""},set lang(t){this._lang=t},get condition(){var t=this,e=[];return this._CONDITIONS.forEach(function(n){var i=r.find(t.xml,t._ERR_NS,n);i.length&&e.push(i[0].tagName)}),e[0]||""},set condition(t){var e=this;if(this._CONDITIONS.forEach(function(t){var n=r.find(e.xml,e._ERR_NS,t);n.length&&e.xml.removeChild(n[0])}),t){var n=document.createElementNS(this._ERR_NS,t);n.setAttribute("xmlns",this._ERR_NS),this.xml.appendChild(n)}},get seeOtherHost(){return r.getSubText(this.xml,this._ERR_NS,"see-other-host")},set seeOtherHost(t){this.condition="see-other-host",r.setSubText(this.xml,this._ERR_NS,"see-other-host",t)},get text(){var t=this.$text;return t[this.lang]||""},get $text(){return r.getSubLangText(this.xml,this._ERR_NS,"text",this.lang)},set text(t){r.setSubLangText(this.xml,this._ERR_NS,"text",t,this.lang)}},r.topLevel(n),e.exports=n},{"../../vendor/lodash":90,jxt:74}],48:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt");n.prototype={constructor:{value:n},_name:"streamFeatures",NS:"http://etherx.jabber.org/streams",EL:"features",_FEATURES:[],toString:r.toString,toJSON:r.toJSON,get features(){return this._extensions}},r.topLevel(n),e.exports=n},{jxt:74}],49:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./iq");n.prototype={constructor:{value:n},NS:"urn:xmpp:time",EL:"time",_name:"time",toString:r.toString,toJSON:r.toJSON,get tzo(){var t,e,n,i=-1,o=r.getSubText(this.xml,this.NS,"tzo");return o?("-"===o.charAt(0)&&(i=1,o.slice(1)),t=o.split(":"),e=parseInt(t[0],10),n=parseInt(t[1],10),(60*e+n)*i):0},set tzo(t){var e,n,i="-";"number"==typeof t?(0>t&&(t=-t,i="+"),e=t/60,n=t%60,i+=(10>e?"0":"")+e+":"+(10>n?"0":"")+n):i=t,r.setSubText(this.xml,this.NS,"tzo",i)},get utc(){var t=r.getSubText(this.xml,this.NS,"utc");return t?new Date(t||Date.now()):""},set utc(t){r.setSubText(this.xml,this.NS,"utc",t.toISOString())}},r.extend(i,n),e.exports=n},{"./iq":33,jxt:74}],50:[function(t,e){function n(t,e){return r.init(this,e,t)}var r=t("jxt"),i=t("./iq");n.prototype={constructor:{value:n},NS:"jabber:iq:version",EL:"query",_name:"version",toString:r.toString,toJSON:r.toJSON,get name(){return r.getSubText(this.xml,this.NS,"name")},set name(t){r.setSubText(this.xml,this.NS,"name",t)},get version(){return r.getSubText(this.xml,this.NS,"version")},set version(t){r.setSubText(this.xml,this.NS,"version",t)},get os(){return r.getSubText(this.xml,this.NS,"os")},set os(t){r.setSubText(this.xml,this.NS,"os",t)}},r.extend(i,n),e.exports=n},{"./iq":33,jxt:74}],51:[function(t,e,n){function r(t,e){return o.init(this,e,t)}function i(t,e){return o.init(this,e,t)}var o=t("jxt"),s=t("./iq");r.prototype={constructor:{value:r},NS:"urn:xmpp:invisible:0",EL:"visible",_name:"_visible",toString:o.toString,toJSON:void 0},i.prototype={constructor:{value:i},NS:"urn:xmpp:invisible:0",EL:"invisible",_name:"_invisible",toString:o.toString,toJSON:void 0},s.prototype.__defineGetter__("visible",function(){return!!this._extensions._visible}),s.prototype.__defineSetter__("visible",function(t){t?this._visible=!0:this._extensions._visible&&(this.xml.removeChild(this._extensions._visible.xml),delete this._extensions._visible)}),s.prototype.__defineGetter__("invisible",function(){return!!this._extensions._invisible}),s.prototype.__defineSetter__("invisible",function(t){t?this._invisible=!0:this._extensions._invisible&&(this.xml.removeChild(this._extensions._invisible.xml),delete this._extensions._invisible)}),o.extend(s,r),o.extend(s,i),n.Visible=r,n.Invisible=i},{"./iq":33,jxt:74}],52:[function(t,e){function n(){function t(t){var e=[n.streamStart,t,n.streamEnd].join("");return e}function e(t){for(var e=n.parser.parseFromString(t,"application/xml").childNodes,r=0;r<e.length;r++)if(1===e[r].nodeType)return e[r]}var n=this;r.call(this),n.sm=new a(n),n.sendQueue=o.queue(function(t,e){n.conn&&(n.emit("raw:outgoing",t),n.sm.track(t),"string"!=typeof t&&(t=t.toString()),n.conn.send(t)),e()},1),n.on("connected",function(){n.send(["<stream:stream",'xmlns:stream="http://etherx.jabber.org/streams"','xmlns="jabber:client"','version="'+(n.config.version||"1.0")+'"','xml:lang="'+(n.config.lang||"en")+'"','to="'+n.config.server+'">'].join(" "))}),n.on("raw:incoming",function(r){var o,a;if(r=r.trim(),r=r.replace(/^(\s*<\?.*\?>\s*)*/,""),""!==r){if(r.match(n.streamEnd))return n.disconnect();if(n.hasStream)try{o=new s({},e(t(r)))}catch(u){return n.disconnect()}else{var c=r.match(/^<(\S+:)?(\S+) /);n.streamStart=r,n.streamEnd="</"+(c[1]||"")+c[2]+">",a=!1;try{o=new s({},e(r+n.streamEnd))}catch(u){try{o=new s({},e(r)),a=!0}catch(l){return n.disconnect()}}n.hasStream=!0,n.stream=o,n.emit("stream:start",o)}i.each(o._extensions,function(t){t.lang||(t.lang=n.stream.lang),("message"===t._name||"presence"===t._name||"iq"===t._name)&&(n.sm.handle(t),n.emit("stanza",t)),n.emit(t._eventname||t._name,t),n.emit("stream:data",t),t.id&&n.emit("id:"+t.id,t)}),a&&n.emit("stream:end")}})}var r=t("wildemitter"),i=t("../vendor/lodash"),o=t("async"),s=t("./stanza/stream");t("./stanza/message"),t("./stanza/presence"),t("./stanza/iq");var a=t("./sm");t("node-uuid"),n.prototype=Object.create(r.prototype,{constructor:{value:n}}),n.prototype.connect=function(t){var e=this;e.config=t,e.hasStream=!1,e.streamStart='<stream:stream xmlns:stream="http://etherx.jabber.org/streams">',e.streamEnd="</stream:stream>",e.parser=new DOMParser,e.serializer=new XMLSerializer,e.conn=new WebSocket(t.wsURL,"xmpp"),e.conn.onopen=function(){e.emit("connected",e)},e.conn.onclose=function(){e.emit("disconnected",e)},e.conn.onmessage=function(t){e.emit("raw:incoming",t.data)}},n.prototype.disconnect=function(){this.conn&&(this.hasStream&&(this.conn.send("</stream:stream>"),this.emit("raw:outgoing","</stream:stream>"),this.emit("stream:end")),this.hasStream=!1,this.conn.close(),this.stream=void 0,this.conn=void 0)},n.prototype.restart=function(){var t=this;t.hasStream=!1,t.send(["<stream:stream",'xmlns:stream="http://etherx.jabber.org/streams"','xmlns="jabber:client"','version="'+(t.config.version||"1.0")+'"','xml:lang="'+(t.config.lang||"en")+'"','to="'+t.config.server+'">'].join(" "))},n.prototype.send=function(t){this.sendQueue.push(t)},e.exports=n},{"../vendor/lodash":90,"./sm":20,"./stanza/iq":33,"./stanza/message":35,"./stanza/presence":37,"./stanza/stream":46,async:53,"node-uuid":76,wildemitter:89}],53:[function(e,n){var r=e("__browserify_process");!function(){function e(t){var e=!1;return function(){if(e)throw new Error("Callback was already called.");e=!0,t.apply(i,arguments)}}var i,o,s={};i=this,null!=i&&(o=i.async),s.noConflict=function(){return i.async=o,s};var a=function(t,e){if(t.forEach)return t.forEach(e);for(var n=0;n<t.length;n+=1)e(t[n],n,t)},u=function(t,e){if(t.map)return t.map(e);var n=[];return a(t,function(t,r,i){n.push(e(t,r,i))}),n},c=function(t,e,n){return t.reduce?t.reduce(e,n):(a(t,function(t,r,i){n=e(n,t,r,i)}),n)},l=function(t){if(Object.keys)return Object.keys(t);var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e};"undefined"!=typeof r&&r.nextTick?(s.nextTick=r.nextTick,s.setImmediate="undefined"!=typeof setImmediate?setImmediate:s.nextTick):"function"==typeof setImmediate?(s.nextTick=function(t){setImmediate(t)},s.setImmediate=s.nextTick):(s.nextTick=function(t){setTimeout(t,0)},s.setImmediate=s.nextTick),s.each=function(t,n,r){if(r=r||function(){},!t.length)return r();var i=0;a(t,function(o){n(o,e(function(e){e?(r(e),r=function(){}):(i+=1,i>=t.length&&r(null))}))})},s.forEach=s.each,s.eachSeries=function(t,e,n){if(n=n||function(){},!t.length)return n();var r=0,i=function(){e(t[r],function(e){e?(n(e),n=function(){}):(r+=1,r>=t.length?n(null):i())})};i()},s.forEachSeries=s.eachSeries,s.eachLimit=function(t,e,n,r){var i=f(e);i.apply(null,[t,n,r])},s.forEachLimit=s.eachLimit;var f=function(t){return function(e,n,r){if(r=r||function(){},!e.length||0>=t)return r();var i=0,o=0,s=0;!function a(){if(i>=e.length)return r();for(;t>s&&o<e.length;)o+=1,s+=1,n(e[o-1],function(t){t?(r(t),r=function(){}):(i+=1,s-=1,i>=e.length?r():a())})}()}},h=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[s.each].concat(e))}},p=function(t,e){return function(){var n=Array.prototype.slice.call(arguments);return e.apply(null,[f(t)].concat(n))}},d=function(t){return function(){var e=Array.prototype.slice.call(arguments);return t.apply(null,[s.eachSeries].concat(e))}},g=function(t,e,n,r){var i=[];e=u(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n,r){i[t.index]=r,e(n)})},function(t){r(t,i)})};s.map=h(g),s.mapSeries=d(g),s.mapLimit=function(t,e,n,r){return m(e)(t,n,r)};var m=function(t){return p(t,g)};s.reduce=function(t,e,n,r){s.eachSeries(t,function(t,r){n(e,t,function(t,n){e=n,r(t)})},function(t){r(t,e)})},s.inject=s.reduce,s.foldl=s.reduce,s.reduceRight=function(t,e,n,r){var i=u(t,function(t){return t}).reverse();s.reduce(i,e,n,r)},s.foldr=s.reduceRight;var v=function(t,e,n,r){var i=[];e=u(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n){n&&i.push(t),e()})},function(){r(u(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};s.filter=h(v),s.filterSeries=d(v),s.select=s.filter,s.selectSeries=s.filterSeries;var y=function(t,e,n,r){var i=[];e=u(e,function(t,e){return{index:e,value:t}}),t(e,function(t,e){n(t.value,function(n){n||i.push(t),e()})},function(){r(u(i.sort(function(t,e){return t.index-e.index}),function(t){return t.value}))})};s.reject=h(y),s.rejectSeries=d(y);var b=function(t,e,n,r){t(e,function(t,e){n(t,function(n){n?(r(t),r=function(){}):e()})},function(){r()})};s.detect=h(b),s.detectSeries=d(b),s.some=function(t,e,n){s.each(t,function(t,r){e(t,function(t){t&&(n(!0),n=function(){}),r()})},function(){n(!1)})},s.any=s.some,s.every=function(t,e,n){s.each(t,function(t,r){e(t,function(t){t||(n(!1),n=function(){}),r()})},function(){n(!0)})},s.all=s.every,s.sortBy=function(t,e,n){s.map(t,function(t,n){e(t,function(e,r){e?n(e):n(null,{value:t,criteria:r})})},function(t,e){if(t)return n(t);var r=function(t,e){var n=t.criteria,r=e.criteria;return r>n?-1:n>r?1:0};n(null,u(e.sort(r),function(t){return t.value}))})},s.auto=function(t,e){e=e||function(){};var n=l(t);if(!n.length)return e(null);var r={},i=[],o=function(t){i.unshift(t)},u=function(t){for(var e=0;e<i.length;e+=1)if(i[e]===t)return i.splice(e,1),void 0},f=function(){a(i.slice(0),function(t){t()})};o(function(){l(r).length===n.length&&(e(null,r),e=function(){})}),a(n,function(n){var i=t[n]instanceof Function?[t[n]]:t[n],h=function(t){var i=Array.prototype.slice.call(arguments,1);if(i.length<=1&&(i=i[0]),t){var o={};a(l(r),function(t){o[t]=r[t]}),o[n]=i,e(t,o),e=function(){}}else r[n]=i,s.setImmediate(f)},p=i.slice(0,Math.abs(i.length-1))||[],d=function(){return c(p,function(t,e){return t&&r.hasOwnProperty(e)},!0)&&!r.hasOwnProperty(n)};if(d())i[i.length-1](h,r);else{var g=function(){d()&&(u(g),i[i.length-1](h,r))};o(g)}})},s.waterfall=function(t,e){if(e=e||function(){},t.constructor!==Array){var n=new Error("First argument to waterfall must be an array of functions");return e(n)}if(!t.length)return e();var r=function(t){return function(n){if(n)e.apply(null,arguments),e=function(){};else{var i=Array.prototype.slice.call(arguments,1),o=t.next();o?i.push(r(o)):i.push(e),s.setImmediate(function(){t.apply(null,i)})}}};r(s.iterator(t))()};var x=function(t,e,n){if(n=n||function(){},e.constructor===Array)t.map(e,function(t,e){t&&t(function(t){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),e.call(null,t,n)})},n);else{var r={};t.each(l(e),function(t,n){e[t](function(e){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),r[t]=i,n(e)})},function(t){n(t,r)})}};s.parallel=function(t,e){x({map:s.map,each:s.each},t,e)
|
||
},s.parallelLimit=function(t,e,n){x({map:m(e),each:f(e)},t,n)},s.series=function(t,e){if(e=e||function(){},t.constructor===Array)s.mapSeries(t,function(t,e){t&&t(function(t){var n=Array.prototype.slice.call(arguments,1);n.length<=1&&(n=n[0]),e.call(null,t,n)})},e);else{var n={};s.eachSeries(l(t),function(e,r){t[e](function(t){var i=Array.prototype.slice.call(arguments,1);i.length<=1&&(i=i[0]),n[e]=i,r(t)})},function(t){e(t,n)})}},s.iterator=function(t){var e=function(n){var r=function(){return t.length&&t[n].apply(null,arguments),r.next()};return r.next=function(){return n<t.length-1?e(n+1):null},r};return e(0)},s.apply=function(t){var e=Array.prototype.slice.call(arguments,1);return function(){return t.apply(null,e.concat(Array.prototype.slice.call(arguments)))}};var w=function(t,e,n,r){var i=[];t(e,function(t,e){n(t,function(t,n){i=i.concat(n||[]),e(t)})},function(t){r(t,i)})};s.concat=h(w),s.concatSeries=d(w),s.whilst=function(t,e,n){t()?e(function(r){return r?n(r):(s.whilst(t,e,n),void 0)}):n()},s.doWhilst=function(t,e,n){t(function(r){return r?n(r):(e()?s.doWhilst(t,e,n):n(),void 0)})},s.until=function(t,e,n){t()?n():e(function(r){return r?n(r):(s.until(t,e,n),void 0)})},s.doUntil=function(t,e,n){t(function(r){return r?n(r):(e()?n():s.doUntil(t,e,n),void 0)})},s.queue=function(t,n){function r(t,e,r,i){e.constructor!==Array&&(e=[e]),a(e,function(e){var o={data:e,callback:"function"==typeof i?i:null};r?t.tasks.unshift(o):t.tasks.push(o),t.saturated&&t.tasks.length===n&&t.saturated(),s.setImmediate(t.process)})}void 0===n&&(n=1);var i=0,o={tasks:[],concurrency:n,saturated:null,empty:null,drain:null,push:function(t,e){r(o,t,!1,e)},unshift:function(t,e){r(o,t,!0,e)},process:function(){if(i<o.concurrency&&o.tasks.length){var n=o.tasks.shift();o.empty&&0===o.tasks.length&&o.empty(),i+=1;var r=function(){i-=1,n.callback&&n.callback.apply(n,arguments),o.drain&&0===o.tasks.length+i&&o.drain(),o.process()},s=e(r);t(n.data,s)}},length:function(){return o.tasks.length},running:function(){return i}};return o},s.cargo=function(t,e){var n=!1,r=[],i={tasks:r,payload:e,saturated:null,empty:null,drain:null,push:function(t,n){t.constructor!==Array&&(t=[t]),a(t,function(t){r.push({data:t,callback:"function"==typeof n?n:null}),i.saturated&&r.length===e&&i.saturated()}),s.setImmediate(i.process)},process:function o(){if(!n){if(0===r.length)return i.drain&&i.drain(),void 0;var s="number"==typeof e?r.splice(0,e):r.splice(0),c=u(s,function(t){return t.data});i.empty&&i.empty(),n=!0,t(c,function(){n=!1;var t=arguments;a(s,function(e){e.callback&&e.callback.apply(null,t)}),o()})}},length:function(){return r.length},running:function(){return n}};return i};var S=function(t){return function(e){var n=Array.prototype.slice.call(arguments,1);e.apply(null,n.concat([function(e){var n=Array.prototype.slice.call(arguments,1);"undefined"!=typeof console&&(e?console.error&&console.error(e):console[t]&&a(n,function(e){console[t](e)}))}]))}};s.log=S("log"),s.dir=S("dir"),s.memoize=function(t,e){var n={},r={};e=e||function(t){return t};var i=function(){var i=Array.prototype.slice.call(arguments),o=i.pop(),s=e.apply(null,i);s in n?o.apply(null,n[s]):s in r?r[s].push(o):(r[s]=[o],t.apply(null,i.concat([function(){n[s]=arguments;var t=r[s];delete r[s];for(var e=0,i=t.length;i>e;e++)t[e].apply(null,arguments)}])))};return i.memo=n,i.unmemoized=t,i},s.unmemoize=function(t){return function(){return(t.unmemoized||t).apply(null,arguments)}},s.times=function(t,e,n){for(var r=[],i=0;t>i;i++)r.push(i);return s.map(r,e,n)},s.timesSeries=function(t,e,n){for(var r=[],i=0;t>i;i++)r.push(i);return s.mapSeries(r,e,n)},s.compose=function(){var t=Array.prototype.reverse.call(arguments);return function(){var e=this,n=Array.prototype.slice.call(arguments),r=n.pop();s.reduce(t,n,function(t,n,r){n.apply(e,t.concat([function(){var t=arguments[0],e=Array.prototype.slice.call(arguments,1);r(t,e)}]))},function(t,n){r.apply(e,[t].concat(n))})}};var _=function(t,e){var n=function(){var n=this,r=Array.prototype.slice.call(arguments),i=r.pop();return t(e,function(t,e){t.apply(n,r.concat([e]))},i)};if(arguments.length>2){var r=Array.prototype.slice.call(arguments,2);return n.apply(this,r)}return n};s.applyEach=h(_),s.applyEachSeries=d(_),s.forever=function(t,e){function n(r){if(r){if(e)return e(r);throw r}t(n)}n()},"undefined"!=typeof t&&t.amd?t([],function(){return s}):"undefined"!=typeof n&&n.exports?n.exports=s:i.async=s}()},{__browserify_process:66}],54:[function(t,e){function n(t){if(Object.keys)return Object.keys(t);var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}function r(t,e){return void 0===e?""+e:"number"!=typeof e||!isNaN(e)&&isFinite(e)?"function"==typeof e||e instanceof RegExp?e.toString():e:e.toString()}function i(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function o(t,e,n,r,i){throw new m.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function s(t,e){t||o(t,!0,e,"==",m.ok)}function a(t,e){if(t===e)return!0;if(d.isBuffer(t)&&d.isBuffer(e)){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():"object"!=typeof t&&"object"!=typeof e?t==e:l(t,e)}function u(t){return null===t||void 0===t}function c(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function l(t,e){if(u(t)||u(e))return!1;if(t.prototype!==e.prototype)return!1;if(c(t))return c(e)?(t=g.call(t),e=g.call(e),a(t,e)):!1;try{var r,i,o=n(t),s=n(e)}catch(l){return!1}if(o.length!=s.length)return!1;for(o.sort(),s.sort(),i=o.length-1;i>=0;i--)if(o[i]!=s[i])return!1;for(i=o.length-1;i>=0;i--)if(r=o[i],!a(t[r],e[r]))return!1;return!0}function f(t,e){return t&&e?e instanceof RegExp?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function h(t,e,n,r){var i;"string"==typeof n&&(r=n,n=null);try{e()}catch(s){i=s}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&o("Missing expected exception"+r),!t&&f(i,n)&&o("Got unwanted exception"+r),t&&i&&n&&!f(i,n)||!t&&i)throw i}var p=t("util"),d=t("buffer").Buffer,g=Array.prototype.slice,m=e.exports=s;m.AssertionError=function(t){this.name="AssertionError",this.message=t.message,this.actual=t.actual,this.expected=t.expected,this.operator=t.operator;var e=t.stackStartFunction||o;Error.captureStackTrace&&Error.captureStackTrace(this,e)},p.inherits(m.AssertionError,Error),m.AssertionError.prototype.toString=function(){return this.message?[this.name+":",this.message].join(" "):[this.name+":",i(JSON.stringify(this.actual,r),128),this.operator,i(JSON.stringify(this.expected,r),128)].join(" ")},m.fail=o,m.ok=s,m.equal=function(t,e,n){t!=e&&o(t,e,n,"==",m.equal)},m.notEqual=function(t,e,n){t==e&&o(t,e,n,"!=",m.notEqual)},m.deepEqual=function(t,e,n){a(t,e)||o(t,e,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(t,e,n){a(t,e)&&o(t,e,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(t,e,n){t!==e&&o(t,e,n,"===",m.strictEqual)},m.notStrictEqual=function(t,e,n){t===e&&o(t,e,n,"!==",m.notStrictEqual)},m.throws=function(){h.apply(this,[!0].concat(g.call(arguments)))},m.doesNotThrow=function(){h.apply(this,[!1].concat(g.call(arguments)))},m.ifError=function(t){if(t)throw t}},{buffer:58,util:56}],55:[function(t,e,n){function r(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1}var i=t("__browserify_process");i.EventEmitter||(i.EventEmitter=function(){});var o=n.EventEmitter=i.EventEmitter,s="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},a=10;o.prototype.setMaxListeners=function(t){this._events||(this._events={}),this._events.maxListeners=t},o.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||s(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var n=Array.prototype.slice.call(arguments,1);e.apply(this,n)}return!0}if(s(e)){for(var n=Array.prototype.slice.call(arguments,1),r=e.slice(),i=0,o=r.length;o>i;i++)r[i].apply(this,n);return!0}return!1},o.prototype.addListener=function(t,e){if("function"!=typeof e)throw new Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",t,e),this._events[t])if(s(this._events[t])){if(!this._events[t].warned){var n;n=void 0!==this._events.maxListeners?this._events.maxListeners:a,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),console.trace())}this._events[t].push(e)}else this._events[t]=[this._events[t],e];else this._events[t]=e;return this},o.prototype.on=o.prototype.addListener,o.prototype.once=function(t,e){var n=this;return n.on(t,function r(){n.removeListener(t,r),e.apply(this,arguments)}),this},o.prototype.removeListener=function(t,e){if("function"!=typeof e)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var n=this._events[t];if(s(n)){var i=r(n,e);if(0>i)return this;n.splice(i,1),0==n.length&&delete this._events[t]}else this._events[t]===e&&delete this._events[t];return this},o.prototype.removeAllListeners=function(t){return 0===arguments.length?(this._events={},this):(t&&this._events&&this._events[t]&&(this._events[t]=null),this)},o.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),s(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]},o.listenerCount=function(t,e){var n;return n=t._events&&t._events[e]?"function"==typeof t._events[e]?1:t._events[e].length:0}},{__browserify_process:66}],56:[function(t,e,n){function r(t){return Array.isArray(t)||"object"==typeof t&&"[object Array]"===Object.prototype.toString.call(t)}function i(t){"object"==typeof t&&"[object RegExp]"===Object.prototype.toString.call(t)}function o(t){return"object"==typeof t&&"[object Date]"===Object.prototype.toString.call(t)}t("events"),n.isArray=r,n.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},n.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},n.print=function(){},n.puts=function(){},n.debug=function(){},n.inspect=function(t,e,u,c){function l(t,u){if(t&&"function"==typeof t.inspect&&t!==n&&(!t.constructor||t.constructor.prototype!==t))return t.inspect(u);switch(typeof t){case"undefined":return h("undefined","undefined");case"string":var c="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return h(c,"string");case"number":return h(""+t,"number");case"boolean":return h(""+t,"boolean")}if(null===t)return h("null","null");var p=s(t),d=e?a(t):p;if("function"==typeof t&&0===d.length){if(i(t))return h(""+t,"regexp");var g=t.name?": "+t.name:"";return h("[Function"+g+"]","special")}if(o(t)&&0===d.length)return h(t.toUTCString(),"date");var m,v,y;if(r(t)?(v="Array",y=["[","]"]):(v="Object",y=["{","}"]),"function"==typeof t){var b=t.name?": "+t.name:"";m=i(t)?" "+t:" [Function"+b+"]"}else m="";if(o(t)&&(m=" "+t.toUTCString()),0===d.length)return y[0]+m+y[1];if(0>u)return i(t)?h(""+t,"regexp"):h("[Object]","special");f.push(t);var x=d.map(function(e){var n,i;if(t.__lookupGetter__&&(t.__lookupGetter__(e)?i=t.__lookupSetter__(e)?h("[Getter/Setter]","special"):h("[Getter]","special"):t.__lookupSetter__(e)&&(i=h("[Setter]","special"))),p.indexOf(e)<0&&(n="["+e+"]"),i||(f.indexOf(t[e])<0?(i=null===u?l(t[e]):l(t[e],u-1),i.indexOf("\n")>-1&&(i=r(t)?i.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+i.split("\n").map(function(t){return" "+t}).join("\n"))):i=h("[Circular]","special")),"undefined"==typeof n){if("Array"===v&&e.match(/^\d+$/))return i;n=JSON.stringify(""+e),n.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(n=n.substr(1,n.length-2),n=h(n,"name")):(n=n.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),n=h(n,"string"))}return n+": "+i});f.pop();var w=0,S=x.reduce(function(t,e){return w++,e.indexOf("\n")>=0&&w++,t+e.length+1},0);return x=S>50?y[0]+(""===m?"":m+"\n ")+" "+x.join(",\n ")+" "+y[1]:y[0]+m+" "+x.join(", ")+" "+y[1]}var f=[],h=function(t,e){var n={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[e];return r?"["+n[r][0]+"m"+t+"["+n[r][1]+"m":t};return c||(h=function(t){return t}),l(t,"undefined"==typeof u?2:u)},n.log=function(){},n.pump=null;var s=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},a=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.hasOwnProperty.call(t,n)&&e.push(n);return e},u=Object.create||function(t,e){var n;if(null===t)n={__proto__:null};else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var r=function(){};r.prototype=t,n=new r,n.__proto__=t}return"undefined"!=typeof e&&Object.defineProperties&&Object.defineProperties(n,e),n};n.inherits=function(t,e){t.super_=e,t.prototype=u(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};var c=/%[sdj%]/g;n.format=function(t){if("string"!=typeof t){for(var e=[],r=0;r<arguments.length;r++)e.push(n.inspect(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,s=String(t).replace(c,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":return JSON.stringify(i[r++]);default:return t}}),a=i[r];o>r;a=i[++r])s+=null===a||"object"!=typeof a?" "+a:" "+n.inspect(a);return s}},{events:55}],57:[function(t,e,n){n.readIEEE754=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?0:i-1,h=n?1:-1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},n.writeIEEE754=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?o-1:0,d=r?-1:1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}},{}],58:[function(t,e,n){function r(t,e,n){if(!(this instanceof r))return new r(t,e,n);this.parent=this,this.offset=0;var o;if("number"==typeof n)this.length=i(e),this.offset=n;else{switch(o=typeof t){case"number":this.length=i(t);break;case"string":this.length=r.byteLength(t,e);break;case"object":this.length=i(t.length);break;default:throw new Error("First argument needs to be a number, array or string.")}if(s(t))for(var a=0;a<this.length;a++)this[a]=t instanceof r?t.readUInt8(a):t[a];else if("string"==o)this.length=this.write(t,0,e);else if("number"===o)for(var a=0;a<this.length;a++)this[a]=0}}function i(t){return t=~~Math.ceil(+t),0>t?0:t}function o(t){return(Array.isArray||function(t){return"[object Array]"=={}.toString.apply(t)})(t)}function s(t){return o(t)||r.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function a(t){return 16>t?"0"+t.toString(16):t.toString(16)}function u(t){for(var e=[],n=0;n<t.length;n++)if(t.charCodeAt(n)<=127)e.push(t.charCodeAt(n));else for(var r=encodeURIComponent(t.charAt(n)).substr(1).split("%"),i=0;i<r.length;i++)e.push(parseInt(r[i],16));return e}function c(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function l(e){return t("base64-js").toByteArray(e)}function f(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);)e[i+n]=t[i],i++;return i}function h(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function p(t,e,n,r){var i=0;return r||(A.ok("boolean"==typeof n,"missing or invalid endian"),A.ok(void 0!==e&&null!==e,"missing offset"),A.ok(e+1<t.length,"Trying to read beyond buffer length")),e>=t.length?0:(n?(i=t[e]<<8,e+1<t.length&&(i|=t[e+1])):(i=t[e],e+1<t.length&&(i|=t[e+1]<<8)),i)}function d(t,e,n,r){var i=0;return r||(A.ok("boolean"==typeof n,"missing or invalid endian"),A.ok(void 0!==e&&null!==e,"missing offset"),A.ok(e+3<t.length,"Trying to read beyond buffer length")),e>=t.length?0:(n?(e+1<t.length&&(i=t[e+1]<<16),e+2<t.length&&(i|=t[e+2]<<8),e+3<t.length&&(i|=t[e+3]),i+=t[e]<<24>>>0):(e+2<t.length&&(i=t[e+2]<<16),e+1<t.length&&(i|=t[e+1]<<8),i|=t[e],e+3<t.length&&(i+=t[e+3]<<24>>>0)),i)}function g(t,e,n,r){var i,o;return r||(A.ok("boolean"==typeof n,"missing or invalid endian"),A.ok(void 0!==e&&null!==e,"missing offset"),A.ok(e+1<t.length,"Trying to read beyond buffer length")),o=p(t,e,n,r),i=32768&o,i?-1*(65535-o+1):o}function m(t,e,n,r){var i,o;return r||(A.ok("boolean"==typeof n,"missing or invalid endian"),A.ok(void 0!==e&&null!==e,"missing offset"),A.ok(e+3<t.length,"Trying to read beyond buffer length")),o=d(t,e,n,r),i=2147483648&o,i?-1*(4294967295-o+1):o}function v(e,n,r,i){return i||(A.ok("boolean"==typeof r,"missing or invalid endian"),A.ok(n+3<e.length,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,n,r,23,4)}function y(e,n,r,i){return i||(A.ok("boolean"==typeof r,"missing or invalid endian"),A.ok(n+7<e.length,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,n,r,52,8)}function b(t,e){A.ok("number"==typeof t,"cannot write a non-number as a number"),A.ok(t>=0,"specified a negative value for writing an unsigned value"),A.ok(e>=t,"value is larger than maximum value for type"),A.ok(Math.floor(t)===t,"value has a fractional component")}function x(t,e,n,r,i){i||(A.ok(void 0!==e&&null!==e,"missing value"),A.ok("boolean"==typeof r,"missing or invalid endian"),A.ok(void 0!==n&&null!==n,"missing offset"),A.ok(n+1<t.length,"trying to write beyond buffer length"),b(e,65535));for(var o=0;o<Math.min(t.length-n,2);o++)t[n+o]=(e&255<<8*(r?1-o:o))>>>8*(r?1-o:o)}function w(t,e,n,r,i){i||(A.ok(void 0!==e&&null!==e,"missing value"),A.ok("boolean"==typeof r,"missing or invalid endian"),A.ok(void 0!==n&&null!==n,"missing offset"),A.ok(n+3<t.length,"trying to write beyond buffer length"),b(e,4294967295));for(var o=0;o<Math.min(t.length-n,4);o++)t[n+o]=255&e>>>8*(r?3-o:o)}function S(t,e,n){A.ok("number"==typeof t,"cannot write a non-number as a number"),A.ok(e>=t,"value larger than maximum allowed value"),A.ok(t>=n,"value smaller than minimum allowed value"),A.ok(Math.floor(t)===t,"value has a fractional component")}function _(t,e,n){A.ok("number"==typeof t,"cannot write a non-number as a number"),A.ok(e>=t,"value larger than maximum allowed value"),A.ok(t>=n,"value smaller than minimum allowed value")}function E(t,e,n,r,i){i||(A.ok(void 0!==e&&null!==e,"missing value"),A.ok("boolean"==typeof r,"missing or invalid endian"),A.ok(void 0!==n&&null!==n,"missing offset"),A.ok(n+1<t.length,"Trying to write beyond buffer length"),S(e,32767,-32768)),e>=0?x(t,e,n,r,i):x(t,65535+e+1,n,r,i)}function N(t,e,n,r,i){i||(A.ok(void 0!==e&&null!==e,"missing value"),A.ok("boolean"==typeof r,"missing or invalid endian"),A.ok(void 0!==n&&null!==n,"missing offset"),A.ok(n+3<t.length,"Trying to write beyond buffer length"),S(e,2147483647,-2147483648)),e>=0?w(t,e,n,r,i):w(t,4294967295+e+1,n,r,i)}function k(e,n,r,i,o){o||(A.ok(void 0!==n&&null!==n,"missing value"),A.ok("boolean"==typeof i,"missing or invalid endian"),A.ok(void 0!==r&&null!==r,"missing offset"),A.ok(r+3<e.length,"Trying to write beyond buffer length"),_(n,3.4028234663852886e38,-3.4028234663852886e38)),t("./buffer_ieee754").writeIEEE754(e,n,r,i,23,4)}function j(e,n,r,i,o){o||(A.ok(void 0!==n&&null!==n,"missing value"),A.ok("boolean"==typeof i,"missing or invalid endian"),A.ok(void 0!==r&&null!==r,"missing offset"),A.ok(r+7<e.length,"Trying to write beyond buffer length"),_(n,1.7976931348623157e308,-1.7976931348623157e308)),t("./buffer_ieee754").writeIEEE754(e,n,r,i,52,8)}var A=t("assert");n.Buffer=r,n.SlowBuffer=r,r.poolSize=8192,n.INSPECT_MAX_BYTES=50,r.prototype.get=function(t){if(0>t||t>=this.length)throw new Error("oob");return this[t]},r.prototype.set=function(t,e){if(0>t||t>=this.length)throw new Error("oob");return this[t]=e},r.byteLength=function(t,e){switch(e||"utf8"){case"hex":return t.length/2;case"utf8":case"utf-8":return u(t).length;case"ascii":case"binary":return t.length;case"base64":return l(t).length;default:throw new Error("Unknown encoding")}},r.prototype.utf8Write=function(t,e,n){return r._charsWritten=f(u(t),this,e,n)},r.prototype.asciiWrite=function(t,e,n){return r._charsWritten=f(c(t),this,e,n)},r.prototype.binaryWrite=r.prototype.asciiWrite,r.prototype.base64Write=function(t,e,n){return r._charsWritten=f(l(t),this,e,n)},r.prototype.base64Slice=function(){var e=Array.prototype.slice.apply(this,arguments);return t("base64-js").fromByteArray(e)},r.prototype.utf8Slice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",n="",r=0;r<t.length;)t[r]<=127?(e+=h(n)+String.fromCharCode(t[r]),n=""):n+="%"+t[r].toString(16),r++;return e+h(n)},r.prototype.asciiSlice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},r.prototype.binarySlice=r.prototype.asciiSlice,r.prototype.inspect=function(){for(var t=[],e=this.length,r=0;e>r;r++)if(t[r]=a(this[r]),r==n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<Buffer "+t.join(" ")+">"},r.prototype.hexSlice=function(t,e){var n=this.length;(!t||0>t)&&(t=0),(!e||0>e||e>n)&&(e=n);for(var r="",i=t;e>i;i++)r+=a(this[i]);return r},r.prototype.toString=function(t,e,n){if(t=String(t||"utf8").toLowerCase(),e=+e||0,"undefined"==typeof n&&(n=this.length),+n==e)return"";switch(t){case"hex":return this.hexSlice(e,n);case"utf8":case"utf-8":return this.utf8Slice(e,n);case"ascii":return this.asciiSlice(e,n);case"binary":return this.binarySlice(e,n);case"base64":return this.base64Slice(e,n);case"ucs2":case"ucs-2":return this.ucs2Slice(e,n);default:throw new Error("Unknown encoding")}},r.prototype.hexWrite=function(t,e,n){e=+e||0;var i=this.length-e;n?(n=+n,n>i&&(n=i)):n=i;var o=t.length;if(o%2)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");this[e+s]=a}return r._charsWritten=2*s,s},r.prototype.write=function(t,e,n,r){if(isFinite(e))isFinite(n)||(r=n,n=void 0);else{var i=r;r=e,e=n,n=i}e=+e||0;var o=this.length-e;switch(n?(n=+n,n>o&&(n=o)):n=o,r=String(r||"utf8").toLowerCase()){case"hex":return this.hexWrite(t,e,n);case"utf8":case"utf-8":return this.utf8Write(t,e,n);case"ascii":return this.asciiWrite(t,e,n);case"binary":return this.binaryWrite(t,e,n);case"base64":return this.base64Write(t,e,n);case"ucs2":case"ucs-2":return this.ucs2Write(t,e,n);default:throw new Error("Unknown encoding")}},r.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw new Error("oob");if(t>e)throw new Error("oob");return new r(this,e-t,+t)},r.prototype.copy=function(t,e,n,r){var i=this;if(n||(n=0),(void 0===r||isNaN(r))&&(r=this.length),e||(e=0),n>r)throw new Error("sourceEnd < sourceStart");if(r===n)return 0;if(0==t.length||0==i.length)return 0;if(0>e||e>=t.length)throw new Error("targetStart out of bounds");if(0>n||n>=i.length)throw new Error("sourceStart out of bounds");if(0>r||r>i.length)throw new Error("sourceEnd out of bounds");r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n);for(var o=[],s=n;r>s;s++)A.ok("undefined"!=typeof this[s],"copying undefined buffer bytes!"),o.push(this[s]);for(var s=e;s<e+o.length;s++)t[s]=o[s-e]},r.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),"number"!=typeof t||isNaN(t))throw new Error("value is not a number");if(e>n)throw new Error("end < start");if(n===e)return 0;if(0==this.length)return 0;if(0>e||e>=this.length)throw new Error("start out of bounds");if(0>n||n>this.length)throw new Error("end out of bounds");for(var r=e;n>r;r++)this[r]=t},r.isBuffer=function(t){return t instanceof r||t instanceof r},r.concat=function(t,e){if(!o(t))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===t.length)return new r(0);if(1===t.length)return t[0];if("number"!=typeof e){e=0;for(var n=0;n<t.length;n++){var i=t[n];e+=i.length}}for(var s=new r(e),a=0,n=0;n<t.length;n++){var i=t[n];i.copy(s,a),a+=i.length}return s},r.prototype.readUInt8=function(t,e){var n=this;return e||(A.ok(void 0!==t&&null!==t,"missing offset"),A.ok(t<n.length,"Trying to read beyond buffer length")),t>=n.length?void 0:n[t]},r.prototype.readUInt16LE=function(t,e){return p(this,t,!1,e)},r.prototype.readUInt16BE=function(t,e){return p(this,t,!0,e)},r.prototype.readUInt32LE=function(t,e){return d(this,t,!1,e)},r.prototype.readUInt32BE=function(t,e){return d(this,t,!0,e)},r.prototype.readInt8=function(t,e){var n,r=this;return e||(A.ok(void 0!==t&&null!==t,"missing offset"),A.ok(t<r.length,"Trying to read beyond buffer length")),t>=r.length?void 0:(n=128&r[t],n?-1*(255-r[t]+1):r[t])},r.prototype.readInt16LE=function(t,e){return g(this,t,!1,e)},r.prototype.readInt16BE=function(t,e){return g(this,t,!0,e)},r.prototype.readInt32LE=function(t,e){return m(this,t,!1,e)},r.prototype.readInt32BE=function(t,e){return m(this,t,!0,e)},r.prototype.readFloatLE=function(t,e){return v(this,t,!1,e)},r.prototype.readFloatBE=function(t,e){return v(this,t,!0,e)},r.prototype.readDoubleLE=function(t,e){return y(this,t,!1,e)},r.prototype.readDoubleBE=function(t,e){return y(this,t,!0,e)},r.prototype.writeUInt8=function(t,e,n){var r=this;n||(A.ok(void 0!==t&&null!==t,"missing value"),A.ok(void 0!==e&&null!==e,"missing offset"),A.ok(e<r.length,"trying to write beyond buffer length"),b(t,255)),e<r.length&&(r[e]=t)},r.prototype.writeUInt16LE=function(t,e,n){x(this,t,e,!1,n)},r.prototype.writeUInt16BE=function(t,e,n){x(this,t,e,!0,n)},r.prototype.writeUInt32LE=function(t,e,n){w(this,t,e,!1,n)},r.prototype.writeUInt32BE=function(t,e,n){w(this,t,e,!0,n)},r.prototype.writeInt8=function(t,e,n){var r=this;n||(A.ok(void 0!==t&&null!==t,"missing value"),A.ok(void 0!==e&&null!==e,"missing offset"),A.ok(e<r.length,"Trying to write beyond buffer length"),S(t,127,-128)),t>=0?r.writeUInt8(t,e,n):r.writeUInt8(255+t+1,e,n)},r.prototype.writeInt16LE=function(t,e,n){E(this,t,e,!1,n)},r.prototype.writeInt16BE=function(t,e,n){E(this,t,e,!0,n)},r.prototype.writeInt32LE=function(t,e,n){N(this,t,e,!1,n)},r.prototype.writeInt32BE=function(t,e,n){N(this,t,e,!0,n)},r.prototype.writeFloatLE=function(t,e,n){k(this,t,e,!1,n)},r.prototype.writeFloatBE=function(t,e,n){k(this,t,e,!0,n)},r.prototype.writeDoubleLE=function(t,e,n){j(this,t,e,!1,n)},r.prototype.writeDoubleBE=function(t,e,n){j(this,t,e,!0,n)}},{"./buffer_ieee754":57,assert:54,"base64-js":59}],59:[function(t,e){!function(){"use strict";function t(t){var e,n,i,o,s,a;if(t.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(s=t.indexOf("="),s=s>0?t.length-s:0,a=[],i=s>0?t.length-4:t.length,e=0,n=0;i>e;e+=4,n+=3)o=r.indexOf(t[e])<<18|r.indexOf(t[e+1])<<12|r.indexOf(t[e+2])<<6|r.indexOf(t[e+3]),a.push((16711680&o)>>16),a.push((65280&o)>>8),a.push(255&o);return 2===s?(o=r.indexOf(t[e])<<2|r.indexOf(t[e+1])>>4,a.push(255&o)):1===s&&(o=r.indexOf(t[e])<<10|r.indexOf(t[e+1])<<4|r.indexOf(t[e+2])>>2,a.push(255&o>>8),a.push(255&o)),a}function n(t){function e(t){return r[63&t>>18]+r[63&t>>12]+r[63&t>>6]+r[63&t]}var n,i,o,s=t.length%3,a="";for(n=0,o=t.length-s;o>n;n+=3)i=(t[n]<<16)+(t[n+1]<<8)+t[n+2],a+=e(i);switch(s){case 1:i=t[t.length-1],a+=r[i>>2],a+=r[63&i<<4],a+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],a+=r[i>>10],a+=r[63&i>>4],a+=r[63&i<<2],a+="="}return a}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports.toByteArray=t,e.exports.fromByteArray=n}()},{}],60:[function(t,e,n){function r(){var t=[].slice.call(arguments).join(" ");throw new Error([t,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join("\n"))}function i(t,e){for(var n in t)e(t[n],n)}var o=t("buffer").Buffer,s=t("./sha"),a=t("./sha256"),u=t("./rng"),c=t("./md5"),l={sha1:{hex:s.hex_sha1,base64:s.b64_sha1,binary:s.str_sha1},sha256:{hex:a.hex_sha256,base64:a.b64_sha256,binary:a.str_sha256},md5:{hex:c.hex_md5,base64:c.b64_md5,binary:c.bin_md5}},f={sha1:{hex:s.hex_hmac_sha1,base64:s.b64_hmac_sha1,binary:s.str_hmac_sha1},sha256:{hex:a.hex_hmac_sha256,base64:a.b64_hmac_sha256,binary:a.str_hmac_sha256},md5:{hex:c.hex_hmac_md5,base64:c.b64_hmac_md5,binary:c.bin_hmac_md5}};n.createHash=function(t){t=t||"sha1",l[t]||r("algorithm:",t,"is not yet supported");var e="",n=l[t];return{update:function(t){return e+=t,this},digest:function(i){i=i||"binary";var o;(o=n[i])||r("encoding:",i,"is not yet supported for algorithm",t);var s=o(e);return e=null,s}}},n.createHmac=function(t,e){f[t]||r("algorithm:",t,"is not yet supported"),"string"!=typeof e&&(e=e.toString("binary"));var n="",i=f[t];return{update:function(t){return n+=t,this},digest:function(o){o=o||"binary";var s;(s=i[o])||r("encoding:",o,"is not yet support for algorithm",t);var a=s(e,n);return n=null,a}}},n.randomBytes=function(t,e){if(!e||!e.call)return new o(u(t));try{e.call(this,void 0,new o(u(t)))}catch(n){e(n)}},i(["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],function(t){n[t]=function(){r("sorry,",t,"is not implemented yet")}})},{"./md5":61,"./rng":62,"./sha":63,"./sha256":64,buffer:58}],61:[function(t,e,n){function r(t){return x(c(y(t),t.length*E))}function i(t){return w(c(y(t),t.length*E))}function o(t){return b(c(y(t),t.length*E))}function s(t,e){return x(g(t,e))}function a(t,e){return w(g(t,e))}function u(t,e){return b(g(t,e))}function c(t,e){t[e>>5]|=128<<e%32,t[(e+64>>>9<<4)+14]=e;for(var n=1732584193,r=-271733879,i=-1732584194,o=271733878,s=0;s<t.length;s+=16){var a=n,u=r,c=i,l=o;n=f(n,r,i,o,t[s+0],7,-680876936),o=f(o,n,r,i,t[s+1],12,-389564586),i=f(i,o,n,r,t[s+2],17,606105819),r=f(r,i,o,n,t[s+3],22,-1044525330),n=f(n,r,i,o,t[s+4],7,-176418897),o=f(o,n,r,i,t[s+5],12,1200080426),i=f(i,o,n,r,t[s+6],17,-1473231341),r=f(r,i,o,n,t[s+7],22,-45705983),n=f(n,r,i,o,t[s+8],7,1770035416),o=f(o,n,r,i,t[s+9],12,-1958414417),i=f(i,o,n,r,t[s+10],17,-42063),r=f(r,i,o,n,t[s+11],22,-1990404162),n=f(n,r,i,o,t[s+12],7,1804603682),o=f(o,n,r,i,t[s+13],12,-40341101),i=f(i,o,n,r,t[s+14],17,-1502002290),r=f(r,i,o,n,t[s+15],22,1236535329),n=h(n,r,i,o,t[s+1],5,-165796510),o=h(o,n,r,i,t[s+6],9,-1069501632),i=h(i,o,n,r,t[s+11],14,643717713),r=h(r,i,o,n,t[s+0],20,-373897302),n=h(n,r,i,o,t[s+5],5,-701558691),o=h(o,n,r,i,t[s+10],9,38016083),i=h(i,o,n,r,t[s+15],14,-660478335),r=h(r,i,o,n,t[s+4],20,-405537848),n=h(n,r,i,o,t[s+9],5,568446438),o=h(o,n,r,i,t[s+14],9,-1019803690),i=h(i,o,n,r,t[s+3],14,-187363961),r=h(r,i,o,n,t[s+8],20,1163531501),n=h(n,r,i,o,t[s+13],5,-1444681467),o=h(o,n,r,i,t[s+2],9,-51403784),i=h(i,o,n,r,t[s+7],14,1735328473),r=h(r,i,o,n,t[s+12],20,-1926607734),n=p(n,r,i,o,t[s+5],4,-378558),o=p(o,n,r,i,t[s+8],11,-2022574463),i=p(i,o,n,r,t[s+11],16,1839030562),r=p(r,i,o,n,t[s+14],23,-35309556),n=p(n,r,i,o,t[s+1],4,-1530992060),o=p(o,n,r,i,t[s+4],11,1272893353),i=p(i,o,n,r,t[s+7],16,-155497632),r=p(r,i,o,n,t[s+10],23,-1094730640),n=p(n,r,i,o,t[s+13],4,681279174),o=p(o,n,r,i,t[s+0],11,-358537222),i=p(i,o,n,r,t[s+3],16,-722521979),r=p(r,i,o,n,t[s+6],23,76029189),n=p(n,r,i,o,t[s+9],4,-640364487),o=p(o,n,r,i,t[s+12],11,-421815835),i=p(i,o,n,r,t[s+15],16,530742520),r=p(r,i,o,n,t[s+2],23,-995338651),n=d(n,r,i,o,t[s+0],6,-198630844),o=d(o,n,r,i,t[s+7],10,1126891415),i=d(i,o,n,r,t[s+14],15,-1416354905),r=d(r,i,o,n,t[s+5],21,-57434055),n=d(n,r,i,o,t[s+12],6,1700485571),o=d(o,n,r,i,t[s+3],10,-1894986606),i=d(i,o,n,r,t[s+10],15,-1051523),r=d(r,i,o,n,t[s+1],21,-2054922799),n=d(n,r,i,o,t[s+8],6,1873313359),o=d(o,n,r,i,t[s+15],10,-30611744),i=d(i,o,n,r,t[s+6],15,-1560198380),r=d(r,i,o,n,t[s+13],21,1309151649),n=d(n,r,i,o,t[s+4],6,-145523070),o=d(o,n,r,i,t[s+11],10,-1120210379),i=d(i,o,n,r,t[s+2],15,718787259),r=d(r,i,o,n,t[s+9],21,-343485551),n=m(n,a),r=m(r,u),i=m(i,c),o=m(o,l)
|
||
}return Array(n,r,i,o)}function l(t,e,n,r,i,o){return m(v(m(m(e,t),m(r,o)),i),n)}function f(t,e,n,r,i,o,s){return l(e&n|~e&r,t,e,i,o,s)}function h(t,e,n,r,i,o,s){return l(e&r|n&~r,t,e,i,o,s)}function p(t,e,n,r,i,o,s){return l(e^n^r,t,e,i,o,s)}function d(t,e,n,r,i,o,s){return l(n^(e|~r),t,e,i,o,s)}function g(t,e){var n=y(t);n.length>16&&(n=c(n,t.length*E));for(var r=Array(16),i=Array(16),o=0;16>o;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var s=c(r.concat(y(e)),512+e.length*E);return c(i.concat(s),640)}function m(t,e){var n=(65535&t)+(65535&e),r=(t>>16)+(e>>16)+(n>>16);return r<<16|65535&n}function v(t,e){return t<<e|t>>>32-e}function y(t){for(var e=Array(),n=(1<<E)-1,r=0;r<t.length*E;r+=E)e[r>>5]|=(t.charCodeAt(r/E)&n)<<r%32;return e}function b(t){for(var e="",n=(1<<E)-1,r=0;r<32*t.length;r+=E)e+=String.fromCharCode(t[r>>5]>>>r%32&n);return e}function x(t){for(var e=S?"0123456789ABCDEF":"0123456789abcdef",n="",r=0;r<4*t.length;r++)n+=e.charAt(15&t[r>>2]>>8*(r%4)+4)+e.charAt(15&t[r>>2]>>8*(r%4));return n}function w(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=0;r<4*t.length;r+=3)for(var i=(255&t[r>>2]>>8*(r%4))<<16|(255&t[r+1>>2]>>8*((r+1)%4))<<8|255&t[r+2>>2]>>8*((r+2)%4),o=0;4>o;o++)n+=8*r+6*o>32*t.length?_:e.charAt(63&i>>6*(3-o));return n}var S=0,_="=",E=8;n.hex_md5=r,n.b64_md5=i,n.bin_md5=o,n.hex_hmac_md5=s,n.b64_hmac_md5=a,n.bin_hmac_md5=u},{}],62:[function(t,e){!function(){var t,n,r=this;if(t=function(t){for(var e,e,n=new Array(t),r=0;t>r;r++)0==(3&r)&&(e=4294967296*Math.random()),n[r]=255&e>>>((3&r)<<3);return n},r.crypto&&crypto.getRandomValues){var i=new Uint32Array(4);n=function(t){var e=new Array(t);crypto.getRandomValues(i);for(var n=0;t>n;n++)e[n]=255&i[n>>2]>>>8*(3&n);return e}}e.exports=n||t}()},{}],63:[function(t,e,n){function r(t){return v(c(g(t),t.length*w))}function i(t){return y(c(g(t),t.length*w))}function o(t){return m(c(g(t),t.length*w))}function s(t,e){return v(h(t,e))}function a(t,e){return y(h(t,e))}function u(t,e){return m(h(t,e))}function c(t,e){t[e>>5]|=128<<24-e%32,t[(e+64>>9<<4)+15]=e;for(var n=Array(80),r=1732584193,i=-271733879,o=-1732584194,s=271733878,a=-1009589776,u=0;u<t.length;u+=16){for(var c=r,h=i,g=o,m=s,v=a,y=0;80>y;y++){n[y]=16>y?t[u+y]:d(n[y-3]^n[y-8]^n[y-14]^n[y-16],1);var b=p(p(d(r,5),l(y,i,o,s)),p(p(a,n[y]),f(y)));a=s,s=o,o=d(i,30),i=r,r=b}r=p(r,c),i=p(i,h),o=p(o,g),s=p(s,m),a=p(a,v)}return Array(r,i,o,s,a)}function l(t,e,n,r){return 20>t?e&n|~e&r:40>t?e^n^r:60>t?e&n|e&r|n&r:e^n^r}function f(t){return 20>t?1518500249:40>t?1859775393:60>t?-1894007588:-899497514}function h(t,e){var n=g(t);n.length>16&&(n=c(n,t.length*w));for(var r=Array(16),i=Array(16),o=0;16>o;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var s=c(r.concat(g(e)),512+e.length*w);return c(i.concat(s),672)}function p(t,e){var n=(65535&t)+(65535&e),r=(t>>16)+(e>>16)+(n>>16);return r<<16|65535&n}function d(t,e){return t<<e|t>>>32-e}function g(t){for(var e=Array(),n=(1<<w)-1,r=0;r<t.length*w;r+=w)e[r>>5]|=(t.charCodeAt(r/w)&n)<<32-w-r%32;return e}function m(t){for(var e="",n=(1<<w)-1,r=0;r<32*t.length;r+=w)e+=String.fromCharCode(t[r>>5]>>>32-w-r%32&n);return e}function v(t){for(var e=b?"0123456789ABCDEF":"0123456789abcdef",n="",r=0;r<4*t.length;r++)n+=e.charAt(15&t[r>>2]>>8*(3-r%4)+4)+e.charAt(15&t[r>>2]>>8*(3-r%4));return n}function y(t){for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",n="",r=0;r<4*t.length;r+=3)for(var i=(255&t[r>>2]>>8*(3-r%4))<<16|(255&t[r+1>>2]>>8*(3-(r+1)%4))<<8|255&t[r+2>>2]>>8*(3-(r+2)%4),o=0;4>o;o++)n+=8*r+6*o>32*t.length?x:e.charAt(63&i>>6*(3-o));return n}n.hex_sha1=r,n.b64_sha1=i,n.str_sha1=o,n.hex_hmac_sha1=s,n.b64_hmac_sha1=a,n.str_hmac_sha1=u;var b=0,x="=",w=8},{}],64:[function(t,e,n){function r(t){return _(w(S(t),t.length*f))}function i(t){return E(w(S(t),t.length*f))}function o(t){return c(w(S(t),t.length*f))}function s(t,e){return _(N(t,e))}function a(t,e){return E(N(t,e))}function u(t,e){return c(N(t,e))}function c(t){for(var e="",n=(1<<f)-1,r=0;r<32*t.length;r+=f)e+=String.fromCharCode(t[r>>5]>>>32-f-r%32&n);return e}n.hex_sha256=r,n.b64_sha256=i,n.str_sha256=o,n.hex_hmac_sha256=s,n.b64_hmac_sha256=a,n.str_hmac_sha256=u;var l=0,f=8,h=function(t,e){var n=(65535&t)+(65535&e),r=(t>>16)+(e>>16)+(n>>16);return r<<16|65535&n},p=function(t,e){return t>>>e|t<<32-e},d=function(t,e){return t>>>e},g=function(t,e,n){return t&e^~t&n},m=function(t,e,n){return t&e^t&n^e&n},v=function(t){return p(t,2)^p(t,13)^p(t,22)},y=function(t){return p(t,6)^p(t,11)^p(t,25)},b=function(t){return p(t,7)^p(t,18)^d(t,3)},x=function(t){return p(t,17)^p(t,19)^d(t,10)},w=function(t,e){var n,r,i,o,s,a,u,c,l,f,p,d,w=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756734187,3204031479,3329325298),S=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),_=new Array(64);t[e>>5]|=128<<24-e%32,t[(e+64>>9<<4)+15]=e;for(var l=0;l<t.length;l+=16){n=S[0],r=S[1],i=S[2],o=S[3],s=S[4],a=S[5],u=S[6],c=S[7];for(var f=0;64>f;f++)_[f]=16>f?t[f+l]:h(h(h(x(_[f-2]),_[f-7]),b(_[f-15])),_[f-16]),p=h(h(h(h(c,y(s)),g(s,a,u)),w[f]),_[f]),d=h(v(n),m(n,r,i)),c=u,u=a,a=s,s=h(o,p),o=i,i=r,r=n,n=h(p,d);S[0]=h(n,S[0]),S[1]=h(r,S[1]),S[2]=h(i,S[2]),S[3]=h(o,S[3]),S[4]=h(s,S[4]),S[5]=h(a,S[5]),S[6]=h(u,S[6]),S[7]=h(c,S[7])}return S},S=function(t){for(var e=Array(),n=(1<<f)-1,r=0;r<t.length*f;r+=f)e[r>>5]|=(t.charCodeAt(r/f)&n)<<24-r%32;return e},_=function(t){for(var e=l?"0123456789ABCDEF":"0123456789abcdef",n="",r=0;r<4*t.length;r++)n+=e.charAt(15&t[r>>2]>>8*(3-r%4)+4)+e.charAt(15&t[r>>2]>>8*(3-r%4));return n},E=function(t){var e,n,r,i="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o="",s=4*t.length,a="=";for(e=0;s>e;e+=3)for(r=(255&t[e>>2]>>8*(3-e%4))<<16|(255&t[e+1>>2]>>8*(3-(e+1)%4))<<8|255&t[e+2>>2]>>8*(3-(e+2)%4),n=0;4>n;n+=1)o+=8*e+6*n<=32*t.length?i.charAt(63&r>>6*(3-n)):a;return o},N=function(t,e){var n=S(t);n.length>16&&(n=w(n,t.length*f));for(var r=Array(16),i=Array(16),o=0;16>o;o++)r[o]=909522486^n[o],i[o]=1549556828^n[o];var s=w(r.concat(S(e)),512+e.length*f);return w(i.concat(s),768)}},{}],65:[function(t,e){t=function(t,e,n,r){function i(r){if(!n[r]){if(!e[r]){if(t)return t(r);throw new Error("Cannot find module '"+r+"'")}var o=n[r]={exports:{}};e[r][0](function(t){var n=e[r][1][t];return i(n?n:t)},o,o.exports)}return n[r].exports}for(var o=0;o<r.length;o++)i(r[o]);return i}("undefined"!=typeof t&&t,{1:[function(t,e){function n(t){if(Object.keys)return Object.keys(t);var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}function r(t,e){return void 0===e?""+e:"number"!=typeof e||!isNaN(e)&&isFinite(e)?"function"==typeof e||e instanceof RegExp?e.toString():e:e.toString()}function i(t,e){return"string"==typeof t?t.length<e?t:t.slice(0,e):t}function o(t,e,n,r,i){throw new m.AssertionError({message:n,actual:t,expected:e,operator:r,stackStartFunction:i})}function s(t,e){t||o(t,!0,e,"==",m.ok)}function a(t,e){if(t===e)return!0;if(d.isBuffer(t)&&d.isBuffer(e)){if(t.length!=e.length)return!1;for(var n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}return t instanceof Date&&e instanceof Date?t.getTime()===e.getTime():"object"!=typeof t&&"object"!=typeof e?t==e:l(t,e)}function u(t){return null===t||void 0===t}function c(t){return"[object Arguments]"==Object.prototype.toString.call(t)}function l(t,e){if(u(t)||u(e))return!1;if(t.prototype!==e.prototype)return!1;if(c(t))return c(e)?(t=g.call(t),e=g.call(e),a(t,e)):!1;try{var r,i,o=n(t),s=n(e)}catch(l){return!1}if(o.length!=s.length)return!1;for(o.sort(),s.sort(),i=o.length-1;i>=0;i--)if(o[i]!=s[i])return!1;for(i=o.length-1;i>=0;i--)if(r=o[i],!a(t[r],e[r]))return!1;return!0}function f(t,e){return t&&e?e instanceof RegExp?e.test(t):t instanceof e?!0:e.call({},t)===!0?!0:!1:!1}function h(t,e,n,r){var i;"string"==typeof n&&(r=n,n=null);try{e()}catch(s){i=s}if(r=(n&&n.name?" ("+n.name+").":".")+(r?" "+r:"."),t&&!i&&o("Missing expected exception"+r),!t&&f(i,n)&&o("Got unwanted exception"+r),t&&i&&n&&!f(i,n)||!t&&i)throw i}var p=t("util"),d=t("buffer").Buffer,g=Array.prototype.slice,m=e.exports=s;m.AssertionError=function(t){this.name="AssertionError",this.message=t.message,this.actual=t.actual,this.expected=t.expected,this.operator=t.operator;var e=t.stackStartFunction||o;Error.captureStackTrace&&Error.captureStackTrace(this,e)},p.inherits(m.AssertionError,Error),m.AssertionError.prototype.toString=function(){return this.message?[this.name+":",this.message].join(" "):[this.name+":",i(JSON.stringify(this.actual,r),128),this.operator,i(JSON.stringify(this.expected,r),128)].join(" ")},m.AssertionError.__proto__=Error.prototype,m.fail=o,m.ok=s,m.equal=function(t,e,n){t!=e&&o(t,e,n,"==",m.equal)},m.notEqual=function(t,e,n){t==e&&o(t,e,n,"!=",m.notEqual)},m.deepEqual=function(t,e,n){a(t,e)||o(t,e,n,"deepEqual",m.deepEqual)},m.notDeepEqual=function(t,e,n){a(t,e)&&o(t,e,n,"notDeepEqual",m.notDeepEqual)},m.strictEqual=function(t,e,n){t!==e&&o(t,e,n,"===",m.strictEqual)},m.notStrictEqual=function(t,e,n){t===e&&o(t,e,n,"!==",m.notStrictEqual)},m.throws=function(){h.apply(this,[!0].concat(g.call(arguments)))},m.doesNotThrow=function(){h.apply(this,[!1].concat(g.call(arguments)))},m.ifError=function(t){if(t)throw t}},{util:2,buffer:3}],2:[function(t,e,n){function r(t){return t instanceof Array||Array.isArray(t)||t&&t!==Object.prototype&&r(t.__proto__)}function i(t){return t instanceof RegExp||"object"==typeof t&&"[object RegExp]"===Object.prototype.toString.call(t)}function o(t){if(t instanceof Date)return!0;if("object"!=typeof t)return!1;var e=Date.prototype&&a(Date.prototype),n=t.__proto__&&a(t.__proto__);return JSON.stringify(n)===JSON.stringify(e)}t("events"),n.isArray=r,n.isDate=function(t){return"[object Date]"===Object.prototype.toString.call(t)},n.isRegExp=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},n.print=function(){},n.puts=function(){},n.debug=function(){},n.inspect=function(t,e,u,c){function l(t,u){if(t&&"function"==typeof t.inspect&&t!==n&&(!t.constructor||t.constructor.prototype!==t))return t.inspect(u);switch(typeof t){case"undefined":return h("undefined","undefined");case"string":var c="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return h(c,"string");case"number":return h(""+t,"number");case"boolean":return h(""+t,"boolean")}if(null===t)return h("null","null");var p=s(t),d=e?a(t):p;if("function"==typeof t&&0===d.length){if(i(t))return h(""+t,"regexp");var g=t.name?": "+t.name:"";return h("[Function"+g+"]","special")}if(o(t)&&0===d.length)return h(t.toUTCString(),"date");var m,v,y;if(r(t)?(v="Array",y=["[","]"]):(v="Object",y=["{","}"]),"function"==typeof t){var b=t.name?": "+t.name:"";m=i(t)?" "+t:" [Function"+b+"]"}else m="";if(o(t)&&(m=" "+t.toUTCString()),0===d.length)return y[0]+m+y[1];if(0>u)return i(t)?h(""+t,"regexp"):h("[Object]","special");f.push(t);var x=d.map(function(e){var n,i;if(t.__lookupGetter__&&(t.__lookupGetter__(e)?i=t.__lookupSetter__(e)?h("[Getter/Setter]","special"):h("[Getter]","special"):t.__lookupSetter__(e)&&(i=h("[Setter]","special"))),p.indexOf(e)<0&&(n="["+e+"]"),i||(f.indexOf(t[e])<0?(i=null===u?l(t[e]):l(t[e],u-1),i.indexOf("\n")>-1&&(i=r(t)?i.split("\n").map(function(t){return" "+t}).join("\n").substr(2):"\n"+i.split("\n").map(function(t){return" "+t}).join("\n"))):i=h("[Circular]","special")),"undefined"==typeof n){if("Array"===v&&e.match(/^\d+$/))return i;n=JSON.stringify(""+e),n.match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(n=n.substr(1,n.length-2),n=h(n,"name")):(n=n.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),n=h(n,"string"))}return n+": "+i});f.pop();var w=0,S=x.reduce(function(t,e){return w++,e.indexOf("\n")>=0&&w++,t+e.length+1},0);return x=S>50?y[0]+(""===m?"":m+"\n ")+" "+x.join(",\n ")+" "+y[1]:y[0]+m+" "+x.join(", ")+" "+y[1]}var f=[],h=function(t,e){var n={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},r={special:"cyan",number:"blue","boolean":"yellow",undefined:"grey","null":"bold",string:"green",date:"magenta",regexp:"red"}[e];return r?"["+n[r][0]+"m"+t+"["+n[r][1]+"m":t};return c||(h=function(t){return t}),l(t,"undefined"==typeof u?2:u)},n.log=function(){},n.pump=null;var s=Object.keys||function(t){var e=[];for(var n in t)e.push(n);return e},a=Object.getOwnPropertyNames||function(t){var e=[];for(var n in t)Object.hasOwnProperty.call(t,n)&&e.push(n);return e},u=Object.create||function(t,e){var n;if(null===t)n={__proto__:null};else{if("object"!=typeof t)throw new TypeError("typeof prototype["+typeof t+"] != 'object'");var r=function(){};r.prototype=t,n=new r,n.__proto__=t}return"undefined"!=typeof e&&Object.defineProperties&&Object.defineProperties(n,e),n};n.inherits=function(t,e){t.super_=e,t.prototype=u(e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}})};var c=/%[sdj%]/g;n.format=function(t){if("string"!=typeof t){for(var e=[],r=0;r<arguments.length;r++)e.push(n.inspect(arguments[r]));return e.join(" ")}for(var r=1,i=arguments,o=i.length,s=String(t).replace(c,function(t){if("%%"===t)return"%";if(r>=o)return t;switch(t){case"%s":return String(i[r++]);case"%d":return Number(i[r++]);case"%j":return JSON.stringify(i[r++]);default:return t}}),a=i[r];o>r;a=i[++r])s+=null===a||"object"!=typeof a?" "+a:" "+n.inspect(a);return s}},{events:4}],5:[function(t,e,n){n.readIEEE754=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?0:i-1,h=n?1:-1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},n.writeIEEE754=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?o-1:0,d=r?-1:1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}},{}],6:[function(t,e){var n=e.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){if(t.source===window&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var e=n.shift();e()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],4:[function(t,e,n){!function(t){function e(t,e){if(t.indexOf)return t.indexOf(e);for(var n=0;n<t.length;n++)if(e===t[n])return n;return-1}t.EventEmitter||(t.EventEmitter=function(){});var r=n.EventEmitter=t.EventEmitter,i="function"==typeof Array.isArray?Array.isArray:function(t){return"[object Array]"===Object.prototype.toString.call(t)},o=10;r.prototype.setMaxListeners=function(t){this._events||(this._events={}),this._events.maxListeners=t},r.prototype.emit=function(t){if("error"===t&&(!this._events||!this._events.error||i(this._events.error)&&!this._events.error.length))throw arguments[1]instanceof Error?arguments[1]:new Error("Uncaught, unspecified 'error' event.");if(!this._events)return!1;var e=this._events[t];if(!e)return!1;if("function"==typeof e){switch(arguments.length){case 1:e.call(this);break;case 2:e.call(this,arguments[1]);break;case 3:e.call(this,arguments[1],arguments[2]);break;default:var n=Array.prototype.slice.call(arguments,1);e.apply(this,n)}return!0}if(i(e)){for(var n=Array.prototype.slice.call(arguments,1),r=e.slice(),o=0,s=r.length;s>o;o++)r[o].apply(this,n);return!0}return!1},r.prototype.addListener=function(t,e){if("function"!=typeof e)throw new Error("addListener only takes instances of Function");if(this._events||(this._events={}),this.emit("newListener",t,e),this._events[t])if(i(this._events[t])){if(!this._events[t].warned){var n;n=void 0!==this._events.maxListeners?this._events.maxListeners:o,n&&n>0&&this._events[t].length>n&&(this._events[t].warned=!0,console.error("(node) warning: possible EventEmitter memory leak detected. %d listeners added. Use emitter.setMaxListeners() to increase limit.",this._events[t].length),console.trace())}this._events[t].push(e)}else this._events[t]=[this._events[t],e];else this._events[t]=e;return this},r.prototype.on=r.prototype.addListener,r.prototype.once=function(t,e){var n=this;return n.on(t,function r(){n.removeListener(t,r),e.apply(this,arguments)}),this},r.prototype.removeListener=function(t,n){if("function"!=typeof n)throw new Error("removeListener only takes instances of Function");if(!this._events||!this._events[t])return this;var r=this._events[t];if(i(r)){var o=e(r,n);if(0>o)return this;r.splice(o,1),0==r.length&&delete this._events[t]}else this._events[t]===n&&delete this._events[t];return this},r.prototype.removeAllListeners=function(t){return 0===arguments.length?(this._events={},this):(t&&this._events&&this._events[t]&&(this._events[t]=null),this)},r.prototype.listeners=function(t){return this._events||(this._events={}),this._events[t]||(this._events[t]=[]),i(this._events[t])||(this._events[t]=[this._events[t]]),this._events[t]}}(t("__browserify_process"))},{__browserify_process:6}],"buffer-browserify":[function(t,e){e.exports=t("q9TxCC")},{}],q9TxCC:[function(t,e,n){function r(t){this.length=t}function i(t){return 16>t?"0"+t.toString(16):t.toString(16)}function o(t){for(var e=[],n=0;n<t.length;n++)if(t.charCodeAt(n)<=127)e.push(t.charCodeAt(n));else for(var r=encodeURIComponent(t.charAt(n)).substr(1).split("%"),i=0;i<r.length;i++)e.push(parseInt(r[i],16));return e}function s(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function a(e){return t("base64-js").toByteArray(e)}function u(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);)e[i+n]=t[i],i++;return i}function c(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function l(t){return t=~~Math.ceil(+t),0>t?0:t}function f(t,e,n){if(!(this instanceof f))return new f(t,e,n);var i;if("number"==typeof n)this.length=l(e),this.parent=t,this.offset=n;else{switch(i=typeof t){case"number":this.length=l(t);break;case"string":this.length=f.byteLength(t,e);break;case"object":this.length=l(t.length);break;default:throw new Error("First argument needs to be a number, array or string.")}if(this.length>f.poolSize?(this.parent=new r(this.length),this.offset=0):((!C||C.length-C.used<this.length)&&p(),this.parent=C,this.offset=C.used,C.used+=this.length),h(t))for(var o=0;o<this.length;o++)this.parent[o+this.offset]=t instanceof f?t.readUInt8(o):t[o];else"string"==i&&(this.length=this.write(t,0,e))}}function h(t){return Array.isArray(t)||f.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function p(){C=new r(f.poolSize),C.used=0}function d(t,e,n,r){var i=0;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+1<t.length,"Trying to read beyond buffer length")),e>=t.length?0:(n?(i=t.parent[t.offset+e]<<8,e+1<t.length&&(i|=t.parent[t.offset+e+1])):(i=t.parent[t.offset+e],e+1<t.length&&(i|=t.parent[t.offset+e+1]<<8)),i)}function g(t,e,n,r){var i=0;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+3<t.length,"Trying to read beyond buffer length")),e>=t.length?0:(n?(e+1<t.length&&(i=t.parent[t.offset+e+1]<<16),e+2<t.length&&(i|=t.parent[t.offset+e+2]<<8),e+3<t.length&&(i|=t.parent[t.offset+e+3]),i+=t.parent[t.offset+e]<<24>>>0):(e+2<t.length&&(i=t.parent[t.offset+e+2]<<16),e+1<t.length&&(i|=t.parent[t.offset+e+1]<<8),i|=t.parent[t.offset+e],e+3<t.length&&(i+=t.parent[t.offset+e+3]<<24>>>0)),i)}function m(t,e,n,r){var i,o;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+1<t.length,"Trying to read beyond buffer length")),o=d(t,e,n,r),i=32768&o,i?-1*(65535-o+1):o}function v(t,e,n,r){var i,o;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+3<t.length,"Trying to read beyond buffer length")),o=g(t,e,n,r),i=2147483648&o,i?-1*(4294967295-o+1):o}function y(e,n,r,i){return i||(O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(n+3<e.length,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,n,r,23,4)}function b(e,n,r,i){return i||(O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(n+7<e.length,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,n,r,52,8)}function x(t,e){O.ok("number"==typeof t,"cannot write a non-number as a number"),O.ok(t>=0,"specified a negative value for writing an unsigned value"),O.ok(e>=t,"value is larger than maximum value for type"),O.ok(Math.floor(t)===t,"value has a fractional component")}function w(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+1<t.length,"trying to write beyond buffer length"),x(e,65535));for(var o=0;o<Math.min(t.length-n,2);o++)t.parent[t.offset+n+o]=(e&255<<8*(r?1-o:o))>>>8*(r?1-o:o)}function S(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+3<t.length,"trying to write beyond buffer length"),x(e,4294967295));for(var o=0;o<Math.min(t.length-n,4);o++)t.parent[t.offset+n+o]=255&e>>>8*(r?3-o:o)}function _(t,e,n){O.ok("number"==typeof t,"cannot write a non-number as a number"),O.ok(e>=t,"value larger than maximum allowed value"),O.ok(t>=n,"value smaller than minimum allowed value"),O.ok(Math.floor(t)===t,"value has a fractional component")}function E(t,e,n){O.ok("number"==typeof t,"cannot write a non-number as a number"),O.ok(e>=t,"value larger than maximum allowed value"),O.ok(t>=n,"value smaller than minimum allowed value")}function N(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+1<t.length,"Trying to write beyond buffer length"),_(e,32767,-32768)),e>=0?w(t,e,n,r,i):w(t,65535+e+1,n,r,i)}function k(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+3<t.length,"Trying to write beyond buffer length"),_(e,2147483647,-2147483648)),e>=0?S(t,e,n,r,i):S(t,4294967295+e+1,n,r,i)}function j(e,n,r,i,o){o||(O.ok(void 0!==n&&null!==n,"missing value"),O.ok("boolean"==typeof i,"missing or invalid endian"),O.ok(void 0!==r&&null!==r,"missing offset"),O.ok(r+3<e.length,"Trying to write beyond buffer length"),E(n,3.4028234663852886e38,-3.4028234663852886e38)),t("./buffer_ieee754").writeIEEE754(e,n,r,i,23,4)}function A(e,n,r,i,o){o||(O.ok(void 0!==n&&null!==n,"missing value"),O.ok("boolean"==typeof i,"missing or invalid endian"),O.ok(void 0!==r&&null!==r,"missing offset"),O.ok(r+7<e.length,"Trying to write beyond buffer length"),E(n,1.7976931348623157e308,-1.7976931348623157e308)),t("./buffer_ieee754").writeIEEE754(e,n,r,i,52,8)}var O=t("assert");n.INSPECT_MAX_BYTES=50,r.byteLength=function(t,e){switch(e||"utf8"){case"hex":return t.length/2;case"utf8":case"utf-8":return o(t).length;case"ascii":case"binary":return t.length;case"base64":return a(t).length;default:throw new Error("Unknown encoding")}},r.prototype.utf8Write=function(t,e,n){return r._charsWritten=u(o(t),this,e,n)},r.prototype.asciiWrite=function(t,e,n){return r._charsWritten=u(s(t),this,e,n)},r.prototype.binaryWrite=r.prototype.asciiWrite,r.prototype.base64Write=function(t,e,n){return r._charsWritten=u(a(t),this,e,n)},r.prototype.base64Slice=function(){var e=Array.prototype.slice.apply(this,arguments);return t("base64-js").fromByteArray(e)},r.prototype.utf8Slice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",n="",r=0;r<t.length;)t[r]<=127?(e+=c(n)+String.fromCharCode(t[r]),n=""):n+="%"+t[r].toString(16),r++;return e+c(n)},r.prototype.asciiSlice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},r.prototype.binarySlice=r.prototype.asciiSlice,r.prototype.inspect=function(){for(var t=[],e=this.length,r=0;e>r;r++)if(t[r]=i(this[r]),r==n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<SlowBuffer "+t.join(" ")+">"},r.prototype.hexSlice=function(t,e){var n=this.length;(!t||0>t)&&(t=0),(!e||0>e||e>n)&&(e=n);for(var r="",o=t;e>o;o++)r+=i(this[o]);return r},r.prototype.toString=function(t,e,n){if(t=String(t||"utf8").toLowerCase(),e=+e||0,"undefined"==typeof n&&(n=this.length),+n==e)return"";switch(t){case"hex":return this.hexSlice(e,n);case"utf8":case"utf-8":return this.utf8Slice(e,n);case"ascii":return this.asciiSlice(e,n);case"binary":return this.binarySlice(e,n);case"base64":return this.base64Slice(e,n);case"ucs2":case"ucs-2":return this.ucs2Slice(e,n);default:throw new Error("Unknown encoding")}},r.prototype.hexWrite=function(t,e,n){e=+e||0;var i=this.length-e;n?(n=+n,n>i&&(n=i)):n=i;var o=t.length;if(o%2)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");this[e+s]=a}return r._charsWritten=2*s,s},r.prototype.write=function(t,e,n,r){if(isFinite(e))isFinite(n)||(r=n,n=void 0);else{var i=r;r=e,e=n,n=i}e=+e||0;var o=this.length-e;switch(n?(n=+n,n>o&&(n=o)):n=o,r=String(r||"utf8").toLowerCase()){case"hex":return this.hexWrite(t,e,n);case"utf8":case"utf-8":return this.utf8Write(t,e,n);case"ascii":return this.asciiWrite(t,e,n);case"binary":return this.binaryWrite(t,e,n);case"base64":return this.base64Write(t,e,n);case"ucs2":case"ucs-2":return this.ucs2Write(t,e,n);default:throw new Error("Unknown encoding")}},r.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw new Error("oob");if(t>e)throw new Error("oob");return new f(this,e-t,+t)},r.prototype.copy=function(t,e,n,r){for(var i=[],o=n;r>o;o++)O.ok("undefined"!=typeof this[o],"copying undefined buffer bytes!"),i.push(this[o]);for(var o=e;o<e+i.length;o++)t[o]=i[o-e]},r.prototype.fill=function(t,e,n){if(n>this.length)throw new Error("oob");if(e>n)throw new Error("oob");for(var r=e;n>r;r++)this[r]=t},n.SlowBuffer=r,n.Buffer=f,f.poolSize=8192;var C;f.isBuffer=function(t){return t instanceof f||t instanceof r},f.concat=function(t,e){if(!Array.isArray(t))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===t.length)return new f(0);if(1===t.length)return t[0];if("number"!=typeof e){e=0;for(var n=0;n<t.length;n++){var r=t[n];e+=r.length}}for(var i=new f(e),o=0,n=0;n<t.length;n++){var r=t[n];r.copy(i,o),o+=r.length}return i},f.prototype.inspect=function(){for(var t=[],e=this.length,r=0;e>r;r++)if(t[r]=i(this.parent[r+this.offset]),r==n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<Buffer "+t.join(" ")+">"},f.prototype.get=function(t){if(0>t||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]},f.prototype.set=function(t,e){if(0>t||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]=e},f.prototype.write=function(t,e,n,i){if(isFinite(e))isFinite(n)||(i=n,n=void 0);else{var o=i;i=e,e=n,n=o}e=+e||0;var s=this.length-e;n?(n=+n,n>s&&(n=s)):n=s,i=String(i||"utf8").toLowerCase();var a;switch(i){case"hex":a=this.parent.hexWrite(t,this.offset+e,n);break;case"utf8":case"utf-8":a=this.parent.utf8Write(t,this.offset+e,n);break;case"ascii":a=this.parent.asciiWrite(t,this.offset+e,n);break;case"binary":a=this.parent.binaryWrite(t,this.offset+e,n);break;case"base64":a=this.parent.base64Write(t,this.offset+e,n);break;case"ucs2":case"ucs-2":a=this.parent.ucs2Write(t,this.offset+e,n);break;default:throw new Error("Unknown encoding")}return f._charsWritten=r._charsWritten,a},f.prototype.toString=function(t,e,n){switch(t=String(t||"utf8").toLowerCase(),"undefined"==typeof e||0>e?e=0:e>this.length&&(e=this.length),"undefined"==typeof n||n>this.length?n=this.length:0>n&&(n=0),e+=this.offset,n+=this.offset,t){case"hex":return this.parent.hexSlice(e,n);case"utf8":case"utf-8":return this.parent.utf8Slice(e,n);case"ascii":return this.parent.asciiSlice(e,n);case"binary":return this.parent.binarySlice(e,n);case"base64":return this.parent.base64Slice(e,n);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(e,n);default:throw new Error("Unknown encoding")}},f.byteLength=r.byteLength,f.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),"number"!=typeof t||isNaN(t))throw new Error("value is not a number");if(e>n)throw new Error("end < start");if(n===e)return 0;if(0==this.length)return 0;if(0>e||e>=this.length)throw new Error("start out of bounds");if(0>n||n>this.length)throw new Error("end out of bounds");return this.parent.fill(t,e+this.offset,n+this.offset)},f.prototype.copy=function(t,e,n,r){var i=this;if(n||(n=0),r||(r=this.length),e||(e=0),n>r)throw new Error("sourceEnd < sourceStart");if(r===n)return 0;if(0==t.length||0==i.length)return 0;if(0>e||e>=t.length)throw new Error("targetStart out of bounds");if(0>n||n>=i.length)throw new Error("sourceStart out of bounds");if(0>r||r>i.length)throw new Error("sourceEnd out of bounds");return r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n),this.parent.copy(t.parent,e+t.offset,n+this.offset,r+this.offset)},f.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw new Error("oob");if(t>e)throw new Error("oob");return new f(this.parent,e-t,+t+this.offset)},f.prototype.utf8Slice=function(t,e){return this.toString("utf8",t,e)},f.prototype.binarySlice=function(t,e){return this.toString("binary",t,e)},f.prototype.asciiSlice=function(t,e){return this.toString("ascii",t,e)},f.prototype.utf8Write=function(t,e){return this.write(t,e,"utf8")},f.prototype.binaryWrite=function(t,e){return this.write(t,e,"binary")},f.prototype.asciiWrite=function(t,e){return this.write(t,e,"ascii")},f.prototype.readUInt8=function(t,e){var n=this;return e||(O.ok(void 0!==t&&null!==t,"missing offset"),O.ok(t<n.length,"Trying to read beyond buffer length")),t>=n.length?void 0:n.parent[n.offset+t]},f.prototype.readUInt16LE=function(t,e){return d(this,t,!1,e)},f.prototype.readUInt16BE=function(t,e){return d(this,t,!0,e)},f.prototype.readUInt32LE=function(t,e){return g(this,t,!1,e)},f.prototype.readUInt32BE=function(t,e){return g(this,t,!0,e)},f.prototype.readInt8=function(t,e){var n,r=this;return e||(O.ok(void 0!==t&&null!==t,"missing offset"),O.ok(t<r.length,"Trying to read beyond buffer length")),t>=r.length?void 0:(n=128&r.parent[r.offset+t],n?-1*(255-r.parent[r.offset+t]+1):r.parent[r.offset+t])
|
||
},f.prototype.readInt16LE=function(t,e){return m(this,t,!1,e)},f.prototype.readInt16BE=function(t,e){return m(this,t,!0,e)},f.prototype.readInt32LE=function(t,e){return v(this,t,!1,e)},f.prototype.readInt32BE=function(t,e){return v(this,t,!0,e)},f.prototype.readFloatLE=function(t,e){return y(this,t,!1,e)},f.prototype.readFloatBE=function(t,e){return y(this,t,!0,e)},f.prototype.readDoubleLE=function(t,e){return b(this,t,!1,e)},f.prototype.readDoubleBE=function(t,e){return b(this,t,!0,e)},f.prototype.writeUInt8=function(t,e,n){var r=this;n||(O.ok(void 0!==t&&null!==t,"missing value"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e<r.length,"trying to write beyond buffer length"),x(t,255)),e<r.length&&(r.parent[r.offset+e]=t)},f.prototype.writeUInt16LE=function(t,e,n){w(this,t,e,!1,n)},f.prototype.writeUInt16BE=function(t,e,n){w(this,t,e,!0,n)},f.prototype.writeUInt32LE=function(t,e,n){S(this,t,e,!1,n)},f.prototype.writeUInt32BE=function(t,e,n){S(this,t,e,!0,n)},f.prototype.writeInt8=function(t,e,n){var r=this;n||(O.ok(void 0!==t&&null!==t,"missing value"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e<r.length,"Trying to write beyond buffer length"),_(t,127,-128)),t>=0?r.writeUInt8(t,e,n):r.writeUInt8(255+t+1,e,n)},f.prototype.writeInt16LE=function(t,e,n){N(this,t,e,!1,n)},f.prototype.writeInt16BE=function(t,e,n){N(this,t,e,!0,n)},f.prototype.writeInt32LE=function(t,e,n){k(this,t,e,!1,n)},f.prototype.writeInt32BE=function(t,e,n){k(this,t,e,!0,n)},f.prototype.writeFloatLE=function(t,e,n){j(this,t,e,!1,n)},f.prototype.writeFloatBE=function(t,e,n){j(this,t,e,!0,n)},f.prototype.writeDoubleLE=function(t,e,n){A(this,t,e,!1,n)},f.prototype.writeDoubleBE=function(t,e,n){A(this,t,e,!0,n)},r.prototype.readUInt8=f.prototype.readUInt8,r.prototype.readUInt16LE=f.prototype.readUInt16LE,r.prototype.readUInt16BE=f.prototype.readUInt16BE,r.prototype.readUInt32LE=f.prototype.readUInt32LE,r.prototype.readUInt32BE=f.prototype.readUInt32BE,r.prototype.readInt8=f.prototype.readInt8,r.prototype.readInt16LE=f.prototype.readInt16LE,r.prototype.readInt16BE=f.prototype.readInt16BE,r.prototype.readInt32LE=f.prototype.readInt32LE,r.prototype.readInt32BE=f.prototype.readInt32BE,r.prototype.readFloatLE=f.prototype.readFloatLE,r.prototype.readFloatBE=f.prototype.readFloatBE,r.prototype.readDoubleLE=f.prototype.readDoubleLE,r.prototype.readDoubleBE=f.prototype.readDoubleBE,r.prototype.writeUInt8=f.prototype.writeUInt8,r.prototype.writeUInt16LE=f.prototype.writeUInt16LE,r.prototype.writeUInt16BE=f.prototype.writeUInt16BE,r.prototype.writeUInt32LE=f.prototype.writeUInt32LE,r.prototype.writeUInt32BE=f.prototype.writeUInt32BE,r.prototype.writeInt8=f.prototype.writeInt8,r.prototype.writeInt16LE=f.prototype.writeInt16LE,r.prototype.writeInt16BE=f.prototype.writeInt16BE,r.prototype.writeInt32LE=f.prototype.writeInt32LE,r.prototype.writeInt32BE=f.prototype.writeInt32BE,r.prototype.writeFloatLE=f.prototype.writeFloatLE,r.prototype.writeFloatBE=f.prototype.writeFloatBE,r.prototype.writeDoubleLE=f.prototype.writeDoubleLE,r.prototype.writeDoubleBE=f.prototype.writeDoubleBE},{assert:1,"./buffer_ieee754":5,"base64-js":7}],7:[function(t,e){!function(){"use strict";function t(t){var e,n,i,o,s,a;if(t.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(s=t.indexOf("="),s=s>0?t.length-s:0,a=[],i=s>0?t.length-4:t.length,e=0,n=0;i>e;e+=4,n+=3)o=r.indexOf(t[e])<<18|r.indexOf(t[e+1])<<12|r.indexOf(t[e+2])<<6|r.indexOf(t[e+3]),a.push((16711680&o)>>16),a.push((65280&o)>>8),a.push(255&o);return 2===s?(o=r.indexOf(t[e])<<2|r.indexOf(t[e+1])>>4,a.push(255&o)):1===s&&(o=r.indexOf(t[e])<<10|r.indexOf(t[e+1])<<4|r.indexOf(t[e+2])>>2,a.push(255&o>>8),a.push(255&o)),a}function n(t){function e(t){return r[63&t>>18]+r[63&t>>12]+r[63&t>>6]+r[63&t]}var n,i,o,s=t.length%3,a="";for(n=0,o=t.length-s;o>n;n+=3)i=(t[n]<<16)+(t[n+1]<<8)+t[n+2],a+=e(i);switch(s){case 1:i=t[t.length-1],a+=r[i>>2],a+=r[63&i<<4],a+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],a+=r[i>>10],a+=r[63&i>>4],a+=r[63&i<<2],a+="="}return a}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports.toByteArray=t,e.exports.fromByteArray=n}()},{}],8:[function(t,e,n){n.readIEEE754=function(t,e,n,r,i){var o,s,a=8*i-r-1,u=(1<<a)-1,c=u>>1,l=-7,f=n?0:i-1,h=n?1:-1,p=t[e+f];for(f+=h,o=p&(1<<-l)-1,p>>=-l,l+=a;l>0;o=256*o+t[e+f],f+=h,l-=8);for(s=o&(1<<-l)-1,o>>=-l,l+=r;l>0;s=256*s+t[e+f],f+=h,l-=8);if(0===o)o=1-c;else{if(o===u)return s?0/0:1/0*(p?-1:1);s+=Math.pow(2,r),o-=c}return(p?-1:1)*s*Math.pow(2,o-r)},n.writeIEEE754=function(t,e,n,r,i,o){var s,a,u,c=8*o-i-1,l=(1<<c)-1,f=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=r?o-1:0,d=r?-1:1,g=0>e||0===e&&0>1/e?1:0;for(e=Math.abs(e),isNaN(e)||1/0===e?(a=isNaN(e)?1:0,s=l):(s=Math.floor(Math.log(e)/Math.LN2),e*(u=Math.pow(2,-s))<1&&(s--,u*=2),e+=s+f>=1?h/u:h*Math.pow(2,1-f),e*u>=2&&(s++,u/=2),s+f>=l?(a=0,s=l):s+f>=1?(a=(e*u-1)*Math.pow(2,i),s+=f):(a=e*Math.pow(2,f-1)*Math.pow(2,i),s=0));i>=8;t[n+p]=255&a,p+=d,a/=256,i-=8);for(s=s<<i|a,c+=i;c>0;t[n+p]=255&s,p+=d,s/=256,c-=8);t[n+p-d]|=128*g}},{}],3:[function(t,e,n){function r(t){this.length=t}function i(t){return 16>t?"0"+t.toString(16):t.toString(16)}function o(t){for(var e=[],n=0;n<t.length;n++)if(t.charCodeAt(n)<=127)e.push(t.charCodeAt(n));else for(var r=encodeURIComponent(t.charAt(n)).substr(1).split("%"),i=0;i<r.length;i++)e.push(parseInt(r[i],16));return e}function s(t){for(var e=[],n=0;n<t.length;n++)e.push(255&t.charCodeAt(n));return e}function a(e){return t("base64-js").toByteArray(e)}function u(t,e,n,r){for(var i=0;r>i&&!(i+n>=e.length||i>=t.length);)e[i+n]=t[i],i++;return i}function c(t){try{return decodeURIComponent(t)}catch(e){return String.fromCharCode(65533)}}function l(t){return t=~~Math.ceil(+t),0>t?0:t}function f(t,e,n){if(!(this instanceof f))return new f(t,e,n);var i;if("number"==typeof n)this.length=l(e),this.parent=t,this.offset=n;else{switch(i=typeof t){case"number":this.length=l(t);break;case"string":this.length=f.byteLength(t,e);break;case"object":this.length=l(t.length);break;default:throw new Error("First argument needs to be a number, array or string.")}if(this.length>f.poolSize?(this.parent=new r(this.length),this.offset=0):((!C||C.length-C.used<this.length)&&p(),this.parent=C,this.offset=C.used,C.used+=this.length),h(t))for(var o=0;o<this.length;o++)this.parent[o+this.offset]=t[o];else"string"==i&&(this.length=this.write(t,0,e))}}function h(t){return Array.isArray(t)||f.isBuffer(t)||t&&"object"==typeof t&&"number"==typeof t.length}function p(){C=new r(f.poolSize),C.used=0}function d(t,e,n,r){var i=0;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+1<t.length,"Trying to read beyond buffer length")),n?(i=t.parent[t.offset+e]<<8,i|=t.parent[t.offset+e+1]):(i=t.parent[t.offset+e],i|=t.parent[t.offset+e+1]<<8),i}function g(t,e,n,r){var i=0;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+3<t.length,"Trying to read beyond buffer length")),n?(i=t.parent[t.offset+e+1]<<16,i|=t.parent[t.offset+e+2]<<8,i|=t.parent[t.offset+e+3],i+=t.parent[t.offset+e]<<24>>>0):(i=t.parent[t.offset+e+2]<<16,i|=t.parent[t.offset+e+1]<<8,i|=t.parent[t.offset+e],i+=t.parent[t.offset+e+3]<<24>>>0),i}function m(t,e,n,r){var i,o;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+1<t.length,"Trying to read beyond buffer length")),o=d(t,e,n,r),i=32768&o,i?-1*(65535-o+1):o}function v(t,e,n,r){var i,o;return r||(O.ok("boolean"==typeof n,"missing or invalid endian"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e+3<t.length,"Trying to read beyond buffer length")),o=g(t,e,n,r),i=2147483648&o,i?-1*(4294967295-o+1):o}function y(e,n,r,i){return i||(O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(n+3<e.length,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,n,r,23,4)}function b(e,n,r,i){return i||(O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(n+7<e.length,"Trying to read beyond buffer length")),t("./buffer_ieee754").readIEEE754(e,n,r,52,8)}function x(t,e){O.ok("number"==typeof t,"cannot write a non-number as a number"),O.ok(t>=0,"specified a negative value for writing an unsigned value"),O.ok(e>=t,"value is larger than maximum value for type"),O.ok(Math.floor(t)===t,"value has a fractional component")}function w(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+1<t.length,"trying to write beyond buffer length"),x(e,65535)),r?(t.parent[t.offset+n]=(65280&e)>>>8,t.parent[t.offset+n+1]=255&e):(t.parent[t.offset+n+1]=(65280&e)>>>8,t.parent[t.offset+n]=255&e)}function S(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+3<t.length,"trying to write beyond buffer length"),x(e,4294967295)),r?(t.parent[t.offset+n]=255&e>>>24,t.parent[t.offset+n+1]=255&e>>>16,t.parent[t.offset+n+2]=255&e>>>8,t.parent[t.offset+n+3]=255&e):(t.parent[t.offset+n+3]=255&e>>>24,t.parent[t.offset+n+2]=255&e>>>16,t.parent[t.offset+n+1]=255&e>>>8,t.parent[t.offset+n]=255&e)}function _(t,e,n){O.ok("number"==typeof t,"cannot write a non-number as a number"),O.ok(e>=t,"value larger than maximum allowed value"),O.ok(t>=n,"value smaller than minimum allowed value"),O.ok(Math.floor(t)===t,"value has a fractional component")}function E(t,e,n){O.ok("number"==typeof t,"cannot write a non-number as a number"),O.ok(e>=t,"value larger than maximum allowed value"),O.ok(t>=n,"value smaller than minimum allowed value")}function N(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+1<t.length,"Trying to write beyond buffer length"),_(e,32767,-32768)),e>=0?w(t,e,n,r,i):w(t,65535+e+1,n,r,i)}function k(t,e,n,r,i){i||(O.ok(void 0!==e&&null!==e,"missing value"),O.ok("boolean"==typeof r,"missing or invalid endian"),O.ok(void 0!==n&&null!==n,"missing offset"),O.ok(n+3<t.length,"Trying to write beyond buffer length"),_(e,2147483647,-2147483648)),e>=0?S(t,e,n,r,i):S(t,4294967295+e+1,n,r,i)}function j(e,n,r,i,o){o||(O.ok(void 0!==n&&null!==n,"missing value"),O.ok("boolean"==typeof i,"missing or invalid endian"),O.ok(void 0!==r&&null!==r,"missing offset"),O.ok(r+3<e.length,"Trying to write beyond buffer length"),E(n,3.4028234663852886e38,-3.4028234663852886e38)),t("./buffer_ieee754").writeIEEE754(e,n,r,i,23,4)}function A(e,n,r,i,o){o||(O.ok(void 0!==n&&null!==n,"missing value"),O.ok("boolean"==typeof i,"missing or invalid endian"),O.ok(void 0!==r&&null!==r,"missing offset"),O.ok(r+7<e.length,"Trying to write beyond buffer length"),E(n,1.7976931348623157e308,-1.7976931348623157e308)),t("./buffer_ieee754").writeIEEE754(e,n,r,i,52,8)}var O=t("assert");n.INSPECT_MAX_BYTES=50,r.byteLength=function(t,e){switch(e||"utf8"){case"hex":return t.length/2;case"utf8":case"utf-8":return o(t).length;case"ascii":return t.length;case"base64":return a(t).length;default:throw new Error("Unknown encoding")}},r.prototype.utf8Write=function(t,e,n){return r._charsWritten=u(o(t),this,e,n)},r.prototype.asciiWrite=function(t,e,n){return r._charsWritten=u(s(t),this,e,n)},r.prototype.base64Write=function(t,e,n){return r._charsWritten=u(a(t),this,e,n)},r.prototype.base64Slice=function(){var e=Array.prototype.slice.apply(this,arguments);return t("base64-js").fromByteArray(e)},r.prototype.utf8Slice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",n="",r=0;r<t.length;)t[r]<=127?(e+=c(n)+String.fromCharCode(t[r]),n=""):n+="%"+t[r].toString(16),r++;return e+c(n)},r.prototype.asciiSlice=function(){for(var t=Array.prototype.slice.apply(this,arguments),e="",n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e},r.prototype.inspect=function(){for(var t=[],e=this.length,r=0;e>r;r++)if(t[r]=i(this[r]),r==n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<SlowBuffer "+t.join(" ")+">"},r.prototype.hexSlice=function(t,e){var n=this.length;(!t||0>t)&&(t=0),(!e||0>e||e>n)&&(e=n);for(var r="",o=t;e>o;o++)r+=i(this[o]);return r},r.prototype.toString=function(t,e,n){if(t=String(t||"utf8").toLowerCase(),e=+e||0,"undefined"==typeof n&&(n=this.length),+n==e)return"";switch(t){case"hex":return this.hexSlice(e,n);case"utf8":case"utf-8":return this.utf8Slice(e,n);case"ascii":return this.asciiSlice(e,n);case"binary":return this.binarySlice(e,n);case"base64":return this.base64Slice(e,n);case"ucs2":case"ucs-2":return this.ucs2Slice(e,n);default:throw new Error("Unknown encoding")}},r.prototype.hexWrite=function(t,e,n){e=+e||0;var i=this.length-e;n?(n=+n,n>i&&(n=i)):n=i;var o=t.length;if(o%2)throw new Error("Invalid hex string");n>o/2&&(n=o/2);for(var s=0;n>s;s++){var a=parseInt(t.substr(2*s,2),16);if(isNaN(a))throw new Error("Invalid hex string");this[e+s]=a}return r._charsWritten=2*s,s},r.prototype.write=function(t,e,n,r){if(isFinite(e))isFinite(n)||(r=n,n=void 0);else{var i=r;r=e,e=n,n=i}e=+e||0;var o=this.length-e;switch(n?(n=+n,n>o&&(n=o)):n=o,r=String(r||"utf8").toLowerCase()){case"hex":return this.hexWrite(t,e,n);case"utf8":case"utf-8":return this.utf8Write(t,e,n);case"ascii":return this.asciiWrite(t,e,n);case"binary":return this.binaryWrite(t,e,n);case"base64":return this.base64Write(t,e,n);case"ucs2":case"ucs-2":return this.ucs2Write(t,e,n);default:throw new Error("Unknown encoding")}},r.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw new Error("oob");if(t>e)throw new Error("oob");return new f(this,e-t,+t)},r.prototype.copy=function(t,e,n,r){for(var i=[],o=n;r>o;o++)O.ok("undefined"!=typeof this[o],"copying undefined buffer bytes!"),i.push(this[o]);for(var o=e;o<e+i.length;o++)t[o]=i[o-e]},n.SlowBuffer=r,n.Buffer=f,f.poolSize=8192;var C;f.isBuffer=function(t){return t instanceof f||t instanceof r},f.concat=function(t,e){if(!Array.isArray(t))throw new Error("Usage: Buffer.concat(list, [totalLength])\n list should be an Array.");if(0===t.length)return new f(0);if(1===t.length)return t[0];if("number"!=typeof e){e=0;for(var n=0;n<t.length;n++){var r=t[n];e+=r.length}}for(var i=new f(e),o=0,n=0;n<t.length;n++){var r=t[n];r.copy(i,o),o+=r.length}return i},f.prototype.inspect=function(){for(var t=[],e=this.length,r=0;e>r;r++)if(t[r]=i(this.parent[r+this.offset]),r==n.INSPECT_MAX_BYTES){t[r+1]="...";break}return"<Buffer "+t.join(" ")+">"},f.prototype.get=function(t){if(0>t||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]},f.prototype.set=function(t,e){if(0>t||t>=this.length)throw new Error("oob");return this.parent[this.offset+t]=e},f.prototype.write=function(t,e,n,i){if(isFinite(e))isFinite(n)||(i=n,n=void 0);else{var o=i;i=e,e=n,n=o}e=+e||0;var s=this.length-e;n?(n=+n,n>s&&(n=s)):n=s,i=String(i||"utf8").toLowerCase();var a;switch(i){case"hex":a=this.parent.hexWrite(t,this.offset+e,n);break;case"utf8":case"utf-8":a=this.parent.utf8Write(t,this.offset+e,n);break;case"ascii":a=this.parent.asciiWrite(t,this.offset+e,n);break;case"binary":a=this.parent.binaryWrite(t,this.offset+e,n);break;case"base64":a=this.parent.base64Write(t,this.offset+e,n);break;case"ucs2":case"ucs-2":a=this.parent.ucs2Write(t,this.offset+e,n);break;default:throw new Error("Unknown encoding")}return f._charsWritten=r._charsWritten,a},f.prototype.toString=function(t,e,n){switch(t=String(t||"utf8").toLowerCase(),"undefined"==typeof e||0>e?e=0:e>this.length&&(e=this.length),"undefined"==typeof n||n>this.length?n=this.length:0>n&&(n=0),e+=this.offset,n+=this.offset,t){case"hex":return this.parent.hexSlice(e,n);case"utf8":case"utf-8":return this.parent.utf8Slice(e,n);case"ascii":return this.parent.asciiSlice(e,n);case"binary":return this.parent.binarySlice(e,n);case"base64":return this.parent.base64Slice(e,n);case"ucs2":case"ucs-2":return this.parent.ucs2Slice(e,n);default:throw new Error("Unknown encoding")}},f.byteLength=r.byteLength,f.prototype.fill=function(t,e,n){if(t||(t=0),e||(e=0),n||(n=this.length),"string"==typeof t&&(t=t.charCodeAt(0)),"number"!=typeof t||isNaN(t))throw new Error("value is not a number");if(e>n)throw new Error("end < start");if(n===e)return 0;if(0==this.length)return 0;if(0>e||e>=this.length)throw new Error("start out of bounds");if(0>n||n>this.length)throw new Error("end out of bounds");return this.parent.fill(t,e+this.offset,n+this.offset)},f.prototype.copy=function(t,e,n,r){var i=this;if(n||(n=0),r||(r=this.length),e||(e=0),n>r)throw new Error("sourceEnd < sourceStart");if(r===n)return 0;if(0==t.length||0==i.length)return 0;if(0>e||e>=t.length)throw new Error("targetStart out of bounds");if(0>n||n>=i.length)throw new Error("sourceStart out of bounds");if(0>r||r>i.length)throw new Error("sourceEnd out of bounds");return r>this.length&&(r=this.length),t.length-e<r-n&&(r=t.length-e+n),this.parent.copy(t.parent,e+t.offset,n+this.offset,r+this.offset)},f.prototype.slice=function(t,e){if(void 0===e&&(e=this.length),e>this.length)throw new Error("oob");if(t>e)throw new Error("oob");return new f(this.parent,e-t,+t+this.offset)},f.prototype.utf8Slice=function(t,e){return this.toString("utf8",t,e)},f.prototype.binarySlice=function(t,e){return this.toString("binary",t,e)},f.prototype.asciiSlice=function(t,e){return this.toString("ascii",t,e)},f.prototype.utf8Write=function(t,e){return this.write(t,e,"utf8")},f.prototype.binaryWrite=function(t,e){return this.write(t,e,"binary")},f.prototype.asciiWrite=function(t,e){return this.write(t,e,"ascii")},f.prototype.readUInt8=function(t,e){var n=this;return e||(O.ok(void 0!==t&&null!==t,"missing offset"),O.ok(t<n.length,"Trying to read beyond buffer length")),n.parent[n.offset+t]},f.prototype.readUInt16LE=function(t,e){return d(this,t,!1,e)},f.prototype.readUInt16BE=function(t,e){return d(this,t,!0,e)},f.prototype.readUInt32LE=function(t,e){return g(this,t,!1,e)},f.prototype.readUInt32BE=function(t,e){return g(this,t,!0,e)},f.prototype.readInt8=function(t,e){var n,r=this;return e||(O.ok(void 0!==t&&null!==t,"missing offset"),O.ok(t<r.length,"Trying to read beyond buffer length")),n=128&r.parent[r.offset+t],n?-1*(255-r.parent[r.offset+t]+1):r.parent[r.offset+t]},f.prototype.readInt16LE=function(t,e){return m(this,t,!1,e)},f.prototype.readInt16BE=function(t,e){return m(this,t,!0,e)},f.prototype.readInt32LE=function(t,e){return v(this,t,!1,e)},f.prototype.readInt32BE=function(t,e){return v(this,t,!0,e)},f.prototype.readFloatLE=function(t,e){return y(this,t,!1,e)},f.prototype.readFloatBE=function(t,e){return y(this,t,!0,e)},f.prototype.readDoubleLE=function(t,e){return b(this,t,!1,e)},f.prototype.readDoubleBE=function(t,e){return b(this,t,!0,e)},f.prototype.writeUInt8=function(t,e,n){var r=this;n||(O.ok(void 0!==t&&null!==t,"missing value"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e<r.length,"trying to write beyond buffer length"),x(t,255)),r.parent[r.offset+e]=t},f.prototype.writeUInt16LE=function(t,e,n){w(this,t,e,!1,n)},f.prototype.writeUInt16BE=function(t,e,n){w(this,t,e,!0,n)},f.prototype.writeUInt32LE=function(t,e,n){S(this,t,e,!1,n)},f.prototype.writeUInt32BE=function(t,e,n){S(this,t,e,!0,n)},f.prototype.writeInt8=function(t,e,n){var r=this;n||(O.ok(void 0!==t&&null!==t,"missing value"),O.ok(void 0!==e&&null!==e,"missing offset"),O.ok(e<r.length,"Trying to write beyond buffer length"),_(t,127,-128)),t>=0?r.writeUInt8(t,e,n):r.writeUInt8(255+t+1,e,n)},f.prototype.writeInt16LE=function(t,e,n){N(this,t,e,!1,n)},f.prototype.writeInt16BE=function(t,e,n){N(this,t,e,!0,n)},f.prototype.writeInt32LE=function(t,e,n){k(this,t,e,!1,n)},f.prototype.writeInt32BE=function(t,e,n){k(this,t,e,!0,n)},f.prototype.writeFloatLE=function(t,e,n){j(this,t,e,!1,n)},f.prototype.writeFloatBE=function(t,e,n){j(this,t,e,!0,n)},f.prototype.writeDoubleLE=function(t,e,n){A(this,t,e,!1,n)},f.prototype.writeDoubleBE=function(t,e,n){A(this,t,e,!0,n)},r.prototype.readUInt8=f.prototype.readUInt8,r.prototype.readUInt16LE=f.prototype.readUInt16LE,r.prototype.readUInt16BE=f.prototype.readUInt16BE,r.prototype.readUInt32LE=f.prototype.readUInt32LE,r.prototype.readUInt32BE=f.prototype.readUInt32BE,r.prototype.readInt8=f.prototype.readInt8,r.prototype.readInt16LE=f.prototype.readInt16LE,r.prototype.readInt16BE=f.prototype.readInt16BE,r.prototype.readInt32LE=f.prototype.readInt32LE,r.prototype.readInt32BE=f.prototype.readInt32BE,r.prototype.readFloatLE=f.prototype.readFloatLE,r.prototype.readFloatBE=f.prototype.readFloatBE,r.prototype.readDoubleLE=f.prototype.readDoubleLE,r.prototype.readDoubleBE=f.prototype.readDoubleBE,r.prototype.writeUInt8=f.prototype.writeUInt8,r.prototype.writeUInt16LE=f.prototype.writeUInt16LE,r.prototype.writeUInt16BE=f.prototype.writeUInt16BE,r.prototype.writeUInt32LE=f.prototype.writeUInt32LE,r.prototype.writeUInt32BE=f.prototype.writeUInt32BE,r.prototype.writeInt8=f.prototype.writeInt8,r.prototype.writeInt16LE=f.prototype.writeInt16LE,r.prototype.writeInt16BE=f.prototype.writeInt16BE,r.prototype.writeInt32LE=f.prototype.writeInt32LE,r.prototype.writeInt32BE=f.prototype.writeInt32BE,r.prototype.writeFloatLE=f.prototype.writeFloatLE,r.prototype.writeFloatBE=f.prototype.writeFloatBE,r.prototype.writeDoubleLE=f.prototype.writeDoubleLE,r.prototype.writeDoubleBE=f.prototype.writeDoubleBE},{assert:1,"./buffer_ieee754":8,"base64-js":9}],9:[function(t,e){!function(){"use strict";function t(t){var e,n,i,o,s,a;if(t.length%4>0)throw"Invalid string. Length must be a multiple of 4";for(s=t.indexOf("="),s=s>0?t.length-s:0,a=[],i=s>0?t.length-4:t.length,e=0,n=0;i>e;e+=4,n+=3)o=r.indexOf(t[e])<<18|r.indexOf(t[e+1])<<12|r.indexOf(t[e+2])<<6|r.indexOf(t[e+3]),a.push((16711680&o)>>16),a.push((65280&o)>>8),a.push(255&o);return 2===s?(o=r.indexOf(t[e])<<2|r.indexOf(t[e+1])>>4,a.push(255&o)):1===s&&(o=r.indexOf(t[e])<<10|r.indexOf(t[e+1])<<4|r.indexOf(t[e+2])>>2,a.push(255&o>>8),a.push(255&o)),a}function n(t){function e(t){return r[63&t>>18]+r[63&t>>12]+r[63&t>>6]+r[63&t]}var n,i,o,s=t.length%3,a="";for(n=0,o=t.length-s;o>n;n+=3)i=(t[n]<<16)+(t[n+1]<<8)+t[n+2],a+=e(i);switch(s){case 1:i=t[t.length-1],a+=r[i>>2],a+=r[63&i<<4],a+="==";break;case 2:i=(t[t.length-2]<<8)+t[t.length-1],a+=r[i>>10],a+=r[63&i>>4],a+=r[63&i<<2],a+="="}return a}var r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";e.exports.toByteArray=t,e.exports.fromByteArray=n}()},{}]},{},[]),e.exports=t("buffer-browserify")},{}],66:[function(t,e){var n=e.exports={};n.nextTick=function(){var t="undefined"!=typeof window&&window.setImmediate,e="undefined"!=typeof window&&window.postMessage&&window.addEventListener;if(t)return function(t){return window.setImmediate(t)};if(e){var n=[];return window.addEventListener("message",function(t){if(t.source===window&&"process-tick"===t.data&&(t.stopPropagation(),n.length>0)){var e=n.shift();e()}},!0),function(t){n.push(t),window.postMessage("process-tick","*")}}return function(t){setTimeout(t,0)}}(),n.title="browser",n.browser=!0,n.env={},n.argv=[],n.binding=function(){throw new Error("process.binding is not supported")},n.cwd=function(){return"/"},n.chdir=function(){throw new Error("process.chdir is not supported")}},{}],67:[function(t,e){function n(t,e){return o.init(this,e,t)}var r=t("./vendor/lodash"),i=t("async"),o=t("jxt"),s=t("xhr"),a=new DOMParser;n.prototype={constructor:{value:n},NS:"http://docs.oasis-open.org/ns/xri/xrd-1.0",EL:"XRD",toString:o.toString,toJSON:o.toJSON,get subject(){return o.getSubText(this.xml,this.NS,"Subject")},get expires(){return new Date(o.getSubText(this.xml,this.NS,"Expires"))},get aliases(){return o.getMultiSubText(this.xml,this.NS,"Alias")},get properties(){var t={},e=o.find(this.xml,this.NS,"Property");return r.each(e,function(e){var n=o.getAttribute(e,"type");t[n]=e.textContent}),t},get links(){var t=[],e=o.find(this.xml,this.NS,"Link");return r.each(e,function(e){var n={rel:o.getAttribute(e,"rel"),href:o.getAttribute(e,"href"),type:o.getAttribute(e,"type"),template:o.getAttribute(e,"template"),titles:o.getSubLangText(e,this.NS,"Title","default"),properties:{}},i=o.find(e,this.NS,"Property");r.each(i,function(t){var e=o.getAttribute(t,"type");n.properties[e]=t.textContent}),t.push(n)}),t}},e.exports=function(t,e){"string"==typeof t&&(t={host:t}),t=r.extend({ssl:!0,json:!0},t);var o=t.ssl?"https://":"http://";i.parallel({json:function(e){return t.json?(s({uri:o+t.host+"/.well-known/host-meta.json"},function(t,n,r){if(t)return e();try{e("completed",JSON.parse(r))}catch(i){e(null,{})}}),void 0):e(null,{})},xrd:function(e){s({uri:o+t.host+"/.well-known/host-meta"},function(t,r){if(t)return e(null,{});try{var i=a.parseFromString(r.body,"application/xml").childNodes[0],o=new n({},i);e("completed",o.toJSON())}catch(s){e(null,{})}})}},function(t,n){if(t){if(Object.keys(n.json).length)return e(!1,n.json);if(Object.keys(n.xrd).length)return e(!1,n.xrd)}e("no-host-meta",{})})}},{"./vendor/lodash":73,async:53,jxt:68,xhr:70}],68:[function(t,e,n){var r=t("./vendor/lodash"),i=new XMLSerializer,o="http://www.w3.org/XML/1998/namespace",s={},a={},u={},c=n.find=function(t,e,n){var i=t.querySelectorAll(n);return r.filter(i,function(n){return n.namespaceURI===e&&n.parentNode==t})};n.findOrCreate=function(t,e,n){var r=c(t,e,n);if(r.length)return r[0];var i=document.createElementNS(e,n);return t.appendChild(i),i},n.init=function(t,e,n){return t.xml=e||document.createElementNS(t.NS,t.EL),t.xml.parentNode&&t.xml.parentNode.namespaceURI===t.NS||t.xml.setAttribute("xmlns",t.NS),t._extensions={},r.each(t.xml.childNodes,function(e){var n=e.namespaceURI+"|"+e.localName,r=a[n];if(void 0!==r){var i=r.prototype._name;t._extensions[i]=new r(null,e),t._extensions[i].parent=t}}),r.extend(t,n),t},n.getSubText=function(t,e,n){var r=c(t,e,n);if(!r)return"";for(var i=0;i<r.length;i++)if(r[i].namespaceURI===e)return r[i].textContent||"";return""},n.getMultiSubText=function(t,e,n,r){var i=c(t,e,n),o=[];r=r||function(t){return t.textContent||""};for(var s=0;s<i.length;s++)i[s].namespaceURI===e&&o.push(r(i[s]));return o},n.getSubLangText=function(t,e,n,r){var i=c(t,e,n);if(!i)return{};for(var s,a,u={},l=[],f=0;f<i.length;f++)a=i[f],a.namespaceURI===e&&(s=a.getAttributeNS(o,"lang")||r,l.push(s),u[s]=a.textContent||"");return u},n.setSubText=function(t,e,n,r){var i=c(t,e,n);if(i.length){for(var o=0;o<i.length;o++)if(i[o].namespaceURI===e){if(r)return i[o].textContent=r,void 0;t.removeChild(i[o])}}else if(r){var s=document.createElementNS(e,n);s.textContent=r,t.appendChild(s)}},n.setMultiSubText=function(t,e,n,i,o){var s=c(t,e,n),a=[];o=o||function(r){var i=document.createElementNS(e,n);i.textContent=r,t.appendChild(i)},a="string"==typeof i?(i||"").split("\n"):i,r.forEach(s,function(e){t.removeChild(e)}),r.forEach(a,function(t){t&&o(t)})},n.setSubLangText=function(t,e,n,r,i){var s,a,u=c(t,e,n);if(u.length)for(var l=0;l<u.length;l++)s=u[l],s.namespaceURI===e&&t.removeChild(s);if("string"==typeof r)s=document.createElementNS(e,n),s.textContent=r,t.appendChild(s);else if("object"==typeof r)for(a in r)r.hasOwnProperty(a)&&(s=document.createElementNS(e,n),a!==i&&s.setAttributeNS(o,"lang",a),s.textContent=r[a],t.appendChild(s))},n.getAttribute=function(t,e,n){return t.getAttribute(e)||n||""},n.setAttribute=function(t,e,n,r){n||r?t.setAttribute(e,n):t.removeAttribute(e)},n.getBoolAttribute=function(t,e,n){var r=t.getAttribute(e)||n||"";return"true"===r||"1"===r},n.setBoolAttribute=function(t,e,n){n?t.setAttribute(e,"1"):t.removeAttribute(e)},n.getSubAttribute=function(t,e,n,r,i){var o=c(t,e,n);if(!o)return"";for(var s=0;s<o.length;s++)if(o[s].namespaceURI===e)return o[s].getAttribute(r)||i||"";return""},n.setSubAttribute=function(t,e,n,r,i){var o=c(t,e,n);if(o.length){for(var s=0;s<o.length;s++)if(o[s].namespaceURI===e){if(i)return o[s].setAttribute(r,i),void 0;o[s].removeAttribute(r)}}else i&&(n=document.createElementNS(e,n),n.setAttribute(r,i),t.appendChild(n))},n.toString=function(){return i.serializeToString(this.xml)},n.toJSON=function(){var t,e={},n={constructor:!0,NS:!0,EL:!0,toString:!0,toJSON:!0,_extensions:!0,prototype:!0,xml:!0,parent:!0,_name:!0};for(t in this._extensions)this._extensions[t].toJSON&&(e[t]=this._extensions[t].toJSON());for(t in this)if(!n[t]&&!(u[this.NS+"|"+this.EL]||{})[t]&&!this._extensions[t]&&"_"!==t[0]){var r=this[t];if("function"==typeof r)continue;var i=Object.prototype.toString.call(r);i.indexOf("Object")>=0?Object.keys(r).length>0&&(e[t]=r):i.indexOf("Array")>=0?r.length>0&&(e[t]=r):r&&(e[t]=r)}return e},n.extend=function(t,e){var i=t.prototype.NS+"|"+t.prototype.EL,o=e.prototype._name,s=e.prototype.NS+"|"+e.prototype.EL;a[s]=e,u[s]||(u[s]={}),u[i]||(u[i]={}),u[i][o]=e,t.prototype.__defineGetter__(o,function(){if(!this._extensions[o]){var t=n.find(this.xml,e.prototype.NS,e.prototype.EL);t.length?this._extensions[o]=new e(null,t[0]):(this._extensions[o]=new e,this.xml.appendChild(this._extensions[o].xml)),this._extensions[o].parent=this}return this._extensions[o]}),t.prototype.__defineSetter__(o,function(t){var e=this[o];r.extend(e,t)})},n.topLevel=function(t){var e=t.prototype.NS+"|"+t.prototype.EL;a[e]=t,s[e]=t},n.build=function(t){var e=s[t.namespaceURI+"|"+t.localName];return e?new e(null,t):void 0},n.XML_NS=o,n.TOP_LEVEL_LOOKUP=s,n.LOOKUP_EXT=u,n.LOOKUP=a},{"./vendor/lodash":69}],69:[function(e,n,r){var i=self;!function(e){function o(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function s(t){t.length=0,y.length<w&&y.push(t)}function a(t){var e=t.k;e&&a(e),t.b=t.k=t.object=t.number=t.string=null,b.length<w&&b.push(t)}function u(){}function c(){var t=b.pop()||{a:"",b:null,c:"",k:null,"false":!1,d:"",e:"",f:"","null":!1,number:null,object:null,push:null,g:null,string:null,h:"","true":!1,undefined:!1,i:!1,j:!1};t.g=_,t.b=t.c=t.f=t.h="",t.e="r",t.i=!0,t.j=!!ee;for(var e,n=0;e=arguments[n];n++)for(var r in e)t[r]=e[r];n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Function,n="return function("+n+"){",r="var m,r="+t.d+",C="+t.e+";if(!r)return C;"+t.h+";",t.b?(r+="var s=r.length;m=-1;if("+t.b+"){",K.unindexedChars&&(r+="if(q(r)){r=r.split('')}"),r+="while(++m<s){"+t.f+";}}else{"):K.nonEnumArgs&&(r+="var s=r.length;m=-1;if(s&&n(r)){while(++m<s){m+='';"+t.f+";}}else{"),K.enumPrototypes&&(r+="var E=typeof r=='function';"),K.enumErrorProps&&(r+="var D=r===j||r instanceof Error;");var i=[];if(K.enumPrototypes&&i.push('!(E&&m=="prototype")'),K.enumErrorProps&&i.push('!(D&&(m=="message"||m=="name"))'),t.i&&t.j)r+="var A=-1,B=z[typeof r]&&t(r),s=B?B.length:0;while(++A<s){m=B[A];",i.length&&(r+="if("+i.join("&&")+"){"),r+=t.f+";",i.length&&(r+="}"),r+="}";else if(r+="for(m in r){",t.i&&i.push("l.call(r, m)"),i.length&&(r+="if("+i.join("&&")+"){"),r+=t.f+";",i.length&&(r+="}"),r+="}",K.nonEnumShadows){for(r+="if(r!==y){var h=r.constructor,p=r===(h&&h.prototype),e=r===H?G:r===j?i:J.call(r),v=w[e];",k=0;7>k;k++)r+="m='"+t.g[k]+"';if((!(p&&v[m])&&l.call(r,m))",t.i||(r+="||(!v[m]&&r[m]!==y[m])"),r+="){"+t.f+"}";r+="}"}return(t.b||K.nonEnumArgs)&&(r+="}"),r+=t.c+";return C",e=e("i,j,l,n,o,q,t,u,y,z,w,G,H,J",n+r+"}"),a(t),e(O,F,U,l,Z,d,ee,u,B,M,Y,L,z,H)}function l(t){return H.call(t)==E}function f(t,e,n,r,i,a){var c=n===x;if("function"==typeof n&&!c){n=u.createCallback(n,r,2);var p=n(t,e);if("undefined"!=typeof p)return!!p}if(t===e)return 0!==t||1/t==1/e;var d=typeof t,g=typeof e;if(t===t&&(!t||"function"!=d&&"object"!=d)&&(!e||"function"!=g&&"object"!=g))return!1;if(null==t||null==e)return t===e;if(g=H.call(t),d=H.call(e),g==E&&(g=T),d==E&&(d=T),g!=d)return!1;switch(g){case j:case A:return+t==+e;case C:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case I:case L:return t==e+""}if(d=g==N,!d){if(U.call(t,"__wrapped__")||U.call(e,"__wrapped__"))return f(t.__wrapped__||t,e.__wrapped__||e,n,r,i,a);if(g!=T||!K.nodeClass&&(o(t)||o(e)))return!1;var g=!K.argsObject&&l(t)?Object:t.constructor,m=!K.argsObject&&l(e)?Object:e.constructor;if(!(g==m||h(g)&&g instanceof g&&h(m)&&m instanceof m))return!1}for(m=!i,i||(i=y.pop()||[]),a||(a=y.pop()||[]),g=i.length;g--;)if(i[g]==t)return a[g]==e;
|
||
var v=0,p=!0;if(i.push(t),a.push(e),d){if(g=t.length,v=e.length,p=v==t.length,!p&&!c)return p;for(;v--;)if(d=g,m=e[v],c)for(;d--&&!(p=f(t[d],m,n,r,i,a)););else if(!(p=f(t[v],m,n,r,i,a)))break;return p}return re(e,function(e,o,s){return U.call(s,o)?(v++,p=U.call(t,o)&&f(t[o],e,n,r,i,a)):void 0}),p&&!c&&re(t,function(t,e,n){return U.call(n,e)?p=-1<--v:void 0}),m&&(s(i),s(a)),p}function h(t){return"function"==typeof t}function p(t){return!(!t||!M[typeof t])}function d(t){return"string"==typeof t||H.call(t)==L}function g(t,e,n){var r=[];if(e=u.createCallback(e,n),Z(t)){n=-1;for(var i=t.length;++n<i;){var o=t[n];e(o,n,t)&&r.push(o)}}else ne(t,function(t,n,i){e(t,n,i)&&r.push(t)});return r}function m(t,e,n){if(e&&"undefined"==typeof n&&Z(t)){n=-1;for(var r=t.length;++n<r&&!1!==e(t[n],n,t););}else ne(t,e,n);return t}function v(t){return t}var y=[],b=[],x={},w=40,S=(S=/\bthis\b/)&&S.test(function(){return this})&&S,_="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),E="[object Arguments]",N="[object Array]",j="[object Boolean]",A="[object Date]",O="[object Error]",C="[object Number]",T="[object Object]",I="[object RegExp]",L="[object String]",M={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},q=M[typeof r]&&r,R=M[typeof n]&&n&&n.exports==q&&n,D=M[typeof i]&&i;!D||D.global!==D&&D.window!==D||(e=D);var F=Error.prototype,B=Object.prototype,z=String.prototype,D=RegExp("^"+(B.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),P=Function.prototype.toString,U=B.hasOwnProperty,J=B.propertyIsEnumerable,H=B.toString,W=D.test(W=H.bind)&&W,$=D.test($=Object.create)&&$,G=D.test(G=Array.isArray)&&G,X=D.test(X=Object.keys)&&X,$=D.test(e.attachEvent),V=W&&!/\n|true/.test(W+$),Y={};Y[N]=Y[A]=Y[C]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},Y[j]=Y[L]={constructor:!0,toString:!0,valueOf:!0},Y[O]=Y["[object Function]"]=Y[I]={constructor:!0,toString:!0},Y[T]={constructor:!0},function(){for(var t=_.length;t--;){var e,n=_[t];for(e in Y)U.call(Y,e)&&!U.call(Y[e],n)&&(Y[e][n]=!1)}}();var K=u.support={};!function(){var t=function(){this.x=1},e=[];t.prototype={valueOf:1,y:1};for(var n in new t)e.push(n);for(n in arguments);K.argsObject=arguments.constructor==Object&&!(arguments instanceof Array),K.argsClass=l(arguments),K.enumErrorProps=J.call(F,"message")||J.call(F,"name"),K.enumPrototypes=J.call(t,"prototype"),K.fastBind=W&&!V,K.nonEnumArgs=0!=n,K.nonEnumShadows=!/valueOf/.test(e),K.unindexedChars="xx"!="x"[0]+Object("x")[0];try{K.nodeClass=!(H.call(document)==T&&!({toString:0}+""))}catch(r){K.nodeClass=!0}}(1);var Q={a:"x,F,k",h:"var a=arguments,b=0,c=typeof k=='number'?2:a.length;while(++b<c){r=a[b];if(r&&z[typeof r]){",f:"if(typeof C[m]=='undefined')C[m]=r[m]",c:"}}"},$={a:"f,d,I",h:"d=d&&typeof I=='undefined'?d:u.createCallback(d,I)",b:"typeof s=='number'",f:"if(d(r[m],m,f)===false)return C"},D={h:"if(!z[typeof r])return C;"+$.h,b:!1};K.argsClass||(l=function(t){return t?U.call(t,"callee"):!1});var Z=G||function(t){return t?"object"==typeof t&&H.call(t)==N:!1},te=c({a:"x",e:"[]",h:"if(!(z[typeof x]))return C",f:"C.push(m)"}),ee=X?function(t){return p(t)?K.enumPrototypes&&"function"==typeof t||K.nonEnumArgs&&t.length&&l(t)?te(t):X(t):[]}:te,ne=c($),G=c(Q,{h:Q.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=u.createCallback(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){d=a[--c]}"),f:"C[m]=d?d(C[m],r[m]):r[m]"}),re=c($,D,{i:!1});h(/x/)&&(h=function(t){return"function"==typeof t&&"[object Function]"==H.call(t)}),u.assign=G,u.createCallback=function(t,e,n){if(null==t)return v;var r=typeof t;if("function"!=r){if("object"!=r)return function(e){return e[t]};var i=ee(t);return function(e){for(var n=i.length,r=!1;n--&&(r=f(e[i[n]],t[i[n]],x)););return r}}return"undefined"==typeof e||S&&!S.test(P.call(t))?t:1===n?function(n){return t.call(e,n)}:2===n?function(n,r){return t.call(e,n,r)}:4===n?function(n,r,i,o){return t.call(e,n,r,i,o)}:function(n,r,i){return t.call(e,n,r,i)}},u.filter=g,u.forEach=m,u.forIn=re,u.keys=ee,u.each=m,u.extend=G,u.select=g,u.identity=v,u.isArguments=l,u.isArray=Z,u.isEqual=f,u.isFunction=h,u.isObject=p,u.isString=d,u.VERSION="1.3.1","function"==typeof t&&"object"==typeof t.amd&&t.amd?(e._=u,t(function(){return u})):q&&!q.nodeType?R?(R.exports=u)._=u:q._=u:e._=u}(this)},{}],70:[function(t,e){function n(t,e){function n(){4===l.readyState&&i()}function i(){var t=null,n=l.statusCode=l.status,r=l.body=l.response||l.responseText||l.responseXML;if(0===n||n>=400&&600>n){var i=l.responseText||s[String(l.status).charAt(0)];t=new Error(i),t.statusCode=l.status}if(g)try{r=l.body=JSON.parse(r)}catch(o){}e(t,l,r)}function c(t){e(t,l)}"string"==typeof t&&(t={uri:t}),t=t||{},e=o(e);var l;t.cors?(l=new u,l.withCredentials=!0):l=new a;var f=l.url=t.uri,h=l.method=t.method||"GET",p=t.body||t.data,d=l.headers=t.headers||{},g=!1;return"json"in t&&(g=!0,d["Content-Type"]="application/json",p=JSON.stringify(t.json)),l.onreadystatechange=n,l.onload=i,l.onerror=c,l.onprogress=function(){},l.ontimeout=r,l.open(h,f),l.timeout="timeout"in t?t.timeout:5e3,l.setRequestHeader&&Object.keys(d).forEach(function(t){l.setRequestHeader(t,d[t])}),l.send(p),l}function r(){}var i=t("global/window"),o=t("once"),s={0:"Internal XMLHttpRequest Error",4:"4xx Client Error",5:"5xx Server Error"},a=i.XMLHttpRequest||r,u="withCredentials"in new a?i.XMLHttpRequest:i.XDomainRequest;e.exports=n},{"global/window":71,once:72}],71:[function(t,e){var n=self;e.exports="undefined"!=typeof window?window:"undefined"!=typeof n?n:{}},{}],72:[function(t,e){function n(t){var e=!1;return function(){return e?void 0:(e=!0,t.apply(this,arguments))}}e.exports=n,n.proto=n(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return n(this)},configurable:!0})})},{}],73:[function(e,n,r){var i=self;!function(e){function o(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function s(t){t.length=0,v.length<x&&v.push(t)}function a(t){var e=t.k;e&&a(e),t.b=t.k=t.object=t.number=t.string=null,y.length<x&&y.push(t)}function u(){}function c(){var t=y.pop()||{a:"",b:null,c:"",k:null,"false":!1,d:"",e:"",f:"","null":!1,number:null,object:null,push:null,g:null,string:null,h:"","true":!1,undefined:!1,i:!1,j:!1};t.g=S,t.b=t.c=t.f=t.h="",t.e="r",t.i=!0,t.j=!!te;for(var e,n=0;e=arguments[n];n++)for(var r in e)t[r]=e[r];n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Function,n="return function("+n+"){",r="var m,r="+t.d+",C="+t.e+";if(!r)return C;"+t.h+";",t.b?(r+="var s=r.length;m=-1;if("+t.b+"){",Y.unindexedChars&&(r+="if(q(r)){r=r.split('')}"),r+="while(++m<s){"+t.f+";}}else{"):Y.nonEnumArgs&&(r+="var s=r.length;m=-1;if(s&&n(r)){while(++m<s){m+='';"+t.f+";}}else{"),Y.enumPrototypes&&(r+="var E=typeof r=='function';"),Y.enumErrorProps&&(r+="var D=r===j||r instanceof Error;");var i=[];if(Y.enumPrototypes&&i.push('!(E&&m=="prototype")'),Y.enumErrorProps&&i.push('!(D&&(m=="message"||m=="name"))'),t.i&&t.j)r+="var A=-1,B=z[typeof r]&&t(r),s=B?B.length:0;while(++A<s){m=B[A];",i.length&&(r+="if("+i.join("&&")+"){"),r+=t.f+";",i.length&&(r+="}"),r+="}";else if(r+="for(m in r){",t.i&&i.push("l.call(r, m)"),i.length&&(r+="if("+i.join("&&")+"){"),r+=t.f+";",i.length&&(r+="}"),r+="}",Y.nonEnumShadows){for(r+="if(r!==y){var h=r.constructor,p=r===(h&&h.prototype),e=r===H?G:r===j?i:J.call(r),v=w[e];",k=0;7>k;k++)r+="m='"+t.g[k]+"';if((!(p&&v[m])&&l.call(r,m))",t.i||(r+="||(!v[m]&&r[m]!==y[m])"),r+="){"+t.f+"}";r+="}"}return(t.b||Y.nonEnumArgs)&&(r+="}"),r+=t.c+";return C",e=e("i,j,l,n,o,q,t,u,y,z,w,G,H,J",n+r+"}"),a(t),e(A,D,P,l,Q,d,te,u,F,L,V,I,B,J)}function l(t){return J.call(t)==_}function f(t,e,n,r,i,a){var c=n===b;if("function"==typeof n&&!c){n=u.createCallback(n,r,2);var p=n(t,e);if("undefined"!=typeof p)return!!p}if(t===e)return 0!==t||1/t==1/e;var d=typeof t,g=typeof e;if(t===t&&(!t||"function"!=d&&"object"!=d)&&(!e||"function"!=g&&"object"!=g))return!1;if(null==t||null==e)return t===e;if(g=J.call(t),d=J.call(e),g==_&&(g=C),d==_&&(d=C),g!=d)return!1;switch(g){case N:case j:return+t==+e;case O:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case T:case I:return t==e+""}if(d=g==E,!d){if(P.call(t,"__wrapped__")||P.call(e,"__wrapped__"))return f(t.__wrapped__||t,e.__wrapped__||e,n,r,i,a);if(g!=C||!Y.nodeClass&&(o(t)||o(e)))return!1;var g=!Y.argsObject&&l(t)?Object:t.constructor,m=!Y.argsObject&&l(e)?Object:e.constructor;if(!(g==m||h(g)&&g instanceof g&&h(m)&&m instanceof m))return!1}for(m=!i,i||(i=v.pop()||[]),a||(a=v.pop()||[]),g=i.length;g--;)if(i[g]==t)return a[g]==e;var y=0,p=!0;if(i.push(t),a.push(e),d){if(g=t.length,y=e.length,p=y==t.length,!p&&!c)return p;for(;y--;)if(d=g,m=e[y],c)for(;d--&&!(p=f(t[d],m,n,r,i,a)););else if(!(p=f(t[y],m,n,r,i,a)))break;return p}return ne(e,function(e,o,s){return P.call(s,o)?(y++,p=P.call(t,o)&&f(t[o],e,n,r,i,a)):void 0}),p&&!c&&ne(t,function(t,e,n){return P.call(n,e)?p=-1<--y:void 0}),m&&(s(i),s(a)),p}function h(t){return"function"==typeof t}function p(t){return!(!t||!L[typeof t])}function d(t){return"string"==typeof t||J.call(t)==I}function g(t,e,n){if(e&&"undefined"==typeof n&&Q(t)){n=-1;for(var r=t.length;++n<r&&!1!==e(t[n],n,t););}else ee(t,e,n);return t}function m(t){return t}var v=[],y=[],b={},x=40,w=(w=/\bthis\b/)&&w.test(function(){return this})&&w,S="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),_="[object Arguments]",E="[object Array]",N="[object Boolean]",j="[object Date]",A="[object Error]",O="[object Number]",C="[object Object]",T="[object RegExp]",I="[object String]",L={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},M=L[typeof r]&&r,q=L[typeof n]&&n&&n.exports==M&&n,R=L[typeof i]&&i;!R||R.global!==R&&R.window!==R||(e=R);var D=Error.prototype,F=Object.prototype,B=String.prototype,R=RegExp("^"+(F.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),z=Function.prototype.toString,P=F.hasOwnProperty,U=F.propertyIsEnumerable,J=F.toString,H=R.test(H=J.bind)&&H,W=R.test(W=Object.create)&&W,$=R.test($=Array.isArray)&&$,G=R.test(G=Object.keys)&&G,W=R.test(e.attachEvent),X=H&&!/\n|true/.test(H+W),V={};V[E]=V[j]=V[O]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},V[N]=V[I]={constructor:!0,toString:!0,valueOf:!0},V[A]=V["[object Function]"]=V[T]={constructor:!0,toString:!0},V[C]={constructor:!0},function(){for(var t=S.length;t--;){var e,n=S[t];for(e in V)P.call(V,e)&&!P.call(V[e],n)&&(V[e][n]=!1)}}();var Y=u.support={};!function(){var t=function(){this.x=1},e=[];t.prototype={valueOf:1,y:1};for(var n in new t)e.push(n);for(n in arguments);Y.argsObject=arguments.constructor==Object&&!(arguments instanceof Array),Y.argsClass=l(arguments),Y.enumErrorProps=U.call(D,"message")||U.call(D,"name"),Y.enumPrototypes=U.call(t,"prototype"),Y.fastBind=H&&!X,Y.nonEnumArgs=0!=n,Y.nonEnumShadows=!/valueOf/.test(e),Y.unindexedChars="xx"!="x"[0]+Object("x")[0];try{Y.nodeClass=!(J.call(document)==C&&!({toString:0}+""))}catch(r){Y.nodeClass=!0}}(1);var K={a:"x,F,k",h:"var a=arguments,b=0,c=typeof k=='number'?2:a.length;while(++b<c){r=a[b];if(r&&z[typeof r]){",f:"if(typeof C[m]=='undefined')C[m]=r[m]",c:"}}"},W={a:"f,d,I",h:"d=d&&typeof I=='undefined'?d:u.createCallback(d,I)",b:"typeof s=='number'",f:"if(d(r[m],m,f)===false)return C"},R={h:"if(!z[typeof r])return C;"+W.h,b:!1};Y.argsClass||(l=function(t){return t?P.call(t,"callee"):!1});var Q=$||function(t){return t?"object"==typeof t&&J.call(t)==E:!1},Z=c({a:"x",e:"[]",h:"if(!(z[typeof x]))return C",f:"C.push(m)"}),te=G?function(t){return p(t)?Y.enumPrototypes&&"function"==typeof t||Y.nonEnumArgs&&t.length&&l(t)?Z(t):G(t):[]}:Z,ee=c(W),$=c(K,{h:K.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=u.createCallback(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){d=a[--c]}"),f:"C[m]=d?d(C[m],r[m]):r[m]"}),ne=c(W,R,{i:!1});h(/x/)&&(h=function(t){return"function"==typeof t&&"[object Function]"==J.call(t)}),u.assign=$,u.createCallback=function(t,e,n){if(null==t)return m;var r=typeof t;if("function"!=r){if("object"!=r)return function(e){return e[t]};var i=te(t);return function(e){for(var n=i.length,r=!1;n--&&(r=f(e[i[n]],t[i[n]],b)););return r}}return"undefined"==typeof e||w&&!w.test(z.call(t))?t:1===n?function(n){return t.call(e,n)}:2===n?function(n,r){return t.call(e,n,r)}:4===n?function(n,r,i,o){return t.call(e,n,r,i,o)}:function(n,r,i){return t.call(e,n,r,i)}},u.forEach=g,u.forIn=ne,u.keys=te,u.each=g,u.extend=$,u.identity=m,u.isArguments=l,u.isArray=Q,u.isEqual=f,u.isFunction=h,u.isObject=p,u.isString=d,u.VERSION="1.3.1","function"==typeof t&&"object"==typeof t.amd&&t.amd?(e._=u,t(function(){return u})):M&&!M.nodeType?q?(q.exports=u)._=u:M._=u:e._=u}(this)},{}],74:[function(t,e,n){var r=t("lodash"),i=new XMLSerializer,o="http://www.w3.org/XML/1998/namespace",s={},a={},u={},c=n.find=function(t,e,n){var i=t.querySelectorAll(n);return r.filter(i,function(n){return n.namespaceURI===e&&n.parentNode==t})};n.findOrCreate=function(t,e,n){var r=c(t,e,n);if(r.length)return r[0];var i=document.createElementNS(e,n);return t.appendChild(i),i},n.init=function(t,e,n,i){return t.xml=e||document.createElementNS(t.NS,t.EL),(i&&i!==t.NS||!t.xml.parentNode||t.xml.parentNode.namespaceURI!==t.NS)&&t.xml.setAttribute("xmlns",t.NS),t._extensions={},r.each(t.xml.childNodes,function(e){var n=e.namespaceURI+"|"+e.localName,r=a[n];if(void 0!==r){var i=r.prototype._name;t._extensions[i]=new r(null,e),t._extensions[i].parent=t}}),r.extend(t,n),t},n.getSubText=function(t,e,n){var r=c(t,e,n);if(!r)return"";for(var i=0;i<r.length;i++)if(r[i].namespaceURI===e)return r[i].textContent||"";return""},n.getMultiSubText=function(t,e,n,r){var i=c(t,e,n),o=[];r=r||function(t){return t.textContent||""};for(var s=0;s<i.length;s++)i[s].namespaceURI===e&&o.push(r(i[s]));return o},n.getSubLangText=function(t,e,n,r){var i=c(t,e,n);if(!i)return{};for(var s,a,u={},l=[],f=0;f<i.length;f++)a=i[f],a.namespaceURI===e&&(s=a.getAttributeNS(o,"lang")||r,l.push(s),u[s]=a.textContent||"");return u},n.setSubText=function(t,e,n,r){var i=c(t,e,n);if(i.length){for(var o=0;o<i.length;o++)if(i[o].namespaceURI===e){if(r)return i[o].textContent=r,void 0;t.removeChild(i[o])}}else if(r){var s=document.createElementNS(e,n);s.textContent=r,t.appendChild(s)}},n.setMultiSubText=function(t,e,n,i,o){var s=c(t,e,n),a=[];o=o||function(r){var i=document.createElementNS(e,n);i.textContent=r,t.appendChild(i)},a="string"==typeof i?(i||"").split("\n"):i,r.forEach(s,function(e){t.removeChild(e)}),r.forEach(a,function(t){t&&o(t)})},n.setSubLangText=function(t,e,n,r,i){var s,a,u=c(t,e,n);if(u.length)for(var l=0;l<u.length;l++)s=u[l],s.namespaceURI===e&&t.removeChild(s);if("string"==typeof r)s=document.createElementNS(e,n),s.textContent=r,t.appendChild(s);else if("object"==typeof r)for(a in r)r.hasOwnProperty(a)&&(s=document.createElementNS(e,n),a!==i&&s.setAttributeNS(o,"lang",a),s.textContent=r[a],t.appendChild(s))},n.getAttribute=function(t,e,n){return t.getAttribute(e)||n||""},n.setAttribute=function(t,e,n,r){n||r?t.setAttribute(e,n):t.removeAttribute(e)},n.getBoolAttribute=function(t,e,n){var r=t.getAttribute(e)||n||"";return"true"===r||"1"===r},n.setBoolAttribute=function(t,e,n){n?t.setAttribute(e,"1"):t.removeAttribute(e)},n.getSubAttribute=function(t,e,n,r,i){var o=c(t,e,n);if(!o)return"";for(var s=0;s<o.length;s++)if(o[s].namespaceURI===e)return o[s].getAttribute(r)||i||"";return""},n.setSubAttribute=function(t,e,n,r,i){var o=c(t,e,n);if(o.length){for(var s=0;s<o.length;s++)if(o[s].namespaceURI===e){if(i)return o[s].setAttribute(r,i),void 0;o[s].removeAttribute(r)}}else i&&(n=document.createElementNS(e,n),n.setAttribute(r,i),t.appendChild(n))},n.toString=function(){return i.serializeToString(this.xml)},n.toJSON=function(){var t,e={},n={constructor:!0,NS:!0,EL:!0,toString:!0,toJSON:!0,_extensions:!0,prototype:!0,xml:!0,parent:!0,_name:!0};for(t in this._extensions)this._extensions[t].toJSON&&(e[t]=this._extensions[t].toJSON());for(t in this)if(!n[t]&&!(u[this.NS+"|"+this.EL]||{})[t]&&!this._extensions[t]&&"_"!==t[0]){var r=this[t];if("function"==typeof r)continue;var i=Object.prototype.toString.call(r);i.indexOf("Object")>=0?Object.keys(r).length>0&&(e[t]=r):i.indexOf("Array")>=0?r.length>0&&(e[t]=r):r&&(e[t]=r)}return e},n.extend=function(t,e){var i=t.prototype.NS+"|"+t.prototype.EL,o=e.prototype._name,s=e.prototype.NS+"|"+e.prototype.EL;a[s]=e,u[s]||(u[s]={}),u[i]||(u[i]={}),u[i][o]=e,t.prototype.__defineGetter__(o,function(){if(!this._extensions[o]){var t=n.find(this.xml,e.prototype.NS,e.prototype.EL);t.length?this._extensions[o]=new e(null,t[0]):(this._extensions[o]=new e,this.xml.appendChild(this._extensions[o].xml)),this._extensions[o].parent=this}return this._extensions[o]}),t.prototype.__defineSetter__(o,function(t){var e=this[o];r.extend(e,t)})},n.topLevel=function(t){var e=t.prototype.NS+"|"+t.prototype.EL;a[e]=t,s[e]=t},n.build=function(t){var e=s[t.namespaceURI+"|"+t.localName];return e?new e(null,t):void 0},n.XML_NS=o,n.TOP_LEVEL_LOOKUP=s,n.LOOKUP_EXT=u,n.LOOKUP=a},{lodash:75}],75:[function(e,n,r){var i=self;!function(e,o){function s(t){return t&&"object"==typeof t&&t.__wrapped__?t:this instanceof s?(this.__wrapped__=t,void 0):new s(t)}function a(t,e,n){e||(e=0);var r=t.length,i=r-e>=(n||cn);if(i)for(var o={},s=e-1;++s<r;){var a=t[s]+"";(jn.call(o,a)?o[a]:o[a]=[]).push(t[s])}return function(n){if(i){var r=n+"";return jn.call(o,r)&&ge(o[r],n)>-1}return ge(t,n,e)>-1}}function u(t){return t.charCodeAt(0)}function c(t,e){var n=t.index,r=e.index;if(t=t.criteria,e=e.criteria,t!==e){if(t>e||"undefined"==typeof t)return 1;if(e>t||"undefined"==typeof e)return-1}return r>n?-1:1}function l(t,e,n,r){function i(){var u=arguments,c=s?this:e;if(o||(t=e[a]),n.length&&(u=u.length?(u=m(u),r?u.concat(n):n.concat(u)):n),this instanceof i){g.prototype=t.prototype,c=new g,g.prototype=null;var l=t.apply(c,u);return L(l)?l:c}return t.apply(c,u)}var o=I(t),s=!n,a=e;return s&&(n=e),o||(e=t),i}function f(t,e,n){if(null==t)return Je;var r=typeof t;if("function"!=r){if("object"!=r)return function(e){return e[t]};var i=cr(t);return function(e){for(var n=i.length,r=!1;n--&&(r=C(e[i[n]],t[i[n]],un)););return r}}return"undefined"!=typeof e?1===n?function(n){return t.call(e,n)}:2===n?function(n,r){return t.call(e,n,r)}:4===n?function(n,r,i,o){return t.call(e,n,r,i,o)}:function(n,r,i){return t.call(e,n,r,i)}:t}function h(){for(var t,e={isKeysFast:Yn,arrays:"isArray(iterable)",bottom:"",loop:"",top:"",useHas:!0},n=0;t=arguments[n];n++)for(var r in t)e[r]=t[r];var i=e.args;e.firstArg=/^[^,]+/.exec(i)[0];var o=Function("createCallback, hasOwnProperty, isArguments, isArray, isString, objectTypes, nativeKeys","return function("+i+") {\n"+er(e)+"\n}");return o(f,jn,y,ur,F,Zn,Mn)}function p(t){return"\\"+tr[t]}function d(t){return lr[t]}function g(){}function m(t,e,n){e||(e=0),"undefined"==typeof n&&(n=t?t.length:0);for(var r=-1,i=n-e||0,o=Array(0>i?0:i);++r<i;)o[r]=t[e+r];return o}function v(t){return fr[t]}function y(t){return On.call(t)==Fn}function b(t){var e=!1;if(!t||"object"!=typeof t||y(t))return e;var n=t.constructor;return!I(n)||n instanceof n?(sr(t,function(t,n){e=n}),e===!1||jn.call(t,e)):e}function x(t){var e=[];return ar(t,function(t,n){e.push(n)}),e}function w(t,e,n,r,i,s){var a=t;if("function"==typeof e&&(r=n,n=e,e=!1),"function"==typeof n){n="undefined"==typeof r?n:f(n,r,1),a=n(a);var u="undefined"!=typeof a;u||(a=t)}var c=L(a);if(c){var l=On.call(a);if(!Kn[l])return a;var h=ur(a)}if(!c||!e)return c&&!u?h?m(a):hr({},a):a;var p=Qn[l];switch(l){case zn:case Pn:return u?a:new p(+a);case Jn:case $n:return u?a:new p(a);case Wn:return u?a:p(a.source,gn.exec(a))}i||(i=[]),s||(s=[]);for(var d=i.length;d--;)if(i[d]==t)return s[d];return u||(a=h?p(a.length):{},h&&(jn.call(t,"index")&&(a.index=t.index),jn.call(t,"input")&&(a.input=t.input))),i.push(t),s.push(a),(h?K:ar)(u?a:t,function(t,r){a[r]=w(t,e,n,o,i,s)}),a}function S(t,e,n){return w(t,!0,e,n)}function _(t){var e=[];return sr(t,function(t,n){I(t)&&e.push(n)}),e.sort()}function E(t,e){return t?jn.call(t,e):!1}function N(t){for(var e=-1,n=cr(t),r=n.length,i={};++e<r;){var o=n[e];i[t[o]]=o}return i}function k(t){return t===!0||t===!1||On.call(t)==zn}function j(t){return t instanceof Date||On.call(t)==Pn}function A(t){return t?1===t.nodeType:!1}function O(t){var e=!0;if(!t)return e;var n=On.call(t),r=t.length;return n==Bn||n==$n||n==Fn||n==Hn&&"number"==typeof r&&I(t.splice)?!r:(ar(t,function(){return e=!1}),e)}function C(t,e,n,r,i,o){var s=n===un;if(n&&!s){n="undefined"==typeof r?n:f(n,r,2);var a=n(t,e);if("undefined"!=typeof a)return!!a}if(t===e)return 0!==t||1/t==1/e;var u=typeof t,c=typeof e;if(t===t&&(!t||"function"!=u&&"object"!=u)&&(!e||"function"!=c&&"object"!=c))return!1;if(null==t||null==e)return t===e;var l=On.call(t),h=On.call(e);if(l==Fn&&(l=Hn),h==Fn&&(h=Hn),l!=h)return!1;switch(l){case zn:case Pn:return+t==+e;case Jn:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case Wn:case $n:return t==e+""}var p=l==Bn;if(!p){if(t.__wrapped__||e.__wrapped__)return C(t.__wrapped__||t,e.__wrapped__||e,n,r,i,o);if(l!=Hn)return!1;var d=t.constructor,g=e.constructor;if(d!=g&&!(I(d)&&d instanceof d&&I(g)&&g instanceof g))return!1}i||(i=[]),o||(o=[]);for(var m=i.length;m--;)if(i[m]==t)return o[m]==e;var v=0;if(a=!0,i.push(t),o.push(e),p){if(m=t.length,v=e.length,a=v==t.length,!a&&!s)return a;for(;v--;){var y=m,b=e[v];if(s)for(;y--&&!(a=C(t[y],b,n,r,i,o)););else if(!(a=C(t[v],b,n,r,i,o)))break}return a}return sr(e,function(e,s,u){return jn.call(u,s)?(v++,a=jn.call(t,s)&&C(t[s],e,n,r,i,o)):void 0}),a&&!s&&sr(t,function(t,e,n){return jn.call(n,e)?a=--v>-1:void 0}),a}function T(t){return In(t)&&!Ln(parseFloat(t))}function I(t){return"function"==typeof t}function L(t){return t?Zn[typeof t]:!1}function M(t){return R(t)&&t!=+t}function q(t){return null===t}function R(t){return"number"==typeof t||On.call(t)==Jn}function D(t){return t instanceof RegExp||On.call(t)==Wn}function F(t){return"string"==typeof t||On.call(t)==$n}function B(t){return"undefined"==typeof t}function z(t,e,n){var r=arguments,i=0,o=2;if(!L(t))return t;if(n===un)var s=r[3],a=r[4],u=r[5];else a=[],u=[],"number"!=typeof n&&(o=r.length),o>3&&"function"==typeof r[o-2]?s=f(r[--o-1],r[o--],2):o>2&&"function"==typeof r[o-1]&&(s=r[--o]);for(;++i<o;)(ur(r[i])?K:ar)(r[i],function(e,n){var r,i,o=e,c=t[n];if(e&&((i=ur(e))||dr(e))){for(var l=a.length;l--;)if(r=a[l]==e){c=u[l];break}r||(c=i?ur(c)?c:[]:dr(c)?c:{},s&&(o=s(c,e),"undefined"!=typeof o&&(c=o)),a.push(e),u.push(c),s||(c=z(c,e,un,s,a,u)))}else s&&(o=s(c,e),"undefined"==typeof o&&(o=e)),"undefined"!=typeof o&&(c=o);t[n]=c});return t}function P(t,e,n){var r="function"==typeof e,i={};if(r)e=f(e,n);else var o=En.apply(on,arguments);return sr(t,function(t,n,s){(r?!e(t,n,s):ge(o,n,1)<0)&&(i[n]=t)}),i}function U(t){for(var e=-1,n=cr(t),r=n.length,i=Array(r);++e<r;){var o=n[e];i[e]=[o,t[o]]}return i}function J(t,e,n){var r={};if("function"!=typeof e)for(var i=0,o=En.apply(on,arguments),s=L(t)?o.length:0;++i<s;){var a=o[i];a in t&&(r[a]=t[a])}else e=f(e,n),sr(t,function(t,n,i){e(t,n,i)&&(r[n]=t)});return r}function H(t){for(var e=-1,n=cr(t),r=n.length,i=Array(r);++e<r;)i[e]=t[n[e]];return i}function W(t){for(var e=-1,n=En.apply(on,m(arguments,1)),r=n.length,i=Array(r);++e<r;)i[e]=t[n[e]];return i}function $(t,e,n){var r=-1,i=t?t.length:0,o=!1;return n=(0>n?qn(0,i+n):n)||0,"number"==typeof i?o=(F(t)?t.indexOf(e,n):ge(t,e,n))>-1:or(t,function(t){return++r>=n?!(o=t===e):void 0}),o}function G(t,e,n){var r={};return e=f(e,n),K(t,function(t,n,i){n=e(t,n,i)+"",jn.call(r,n)?r[n]++:r[n]=1}),r}function X(t,e,n){var r=!0;if(e=f(e,n),ur(t))for(var i=-1,o=t.length;++i<o&&(r=!!e(t[i],i,t)););else or(t,function(t,n,i){return r=!!e(t,n,i)});return r}function V(t,e,n){var r=[];if(e=f(e,n),ur(t))for(var i=-1,o=t.length;++i<o;){var s=t[i];e(s,i,t)&&r.push(s)}else or(t,function(t,n,i){e(t,n,i)&&r.push(t)});return r}function Y(t,e,n){var r;return e=f(e,n),K(t,function(t,n,i){return e(t,n,i)?(r=t,!1):void 0}),r}function K(t,e,n){if(e&&"undefined"==typeof n&&ur(t))for(var r=-1,i=t.length;++r<i&&e(t[r],r,t)!==!1;);else or(t,e,n);return t}function Q(t,e,n){var r={};return e=f(e,n),K(t,function(t,n,i){n=e(t,n,i)+"",(jn.call(r,n)?r[n]:r[n]=[]).push(t)}),r}function Z(t,e){var n=m(arguments,2),r=-1,i="function"==typeof e,o=t?t.length:0,s=Array("number"==typeof o?o:0);return K(t,function(t){s[++r]=(i?e:t[e]).apply(t,n)}),s}function te(t,e,n){var r=-1,i=t?t.length:0,o=Array("number"==typeof i?i:0);if(e=f(e,n),ur(t))for(;++r<i;)o[r]=e(t[r],r,t);else or(t,function(t,n,i){o[++r]=e(t,n,i)});return o}function ee(t,e,n){var r=-1/0,i=r;if(!e&&ur(t))for(var o=-1,s=t.length;++o<s;){var a=t[o];a>i&&(i=a)}else e=!e&&F(t)?u:f(e,n),or(t,function(t,n,o){var s=e(t,n,o);s>r&&(r=s,i=t)});return i}function ne(t,e,n){var r=1/0,i=r;if(!e&&ur(t))for(var o=-1,s=t.length;++o<s;){var a=t[o];i>a&&(i=a)}else e=!e&&F(t)?u:f(e,n),or(t,function(t,n,o){var s=e(t,n,o);r>s&&(r=s,i=t)});return i}function re(t,e,n,r){var i=arguments.length<3;if(e=f(e,r,4),ur(t)){var o=-1,s=t.length;for(i&&(n=t[++o]);++o<s;)n=e(n,t[o],o,t)}else or(t,function(t,r,o){n=i?(i=!1,t):e(n,t,r,o)});return n}function ie(t,e,n,r){var i=t,o=t?t.length:0,s=arguments.length<3;if("number"!=typeof o){var a=cr(t);o=a.length}return e=f(e,r,4),K(t,function(t,r,u){r=a?a[--o]:--o,n=s?(s=!1,i[r]):e(n,i[r],r,u)}),n}function oe(t,e,n){return e=f(e,n),V(t,function(t,n,r){return!e(t,n,r)})}function se(t){var e=-1,n=t?t.length:0,r=Array("number"==typeof n?n:0);return K(t,function(t){var n=Nn(Dn()*(++e+1));r[e]=r[n],r[n]=t}),r}function ae(t){var e=t?t.length:0;return"number"==typeof e?e:cr(t).length}function ue(t,e,n){var r;if(e=f(e,n),ur(t))for(var i=-1,o=t.length;++i<o&&!(r=e(t[i],i,t)););else or(t,function(t,n,i){return!(r=e(t,n,i))});return!!r}function ce(t,e,n){var r=-1,i=t?t.length:0,o=Array("number"==typeof i?i:0);for(e=f(e,n),K(t,function(t,n,i){o[++r]={criteria:e(t,n,i),index:r,value:t}}),i=o.length,o.sort(c);i--;)o[i]=o[i].value;return o}function le(t){return t&&"number"==typeof t.length?m(t):H(t)}function fe(t){for(var e=-1,n=t?t.length:0,r=[];++e<n;){var i=t[e];i&&r.push(i)}return r}function he(t){for(var e=-1,n=t?t.length:0,r=En.apply(on,arguments),i=a(r,n),o=[];++e<n;){var s=t[e];i(s)||o.push(s)}return o}function pe(t,e,n){if(t){var r=0,i=t.length;if("number"!=typeof e&&null!=e){var o=-1;for(e=f(e,n);++o<i&&e(t[o],o,t);)r++}else if(r=e,null==r||n)return t[0];return m(t,0,Rn(qn(0,r),i))}}function de(t,e){for(var n=-1,r=t?t.length:0,i=[];++n<r;){var o=t[n];ur(o)?An.apply(i,e?o:de(o)):i.push(o)}return i}function ge(t,e,n){var r=-1,i=t?t.length:0;if("number"==typeof n)r=(0>n?qn(0,i+n):n||0)-1;else if(n)return r=_e(t,e),t[r]===e?r:-1;for(;++r<i;)if(t[r]===e)return r;return-1}function me(t,e,n){if(!t)return[];var r=0,i=t.length;if("number"!=typeof e&&null!=e){var o=i;for(e=f(e,n);o--&&e(t[o],o,t);)r++}else r=null==e||n?1:e||r;return m(t,0,Rn(qn(0,i-r),i))}function ve(t){var e=arguments,n=e.length,r={0:{}},i=-1,o=t?t.length:0,s=o>=100,u=[],c=u;t:for(;++i<o;){var l=t[i];if(s)var f=l+"",h=jn.call(r[0],f)?!(c=r[0][f]):c=r[0][f]=[];if(h||ge(c,l)<0){s&&c.push(l);for(var p=n;--p;)if(!(r[p]||(r[p]=a(e[p],0,100)))(l))continue t;u.push(l)}}return u}function ye(t,e,n){if(t){var r=0,i=t.length;if("number"!=typeof e&&null!=e){var o=i;for(e=f(e,n);o--&&e(t[o],o,t);)r++}else if(r=e,null==r||n)return t[i-1];return m(t,qn(0,i-r))}}function be(t,e,n){var r=t?t.length:0;for("number"==typeof n&&(r=(0>n?qn(0,r+n):Rn(n,r-1))+1);r--;)if(t[r]===e)return r;return-1}function xe(t,e){for(var n=-1,r=t?t.length:0,i={};++n<r;){var o=t[n];e?i[o]=e[n]:i[o[0]]=o[1]}return i}function we(t,e,n){t=+t||0,n=+n||1,null==e&&(e=t,t=0);for(var r=-1,i=qn(0,_n((e-t)/n)),o=Array(i);++r<i;)o[r]=t,t+=n;return o}function Se(t,e,n){if("number"!=typeof e&&null!=e){var r=0,i=-1,o=t?t.length:0;for(e=f(e,n);++i<o&&e(t[i],i,t);)r++}else r=null==e||n?1:qn(0,e);return m(t,r)}function _e(t,e,n,r){var i=0,o=t?t.length:i;for(n=n?f(n,r,1):Je,e=n(e);o>i;){var s=i+o>>>1;n(t[s])<e?i=s+1:o=s}return i}function Ee(){return Ne(En.apply(on,arguments))}function Ne(t,e,n,r){var i=-1,o=t?t.length:0,s=[],a=s;"function"==typeof e&&(r=n,n=e,e=!1);var u=!e&&o>=75;if(u)var c={};for(n&&(a=[],n=f(n,r));++i<o;){var l=t[i],h=n?n(l,i,t):l;if(u)var p=h+"",d=jn.call(c,p)?!(a=c[p]):a=c[p]=[];(e?!i||a[a.length-1]!==h:d||ge(a,h)<0)&&((n||u)&&a.push(h),s.push(l))}return s}function ke(t){for(var e=-1,n=t?t.length:0,r=a(arguments,1),i=[];++e<n;){var o=t[e];r(o)||i.push(o)}return i}function je(t){for(var e=-1,n=t?ee(gr(arguments,"length")):0,r=Array(n);++e<n;)r[e]=gr(arguments,e);return r}function Ae(t,e){return 1>t?e():function(){return--t<1?e.apply(this,arguments):void 0}}function Oe(t,e){return Vn||Cn&&arguments.length>2?Cn.call.apply(Cn,arguments):l(t,e,m(arguments,2))}function Ce(t){for(var e=En.apply(on,arguments),n=e.length>1?0:(e=_(t),-1),r=e.length;++n<r;){var i=e[n];t[i]=Oe(t[i],t)}return t}function Te(t,e){return l(t,e,m(arguments,2))}function Ie(){var t=arguments;return function(){for(var e=arguments,n=t.length;n--;)e=[t[n].apply(this,e)];return e[0]}}function Le(t,e,n){function r(){a=null,n||(o=t.apply(s,i))}var i,o,s,a;return function(){var u=n&&!a;return i=arguments,s=this,clearTimeout(a),a=setTimeout(r,e),u&&(o=t.apply(s,i)),o}}function Me(t,e){var n=m(arguments,2);return setTimeout(function(){t.apply(o,n)},e)}function qe(t){var e=m(arguments,1);return setTimeout(function(){t.apply(o,e)},1)}function Re(t,e){var n={};return function(){var r=(e?e.apply(this,arguments):arguments[0])+"";return jn.call(n,r)?n[r]:n[r]=t.apply(this,arguments)}}function De(t){var e,n;return function(){return e?n:(e=!0,n=t.apply(this,arguments),t=null,n)}}function Fe(t){return l(t,m(arguments,1))}function Be(t){return l(t,m(arguments,1),null,un)}function ze(t,e){function n(){a=new Date,s=null,i=t.apply(o,r)}var r,i,o,s,a=0;return function(){var u=new Date,c=e-(u-a);return r=arguments,o=this,0>=c?(clearTimeout(s),s=null,a=u,i=t.apply(o,r)):s||(s=setTimeout(n,c)),i}}function Pe(t,e){return function(){var n=[t];return An.apply(n,arguments),e.apply(this,n)}}function Ue(t){return null==t?"":(t+"").replace(xn,d)}function Je(t){return t}function He(t){K(_(t),function(e){var n=s[e]=t[e];s.prototype[e]=function(){var t=[this.__wrapped__];return An.apply(t,arguments),new s(n.apply(s,t))}})}function We(){return e._=ln,this}function $e(t,e){return null==t&&null==e&&(e=1),t=+t||0,null==e&&(e=t,t=0),t+Nn(Dn()*((+e||0)-t+1))}function Ge(t,e){var n=t?t[e]:o;return I(n)?t[e]():n}function Xe(t,e,n){var r=s.templateSettings;t||(t=""),n=pr({},n,r);var i,a=pr({},n.imports,r.imports),u=cr(a),c=H(a),l=0,f=n.interpolate||bn,h="__p += '",d=RegExp((n.escape||bn).source+"|"+f.source+"|"+(f===yn?vn:bn).source+"|"+(n.evaluate||bn).source+"|$","g");t.replace(d,function(e,n,r,o,s,a){return r||(r=o),h+=t.slice(l,a).replace(wn,p),n&&(h+="' +\n__e("+n+") +\n'"),s&&(i=!0,h+="';\n"+s+";\n__p += '"),r&&(h+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),l=a+e.length,e}),h+="';\n";var g=n.variable,m=g;m||(g="obj",h="with ("+g+") {\n"+h+"\n}\n"),h=(i?h.replace(hn,""):h).replace(pn,"$1").replace(dn,"$1;"),h="function("+g+") {\n"+(m?"":g+" || ("+g+" = {});\n")+"var __t, __p = '', __e = _.escape"+(i?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+h+"return __p\n}";var v="\n/*\n//@ sourceURL="+(n.sourceURL||"/lodash/template/source["+Sn++ +"]")+"\n*/";try{var y=Function(u,"return "+h+v).apply(o,c)}catch(b){throw b.source=h,b}return e?y(e):(y.source=h,y)}function Ve(t,e,n){t=+t||0;for(var r=-1,i=Array(t);++r<t;)i[r]=e.call(n,r);return i}function Ye(t){return null==t?"":(t+"").replace(fn,v)}function Ke(t){var e=++an;return(null==t?"":t+"")+e}function Qe(t,e){return e(t),t}function Ze(){return this.__wrapped__+""}function tn(){return this.__wrapped__}var en="object"==typeof r&&r,nn="object"==typeof n&&n&&n.exports==en&&n,rn="object"==typeof i&&i;rn.global===rn&&(e=rn);
|
||
var on=[],sn={},an=0,un=sn,cn=30,ln=e._,fn=/&(?:amp|lt|gt|quot|#39);/g,hn=/\b__p \+= '';/g,pn=/\b(__p \+=) '' \+/g,dn=/(__e\(.*?\)|\b__t\)) \+\n'';/g,gn=/\w*$/,mn=RegExp("^"+(sn.valueOf+"").replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),vn=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,yn=/<%=([\s\S]+?)%>/g,bn=/($^)/,xn=/[&<>"']/g,wn=/['\n\r\t\u2028\u2029\\]/g,Sn=0,_n=Math.ceil,En=on.concat,Nn=Math.floor,kn=mn.test(kn=Object.getPrototypeOf)&&kn,jn=sn.hasOwnProperty,An=on.push,On=sn.toString,Cn=mn.test(Cn=m.bind)&&Cn,Tn=mn.test(Tn=Array.isArray)&&Tn,In=e.isFinite,Ln=e.isNaN,Mn=mn.test(Mn=Object.keys)&&Mn,qn=Math.max,Rn=Math.min,Dn=Math.random,Fn="[object Arguments]",Bn="[object Array]",zn="[object Boolean]",Pn="[object Date]",Un="[object Function]",Jn="[object Number]",Hn="[object Object]",Wn="[object RegExp]",$n="[object String]",Gn=!!e.attachEvent,Xn=Cn&&!/\n|true/.test(Cn+Gn),Vn=Cn&&!Xn,Yn=Mn&&(Gn||Xn),Kn={};Kn[Un]=!1,Kn[Fn]=Kn[Bn]=Kn[zn]=Kn[Pn]=Kn[Jn]=Kn[Hn]=Kn[Wn]=Kn[$n]=!0;var Qn={};Qn[Bn]=Array,Qn[zn]=Boolean,Qn[Pn]=Date,Qn[Hn]=Object,Qn[Jn]=Number,Qn[Wn]=RegExp,Qn[$n]=String;var Zn={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},tr={"\\":"\\","'":"'","\n":"n","\r":"r"," ":"t","\u2028":"u2028","\u2029":"u2029"};s.templateSettings={escape:/<%-([\s\S]+?)%>/g,evaluate:/<%([\s\S]+?)%>/g,interpolate:yn,variable:"",imports:{_:s}};var er=function(t){var e="var index, iterable = "+t.firstArg+", result = iterable;\nif (!iterable) return result;\n"+t.top+";\n";return t.arrays&&(e+="var length = iterable.length; index = -1;\nif ("+t.arrays+") {\n while (++index < length) {\n "+t.loop+"\n }\n}\nelse { "),t.isKeysFast&&t.useHas?e+="\n var ownIndex = -1,\n ownProps = objectTypes[typeof iterable] ? nativeKeys(iterable) : [],\n length = ownProps.length;\n\n while (++ownIndex < length) {\n index = ownProps[ownIndex];\n "+t.loop+"\n } ":(e+="\n for (index in iterable) {",t.useHas&&(e+="\n if (",t.useHas&&(e+="hasOwnProperty.call(iterable, index)"),e+=") { "),e+=t.loop+"; ",t.useHas&&(e+="\n }"),e+="\n } "),t.arrays&&(e+="\n}"),e+=t.bottom+";\nreturn result"},nr={args:"object, source, guard",top:"var args = arguments,\n argsIndex = 0,\n argsLength = typeof guard == 'number' ? 2 : args.length;\nwhile (++argsIndex < argsLength) {\n iterable = args[argsIndex];\n if (iterable && objectTypes[typeof iterable]) {",loop:"if (typeof result[index] == 'undefined') result[index] = iterable[index]",bottom:" }\n}"},rr={args:"collection, callback, thisArg",top:"callback = callback && typeof thisArg == 'undefined' ? callback : createCallback(callback, thisArg)",arrays:"typeof length == 'number'",loop:"if (callback(iterable[index], index, collection) === false) return result"},ir={top:"if (!objectTypes[typeof iterable]) return result;\n"+rr.top,arrays:!1},or=h(rr),sr=h(rr,ir,{useHas:!1}),ar=h(rr,ir),ur=Tn||function(t){return t instanceof Array||On.call(t)==Bn},cr=Mn?function(t){return L(t)?Mn(t):[]}:x,lr={"&":"&","<":"<",">":">",'"':""","'":"'"},fr=N(lr),hr=h(nr,{top:nr.top.replace(";",";\nif (argsLength > 3 && typeof args[argsLength - 2] == 'function') {\n var callback = createCallback(args[--argsLength - 1], args[argsLength--], 2);\n} else if (argsLength > 2 && typeof args[argsLength - 1] == 'function') {\n callback = args[--argsLength];\n}"),loop:"result[index] = callback ? callback(result[index], iterable[index]) : iterable[index]"}),pr=h(nr);I(/x/)&&(I=function(t){return t instanceof Function||On.call(t)==Un});var dr=function(t){if(!t||"object"!=typeof t)return!1;var e=t.valueOf,n="function"==typeof e&&(n=kn(e))&&kn(n);return n?t==n||kn(t)==n&&!y(t):b(t)},gr=te,mr=V;Xn&&nn&&"function"==typeof setImmediate&&(qe=Oe(setImmediate,e)),s.after=Ae,s.assign=hr,s.at=W,s.bind=Oe,s.bindAll=Ce,s.bindKey=Te,s.compact=fe,s.compose=Ie,s.countBy=G,s.debounce=Le,s.defaults=pr,s.defer=qe,s.delay=Me,s.difference=he,s.filter=V,s.flatten=de,s.forEach=K,s.forIn=sr,s.forOwn=ar,s.functions=_,s.groupBy=Q,s.initial=me,s.intersection=ve,s.invert=N,s.invoke=Z,s.keys=cr,s.map=te,s.max=ee,s.memoize=Re,s.merge=z,s.min=ne,s.object=xe,s.omit=P,s.once=De,s.pairs=U,s.partial=Fe,s.partialRight=Be,s.pick=J,s.pluck=gr,s.range=we,s.reject=oe,s.rest=Se,s.shuffle=se,s.sortBy=ce,s.tap=Qe,s.throttle=ze,s.times=Ve,s.toArray=le,s.union=Ee,s.uniq=Ne,s.values=H,s.where=mr,s.without=ke,s.wrap=Pe,s.zip=je,s.collect=te,s.drop=Se,s.each=K,s.extend=hr,s.methods=_,s.select=V,s.tail=Se,s.unique=Ne,He(s),s.clone=w,s.cloneDeep=S,s.contains=$,s.escape=Ue,s.every=X,s.find=Y,s.has=E,s.identity=Je,s.indexOf=ge,s.isArguments=y,s.isArray=ur,s.isBoolean=k,s.isDate=j,s.isElement=A,s.isEmpty=O,s.isEqual=C,s.isFinite=T,s.isFunction=I,s.isNaN=M,s.isNull=q,s.isNumber=R,s.isObject=L,s.isPlainObject=dr,s.isRegExp=D,s.isString=F,s.isUndefined=B,s.lastIndexOf=be,s.mixin=He,s.noConflict=We,s.random=$e,s.reduce=re,s.reduceRight=ie,s.result=Ge,s.size=ae,s.some=ue,s.sortedIndex=_e,s.template=Xe,s.unescape=Ye,s.uniqueId=Ke,s.all=X,s.any=ue,s.detect=Y,s.foldl=re,s.foldr=ie,s.include=$,s.inject=re,ar(s,function(t,e){s.prototype[e]||(s.prototype[e]=function(){var e=[this.__wrapped__];return An.apply(e,arguments),t.apply(s,e)})}),s.first=pe,s.last=ye,s.take=pe,s.head=pe,ar(s,function(t,e){s.prototype[e]||(s.prototype[e]=function(e,n){var r=t(this.__wrapped__,e,n);return null==e||n&&"function"!=typeof e?r:new s(r)})}),s.VERSION="1.0.1",s.prototype.toString=Ze,s.prototype.value=tn,s.prototype.valueOf=tn,or(["join","pop","shift"],function(t){var e=on[t];s.prototype[t]=function(){return e.apply(this.__wrapped__,arguments)}}),or(["push","reverse","sort","unshift"],function(t){var e=on[t];s.prototype[t]=function(){return e.apply(this.__wrapped__,arguments),this}}),or(["concat","slice","splice"],function(t){var e=on[t];s.prototype[t]=function(){return new s(e.apply(this.__wrapped__,arguments))}}),"function"==typeof t&&"object"==typeof t.amd&&t.amd?(e._=s,t(function(){return s})):en?nn?(nn.exports=s)._=s:en._=s:e._=s}(this)},{}],76:[function(e,n){var r=e("__browserify_Buffer").Buffer;!function(){function i(t,e,n){var r=e&&n||0,i=0;for(e=e||[],t.toLowerCase().replace(/[0-9a-f]{2}/g,function(t){16>i&&(e[r+i++]=m[t])});16>i;)e[r+i++]=0;return e}function o(t,e){var n=e||0,r=g;return r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+"-"+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]+r[t[n++]]}function s(t,e,n){var r=e&&n||0,i=e||[];t=t||{};var s=null!=t.clockseq?t.clockseq:x,a=null!=t.msecs?t.msecs:(new Date).getTime(),u=null!=t.nsecs?t.nsecs:S+1,c=a-w+(u-S)/1e4;if(0>c&&null==t.clockseq&&(s=16383&s+1),(0>c||a>w)&&null==t.nsecs&&(u=0),u>=1e4)throw new Error("uuid.v1(): Can't create more than 10M uuids/sec");w=a,S=u,x=s,a+=122192928e5;var l=(1e4*(268435455&a)+u)%4294967296;i[r++]=255&l>>>24,i[r++]=255&l>>>16,i[r++]=255&l>>>8,i[r++]=255&l;var f=268435455&1e4*(a/4294967296);i[r++]=255&f>>>8,i[r++]=255&f,i[r++]=16|15&f>>>24,i[r++]=255&f>>>16,i[r++]=128|s>>>8,i[r++]=255&s;for(var h=t.node||b,p=0;6>p;p++)i[r+p]=h[p];return e?e:o(i)}function a(t,e,n){var r=e&&n||0;"string"==typeof t&&(e="binary"==t?new d(16):null,t=null),t=t||{};var i=t.random||(t.rng||u)();if(i[6]=64|15&i[6],i[8]=128|63&i[8],e)for(var s=0;16>s;s++)e[r+s]=i[s];return e||o(i)}var u,c=this;if("function"==typeof e)try{var l=e("crypto").randomBytes;u=l&&function(){return l(16)}}catch(f){}if(!u&&c.crypto&&crypto.getRandomValues){var h=new Uint8Array(16);u=function(){return crypto.getRandomValues(h),h}}if(!u){var p=new Array(16);u=function(){for(var t,e=0;16>e;e++)0===(3&e)&&(t=4294967296*Math.random()),p[e]=255&t>>>((3&e)<<3);return p}}for(var d="function"==typeof r?r:Array,g=[],m={},v=0;256>v;v++)g[v]=(v+256).toString(16).substr(1),m[g[v]]=v;var y=u(),b=[1|y[0],y[1],y[2],y[3],y[4],y[5]],x=16383&(y[6]<<8|y[7]),w=0,S=0,_=a;if(_.v1=s,_.v4=a,_.parse=i,_.unparse=o,_.BufferClass=d,c.define&&t.amd)t(function(){return _});else if("undefined"!=typeof n&&n.exports)n.exports=_;else{var E=c.uuid;_.noConflict=function(){return c.uuid=E,_},c.uuid=_}}()},{__browserify_Buffer:65,crypto:60}],77:[function(e,n,r){!function(e,i){"object"==typeof r?i(r,n):"function"==typeof t&&t.amd&&t(["exports","module"],i)}(this,function(t,e){function n(){}n.prototype.name="ANONYMOUS",n.prototype.clientFirst=!0,n.prototype.response=function(t){return t.trace||""},n.prototype.challenge=function(){},t=e.exports=n})},{}],78:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("./lib/mechanism")):"function"==typeof t&&t.amd&&t(["exports","module","./lib/mechanism"],o)}(this,function(t,e,n){t=e.exports=n,t.Mechanism=n})},{"./lib/mechanism":77}],79:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("crypto")):"function"==typeof t&&t.amd&&t(["exports","module","crypto"],o)}(this,function(t,e,n){function r(t){t=t||{},this._genNonce=t.genNonce||o(32)}function i(t){for(var e={},n=t.split(/,(?=(?:[^"]|"[^"]*")*$)/),r=0,i=n.length;i>r;r++){var o=/(\w+)=["]?([^"]+)["]?$/.exec(n[r]);o&&(e[o[1]]=o[2])}return e}function o(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;return function(){for(var r=[],i=0;t>i;++i)r.push(e[0|Math.random()*n]);return r.join("")}}function s(t,e){return n.createHash("md5").update(t).digest(e||"hex")}r.prototype.name="DIGEST-MD5",r.prototype.clientFirst=!1,r.prototype.response=function(t){var e=t.serviceType+"/"+t.host;t.serviceName&&t.host!==t.serviceName&&(e+="/"+serviceName);var n,r,i,o=t.realm||this._realm||"",a=this._genNonce(),u="00000001",c="auth",l="";return l+='username="'+t.username+'"',o&&(l+=',realm="'+o+'"'),l+=',nonce="'+this._nonce+'"',l+=',cnonce="'+a+'"',l+=",nc="+u,l+=",qop="+c,l+=',digest-uri="'+e+'"',n=t.authzid?s(s(t.username+":"+o+":"+t.password,"binary")+":"+this._nonce+":"+a+":"+t.authzid):s(s(t.username+":"+o+":"+t.password,"binary")+":"+this._nonce+":"+a),"auth"==c?r=s("AUTHENTICATE:"+e):("auth-int"==c||"auth-conf"==c)&&(r=s("AUTHENTICATE:"+e+":00000000000000000000000000000000")),i=s(n+":"+this._nonce+":"+u+":"+a+":"+c+":"+r),l+=",response="+i,"utf-8"==this._charset&&(l+=",charset=utf-8"),t.authzid&&(l+='authzid="'+t.authzid+'"'),l},r.prototype.challenge=function(t){var e=i(t);return this._realm=e.realm,this._nonce=e.nonce,this._qop=(e.qop||"auth").split(","),this._stale=e.stale,this._maxbuf=parseInt(e.maxbuf)||65536,this._charset=e.charset,this._algo=e.algorithm,this._cipher=e.cipher,this._cipher&&this._cipher.split(","),this},t=e.exports=r})},{crypto:60}],80:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("./lib/mechanism")):"function"==typeof t&&t.amd&&t(["exports","module","./lib/mechanism"],o)}(this,function(t,e,n){t=e.exports=n,t.Mechanism=n})},{"./lib/mechanism":79}],81:[function(e,n,r){!function(e,i){"object"==typeof r?i(r,n):"function"==typeof t&&t.amd&&t(["exports","module"],i)}(this,function(t,e){function n(){}n.prototype.name="EXTERNAL",n.prototype.clientFirst=!0,n.prototype.response=function(t){return t.authzid||""},n.prototype.challenge=function(){},t=e.exports=n})},{}],82:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("./lib/mechanism")):"function"==typeof t&&t.amd&&t(["exports","module","./lib/mechanism"],o)}(this,function(t,e,n){t=e.exports=n,t.Mechanism=n})},{"./lib/mechanism":81}],83:[function(e,n,r){!function(e,i){"object"==typeof r?i(r,n):"function"==typeof t&&t.amd&&t(["exports","module"],i)}(this,function(t,e){function n(){}n.prototype.name="PLAIN",n.prototype.clientFirst=!0,n.prototype.response=function(t){var e="";return e+=t.authzid||"",e+="\0",e+=t.username,e+="\0",e+=t.password},n.prototype.challenge=function(){return this},t=e.exports=n})},{}],84:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("./lib/mechanism")):"function"==typeof t&&t.amd&&t(["exports","module","./lib/mechanism"],o)}(this,function(t,e,n){t=e.exports=n,t.Mechanism=n})},{"./lib/mechanism":83}],85:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("crypto"),e("buffer")):"function"==typeof t&&t.amd&&t(["exports","module","crypto","buffer"],o)}(this,function(t,e,n,r){function i(t){t=t||{},this._genNonce=t.genNonce||f(32),this._stage=0}function o(t,e){return n.createHmac("sha1",t).update(e).digest("binary")}function s(t,e,n){var r=o(t,e+"\0\0\0");ui=r;for(var i=0;n-1>i;i++)r=o(t,r),ui=u(ui,r);return ui}function a(t){return n.createHash("sha1").update(t).digest("binary")}function u(t,e){t=new h(t,"binary"),e=new h(e,"binary");var n=Math.min(t.length,e.length);result=[];for(var r=0;n>r;r++)result.push(t[r]^e[r]);return result=new h(result,"binary"),result.toString("binary")}function c(t){for(var e=[],n="",r=0;r<t.length;r++)n=t[r],","===n?e.push("=2C"):"="===n?e.push("=3D"):e.push(n);return e.join("")}function l(t){for(var e={},n=t.split(/,(?=(?:[^"]|"[^"]*")*$)/),r=0,i=n.length;i>r;r++){var o=/(\w+)=["]?([^"]+)["]?$/.exec(n[r]);o&&(e[o[1]]=o[2])}return e}function f(t){var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",n=e.length;return function(){for(var r=[],i=0;t>i;++i)r.push(e[0|Math.random()*n]);return r.join("")}}var h=r.Buffer;i.prototype.name="SCRAM-SHA-1",i.prototype.clientFirst=!0,i.prototype.response=function(t){return p[this._stage](this,t)},i.prototype.challenge=function(t){var e=l(t);return this._salt=new h(e.s||"","base64").toString("binary"),this._iterationCount=parseInt(e.i,10),this._nonce=e.r,this._verifier=e.v,this._error=e.e,this._challenge=t,this};var p={};p[0]=function(t,e){t._cnonce=t._genNonce();var n="";e.authzid&&(n="a="+c(e.authzid)),t._gs2Header="n,"+n+",";var r="r="+t._cnonce,i="n="+c(e.username);t._clientFirstMessageBare=i+","+r;var o=t._gs2Header+t._clientFirstMessageBare;return t._stage=1,o},p[1]=function(t,e){var n=new h(t._gs2Header).toString("base64");t._clientFinalMessageWithoutProof="c="+n+",r="+t._nonce;var r=s(e.password,t._salt,t._iterationCount),i=o(r,"Client Key"),c=a(i),l=t._clientFirstMessageBare+","+t._challenge+","+t._clientFinalMessageWithoutProof,f=o(c,l),p=u(i,f),d=new h(p,"binary").toString("base64"),g=o(r,"Server Key");t._serverSignature=o(g,l);var m=t._clientFinalMessageWithoutProof+",p="+d;return t._stage=2,m},p[2]=function(){return""},t=e.exports=i})},{buffer:58,crypto:60}],86:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("./lib/mechanism")):"function"==typeof t&&t.amd&&t(["exports","module","./lib/mechanism"],o)}(this,function(t,e,n){t=e.exports=n,t.Mechanism=n})},{"./lib/mechanism":85}],87:[function(e,n,r){!function(e,i){"object"==typeof r?i(r,n):"function"==typeof t&&t.amd&&t(["exports","module"],i)}(this,function(t,e){function n(){this._mechs=[]}n.prototype.use=function(t,e){return e||(e=t,t=e.prototype.name),this._mechs.push({name:t,mech:e}),this},n.prototype.create=function(t){for(var e=0,n=this._mechs.length;n>e;e++)for(var r=0,i=t.length;i>r;r++){var o=this._mechs[e];if(o.name==t[r])return new o.mech}return null},t=e.exports=n})},{}],88:[function(e,n,r){!function(i,o){"object"==typeof r?o(r,n,e("./lib/factory")):"function"==typeof t&&t.amd&&t(["exports","module","./lib/factory"],o)}(this,function(t,e,n){t=e.exports=n,t.Factory=n})},{"./lib/factory":87}],89:[function(t,e){function n(){this.callbacks={}}e.exports=n,n.prototype.on=function(t){var e=3===arguments.length,n=e?arguments[1]:void 0,r=e?arguments[2]:arguments[1];return r._groupName=n,(this.callbacks[t]=this.callbacks[t]||[]).push(r),this},n.prototype.once=function(t){function e(){n.off(t,e),o.apply(this,arguments)}var n=this,r=3===arguments.length,i=r?arguments[1]:void 0,o=r?arguments[2]:arguments[1];return this.on(t,i,e),this},n.prototype.releaseGroup=function(t){var e,n,r,i;for(e in this.callbacks)for(i=this.callbacks[e],n=0,r=i.length;r>n;n++)i[n]._groupName===t&&(i.splice(n,1),n--,r--);return this},n.prototype.off=function(t,e){var n,r=this.callbacks[t];return r?1===arguments.length?(delete this.callbacks[t],this):(n=r.indexOf(e),r.splice(n,1),this):this},n.prototype.emit=function(t){var e,n,r=[].slice.call(arguments,1),i=this.callbacks[t],o=this.getWildcardCallbacks(t);if(i)for(e=0,n=i.length;n>e&&i[e];++e)i[e].apply(this,r);if(o)for(e=0,n=o.length;n>e&&o[e];++e)o[e].apply(this,[t].concat(r));return this},n.prototype.getWildcardCallbacks=function(t){var e,n,r=[];for(e in this.callbacks)n=e.split("*"),("*"===e||2===n.length&&t.slice(0,n[1].length)===n[1])&&(r=r.concat(this.callbacks[e]));return r}},{}],90:[function(e,n,r){var i=self;!function(e){function o(t,e,n){n=(n||0)-1;for(var r=t.length;++n<r;)if(t[n]===e)return n;return-1}function s(t,e){var n=typeof e;if(t=t.k,"boolean"==n||null==e)return t[e];"number"!=n&&"string"!=n&&(n="object");var r="number"==n?e:j+e;return t=t[n]||(t[n]={}),"object"==n?t[r]&&-1<o(t[r],e)?0:-1:t[r]?0:-1}function a(t){var e=this.k,n=typeof t;if("boolean"==n||null==t)e[t]=!0;else{"number"!=n&&"string"!=n&&(n="object");var r="number"==n?t:j+t,i=e[n]||(e[n]={});"object"==n?(i[r]||(i[r]=[])).push(t)==this.b.length&&(e[n]=!1):i[r]=!0}}function u(){return E.pop()||{a:"",b:null,c:"",k:null,"false":!1,d:"",e:"",f:"","null":!1,number:null,object:null,push:null,g:null,string:null,h:"","true":!1,undefined:!1,i:!1,j:!1}}function c(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}function l(t){t.length=0,_.length<A&&_.push(t)}function f(t){var e=t.k;e&&f(e),t.b=t.k=t.object=t.number=t.string=null,E.length<A&&E.push(t)}function h(){}function p(){var t=u();t.g=C,t.b=t.c=t.f=t.h="",t.e="r",t.i=!0,t.j=!!ue;for(var e,n=0;e=arguments[n];n++)for(var r in e)t[r]=e[r];n=t.a,t.d=/^[^,]+/.exec(n)[0],e=Function,n="return function("+n+"){",r="var m,r="+t.d+",C="+t.e+";if(!r)return C;"+t.h+";",t.b?(r+="var s=r.length;m=-1;if("+t.b+"){",ie.unindexedChars&&(r+="if(q(r)){r=r.split('')}"),r+="while(++m<s){"+t.f+";}}else{"):ie.nonEnumArgs&&(r+="var s=r.length;m=-1;if(s&&n(r)){while(++m<s){m+='';"+t.f+";}}else{"),ie.enumPrototypes&&(r+="var E=typeof r=='function';"),ie.enumErrorProps&&(r+="var D=r===j||r instanceof Error;");var i=[];if(ie.enumPrototypes&&i.push('!(E&&m=="prototype")'),ie.enumErrorProps&&i.push('!(D&&(m=="message"||m=="name"))'),t.i&&t.j)r+="var A=-1,B=z[typeof r]&&t(r),s=B?B.length:0;while(++A<s){m=B[A];",i.length&&(r+="if("+i.join("&&")+"){"),r+=t.f+";",i.length&&(r+="}"),r+="}";else if(r+="for(m in r){",t.i&&i.push("l.call(r, m)"),i.length&&(r+="if("+i.join("&&")+"){"),r+=t.f+";",i.length&&(r+="}"),r+="}",ie.nonEnumShadows){for(r+="if(r!==y){var h=r.constructor,p=r===(h&&h.prototype),e=r===H?G:r===j?i:J.call(r),v=w[e];",k=0;7>k;k++)r+="m='"+t.g[k]+"';if((!(p&&v[m])&&l.call(r,m))",t.i||(r+="||(!v[m]&&r[m]!==y[m])"),r+="){"+t.f+"}";r+="}"}return(t.b||ie.nonEnumArgs)&&(r+="}"),r+=t.c+";return C",e=e("i,j,l,n,o,q,t,u,y,z,w,G,H,J",n+r+"}"),f(t),e(q,H,X,d,se,y,ue,h,W,z,re,B,$,Y)}function d(t){return Y.call(t)==T}function g(t,e,n,r,i,o){var s=n===N;if("function"==typeof n&&!s){n=h.createCallback(n,r,2);var a=n(t,e);if("undefined"!=typeof a)return!!a}if(t===e)return 0!==t||1/t==1/e;var u=typeof t,f=typeof e;if(t===t&&(!t||"function"!=u&&"object"!=u)&&(!e||"function"!=f&&"object"!=f))return!1;if(null==t||null==e)return t===e;if(f=Y.call(t),u=Y.call(e),f==T&&(f=D),u==T&&(u=D),f!=u)return!1;switch(f){case L:case M:return+t==+e;case R:return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case F:case B:return t==String(e)}if(u=f==I,!u){if(X.call(t,"__wrapped__")||X.call(e,"__wrapped__"))return g(t.__wrapped__||t,e.__wrapped__||e,n,r,i,o);if(f!=D||!ie.nodeClass&&(c(t)||c(e)))return!1;var f=!ie.argsObject&&d(t)?Object:t.constructor,p=!ie.argsObject&&d(e)?Object:e.constructor;if(!(f==p||m(f)&&f instanceof f&&m(p)&&p instanceof p))return!1}for(p=!i,i||(i=_.pop()||[]),o||(o=_.pop()||[]),f=i.length;f--;)if(i[f]==t)return o[f]==e;var v=0,a=!0;if(i.push(t),o.push(e),u){if(f=t.length,v=e.length,a=v==t.length,!a&&!s)return a;for(;v--;)if(u=f,p=e[v],s)for(;u--&&!(a=g(t[u],p,n,r,i,o)););else if(!(a=g(t[v],p,n,r,i,o)))break;return a}return le(e,function(e,s,u){return X.call(u,s)?(v++,a=X.call(t,s)&&g(t[s],e,n,r,i,o)):void 0}),a&&!s&&le(t,function(t,e,n){return X.call(n,e)?a=-1<--v:void 0}),p&&(l(i),l(o)),a}function m(t){return"function"==typeof t}function v(t){return!(!t||!z[typeof t])}function y(t){return"string"==typeof t||Y.call(t)==B}function b(t,e,n){if(e&&"undefined"==typeof n&&se(t)){n=-1;for(var r=t.length;++n<r&&!1!==e(t[n],n,t););}else ce(t,e,n);return t}function x(t,e,n){if("number"==typeof n){var r=t?t.length:0;n=0>n?ee(0,r+n):n||0}else if(n)return n=w(t,e),t[n]===e?n:-1;return t?o(t,e,n):-1}function w(t,e,n,r){var i=0,o=t?t.length:i;for(n=n?h.createCallback(n,r,1):S,e=n(e);o>i;)r=i+o>>>1,n(t[r])<e?i=r+1:o=r;return i}function S(t){return t}var _=[],E=[],N={},j=+new Date+"",A=40,O=(O=/\bthis\b/)&&O.test(function(){return this})&&O,C="constructor hasOwnProperty isPrototypeOf propertyIsEnumerable toLocaleString toString valueOf".split(" "),T="[object Arguments]",I="[object Array]",L="[object Boolean]",M="[object Date]",q="[object Error]",R="[object Number]",D="[object Object]",F="[object RegExp]",B="[object String]",z={"boolean":!1,"function":!0,object:!0,number:!1,string:!1,undefined:!1},P=z[typeof r]&&r,U=z[typeof n]&&n&&n.exports==P&&n,J=z[typeof i]&&i;!J||J.global!==J&&J.window!==J||(e=J);var H=Error.prototype,W=Object.prototype,$=String.prototype,J=RegExp("^"+String(W.valueOf).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/valueOf|for [^\]]+/g,".+?")+"$"),G=Function.prototype.toString,X=W.hasOwnProperty,V=W.propertyIsEnumerable,Y=W.toString,K=J.test(K=Y.bind)&&K,Q=J.test(Q=Object.create)&&Q,Z=J.test(Z=Array.isArray)&&Z,te=J.test(te=Object.keys)&&te,ee=Math.max,Q=J.test(e.attachEvent),ne=K&&!/\n|true/.test(K+Q),re={};re[I]=re[M]=re[R]={constructor:!0,toLocaleString:!0,toString:!0,valueOf:!0},re[L]=re[B]={constructor:!0,toString:!0,valueOf:!0},re[q]=re["[object Function]"]=re[F]={constructor:!0,toString:!0},re[D]={constructor:!0},function(){for(var t=C.length;t--;){var e,n=C[t];for(e in re)X.call(re,e)&&!X.call(re[e],n)&&(re[e][n]=!1)}}();var ie=h.support={};!function(){var t=function(){this.x=1},e=[];t.prototype={valueOf:1,y:1};for(var n in new t)e.push(n);for(n in arguments);ie.argsObject=arguments.constructor==Object&&!(arguments instanceof Array),ie.argsClass=d(arguments),ie.enumErrorProps=V.call(H,"message")||V.call(H,"name"),ie.enumPrototypes=V.call(t,"prototype"),ie.fastBind=K&&!ne,ie.nonEnumArgs=0!=n,ie.nonEnumShadows=!/valueOf/.test(e),ie.unindexedChars="xx"!="x"[0]+Object("x")[0];try{ie.nodeClass=!(Y.call(document)==D&&!({toString:0}+""))}catch(r){ie.nodeClass=!0}}(1);var oe={a:"x,F,k",h:"var a=arguments,b=0,c=typeof k=='number'?2:a.length;while(++b<c){r=a[b];if(r&&z[typeof r]){",f:"if(typeof C[m]=='undefined')C[m]=r[m]",c:"}}"},Q={a:"f,d,I",h:"d=d&&typeof I=='undefined'?d:u.createCallback(d,I)",b:"typeof s=='number'",f:"if(d(r[m],m,f)===false)return C"},J={h:"if(!z[typeof r])return C;"+Q.h,b:!1};ie.argsClass||(d=function(t){return t?X.call(t,"callee"):!1});var se=Z||function(t){return t?"object"==typeof t&&Y.call(t)==I:!1},ae=p({a:"x",e:"[]",h:"if(!(z[typeof x]))return C",f:"C.push(m)"}),ue=te?function(t){return v(t)?ie.enumPrototypes&&"function"==typeof t||ie.nonEnumArgs&&t.length&&d(t)?ae(t):te(t):[]}:ae,ce=p(Q),Z=p(oe,{h:oe.h.replace(";",";if(c>3&&typeof a[c-2]=='function'){var d=u.createCallback(a[--c-1],a[c--],2)}else if(c>2&&typeof a[c-1]=='function'){d=a[--c]}"),f:"C[m]=d?d(C[m],r[m]):r[m]"}),le=p(Q,J,{i:!1});m(/x/)&&(m=function(t){return"function"==typeof t&&"[object Function]"==Y.call(t)}),Q=function(t){return function(e,n,r,i){return"boolean"!=typeof n&&null!=n&&(i=r,r=i&&i[n]===e?void 0:n,n=!1),null!=r&&(r=h.createCallback(r,i)),t(e,n,r,i)}}(function(t,e,n){var r,i=-1;r=(r=h.indexOf)===x?o:r;var c=t?t.length:0,p=[],d=!e&&c>=75&&r===o,g=n||d?_.pop()||[]:p;if(d){var m;m=g;var v=-1,y=m.length,b=u();b["false"]=b["null"]=b["true"]=b.undefined=!1;var w=u();for(w.b=m,w.k=b,w.push=a;++v<y;)w.push(m[v]);(m=!1===b.object?(f(w),null):w)?(r=s,g=m):(d=!1,g=n?g:(l(g),p))}for(;++i<c;)m=t[i],v=n?n(m,i,t):m,(e?!i||g[g.length-1]!==v:0>r(g,v))&&((n||d)&&g.push(v),p.push(m));return d?(l(g.b),f(g)):n&&l(g),p}),h.assign=Z,h.createCallback=function(t,e,n){if(null==t)return S;var r=typeof t;if("function"!=r){if("object"!=r)return function(e){return e[t]};var i=ue(t);return function(e){for(var n=i.length,r=!1;n--&&(r=g(e[i[n]],t[i[n]],N)););return r}}return"undefined"==typeof e||O&&!O.test(G.call(t))?t:1===n?function(n){return t.call(e,n)}:2===n?function(n,r){return t.call(e,n,r)}:4===n?function(n,r,i,o){return t.call(e,n,r,i,o)}:function(n,r,i){return t.call(e,n,r,i)}},h.forEach=b,h.forIn=le,h.keys=ue,h.uniq=Q,h.each=b,h.extend=Z,h.unique=Q,h.identity=S,h.indexOf=x,h.isArguments=d,h.isArray=se,h.isEqual=g,h.isFunction=m,h.isObject=v,h.isString=y,h.sortedIndex=w,h.VERSION="1.3.1","function"==typeof t&&"object"==typeof t.amd&&t.amd?(e._=h,t(function(){return h})):P&&!P.nodeType?U?(U.exports=h)._=h:P._=h:e._=h}(this)},{}]},{},[1])(1)}),function(){function t(t){return function(){return t}}function e(t,e,o,s){var a=e?t.prototype:t;i(s,function(t,e){"function"==typeof o?r(a,t,n(a[t],e,o)):o!==D&&a[t]||r(a,t,e)})}function n(t,e,n){return function(){return t&&(n===D||n.apply(this,arguments))?t.apply(this,arguments):e.apply(this,arguments)}}function r(t,e,n){W?B.defineProperty(t,e,{value:n,configurable:D,enumerable:F,writable:D}):t[e]=n}function i(t,e){var n,r=0;for(n in t)t.hasOwnProperty(n)&&(e.call(t,n,t[n],r),r++)}function o(t,e,n,r){return t===e?D:B.isRegExp(e)?P(e).test(t):B.isFunction(e)?e.apply(n,[t].concat(r)):B.equal(e,t)}function s(t,e,n,r){return u(e)?t:B.isFunction(e)?e.apply(n,r||[]):B.isFunction(t[e])?t[e].call(t):t[e]}function a(t,e,n,r){t=Array.prototype.slice.call(t,void 0),n!==F&&(t=p(t)),f(t,e,r)}function u(t){return void 0===t}function c(t){return void 0!==t}function l(t,e,n,r){return"object"==typeof e&&i(e,function(i,o){var s=t[i],a=c(s),u=B.isArray(o);n===D&&(u||B.isObject(o))?(s||(s=u?[]:{}),l(s,o,n)):a&&B.isFunction(r)?s=r.call(e,i,t[i],e[i]):(!a||a&&r!==F)&&(s=e[i]),c(s)&&(t[i]=s)}),t}function f(t,e,n,r){var i;for(g(e),0>n&&(n=t.length+n),n=isNaN(n)?0:parseInt(n>>0),r=r===D?t.length+n:t.length;r>n&&(i=n%t.length,e.call(t,t[i],i,t)!==F);)n++}function h(t,e,n,r,i){var s,a;return f(t,function(t,n,r){return o(t,e,r,[n,r])?(s=t,a=n,F):void 0},n,r),i?a:s}function p(t,e,n){e=e||1/0,n=n||0;var r=[];return f(t,function(t){B.isArray(t)&&e>n?r=r.concat(p(t,e,n+1)):r.push(t)}),r}function d(t,e,n,r){var i=t.length,o=-1==r,s=o?i-1:0;for(n=isNaN(n)?s:parseInt(n>>0),0>n&&(n=i+n),(!o&&0>n||o&&n>=i)&&(n=s);o&&n>=0||!o&&i>n;){if(t[n]===e)return n;n+=r}return-1}function g(t){if(!t||!t.call)throw new TypeError("Callback is not callable")}function m(t){if(0===t.length)throw new TypeError("First argument must be defined")}function v(t,e,n){n=Math[n||"round"];var r=Math.abs(Math.pow(10,e||0));return 0>e&&(r=1/r),n(t*r)/r}function y(t,e,n,r){var i=[];t=parseInt(t);for(var o=r>0;o&&e>=t||!o&&t>=e;)i.push(t),n&&n.call(this,t),t+=r;return i}function b(t,e){function n(){return v(this*e)}function i(){return R(arguments)[s](this)}function o(){return R(arguments)[s](-this)}var s="add"+t.capitalize()+"s";r(H.prototype,t,n),r(H.prototype,t+"s",n),r(H.prototype,t+"Before",o),r(H.prototype,t+"sBefore",o),r(H.prototype,t+"Ago",o),r(H.prototype,t+"sAgo",o),r(H.prototype,t+"After",i),r(H.prototype,t+"sAfter",i),r(H.prototype,t+"FromNow",i),r(H.prototype,t+"sFromNow",i)}function x(){return" \n\f\r \u2028\u2029 "}function w(t){var e=U.addFormat,n=t.code;t.l||(e("("+t.months.compact().join("|")+")",["month"],n),e("("+t.weekdays.compact().join("|")+")",["weekday"],n),e("("+t.modifiers.filter(function(t){return"day"===t.name}).map("text").join("|")+")",["day"],n),f(t.formats,function(r){var i=[];r=r.replace(/\s+/g,"[-,. ]*"),r=r.replace(/\{(.+?)\}/g,function(e,n){var r,o,s=n.match(/\?$/),a=n.match(/(\d)(?:-(\d))?/),u=n.match(/^\d+$/),c=n.replace(/[^a-z]+$/,"");return"time"===c?(i=i.concat(X),s?Y:V):(u?r=t.optionals[u[0]-1]:t[c]?r=t[c]:t[c+"s"]&&(r=t[c+"s"],a&&(o=[],f(r,function(e,n){var i=n%(t.units?8:r.length);i>=a[1]&&i<=(a[2]||a[1])&&o.push(e)}),r=o),r=r.compact().join("|")),u?"(?:"+r+")?":(i.push(c),"("+r+")"+(s?"?":"")))}),e(r,i,n)}),t.l=D)}function S(t,e,n){return!e||B.isString(t)&&t||(t=Date.currentLocale),t&&!ie[t]&&_(t,n),ie[t]}function _(t,e){function n(t,e){return t=t.split("+").map(function(t){return t.replace(/(.+):(.+)$/,function(t,e,n){return n.split("|").map(function(t){return e+t}).join("|")})}).join("|"),f(t.split("|"),e)}function r(t,r,i){var o=[];return e[t]?(f(e[t],function(t,e){n(t,function(t,n){o[n*i+e]=t.toLowerCase()})}),r&&(o=o.concat(e[t].map(function(t){return t.slice(0,3).toLowerCase()}))),e[t]=o):void 0}function i(t,n){var r="[0-90-9]"+(t?"{"+t+","+n+"}":"+");return e.digits&&(r+="|["+e.digits+"]+"),r}if(e=e||E(t),!e)throw Error("Invalid locale.");r("months",D,12),r("weekdays",D,7),r("units",F,8),r("numbers",F,10),e.code=t,e.date=i(1,2),e.year=i(4,4),e.num=function(){var t=[i()].concat(e.articles);return e.digits||(t=t.concat(e.numbers)),t.compact().join("|")}(),function(){var t=[];e.f={},f(e.modifiers,function(r){n(r.text,function(n){e.f[n]=r,t.push({name:r.name,text:n,value:r.value})})}),t.groupBy("name",function(t,n){n=n.map("text"),"day"===t&&(n=n.concat(e.weekdays)),e[t]=n.join("|")}),e.modifiers=t}(),e.monthSuffix&&(e.month=i(1,2),e.months=y(1,12,null,1).map(function(t){return t+e.monthSuffix})),ie[t]=new k(e)}function E(t){function e(t){return!!(r[0]&Math.pow(2,t-1))}if("en-"==t.slice(0,3)&&(t="en"),!oe[t])return null;var n={modifiers:[]},r=oe[t].split(";");return f(["months","weekdays","units","numbers","articles","optionals","formats"],function(t,e){n[t]=r[e+2]?r[e+2].split(","):[]}),n.outputFormat=r[9],f(["day","sign","shift","edge"],function(t,e){r[e+10]&&f(r[e+10].split(","),function(e,r){e&&n.modifiers.push({name:t,text:e,value:r-2})})}),e(1)&&(n.digits=K+Q,n.numbers.length>0?n.digits+=n.numbers.join(""):n.numbers=K.split(""),n.monthSuffix=r[1]),n.capitalizeUnit="de"==t,n.hasPlural=e(2),n.pastRelativeFormat=n.formats[0],n.futureRelativeFormat=n.formats[e(3)?1:0],n}function N(t){return t||(t=Date.currentLocale),"en"!=t&&"en-US"!=t}function k(t){B.merge(this,t)}function j(t){var e;return"object"==typeof t[0]?t:1==t.length&&B.isNumber(t[0])?[t[0]]:(e={},f($,function(n,r){e[n.a]=t[r]}),[e])}function A(t,e){return t=t.replace(/[\uff11\uff12\uff13\uff14\uff15\uff16\uff17\uff18\uff19\uff10]/g,function(t){return String.fromCharCode(t.charCodeAt(0)-65248)}),"date"!=e&&"month"!=e&&"year"!=e?t:t.replace(Z,function(t){return K.indexOf(t)+1||""})}function O(t,e){var n,r,i={};return f(e,function(e,o){n=t[o+1],u(n)||""===n||(n=A(n,e),"year"===e&&(i.s=n),"millisecond"===e&&(n*=Math.pow(10,3-n.length)),r=parseFloat(n),i[e]=isNaN(r)?n.toLowerCase():r)}),i}function C(t,e){var n,r,i,o,s,a,u,l=new U,h=F;return B.isDate(t)?l=t:B.isNumber(t)?l=new U(t):B.isObject(t)?(l=(new U).set(t,D),o=t):B.isString(t)&&(w(S(e,D)),r=N(e),t=t.trim().replace(/\.+$/,"").replace(/^now$/,""),f(te,function(e){var f=t.match(e.p);return f?(i=e,o=O(f,i.to),n=S(i.o,D),o.timestamp?(l.setTime(0),o={milliseconds:o.timestamp},F):(i.h&&!B.isString(o.month)&&(B.isString(o.date)||r)&&(u=o.month,o.month=o.date,o.date=u),o.year&&2===o.s.length&&(o.year=100*v((new U).getFullYear()/100)-100*v(o.year/100)+o.year),o.month&&(o.month=n.getMonth(o.month),o.shift&&!o.unit&&(o.unit="year")),o.weekday&&o.date?delete o.weekday:o.weekday&&(o.weekday=n.k(o.weekday),o.shift&&!o.unit&&(o.unit="week")),o.day&&(u=n.f[o.day])?(o.day=u.value,l.resetTime(),h=D):o.day&&(u=n.k(o.day))>-1&&(delete o.day,o.weekday=u),o.date&&!B.isNumber(o.date)&&(o.date=n.n(o.date)),o.meridian&&"pm"===o.meridian&&o.hour<12&&(o.hour+=12),(o.offset_hours||o.offset_minutes)&&(o.utc=D,o.offset_minutes=o.offset_minutes||0,o.offset_minutes+=60*o.offset_hours,"-"===o.offset_sign&&(o.offset_minutes*=-1),o.minute-=o.offset_minutes),o.unit&&(h=D,a=n.j(o.num),s=n.m(o.unit),(o.shift||o.edge)&&(a*=(u=n.f[o.shift])?u.value:0,"month"===s&&c(o.date)&&(l.set({day:o.date},D),delete o.date),"year"===s&&c(o.month)&&(l.set({month:o.month,day:o.date},D),delete o.month,delete o.date)),o.sign&&(u=n.f[o.sign])&&(a*=u.value),c(o.weekday)&&(l.set({weekday:o.weekday},D),delete o.weekday),o[s]=(o[s]||0)+a),"-"===o.year_sign&&(o.year*=-1),F)):void 0
|
||
}),i?h?l.advance(o):o.utc?l.setUTC(o,D):l.set(o,D):l=t?new U(t):new U,o&&o.edge&&(u=n.f[o.edge],f(G.slice(4),function(t){return c(o[t.a])?(s=t.a,F):void 0}),"year"===s?o.d="month":("month"===s||"week"===s)&&(o.d="day"),l[(u.value<0?"endOf":"beginningOf")+s.capitalize()](),-2===u.value&&l.resetTime())),{e:l,set:o}}function T(t,e,n,r){var i,o=S(r,D),s=P(/^[A-Z]/);if(!t.isValid())return"Invalid Date";if(Date[e]?e=Date[e]:B.isFunction(e)&&(i=q(t),e=e.apply(t,i.concat(o))),e||n){if(!e&&n)return i=i||q(t),0===i[1]&&(i[1]=1,i[0]=1),o.q(i[0],i[1],i[2])}else e=o.outputFormat;return f(ne,function(n){e=e.replace(P("\\{("+n.b+")(\\d)?\\}",n.i?"i":""),function(e,r,i){e=n.format(t,o,i||1,r),i=r.length;var a=r.match(/^(.)\1+$/);return n.i?(3===i&&(e=e.slice(0,3)),(a||r.match(s))&&(e=e.capitalize())):a&&!n.text&&(e=(B.isNumber(e)?e.pad(i):e.toString()).last(i)),e})}),e}function I(t,e,n){var r,i=C(e),o=0,s=e=0;if(n>0&&(e=s=n,r=D),!i.e.isValid())return F;i.set&&i.set.d&&(f(re,function(e){e.a===i.set.d&&(o=e.c(i.e,t-i.e)-1)}),(i.set.edge||i.set.shift)&&i.e["beginningOf"+i.set.d.capitalize()](),!r&&i.set.sign&&"millisecond"!=i.set.d&&(e=50,s=-50)),n=t.getTime(),r=i.e.getTime();var a=r+o;return i.set&&"week"==i.set.d&&0!=new Date(a+1).getHours()&&(a-=U.DSTOffset),n>=r-e&&a+s>=n}function L(t,e,n,r,i){if(B.isNumber(e)&&i)e={milliseconds:e};else if(B.isNumber(e))return t.setTime(e),t;return e.date&&(e.day=e.date),!i&&u(e.day)&&c(e.weekday)&&(t["set"+(r?"UTC":"")+"Weekday"](e.weekday),e.day=t["get"+(r?"UTC":"")+"Date"](void 0),delete e.weekday),f(G,function(i){return c(e[i.a])||c(e[i.a+"s"])?(e.d=i.a,F):(n&&"week"!==i.a&&"year"!==i.a&&t["set"+(r?"UTC":"")+i.method]("day"===i.a?1:0),void 0)}),f(re,function(n){var o=n.a;n=n.method;var s=c(e[o])?e[o]:e[o+"s"];u(s)||(i&&("week"===o&&(s=(e.day||0)+7*s,n="Date"),s=s*i+t["get"+n](void 0)),t["set"+(r?"UTC":"")+n](s),"month"===o&&(o=s,0>o&&(o+=12),o%12!=t.getMonth()&&t.setDate(0)))}),t}function M(t){return t.addDays(4-(t.getDay()||7)).resetTime(),1+(0|t.daysSince(t.clone().beginningOfYear())/7)}function q(t){var e;t=t.millisecondsFromNow();var n=Math.abs(t),r=n,i=0;return f(G.slice(1),function(t,o){e=0|v(n/t.c(),1),e>=1&&(r=e,i=o+1)}),[r,i,t]}function R(t){var e;return e=B.isNumber(t[1])?j(t)[0]:t[0],C(e,t[1]).e}var D=!0,F=!1,B=Object,z=Array,P=RegExp,U=Date,J=String,H=Number,W=B.defineProperty&&B.defineProperties;e(B,F,F,{isObject:function(t){return null===t||u(t)?F:"[object Object]"===B.prototype.toString.call(t)&&t.constructor===B},each:function(t,e){return e&&i(t,function(n,r){e.call(t,n,r,t)}),t},merge:function(t,e,n){return l(t,e,D,n)}}),e(z,D,function(){var t=arguments;return 0===t.length||B.isFunction(t[0])},{every:function(t,e){var n=this.length,r=0;for(m(arguments);n>r;){if(r in this&&!o(this[r],t,e,[r,this]))return F;r++}return D},some:function(t,e){var n=this.length,r=0;for(m(arguments);n>r;){if(r in this&&o(this[r],t,e,[r,this]))return D;r++}return F},map:function(t,e){var n,r=this.length,i=0,o=Array(r);for(m(arguments);r>i;)i in this&&(n=this[i],o[i]=s(n,t,e,[n,i,this])),i++;return o},filter:function(t,e){var n=this.length,r=0,i=[];for(m(arguments);n>r;)r in this&&o(this[r],t,e,[r,this])&&i.push(this[r]),r++;return i}}),e(z,D,F,{indexOf:function(t,e){return B.isString(this)?this.indexOf(t,e):d(this,t,e,1)},lastIndexOf:function(t,e){return B.isString(this)?this.lastIndexOf(t,e):d(this,t,e,-1)},forEach:function(t,e){var n=this.length,r=0;for(g(t);n>r;)r in this&&t.call(e,this[r],r,this),r++},reduce:function(t,e){return arrayReduce(this,t,e)},reduceRight:function(t,e){return arrayReduce(this,t,e,D)},groupBy:function(t,e){var n,r=this,i={};return f(r,function(e,o){n=s(e,t,r,[e,o,r]),i[n]||(i[n]=[]),i[n].push(e)}),B.each(i,e)},compact:function(t){var e=[];return f(this,function(n){B.isArray(n)?e.push(n.compact()):t&&n?e.push(n):t||!c(n)||null===n||B.isNumber(n)&&isNaN(n)||e.push(n)}),e}}),e(H,D,F,{toNumber:function(){return parseFloat(this,10)},ordinalize:function(){var t;if(this>=11&&13>=this)t="th";else switch(this%10){case 1:t="st";break;case 2:t="nd";break;case 3:t="rd";break;default:t="th"}return this.toString()+t},pad:function(t,e,n){n=n||10;var r=0===this.toNumber()?"":this.toString(n).replace(/^-/,"");n=r,t-=r.replace(/\.\d+$/,"").length,r=0;var i=String("0");return"0"!=i&&(i=""),B.isNumber(t)||(t=1),B.isNumber(r)||(r=1),r=i.repeat(t)+n+i.repeat(r),(e||0>this)&&(r=(0>this?"-":"+")+r),r}}),e(J,D,F,{capitalize:function(t){return this.toLowerCase().replace(t?/\b[a-z]/g:/^[a-z]/,function(t){return t.toUpperCase()})},repeat:function(t){var e="",n=0;if(B.isNumber(t)&&t>0)for(;t>n;)e+=this,n++;return e},toNumber:function(t){var e=this.replace(/,/g,"");return e.match(/\./)?parseFloat(e):parseInt(e,t||10)},first:function(t){return t=u(t)?1:t,this.substr(0,t)},last:function(t){return t=u(t)?1:t,this.substr(this.length-t<0?0:this.length-t)},to:function(t){return u(t)&&(t=this.length),this.slice(0,t)},toDate:function(t){return R([this.toString(),t])},assign:function(){var t={};return a(arguments,function(e,n){B.isObject(e)?B.merge(t,e):t[n+1]=e}),this.replace(/\{(.+?)\}/g,function(e,n){return t.hasOwnProperty(n)?t[n]:e})}});var $,G,X=["hour","minute","second","millisecond","meridian","utc","offset_sign","offset_hours","offset_minutes"],V="(\\d{1,2}):?(\\d{2})?:?(\\d{2})?(?:\\.(\\d{1,6}))?(am|pm)?(?:(Z)|(?:([+-])(\\d{2})(?::?(\\d{2}))?)?)?",Y="\\s*(?:(?:t|at |\\s+)"+V+")?",K="一二三四五六七八九",Q="十百千万",Z=P("["+K+Q+"]","g"),te=[],ee=[{src:"(\\d{4})",to:["year"]},{src:"([+-])?(\\d{4})[-.]?({month})[-.]?(\\d{1,2})?",to:["year_sign","year","month","date"]},{src:"(\\d{1,2})[-.\\/]({month})[-.\\/]?(\\d{2,4})?",to:["month","date","year"],h:D},{src:"\\/Date\\((\\d+(?:\\+\\d{4})?)\\)\\/",to:["timestamp"],r:F}],ne=[{b:"f{1,4}|ms|milliseconds",format:function(t){return t.getMilliseconds()}},{b:"ss?|seconds",format:function(t){return t.getSeconds()}},{b:"mm?|minutes",format:function(t){return t.getMinutes()}},{b:"hh?|hours|12hr",format:function(t){return t=t.getHours(void 0),0===t?12:t-12*(0|t/13)}},{b:"HH?|24hr",format:function(t){return t.getHours()}},{b:"dd?|date|day",format:function(t){return t.getDate()}},{b:"dow|weekday",i:D,format:function(t,e,n){return e.weekdays[t.getDay()+7*(n-1)]}},{b:"MM?",format:function(t){return t.getMonth()+1}},{b:"mon|month",i:D,format:function(t,e,n){return e.months[t.getMonth()+12*(n-1)]}},{b:"y{2,4}|year",format:function(t){return t.getFullYear()}},{b:"[Tt]{1,2}",format:function(t,e,n,r){return t=t.getHours(void 0)<12?"am":"pm",1===r.length&&(t=t.first()),"T"===r.first()&&(t=t.toUpperCase()),t}},{b:"z{1,4}|tz|timezone",text:D,format:function(t,e,n,r){return t=t.getUTCOffset(),("z"==r||"zz"==r)&&(t=t.replace(/(\d{2})(\d{2})/,function(t,e){return e.toNumber().pad(r.length)})),t}},{b:"iso(tz|timezone)",format:function(t){return t.getUTCOffset(D)}},{b:"ord",format:function(t){return t.getDate().ordinalize()}}],re=[{a:"year",method:"FullYear",c:function(t){return 1e3*60*60*24*(365+(t?t.isLeapYear()?1:0:.25))}},{a:"month",method:"Month",c:function(t,e){var n,r=30.4375;return t&&(n=t.daysInMonth(),e<=n.days()&&(r=n)),1e3*60*60*24*r}},{a:"week",method:"Week",c:t(6048e5)},{a:"day",method:"Date",c:t(864e5)},{a:"hour",method:"Hours",c:t(36e5)},{a:"minute",method:"Minutes",c:t(6e4)},{a:"second",method:"Seconds",c:t(1e3)},{a:"millisecond",method:"Milliseconds",c:t(1)}],ie={},oe={en:"2;;January,February,March,April,May,June,July,August,September,October,November,December;Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday;millisecond:|s,second:|s,minute:|s,hour:|s,day:|s,week:|s,month:|s,year:|s;one,two,three,four,five,six,seven,eight,nine,ten;a,an,the;the,st|nd|rd|th,of;{num} {unit} {sign},{num} {unit=4-5} {sign} {day},{weekday?} {month} {date}{2} {year?} {time?},{date} {month} {year},{month} {year},{shift?} {weekday} {time?},{shift} week {weekday} {time?},{shift} {unit=5-7},{1} {edge} of {shift?} {unit=4-7?}{month?}{year?},{weekday} {3} {shift} week,{1} {date}{2} of {month},{1}{month?} {date?}{2} of {shift} {unit=6-7},{day} at {time?},{time} {day};{Month} {d}, {yyyy};,yesterday,today,tomorrow;,ago|before,,from now|after|from;,last,the|this,next;last day,end,,first day|beginning",ja:"1;月;;日曜日,月曜日,火曜日,水曜日,木曜日,金曜日,土曜日;ミリ秒,秒,分,時間,日,週間|週,ヶ月|ヵ月|月,年;;;;{num}{unit}{sign},{shift}{unit=5-7}{weekday?},{year}年{month?}月?{date?}日?,{month}月{date?}日?,{date}日;{yyyy}年{M}月{d}日;一昨日,昨日,今日,明日,明後日;,前,,後;,去|先,,来",ko:"1;월;;일요일,월요일,화요일,수요일,목요일,금요일,토요일;밀리초,초,분,시간,일,주,개월|달,년;일|한,이,삼,사,오,육,칠,팔,구,십;;;{num}{unit} {sign},{shift} {unit=5-7},{shift} {unit=5?} {weekday},{year}년{month?}월?{date?}일?,{month}월{date?}일?,{date}일;{yyyy}년{M}월{d}일;그저께,어제,오늘,내일,모레;,전,,후;,지난|작,이번,다음|내",ru:"4;;Январ:я|ь,Феврал:я|ь,Март:а|,Апрел:я|ь,Ма:я|й,Июн:я|ь,Июл:я|ь,Август:а|,Сентябр:я|ь,Октябр:я|ь,Ноябр:я|ь,Декабр:я|ь;Воскресенье,Понедельник,Вторник,Среда,Четверг,Пятница,Суббота;миллисекунд:а|у|ы|,секунд:а|у|ы|,минут:а|у|ы|,час:||а|ов,день|день|дня|дней,недел:я|ю|и|ь|е,месяц:||а|ев|е,год|год|года|лет|году;од:ин|ну,дв:а|е,три,четыре,пять,шесть,семь,восемь,девять,десять;;в|на,года;{num} {unit} {sign},{sign} {num} {unit},{date} {month} {year?} {2},{month} {year},{1} {shift} {unit=5-7};{d} {month} {yyyy} года;позавчера,вчера,сегодня,завтра,послезавтра;,назад,,через;,прошло:й|м,,следующе:й|м",es:"6;;enero,febrero,marzo,abril,mayo,junio,julio,agosto,septiembre,octubre,noviembre,diciembre;domingo,lunes,martes,miércoles|miercoles,jueves,viernes,sábado|sabado;milisegundo:|s,segundo:|s,minuto:|s,hora:|s,día|días|dia|dias,semana:|s,mes:|es,año|años|ano|anos;uno,dos,tres,cuatro,cinco,seis,siete,ocho,nueve,diez;;el,de;{sign} {num} {unit},{num} {unit} {sign},{date?} {2} {month} {2} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} de {month} de {yyyy};anteayer,ayer,hoy,mañana|manana;,hace,,de ahora;,pasad:o|a,,próximo|próxima|proximo|proxima",pt:"6;;janeiro,fevereiro,março,abril,maio,junho,julho,agosto,setembro,outubro,novembro,dezembro;domingo,segunda-feira,terça-feira,quarta-feira,quinta-feira,sexta-feira,sábado|sabado;milisegundo:|s,segundo:|s,minuto:|s,hora:|s,dia:|s,semana:|s,mês|mêses|mes|meses,ano:|s;um,dois,três|tres,quatro,cinco,seis,sete,oito,nove,dez,uma,duas;;a,de;{num} {unit} {sign},{sign} {num} {unit},{date?} {2} {month} {2} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} de {month} de {yyyy};anteontem,ontem,hoje,amanh:ã|a;,atrás|atras|há|ha,,daqui a;,passad:o|a,,próximo|próxima|proximo|proxima",fr:"2;;janvier,février|fevrier,mars,avril,mai,juin,juillet,août,septembre,octobre,novembre,décembre|decembre;dimanche,lundi,mardi,mercredi,jeudi,vendredi,samedi;milliseconde:|s,seconde:|s,minute:|s,heure:|s,jour:|s,semaine:|s,mois,an:|s|née|nee;un:|e,deux,trois,quatre,cinq,six,sept,huit,neuf,dix;;l'|la|le;{sign} {num} {unit},{sign} {num} {unit},{1} {date?} {month} {year?},{1} {unit=5-7} {shift};{d} {month} {yyyy};,hier,aujourd'hui,demain;,il y a,,dans|d'ici;,derni:er|ère|ere,,prochain:|e",it:"2;;Gennaio,Febbraio,Marzo,Aprile,Maggio,Giugno,Luglio,Agosto,Settembre,Ottobre,Novembre,Dicembre;Domenica,Luned:ì|i,Marted:ì|i,Mercoled:ì|i,Gioved:ì|i,Venerd:ì|i,Sabato;millisecond:o|i,second:o|i,minut:o|i,or:a|e,giorn:o|i,settiman:a|e,mes:e|i,ann:o|i;un:|'|a|o,due,tre,quattro,cinque,sei,sette,otto,nove,dieci;;l'|la|il;{num} {unit} {sign},{weekday?} {date?} {month} {year?},{1} {unit=5-7} {shift},{1} {shift} {unit=5-7};{d} {month} {yyyy};,ieri,oggi,domani,dopodomani;,fa,,da adesso;,scors:o|a,,prossim:o|a",de:"2;;Januar,Februar,März|Marz,April,Mai,Juni,Juli,August,September,Oktober,November,Dezember;Sonntag,Montag,Dienstag,Mittwoch,Donnerstag,Freitag,Samstag;Millisekunde:|n,Sekunde:|n,Minute:|n,Stunde:|n,Tag:|en,Woche:|n,Monat:|en,Jahr:|en;ein:|e|er|em|en,zwei,drei,vier,fuenf,sechs,sieben,acht,neun,zehn;;der;{sign} {num} {unit},{num} {unit} {sign},{num} {unit} {sign},{sign} {num} {unit},{weekday?} {date?} {month} {year?},{shift} {unit=5-7};{d}. {Month} {yyyy};vorgestern,gestern,heute,morgen,übermorgen|ubermorgen|uebermorgen;,vor:|her,,in;,letzte:|r|n|s,,nächste:|r|n|s+naechste:|r|n|s","zh-TW":"1;月;;日,一,二,三,四,五,六;毫秒,秒鐘,分鐘,小時,天,個星期|週,個月,年;;;日|號;{num}{unit}{sign},星期{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}年{month?}月?{date?}{1},{month}月{date?}{1},{date}{1};{yyyy}年{M}月{d}日;前天,昨天,今天,明天,後天;,前,,後;,上|去,這,下|明","zh-CN":"1;月;;日,一,二,三,四,五,六;毫秒,秒钟,分钟,小时,天,个星期|周,个月,年;;;日|号;{num}{unit}{sign},星期{weekday},{shift}{unit=5-7},{shift}{unit=5}{weekday},{year}年{month?}月?{date?}{1},{month}月{date?}{1},{date}{1};{yyyy}年{M}月{d}日;前天,昨天,今天,明天,后天;,前,,后;,上|去,这,下|明"};e(k,D,F,{getMonth:function(t){return B.isNumber(t)?t-1:h(this.months,P(t,"i"),0,F,D)%12},k:function(t){return h(this.weekdays,P(t,"i"),0,F,D)%7},j:function(t){var e;return B.isNumber(t)?t:t&&-1!==(e=this.numbers.indexOf(t))?(e+1)%10:1},n:function(t){var e=this;return t.replace(this.numbers[9],"").replace(/./g,function(t){return e.j(t)})},m:function(t){return English.units[this.units.indexOf(t)%8]},q:function(t,e,n){var r,i;if(r=n>0?this.futureRelativeFormat:this.pastRelativeFormat,"ru"==this.code)switch(i=t.toString().slice(-1),D){case 1==i:i=1;break;case i>=2&&4>=i:i=2;break;default:i=3}else i=this.hasPlural&&t>1?1:0;return i=this.units[8*i+e]||this.units[e],this.capitalizeUnit&&(i=i.capitalize()),e=h(this.modifiers,function(t){return"sign"==t.name&&t.value==(n>0?1:-1)}),r.assign({num:t,unit:i,sign:e.text})}}),e(U,F,F,{create:function(){return R(arguments)},now:function(){return(new U).getTime()},setLocale:function(t,e){var n=S(t,F,e);return n?(Date.currentLocale=t,w(n),n):void 0},getLocale:function(t){return S(t,D)},addFormat:function(t,e,n,r){te.push({h:r,o:n,p:P("^"+t+"$","i"),to:e})}}),e(U,D,F,{set:function(){var t=j(arguments);return L(this,t[0],t[1])},setUTC:function(){var t=j(arguments);return L(this,t[0],t[1],D)},setWeekday:function(t){u(t)||this.setDate(this.getDate()+t-this.getDay())},setUTCWeekday:function(t){u(t)||this.setDate(this.getUTCDate()+t-this.getDay())},setWeek:function(t){u(t)||(this.setMonth(0),this.setDate(7*t+1))},setUTCWeek:function(t){u(t)||(this.setMonth(0),this.setUTCDate(7*t+1))},getWeek:function(){return M(this)},getUTCWeek:function(){return M(this.toUTC())},getUTCOffset:function(t){var e=this.g?0:this.getTimezoneOffset(),n=t===D?":":"";return!e&&t?"Z":v(-e/60).pad(2,D)+n+(e%60).pad(2)},toUTC:function(){if(this.g)return this;var t=this.clone().addMinutes(this.getTimezoneOffset());return t.g=D,t},isUTC:function(){return this.g||0===this.getTimezoneOffset()},advance:function(){var t=j(arguments);return L(this,t[0],F,F,1,D)},rewind:function(){var t=j(arguments);return L(this,t[0],F,F,-1)},isValid:function(){return!isNaN(this.getTime())},isAfter:function(t,e){return this.getTime()>U.create(t).getTime()-(e||0)},isBefore:function(t,e){return this.getTime()<U.create(t).getTime()+(e||0)},isBetween:function(t,e,n){var r=this.getTime();t=U.create(t).getTime();var i=U.create(e).getTime();return e=Math.min(t,i),t=Math.max(t,i),n=n||0,r>e-n&&t+n>r},isLeapYear:function(){var t=this.getFullYear();return 0===t%4&&0!==t%100||0===t%400},daysInMonth:function(){return 32-new U(this.getFullYear(),this.getMonth(),32).getDate()},format:function(t,e){return T(this,t,F,e)},relative:function(t,e){return B.isString(t)&&(e=t,t=null),T(this,t,D,e)},is:function(t,e){var n;if(B.isString(t))switch(t=t.trim().toLowerCase(),D){case"future"===t:return this.getTime()>(new U).getTime();case"past"===t:return this.getTime()<(new U).getTime();case"weekday"===t:return this.getDay()>0&&this.getDay()<6;case"weekend"===t:return 0===this.getDay()||6===this.getDay();case(n=English.weekdays.indexOf(t)%7)>-1:return this.getDay()===n;case(n=English.months.indexOf(t)%12)>-1:return this.getMonth()===n}return I(this,t,e)},resetTime:function(){return this.set({hour:0,minute:0,second:0,millisecond:0})},clone:function(){return new U(this.getTime())},compare:function(){return this-R(arguments)}}),e(U,D,F,{getWeekday:U.prototype.getDay,getUTCWeekday:U.prototype.getUTCDay}),function(){var t={};f(["Array","Boolean","Date","Function","Number","String","RegExp"],function(e){t["is"+e]=function(t){return B.prototype.toString.call(t)==="[object "+e+"]"}}),e(Object,F,F,t)}(),function(){var t=x().match(/^\s+$/);try{J.prototype.trim.call([1])}catch(n){t=F}var r=P("^["+x()+"]+"),i=P("["+x()+"]+$");e(J,D,!t,{trim:function(){return this.toString().trimLeft().trimRight()},trimLeft:function(){return this.replace(r,"")},trimRight:function(){return this.replace(i,"")}})}(),English=U.setLocale("en"),f(re,function(t,e){var n=t.a,i=n.capitalize(),o=t.c();r(U.prototype,n+"sSince",function(t,e){return v((this.getTime()-U.create(t,e).getTime())/o)}),r(U.prototype,n+"sUntil",function(t,e){return v((U.create(t,e).getTime()-this.getTime())/o)}),r(U.prototype,n+"sAgo",U.prototype[n+"sUntil"]),r(U.prototype,n+"sFromNow",U.prototype[n+"sSince"]),r(U.prototype,"add"+i+"s",function(t){var e={};return e[n]=t,this.advance(e)}),b(n,o),3>e&&f(["Last","This","Next"],function(t){r(U.prototype,"is"+t+i,function(){return this.is(t+" "+n)})}),4>e&&(r(U.prototype,"beginningOf"+i,function(){var t={};switch(n){case"year":t.year=this.getFullYear();break;case"month":t.month=this.getMonth();break;case"day":t.day=this.getDate();break;case"week":t.weekday=0}return this.set(t,D)}),r(U.prototype,"endOf"+i,function(){var t={hours:23,minutes:59,seconds:59,milliseconds:999};switch(n){case"year":t.month=11,t.day=31;break;case"month":t.day=this.daysInMonth();break;case"week":t.weekday=6}return this.set(t,D)}))}),function(){$=re.concat(),$.splice(2,1),G=re.concat().reverse();var t="\\d{1,2}|"+English.months.join("|");f(ee,function(e){U.addFormat(e.src.replace(/\{month\}/,t)+(e.r===F?"":Y),e.to.concat(X),"en",e.h)}),U.addFormat(V,X)}(),function(){var t=English.weekdays.slice(0,7),e=English.months.slice(0,12);f(["today","yesterday","tomorrow","weekday","weekend","future","past"].concat(t).concat(e),function(t){r(U.prototype,"is"+t.capitalize(),function(){return this.is(t)})})}(),e(U,F,D,{DSTOffset:1e3*60*(new U(2e3,6,1).getTimezoneOffset()-new U(2e3,0,1).getTimezoneOffset()),INTERNATIONAL_TIME:"{h}:{mm}:{ss}",RFC1123:"{Dow}, {dd} {Mon} {yyyy} {HH}:{mm}:{ss} {tz}",RFC1036:"{Weekday}, {dd}-{Mon}-{yy} {HH}:{mm}:{ss} {tz}",ISO8601_DATE:"{yyyy}-{MM}-{dd}",ISO8601_DATETIME:"{yyyy}-{MM}-{dd}T{HH}:{mm}:{ss}.{fff}{isotz}"}),function(){var t=new U(U.UTC(1999,11,31));t.toISOString&&"1999-12-31T00:00:00.000Z"===t.toISOString()||e(U,D,D,{toISOString:function(){return T(this.toUTC(),U.ISO8601_DATETIME)}}),t.toJSON&&"1999-12-31T00:00:00.000Z"===t.toJSON()||e(U,D,D,{toJSON:U.prototype.toISOString}),e(U,D,F,{iso:U.prototype.toISOString})}()}(this),$("head").prepend(['<link rel="stylesheet" href="/style.css">'].join("")),$(function(){require("app").launch()}),function(){if(!this.require){var t={},e={},n=function(o,s){var a,u=r(s,o),c=e[u];if(c)return c.exports;if(!(a=t[u]||t[u=r(u,"./index")]))throw"module '"+o+"' not found";c={id:u,exports:{}};try{return e[u]=c,a(c.exports,function(t){return n(t,i(u))},c),c.exports}catch(l){throw delete e[u],l}},r=function(t,e){var n,r,i=[];n=/^\.\.?(\/|$)/.test(e)?[t,e].join("/").split("/"):e.split("/");for(var o=0,s=n.length;s>o;o++)r=n[o],".."==r?i.pop():"."!=r&&""!=r&&i.push(r);return i.join("/")},i=function(t){return t.split("/").slice(0,-1).join("/")};this.require=function(t){return n(t,"")},this.require.define=function(e){for(var n in e)t[n]=e[n]}}return this.require.define}.call(this)({andlog:function(t,e,n){!function(e){var r=e.localStorage,i={},o="undefined"!=typeof process;if(o)return n.exports=console,void 0;if(r&&r.debug&&e.console)i=e.console;else for(var s="assert,count,debug,dir,dirxml,error,exception,group,groupCollapsed,groupEnd,info,log,markTimeline,profile,profileEnd,time,timeEnd,trace,warn".split(","),a=s.length,u=function(){};a--;)i[s[a]]=u;"undefined"!=typeof t?n.exports=i:e.console=i}(this)},backbone:function(t,e){!function(){var n,r=this,i=r.Backbone,o=[],s=o.push,a=o.slice,u=o.splice;n="undefined"!=typeof t?t:r.Backbone={},n.VERSION="1.0.0";var c=r._;c||"undefined"==typeof e||(c=e("underscore")),n.$=r.jQuery||r.Zepto||r.ender||r.$,n.noConflict=function(){return r.Backbone=i,this},n.emulateHTTP=!1,n.emulateJSON=!1;var l=n.Events={on:function(t,e,n){if(!h(this,"on",t,[e,n])||!e)return this;this._events||(this._events={});var r=this._events[t]||(this._events[t]=[]);return r.push({callback:e,context:n,ctx:n||this}),this},once:function(t,e,n){if(!h(this,"once",t,[e,n])||!e)return this;var r=this,i=c.once(function(){r.off(t,i),e.apply(this,arguments)});return i._callback=e,this.on(t,i,n)},off:function(t,e,n){var r,i,o,s,a,u,l,f;if(!this._events||!h(this,"off",t,[e,n]))return this;if(!t&&!e&&!n)return this._events={},this;for(s=t?[t]:c.keys(this._events),a=0,u=s.length;u>a;a++)if(t=s[a],o=this._events[t]){if(this._events[t]=r=[],e||n)for(l=0,f=o.length;f>l;l++)i=o[l],(e&&e!==i.callback&&e!==i.callback._callback||n&&n!==i.context)&&r.push(i);r.length||delete this._events[t]}return this},trigger:function(t){if(!this._events)return this;var e=a.call(arguments,1);if(!h(this,"trigger",t,e))return this;var n=this._events[t],r=this._events.all;return n&&p(n,e),r&&p(r,arguments),this},stopListening:function(t,e,n){var r=this._listeners;if(!r)return this;var i=!e&&!n;"object"==typeof e&&(n=this),t&&((r={})[t._listenerId]=t);for(var o in r)r[o].off(e,n,this),i&&delete this._listeners[o];return this}},f=/\s+/,h=function(t,e,n,r){if(!n)return!0;if("object"==typeof n){for(var i in n)t[e].apply(t,[i,n[i]].concat(r));return!1}if(f.test(n)){for(var o=n.split(f),s=0,a=o.length;a>s;s++)t[e].apply(t,[o[s]].concat(r));return!1}return!0},p=function(t,e){var n,r=-1,i=t.length,o=e[0],s=e[1],a=e[2];switch(e.length){case 0:for(;++r<i;)(n=t[r]).callback.call(n.ctx);return;case 1:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o);return;case 2:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s);return;case 3:for(;++r<i;)(n=t[r]).callback.call(n.ctx,o,s,a);return;default:for(;++r<i;)(n=t[r]).callback.apply(n.ctx,e)}},d={listenTo:"on",listenToOnce:"once"};c.each(d,function(t,e){l[e]=function(e,n,r){var i=this._listeners||(this._listeners={}),o=e._listenerId||(e._listenerId=c.uniqueId("l"));return i[o]=e,"object"==typeof n&&(r=this),e[t](n,r,this),this}}),l.bind=l.on,l.unbind=l.off,c.extend(n,l);var g=n.Model=function(t,e){var n,r=t||{};e||(e={}),this.cid=c.uniqueId("c"),this.attributes={},c.extend(this,c.pick(e,m)),e.parse&&(r=this.parse(r,e)||{}),(n=c.result(this,"defaults"))&&(r=c.defaults({},r,n)),this.set(r,e),this.changed={},this.initialize.apply(this,arguments)},m=["url","urlRoot","collection"];c.extend(g.prototype,l,{changed:null,validationError:null,idAttribute:"id",initialize:function(){},toJSON:function(){return c.clone(this.attributes)},sync:function(){return n.sync.apply(this,arguments)},get:function(t){return this.attributes[t]},escape:function(t){return c.escape(this.get(t))},has:function(t){return null!=this.get(t)},set:function(t,e,n){var r,i,o,s,a,u,l,f;if(null==t)return this;if("object"==typeof t?(i=t,n=e):(i={})[t]=e,n||(n={}),!this._validate(i,n))return!1;o=n.unset,a=n.silent,s=[],u=this._changing,this._changing=!0,u||(this._previousAttributes=c.clone(this.attributes),this.changed={}),f=this.attributes,l=this._previousAttributes,this.idAttribute in i&&(this.id=i[this.idAttribute]);for(r in i)e=i[r],c.isEqual(f[r],e)||s.push(r),c.isEqual(l[r],e)?delete this.changed[r]:this.changed[r]=e,o?delete f[r]:f[r]=e;if(!a){s.length&&(this._pending=!0);for(var h=0,p=s.length;p>h;h++)this.trigger("change:"+s[h],this,f[s[h]],n)}if(u)return this;if(!a)for(;this._pending;)this._pending=!1,this.trigger("change",this,n);return this._pending=!1,this._changing=!1,this},unset:function(t,e){return this.set(t,void 0,c.extend({},e,{unset:!0}))},clear:function(t){var e={};for(var n in this.attributes)e[n]=void 0;return this.set(e,c.extend({},t,{unset:!0}))},hasChanged:function(t){return null==t?!c.isEmpty(this.changed):c.has(this.changed,t)},changedAttributes:function(t){if(!t)return this.hasChanged()?c.clone(this.changed):!1;var e,n=!1,r=this._changing?this._previousAttributes:this.attributes;for(var i in t)c.isEqual(r[i],e=t[i])||((n||(n={}))[i]=e);return n},previous:function(t){return null!=t&&this._previousAttributes?this._previousAttributes[t]:null},previousAttributes:function(){return c.clone(this._previousAttributes)},fetch:function(t){t=t?c.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=this,n=t.success;return t.success=function(r){return e.set(e.parse(r,t),t)?(n&&n(e,r,t),e.trigger("sync",e,r,t),void 0):!1},B(this,t),this.sync("read",this,t)},save:function(t,e,n){var r,i,o,s=this.attributes;if(null==t||"object"==typeof t?(r=t,n=e):(r={})[t]=e,!(!r||n&&n.wait||this.set(r,n)))return!1;if(n=c.extend({validate:!0},n),!this._validate(r,n))return!1;r&&n.wait&&(this.attributes=c.extend({},s,r)),void 0===n.parse&&(n.parse=!0);var a=this,u=n.success;return n.success=function(t){a.attributes=s;var e=a.parse(t,n);return n.wait&&(e=c.extend(r||{},e)),c.isObject(e)&&!a.set(e,n)?!1:(u&&u(a,t,n),a.trigger("sync",a,t,n),void 0)},B(this,n),i=this.isNew()?"create":n.patch?"patch":"update","patch"===i&&(n.attrs=r),o=this.sync(i,this,n),r&&n.wait&&(this.attributes=s),o},destroy:function(t){t=t?c.clone(t):{};var e=this,n=t.success,r=function(){e.trigger("destroy",e,e.collection,t)};if(t.success=function(i){(t.wait||e.isNew())&&r(),n&&n(e,i,t),e.isNew()||e.trigger("sync",e,i,t)},this.isNew())return t.success(),!1;B(this,t);var i=this.sync("delete",this,t);return t.wait||r(),i},url:function(){var t=c.result(this,"urlRoot")||c.result(this.collection,"url")||F();return this.isNew()?t:t+("/"===t.charAt(t.length-1)?"":"/")+encodeURIComponent(this.id)},parse:function(t){return t},clone:function(){return new this.constructor(this.attributes)},isNew:function(){return null==this.id},isValid:function(t){return this._validate({},c.extend(t||{},{validate:!0}))},_validate:function(t,e){if(!e.validate||!this.validate)return!0;t=c.extend({},this.attributes,t);var n=this.validationError=this.validate(t,e)||null;return n?(this.trigger("invalid",this,n,c.extend(e||{},{validationError:n})),!1):!0}});var v=["keys","values","pairs","invert","pick","omit"];c.each(v,function(t){g.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.attributes),c[t].apply(c,e)}});var y=n.Collection=function(t,e){e||(e={}),e.url&&(this.url=e.url),e.model&&(this.model=e.model),void 0!==e.comparator&&(this.comparator=e.comparator),this._reset(),this.initialize.apply(this,arguments),t&&this.reset(t,c.extend({silent:!0},e))},b={add:!0,remove:!0,merge:!0},x={add:!0,merge:!1,remove:!1};c.extend(y.prototype,l,{model:g,initialize:function(){},toJSON:function(t){return this.map(function(e){return e.toJSON(t)})},sync:function(){return n.sync.apply(this,arguments)},add:function(t,e){return this.set(t,c.defaults(e||{},x))},remove:function(t,e){t=c.isArray(t)?t.slice():[t],e||(e={});var n,r,i,o;for(n=0,r=t.length;r>n;n++)o=this.get(t[n]),o&&(delete this._byId[o.id],delete this._byId[o.cid],i=this.indexOf(o),this.models.splice(i,1),this.length--,e.silent||(e.index=i,o.trigger("remove",o,this,e)),this._removeReference(o));return this},set:function(t,e){e=c.defaults(e||{},b),e.parse&&(t=this.parse(t,e)),c.isArray(t)||(t=t?[t]:[]);var n,r,i,o,a,l=e.at,f=this.comparator&&null==l&&e.sort!==!1,h=c.isString(this.comparator)?this.comparator:null,p=[],d=[],g={};for(n=0,r=t.length;r>n;n++)(i=this._prepareModel(t[n],e))&&((o=this.get(i))?(e.remove&&(g[o.cid]=!0),e.merge&&(o.set(i.attributes,e),f&&!a&&o.hasChanged(h)&&(a=!0))):e.add&&(p.push(i),i.on("all",this._onModelEvent,this),this._byId[i.cid]=i,null!=i.id&&(this._byId[i.id]=i)));if(e.remove){for(n=0,r=this.length;r>n;++n)g[(i=this.models[n]).cid]||d.push(i);d.length&&this.remove(d,e)}if(p.length&&(f&&(a=!0),this.length+=p.length,null!=l?u.apply(this.models,[l,0].concat(p)):s.apply(this.models,p)),a&&this.sort({silent:!0}),e.silent)return this;for(n=0,r=p.length;r>n;n++)(i=p[n]).trigger("add",i,this,e);return a&&this.trigger("sort",this,e),this},reset:function(t,e){e||(e={});for(var n=0,r=this.models.length;r>n;n++)this._removeReference(this.models[n]);return e.previousModels=this.models,this._reset(),this.add(t,c.extend({silent:!0},e)),e.silent||this.trigger("reset",this,e),this},push:function(t,e){return t=this._prepareModel(t,e),this.add(t,c.extend({at:this.length},e)),t},pop:function(t){var e=this.at(this.length-1);return this.remove(e,t),e},unshift:function(t,e){return t=this._prepareModel(t,e),this.add(t,c.extend({at:0},e)),t},shift:function(t){var e=this.at(0);return this.remove(e,t),e},slice:function(t,e){return this.models.slice(t,e)},get:function(t){return null==t?void 0:this._byId[null!=t.id?t.id:t.cid||t]},at:function(t){return this.models[t]},where:function(t,e){return c.isEmpty(t)?e?void 0:[]:this[e?"find":"filter"](function(e){for(var n in t)if(t[n]!==e.get(n))return!1;return!0})},findWhere:function(t){return this.where(t,!0)},sort:function(t){if(!this.comparator)throw new Error("Cannot sort a set without a comparator");return t||(t={}),c.isString(this.comparator)||1===this.comparator.length?this.models=this.sortBy(this.comparator,this):this.models.sort(c.bind(this.comparator,this)),t.silent||this.trigger("sort",this,t),this},sortedIndex:function(t,e,n){e||(e=this.comparator);var r=c.isFunction(e)?e:function(t){return t.get(e)};return c.sortedIndex(this.models,t,r,n)},pluck:function(t){return c.invoke(this.models,"get",t)},fetch:function(t){t=t?c.clone(t):{},void 0===t.parse&&(t.parse=!0);var e=t.success,n=this;return t.success=function(r){var i=t.reset?"reset":"set";n[i](r,t),e&&e(n,r,t),n.trigger("sync",n,r,t)},B(this,t),this.sync("read",this,t)},create:function(t,e){if(e=e?c.clone(e):{},!(t=this._prepareModel(t,e)))return!1;e.wait||this.add(t,e);var n=this,r=e.success;return e.success=function(i){e.wait&&n.add(t,e),r&&r(t,i,e)},t.save(null,e),t},parse:function(t){return t},clone:function(){return new this.constructor(this.models)},_reset:function(){this.length=0,this.models=[],this._byId={}},_prepareModel:function(t,e){if(t instanceof g)return t.collection||(t.collection=this),t;e||(e={}),e.collection=this;var n=new this.model(t,e);return n._validate(t,e)?n:(this.trigger("invalid",this,t,e),!1)},_removeReference:function(t){this===t.collection&&delete t.collection,t.off("all",this._onModelEvent,this)},_onModelEvent:function(t,e,n,r){("add"!==t&&"remove"!==t||n===this)&&("destroy"===t&&this.remove(e,r),e&&t==="change:"+e.idAttribute&&(delete this._byId[e.previous(e.idAttribute)],null!=e.id&&(this._byId[e.id]=e)),this.trigger.apply(this,arguments))}});var w=["forEach","each","map","collect","reduce","foldl","inject","reduceRight","foldr","find","detect","filter","select","reject","every","all","some","any","include","contains","invoke","max","min","toArray","size","first","head","take","initial","rest","tail","drop","last","without","indexOf","shuffle","lastIndexOf","isEmpty","chain"];c.each(w,function(t){y.prototype[t]=function(){var e=a.call(arguments);return e.unshift(this.models),c[t].apply(c,e)}});var S=["groupBy","countBy","sortBy"];c.each(S,function(t){y.prototype[t]=function(e,n){var r=c.isFunction(e)?e:function(t){return t.get(e)};return c[t](this.models,r,n)}});var _=n.View=function(t){this.cid=c.uniqueId("view"),this._configure(t||{}),this._ensureElement(),this.initialize.apply(this,arguments),this.delegateEvents()},E=/^(\S+)\s*(.*)$/,N=["model","collection","el","id","attributes","className","tagName","events"];c.extend(_.prototype,l,{tagName:"div",$:function(t){return this.$el.find(t)},initialize:function(){},render:function(){return this},remove:function(){return this.$el.remove(),this.stopListening(),this},setElement:function(t,e){return this.$el&&this.undelegateEvents(),this.$el=t instanceof n.$?t:n.$(t),this.el=this.$el[0],e!==!1&&this.delegateEvents(),this},delegateEvents:function(t){if(!t&&!(t=c.result(this,"events")))return this;this.undelegateEvents();for(var e in t){var n=t[e];if(c.isFunction(n)||(n=this[t[e]]),n){var r=e.match(E),i=r[1],o=r[2];n=c.bind(n,this),i+=".delegateEvents"+this.cid,""===o?this.$el.on(i,n):this.$el.on(i,o,n)
|
||
}}return this},undelegateEvents:function(){return this.$el.off(".delegateEvents"+this.cid),this},_configure:function(t){this.options&&(t=c.extend({},c.result(this,"options"),t)),c.extend(this,c.pick(t,N)),this.options=t},_ensureElement:function(){if(this.el)this.setElement(c.result(this,"el"),!1);else{var t=c.extend({},c.result(this,"attributes"));this.id&&(t.id=c.result(this,"id")),this.className&&(t["class"]=c.result(this,"className"));var e=n.$("<"+c.result(this,"tagName")+">").attr(t);this.setElement(e,!1)}}}),n.sync=function(t,e,r){var i=k[t];c.defaults(r||(r={}),{emulateHTTP:n.emulateHTTP,emulateJSON:n.emulateJSON});var o={type:i,dataType:"json"};if(r.url||(o.url=c.result(e,"url")||F()),null!=r.data||!e||"create"!==t&&"update"!==t&&"patch"!==t||(o.contentType="application/json",o.data=JSON.stringify(r.attrs||e.toJSON(r))),r.emulateJSON&&(o.contentType="application/x-www-form-urlencoded",o.data=o.data?{model:o.data}:{}),r.emulateHTTP&&("PUT"===i||"DELETE"===i||"PATCH"===i)){o.type="POST",r.emulateJSON&&(o.data._method=i);var s=r.beforeSend;r.beforeSend=function(t){return t.setRequestHeader("X-HTTP-Method-Override",i),s?s.apply(this,arguments):void 0}}"GET"===o.type||r.emulateJSON||(o.processData=!1),"PATCH"!==o.type||!window.ActiveXObject||window.external&&window.external.msActiveXFilteringEnabled||(o.xhr=function(){return new ActiveXObject("Microsoft.XMLHTTP")});var a=r.xhr=n.ajax(c.extend(o,r));return e.trigger("request",e,a,r),a};var k={create:"POST",update:"PUT",patch:"PATCH","delete":"DELETE",read:"GET"};n.ajax=function(){return n.$.ajax.apply(n.$,arguments)};var j=n.Router=function(t){t||(t={}),t.routes&&(this.routes=t.routes),this._bindRoutes(),this.initialize.apply(this,arguments)},A=/\((.*?)\)/g,O=/(\(\?)?:\w+/g,C=/\*\w+/g,T=/[\-{}\[\]+?.,\\\^$|#\s]/g;c.extend(j.prototype,l,{initialize:function(){},route:function(t,e,r){c.isRegExp(t)||(t=this._routeToRegExp(t)),c.isFunction(e)&&(r=e,e=""),r||(r=this[e]);var i=this;return n.history.route(t,function(o){var s=i._extractParameters(t,o);r&&r.apply(i,s),i.trigger.apply(i,["route:"+e].concat(s)),i.trigger("route",e,s),n.history.trigger("route",i,e,s)}),this},navigate:function(t,e){return n.history.navigate(t,e),this},_bindRoutes:function(){if(this.routes){this.routes=c.result(this,"routes");for(var t,e=c.keys(this.routes);null!=(t=e.pop());)this.route(t,this.routes[t])}},_routeToRegExp:function(t){return t=t.replace(T,"\\$&").replace(A,"(?:$1)?").replace(O,function(t,e){return e?t:"([^/]+)"}).replace(C,"(.*?)"),new RegExp("^"+t+"$")},_extractParameters:function(t,e){var n=t.exec(e).slice(1);return c.map(n,function(t){return t?decodeURIComponent(t):null})}});var I=n.History=function(){this.handlers=[],c.bindAll(this,"checkUrl"),"undefined"!=typeof window&&(this.location=window.location,this.history=window.history)},L=/^[#\/]|\s+$/g,M=/^\/+|\/+$/g,q=/msie [\w.]+/,R=/\/$/;I.started=!1,c.extend(I.prototype,l,{interval:50,getHash:function(t){var e=(t||this).location.href.match(/#(.*)$/);return e?e[1]:""},getFragment:function(t,e){if(null==t)if(this._hasPushState||!this._wantsHashChange||e){t=this.location.pathname;var n=this.root.replace(R,"");t.indexOf(n)||(t=t.substr(n.length))}else t=this.getHash();return t.replace(L,"")},start:function(t){if(I.started)throw new Error("Backbone.history has already been started");I.started=!0,this.options=c.extend({},{root:"/"},this.options,t),this.root=this.options.root,this._wantsHashChange=this.options.hashChange!==!1,this._wantsPushState=!!this.options.pushState,this._hasPushState=!!(this.options.pushState&&this.history&&this.history.pushState);var e=this.getFragment(),r=document.documentMode,i=q.exec(navigator.userAgent.toLowerCase())&&(!r||7>=r);this.root=("/"+this.root+"/").replace(M,"/"),i&&this._wantsHashChange&&(this.iframe=n.$('<iframe src="javascript:0" tabindex="-1" />').hide().appendTo("body")[0].contentWindow,this.navigate(e)),this._hasPushState?n.$(window).on("popstate",this.checkUrl):this._wantsHashChange&&"onhashchange"in window&&!i?n.$(window).on("hashchange",this.checkUrl):this._wantsHashChange&&(this._checkUrlInterval=setInterval(this.checkUrl,this.interval)),this.fragment=e;var o=this.location,s=o.pathname.replace(/[^\/]$/,"$&/")===this.root;return this._wantsHashChange&&this._wantsPushState&&!this._hasPushState&&!s?(this.fragment=this.getFragment(null,!0),this.location.replace(this.root+this.location.search+"#"+this.fragment),!0):(this._wantsPushState&&this._hasPushState&&s&&o.hash&&(this.fragment=this.getHash().replace(L,""),this.history.replaceState({},document.title,this.root+this.fragment+o.search)),this.options.silent?void 0:this.loadUrl())},stop:function(){n.$(window).off("popstate",this.checkUrl).off("hashchange",this.checkUrl),clearInterval(this._checkUrlInterval),I.started=!1},route:function(t,e){this.handlers.unshift({route:t,callback:e})},checkUrl:function(){var t=this.getFragment();return t===this.fragment&&this.iframe&&(t=this.getFragment(this.getHash(this.iframe))),t===this.fragment?!1:(this.iframe&&this.navigate(t),this.loadUrl()||this.loadUrl(this.getHash()),void 0)},loadUrl:function(t){var e=this.fragment=this.getFragment(t),n=c.any(this.handlers,function(t){return t.route.test(e)?(t.callback(e),!0):void 0});return n},navigate:function(t,e){if(!I.started)return!1;if(e&&e!==!0||(e={trigger:e}),t=this.getFragment(t||""),this.fragment!==t){this.fragment=t;var n=this.root+t;if(this._hasPushState)this.history[e.replace?"replaceState":"pushState"]({},document.title,n);else{if(!this._wantsHashChange)return this.location.assign(n);this._updateHash(this.location,t,e.replace),this.iframe&&t!==this.getFragment(this.getHash(this.iframe))&&(e.replace||this.iframe.document.open().close(),this._updateHash(this.iframe.location,t,e.replace))}e.trigger&&this.loadUrl(t)}},_updateHash:function(t,e,n){if(n){var r=t.href.replace(/(javascript:|#).*$/,"");t.replace(r+"#"+e)}else t.hash="#"+e}}),n.history=new I;var D=function(t,e){var n,r=this;n=t&&c.has(t,"constructor")?t.constructor:function(){return r.apply(this,arguments)},c.extend(n,r,e);var i=function(){this.constructor=n};return i.prototype=r.prototype,n.prototype=new i,t&&c.extend(n.prototype,t),n.__super__=r.prototype,n};g.extend=y.extend=j.extend=_.extend=I.extend=D;var F=function(){throw new Error('A "url" property or function must be specified')},B=function(t,e){var n=e.error;e.error=function(r){n&&n(t,r,e),t.trigger("error",t,r,e)}}}.call(this)},"cookie-getter":function(t,e,n){n.exports=function(t){var e,n=document.cookie,r=n.indexOf(t+"="),i=n.indexOf(";",r);return~r?(e=decodeURIComponent(n.substring(r,~i?i:void 0).split("=")[1]),"{"===e.charAt(0)?JSON.parse(e):e):null}},fluidGrid:function(t,e,n){!function(){function e(t){return function(e){i(t,e)}}function r(t,e){var e=e||.75,n=t.width*e;return n>t.height?{height:t.height,width:t.height/e}:{width:t.width,height:t.width*e}}function i(t,e){var n,i,s,a,u,c,l,f,h,p,d,g,m=Math.floor,v=$(t),y=v.length,b=function(){var t=!!v.find(".focused").length;return t&&y>1?y-1:t&&1===y?1:y}(),x=window.innerWidth,w=window.innerHeight-140,S=x,_=w,E=15;if(e&&(o=$(e)[0]),o&&!$(o).parent().length&&(o=void 0),g=o&&b>1,v.height(_),g)n=b-1,i=1,_=.2*w;else{if(0===b)return;1===b?(n=1,i=1):2===b?S>_?(n=2,i=1):(n=1,i=2):3===b?S>_?(n=3,i=1):(n=1,i=3):4===b?(n=2,i=2):5===b?(n=3,i=2):6===b&&(S>_?(n=3,i=2):(n=2,i=3))}if(u=r({width:S/n,height:_/i}),s=n-1,a=i-1,c=u.width*n,l=function(){var t=c-E*s;return t/n}(),f=(S-c)/2,h=u.height-(i>1?E/i:0),p=i*h,d=(_-p)/2,g&&(v=v.not(".focused")),v.each(function(t){var e=t,r=m(e/n),i=e%n,o=12,s=function(){if(3===n){if(0===i)return 1;if(1===i)return 0;if(2===i)return-1}else{if(2===n)return o=5,1==i?-1:1;if(1===n)return 0}}(),a="rotateY("+s*o+"deg)";0===s&&(a+=" scale(.98)");var c;c=g?.8*w+d+"px":r*u.height+d+"px",$(this).css({top:c,left:i*u.width+f+"px",width:l+"px",height:h+"px",position:"absolute"})}),g){var N=r({height:.8*w,width:x},o.videoHeight/o.videoWidth);$(o).css({top:0,height:N.height-d,width:N.width,left:x/2-N.width/2})}}var o;"undefined"!=typeof t?n.exports=e:window.getFluidGridFunction=e}()},"image-to-data-uri":function(t,e,n){n.exports=function(t,e){var n=document.createElement("canvas"),r=document.createElement("img");r.onload=function(){var t=n.getContext("2d");n.width=r.width,n.height=r.height,t.drawImage(r,0,0),e(n.toDataURL("image/png"))},r.ononerror=function(){e(new Error("FailedToLoadImage"))},n.getContext?r.src=t:e(new Error("CanvasIsNotSupported"))}},slugger:function(t,e,n){!function(){function t(t,n){var i=n&&n.maintainCase||!1,o=n&&n.replacement||"-";return"string"!=typeof t?"":(i||(t=t.toLowerCase()),t.replace(r,"").replace(e,o))}var e=/\s+/g,r=/[^A-Za-z0-9_ \-]/g;"undefined"!=typeof n?n.exports=t:window.slugger=t}()},"sound-effect-manager":function(t,e,n){!function(){function t(){this.support=!!window.webkitAudioContext,this.support&&(this.context=new webkitAudioContext),this.sounds={}}var e=this;t.prototype.loadFile=function(t,e,n,r){this.support?this._loadWebAudioFile(t,e,n,r):this._loadWaveFile(t.replace(".mp3",".wav"),e,n,3,r)},t.prototype._loadWebAudioFile=function(t,e,n,r){if(this.support){var i=this,o=new XMLHttpRequest;o.open("GET",t,!0),o.responseType="arraybuffer",o.onload=function(){i.sounds[e]=i.context.createBuffer(o.response,!0),r&&r()},setTimeout(function(){o.send()},n||0)}},t.prototype._loadWaveFile=function(t,e,n,r,i){var o=this,s=r||3;setTimeout(function(){var n,r=0;for(o.sounds[e]=[];s>r;)n=new Audio,n.src=t,0===r&&i&&n.addEventListener("canplaythrough",i,!1),n.load(),o.sounds[e][r++]=n},n||0)},t.prototype._playWebAudio=function(t){var e,n=this.sounds[t];n&&(e=this.context.createBufferSource(),e.buffer=n,e.connect(this.context.destination),e.noteOn(0))},t.prototype._playWavAudio=function(t,e){var n,r=this.sounds[t],i=r&&r.length||0,o=0;if(r)for(;i>o;){if(n=r[o++],n.error)return;if(0===n.currentTime||n.currentTime===n.duration)return n.currentTime=0,n.loop=!!e,o=i,n.play()}},t.prototype.play=function(t,e){return this.support?(this._playWebAudio(t,e),void 0):this._playWavAudio(t,e)},t.prototype.stop=function(t){if(this.support);else for(var e,n=this.sounds[t],r=n&&n.length||0,i=0;r>i;)e=n[i++],e.pause(),e.currentTime=0},"undefined"!=typeof n?n.exports=t:"function"==typeof e.define&&define.amd?e.define(t):e.SoundEffectManager=t}()},strictmodel:function(t,e){!function(){"use strict";var n=this,r="undefined"!=typeof t?t:n.Strict={};Object.prototype.toString,Array.prototype.slice,r.VERSION="0.0.1";var i=n._;i||"undefined"==typeof e||(i=e("underscore"));var o=n.Backbone;o||"undefined"==typeof e||(o=e("backbone")),o.Collection.prototype._prepareModel=function(t,e){if(t instanceof r.Model)return t.collection||(t.collection=this),t;e||(e={}),e.collection=this;var n=new this.model(t,e);return n._validate(t,e)?n:(this.trigger("invalid",this,t,e),!1)};var s=function(){},a=function(t,e,n){var r;return r=e&&e.hasOwnProperty("constructor")?e.constructor:function(){return t.apply(this,arguments)},i.extend(r,t),s.prototype=t.prototype,r.prototype=new s,e&&i.extend(r.prototype,e),n&&i.extend(r,n),r.prototype.constructor=r,r.__super__=t.prototype,r},u=function(t,e){var n=a(this,t,e);return n.extend=this.extend,n},c=r.Mixins={define:function(t,e){Object.defineProperty(this,t,e)},defineGetter:function(t,e){this.define(t,{get:e.bind(this)})},defineSetter:function(t,e){this.define(t,{set:e.bind(this)})}},l=r.Registry=function(){this._cache={},this._namespaces={}};i.extend(l.prototype,{_getCache:function(t){return t?(this._namespaces[t]||(this._namespaces[t]={}),this._namespaces[t]):this._cache},lookup:function(t,e,n){var r=this._getCache(n);return r&&r[t+e]},store:function(t){var e=this._getCache(t._namespace),n=t.type+t.id;return e[n]=e[n]||t,this},remove:function(t,e,n){var r=this._getCache(n);return this.lookup.apply(this,arguments)?(delete r[t+e],!0):!1},clear:function(){this._cache={},this._namespaces={}}}),r.registry=new l;var f=r.Model=function(t,e){t=t||{},e=e||{};var n=i.defaults(e||{},{seal:!0});this._namespace=n.namespace,this._initted=!1,this._deps={},this._initProperties(),this._initCollections(),this._cache={},this._verifyRequired(),this.set(t,{silent:!0}),this.init.apply(this,arguments),t.id&&r.registry.store(this),this._previous=i.clone(this.attributes),this._initted=!0};i.extend(f.prototype,o.Events,c,{idAttribute:"id",idDefinition:{type:"number",setOnce:!0},init:function(){return this},remove:function(){return this.id&&r.registry.remove(this.type,this.id,this._namespace),this.trigger("remove",this),this.off(),this},set:function(t,e,n){var r,o,s,a,u,c,l,f=this,h=(f._changing,[]);f._changing=!0,i.isObject(t)||null===t?(c=t,n=e):(c={},c[t]=e),r=n||{};for(u in c){if(l=c[u],o=typeof l,s=l,a=this.definition[u]||{},"date"===a.type)if(i.isDate(l))o="date",s=l.valueOf();else try{s=new Date(parseInt(l,10)).valueOf(),o="date"}catch(p){o=typeof l}else"array"===a.type?o=i.isArray(l)?"array":typeof l:"object"===a.type&&"object"!=typeof l&&i.isUndefined(l)&&(s=null,o="object");if(a.type&&a.type!==o&&!a.required&&!i.isUndefined(l))throw new TypeError("Property '"+u+"' must be of type "+a.type+". Tried to set "+l);if(a.setOnce&&void 0!==a.value&&!i.isEqual(a.value,s))throw new TypeError("Property '"+t+"' can only be set once.");i.isEqual(a.value,s)||(f._previous&&(f._previous[u]=a.value),a.value=s,h.push(u))}i.each(h,function(t){r.silent||f.trigger("change:"+t,f,f[t]),(f._deps[t]||[]).forEach(function(t){delete f._cache[t],r.silent||f.trigger("change:"+t,f,f.derived[t])})}),h.length&&(r.silent||f.trigger("change",f))},get:function(t){return this[t]},addListVal:function(t,e,n){var r=i.clone(this[t])||[];return i(r).contains(e)||(r[n?"unshift":"push"](e),this[t]=r),this},previous:function(t){return t?this._previous[t]:i.clone(this._previous)},removeListVal:function(t,e){var n=i.clone(this[t])||[];return i(n).contains(e)&&(this[t]=i(n).without(e)),this},hasListVal:function(t,e){return i.contains(this[t]||[],e)},_initCollections:function(){var t;if(this.collections)for(t in this.collections)this[t]=new this.collections[t],this[t].parent=this},_verifyRequired:function(){var t=this.attributes;for(var e in this.definition)if(this.definition[e].required&&"undefined"==typeof t[e])return!1;return!0},_initProperties:function(){function t(t,e,n){var a=s[t]={};i.isString(e)?(r=o._ensureValidType(e),r&&(a.type=r)):(r=o._ensureValidType(e[0]||e.type),r&&(a.type=r),(e[1]||e.required)&&(a.required=!0),a.value=i.isUndefined(e[2])?e.default:e[2],n&&(a.session=!0),e.setOnce&&(a.setOnce=!0))}var e,n,r,o=this,s=this.definition={};this.cid=i.uniqueId("model");for(n in this.props)t(n,this.props[n]);for(e in this.session)t(e,this.session[e],!0);s.id?s[this.idAttribute].setOnce=!0:t(this.idAttribute,this.idDefinition),this._registerDerived(),this._createGettersSetters(),this.session&&Object.freeze(this.session),this.props&&Object.freeze(this.props)},_ensureValidType:function(t){return i.contains(["string","number","boolean","array","object","date"],t)?t:void 0},_validate:function(){return!0},_createGettersSetters:function(){var t,e,n,r=this;for(t in this.definition)e=this.definition[t],n={},n.set=function(t,e){return function(t){r.set(e,t)}}(e,t),n.get=function(t){return function(){return"undefined"!=typeof t.value?"date"===t.type?new Date(t.value):t.value:void 0}}(e),this.define(t,n);this.defineGetter("attributes",function(){var t={};for(var e in this.definition)t[e]=this[e];return t}),this.defineGetter("keys",function(){return Object.keys(this.attributes)}),this.defineGetter("json",function(){return JSON.stringify(this._getAttributes(!1,!0))}),this.defineGetter("derived",function(){var t={};for(var e in this._derived)t[e]=this._derived[e].fn.apply(this);return t}),this.defineGetter("toTemplate",function(){return i.extend(this._getAttributes(!0),this.derived)})},_getAttributes:function(t,e){var n={};for(var r in this.definition)t?n[r]=e?this.definition[r].value:this[r]:this.definition[r].session||(n[r]=e?this.definition[r].value:this[r]);return n},_registerDerived:function(){var t,e=this;if(this.derived){this._derived=this.derived;for(var n in this.derived)t=this.derived[n].deps||[],i.each(t,function(t){e._deps[t]=i(e._deps[t]||[]).union([n])}),this.define(n,{get:i.bind(function(t){return this._derived[t].cache?this._cache.hasOwnProperty(t)?this._cache[t]:this._cache[t]=this._derived[t].fn.apply(this):this._derived[t].fn.apply(this)},this,n),set:i.bind(function(t){var e=this._derived[t].deps,n='"'+t+"\" is a derived property, you can't set it directly.";throw e&&e.length?new TypeError(n+' It is dependent on "'+e.join('" and "')+'".'):new TypeError(n)},this,n)})}}}),r.Model.extend=u,o.Model=r.Model}.call(this)},strictview:function(t,e,n){var r=e("backbone"),i=e("underscore"),o=e("templates");n.exports=r.View.extend({handleBindings:function(){var t=this;return this.contentBindings&&i.each(this.contentBindings,function(e,n){var r=function(){var r=e.length>0?t.$(e):$(t.el);r.html(t.model[n])};t.listenTo(t.model,"change:"+n,r),r()}),this.imageBindings&&i.each(this.imageBindings,function(e,n){var r=function(){var r=e.length>0?t.$(e):$(t.el);r.attr("src",t.model[n])};t.listenTo(t.model,"change:"+n,r),r()}),this.hrefBindings&&i.each(this.hrefBindings,function(e,n){var r=function(){var r=e.length>0?t.$(e):$(t.el);r.attr("href",t.model[n])};t.listenTo(t.model,"change:"+n,r),r()}),this.classBindings&&i.each(this.classBindings,function(e,n){var r=function(){var r=t.model[n],o=t.model.previous(),s=i.isFunction(o)?o(n):o[n],a=e.length>0?t.$(e):$(t.el);i.isBoolean(r)?r?a.addClass(n):a.removeClass(n):(s&&a.removeClass(s),a.addClass(r))};t.listenTo(t.model,"change:"+n,r),r()}),this.inputBindings&&i.each(this.inputBindings,function(e,n){var r=function(){var r=e.length>0?t.$(e):$(t.el);r.val(t.model[n])};t.listenTo(t.model,"change:"+n,r),r()}),this},desist:function(t){t||(t={}),i.defaults(t,{quick:!1,animate:!0,speed:300,animationProps:{height:0,opacity:0}});var e=$(this.el),n=i.bind(this.remove,this);this.interval&&(clearInterval(this.interval),delete this.interval),t.quick?n():t.animate?e.animate(t.animationProps,{speed:t.speed,complete:n}):setTimeout(n,t.speed)},addReferences:function(t){for(var e in t)this["$"+e]=$(t[e],this.el)},basicRender:function(t){var e;t||(t={}),i.defaults(t,{templateFunc:"string"==typeof this.template?o[t.templateKey]:this.template,context:!1}),e=$(t.templateFunc(t.contex)),$(this.el).replaceWith(e),this.setElement(e),this.handleBindings(),this.delegateEvents()},subViewRender:function(t){t||(t={}),i.defaults(t,{placement:"append",templateFunc:"string"==typeof this.template?o[t.templateKey]:this.template});var e=(i.isFunction(this.model.toTemplate)?this.model.toTemplate():this.model.toTemplate,$(t.templateFunc(t.context))[0]);this.el.parentNode?$(this.el).replaceWith(e):$(this.containerEl)[t.placement](e),this.setElement(e),this.handleBindings()},bindomatic:function(t,e,n,r){var o=i.bind(n,this);this.listenTo(t,e,o),(r&&r.trigger||r===!0)&&o()},collectomatic:function(t,e,n,r){function o(t){var r=u.matchesFilters?u.matchesFilters(t):!0;r&&(a[t.cid]=new e(i({model:t}).extend(n)),a[t.cid].parent=u)}var s,a={},u=this;this.listenTo(t,"add",o),this.listenTo(t,"remove",function(t){a[t.cid]&&(a[t.cid].desist(r),delete a[t.cid])}),this.listenTo(t,"move",function(){i(a).each(function(t){t.desist({quick:!0})}),a={},t.each(o)}),s=function(){i(a).each(function(t){t.desist({quick:!0})}),a={},t.each(o)},this.listenTo(t,"refresh reset sort",s),s()}})},templates:function(exports,require,module){!function(){var root=this,exports={},jade=function(t){function e(t){return null!=t}return Array.isArray||(Array.isArray=function(t){return"[object Array]"==Object.prototype.toString.call(t)}),Object.keys||(Object.keys=function(t){var e=[];for(var n in t)t.hasOwnProperty(n)&&e.push(n);return e}),t.merge=function(t,n){var r=t["class"],i=n["class"];(r||i)&&(r=r||[],i=i||[],Array.isArray(r)||(r=[r]),Array.isArray(i)||(i=[i]),r=r.filter(e),i=i.filter(e),t["class"]=r.concat(i).join(" "));for(var o in n)"class"!=o&&(t[o]=n[o]);return t},t.attrs=function(e,n){var r=[],i=e.terse;delete e.terse;var o=Object.keys(e),s=o.length;if(s){r.push("");for(var a=0;s>a;++a){var u=o[a],c=e[u];"boolean"==typeof c||null==c?c&&(i?r.push(u):r.push(u+'="'+u+'"')):0==u.indexOf("data")&&"string"!=typeof c?r.push(u+"='"+JSON.stringify(c)+"'"):"class"==u&&Array.isArray(c)?r.push(u+'="'+t.escape(c.join(" "))+'"'):n&&n[u]?r.push(u+'="'+t.escape(c)+'"'):r.push(u+'="'+c+'"')}}return r.join(" ")},t.escape=function(t){return String(t).replace(/&(?!(\w+|\#\d+);)/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/"/g,""")},t.rethrow=function(t,e,n){if(!e)throw t;var r=3,i=require("fs").readFileSync(e,"utf8"),o=i.split("\n"),s=Math.max(n-r,0),a=Math.min(o.length,n+r),r=o.slice(s,a).map(function(t,e){var r=e+s+1;return(r==n?" > ":" ")+r+"| "+t}).join("\n");throw t.path=e,t.message=(e||"Jade")+":"+n+"\n"+r+"\n\n"+t.message,t},t}({});exports.dialogs={},exports.includes={},exports.pages={},exports.includes.contactListItem=function anonymous(locals){var buf=[];with(locals||{})buf.push('<li class="contact"><img'+jade.attrs({src:contact.avatar,"class":"avatar"},{src:!0})+'/><div class="name">'+jade.escape(null==(jade.interp=contact.displayName)?"":jade.interp)+'</div><div class="status">'+jade.escape(null==(jade.interp=contact.status)?"":jade.interp)+"</div></li>");return buf.join("")},exports.includes.contactListItemResource=function anonymous(locals){var buf=[];with(locals||{})buf.push('<li><p class="jid">'+jade.escape(null==(jade.interp=resource.jid)?"":jade.interp)+'</p><p class="status">'+jade.escape(null==(jade.interp=resource.status)?"":jade.interp)+"</p></li>");return buf.join("")},exports.includes.message=function anonymous(locals){var buf=[];with(locals||{})buf.push('<li><div class="message"><span class="timestamp">'+jade.escape(null==(jade.interp=message.created)?"":jade.interp)+'</span><p class="body">'+jade.escape(null==(jade.interp=message.body)?"":jade.interp)+"</p></div></li>");return buf.join("")},exports.layout=function anonymous(locals){var buf=[];with(locals||{})buf.push('<div class="wrap"><header></header><div id="me"><img class="avatar"/><p class="status"></p></div><section id="pages"></section><footer></footer></div>');return buf.join("")},exports.pages.info=function anonymous(locals){var buf=[];with(locals||{})buf.push('<section class="page info"><nav id="contactList"></nav><h1 class="name"></h1><ul id="conversation"></ul></section>');return buf.join("")},exports.pages.main=function anonymous(locals){var buf=[];with(locals||{})buf.push('<section class="page main"><nav id="contactList"></nav><div id="log"><h2>Event Log</h2></div></section>');return buf.join("")},exports.pages.wrapper=function anonymous(locals){var buf=[];with(locals||{})buf.push('<div class="page"></div>');return buf.join("")},"undefined"!=typeof module?module.exports=exports:"function"==typeof define&&define.amd?define(exports):root.templatizer=exports}()},underscore:function(t,e,n){!function(){var e=this,r=e._,i={},o=Array.prototype,s=Object.prototype,a=Function.prototype,u=o.push,c=o.slice,l=o.concat,f=s.toString,h=s.hasOwnProperty,p=o.forEach,d=o.map,g=o.reduce,m=o.reduceRight,v=o.filter,y=o.every,b=o.some,x=o.indexOf,w=o.lastIndexOf,S=Array.isArray,_=Object.keys,E=a.bind,N=function(t){return t instanceof N?t:this instanceof N?(this._wrapped=t,void 0):new N(t)};"undefined"!=typeof t?("undefined"!=typeof n&&n.exports&&(t=n.exports=N),t._=N):e._=N,N.VERSION="1.4.4";var k=N.each=N.forEach=function(t,e,n){if(null!=t)if(p&&t.forEach===p)t.forEach(e,n);else if(t.length===+t.length){for(var r=0,o=t.length;o>r;r++)if(e.call(n,t[r],r,t)===i)return}else for(var s in t)if(N.has(t,s)&&e.call(n,t[s],s,t)===i)return};N.map=N.collect=function(t,e,n){var r=[];return null==t?r:d&&t.map===d?t.map(e,n):(k(t,function(t,i,o){r[r.length]=e.call(n,t,i,o)}),r)};var j="Reduce of empty array with no initial value";N.reduce=N.foldl=N.inject=function(t,e,n,r){var i=arguments.length>2;if(null==t&&(t=[]),g&&t.reduce===g)return r&&(e=N.bind(e,r)),i?t.reduce(e,n):t.reduce(e);if(k(t,function(t,o,s){i?n=e.call(r,n,t,o,s):(n=t,i=!0)}),!i)throw new TypeError(j);return n},N.reduceRight=N.foldr=function(t,e,n,r){var i=arguments.length>2;if(null==t&&(t=[]),m&&t.reduceRight===m)return r&&(e=N.bind(e,r)),i?t.reduceRight(e,n):t.reduceRight(e);var o=t.length;if(o!==+o){var s=N.keys(t);o=s.length}if(k(t,function(a,u,c){u=s?s[--o]:--o,i?n=e.call(r,n,t[u],u,c):(n=t[u],i=!0)}),!i)throw new TypeError(j);return n},N.find=N.detect=function(t,e,n){var r;return A(t,function(t,i,o){return e.call(n,t,i,o)?(r=t,!0):void 0}),r},N.filter=N.select=function(t,e,n){var r=[];return null==t?r:v&&t.filter===v?t.filter(e,n):(k(t,function(t,i,o){e.call(n,t,i,o)&&(r[r.length]=t)}),r)},N.reject=function(t,e,n){return N.filter(t,function(t,r,i){return!e.call(n,t,r,i)},n)},N.every=N.all=function(t,e,n){e||(e=N.identity);var r=!0;return null==t?r:y&&t.every===y?t.every(e,n):(k(t,function(t,o,s){return(r=r&&e.call(n,t,o,s))?void 0:i}),!!r)};var A=N.some=N.any=function(t,e,n){e||(e=N.identity);var r=!1;return null==t?r:b&&t.some===b?t.some(e,n):(k(t,function(t,o,s){return r||(r=e.call(n,t,o,s))?i:void 0}),!!r)};N.contains=N.include=function(t,e){return null==t?!1:x&&t.indexOf===x?-1!=t.indexOf(e):A(t,function(t){return t===e})},N.invoke=function(t,e){var n=c.call(arguments,2),r=N.isFunction(e);return N.map(t,function(t){return(r?e:t[e]).apply(t,n)})},N.pluck=function(t,e){return N.map(t,function(t){return t[e]})},N.where=function(t,e,n){return N.isEmpty(e)?n?null:[]:N[n?"find":"filter"](t,function(t){for(var n in e)if(e[n]!==t[n])return!1;return!0})},N.findWhere=function(t,e){return N.where(t,e,!0)},N.max=function(t,e,n){if(!e&&N.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.max.apply(Math,t);if(!e&&N.isEmpty(t))return-1/0;var r={computed:-1/0,value:-1/0};return k(t,function(t,i,o){var s=e?e.call(n,t,i,o):t;s>=r.computed&&(r={value:t,computed:s})}),r.value},N.min=function(t,e,n){if(!e&&N.isArray(t)&&t[0]===+t[0]&&t.length<65535)return Math.min.apply(Math,t);if(!e&&N.isEmpty(t))return 1/0;var r={computed:1/0,value:1/0};return k(t,function(t,i,o){var s=e?e.call(n,t,i,o):t;s<r.computed&&(r={value:t,computed:s})}),r.value},N.shuffle=function(t){var e,n=0,r=[];return k(t,function(t){e=N.random(n++),r[n-1]=r[e],r[e]=t}),r};var O=function(t){return N.isFunction(t)?t:function(e){return e[t]}};N.sortBy=function(t,e,n){var r=O(e);return N.pluck(N.map(t,function(t,e,i){return{value:t,index:e,criteria:r.call(n,t,e,i)}}).sort(function(t,e){var n=t.criteria,r=e.criteria;if(n!==r){if(n>r||void 0===n)return 1;if(r>n||void 0===r)return-1}return t.index<e.index?-1:1}),"value")};var C=function(t,e,n,r){var i={},o=O(e||N.identity);return k(t,function(e,s){var a=o.call(n,e,s,t);r(i,a,e)}),i};N.groupBy=function(t,e,n){return C(t,e,n,function(t,e,n){(N.has(t,e)?t[e]:t[e]=[]).push(n)})},N.countBy=function(t,e,n){return C(t,e,n,function(t,e){N.has(t,e)||(t[e]=0),t[e]++})},N.sortedIndex=function(t,e,n,r){n=null==n?N.identity:O(n);for(var i=n.call(r,e),o=0,s=t.length;s>o;){var a=o+s>>>1;n.call(r,t[a])<i?o=a+1:s=a}return o},N.toArray=function(t){return t?N.isArray(t)?c.call(t):t.length===+t.length?N.map(t,N.identity):N.values(t):[]},N.size=function(t){return null==t?0:t.length===+t.length?t.length:N.keys(t).length},N.first=N.head=N.take=function(t,e,n){return null==t?void 0:null==e||n?t[0]:c.call(t,0,e)},N.initial=function(t,e,n){return c.call(t,0,t.length-(null==e||n?1:e))},N.last=function(t,e,n){return null==t?void 0:null==e||n?t[t.length-1]:c.call(t,Math.max(t.length-e,0))},N.rest=N.tail=N.drop=function(t,e,n){return c.call(t,null==e||n?1:e)},N.compact=function(t){return N.filter(t,N.identity)};var T=function(t,e,n){return k(t,function(t){N.isArray(t)?e?u.apply(n,t):T(t,e,n):n.push(t)}),n};N.flatten=function(t,e){return T(t,e,[])},N.without=function(t){return N.difference(t,c.call(arguments,1))},N.uniq=N.unique=function(t,e,n,r){N.isFunction(e)&&(r=n,n=e,e=!1);var i=n?N.map(t,n,r):t,o=[],s=[];return k(i,function(n,r){(e?r&&s[s.length-1]===n:N.contains(s,n))||(s.push(n),o.push(t[r]))}),o},N.union=function(){return N.uniq(l.apply(o,arguments))},N.intersection=function(t){var e=c.call(arguments,1);return N.filter(N.uniq(t),function(t){return N.every(e,function(e){return N.indexOf(e,t)>=0})})},N.difference=function(t){var e=l.apply(o,c.call(arguments,1));return N.filter(t,function(t){return!N.contains(e,t)})},N.zip=function(){for(var t=c.call(arguments),e=N.max(N.pluck(t,"length")),n=new Array(e),r=0;e>r;r++)n[r]=N.pluck(t,""+r);return n},N.object=function(t,e){if(null==t)return{};for(var n={},r=0,i=t.length;i>r;r++)e?n[t[r]]=e[r]:n[t[r][0]]=t[r][1];return n},N.indexOf=function(t,e,n){if(null==t)return-1;var r=0,i=t.length;if(n){if("number"!=typeof n)return r=N.sortedIndex(t,e),t[r]===e?r:-1;r=0>n?Math.max(0,i+n):n}if(x&&t.indexOf===x)return t.indexOf(e,n);for(;i>r;r++)if(t[r]===e)return r;return-1},N.lastIndexOf=function(t,e,n){if(null==t)return-1;var r=null!=n;if(w&&t.lastIndexOf===w)return r?t.lastIndexOf(e,n):t.lastIndexOf(e);for(var i=r?n:t.length;i--;)if(t[i]===e)return i;return-1},N.range=function(t,e,n){arguments.length<=1&&(e=t||0,t=0),n=arguments[2]||1;for(var r=Math.max(Math.ceil((e-t)/n),0),i=0,o=new Array(r);r>i;)o[i++]=t,t+=n;return o},N.bind=function(t,e){if(t.bind===E&&E)return E.apply(t,c.call(arguments,1));var n=c.call(arguments,2);return function(){return t.apply(e,n.concat(c.call(arguments)))}},N.partial=function(t){var e=c.call(arguments,1);return function(){return t.apply(this,e.concat(c.call(arguments)))}},N.bindAll=function(t){var e=c.call(arguments,1);return 0===e.length&&(e=N.functions(t)),k(e,function(e){t[e]=N.bind(t[e],t)}),t},N.memoize=function(t,e){var n={};return e||(e=N.identity),function(){var r=e.apply(this,arguments);return N.has(n,r)?n[r]:n[r]=t.apply(this,arguments)}},N.delay=function(t,e){var n=c.call(arguments,2);return setTimeout(function(){return t.apply(null,n)},e)},N.defer=function(t){return N.delay.apply(N,[t,1].concat(c.call(arguments,1)))},N.throttle=function(t,e){var n,r,i,o,s=0,a=function(){s=new Date,i=null,o=t.apply(n,r)};return function(){var u=new Date,c=e-(u-s);return n=this,r=arguments,0>=c?(clearTimeout(i),i=null,s=u,o=t.apply(n,r)):i||(i=setTimeout(a,c)),o}},N.debounce=function(t,e,n){var r,i;return function(){var o=this,s=arguments,a=function(){r=null,n||(i=t.apply(o,s))},u=n&&!r;return clearTimeout(r),r=setTimeout(a,e),u&&(i=t.apply(o,s)),i}},N.once=function(t){var e,n=!1;return function(){return n?e:(n=!0,e=t.apply(this,arguments),t=null,e)}},N.wrap=function(t,e){return function(){var n=[t];return u.apply(n,arguments),e.apply(this,n)}},N.compose=function(){var t=arguments;return function(){for(var e=arguments,n=t.length-1;n>=0;n--)e=[t[n].apply(this,e)];return e[0]}},N.after=function(t,e){return 0>=t?e():function(){return--t<1?e.apply(this,arguments):void 0}},N.keys=_||function(t){if(t!==Object(t))throw new TypeError("Invalid object");var e=[];for(var n in t)N.has(t,n)&&(e[e.length]=n);return e},N.values=function(t){var e=[];for(var n in t)N.has(t,n)&&e.push(t[n]);return e},N.pairs=function(t){var e=[];for(var n in t)N.has(t,n)&&e.push([n,t[n]]);return e},N.invert=function(t){var e={};for(var n in t)N.has(t,n)&&(e[t[n]]=n);return e},N.functions=N.methods=function(t){var e=[];for(var n in t)N.isFunction(t[n])&&e.push(n);return e.sort()},N.extend=function(t){return k(c.call(arguments,1),function(e){if(e)for(var n in e)t[n]=e[n]}),t},N.pick=function(t){var e={},n=l.apply(o,c.call(arguments,1));return k(n,function(n){n in t&&(e[n]=t[n])}),e},N.omit=function(t){var e={},n=l.apply(o,c.call(arguments,1));for(var r in t)N.contains(n,r)||(e[r]=t[r]);return e},N.defaults=function(t){return k(c.call(arguments,1),function(e){if(e)for(var n in e)null==t[n]&&(t[n]=e[n])}),t},N.clone=function(t){return N.isObject(t)?N.isArray(t)?t.slice():N.extend({},t):t},N.tap=function(t,e){return e(t),t};var I=function(t,e,n,r){if(t===e)return 0!==t||1/t==1/e;if(null==t||null==e)return t===e;
|
||
t instanceof N&&(t=t._wrapped),e instanceof N&&(e=e._wrapped);var i=f.call(t);if(i!=f.call(e))return!1;switch(i){case"[object String]":return t==String(e);case"[object Number]":return t!=+t?e!=+e:0==t?1/t==1/e:t==+e;case"[object Date]":case"[object Boolean]":return+t==+e;case"[object RegExp]":return t.source==e.source&&t.global==e.global&&t.multiline==e.multiline&&t.ignoreCase==e.ignoreCase}if("object"!=typeof t||"object"!=typeof e)return!1;for(var o=n.length;o--;)if(n[o]==t)return r[o]==e;n.push(t),r.push(e);var s=0,a=!0;if("[object Array]"==i){if(s=t.length,a=s==e.length)for(;s--&&(a=I(t[s],e[s],n,r)););}else{var u=t.constructor,c=e.constructor;if(u!==c&&!(N.isFunction(u)&&u instanceof u&&N.isFunction(c)&&c instanceof c))return!1;for(var l in t)if(N.has(t,l)&&(s++,!(a=N.has(e,l)&&I(t[l],e[l],n,r))))break;if(a){for(l in e)if(N.has(e,l)&&!s--)break;a=!s}}return n.pop(),r.pop(),a};N.isEqual=function(t,e){return I(t,e,[],[])},N.isEmpty=function(t){if(null==t)return!0;if(N.isArray(t)||N.isString(t))return 0===t.length;for(var e in t)if(N.has(t,e))return!1;return!0},N.isElement=function(t){return!(!t||1!==t.nodeType)},N.isArray=S||function(t){return"[object Array]"==f.call(t)},N.isObject=function(t){return t===Object(t)},k(["Arguments","Function","String","Number","Date","RegExp"],function(t){N["is"+t]=function(e){return f.call(e)=="[object "+t+"]"}}),N.isArguments(arguments)||(N.isArguments=function(t){return!(!t||!N.has(t,"callee"))}),"function"!=typeof/./&&(N.isFunction=function(t){return"function"==typeof t}),N.isFinite=function(t){return isFinite(t)&&!isNaN(parseFloat(t))},N.isNaN=function(t){return N.isNumber(t)&&t!=+t},N.isBoolean=function(t){return t===!0||t===!1||"[object Boolean]"==f.call(t)},N.isNull=function(t){return null===t},N.isUndefined=function(t){return void 0===t},N.has=function(t,e){return h.call(t,e)},N.noConflict=function(){return e._=r,this},N.identity=function(t){return t},N.times=function(t,e,n){for(var r=Array(t),i=0;t>i;i++)r[i]=e.call(n,i);return r},N.random=function(t,e){return null==e&&(e=t,t=0),t+Math.floor(Math.random()*(e-t+1))};var L={escape:{"&":"&","<":"<",">":">",'"':""","'":"'","/":"/"}};L.unescape=N.invert(L.escape);var M={escape:new RegExp("["+N.keys(L.escape).join("")+"]","g"),unescape:new RegExp("("+N.keys(L.unescape).join("|")+")","g")};N.each(["escape","unescape"],function(t){N[t]=function(e){return null==e?"":(""+e).replace(M[t],function(e){return L[t][e]})}}),N.result=function(t,e){if(null==t)return null;var n=t[e];return N.isFunction(n)?n.call(t):n},N.mixin=function(t){k(N.functions(t),function(e){var n=N[e]=t[e];N.prototype[e]=function(){var t=[this._wrapped];return u.apply(t,arguments),B.call(this,n.apply(N,t))}})};var q=0;N.uniqueId=function(t){var e=++q+"";return t?t+e:e},N.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var R=/(.)^/,D={"'":"'","\\":"\\","\r":"r","\n":"n"," ":"t","\u2028":"u2028","\u2029":"u2029"},F=/\\|'|\r|\n|\t|\u2028|\u2029/g;N.template=function(t,e,n){var r;n=N.defaults({},n,N.templateSettings);var i=new RegExp([(n.escape||R).source,(n.interpolate||R).source,(n.evaluate||R).source].join("|")+"|$","g"),o=0,s="__p+='";t.replace(i,function(e,n,r,i,a){return s+=t.slice(o,a).replace(F,function(t){return"\\"+D[t]}),n&&(s+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'"),r&&(s+="'+\n((__t=("+r+"))==null?'':__t)+\n'"),i&&(s+="';\n"+i+"\n__p+='"),o=a+e.length,e}),s+="';\n",n.variable||(s="with(obj||{}){\n"+s+"}\n"),s="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+s+"return __p;\n";try{r=new Function(n.variable||"obj","_",s)}catch(a){throw a.source=s,a}if(e)return r(e,N);var u=function(t){return r.call(this,t,N)};return u.source="function("+(n.variable||"obj")+"){\n"+s+"}",u},N.chain=function(t){return N(t).chain()};var B=function(t){return this._chain?N(t).chain():t};N.mixin(N),k(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var e=o[t];N.prototype[t]=function(){var n=this._wrapped;return e.apply(n,arguments),"shift"!=t&&"splice"!=t||0!==n.length||delete n[0],B.call(this,n)}}),k(["concat","join","slice"],function(t){var e=o[t];N.prototype[t]=function(){return B.call(this,e.apply(this._wrapped,arguments))}}),N.extend(N.prototype,{chain:function(){return this._chain=!0,this},value:function(){return this._wrapped}})}.call(this)},wildemitter:function(t,e,n){function r(){this.callbacks={}}n.exports=r,r.prototype.on=function(t){var e=3===arguments.length,n=e?arguments[1]:void 0,r=e?arguments[2]:arguments[1];return r._groupName=n,(this.callbacks[t]=this.callbacks[t]||[]).push(r),this},r.prototype.once=function(t){function e(){n.off(t,e),o.apply(this,arguments)}var n=this,r=3===arguments.length,i=r?arguments[1]:void 0,o=r?arguments[2]:arguments[1];return this.on(t,i,e),this},r.prototype.releaseGroup=function(t){var e,n,r,i;for(e in this.callbacks)for(i=this.callbacks[e],n=0,r=i.length;r>n;n++)i[n]._groupName===t&&(i.splice(n,1),n--,r--);return this},r.prototype.off=function(t,e){var n,r=this.callbacks[t];return r?1===arguments.length?(delete this.callbacks[t],this):(n=r.indexOf(e),r.splice(n,1),this):this},r.prototype.emit=function(t){var e,n,r=[].slice.call(arguments,1),i=this.callbacks[t],o=this.getWildcardCallbacks(t);if(i)for(e=0,n=i.length;n>e&&i[e];++e)i[e].apply(this,r);if(o)for(e=0,n=o.length;n>e&&o[e];++e)o[e].apply(this,[t].concat(r));return this},r.prototype.getWildcardCallbacks=function(t){var e,n,r=[];for(e in this.callbacks)n=e.split("*"),("*"===e||2===n.length&&t.slice(0,n[1].length)===n[1])&&(r=r.concat(this.callbacks[e]));return r}},app:function(t,e,n){var r=e("backbone"),i=e("models/me"),o=e("views/main"),s=e("router"),a=e("helpers/xmppEventHandlers");n.exports={launch:function(){if(window.app=this,window.me=new i,new s,app.history=r.history,!localStorage.config)return app.navigate("signin");app.view=new o({el:document.body,model:me}).render();var t=JSON.parse(localStorage.config);window.client=app.client=XMPP.createClient(t),a(client,app),client.connect(),app.history.start({pushState:!0,root:"/"})},navigate:function(t){var e="/"===t.charAt(0)?t.slice(1):t;app.history.navigate(e,!0)},renderPage:function(t,e){var n=$("#pages");app.currentPage&&app.currentPage.hide(e),n.append(t.render("none"===e).el),t.show(e)}}},"helpers/getOrCall":function(t,e,n){n.exports=function(t,e){return t[e]instanceof Function?t[e]():t[e]||""}},"helpers/xmppEventHandlers":function(t,e,n){function r(){window.scrollTo(0,document.body.scrollHeight)}function i(t,e){var n=document.getElementById("log"),i=document.createElement("div"),s=document.createElement("h2"),a=document.createElement("p"),u=document.createElement("p");if(s.textContent=t,i.appendChild(s),e&&e.toJSON){var c=document.createElement("code");c.textContent=JSON.stringify(e.toJSON()),u.appendChild(c),i.appendChild(u),i.appendChild(document.createElement("hr"))}var l=document.createElement("code");l.textContent=e,a.appendChild(l),i.appendChild(a),n&&(n.appendChild(i),o.throttle(r,300))}XMPP.crypto;var o=e("underscore");e("image-to-data-uri"),e("models/contact");var s=e("models/resource"),a=e("models/message");n.exports=function(t){t.on("*",function(t,e){i(t,e)}),t.on("disconnected",function(){t.connect()}),t.on("session:started",function(e){console.log(e),me.jid=e,t.getRoster(function(e,n){n=n.toJSON(),o.each(n.roster.items,function(t){me.contacts.add(t)}),t.updateCaps(),t.sendPresence({caps:t.disco.caps}),t.enableCarbons()})}),t.on("roster:update",function(t){var e=t.toJSON().roster.items;o.each(e,function(t){var e=me.getContact(t.jid);return"remove"===t.subscription?(e&&me.contacts.remove(e),void 0):(e?e.set(t):me.contacts.add(t),void 0)})}),t.on("available",function(t){t=t.toJSON();var e=me.getContact(t.from);if(e){delete t.id,t.show=t.show||"",t.status=t.status||"",t.priority=t.priority||0;var n=e.resources.get(t.from);n?n.set(t):(n=new s(t),n.cid=t.from,e.resources.add(n))}}),t.on("unavailable",function(t){t=t.toJSON();var e=me.getContact(t.from);if(e){var n=e.resources.get(t.from);n&&e.resources.remove(n),0===e.resources.length&&(e.offlineStatus=t.status)}}),t.on("avatar",function(e){var n=me.getContact(e.jid);n&&(e.avatars.length>0?t.getAvatar(e.jid,e.avatars[0].id,function(t,r){if(!t){r=r.toJSON();var i=r.pubsub.retrieve.item.avatarData;n.avatar="data:"+e.avatars[0].type+";base64,"+i}}):n.useDefaultAvatar())}),t.on("chatState",function(t){var e=me.getContact(t.from);e&&(e.chatState=t.chatState,"gone"===t.chatState&&(e.lockedResource=void 0))}),t.on("chat",function(t){t=t.toJSON();var e=me.getContact(t.from,t.to);if(e&&!t.replace){var n=new a;n.cid=t.id,delete t.id,n.set(t),e.messages.add(n),e.lockedResource?t.from!==e.lockedResource&&(e.lockedResource=void 0):e.lockedResource=t.from}}),t.on("replace",function(t){t=t.toJSON();var e=me.getContact(t.from,t.to);if(e){var n=t.replace,r=e.messages.get(n);r&&r.correct(t)}}),t.on("carbon:received",function(e){if(me.isMe(e.from)){var n=e.carbonReceived.forwarded.message,r=e.carbonReceived.forwarded.delay;r.stamp||(r.stamp=Date.now()),n._extensions.delay||(n.delay=r),t.emit("message",n)}}),t.on("carbon:sent",function(e){if(me.isMe(e.from)){var n=e.carbonSent.forwarded.message,r=e.carbonSent.forwarded.delay;console.log(r.toJSON()),console.log(e.toString()),r.stamp||(r.stamp=Date.now()),n._extensions.delay||(n.delay=r),t.emit("message",n)}}),t.on("message:sent",function(t){console.log(t);var e=me.getContact(t.to),t=t.toJSON();if(e&&t.body){var n=new a;n.cid=t.id,delete t.id,n.set(t),e.messages.add(n)}})}},"models/baseCollection":function(t,e,n){var r=e("backbone");n.exports=r.Collection.extend({next:function(t,e,n){var r,i=this.indexOf(t);return-1===i?i=0:i+1>=this.length?i=0:i+=1,r=this.at(i),e&&r!==n&&!e(r)?this.next(r,e,n||t):r},prev:function(t,e,n){var r,i=this.indexOf(t);return-1===i?i=0:0===i?i=this.length-1:i-=1,r=this.at(i),e&&r!==n&&!e(r)?this.prev(r,e,n||t):this.at(i)}})},"models/contact":function(t,e,n){var r=e("strictmodel").Model,i=e("./resources"),o=e("./messages"),s=e("./message"),a=XMPP.crypto;n.exports=r.extend({init:function(t){t.jid&&(this.cid=t.jid),t.avatar||this.useDefaultAvatar(),this.resources.bind("add remove reset change",this.resourceChange,this)},type:"contact",props:{jid:["string",!0],name:["string",!0,""],subscription:["string",!0,"none"],groups:["array",!0,[]]},derived:{displayName:{deps:["name","jid"],fn:function(){return this.name?this.name:this.jid}},status:{deps:["topResourceStatus","offlineStatus"],fn:function(){return this.topResourceStatus?this.topResourceStatus:this.offlineStatus}}},session:{topResourceStatus:["string",!0,""],offlineStatus:["string",!0,""],idleSince:"date",avatar:"string",show:["string",!0,"offline"],chatState:["string",!0,"gone"],lockedResource:"string"},collections:{resources:i,messages:o},useDefaultAvatar:function(){this.avatar="https://gravatar.com/avatar/"+a.createHash("md5").update(this.jid).digest("hex")+"?s=30&d=mm"},resourceChange:function(){this.resources.sort();var t=this.resources.first();t?(this.offlineStatus="",this.topResourceStatus=t.status,this.show=t.show||"online",this.lockedResource=void 0):(this.topResourceStatus="",this.show="offline")},fetchHistory:function(){var t=this,e=new Date(Date.now()),n=new Date(e.valueOf()+6e3*e.getTimezoneOffset()-864e5);client.getHistory({"with":this.jid,start:n,rsm:{count:20,before:!0}},function(e,n){if(!e){var r=n.mamQuery.results||[];r.reverse(),r.forEach(function(e){if(e=e.toJSON(),msg=e.mam.forwarded.message,msg.delay||(msg.delay=e.mam.forwarded.delay),msg.replace){var n=t.messages.get(msg.replace);if(n)return n.correct(msg)}var r=new s;console.log(msg),r.cid=msg.id,delete msg.id,r.set(msg),t.messages.add(r)})}})}})},"models/contacts":function(t,e,n){var r=e("./baseCollection"),i=e("./contact");n.exports=r.extend({type:"contacts",model:i,comparator:function(t,e){var n=t.show,r=e.show,i=t.displayName.toLowerCase(),o=e.displayName.toLowerCase();return n===r?i===o?0:o>i?-1:1:"offline"===n?1:"offline"===r?-1:i===o?0:o>i?-1:1},initialize:function(){this.bind("change",this.orderChange,this),this.bind("add",this.fetchHistory,this)},orderChange:function(){this.sort()},fetchHistory:function(t){t.fetchHistory()}})},"models/me":function(t,e,n){var r=e("strictmodel"),i=e("./contacts");n.exports=r.Model.extend({session:{jid:["string",!0,""],status:["string",!0,""],avatar:["string",!0,""]},derived:{barejid:{deps:["jid"],fn:function(){var t=this.jid.indexOf("/")>0;return t?this.jid.slice(0,this.jid.indexOf("/")):this.jid}}},collections:{contacts:i},getContact:function(t,e){this.isMe(t)&&(t=e||t);var n=t.indexOf("/")>0;return n&&(t=t.slice(0,t.indexOf("/"))),this.contacts.get(t)},isMe:function(t){var e=t.indexOf("/")>0;return e&&(t=t.slice(0,t.indexOf("/"))),t===this.barejid}})},"models/message":function(t,e,n){var r=e("strictmodel").Model;n.exports=r.extend({init:function(){this._created=Date.now()},type:"message",props:{to:["string",!0,""],from:["string",!0,""],body:["string",!0,""],type:["string",!0,"normal"],acked:["bool",!0,!1]},derived:{mine:{deps:["from"],fn:function(){return me.isMe(this.from)}},delayed:{deps:["delay"],fn:function(){return!!this.delay}},created:{deps:["delay","_created"],fn:function(){return this.delay&&this.delay.stamp?this.delay.stamp:this._created}},formattedTime:{deps:["created"],fn:function(){return this.created.format("{MM}/{dd} {h}:{mm}{t}")}}},session:{_created:"date",receiptReceived:["bool",!0,!1],edited:["bool",!0,!1],delay:"object"},correct:function(t){this.from===t.from&&(delete t.id,this.set(t),this._created=Date.now(),this.edited=!0)}})},"models/messages":function(t,e,n){var r=e("./baseCollection"),i=e("./message");n.exports=r.extend({type:"messages",model:i,comparator:function(t,e){return console.log("comparing",t,e),t.created<e.created?-1:t.created>e.created?1:0}})},"models/resource":function(t,e,n){var r=e("strictmodel").Model;n.exports=r.extend({init:function(){},type:"resource",session:{jid:["string",!0],status:["string",!0,""],show:["string",!0,""],priority:["number",!0,0],idleSince:"date"}})},"models/resources":function(t,e,n){var r=e("./baseCollection"),i=e("./resource");n.exports=r.extend({type:"resources",model:i,comparator:function(t,e){if(t.priority>e.priority)return-1;if(t.priority<e.priority)return 1;if(t.show===e.show)return 0;var n={xa:0,away:1,"":2,chat:3,dnd:3},r=n[t.show],i=n[e.show];return r===i?0:r>i?-1:1}})},"pages/base":function(t,e,n){var r=e("strictview"),i=e("helpers/getOrCall");n.exports=r.extend({show:function(){return $("body").scrollTop(0),app.currentPage=this,document.title=i(this,"title")+" • Stanza.io",this.trigger("pageloaded"),this},hide:function(){return this.trigger("pageunloaded"),this.remove(),this}})},"pages/info":function(t,e,n){var r=e("pages/base"),i=e("templates"),o=e("views/contactListItem");e("views/contactListItemResource");var s=e("views/message");n.exports=r.extend({template:i.pages.info,initialize:function(){this.render()},contentBindings:{name:"h1.name"},render:function(){return this.basicRender(),this.collectomatic(me.contacts,o,{containerEl:this.$("#contactList")},{quick:!0}),this.collectomatic(this.model.messages,s,{containerEl:this.$("#conversation")},{quick:!0}),this.handleBindings(),this}})},"pages/main":function(t,e,n){var r=e("pages/base"),i=e("templates"),o=e("views/contactListItem");n.exports=r.extend({template:i.pages.main,initialize:function(){this.render()},render:function(){return this.basicRender(),this.collectomatic(me.contacts,o,{containerEl:this.$("#contactList")},{quick:!0}),this.handleBindings(),this}})},"pages/wrapper":function(t,e,n){var r=e("pages/base"),i=e("templates");n.exports=r.extend({template:i.pages.wrapper,initialize:function(t){this.url=t.url},render:function(){return this.basicRender(),this.$el.load(this.url),this}})},router:function(t,e,n){var r=e("backbone");n.exports=r.Router.extend({routes:{"":"main","info/:jid":"info"},main:function(){var t=e("pages/main");app.renderPage(new t({model:me}))},info:function(t){var n=e("pages/info"),r=me.contacts.get(t);r?app.renderPage(new n({model:r})):app.navigate("/")}})},"views/contactList":function(t,e,n){var r=e("strictview"),i=e("templates");e("underscore"),n.exports=r.extend({template:i.includes.contactList,initialize:function(t){this.containerEl=t.containerEl,this.bindomatic(this.collection,"add",this.handleAddContact)},render:function(){return this.handleBindings(),this.$contactList=this.$("#contactList"),this},handleAddContact:function(t){var e=new ContactListItem({model:t});this.$contactList.append(e.render().el)}})},"views/contactListItem":function(t,e,n){var r=e("strictview"),i=e("templates");e("underscore"),e("views/contactListItemResource"),n.exports=r.extend({template:i.includes.contactListItem,classBindings:{show:"",subscription:"",chatState:""},contentBindings:{displayName:".name",status:".status"},imageBindings:{avatar:".avatar img"},events:{click:"getInfo"},initialize:function(t){this.containerEl=t.containerEl,this.render()},render:function(){return this.subViewRender({context:{contact:this.model}}),this.handleBindings(),this},getInfo:function(){app.navigate("info/"+this.model.jid)}})},"views/contactListItemResource":function(t,e,n){var r=e("strictview"),i=e("templates");e("underscore"),n.exports=r.extend({template:i.includes.contactListItemResource,classBindings:{show:""},contentBindings:{jid:".jid",status:".status"},initialize:function(t){this.containerEl=t.containerEl,this.render()},render:function(){return this.subViewRender({context:{resource:this.model}}),this.handleBindings(),this}})},"views/main":function(t,e,n){var r=e("pages/base"),i=e("templates");n.exports=r.extend({template:i.layout,classBindings:{},contentBindings:{},hrefBindings:{},events:{},render:function(){return this.$el.html(this.template()),this.handleBindings(),this}})},"views/message":function(t,e,n){var r=e("strictview"),i=e("templates");e("underscore"),n.exports=r.extend({template:i.includes.message,classBindings:{mine:".message",receiptReceived:"",acked:"",delayed:"",edited:""},contentBindings:{body:".body",formattedTime:".timestamp"},initialize:function(t){this.containerEl=t.containerEl,this.render()},render:function(){return this.subViewRender({context:{message:this.model}}),this.handleBindings(),this}})}}); |