Skip to content

Instantly share code, notes, and snippets.

@natew
Created April 7, 2016 04:57
Show Gist options
  • Save natew/e0985ca10fbb2dcdd87686a773a79409 to your computer and use it in GitHub Desktop.
Save natew/e0985ca10fbb2dcdd87686a773a79409 to your computer and use it in GitHub Desktop.
/*! __LICENSE__ */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.Horizon=e():t.Horizon=e()}(this,function(){return function(t){function e(r){if(n[r])return n[r].exports;var o=n[r]={exports:{},id:r,loaded:!1};return t[r].call(o.exports,o,o.exports,e),o.loaded=!0,o.exports}var n={};return e.m=t,e.c=n,e.p="",e(0)}(function(t){for(var e in t)if(Object.prototype.hasOwnProperty.call(t,e))switch(typeof t[e]){case"function":break;case"object":t[e]=function(e){var n=e.slice(1),r=t[e[0]];return function(t,e,o){r.apply(this,[t,e,o].concat(n))}}(t[e]);break;default:t[e]=t[t[e]]}return t}([function(t,e,n){"use strict";n(89),n(88),n(90),n(91),"undefined"!=typeof window&&("undefined"!=typeof window.Rx||(window.Rx=n(10))),t.exports=n(77)},[188,74,51,9],function(t,e){var n=t.exports="undefined"!=typeof window&&window.Math==Math?window:"undefined"!=typeof self&&self.Math==Math?self:Function("return this")();"number"==typeof __g&&(__g=n)},function(t,e){var n={}.hasOwnProperty;t.exports=function(t,e){return n.call(t,e)}},[184,101,30],function(t,e){var n=t.exports={version:"2.2.2"};"number"==typeof __e&&(__e=n)},[164,19],[166,15,20,6],[188,38,21,2],2,function(t,e){(function(n){function r(t){return t&&t.Object===Object?t:null}function o(t){for(var e=[],n=0,r=t.length;r>n;n++)e.push(t[n]);return e}function i(t){return function(){try{return t.apply(this,arguments)}catch(e){return Zt.e=e,Zt}}}function u(t){throw t}function s(t,e){if(ee&&e.stack&&"object"==typeof t&&null!==t&&t.stack&&-1===t.stack.indexOf(ie)){for(var n=[],r=e;r;r=r.source)r.stack&&n.unshift(r.stack);n.unshift(t.stack);var o=n.join("\n"+ie+"\n");t.stack=c(o)}}function c(t){for(var e=t.split("\n"),n=[],r=0,o=e.length;o>r;r++){var i=e[r];h(i)||a(i)||!i||n.push(i)}return n.join("\n")}function h(t){var e=p(t);if(!e)return!1;var n=e[0],r=e[1];return n===re&&r>=oe&&Tu>=r}function a(t){return-1!==t.indexOf("(module.js:")||-1!==t.indexOf("(node.js:")}function f(){if(ee)try{throw new Error}catch(t){var e=t.stack.split("\n"),n=e[0].indexOf("@")>0?e[1]:e[2],r=p(n);if(!r)return;return re=r[0],r[1]}}function p(t){var e=/at .+ \((.+):(\d+):(?:\d+)\)$/.exec(t);if(e)return[e[1],Number(e[2])];var n=/at ([^ ]+):(\d+):(?:\d+)$/.exec(t);if(n)return[n[1],Number(n[2])];var r=/.*@(.+):(\d+)$/.exec(t);return r?[r[1],Number(r[2])]:void 0}function l(t,e,r,o,i,u){var s=Je(t),c=s.length,h=Je(e),a=h.length;if(c!==a&&!o)return!1;for(var f,p=c;p--;)if(f=s[p],!(o?f in e:Ve.call(e,f)))return!1;for(var l=o;++p<c;){f=s[p];var d,v=t[f],b=e[f];if(!(d===n?r(v,b,o,i,u):d))return!1;l||(l="constructor"===f)}if(!l){var _=t.constructor,y=e.constructor;if(_!==y&&"constructor"in t&&"constructor"in e&&!("function"==typeof _&&_ instanceof _&&"function"==typeof y&&y instanceof y))return!1}return!0}function d(t,e,n){switch(n){case Ae:case we:return+t===+e;case me:return t.name===e.name&&t.message===e.message;case ge:return t!==+t?e!==+e:t===+e;case xe:case Ne:return t===e+""}return!1}function v(t){return!!t&&"object"==typeof t}function b(t){return"number"==typeof t&&t>-1&&t%1===0&&He>=t}function _(t){return v(t)&&b(t.length)&&!!We[Ue.call(t)]}function y(t,e){for(var n=-1,r=t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}function E(t,e,r,o,i,u){var s=-1,c=t.length,h=e.length;if(c!==h&&!(o&&h>c))return!1;for(;++s<c;){var a,f=t[s],p=e[s];if(a!==n){if(a)continue;return!1}if(o){if(!y(e,function(t){return f===t||r(f,t,o,i,u)}))return!1}else if(f!==p&&!r(f,p,o,i,u))return!1}return!0}function A(t,e,n,r,o,i){var u=$e(t),s=$e(e),c=Ee,h=Ee;u||(c=Ue.call(t),c===ye?c=De:c!==De&&(u=_(t))),s||(h=Ue.call(e),h===ye&&(h=De));var a=c===De&&!Xe(t),f=h===De&&!Xe(e),p=c===h;if(p&&!u&&!a)return d(t,e,c);if(!r){var v=a&&Ve.call(t,"__wrapped__"),b=f&&Ve.call(e,"__wrapped__");if(v||b)return n(v?t.value():t,b?e.value():e,r,o,i)}if(!p)return!1;o||(o=[]),i||(i=[]);for(var y=o.length;y--;)if(o[y]===t)return i[y]===e;o.push(t),i.push(e);var A=(u?E:l)(t,e,n,r,o,i);return o.pop(),i.pop(),A}function w(t,e,n,r,o){return t===e?!0:null==t||null==e||!rt(t)&&!v(e)?t!==t&&e!==e:A(t,e,w,n,r,o)}function m(t,e){for(var n=new Array(t),r=0;t>r;r++)n[r]=e();return n}function C(t,e){this.id=t,this.value=e}function F(t,e){this.scheduler=t,this.disposable=e,this.isDisposed=!1}function g(t,e){e.isDisposed||(e.isDisposed=!0,e.disposable.dispose())}function D(t){this._s=t,this.isDisposed=!1}function x(t){this._s=t}function B(t){this._s=t,this._l=t.length,this._i=0}function N(t){this._a=t}function O(t){this._a=t,this._l=q(t),this._i=0}function S(t){return"number"==typeof t&&Vt.isFinite(t)}function j(t){var e,r=t[pe];if(!r&&"string"==typeof t)return e=new x(t),e[pe]();if(!r&&t.length!==n)return e=new N(t),e[pe]();if(!r)throw new TypeError("Object is not iterable");return t[pe]()}function k(t){var e=+t;return 0===e?e:isNaN(e)?e:0>e?-1:1}function q(t){var e=+t.length;return isNaN(e)?0:0!==e&&S(e)?(e=k(e)*Math.floor(Math.abs(e)),0>=e?0:e>dr?dr:e):e}function T(t,e){return yn(t)||(t=gn),new br(e,t)}function R(t,e){this.observer=t,this.parent=e}function M(t,e){return t.amb(e)}function P(){return!1}function I(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return e}function P(){return!1}function I(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return e}function P(){return!1}function L(){return[]}function P(){return!1}function L(){return[]}function I(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return e}function W(t){return function(e){return t.subscribe(e)}}function z(t){return t.toArray()}function V(t){return t.length>0}function U(t){return{"@@iterator":function(){return{next:function(){return{done:!1,value:t}}}}}}function U(t){return{"@@iterator":function(){return{next:function(){return{done:!1,value:t}}}}}}function H(t,e,n){var r=be(e,n,3);return t.map(function(e,n){var o=r(e,n,t);return Gt(o)&&(o=ur(o)),(ve(o)||de(o))&&(o=vr(o)),o}).concatAll()}function J(t,e,n){for(var r=0,o=t.length;o>r;r++)if(n(t[r],e))return r;return-1}function X(t){this.comparer=t,this.set=[]}function $(t,e){return function(r){for(var o=r,i=0;e>i;i++){var u=o[t[i]];if("undefined"==typeof u)return n;o=u}return o}}function K(t){if(0===t.length)throw new ue;return t[0]}function Q(t,e,n,r){var o=be(e,n,3);return new Du(function(e){return t.subscribe(new ai(e,t,o,r))},t)}function G(t){return t?Xn.isObservable(t)?t:Gt(t)?Xn.fromPromise(t):nt(t)||et(t)?Ei.call(this,t):Yt(t)?tt.call(this,t):ve(t)||de(t)?Y.call(this,t):rt(t)?Z.call(this,t):t:t}function Y(t){return Xn.from(t).concatMap(function(t){return Xn.isObservable(t)||rt(t)?G.call(null,t):Ut.Observable.just(t)}).toArray()}function Z(t){function e(t,e){r[e]=n,i.push(t.map(function(t){r[e]=t}))}for(var r=new t.constructor,o=Object.keys(t),i=[],u=0,s=o.length;s>u;u++){var c=o[u],h=G.call(this,t[c]);h&&Xn.isObservable(h)?e(h,c):r[c]=t[c]}return Xn.forkJoin.apply(Xn,i).map(function(){return r})}function tt(t){var e=this;return new Du(function(n){t.call(e,function(){var t=arguments[0],e=arguments[1];if(t)return n.onError(t);if(arguments.length>2){for(var r=[],o=1,i=arguments.length;i>o;o++)r.push(arguments[o]);e=r}n.onNext(e),n.onCompleted()})})}function et(t){return Yt(t.next)&&Yt(t["throw"])}function nt(t){var e=t.constructor;return e?"GeneratorFunction"===e.name||"GeneratorFunction"===e.displayName?!0:et(e.prototype):!1}function rt(t){return Object==t.constructor}function ot(t,e,n,r){var o=new Su;return r.push(it(o,e,n)),t.apply(e,r),o.asObservable()}function it(t,e,n){return function(){for(var r=arguments.length,o=new Array(r),i=0;r>i;i++)o[i]=arguments[i];if(Yt(n)){if(o=te(n).apply(e,o),o===Zt)return t.onError(o.e);t.onNext(o)}else o.length<=1?t.onNext(o[0]):t.onNext(o);t.onCompleted()}}function ut(t,e,n,r){var o=new Su;return r.push(st(o,e,n)),t.apply(e,r),o.asObservable()}function st(t,e,n){return function(){var r=arguments[0];if(r)return t.onError(r);for(var o=arguments.length,i=[],u=1;o>u;u++)i[u-1]=arguments[u];if(Yt(n)){var i=te(n).apply(e,i);if(i===Zt)return t.onError(i.e);t.onNext(i)}else i.length<=1?t.onNext(i[0]):t.onNext(i);t.onCompleted()}}function ct(t){return Vt.StaticNodeList?t instanceof Vt.StaticNodeList||t instanceof Vt.NodeList:"[object NodeList]"===Object.prototype.toString.call(t)}function ht(t,e,n){this._e=t,this._n=e,this._fn=n,this._e.addEventListener(this._n,this._fn,!1),this.isDisposed=!1}function at(t,e,n){var r=new en,o=Object.prototype.toString.call(t);if(ct(t)||"[object HTMLCollection]"===o)for(var i=0,u=t.length;u>i;i++)r.add(at(t.item(i),e,n));else t&&r.add(new ht(t,e,n));return r}function ft(t,e,n){return new Du(function(r){function o(t,e){if(h[e]=t,u[e]=!0,s||(s=u.every(Jt))){if(i)return r.onError(i);var o=te(n).apply(null,h);if(o===Zt)return r.onError(o.e);r.onNext(o)}c&&h[1]&&r.onCompleted()}var i,u=[!1,!1],s=!1,c=!1,h=new Array(2);return new pn(t.subscribe(function(t){o(t,0)},function(t){h[1]?r.onError(t):i=t},function(){c=!0,h[1]&&r.onCompleted()}),e.subscribe(function(t){o(t,1)},function(t){r.onError(t)},function(){c=!0,o(!0,1)}))},t)}function z(t){return t.toArray()}function pt(t,e){return t.groupJoin(this,e,pr,function(t,e){return e})}function lt(t){var e=this;return new Du(function(n){var r=new Ou,o=new en,i=new dn(o);return n.onNext(Ye(r,i)),o.add(e.subscribe(function(t){r.onNext(t)},function(t){r.onError(t),n.onError(t)},function(){r.onCompleted(),n.onCompleted()})),Gt(t)&&(t=ur(t)),o.add(t.subscribe(function(t){r.onCompleted(),r=new Ou,n.onNext(Ye(r,i))},function(t){r.onError(t),n.onError(t)},function(){r.onCompleted(),n.onCompleted()})),i},e)}function dt(t){var e=this;return new Du(function(n){function r(){var e;try{e=t()}catch(i){return void n.onError(i)}Gt(e)&&(e=ur(e));var c=new an;o.setDisposable(c),c.setDisposable(e.take(1).subscribe(Ht,function(t){s.onError(t),n.onError(t)},function(){s.onCompleted(),s=new Ou,n.onNext(Ye(s,u)),r()}))}var o=new fn,i=new en(o),u=new dn(i),s=new Ou;return n.onNext(Ye(s,u)),i.add(e.subscribe(function(t){s.onNext(t)},function(t){s.onError(t),n.onError(t)},function(){s.onCompleted(),n.onCompleted()})),r(),u},e)}function vt(t,e){return new Ri(t,e)}function I(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return e}function bt(t){this.patterns=t}function _t(t,e){this.expression=t,this.selector=e}function yt(t){return function(e){t.onError(e)}}function Et(t,e){return function(){var n=te(t.selector).apply(t,arguments);return n===Zt?e.onError(n.e):void e.onNext(n)}}function At(t,e,n){var r=t.get(e);if(!r){var o=new Ui(e,n);return t.set(e,o),o}return r}function wt(t,e,n){this.joinObserverArray=t,this.onNext=e,this.onCompleted=n,this.joinObservers=new Vi;for(var r=0,o=this.joinObserverArray.length;o>r;r++){var i=this.joinObserverArray[r];this.joinObservers.set(i,i)}}function mt(t,e){return new Hi(t,e)}function Ct(t,e,n){return new Du(function(r){var o=t,i=_n(e);return n.scheduleRecursiveFuture(0,o,function(t,e){if(i>0){var u=n.now();o=new Date(o.getTime()+i),o.getTime()<=u&&(o=new Date(u+i))}r.onNext(t),e(t+1,new Date(o))})})}function Ft(t,e,n){return t===e?new Du(function(t){return n.schedulePeriodic(0,e,function(e){return t.onNext(e),e+1})}):hr(function(){return Ct(new Date(n.now()+t),e,n)})}function gt(t,e,n){return new Du(function(r){var o,i=!1,u=new fn,s=null,c=[],h=!1;return o=t.materialize().timestamp(n).subscribe(function(t){var o,a;"E"===t.value.kind?(c=[],c.push(t),s=t.value.error,a=!h):(c.push({value:t.value,timestamp:t.timestamp+e}),a=!i,i=!0),a&&(null!==s?r.onError(s):(o=new an,u.setDisposable(o),o.setDisposable(n.scheduleRecursiveFuture(null,e,function(t,e){var o,u,a,f;if(null===s){h=!0;do a=null,c.length>0&&c[0].timestamp-n.now()<=0&&(a=c.shift().value),null!==a&&a.accept(r);while(null!==a);f=!1,u=0,c.length>0?(f=!0,u=Math.max(0,c[0].timestamp-n.now())):i=!1,o=s,h=!1,null!==o?r.onError(o):f&&e(null,u)}}))))}),new pn(o,u)},t)}function Dt(t,e,n){return hr(function(){return gt(t,e-n.now(),n)})}function xt(t,e,n){var r,o;return Yt(e)?o=e:(r=e,o=n),new Du(function(e){function n(){c.setDisposable(t.subscribe(function(t){var n=te(o)(t);if(n===Zt)return e.onError(n.e);var r=new an;u.add(r),r.setDisposable(n.subscribe(function(){e.onNext(t),u.remove(r),i()},function(t){e.onError(t)},function(){e.onNext(t),u.remove(r),i()}))},function(t){e.onError(t)},function(){s=!0,c.dispose(),i()}))}function i(){s&&0===u.length&&e.onCompleted()}var u=new en,s=!1,c=new fn;return r?c.setDisposable(r.subscribe(n,function(t){e.onError(t)},n)):n(),new pn(c,u)},t)}function Bt(t,e){return new Du(function(n){var r,o=!1,i=new fn,u=0,s=t.subscribe(function(t){var s=te(e)(t);if(s===Zt)return n.onError(s.e);Gt(s)&&(s=ur(s)),o=!0,r=t,u++;var c=u,h=new an;i.setDisposable(h),h.setDisposable(s.subscribe(function(){o&&u===c&&n.onNext(r),o=!1,h.dispose()},function(t){n.onError(t)},function(){o&&u===c&&n.onNext(r),o=!1,h.dispose()}))},function(t){i.dispose(),n.onError(t),o=!1,u++},function(){i.dispose(),o&&n.onNext(r),n.onCompleted(),o=!1,u++});return new pn(s,i)},t)}function z(t){return t.toArray()}function z(t){return t.toArray()}function Nt(t,e,n,r){return Yt(e)&&(r=n,n=e,e=wr()),Xn.isObservable(r)||(r=xr(new nu)),new Du(function(o){function i(t){function e(){return f=n===a}var n=a,i=new an;c.setDisposable(i),i.setDisposable(t.subscribe(function(){e()&&s.setDisposable(r.subscribe(o)),i.dispose()},function(t){e()&&o.onError(t)},function(){e()&&s.setDisposable(r.subscribe(o))}))}function u(){var t=!f;return t&&a++,t}var s=new fn,c=new fn,h=new an;s.setDisposable(h);var a=0,f=!1;return i(e),h.setDisposable(t.subscribe(function(t){if(u()){o.onNext(t);var e=te(n)(t);if(e===Zt)return o.onError(e.e);i(Gt(e)?ur(e):e)}},function(t){u()&&o.onError(t)},function(){u()&&o.onCompleted()})),new pn(s,c)},t)}function Ot(t,e,n,r){return yn(n)&&(r=n,n=xr(new nu)),n instanceof Error&&(n=xr(n)),yn(r)||(r=On),Xn.isObservable(n)||(n=xr(new nu)),new Du(function(o){function i(){var t=u;a.setDisposable(r.scheduleFuture(null,e,function(){h=u===t,h&&(Gt(n)&&(n=ur(n)),c.setDisposable(n.subscribe(o)))}))}var u=0,s=new an,c=new fn,h=!1,a=new fn;return c.setDisposable(s),i(),s.setDisposable(t.subscribe(function(t){h||(u++,o.onNext(t),i())},function(t){h||(u++,o.onError(t))},function(){h||(u++,o.onCompleted())})),new pn(c,a)},t)}function St(t){return{"@@transducer/init":function(){return t},"@@transducer/step":function(t,e){return t.onNext(e)},"@@transducer/result":function(t){return t.onCompleted()}}}function jt(t){this.predicate=t}function kt(t){this.predicate=t}function qt(t,e){var n=this;this.scheduler=t,this.messages=e,this.subscriptions=[],this.observers=[];for(var r=0,o=this.messages.length;o>r;r++){var i=this.messages[r],u=i.value;!function(e){t.scheduleAbsolute(null,i.time,function(){for(var t=n.observers.slice(0),r=0,o=t.length;o>r;r++)e.accept(t[r]);return un})}(u)}}var Tt={"function":!0,object:!0},Rt=Tt[typeof e]&&e&&!e.nodeType?e:null,Mt=Tt[typeof t]&&t&&!t.nodeType?t:null,Pt=r(Rt&&Mt&&"object"==typeof global&&global),It=r(Tt[typeof self]&&self),Lt=r(Tt[typeof window]&&window),Wt=Mt&&Mt.exports===Rt?Rt:null,zt=r(Tt[typeof this]&&this),Vt=Pt||Lt!==(zt&&zt.window)&&Lt||It||zt||Function("return this")(),Ut={internals:{},config:{Promise:Vt.Promise},helpers:{}},Ht=Ut.helpers.noop=function(){},Jt=Ut.helpers.identity=function(t){return t},Xt=Ut.helpers.defaultNow=Date.now,$t=Ut.helpers.defaultComparer=function(t,e){return Ke(t,e)},Kt=Ut.helpers.defaultSubComparer=function(t,e){return t>e?1:e>t?-1:0},Qt=(Ut.helpers.defaultKeySerializer=function(t){return t.toString()},Ut.helpers.defaultError=function(t){throw t}),Gt=Ut.helpers.isPromise=function(t){return!!t&&"function"!=typeof t.subscribe&&"function"==typeof t.then},Yt=Ut.helpers.isFunction=function(){var t=function(t){return"function"==typeof t||!1};return t(/x/)&&(t=function(t){return"function"==typeof t&&"[object Function]"==toString.call(t)}),t}(),Zt={e:{}},te=Ut.internals.tryCatch=function(t){if(!Yt(t))throw new TypeError("fn must be a function");return i(t)};Ut.config.longStackSupport=!1;var ee=!1,ne=te(function(){throw new Error})();ee=!!ne.e&&!!ne.e.stack;var re,oe=f(),ie="From previous event:",ue=Ut.EmptyError=function(){this.message="Sequence contains no elements.",Error.call(this)};ue.prototype=Object.create(Error.prototype),ue.prototype.name="EmptyError";var se=Ut.ObjectDisposedError=function(){this.message="Object has been disposed",Error.call(this)};se.prototype=Object.create(Error.prototype),se.prototype.name="ObjectDisposedError";var ce=Ut.ArgumentOutOfRangeError=function(){this.message="Argument out of range",Error.call(this)};ce.prototype=Object.create(Error.prototype),ce.prototype.name="ArgumentOutOfRangeError";var he=Ut.NotSupportedError=function(t){this.message=t||"This operation is not supported",Error.call(this)};he.prototype=Object.create(Error.prototype),he.prototype.name="NotSupportedError";var ae=Ut.NotImplementedError=function(t){this.message=t||"This operation is not implemented",Error.call(this)};ae.prototype=Object.create(Error.prototype),ae.prototype.name="NotImplementedError";var fe=Ut.helpers.notImplemented=function(){throw new ae},pe=(Ut.helpers.notSupported=function(){throw new he},"function"==typeof Symbol&&Symbol.iterator||"_es6shim_iterator_");Vt.Set&&"function"==typeof(new Vt.Set)["@@iterator"]&&(pe="@@iterator");var le=Ut.doneEnumerator={done:!0,value:n},de=Ut.helpers.isIterable=function(t){return t&&t[pe]!==n},ve=Ut.helpers.isArrayLike=function(t){return t&&t.length!==n};Ut.helpers.iterator=pe;var be=Ut.internals.bindCallback=function(t,e,n){if("undefined"==typeof e)return t;switch(n){case 0:return function(){return t.call(e)};case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}},_e=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],ye=(_e.length,"[object Arguments]"),Ee="[object Array]",Ae="[object Boolean]",we="[object Date]",me="[object Error]",Ce="[object Function]",Fe="[object Map]",ge="[object Number]",De="[object Object]",xe="[object RegExp]",Be="[object Set]",Ne="[object String]",Oe="[object WeakMap]",Se="[object ArrayBuffer]",je="[object Float32Array]",ke="[object Float64Array]",qe="[object Int8Array]",Te="[object Int16Array]",Re="[object Int32Array]",Me="[object Uint8Array]",Pe="[object Uint8ClampedArray]",Ie="[object Uint16Array]",Le="[object Uint32Array]",We={};We[je]=We[ke]=We[qe]=We[Te]=We[Re]=We[Me]=We[Pe]=We[Ie]=We[Le]=!0,We[ye]=We[Ee]=We[Se]=We[Ae]=We[we]=We[me]=We[Ce]=We[Fe]=We[ge]=We[De]=We[xe]=We[Be]=We[Ne]=We[Oe]=!1;var ze=Object.prototype,Ve=ze.hasOwnProperty,Ue=ze.toString,He=Math.pow(2,53)-1,Je=Object.keys||function(){var t=Object.prototype.hasOwnProperty,e=!{toString:null}.propertyIsEnumerable("toString"),n=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],r=n.length;return function(o){if("object"!=typeof o&&("function"!=typeof o||null===o))throw new TypeError("Object.keys called on non-object");var i,u,s=[];for(i in o)t.call(o,i)&&s.push(i);if(e)for(u=0;r>u;u++)t.call(o,n[u])&&s.push(n[u]);return s}}(),rt=Ut.internals.isObject=function(t){var e=typeof t;return!!t&&("object"===e||"function"===e)},Xe=function(){try{Object({toString:0}+"")}catch(t){return function(){return!1}}return function(t){return"function"!=typeof t.toString&&"string"==typeof(t+"")}}(),$e=Array.isArray||function(t){return v(t)&&b(t.length)&&Ue.call(t)===Ee},Ke=Ut.internals.isEqual=function(t,e){return w(t,e)},Qe=({}.hasOwnProperty,Array.prototype.slice,Ut.internals.inherits=function(t,e){function n(){this.constructor=t}n.prototype=e.prototype,t.prototype=new n}),Ge=Ut.internals.addProperties=function(t){for(var e=[],n=1,r=arguments.length;r>n;n++)e.push(arguments[n]);for(var o=0,i=e.length;i>o;o++){var u=e[o];for(var s in u)t[s]=u[s]}},Ye=Ut.internals.addRef=function(t,e){return new Du(function(n){return new pn(e.getDisposable(),t.subscribe(n))})};C.prototype.compareTo=function(t){var e=this.value.compareTo(t.value);return 0===e&&(e=this.id-t.id),e};var Ze=Ut.internals.PriorityQueue=function(t){this.items=new Array(t),this.length=0},tn=Ze.prototype;tn.isHigherPriority=function(t,e){return this.items[t].compareTo(this.items[e])<0},tn.percolate=function(t){if(!(t>=this.length||0>t)){var e=t-1>>1;if(!(0>e||e===t)&&this.isHigherPriority(t,e)){var n=this.items[t];this.items[t]=this.items[e],this.items[e]=n,this.percolate(e)}}},tn.heapify=function(t){if(+t||(t=0),!(t>=this.length||0>t)){var e=2*t+1,n=2*t+2,r=t;if(e<this.length&&this.isHigherPriority(e,r)&&(r=e),n<this.length&&this.isHigherPriority(n,r)&&(r=n),r!==t){var o=this.items[t];this.items[t]=this.items[r],this.items[r]=o,this.heapify(r)}}},tn.peek=function(){return this.items[0].value},tn.removeAt=function(t){this.items[t]=this.items[--this.length],this.items[this.length]=n,this.heapify()},tn.dequeue=function(){var t=this.peek();return this.removeAt(0),t},tn.enqueue=function(t){var e=this.length++;this.items[e]=new C(Ze.count++,t),this.percolate(e)},tn.remove=function(t){for(var e=0;e<this.length;e++)if(this.items[e].value===t)return this.removeAt(e),!0;return!1},Ze.count=0;var en=Ut.CompositeDisposable=function(){var t,e,n=[];if(Array.isArray(arguments[0]))n=arguments[0];else for(e=arguments.length,n=new Array(e),t=0;e>t;t++)n[t]=arguments[t];this.disposables=n,this.isDisposed=!1,this.length=n.length},nn=en.prototype;nn.add=function(t){this.isDisposed?t.dispose():(this.disposables.push(t),this.length++)},nn.remove=function(t){var e=!1;if(!this.isDisposed){var n=this.disposables.indexOf(t);-1!==n&&(e=!0,this.disposables.splice(n,1),this.length--,t.dispose())}return e},nn.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=this.disposables.length,e=new Array(t),n=0;t>n;n++)e[n]=this.disposables[n];for(this.disposables=[],this.length=0,n=0;t>n;n++)e[n].dispose()}};var rn=Ut.Disposable=function(t){this.isDisposed=!1,this.action=t||Ht};rn.prototype.dispose=function(){this.isDisposed||(this.action(),this.isDisposed=!0)};var on=rn.create=function(t){return new rn(t)},un=rn.empty={dispose:Ht},sn=rn.isDisposable=function(t){return t&&Yt(t.dispose)},cn=rn.checkDisposed=function(t){if(t.isDisposed)throw new se},hn=rn._fixup=function(t){return sn(t)?t:un},an=Ut.SingleAssignmentDisposable=function(){this.isDisposed=!1,this.current=null};an.prototype.getDisposable=function(){return this.current},an.prototype.setDisposable=function(t){if(this.current)throw new Error("Disposable has already been assigned");var e=this.isDisposed;!e&&(this.current=t),e&&t&&t.dispose()},an.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.current;this.current=null,t&&t.dispose()}};var fn=Ut.SerialDisposable=function(){this.isDisposed=!1,this.current=null};fn.prototype.getDisposable=function(){return this.current},fn.prototype.setDisposable=function(t){var e=this.isDisposed;if(!e){var n=this.current;this.current=t}n&&n.dispose(),e&&t&&t.dispose()},fn.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this.current;this.current=null}t&&t.dispose()};var pn=Ut.BinaryDisposable=function(t,e){this._first=t,this._second=e,this.isDisposed=!1};pn.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;var t=this._first;this._first=null,t&&t.dispose();var e=this._second;this._second=null,e&&e.dispose()}};var ln=Ut.NAryDisposable=function(t){this._disposables=t,this.isDisposed=!1};ln.prototype.dispose=function(){if(!this.isDisposed){this.isDisposed=!0;for(var t=0,e=this._disposables.length;e>t;t++)this._disposables[t].dispose();this._disposables.length=0}};var dn=Ut.RefCountDisposable=function(){function t(t){this.disposable=t,this.disposable.count++,this.isInnerDisposed=!1}function e(t){this.underlyingDisposable=t,this.isDisposed=!1,this.isPrimaryDisposed=!1,this.count=0}return t.prototype.dispose=function(){this.disposable.isDisposed||this.isInnerDisposed||(this.isInnerDisposed=!0,this.disposable.count--,0===this.disposable.count&&this.disposable.isPrimaryDisposed&&(this.disposable.isDisposed=!0,this.disposable.underlyingDisposable.dispose()))},e.prototype.dispose=function(){this.isDisposed||this.isPrimaryDisposed||(this.isPrimaryDisposed=!0,0===this.count&&(this.isDisposed=!0,this.underlyingDisposable.dispose()))},e.prototype.getDisposable=function(){return this.isDisposed?un:new t(this)},e}();F.prototype.dispose=function(){this.scheduler.schedule(this,g)};var vn=Ut.internals.ScheduledItem=function(t,e,n,r,o){this.scheduler=t,this.state=e,this.action=n,this.dueTime=r,this.comparer=o||Kt,this.disposable=new an};vn.prototype.invoke=function(){this.disposable.setDisposable(this.invokeCore())},vn.prototype.compareTo=function(t){return this.comparer(this.dueTime,t.dueTime)},vn.prototype.isCancelled=function(){return this.disposable.isDisposed},vn.prototype.invokeCore=function(){return hn(this.action(this.scheduler,this.state))};var bn=Ut.Scheduler=function(){function t(){}t.isScheduler=function(e){return e instanceof t};var e=t.prototype;return e.schedule=function(t,e){throw new ae},e.scheduleFuture=function(e,n,r){var o=n;return o instanceof Date&&(o-=this.now()),o=t.normalize(o),0===o?this.schedule(e,r):this._scheduleFuture(e,o,r)},e._scheduleFuture=function(t,e,n){throw new ae},t.now=Xt,t.prototype.now=Xt,t.normalize=function(t){return 0>t&&(t=0),t},t}(),_n=bn.normalize,yn=bn.isScheduler;!function(t){function e(t,e){function n(e){function r(t,e){return u?i.remove(c):s=!0,o(e,n),un}var u=!1,s=!1,c=t.schedule(e,r);s||(i.add(c),u=!0)}var r=e[0],o=e[1],i=new en;return o(r,n),i}function n(t,e){function n(e,r){function u(t,e){return s?i.remove(h):c=!0,o(e,n),un}var s=!1,c=!1,h=t.scheduleFuture(e,r,u);c||(i.add(h),s=!0)}var r=e[0],o=e[1],i=new en;return o(r,n),i}t.scheduleRecursive=function(t,n){return this.schedule([t,n],e)},t.scheduleRecursiveFuture=function(t,e,r){return this.scheduleFuture([t,r],e,n)}}(bn.prototype),function(t){t.schedulePeriodic=function(t,e,n){if("undefined"==typeof Vt.setInterval)throw new he;e=_n(e);var r=t,o=Vt.setInterval(function(){r=n(r)},e);return on(function(){Vt.clearInterval(o)})}}(bn.prototype),function(t){t.catchError=t["catch"]=function(t){return new Sn(this,t)}}(bn.prototype);var En,An,wn=Ut.internals.SchedulePeriodicRecursive=function(){function t(t){return function(e,n){n(0,t._period);var r=te(t._action)(t._state);r===Zt&&(t._cancel.dispose(),u(r.e)),t._state=r}}function e(t,e,n,r){this._scheduler=t,this._state=e,this._period=n,this._action=r}return e.prototype.start=function(){var e=new an;return this._cancel=e,e.setDisposable(this._scheduler.scheduleRecursiveFuture(0,this._period,t(this))),e},e}(),mn=function(t){function e(){t.call(this)}return Qe(e,t),e.prototype.schedule=function(t,e){return hn(e(this,t))},e}(bn),Cn=bn.immediate=new mn,Fn=function(t){function e(){for(;r.length>0;){var t=r.dequeue();!t.isCancelled()&&t.invoke()}}function n(){t.call(this)}var r;return Qe(n,t),n.prototype.schedule=function(t,n){var o=new vn(this,t,n,this.now());if(r)r.enqueue(o);else{r=new Ze(4),r.enqueue(o);var i=te(e)();r=null,i===Zt&&u(i.e)}return o.disposable},n.prototype.scheduleRequired=function(){return!r},n}(bn),gn=bn.currentThread=new Fn,Dn=function(){var t,e=Ht;if(Vt.setTimeout)t=Vt.setTimeout,e=Vt.clearTimeout;else{if(!Vt.WScript)throw new he;t=function(t,e){Vt.WScript.Sleep(e),t()}}return{setTimeout:t,clearTimeout:e}}(),xn=Dn.setTimeout,Bn=Dn.clearTimeout;!function(){function t(e){if(o)xn(function(){t(e)},0);else{var n=r[e];if(n){o=!0;var i=te(n)();An(e),o=!1,i===Zt&&u(i.e)}}}function e(){if(!Vt.postMessage||Vt.importScripts)return!1;var t=!1,e=Vt.onmessage;return Vt.onmessage=function(){t=!0},Vt.postMessage("","*"),Vt.onmessage=e,t}var n=1,r={},o=!1;An=function(t){delete r[t]};var i=new RegExp("^"+String(toString).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$"),s="function"==typeof(s=Pt&&Wt&&Pt.setImmediate)&&!i.test(s)&&s;if(Yt(s))En=function(e){var o=n++;return r[o]=e,s(function(){t(o)}),o};else if("undefined"!=typeof process&&"[object process]"==={}.toString.call(process))En=function(e){var o=n++;return r[o]=e,process.nextTick(function(){t(o)}),o};else if(e()){var c="ms.rx.schedule"+Math.random(),h=function(e){"string"==typeof e.data&&e.data.substring(0,c.length)===c&&t(e.data.substring(c.length))};Vt.addEventListener("message",h,!1),En=function(t){var e=n++;return r[e]=t,Vt.postMessage(c+e,"*"),e}}else if(Vt.MessageChannel){var a=new Vt.MessageChannel;a.port1.onmessage=function(e){t(e.data)},En=function(t){var e=n++;return r[e]=t,a.port2.postMessage(e),e}}else En="document"in Vt&&"onreadystatechange"in Vt.document.createElement("script")?function(e){var o=Vt.document.createElement("script"),i=n++;return r[i]=e,o.onreadystatechange=function(){t(i),o.onreadystatechange=null,o.parentNode.removeChild(o),o=null},Vt.document.documentElement.appendChild(o),i}:function(e){var o=n++;return r[o]=e,xn(function(){t(o)},0),o}}();var Nn=function(t){function e(){t.call(this)}function n(t,e,n,r){return function(){t.setDisposable(rn._fixup(e(n,r)))}}function r(t){this._id=t,this.isDisposed=!1}function o(t){this._id=t,this.isDisposed=!1}function i(t,e,n){return function(){e(t,n)}}return Qe(e,t),r.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,An(this._id))},o.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,Bn(this._id))},e.prototype.schedule=function(t,e){var o=new an,i=En(n(o,e,this,t));return new pn(o,new r(i))},e.prototype._scheduleFuture=function(t,e,r){if(0===e)return this.schedule(t,r);var i=new an,u=xn(n(i,r,this,t),e);return new pn(i,new o(u))},e.prototype.scheduleLongRunning=function(t,e){var n=on(Ht);return En(i(t,e,n)),n},e}(bn),On=bn["default"]=bn.async=new Nn,Sn=function(t){function e(e,n){this._scheduler=e,this._handler=n,this._recursiveOriginal=null,this._recursiveWrapper=null,t.call(this)}return Qe(e,t),e.prototype.schedule=function(t,e){return this._scheduler.schedule(t,this._wrap(e))},e.prototype._scheduleFuture=function(t,e,n){return this._scheduler.schedule(t,e,this._wrap(n))},e.prototype.now=function(){return this._scheduler.now()},e.prototype._clone=function(t){return new e(t,this._handler)},e.prototype._wrap=function(t){var e=this;return function(n,r){var o=te(t)(e._getRecursiveWrapper(n),r);return o===Zt?(e._handler(o.e)||u(o.e),un):hn(o)}},e.prototype._getRecursiveWrapper=function(t){if(this._recursiveOriginal!==t){this._recursiveOriginal=t;var e=this._clone(t);e._recursiveOriginal=t,e._recursiveWrapper=e,this._recursiveWrapper=e}return this._recursiveWrapper},e.prototype.schedulePeriodic=function(t,e,n){var r=this,o=!1,i=new an;return i.setDisposable(this._scheduler.schedulePeriodic(t,e,function(t){if(o)return null;var e=te(n)(t);return e===Zt?(o=!0,r._handler(e.e)||u(e.e),i.dispose(),null):e})),i},e}(bn),jn=Ut.Notification=function(){function t(){}return t.prototype._accept=function(t,e,n){throw new ae},t.prototype._acceptObserver=function(t,e,n){throw new ae},t.prototype.accept=function(t,e,n){return t&&"object"==typeof t?this._acceptObserver(t):this._accept(t,e,n)},t.prototype.toObservable=function(t){var e=this;return yn(t)||(t=Cn),new Du(function(n){return t.schedule(e,function(t,e){e._acceptObserver(n),"N"===e.kind&&n.onCompleted()})})},t}(),kn=function(t){function e(t){this.value=t,this.kind="N"}return Qe(e,t),e.prototype._accept=function(t){return t(this.value)},e.prototype._acceptObserver=function(t){return t.onNext(this.value)},e.prototype.toString=function(){return"OnNext("+this.value+")"},e}(jn),qn=function(t){function e(t){this.error=t,this.kind="E"}return Qe(e,t),e.prototype._accept=function(t,e){return e(this.error)},e.prototype._acceptObserver=function(t){return t.onError(this.error)},e.prototype.toString=function(){return"OnError("+this.error+")"},e}(jn),Tn=function(t){function e(){this.kind="C"}return Qe(e,t),e.prototype._accept=function(t,e,n){
return n()},e.prototype._acceptObserver=function(t){return t.onCompleted()},e.prototype.toString=function(){return"OnCompleted()"},e}(jn),Rn=jn.createOnNext=function(t){return new kn(t)},Mn=jn.createOnError=function(t){return new qn(t)},Pn=jn.createOnCompleted=function(){return new Tn},In=Ut.Observer=function(){};In.prototype.toNotifier=function(){var t=this;return function(e){return e.accept(t)}},In.prototype.asObserver=function(){var t=this;return new Vn(function(e){t.onNext(e)},function(e){t.onError(e)},function(){t.onCompleted()})},In.prototype.checked=function(){return new Un(this)};var Ln=In.create=function(t,e,n){return t||(t=Ht),e||(e=Qt),n||(n=Ht),new Vn(t,e,n)};In.fromNotifier=function(t,e){var n=be(t,e,1);return new Vn(function(t){return n(Rn(t))},function(t){return n(Mn(t))},function(){return n(Pn())})},In.prototype.notifyOn=function(t){return new Jn(t,this)},In.prototype.makeSafe=function(t){return new AnonymousSafeObserver(this._onNext,this._onError,this._onCompleted,t)};var Wn,zn=Ut.internals.AbstractObserver=function(t){function e(){this.isStopped=!1}return Qe(e,t),e.prototype.next=fe,e.prototype.error=fe,e.prototype.completed=fe,e.prototype.onNext=function(t){!this.isStopped&&this.next(t)},e.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.error(t))},e.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.completed())},e.prototype.dispose=function(){this.isStopped=!0},e.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.error(t),!0)},e}(In),Vn=Ut.AnonymousObserver=function(t){function e(e,n,r){t.call(this),this._onNext=e,this._onError=n,this._onCompleted=r}return Qe(e,t),e.prototype.next=function(t){this._onNext(t)},e.prototype.error=function(t){this._onError(t)},e.prototype.completed=function(){this._onCompleted()},e}(zn),Un=function(t){function e(e){t.call(this),this._observer=e,this._state=0}Qe(e,t);var n=e.prototype;return n.onNext=function(t){this.checkAccess();var e=te(this._observer.onNext).call(this._observer,t);this._state=0,e===Zt&&u(e.e)},n.onError=function(t){this.checkAccess();var e=te(this._observer.onError).call(this._observer,t);this._state=2,e===Zt&&u(e.e)},n.onCompleted=function(){this.checkAccess();var t=te(this._observer.onCompleted).call(this._observer);this._state=2,t===Zt&&u(t.e)},n.checkAccess=function(){if(1===this._state)throw new Error("Re-entrancy detected");if(2===this._state)throw new Error("Observer completed");0===this._state&&(this._state=1)},e}(In),Hn=Ut.internals.ScheduledObserver=function(t){function e(e,n){t.call(this),this.scheduler=e,this.observer=n,this.isAcquired=!1,this.hasFaulted=!1,this.queue=[],this.disposable=new fn}function n(t,e){return function(){t.onNext(e)}}function r(t,e){return function(){t.onError(e)}}function o(t){return function(){t.onCompleted()}}function i(t,e){var n;if(!(t.queue.length>0))return void(t.isAcquired=!1);n=t.queue.shift();var r=te(n)();return r===Zt?(t.queue=[],t.hasFaulted=!0,u(r.e)):void e(t)}return Qe(e,t),e.prototype.next=function(t){this.queue.push(n(this.observer,t))},e.prototype.error=function(t){this.queue.push(r(this.observer,t))},e.prototype.completed=function(){this.queue.push(o(this.observer))},e.prototype.ensureActive=function(){var t=!1;!this.hasFaulted&&this.queue.length>0&&(t=!this.isAcquired,this.isAcquired=!0),t&&this.disposable.setDisposable(this.scheduler.scheduleRecursive(this,i))},e.prototype.dispose=function(){t.prototype.dispose.call(this),this.disposable.dispose()},e}(zn),Jn=function(t){function e(e,n,r){t.call(this,e,n),this._cancel=r}return Qe(e,t),e.prototype.next=function(e){t.prototype.next.call(this,e),this.ensureActive()},e.prototype.error=function(e){t.prototype.error.call(this,e),this.ensureActive()},e.prototype.completed=function(){t.prototype.completed.call(this),this.ensureActive()},e.prototype.dispose=function(){t.prototype.dispose.call(this),this._cancel&&this._cancel.dispose(),this._cancel=null},e}(Hn),Xn=Ut.Observable=function(){function t(t,e){return function(n){var r=n.onError;return n.onError=function(e){s(e,t),r.call(n,e)},e.call(t,n)}}function e(){if(Ut.config.longStackSupport&&ee){var e=this._subscribe,n=te(u)(new Error).e;this.stack=n.stack.substring(n.stack.indexOf("\n")+1),this._subscribe=t(this,e)}}return Wn=e.prototype,e.isObservable=function(t){return t&&Yt(t.subscribe)},Wn.subscribe=Wn.forEach=function(t,e,n){return this._subscribe("object"==typeof t?t:Ln(t,e,n))},Wn.subscribeOnNext=function(t,e){return this._subscribe(Ln("undefined"!=typeof e?function(n){t.call(e,n)}:t))},Wn.subscribeOnError=function(t,e){return this._subscribe(Ln(null,"undefined"!=typeof e?function(n){t.call(e,n)}:t))},Wn.subscribeOnCompleted=function(t,e){return this._subscribe(Ln(null,null,"undefined"!=typeof e?function(){t.call(e)}:t))},e}(),$n=Ut.ObservableBase=function(t){function e(t){return t&&Yt(t.dispose)?t:Yt(t)?on(t):un}function n(t,n){var r=n[0],o=n[1],i=te(o.subscribeCore).call(o,r);i!==Zt||r.fail(Zt.e)||u(Zt.e),r.setDisposable(e(i))}function r(){t.call(this)}return Qe(r,t),r.prototype._subscribe=function(t){var e=new xu(t),r=[e,this];return gn.scheduleRequired()?gn.schedule(r,n):n(null,r),e},r.prototype.subscribeCore=fe,r}(Xn),Kn=Ut.FlatMapObservable=function(t){function e(e,n,r,o){this.resultSelector=Yt(r)?r:null,this.selector=be(Yt(n)?n:function(){return n},o,3),this.source=e,t.call(this)}function n(t,e,n,r){this.i=0,this.selector=e,this.resultSelector=n,this.source=r,this.o=t,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t,this.selector,this.resultSelector,this))},Qe(n,zn),n.prototype._wrapResult=function(t,e,n){return this.resultSelector?t.map(function(t,r){return this.resultSelector(e,t,n,r)},this):t},n.prototype.next=function(t){var e=this.i++,n=te(this.selector)(t,e,this.source);return n===Zt?this.o.onError(n.e):(Gt(n)&&(n=ur(n)),(ve(n)||de(n))&&(n=Xn.from(n)),void this.o.onNext(this._wrapResult(n,t,e)))},n.prototype.error=function(t){this.o.onError(t)},n.prototype.completed=function(){this.o.onCompleted()},e}($n),Qn=Ut.internals.Enumerable=function(){};D.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.isDisposed=!0)};var Gn=function(t){function e(e){this.sources=e,t.call(this)}function n(t,e){if(!t.isDisposed){var n=te(t.e.next).call(t.e);if(n===Zt)return t.o.onError(n.e);if(n.done)return t.o.onCompleted();var o=n.value;Gt(o)&&(o=ur(o));var i=new an;t.subscription.setDisposable(i),i.setDisposable(o.subscribe(new r(t,e)))}}function r(t,e){this._state=t,this._recurse=e,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new fn,r={isDisposed:!1,o:t,subscription:e,e:this.sources[pe]()},o=gn.scheduleRecursive(r,n);return new ln([e,o,new D(r)])},Qe(r,zn),r.prototype.next=function(t){this._state.o.onNext(t)},r.prototype.error=function(t){this._state.o.onError(t)},r.prototype.completed=function(){this._recurse(this._state)},e}($n);Qn.prototype.concat=function(){return new Gn(this)};var Yn=function(t){function e(e){this.sources=e,t.call(this)}function n(t,e){if(!t.isDisposed){var n=te(t.e.next).call(t.e);if(n===Zt)return t.o.onError(n.e);if(n.done)return null!==t.lastError?t.o.onError(t.lastError):t.o.onCompleted();var o=n.value;Gt(o)&&(o=ur(o));var i=new an;t.subscription.setDisposable(i),i.setDisposable(o.subscribe(new r(t,e)))}}function r(t,e){this._state=t,this._recurse=e,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new fn,r={isDisposed:!1,e:this.sources[pe](),subscription:e,lastError:null,o:t},o=gn.scheduleRecursive(r,n);return new ln([e,o,new D(r)])},Qe(r,zn),r.prototype.next=function(t){this._state.o.onNext(t)},r.prototype.error=function(t){this._state.lastError=t,this._recurse(this._state)},r.prototype.completed=function(){this._state.o.onCompleted()},e}($n);Qn.prototype.catchError=function(){return new Yn(this)};var Zn=function(t){function e(t,e){this.v=t,this.c=null==e?-1:e}function n(t){this.v=t.v,this.l=t.c}return Qe(e,t),e.prototype[pe]=function(){return new n(this)},n.prototype.next=function(){return 0===this.l?le:(this.l>0&&this.l--,{done:!1,value:this.v})},e}(Qn),tr=Qn.repeat=function(t,e){return new Zn(t,e)},er=function(t){function e(t,e,n){this.s=t,this.fn=e?be(e,n,3):null}function n(t){this.i=-1,this.s=t.s,this.l=this.s.length,this.fn=t.fn}return Qe(e,t),e.prototype[pe]=function(){return new n(this)},n.prototype.next=function(){return++this.i<this.l?{done:!1,value:this.fn?this.fn(this.s[this.i],this.i,this.s):this.s[this.i]}:le},e}(Qn),nr=Qn.of=function(t,e,n){return new er(t,e,n)},rr=function(t){function e(e,n){this.source=e,this._s=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Jn(this._s,t))},e}($n);Wn.observeOn=function(t){return new rr(this,t)};var or=function(t){function e(e,n){this.source=e,this._s=n,t.call(this)}function n(t,e){var n=e[0],r=e[1],o=e[2];r.setDisposable(new F(t,n.subscribe(o)))}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new an,r=new fn;return r.setDisposable(e),e.setDisposable(this._s.schedule([this.source,r,t],n)),r},e}($n);Wn.subscribeOn=function(t){return new or(this,t)};var ir=function(t){function e(e,n){this._p=e,this._s=n,t.call(this)}function n(t,e){var n=e[0],r=e[1];n.onNext(r),n.onCompleted()}function r(t,e){var n=e[0],r=e[1];n.onError(r)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new an,o=this,i=this._p;return Yt(i)&&(i=te(i)(),i===Zt)?(t.onError(i.e),e):(i.then(function(r){e.setDisposable(o._s.schedule([t,r],n))},function(n){e.setDisposable(o._s.schedule([t,n],r))}),e)},e}($n),ur=Xn.fromPromise=function(t,e){return e||(e=On),new ir(t,e)};Wn.toPromise=function(t){if(t||(t=Ut.config.Promise),!t)throw new he("Promise type not provided nor in Rx.config.Promise");var e=this;return new t(function(t,n){var r;e.subscribe(function(t){r=t},n,function(){t(r)})})};var sr=function(t){function e(e){this.source=e,t.call(this)}function n(t){this.o=t,this.a=[],zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t))},Qe(n,zn),n.prototype.next=function(t){this.a.push(t)},n.prototype.error=function(t){this.o.onError(t)},n.prototype.completed=function(){this.o.onNext(this.a),this.o.onCompleted()},e}($n);Wn.toArray=function(){return new sr(this)},Xn.create=function(t,e){return new Du(t,e)};var cr=function(t){function e(e){this._f=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=te(this._f)();return e===Zt?xr(e.e).subscribe(t):(Gt(e)&&(e=ur(e)),e.subscribe(t))},e}($n),hr=Xn.defer=function(t){return new cr(t)},ar=function(t){function e(e){this.scheduler=e,t.call(this)}function n(t,e){this.observer=t,this.scheduler=e}function r(t,e){return e.onCompleted(),un}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new n(t,this.scheduler);return e.run()},n.prototype.run=function(){var t=this.observer;return this.scheduler===Cn?r(null,t):this.scheduler.schedule(t,r)},e}($n),fr=new ar(Cn),pr=Xn.empty=function(t){return yn(t)||(t=Cn),t===Cn?fr:new ar(t)},lr=function(t){function e(e,n,r){this._iterable=e,this._fn=n,this._scheduler=r,t.call(this)}function n(t,e,n){return function(r,o){var i=te(e.next).call(e);if(i===Zt)return t.onError(i.e);if(i.done)return t.onCompleted();var u=i.value;return Yt(n)&&(u=te(n)(u,r),u===Zt)?t.onError(u.e):(t.onNext(u),void o(r+1))}}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=Object(this._iterable),r=j(e);return this._scheduler.scheduleRecursive(0,n(t,r,this._fn))},e}($n),dr=Math.pow(2,53)-1;x.prototype[pe]=function(){return new B(this._s)},B.prototype[pe]=function(){return this},B.prototype.next=function(){return this._i<this._l?{done:!1,value:this._s.charAt(this._i++)}:le},N.prototype[pe]=function(){return new O(this._a)},O.prototype[pe]=function(){return this},O.prototype.next=function(){return this._i<this._l?{done:!1,value:this._a[this._i++]}:le};var vr=Xn.from=function(t,e,n,r){if(null==t)throw new Error("iterable cannot be null.");if(e&&!Yt(e))throw new Error("mapFn when provided must be a function");if(e)var o=be(e,n,2);return yn(r)||(r=gn),new lr(t,o,r)},br=function(t){function e(e,n){this._args=e,this._scheduler=n,t.call(this)}function n(t,e){var n=e.length;return function(r,o){n>r?(t.onNext(e[r]),o(r+1)):t.onCompleted()}}return Qe(e,t),e.prototype.subscribeCore=function(t){return this._scheduler.scheduleRecursive(0,n(t,this._args))},e}($n),_r=Xn.fromArray=function(t,e){return yn(e)||(e=gn),new br(t,e)},yr=function(t){function e(e,n,r,o,i){this._initialState=e,this._cndFn=n,this._itrFn=r,this._resFn=o,this._s=i,t.call(this)}function n(t,e){if(t.first)t.first=!1;else if(t.newState=te(t.self._itrFn)(t.newState),t.newState===Zt)return t.o.onError(t.newState.e);var n=te(t.self._cndFn)(t.newState);if(n===Zt)return t.o.onError(n.e);if(n){var r=te(t.self._resFn)(t.newState);if(r===Zt)return t.o.onError(r.e);t.o.onNext(r),e(t)}else t.o.onCompleted()}return Qe(e,t),e.prototype.subscribeCore=function(t){var e={o:t,self:this,first:!0,newState:this._initialState};return this._s.scheduleRecursive(e,n)},e}($n);Xn.generate=function(t,e,n,r,o){return yn(o)||(o=gn),new yr(t,e,n,r,o)},Xn.of=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return new br(e,gn)},Xn.ofWithScheduler=function(t){for(var e=arguments.length,n=new Array(e-1),r=1;e>r;r++)n[r-1]=arguments[r];return new br(n,t)},Xn.ofArrayChanges=function(t){if(!Array.isArray(t))throw new TypeError("Array.observe only accepts arrays.");if("function"!=typeof Array.observe&&"function"!=typeof Array.unobserve)throw new TypeError("Array.observe is not supported on your platform");return new Du(function(e){function n(t){for(var n=0,r=t.length;r>n;n++)e.onNext(t[n])}return Array.observe(t,n),function(){Array.unobserve(t,n)}})},Xn.ofObjectChanges=function(t){if(null==t)throw new TypeError("object must not be null or undefined.");if("function"!=typeof Object.observe&&"function"!=typeof Object.unobserve)throw new TypeError("Object.observe is not supported on your platform");return new Du(function(e){function n(t){for(var n=0,r=t.length;r>n;n++)e.onNext(t[n])}return Object.observe(t,n),function(){Object.unobserve(t,n)}})};var Er=function(t){function e(){t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return un},e}($n),Ar=new Er,wr=Xn.never=function(){return Ar},mr=function(t){function e(e,n){this._o=e,this._keys=Object.keys(e),this._scheduler=n,t.call(this)}function n(t,e,n){return function(r,o){if(r<n.length){var i=n[r];t.onNext([i,e[i]]),o(r+1)}else t.onCompleted()}}return Qe(e,t),e.prototype.subscribeCore=function(t){return this._scheduler.scheduleRecursive(0,n(t,this._o,this._keys))},e}($n);Xn.pairs=function(t,e){return e||(e=gn),new mr(t,e)};var Cr=function(t){function e(e,n,r){this.start=e,this.rangeCount=n,this.scheduler=r,t.call(this)}function n(t,e,n){return function(r,o){e>r?(n.onNext(t+r),o(r+1)):n.onCompleted()}}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.scheduler.scheduleRecursive(0,n(this.start,this.rangeCount,t))},e}($n);Xn.range=function(t,e,n){return yn(n)||(n=gn),new Cr(t,e,n)};var Fr=function(t){function e(e,n,r){this.value=e,this.repeatCount=null==n?-1:n,this.scheduler=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new R(t,this);return e.run()},e}($n);R.prototype.run=function(){function t(t,r){return(-1===t||t>0)&&(e.onNext(n),t>0&&t--),0===t?e.onCompleted():void r(t)}var e=this.observer,n=this.parent.value;return this.parent.scheduler.scheduleRecursive(this.parent.repeatCount,t)},Xn.repeat=function(t,e,n){return yn(n)||(n=gn),new Fr(t,e,n)};var gr=function(t){function e(e,n){this._value=e,this._scheduler=n,t.call(this)}function n(t,e){var n=e[0],r=e[1];return r.onNext(n),r.onCompleted(),un}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=[this._value,t];return this._scheduler===Cn?n(null,e):this._scheduler.schedule(e,n)},e}($n),Dr=(Xn["return"]=Xn.just=function(t,e){return yn(e)||(e=Cn),new gr(t,e)},function(t){function e(e,n){this._error=e,this._scheduler=n,t.call(this)}function n(t,e){var n=e[0],r=e[1];return r.onError(n),un}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=[this._error,t];return this._scheduler===Cn?n(null,e):this._scheduler.schedule(e,n)},e}($n)),xr=Xn["throw"]=function(t,e){return yn(e)||(e=Cn),new Dr(t,e)},Br=function(t){function e(e,n){this._resFn=e,this._obsFn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=un,n=te(this._resFn)();if(n===Zt)return new pn(xr(n.e).subscribe(t),e);n&&(e=n);var r=te(this._obsFn)(n);return r===Zt?new pn(xr(r.e).subscribe(t),e):new pn(r.subscribe(t),e)},e}($n);Xn.using=function(t,e){return new Br(t,e)},Wn.amb=function(t){var e=this;return new Du(function(n){function r(){i||(i=u,h.dispose())}function o(){i||(i=s,c.dispose())}var i,u="L",s="R",c=new an,h=new an;Gt(t)&&(t=ur(t));var a=Ln(function(t){r(),i===u&&n.onNext(t)},function(t){r(),i===u&&n.onError(t)},function(){r(),i===u&&n.onCompleted()}),f=Ln(function(t){o(),i===s&&n.onNext(t)},function(t){o(),i===s&&n.onError(t)},function(){o(),i===s&&n.onCompleted()});return c.setDisposable(e.subscribe(a)),h.setDisposable(t.subscribe(f)),new pn(c,h)})},Xn.amb=function(){var t,e=wr();if(Array.isArray(arguments[0]))t=arguments[0];else{var n=arguments.length;t=new Array(t);for(var r=0;n>r;r++)t[r]=arguments[r]}for(var r=0,n=t.length;n>r;r++)e=M(e,t[r]);return e};var Nr=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new an,n=new fn;return n.setDisposable(e),e.setDisposable(this.source.subscribe(new Or(t,n,this._fn))),n},e}($n),Or=function(t){function e(e,n,r){this._o=e,this._s=n,this._fn=r,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._o.onNext(t)},e.prototype.completed=function(){return this._o.onCompleted()},e.prototype.error=function(t){var e=te(this._fn)(t);if(e===Zt)return this._o.onError(e.e);Gt(e)&&(e=ur(e));var n=new an;this._s.setDisposable(n),n.setDisposable(e.subscribe(this._o))},e}(zn);Wn["catch"]=function(t){return Yt(t)?new Nr(this,t):Sr([this,t])};var Sr=Xn["catch"]=function(){var t;if(Array.isArray(arguments[0]))t=arguments[0];else{var e=arguments.length;t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}return nr(t).catchError()};Wn.combineLatest=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return Array.isArray(e[0])?e[0].unshift(this):e.unshift(this),qr.apply(this,e)};var jr=function(t){function e(e,n){this._params=e,this._cb=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){for(var e=this._params.length,n=new Array(e),r={hasValue:m(e,P),hasValueAll:!1,isDone:m(e,P),values:new Array(e)},o=0;e>o;o++){var i=this._params[o],u=new an;n[o]=u,Gt(i)&&(i=ur(i)),u.setDisposable(i.subscribe(new kr(t,o,this._cb,r)))}return new ln(n)},e}($n),kr=function(t){function e(e,n,r,o){this._o=e,this._i=n,this._cb=r,this._state=o,t.call(this)}function n(t){return function(e,n){return n!==t}}return Qe(e,t),e.prototype.next=function(t){if(this._state.values[this._i]=t,this._state.hasValue[this._i]=!0,this._state.hasValueAll||(this._state.hasValueAll=this._state.hasValue.every(Jt))){var e=te(this._cb).apply(null,this._state.values);if(e===Zt)return this._o.onError(e.e);this._o.onNext(e)}else this._state.isDone.filter(n(this._i)).every(Jt)&&this._o.onCompleted()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._state.isDone[this._i]=!0,this._state.isDone.every(Jt)&&this._o.onCompleted()},e}(zn),qr=Xn.combineLatest=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Yt(e[t-1])?e.pop():I;return Array.isArray(e[0])&&(e=e[0]),new jr(e,r)};Wn.concat=function(){for(var t=[],e=0,n=arguments.length;n>e;e++)t.push(arguments[e]);return t.unshift(this),Mr.apply(null,t)};var Tr=function(t){function e(e,n){this._s=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._s.o.onNext(t)},e.prototype.error=function(t){this._s.o.onError(t)},e.prototype.completed=function(){this._s.i++,this._fn(this._s)},e}(zn),Rr=function(t){function e(e){this._sources=e,t.call(this)}function n(t,e){if(!t.disposable.isDisposed){if(t.i===t.sources.length)return t.o.onCompleted();var n=t.sources[t.i];Gt(n)&&(n=ur(n));var r=new an;t.subscription.setDisposable(r),r.setDisposable(n.subscribe(new Tr(t,e)))}}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new fn,r=on(Ht),o={o:t,i:0,subscription:e,disposable:r,sources:this._sources},i=Cn.scheduleRecursive(o,n);return new ln([e,r,i])},e}($n),Mr=Xn.concat=function(){var t;if(Array.isArray(arguments[0]))t=arguments[0];else{t=new Array(arguments.length);for(var e=0,n=arguments.length;n>e;e++)t[e]=arguments[e]}return new Rr(t)};Wn.concatAll=function(){return this.merge(1)};var Pr=function(t){function e(e,n){this.source=e,this.maxConcurrent=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new en;return e.add(this.source.subscribe(new Ir(t,this.maxConcurrent,e))),e},e}($n),Ir=function(t){function e(e,n,r){this.o=e,this.max=n,this.g=r,this.done=!1,this.q=[],this.activeCount=0,t.call(this)}function n(e,n){this.parent=e,this.sad=n,t.call(this)}return Qe(e,t),e.prototype.handleSubscribe=function(t){var e=new an;this.g.add(e),Gt(t)&&(t=ur(t)),e.setDisposable(t.subscribe(new n(this,e)))},e.prototype.next=function(t){this.activeCount<this.max?(this.activeCount++,this.handleSubscribe(t)):this.q.push(t)},e.prototype.error=function(t){this.o.onError(t)},e.prototype.completed=function(){this.done=!0,0===this.activeCount&&this.o.onCompleted()},Qe(n,t),n.prototype.next=function(t){this.parent.o.onNext(t)},n.prototype.error=function(t){this.parent.o.onError(t)},n.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.q.length>0?this.parent.handleSubscribe(this.parent.q.shift()):(this.parent.activeCount--,this.parent.done&&0===this.parent.activeCount&&this.parent.o.onCompleted())},e}(zn);Wn.merge=function(t){return"number"!=typeof t?Lr(this,t):new Pr(this,t)};var Lr=Xn.merge=function(){var t,e,n=[],r=arguments.length;if(arguments[0])if(yn(arguments[0]))for(t=arguments[0],e=1;r>e;e++)n.push(arguments[e]);else for(t=Cn,e=0;r>e;e++)n.push(arguments[e]);else for(t=Cn,e=1;r>e;e++)n.push(arguments[e]);return Array.isArray(n[0])&&(n=n[0]),T(t,n).mergeAll()},Wr=function(t){function e(e){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new en,n=new an;return e.add(n),n.setDisposable(this.source.subscribe(new zr(t,e))),e},e}($n),zr=function(t){function e(e,n){this.o=e,this.g=n,this.done=!1,t.call(this)}function n(e,n){this.parent=e,this.sad=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=new an;this.g.add(e),Gt(t)&&(t=ur(t)),e.setDisposable(t.subscribe(new n(this,e)))},e.prototype.error=function(t){this.o.onError(t)},e.prototype.completed=function(){this.done=!0,1===this.g.length&&this.o.onCompleted()},Qe(n,t),n.prototype.next=function(t){this.parent.o.onNext(t)},n.prototype.error=function(t){this.parent.o.onError(t)},n.prototype.completed=function(){this.parent.g.remove(this.sad),this.parent.done&&1===this.parent.g.length&&this.parent.o.onCompleted()},e}(zn);Wn.mergeAll=function(){return new Wr(this)};var Vr=Ut.CompositeError=function(t){this.innerErrors=t,this.message="This contains multiple errors. Check the innerErrors",Error.call(this)};Vr.prototype=Object.create(Error.prototype),Vr.prototype.name="CompositeError";var Ur=function(t){function e(e){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new en,n=new an,r={isStopped:!1,errors:[],o:t};return e.add(n),n.setDisposable(this.source.subscribe(new Hr(e,r))),e},e}($n),Hr=function(t){function e(e,n){this._group=e,this._state=n,t.call(this)}function n(t,e){0===e.length?t.onCompleted():1===e.length?t.onError(e[0]):t.onError(new Vr(e))}function r(e,n,r){this._inner=e,this._group=n,this._state=r,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=new an;this._group.add(e),Gt(t)&&(t=ur(t)),e.setDisposable(t.subscribe(new r(e,this._group,this._state)))},e.prototype.error=function(t){this._state.errors.push(t),this._state.isStopped=!0,1===this._group.length&&n(this._state.o,this._state.errors)},e.prototype.completed=function(){this._state.isStopped=!0,1===this._group.length&&n(this._state.o,this._state.errors)},Qe(r,t),r.prototype.next=function(t){this._state.o.onNext(t)},r.prototype.error=function(t){this._state.errors.push(t),this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&n(this._state.o,this._state.errors)},r.prototype.completed=function(){this._group.remove(this._inner),this._state.isStopped&&1===this._group.length&&n(this._state.o,this._state.errors)},e}(zn);Xn.mergeDelayError=function(){var t;if(Array.isArray(arguments[0]))t=arguments[0];else{var e=arguments.length;t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}var r=T(null,t);return new Ur(r)},Wn.onErrorResumeNext=function(t){if(!t)throw new Error("Second observable is required");return $r([this,t])};var Jr=function(t){function e(e){this.sources=e,t.call(this)}function n(t,e){if(t.pos<t.sources.length){var n=t.sources[t.pos++];Gt(n)&&(n=ur(n));var r=new an;t.subscription.setDisposable(r),r.setDisposable(n.subscribe(new Xr(t,e)))}else t.o.onCompleted()}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new fn,r={pos:0,subscription:e,o:t,sources:this.sources},o=Cn.scheduleRecursive(r,n);return new pn(e,o)},e}($n),Xr=function(t){function e(e,n){this._state=e,this._recurse=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._state.o.onNext(t)},e.prototype.error=function(){this._recurse(this._state)},e.prototype.completed=function(){this._recurse(this._state)},e}(zn),$r=Xn.onErrorResumeNext=function(){var t=[];if(Array.isArray(arguments[0]))t=arguments[0];else{var e=arguments.length;t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}return new Jr(t)},Kr=function(t){function e(e,n){this._s=e,this._o=Gt(n)?ur(n):n,this._open=!1,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new an;e.setDisposable(this._s.subscribe(new Qr(t,this))),Gt(this._o)&&(this._o=ur(this._o));var n=new an;return n.setDisposable(this._o.subscribe(new Gr(t,this,n))),new pn(e,n)},e}($n),Qr=function(t){function e(e,n){this._o=e,this._p=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._p._open&&this._o.onNext(t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.onCompleted=function(){this._p._open&&this._o.onCompleted()},e}(zn),Gr=function(t){function e(e,n,r){this._o=e,this._p=n,this._r=r,t.call(this)}return Qe(e,t),e.prototype.next=function(){this._p._open=!0,this._r.dispose()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.onCompleted=function(){this._r.dispose()},e}(zn);Wn.skipUntil=function(t){return new Kr(this,t)};var Yr=function(t){function e(e){this.source=e,t.call(this)}function n(t,e){this.o=t,this.inner=e,this.stopped=!1,this.latest=0,this.hasLatest=!1,zn.call(this)}function r(t,e){this.parent=t,this.id=e,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new fn,r=this.source.subscribe(new n(t,e));return new pn(r,e)},Qe(n,zn),n.prototype.next=function(t){var e=new an,n=++this.latest;this.hasLatest=!0,this.inner.setDisposable(e),Gt(t)&&(t=ur(t)),e.setDisposable(t.subscribe(new r(this,n)))},n.prototype.error=function(t){this.o.onError(t)},n.prototype.completed=function(){this.stopped=!0,!this.hasLatest&&this.o.onCompleted()},Qe(r,zn),r.prototype.next=function(t){this.parent.latest===this.id&&this.parent.o.onNext(t)},r.prototype.error=function(t){this.parent.latest===this.id&&this.parent.o.onError(t)},r.prototype.completed=function(){this.parent.latest===this.id&&(this.parent.hasLatest=!1,this.parent.stopped&&this.parent.o.onCompleted())},e}($n);Wn["switch"]=Wn.switchLatest=function(){return new Yr(this)};var Zr=function(t){function e(e,n){this.source=e,this.other=Gt(n)?ur(n):n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return new pn(this.source.subscribe(t),this.other.subscribe(new to(t)))},e}($n),to=function(t){function e(e){this._o=e,t.call(this)}return Qe(e,t),e.prototype.next=function(){this._o.onCompleted()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.onCompleted=Ht,e}(zn);Wn.takeUntil=function(t){return new Zr(this,t)};var eo=function(t){function e(e,n,r){this._s=e,this._ss=n,this._cb=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){for(var e=this._ss.length,n={hasValue:m(e,P),hasValueAll:!1,values:new Array(e)},r=this._ss.length,o=new Array(r+1),i=0;r>i;i++){var u=this._ss[i],s=new an;Gt(u)&&(u=ur(u)),s.setDisposable(u.subscribe(new no(t,i,n))),o[i]=s}var c=new an;return c.setDisposable(this._s.subscribe(new ro(t,this._cb,n))),o[r]=c,new ln(o)},e}($n),no=function(t){function e(e,n,r){this._o=e,this._i=n,this._state=r,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._state.values[this._i]=t,this._state.hasValue[this._i]=!0,this._state.hasValueAll=this._state.hasValue.every(Jt)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=Ht,e}(zn),ro=function(t){function e(e,n,r){this._o=e,this._cb=n,this._state=r,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=[t].concat(this._state.values);if(this._state.hasValueAll){var n=te(this._cb).apply(null,e);return n===Zt?this._o.onError(n.e):void this._o.onNext(n)}},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.withLatestFrom=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Yt(e[t-1])?e.pop():I;return Array.isArray(e[0])&&(e=e[0]),new eo(this,e,r)};var oo=function(t){function e(e,n){this._s=e,this._cb=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){for(var e=this._s.length,n=new Array(e),r=m(e,P),o=m(e,L),i=0;e>i;i++){var u=this._s[i],s=new an;n[i]=s,Gt(u)&&(u=ur(u)),s.setDisposable(u.subscribe(new io(t,i,this,o,r)))}return new ln(n)},e}($n),io=function(t){function e(e,n,r,o,i){this._o=e,this._i=n,this._p=r,this._q=o,this._d=i,t.call(this)}function n(t){return t.length>0}function r(t){return t.shift()}function o(t){return function(e,n){return n!==t}}return Qe(e,t),e.prototype.next=function(t){if(this._q[this._i].push(t),this._q.every(n)){var e=this._q.map(r),i=te(this._p._cb).apply(null,e);if(i===Zt)return this._o.onError(i.e);this._o.onNext(i)}else this._d.filter(o(this._i)).every(Jt)&&this._o.onCompleted()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._d[this._i]=!0,this._d.every(Jt)&&this._o.onCompleted()},e}(zn);Wn.zip=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Yt(e[t-1])?e.pop():I;Array.isArray(e[0])&&(e=e[0]);var o=this;return e.unshift(o),new oo(e,r)},Xn.zip=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];Array.isArray(e[0])&&(e=Yt(e[1])?e[0].concat(e[1]):e[0]);var r=e.shift();return r.zip.apply(r,e)};var uo=function(t){function e(e,n){this.sources=e,this._cb=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){for(var e=this.sources,n=e.length,r=new Array(n),o={q:m(n,L),done:m(n,P),cb:this._cb,o:t},i=0;n>i;i++)!function(t){var n=e[t],i=new an;(ve(n)||de(n))&&(n=vr(n)),r[t]=i,i.setDisposable(n.subscribe(new so(o,t)))}(i);return new ln(r)},e}($n),so=function(t){function e(e,n){this._s=e,this._i=n,t.call(this)}function n(t){return t.length>0}function r(t){return t.shift()}function o(t){return function(e,n){return n!==t}}return Qe(e,t),e.prototype.next=function(t){if(this._s.q[this._i].push(t),this._s.q.every(n)){var e=this._s.q.map(r),i=te(this._s.cb).apply(null,e);if(i===Zt)return this._s.o.onError(i.e);this._s.o.onNext(i)}else this._s.done.filter(o(this._i)).every(Jt)&&this._s.o.onCompleted();
},e.prototype.error=function(t){this._s.o.onError(t)},e.prototype.completed=function(){this._s.done[this._i]=!0,this._s.done.every(Jt)&&this._s.o.onCompleted()},e}(zn);Wn.zipIterable=function(){if(0===arguments.length)throw new Error("invalid arguments");for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Yt(e[t-1])?e.pop():I,o=this;return e.unshift(o),new uo(e,r)},Wn.asObservable=function(){return new Du(W(this),this)},Wn.bufferWithCount=Wn.bufferCount=function(t,e){return"number"!=typeof e&&(e=t),this.windowWithCount(t,e).flatMap(z).filter(V)};var co=function(t){function e(e){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new ho(t))},e}($n),ho=function(t){function e(e){this._o=e,t.call(this)}return Qe(e,t),e.prototype.next=function(t){t.accept(this._o)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.dematerialize=function(){return new co(this)};var ao=function(t){function e(e,n,r){this.source=e,this.keyFn=n,this.comparer=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new fo(t,this.keyFn,this.comparer))},e}($n),fo=function(t){function e(e,n,r){this.o=e,this.keyFn=n,this.comparer=r,this.hasCurrentKey=!1,this.currentKey=null,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e,n=t;return Yt(this.keyFn)&&(n=te(this.keyFn)(t),n===Zt)?this.o.onError(n.e):this.hasCurrentKey&&(e=te(this.comparer)(this.currentKey,n),e===Zt)?this.o.onError(e.e):void(this.hasCurrentKey&&e||(this.hasCurrentKey=!0,this.currentKey=n,this.o.onNext(t)))},e.prototype.error=function(t){this.o.onError(t)},e.prototype.completed=function(){this.o.onCompleted()},e}(zn);Wn.distinctUntilChanged=function(t,e){return e||(e=$t),new ao(this,t,e)};var po=function(t){function e(e,n,r,o){this.source=e,this._oN=n,this._oE=r,this._oC=o,t.call(this)}function n(t,e){this.o=t,this.t=!e._oN||Yt(e._oN)?Ln(e._oN||Ht,e._oE||Ht,e._oC||Ht):e._oN,this.isStopped=!1,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t,this))},Qe(n,zn),n.prototype.next=function(t){var e=te(this.t.onNext).call(this.t,t);e===Zt&&this.o.onError(e.e),this.o.onNext(t)},n.prototype.error=function(t){var e=te(this.t.onError).call(this.t,t);return e===Zt?this.o.onError(e.e):void this.o.onError(t)},n.prototype.completed=function(){var t=te(this.t.onCompleted).call(this.t);return t===Zt?this.o.onError(t.e):void this.o.onCompleted()},e}($n);Wn["do"]=Wn.tap=Wn.doAction=function(t,e,n){return new po(this,t,e,n)},Wn.doOnNext=Wn.tapOnNext=function(t,e){return this.tap("undefined"!=typeof e?function(n){t.call(e,n)}:t)},Wn.doOnError=Wn.tapOnError=function(t,e){return this.tap(Ht,"undefined"!=typeof e?function(n){t.call(e,n)}:t)},Wn.doOnCompleted=Wn.tapOnCompleted=function(t,e){return this.tap(Ht,null,"undefined"!=typeof e?function(){t.call(e)}:t)};var lo=function(t){function e(e,n,r){this.source=e,this._fn=be(n,r,0),t.call(this)}function n(t,e){this.isDisposed=!1,this._s=t,this._fn=e}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=te(this.source.subscribe).call(this.source,t);return e===Zt&&(this._fn(),u(e.e)),new n(e,this._fn)},n.prototype.dispose=function(){if(!this.isDisposed){var t=te(this._s.dispose).call(this._s);this._fn(),t===Zt&&u(t.e)}},e}($n);Wn["finally"]=function(t,e){return new lo(this,t,e)};var vo=function(t){function e(e){this.source=e,t.call(this)}function n(t){this.o=t,this.isStopped=!1}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t))},n.prototype.onNext=Ht,n.prototype.onError=function(t){this.isStopped||(this.isStopped=!0,this.o.onError(t))},n.prototype.onCompleted=function(){this.isStopped||(this.isStopped=!0,this.o.onCompleted())},n.prototype.dispose=function(){this.isStopped=!0},n.prototype.fail=function(t){return this.isStopped?!1:(this.isStopped=!0,this.observer.onError(t),!0)},e}($n);Wn.ignoreElements=function(){return new vo(this)};var bo=function(t){function e(e,n){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new _o(t))},e}($n),_o=function(t){function e(e){this._o=e,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._o.onNext(Rn(t))},e.prototype.error=function(t){this._o.onNext(Mn(t)),this._o.onCompleted()},e.prototype.completed=function(){this._o.onNext(Pn()),this._o.onCompleted()},e}(zn);Wn.materialize=function(){return new bo(this)},Wn.repeat=function(t){return tr(this,t).concat()},Wn.retry=function(t){return tr(this,t).catchError()};var yo=function(t){function e(t){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,t.isDisposed=!0)}}}function n(e,n){this.source=e,this._notifier=n,t.call(this)}return Qe(n,t),n.prototype.subscribeCore=function(t){var n,r=new Ou,o=new Ou,i=this._notifier(r),u=i.subscribe(o),s=this.source["@@iterator"](),c={isDisposed:!1},h=new fn,a=gn.scheduleRecursive(null,function(e,i){if(!c.isDisposed){var u=s.next();if(u.done)return void(n?t.onError(n):t.onCompleted());var a=u.value;Gt(a)&&(a=ur(a));var f=new an,p=new an;h.setDisposable(new pn(p,f)),f.setDisposable(a.subscribe(function(e){t.onNext(e)},function(e){p.setDisposable(o.subscribe(i,function(e){t.onError(e)},function(){t.onCompleted()})),r.onNext(e),f.dispose()},function(){t.onCompleted()}))}});return new ln([u,h,a,e(c)])},n}($n);Wn.retryWhen=function(t){return new yo(U(this),t)};var Eo=function(t){function e(t){return{isDisposed:!1,dispose:function(){this.isDisposed||(this.isDisposed=!0,t.isDisposed=!0)}}}function n(e,n){this.source=e,this._notifier=n,t.call(this)}return Qe(n,t),n.prototype.subscribeCore=function(t){var n,r=new Ou,o=new Ou,i=this._notifier(r),u=i.subscribe(o),s=this.source["@@iterator"](),c={isDisposed:!1},h=new fn,a=gn.scheduleRecursive(null,function(e,i){if(!c.isDisposed){var u=s.next();if(u.done)return void(n?t.onError(n):t.onCompleted());var a=u.value;Gt(a)&&(a=ur(a));var f=new an,p=new an;h.setDisposable(new pn(p,f)),f.setDisposable(a.subscribe(function(e){t.onNext(e)},function(e){t.onError(e)},function(){p.setDisposable(o.subscribe(i,function(e){t.onError(e)},function(){t.onCompleted()})),r.onNext(null),f.dispose()}))}});return new ln([u,h,a,e(c)])},n}($n);Wn.repeatWhen=function(t){return new Eo(U(this),t)};var Ao=function(t){function e(e,n,r,o){this.source=e,this.accumulator=n,this.hasSeed=r,this.seed=o,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new wo(t,this))},e}($n),wo=function(t){function e(e,n){this._o=e,this._p=n,this._fn=n.accumulator,this._hs=n.hasSeed,this._s=n.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){return!this._hv&&(this._hv=!0),this._ha?this._a=te(this._fn)(this._a,t,this._i,this._p):(this._a=this._hs?te(this._fn)(this._s,t,this._i,this._p):t,this._ha=!0),this._a===Zt?this._o.onError(this._a.e):(this._o.onNext(this._a),void this._i++)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){!this._hv&&this._hs&&this._o.onNext(this._s),this._o.onCompleted()},e}(zn);Wn.scan=function(){var t,e=!1,n=arguments[0];return 2===arguments.length&&(e=!0,t=arguments[1]),new Ao(this,n,e,t)};var mo=function(t){function e(e,n){this.source=e,this._c=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Co(t,this._c))},e}($n),Co=function(t){function e(e,n){this._o=e,this._c=n,this._q=[],t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._q.push(t),this._q.length>this._c&&this._o.onNext(this._q.shift())},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.skipLast=function(t){if(0>t)throw new ce;return new mo(this,t)},Wn.startWith=function(){var t,e=0;arguments.length&&yn(arguments[0])?(t=arguments[0],e=1):t=Cn;for(var n=[],r=e,o=arguments.length;o>r;r++)n.push(arguments[r]);return Mr.apply(null,[_r(n,t),this])};var Fo=function(t){function e(e,n){this._o=e,this._c=n,this._q=[],t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._q.push(t),this._q.length>this._c&&this._q.shift()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){for(;this._q.length>0;)this._o.onNext(this._q.shift());this._o.onCompleted()},e}(zn);Wn.takeLast=function(t){if(0>t)throw new ce;var e=this;return new Du(function(n){return e.subscribe(new Fo(n,t))},e)};var go=function(t){function e(e,n){this._o=e,this._c=n,this._q=[],t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._q.push(t),this._q.length>this._c&&this._q.shift()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(this._q),this._o.onCompleted()},e}(zn);Wn.takeLastBuffer=function(t){if(0>t)throw new ce;var e=this;return new Du(function(n){return e.subscribe(new go(n,t))},e)},Wn.windowWithCount=Wn.windowCount=function(t,e){var n=this;if(+t||(t=0),Math.abs(t)===1/0&&(t=0),0>=t)throw new ce;if(null==e&&(e=t),+e||(e=0),Math.abs(e)===1/0&&(e=0),0>=e)throw new ce;return new Du(function(r){function o(){var t=new Ou;c.push(t),r.onNext(Ye(t,u))}var i=new an,u=new dn(i),s=0,c=[];return o(),i.setDisposable(n.subscribe(function(n){for(var r=0,i=c.length;i>r;r++)c[r].onNext(n);var u=s-t+1;u>=0&&u%e===0&&c.shift().onCompleted(),++s%e===0&&o()},function(t){for(;c.length>0;)c.shift().onError(t);r.onError(t)},function(){for(;c.length>0;)c.shift().onCompleted();r.onCompleted()})),u},n)},Wn.selectConcat=Wn.concatMap=function(t,e,n){return Yt(t)&&Yt(e)?this.concatMap(function(n,r){var o=t(n,r);return Gt(o)&&(o=ur(o)),(ve(o)||de(o))&&(o=vr(o)),o.map(function(t,o){return e(n,t,r,o)})}):Yt(t)?H(this,t,n):H(this,function(){return t})},Wn.concatMapObserver=Wn.selectConcatObserver=function(t,e,n,r){var o=this,i=be(t,r,2),u=be(e,r,1),s=be(n,r,0);return new Du(function(t){var e=0;return o.subscribe(function(n){var r;try{r=i(n,e++)}catch(o){return void t.onError(o)}Gt(r)&&(r=ur(r)),t.onNext(r)},function(e){var n;try{n=u(e)}catch(r){return void t.onError(r)}Gt(n)&&(n=ur(n)),t.onNext(n),t.onCompleted()},function(){var e;try{e=s()}catch(n){return void t.onError(n)}Gt(e)&&(e=ur(e)),t.onNext(e),t.onCompleted()})},this).concatAll()};var Do=function(t){function e(e,n){this._o=e,this._d=n,this._f=!1,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._f=!0,this._o.onNext(t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){!this._f&&this._o.onNext(this._d),this._o.onCompleted()},e}(zn);Wn.defaultIfEmpty=function(t){var e=this;return t===n&&(t=null),new Du(function(n){return e.subscribe(new Do(n,t))},e)},X.prototype.push=function(t){var e=-1===J(this.set,t,this.comparer);return e&&this.set.push(t),e};var xo=function(t){function e(e,n,r){this.source=e,this._keyFn=n,this._cmpFn=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Bo(t,this._keyFn,this._cmpFn))},e}($n),Bo=function(t){function e(e,n,r){this._o=e,this._keyFn=n,this._h=new X(r),t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=t;return Yt(this._keyFn)&&(e=te(this._keyFn)(t),e===Zt)?this._o.onError(e.e):void(this._h.push(e)&&this._o.onNext(t))},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.distinct=function(t,e){return e||(e=$t),new xo(this,t,e)},Wn.groupBy=function(t,e){return this.groupByUntil(t,e,wr)},Wn.groupByUntil=function(t,e,r){var o=this;return new Du(function(i){var u=new Vi,s=new en,c=new dn(s),h=function(t){return function(e){e.onError(t)}};return s.add(o.subscribe(function(o){var a=te(t)(o);if(a===Zt)return u.forEach(h(a.e)),i.onError(a.e);var f=!1,p=u.get(a);if(p===n&&(p=new Ou,u.set(a,p),f=!0),f){var l=new Nu(a,p,c),d=new Nu(a,p),v=te(r)(d);if(v===Zt)return u.forEach(h(v.e)),i.onError(v.e);i.onNext(l);var b=new an;s.add(b),b.setDisposable(v.take(1).subscribe(Ht,function(t){u.forEach(h(t)),i.onError(t)},function(){u["delete"](a)&&p.onCompleted(),s.remove(b)}))}var _=o;return Yt(e)&&(_=te(e)(o),_===Zt)?(u.forEach(h(_.e)),i.onError(_.e)):void p.onNext(_)},function(t){u.forEach(h(t)),i.onError(t)},function(){u.forEach(function(t){t.onCompleted()}),i.onCompleted()})),c},o)};var No=function(t){function e(e,n,r){this.source=e,this.selector=be(n,r,3),t.call(this)}function n(t,e){return function(n,r,o){return t.call(this,e.selector(n,r,o),r,o)}}function r(t,e,n){this.o=t,this.selector=e,this.source=n,this.i=0,zn.call(this)}return Qe(e,t),e.prototype.internalMap=function(t,r){return new e(this.source,n(t,this),r)},e.prototype.subscribeCore=function(t){return this.source.subscribe(new r(t,this.selector,this))},Qe(r,zn),r.prototype.next=function(t){var e=te(this.selector)(t,this.i++,this.source);return e===Zt?this.o.onError(e.e):void this.o.onNext(e)},r.prototype.error=function(t){this.o.onError(t)},r.prototype.completed=function(){this.o.onCompleted()},e}($n);Wn.map=Wn.select=function(t,e){var n="function"==typeof t?t:function(){return t};return this instanceof No?this.internalMap(n,e):new No(this,n,e)},Wn.pluck=function(){var t=arguments.length,e=new Array(t);if(0===t)throw new Error("List of properties cannot be empty.");for(var n=0;t>n;n++)e[n]=arguments[n];return this.map($(e,t))},Wn.flatMap=Wn.selectMany=Wn.mergeMap=function(t,e,n){return new Kn(this,t,e,n).mergeAll()},Wn.flatMapObserver=Wn.selectManyObserver=function(t,e,n,r){var o=this;return new Du(function(i){var u=0;return o.subscribe(function(e){var n;try{n=t.call(r,e,u++)}catch(o){return void i.onError(o)}Gt(n)&&(n=ur(n)),i.onNext(n)},function(t){var n;try{n=e.call(r,t)}catch(o){return void i.onError(o)}Gt(n)&&(n=ur(n)),i.onNext(n),i.onCompleted()},function(){var t;try{t=n.call(r)}catch(e){return void i.onError(e)}Gt(t)&&(t=ur(t)),i.onNext(t),i.onCompleted()})},o).mergeAll()},Wn.flatMapLatest=Wn.switchMap=function(t,e,n){return new Kn(this,t,e,n).switchLatest()};var Oo=function(t){function e(e,n){this.source=e,this._count=n,t.call(this)}function n(t,e){this._o=t,this._r=e,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t,this._count))},Qe(n,zn),n.prototype.next=function(t){this._r<=0?this._o.onNext(t):this._r--},n.prototype.error=function(t){this._o.onError(t)},n.prototype.completed=function(){this._o.onCompleted()},e}($n);Wn.skip=function(t){if(0>t)throw new ce;return new Oo(this,t)};var So=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new jo(t,this))},e}($n),jo=function(t){function e(e,n){this._o=e,this._p=n,this._i=0,this._r=!1,t.call(this)}return Qe(e,t),e.prototype.next=function(t){if(!this._r){var e=te(this._p._fn)(t,this._i++,this._p);if(e===Zt)return this._o.onError(e.e);this._r=!e}this._r&&this._o.onNext(t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.skipWhile=function(t,e){var n=be(t,e,3);return new So(this,n)};var ko=function(t){function e(e,n){this.source=e,this._count=n,t.call(this)}function n(t,e){this._o=t,this._c=e,this._r=e,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new n(t,this._count))},Qe(n,zn),n.prototype.next=function(t){this._r-- >0&&(this._o.onNext(t),this._r<=0&&this._o.onCompleted())},n.prototype.error=function(t){this._o.onError(t)},n.prototype.completed=function(){this._o.onCompleted()},e}($n);Wn.take=function(t,e){if(0>t)throw new ce;return 0===t?pr(e):new ko(this,t)};var qo=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new To(t,this))},e}($n),To=function(t){function e(e,n){this._o=e,this._p=n,this._i=0,this._r=!0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){return this._r&&(this._r=te(this._p._fn)(t,this._i++,this._p),this._r===Zt)?this._o.onError(this._r.e):void(this._r?this._o.onNext(t):this._o.onCompleted())},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.takeWhile=function(t,e){var n=be(t,e,3);return new qo(this,n)};var Ro=function(t){function e(e,n,r){this.source=e,this.predicate=be(n,r,3),t.call(this)}function n(t,e){return function(n,r,o){return e.predicate(n,r,o)&&t.call(this,n,r,o)}}function r(t,e,n){this.o=t,this.predicate=e,this.source=n,this.i=0,zn.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new r(t,this.predicate,this))},e.prototype.internalFilter=function(t,r){return new e(this.source,n(t,this),r)},Qe(r,zn),r.prototype.next=function(t){var e=te(this.predicate)(t,this.i++,this.source);return e===Zt?this.o.onError(e.e):void(e&&this.o.onNext(t))},r.prototype.error=function(t){this.o.onError(t)},r.prototype.completed=function(){this.o.onCompleted()},e}($n);Wn.filter=Wn.where=function(t,e){return this instanceof Ro?this.internalFilter(t,e):new Ro(this,t,e)};var Mo=function(t){function e(e,n,r){this.source=e,this._k=n,this._c=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Po(t,this._k,this._c))},e}($n),Po=function(t){function e(e,n,r){this._o=e,this._k=n,this._c=r,this._v=null,this._hv=!1,this._l=[],t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=te(this._k)(t);if(e===Zt)return this._o.onError(e.e);var n=0;if(this._hv){if(n=te(this._c)(e,this._v),n===Zt)return this._o.onError(n.e)}else this._hv=!0,this._v=e;n>0&&(this._v=e,this._l=[]),n>=0&&this._l.push(t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(this._l),this._o.onCompleted()},e}(zn),Io=function(t){function e(e,n,r,o){this.source=e,this.accumulator=n,this.hasSeed=r,this.seed=o,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Lo(t,this))},e}($n),Lo=function(t){function e(e,n){this._o=e,this._p=n,this._fn=n.accumulator,this._hs=n.hasSeed,this._s=n.seed,this._ha=!1,this._a=null,this._hv=!1,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){return!this._hv&&(this._hv=!0),this._ha?this._a=te(this._fn)(this._a,t,this._i,this._p):(this._a=this._hs?te(this._fn)(this._s,t,this._i,this._p):t,this._ha=!0),this._a===Zt?this._o.onError(this._a.e):void this._i++},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._hv&&this._o.onNext(this._a),!this._hv&&this._hs&&this._o.onNext(this._s),!this._hv&&!this._hs&&this._o.onError(new ue),this._o.onCompleted()},e}(zn);Wn.reduce=function(){var t,e=!1,n=arguments[0];return 2===arguments.length&&(e=!0,t=arguments[1]),new Io(this,n,e,t)};var Wo=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new zo(t,this._fn,this.source))},e}($n),zo=function(t){function e(e,n,r){this._o=e,this._fn=n,this._s=r,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=te(this._fn)(t,this._i++,this._s);return e===Zt?this._o.onError(e.e):void(Boolean(e)&&(this._o.onNext(!0),this._o.onCompleted()))},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},e}(zn);Wn.some=function(t,e){var n=be(t,e,3);return new Wo(this,n)};var Vo=function(t){function e(e){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Uo(t))},e}($n),Uo=function(t){function e(e){this._o=e,t.call(this)}return Qe(e,t),e.prototype.next=function(){this._o.onNext(!1),this._o.onCompleted()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},e}(zn);Wn.isEmpty=function(){return new Vo(this)};var Ho=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Jo(t,this._fn,this.source))},e}($n),Jo=function(t){function e(e,n,r){this._o=e,this._fn=n,this._s=r,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=te(this._fn)(t,this._i++,this._s);return e===Zt?this._o.onError(e.e):void(Boolean(e)||(this._o.onNext(!1),this._o.onCompleted()))},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(!0),this._o.onCompleted()},e}(zn);Wn.every=function(t,e){var n=be(t,e,3);return new Ho(this,n)};var Xo=function(t){function e(e,n,r){var o=+r||0;Math.abs(o)===1/0&&(o=0),this.source=e,this._elem=n,this._n=o,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this._n<0?(t.onNext(!1),t.onCompleted(),un):this.source.subscribe(new $o(t,this._elem,this._n))},e}($n),$o=function(t){function e(e,n,r){this._o=e,this._elem=n,this._n=r,this._i=0,t.call(this)}function n(t,e){return 0===t&&0===e||t===e||isNaN(t)&&isNaN(e)}return Qe(e,t),e.prototype.next=function(t){this._i++>=this._n&&n(t,this._elem)&&(this._o.onNext(!0),this._o.onCompleted())},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(!1),this._o.onCompleted()},e}(zn);Wn.includes=function(t,e){return new Xo(this,t,e)};var Ko=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Qo(t,this._fn,this.source))},e}($n),Qo=function(t){function e(e,n,r){this._o=e,this._fn=n,this._s=r,this._i=0,this._c=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){if(this._fn){var e=te(this._fn)(t,this._i++,this._s);if(e===Zt)return this._o.onError(e.e);Boolean(e)&&this._c++}else this._c++},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},e}(zn);Wn.count=function(t,e){var n=be(t,e,3);return new Ko(this,n)};var Go=function(t){function e(e,n,r){this.source=e,this._e=n,this._n=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this._n<0?(t.onNext(-1),t.onCompleted(),un):this.source.subscribe(new Yo(t,this._e,this._n))},e}($n),Yo=function(t){function e(e,n,r){this._o=e,this._e=n,this._n=r,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._i>=this._n&&t===this._e&&(this._o.onNext(this._i),this._o.onCompleted()),this._i++},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(-1),this._o.onCompleted()},e}(zn);Wn.indexOf=function(t,e){var n=+e||0;return Math.abs(n)===1/0&&(n=0),new Go(this,t,n)};var Zo=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new ti(t,this._fn,this.source))},e}($n),ti=function(t){function e(e,n,r){this._o=e,this._fn=n,this._s=r,this._i=0,this._c=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){if(this._fn){var e=te(this._fn)(t,this._i++,this._s);if(e===Zt)return this._o.onError(e.e);this._c+=e}else this._c+=t},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(this._c),this._o.onCompleted()},e}(zn);Wn.sum=function(t,e){var n=be(t,e,3);return new Zo(this,n)},Wn.minBy=function(t,e){return e||(e=Kt),new Mo(this,t,function(t,n){return-1*e(t,n)})},Wn.min=function(t){return this.minBy(Jt,t).map(K)},Wn.maxBy=function(t,e){return e||(e=Kt),new Mo(this,t,e)},Wn.max=function(t){return this.maxBy(Jt,t).map(K)};var ei=function(t){function e(e,n){this.source=e,this._fn=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new ni(t,this._fn,this.source))},e}($n),ni=function(t){function e(e,n,r){this._o=e,this._fn=n,this._s=r,this._c=0,this._t=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){if(this._fn){var e=te(this._fn)(t,this._c++,this._s);if(e===Zt)return this._o.onError(e.e);this._t+=e}else this._c++,this._t+=t},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){return 0===this._c?this._o.onError(new ue):(this._o.onNext(this._t/this._c),void this._o.onCompleted())},e}(zn);Wn.average=function(t,e){var n,r=this;return Yt(t)&&(n=be(t,e,3)),new ei(r,n)},Wn.sequenceEqual=function(t,e){var n=this;return e||(e=$t),new Du(function(r){var o=!1,i=!1,u=[],s=[],c=n.subscribe(function(t){if(s.length>0){var n=s.shift(),o=te(e)(n,t);if(o===Zt)return r.onError(o.e);o||(r.onNext(!1),r.onCompleted())}else i?(r.onNext(!1),r.onCompleted()):u.push(t)},function(t){r.onError(t)},function(){o=!0,0===u.length&&(s.length>0?(r.onNext(!1),r.onCompleted()):i&&(r.onNext(!0),r.onCompleted()))});(ve(t)||de(t))&&(t=vr(t)),Gt(t)&&(t=ur(t));var h=t.subscribe(function(t){if(u.length>0){var n=u.shift(),i=te(e)(n,t);if(i===Zt)return r.onError(i.e);i||(r.onNext(!1),r.onCompleted())}else o?(r.onNext(!1),r.onCompleted()):s.push(t)},function(t){r.onError(t)},function(){i=!0,0===s.length&&(u.length>0?(r.onNext(!1),r.onCompleted()):o&&(r.onNext(!0),r.onCompleted()))});return new pn(c,h)},n)};var ri=function(t){function e(e,n,r){this.source=e,this._i=n,this._d=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new oi(t,this._i,this._d))},e}($n),oi=function(t){function e(e,n,r){this._o=e,this._i=n,this._d=r,t.call(this)}return Qe(e,t),e.prototype.next=function(t){0===this._i--&&(this._o.onNext(t),this._o.onCompleted())},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._d===n?this._o.onError(new ce):(this._o.onNext(this._d),this._o.onCompleted())},e}(zn);Wn.elementAt=function(t,e){if(0>t)throw new ce;return new ri(this,t,e)};var ii=function(t){function e(e,n,r){this._o=e,this._obj=n,this._s=r,this._i=0,this._hv=!1,this._v=null,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=!1;if(this._obj.predicate){var n=te(this._obj.predicate)(t,this._i++,this._s);if(n===Zt)return this._o.onError(n.e);Boolean(n)&&(e=!0)}else this._obj.predicate||(e=!0);if(e){if(this._hv)return this._o.onError(new Error("Sequence contains more than one matching element"));this._hv=!0,this._v=t}},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===n?this._o.onError(new ue):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},e}(zn);Wn.single=function(t,e){var n={},r=this;if(n="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Yt(n.predicate)){var o=n.predicate;n.predicate=be(o,n.thisArg,3)}return new Du(function(t){return r.subscribe(new ii(t,n,r))},r)};var ui=function(t){function e(e,n){this.source=e,this._obj=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new si(t,this._obj,this.source))},e}($n),si=function(t){function e(e,n,r){this._o=e,this._obj=n,this._s=r,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){if(this._obj.predicate){var e=te(this._obj.predicate)(t,this._i++,this._s);if(e===Zt)return this._o.onError(e.e);Boolean(e)&&(this._o.onNext(t),this._o.onCompleted())}else this._obj.predicate||(this._o.onNext(t),this._o.onCompleted())},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._obj.defaultValue===n?this._o.onError(new ue):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},e}(zn);Wn.first=function(){var t={};if(t="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Yt(t.predicate)){var e=t.predicate;t.predicate=be(e,t.thisArg,3)}return new ui(this,t)};var ci=function(t){function e(e,n){this.source=e,this._obj=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new hi(t,this._obj,this.source))},e}($n),hi=function(t){function e(e,n,r){this._o=e,this._obj=n,this._s=r,this._i=0,this._hv=!1,this._v=null,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=!1;if(this._obj.predicate){var n=te(this._obj.predicate)(t,this._i++,this._s);if(n===Zt)return this._o.onError(n.e);Boolean(n)&&(e=!0)}else this._obj.predicate||(e=!0);e&&(this._hv=!0,this._v=t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._hv?(this._o.onNext(this._v),this._o.onCompleted()):this._obj.defaultValue===n?this._o.onError(new ue):(this._o.onNext(this._obj.defaultValue),this._o.onCompleted())},e}(zn);Wn.last=function(){var t={};if(t="object"==typeof arguments[0]?arguments[0]:{predicate:arguments[0],thisArg:arguments[1],defaultValue:arguments[2]},Yt(t.predicate)){var e=t.predicate;t.predicate=be(e,t.thisArg,3)}return new ci(this,t)};var ai=function(t){function e(e,n,r,o){this._o=e,this._s=n,this._cb=r,this._y=o,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=te(this._cb)(t,this._i,this._s);return e===Zt?this._o.onError(e.e):void(e?(this._o.onNext(this._y?this._i:t),this._o.onCompleted()):this._i++)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._y&&this._o.onNext(-1),this._o.onCompleted()},e}(zn);Wn.find=function(t,e){return Q(this,t,e,!1)},Wn.findIndex=function(t,e){return Q(this,t,e,!0)};var fi=function(t){function e(e){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new pi(t))},e}($n),pi=function(t){function e(e){this._o=e,this._s=new Vt.Set,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._s.add(t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(this._s),this._o.onCompleted()},e}(zn);Wn.toSet=function(){if("undefined"==typeof Vt.Set)throw new TypeError;return new fi(this)};var li=function(t){function e(e,n,r){this.source=e,this._k=n,this._e=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new di(t,this._k,this._e))},e}($n),di=function(t){function e(e,n,r){this._o=e,this._k=n,this._e=r,this._m=new Vt.Map,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=te(this._k)(t);if(e===Zt)return this._o.onError(e.e);var n=t;return this._e&&(n=te(this._e)(t),n===Zt)?this._o.onError(n.e):void this._m.set(e,n)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onNext(this._m),this._o.onCompleted()},e}(zn);Wn.toMap=function(t,e){if("undefined"==typeof Vt.Map)throw new TypeError;return new li(this,t,e)};var vi=function(t){function e(e,n,r){this.source=e,this._b=n,this._e=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new bi(t,this._b,this._e))},e}($n),bi=function(t){function e(e,n,r){this._o=e,this._b=n,this._e=r,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._i>=this._b&&(this._e===this._i?this._o.onCompleted():this._o.onNext(t)),this._i++},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.slice=function(t,e){var n=t||0;if(0>n)throw new Ut.ArgumentOutOfRangeError;if("number"==typeof e&&n>e)throw new Ut.ArgumentOutOfRangeError;return new vi(this,n,e)};var _i=function(t){function e(e,n,r){this.source=e,this._e=n,this._n=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this._n<0?(t.onNext(-1),t.onCompleted(),un):this.source.subscribe(new yi(t,this._e,this._n))},e}($n),yi=function(t){function e(e,n,r){this._o=e,this._e=n,this._n=r,this._v=0,this._hv=!1,this._i=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._i>=this._n&&t===this._e&&(this._hv=!0,this._v=this._i),this._i++},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._hv?this._o.onNext(this._v):this._o.onNext(-1),this._o.onCompleted()},e}(zn);Wn.lastIndexOf=function(t,e){
var n=+e||0;return Math.abs(n)===1/0&&(n=0),new _i(this,t,n)},Xn.wrap=function(t){function e(){return Xn.spawn.call(this,t.apply(this,arguments))}return e.__generatorFunction__=t,e};var Ei=Xn.spawn=function(){for(var t=arguments[0],e=this,n=[],r=1,o=arguments.length;o>r;r++)n.push(arguments[r]);return new Du(function(r){function o(e){var n=te(t.next).call(t,e);return n===Zt?r.onError(n.e):void u(n)}function i(e){var n=te(t.next).call(t,e);return n===Zt?r.onError(n.e):void u(n)}function u(t){if(t.done)return r.onNext(t.value),void r.onCompleted();var n=G.call(e,t.value),u=null,c=!1;Xn.isObservable(n)?s.add(n.subscribe(function(t){c=!0,u=t},i,function(){c&&o(u)})):i(new TypeError("type not supported"))}var s=new en;return Yt(t)&&(t=t.apply(e,n)),t&&Yt(t.next)?(o(),s):(r.onNext(t),r.onCompleted())})};Xn.start=function(t,e,n){return Ai(t,e,n)()};var Ai=Xn.toAsync=function(t,e,n){return yn(n)||(n=On),function(){var r=arguments,o=new Su;return n.schedule(null,function(){var n;try{n=t.apply(e,r)}catch(i){return void o.onError(i)}o.onNext(n),o.onCompleted()}),o.asObservable()}};Xn.fromCallback=function(t,e,n){return function(){"undefined"==typeof e&&(e=this);for(var r=arguments.length,o=new Array(r),i=0;r>i;i++)o[i]=arguments[i];return ot(t,e,n,o)}},Xn.fromNodeCallback=function(t,e,n){return function(){"undefined"==typeof e&&(e=this);for(var r=arguments.length,o=new Array(r),i=0;r>i;i++)o[i]=arguments[i];return ut(t,e,n,o)}},ht.prototype.dispose=function(){this.isDisposed||(this._e.removeEventListener(this._n,this._fn,!1),this.isDisposed=!0)},Ut.config.useNativeEvents=!1;var wi=function(t){function e(e,n,r){this._el=e,this._n=n,this._fn=r,t.call(this)}function n(t,e){return function(){var n=arguments[0];return Yt(e)&&(n=te(e).apply(null,arguments),n===Zt)?t.onError(n.e):void t.onNext(n)}}return Qe(e,t),e.prototype.subscribeCore=function(t){return at(this._el,this._n,n(t,this._fn))},e}($n);Xn.fromEvent=function(t,e,n){return t.addListener?Ci(function(n){t.addListener(e,n)},function(n){t.removeListener(e,n)},n):Ut.config.useNativeEvents||"function"!=typeof t.on||"function"!=typeof t.off?new wi(t,e,n).publish().refCount():Ci(function(n){t.on(e,n)},function(n){t.off(e,n)},n)};var mi=function(t){function e(e,n,r){this._add=e,this._del=n,this._fn=r,t.call(this)}function n(t,e){return function(){var n=arguments[0];return Yt(e)&&(n=te(e).apply(null,arguments),n===Zt)?t.onError(n.e):void t.onNext(n)}}function r(t,e,n){this._del=t,this._fn=e,this._ret=n,this.isDisposed=!1}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=n(t,this._fn),o=this._add(e);return new r(this._del,e,o)},r.prototype.dispose=function(){this.isDisposed||(Yt(this._del)&&this._del(this._fn,this._ret),this.isDisposed=!0)},e}($n),Ci=Xn.fromEventPattern=function(t,e,n){return new mi(t,e,n).publish().refCount()};Xn.startAsync=function(t){var e=te(t)();return e===Zt?xr(e.e):ur(e)};var Fi=function(t){function e(e,n){this.source=e,this.controller=new Ou,this.paused=!0,n&&n.subscribe?this.pauser=this.controller.merge(n):this.pauser=this.controller,t.call(this)}return Qe(e,t),e.prototype._subscribe=function(t){var e=this.source.publish(),n=e.subscribe(t),r=un,o=this.pauser.startWith(!this.paused).distinctUntilChanged().subscribe(function(t){t?r=e.connect():(r.dispose(),r=un)});return new ln([n,r,o])},e.prototype.pause=function(){this.paused=!0,this.controller.onNext(!1)},e.prototype.resume=function(){this.paused=!1,this.controller.onNext(!0)},e}(Xn);Wn.pausable=function(t){return new Fi(this,t)};var gi=function(t){function e(e,n){this.source=e,this.controller=new Ou,this.paused=!0,n&&n.subscribe?this.pauser=this.controller.merge(n):this.pauser=this.controller,t.call(this)}return Qe(e,t),e.prototype._subscribe=function(t){function e(){for(;o.length>0;)t.onNext(o.shift())}var r,o=[],i=ft(this.source,this.pauser.startWith(!this.paused).distinctUntilChanged(),function(t,e){return{data:t,shouldFire:e}}).subscribe(function(i){r!==n&&i.shouldFire!==r?(r=i.shouldFire,i.shouldFire&&e()):(r=i.shouldFire,i.shouldFire?t.onNext(i.data):o.push(i.data))},function(n){e(),t.onError(n)},function(){e(),t.onCompleted()});return i},e.prototype.pause=function(){this.paused=!0,this.controller.onNext(!1)},e.prototype.resume=function(){this.paused=!1,this.controller.onNext(!0)},e}(Xn);Wn.pausableBuffered=function(t){return new gi(this,t)};var Di=function(t){function e(e,n,r){t.call(this),this.subject=new xi(n,r),this.source=e.multicast(this.subject).refCount()}return Qe(e,t),e.prototype._subscribe=function(t){return this.source.subscribe(t)},e.prototype.request=function(t){return this.subject.request(null==t?-1:t)},e}(Xn),xi=function(t){function e(e,n){null==e&&(e=!0),t.call(this),this.subject=new Ou,this.enableQueue=e,this.queue=e?[]:null,this.requestedCount=0,this.requestedDisposable=null,this.error=null,this.hasFailed=!1,this.hasCompleted=!1,this.scheduler=n||gn}return Qe(e,t),Ge(e.prototype,In,{_subscribe:function(t){return this.subject.subscribe(t)},onCompleted:function(){this.hasCompleted=!0,this.enableQueue&&0!==this.queue.length?this.queue.push(jn.createOnCompleted()):(this.subject.onCompleted(),this.disposeCurrentRequest())},onError:function(t){this.hasFailed=!0,this.error=t,this.enableQueue&&0!==this.queue.length?this.queue.push(jn.createOnError(t)):(this.subject.onError(t),this.disposeCurrentRequest())},onNext:function(t){this.requestedCount<=0?this.enableQueue&&this.queue.push(jn.createOnNext(t)):(0===this.requestedCount--&&this.disposeCurrentRequest(),this.subject.onNext(t))},_processRequest:function(t){if(this.enableQueue)for(;this.queue.length>0&&(t>0||"N"!==this.queue[0].kind);){var e=this.queue.shift();e.accept(this.subject),"N"===e.kind?t--:(this.disposeCurrentRequest(),this.queue=[])}return t},request:function(t){this.disposeCurrentRequest();var e=this;return this.requestedDisposable=this.scheduler.schedule(t,function(t,n){var r=e._processRequest(n),o=e.hasCompleted||e.hasFailed;return!o&&r>0?(e.requestedCount=r,on(function(){e.requestedCount=0})):void 0}),this.requestedDisposable},disposeCurrentRequest:function(){this.requestedDisposable&&(this.requestedDisposable.dispose(),this.requestedDisposable=null)}}),e}(Xn);Wn.controlled=function(t,e){return t&&yn(t)&&(e=t,t=!0),null==t&&(t=!0),new Di(this,t,e)};var Bi=function(t){function e(e){t.call(this),this.source=e}function n(t,e){return e.source.request(1)}Qe(e,t),e.prototype._subscribe=function(t){return this.subscription=this.source.subscribe(new r(t,this,this.subscription)),new pn(this.subscription,On.schedule(this,n))};var r=function(t){function e(e,n,r){t.call(this),this.observer=e,this.observable=n,this.cancel=r,this.scheduleDisposable=null}function n(t,e){return e.observable.source.request(1)}return Qe(e,t),e.prototype.completed=function(){this.observer.onCompleted(),this.dispose()},e.prototype.error=function(t){this.observer.onError(t),this.dispose()},e.prototype.next=function(t){this.observer.onNext(t),this.scheduleDisposable=On.schedule(this,n)},e.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),this.scheduleDisposable&&(this.scheduleDisposable.dispose(),this.scheduleDisposable=null),t.prototype.dispose.call(this)},e}(zn);return e}(Xn);Di.prototype.stopAndWait=function(){return new Bi(this)};var Ni=function(t){function e(e,n){t.call(this),this.source=e,this.windowSize=n}function n(t,e){return e.source.request(e.windowSize)}Qe(e,t),e.prototype._subscribe=function(t){return this.subscription=this.source.subscribe(new r(t,this,this.subscription)),new pn(this.subscription,On.schedule(this,n))};var r=function(t){function e(e,n,r){this.observer=e,this.observable=n,this.cancel=r,this.received=0,this.scheduleDisposable=null,t.call(this)}function n(t,e){return e.observable.source.request(e.observable.windowSize)}return Qe(e,t),e.prototype.completed=function(){this.observer.onCompleted(),this.dispose()},e.prototype.error=function(t){this.observer.onError(t),this.dispose()},e.prototype.next=function(t){this.observer.onNext(t),this.received=++this.received%this.observable.windowSize,0===this.received&&(this.scheduleDisposable=On.schedule(this,n))},e.prototype.dispose=function(){this.observer=null,this.cancel&&(this.cancel.dispose(),this.cancel=null),this.scheduleDisposable&&(this.scheduleDisposable.dispose(),this.scheduleDisposable=null),t.prototype.dispose.call(this)},e}(zn);return e}(Xn);Di.prototype.windowed=function(t){return new Ni(this,t)},Wn.pipe=function(t){function e(){n.resume()}var n=this.pausableBuffered();return t.addListener("drain",e),n.subscribe(function(e){!t.write(e)&&n.pause()},function(e){t.emit("error",e)},function(){!t._isStdio&&t.end(),t.removeListener("drain",e)}),n.resume(),t};var Oi=function(t){function e(e,n,r){this.source=e,this._fn1=n,this._fn2=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=this.source.multicast(this._fn1());return new pn(this._fn2(e).subscribe(t),e.connect())},e}($n);Wn.multicast=function(t,e){return Yt(t)?new Oi(this,t,e):new ki(this,t)},Wn.publish=function(t){return t&&Yt(t)?this.multicast(function(){return new Ou},t):this.multicast(new Ou)},Wn.share=function(){return this.publish().refCount()},Wn.publishLast=function(t){return t&&Yt(t)?this.multicast(function(){return new Su},t):this.multicast(new Su)},Wn.publishValue=function(t,e){return 2===arguments.length?this.multicast(function(){return new ju(e)},t):this.multicast(new ju(t))},Wn.shareValue=function(t){return this.publishValue(t).refCount()},Wn.replay=function(t,e,n,r){return t&&Yt(t)?this.multicast(function(){return new ku(e,n,r)},t):this.multicast(new ku(e,n,r))},Wn.shareReplay=function(t,e,n){return this.replay(null,t,e,n).refCount()};var Si=function(t,e){this._s=t,this._o=e};Si.prototype.dispose=function(){if(!this._s.isDisposed&&null!==this._o){var t=this._s.observers.indexOf(this._o);this._s.observers.splice(t,1),this._o=null}};var ji=function(t){function e(e){this.source=e,this._count=0,this._connectableSubscription=null,t.call(this)}function n(t,e){this._p=t,this._s=e,this.isDisposed=!1}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=this.source.subscribe(t);return 1===++this._count&&(this._connectableSubscription=this.source.connect()),new n(this,e)},n.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._s.dispose(),0===--this._p._count&&this._p._connectableSubscription.dispose())},e}($n),ki=Ut.ConnectableObservable=function(t){function e(e,n){this.source=e,this._connection=null,this._source=e.asObservable(),this._subject=n,t.call(this)}function n(t,e){this._p=t,this._s=e}return Qe(e,t),n.prototype.dispose=function(){this._s&&(this._s.dispose(),this._s=null,this._p._connection=null)},e.prototype.connect=function(){if(!this._connection){if(this._subject.isStopped)return un;var t=this._source.subscribe(this._subject);this._connection=new n(this,t)}return this._connection},e.prototype._subscribe=function(t){return this._subject.subscribe(t)},e.prototype.refCount=function(){return new ji(this)},e}(Xn);Wn.singleInstance=function(){function t(){return r||(r=!0,e=n["finally"](function(){r=!1}).publish().refCount()),e}var e,n=this,r=!1;return new Du(function(e){return t().subscribe(e)})},Wn.join=function(t,e,n,r){var o=this;return new Du(function(i){var u=new en,s=!1,c=!1,h=0,a=0,f=new Vi,p=new Vi,l=function(t){i.onError(t)};return u.add(o.subscribe(function(t){var n=h++,o=new an;f.set(n,t),u.add(o);var c=te(e)(t);return c===Zt?i.onError(c.e):(o.setDisposable(c.take(1).subscribe(Ht,l,function(){f["delete"](n)&&0===f.size&&s&&i.onCompleted(),u.remove(o)})),void p.forEach(function(e){var n=te(r)(t,e);return n===Zt?i.onError(n.e):void i.onNext(n)}))},l,function(){s=!0,(c||0===f.size)&&i.onCompleted()})),u.add(t.subscribe(function(t){var e=a++,o=new an;p.set(e,t),u.add(o);var s=te(n)(t);return s===Zt?i.onError(s.e):(o.setDisposable(s.take(1).subscribe(Ht,l,function(){p["delete"](e)&&0===p.size&&c&&i.onCompleted(),u.remove(o)})),void f.forEach(function(e){var n=te(r)(e,t);return n===Zt?i.onError(n.e):void i.onNext(n)}))},l,function(){c=!0,(s||0===p.size)&&i.onCompleted()})),u},o)},Wn.groupJoin=function(t,e,n,r){var o=this;return new Du(function(i){function u(t){}var s=new en,c=new dn(s),h=new Vi,a=new Vi,f=0,p=0,u=function(t){return function(e){e.onError(t)}};return s.add(o.subscribe(function(t){var n=new Ou,o=f++;h.set(o,n);var p=te(r)(t,Ye(n,c));if(p===Zt)return h.forEach(u(p.e)),i.onError(p.e);i.onNext(p),a.forEach(function(t){n.onNext(t)});var l=new an;s.add(l);var d=te(e)(t);return d===Zt?(h.forEach(u(d.e)),i.onError(d.e)):void l.setDisposable(d.take(1).subscribe(Ht,function(t){h.forEach(u(t)),i.onError(t)},function(){h["delete"](o)&&n.onCompleted(),s.remove(l)}))},function(t){h.forEach(u(t)),i.onError(t)},function(){i.onCompleted()})),s.add(t.subscribe(function(t){var e=p++;a.set(e,t);var r=new an;s.add(r);var o=te(n)(t);return o===Zt?(h.forEach(u(o.e)),i.onError(o.e)):(r.setDisposable(o.take(1).subscribe(Ht,function(t){h.forEach(u(t)),i.onError(t)},function(){a["delete"](e),s.remove(r)})),void h.forEach(function(e){e.onNext(t)}))},function(t){h.forEach(u(t)),i.onError(t)})),c},o)},Wn.buffer=function(){return this.window.apply(this,arguments).flatMap(z)},Wn.window=function(t,e){return 1===arguments.length&&"function"!=typeof arguments[0]?lt.call(this,t):"function"==typeof t?dt.call(this,t):pt.call(this,t,e)};var qi=function(t){function e(e){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Ti(t))},e}($n),Ti=function(t){function e(e){this._o=e,this._p=null,this._hp=!1,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._hp?this._o.onNext([this._p,t]):this._hp=!0,this._p=t},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.pairwise=function(){return new qi(this)},Wn.partition=function(t,e){var n=be(t,e,3);return[this.filter(t,e),this.filter(function(t,e,r){return!n(t,e,r)})]};var Ri=function(t){function e(t,e){this.c=t,this.s=e}return Qe(e,t),e.prototype[pe]=function(){var t=this;return{next:function(){return t.c()?{done:!1,value:t.s}:{done:!0,value:void 0}}}},e}(Qn);Wn.letBind=Wn.let=function(t){return t(this)},Xn["if"]=function(t,e,n){return hr(function(){return n||(n=pr()),Gt(e)&&(e=ur(e)),Gt(n)&&(n=ur(n)),"function"==typeof n.now&&(n=pr(n)),t()?e:n})},Xn["for"]=Xn.forIn=function(t,e,n){return nr(t,e,n).concat()};var Mi=Xn["while"]=Xn.whileDo=function(t,e){return Gt(e)&&(e=ur(e)),vt(t,e).concat()};Wn.doWhile=function(t){return Mr([this,Mi(t,this)])},Xn["case"]=function(t,e,n){return hr(function(){Gt(n)&&(n=ur(n)),n||(n=pr()),yn(n)&&(n=pr(n));var r=e[t()];return Gt(r)&&(r=ur(r)),r||n})};var Pi=function(t){function e(e,n,r){this.source=e,this._fn=n,this._scheduler=r,t.call(this)}function n(t,e){var n,r=t[0],o=t[1];if(!(r.q.length>0))return void(r.isAcquired=!1);n=r.q.shift();var i=new an;r.d.add(i),i.setDisposable(n.subscribe(new Ii(r,o,i))),e([r,o])}return Qe(e,t),e.prototype._ensureActive=function(t){var e=!1;t.q.length>0&&(e=!t.isAcquired,t.isAcquired=!0),e&&t.m.setDisposable(this._scheduler.scheduleRecursive([t,this],n))},e.prototype.subscribeCore=function(t){var e=new fn,n=new en(e),r={q:[],m:e,d:n,activeCount:0,isAcquired:!1,o:t};return r.q.push(this.source),r.activeCount++,this._ensureActive(r),n},e}($n),Ii=function(t){function e(e,n,r){this._s=e,this._p=n,this._m1=r,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._s.o.onNext(t);var e=te(this._p._fn)(t);return e===Zt?this._s.o.onError(e.e):(this._s.q.push(e),this._s.activeCount++,void this._p._ensureActive(this._s))},e.prototype.error=function(t){this._s.o.onError(t)},e.prototype.completed=function(){this._s.d.remove(this._m1),this._s.activeCount--,0===this._s.activeCount&&this._s.o.onCompleted()},e}(zn);Wn.expand=function(t,e){return yn(e)||(e=gn),new Pi(this,t,e)};var Li=function(t){function e(e,n){this._sources=e,this._cb=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){if(0===this._sources.length)return t.onCompleted(),un;for(var e=this._sources.length,n={finished:!1,hasResults:new Array(e),hasCompleted:new Array(e),results:new Array(e)},r=new en,o=0,i=this._sources.length;i>o;o++){var u=this._sources[o];Gt(u)&&(u=ur(u)),r.add(u.subscribe(new Wi(t,n,o,this._cb,r)))}return r},e}($n),Wi=function(t){function e(e,n,r,o,i){this._o=e,this._s=n,this._i=r,this._cb=o,this._subs=i,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._s.finished||(this._s.hasResults[this._i]=!0,this._s.results[this._i]=t)},e.prototype.error=function(t){this._s.finished=!0,this._o.onError(t),this._subs.dispose()},e.prototype.completed=function(){if(!this._s.finished){if(!this._s.hasResults[this._i])return this._o.onCompleted();this._s.hasCompleted[this._i]=!0;for(var t=0;t<this._s.results.length;t++)if(!this._s.hasCompleted[t])return;this._s.finished=!0;var e=te(this._cb).apply(null,this._s.results);if(e===Zt)return this._o.onError(e.e);this._o.onNext(e),this._o.onCompleted()}},e}(zn);Xn.forkJoin=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];var r=Yt(e[t-1])?e.pop():I;return Array.isArray(e[0])&&(e=e[0]),new Li(e,r)},Wn.forkJoin=function(){for(var t=arguments.length,e=new Array(t),n=0;t>n;n++)e[n]=arguments[n];return Array.isArray(e[0])?e[0].unshift(this):e.unshift(this),Xn.forkJoin.apply(null,e)},Wn.manySelect=Wn.extend=function(t,e){yn(e)||(e=Ut.Scheduler.immediate);var n=this;return hr(function(){var r;return n.map(function(t){var e=new zi(t);return r&&r.onNext(t),r=e,e}).tap(Ht,function(t){r&&r.onError(t)},function(){r&&r.onCompleted()}).observeOn(e).map(t)},n)};var zi=function(t){function e(e){t.call(this),this.head=e,this.tail=new Su}return Qe(e,t),Ge(e.prototype,In,{_subscribe:function(t){var e=new en;return e.add(gn.schedule(this,function(n,r){t.onNext(r.head),e.add(r.tail.mergeAll().subscribe(t))})),e},onCompleted:function(){this.onNext(Xn.empty())},onError:function(t){this.onNext(Xn["throw"](t))},onNext:function(t){this.tail.onNext(t),this.tail.onCompleted()}}),e}(Xn),Vi=Vt.Map||function(){function t(){this.size=0,this._values=[],this._keys=[]}return t.prototype["delete"]=function(t){var e=this._keys.indexOf(t);return-1===e?!1:(this._values.splice(e,1),this._keys.splice(e,1),this.size--,!0)},t.prototype.get=function(t){var e=this._keys.indexOf(t);return-1===e?n:this._values[e]},t.prototype.set=function(t,e){var n=this._keys.indexOf(t);return-1===n?(this._keys.push(t),this._values.push(e),this.size++):this._values[n]=e,this},t.prototype.forEach=function(t,e){for(var n=0;n<this.size;n++)t.call(e,this._values[n],this._keys[n])},t}();bt.prototype.and=function(t){return new bt(this.patterns.concat(t))},bt.prototype.thenDo=function(t){return new _t(this,t)},_t.prototype.activate=function(t,e,n){for(var r=[],o=yt(e),i=0,u=this.expression.patterns.length;u>i;i++)r.push(At(t,this.expression.patterns[i],o));var s=new wt(r,Et(this,e),function(){for(var t=0,e=r.length;e>t;t++)r[t].removeActivePlan(s);n(s)});for(i=0,u=r.length;u>i;i++)r[i].addActivePlan(s);return s},wt.prototype.dequeue=function(){this.joinObservers.forEach(function(t){t.queue.shift()})},wt.prototype.match=function(){var t,e,n=!0;for(t=0,e=this.joinObserverArray.length;e>t;t++)if(0===this.joinObserverArray[t].queue.length){n=!1;break}if(n){var r=[],o=!1;for(t=0,e=this.joinObserverArray.length;e>t;t++)r.push(this.joinObserverArray[t].queue[0]),"C"===this.joinObserverArray[t].queue[0].kind&&(o=!0);if(o)this.onCompleted();else{this.dequeue();var i=[];for(t=0,e=r.length;t<r.length;t++)i.push(r[t].value);this.onNext.apply(this,i)}}};var Ui=function(t){function e(e,n){t.call(this),this.source=e,this.onError=n,this.queue=[],this.activePlans=[],this.subscription=new an,this.isDisposed=!1}Qe(e,t);var n=e.prototype;return n.next=function(t){if(!this.isDisposed){if("E"===t.kind)return this.onError(t.error);this.queue.push(t);for(var e=this.activePlans.slice(0),n=0,r=e.length;r>n;n++)e[n].match()}},n.error=Ht,n.completed=Ht,n.addActivePlan=function(t){this.activePlans.push(t)},n.subscribe=function(){this.subscription.setDisposable(this.source.materialize().subscribe(this))},n.removeActivePlan=function(t){this.activePlans.splice(this.activePlans.indexOf(t),1),0===this.activePlans.length&&this.dispose()},n.dispose=function(){t.prototype.dispose.call(this),this.isDisposed||(this.isDisposed=!0,this.subscription.dispose())},e}(zn);Wn.and=function(t){return new bt([this,t])},Wn.thenDo=function(t){return new bt([this]).thenDo(t)},Xn.when=function(){var t,e=arguments.length;if(Array.isArray(arguments[0]))t=arguments[0];else{t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}return new Du(function(e){var n=[],r=new Vi,o=Ln(function(t){e.onNext(t)},function(t){r.forEach(function(e){e.onError(t)}),e.onError(t)},function(t){e.onCompleted()});try{for(var i=0,u=t.length;u>i;i++)n.push(t[i].activate(r,o,function(t){var r=n.indexOf(t);n.splice(r,1),0===n.length&&e.onCompleted()}))}catch(s){return xr(s).subscribe(e)}var c=new en;return r.forEach(function(t){t.subscribe(),c.add(t)}),c})};var Hi=function(t){function e(e,n){this._dt=e,this._s=n,t.call(this)}function n(t,e){e.onNext(0),e.onCompleted()}return Qe(e,t),e.prototype.subscribeCore=function(t){return this._s.scheduleFuture(t,this._dt,n)},e}($n),Ji=Xn.interval=function(t,e){return Ft(t,t,yn(e)?e:On)};Xn.timer=function(t,e,r){var o;return yn(r)||(r=On),null!=e&&"number"==typeof e?o=e:yn(e)&&(r=e),(t instanceof Date||"number"==typeof t)&&o===n?mt(t,r):t instanceof Date&&o!==n?Ct(t,e,r):Ft(t,o,r)};Wn.delay=function(){var t=arguments[0];if("number"==typeof t||t instanceof Date){var e=t,n=arguments[1];return yn(n)||(n=On),e instanceof Date?Dt(this,e,n):gt(this,e,n)}if(Xn.isObservable(t)||Yt(t))return xt(this,t,arguments[1]);throw new Error("Invalid arguments")};var Xi=function(t){function e(e,n,r){yn(r)||(r=On),this.source=e,this._dt=n,this._s=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new fn;return new pn(this.source.subscribe(new $i(t,this._dt,this._s,e)),e)},e}($n),$i=function(t){function e(e,n,r,o){this._o=e,this._d=n,this._scheduler=r,this._c=o,this._v=null,this._hv=!1,this._id=0,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._hv=!0,this._v=t;var e=++this._id,n=new an;this._c.setDisposable(n),n.setDisposable(this._scheduler.scheduleFuture(this,this._d,function(n,r){r._hv&&r._id===e&&r._o.onNext(t),r._hv=!1}))},e.prototype.error=function(t){this._c.dispose(),this._o.onError(t),this._hv=!1,this._id++},e.prototype.completed=function(){this._c.dispose(),this._hv&&this._o.onNext(this._v),this._o.onCompleted(),this._hv=!1,this._id++},e}(zn);Wn.debounce=function(){if(Yt(arguments[0]))return Bt(this,arguments[0]);if("number"==typeof arguments[0])return new Xi(this,arguments[0],arguments[1]);throw new Error("Invalid arguments")},Wn.windowWithTime=Wn.windowTime=function(t,e,n){var r,o=this;return null==e&&(r=t),yn(n)||(n=On),"number"==typeof e?r=e:yn(e)&&(r=t,n=e),new Du(function(e){function i(){var t=new an,o=!1,u=!1;f.setDisposable(t),h===c?(o=!0,u=!0):c>h?o=!0:u=!0;var l=o?h:c,d=l-p;p=l,o&&(h+=r),u&&(c+=r),t.setDisposable(n.scheduleFuture(null,d,function(){if(u){var t=new Ou;a.push(t),e.onNext(Ye(t,s))}o&&a.shift().onCompleted(),i()}))}var u,s,c=r,h=t,a=[],f=new fn,p=0;return u=new en(f),s=new dn(u),a.push(new Ou),e.onNext(Ye(a[0],s)),i(),u.add(o.subscribe(function(t){for(var e=0,n=a.length;n>e;e++)a[e].onNext(t)},function(t){for(var n=0,r=a.length;r>n;n++)a[n].onError(t);e.onError(t)},function(){for(var t=0,n=a.length;n>t;t++)a[t].onCompleted();e.onCompleted()})),s},o)},Wn.windowWithTimeOrCount=Wn.windowTimeOrCount=function(t,e,n){var r=this;return yn(n)||(n=On),new Du(function(o){function i(e){var r=new an;u.setDisposable(r),r.setDisposable(n.scheduleFuture(null,t,function(){if(e===a){h=0;var t=++a;f.onCompleted(),f=new Ou,o.onNext(Ye(f,c)),i(t)}}))}var u=new fn,s=new en(u),c=new dn(s),h=0,a=0,f=new Ou;return o.onNext(Ye(f,c)),i(0),s.add(r.subscribe(function(t){var n=0,r=!1;f.onNext(t),++h===e&&(r=!0,h=0,n=++a,f.onCompleted(),f=new Ou,o.onNext(Ye(f,c))),r&&i(n)},function(t){f.onError(t),o.onError(t)},function(){f.onCompleted(),o.onCompleted()})),c},r)},Wn.bufferWithTime=Wn.bufferTime=function(t,e,n){return this.windowWithTime(t,e,n).flatMap(z)},Wn.bufferWithTimeOrCount=Wn.bufferTimeOrCount=function(t,e,n){return this.windowWithTimeOrCount(t,e,n).flatMap(z)};var Ki=function(t){function e(e,n){this.source=e,this._s=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Qi(t,this._s))},e}($n),Qi=function(t){function e(e,n){this._o=e,this._s=n,this._l=n.now(),t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=this._s.now(),n=e-this._l;this._l=e,this._o.onNext({value:t,interval:n})},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.timeInterval=function(t){return yn(t)||(t=On),new Ki(this,t)};var Gi=function(t){function e(e,n){this.source=e,this._s=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new Yi(t,this._s))},e}($n),Yi=function(t){function e(e,n){this._o=e,this._s=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._o.onNext({value:t,timestamp:this._s.now()})},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.timestamp=function(t){return yn(t)||(t=On),new Gi(this,t)};var Zi=function(t){function e(e,n){this.source=e,this._sampler=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e={o:t,atEnd:!1,value:null,hasValue:!1,sourceSubscription:new an};return e.sourceSubscription.setDisposable(this.source.subscribe(new eu(e))),new pn(e.sourceSubscription,this._sampler.subscribe(new tu(e)))},e}($n),tu=function(t){function e(e){this._s=e,t.call(this)}return Qe(e,t),e.prototype._handleMessage=function(){this._s.hasValue&&(this._s.hasValue=!1,this._s.o.onNext(this._s.value)),this._s.atEnd&&this._s.o.onCompleted()},e.prototype.next=function(){this._handleMessage()},e.prototype.error=function(t){this._s.onError(t)},e.prototype.completed=function(){this._handleMessage()},e}(zn),eu=function(t){function e(e){this._s=e,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._s.hasValue=!0,this._s.value=t},e.prototype.error=function(t){this._s.o.onError(t)},e.prototype.completed=function(){this._s.atEnd=!0,this._s.sourceSubscription.dispose()},e}(zn);Wn.sample=function(t,e){return yn(e)||(e=On),"number"==typeof t?new Zi(this,Ji(t,e)):new Zi(this,t)};var nu=Ut.TimeoutError=function(t){this.message=t||"Timeout has occurred",this.name="TimeoutError",Error.call(this)};nu.prototype=Object.create(Error.prototype),Wn.timeout=function(){var t=arguments[0];if(t instanceof Date||"number"==typeof t)return Ot(this,t,arguments[1],arguments[2]);if(Xn.isObservable(t)||Yt(t))return Nt(this,t,arguments[1],arguments[2]);throw new Error("Invalid arguments")};var ru=function(t){function e(e,n,r,o,i,u){this._state=e,this._cndFn=n,this._itrFn=r,this._resFn=o,this._timeFn=i,this._s=u,t.call(this)}function n(t,e){if(t.hasResult&&t.o.onNext(t.result),t.first)t.first=!1;else if(t.newState=te(t.self._itrFn)(t.newState),t.newState===Zt)return t.o.onError(t.newState.e);if(t.hasResult=te(t.self._cndFn)(t.newState),t.hasResult===Zt)return t.o.onError(t.hasResult.e);if(t.hasResult){if(t.result=te(t.self._resFn)(t.newState),t.result===Zt)return t.o.onError(t.result.e);var n=te(t.self._timeFn)(t.newState);if(n===Zt)return t.o.onError(n.e);e(t,n)}else t.o.onCompleted()}return Qe(e,t),e.prototype.subscribeCore=function(t){var e={o:t,self:this,newState:this._state,first:!0,hasResult:!1};return this._s.scheduleRecursiveFuture(e,new Date(this._s.now()),n)},e}($n);Xn.generateWithAbsoluteTime=function(t,e,n,r,o,i){return yn(i)||(i=On),new ru(t,e,n,r,o,i)};var ou=function(t){function e(e,n,r,o,i,u){this._state=e,this._cndFn=n,this._itrFn=r,this._resFn=o,this._timeFn=i,this._s=u,t.call(this)}function n(t,e){if(t.hasResult&&t.o.onNext(t.result),t.first)t.first=!1;else if(t.newState=te(t.self._itrFn)(t.newState),t.newState===Zt)return t.o.onError(t.newState.e);if(t.hasResult=te(t.self._cndFn)(t.newState),t.hasResult===Zt)return t.o.onError(t.hasResult.e);if(t.hasResult){if(t.result=te(t.self._resFn)(t.newState),t.result===Zt)return t.o.onError(t.result.e);var n=te(t.self._timeFn)(t.newState);if(n===Zt)return t.o.onError(n.e);e(t,n)}else t.o.onCompleted()}return Qe(e,t),e.prototype.subscribeCore=function(t){var e={o:t,self:this,newState:this._state,first:!0,hasResult:!1};return this._s.scheduleRecursiveFuture(e,0,n)},e}($n);Xn.generateWithRelativeTime=function(t,e,n,r,o,i){return yn(i)||(i=On),new ou(t,e,n,r,o,i)};var iu=function(t){function e(e,n,r){this.source=e,this._dt=n,this._s=r,t.call(this)}function n(t,e){var n=e[0],r=e[1],o=e[2];o.setDisposable(n.subscribe(r))}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new fn;return e.setDisposable(this._s.scheduleFuture([this.source,t,e],this._dt,n)),e},e}($n);Wn.delaySubscription=function(t,e){return yn(e)||(e=On),new iu(this,t,e)};var uu=function(t){function e(e,n,r){this.source=e,this._d=n,this._s=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new su(t,this))},e}($n),su=function(t){function e(e,n){this._o=e,this._s=n._s,this._d=n._d,this._q=[],t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=this._s.now();for(this._q.push({interval:e,value:t});this._q.length>0&&e-this._q[0].interval>=this._d;)this._o.onNext(this._q.shift().value)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){for(var t=this._s.now();this._q.length>0&&t-this._q[0].interval>=this._d;)this._o.onNext(this._q.shift().value);this._o.onCompleted()},e}(zn);Wn.skipLastWithTime=function(t,e){return yn(e)||(e=On),new uu(this,t,e)};var cu=function(t){function e(e,n,r){this.source=e,this._d=n,this._s=r,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return this.source.subscribe(new hu(t,this._d,this._s))},e}($n),hu=function(t){function e(e,n,r){this._o=e,this._d=n,this._s=r,this._q=[],t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=this._s.now();for(this._q.push({interval:e,value:t});this._q.length>0&&e-this._q[0].interval>=this._d;)this._q.shift()},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){for(var t=this._s.now();this._q.length>0;){var e=this._q.shift();t-e.interval<=this._d&&this._o.onNext(e.value)}this._o.onCompleted()},e}(zn);Wn.takeLastWithTime=function(t,e){return yn(e)||(e=On),new cu(this,t,e)},Wn.takeLastBufferWithTime=function(t,e){var n=this;return yn(e)||(e=On),new Du(function(r){var o=[];return n.subscribe(function(n){var r=e.now();for(o.push({interval:r,value:n});o.length>0&&r-o[0].interval>=t;)o.shift()},function(t){r.onError(t)},function(){for(var n=e.now(),i=[];o.length>0;){var u=o.shift();n-u.interval<=t&&i.push(u.value)}r.onNext(i),r.onCompleted()})},n)};var au=function(t){function e(e,n,r){this.source=e,this._d=n,this._s=r,t.call(this)}function n(t,e){e.onCompleted()}return Qe(e,t),e.prototype.subscribeCore=function(t){return new pn(this._s.scheduleFuture(t,this._d,n),this.source.subscribe(t))},e}($n);Wn.takeWithTime=function(t,e){return yn(e)||(e=On),new au(this,t,e)};var fu=function(t){function e(e,n,r){this.source=e,this._d=n,this._s=r,this._open=!1,t.call(this)}function n(t,e){e._open=!0}return Qe(e,t),e.prototype.subscribeCore=function(t){return new pn(this._s.scheduleFuture(this,this._d,n),this.source.subscribe(new pu(t,this)))},e}($n),pu=function(t){function e(e,n){this._o=e,this._p=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._p._open&&this._o.onNext(t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.skipWithTime=function(t,e){return yn(e)||(e=On),new fu(this,t,e)};var lu=function(t){function e(e,n,r){
this.source=e,this._st=n,this._s=r,t.call(this)}function n(t,e){e._open=!0}return Qe(e,t),e.prototype.subscribeCore=function(t){return this._open=!1,new pn(this._s.scheduleFuture(this,this._st,n),this.source.subscribe(new du(t,this)))},e}($n),du=function(t){function e(e,n){this._o=e,this._p=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){this._p._open&&this._o.onNext(t)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._o.onCompleted()},e}(zn);Wn.skipUntilWithTime=function(t,e){return yn(e)||(e=On),new lu(this,t,e)},Wn.takeUntilWithTime=function(t,e){yn(e)||(e=On);var n=this;return new Du(function(r){return new pn(e.scheduleFuture(r,t,function(t,e){e.onCompleted()}),n.subscribe(r))},n)},Wn.throttle=function(t,e){yn(e)||(e=On);var n=+t||0;if(0>=n)throw new RangeError("windowDuration cannot be less or equal zero.");var r=this;return new Du(function(t){var o=0;return r.subscribe(function(r){var i=e.now();(0===o||i-o>=n)&&(o=i,t.onNext(r))},function(e){t.onError(e)},function(){t.onCompleted()})},r)};var vu=function(t){function e(e,n){this._o=e,this._xform=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){var e=te(this._xform["@@transducer/step"]).call(this._xform,this._o,t);e===Zt&&this._o.onError(e.e)},e.prototype.error=function(t){this._o.onError(t)},e.prototype.completed=function(){this._xform["@@transducer/result"](this._o)},e}(zn);Wn.transduce=function(t){var e=this;return new Du(function(n){var r=t(St(n));return e.subscribe(new vu(n,r))},e)};var bu=function(t){function e(e){this.source=e,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){var e=new an,n=new en,r={hasCurrent:!1,isStopped:!1,o:t,g:n};return n.add(e),e.setDisposable(this.source.subscribe(new _u(r))),n},e}($n),_u=function(t){function e(e){this._s=e,t.call(this)}function n(e,n){this._s=e,this._i=n,t.call(this)}return Qe(e,t),e.prototype.next=function(t){if(!this._s.hasCurrent){this._s.hasCurrent=!0,Gt(t)&&(t=ur(t));var e=new an;this._s.g.add(e),e.setDisposable(t.subscribe(new n(this._s,e)))}},e.prototype.error=function(t){this._s.o.onError(t)},e.prototype.completed=function(){this._s.isStopped=!0,!this._s.hasCurrent&&1===this._s.g.length&&this._s.o.onCompleted()},Qe(n,t),n.prototype.next=function(t){this._s.o.onNext(t)},n.prototype.error=function(t){this._s.o.onError(t)},n.prototype.completed=function(){this._s.g.remove(this._i),this._s.hasCurrent=!1,this._s.isStopped&&1===this._s.g.length&&this._s.o.onCompleted()},e}(zn);Wn.switchFirst=function(){return new bu(this)},Wn.flatMapFirst=Wn.exhaustMap=function(t,e,n){return new Kn(this,t,e,n).switchFirst()},Wn.flatMapWithMaxConcurrent=Wn.flatMapMaxConcurrent=function(t,e,n,r){return new Kn(this,e,n,r).merge(t)};var yu=Ut.VirtualTimeScheduler=function(t){function e(e,n){this.clock=e,this.comparer=n,this.isEnabled=!1,this.queue=new Ze(1024),t.call(this)}Qe(e,t);var n=e.prototype;return n.now=function(){return this.toAbsoluteTime(this.clock)},n.schedule=function(t,e){return this.scheduleAbsolute(t,this.clock,e)},n.scheduleFuture=function(t,e,n){var r=e instanceof Date?this.toRelativeTime(e-this.now()):this.toRelativeTime(e);return this.scheduleRelative(t,r,n)},n.add=fe,n.toAbsoluteTime=fe,n.toRelativeTime=fe,n.schedulePeriodic=function(t,e,n){var r=new wn(this,t,e,n);return r.start()},n.scheduleRelative=function(t,e,n){var r=this.add(this.clock,e);return this.scheduleAbsolute(t,r,n)},n.start=function(){if(!this.isEnabled){this.isEnabled=!0;do{var t=this.getNext();null!==t?(this.comparer(t.dueTime,this.clock)>0&&(this.clock=t.dueTime),t.invoke()):this.isEnabled=!1}while(this.isEnabled)}},n.stop=function(){this.isEnabled=!1},n.advanceTo=function(t){var e=this.comparer(this.clock,t);if(this.comparer(this.clock,t)>0)throw new ce;if(0!==e&&!this.isEnabled){this.isEnabled=!0;do{var n=this.getNext();null!==n&&this.comparer(n.dueTime,t)<=0?(this.comparer(n.dueTime,this.clock)>0&&(this.clock=n.dueTime),n.invoke()):this.isEnabled=!1}while(this.isEnabled);this.clock=t}},n.advanceBy=function(t){var e=this.add(this.clock,t),n=this.comparer(this.clock,e);if(n>0)throw new ce;0!==n&&this.advanceTo(e)},n.sleep=function(t){var e=this.add(this.clock,t);if(this.comparer(this.clock,e)>=0)throw new ce;this.clock=e},n.getNext=function(){for(;this.queue.length>0;){var t=this.queue.peek();if(!t.isCancelled())return t;this.queue.dequeue()}return null},n.scheduleAbsolute=function(t,e,n){function r(t,e){return o.queue.remove(i),n(t,e)}var o=this,i=new vn(this,t,r,e,this.comparer);return this.queue.enqueue(i),i.disposable},e}(bn);Ut.HistoricalScheduler=function(t){function e(e,n){var r=null==e?0:e,o=n||Kt;t.call(this,r,o)}Qe(e,t);var n=e.prototype;return n.add=function(t,e){return t+e},n.toAbsoluteTime=function(t){return new Date(t).getTime()},n.toRelativeTime=function(t){return t},e}(Ut.VirtualTimeScheduler),jt.prototype.equals=function(t){return t===this?!0:null==t?!1:"N"!==t.kind?!1:this.predicate(t.value)},kt.prototype.equals=function(t){return t===this?!0:null==t?!1:"E"!==t.kind?!1:this.predicate(t.error)};var Eu=Ut.ReactiveTest={created:100,subscribed:200,disposed:1e3,onNext:function(t,e){return"function"==typeof e?new Au(t,new jt(e)):new Au(t,jn.createOnNext(e))},onError:function(t,e){return"function"==typeof e?new Au(t,new kt(e)):new Au(t,jn.createOnError(e))},onCompleted:function(t){return new Au(t,jn.createOnCompleted())},subscribe:function(t,e){return new wu(t,e)}},Au=Ut.Recorded=function(t,e,n){this.time=t,this.value=e,this.comparer=n||$t};Au.prototype.equals=function(t){return this.time===t.time&&this.comparer(this.value,t.value)},Au.prototype.toString=function(){return this.value.toString()+"@"+this.time};var wu=Ut.Subscription=function(t,e){this.subscribe=t,this.unsubscribe=e||Number.MAX_VALUE};wu.prototype.equals=function(t){return this.subscribe===t.subscribe&&this.unsubscribe===t.unsubscribe},wu.prototype.toString=function(){return"("+this.subscribe+", "+(this.unsubscribe===Number.MAX_VALUE?"Infinite":this.unsubscribe)+")"};var mu=Ut.MockDisposable=function(t){this.scheduler=t,this.disposes=[],this.disposes.push(this.scheduler.clock)};mu.prototype.dispose=function(){this.disposes.push(this.scheduler.clock)};var Cu=function(t){function e(e){t.call(this),this.scheduler=e,this.messages=[]}Qe(e,t);var n=e.prototype;return n.onNext=function(t){this.messages.push(new Au(this.scheduler.clock,jn.createOnNext(t)))},n.onError=function(t){this.messages.push(new Au(this.scheduler.clock,jn.createOnError(t)))},n.onCompleted=function(){this.messages.push(new Au(this.scheduler.clock,jn.createOnCompleted()))},e}(In);qt.prototype.then=function(t,e){var r=this;this.subscriptions.push(new wu(this.scheduler.clock));var o,i=this.subscriptions.length-1,u=Ut.Observer.create(function(e){var s=t(e);if(s&&"function"==typeof s.then)o=s;else{var c=r.scheduler.clock;o=new qt(r.scheduler,[Ut.ReactiveTest.onNext(c,n),Ut.ReactiveTest.onCompleted(c)])}var h=r.observers.indexOf(u);r.observers.splice(h,1),r.subscriptions[i]=new wu(r.subscriptions[i].subscribe,r.scheduler.clock)},function(t){e(t);var n=r.observers.indexOf(u);r.observers.splice(n,1),r.subscriptions[i]=new wu(r.subscriptions[i].subscribe,r.scheduler.clock)});return this.observers.push(u),o||new qt(this.scheduler,this.messages)};var Fu=function(t){function e(e,n){t.call(this);var r,o,i=this;this.scheduler=e,this.messages=n,this.subscriptions=[],this.observers=[];for(var u=0,s=this.messages.length;s>u;u++)r=this.messages[u],o=r.value,function(t){e.scheduleAbsolute(null,r.time,function(){for(var e=i.observers.slice(0),n=0,r=e.length;r>n;n++)t.accept(e[n]);return un})}(o)}return Qe(e,t),e.prototype._subscribe=function(t){var e=this;this.observers.push(t),this.subscriptions.push(new wu(this.scheduler.clock));var n=this.subscriptions.length-1;return on(function(){var r=e.observers.indexOf(t);e.observers.splice(r,1),e.subscriptions[n]=new wu(e.subscriptions[n].subscribe,e.scheduler.clock)})},e}(Xn),gu=function(t){function e(e,n){t.call(this),this.scheduler=e,this.messages=n,this.subscriptions=[]}return Qe(e,t),e.prototype._subscribe=function(t){var e,n,r=this;this.subscriptions.push(new wu(this.scheduler.clock));for(var o=this.subscriptions.length-1,i=new en,u=0,s=this.messages.length;s>u;u++)e=this.messages[u],n=e.value,function(n){i.add(r.scheduler.scheduleRelative(null,e.time,function(){return n.accept(t),un}))}(n);return on(function(){r.subscriptions[o]=new wu(r.subscriptions[o].subscribe,r.scheduler.clock),i.dispose()})},e}(Xn);Ut.TestScheduler=function(t){function e(t,e){return t>e?1:e>t?-1:0}function n(){t.call(this,0,e)}return Qe(n,t),n.prototype.scheduleAbsolute=function(e,n,r){return n<=this.clock&&(n=this.clock+1),t.prototype.scheduleAbsolute.call(this,e,n,r)},n.prototype.add=function(t,e){return t+e},n.prototype.toAbsoluteTime=function(t){return new Date(t).getTime()},n.prototype.toRelativeTime=function(t){return t},n.prototype.startScheduler=function(t,e){e||(e={}),null==e.created&&(e.created=Eu.created),null==e.subscribed&&(e.subscribed=Eu.subscribed),null==e.disposed&&(e.disposed=Eu.disposed);var n,r,o=this.createObserver();return this.scheduleAbsolute(null,e.created,function(){return n=t(),un}),this.scheduleAbsolute(null,e.subscribed,function(){return r=n.subscribe(o),un}),this.scheduleAbsolute(null,e.disposed,function(){return r.dispose(),un}),this.start(),o},n.prototype.createHotObservable=function(){var t,e=arguments.length;if(Array.isArray(arguments[0]))t=arguments[0];else{t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}return new Fu(this,t)},n.prototype.createColdObservable=function(){var t,e=arguments.length;if(Array.isArray(arguments[0]))t=arguments[0];else{t=new Array(e);for(var n=0;e>n;n++)t[n]=arguments[n]}return new gu(this,t)},n.prototype.createResolvedPromise=function(t,e){return new qt(this,[Ut.ReactiveTest.onNext(t,e),Ut.ReactiveTest.onCompleted(t)])},n.prototype.createRejectedPromise=function(t,e){return new qt(this,[Ut.ReactiveTest.onError(t,e)])},n.prototype.createObserver=function(){return new Cu(this)},n}(yu);var Du=Ut.AnonymousObservable=function(t){function e(t){return t&&Yt(t.dispose)?t:Yt(t)?on(t):un}function n(t,n){var r=n[0],o=n[1],i=te(o.__subscribe).call(o,r);i!==Zt||r.fail(Zt.e)||u(Zt.e),r.setDisposable(e(i))}function r(e,n){this.source=n,this.__subscribe=e,t.call(this)}return Qe(r,t),r.prototype._subscribe=function(t){var e=new xu(t),r=[e,this];return gn.scheduleRequired()?gn.schedule(r,n):n(null,r),e},r}(Xn),xu=function(t){function e(e){t.call(this),this.observer=e,this.m=new an}Qe(e,t);var n=e.prototype;return n.next=function(t){var e=te(this.observer.onNext).call(this.observer,t);e===Zt&&(this.dispose(),u(e.e))},n.error=function(t){var e=te(this.observer.onError).call(this.observer,t);this.dispose(),e===Zt&&u(e.e)},n.completed=function(){var t=te(this.observer.onCompleted).call(this.observer);this.dispose(),t===Zt&&u(t.e)},n.setDisposable=function(t){this.m.setDisposable(t)},n.getDisposable=function(){return this.m.getDisposable()},n.dispose=function(){t.prototype.dispose.call(this),this.m.dispose()},e}(zn),Bu=function(t){function e(e,n){this._m=e,this._u=n,t.call(this)}return Qe(e,t),e.prototype.subscribeCore=function(t){return new pn(this._m.getDisposable(),this._u.subscribe(t))},e}($n),Nu=function(t){function e(e,n,r){t.call(this),this.key=e,this.underlyingObservable=r?new Bu(r,n):n}return Qe(e,t),e.prototype._subscribe=function(t){return this.underlyingObservable.subscribe(t)},e}(Xn),Ou=Ut.Subject=function(t){function e(){t.call(this),this.isDisposed=!1,this.isStopped=!1,this.observers=[],this.hasError=!1}return Qe(e,t),Ge(e.prototype,In.prototype,{_subscribe:function(t){return cn(this),this.isStopped?this.hasError?(t.onError(this.error),un):(t.onCompleted(),un):(this.observers.push(t),new Si(this,t))},hasObservers:function(){return cn(this),this.observers.length>0},onCompleted:function(){if(cn(this),!this.isStopped){this.isStopped=!0;for(var t=0,e=o(this.observers),n=e.length;n>t;t++)e[t].onCompleted();this.observers.length=0}},onError:function(t){if(cn(this),!this.isStopped){this.isStopped=!0,this.error=t,this.hasError=!0;for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onError(t);this.observers.length=0}},onNext:function(t){if(cn(this),!this.isStopped)for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onNext(t)},dispose:function(){this.isDisposed=!0,this.observers=null}}),e.create=function(t,e){return new qu(t,e)},e}(Xn),Su=Ut.AsyncSubject=function(t){function e(){t.call(this),this.isDisposed=!1,this.isStopped=!1,this.hasValue=!1,this.observers=[],this.hasError=!1}return Qe(e,t),Ge(e.prototype,In.prototype,{_subscribe:function(t){return cn(this),this.isStopped?(this.hasError?t.onError(this.error):this.hasValue?(t.onNext(this.value),t.onCompleted()):t.onCompleted(),un):(this.observers.push(t),new Si(this,t))},hasObservers:function(){return cn(this),this.observers.length>0},onCompleted:function(){var t,e;if(cn(this),!this.isStopped){this.isStopped=!0;var n=o(this.observers),e=n.length;if(this.hasValue)for(t=0;e>t;t++){var r=n[t];r.onNext(this.value),r.onCompleted()}else for(t=0;e>t;t++)n[t].onCompleted();this.observers.length=0}},onError:function(t){if(cn(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=t;for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onError(t);this.observers.length=0}},onNext:function(t){cn(this),this.isStopped||(this.value=t,this.hasValue=!0)},dispose:function(){this.isDisposed=!0,this.observers=null,this.error=null,this.value=null}}),e}(Xn),ju=Ut.BehaviorSubject=function(t){function e(e){t.call(this),this.value=e,this.observers=[],this.isDisposed=!1,this.isStopped=!1,this.hasError=!1}return Qe(e,t),Ge(e.prototype,In.prototype,{_subscribe:function(t){return cn(this),this.isStopped?(this.hasError?t.onError(this.error):t.onCompleted(),un):(this.observers.push(t),t.onNext(this.value),new Si(this,t))},getValue:function(){return cn(this),this.hasError&&u(this.error),this.value},hasObservers:function(){return cn(this),this.observers.length>0},onCompleted:function(){if(cn(this),!this.isStopped){this.isStopped=!0;for(var t=0,e=o(this.observers),n=e.length;n>t;t++)e[t].onCompleted();this.observers.length=0}},onError:function(t){if(cn(this),!this.isStopped){this.isStopped=!0,this.hasError=!0,this.error=t;for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onError(t);this.observers.length=0}},onNext:function(t){if(cn(this),!this.isStopped){this.value=t;for(var e=0,n=o(this.observers),r=n.length;r>e;e++)n[e].onNext(t)}},dispose:function(){this.isDisposed=!0,this.observers=null,this.value=null,this.error=null}}),e}(Xn),ku=Ut.ReplaySubject=function(t){function e(t,e){return on(function(){e.dispose(),!t.isDisposed&&t.observers.splice(t.observers.indexOf(e),1)})}function n(e,n,o){this.bufferSize=null==e?r:e,this.windowSize=null==n?r:n,this.scheduler=o||gn,this.q=[],this.observers=[],this.isStopped=!1,this.isDisposed=!1,this.hasError=!1,this.error=null,t.call(this)}var r=Math.pow(2,53)-1;return Qe(n,t),Ge(n.prototype,In.prototype,{_subscribe:function(t){cn(this);var n=new Hn(this.scheduler,t),r=e(this,n);this._trim(this.scheduler.now()),this.observers.push(n);for(var o=0,i=this.q.length;i>o;o++)n.onNext(this.q[o].value);return this.hasError?n.onError(this.error):this.isStopped&&n.onCompleted(),n.ensureActive(),r},hasObservers:function(){return cn(this),this.observers.length>0},_trim:function(t){for(;this.q.length>this.bufferSize;)this.q.shift();for(;this.q.length>0&&t-this.q[0].interval>this.windowSize;)this.q.shift()},onNext:function(t){if(cn(this),!this.isStopped){var e=this.scheduler.now();this.q.push({interval:e,value:t}),this._trim(e);for(var n=0,r=o(this.observers),i=r.length;i>n;n++){var u=r[n];u.onNext(t),u.ensureActive()}}},onError:function(t){if(cn(this),!this.isStopped){this.isStopped=!0,this.error=t,this.hasError=!0;var e=this.scheduler.now();this._trim(e);for(var n=0,r=o(this.observers),i=r.length;i>n;n++){var u=r[n];u.onError(t),u.ensureActive()}this.observers.length=0}},onCompleted:function(){if(cn(this),!this.isStopped){this.isStopped=!0;var t=this.scheduler.now();this._trim(t);for(var e=0,n=o(this.observers),r=n.length;r>e;e++){var i=n[e];i.onCompleted(),i.ensureActive()}this.observers.length=0}},dispose:function(){this.isDisposed=!0,this.observers=null}}),n}(Xn),qu=Ut.AnonymousSubject=function(t){function e(e,n){this.observer=e,this.observable=n,t.call(this)}return Qe(e,t),Ge(e.prototype,In.prototype,{_subscribe:function(t){return this.observable.subscribe(t)},onCompleted:function(){this.observer.onCompleted()},onError:function(t){this.observer.onError(t)},onNext:function(t){this.observer.onNext(t)}}),e}(Xn);Ut.Pauser=function(t){function e(){t.call(this)}return Qe(e,t),e.prototype.pause=function(){this.onNext(!1)},e.prototype.resume=function(){this.onNext(!0)},e}(Ou),"function"==typeof define&&"object"==typeof define.amd&&define.amd?(Vt.Rx=Ut,define(function(){return Ut})):Rt&&Mt?Wt?(Mt.exports=Ut).Rx=Ut:Rt.Rx=Ut:Vt.Rx=Ut;var Tu=f()}).call(this)},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(87),i=r(o),u=n(86),s=r(u),c="function"==typeof s["default"]&&"symbol"==typeof i["default"]?function(t){return typeof t}:function(t){return t&&"function"==typeof s["default"]&&t.constructor===s["default"]?"symbol":typeof t};e["default"]="function"==typeof s["default"]&&"symbol"===c(i["default"])?function(t){return"undefined"==typeof t?"undefined":c(t)}:function(t){return t&&"function"==typeof s["default"]&&t.constructor===s["default"]?"symbol":"undefined"==typeof t?"undefined":c(t)}},[161,14],5,function(t,e){t.exports=function(t){return"object"==typeof t?null!==t:"function"==typeof t}},[174,12,59,40,6],3,[166,27,46,23],function(t,e,n){var r=n(2),o=n(13),i=n(57),u=n(7),s="prototype",c=function(t,e,n){var h,a,f,p=t&c.F,l=t&c.G,d=t&c.S,v=t&c.P,b=t&c.B,_=t&c.W,y=l?o:o[e]||(o[e]={}),E=y[s],A=l?r:d?r[e]:(r[e]||{})[s];l&&(n=e);for(h in n)a=!p&&A&&void 0!==A[h],a&&h in y||(f=a?A[h]:n[h],y[h]=l&&"function"!=typeof A[h]?n[h]:b&&a?i(f,r):_&&A[h]==f?function(t){var e=function(e,n,r){if(this instanceof t){switch(arguments.length){case 0:return new t;case 1:return new t(e);case 2:return new t(e,n)}return new t(e,n,r)}return t.apply(this,arguments)};return e[s]=t[s],e}(f):v&&"function"==typeof f?i(Function.call,f):f,v&&((y.virtual||(y.virtual={}))[h]=f,t&c.R&&E&&!E[h]&&u(E,h,f)))};c.F=1,c.G=2,c.S=4,c.P=8,c.B=16,c.W=32,c.U=64,c.R=128,t.exports=c},function(t,e){t.exports=function(t){try{return!!t()}catch(e){return!0}}},function(t,e){t.exports=function(t,e){return{enumerable:!(1&t),configurable:!(2&t),writable:!(4&t),value:e}}},function(t,e){var n=0,r=Math.random();t.exports=function(t){return"Symbol(".concat(void 0===t?"":t,")_",(++n+r).toString(36))}},[161,25],[164,44],function(t,e,n){var r=n(9),o=n(5),i=n(17),u=n(72),s=n(42),c="prototype",h=function(t,e,n){var a,f,p,l,d=t&h.F,v=t&h.G,b=t&h.S,_=t&h.P,y=t&h.B,E=v?r:b?r[e]||(r[e]={}):(r[e]||{})[c],A=v?o:o[e]||(o[e]={}),w=A[c]||(A[c]={});v&&(n=e);for(a in n)f=!d&&E&&void 0!==E[a],p=(f?E:n)[a],l=y&&f?s(p,r):_&&"function"==typeof p?s(Function.call,p):p,E&&u(E,a,p,t&h.U),A[a]!=p&&i(A,a,l),_&&w[a]!=p&&(w[a]=p)};r.core=o,h.F=1,h.G=2,h.S=4,h.P=8,h.B=16,h.W=32,h.U=64,h.R=128,t.exports=h},14,function(t,e){t.exports={}},[174,22,129,146,23],[186,43],function(t,e){"use strict";e.__esModule=!0,e["default"]=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e){t.exports=function(t){if(void 0==t)throw TypeError("Can't call method on "+t);return t}},function(t,e){t.exports="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",")},26,[173,12,107,31,37,58,100],[178,65,31],function(t,e){e.f={}.propertyIsEnumerable},[179,15,3,8],[180,38,21],[181,2],function(t,e){var n=Math.ceil,r=Math.floor;t.exports=function(t){return isNaN(t=+t)?0:(t>0?r:n)(t)}},[187,14],function(t,e){var n={}.toString;t.exports=function(t){return n.call(t).slice(8,-1)}},[163,122],30,19,[169,41],20,[180,74,51],39,[184,45,43],[185,48],21,function(t,e){"use strict";var n=!1;t.exports={log:function(){var t;return n?(t=console).log.apply(t,arguments):void 0},logError:function(){var t;return n?(t=console).error.apply(t,arguments):void 0},enableLogging:function(){var t=arguments.length<=0||void 0===arguments[0]?!0:arguments[0];n=t}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){return Object.keys(t).forEach(function(e){t[e]=i(t[e])}),t}function i(t){if(null==t)return t;if(-1!==a.indexOf("undefined"==typeof t?"undefined":(0,h["default"])(t)))return t;if(Array.isArray(t))return t.map(i);if("TIME"===t.$reql_type$){var e=new Date;return e.setTime(1e3*t.epoch_time),e}return o(t)}function u(t){return Object.keys(t).forEach(function(e){t[e]=s(t[e])}),t}function s(t){return null==t?t:-1!==a.indexOf("undefined"==typeof t?"undefined":(0,h["default"])(t))?t:Array.isArray(t)?t.map(s):t instanceof Date?{$reql_type$:"TIME",epoch_time:t.getTime()/1e3,timezone:"Z"}:u(t)}var c=n(11),h=r(c);Object.assign(t.exports,{deserialize:i,serialize:s});var a=["string","number","boolean","function","symbol"]},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(85),i=r(o),u=n(84),s=r(u),c=n(11),h=r(c);e["default"]=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+("undefined"==typeof e?"undefined":(0,h["default"])(e)));t.prototype=(0,s["default"])(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(i["default"]?(0,i["default"])(t,e):t.__proto__=e)}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}e.__esModule=!0;var o=n(11),i=r(o);e["default"]=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==("undefined"==typeof e?"undefined":(0,i["default"])(e))&&"function"!=typeof e?t:e}},41,[163,96],[165,14,2],[168,6,19,58],[172,61,18,66,7,3,32,103,36,109,8],function(t,e){t.exports=!0},function(t,e,n){var r=n(35),o=n(20),i=n(4),u=n(40),s=n(3),c=n(59),h=Object.getOwnPropertyDescriptor;e.f=n(6)?h:function(t,e){if(t=i(t),e=u(e,!0),c)try{return h(t,e)}catch(n){}return s(t,e)?o(!r.f.call(t,e),t[e]):void 0}},function(t,e,n){var r=n(65),o=n(31).concat("length","prototype");e.f=Object.getOwnPropertyNames||function(t){return r(t,o)}},function(t,e){e.f=Object.getOwnPropertySymbols},[177,3,4,98,37],function(t,e,n){t.exports=n(7)},function(t,e,n){var r=n(1)("unscopables"),o=Array.prototype;void 0==o[r]&&n(17)(o,r,{}),t.exports=function(t){o[r][t]=!0}},[165,25,9],31,[172,136,24,72,17,16,26,133,73,141,1],[178,142,69],function(t,e,n){var r=n(9),o=n(17),i=n(16),u=n(51)("src"),s="toString",c=Function[s],h=(""+c).split(s);n(5).inspectSource=function(t){return c.call(t)},(t.exports=function(t,e,n,s){var c="function"==typeof n;c&&(i(n,"name")||o(n,"name",e)),t[e]!==n&&(c&&(i(n,u)||o(n,u,t[e]?""+t[e]:h.join(String(e)))),t===r?t[e]=n:s?t[e]?t[e]=n:o(t,e,n):(delete t[e],o(t,e,n)))})(Function.prototype,s,function(){return"function"==typeof this&&this[u]||c.call(this)})},[179,27,16,1],[181,9],function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){if(-1===this._legalMethods.indexOf(t))throw new Error(t+" cannot be called on the current query");if(b(t)in this._query)throw new Error(t+" has already been called on this query")}function i(t,e){var n=Boolean(e.find),r=Boolean(e.order);if(n){var o=function(){var e=!1,n=null;return{v:t.filter(function(t){return!e||"state"!==t.type}).scan(function(t,n){return e=!0,"synced"===n.state?t:n.new_val},n)}}();if("object"===("undefined"==typeof o?"undefined":(0,l["default"])(o)))return o.v}else{var i=function(){var n=!1,o=[];return{v:t.filter(function(t){return!n||"state"!==t.type}).scan(function(t,o){var i=t.slice();switch(o.type){case"remove":case"uninitial":var s=i.findIndex(function(t){return t.id===o.old_val.id});-1!==s&&i.splice(s,1);break;case"add":case"initial":i.push(o.new_val);break;case"change":var c=i.findIndex(function(t){return t.id===o.old_val.id});i[c]=o.new_val;break;case"state":break;default:throw new Error("unrecognized 'type' field from server "+JSON.stringify(o))}return r&&u(i,e.order[0],"ascending"===e.order[1]),n=!0,i},o)}}();if("object"===("undefined"==typeof i?"undefined":(0,l["default"])(i)))return i.v}}function u(t,e,n){var r=n?-1:1;return t.sort(function(t,n){var o=e.map(function(e){return t[e]}),i=e.map(function(t){return n[t]});return i>o?r:o>i?-r:0})}function s(t,e,n){y(t,e);var r=n;if(Array.isArray(n)){if(0===n.length)return _.Observable.empty()}else r=[n];var o=Object.assign({},this._query,{data:w(r)}),i=this._sendRequest(t,o);return this._lazyWrites||(i=i.shareReplay(),i.subscribe()),i}var c=n(55),h=r(c),a=n(54),f=r(a),p=n(11),l=r(p),d=n(29),v=r(d),b=n(159),_=n(10),y=n(80),E=n(83),A=n(53),w=A.serialize,m=function(){function t(e,n,r){(0,v["default"])(this,t),this._sendRequest=e,this._query=n,this._legalMethods=r}return t.prototype.watch=function(){var t=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],e=t.rawChanges,n=void 0===e?!1:e,r=this._sendRequest("subscribe",this._query);return n?r:i(r,this._query)},t.prototype.fetch=function(){return this._sendRequest("query",this._query)},t.prototype.findAll=function(){for(var t=arguments.length,e=Array(t),n=0;t>n;n++)e[n]=arguments[n];return o.call(this,"findAll"),y("findAll",arguments,{maxArgs:100}),new g(this._sendRequest,this._query,e)},t.prototype.find=function(t){return o.call(this,"find"),y("find",arguments),new F(this._sendRequest,this._query,t)},t.prototype.order=function(t){var e=arguments.length<=1||void 0===arguments[1]?"ascending":arguments[1];return o.call(this,"order"),y("order",arguments,{minArgs:1,maxArgs:2}),new B(this._sendRequest,this._query,t,e)},t.prototype.above=function(t){var e=arguments.length<=1||void 0===arguments[1]?"closed":arguments[1];return o.call(this,"above"),y("above",arguments,{minArgs:1,maxArgs:2}),new D(this._sendRequest,this._query,t,e)},t.prototype.below=function(t){var e=arguments.length<=1||void 0===arguments[1]?"open":arguments[1];return o.call(this,"below"),y("below",arguments,{minArgs:1,maxArgs:2}),new x(this._sendRequest,this._query,t,e)},t.prototype.limit=function(t){return o.call(this,"limit"),y("limit",arguments),new N(this._sendRequest,this._query,t)},t}(),C=function(t){function e(n,r,o){(0,v["default"])(this,e);var i={collection:r},u=["find","findAll","justInitial","order","above","below","limit"],s=(0,h["default"])(this,t.call(this,n,i,u));return s._lazyWrites=o,s}return(0,f["default"])(e,t),e.prototype.store=function(t){return s.call(this,"store",arguments,t)},e.prototype.upsert=function(t){return s.call(this,"upsert",arguments,t)},e.prototype.insert=function(t){return s.call(this,"insert",arguments,t)},e.prototype.replace=function(t){return s.call(this,"replace",arguments,t)},e.prototype.update=function(t){return s.call(this,"update",arguments,t)},e.prototype.remove=function(t){var e=E(t)?{id:t}:t;return s.call(this,"remove",arguments,e)},e.prototype.removeAll=function(t){if(!Array.isArray(t))throw new Error("removeAll takes an array as an argument");var e=t.map(function(t){return E(t)?{id:t}:t});return s.call(this,"removeAll",arguments,e)},e}(m),F=function(t){function e(n,r,o){(0,v["default"])(this,e);var i=E(o)?{id:o}:o,u=Object.assign({},r,{find:i});return(0,h["default"])(this,t.call(this,n,u,[]))}return(0,f["default"])(e,t),e}(m),g=function(t){function e(n,r,o){(0,v["default"])(this,e);var i=o.map(function(t){return E(t)?{id:t}:t}),u={find_all:i},s=Object.assign({},r,u),c=void 0;return c=1===i.length?["order","above","below","limit"]:[],(0,h["default"])(this,t.call(this,n,s,c))}return(0,f["default"])(e,t),e}(m),D=function(t){function e(n,r,o,i){(0,v["default"])(this,e);var u={above:[o,i]},s=Object.assign({},r,u),c=["findAll","order","below","limit"];return(0,h["default"])(this,t.call(this,n,s,c))}return(0,f["default"])(e,t),e}(m),x=function(t){function e(n,r,o,i){(0,v["default"])(this,e);var u={below:[o,i]},s=Object.assign({},r,u),c=["findAll","order","above","limit"];return(0,h["default"])(this,t.call(this,n,s,c))}return(0,f["default"])(e,t),e}(m),B=function(t){function e(n,r,o,i){(0,v["default"])(this,e);var u=Array.isArray(o)?o:[o],s={order:[u,i]},c=Object.assign({},r,s),a=["findAll","above","below","limit"];return(0,h["default"])(this,t.call(this,n,c,a))}return(0,f["default"])(e,t),e}(m),N=function(t){function e(n,r,o){(0,v["default"])(this,e);var i=Object.assign({},r,{limit:o});return(0,h["default"])(this,t.call(this,n,i,[]))}return(0,f["default"])(e,t),e}(m);t.exports={TermBase:m,Collection:C,FindAll:g,Find:F,Above:D,Below:x,Order:B,Limit:N}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}function o(t){var e=this,n=function(e){if(e.hasOwnProperty(t))return e[t];throw new Error("Unconfigured auth type: "+t)};return this._authMethods?a.Observable.just(this._authMethods).map(n):(console.log("No auth methods, have to fetch"),a.DOM.getJSON(this._horizonPath+"/auth_methods")["do"](function(t){e._authMethods=t}).map(n))}function i(){if(void 0===window.localStorage)return new p;try{return window.localStorage.setItem("$$fake",1),window.localStorage.removeItem("$$fake"),window.localStorage}catch(t){return void 0===window.sessionStorage?new p:window.sessionStorage}}function u(){return i().removeItem(f)}var s=n(29),c=r(s),h=n(82),a=n(10);n(154);var f="horizon-jwt",p=function(){function t(){(0,c["default"])(this,t),this.map=new Map}return t.prototype.setItem=function(t,e){return this.map.set(t,e)},t.prototype.getItem=function(t){return this.map.get(t)},t.prototype.removeItem=function(t){return this.map["delete"](t)},t}(),l=function(){function t(){var e=arguments.length<=0||void 0===arguments[0]?"unauthenticated":arguments[0];(0,c["default"])(this,t),this._storage=i(),this._authType=e}return t.prototype.set=function(t){return this._storage.setItem(f,t)},t.prototype.get=function(){return this._storage.getItem(f)},t.prototype.remove=function(){return this._storage.removeItem(f)},t.prototype.setAuthFromQueryParams=function(){var t=h(window.location.search);null!=t.horizon_auth&&this.set(t.horizon_auth)},t.prototype.handshake=function(){var t=this.get();if(null!=t)return{method:"token",token:t};if("token"===this._authType)throw new Error("Attempting to authenticate with a token, but no token is present");return{method:this._authType}},t.prototype.hasAuthToken=function(){return Boolean(this.get())},t}();t.exports={authEndpoint:o,TokenStorage:l,clearAuthTokens:u}},function(t,e,n){"use strict";function r(){function t(t){return new s(e,t,b)}function e(t,e){var n="removeAll"===t?"remove":t;return m.makeRequest({type:n,options:e}).concatMap(function(t){return t.data?t.data:[{state:t.state,type:t.type}]})["catch"](function(t){return i.Observable.create(function(e){e.onError(new Error(t.error))})})}var n=arguments.length<=0||void 0===arguments[0]?{}:arguments[0],r=n.host,u=void 0===r?_:r,h=n.secure,a=void 0===h?y:h,f=n.path,p=void 0===f?"horizon":f,l=n.lazyWrites,b=void 0===l?!1:l,E=n.authType,A=void 0===E?"unauthenticated":E,w=new v(A);w.setAuthFromQueryParams();var m=new c(u,a,p,w.handshake.bind(w));return m.handshake.subscribe(function(t){return w.set(t.token)}),t.dispose=function(){m.onCompleted()},t.connect=function(){var t=arguments.length<=0||void 0===arguments[0]?function(t){console.error("Received an error: "+t)}:arguments[0];m.subscribe(function(){},t)},t.status=o(m.status),t.onDisconnected=o(m.status.filter(function(t){return"disconnected"===t.type})),t.onConnected=o(m.status.filter(function(t){return"connected"===t.type})),t.onSocketError=o(m.status.filter(function(t){return"error"===t.type})),t._authMethods=null,t._horizonPath=p,t.authEndpoint=d,t.hasAuthToken=w.hasAuthToken.bind(w),t}function o(t){return function(){return arguments.length>0?t.subscribe.apply(t,arguments):t;
}}var i=n(10),u=n(75),s=u.Collection,c=n(79),h=n(52),a=h.log,f=h.logError,p=h.enableLogging,l=n(76),d=l.authEndpoint,v=l.TokenStorage,b=l.clearAuthTokens,_=window&&window.location&&""+window.location.host||"localhost:8181",y=window&&window.location&&"https:"===window.location.protocol||!1;r.log=a,r.logError=f,r.enableLogging=p,r.Socket=c,r.clearAuthTokens=b,t.exports=r},function(t,e){"use strict";"undefined"!=typeof WebSocket?t.exports.WebSocket=WebSocket:t.exports.WebSocket=function(){console.error("Tried to use WebSocket but it isn't defined or polyfilled")}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var o=n(29),i=r(o),u=n(55),s=r(u),c=n(54),h=r(c),a=n(10),f=n(78),p=f.WebSocket,l=n(53),d=l.serialize,v=l.deserialize,b=n(52),_=b.log,y="rethinkdb-horizon-v0",E={type:"unconnected"},A={type:"connected"},w={type:"error"},m={type:"disconnected"},C=function(t){function e(n,r){(0,i["default"])(this,e);var o=(0,s["default"])(this,t.call(this,n));return o.errorCode=r,o}return(0,h["default"])(e,t),e.prototype.toString=function(){return this.message+" (Code: "+this.errorCode+")"},e}(Error),F=function(t){function e(n,r,o,u){function c(t){var e=JSON.stringify(d(t));b.send(e)}function h(t,e){D.onNext(m),t?b.close(t,e):b.close(),b.onopen=void 0,b.onclose=void 0,b.onmessage=void 0}(0,i["default"])(this,e);var f="ws"+(r?"s":"")+"://"+n+"/"+o,l=[],b=void 0,F=void 0,g=new a.AsyncSubject,D=new a.BehaviorSubject(E),x=function(){return Boolean(b)&&b.readyState===p.OPEN},B=a.Observable.create(function(t){return b=new p(f,y),b.onerror=function(){D.onNext(w);var e="Websocket "+f+" experienced an error";t.onError(new Error(e))},b.onopen=function(){for(D.onNext(A),F=O.makeRequest(u()).subscribe(function(t){g.onNext(t),g.onCompleted()},function(t){return g.onError(t)},function(){return g.onCompleted()});l.length>0;){var t=l.shift();_("Sending buffered:",t),c(t)}},b.onmessage=function(e){var n=v(JSON.parse(e.data));_("Received",n),t.onNext(n)},b.onclose=function(e){D.onNext(m),1e3===e.code&&e.wasClean?t.onCompleted():t.onError(new Error("Socket closed unexpectedly with code: "+e.code))},function(){F&&F.dispose(),h(1e3,"")}}).share(),N=a.Observer.create(function(t){x()?(_("Sending",t),c(t)):(_("Buffering",t),l.push(t))},function(t){if(!t.code)throw new Error('no code specified. Be sure to pass { code: ###, reason: "" } to onError()');h(t.code,t.reason)},function(){h(1e3,"")}),O=(0,s["default"])(this,t.call(this,N,B)),S=new a.Subject,j=new a.Subject,k=a.Observable.merge(j,S),q=0,T=0,R=null;O.handshake=g,O.status=D;var M=function(){1===++q&&(R=k.subscribe(O))},P=function(){0===--q&&R.dispose()};return O.makeRequest=function(t){var e=T++;t.request_id=e;var n=void 0;return"subscribe"===t.type&&(n={request_id:e,type:"end_subscription"}),a.Observable.create(function(r){M(),j.onNext(t);var o=O.filter(function(t){return t.request_id===e}).subscribe(function(t){void 0!==t.error?r.onError(new C(t.error,t.error_code)):void 0===t.data&&void 0===t.token||r.onNext(t),"synced"===t.state?r.onNext({type:"state",state:"synced"}):"complete"===t.state&&r.onCompleted()},function(t){return r.onError(t)},function(){return r.onCompleted()});return function(){n&&S.onNext(n),P(),o.dispose()}})},O}return(0,h["default"])(e,t),e}(a.AnonymousSubject);t.exports=F},function(t,e,n){"use strict";var r=n(81);t.exports=function(t,e){var n=arguments.length<=2||void 0===arguments[2]?{}:arguments[2],o=n.nullable,i=void 0===o?!1:o,u=n.minArgs,s=void 0===u?1:u,c=n.maxArgs,h=void 0===c?1:c;if(s===h&&e.length!==s){var a=1===s?"":"s";throw new Error(t+" must receive exactly "+s+" argument"+a)}if(e.length<s){var f=1===s?"":"s";throw new Error(t+" must receive at least "+s+" argument"+f+".")}if(e.length>h){var p=1===h?"":"s";throw new Error(t+" accepts at most "+h+" argument"+p+".")}for(var l=0;l<e.length;l++){if(!i&&null===e[l]){var d=1!==h?" "+r(l+1):"";throw new Error("The"+d+" argument to "+t+" must be non-null")}if(void 0===e[l])throw new Error("The "+r(l+1)+" argument to "+t+" must be defined")}}},function(t,e){"use strict";t.exports=function(t){return-1!==[11,12,13].indexOf(t)?t+"th":t%10===1?t+"st":t%10===2?t+"nd":t%10===3?t+"rd":t+"th"}},function(t,e){"use strict";t.exports=function(t){if("string"!=typeof t)return{};var e=t.trim().replace(/^(\?|#|&)/,"");return e?e.split("&").reduce(function(t,e){var n=e.replace(/\+/g," ").split("="),r=n.shift(),o=n.length>0?n.join("="):void 0,i=decodeURIComponent(r),u=void 0===o?null:decodeURIComponent(o);return t.hasOwnProperty(i)?Array.isArray(t[i])?t[i].push(u):t[i]=[t[i],u]:t[i]=u,t},{}):{}}},function(t,e,n){"use strict";function r(t){return t&&t.__esModule?t:{"default":t}}var o=n(11),i=r(o),u=t.exports=function(t){if(null===t)return!1;if(-1!==["boolean","number","string"].indexOf("undefined"==typeof t?"undefined":(0,i["default"])(t)))return!0;if(Array.isArray(t)){var e=function(){var e=!1;return t.forEach(function(t){e=e||u(t)}),{v:e}}();if("object"===("undefined"==typeof e?"undefined":(0,i["default"])(e)))return e.v}return!1}},function(t,e,n){t.exports={"default":n(92),__esModule:!0}},function(t,e,n){t.exports={"default":n(93),__esModule:!0}},function(t,e,n){t.exports={"default":n(94),__esModule:!0}},function(t,e,n){t.exports={"default":n(95),__esModule:!0}},function(t,e,n){n(148),t.exports=n(5).Array.findIndex},function(t,e,n){n(152),n(149),t.exports=n(5).Array.from},function(t,e,n){n(150),t.exports=n(5).Array.keys},function(t,e,n){n(151),t.exports=n(5).Object.assign},function(t,e,n){n(116);var r=n(13).Object;t.exports=function(t,e){return r.create(t,e)}},function(t,e,n){n(117),t.exports=n(13).Object.setPrototypeOf},function(t,e,n){n(120),n(118),t.exports=n(13).Symbol},function(t,e,n){n(119),n(121),t.exports=n(8)("iterator")},function(t,e){t.exports=function(t){if("function"!=typeof t)throw TypeError(t+" is not a function!");return t}},function(t,e){t.exports=function(){}},[162,4,113,112],function(t,e,n){var r=n(34),o=n(64),i=n(35);t.exports=function(t){var e=r(t),n=o.f;if(n)for(var u,s=n(t),c=i.f,h=0;s.length>h;)c.call(t,u=s[h++])&&e.push(u);return e}},[167,2],[169,56],[170,56],[171,33,20,36,7,8],function(t,e){t.exports=function(t,e){return{value:e,done:!!t}}},function(t,e,n){var r=n(34),o=n(4);t.exports=function(t,e){for(var n,i=o(t),u=r(i),s=u.length,c=0;s>c;)if(i[n=u[c++]]===e)return n}},function(t,e,n){var r=n(21)("meta"),o=n(14),i=n(3),u=n(15).f,s=0,c=Object.isExtensible||function(){return!0},h=!n(19)(function(){return c(Object.preventExtensions({}))}),a=function(t){u(t,r,{value:{i:"O"+ ++s,w:{}}})},f=function(t,e){if(!o(t))return"symbol"==typeof t?t:("string"==typeof t?"S":"P")+t;if(!i(t,r)){if(!c(t))return"F";if(!e)return"E";a(t)}return t[r].i},p=function(t,e){if(!i(t,r)){if(!c(t))return!0;if(!e)return!1;a(t)}return t[r].w},l=function(t){return h&&d.NEED&&c(t)&&!i(t,r)&&a(t),t},d=t.exports={KEY:r,NEED:!1,fastKey:f,getWeak:p,onFreeze:l}},[175,15,12,34,6],function(t,e,n){var r=n(4),o=n(63).f,i={}.toString,u="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],s=function(t){try{return o(t)}catch(e){return u.slice()}};t.exports.f=function(t){return u&&"[object Window]"==i.call(t)?s(t):o(r(t))}},[176,3,114,37],function(t,e,n){var r=n(14),o=n(12),i=function(t,e){if(o(t),!r(e)&&null!==e)throw TypeError(e+": can't set as prototype!")};t.exports={set:Object.setPrototypeOf||("__proto__"in{}?function(t,e,r){try{r=n(57)(Function.call,n(62).f(Object.prototype,"__proto__").set,2),r(t,[]),e=!(t instanceof Array)}catch(o){e=!0}return function(t,n){return i(t,n),e?t.__proto__=n:r(t,n),t}}({},!1):void 0),check:i}},[182,39,30],[183,39],[185,39],[186,30],[189,97,104,32,4,60],function(t,e,n){var r=n(18);r(r.S,"Object",{create:n(33)})},function(t,e,n){var r=n(18);r(r.S,"Object",{setPrototypeOf:n(110).set})},function(t,e){},[190,111,60],function(t,e,n){"use strict";var r=n(2),o=n(13),i=n(3),u=n(6),s=n(18),c=n(66),h=n(106).KEY,a=n(19),f=n(38),p=n(36),l=n(21),d=n(8),v=n(105),b=n(99),_=n(102),y=n(12),E=n(4),A=n(40),w=n(20),m=n(33),C=n(108),F=n(62),g=n(15),D=F.f,x=g.f,B=C.f,N=r.Symbol,O=r.JSON,S=O&&O.stringify,j=!1,k="prototype",q=d("_hidden"),T=d("toPrimitive"),R={}.propertyIsEnumerable,M=f("symbol-registry"),P=f("symbols"),I=Object[k],L="function"==typeof N,W=r.QObject,z=u&&a(function(){return 7!=m(x({},"a",{get:function(){return x(this,"a",{value:7}).a}})).a})?function(t,e,n){var r=D(I,e);r&&delete I[e],x(t,e,n),r&&t!==I&&x(I,e,r)}:x,V=function(t){var e=P[t]=m(N[k]);return e._k=t,u&&j&&z(I,t,{configurable:!0,set:function(e){i(this,q)&&i(this[q],t)&&(this[q][t]=!1),z(this,t,w(1,e))}}),e},U=L&&"symbol"==typeof N.iterator?function(t){return"symbol"==typeof t}:function(t){return t instanceof N},H=function(t,e,n){return y(t),e=A(e,!0),y(n),i(P,e)?(n.enumerable?(i(t,q)&&t[q][e]&&(t[q][e]=!1),n=m(n,{enumerable:w(0,!1)})):(i(t,q)||x(t,q,w(1,{})),t[q][e]=!0),z(t,e,n)):x(t,e,n)},J=function(t,e){y(t);for(var n,r=b(e=E(e)),o=0,i=r.length;i>o;)H(t,n=r[o++],e[n]);return t},X=function(t,e){return void 0===e?m(t):J(m(t),e)},$=function(t){var e=R.call(this,t=A(t,!0));return e||!i(this,t)||!i(P,t)||i(this,q)&&this[q][t]?e:!0},K=function(t,e){var n=D(t=E(t),e=A(e,!0));return!n||!i(P,e)||i(t,q)&&t[q][e]||(n.enumerable=!0),n},Q=function(t){for(var e,n=B(E(t)),r=[],o=0;n.length>o;)i(P,e=n[o++])||e==q||e==h||r.push(e);return r},G=function(t){for(var e,n=B(E(t)),r=[],o=0;n.length>o;)i(P,e=n[o++])&&r.push(P[e]);return r},Y=function(t){if(void 0!==t&&!U(t)){for(var e,n,r=[t],o=1;arguments.length>o;)r.push(arguments[o++]);return e=r[1],"function"==typeof e&&(n=e),!n&&_(e)||(e=function(t,e){return n&&(e=n.call(this,t,e)),U(e)?void 0:e}),r[1]=e,S.apply(O,r)}},Z=a(function(){var t=N();return"[null]"!=S([t])||"{}"!=S({a:t})||"{}"!=S(Object(t))});L||(N=function(){if(this instanceof N)throw TypeError("Symbol is not a constructor!");return V(l(arguments.length>0?arguments[0]:void 0))},c(N[k],"toString",function(){return this._k}),F.f=K,g.f=H,n(63).f=C.f=Q,n(35).f=$,n(64).f=G,u&&!n(61)&&c(I,"propertyIsEnumerable",$,!0)),s(s.G+s.W+s.F*!L,{Symbol:N});for(var tt="hasInstance,isConcatSpreadable,iterator,match,replace,search,species,split,toPrimitive,toStringTag,unscopables".split(","),et=0;tt.length>et;){var nt=tt[et++],rt=o.Symbol,ot=d(nt);nt in rt||x(rt,nt,{value:L?ot:V(ot)})}W&&W[k]&&W[k].findChild||(j=!0),s(s.S+s.F*!L,"Symbol",{"for":function(t){return i(M,t+="")?M[t]:M[t]=N(t)},keyFor:function(t){if(U(t))return v(M,t);throw TypeError(t+" is not a symbol!")},useSetter:function(){j=!0},useSimple:function(){j=!1}}),s(s.S+s.F*!L,"Object",{create:X,defineProperty:H,defineProperties:J,getOwnPropertyDescriptor:K,getOwnPropertyNames:Q,getOwnPropertySymbols:G}),O&&s(s.S+s.F*(!L||Z),"JSON",{stringify:Y}),N[k][T]||n(7)(N[k],T,N[k].valueOf),p(N,"Symbol"),p(Math,"Math",!0),p(r.JSON,"JSON",!0)},function(t,e,n){n(115);for(var r=n(2),o=n(7),i=n(32),u=n(8)("toStringTag"),s=["NodeList","DOMTokenList","MediaList","StyleSheetList","CSSRuleList"],c=0;5>c;c++){var h=s[c],a=r[h],f=a&&a.prototype;f&&!f[u]&&o(f,u,h),i[h]=i.Array}},96,[162,49,50,145],function(t,e,n){var r=n(42),o=n(45),i=n(28),u=n(50),s=n(125);t.exports=function(t,e){var n=1==t,c=2==t,h=3==t,a=4==t,f=6==t,p=5==t||f,l=e||s;return function(e,s,d){for(var v,b,_=i(e),y=o(_),E=r(s,d,3),A=u(y.length),w=0,m=n?l(e,A):c?l(e,0):void 0;A>w;w++)if((p||w in y)&&(v=y[w],b=E(v,w,_),t))if(n)m[w]=b;else if(b)switch(t){case 3:return!0;case 5:return v;case 6:return w;case 2:m.push(v)}else if(a)return!1;return f?-1:h||a?a:m}}},function(t,e,n){var r=n(25),o=n(131),i=n(1)("species");t.exports=function(t,e){var n;return o(t)&&(n=t.constructor,"function"!=typeof n||n!==Array&&!o(n.prototype)||(n=void 0),r(n)&&(n=n[i],null===n&&(n=void 0))),new(void 0===n?Array:n)(e)}},function(t,e,n){var r=n(41),o=n(1)("toStringTag"),i="Arguments"==r(function(){return arguments}()),u=function(t,e){try{return t[e]}catch(n){}};t.exports=function(t){var e,n,s;return void 0===t?"Undefined":null===t?"Null":"string"==typeof(n=u(e=Object(t),o))?n:i?r(e):"Object"==(s=r(e))&&"function"==typeof e.callee?"Arguments":s}},function(t,e,n){"use strict";var r=n(27),o=n(46);t.exports=function(t,e,n){e in t?r.f(t,e,o(0,n)):t[e]=n}},[167,9],[168,23,44,68],function(t,e,n){var r=n(26),o=n(1)("iterator"),i=Array.prototype;t.exports=function(t){return void 0!==t&&(r.Array===t||i[o]===t)}},[170,41],function(t,e,n){var r=n(22);t.exports=function(t,e,n,o){try{return o?e(r(n)[0],n[1]):e(n)}catch(i){var u=t["return"];throw void 0!==u&&r(u.call(t)),i}}},[171,138,46,73,17,1],function(t,e,n){var r=n(1)("iterator"),o=!1;try{var i=[7][r]();i["return"]=function(){o=!0},Array.from(i,function(){throw 2})}catch(u){}t.exports=function(t,e){if(!e&&!o)return!1;var n=!1;try{var i=[7],u=i[r]();u.next=function(){return{done:n=!0}},i[r]=function(){return u},t(i)}catch(s){}return n}},104,function(t,e){t.exports=!1},function(t,e,n){"use strict";var r=n(71),o=n(140),i=n(143),u=n(28),s=n(45),c=Object.assign;t.exports=!c||n(44)(function(){var t={},e={},n=Symbol(),r="abcdefghijklmnopqrst";return t[n]=7,r.split("").forEach(function(t){e[t]=t}),7!=c({},t)[n]||Object.keys(c({},e)).join("")!=r})?function(t,e){for(var n=u(t),c=arguments.length,h=1,a=o.f,f=i.f;c>h;)for(var p,l=s(arguments[h++]),d=a?r(l).concat(a(l)):r(l),v=d.length,b=0;v>b;)f.call(l,p=d[b++])&&(n[p]=l[p]);return n}:c},[173,22,139,69,47,68,128],[175,27,22,71,23],64,[176,16,28,47],[177,16,49,123,47],35,[182,48,43],[183,48],[187,25],function(t,e,n){var r=n(126),o=n(1)("iterator"),i=n(26);t.exports=n(5).getIteratorMethod=function(t){return void 0!=t?t[o]||t["@@iterator"]||i[r(t)]:void 0}},function(t,e,n){"use strict";var r=n(24),o=n(124)(6),i="findIndex",u=!0;i in[]&&Array(1)[i](function(){u=!1}),r(r.P+r.F*u,"Array",{findIndex:function(t){return o(this,t,arguments.length>1?arguments[1]:void 0)}}),n(67)(i)},function(t,e,n){"use strict";var r=n(42),o=n(24),i=n(28),u=n(132),s=n(130),c=n(50),h=n(127),a=n(147);o(o.S+o.F*!n(134)(function(t){Array.from(t)}),"Array",{from:function(t){var e,n,o,f,p=i(t),l="function"==typeof this?this:Array,d=arguments.length,v=d>1?arguments[1]:void 0,b=void 0!==v,_=0,y=a(p);if(b&&(v=r(v,d>2?arguments[2]:void 0,2)),void 0==y||l==Array&&s(y))for(e=c(p.length),n=new l(e);e>_;_++)h(n,_,b?v(p[_],_):p[_]);else for(f=y.call(p),n=new l;!(o=f.next()).done;_++)h(n,_,b?u(f,v,[o.value,_],!0):o.value);return n.length=_,n}})},[189,67,135,26,49,70],function(t,e,n){var r=n(24);r(r.S+r.F,"Object",{assign:n(137)})},[190,144,70],function(t,e){var n={tr:{regexp:/\u0130|\u0049|\u0049\u0307/g,map:{"İ":"i",I:"ı","İ":"i"}},az:{regexp:/[\u0130]/g,map:{"İ":"i",I:"ı","İ":"i"}},lt:{regexp:/[\u0049\u004A\u012E\u00CC\u00CD\u0128]/g,map:{I:"i̇",J:"j̇","Į":"į̇","Ì":"i̇̀","Í":"i̇́","Ĩ":"i̇̃"}}};t.exports=function(t,e){var r=n[e];return t=null==t?"":String(t),r&&(t=t.replace(r.regexp,function(t){return r.map[t]})),t.toLowerCase()}},function(t,e,n){var r,o;(function(t,i){(function(u){function s(t){return t&&t.Object===Object?t:null}var c={"function":!0,object:!0},h=c[typeof e]&&e&&!e.nodeType?e:null,a=c[typeof t]&&t&&!t.nodeType?t:null,f=s(h&&a&&"object"==typeof i&&i),p=s(c[typeof self]&&self),l=s(c[typeof window]&&window),d=(a&&a.exports===h?h:null,s(c[typeof this]&&this)),v=f||l!==(d&&d.window)&&l||p||d||Function("return this")();r=[n(10)],o=function(t,e){return u(v,e,t)}.apply(e,r),!(void 0!==o&&(t.exports=o))}).call(this,function(t,e,n,r){function o(){if(t.XMLHttpRequest)return new t.XMLHttpRequest;var e;try{for(var n=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;3>r;r++)try{if(e=n[r],new t.ActiveXObject(e))break}catch(o){}return new t.ActiveXObject(e)}catch(o){throw new Error("XMLHttpRequest is not supported by your browser")}}function i(){var e=new t.XMLHttpRequest;if("withCredentials"in e)return e.withCredentials=!0,e;if(t.XDomainRequest)return new XDomainRequest;throw new Error("CORS is not supported by your browser")}function u(t,e,n){var r="response"in e?e.response:e.responseText;return r="json"===n.responseType?JSON.parse(r):r,{response:r,status:e.status,responseType:e.responseType,xhr:e,originalEvent:t}}function s(t,e,n){return{type:n,status:e.status,xhr:e,originalEvent:t}}var c=(n.Observable,n.ObservableBase),h=n.DOM||(n.DOM={}),a={}.hasOwnProperty,f=n.internals.inherits,p=function(e){function n(t){this._settings=t,e.call(this)}function r(t,e){this._state=t,this._xhr=e,this.isDisposed=!1}return f(n,e),n.prototype.subscribeCore=function(e){var n,o={isDone:!1},i=this._settings,u=i.normalizeError,s=i.normalizeSuccess,c=function(t,n){var r=1223===t.status?204:t.status;r>=200&&300>=r||0===r||""===r?(e.onNext(s(n,t,i)),e.onCompleted()):e.onError(i.normalizeError(n,t,"error")),o.isDone=!0};try{n=i.createXHR()}catch(h){return e.onError(h)}try{i.user?n.open(i.method,i.url,i.async,i.user,i.password):n.open(i.method,i.url,i.async);var f=i.headers;for(var p in f)a.call(f,p)&&n.setRequestHeader(p,f[p]);n.timeout=i.timeout,n.ontimeout=function(t){i.progressObserver&&i.progressObserver.onError(t),e.onError(u(t,n,"timeout"))},n.upload||!("withCredentials"in n)&&t.XDomainRequest?(n.onload=function(t){i.progressObserver&&(i.progressObserver.onNext(t),i.progressObserver.onCompleted()),c(n,t)},i.progressObserver&&(n.onprogress=function(t){i.progressObserver.onNext(t)}),n.onerror=function(t){i.progressObserver&&i.progressObserver.onError(t),e.onError(u(t,n,"error")),o.isDone=!0},n.onabort=function(t){i.progressObserver&&i.progressObserver.onError(t),e.onError(u(t,n,"abort")),o.isDone=!0}):n.onreadystatechange=function(t){4===n.readyState&&c(n,t)};var l=i.headers["Content-Type"]||i.headers["Content-type"]||i.headers["content-type"];if(i.hasContent&&"application/x-www-form-urlencoded"===l&&"string"!=typeof i.body){var d=[];for(var v in i.body)a.call(i.body,v)&&d.push(v+"="+i.body[v]);i.body=d.join("&")}n.send(i.hasContent&&i.body||null)}catch(b){e.onError(b)}return new r(o,n)},r.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._state.isDone||4===this._xhr.readyState||this._xhr.abort())},n}(c),l=h.ajax=function(t){var e={method:"GET",crossDomain:!1,async:!0,headers:{},responseType:"text",timeout:0,createXHR:function(){return this.crossDomain?i():o()},normalizeError:s,normalizeSuccess:u};if("string"==typeof t)e.url=t;else for(var n in t)a.call(t,n)&&(e[n]=t[n]);return e.crossDomain||e.headers["X-Requested-With"]||(e.headers["X-Requested-With"]="XMLHttpRequest"),e.hasContent=e.body!==r,new p(e)};h.post=function(t,e){var n;return"string"==typeof t?n={url:t,body:e,method:"POST"}:"object"==typeof t&&(n=t,n.method="POST"),l(n)},h.get=function(t){var e;return"string"==typeof t?e={url:t}:"object"==typeof t&&(e=t),l(e)},h.getJSON=function(e){if(!t.JSON&&"function"!=typeof t.JSON.parse)throw new TypeError("JSON is not supported in your runtime.");return l({url:e,responseType:"json"}).map(function(t){return t.response})};var d=function(){var e="document"in t&&t.document.createElement("div");return function(t){e.appendChild(t),e.innerHTML=""}}(),v=function(e){function n(t){this._settings=t,e.call(this)}function r(t){this._script=t,this.isDisposed=!1}return f(n,e),n.id=0,n.prototype.subscribeCore=function(e){var o={jsonp:"JSONPCallback",async:!0,jsonpCallback:"rxjsjsonpCallbackscallback_"+(n.id++).toString(36)};if("string"==typeof this._settings)o.url=this._settings;else for(var i in this._settings)a.call(this._settings,i)&&(o[i]=this._settings[i]);var u=t.document.createElement("script");u.type="text/javascript",u.async=o.async,u.src=o.url.replace(o.jsonp,o.jsonpCallback),t[o.jsonpCallback]=function(e){t[o.jsonpCallback].called=!0,t[o.jsonpCallback].data=e};var s=function(n){"load"!==n.type||t[o.jsonpCallback].called||(n={type:"error"});var r="error"===n.type?400:200,i=t[o.jsonpCallback].data;200===r?(e.onNext({status:r,responseType:"jsonp",response:i,originalEvent:n}),e.onCompleted()):e.onError({type:"error",status:r,originalEvent:n})};u.onload=u.onreadystatechanged=u.onerror=s;var c=t.document.getElementsByTagName("head")[0]||t.document.documentElement;return c.insertBefore(u,c.firstChild),new r(u)},r.prototype.dispose=function(){this.isDisposed||(this.isDisposed=!0,this._script.onload=this._script.onreadystatechanged=this._script.onerror=null,d(this._script),this._script=null)},n}(c);return h.jsonpRequest=function(t){return new v(t)},n})}).call(e,n(160)(t),function(){return this}())},function(t,e,n){var r=n(153),o=n(157),i=n(156),u=n(158);t.exports=function(t,e,n){function s(t,e,r){return 0===e||e===r.length-t.length?"":n}return null==t?"":(n=n||" ",t=String(t).replace(i,"$1 $2").replace(u,"$1 $2").replace(o,s),r(t,e))}},function(t,e){t.exports=/([\u0061-\u007A\u00B5\u00DF-\u00F6\u00F8-\u00FF\u0101\u0103\u0105\u0107\u0109\u010B\u010D\u010F\u0111\u0113\u0115\u0117\u0119\u011B\u011D\u011F\u0121\u0123\u0125\u0127\u0129\u012B\u012D\u012F\u0131\u0133\u0135\u0137\u0138\u013A\u013C\u013E\u0140\u0142\u0144\u0146\u0148\u0149\u014B\u014D\u014F\u0151\u0153\u0155\u0157\u0159\u015B\u015D\u015F\u0161\u0163\u0165\u0167\u0169\u016B\u016D\u016F\u0171\u0173\u0175\u0177\u017A\u017C\u017E-\u0180\u0183\u0185\u0188\u018C\u018D\u0192\u0195\u0199-\u019B\u019E\u01A1\u01A3\u01A5\u01A8\u01AA\u01AB\u01AD\u01B0\u01B4\u01B6\u01B9\u01BA\u01BD-\u01BF\u01C6\u01C9\u01CC\u01CE\u01D0\u01D2\u01D4\u01D6\u01D8\u01DA\u01DC\u01DD\u01DF\u01E1\u01E3\u01E5\u01E7\u01E9\u01EB\u01ED\u01EF\u01F0\u01F3\u01F5\u01F9\u01FB\u01FD\u01FF\u0201\u0203\u0205\u0207\u0209\u020B\u020D\u020F\u0211\u0213\u0215\u0217\u0219\u021B\u021D\u021F\u0221\u0223\u0225\u0227\u0229\u022B\u022D\u022F\u0231\u0233-\u0239\u023C\u023F\u0240\u0242\u0247\u0249\u024B\u024D\u024F-\u0293\u0295-\u02AF\u0371\u0373\u0377\u037B-\u037D\u0390\u03AC-\u03CE\u03D0\u03D1\u03D5-\u03D7\u03D9\u03DB\u03DD\u03DF\u03E1\u03E3\u03E5\u03E7\u03E9\u03EB\u03ED\u03EF-\u03F3\u03F5\u03F8\u03FB\u03FC\u0430-\u045F\u0461\u0463\u0465\u0467\u0469\u046B\u046D\u046F\u0471\u0473\u0475\u0477\u0479\u047B\u047D\u047F\u0481\u048B\u048D\u048F\u0491\u0493\u0495\u0497\u0499\u049B\u049D\u049F\u04A1\u04A3\u04A5\u04A7\u04A9\u04AB\u04AD\u04AF\u04B1\u04B3\u04B5\u04B7\u04B9\u04BB\u04BD\u04BF\u04C2\u04C4\u04C6\u04C8\u04CA\u04CC\u04CE\u04CF\u04D1\u04D3\u04D5\u04D7\u04D9\u04DB\u04DD\u04DF\u04E1\u04E3\u04E5\u04E7\u04E9\u04EB\u04ED\u04EF\u04F1\u04F3\u04F5\u04F7\u04F9\u04FB\u04FD\u04FF\u0501\u0503\u0505\u0507\u0509\u050B\u050D\u050F\u0511\u0513\u0515\u0517\u0519\u051B\u051D\u051F\u0521\u0523\u0525\u0527\u0561-\u0587\u1D00-\u1D2B\u1D6B-\u1D77\u1D79-\u1D9A\u1E01\u1E03\u1E05\u1E07\u1E09\u1E0B\u1E0D\u1E0F\u1E11\u1E13\u1E15\u1E17\u1E19\u1E1B\u1E1D\u1E1F\u1E21\u1E23\u1E25\u1E27\u1E29\u1E2B\u1E2D\u1E2F\u1E31\u1E33\u1E35\u1E37\u1E39\u1E3B\u1E3D\u1E3F\u1E41\u1E43\u1E45\u1E47\u1E49\u1E4B\u1E4D\u1E4F\u1E51\u1E53\u1E55\u1E57\u1E59\u1E5B\u1E5D\u1E5F\u1E61\u1E63\u1E65\u1E67\u1E69\u1E6B\u1E6D\u1E6F\u1E71\u1E73\u1E75\u1E77\u1E79\u1E7B\u1E7D\u1E7F\u1E81\u1E83\u1E85\u1E87\u1E89\u1E8B\u1E8D\u1E8F\u1E91\u1E93\u1E95-\u1E9D\u1E9F\u1EA1\u1EA3\u1EA5\u1EA7\u1EA9\u1EAB\u1EAD\u1EAF\u1EB1\u1EB3\u1EB5\u1EB7\u1EB9\u1EBB\u1EBD\u1EBF\u1EC1\u1EC3\u1EC5\u1EC7\u1EC9\u1ECB\u1ECD\u1ECF\u1ED1\u1ED3\u1ED5\u1ED7\u1ED9\u1EDB\u1EDD\u1EDF\u1EE1\u1EE3\u1EE5\u1EE7\u1EE9\u1EEB\u1EED\u1EEF\u1EF1\u1EF3\u1EF5\u1EF7\u1EF9\u1EFB\u1EFD\u1EFF-\u1F07\u1F10-\u1F15\u1F20-\u1F27\u1F30-\u1F37\u1F40-\u1F45\u1F50-\u1F57\u1F60-\u1F67\u1F70-\u1F7D\u1F80-\u1F87\u1F90-\u1F97\u1FA0-\u1FA7\u1FB0-\u1FB4\u1FB6\u1FB7\u1FBE\u1FC2-\u1FC4\u1FC6\u1FC7\u1FD0-\u1FD3\u1FD6\u1FD7\u1FE0-\u1FE7\u1FF2-\u1FF4\u1FF6\u1FF7\u210A\u210E\u210F\u2113\u212F\u2134\u2139\u213C\u213D\u2146-\u2149\u214E\u2184\u2C30-\u2C5E\u2C61\u2C65\u2C66\u2C68\u2C6A\u2C6C\u2C71\u2C73\u2C74\u2C76-\u2C7B\u2C81\u2C83\u2C85\u2C87\u2C89\u2C8B\u2C8D\u2C8F\u2C91\u2C93\u2C95\u2C97\u2C99\u2C9B\u2C9D\u2C9F\u2CA1\u2CA3\u2CA5\u2CA7\u2CA9\u2CAB\u2CAD\u2CAF\u2CB1\u2CB3\u2CB5\u2CB7\u2CB9\u2CBB\u2CBD\u2CBF\u2CC1\u2CC3\u2CC5\u2CC7\u2CC9\u2CCB\u2CCD\u2CCF\u2CD1\u2CD3\u2CD5\u2CD7\u2CD9\u2CDB\u2CDD\u2CDF\u2CE1\u2CE3\u2CE4\u2CEC\u2CEE\u2CF3\u2D00-\u2D25\u2D27\u2D2D\uA641\uA643\uA645\uA647\uA649\uA64B\uA64D\uA64F\uA651\uA653\uA655\uA657\uA659\uA65B\uA65D\uA65F\uA661\uA663\uA665\uA667\uA669\uA66B\uA66D\uA681\uA683\uA685\uA687\uA689\uA68B\uA68D\uA68F\uA691\uA693\uA695\uA697\uA723\uA725\uA727\uA729\uA72B\uA72D\uA72F-\uA731\uA733\uA735\uA737\uA739\uA73B\uA73D\uA73F\uA741\uA743\uA745\uA747\uA749\uA74B\uA74D\uA74F\uA751\uA753\uA755\uA757\uA759\uA75B\uA75D\uA75F\uA761\uA763\uA765\uA767\uA769\uA76B\uA76D\uA76F\uA771-\uA778\uA77A\uA77C\uA77F\uA781\uA783\uA785\uA787\uA78C\uA78E\uA791\uA793\uA7A1\uA7A3\uA7A5\uA7A7\uA7A9\uA7FA\uFB00-\uFB06\uFB13-\uFB17\uFF41-\uFF5A])([\u0041-\u005A\u00C0-\u00D6\u00D8-\u00DE\u0100\u0102\u0104\u0106\u0108\u010A\u010C\u010E\u0110\u0112\u0114\u0116\u0118\u011A\u011C\u011E\u0120\u0122\u0124\u0126\u0128\u012A\u012C\u012E\u0130\u0132\u0134\u0136\u0139\u013B\u013D\u013F\u0141\u0143\u0145\u0147\u014A\u014C\u014E\u0150\u0152\u0154\u0156\u0158\u015A\u015C\u015E\u0160\u0162\u0164\u0166\u0168\u016A\u016C\u016E\u0170\u0172\u0174\u0176\u0178\u0179\u017B\u017D\u0181\u0182\u0184\u0186\u0187\u0189-\u018B\u018E-\u0191\u0193\u0194\u0196-\u0198\u019C\u019D\u019F\u01A0\u01A2\u01A4\u01A6\u01A7\u01A9\u01AC\u01AE\u01AF\u01B1-\u01B3\u01B5\u01B7\u01B8\u01BC\u01C4\u01C7\u01CA\u01CD\u01CF\u01D1\u01D3\u01D5\u01D7\u01D9\u01DB\u01DE\u01E0\u01E2\u01E4\u01E6\u01E8\u01EA\u01EC\u01EE\u01F1\u01F4\u01F6-\u01F8\u01FA\u01FC\u01FE\u0200\u0202\u0204\u0206\u0208\u020A\u020C\u020E\u0210\u0212\u0214\u0216\u0218\u021A\u021C\u021E\u0220\u0222\u0224\u0226\u0228\u022A\u022C\u022E\u0230\u0232\u023A\u023B\u023D\u023E\u0241\u0243-\u0246\u0248\u024A\u024C\u024E\u0370\u0372\u0376\u0386\u0388-\u038A\u038C\u038E\u038F\u0391-\u03A1\u03A3-\u03AB\u03CF\u03D2-\u03D4\u03D8\u03DA\u03DC\u03DE\u03E0\u03E2\u03E4\u03E6\u03E8\u03EA\u03EC\u03EE\u03F4\u03F7\u03F9\u03FA\u03FD-\u042F\u0460\u0462\u0464\u0466\u0468\u046A\u046C\u046E\u0470\u0472\u0474\u0476\u0478\u047A\u047C\u047E\u0480\u048A\u048C\u048E\u0490\u0492\u0494\u0496\u0498\u049A\u049C\u049E\u04A0\u04A2\u04A4\u04A6\u04A8\u04AA\u04AC\u04AE\u04B0\u04B2\u04B4\u04B6\u04B8\u04BA\u04BC\u04BE\u04C0\u04C1\u04C3\u04C5\u04C7\u04C9\u04CB\u04CD\u04D0\u04D2\u04D4\u04D6\u04D8\u04DA\u04DC\u04DE\u04E0\u04E2\u04E4\u04E6\u04E8\u04EA\u04EC\u04EE\u04F0\u04F2\u04F4\u04F6\u04F8\u04FA\u04FC\u04FE\u0500\u0502\u0504\u0506\u0508\u050A\u050C\u050E\u0510\u0512\u0514\u0516\u0518\u051A\u051C\u051E\u0520\u0522\u0524\u0526\u0531-\u0556\u10A0-\u10C5\u10C7\u10CD\u1E00\u1E02\u1E04\u1E06\u1E08\u1E0A\u1E0C\u1E0E\u1E10\u1E12\u1E14\u1E16\u1E18\u1E1A\u1E1C\u1E1E\u1E20\u1E22\u1E24\u1E26\u1E28\u1E2A\u1E2C\u1E2E\u1E30\u1E32\u1E34\u1E36\u1E38\u1E3A\u1E3C\u1E3E\u1E40\u1E42\u1E44\u1E46\u1E48\u1E4A\u1E4C\u1E4E\u1E50\u1E52\u1E54\u1E56\u1E58\u1E5A\u1E5C\u1E5E\u1E60\u1E62\u1E64\u1E66\u1E68\u1E6A\u1E6C\u1E6E\u1E70\u1E72\u1E74\u1E76\u1E78\u1E7A\u1E7C\u1E7E\u1E80\u1E82\u1E84\u1E86\u1E88\u1E8A\u1E8C\u1E8E\u1E90\u1E92\u1E94\u1E9E\u1EA0\u1EA2\u1EA4\u1EA6\u1EA8\u1EAA\u1EAC\u1EAE\u1EB0\u1EB2\u1EB4\u1EB6\u1EB8\u1EBA\u1EBC\u1EBE\u1EC0\u1EC2\u1EC4\u1EC6\u1EC8\u1ECA\u1ECC\u1ECE\u1ED0\u1ED2\u1ED4\u1ED6\u1ED8\u1EDA\u1EDC\u1EDE\u1EE0\u1EE2\u1EE4\u1EE6\u1EE8\u1EEA\u1EEC\u1EEE\u1EF0\u1EF2\u1EF4\u1EF6\u1EF8\u1EFA\u1EFC\u1EFE\u1F08-\u1F0F\u1F18-\u1F1D\u1F28-\u1F2F\u1F38-\u1F3F\u1F48-\u1F4D\u1F59\u1F5B\u1F5D\u1F5F\u1F68-\u1F6F\u1FB8-\u1FBB\u1FC8-\u1FCB\u1FD8-\u1FDB\u1FE8-\u1FEC\u1FF8-\u1FFB\u2102\u2107\u210B-\u210D\u2110-\u2112\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u2130-\u2133\u213E\u213F\u2145\u2183\u2C00-\u2C2E\u2C60\u2C62-\u2C64\u2C67\u2C69\u2C6B\u2C6D-\u2C70\u2C72\u2C75\u2C7E-\u2C80\u2C82\u2C84\u2C86\u2C88\u2C8A\u2C8C\u2C8E\u2C90\u2C92\u2C94\u2C96\u2C98\u2C9A\u2C9C\u2C9E\u2CA0\u2CA2\u2CA4\u2CA6\u2CA8\u2CAA\u2CAC\u2CAE\u2CB0\u2CB2\u2CB4\u2CB6\u2CB8\u2CBA\u2CBC\u2CBE\u2CC0\u2CC2\u2CC4\u2CC6\u2CC8\u2CCA\u2CCC\u2CCE\u2CD0\u2CD2\u2CD4\u2CD6\u2CD8\u2CDA\u2CDC\u2CDE\u2CE0\u2CE2\u2CEB\u2CED\u2CF2\uA640\uA642\uA644\uA646\uA648\uA64A\uA64C\uA64E\uA650\uA652\uA654\uA656\uA658\uA65A\uA65C\uA65E\uA660\uA662\uA664\uA666\uA668\uA66A\uA66C\uA680\uA682\uA684\uA686\uA688\uA68A\uA68C\uA68E\uA690\uA692\uA694\uA696\uA722\uA724\uA726\uA728\uA72A\uA72C\uA72E\uA732\uA734\uA736\uA738\uA73A\uA73C\uA73E\uA740\uA742\uA744\uA746\uA748\uA74A\uA74C\uA74E\uA750\uA752\uA754\uA756\uA758\uA75A\uA75C\uA75E\uA760\uA762\uA764\uA766\uA768\uA76A\uA76C\uA76E\uA779\uA77B\uA77D\uA77E\uA780\uA782\uA784\uA786\uA78B\uA78D\uA790\uA792\uA7A0\uA7A2\uA7A4\uA7A6\uA7A8\uA7AA\uFF21-\uFF3A\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g},function(t,e){t.exports=/[^\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19]+/g;
},function(t,e){t.exports=/([\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])([^\u0030-\u0039\u00B2\u00B3\u00B9\u00BC-\u00BE\u0660-\u0669\u06F0-\u06F9\u07C0-\u07C9\u0966-\u096F\u09E6-\u09EF\u09F4-\u09F9\u0A66-\u0A6F\u0AE6-\u0AEF\u0B66-\u0B6F\u0B72-\u0B77\u0BE6-\u0BF2\u0C66-\u0C6F\u0C78-\u0C7E\u0CE6-\u0CEF\u0D66-\u0D75\u0E50-\u0E59\u0ED0-\u0ED9\u0F20-\u0F33\u1040-\u1049\u1090-\u1099\u1369-\u137C\u16EE-\u16F0\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1946-\u194F\u19D0-\u19DA\u1A80-\u1A89\u1A90-\u1A99\u1B50-\u1B59\u1BB0-\u1BB9\u1C40-\u1C49\u1C50-\u1C59\u2070\u2074-\u2079\u2080-\u2089\u2150-\u2182\u2185-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2CFD\u3007\u3021-\u3029\u3038-\u303A\u3192-\u3195\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\uA620-\uA629\uA6E6-\uA6EF\uA830-\uA835\uA8D0-\uA8D9\uA900-\uA909\uA9D0-\uA9D9\uAA50-\uAA59\uABF0-\uABF9\uFF10-\uFF19])/g},function(t,e,n){var r=n(155);t.exports=function(t,e){return r(t,e,"_")}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children=[],t.webpackPolyfill=1),t}},function(t,e,n,r){var o=n(r);t.exports=function(t){if(!o(t))throw TypeError(t+" is not an object!");return t}},function(t,e,n,r,o,i){var u=n(r),s=n(o),c=n(i);t.exports=function(t){return function(e,n,r){var o,i=u(e),h=s(i.length),a=c(r,h);if(t&&n!=n){for(;h>a;)if(o=i[a++],o!=o)return!0}else for(;h>a;a++)if((t||a in i)&&i[a]===n)return t||a||0;return!t&&-1}}},function(t,e,n,r){var o=n(r);t.exports=function(t,e,n){if(o(t),void 0===e)return t;switch(n){case 1:return function(n){return t.call(e,n)};case 2:return function(n,r){return t.call(e,n,r)};case 3:return function(n,r,o){return t.call(e,n,r,o)}}return function(){return t.apply(e,arguments)}}},function(t,e,n,r){t.exports=!n(r)(function(){return 7!=Object.defineProperty({},"a",{get:function(){return 7}}).a})},function(t,e,n,r,o){var i=n(r),u=n(o).document,s=i(u)&&i(u.createElement);t.exports=function(t){return s?u.createElement(t):{}}},function(t,e,n,r,o,i){var u=n(r),s=n(o);t.exports=n(i)?function(t,e,n){return u.f(t,e,s(1,n))}:function(t,e,n){return t[e]=n,t}},function(t,e,n,r){t.exports=n(r).document&&document.documentElement},function(t,e,n,r,o,i){t.exports=!n(r)&&!n(o)(function(){return 7!=Object.defineProperty(n(i)("div"),"a",{get:function(){return 7}}).a})},function(t,e,n,r){var o=n(r);t.exports=Object("z").propertyIsEnumerable(0)?Object:function(t){return"String"==o(t)?t.split(""):Object(t)}},function(t,e,n,r){var o=n(r);t.exports=Array.isArray||function(t){return"Array"==o(t)}},function(t,e,n,r,o,i,u,s){"use strict";var c=n(r),h=n(o),a=n(i),f={};n(u)(f,n(s)("iterator"),function(){return this}),t.exports=function(t,e,n){t.prototype=c(f,{next:h(1,n)}),a(t,e+" Iterator")}},function(t,e,n,r,o,i,u,s,c,h,a,f,p){"use strict";var l=n(r),d=n(o),v=n(i),b=n(u),_=n(s),y=n(c),E=n(h),A=n(a),w=n(f),m=n(p)("iterator"),C=!([].keys&&"next"in[].keys()),F="@@iterator",g="keys",D="values",x=function(){return this};t.exports=function(t,e,n,r,o,i,u){E(n,e,r);var s,c,h,a=function(t){if(!C&&t in N)return N[t];switch(t){case g:return function(){return new n(this,t)};case D:return function(){return new n(this,t)}}return function(){return new n(this,t)}},f=e+" Iterator",p=o==D,B=!1,N=t.prototype,O=N[m]||N[F]||o&&N[o],S=O||a(o),j=o?p?a("entries"):S:void 0,k="Array"==e?N.entries||O:O;if(k&&(h=w(k.call(new t)),h!==Object.prototype&&(A(h,f,!0),l||_(h,m)||b(h,m,x))),p&&O&&O.name!==D&&(B=!0,S=function(){return O.call(this)}),l&&!u||!C&&!B&&N[m]||b(N,m,S),y[e]=S,y[f]=x,o)if(s={values:p?S:a(D),keys:i?S:a(g),entries:j},u)for(c in s)c in N||v(N,c,s[c]);else d(d.P+d.F*(C||B),e,s);return s}},function(t,e,n,r,o,i,u,s,c){var h=n(r),a=n(o),f=n(i),p=n(u)("IE_PROTO"),l=function(){},d="prototype",v=function(){var t,e=n(s)("iframe"),r=f.length,o=">";for(e.style.display="none",n(c).appendChild(e),e.src="javascript:",t=e.contentWindow.document,t.open(),t.write("<script>document.F=Object</script"+o),t.close(),v=t.F;r--;)delete v[d][f[r]];return v()};t.exports=Object.create||function(t,e){var n;return null!==t?(l[d]=h(t),n=new l,l[d]=null,n[p]=t):n=v(),void 0===e?n:a(n,e)}},function(t,e,n,r,o,i,u){var s=n(r),c=n(o),h=n(i),a=Object.defineProperty;e.f=n(u)?Object.defineProperty:function(t,e,n){if(s(t),e=h(e,!0),s(n),c)try{return a(t,e,n)}catch(r){}if("get"in n||"set"in n)throw TypeError("Accessors not supported!");return"value"in n&&(t[e]=n.value),t}},function(t,e,n,r,o,i,u){var s=n(r),c=n(o),h=n(i);t.exports=n(u)?Object.defineProperties:function(t,e){c(t);for(var n,r=h(e),o=r.length,i=0;o>i;)s.f(t,n=r[i++],e[n]);return t}},function(t,e,n,r,o,i){var u=n(r),s=n(o),c=n(i)("IE_PROTO"),h=Object.prototype;t.exports=Object.getPrototypeOf||function(t){return t=s(t),u(t,c)?t[c]:"function"==typeof t.constructor&&t instanceof t.constructor?t.constructor.prototype:t instanceof Object?h:null}},function(t,e,n,r,o,i,u){var s=n(r),c=n(o),h=n(i)(!1),a=n(u)("IE_PROTO");t.exports=function(t,e){var n,r=c(t),o=0,i=[];for(n in r)n!=a&&s(r,n)&&i.push(n);for(;e.length>o;)s(r,n=e[o++])&&(~h(i,n)||i.push(n));return i}},function(t,e,n,r,o){var i=n(r),u=n(o);t.exports=Object.keys||function(t){return i(t,u)}},function(t,e,n,r,o,i){var u=n(r).f,s=n(o),c=n(i)("toStringTag");t.exports=function(t,e,n){t&&!s(t=n?t:t.prototype,c)&&u(t,c,{configurable:!0,value:e})}},function(t,e,n,r,o){var i=n(r)("keys"),u=n(o);t.exports=function(t){return i[t]||(i[t]=u(t))}},function(t,e,n,r){var o=n(r),i="__core-js_shared__",u=o[i]||(o[i]={});t.exports=function(t){return u[t]||(u[t]={})}},function(t,e,n,r,o){var i=n(r),u=n(o);t.exports=function(t){return function(e,n){var r,o,s=String(u(e)),c=i(n),h=s.length;return 0>c||c>=h?t?"":void 0:(r=s.charCodeAt(c),55296>r||r>56319||c+1===h||(o=s.charCodeAt(c+1))<56320||o>57343?t?s.charAt(c):r:t?s.slice(c,c+2):(r-55296<<10)+(o-56320)+65536)}}},function(t,e,n,r){var o=n(r),i=Math.max,u=Math.min;t.exports=function(t,e){return t=o(t),0>t?i(t+e,0):u(t,e)}},function(t,e,n,r,o){var i=n(r),u=n(o);t.exports=function(t){return i(u(t))}},function(t,e,n,r){var o=n(r),i=Math.min;t.exports=function(t){return t>0?i(o(t),9007199254740991):0}},function(t,e,n,r){var o=n(r);t.exports=function(t){return Object(o(t))}},function(t,e,n,r){var o=n(r);t.exports=function(t,e){if(!o(t))return t;var n,r;if(e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;if("function"==typeof(n=t.valueOf)&&!o(r=n.call(t)))return r;if(!e&&"function"==typeof(n=t.toString)&&!o(r=n.call(t)))return r;throw TypeError("Can't convert object to primitive value")}},function(t,e,n,r,o,i){var u=n(r)("wks"),s=n(o),c=n(i).Symbol,h="function"==typeof c;t.exports=function(t){return u[t]||(u[t]=h&&c[t]||(h?c:s)("Symbol."+t))}},function(t,e,n,r,o,i,u,s){"use strict";var c=n(r),h=n(o),a=n(i),f=n(u);t.exports=n(s)(Array,"Array",function(t,e){this._t=f(t),this._i=0,this._k=e},function(){var t=this._t,e=this._k,n=this._i++;return!t||n>=t.length?(this._t=void 0,h(1)):"keys"==e?h(0,n):"values"==e?h(0,t[n]):h(0,[n,t[n]])},"values"),a.Arguments=a.Array,c("keys"),c("values"),c("entries")},function(t,e,n,r,o){"use strict";var i=n(r)(!0);n(o)(String,"String",function(t){this._t=String(t),this._i=0},function(){var t,e=this._t,n=this._i;return n>=e.length?{value:void 0,done:!0}:(t=i(e,n),this._i+=t.length,{value:t,done:!1})})}]))});
//# sourceMappingURL=horizon.js.map
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment