From 4e4e086af761acbdfd3f3f91c38b316dab4e33b3 Mon Sep 17 00:00:00 2001 From: squidfunk Date: Tue, 17 Dec 2019 15:59:13 +0100 Subject: [PATCH] Added observable for web worker communication --- material/assets/javascripts/app.js | 16 ---- material/assets/javascripts/app.js.map | 1 - material/assets/javascripts/bundle.js | 2 + material/assets/javascripts/bundle.js.map | 1 + material/assets/javascripts/search.js | 59 ++++++++++++++ material/assets/javascripts/search.js.map | 1 + material/base.html | 4 +- package.json | 3 +- src/assets/javascripts/config/index.ts | 1 + src/assets/javascripts/ui/worker/index.ts | 96 +++++++++++++++++++++++ src/base.html | 5 +- tsconfig.json | 3 +- webpack.config.ts | 77 +++++++++--------- 13 files changed, 208 insertions(+), 61 deletions(-) delete mode 100644 material/assets/javascripts/app.js delete mode 100644 material/assets/javascripts/app.js.map create mode 100644 material/assets/javascripts/bundle.js create mode 100644 material/assets/javascripts/bundle.js.map create mode 100644 material/assets/javascripts/search.js create mode 100644 material/assets/javascripts/search.js.map create mode 100644 src/assets/javascripts/ui/worker/index.ts diff --git a/material/assets/javascripts/app.js b/material/assets/javascripts/app.js deleted file mode 100644 index 3e80fa891..000000000 --- a/material/assets/javascripts/app.js +++ /dev/null @@ -1,16 +0,0 @@ -!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=4)}([,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o}));var r="undefined"!=typeof window&&window,i="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=r||void 0!==t&&t||i}).call(this,n(5))},,,function(t,e,n){t.exports=n(6)},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function i(t){return function e(n){return 0===arguments.length||r(n)?e:t.apply(this,arguments)}}function o(t){return t}n.r(e);var u=i(o);function c(){}function s(){for(var t=[],e=0;e0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}($);function R(t){return t}function B(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),function t(e,n,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof n?function(i){return i.pipe(t((function(t,r){return L(e(t,r)).pipe(F((function(e,i){return n(t,e,r,i)})))}),r))}:("number"==typeof n&&(r=n),function(t){return t.lift(new U(e,r))})}(R,t)}function G(t,e){return e?D(t,e):new I(A(t))}function K(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof I?t[0]:B(n)(G(t,r))}function J(t,e){return"function"==typeof e?function(n){return n.pipe(J((function(n,r){return L(t(n,r)).pipe(F((function(t,i){return e(n,t,r,i)})))})))}:function(e){return e.lift(new Q(t))}}var X,Q=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new Z(t,this.project))},t}(),Z=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return h(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe();var i=new N(this,void 0,void 0);this.destination.add(i),this.innerSubscription=q(this,t,e,n,i)},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this),this.unsubscribe()},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.destination.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e}($),tt=function(){function t(){return Error.call(this),this.message="object unsubscribed",this.name="ObjectUnsubscribedError",this}return t.prototype=Object.create(Error.prototype),t}(),et=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return h(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(_),nt=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return h(e,t),e}(S),rt=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return h(e,t),e.prototype[x]=function(){return new nt(this)},e.prototype.lift=function(t){var e=new it(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new tt;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(ot),ct=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),st=function(t){function e(n,r){void 0===r&&(r=ct.now);var i=t.call(this,n,(function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return h(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(ct),at=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e}(st))(ut),ft=new I((function(t){return t.complete()}));function ht(t){return t?function(t){return new I((function(e){return t.schedule((function(){return e.complete()}))}))}(t):ft}function lt(){for(var t=[],e=0;ethis._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new _t(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new tt;if(this.isStopped||this.hasError?e=_.EMPTY:(this.observers.push(t),e=new et(this,t)),i&&t.add(t=new vt(t,i)),n)for(var u=0;ue&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(rt),_t=function(){return function(t,e){this.time=t,this.value=e}}();function gt(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,u=void 0===o?Number.POSITIVE_INFINITY:o,c=t.refCount,s=t.scheduler,a=0,f=!1,h=!1;return function(t){a++,e&&!f||(f=!1,e=new mt(i,u,s),n=t.subscribe({next:function(t){e.next(t)},error:function(t){f=!0,e.error(t)},complete:function(){h=!0,e.complete()}}));var r=e.subscribe(this);this.add((function(){a--,r.unsubscribe(),n&&!h&&c&&0===a&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function xt(t,e){return function(n){return n.lift(new St(t,e))}}var St=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new Et(t,this.predicate,this.thisArg))},t}(),Et=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return h(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(S),Ot=new st(ot);function It(t,e){void 0===e&&(e=Ot);var n,r=(n=t)instanceof Date&&!isNaN(+n)?+t-e.now():Math.abs(t);return function(t){return t.lift(new jt(r,e))}}var jt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.delay,this.scheduler))},t}(),Tt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return h(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Nt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(dt.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(dt.createComplete()),this.unsubscribe()},e}(S),Nt=function(){return function(t,e){this.time=t,this.notification=e}}();function At(t,e,n){return function(r){return r.lift(new Pt(t,e,n))}}var Pt=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new kt(t,this.nextOrObserver,this.error,this.complete))},t}(),kt=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=c,o._tapError=c,o._tapComplete=c,o._tapError=r||c,o._tapComplete=i||c,l(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||c,o._tapError=n.error||c,o._tapComplete=n.complete||c),o}return h(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(S);function Ct(t,e){return e?J((function(){return t}),e):J((function(){return t}))}function Mt(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var Vt=Object.prototype.toString,qt=function(){return"[object Arguments]"===Vt.call(arguments)?function(t){return"[object Arguments]"===Vt.call(t)}:function(t){return Mt("callee",t)}}(),$t=!{toString:null}.propertyIsEnumerable("toString"),Ft=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],Yt=function(){return arguments.propertyIsEnumerable("length")}(),zt=function(t,e){for(var n=0;n=0;)Mt(e=Ft[n],t)&&!zt(r,e)&&(r[r.length]=e),n-=1;return r})):i((function(t){return Object(t)!==t?[]:Object.keys(t)})),Ht=new I(c);var Lt=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new Ut(t,this.accumulator,this.seed,this.hasSeed))},t}(),Ut=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return h(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(S);function Wt(t,e){return void 0===e&&(e=document),e.querySelector(t)||void 0}var Rt={};function Bt(){for(var t=[],e=0;e0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function Zt(t,e){var n=t.pipe(xt((function(t){return t}))),r=t.pipe(xt((function(t){return!t})));return s(J((function(t){return Bt([lt(t),n])})),J((function(t){var n,i=Qt(t,2),o=i[0];return i[1]?e(o).pipe((n=r,function(t){return t.lift(new Jt(n))})):ft})))}var te=function(){return(te=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function ne(t,e){return e.load$.pipe(F((function(e){return t.reduce((function(t,n){var r,i=Wt("[data-md-component="+n+"]",e);return te(te({},t),void 0!==i?((r={})[n]=i,r):{})}),{})})),function(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new Lt(t,e,n))}}((function(t,e){var n,r;try{for(var i=ee(Dt(t)),o=i.next();!o.done;o=i.next()){var u=o.value;switch(u){case"title":case"container":u in t&&void 0!==t[u]&&(t[u].replaceWith(e[u]),t[u]=e[u]);break;default:t[u]=Wt("[data-md-component="+u+"]")}}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t}))).pipe(gt(1))}function re(t){return e=function(){var e="fixed"===getComputedStyle(t).getPropertyValue("position");return lt({sticky:e,height:e?t.offsetHeight:0})},new I((function(t){var n;try{n=e()}catch(e){return void t.error(e)}return(n?L(n):ht()).subscribe(t)}));var e}function ie(t,e){return function(n){return n.lift(new oe(t,e))}}var oe=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new ue(t,this.compare,this.keySelector))},t}(),ue=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return h(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(S),ce=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function se(t,e){var n=e.size$,r=e.offset$,i=e.header$;return Bt([r,n.pipe(Ct(i),F((function(e){var n=e.height;return t.offsetTop-n})),ie())]).pipe(F((function(t){var e=ce(t,2),n=e[0];return{x:n.x,y:n.y-e[1]}})),gt(1))}var ae=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return h(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(ot),fe=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return h(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r=e})),ie(),yt(fe),At((function(e){!function(t,e){t.setAttribute("data-md-state",e?"hidden":"")}(t,e)})),he((function(){!function(t){t.removeAttribute("data-md-state")}(t)})))}function be(){for(var t=[],e=0;e0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function we(t,e,n,r){return l(n)&&(r=n,n=void 0),r?we(t,e,n).pipe(F((function(t){return v(t)?r.apply(void 0,t):r(t)}))):new I((function(r){!function t(e,n,r,i,o){var u;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var c=e;e.addEventListener(n,r,o),u=function(){return c.removeEventListener(n,r,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var s=e;e.on(n,r),u=function(){return s.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var a=e;e.addListener(n,r),u=function(){return a.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var f=0,h=e.length;f1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function me(t){return function(e){return e.lift(new _e(t))}}var _e=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new ge(t,this.value))},t}(),ge=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return h(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(S);function xe(t){return we(t,"click").pipe(me(!0))}function Se(t){return function e(n,o){switch(arguments.length){case 0:return e;case 1:return r(n)?e:i((function(e){return t(n,e)}));default:return r(n)&&r(o)?e:r(n)?i((function(e){return t(e,o)})):r(o)?i((function(e){return t(n,e)})):t(n,o)}}}function Ee(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function Oe(t,e,n){for(var r=0,i=n.length;r=0;){if(n[c]===t)return r[c]===e;c-=1}switch(u){case"Map":return t.size===e.size&&Te(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&Te(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var s=Dt(t);if(s.length!==Dt(e).length)return!1;var a=n.concat([t]),f=r.concat([e]);for(c=s.length-1;c>=0;){var h=s[c];if(!Mt(h,e)||!Ne(e[h],t[h],a,f))return!1;c-=1}return!0}var Ae=Se((function(t,e){return Ne(t,e,[],[])})),Pe=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function ke(t,e){var n=e.offset$,r=e.main$,i=parseFloat(getComputedStyle(t.parentElement).getPropertyValue("padding-top")),o=Bt([n,r]).pipe(F((function(t){var e=Pe(t,2),n=e[0].y,r=e[1],o=r.offset;return r.height-i+Math.min(i,Math.max(0,n-o))}))),u=Bt([n,r]).pipe(F((function(t){var e=Pe(t,2);return e[0].y>=e[1].offset+i})));return Bt([o,u]).pipe(F((function(t){var e=Pe(t,2);return{height:e[0],lock:e[1]}})),ie(Ae),gt(1))}function Ce(t){return s(yt(fe),At((function(e){var n=e.height,r=e.lock;!function(t,e){t.style.height=e+"px"}(t,n),function(t,e){t.setAttribute("data-md-state",e?"lock":"")}(t,r)})),he((function(){!function(t){t.style.height=""}(t),function(t){t.removeAttribute("data-md-state")}(t)})))}n(1);function Me(){for(var t=[],e=0;e1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(S),ze=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return h(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new _).add(this.source.subscribe(new He(this.getSubject(),this))),t.closed&&(this._connection=null,t=_.EMPTY)),t},e.prototype.refCount=function(){return $e()(this)},e}(I),De=function(){var t=ze.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),He=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return h(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(nt);var Le=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}();function Ue(){return new rt}function We(){return function(t){return $e()((e=Ue,function(t){var r;if(r="function"==typeof e?e:function(){return e},"function"==typeof n)return t.lift(new Le(r,n));var i=Object.create(t,De);return i.source=t,i.subjectFactory=r,i})(t));var e,n}}var Re=we(window,"hashchange"),Be=we(window,"popstate");function Ge(t){var e=matchMedia(t);return function t(e,n,r){return r?t(e,n).pipe(F((function(t){return v(t)?r.apply(void 0,t):r(t)}))):new I((function(t){var r,i=function(){for(var e=[],n=0;n0})),We()),a=qe.pipe(me(document),gt(1)),f=ne(Ze,{load$:a}),h=function(t){return f.pipe(function(t){return s(J((function(e){return void 0!==e[t]?lt(e[t]):Ht})))}(t))},l=h("header").pipe(J(re)),p=h("main").pipe(J((function(t){return function(t,e){var n=e.size$,r=e.offset$,i=e.header$.pipe(be("height")),o=Bt([r,n,i]).pipe(F((function(e){var n=ve(e,3),r=n[0].y,i=n[1].height,o=n[2],u=t.offsetTop,c=t.offsetHeight+u;return i-Math.max(0,u-r,o)-Math.max(0,i+r-c)})),ie()),u=Bt([r,i]).pipe(F((function(e){var n=ve(e,2),r=n[0].y,i=n[1];return r>=t.offsetTop-i})),ie());return Bt([o,i,u]).pipe(F((function(e){var n=ve(e,3),r=n[0],i=n[1],o=n[2];return{offset:t.offsetTop-i,height:r,active:o}})),gt(1))}(t,{size$:n,offset$:e,header$:l})})),gt(1));h("header").pipe(J((function(t){return p.pipe(de(t))}))).subscribe(),h("navigation").pipe(Zt(r,(function(t){return ke(t,{offset$:e,main$:p}).pipe(Ce(t))})),gt(1)).subscribe(),h("toc").pipe(Zt(i,(function(t){return ke(t,{offset$:e,main$:p}).pipe(Ce(t))})),gt(1)).subscribe(),h("tabs").pipe(Zt(r,(function(t){return se(t,{size$:n,offset$:e,header$:l}).pipe(ye(t,8))})),gt(1)).subscribe(),h("hero").pipe(J((function(t){return se(t,{size$:n,offset$:e,header$:l}).pipe(ye(t,20))})),gt(1)).subscribe();Wt("[data-md-toggle=drawer]");var d,y=Wt("[data-md-toggle=search]");return K((d=y,we(d,"change").pipe(be("checked"))).pipe(xt(u),It(400)),h("reset").pipe(J(xe))).pipe(Ct(h("query")),s(At((function(t){return t.focus()})))).subscribe(),{watchDocument:function(){return a},watchLocation:function(){return o},watchLocationFragment:function(){return c},watchMediaScreen:function(){return r},watchMediaTablet:function(){return i},watchViewportOffset:function(){return e},watchViewportSize:function(){return n}}}document.documentElement.classList.remove("no-js"),document.documentElement.classList.add("js")}])); -//# sourceMappingURL=app.js.map \ No newline at end of file diff --git a/material/assets/javascripts/app.js.map b/material/assets/javascripts/app.js.map deleted file mode 100644 index 4e35a2d64..000000000 --- a/material/assets/javascripts/app.js.map +++ /dev/null @@ -1 +0,0 @@ -{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/rxjs/_esm5/internal/util/root.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/ramda/es/internal/_isPlaceholder.js","webpack:///./node_modules/ramda/es/internal/_curry1.js","webpack:///./node_modules/ramda/es/internal/_identity.js","webpack:///./node_modules/ramda/es/identity.js","webpack:///./node_modules/rxjs/_esm5/internal/util/noop.js","webpack:///./node_modules/rxjs/_esm5/internal/util/pipe.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isFunction.js","webpack:///./node_modules/rxjs/_esm5/internal/config.js","webpack:///./node_modules/rxjs/_esm5/internal/util/hostReportError.js","webpack:///./node_modules/rxjs/_esm5/internal/Observer.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArray.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isObject.js","webpack:///./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js","webpack:///./node_modules/rxjs/_esm5/internal/Subscription.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/Subscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/observable.js","webpack:///./node_modules/rxjs/_esm5/internal/Observable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/toSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/util/canReportError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/InnerSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/iterator.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArrayLike.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeTo.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js","webpack:///./node_modules/rxjs/_esm5/internal/OuterSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/map.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleArray.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduled.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/schedulePromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/from.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeMap.js","webpack:///./node_modules/rxjs/_esm5/internal/util/identity.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeAll.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMap.js","webpack:///./node_modules/rxjs/_esm5/internal/Notification.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js","webpack:///./node_modules/rxjs/_esm5/internal/SubjectSubscription.js","webpack:///./node_modules/rxjs/_esm5/internal/Subject.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/Action.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js","webpack:///./node_modules/rxjs/_esm5/internal/Scheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/queue.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/empty.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/of.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/throwError.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/observeOn.js","webpack:///./node_modules/rxjs/_esm5/internal/ReplaySubject.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/shareReplay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/filter.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/async.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/delay.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isDate.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/tap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js","webpack:///./node_modules/ramda/es/internal/_has.js","webpack:///./node_modules/ramda/es/internal/_isArguments.js","webpack:///./node_modules/ramda/es/keys.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/never.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/scan.js","webpack:///./src/assets/javascripts/utilities/element/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/combineLatest.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeUntil.js","webpack:///./src/assets/javascripts/utilities/operator/index.ts","webpack:///./src/assets/javascripts/theme/component/_/index.ts","webpack:///./src/assets/javascripts/theme/component/header/_/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/defer.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js","webpack:///./src/assets/javascripts/theme/component/header/offset/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/finalize.js","webpack:///./src/assets/javascripts/theme/component/header/shadow/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","webpack:///./src/assets/javascripts/theme/action/header/index.ts","webpack:///./src/assets/javascripts/theme/component/hidden/index.ts","webpack:///./src/assets/javascripts/theme/action/hidden/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/pluck.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEvent.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mapTo.js","webpack:///./src/assets/javascripts/theme/component/search/reset/index.ts","webpack:///./node_modules/ramda/es/internal/_curry2.js","webpack:///./node_modules/ramda/es/internal/_arrayFromIterator.js","webpack:///./node_modules/ramda/es/internal/_includesWith.js","webpack:///./node_modules/ramda/es/internal/_objectIs.js","webpack:///./node_modules/ramda/es/type.js","webpack:///./node_modules/ramda/es/internal/_equals.js","webpack:///./node_modules/ramda/es/internal/_functionName.js","webpack:///./node_modules/ramda/es/equals.js","webpack:///./src/assets/javascripts/theme/component/sidebar/index.ts","webpack:///./src/assets/javascripts/theme/action/sidebar/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/concat.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/startWith.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skip.js","webpack:///./src/assets/javascripts/ui/document/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/refCount.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/multicast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/share.js","webpack:///./src/assets/javascripts/ui/location/index.ts","webpack:///./src/assets/javascripts/ui/media/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js","webpack:///./src/assets/javascripts/ui/viewport/index.ts","webpack:///./src/assets/javascripts/index.ts","webpack:///./src/assets/javascripts/config/index.ts","webpack:///./src/assets/javascripts/theme/component/main/index.ts","webpack:///./src/assets/javascripts/theme/toggle/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__window","window","__self","self","WorkerGlobalScope","_root","global","g","this","Function","e","_isPlaceholder","a","_curry1","fn","f1","arguments","length","apply","_identity","x","noop","pipe","fns","_i","pipeFromArray","input","reduce","prev","extendStatics","b","setPrototypeOf","__proto__","Array","__extends","__","constructor","isFunction","_enable_super_gross_mode_that_will_cause_bad_things","Promise","undefined","Error","stack","hostReportError","err","setTimeout","empty","closed","next","error","useDeprecatedSynchronousErrorHandling","complete","isArray","isObject","UnsubscriptionError","UnsubscriptionErrorImpl","errors","message","map","toString","join","Subscription","unsubscribe","_parentOrParents","_subscriptions","_unsubscribe","remove","index","flattenUnsubscriptionErrors","len","sub","concat","push","add","teardown","subscription","EMPTY","tmp","indexOf","subscriptions","subscriptionIndex","splice","errs","rxSubscriber","Math","random","_super","Subscriber","destinationOrNext","_this","syncErrorValue","syncErrorThrown","syncErrorThrowable","isStopped","destination","subscriber","_next","_error","_complete","_unsubscribeAndRecycle","SafeSubscriber","_parentSubscriber","observerOrNext","context","_context","__tryOrSetError","__tryOrUnsub","wrappedComplete","parent","observable","Observable","subscribe","_isScalar","_subscribe","lift","operator","source","sink","nextOrObserver","toSubscriber","_trySubscribe","observer","_a","closed_1","canReportError","console","warn","forEach","promiseCtor","getPromiseCtor","resolve","reject","operations","toPromise","isScheduler","schedule","InnerSubscriber","outerValue","outerIndex","notifyNext","notifyError","notifyComplete","subscribeToArray","array","getSymbolIterator","iterator","isArrayLike","isPromise","then","subscribeTo","result","obj","obs","TypeError","promise","iterable","item","done","return","subscribeToResult","outerSubscriber","OuterSubscriber","innerValue","innerIndex","innerSub","project","thisArg","MapOperator","MapSubscriber","count","scheduleArray","scheduler","scheduled","isInteropObservable","scheduleObservable","schedulePromise","isIterable","scheduleIterable","from","MergeMapOperator","concurrent","Number","POSITIVE_INFINITY","MergeMapSubscriber","hasCompleted","buffer","active","_tryNext","_innerSub","ish","innerSubscriber","shift","mergeAll","mergeMap","resultSelector","ii","fromArray","merge","observables","last","pop","switchMap","SwitchMapOperator","NotificationKind","SwitchMapSubscriber","innerSubscription","ObjectUnsubscribedError","ObjectUnsubscribedErrorImpl","SubjectSubscription","subject","observers","subscriberIndex","SubjectSubscriber","Subject","hasError","thrownError","copy","slice","asObservable","AnonymousSubject","AsyncAction","work","pending","state","delay","id","recycleAsyncId","requestAsyncId","setInterval","flush","clearInterval","execute","_execute","errored","errorValue","actions","Action","QueueAction","Scheduler","SchedulerAction","now","Date","AsyncScheduler","delegate","action","queue","QueueScheduler","emptyScheduled","of","args","dispatch","Notification","kind","hasValue","observe","do","accept","toObservable","createNext","undefinedValueNotification","createError","createComplete","completeNotification","observeOn","ObserveOnOperator","ObserveOnSubscriber","arg","notification","scheduleMessage","ObserveOnMessage","ReplaySubject","bufferSize","windowTime","_events","_infiniteTimeWindow","_bufferSize","_windowTime","nextInfiniteTimeWindow","nextTimeWindow","ReplayEvent","_getNow","_trimBufferThenGetEvents","eventsCount","spliceCount","time","max","shareReplay","configOrBufferSize","config","refCount","_b","_c","useRefCount","isComplete","shareReplayOperator","filter","predicate","FilterOperator","FilterSubscriber","delayFor","isNaN","abs","DelayOperator","DelaySubscriber","delay_1","_schedule","scheduleNotification","DelayMessage","tap","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","switchMapTo","innerObservable","_has","prop","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","list","idx","keys","nIdx","ks","checkArgsLength","NEVER","ScanOperator","accumulator","seed","hasSeed","ScanSubscriber","_seed","set","configurable","getElement","selector","node","querySelector","NONE","combineLatest","CombineLatestOperator","CombineLatestSubscriber","values","toRespond","unused","oldVal","_tryResultSelector","TakeUntilOperator","notifier","takeUntilSubscriber","notifierSubscription","seenValue","TakeUntilSubscriber","switchMapIf","toggle$","begin$","end$","watchComponentMap","names","load$","document","components","el","scan","replaceWith","watchHeader","observableFactory","sticky","getComputedStyle","getPropertyValue","height","offsetHeight","distinctUntilChanged","compare","keySelector","DistinctUntilChangedOperator","DistinctUntilChangedSubscriber","hasKey","y","watchTopOffset","size$","offset$","header$","offsetTop","AnimationFrameAction","requestAnimationFrame","cancelAnimationFrame","animationFrame","AnimationFrameScheduler","finalize","callback","FinallyOperator","FinallySubscriber","paintHeaderShadow","setAttribute","setHeaderShadow","removeAttribute","resetHeaderShadow","paintHidden","offset","setHidden","resetHidden","pluck","properties","props","currentProp","plucker","fromEvent","target","eventName","options","setupSubscription","sourceObj","handler","addEventListener","removeEventListener","isEventTarget","source_1","on","off","isJQueryStyleEventEmitter","source_2","addListener","removeListener","isNodeStyleEventEmitter","source_3","mapTo","MapToOperator","MapToSubscriber","watchSearchReset","_curry2","f2","_arrayFromIterator","iter","_includesWith","pred","val","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_equals","aItem","f","match","typeA","equals","String","valueOf","ignoreCase","multiline","unicode","size","entries","keysA","extendedStackA","extendedStackB","watchSidebar","main$","adjust","parseFloat","parentElement","height$","min","lock$","lock","paintSidebar","style","setSidebarHeight","setSidebarLock","resetSidebarHeight","resetSidebarLock","concatAll","startWith","RefCountOperator","connectable","_refCount","refCounter","connection","connect","RefCountSubscriber","sharedConnection","_connection","ConnectableObservable","subjectFactory","_isComplete","getSubject","_subject","connectableObservableDescriptor","connectableProto","writable","ConnectableSubscriber","MulticastOperator","shareSubjectFactory","share","subjectOrSubjectFactory","hashchange$","popstate$","watchMedia","query","media","matchMedia","fromEventPattern","addHandler","removeHandler","retValue","matches","scroll$","resize$","getViewportOffset","pageXOffset","pageYOffset","getViewportSize","width","innerWidth","innerHeight","initialize","base","isConfig","SyntaxError","JSON","stringify","screen$","tablet$","location$","location","href","watchLocation","fragment$","hash","components$","component","switchComponent","adjust$","top","bottom","active$","watchMain","search","focus","watchDocument","watchLocationFragment","watchMediaScreen","watchMediaTablet","watchViewportOffset","watchViewportSize","documentElement","classList"],"mappings":"4DACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAA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kc,GAAa1G,OAGjBhF,GAAY,IAEX/K,YAGL0a,EAAU,OACPngB,KACC+U,GAAY4K,GAAS,SAAAnK,GAAM,OAAAiG,GAAajG,EAAI,CAAEmB,QAAO,EAAE+E,MAAK,IACzD1b,KACCkc,GAAa1G,OAGjBhF,GAAY,IAEX/K,YAGL0a,EAAU,QACPngB,KACC+U,GAAY2K,GAAS,SAAAlK,GAAM,OAAAiB,GAAejB,EAAI,CAAEkB,MAAK,EAAEC,QAAO,EAAEC,QAAO,IACpE5W,KACC4X,GAAYpC,EAAI,OAGpBhF,GAAY,IAEX/K,YAGL0a,EAAU,QACPngB,KACCmL,GAAU,SAAAqK,GAAM,OAAAiB,GAAejB,EAAI,CAAEkB,MAAK,EAAEC,QAAO,EAAEC,QAAO,IACzD5W,KACC4X,GAAYpC,EAAI,QAGpBhF,GAAY,IAEX/K,YAwBUmO,GAA6B,2BAA5C,IGrPA4B,EHsPMkL,EAAS9M,GAA6B,2BAsC5C,OARA7I,GGpRAyK,EHiQuBkL,EG/PhBrI,GAAU7C,EAAI,UAClBxV,KACCgY,GAAM,aH8PPhY,KACCiR,GAAO,GACP,GAAM,MAKCkP,EAAU,SAClBngB,KACCmL,EAAUwO,MAUX3Z,KACCoS,GAAY+N,EAAU,UAPjBngB,EACL8R,IAAI,SAAA0D,GAAM,OAAAA,EAAGmL,aASZlb,YAGE,CAGLmb,cAAuB,WAAM,OAAAvL,GAE7B0K,cAAuB,WAAM,OAAAH,GAC7BiB,sBAAuB,WAAM,OAAAb,GAC7Bc,iBAAuB,WAAM,OAAApB,GAC7BqB,iBAAuB,WAAM,OAAApB,GAC7BqB,oBAAuB,WAAM,OAAArK,GAC7BsK,kBAAuB,WAAM,OAAAvK,IAzOjCpB,SAAS4L,gBAAgBC,UAAUve,OAAO,SAC1C0S,SAAS4L,gBAAgBC,UAAUhe,IAAI","file":"app.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 4);\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __global = typeof global !== 'undefined' && global;\nvar _root = __window || __global || __self;\n/*@__PURE__*/ (function () {\n if (!_root) {\n throw /*@__PURE__*/ new Error('RxJS could not find any global context (window, self, global)');\n }\n})();\nexport { _root as root };\n//# sourceMappingURL=root.js.map\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","export default function _identity(x) {\n return x;\n}","import _curry1 from './internal/_curry1.js';\nimport _identity from './internal/_identity.js';\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\nvar identity = /*#__PURE__*/_curry1(_identity);\nexport default identity;","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function noop() { }\n//# sourceMappingURL=noop.js.map\n","/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */\nimport { noop } from './noop';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (!fns) {\n return noop;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map\n","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n//# sourceMappingURL=isFunction.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar _enable_super_gross_mode_that_will_cause_bad_things = false;\nexport var config = {\n Promise: undefined,\n set useDeprecatedSynchronousErrorHandling(value) {\n if (value) {\n var error = /*@__PURE__*/ new Error();\n /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n }\n else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');\n }\n _enable_super_gross_mode_that_will_cause_bad_things = value;\n },\n get useDeprecatedSynchronousErrorHandling() {\n return _enable_super_gross_mode_that_will_cause_bad_things;\n },\n};\n//# sourceMappingURL=config.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function hostReportError(err) {\n setTimeout(function () { throw err; }, 0);\n}\n//# sourceMappingURL=hostReportError.js.map\n","/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport var empty = {\n closed: true,\n next: function (value) { },\n error: function (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n },\n complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();\n//# sourceMappingURL=isArray.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isObject(x) {\n return x !== null && typeof x === 'object';\n}\n//# sourceMappingURL=isObject.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {\n function UnsubscriptionErrorImpl(errors) {\n Error.call(this);\n this.message = errors ?\n errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ') : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n return this;\n }\n UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return UnsubscriptionErrorImpl;\n})();\nexport var UnsubscriptionError = UnsubscriptionErrorImpl;\n//# sourceMappingURL=UnsubscriptionError.js.map\n","/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */\nimport { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nvar Subscription = /*@__PURE__*/ (function () {\n function Subscription(unsubscribe) {\n this.closed = false;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (unsubscribe) {\n this._unsubscribe = unsubscribe;\n }\n }\n Subscription.prototype.unsubscribe = function () {\n var errors;\n if (this.closed) {\n return;\n }\n var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;\n this.closed = true;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (_parentOrParents instanceof Subscription) {\n _parentOrParents.remove(this);\n }\n else if (_parentOrParents !== null) {\n for (var index = 0; index < _parentOrParents.length; ++index) {\n var parent_1 = _parentOrParents[index];\n parent_1.remove(this);\n }\n }\n if (isFunction(_unsubscribe)) {\n try {\n _unsubscribe.call(this);\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];\n }\n }\n if (isArray(_subscriptions)) {\n var index = -1;\n var len = _subscriptions.length;\n while (++index < len) {\n var sub = _subscriptions[index];\n if (isObject(sub)) {\n try {\n sub.unsubscribe();\n }\n catch (e) {\n errors = errors || [];\n if (e instanceof UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(e.errors));\n }\n else {\n errors.push(e);\n }\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n };\n Subscription.prototype.add = function (teardown) {\n var subscription = teardown;\n if (!teardown) {\n return Subscription.EMPTY;\n }\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(teardown);\n case 'object':\n if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {\n return subscription;\n }\n else if (this.closed) {\n subscription.unsubscribe();\n return subscription;\n }\n else if (!(subscription instanceof Subscription)) {\n var tmp = subscription;\n subscription = new Subscription();\n subscription._subscriptions = [tmp];\n }\n break;\n default: {\n throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n }\n }\n var _parentOrParents = subscription._parentOrParents;\n if (_parentOrParents === null) {\n subscription._parentOrParents = this;\n }\n else if (_parentOrParents instanceof Subscription) {\n if (_parentOrParents === this) {\n return subscription;\n }\n subscription._parentOrParents = [_parentOrParents, this];\n }\n else if (_parentOrParents.indexOf(this) === -1) {\n _parentOrParents.push(this);\n }\n else {\n return subscription;\n }\n var subscriptions = this._subscriptions;\n if (subscriptions === null) {\n this._subscriptions = [subscription];\n }\n else {\n subscriptions.push(subscription);\n }\n return subscription;\n };\n Subscription.prototype.remove = function (subscription) {\n var subscriptions = this._subscriptions;\n if (subscriptions) {\n var subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n };\n Subscription.EMPTY = (function (empty) {\n empty.closed = true;\n return empty;\n }(new Subscription()));\n return Subscription;\n}());\nexport { Subscription };\nfunction flattenUnsubscriptionErrors(errors) {\n return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);\n}\n//# sourceMappingURL=Subscription.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var rxSubscriber = /*@__PURE__*/ (function () {\n return typeof Symbol === 'function'\n ? /*@__PURE__*/ Symbol('rxSubscriber')\n : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();\n})();\nexport var $$rxSubscriber = rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map\n","/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { empty as emptyObserver } from './Observer';\nimport { Subscription } from './Subscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nvar Subscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subscriber, _super);\n function Subscriber(destinationOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this.syncErrorValue = null;\n _this.syncErrorThrown = false;\n _this.syncErrorThrowable = false;\n _this.isStopped = false;\n switch (arguments.length) {\n case 0:\n _this.destination = emptyObserver;\n break;\n case 1:\n if (!destinationOrNext) {\n _this.destination = emptyObserver;\n break;\n }\n if (typeof destinationOrNext === 'object') {\n if (destinationOrNext instanceof Subscriber) {\n _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n _this.destination = destinationOrNext;\n destinationOrNext.add(_this);\n }\n else {\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext);\n }\n break;\n }\n default:\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);\n break;\n }\n return _this;\n }\n Subscriber.prototype[rxSubscriberSymbol] = function () { return this; };\n Subscriber.create = function (next, error, complete) {\n var subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n };\n Subscriber.prototype.next = function (value) {\n if (!this.isStopped) {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (!this.isStopped) {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n this.destination.error(err);\n this.unsubscribe();\n };\n Subscriber.prototype._complete = function () {\n this.destination.complete();\n this.unsubscribe();\n };\n Subscriber.prototype._unsubscribeAndRecycle = function () {\n var _parentOrParents = this._parentOrParents;\n this._parentOrParents = null;\n this.unsubscribe();\n this.closed = false;\n this.isStopped = false;\n this._parentOrParents = _parentOrParents;\n return this;\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar SafeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SafeSubscriber, _super);\n function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this._parentSubscriber = _parentSubscriber;\n var next;\n var context = _this;\n if (isFunction(observerOrNext)) {\n next = observerOrNext;\n }\n else if (observerOrNext) {\n next = observerOrNext.next;\n error = observerOrNext.error;\n complete = observerOrNext.complete;\n if (observerOrNext !== emptyObserver) {\n context = Object.create(observerOrNext);\n if (isFunction(context.unsubscribe)) {\n _this.add(context.unsubscribe.bind(context));\n }\n context.unsubscribe = _this.unsubscribe.bind(_this);\n }\n }\n _this._context = context;\n _this._next = next;\n _this._error = error;\n _this._complete = complete;\n return _this;\n }\n SafeSubscriber.prototype.next = function (value) {\n if (!this.isStopped && this._next) {\n var _parentSubscriber = this._parentSubscriber;\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._next, value);\n }\n else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n var useDeprecatedSynchronousErrorHandling = config.useDeprecatedSynchronousErrorHandling;\n if (this._error) {\n if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._error, err);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, this._error, err);\n this.unsubscribe();\n }\n }\n else if (!_parentSubscriber.syncErrorThrowable) {\n this.unsubscribe();\n if (useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n hostReportError(err);\n }\n else {\n if (useDeprecatedSynchronousErrorHandling) {\n _parentSubscriber.syncErrorValue = err;\n _parentSubscriber.syncErrorThrown = true;\n }\n else {\n hostReportError(err);\n }\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.complete = function () {\n var _this = this;\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n if (this._complete) {\n var wrappedComplete = function () { return _this._complete.call(_this._context); };\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(wrappedComplete);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n this.unsubscribe();\n }\n }\n else {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n this.unsubscribe();\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n }\n };\n SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {\n if (!config.useDeprecatedSynchronousErrorHandling) {\n throw new Error('bad call');\n }\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n parent.syncErrorValue = err;\n parent.syncErrorThrown = true;\n return true;\n }\n else {\n hostReportError(err);\n return true;\n }\n }\n return false;\n };\n SafeSubscriber.prototype._unsubscribe = function () {\n var _parentSubscriber = this._parentSubscriber;\n this._context = null;\n this._parentSubscriber = null;\n _parentSubscriber.unsubscribe();\n };\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\n//# sourceMappingURL=Subscriber.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();\n//# sourceMappingURL=observable.js.map\n","/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */\nimport { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nvar Observable = /*@__PURE__*/ (function () {\n function Observable(subscribe) {\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var operator = this.operator;\n var sink = toSubscriber(observerOrNext, error, complete);\n if (operator) {\n sink.add(operator.call(sink, this.source));\n }\n else {\n sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n this._subscribe(sink) :\n this._trySubscribe(sink));\n }\n if (config.useDeprecatedSynchronousErrorHandling) {\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n }\n return sink;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n sink.syncErrorThrown = true;\n sink.syncErrorValue = err;\n }\n if (canReportError(sink)) {\n sink.error(err);\n }\n else {\n console.warn(err);\n }\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscription;\n subscription = _this.subscribe(function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n if (subscription) {\n subscription.unsubscribe();\n }\n }\n }, reject, resolve);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var source = this.source;\n return source && source.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n if (operations.length === 0) {\n return this;\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n if (!promiseCtor) {\n promiseCtor = config.Promise || Promise;\n }\n if (!promiseCtor) {\n throw new Error('no Promise impl found');\n }\n return promiseCtor;\n}\n//# sourceMappingURL=Observable.js.map\n","/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber) {\n return nextOrObserver;\n }\n if (nextOrObserver[rxSubscriberSymbol]) {\n return nextOrObserver[rxSubscriberSymbol]();\n }\n }\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber(emptyObserver);\n }\n return new Subscriber(nextOrObserver, error, complete);\n}\n//# sourceMappingURL=toSubscriber.js.map\n","/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n while (observer) {\n var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;\n if (closed_1 || isStopped) {\n return false;\n }\n else if (destination && destination instanceof Subscriber) {\n observer = destination;\n }\n else {\n observer = null;\n }\n }\n return true;\n}\n//# sourceMappingURL=canReportError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar InnerSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(InnerSubscriber, _super);\n function InnerSubscriber(parent, outerValue, outerIndex) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.outerValue = outerValue;\n _this.outerIndex = outerIndex;\n _this.index = 0;\n return _this;\n }\n InnerSubscriber.prototype._next = function (value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n };\n InnerSubscriber.prototype._error = function (error) {\n this.parent.notifyError(error, this);\n this.unsubscribe();\n };\n InnerSubscriber.prototype._complete = function () {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n };\n return InnerSubscriber;\n}(Subscriber));\nexport { InnerSubscriber };\n//# sourceMappingURL=InnerSubscriber.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var subscribeToArray = function (array) {\n return function (subscriber) {\n for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n };\n};\n//# sourceMappingURL=subscribeToArray.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = /*@__PURE__*/ getSymbolIterator();\nexport var $$iterator = iterator;\n//# sourceMappingURL=iterator.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isPromise(value) {\n return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n//# sourceMappingURL=isPromise.js.map\n","/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */\nimport { subscribeToArray } from './subscribeToArray';\nimport { subscribeToPromise } from './subscribeToPromise';\nimport { subscribeToIterable } from './subscribeToIterable';\nimport { subscribeToObservable } from './subscribeToObservable';\nimport { isArrayLike } from './isArrayLike';\nimport { isPromise } from './isPromise';\nimport { isObject } from './isObject';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeTo = function (result) {\n if (!!result && typeof result[Symbol_observable] === 'function') {\n return subscribeToObservable(result);\n }\n else if (isArrayLike(result)) {\n return subscribeToArray(result);\n }\n else if (isPromise(result)) {\n return subscribeToPromise(result);\n }\n else if (!!result && typeof result[Symbol_iterator] === 'function') {\n return subscribeToIterable(result);\n }\n else {\n var value = isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n var msg = \"You provided \" + value + \" where a stream was expected.\"\n + ' You can provide an Observable, Promise, Array, or Iterable.';\n throw new TypeError(msg);\n }\n};\n//# sourceMappingURL=subscribeTo.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeToObservable = function (obj) {\n return function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (typeof obs.subscribe !== 'function') {\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n }\n else {\n return obs.subscribe(subscriber);\n }\n };\n};\n//# sourceMappingURL=subscribeToObservable.js.map\n","/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */\nimport { hostReportError } from './hostReportError';\nexport var subscribeToPromise = function (promise) {\n return function (subscriber) {\n promise.then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, hostReportError);\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToPromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport var subscribeToIterable = function (iterable) {\n return function (subscriber) {\n var iterator = iterable[Symbol_iterator]();\n do {\n var item = iterator.next();\n if (item.done) {\n subscriber.complete();\n break;\n }\n subscriber.next(item.value);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n if (typeof iterator.return === 'function') {\n subscriber.add(function () {\n if (iterator.return) {\n iterator.return();\n }\n });\n }\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToIterable.js.map\n","/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nimport { Observable } from '../Observable';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {\n if (destination === void 0) {\n destination = new InnerSubscriber(outerSubscriber, outerValue, outerIndex);\n }\n if (destination.closed) {\n return undefined;\n }\n if (result instanceof Observable) {\n return result.subscribe(destination);\n }\n return subscribeTo(result)(destination);\n}\n//# sourceMappingURL=subscribeToResult.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar OuterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(OuterSubscriber, _super);\n function OuterSubscriber() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n OuterSubscriber.prototype.notifyError = function (error, innerSub) {\n this.destination.error(error);\n };\n OuterSubscriber.prototype.notifyComplete = function (innerSub) {\n this.destination.complete();\n };\n return OuterSubscriber;\n}(Subscriber));\nexport { OuterSubscriber };\n//# sourceMappingURL=OuterSubscriber.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n return function mapOperation(source) {\n if (typeof project !== 'function') {\n throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n }\n return source.lift(new MapOperator(project, thisArg));\n };\n}\nvar MapOperator = /*@__PURE__*/ (function () {\n function MapOperator(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n MapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n };\n return MapOperator;\n}());\nexport { MapOperator };\nvar MapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapSubscriber, _super);\n function MapSubscriber(destination, project, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.count = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n MapSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.project.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return MapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=map.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var i = 0;\n sub.add(scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n return;\n }\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n sub.add(this.schedule());\n }\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleArray.js.map\n","/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */\nimport { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n else if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n else if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n else if (isIterable(input) || typeof input === 'string') {\n return scheduleIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n//# sourceMappingURL=scheduled.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n return input && typeof input[Symbol_observable] === 'function';\n}\n//# sourceMappingURL=isInteropObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function scheduleObservable(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n var observable = input[Symbol_observable]();\n sub.add(observable.subscribe({\n next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },\n error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },\n complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },\n }));\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function schedulePromise(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n return input.then(function (value) {\n sub.add(scheduler.schedule(function () {\n subscriber.next(value);\n sub.add(scheduler.schedule(function () { return subscriber.complete(); }));\n }));\n }, function (err) {\n sub.add(scheduler.schedule(function () { return subscriber.error(err); }));\n });\n }));\n return sub;\n });\n}\n//# sourceMappingURL=schedulePromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n return input && typeof input[Symbol_iterator] === 'function';\n}\n//# sourceMappingURL=isIterable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function scheduleIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var iterator;\n sub.add(function () {\n if (iterator && typeof iterator.return === 'function') {\n iterator.return();\n }\n });\n sub.add(scheduler.schedule(function () {\n iterator = input[Symbol_iterator]();\n sub.add(scheduler.schedule(function () {\n if (subscriber.closed) {\n return;\n }\n var value;\n var done;\n try {\n var result = iterator.next();\n value = result.value;\n done = result.done;\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n this.schedule();\n }\n }));\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map\n","/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n if (!scheduler) {\n if (input instanceof Observable) {\n return input;\n }\n return new Observable(subscribeTo(input));\n }\n else {\n return scheduled(input, scheduler);\n }\n}\n//# sourceMappingURL=from.js.map\n","/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { map } from './map';\nimport { from } from '../observable/from';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(mergeMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };\n}\nvar MergeMapOperator = /*@__PURE__*/ (function () {\n function MergeMapOperator(project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n this.project = project;\n this.concurrent = concurrent;\n }\n MergeMapOperator.prototype.call = function (observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n };\n return MergeMapOperator;\n}());\nexport { MergeMapOperator };\nvar MergeMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MergeMapSubscriber, _super);\n function MergeMapSubscriber(destination, project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.concurrent = concurrent;\n _this.hasCompleted = false;\n _this.buffer = [];\n _this.active = 0;\n _this.index = 0;\n return _this;\n }\n MergeMapSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeMapSubscriber.prototype._tryNext = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.active++;\n this._innerSub(result, value, index);\n };\n MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {\n var innerSubscriber = new InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n subscribeToResult(this, ish, value, index, innerSubscriber);\n };\n MergeMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n this.unsubscribe();\n };\n MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\n else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n };\n return MergeMapSubscriber;\n}(OuterSubscriber));\nexport { MergeMapSubscriber };\n//# sourceMappingURL=mergeMap.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map\n","/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map\n","/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeToArray } from '../util/subscribeToArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function fromArray(input, scheduler) {\n if (!scheduler) {\n return new Observable(subscribeToArray(input));\n }\n else {\n return scheduleArray(input, scheduler);\n }\n}\n//# sourceMappingURL=fromArray.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\nexport function merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var concurrent = Number.POSITIVE_INFINITY;\n var scheduler = null;\n var last = observables[observables.length - 1];\n if (isScheduler(last)) {\n scheduler = observables.pop();\n if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n concurrent = observables.pop();\n }\n }\n else if (typeof last === 'number') {\n concurrent = observables.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {\n return observables[0];\n }\n return mergeAll(concurrent)(fromArray(observables, scheduler));\n}\n//# sourceMappingURL=merge.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { map } from './map';\nimport { from } from '../observable/from';\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(switchMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) { return source.lift(new SwitchMapOperator(project)); };\n}\nvar SwitchMapOperator = /*@__PURE__*/ (function () {\n function SwitchMapOperator(project) {\n this.project = project;\n }\n SwitchMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n };\n return SwitchMapOperator;\n}());\nvar SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SwitchMapSubscriber, _super);\n function SwitchMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.index = 0;\n return _this;\n }\n SwitchMapSubscriber.prototype._next = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result, value, index);\n };\n SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n var innerSubscriber = new InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = subscribeToResult(this, result, value, index, innerSubscriber);\n };\n SwitchMapSubscriber.prototype._complete = function () {\n var innerSubscription = this.innerSubscription;\n if (!innerSubscription || innerSubscription.closed) {\n _super.prototype._complete.call(this);\n }\n this.unsubscribe();\n };\n SwitchMapSubscriber.prototype._unsubscribe = function () {\n this.innerSubscription = null;\n };\n SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var destination = this.destination;\n destination.remove(innerSub);\n this.innerSubscription = null;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n return SwitchMapSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=switchMap.js.map\n","/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */\nimport { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nexport var NotificationKind;\n/*@__PURE__*/ (function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = /*@__PURE__*/ (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n Notification.prototype.observe = function (observer) {\n switch (this.kind) {\n case 'N':\n return observer.next && observer.next(this.value);\n case 'E':\n return observer.error && observer.error(this.error);\n case 'C':\n return observer.complete && observer.complete();\n }\n };\n Notification.prototype.do = function (next, error, complete) {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return next && next(this.value);\n case 'E':\n return error && error(this.error);\n case 'C':\n return complete && complete();\n }\n };\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n return this.observe(nextOrObserver);\n }\n else {\n return this.do(nextOrObserver, error, complete);\n }\n };\n Notification.prototype.toObservable = function () {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return of(this.value);\n case 'E':\n return throwError(this.error);\n case 'C':\n return empty();\n }\n throw new Error('unexpected notification kind value');\n };\n Notification.createNext = function (value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n Notification.undefinedValueNotification = new Notification('N', undefined);\n return Notification;\n}());\nexport { Notification };\n//# sourceMappingURL=Notification.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {\n function ObjectUnsubscribedErrorImpl() {\n Error.call(this);\n this.message = 'object unsubscribed';\n this.name = 'ObjectUnsubscribedError';\n return this;\n }\n ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return ObjectUnsubscribedErrorImpl;\n})();\nexport var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from './Subscription';\nvar SubjectSubscription = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscription, _super);\n function SubjectSubscription(subject, subscriber) {\n var _this = _super.call(this) || this;\n _this.subject = subject;\n _this.subscriber = subscriber;\n _this.closed = false;\n return _this;\n }\n SubjectSubscription.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.closed = true;\n var subject = this.subject;\n var observers = subject.observers;\n this.subject = null;\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n var subscriberIndex = observers.indexOf(this.subscriber);\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n };\n return SubjectSubscription;\n}(Subscription));\nexport { SubjectSubscription };\n//# sourceMappingURL=SubjectSubscription.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nvar SubjectSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscriber, _super);\n function SubjectSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n return _this;\n }\n return SubjectSubscriber;\n}(Subscriber));\nexport { SubjectSubscriber };\nvar Subject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.observers = [];\n _this.closed = false;\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype[rxSubscriberSymbol] = function () {\n return new SubjectSubscriber(this);\n };\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype.next = function (value) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n if (!this.isStopped) {\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].next(value);\n }\n }\n };\n Subject.prototype.error = function (err) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.hasError = true;\n this.thrownError = err;\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].error(err);\n }\n this.observers.length = 0;\n };\n Subject.prototype.complete = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].complete();\n }\n this.observers.length = 0;\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = true;\n this.closed = true;\n this.observers = null;\n };\n Subject.prototype._trySubscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else {\n return _super.prototype._trySubscribe.call(this, subscriber);\n }\n };\n Subject.prototype._subscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.hasError) {\n subscriber.error(this.thrownError);\n return Subscription.EMPTY;\n }\n else if (this.isStopped) {\n subscriber.complete();\n return Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n return new SubjectSubscription(this, subscriber);\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var destination = this.destination;\n if (destination && destination.next) {\n destination.next(value);\n }\n };\n AnonymousSubject.prototype.error = function (err) {\n var destination = this.destination;\n if (destination && destination.error) {\n this.destination.error(err);\n }\n };\n AnonymousSubject.prototype.complete = function () {\n var destination = this.destination;\n if (destination && destination.complete) {\n this.destination.complete();\n }\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var source = this.source;\n if (source) {\n return this.source.subscribe(subscriber);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map\n","/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Action } from './Action';\nvar AsyncAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n clearInterval(id);\n return undefined;\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, delay) {\n var errored = false;\n var errorValue = undefined;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = !!e && e || new Error(e);\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype._unsubscribe = function () {\n var id = this.id;\n var scheduler = this.scheduler;\n var actions = scheduler.actions;\n var index = actions.indexOf(this);\n this.work = null;\n this.state = null;\n this.pending = false;\n this.scheduler = null;\n if (index !== -1) {\n actions.splice(index, 1);\n }\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n };\n return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return this;\n };\n return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar QueueAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return (delay > 0 || this.closed) ?\n _super.prototype.execute.call(this, state, delay) :\n this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n return scheduler.flush(this);\n };\n return QueueAction;\n}(AsyncAction));\nexport { QueueAction };\n//# sourceMappingURL=QueueAction.js.map\n","var Scheduler = /*@__PURE__*/ (function () {\n function Scheduler(SchedulerAction, now) {\n if (now === void 0) {\n now = Scheduler.now;\n }\n this.SchedulerAction = SchedulerAction;\n this.now = now;\n }\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) {\n delay = 0;\n }\n return new this.SchedulerAction(this, work).schedule(state, delay);\n };\n Scheduler.now = function () { return Date.now(); };\n return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) {\n now = Scheduler.now;\n }\n var _this = _super.call(this, SchedulerAction, function () {\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {\n return AsyncScheduler.delegate.now();\n }\n else {\n return now();\n }\n }) || this;\n _this.actions = [];\n _this.active = false;\n _this.scheduled = undefined;\n return _this;\n }\n AsyncScheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) {\n delay = 0;\n }\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n return AsyncScheduler.delegate.schedule(work, delay, state);\n }\n else {\n return _super.prototype.schedule.call(this, work, delay, state);\n }\n };\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this.active) {\n actions.push(action);\n return;\n }\n var error;\n this.active = true;\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (action = actions.shift());\n this.active = false;\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map\n","/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */\nimport { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport var queue = /*@__PURE__*/ new QueueScheduler(QueueAction);\n//# sourceMappingURL=queue.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar QueueScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(QueueScheduler, _super);\n function QueueScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return QueueScheduler;\n}(AsyncScheduler));\nexport { QueueScheduler };\n//# sourceMappingURL=QueueScheduler.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport var EMPTY = /*@__PURE__*/ new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map\n","/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = args[args.length - 1];\n if (isScheduler(scheduler)) {\n args.pop();\n return scheduleArray(args, scheduler);\n }\n else {\n return fromArray(args);\n }\n}\n//# sourceMappingURL=of.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport function throwError(error, scheduler) {\n if (!scheduler) {\n return new Observable(function (subscriber) { return subscriber.error(error); });\n }\n else {\n return new Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });\n }\n}\nfunction dispatch(_a) {\n var error = _a.error, subscriber = _a.subscriber;\n subscriber.error(error);\n}\n//# sourceMappingURL=throwError.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return function observeOnOperatorFunction(source) {\n return source.lift(new ObserveOnOperator(scheduler, delay));\n };\n}\nvar ObserveOnOperator = /*@__PURE__*/ (function () {\n function ObserveOnOperator(scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n this.scheduler = scheduler;\n this.delay = delay;\n }\n ObserveOnOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n };\n return ObserveOnOperator;\n}());\nexport { ObserveOnOperator };\nvar ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ObserveOnSubscriber, _super);\n function ObserveOnSubscriber(destination, scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n var _this = _super.call(this, destination) || this;\n _this.scheduler = scheduler;\n _this.delay = delay;\n return _this;\n }\n ObserveOnSubscriber.dispatch = function (arg) {\n var notification = arg.notification, destination = arg.destination;\n notification.observe(destination);\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {\n var destination = this.destination;\n destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n };\n ObserveOnSubscriber.prototype._next = function (value) {\n this.scheduleMessage(Notification.createNext(value));\n };\n ObserveOnSubscriber.prototype._error = function (err) {\n this.scheduleMessage(Notification.createError(err));\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype._complete = function () {\n this.scheduleMessage(Notification.createComplete());\n this.unsubscribe();\n };\n return ObserveOnSubscriber;\n}(Subscriber));\nexport { ObserveOnSubscriber };\nvar ObserveOnMessage = /*@__PURE__*/ (function () {\n function ObserveOnMessage(notification, destination) {\n this.notification = notification;\n this.destination = destination;\n }\n return ObserveOnMessage;\n}());\nexport { ObserveOnMessage };\n//# sourceMappingURL=observeOn.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { queue } from './scheduler/queue';\nimport { Subscription } from './Subscription';\nimport { ObserveOnSubscriber } from './operators/observeOn';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nvar ReplaySubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ReplaySubject, _super);\n function ReplaySubject(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) {\n bufferSize = Number.POSITIVE_INFINITY;\n }\n if (windowTime === void 0) {\n windowTime = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this) || this;\n _this.scheduler = scheduler;\n _this._events = [];\n _this._infiniteTimeWindow = false;\n _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n _this._windowTime = windowTime < 1 ? 1 : windowTime;\n if (windowTime === Number.POSITIVE_INFINITY) {\n _this._infiniteTimeWindow = true;\n _this.next = _this.nextInfiniteTimeWindow;\n }\n else {\n _this.next = _this.nextTimeWindow;\n }\n return _this;\n }\n ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {\n var _events = this._events;\n _events.push(value);\n if (_events.length > this._bufferSize) {\n _events.shift();\n }\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype.nextTimeWindow = function (value) {\n this._events.push(new ReplayEvent(this._getNow(), value));\n this._trimBufferThenGetEvents();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n var _infiniteTimeWindow = this._infiniteTimeWindow;\n var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n var scheduler = this.scheduler;\n var len = _events.length;\n var subscription;\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.isStopped || this.hasError) {\n subscription = Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n subscription = new SubjectSubscription(this, subscriber);\n }\n if (scheduler) {\n subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));\n }\n if (_infiniteTimeWindow) {\n for (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i]);\n }\n }\n else {\n for (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i].value);\n }\n }\n if (this.hasError) {\n subscriber.error(this.thrownError);\n }\n else if (this.isStopped) {\n subscriber.complete();\n }\n return subscription;\n };\n ReplaySubject.prototype._getNow = function () {\n return (this.scheduler || queue).now();\n };\n ReplaySubject.prototype._trimBufferThenGetEvents = function () {\n var now = this._getNow();\n var _bufferSize = this._bufferSize;\n var _windowTime = this._windowTime;\n var _events = this._events;\n var eventsCount = _events.length;\n var spliceCount = 0;\n while (spliceCount < eventsCount) {\n if ((now - _events[spliceCount].time) < _windowTime) {\n break;\n }\n spliceCount++;\n }\n if (eventsCount > _bufferSize) {\n spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n }\n if (spliceCount > 0) {\n _events.splice(0, spliceCount);\n }\n return _events;\n };\n return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\nvar ReplayEvent = /*@__PURE__*/ (function () {\n function ReplayEvent(time, value) {\n this.time = time;\n this.value = value;\n }\n return ReplayEvent;\n}());\n//# sourceMappingURL=ReplaySubject.js.map\n","/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */\nimport { ReplaySubject } from '../ReplaySubject';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n var config;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n config = configOrBufferSize;\n }\n else {\n config = {\n bufferSize: configOrBufferSize,\n windowTime: windowTime,\n refCount: false,\n scheduler: scheduler\n };\n }\n return function (source) { return source.lift(shareReplayOperator(config)); };\n}\nfunction shareReplayOperator(_a) {\n var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;\n var subject;\n var refCount = 0;\n var subscription;\n var hasError = false;\n var isComplete = false;\n return function shareReplayOperation(source) {\n refCount++;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n subscription = source.subscribe({\n next: function (value) { subject.next(value); },\n error: function (err) {\n hasError = true;\n subject.error(err);\n },\n complete: function () {\n isComplete = true;\n subject.complete();\n },\n });\n }\n var innerSub = subject.subscribe(this);\n this.add(function () {\n refCount--;\n innerSub.unsubscribe();\n if (subscription && !isComplete && useRefCount && refCount === 0) {\n subscription.unsubscribe();\n subscription = undefined;\n subject = undefined;\n }\n });\n };\n}\n//# sourceMappingURL=shareReplay.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nvar FilterOperator = /*@__PURE__*/ (function () {\n function FilterOperator(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n FilterOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n };\n return FilterOperator;\n}());\nvar FilterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FilterSubscriber, _super);\n function FilterSubscriber(destination, predicate, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.count = 0;\n return _this;\n }\n FilterSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n };\n return FilterSubscriber;\n}(Subscriber));\n//# sourceMappingURL=filter.js.map\n","/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */\nimport { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var async = /*@__PURE__*/ new AsyncScheduler(AsyncAction);\n//# sourceMappingURL=async.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n var absoluteDelay = isDate(delay);\n var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };\n}\nvar DelayOperator = /*@__PURE__*/ (function () {\n function DelayOperator(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n DelayOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n };\n return DelayOperator;\n}());\nvar DelaySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DelaySubscriber, _super);\n function DelaySubscriber(destination, delay, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.delay = delay;\n _this.scheduler = scheduler;\n _this.queue = [];\n _this.active = false;\n _this.errored = false;\n return _this;\n }\n DelaySubscriber.dispatch = function (state) {\n var source = state.source;\n var queue = source.queue;\n var scheduler = state.scheduler;\n var destination = state.destination;\n while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n queue.shift().notification.observe(destination);\n }\n if (queue.length > 0) {\n var delay_1 = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay_1);\n }\n else {\n this.unsubscribe();\n source.active = false;\n }\n };\n DelaySubscriber.prototype._schedule = function (scheduler) {\n this.active = true;\n var destination = this.destination;\n destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n source: this, destination: this.destination, scheduler: scheduler\n }));\n };\n DelaySubscriber.prototype.scheduleNotification = function (notification) {\n if (this.errored === true) {\n return;\n }\n var scheduler = this.scheduler;\n var message = new DelayMessage(scheduler.now() + this.delay, notification);\n this.queue.push(message);\n if (this.active === false) {\n this._schedule(scheduler);\n }\n };\n DelaySubscriber.prototype._next = function (value) {\n this.scheduleNotification(Notification.createNext(value));\n };\n DelaySubscriber.prototype._error = function (err) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n this.unsubscribe();\n };\n DelaySubscriber.prototype._complete = function () {\n this.scheduleNotification(Notification.createComplete());\n this.unsubscribe();\n };\n return DelaySubscriber;\n}(Subscriber));\nvar DelayMessage = /*@__PURE__*/ (function () {\n function DelayMessage(time, notification) {\n this.time = time;\n this.notification = notification;\n }\n return DelayMessage;\n}());\n//# sourceMappingURL=delay.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}\n//# sourceMappingURL=isDate.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\nexport function tap(nextOrObserver, error, complete) {\n return function tapOperatorFunction(source) {\n return source.lift(new DoOperator(nextOrObserver, error, complete));\n };\n}\nvar DoOperator = /*@__PURE__*/ (function () {\n function DoOperator(nextOrObserver, error, complete) {\n this.nextOrObserver = nextOrObserver;\n this.error = error;\n this.complete = complete;\n }\n DoOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n };\n return DoOperator;\n}());\nvar TapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TapSubscriber, _super);\n function TapSubscriber(destination, observerOrNext, error, complete) {\n var _this = _super.call(this, destination) || this;\n _this._tapNext = noop;\n _this._tapError = noop;\n _this._tapComplete = noop;\n _this._tapError = error || noop;\n _this._tapComplete = complete || noop;\n if (isFunction(observerOrNext)) {\n _this._context = _this;\n _this._tapNext = observerOrNext;\n }\n else if (observerOrNext) {\n _this._context = observerOrNext;\n _this._tapNext = observerOrNext.next || noop;\n _this._tapError = observerOrNext.error || noop;\n _this._tapComplete = observerOrNext.complete || noop;\n }\n return _this;\n }\n TapSubscriber.prototype._next = function (value) {\n try {\n this._tapNext.call(this._context, value);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(value);\n };\n TapSubscriber.prototype._error = function (err) {\n try {\n this._tapError.call(this._context, err);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.error(err);\n };\n TapSubscriber.prototype._complete = function () {\n try {\n this._tapComplete.call(this._context);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n return this.destination.complete();\n };\n return TapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=tap.js.map\n","/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */\nimport { switchMap } from './switchMap';\nexport function switchMapTo(innerObservable, resultSelector) {\n return resultSelector ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=switchMapTo.js.map\n","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _has from './_has.js';\n\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from './internal/_curry1.js';\nimport _has from './internal/_has.js';\nimport _isArguments from './internal/_isArguments.js';\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nexport default keys;","/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport var NEVER = /*@__PURE__*/ new Observable(noop);\nexport function never() {\n return NEVER;\n}\n//# sourceMappingURL=never.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function scan(accumulator, seed) {\n var hasSeed = false;\n if (arguments.length >= 2) {\n hasSeed = true;\n }\n return function scanOperatorFunction(source) {\n return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n };\n}\nvar ScanOperator = /*@__PURE__*/ (function () {\n function ScanOperator(accumulator, seed, hasSeed) {\n if (hasSeed === void 0) {\n hasSeed = false;\n }\n this.accumulator = accumulator;\n this.seed = seed;\n this.hasSeed = hasSeed;\n }\n ScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n };\n return ScanOperator;\n}());\nvar ScanSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ScanSubscriber, _super);\n function ScanSubscriber(destination, accumulator, _seed, hasSeed) {\n var _this = _super.call(this, destination) || this;\n _this.accumulator = accumulator;\n _this._seed = _seed;\n _this.hasSeed = hasSeed;\n _this.index = 0;\n return _this;\n }\n Object.defineProperty(ScanSubscriber.prototype, \"seed\", {\n get: function () {\n return this._seed;\n },\n set: function (value) {\n this.hasSeed = true;\n this._seed = value;\n },\n enumerable: true,\n configurable: true\n });\n ScanSubscriber.prototype._next = function (value) {\n if (!this.hasSeed) {\n this.seed = value;\n this.destination.next(value);\n }\n else {\n return this._tryNext(value);\n }\n };\n ScanSubscriber.prototype._tryNext = function (value) {\n var index = this.index++;\n var result;\n try {\n result = this.accumulator(this.seed, value, index);\n }\n catch (err) {\n this.destination.error(err);\n }\n this.seed = result;\n this.destination.next(result);\n };\n return ScanSubscriber;\n}(Subscriber));\n//# sourceMappingURL=scan.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Retrieve an element matching the query selector\n *\n * @template T - Element type\n *\n * @param selector - Query selector\n * @param node - Node of reference\n *\n * @return Element\n */\nexport function getElement(\n selector: string, node: ParentNode = document\n): T | undefined {\n return node.querySelector(selector) || undefined\n}\n\n/**\n * Retrieve all elements matching the query selector\n *\n * @template T - Element type\n *\n * @param selector - Query selector\n * @param node - Node of reference\n *\n * @return Elements\n */\nexport function getElements(\n selector: string, node: ParentNode = document\n): T[] {\n return Array.from(node.querySelectorAll(selector))\n}\n","/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nvar NONE = {};\nexport function combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var resultSelector = null;\n var scheduler = null;\n if (isScheduler(observables[observables.length - 1])) {\n scheduler = observables.pop();\n }\n if (typeof observables[observables.length - 1] === 'function') {\n resultSelector = observables.pop();\n }\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0];\n }\n return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nvar CombineLatestOperator = /*@__PURE__*/ (function () {\n function CombineLatestOperator(resultSelector) {\n this.resultSelector = resultSelector;\n }\n CombineLatestOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n };\n return CombineLatestOperator;\n}());\nexport { CombineLatestOperator };\nvar CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CombineLatestSubscriber, _super);\n function CombineLatestSubscriber(destination, resultSelector) {\n var _this = _super.call(this, destination) || this;\n _this.resultSelector = resultSelector;\n _this.active = 0;\n _this.values = [];\n _this.observables = [];\n return _this;\n }\n CombineLatestSubscriber.prototype._next = function (observable) {\n this.values.push(NONE);\n this.observables.push(observable);\n };\n CombineLatestSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n this.active = len;\n this.toRespond = len;\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n this.add(subscribeToResult(this, observable, observable, i));\n }\n }\n };\n CombineLatestSubscriber.prototype.notifyComplete = function (unused) {\n if ((this.active -= 1) === 0) {\n this.destination.complete();\n }\n };\n CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var values = this.values;\n var oldVal = values[outerIndex];\n var toRespond = !this.toRespond\n ? 0\n : oldVal === NONE ? --this.toRespond : this.toRespond;\n values[outerIndex] = innerValue;\n if (toRespond === 0) {\n if (this.resultSelector) {\n this._tryResultSelector(values);\n }\n else {\n this.destination.next(values.slice());\n }\n }\n };\n CombineLatestSubscriber.prototype._tryResultSelector = function (values) {\n var result;\n try {\n result = this.resultSelector.apply(this, values);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return CombineLatestSubscriber;\n}(OuterSubscriber));\nexport { CombineLatestSubscriber };\n//# sourceMappingURL=combineLatest.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function takeUntil(notifier) {\n return function (source) { return source.lift(new TakeUntilOperator(notifier)); };\n}\nvar TakeUntilOperator = /*@__PURE__*/ (function () {\n function TakeUntilOperator(notifier) {\n this.notifier = notifier;\n }\n TakeUntilOperator.prototype.call = function (subscriber, source) {\n var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n var notifierSubscription = subscribeToResult(takeUntilSubscriber, this.notifier);\n if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n takeUntilSubscriber.add(notifierSubscription);\n return source.subscribe(takeUntilSubscriber);\n }\n return takeUntilSubscriber;\n };\n return TakeUntilOperator;\n}());\nvar TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeUntilSubscriber, _super);\n function TakeUntilSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.seenValue = false;\n return _this;\n }\n TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.seenValue = true;\n this.complete();\n };\n TakeUntilSubscriber.prototype.notifyComplete = function () {\n };\n return TakeUntilSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=takeUntil.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n EMPTY,\n Observable,\n OperatorFunction,\n combineLatest,\n of,\n pipe\n} from \"rxjs\"\nimport {\n filter,\n map,\n switchMap,\n takeUntil\n} from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Invert boolean value of source observable\n *\n * @param toggle$ - Toggle observable\n *\n * @return Inverted toggle observable\n */\nexport function not(\n toggle$: Observable\n): Observable {\n return toggle$\n .pipe(\n map(active => !active)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Toggle switch map with another observable\n *\n * @template T - Source value type\n * @template U - Target value type\n *\n * @param toggle$ - Toggle observable\n * @param project - Projection\n *\n * @return Operator function\n */\nexport function switchMapIf(\n toggle$: Observable, project: (value: T) => Observable\n): OperatorFunction {\n const begin$ = toggle$.pipe(filter(value => value))\n const end$ = toggle$.pipe(filter(value => !value))\n return pipe(\n switchMap(value => combineLatest([of(value), begin$])),\n switchMap(([value, active]) => active\n ? project(value)\n .pipe(\n takeUntil(end$)\n )\n : EMPTY\n )\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { keys } from \"ramda\"\nimport { NEVER, Observable, OperatorFunction, merge, of, pipe } from \"rxjs\"\nimport { map, scan, shareReplay, switchMap } from \"rxjs/operators\"\n\nimport { getElement } from \"../../../utilities\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Component names\n */\nexport type Component =\n | \"header\" /* Header */\n | \"title\" /* Header title */\n | \"search\" /* Search */\n | \"query\" /* Search input */\n | \"reset\" /* Search reset */\n | \"result\" /* Search results */\n | \"container\" /* Container */\n | \"main\" /* Main area */\n | \"hero\" /* Hero */\n | \"tabs\" /* Tabs */\n | \"navigation\" /* Navigation */\n | \"toc\" /* Table of contents */\n\n/**\n * Component map\n */\nexport type ComponentMap = {\n [P in Component]?: HTMLElement\n}\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n load$: Observable /* Document observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch component map\n *\n * This function returns an observable that will maintain bindings to the given\n * components in-between document switches and update the document in-place.\n *\n * @param names - Component names\n * @param options - Options\n *\n * @return Component map observable\n */\nexport function watchComponentMap(\n names: Component[], { load$ }: Options\n): Observable {\n const components$ = load$\n .pipe(\n\n /* Build component map */\n map(document => names.reduce((components, name) => {\n const el = getElement(`[data-md-component=${name}]`, document)\n return {\n ...components,\n ...typeof el !== \"undefined\" ? { [name]: el } : {}\n }\n }, {})),\n\n /* Re-compute component map on document switch */\n scan((prev, next) => {\n for (const name of keys(prev)) {\n switch (name) {\n\n /* Top-level components: update */\n case \"title\":\n case \"container\":\n if (name in prev && typeof prev[name] !== \"undefined\") {\n prev[name]!.replaceWith(next[name]!)\n prev[name] = next[name]\n }\n break\n\n /* All other components: rebind */\n default:\n prev[name] = getElement(`[data-md-component=${name}]`)\n }\n }\n return prev\n })\n )\n\n /* Return component map as hot observable */\n return components$\n .pipe(\n shareReplay(1)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Switch to component\n *\n * @template T - Element type\n *\n * @param name - Component name\n *\n * @return Operator function\n */\nexport function switchComponent(\n name: Component\n): OperatorFunction {\n return pipe(\n switchMap(components => {\n return typeof components[name] !== \"undefined\"\n ? of(components[name] as T)\n : NEVER\n })\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, defer, of } from \"rxjs\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Header\n */\nexport interface Header {\n sticky: boolean /* Header stickyness */\n height: number /* Header visible height */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch header\n *\n * The header is wrapped in an observable to pave the way for auto-hiding or\n * other dynamic behaviors that may be implemented later on.\n *\n * @param el - Header element\n *\n * @return Header observable\n */\nexport function watchHeader(\n el: HTMLElement\n): Observable
{\n return defer(() => {\n const sticky = getComputedStyle(el)\n .getPropertyValue(\"position\") === \"fixed\"\n\n /* Return header as hot observable */\n return of({\n sticky,\n height: sticky ? el.offsetHeight : 0\n })\n })\n}\n","/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n var input;\n try {\n input = observableFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var source = input ? from(input) : empty();\n return source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function distinctUntilChanged(compare, keySelector) {\n return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };\n}\nvar DistinctUntilChangedOperator = /*@__PURE__*/ (function () {\n function DistinctUntilChangedOperator(compare, keySelector) {\n this.compare = compare;\n this.keySelector = keySelector;\n }\n DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n };\n return DistinctUntilChangedOperator;\n}());\nvar DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DistinctUntilChangedSubscriber, _super);\n function DistinctUntilChangedSubscriber(destination, compare, keySelector) {\n var _this = _super.call(this, destination) || this;\n _this.keySelector = keySelector;\n _this.hasKey = false;\n if (typeof compare === 'function') {\n _this.compare = compare;\n }\n return _this;\n }\n DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {\n return x === y;\n };\n DistinctUntilChangedSubscriber.prototype._next = function (value) {\n var key;\n try {\n var keySelector = this.keySelector;\n key = keySelector ? keySelector(value) : value;\n }\n catch (err) {\n return this.destination.error(err);\n }\n var result = false;\n if (this.hasKey) {\n try {\n var compare = this.compare;\n result = compare(this.key, key);\n }\n catch (err) {\n return this.destination.error(err);\n }\n }\n else {\n this.hasKey = true;\n }\n if (!result) {\n this.key = key;\n this.destination.next(value);\n }\n };\n return DistinctUntilChangedSubscriber;\n}(Subscriber));\n//# sourceMappingURL=distinctUntilChanged.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, combineLatest } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n shareReplay,\n switchMapTo\n} from \"rxjs/operators\"\n\nimport { ViewportOffset, ViewportSize } from \"../../../../ui\"\nimport { Header } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n size$: Observable /* Viewport size observable */\n offset$: Observable /* Viewport offset observable */\n header$: Observable
/* Header observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch viewport offset relative to an element's top\n *\n * This function returns an observable that computes the relative offset to the\n * top of the given element based on the current viewport offset.\n *\n * @param el - Element\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchTopOffset(\n el: HTMLElement, { size$, offset$, header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = size$\n .pipe(\n switchMapTo(header$),\n map(({ height }) => el.offsetTop - height),\n distinctUntilChanged()\n )\n\n /* Compute relative offset and return as hot observable */\n return combineLatest([offset$, adjust$])\n .pipe(\n map(([{ x, y }, adjust]) => ({ x, y: y - adjust })),\n shareReplay(1)\n )\n}\n\n/**\n * Watch viewport offset relative to an element's bottom\n *\n * This function returns an observable that computes the relative offset to the\n * bottom of the given element based on the current viewport offset.\n *\n * @param el - Element\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchBottomOffset(\n el: HTMLElement, { size$, offset$, header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = size$\n .pipe(\n switchMapTo(header$),\n map(({ height }) => el.offsetTop + el.offsetHeight - height),\n distinctUntilChanged()\n )\n\n /* Compute relative offset and return as hot observable */\n return combineLatest([offset$, adjust$])\n .pipe(\n map(([{ x, y }, adjust]) => ({ x, y: y - adjust })),\n shareReplay(1)\n )\n}\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar AnimationFrameAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n cancelAnimationFrame(id);\n scheduler.scheduled = undefined;\n }\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction));\nexport { AnimationFrameAction };\n//# sourceMappingURL=AnimationFrameAction.js.map\n","/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */\nimport { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport var animationFrame = /*@__PURE__*/ new AnimationFrameScheduler(AnimationFrameAction);\n//# sourceMappingURL=animationFrame.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnimationFrameScheduler, _super);\n function AnimationFrameScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnimationFrameScheduler.prototype.flush = function (action) {\n this.active = true;\n this.scheduled = undefined;\n var actions = this.actions;\n var error;\n var index = -1;\n var count = actions.length;\n action = action || actions.shift();\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (++index < count && (action = actions.shift()));\n this.active = false;\n if (error) {\n while (++index < count && (action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AnimationFrameScheduler;\n}(AsyncScheduler));\nexport { AnimationFrameScheduler };\n//# sourceMappingURL=AnimationFrameScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nvar FinallyOperator = /*@__PURE__*/ (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\nvar FinallySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n var _this = _super.call(this, destination) || this;\n _this.add(new Subscription(callback));\n return _this;\n }\n return FinallySubscriber;\n}(Subscriber));\n//# sourceMappingURL=finalize.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n MonoTypeOperatorFunction,\n animationFrameScheduler,\n pipe\n} from \"rxjs\"\nimport {\n distinctUntilKeyChanged,\n finalize,\n observeOn,\n tap\n} from \"rxjs/operators\"\n\nimport {\n resetHeaderShadow,\n setHeaderShadow\n} from \"../../../action\"\nimport { Main } from \"../../main\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint header shadow from source observable\n *\n * @param el - Header element\n *\n * @return Operator function\n */\nexport function paintHeaderShadow(\n el: HTMLElement\n): MonoTypeOperatorFunction
{\n return pipe(\n distinctUntilKeyChanged(\"active\"),\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(({ active }) => {\n setHeaderShadow(el, active)\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n resetHeaderShadow(el)\n })\n )\n}\n","/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */\nimport { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set header shadow\n *\n * @param el - Header element\n * @param value - Whether the shadow is shown\n */\nexport function setHeaderShadow(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"shadow\" : \"\")\n}\n\n/**\n * Reset header shadow\n *\n * @param el - Header element\n */\nexport function resetHeaderShadow(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { OperatorFunction, animationFrameScheduler, pipe } from \"rxjs\"\nimport {\n distinctUntilChanged,\n finalize,\n map,\n observeOn,\n tap\n} from \"rxjs/operators\"\n\nimport { ViewportOffset } from \"../../../ui\"\nimport { resetHidden, setHidden } from \"../../action\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint hideable from source observable\n *\n * @param el - Hideable element\n * @param offset - Additional offset\n *\n * @return Operator function\n */\nexport function paintHidden(\n el: HTMLElement, offset: number = 0\n): OperatorFunction {\n return pipe(\n map(({ y }) => y >= offset),\n distinctUntilChanged(),\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(value => {\n setHidden(el, value)\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n resetHidden(el)\n })\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set hidden\n *\n * @param el - Hideable element\n * @param value - Whether the element is hidden\n */\nexport function setHidden(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"hidden\" : \"\")\n}\n\n/**\n * Reset hidden\n *\n * @param el - Hideable element\n */\nexport function resetHidden(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n","/** PURE_IMPORTS_START _map PURE_IMPORTS_END */\nimport { map } from './map';\nexport function pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return function (source) { return map(plucker(properties, length))(source); };\n}\nfunction plucker(props, length) {\n var mapper = function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp[props[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n };\n return mapper;\n}\n//# sourceMappingURL=pluck.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nvar toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable(function (subscriber) {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n }\n else {\n subscriber.next(e);\n }\n }\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n var unsubscribe;\n if (isEventTarget(sourceObj)) {\n var source_1 = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };\n }\n else if (isJQueryStyleEventEmitter(sourceObj)) {\n var source_2 = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = function () { return source_2.off(eventName, handler); };\n }\n else if (isNodeStyleEventEmitter(sourceObj)) {\n var source_3 = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = function () { return source_3.removeListener(eventName, handler); };\n }\n else if (sourceObj && sourceObj.length) {\n for (var i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n }\n else {\n throw new TypeError('Invalid event target');\n }\n subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n//# sourceMappingURL=fromEvent.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function mapTo(value) {\n return function (source) { return source.lift(new MapToOperator(value)); };\n}\nvar MapToOperator = /*@__PURE__*/ (function () {\n function MapToOperator(value) {\n this.value = value;\n }\n MapToOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapToSubscriber(subscriber, this.value));\n };\n return MapToOperator;\n}());\nvar MapToSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapToSubscriber, _super);\n function MapToSubscriber(destination, value) {\n var _this = _super.call(this, destination) || this;\n _this.value = value;\n return _this;\n }\n MapToSubscriber.prototype._next = function (x) {\n this.destination.next(this.value);\n };\n return MapToSubscriber;\n}(Subscriber));\n//# sourceMappingURL=mapTo.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent } from \"rxjs\"\nimport { mapTo } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch search reset\n *\n * @param el - Search reset element\n *\n * @return Search reset observable\n */\nexport function watchSearchReset(\n el: HTMLElement\n): Observable {\n return fromEvent(el, \"click\")\n .pipe(\n mapTo(true)\n )\n}\n","import _curry1 from './_curry1.js';\nimport _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","export default function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}","export default function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","import _curry1 from './internal/_curry1.js';\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nexport default type;","import _arrayFromIterator from './_arrayFromIterator.js';\nimport _includesWith from './_includesWith.js';\nimport _functionName from './_functionName.js';\nimport _has from './_has.js';\nimport _objectIs from './_objectIs.js';\nimport keys from '../keys.js';\nimport type from '../type.js';\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nexport default function _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}","export default function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}","import _curry2 from './internal/_curry2.js';\nimport _equals from './internal/_equals.js';\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nexport default equals;","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { equals } from \"ramda\"\nimport {\n MonoTypeOperatorFunction,\n Observable,\n animationFrameScheduler,\n combineLatest,\n pipe\n} from \"rxjs\"\nimport {\n distinctUntilChanged,\n finalize,\n map,\n observeOn,\n shareReplay,\n tap\n} from \"rxjs/operators\"\n\nimport { ViewportOffset } from \"../../../ui\"\nimport {\n resetSidebarHeight,\n resetSidebarLock,\n setSidebarHeight,\n setSidebarLock\n} from \"../../action\"\nimport { Main } from \"../main\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Sidebar\n */\nexport interface Sidebar {\n height: number /* Sidebar height */\n lock: boolean /* Sidebar lock */\n}\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n offset$: Observable /* Viewport offset observable */\n main$: Observable
/* Main area observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch sidebar\n *\n * This function returns an observable that computes the visual parameters of\n * the given element (a sidebar) from the vertical viewport offset, as well as\n * the height of the main area. When the page is scrolled beyond the header,\n * the sidebar is locked and fills the remaining space.\n *\n * @param el - Sidebar element\n * @param options - Options\n *\n * @return Sidebar observable\n */\nexport function watchSidebar(\n el: HTMLElement, { offset$, main$ }: Options\n): Observable {\n\n /* Adjust for internal main area offset */\n const adjust = parseFloat(\n getComputedStyle(el.parentElement!)\n .getPropertyValue(\"padding-top\")\n )\n\n /* Compute the sidebar's available height */\n const height$ = combineLatest([offset$, main$])\n .pipe(\n map(([{ y }, { offset, height }]) => {\n return height - adjust + Math.min(adjust, Math.max(0, y - offset))\n })\n )\n\n /* Compute whether the sidebar should be locked */\n const lock$ = combineLatest([offset$, main$])\n .pipe(\n map(([{ y }, { offset }]) => y >= offset + adjust)\n )\n\n /* Combine into single hot observable */\n return combineLatest([height$, lock$])\n .pipe(\n map(([height, lock]) => ({ height, lock })),\n distinctUntilChanged(equals),\n shareReplay(1)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Paint sidebar from source observable\n *\n * @param el - Sidebar element\n *\n * @return Operator function\n */\nexport function paintSidebar(\n el: HTMLElement\n): MonoTypeOperatorFunction {\n return pipe(\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(({ height, lock }) => {\n setSidebarHeight(el, height)\n setSidebarLock(el, lock)\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n resetSidebarHeight(el)\n resetSidebarLock(el)\n })\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set sidebar height\n *\n * @param el - Sidebar element\n * @param value - Sidebar height\n */\nexport function setSidebarHeight(\n el: HTMLElement, value: number\n): void {\n el.style.height = `${value}px`\n}\n\n/**\n * Reset sidebar height\n *\n * @param el - Sidebar element\n */\nexport function resetSidebarHeight(\n el: HTMLElement\n): void {\n el.style.height = \"\"\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Set sidebar lock\n *\n * @param el - Sidebar element\n * @param value - Whether the sidebar is locked\n */\nexport function setSidebarLock(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"lock\" : \"\")\n}\n\n/**\n * Reset sidebar lock\n *\n * @param el - Sidebar element\n */\nexport function resetSidebarLock(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n","/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */\nimport { of } from './of';\nimport { concatAll } from '../operators/concatAll';\nexport function concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return concatAll()(of.apply(void 0, observables));\n}\n//# sourceMappingURL=concat.js.map\n","/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */\nimport { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map\n","/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */\nimport { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nexport function startWith() {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i] = arguments[_i];\n }\n var scheduler = array[array.length - 1];\n if (isScheduler(scheduler)) {\n array.pop();\n return function (source) { return concat(array, source, scheduler); };\n }\n else {\n return function (source) { return concat(array, source); };\n }\n}\n//# sourceMappingURL=startWith.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function skip(count) {\n return function (source) { return source.lift(new SkipOperator(count)); };\n}\nvar SkipOperator = /*@__PURE__*/ (function () {\n function SkipOperator(total) {\n this.total = total;\n }\n SkipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipSubscriber(subscriber, this.total));\n };\n return SkipOperator;\n}());\nvar SkipSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SkipSubscriber, _super);\n function SkipSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n SkipSubscriber.prototype._next = function (x) {\n if (++this.count > this.total) {\n this.destination.next(x);\n }\n };\n return SkipSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skip.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent } from \"rxjs\"\nimport { ajax } from \"rxjs/ajax\"\nimport {\n distinctUntilChanged,\n map,\n mapTo,\n pluck,\n shareReplay,\n skip,\n startWith,\n switchMap\n} from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Switch options\n */\ninterface SwitchOptions {\n location$: Observable /* Location observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Observable for document load events\n */\nconst load$ = fromEvent(document, \"DOMContentLoaded\")\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch document\n *\n * @return Document observable\n */\nexport function watchDocument(): Observable {\n return load$\n .pipe(\n mapTo(document),\n shareReplay(1)\n )\n}\n\n/**\n * Watch document switch\n *\n * This function returns an observables that fetches a document if the provided\n * location observable emits a new value (i.e. URL). If the emitted URL points\n * to the same page, the request is effectively ignored (e.g. when only the\n * fragment identifier changes)\n *\n * @param options - Options\n *\n * @return Document switch observable\n */\nexport function watchDocumentSwitch(\n { location$ }: SwitchOptions\n): Observable {\n return location$\n .pipe(\n startWith(location.href),\n map(url => url.replace(/#[^#]+$/, \"\")),\n distinctUntilChanged(),\n skip(1),\n\n /* Fetch document */\n switchMap(url => ajax({\n url,\n responseType: \"document\",\n withCredentials: true\n })\n .pipe(\n pluck(\"response\")\n )\n ),\n shareReplay(1)\n )\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function refCount() {\n return function refCountOperatorFunction(source) {\n return source.lift(new RefCountOperator(source));\n };\n}\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=refCount.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nvar ConnectableObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._refCount = 0;\n _this._isComplete = false;\n return _this;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype.connect = function () {\n var connection = this._connection;\n if (!connection) {\n this._isComplete = false;\n connection = this._connection = new Subscription();\n connection.add(this.source\n .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return higherOrderRefCount()(this);\n };\n return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\nexport var connectableObservableDescriptor = /*@__PURE__*/ (function () {\n var connectableProto = ConnectableObservable.prototype;\n return {\n operator: { value: null },\n _refCount: { value: 0, writable: true },\n _subject: { value: null, writable: true },\n _connection: { value: null, writable: true },\n _subscribe: { value: connectableProto._subscribe },\n _isComplete: { value: connectableProto._isComplete, writable: true },\n getSubject: { value: connectableProto.getSubject },\n connect: { value: connectableProto.connect },\n refCount: { value: connectableProto.refCount }\n };\n})();\nvar ConnectableSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableSubscriber, _super);\n function ConnectableSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n ConnectableSubscriber.prototype._error = function (err) {\n this._unsubscribe();\n _super.prototype._error.call(this, err);\n };\n ConnectableSubscriber.prototype._complete = function () {\n this.connectable._isComplete = true;\n this._unsubscribe();\n _super.prototype._complete.call(this);\n };\n ConnectableSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (connectable) {\n this.connectable = null;\n var connection = connectable._connection;\n connectable._refCount = 0;\n connectable._subject = null;\n connectable._connection = null;\n if (connection) {\n connection.unsubscribe();\n }\n }\n };\n return ConnectableSubscriber;\n}(SubjectSubscriber));\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=ConnectableObservable.js.map\n","/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */\nimport { connectableObservableDescriptor } from '../observable/ConnectableObservable';\nexport function multicast(subjectOrSubjectFactory, selector) {\n return function multicastOperatorFunction(source) {\n var subjectFactory;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = subjectOrSubjectFactory;\n }\n else {\n subjectFactory = function subjectFactory() {\n return subjectOrSubjectFactory;\n };\n }\n if (typeof selector === 'function') {\n return source.lift(new MulticastOperator(subjectFactory, selector));\n }\n var connectable = Object.create(source, connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n };\n}\nvar MulticastOperator = /*@__PURE__*/ (function () {\n function MulticastOperator(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n MulticastOperator.prototype.call = function (subscriber, source) {\n var selector = this.selector;\n var subject = this.subjectFactory();\n var subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n };\n return MulticastOperator;\n}());\nexport { MulticastOperator };\n//# sourceMappingURL=multicast.js.map\n","/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */\nimport { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n return new Subject();\n}\nexport function share() {\n return function (source) { return refCount()(multicast(shareSubjectFactory)(source)); };\n}\n//# sourceMappingURL=share.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, Subject, fromEvent } from \"rxjs\"\nimport { filter, map, share } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Observable for window hash change events\n */\nconst hashchange$ = fromEvent(window, \"hashchange\")\n\n/**\n * Observable for window pop state events\n */\nconst popstate$ = fromEvent(window, \"popstate\")\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch location\n *\n * @return Location subject\n */\nexport function watchLocation(): Subject {\n const location$ = new Subject()\n popstate$\n .pipe(\n map(() => location.href),\n share()\n )\n .subscribe(location$)\n\n /* Return subject */\n return location$\n}\n\n/**\n * Watch location fragment\n *\n * @return Location fragment observable\n */\nexport function watchLocationFragment(): Observable {\n return hashchange$\n .pipe(\n map(() => location.hash),\n filter(hash => hash.length > 0),\n share()\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEventPattern } from \"rxjs\"\nimport { shareReplay, startWith } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch media query\n *\n * @param query - Media query\n *\n * @return Media observable\n */\nexport function watchMedia(query: string): Observable {\n const media = matchMedia(query)\n return fromEventPattern(next =>\n media.addListener(() => next(media.matches))\n )\n .pipe(\n startWith(media.matches),\n shareReplay(1)\n )\n}\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\n return fromEventPattern(addHandler, removeHandler).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var e = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n e[_i] = arguments[_i];\n }\n return subscriber.next(e.length === 1 ? e[0] : e);\n };\n var retValue;\n try {\n retValue = addHandler(handler);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n if (!isFunction(removeHandler)) {\n return undefined;\n }\n return function () { return removeHandler(handler, retValue); };\n });\n}\n//# sourceMappingURL=fromEventPattern.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent, merge } from \"rxjs\"\nimport { map, shareReplay, startWith } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Observable for window scroll events\n */\nconst scroll$ = fromEvent(window, \"scroll\")\n\n/**\n * Observable for window resize events\n */\nconst resize$ = fromEvent(window, \"resize\")\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Viewport offset\n */\nexport interface ViewportOffset {\n x: number /* Horizontal offset */\n y: number /* Vertical offset */\n}\n\n/**\n * Viewport size\n */\nexport interface ViewportSize {\n width: number /* Viewport width */\n height: number /* Viewport height */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Retrieve viewport offset\n *\n * @return Viewport offset\n */\nexport function getViewportOffset(): ViewportOffset {\n return {\n x: pageXOffset,\n y: pageYOffset\n }\n}\n\n/**\n * Retrieve viewport size\n *\n * @return Viewport size\n */\nexport function getViewportSize(): ViewportSize {\n return {\n width: innerWidth,\n height: innerHeight\n }\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Watch viewport offset\n *\n * @return Viewport offset observable\n */\nexport function watchViewportOffset(): Observable {\n return merge(scroll$, resize$)\n .pipe(\n map(getViewportOffset),\n startWith(getViewportOffset()),\n shareReplay(1)\n )\n}\n\n/**\n * Watch viewport size\n *\n * @return Viewport size observable\n */\nexport function watchViewportSize(): Observable {\n return resize$\n .pipe(\n map(getViewportSize),\n startWith(getViewportSize()),\n shareReplay(1)\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { identity } from \"ramda\"\nimport {\n EMPTY,\n MonoTypeOperatorFunction,\n NEVER,\n Observable,\n fromEvent,\n merge,\n of,\n pipe,\n zip\n} from \"rxjs\"\nimport {\n delay,\n filter,\n map,\n pluck,\n shareReplay,\n switchMap,\n switchMapTo,\n tap,\n withLatestFrom\n} from \"rxjs/operators\"\n\nimport { ajax } from \"rxjs/ajax\"\nimport { Config, isConfig } from \"./config\"\nimport { setupSearch } from \"./search\"\nimport {\n Component,\n paintHeaderShadow,\n paintHidden,\n paintSidebar,\n switchComponent,\n watchBottomOffset,\n watchComponentMap,\n watchHeader,\n watchMain,\n watchSearchReset,\n watchSidebar,\n watchToggle,\n watchTopOffset\n} from \"./theme\"\nimport {\n watchDocument,\n watchDocumentSwitch,\n watchLocation,\n watchLocationFragment,\n watchMedia,\n watchViewportOffset,\n watchViewportSize\n} from \"./ui\"\nimport {\n getElement,\n not,\n switchMapIf\n} from \"./utilities\"\n\n// TBD\n\n// TODO: put this somewhere else... (merge with config!) JSON schema!?\nconst names = [\n \"header\", /* Header */\n \"title\", /* Header title */\n \"search\", /* Search */\n \"query\", /* Search input */\n \"reset\", /* Search reset */\n \"result\", /* Search results */\n \"container\", /* Container */\n \"main\", /* Main area */\n \"hero\", /* Hero */\n \"tabs\", /* Tabs */\n \"navigation\", /* Navigation */\n \"toc\" /* Table of contents */\n] as const\n\n// modernizr for the poor\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Initialize Material for MkDocs\n *\n * @param config - Configuration\n */\nexport function initialize(config: unknown) {\n if (!isConfig(config))\n throw new SyntaxError(`Invalid configuration: ${JSON.stringify(config)}`)\n\n /* ----------------------------------------------------------------------- */\n\n /* Create viewport observables */\n const offset$ = watchViewportOffset()\n const size$ = watchViewportSize()\n\n /* Create media observables */\n const screen$ = watchMedia(\"(min-width: 1220px)\")\n const tablet$ = watchMedia(\"(min-width: 960px)\")\n\n /* Create location observables */\n const location$ = watchLocation()\n const fragment$ = watchLocationFragment()\n\n /* Create document observables */\n const load$ = watchDocument()\n // const switch$ = watchDocumentSwitch({ location$ })\n\n /* ----------------------------------------------------------------------- */\n\n /* Create component map observable */\n const components$ = watchComponentMap(names, { load$ })\n\n const component = (name: Component): Observable => {\n return components$\n .pipe(\n switchComponent(name)\n )\n }\n\n /* Create header observable */\n const header$ = component(\"header\")\n .pipe(\n switchMap(watchHeader)\n )\n\n /* Create main area observable */\n const main$ = component(\"main\")\n .pipe(\n switchMap(el => watchMain(el, { size$, offset$, header$ })),\n shareReplay(1)\n )\n\n // ----------------------------------------------------------------------------\n\n // // WIP: instant loading\n // load$\n // .pipe(\n // switchMap(({ body }) => fromEvent(body, \"click\")),\n // switchMap(ev => {\n // if (ev.target instanceof HTMLElement) {\n // const el = ev.target.closest(\"a\") || undefined\n // if (el) {\n // if (!/^(https?:|#)/.test(el.getAttribute(\"href\")!)) {\n // ev.preventDefault()\n // }\n // const href = el.href\n // history.pushState({}, \"\", href) // TODO: reference necessary!?\n // return of(href)\n // }\n // }\n // return EMPTY\n // })\n\n // // try to reduce the jiggle upon instant page load. ideally, the location\n // // should directly be resolved and the respective document loaded, but\n // // we must scroll to the top at first and wait at least 250ms.\n // //\n // // Furthermore, this doesn't include the back/next buttons of the browser\n // // which must be delayed\n // // tap(url => {\n // // if (!/#/.test(url))\n // // scrollTo({ top: 0 })\n // // }) // only when loading something we havent loaded!\n // // delay(250)\n // )\n // .subscribe(location$)\n\n // location$.subscribe(x => {\n // console.log(\"L\", x)\n // })\n // switch$.subscribe(x => {\n // console.log(\"S\", x)\n // })\n\n /* ----------------------------------------------------------------------- */\n\n /* Create header shadow toggle */\n component(\"header\")\n .pipe(\n switchMap(el => main$\n .pipe(\n paintHeaderShadow(el)\n )\n )\n )\n .subscribe()\n\n /* Create sidebar with navigation */\n component(\"navigation\")\n .pipe(\n switchMapIf(screen$, el => watchSidebar(el, { offset$, main$ })\n .pipe(\n paintSidebar(el)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n /* Create sidebar with table of contents */\n component(\"toc\")\n .pipe(\n switchMapIf(tablet$, el => watchSidebar(el, { offset$, main$ })\n .pipe(\n paintSidebar(el)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n /* Create tabs visibility toggle */\n component(\"tabs\")\n .pipe(\n switchMapIf(screen$, el => watchTopOffset(el, { size$, offset$, header$ })\n .pipe(\n paintHidden(el, 8)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n /* Create hero visibility toggle */\n component(\"hero\")\n .pipe(\n switchMap(el => watchTopOffset(el, { size$, offset$, header$ })\n .pipe(\n paintHidden(el, 20)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n // /* Create header title toggle */\n // component(\"main\")\n // .pipe(\n // delay(1000), // initial delay\n // switchMap(el => typeof getElement(\"h1\", el) !== \"undefined\"\n // ? watchBottomOffset(getElement(\"h1\", el)!, { size$, offset$, header$ })\n // .pipe(\n // map(({ y }) => y >= 0),\n // withLatestFrom(component(\"title\")),\n // tap(([active, title]) => {\n // title.dataset.mdState = active ? \"active\" : \"\"\n // })\n // )\n // : NEVER\n // )\n // )\n // .subscribe()\n\n // TODO: replace title as inner text\n\n /* ----------------------------------------------------------------------- */\n\n const drawer = getElement(\"[data-md-toggle=drawer]\")!\n const search = getElement(\"[data-md-toggle=search]\")!\n\n // watchToggle\n\n // --> watchSearchQuery?\n\n // watchSearch\n // watchSearchReset\n\n // toggles stay the same...\n\n const a$ = watchToggle(search)\n .pipe(\n filter(identity),\n delay(400)\n )\n\n // watchSearchReset()\n\n const b$ = component(\"reset\")\n .pipe(\n switchMap(watchSearchReset)\n )\n\n function focusQuery(): MonoTypeOperatorFunction {\n return pipe(\n tap(el => el.focus())\n )\n }\n\n merge(a$, b$)\n .pipe(\n switchMapTo(component(\"query\")),\n focusQuery()\n )\n .subscribe()\n\n /* Return observable factories */\n return {\n\n /* User interface */\n watchDocument: () => load$,\n // watchDocumentSwitch: () => switch$,\n watchLocation: () => location$,\n watchLocationFragment: () => fragment$,\n watchMediaScreen: () => screen$,\n watchMediaTablet: () => tablet$,\n watchViewportOffset: () => offset$,\n watchViewportSize: () => size$\n }\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Configuration\n */\nexport interface Config {\n base: string /* Base URL */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Ensure that the given value is a valid configuration\n *\n * @param config - Configuration\n *\n * @return Test result\n */\nexport function isConfig(config: any): config is Config {\n return typeof config === \"object\"\n && typeof config.base === \"string\"\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, combineLatest } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n pluck,\n shareReplay\n} from \"rxjs/operators\"\n\nimport { ViewportOffset, ViewportSize } from \"../../../ui\"\nimport { Header } from \"../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Main area\n */\nexport interface Main {\n offset: number /* Main area top offset */\n height: number /* Main area visible height */\n active: boolean /* Scrolled past top offset */\n}\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n size$: Observable /* Viewport size observable */\n offset$: Observable /* Viewport offset observable */\n header$: Observable
/* Header observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch main area\n *\n * This function returns an observable that computes the visual parameters of\n * the main area from the viewport height and vertical offset, as well as the\n * height of the header element. The height of the main area is corrected by\n * the height of the header (if fixed) and footer element.\n *\n * @param el - Main area element\n * @param options - Options\n *\n * @return Main area observable\n */\nexport function watchMain(\n el: HTMLElement, { size$, offset$, header$ }: Options\n): Observable
{\n\n /* Compute necessary adjustment for header */\n const adjust$ = header$\n .pipe(\n pluck(\"height\")\n )\n\n /* Compute the main area's visible height */\n const height$ = combineLatest([offset$, size$, adjust$])\n .pipe(\n map(([{ y }, { height }, adjust]) => {\n const top = el.offsetTop\n const bottom = el.offsetHeight + top\n return height\n - Math.max(0, top - y, adjust)\n - Math.max(0, height + y - bottom)\n }),\n distinctUntilChanged()\n )\n\n /* Compute whether the viewport offset is past the main area's top */\n const active$ = combineLatest([offset$, adjust$])\n .pipe(\n map(([{ y }, adjust]) => y >= el.offsetTop - adjust),\n distinctUntilChanged()\n )\n\n /* Combine into a single hot observable */\n return combineLatest([height$, adjust$, active$])\n .pipe(\n map(([height, adjust, active]) => ({\n offset: el.offsetTop - adjust,\n height,\n active\n })),\n shareReplay(1)\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent } from \"rxjs\"\nimport { pluck } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch toggle\n *\n * @param el - Toggle element\n *\n * @return Toggle observable\n */\nexport function watchToggle(\n el: HTMLInputElement\n): Observable {\n return fromEvent(el, \"change\")\n .pipe(\n pluck(\"checked\")\n )\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/material/assets/javascripts/bundle.js b/material/assets/javascripts/bundle.js new file mode 100644 index 000000000..0b3d023c7 --- /dev/null +++ b/material/assets/javascripts/bundle.js @@ -0,0 +1,2 @@ +!function(t,e){for(var n in e)t[n]=e[n]}(window,function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=6)}([,,function(t,e,n){"use strict";(function(t){n.d(e,"a",(function(){return o}));var r="undefined"!=typeof window&&window,i="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=r||void 0!==t&&t||i}).call(this,n(5))},,,function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function i(t){return function e(n){return 0===arguments.length||r(n)?e:t.apply(this,arguments)}}function o(t){return t}n.r(e);var u=i(o),s=function(t,e){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function c(t,e){function n(){this.constructor=t}s(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}function a(t){return"function"==typeof t}var f=!1,h={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;f=t},get useDeprecatedSynchronousErrorHandling(){return f}};function l(t){setTimeout((function(){throw t}),0)}var p={closed:!0,next:function(t){},error:function(t){if(h.useDeprecatedSynchronousErrorHandling)throw t;l(t)},complete:function(){}},d=function(){return Array.isArray||function(t){return t&&"number"==typeof t.length}}();function y(t){return null!==t&&"object"==typeof t}var b=function(){function t(t){return Error.call(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(t,e){return e+1+") "+t.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t,this}return t.prototype=Object.create(Error.prototype),t}(),v=function(){function t(t){this.closed=!1,this._parentOrParents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var e;if(!this.closed){var n=this._parentOrParents,r=this._unsubscribe,i=this._subscriptions;if(this.closed=!0,this._parentOrParents=null,this._subscriptions=null,n instanceof t)n.remove(this);else if(null!==n)for(var o=0;o1?r.next(Array.prototype.slice.call(arguments)):r.next(t)}),r,n)}))}function H(t){return t&&"function"==typeof t.schedule}var V=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return c(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(g),L=function(t){return function(e){for(var n=0,r=t.length;n0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(X);function Q(t){return t}function Z(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),function t(e,n,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof n?function(i){return i.pipe(t((function(t,r){return G(e(t,r)).pipe(q((function(e,i){return n(t,e,r,i)})))}),r))}:("number"==typeof n&&(r=n),function(t){return t.lift(new J(e,r))})}(Q,t)}function tt(t,e){return e?W(t,e):new O(L(t))}function et(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof i&&(n=t.pop()),null===r&&1===t.length&&t[0]instanceof O?t[0]:Z(n)(tt(t,r))}function nt(){for(var t=[],e=0;e0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(st),at=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),ft=function(t){function e(n,r){void 0===r&&(r=at.now);var i=t.call(this,n,(function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()}))||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return c(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(at),ht=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e}(ft))(ct),lt=new O((function(t){return t.complete()}));function pt(t){return t?function(t){return new O((function(e){return t.schedule((function(){return e.complete()}))}))}(t):lt}function dt(){for(var t=[],e=0;ethis._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new xt(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new I;if(this.isStopped||this.hasError?e=v.EMPTY:(this.observers.push(t),e=new N(this,t)),i&&t.add(t=new mt(t,i)),n)for(var u=0;ue&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(C),xt=function(){return function(t,e){this.time=t,this.value=e}}();function St(t,e,n){var r;return r=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:n},function(t){return t.lift(function(t){var e,n,r=t.bufferSize,i=void 0===r?Number.POSITIVE_INFINITY:r,o=t.windowTime,u=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,c=t.scheduler,a=0,f=!1,h=!1;return function(t){a++,e&&!f||(f=!1,e=new _t(i,u,c),n=t.subscribe({next:function(t){e.next(t)},error:function(t){f=!0,e.error(t)},complete:function(){h=!0,e.complete()}}));var r=e.subscribe(this);this.add((function(){a--,r.unsubscribe(),n&&!h&&s&&0===a&&(n.unsubscribe(),n=void 0,e=void 0)}))}}(r))}}function Et(t,e){return function(n){return n.lift(new Tt(t,e))}}var Tt=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Ot(t,this.compare,this.keySelector))},t}(),Ot=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return c(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e;try{var n=this.keySelector;e=n?n(t):t}catch(t){return this.destination.error(t)}var r=!1;if(this.hasKey)try{r=(0,this.compare)(this.key,e)}catch(t){return this.destination.error(t)}else this.hasKey=!0;r||(this.key=e,this.destination.next(t))},e}(g);function jt(t,e){return Et((function(n,r){return e?e(n[t],r[t]):n[t]===r[t]}))}function It(t,e){return function(n){return n.lift(new Nt(t,e))}}var Nt=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new At(t,this.predicate,this.thisArg))},t}(),At=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return c(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(g),Ct=new ft(st);function Pt(t,e){void 0===e&&(e=Ct);var n,r=(n=t)instanceof Date&&!isNaN(+n)?+t-e.now():Math.abs(t);return function(t){return t.lift(new qt(r,e))}}var qt=function(){function t(t,e){this.delay=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new kt(t,this.delay,this.scheduler))},t}(),kt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.delay=n,i.scheduler=r,i.queue=[],i.active=!1,i.errored=!1,i}return c(e,t),e.dispatch=function(t){for(var e=t.source,n=e.queue,r=t.scheduler,i=t.destination;n.length>0&&n[0].time-r.now()<=0;)n.shift().notification.observe(i);if(n.length>0){var o=Math.max(0,n[0].time-r.now());this.schedule(t,o)}else this.unsubscribe(),e.active=!1},e.prototype._schedule=function(t){this.active=!0,this.destination.add(t.schedule(e.dispatch,this.delay,{source:this,destination:this.destination,scheduler:t}))},e.prototype.scheduleNotification=function(t){if(!0!==this.errored){var e=this.scheduler,n=new Mt(e.now()+this.delay,t);this.queue.push(n),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(bt.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(bt.createComplete()),this.unsubscribe()},e}(g),Mt=function(){return function(t,e){this.time=t,this.notification=e}}();function Dt(t,e,n){return function(r){return r.lift(new Ht(t,e,n))}}var Ht=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Vt(t,this.nextOrObserver,this.error,this.complete))},t}(),Vt=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=S,o._tapError=S,o._tapComplete=S,o._tapError=r||S,o._tapComplete=i||S,a(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||S,o._tapError=n.error||S,o._tapComplete=n.complete||S),o}return c(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(g);function Lt(t,e){return e?rt((function(){return t}),e):rt((function(){return t}))}var Rt=n(2);function Ft(t,e){return void 0===e&&(e=null),new Bt({method:"GET",url:t,headers:e})}function $t(t,e,n){return new Bt({method:"POST",url:t,body:e,headers:n})}function Yt(t,e){return new Bt({method:"DELETE",url:t,headers:e})}function zt(t,e,n){return new Bt({method:"PUT",url:t,body:e,headers:n})}function Ut(t,e,n){return new Bt({method:"PATCH",url:t,body:e,headers:n})}var Xt=q((function(t,e){return t.response}));function Wt(t,e){return Xt(new Bt({method:"GET",url:t,responseType:"json",headers:e}))}var Bt=function(t){function e(e){var n=t.call(this)||this,r={async:!0,createXHR:function(){return this.crossDomain?function(){if(Rt.a.XMLHttpRequest)return new Rt.a.XMLHttpRequest;if(Rt.a.XDomainRequest)return new Rt.a.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(Rt.a.XMLHttpRequest)return new Rt.a.XMLHttpRequest;var t=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],n=0;n<3;n++)try{if(t=e[n],new Rt.a.ActiveXObject(t))break}catch(t){}return new Rt.a.ActiveXObject(t)}catch(t){throw new Error("XMLHttpRequest is not supported by your browser")}}()},crossDomain:!0,withCredentials:!1,headers:{},method:"GET",responseType:"json",timeout:0};if("string"==typeof e)r.url=e;else for(var i in e)e.hasOwnProperty(i)&&(r[i]=e[i]);return n.request=r,n}var n;return c(e,t),e.prototype._subscribe=function(t){return new Gt(t,this.request)},e.create=((n=function(t){return new e(t)}).get=Ft,n.post=$t,n.delete=Yt,n.put=zt,n.patch=Ut,n.getJSON=Wt,n),e}(O),Gt=function(t){function e(e,n){var r=t.call(this,e)||this;r.request=n,r.done=!1;var i=n.headers=n.headers||{};return n.crossDomain||r.getHeader(i,"X-Requested-With")||(i["X-Requested-With"]="XMLHttpRequest"),r.getHeader(i,"Content-Type")||Rt.a.FormData&&n.body instanceof Rt.a.FormData||void 0===n.body||(i["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),n.body=r.serializeBody(n.body,r.getHeader(n.headers,"Content-Type")),r.send(),r}return c(e,t),e.prototype.next=function(t){this.done=!0;var e,n=this.xhr,r=this.request,i=this.destination;try{e=new Jt(t,n,r)}catch(t){return i.error(t)}i.next(e)},e.prototype.send=function(){var t=this.request,e=this.request,n=e.user,r=e.method,i=e.url,o=e.async,u=e.password,s=e.headers,c=e.body;try{var a=this.xhr=t.createXHR();this.setupEvents(a,t),n?a.open(r,i,o,n,u):a.open(r,i,o),o&&(a.timeout=t.timeout,a.responseType=t.responseType),"withCredentials"in a&&(a.withCredentials=!!t.withCredentials),this.setHeaders(a,s),c?a.send(c):a.send()}catch(t){this.error(t)}},e.prototype.serializeBody=function(t,e){if(!t||"string"==typeof t)return t;if(Rt.a.FormData&&t instanceof Rt.a.FormData)return t;if(e){var n=e.indexOf(";");-1!==n&&(e=e.substring(0,n))}switch(e){case"application/x-www-form-urlencoded":return Object.keys(t).map((function(e){return encodeURIComponent(e)+"="+encodeURIComponent(t[e])})).join("&");case"application/json":return JSON.stringify(t);default:return t}},e.prototype.setHeaders=function(t,e){for(var n in e)e.hasOwnProperty(n)&&t.setRequestHeader(n,e[n])},e.prototype.getHeader=function(t,e){for(var n in t)if(n.toLowerCase()===e.toLowerCase())return t[n]},e.prototype.setupEvents=function(t,e){var n=e.progressSubscriber;function r(t){var e,n=r,i=n.subscriber,o=n.progressSubscriber,u=n.request;o&&o.error(t);try{e=new Zt(this,u)}catch(t){e=t}i.error(e)}if(t.ontimeout=r,r.request=e,r.subscriber=this,r.progressSubscriber=n,t.upload&&"withCredentials"in t){var i,o;if(n)i=function(t){i.progressSubscriber.next(t)},Rt.a.XDomainRequest?t.onprogress=i:t.upload.onprogress=i,i.progressSubscriber=n;o=function(t){var e,n=o,r=n.progressSubscriber,i=n.subscriber,u=n.request;r&&r.error(t);try{e=new Kt("ajax error",this,u)}catch(t){e=t}i.error(e)},t.onerror=o,o.request=e,o.subscriber=this,o.progressSubscriber=n}function u(t){}function s(t){var e=s,n=e.subscriber,r=e.progressSubscriber,i=e.request;if(4===this.readyState){var o=1223===this.status?204:this.status,u="text"===this.responseType?this.response||this.responseText:this.response;if(0===o&&(o=u?200:0),o<400)r&&r.complete(),n.next(t),n.complete();else{r&&r.error(t);var c=void 0;try{c=new Kt("ajax error "+o,this,i)}catch(t){c=t}n.error(c)}}}t.onreadystatechange=u,u.subscriber=this,u.progressSubscriber=n,u.request=e,t.onload=s,s.subscriber=this,s.progressSubscriber=n,s.request=e},e.prototype.unsubscribe=function(){var e=this.done,n=this.xhr;!e&&n&&4!==n.readyState&&"function"==typeof n.abort&&n.abort(),t.prototype.unsubscribe.call(this)},e}(g),Jt=function(){return function(t,e,n){this.originalEvent=t,this.xhr=e,this.request=n,this.status=e.status,this.responseType=e.responseType||n.responseType,this.response=Qt(this.responseType,e)}}(),Kt=function(){function t(t,e,n){return Error.call(this),this.message=t,this.name="AjaxError",this.xhr=e,this.request=n,this.status=e.status,this.responseType=e.responseType||n.responseType,this.response=Qt(this.responseType,e),this}return t.prototype=Object.create(Error.prototype),t}();function Qt(t,e){switch(t){case"json":return function(t){return"response"in t?t.responseType?t.response:JSON.parse(t.response||t.responseText||"null"):JSON.parse(t.responseText||"null")}(e);case"xml":return e.responseXML;case"text":default:return"response"in e?e.response:e.responseText}}var Zt=function(t,e){return Kt.call(this,"ajax timeout",t,e),this.name="AjaxTimeoutError",this},te=function(){return Bt.create}();function ee(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var ne=Object.prototype.toString,re=function(){return"[object Arguments]"===ne.call(arguments)?function(t){return"[object Arguments]"===ne.call(t)}:function(t){return ee("callee",t)}}(),ie=!{toString:null}.propertyIsEnumerable("toString"),oe=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],ue=function(){return arguments.propertyIsEnumerable("length")}(),se=function(t,e){for(var n=0;n=0;)ee(e=oe[n],t)&&!se(r,e)&&(r[r.length]=e),n-=1;return r})):i((function(t){return Object(t)!==t?[]:Object.keys(t)})),ae=new O(S);var fe=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new he(t,this.accumulator,this.seed,this.hasSeed))},t}(),he=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return c(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(g);function le(t,e){return void 0===e&&(e=document),e.querySelector(t)||void 0}var pe={};function de(){for(var t=[],e=0;e0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function ge(t,e){var n=t.pipe(It((function(t){return t}))),r=t.pipe(It((function(t){return!t})));return E(rt((function(t){return de([dt(t),n])})),rt((function(t){var n,i=me(t,2),o=i[0];return i[1]?e(o).pipe((n=r,function(t){return t.lift(new ve(n))})):lt})))}var _e=function(){return(_e=Object.assign||function(t){for(var e,n=1,r=arguments.length;n=t.length&&(t=void 0),{value:t&&t[r++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function Se(t,e){return e.load$.pipe(q((function(e){return t.reduce((function(t,n){var r,i=le("[data-md-component="+n+"]",e);return _e(_e({},t),void 0!==i?((r={})[n]=i,r):{})}),{})})),function(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new fe(t,e,n))}}((function(t,e){var n,r;try{for(var i=xe(ce(t)),o=i.next();!o.done;o=i.next()){var u=o.value;switch(u){case"title":case"container":u in t&&void 0!==t[u]&&(t[u].replaceWith(e[u]),t[u]=e[u]);break;default:t[u]=le("[data-md-component="+u+"]")}}}catch(t){n={error:t}}finally{try{o&&!o.done&&(r=i.return)&&r.call(i)}finally{if(n)throw n.error}}return t}))).pipe(St(1))}function Ee(t){return e=function(){var e="fixed"===getComputedStyle(t).getPropertyValue("position");return dt({sticky:e,height:e?t.offsetHeight:0})},new O((function(t){var n;try{n=e()}catch(e){return void t.error(e)}return(n?G(n):pt()).subscribe(t)}));var e}var Te=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function Oe(t,e){var n=e.size$,r=e.offset$,i=e.header$;return de([r,n.pipe(Lt(i),q((function(e){var n=e.height;return t.offsetTop-n})),Et())]).pipe(q((function(t){var e=Te(t,2),n=e[0];return{x:n.x,y:n.y-e[1]}})),St(1))}var je=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return c(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(st),Ie=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return c(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r=e})),Et(),vt(Ie),Dt((function(e){!function(t,e){t.setAttribute("data-md-state",e?"hidden":"")}(t,e)})),Ne((function(){!function(t){t.removeAttribute("data-md-state")}(t)})))}var qe=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function ke(t){return function(e){return e.lift(new Me(t))}}var Me=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new De(t,this.value))},t}(),De=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return c(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(g);function He(t){return D(t,"click").pipe(ke(!0))}function Ve(t){return function e(n,o){switch(arguments.length){case 0:return e;case 1:return r(n)?e:i((function(e){return t(n,e)}));default:return r(n)&&r(o)?e:r(n)?i((function(e){return t(e,o)})):r(o)?i((function(e){return t(n,e)})):t(n,o)}}}function Le(t){for(var e,n=[];!(e=t.next()).done;)n.push(e.value);return n}function Re(t,e,n){for(var r=0,i=n.length;r=0;){if(n[s]===t)return r[s]===e;s-=1}switch(u){case"Map":return t.size===e.size&&Ye(t.entries(),e.entries(),n.concat([t]),r.concat([e]));case"Set":return t.size===e.size&&Ye(t.values(),e.values(),n.concat([t]),r.concat([e]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var c=ce(t);if(c.length!==ce(e).length)return!1;var a=n.concat([t]),f=r.concat([e]);for(s=c.length-1;s>=0;){var h=c[s];if(!ee(h,e)||!ze(e[h],t[h],a,f))return!1;s-=1}return!0}var Ue=Ve((function(t,e){return ze(t,e,[],[])})),Xe=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)u.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return u};function We(t,e){var n=e.offset$,r=e.main$,i=parseFloat(getComputedStyle(t.parentElement).getPropertyValue("padding-top")),o=de([n,r]).pipe(q((function(t){var e=Xe(t,2),n=e[0].y,r=e[1],o=r.offset;return r.height-i+Math.min(i,Math.max(0,n-o))}))),u=de([n,r]).pipe(q((function(t){var e=Xe(t,2);return e[0].y>=e[1].offset+i})));return de([o,u]).pipe(q((function(t){var e=Xe(t,2);return{height:e[0],lock:e[1]}})),Et(Ue),St(1))}function Be(t){return E(vt(Ie),Dt((function(e){var n=e.height,r=e.lock;!function(t,e){t.style.height=e+"px"}(t,n),function(t,e){t.setAttribute("data-md-state",e?"lock":"")}(t,r)})),Ne((function(){!function(t){t.style.height=""}(t),function(t){t.removeAttribute("data-md-state")}(t)})))}function Ge(){for(var t=[],e=0;e1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(g),en=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return c(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new v).add(this.source.subscribe(new rn(this.getSubject(),this))),t.closed&&(this._connection=null,t=v.EMPTY)),t},e.prototype.refCount=function(){return Qe()(this)},e}(O),nn=function(){var t=en.prototype;return{operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:t._subscribe},_isComplete:{value:t._isComplete,writable:!0},getSubject:{value:t.getSubject},connect:{value:t.connect},refCount:{value:t.refCount}}}(),rn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return c(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(A);var on=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}();function un(){return new C}function sn(){return function(t){return Qe()((e=un,function(t){var r;if(r="function"==typeof e?e:function(){return e},"function"==typeof n)return t.lift(new on(r,n));var i=Object.create(t,nn);return i.source=t,i.subjectFactory=r,i})(t));var e,n}}var cn=D(window,"hashchange"),an=D(window,"popstate");function fn(t){var e=matchMedia(t);return function t(e,n,r){return r?t(e,n).pipe(q((function(t){return d(t)?r.apply(void 0,t):r(t)}))):new O((function(t){var r,i=function(){for(var e=[],n=0;n0})),sn()),f=Ke.pipe(ke(document),St(1)),h=Se(Sn,{load$:f}),l=function(t){return h.pipe(function(t){return E(rt((function(e){return void 0!==e[t]?dt(e[t]):ae})))}(t))},p=l("header").pipe(rt(Ee)),d=l("main").pipe(rt((function(t){return function(t,e){var n=e.size$,r=e.offset$,i=e.header$.pipe(nt("height")),o=de([r,n,i]).pipe(q((function(e){var n=qe(e,3),r=n[0].y,i=n[1].height,o=n[2],u=t.offsetTop,s=t.offsetHeight+u;return i-Math.max(0,u-r,o)-Math.max(0,i+r-s)})),Et()),u=de([r,i]).pipe(q((function(e){var n=qe(e,2),r=n[0].y,i=n[1];return r>=t.offsetTop-i})),Et());return de([o,i,u]).pipe(q((function(e){var n=qe(e,3),r=n[0],i=n[1],o=n[2];return{offset:t.offsetTop-i,height:r,active:o}})),St(1))}(t,{size$:i,offset$:r,header$:p})})),St(1));l("query").pipe(rt((function(t){return D(t,"keyup").pipe(q((function(){return{type:mn.QUERY,data:t.value}})),jt("data"))}))).subscribe((function(t){n.next(t)})),l("header").pipe(rt((function(t){return d.pipe(function(t){return E(jt("active"),vt(Ie),Dt((function(e){var n=e.active;!function(t,e){t.setAttribute("data-md-state",e?"shadow":"")}(t,n)})),Ne((function(){!function(t){t.removeAttribute("data-md-state")}(t)})))}(t))}))).subscribe(),l("navigation").pipe(ge(o,(function(t){return We(t,{offset$:r,main$:d}).pipe(Be(t))})),St(1)).subscribe(),l("toc").pipe(ge(s,(function(t){return We(t,{offset$:r,main$:d}).pipe(Be(t))})),St(1)).subscribe(),l("tabs").pipe(ge(o,(function(t){return Oe(t,{size$:i,offset$:r,header$:p}).pipe(Pe(t,8))})),St(1)).subscribe(),l("hero").pipe(rt((function(t){return Oe(t,{size$:i,offset$:r,header$:p}).pipe(Pe(t,20))})),St(1)).subscribe();le("[data-md-toggle=drawer]");var y,b=le("[data-md-toggle=search]");return et((y=b,D(y,"change").pipe(nt("checked"))).pipe(It(u),Pt(400)),l("reset").pipe(rt(He))).pipe(Lt(l("query")),E(Dt((function(t){return t.focus()})))).subscribe(),{watchDocument:function(){return f},watchLocation:function(){return c},watchLocationFragment:function(){return a},watchMediaScreen:function(){return o},watchMediaTablet:function(){return s},watchViewportOffset:function(){return r},watchViewportSize:function(){return i}}}document.documentElement.classList.remove("no-js"),document.documentElement.classList.add("js")}])); +//# sourceMappingURL=bundle.js.map \ No newline at end of file diff --git a/material/assets/javascripts/bundle.js.map b/material/assets/javascripts/bundle.js.map new file mode 100644 index 000000000..f8e93b408 --- /dev/null +++ b/material/assets/javascripts/bundle.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/rxjs/_esm5/internal/util/root.js","webpack:///(webpack)/buildin/global.js","webpack:///./node_modules/ramda/es/internal/_isPlaceholder.js","webpack:///./node_modules/ramda/es/internal/_curry1.js","webpack:///./node_modules/ramda/es/internal/_identity.js","webpack:///./node_modules/ramda/es/identity.js","webpack:///./node_modules/tslib/tslib.es6.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isFunction.js","webpack:///./node_modules/rxjs/_esm5/internal/config.js","webpack:///./node_modules/rxjs/_esm5/internal/util/hostReportError.js","webpack:///./node_modules/rxjs/_esm5/internal/Observer.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArray.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isObject.js","webpack:///./node_modules/rxjs/_esm5/internal/util/UnsubscriptionError.js","webpack:///./node_modules/rxjs/_esm5/internal/Subscription.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/rxSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/Subscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/observable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/noop.js","webpack:///./node_modules/rxjs/_esm5/internal/util/pipe.js","webpack:///./node_modules/rxjs/_esm5/internal/Observable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/toSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/util/canReportError.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ObjectUnsubscribedError.js","webpack:///./node_modules/rxjs/_esm5/internal/SubjectSubscription.js","webpack:///./node_modules/rxjs/_esm5/internal/Subject.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/map.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEvent.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/InnerSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js","webpack:///./node_modules/rxjs/_esm5/internal/symbol/iterator.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isArrayLike.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeTo.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToPromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToResult.js","webpack:///./node_modules/rxjs/_esm5/internal/OuterSubscriber.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleArray.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduled.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isInteropObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/schedulePromise.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleIterable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/from.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeMap.js","webpack:///./node_modules/rxjs/_esm5/internal/util/identity.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mergeAll.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/pluck.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMap.js","webpack:///./node_modules/rxjs/_esm5/internal/Notification.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/Action.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.js","webpack:///./node_modules/rxjs/_esm5/internal/Scheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/queue.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/empty.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/of.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/throwError.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/observeOn.js","webpack:///./node_modules/rxjs/_esm5/internal/ReplaySubject.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/shareReplay.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/filter.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/async.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/delay.js","webpack:///./node_modules/rxjs/_esm5/internal/util/isDate.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/tap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/switchMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/AjaxObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/ajax.js","webpack:///./node_modules/ramda/es/internal/_has.js","webpack:///./node_modules/ramda/es/internal/_isArguments.js","webpack:///./node_modules/ramda/es/keys.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/never.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/scan.js","webpack:///./src/assets/javascripts/utilities/element/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/combineLatest.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeUntil.js","webpack:///./src/assets/javascripts/utilities/operator/index.ts","webpack:///./src/assets/javascripts/theme/component/_/index.ts","webpack:///./src/assets/javascripts/theme/component/header/_/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/defer.js","webpack:///./src/assets/javascripts/theme/component/header/offset/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameAction.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/animationFrame.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AnimationFrameScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/finalize.js","webpack:///./src/assets/javascripts/theme/component/hidden/index.ts","webpack:///./src/assets/javascripts/theme/action/hidden/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/mapTo.js","webpack:///./src/assets/javascripts/theme/component/search/reset/index.ts","webpack:///./node_modules/ramda/es/internal/_curry2.js","webpack:///./node_modules/ramda/es/internal/_arrayFromIterator.js","webpack:///./node_modules/ramda/es/internal/_includesWith.js","webpack:///./node_modules/ramda/es/internal/_objectIs.js","webpack:///./node_modules/ramda/es/type.js","webpack:///./node_modules/ramda/es/internal/_equals.js","webpack:///./node_modules/ramda/es/internal/_functionName.js","webpack:///./node_modules/ramda/es/equals.js","webpack:///./src/assets/javascripts/theme/component/sidebar/index.ts","webpack:///./src/assets/javascripts/theme/action/sidebar/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/concat.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/concatAll.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/startWith.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skip.js","webpack:///./src/assets/javascripts/ui/document/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/refCount.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/ConnectableObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/multicast.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/share.js","webpack:///./src/assets/javascripts/ui/location/index.ts","webpack:///./src/assets/javascripts/ui/media/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js","webpack:///./src/assets/javascripts/ui/viewport/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/throttle.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/take.js","webpack:///./src/assets/javascripts/workers/search/_/index.ts","webpack:///./src/assets/javascripts/ui/worker/index.ts","webpack:///./src/assets/javascripts/index.ts","webpack:///./src/assets/javascripts/config/index.ts","webpack:///./src/assets/javascripts/theme/component/main/index.ts","webpack:///./src/assets/javascripts/theme/component/header/shadow/index.ts","webpack:///./src/assets/javascripts/theme/action/header/index.ts","webpack:///./src/assets/javascripts/theme/toggle/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","__window","window","__self","self","WorkerGlobalScope","_root","global","g","this","Function","e","_isPlaceholder","a","_curry1","fn","f1","arguments","length","apply","_identity","x","extendStatics","b","setPrototypeOf","__proto__","Array","__extends","__","constructor","isFunction","_enable_super_gross_mode_that_will_cause_bad_things","Promise","undefined","Error","stack","hostReportError","err","setTimeout","empty","closed","next","error","useDeprecatedSynchronousErrorHandling","complete","isArray","isObject","UnsubscriptionError","UnsubscriptionErrorImpl","errors","message","map","toString","join","Subscription","unsubscribe","_parentOrParents","_subscriptions","_unsubscribe","remove","index","flattenUnsubscriptionErrors","len","sub","concat","push","add","teardown","subscription","EMPTY","tmp","indexOf","subscriptions","subscriptionIndex","splice","reduce","errs","rxSubscriber","Math","random","_super","Subscriber","destinationOrNext","_this","syncErrorValue","syncErrorThrown","syncErrorThrowable","isStopped","destination","subscriber","_next","_error","_complete","_unsubscribeAndRecycle","SafeSubscriber","_parentSubscriber","observerOrNext","context","_context","__tryOrSetError","__tryOrUnsub","wrappedComplete","parent","observable","noop","pipe","fns","_i","pipeFromArray","input","prev","Observable","subscribe","_isScalar","_subscribe","lift","operator","source","sink","nextOrObserver","toSubscriber","_trySubscribe","observer","_a","closed_1","canReportError","console","warn","forEach","promiseCtor","getPromiseCtor","resolve","reject","operations","toPromise","ObjectUnsubscribedError","ObjectUnsubscribedErrorImpl","SubjectSubscription","subject","observers","subscriberIndex","SubjectSubscriber","Subject","hasError","thrownError","copy","slice","asObservable","AnonymousSubject","project","thisArg","TypeError","MapOperator","MapSubscriber","count","result","fromEvent","target","eventName","options","resultSelector","args","setupSubscription","sourceObj","handler","addEventListener","removeEventListener","isEventTarget","source_1","on","off","isJQueryStyleEventEmitter","source_2","addListener","removeListener","isNodeStyleEventEmitter","source_3","isScheduler","schedule","InnerSubscriber","outerValue","outerIndex","notifyNext","notifyError","notifyComplete","subscribeToArray","array","getSymbolIterator","iterator","isArrayLike","isPromise","then","subscribeTo","obj","obs","promise","iterable","item","done","return","subscribeToResult","outerSubscriber","OuterSubscriber","innerValue","innerIndex","innerSub","scheduleArray","scheduler","scheduled","isInteropObservable","scheduleObservable","schedulePromise","isIterable","scheduleIterable","from","MergeMapOperator","concurrent","Number","POSITIVE_INFINITY","MergeMapSubscriber","hasCompleted","buffer","active","_tryNext","_innerSub","ish","innerSubscriber","shift","mergeAll","mergeMap","ii","fromArray","merge","observables","last","pop","pluck","properties","props","currentProp","plucker","switchMap","SwitchMapOperator","NotificationKind","SwitchMapSubscriber","innerSubscription","AsyncAction","work","pending","state","delay","id","recycleAsyncId","requestAsyncId","setInterval","flush","clearInterval","execute","_execute","errored","errorValue","actions","Action","QueueAction","Scheduler","SchedulerAction","now","Date","AsyncScheduler","delegate","action","queue","QueueScheduler","emptyScheduled","of","dispatch","Notification","kind","hasValue","observe","do","accept","toObservable","createNext","undefinedValueNotification","createError","createComplete","completeNotification","observeOn","ObserveOnOperator","ObserveOnSubscriber","arg","notification","scheduleMessage","ObserveOnMessage","ReplaySubject","bufferSize","windowTime","_events","_infiniteTimeWindow","_bufferSize","_windowTime","nextInfiniteTimeWindow","nextTimeWindow","ReplayEvent","_getNow","_trimBufferThenGetEvents","eventsCount","spliceCount","time","max","shareReplay","configOrBufferSize","config","refCount","_b","_c","useRefCount","isComplete","shareReplayOperator","distinctUntilChanged","compare","keySelector","DistinctUntilChangedOperator","DistinctUntilChangedSubscriber","hasKey","y","distinctUntilKeyChanged","filter","predicate","FilterOperator","FilterSubscriber","delayFor","isNaN","abs","DelayOperator","DelaySubscriber","delay_1","_schedule","scheduleNotification","DelayMessage","tap","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","switchMapTo","innerObservable","ajaxGet","url","headers","method","ajaxPost","body","ajaxDelete","ajaxPut","ajaxPatch","mapResponse","response","ajaxGetJSON","responseType","AjaxObservable","urlOrRequest","request","async","createXHR","crossDomain","root","XMLHttpRequest","XDomainRequest","getCORSRequest","progId","progIds","ActiveXObject","getXMLHttpRequest","withCredentials","timeout","prop","post","delete","put","patch","getJSON","AjaxSubscriber","getHeader","FormData","serializeBody","send","xhr","AjaxResponse","user","password","setupEvents","open","setHeaders","contentType","splitIndex","substring","keys","encodeURIComponent","JSON","stringify","setRequestHeader","headerName","toLowerCase","progressSubscriber","xhrTimeout","AjaxTimeoutError","ontimeout","upload","xhrProgress_1","xhrError_1","onprogress","AjaxError","onerror","xhrReadyStateChange","xhrLoad","readyState","status_1","status","responseText","onreadystatechange","onload","abort","originalEvent","parseXhrResponse","AjaxErrorImpl","parse","parseJson","responseXML","ajax","_has","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","list","idx","nIdx","ks","checkArgsLength","NEVER","ScanOperator","accumulator","seed","hasSeed","ScanSubscriber","_seed","set","configurable","getElement","selector","node","querySelector","NONE","combineLatest","CombineLatestOperator","CombineLatestSubscriber","values","toRespond","unused","oldVal","_tryResultSelector","TakeUntilOperator","notifier","takeUntilSubscriber","notifierSubscription","seenValue","TakeUntilSubscriber","switchMapIf","toggle$","begin$","end$","watchComponentMap","names","load$","document","components","el","scan","replaceWith","watchHeader","observableFactory","sticky","getComputedStyle","getPropertyValue","height","offsetHeight","watchTopOffset","size$","offset$","header$","offsetTop","AnimationFrameAction","requestAnimationFrame","cancelAnimationFrame","animationFrame","AnimationFrameScheduler","finalize","callback","FinallyOperator","FinallySubscriber","paintHidden","offset","setAttribute","setHidden","removeAttribute","resetHidden","mapTo","MapToOperator","MapToSubscriber","watchSearchReset","_curry2","f2","_arrayFromIterator","iter","_includesWith","pred","val","_uniqContentEquals","aIterator","bIterator","stackA","stackB","eq","_equals","aItem","f","match","typeA","equals","String","valueOf","ignoreCase","multiline","unicode","size","entries","keysA","extendedStackA","extendedStackB","watchSidebar","main$","adjust","parseFloat","parentElement","height$","min","lock$","lock","paintSidebar","style","setSidebarHeight","setSidebarLock","resetSidebarHeight","resetSidebarLock","concatAll","startWith","RefCountOperator","connectable","_refCount","refCounter","connection","connect","RefCountSubscriber","sharedConnection","_connection","ConnectableObservable","subjectFactory","_isComplete","getSubject","_subject","connectableObservableDescriptor","connectableProto","writable","ConnectableSubscriber","MulticastOperator","shareSubjectFactory","share","subjectOrSubjectFactory","hashchange$","popstate$","watchMedia","query","media","matchMedia","fromEventPattern","addHandler","removeHandler","retValue","matches","scroll$","resize$","getViewportOffset","pageXOffset","pageYOffset","getViewportSize","width","innerWidth","innerHeight","defaultThrottleConfig","leading","trailing","ThrottleOperator","durationSelector","ThrottleSubscriber","_leading","_trailing","_hasValue","_sendValue","_throttled","throttle","duration","tryDurationSelector","throttlingDone","ArgumentOutOfRangeError","ArgumentOutOfRangeErrorImpl","SearchMessageType","TakeOperator","total","TakeSubscriber","watchWorker","worker","message$","worker$","postMessage","initialize","base","isConfig","SyntaxError","Worker","search","log","term","res","data","type","INIT","screen$","tablet$","location$","location","href","watchLocation","fragment$","hash","components$","component","switchComponent","adjust$","top","bottom","active$","watchMain","QUERY","setHeaderShadow","resetHeaderShadow","paintHeaderShadow","focus","watchDocument","watchLocationFragment","watchMediaScreen","watchMediaTablet","watchViewportOffset","watchViewportSize","documentElement","classList"],"mappings":"4DACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QA0Df,OArDAF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,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,EAAU,SAClBhiB,KACCwI,GAAUgR,MAUXxZ,KACCkP,GAAY8S,EAAU,UAPjBhiB,EACL4O,IAAI,SAAA2I,GAAM,OAAAA,EAAGoL,aASZpiB,YAGE,CAGLqiB,cAAuB,WAAM,OAAAxL,GAE7BwK,cAAuB,WAAM,OAAAH,GAC7BoB,sBAAuB,WAAM,OAAAhB,GAC7BiB,iBAAuB,WAAM,OAAAvB,GAC7BwB,iBAAuB,WAAM,OAAAvB,GAC7BwB,oBAAuB,WAAM,OAAA7K,GAC7B8K,kBAAuB,WAAM,OAAA/K,IApRjCb,SAAS6L,gBAAgBC,UAAUjmB,OAAO,SAC1Cma,SAAS6L,gBAAgBC,UAAU1lB,IAAI","file":"bundle.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 6);\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar __window = typeof window !== 'undefined' && window;\nvar __self = typeof self !== 'undefined' && typeof WorkerGlobalScope !== 'undefined' &&\n self instanceof WorkerGlobalScope && self;\nvar __global = typeof global !== 'undefined' && global;\nvar _root = __window || __global || __self;\n/*@__PURE__*/ (function () {\n if (!_root) {\n throw /*@__PURE__*/ new Error('RxJS could not find any global context (window, self, global)');\n }\n})();\nexport { _root as root };\n//# sourceMappingURL=root.js.map\n","var g;\n\n// This works in non-strict mode\ng = (function() {\n\treturn this;\n})();\n\ntry {\n\t// This works if eval is allowed (see CSP)\n\tg = g || new Function(\"return this\")();\n} catch (e) {\n\t// This works if the window reference is available\n\tif (typeof window === \"object\") g = window;\n}\n\n// g can still be undefined, but nothing to do about it...\n// We return undefined, instead of nothing here, so it's\n// easier to handle this case. if(!global) { ...}\n\nmodule.exports = g;\n","export default function _isPlaceholder(a) {\n return a != null && typeof a === 'object' && a['@@functional/placeholder'] === true;\n}","import _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal one-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry1(fn) {\n return function f1(a) {\n if (arguments.length === 0 || _isPlaceholder(a)) {\n return f1;\n } else {\n return fn.apply(this, arguments);\n }\n };\n}","export default function _identity(x) {\n return x;\n}","import _curry1 from './internal/_curry1.js';\nimport _identity from './internal/_identity.js';\n\n/**\n * A function that does nothing but return the parameter supplied to it. Good\n * as a default or placeholder function.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Function\n * @sig a -> a\n * @param {*} x The value to return.\n * @return {*} The input value, `x`.\n * @example\n *\n * R.identity(1); //=> 1\n *\n * const obj = {};\n * R.identity(obj) === obj; //=> true\n * @symb R.identity(a) = a\n */\nvar identity = /*#__PURE__*/_curry1(_identity);\nexport default identity;","/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation. All rights reserved.\r\nLicensed under the Apache License, Version 2.0 (the \"License\"); you may not use\r\nthis file except in compliance with the License. You may obtain a copy of the\r\nLicense at http://www.apache.org/licenses/LICENSE-2.0\r\n\r\nTHIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\nKIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED\r\nWARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,\r\nMERCHANTABLITY OR NON-INFRINGEMENT.\r\n\r\nSee the Apache Version 2.0 License for specific language governing permissions\r\nand limitations under the License.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) if (e.indexOf(p[i]) < 0)\r\n t[p[i]] = s[p[i]];\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : new P(function (resolve) { resolve(result.value); }).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport function __exportStar(m, exports) {\r\n for (var p in m) if (!exports.hasOwnProperty(p)) exports[p] = m[p];\r\n}\r\n\r\nexport function __values(o) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator], i = 0;\r\n if (m) return m.call(o);\r\n return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\r\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (Object.hasOwnProperty.call(mod, k)) result[k] = mod[k];\r\n result.default = mod;\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isFunction(x) {\n return typeof x === 'function';\n}\n//# sourceMappingURL=isFunction.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar _enable_super_gross_mode_that_will_cause_bad_things = false;\nexport var config = {\n Promise: undefined,\n set useDeprecatedSynchronousErrorHandling(value) {\n if (value) {\n var error = /*@__PURE__*/ new Error();\n /*@__PURE__*/ console.warn('DEPRECATED! RxJS was set to use deprecated synchronous error handling behavior by code at: \\n' + error.stack);\n }\n else if (_enable_super_gross_mode_that_will_cause_bad_things) {\n /*@__PURE__*/ console.log('RxJS: Back to a better error behavior. Thank you. <3');\n }\n _enable_super_gross_mode_that_will_cause_bad_things = value;\n },\n get useDeprecatedSynchronousErrorHandling() {\n return _enable_super_gross_mode_that_will_cause_bad_things;\n },\n};\n//# sourceMappingURL=config.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function hostReportError(err) {\n setTimeout(function () { throw err; }, 0);\n}\n//# sourceMappingURL=hostReportError.js.map\n","/** PURE_IMPORTS_START _config,_util_hostReportError PURE_IMPORTS_END */\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nexport var empty = {\n closed: true,\n next: function (value) { },\n error: function (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n },\n complete: function () { }\n};\n//# sourceMappingURL=Observer.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArray = /*@__PURE__*/ (function () { return Array.isArray || (function (x) { return x && typeof x.length === 'number'; }); })();\n//# sourceMappingURL=isArray.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isObject(x) {\n return x !== null && typeof x === 'object';\n}\n//# sourceMappingURL=isObject.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar UnsubscriptionErrorImpl = /*@__PURE__*/ (function () {\n function UnsubscriptionErrorImpl(errors) {\n Error.call(this);\n this.message = errors ?\n errors.length + \" errors occurred during unsubscription:\\n\" + errors.map(function (err, i) { return i + 1 + \") \" + err.toString(); }).join('\\n ') : '';\n this.name = 'UnsubscriptionError';\n this.errors = errors;\n return this;\n }\n UnsubscriptionErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return UnsubscriptionErrorImpl;\n})();\nexport var UnsubscriptionError = UnsubscriptionErrorImpl;\n//# sourceMappingURL=UnsubscriptionError.js.map\n","/** PURE_IMPORTS_START _util_isArray,_util_isObject,_util_isFunction,_util_UnsubscriptionError PURE_IMPORTS_END */\nimport { isArray } from './util/isArray';\nimport { isObject } from './util/isObject';\nimport { isFunction } from './util/isFunction';\nimport { UnsubscriptionError } from './util/UnsubscriptionError';\nvar Subscription = /*@__PURE__*/ (function () {\n function Subscription(unsubscribe) {\n this.closed = false;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (unsubscribe) {\n this._unsubscribe = unsubscribe;\n }\n }\n Subscription.prototype.unsubscribe = function () {\n var errors;\n if (this.closed) {\n return;\n }\n var _a = this, _parentOrParents = _a._parentOrParents, _unsubscribe = _a._unsubscribe, _subscriptions = _a._subscriptions;\n this.closed = true;\n this._parentOrParents = null;\n this._subscriptions = null;\n if (_parentOrParents instanceof Subscription) {\n _parentOrParents.remove(this);\n }\n else if (_parentOrParents !== null) {\n for (var index = 0; index < _parentOrParents.length; ++index) {\n var parent_1 = _parentOrParents[index];\n parent_1.remove(this);\n }\n }\n if (isFunction(_unsubscribe)) {\n try {\n _unsubscribe.call(this);\n }\n catch (e) {\n errors = e instanceof UnsubscriptionError ? flattenUnsubscriptionErrors(e.errors) : [e];\n }\n }\n if (isArray(_subscriptions)) {\n var index = -1;\n var len = _subscriptions.length;\n while (++index < len) {\n var sub = _subscriptions[index];\n if (isObject(sub)) {\n try {\n sub.unsubscribe();\n }\n catch (e) {\n errors = errors || [];\n if (e instanceof UnsubscriptionError) {\n errors = errors.concat(flattenUnsubscriptionErrors(e.errors));\n }\n else {\n errors.push(e);\n }\n }\n }\n }\n }\n if (errors) {\n throw new UnsubscriptionError(errors);\n }\n };\n Subscription.prototype.add = function (teardown) {\n var subscription = teardown;\n if (!teardown) {\n return Subscription.EMPTY;\n }\n switch (typeof teardown) {\n case 'function':\n subscription = new Subscription(teardown);\n case 'object':\n if (subscription === this || subscription.closed || typeof subscription.unsubscribe !== 'function') {\n return subscription;\n }\n else if (this.closed) {\n subscription.unsubscribe();\n return subscription;\n }\n else if (!(subscription instanceof Subscription)) {\n var tmp = subscription;\n subscription = new Subscription();\n subscription._subscriptions = [tmp];\n }\n break;\n default: {\n throw new Error('unrecognized teardown ' + teardown + ' added to Subscription.');\n }\n }\n var _parentOrParents = subscription._parentOrParents;\n if (_parentOrParents === null) {\n subscription._parentOrParents = this;\n }\n else if (_parentOrParents instanceof Subscription) {\n if (_parentOrParents === this) {\n return subscription;\n }\n subscription._parentOrParents = [_parentOrParents, this];\n }\n else if (_parentOrParents.indexOf(this) === -1) {\n _parentOrParents.push(this);\n }\n else {\n return subscription;\n }\n var subscriptions = this._subscriptions;\n if (subscriptions === null) {\n this._subscriptions = [subscription];\n }\n else {\n subscriptions.push(subscription);\n }\n return subscription;\n };\n Subscription.prototype.remove = function (subscription) {\n var subscriptions = this._subscriptions;\n if (subscriptions) {\n var subscriptionIndex = subscriptions.indexOf(subscription);\n if (subscriptionIndex !== -1) {\n subscriptions.splice(subscriptionIndex, 1);\n }\n }\n };\n Subscription.EMPTY = (function (empty) {\n empty.closed = true;\n return empty;\n }(new Subscription()));\n return Subscription;\n}());\nexport { Subscription };\nfunction flattenUnsubscriptionErrors(errors) {\n return errors.reduce(function (errs, err) { return errs.concat((err instanceof UnsubscriptionError) ? err.errors : err); }, []);\n}\n//# sourceMappingURL=Subscription.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var rxSubscriber = /*@__PURE__*/ (function () {\n return typeof Symbol === 'function'\n ? /*@__PURE__*/ Symbol('rxSubscriber')\n : '@@rxSubscriber_' + /*@__PURE__*/ Math.random();\n})();\nexport var $$rxSubscriber = rxSubscriber;\n//# sourceMappingURL=rxSubscriber.js.map\n","/** PURE_IMPORTS_START tslib,_util_isFunction,_Observer,_Subscription,_internal_symbol_rxSubscriber,_config,_util_hostReportError PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isFunction } from './util/isFunction';\nimport { empty as emptyObserver } from './Observer';\nimport { Subscription } from './Subscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nimport { config } from './config';\nimport { hostReportError } from './util/hostReportError';\nvar Subscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subscriber, _super);\n function Subscriber(destinationOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this.syncErrorValue = null;\n _this.syncErrorThrown = false;\n _this.syncErrorThrowable = false;\n _this.isStopped = false;\n switch (arguments.length) {\n case 0:\n _this.destination = emptyObserver;\n break;\n case 1:\n if (!destinationOrNext) {\n _this.destination = emptyObserver;\n break;\n }\n if (typeof destinationOrNext === 'object') {\n if (destinationOrNext instanceof Subscriber) {\n _this.syncErrorThrowable = destinationOrNext.syncErrorThrowable;\n _this.destination = destinationOrNext;\n destinationOrNext.add(_this);\n }\n else {\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext);\n }\n break;\n }\n default:\n _this.syncErrorThrowable = true;\n _this.destination = new SafeSubscriber(_this, destinationOrNext, error, complete);\n break;\n }\n return _this;\n }\n Subscriber.prototype[rxSubscriberSymbol] = function () { return this; };\n Subscriber.create = function (next, error, complete) {\n var subscriber = new Subscriber(next, error, complete);\n subscriber.syncErrorThrowable = false;\n return subscriber;\n };\n Subscriber.prototype.next = function (value) {\n if (!this.isStopped) {\n this._next(value);\n }\n };\n Subscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n this.isStopped = true;\n this._error(err);\n }\n };\n Subscriber.prototype.complete = function () {\n if (!this.isStopped) {\n this.isStopped = true;\n this._complete();\n }\n };\n Subscriber.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.isStopped = true;\n _super.prototype.unsubscribe.call(this);\n };\n Subscriber.prototype._next = function (value) {\n this.destination.next(value);\n };\n Subscriber.prototype._error = function (err) {\n this.destination.error(err);\n this.unsubscribe();\n };\n Subscriber.prototype._complete = function () {\n this.destination.complete();\n this.unsubscribe();\n };\n Subscriber.prototype._unsubscribeAndRecycle = function () {\n var _parentOrParents = this._parentOrParents;\n this._parentOrParents = null;\n this.unsubscribe();\n this.closed = false;\n this.isStopped = false;\n this._parentOrParents = _parentOrParents;\n return this;\n };\n return Subscriber;\n}(Subscription));\nexport { Subscriber };\nvar SafeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SafeSubscriber, _super);\n function SafeSubscriber(_parentSubscriber, observerOrNext, error, complete) {\n var _this = _super.call(this) || this;\n _this._parentSubscriber = _parentSubscriber;\n var next;\n var context = _this;\n if (isFunction(observerOrNext)) {\n next = observerOrNext;\n }\n else if (observerOrNext) {\n next = observerOrNext.next;\n error = observerOrNext.error;\n complete = observerOrNext.complete;\n if (observerOrNext !== emptyObserver) {\n context = Object.create(observerOrNext);\n if (isFunction(context.unsubscribe)) {\n _this.add(context.unsubscribe.bind(context));\n }\n context.unsubscribe = _this.unsubscribe.bind(_this);\n }\n }\n _this._context = context;\n _this._next = next;\n _this._error = error;\n _this._complete = complete;\n return _this;\n }\n SafeSubscriber.prototype.next = function (value) {\n if (!this.isStopped && this._next) {\n var _parentSubscriber = this._parentSubscriber;\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._next, value);\n }\n else if (this.__tryOrSetError(_parentSubscriber, this._next, value)) {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.error = function (err) {\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n var useDeprecatedSynchronousErrorHandling = config.useDeprecatedSynchronousErrorHandling;\n if (this._error) {\n if (!useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(this._error, err);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, this._error, err);\n this.unsubscribe();\n }\n }\n else if (!_parentSubscriber.syncErrorThrowable) {\n this.unsubscribe();\n if (useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n hostReportError(err);\n }\n else {\n if (useDeprecatedSynchronousErrorHandling) {\n _parentSubscriber.syncErrorValue = err;\n _parentSubscriber.syncErrorThrown = true;\n }\n else {\n hostReportError(err);\n }\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.complete = function () {\n var _this = this;\n if (!this.isStopped) {\n var _parentSubscriber = this._parentSubscriber;\n if (this._complete) {\n var wrappedComplete = function () { return _this._complete.call(_this._context); };\n if (!config.useDeprecatedSynchronousErrorHandling || !_parentSubscriber.syncErrorThrowable) {\n this.__tryOrUnsub(wrappedComplete);\n this.unsubscribe();\n }\n else {\n this.__tryOrSetError(_parentSubscriber, wrappedComplete);\n this.unsubscribe();\n }\n }\n else {\n this.unsubscribe();\n }\n }\n };\n SafeSubscriber.prototype.__tryOrUnsub = function (fn, value) {\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n this.unsubscribe();\n if (config.useDeprecatedSynchronousErrorHandling) {\n throw err;\n }\n else {\n hostReportError(err);\n }\n }\n };\n SafeSubscriber.prototype.__tryOrSetError = function (parent, fn, value) {\n if (!config.useDeprecatedSynchronousErrorHandling) {\n throw new Error('bad call');\n }\n try {\n fn.call(this._context, value);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n parent.syncErrorValue = err;\n parent.syncErrorThrown = true;\n return true;\n }\n else {\n hostReportError(err);\n return true;\n }\n }\n return false;\n };\n SafeSubscriber.prototype._unsubscribe = function () {\n var _parentSubscriber = this._parentSubscriber;\n this._context = null;\n this._parentSubscriber = null;\n _parentSubscriber.unsubscribe();\n };\n return SafeSubscriber;\n}(Subscriber));\nexport { SafeSubscriber };\n//# sourceMappingURL=Subscriber.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var observable = /*@__PURE__*/ (function () { return typeof Symbol === 'function' && Symbol.observable || '@@observable'; })();\n//# sourceMappingURL=observable.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function noop() { }\n//# sourceMappingURL=noop.js.map\n","/** PURE_IMPORTS_START _noop PURE_IMPORTS_END */\nimport { noop } from './noop';\nexport function pipe() {\n var fns = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n fns[_i] = arguments[_i];\n }\n return pipeFromArray(fns);\n}\nexport function pipeFromArray(fns) {\n if (!fns) {\n return noop;\n }\n if (fns.length === 1) {\n return fns[0];\n }\n return function piped(input) {\n return fns.reduce(function (prev, fn) { return fn(prev); }, input);\n };\n}\n//# sourceMappingURL=pipe.js.map\n","/** PURE_IMPORTS_START _util_canReportError,_util_toSubscriber,_symbol_observable,_util_pipe,_config PURE_IMPORTS_END */\nimport { canReportError } from './util/canReportError';\nimport { toSubscriber } from './util/toSubscriber';\nimport { observable as Symbol_observable } from './symbol/observable';\nimport { pipeFromArray } from './util/pipe';\nimport { config } from './config';\nvar Observable = /*@__PURE__*/ (function () {\n function Observable(subscribe) {\n this._isScalar = false;\n if (subscribe) {\n this._subscribe = subscribe;\n }\n }\n Observable.prototype.lift = function (operator) {\n var observable = new Observable();\n observable.source = this;\n observable.operator = operator;\n return observable;\n };\n Observable.prototype.subscribe = function (observerOrNext, error, complete) {\n var operator = this.operator;\n var sink = toSubscriber(observerOrNext, error, complete);\n if (operator) {\n sink.add(operator.call(sink, this.source));\n }\n else {\n sink.add(this.source || (config.useDeprecatedSynchronousErrorHandling && !sink.syncErrorThrowable) ?\n this._subscribe(sink) :\n this._trySubscribe(sink));\n }\n if (config.useDeprecatedSynchronousErrorHandling) {\n if (sink.syncErrorThrowable) {\n sink.syncErrorThrowable = false;\n if (sink.syncErrorThrown) {\n throw sink.syncErrorValue;\n }\n }\n }\n return sink;\n };\n Observable.prototype._trySubscribe = function (sink) {\n try {\n return this._subscribe(sink);\n }\n catch (err) {\n if (config.useDeprecatedSynchronousErrorHandling) {\n sink.syncErrorThrown = true;\n sink.syncErrorValue = err;\n }\n if (canReportError(sink)) {\n sink.error(err);\n }\n else {\n console.warn(err);\n }\n }\n };\n Observable.prototype.forEach = function (next, promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var subscription;\n subscription = _this.subscribe(function (value) {\n try {\n next(value);\n }\n catch (err) {\n reject(err);\n if (subscription) {\n subscription.unsubscribe();\n }\n }\n }, reject, resolve);\n });\n };\n Observable.prototype._subscribe = function (subscriber) {\n var source = this.source;\n return source && source.subscribe(subscriber);\n };\n Observable.prototype[Symbol_observable] = function () {\n return this;\n };\n Observable.prototype.pipe = function () {\n var operations = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n operations[_i] = arguments[_i];\n }\n if (operations.length === 0) {\n return this;\n }\n return pipeFromArray(operations)(this);\n };\n Observable.prototype.toPromise = function (promiseCtor) {\n var _this = this;\n promiseCtor = getPromiseCtor(promiseCtor);\n return new promiseCtor(function (resolve, reject) {\n var value;\n _this.subscribe(function (x) { return value = x; }, function (err) { return reject(err); }, function () { return resolve(value); });\n });\n };\n Observable.create = function (subscribe) {\n return new Observable(subscribe);\n };\n return Observable;\n}());\nexport { Observable };\nfunction getPromiseCtor(promiseCtor) {\n if (!promiseCtor) {\n promiseCtor = config.Promise || Promise;\n }\n if (!promiseCtor) {\n throw new Error('no Promise impl found');\n }\n return promiseCtor;\n}\n//# sourceMappingURL=Observable.js.map\n","/** PURE_IMPORTS_START _Subscriber,_symbol_rxSubscriber,_Observer PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { empty as emptyObserver } from '../Observer';\nexport function toSubscriber(nextOrObserver, error, complete) {\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber) {\n return nextOrObserver;\n }\n if (nextOrObserver[rxSubscriberSymbol]) {\n return nextOrObserver[rxSubscriberSymbol]();\n }\n }\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber(emptyObserver);\n }\n return new Subscriber(nextOrObserver, error, complete);\n}\n//# sourceMappingURL=toSubscriber.js.map\n","/** PURE_IMPORTS_START _Subscriber PURE_IMPORTS_END */\nimport { Subscriber } from '../Subscriber';\nexport function canReportError(observer) {\n while (observer) {\n var _a = observer, closed_1 = _a.closed, destination = _a.destination, isStopped = _a.isStopped;\n if (closed_1 || isStopped) {\n return false;\n }\n else if (destination && destination instanceof Subscriber) {\n observer = destination;\n }\n else {\n observer = null;\n }\n }\n return true;\n}\n//# sourceMappingURL=canReportError.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar ObjectUnsubscribedErrorImpl = /*@__PURE__*/ (function () {\n function ObjectUnsubscribedErrorImpl() {\n Error.call(this);\n this.message = 'object unsubscribed';\n this.name = 'ObjectUnsubscribedError';\n return this;\n }\n ObjectUnsubscribedErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return ObjectUnsubscribedErrorImpl;\n})();\nexport var ObjectUnsubscribedError = ObjectUnsubscribedErrorImpl;\n//# sourceMappingURL=ObjectUnsubscribedError.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from './Subscription';\nvar SubjectSubscription = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscription, _super);\n function SubjectSubscription(subject, subscriber) {\n var _this = _super.call(this) || this;\n _this.subject = subject;\n _this.subscriber = subscriber;\n _this.closed = false;\n return _this;\n }\n SubjectSubscription.prototype.unsubscribe = function () {\n if (this.closed) {\n return;\n }\n this.closed = true;\n var subject = this.subject;\n var observers = subject.observers;\n this.subject = null;\n if (!observers || observers.length === 0 || subject.isStopped || subject.closed) {\n return;\n }\n var subscriberIndex = observers.indexOf(this.subscriber);\n if (subscriberIndex !== -1) {\n observers.splice(subscriberIndex, 1);\n }\n };\n return SubjectSubscription;\n}(Subscription));\nexport { SubjectSubscription };\n//# sourceMappingURL=SubjectSubscription.js.map\n","/** PURE_IMPORTS_START tslib,_Observable,_Subscriber,_Subscription,_util_ObjectUnsubscribedError,_SubjectSubscription,_internal_symbol_rxSubscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Observable } from './Observable';\nimport { Subscriber } from './Subscriber';\nimport { Subscription } from './Subscription';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nimport { rxSubscriber as rxSubscriberSymbol } from '../internal/symbol/rxSubscriber';\nvar SubjectSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SubjectSubscriber, _super);\n function SubjectSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n return _this;\n }\n return SubjectSubscriber;\n}(Subscriber));\nexport { SubjectSubscriber };\nvar Subject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Subject, _super);\n function Subject() {\n var _this = _super.call(this) || this;\n _this.observers = [];\n _this.closed = false;\n _this.isStopped = false;\n _this.hasError = false;\n _this.thrownError = null;\n return _this;\n }\n Subject.prototype[rxSubscriberSymbol] = function () {\n return new SubjectSubscriber(this);\n };\n Subject.prototype.lift = function (operator) {\n var subject = new AnonymousSubject(this, this);\n subject.operator = operator;\n return subject;\n };\n Subject.prototype.next = function (value) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n if (!this.isStopped) {\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].next(value);\n }\n }\n };\n Subject.prototype.error = function (err) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.hasError = true;\n this.thrownError = err;\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].error(err);\n }\n this.observers.length = 0;\n };\n Subject.prototype.complete = function () {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n this.isStopped = true;\n var observers = this.observers;\n var len = observers.length;\n var copy = observers.slice();\n for (var i = 0; i < len; i++) {\n copy[i].complete();\n }\n this.observers.length = 0;\n };\n Subject.prototype.unsubscribe = function () {\n this.isStopped = true;\n this.closed = true;\n this.observers = null;\n };\n Subject.prototype._trySubscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else {\n return _super.prototype._trySubscribe.call(this, subscriber);\n }\n };\n Subject.prototype._subscribe = function (subscriber) {\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.hasError) {\n subscriber.error(this.thrownError);\n return Subscription.EMPTY;\n }\n else if (this.isStopped) {\n subscriber.complete();\n return Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n return new SubjectSubscription(this, subscriber);\n }\n };\n Subject.prototype.asObservable = function () {\n var observable = new Observable();\n observable.source = this;\n return observable;\n };\n Subject.create = function (destination, source) {\n return new AnonymousSubject(destination, source);\n };\n return Subject;\n}(Observable));\nexport { Subject };\nvar AnonymousSubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnonymousSubject, _super);\n function AnonymousSubject(destination, source) {\n var _this = _super.call(this) || this;\n _this.destination = destination;\n _this.source = source;\n return _this;\n }\n AnonymousSubject.prototype.next = function (value) {\n var destination = this.destination;\n if (destination && destination.next) {\n destination.next(value);\n }\n };\n AnonymousSubject.prototype.error = function (err) {\n var destination = this.destination;\n if (destination && destination.error) {\n this.destination.error(err);\n }\n };\n AnonymousSubject.prototype.complete = function () {\n var destination = this.destination;\n if (destination && destination.complete) {\n this.destination.complete();\n }\n };\n AnonymousSubject.prototype._subscribe = function (subscriber) {\n var source = this.source;\n if (source) {\n return this.source.subscribe(subscriber);\n }\n else {\n return Subscription.EMPTY;\n }\n };\n return AnonymousSubject;\n}(Subject));\nexport { AnonymousSubject };\n//# sourceMappingURL=Subject.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function map(project, thisArg) {\n return function mapOperation(source) {\n if (typeof project !== 'function') {\n throw new TypeError('argument is not a function. Are you looking for `mapTo()`?');\n }\n return source.lift(new MapOperator(project, thisArg));\n };\n}\nvar MapOperator = /*@__PURE__*/ (function () {\n function MapOperator(project, thisArg) {\n this.project = project;\n this.thisArg = thisArg;\n }\n MapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapSubscriber(subscriber, this.project, this.thisArg));\n };\n return MapOperator;\n}());\nexport { MapOperator };\nvar MapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapSubscriber, _super);\n function MapSubscriber(destination, project, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.count = 0;\n _this.thisArg = thisArg || _this;\n return _this;\n }\n MapSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.project.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return MapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=map.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nvar toString = /*@__PURE__*/ (function () { return Object.prototype.toString; })();\nexport function fromEvent(target, eventName, options, resultSelector) {\n if (isFunction(options)) {\n resultSelector = options;\n options = undefined;\n }\n if (resultSelector) {\n return fromEvent(target, eventName, options).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable(function (subscriber) {\n function handler(e) {\n if (arguments.length > 1) {\n subscriber.next(Array.prototype.slice.call(arguments));\n }\n else {\n subscriber.next(e);\n }\n }\n setupSubscription(target, eventName, handler, subscriber, options);\n });\n}\nfunction setupSubscription(sourceObj, eventName, handler, subscriber, options) {\n var unsubscribe;\n if (isEventTarget(sourceObj)) {\n var source_1 = sourceObj;\n sourceObj.addEventListener(eventName, handler, options);\n unsubscribe = function () { return source_1.removeEventListener(eventName, handler, options); };\n }\n else if (isJQueryStyleEventEmitter(sourceObj)) {\n var source_2 = sourceObj;\n sourceObj.on(eventName, handler);\n unsubscribe = function () { return source_2.off(eventName, handler); };\n }\n else if (isNodeStyleEventEmitter(sourceObj)) {\n var source_3 = sourceObj;\n sourceObj.addListener(eventName, handler);\n unsubscribe = function () { return source_3.removeListener(eventName, handler); };\n }\n else if (sourceObj && sourceObj.length) {\n for (var i = 0, len = sourceObj.length; i < len; i++) {\n setupSubscription(sourceObj[i], eventName, handler, subscriber, options);\n }\n }\n else {\n throw new TypeError('Invalid event target');\n }\n subscriber.add(unsubscribe);\n}\nfunction isNodeStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.addListener === 'function' && typeof sourceObj.removeListener === 'function';\n}\nfunction isJQueryStyleEventEmitter(sourceObj) {\n return sourceObj && typeof sourceObj.on === 'function' && typeof sourceObj.off === 'function';\n}\nfunction isEventTarget(sourceObj) {\n return sourceObj && typeof sourceObj.addEventListener === 'function' && typeof sourceObj.removeEventListener === 'function';\n}\n//# sourceMappingURL=fromEvent.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar InnerSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(InnerSubscriber, _super);\n function InnerSubscriber(parent, outerValue, outerIndex) {\n var _this = _super.call(this) || this;\n _this.parent = parent;\n _this.outerValue = outerValue;\n _this.outerIndex = outerIndex;\n _this.index = 0;\n return _this;\n }\n InnerSubscriber.prototype._next = function (value) {\n this.parent.notifyNext(this.outerValue, value, this.outerIndex, this.index++, this);\n };\n InnerSubscriber.prototype._error = function (error) {\n this.parent.notifyError(error, this);\n this.unsubscribe();\n };\n InnerSubscriber.prototype._complete = function () {\n this.parent.notifyComplete(this);\n this.unsubscribe();\n };\n return InnerSubscriber;\n}(Subscriber));\nexport { InnerSubscriber };\n//# sourceMappingURL=InnerSubscriber.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var subscribeToArray = function (array) {\n return function (subscriber) {\n for (var i = 0, len = array.length; i < len && !subscriber.closed; i++) {\n subscriber.next(array[i]);\n }\n subscriber.complete();\n };\n};\n//# sourceMappingURL=subscribeToArray.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function getSymbolIterator() {\n if (typeof Symbol !== 'function' || !Symbol.iterator) {\n return '@@iterator';\n }\n return Symbol.iterator;\n}\nexport var iterator = /*@__PURE__*/ getSymbolIterator();\nexport var $$iterator = iterator;\n//# sourceMappingURL=iterator.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport var isArrayLike = (function (x) { return x && typeof x.length === 'number' && typeof x !== 'function'; });\n//# sourceMappingURL=isArrayLike.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isPromise(value) {\n return !!value && typeof value.subscribe !== 'function' && typeof value.then === 'function';\n}\n//# sourceMappingURL=isPromise.js.map\n","/** PURE_IMPORTS_START _subscribeToArray,_subscribeToPromise,_subscribeToIterable,_subscribeToObservable,_isArrayLike,_isPromise,_isObject,_symbol_iterator,_symbol_observable PURE_IMPORTS_END */\nimport { subscribeToArray } from './subscribeToArray';\nimport { subscribeToPromise } from './subscribeToPromise';\nimport { subscribeToIterable } from './subscribeToIterable';\nimport { subscribeToObservable } from './subscribeToObservable';\nimport { isArrayLike } from './isArrayLike';\nimport { isPromise } from './isPromise';\nimport { isObject } from './isObject';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeTo = function (result) {\n if (!!result && typeof result[Symbol_observable] === 'function') {\n return subscribeToObservable(result);\n }\n else if (isArrayLike(result)) {\n return subscribeToArray(result);\n }\n else if (isPromise(result)) {\n return subscribeToPromise(result);\n }\n else if (!!result && typeof result[Symbol_iterator] === 'function') {\n return subscribeToIterable(result);\n }\n else {\n var value = isObject(result) ? 'an invalid object' : \"'\" + result + \"'\";\n var msg = \"You provided \" + value + \" where a stream was expected.\"\n + ' You can provide an Observable, Promise, Array, or Iterable.';\n throw new TypeError(msg);\n }\n};\n//# sourceMappingURL=subscribeTo.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport var subscribeToObservable = function (obj) {\n return function (subscriber) {\n var obs = obj[Symbol_observable]();\n if (typeof obs.subscribe !== 'function') {\n throw new TypeError('Provided object does not correctly implement Symbol.observable');\n }\n else {\n return obs.subscribe(subscriber);\n }\n };\n};\n//# sourceMappingURL=subscribeToObservable.js.map\n","/** PURE_IMPORTS_START _hostReportError PURE_IMPORTS_END */\nimport { hostReportError } from './hostReportError';\nexport var subscribeToPromise = function (promise) {\n return function (subscriber) {\n promise.then(function (value) {\n if (!subscriber.closed) {\n subscriber.next(value);\n subscriber.complete();\n }\n }, function (err) { return subscriber.error(err); })\n .then(null, hostReportError);\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToPromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport var subscribeToIterable = function (iterable) {\n return function (subscriber) {\n var iterator = iterable[Symbol_iterator]();\n do {\n var item = iterator.next();\n if (item.done) {\n subscriber.complete();\n break;\n }\n subscriber.next(item.value);\n if (subscriber.closed) {\n break;\n }\n } while (true);\n if (typeof iterator.return === 'function') {\n subscriber.add(function () {\n if (iterator.return) {\n iterator.return();\n }\n });\n }\n return subscriber;\n };\n};\n//# sourceMappingURL=subscribeToIterable.js.map\n","/** PURE_IMPORTS_START _InnerSubscriber,_subscribeTo,_Observable PURE_IMPORTS_END */\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeTo } from './subscribeTo';\nimport { Observable } from '../Observable';\nexport function subscribeToResult(outerSubscriber, result, outerValue, outerIndex, destination) {\n if (destination === void 0) {\n destination = new InnerSubscriber(outerSubscriber, outerValue, outerIndex);\n }\n if (destination.closed) {\n return undefined;\n }\n if (result instanceof Observable) {\n return result.subscribe(destination);\n }\n return subscribeTo(result)(destination);\n}\n//# sourceMappingURL=subscribeToResult.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from './Subscriber';\nvar OuterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(OuterSubscriber, _super);\n function OuterSubscriber() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n OuterSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n OuterSubscriber.prototype.notifyError = function (error, innerSub) {\n this.destination.error(error);\n };\n OuterSubscriber.prototype.notifyComplete = function (innerSub) {\n this.destination.complete();\n };\n return OuterSubscriber;\n}(Subscriber));\nexport { OuterSubscriber };\n//# sourceMappingURL=OuterSubscriber.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function scheduleArray(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var i = 0;\n sub.add(scheduler.schedule(function () {\n if (i === input.length) {\n subscriber.complete();\n return;\n }\n subscriber.next(input[i++]);\n if (!subscriber.closed) {\n sub.add(this.schedule());\n }\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleArray.js.map\n","/** PURE_IMPORTS_START _scheduleObservable,_schedulePromise,_scheduleArray,_scheduleIterable,_util_isInteropObservable,_util_isPromise,_util_isArrayLike,_util_isIterable PURE_IMPORTS_END */\nimport { scheduleObservable } from './scheduleObservable';\nimport { schedulePromise } from './schedulePromise';\nimport { scheduleArray } from './scheduleArray';\nimport { scheduleIterable } from './scheduleIterable';\nimport { isInteropObservable } from '../util/isInteropObservable';\nimport { isPromise } from '../util/isPromise';\nimport { isArrayLike } from '../util/isArrayLike';\nimport { isIterable } from '../util/isIterable';\nexport function scheduled(input, scheduler) {\n if (input != null) {\n if (isInteropObservable(input)) {\n return scheduleObservable(input, scheduler);\n }\n else if (isPromise(input)) {\n return schedulePromise(input, scheduler);\n }\n else if (isArrayLike(input)) {\n return scheduleArray(input, scheduler);\n }\n else if (isIterable(input) || typeof input === 'string') {\n return scheduleIterable(input, scheduler);\n }\n }\n throw new TypeError((input !== null && typeof input || input) + ' is not observable');\n}\n//# sourceMappingURL=scheduled.js.map\n","/** PURE_IMPORTS_START _symbol_observable PURE_IMPORTS_END */\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function isInteropObservable(input) {\n return input && typeof input[Symbol_observable] === 'function';\n}\n//# sourceMappingURL=isInteropObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { observable as Symbol_observable } from '../symbol/observable';\nexport function scheduleObservable(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n var observable = input[Symbol_observable]();\n sub.add(observable.subscribe({\n next: function (value) { sub.add(scheduler.schedule(function () { return subscriber.next(value); })); },\n error: function (err) { sub.add(scheduler.schedule(function () { return subscriber.error(err); })); },\n complete: function () { sub.add(scheduler.schedule(function () { return subscriber.complete(); })); },\n }));\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleObservable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nexport function schedulePromise(input, scheduler) {\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n sub.add(scheduler.schedule(function () {\n return input.then(function (value) {\n sub.add(scheduler.schedule(function () {\n subscriber.next(value);\n sub.add(scheduler.schedule(function () { return subscriber.complete(); }));\n }));\n }, function (err) {\n sub.add(scheduler.schedule(function () { return subscriber.error(err); }));\n });\n }));\n return sub;\n });\n}\n//# sourceMappingURL=schedulePromise.js.map\n","/** PURE_IMPORTS_START _symbol_iterator PURE_IMPORTS_END */\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function isIterable(input) {\n return input && typeof input[Symbol_iterator] === 'function';\n}\n//# sourceMappingURL=isIterable.js.map\n","/** PURE_IMPORTS_START _Observable,_Subscription,_symbol_iterator PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { Subscription } from '../Subscription';\nimport { iterator as Symbol_iterator } from '../symbol/iterator';\nexport function scheduleIterable(input, scheduler) {\n if (!input) {\n throw new Error('Iterable cannot be null');\n }\n return new Observable(function (subscriber) {\n var sub = new Subscription();\n var iterator;\n sub.add(function () {\n if (iterator && typeof iterator.return === 'function') {\n iterator.return();\n }\n });\n sub.add(scheduler.schedule(function () {\n iterator = input[Symbol_iterator]();\n sub.add(scheduler.schedule(function () {\n if (subscriber.closed) {\n return;\n }\n var value;\n var done;\n try {\n var result = iterator.next();\n value = result.value;\n done = result.done;\n }\n catch (err) {\n subscriber.error(err);\n return;\n }\n if (done) {\n subscriber.complete();\n }\n else {\n subscriber.next(value);\n this.schedule();\n }\n }));\n }));\n return sub;\n });\n}\n//# sourceMappingURL=scheduleIterable.js.map\n","/** PURE_IMPORTS_START _Observable,_util_subscribeTo,_scheduled_scheduled PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeTo } from '../util/subscribeTo';\nimport { scheduled } from '../scheduled/scheduled';\nexport function from(input, scheduler) {\n if (!scheduler) {\n if (input instanceof Observable) {\n return input;\n }\n return new Observable(subscribeTo(input));\n }\n else {\n return scheduled(input, scheduler);\n }\n}\n//# sourceMappingURL=from.js.map\n","/** PURE_IMPORTS_START tslib,_util_subscribeToResult,_OuterSubscriber,_InnerSubscriber,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { map } from './map';\nimport { from } from '../observable/from';\nexport function mergeMap(project, resultSelector, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(mergeMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); }, concurrent)); };\n }\n else if (typeof resultSelector === 'number') {\n concurrent = resultSelector;\n }\n return function (source) { return source.lift(new MergeMapOperator(project, concurrent)); };\n}\nvar MergeMapOperator = /*@__PURE__*/ (function () {\n function MergeMapOperator(project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n this.project = project;\n this.concurrent = concurrent;\n }\n MergeMapOperator.prototype.call = function (observer, source) {\n return source.subscribe(new MergeMapSubscriber(observer, this.project, this.concurrent));\n };\n return MergeMapOperator;\n}());\nexport { MergeMapOperator };\nvar MergeMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MergeMapSubscriber, _super);\n function MergeMapSubscriber(destination, project, concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.concurrent = concurrent;\n _this.hasCompleted = false;\n _this.buffer = [];\n _this.active = 0;\n _this.index = 0;\n return _this;\n }\n MergeMapSubscriber.prototype._next = function (value) {\n if (this.active < this.concurrent) {\n this._tryNext(value);\n }\n else {\n this.buffer.push(value);\n }\n };\n MergeMapSubscriber.prototype._tryNext = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.active++;\n this._innerSub(result, value, index);\n };\n MergeMapSubscriber.prototype._innerSub = function (ish, value, index) {\n var innerSubscriber = new InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n subscribeToResult(this, ish, value, index, innerSubscriber);\n };\n MergeMapSubscriber.prototype._complete = function () {\n this.hasCompleted = true;\n if (this.active === 0 && this.buffer.length === 0) {\n this.destination.complete();\n }\n this.unsubscribe();\n };\n MergeMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n MergeMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var buffer = this.buffer;\n this.remove(innerSub);\n this.active--;\n if (buffer.length > 0) {\n this._next(buffer.shift());\n }\n else if (this.active === 0 && this.hasCompleted) {\n this.destination.complete();\n }\n };\n return MergeMapSubscriber;\n}(OuterSubscriber));\nexport { MergeMapSubscriber };\n//# sourceMappingURL=mergeMap.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function identity(x) {\n return x;\n}\n//# sourceMappingURL=identity.js.map\n","/** PURE_IMPORTS_START _mergeMap,_util_identity PURE_IMPORTS_END */\nimport { mergeMap } from './mergeMap';\nimport { identity } from '../util/identity';\nexport function mergeAll(concurrent) {\n if (concurrent === void 0) {\n concurrent = Number.POSITIVE_INFINITY;\n }\n return mergeMap(identity, concurrent);\n}\n//# sourceMappingURL=mergeAll.js.map\n","/** PURE_IMPORTS_START _Observable,_util_subscribeToArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { subscribeToArray } from '../util/subscribeToArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function fromArray(input, scheduler) {\n if (!scheduler) {\n return new Observable(subscribeToArray(input));\n }\n else {\n return scheduleArray(input, scheduler);\n }\n}\n//# sourceMappingURL=fromArray.js.map\n","/** PURE_IMPORTS_START _Observable,_util_isScheduler,_operators_mergeAll,_fromArray PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isScheduler } from '../util/isScheduler';\nimport { mergeAll } from '../operators/mergeAll';\nimport { fromArray } from './fromArray';\nexport function merge() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var concurrent = Number.POSITIVE_INFINITY;\n var scheduler = null;\n var last = observables[observables.length - 1];\n if (isScheduler(last)) {\n scheduler = observables.pop();\n if (observables.length > 1 && typeof observables[observables.length - 1] === 'number') {\n concurrent = observables.pop();\n }\n }\n else if (typeof last === 'number') {\n concurrent = observables.pop();\n }\n if (scheduler === null && observables.length === 1 && observables[0] instanceof Observable) {\n return observables[0];\n }\n return mergeAll(concurrent)(fromArray(observables, scheduler));\n}\n//# sourceMappingURL=merge.js.map\n","/** PURE_IMPORTS_START _map PURE_IMPORTS_END */\nimport { map } from './map';\nexport function pluck() {\n var properties = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n properties[_i] = arguments[_i];\n }\n var length = properties.length;\n if (length === 0) {\n throw new Error('list of properties cannot be empty.');\n }\n return function (source) { return map(plucker(properties, length))(source); };\n}\nfunction plucker(props, length) {\n var mapper = function (x) {\n var currentProp = x;\n for (var i = 0; i < length; i++) {\n var p = currentProp[props[i]];\n if (typeof p !== 'undefined') {\n currentProp = p;\n }\n else {\n return undefined;\n }\n }\n return currentProp;\n };\n return mapper;\n}\n//# sourceMappingURL=pluck.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_InnerSubscriber,_util_subscribeToResult,_map,_observable_from PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { InnerSubscriber } from '../InnerSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { map } from './map';\nimport { from } from '../observable/from';\nexport function switchMap(project, resultSelector) {\n if (typeof resultSelector === 'function') {\n return function (source) { return source.pipe(switchMap(function (a, i) { return from(project(a, i)).pipe(map(function (b, ii) { return resultSelector(a, b, i, ii); })); })); };\n }\n return function (source) { return source.lift(new SwitchMapOperator(project)); };\n}\nvar SwitchMapOperator = /*@__PURE__*/ (function () {\n function SwitchMapOperator(project) {\n this.project = project;\n }\n SwitchMapOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SwitchMapSubscriber(subscriber, this.project));\n };\n return SwitchMapOperator;\n}());\nvar SwitchMapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SwitchMapSubscriber, _super);\n function SwitchMapSubscriber(destination, project) {\n var _this = _super.call(this, destination) || this;\n _this.project = project;\n _this.index = 0;\n return _this;\n }\n SwitchMapSubscriber.prototype._next = function (value) {\n var result;\n var index = this.index++;\n try {\n result = this.project(value, index);\n }\n catch (error) {\n this.destination.error(error);\n return;\n }\n this._innerSub(result, value, index);\n };\n SwitchMapSubscriber.prototype._innerSub = function (result, value, index) {\n var innerSubscription = this.innerSubscription;\n if (innerSubscription) {\n innerSubscription.unsubscribe();\n }\n var innerSubscriber = new InnerSubscriber(this, undefined, undefined);\n var destination = this.destination;\n destination.add(innerSubscriber);\n this.innerSubscription = subscribeToResult(this, result, value, index, innerSubscriber);\n };\n SwitchMapSubscriber.prototype._complete = function () {\n var innerSubscription = this.innerSubscription;\n if (!innerSubscription || innerSubscription.closed) {\n _super.prototype._complete.call(this);\n }\n this.unsubscribe();\n };\n SwitchMapSubscriber.prototype._unsubscribe = function () {\n this.innerSubscription = null;\n };\n SwitchMapSubscriber.prototype.notifyComplete = function (innerSub) {\n var destination = this.destination;\n destination.remove(innerSub);\n this.innerSubscription = null;\n if (this.isStopped) {\n _super.prototype._complete.call(this);\n }\n };\n SwitchMapSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.destination.next(innerValue);\n };\n return SwitchMapSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=switchMap.js.map\n","/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */\nimport { empty } from './observable/empty';\nimport { of } from './observable/of';\nimport { throwError } from './observable/throwError';\nexport var NotificationKind;\n/*@__PURE__*/ (function (NotificationKind) {\n NotificationKind[\"NEXT\"] = \"N\";\n NotificationKind[\"ERROR\"] = \"E\";\n NotificationKind[\"COMPLETE\"] = \"C\";\n})(NotificationKind || (NotificationKind = {}));\nvar Notification = /*@__PURE__*/ (function () {\n function Notification(kind, value, error) {\n this.kind = kind;\n this.value = value;\n this.error = error;\n this.hasValue = kind === 'N';\n }\n Notification.prototype.observe = function (observer) {\n switch (this.kind) {\n case 'N':\n return observer.next && observer.next(this.value);\n case 'E':\n return observer.error && observer.error(this.error);\n case 'C':\n return observer.complete && observer.complete();\n }\n };\n Notification.prototype.do = function (next, error, complete) {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return next && next(this.value);\n case 'E':\n return error && error(this.error);\n case 'C':\n return complete && complete();\n }\n };\n Notification.prototype.accept = function (nextOrObserver, error, complete) {\n if (nextOrObserver && typeof nextOrObserver.next === 'function') {\n return this.observe(nextOrObserver);\n }\n else {\n return this.do(nextOrObserver, error, complete);\n }\n };\n Notification.prototype.toObservable = function () {\n var kind = this.kind;\n switch (kind) {\n case 'N':\n return of(this.value);\n case 'E':\n return throwError(this.error);\n case 'C':\n return empty();\n }\n throw new Error('unexpected notification kind value');\n };\n Notification.createNext = function (value) {\n if (typeof value !== 'undefined') {\n return new Notification('N', value);\n }\n return Notification.undefinedValueNotification;\n };\n Notification.createError = function (err) {\n return new Notification('E', undefined, err);\n };\n Notification.createComplete = function () {\n return Notification.completeNotification;\n };\n Notification.completeNotification = new Notification('C');\n Notification.undefinedValueNotification = new Notification('N', undefined);\n return Notification;\n}());\nexport { Notification };\n//# sourceMappingURL=Notification.js.map\n","/** PURE_IMPORTS_START tslib,_Action PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Action } from './Action';\nvar AsyncAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsyncAction, _super);\n function AsyncAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n _this.pending = false;\n return _this;\n }\n AsyncAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (this.closed) {\n return this;\n }\n this.state = state;\n var id = this.id;\n var scheduler = this.scheduler;\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, delay);\n }\n this.pending = true;\n this.delay = delay;\n this.id = this.id || this.requestAsyncId(scheduler, this.id, delay);\n return this;\n };\n AsyncAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return setInterval(scheduler.flush.bind(scheduler, this), delay);\n };\n AsyncAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay !== null && this.delay === delay && this.pending === false) {\n return id;\n }\n clearInterval(id);\n return undefined;\n };\n AsyncAction.prototype.execute = function (state, delay) {\n if (this.closed) {\n return new Error('executing a cancelled action');\n }\n this.pending = false;\n var error = this._execute(state, delay);\n if (error) {\n return error;\n }\n else if (this.pending === false && this.id != null) {\n this.id = this.recycleAsyncId(this.scheduler, this.id, null);\n }\n };\n AsyncAction.prototype._execute = function (state, delay) {\n var errored = false;\n var errorValue = undefined;\n try {\n this.work(state);\n }\n catch (e) {\n errored = true;\n errorValue = !!e && e || new Error(e);\n }\n if (errored) {\n this.unsubscribe();\n return errorValue;\n }\n };\n AsyncAction.prototype._unsubscribe = function () {\n var id = this.id;\n var scheduler = this.scheduler;\n var actions = scheduler.actions;\n var index = actions.indexOf(this);\n this.work = null;\n this.state = null;\n this.pending = false;\n this.scheduler = null;\n if (index !== -1) {\n actions.splice(index, 1);\n }\n if (id != null) {\n this.id = this.recycleAsyncId(scheduler, id, null);\n }\n this.delay = null;\n };\n return AsyncAction;\n}(Action));\nexport { AsyncAction };\n//# sourceMappingURL=AsyncAction.js.map\n","/** PURE_IMPORTS_START tslib,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscription } from '../Subscription';\nvar Action = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(Action, _super);\n function Action(scheduler, work) {\n return _super.call(this) || this;\n }\n Action.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return this;\n };\n return Action;\n}(Subscription));\nexport { Action };\n//# sourceMappingURL=Action.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar QueueAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(QueueAction, _super);\n function QueueAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n QueueAction.prototype.schedule = function (state, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay > 0) {\n return _super.prototype.schedule.call(this, state, delay);\n }\n this.delay = delay;\n this.state = state;\n this.scheduler.flush(this);\n return this;\n };\n QueueAction.prototype.execute = function (state, delay) {\n return (delay > 0 || this.closed) ?\n _super.prototype.execute.call(this, state, delay) :\n this._execute(state, delay);\n };\n QueueAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n return scheduler.flush(this);\n };\n return QueueAction;\n}(AsyncAction));\nexport { QueueAction };\n//# sourceMappingURL=QueueAction.js.map\n","var Scheduler = /*@__PURE__*/ (function () {\n function Scheduler(SchedulerAction, now) {\n if (now === void 0) {\n now = Scheduler.now;\n }\n this.SchedulerAction = SchedulerAction;\n this.now = now;\n }\n Scheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) {\n delay = 0;\n }\n return new this.SchedulerAction(this, work).schedule(state, delay);\n };\n Scheduler.now = function () { return Date.now(); };\n return Scheduler;\n}());\nexport { Scheduler };\n//# sourceMappingURL=Scheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Scheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Scheduler } from '../Scheduler';\nvar AsyncScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AsyncScheduler, _super);\n function AsyncScheduler(SchedulerAction, now) {\n if (now === void 0) {\n now = Scheduler.now;\n }\n var _this = _super.call(this, SchedulerAction, function () {\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== _this) {\n return AsyncScheduler.delegate.now();\n }\n else {\n return now();\n }\n }) || this;\n _this.actions = [];\n _this.active = false;\n _this.scheduled = undefined;\n return _this;\n }\n AsyncScheduler.prototype.schedule = function (work, delay, state) {\n if (delay === void 0) {\n delay = 0;\n }\n if (AsyncScheduler.delegate && AsyncScheduler.delegate !== this) {\n return AsyncScheduler.delegate.schedule(work, delay, state);\n }\n else {\n return _super.prototype.schedule.call(this, work, delay, state);\n }\n };\n AsyncScheduler.prototype.flush = function (action) {\n var actions = this.actions;\n if (this.active) {\n actions.push(action);\n return;\n }\n var error;\n this.active = true;\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (action = actions.shift());\n this.active = false;\n if (error) {\n while (action = actions.shift()) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AsyncScheduler;\n}(Scheduler));\nexport { AsyncScheduler };\n//# sourceMappingURL=AsyncScheduler.js.map\n","/** PURE_IMPORTS_START _QueueAction,_QueueScheduler PURE_IMPORTS_END */\nimport { QueueAction } from './QueueAction';\nimport { QueueScheduler } from './QueueScheduler';\nexport var queue = /*@__PURE__*/ new QueueScheduler(QueueAction);\n//# sourceMappingURL=queue.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar QueueScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(QueueScheduler, _super);\n function QueueScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n return QueueScheduler;\n}(AsyncScheduler));\nexport { QueueScheduler };\n//# sourceMappingURL=QueueScheduler.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport var EMPTY = /*@__PURE__*/ new Observable(function (subscriber) { return subscriber.complete(); });\nexport function empty(scheduler) {\n return scheduler ? emptyScheduled(scheduler) : EMPTY;\n}\nfunction emptyScheduled(scheduler) {\n return new Observable(function (subscriber) { return scheduler.schedule(function () { return subscriber.complete(); }); });\n}\n//# sourceMappingURL=empty.js.map\n","/** PURE_IMPORTS_START _util_isScheduler,_fromArray,_scheduled_scheduleArray PURE_IMPORTS_END */\nimport { isScheduler } from '../util/isScheduler';\nimport { fromArray } from './fromArray';\nimport { scheduleArray } from '../scheduled/scheduleArray';\nexport function of() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n var scheduler = args[args.length - 1];\n if (isScheduler(scheduler)) {\n args.pop();\n return scheduleArray(args, scheduler);\n }\n else {\n return fromArray(args);\n }\n}\n//# sourceMappingURL=of.js.map\n","/** PURE_IMPORTS_START _Observable PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nexport function throwError(error, scheduler) {\n if (!scheduler) {\n return new Observable(function (subscriber) { return subscriber.error(error); });\n }\n else {\n return new Observable(function (subscriber) { return scheduler.schedule(dispatch, 0, { error: error, subscriber: subscriber }); });\n }\n}\nfunction dispatch(_a) {\n var error = _a.error, subscriber = _a.subscriber;\n subscriber.error(error);\n}\n//# sourceMappingURL=throwError.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function observeOn(scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n return function observeOnOperatorFunction(source) {\n return source.lift(new ObserveOnOperator(scheduler, delay));\n };\n}\nvar ObserveOnOperator = /*@__PURE__*/ (function () {\n function ObserveOnOperator(scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n this.scheduler = scheduler;\n this.delay = delay;\n }\n ObserveOnOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ObserveOnSubscriber(subscriber, this.scheduler, this.delay));\n };\n return ObserveOnOperator;\n}());\nexport { ObserveOnOperator };\nvar ObserveOnSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ObserveOnSubscriber, _super);\n function ObserveOnSubscriber(destination, scheduler, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n var _this = _super.call(this, destination) || this;\n _this.scheduler = scheduler;\n _this.delay = delay;\n return _this;\n }\n ObserveOnSubscriber.dispatch = function (arg) {\n var notification = arg.notification, destination = arg.destination;\n notification.observe(destination);\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype.scheduleMessage = function (notification) {\n var destination = this.destination;\n destination.add(this.scheduler.schedule(ObserveOnSubscriber.dispatch, this.delay, new ObserveOnMessage(notification, this.destination)));\n };\n ObserveOnSubscriber.prototype._next = function (value) {\n this.scheduleMessage(Notification.createNext(value));\n };\n ObserveOnSubscriber.prototype._error = function (err) {\n this.scheduleMessage(Notification.createError(err));\n this.unsubscribe();\n };\n ObserveOnSubscriber.prototype._complete = function () {\n this.scheduleMessage(Notification.createComplete());\n this.unsubscribe();\n };\n return ObserveOnSubscriber;\n}(Subscriber));\nexport { ObserveOnSubscriber };\nvar ObserveOnMessage = /*@__PURE__*/ (function () {\n function ObserveOnMessage(notification, destination) {\n this.notification = notification;\n this.destination = destination;\n }\n return ObserveOnMessage;\n}());\nexport { ObserveOnMessage };\n//# sourceMappingURL=observeOn.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_scheduler_queue,_Subscription,_operators_observeOn,_util_ObjectUnsubscribedError,_SubjectSubscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subject } from './Subject';\nimport { queue } from './scheduler/queue';\nimport { Subscription } from './Subscription';\nimport { ObserveOnSubscriber } from './operators/observeOn';\nimport { ObjectUnsubscribedError } from './util/ObjectUnsubscribedError';\nimport { SubjectSubscription } from './SubjectSubscription';\nvar ReplaySubject = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ReplaySubject, _super);\n function ReplaySubject(bufferSize, windowTime, scheduler) {\n if (bufferSize === void 0) {\n bufferSize = Number.POSITIVE_INFINITY;\n }\n if (windowTime === void 0) {\n windowTime = Number.POSITIVE_INFINITY;\n }\n var _this = _super.call(this) || this;\n _this.scheduler = scheduler;\n _this._events = [];\n _this._infiniteTimeWindow = false;\n _this._bufferSize = bufferSize < 1 ? 1 : bufferSize;\n _this._windowTime = windowTime < 1 ? 1 : windowTime;\n if (windowTime === Number.POSITIVE_INFINITY) {\n _this._infiniteTimeWindow = true;\n _this.next = _this.nextInfiniteTimeWindow;\n }\n else {\n _this.next = _this.nextTimeWindow;\n }\n return _this;\n }\n ReplaySubject.prototype.nextInfiniteTimeWindow = function (value) {\n var _events = this._events;\n _events.push(value);\n if (_events.length > this._bufferSize) {\n _events.shift();\n }\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype.nextTimeWindow = function (value) {\n this._events.push(new ReplayEvent(this._getNow(), value));\n this._trimBufferThenGetEvents();\n _super.prototype.next.call(this, value);\n };\n ReplaySubject.prototype._subscribe = function (subscriber) {\n var _infiniteTimeWindow = this._infiniteTimeWindow;\n var _events = _infiniteTimeWindow ? this._events : this._trimBufferThenGetEvents();\n var scheduler = this.scheduler;\n var len = _events.length;\n var subscription;\n if (this.closed) {\n throw new ObjectUnsubscribedError();\n }\n else if (this.isStopped || this.hasError) {\n subscription = Subscription.EMPTY;\n }\n else {\n this.observers.push(subscriber);\n subscription = new SubjectSubscription(this, subscriber);\n }\n if (scheduler) {\n subscriber.add(subscriber = new ObserveOnSubscriber(subscriber, scheduler));\n }\n if (_infiniteTimeWindow) {\n for (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i]);\n }\n }\n else {\n for (var i = 0; i < len && !subscriber.closed; i++) {\n subscriber.next(_events[i].value);\n }\n }\n if (this.hasError) {\n subscriber.error(this.thrownError);\n }\n else if (this.isStopped) {\n subscriber.complete();\n }\n return subscription;\n };\n ReplaySubject.prototype._getNow = function () {\n return (this.scheduler || queue).now();\n };\n ReplaySubject.prototype._trimBufferThenGetEvents = function () {\n var now = this._getNow();\n var _bufferSize = this._bufferSize;\n var _windowTime = this._windowTime;\n var _events = this._events;\n var eventsCount = _events.length;\n var spliceCount = 0;\n while (spliceCount < eventsCount) {\n if ((now - _events[spliceCount].time) < _windowTime) {\n break;\n }\n spliceCount++;\n }\n if (eventsCount > _bufferSize) {\n spliceCount = Math.max(spliceCount, eventsCount - _bufferSize);\n }\n if (spliceCount > 0) {\n _events.splice(0, spliceCount);\n }\n return _events;\n };\n return ReplaySubject;\n}(Subject));\nexport { ReplaySubject };\nvar ReplayEvent = /*@__PURE__*/ (function () {\n function ReplayEvent(time, value) {\n this.time = time;\n this.value = value;\n }\n return ReplayEvent;\n}());\n//# sourceMappingURL=ReplaySubject.js.map\n","/** PURE_IMPORTS_START _ReplaySubject PURE_IMPORTS_END */\nimport { ReplaySubject } from '../ReplaySubject';\nexport function shareReplay(configOrBufferSize, windowTime, scheduler) {\n var config;\n if (configOrBufferSize && typeof configOrBufferSize === 'object') {\n config = configOrBufferSize;\n }\n else {\n config = {\n bufferSize: configOrBufferSize,\n windowTime: windowTime,\n refCount: false,\n scheduler: scheduler\n };\n }\n return function (source) { return source.lift(shareReplayOperator(config)); };\n}\nfunction shareReplayOperator(_a) {\n var _b = _a.bufferSize, bufferSize = _b === void 0 ? Number.POSITIVE_INFINITY : _b, _c = _a.windowTime, windowTime = _c === void 0 ? Number.POSITIVE_INFINITY : _c, useRefCount = _a.refCount, scheduler = _a.scheduler;\n var subject;\n var refCount = 0;\n var subscription;\n var hasError = false;\n var isComplete = false;\n return function shareReplayOperation(source) {\n refCount++;\n if (!subject || hasError) {\n hasError = false;\n subject = new ReplaySubject(bufferSize, windowTime, scheduler);\n subscription = source.subscribe({\n next: function (value) { subject.next(value); },\n error: function (err) {\n hasError = true;\n subject.error(err);\n },\n complete: function () {\n isComplete = true;\n subject.complete();\n },\n });\n }\n var innerSub = subject.subscribe(this);\n this.add(function () {\n refCount--;\n innerSub.unsubscribe();\n if (subscription && !isComplete && useRefCount && refCount === 0) {\n subscription.unsubscribe();\n subscription = undefined;\n subject = undefined;\n }\n });\n };\n}\n//# sourceMappingURL=shareReplay.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function distinctUntilChanged(compare, keySelector) {\n return function (source) { return source.lift(new DistinctUntilChangedOperator(compare, keySelector)); };\n}\nvar DistinctUntilChangedOperator = /*@__PURE__*/ (function () {\n function DistinctUntilChangedOperator(compare, keySelector) {\n this.compare = compare;\n this.keySelector = keySelector;\n }\n DistinctUntilChangedOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DistinctUntilChangedSubscriber(subscriber, this.compare, this.keySelector));\n };\n return DistinctUntilChangedOperator;\n}());\nvar DistinctUntilChangedSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DistinctUntilChangedSubscriber, _super);\n function DistinctUntilChangedSubscriber(destination, compare, keySelector) {\n var _this = _super.call(this, destination) || this;\n _this.keySelector = keySelector;\n _this.hasKey = false;\n if (typeof compare === 'function') {\n _this.compare = compare;\n }\n return _this;\n }\n DistinctUntilChangedSubscriber.prototype.compare = function (x, y) {\n return x === y;\n };\n DistinctUntilChangedSubscriber.prototype._next = function (value) {\n var key;\n try {\n var keySelector = this.keySelector;\n key = keySelector ? keySelector(value) : value;\n }\n catch (err) {\n return this.destination.error(err);\n }\n var result = false;\n if (this.hasKey) {\n try {\n var compare = this.compare;\n result = compare(this.key, key);\n }\n catch (err) {\n return this.destination.error(err);\n }\n }\n else {\n this.hasKey = true;\n }\n if (!result) {\n this.key = key;\n this.destination.next(value);\n }\n };\n return DistinctUntilChangedSubscriber;\n}(Subscriber));\n//# sourceMappingURL=distinctUntilChanged.js.map\n","/** PURE_IMPORTS_START _distinctUntilChanged PURE_IMPORTS_END */\nimport { distinctUntilChanged } from './distinctUntilChanged';\nexport function distinctUntilKeyChanged(key, compare) {\n return distinctUntilChanged(function (x, y) { return compare ? compare(x[key], y[key]) : x[key] === y[key]; });\n}\n//# sourceMappingURL=distinctUntilKeyChanged.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function filter(predicate, thisArg) {\n return function filterOperatorFunction(source) {\n return source.lift(new FilterOperator(predicate, thisArg));\n };\n}\nvar FilterOperator = /*@__PURE__*/ (function () {\n function FilterOperator(predicate, thisArg) {\n this.predicate = predicate;\n this.thisArg = thisArg;\n }\n FilterOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FilterSubscriber(subscriber, this.predicate, this.thisArg));\n };\n return FilterOperator;\n}());\nvar FilterSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FilterSubscriber, _super);\n function FilterSubscriber(destination, predicate, thisArg) {\n var _this = _super.call(this, destination) || this;\n _this.predicate = predicate;\n _this.thisArg = thisArg;\n _this.count = 0;\n return _this;\n }\n FilterSubscriber.prototype._next = function (value) {\n var result;\n try {\n result = this.predicate.call(this.thisArg, value, this.count++);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n if (result) {\n this.destination.next(value);\n }\n };\n return FilterSubscriber;\n}(Subscriber));\n//# sourceMappingURL=filter.js.map\n","/** PURE_IMPORTS_START _AsyncAction,_AsyncScheduler PURE_IMPORTS_END */\nimport { AsyncAction } from './AsyncAction';\nimport { AsyncScheduler } from './AsyncScheduler';\nexport var async = /*@__PURE__*/ new AsyncScheduler(AsyncAction);\n//# sourceMappingURL=async.js.map\n","/** PURE_IMPORTS_START tslib,_scheduler_async,_util_isDate,_Subscriber,_Notification PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { async } from '../scheduler/async';\nimport { isDate } from '../util/isDate';\nimport { Subscriber } from '../Subscriber';\nimport { Notification } from '../Notification';\nexport function delay(delay, scheduler) {\n if (scheduler === void 0) {\n scheduler = async;\n }\n var absoluteDelay = isDate(delay);\n var delayFor = absoluteDelay ? (+delay - scheduler.now()) : Math.abs(delay);\n return function (source) { return source.lift(new DelayOperator(delayFor, scheduler)); };\n}\nvar DelayOperator = /*@__PURE__*/ (function () {\n function DelayOperator(delay, scheduler) {\n this.delay = delay;\n this.scheduler = scheduler;\n }\n DelayOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new DelaySubscriber(subscriber, this.delay, this.scheduler));\n };\n return DelayOperator;\n}());\nvar DelaySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(DelaySubscriber, _super);\n function DelaySubscriber(destination, delay, scheduler) {\n var _this = _super.call(this, destination) || this;\n _this.delay = delay;\n _this.scheduler = scheduler;\n _this.queue = [];\n _this.active = false;\n _this.errored = false;\n return _this;\n }\n DelaySubscriber.dispatch = function (state) {\n var source = state.source;\n var queue = source.queue;\n var scheduler = state.scheduler;\n var destination = state.destination;\n while (queue.length > 0 && (queue[0].time - scheduler.now()) <= 0) {\n queue.shift().notification.observe(destination);\n }\n if (queue.length > 0) {\n var delay_1 = Math.max(0, queue[0].time - scheduler.now());\n this.schedule(state, delay_1);\n }\n else {\n this.unsubscribe();\n source.active = false;\n }\n };\n DelaySubscriber.prototype._schedule = function (scheduler) {\n this.active = true;\n var destination = this.destination;\n destination.add(scheduler.schedule(DelaySubscriber.dispatch, this.delay, {\n source: this, destination: this.destination, scheduler: scheduler\n }));\n };\n DelaySubscriber.prototype.scheduleNotification = function (notification) {\n if (this.errored === true) {\n return;\n }\n var scheduler = this.scheduler;\n var message = new DelayMessage(scheduler.now() + this.delay, notification);\n this.queue.push(message);\n if (this.active === false) {\n this._schedule(scheduler);\n }\n };\n DelaySubscriber.prototype._next = function (value) {\n this.scheduleNotification(Notification.createNext(value));\n };\n DelaySubscriber.prototype._error = function (err) {\n this.errored = true;\n this.queue = [];\n this.destination.error(err);\n this.unsubscribe();\n };\n DelaySubscriber.prototype._complete = function () {\n this.scheduleNotification(Notification.createComplete());\n this.unsubscribe();\n };\n return DelaySubscriber;\n}(Subscriber));\nvar DelayMessage = /*@__PURE__*/ (function () {\n function DelayMessage(time, notification) {\n this.time = time;\n this.notification = notification;\n }\n return DelayMessage;\n}());\n//# sourceMappingURL=delay.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nexport function isDate(value) {\n return value instanceof Date && !isNaN(+value);\n}\n//# sourceMappingURL=isDate.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_noop,_util_isFunction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { noop } from '../util/noop';\nimport { isFunction } from '../util/isFunction';\nexport function tap(nextOrObserver, error, complete) {\n return function tapOperatorFunction(source) {\n return source.lift(new DoOperator(nextOrObserver, error, complete));\n };\n}\nvar DoOperator = /*@__PURE__*/ (function () {\n function DoOperator(nextOrObserver, error, complete) {\n this.nextOrObserver = nextOrObserver;\n this.error = error;\n this.complete = complete;\n }\n DoOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TapSubscriber(subscriber, this.nextOrObserver, this.error, this.complete));\n };\n return DoOperator;\n}());\nvar TapSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TapSubscriber, _super);\n function TapSubscriber(destination, observerOrNext, error, complete) {\n var _this = _super.call(this, destination) || this;\n _this._tapNext = noop;\n _this._tapError = noop;\n _this._tapComplete = noop;\n _this._tapError = error || noop;\n _this._tapComplete = complete || noop;\n if (isFunction(observerOrNext)) {\n _this._context = _this;\n _this._tapNext = observerOrNext;\n }\n else if (observerOrNext) {\n _this._context = observerOrNext;\n _this._tapNext = observerOrNext.next || noop;\n _this._tapError = observerOrNext.error || noop;\n _this._tapComplete = observerOrNext.complete || noop;\n }\n return _this;\n }\n TapSubscriber.prototype._next = function (value) {\n try {\n this._tapNext.call(this._context, value);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(value);\n };\n TapSubscriber.prototype._error = function (err) {\n try {\n this._tapError.call(this._context, err);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.error(err);\n };\n TapSubscriber.prototype._complete = function () {\n try {\n this._tapComplete.call(this._context);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n return this.destination.complete();\n };\n return TapSubscriber;\n}(Subscriber));\n//# sourceMappingURL=tap.js.map\n","/** PURE_IMPORTS_START _switchMap PURE_IMPORTS_END */\nimport { switchMap } from './switchMap';\nexport function switchMapTo(innerObservable, resultSelector) {\n return resultSelector ? switchMap(function () { return innerObservable; }, resultSelector) : switchMap(function () { return innerObservable; });\n}\n//# sourceMappingURL=switchMapTo.js.map\n","/** PURE_IMPORTS_START tslib,_.._util_root,_.._Observable,_.._Subscriber,_.._operators_map PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { root } from '../../util/root';\nimport { Observable } from '../../Observable';\nimport { Subscriber } from '../../Subscriber';\nimport { map } from '../../operators/map';\nfunction getCORSRequest() {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n }\n else if (!!root.XDomainRequest) {\n return new root.XDomainRequest();\n }\n else {\n throw new Error('CORS is not supported by your browser');\n }\n}\nfunction getXMLHttpRequest() {\n if (root.XMLHttpRequest) {\n return new root.XMLHttpRequest();\n }\n else {\n var progId = void 0;\n try {\n var progIds = ['Msxml2.XMLHTTP', 'Microsoft.XMLHTTP', 'Msxml2.XMLHTTP.4.0'];\n for (var i = 0; i < 3; i++) {\n try {\n progId = progIds[i];\n if (new root.ActiveXObject(progId)) {\n break;\n }\n }\n catch (e) {\n }\n }\n return new root.ActiveXObject(progId);\n }\n catch (e) {\n throw new Error('XMLHttpRequest is not supported by your browser');\n }\n }\n}\nexport function ajaxGet(url, headers) {\n if (headers === void 0) {\n headers = null;\n }\n return new AjaxObservable({ method: 'GET', url: url, headers: headers });\n}\nexport function ajaxPost(url, body, headers) {\n return new AjaxObservable({ method: 'POST', url: url, body: body, headers: headers });\n}\nexport function ajaxDelete(url, headers) {\n return new AjaxObservable({ method: 'DELETE', url: url, headers: headers });\n}\nexport function ajaxPut(url, body, headers) {\n return new AjaxObservable({ method: 'PUT', url: url, body: body, headers: headers });\n}\nexport function ajaxPatch(url, body, headers) {\n return new AjaxObservable({ method: 'PATCH', url: url, body: body, headers: headers });\n}\nvar mapResponse = /*@__PURE__*/ map(function (x, index) { return x.response; });\nexport function ajaxGetJSON(url, headers) {\n return mapResponse(new AjaxObservable({\n method: 'GET',\n url: url,\n responseType: 'json',\n headers: headers\n }));\n}\nvar AjaxObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AjaxObservable, _super);\n function AjaxObservable(urlOrRequest) {\n var _this = _super.call(this) || this;\n var request = {\n async: true,\n createXHR: function () {\n return this.crossDomain ? getCORSRequest() : getXMLHttpRequest();\n },\n crossDomain: true,\n withCredentials: false,\n headers: {},\n method: 'GET',\n responseType: 'json',\n timeout: 0\n };\n if (typeof urlOrRequest === 'string') {\n request.url = urlOrRequest;\n }\n else {\n for (var prop in urlOrRequest) {\n if (urlOrRequest.hasOwnProperty(prop)) {\n request[prop] = urlOrRequest[prop];\n }\n }\n }\n _this.request = request;\n return _this;\n }\n AjaxObservable.prototype._subscribe = function (subscriber) {\n return new AjaxSubscriber(subscriber, this.request);\n };\n AjaxObservable.create = (function () {\n var create = function (urlOrRequest) {\n return new AjaxObservable(urlOrRequest);\n };\n create.get = ajaxGet;\n create.post = ajaxPost;\n create.delete = ajaxDelete;\n create.put = ajaxPut;\n create.patch = ajaxPatch;\n create.getJSON = ajaxGetJSON;\n return create;\n })();\n return AjaxObservable;\n}(Observable));\nexport { AjaxObservable };\nvar AjaxSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AjaxSubscriber, _super);\n function AjaxSubscriber(destination, request) {\n var _this = _super.call(this, destination) || this;\n _this.request = request;\n _this.done = false;\n var headers = request.headers = request.headers || {};\n if (!request.crossDomain && !_this.getHeader(headers, 'X-Requested-With')) {\n headers['X-Requested-With'] = 'XMLHttpRequest';\n }\n var contentTypeHeader = _this.getHeader(headers, 'Content-Type');\n if (!contentTypeHeader && !(root.FormData && request.body instanceof root.FormData) && typeof request.body !== 'undefined') {\n headers['Content-Type'] = 'application/x-www-form-urlencoded; charset=UTF-8';\n }\n request.body = _this.serializeBody(request.body, _this.getHeader(request.headers, 'Content-Type'));\n _this.send();\n return _this;\n }\n AjaxSubscriber.prototype.next = function (e) {\n this.done = true;\n var _a = this, xhr = _a.xhr, request = _a.request, destination = _a.destination;\n var result;\n try {\n result = new AjaxResponse(e, xhr, request);\n }\n catch (err) {\n return destination.error(err);\n }\n destination.next(result);\n };\n AjaxSubscriber.prototype.send = function () {\n var _a = this, request = _a.request, _b = _a.request, user = _b.user, method = _b.method, url = _b.url, async = _b.async, password = _b.password, headers = _b.headers, body = _b.body;\n try {\n var xhr = this.xhr = request.createXHR();\n this.setupEvents(xhr, request);\n if (user) {\n xhr.open(method, url, async, user, password);\n }\n else {\n xhr.open(method, url, async);\n }\n if (async) {\n xhr.timeout = request.timeout;\n xhr.responseType = request.responseType;\n }\n if ('withCredentials' in xhr) {\n xhr.withCredentials = !!request.withCredentials;\n }\n this.setHeaders(xhr, headers);\n if (body) {\n xhr.send(body);\n }\n else {\n xhr.send();\n }\n }\n catch (err) {\n this.error(err);\n }\n };\n AjaxSubscriber.prototype.serializeBody = function (body, contentType) {\n if (!body || typeof body === 'string') {\n return body;\n }\n else if (root.FormData && body instanceof root.FormData) {\n return body;\n }\n if (contentType) {\n var splitIndex = contentType.indexOf(';');\n if (splitIndex !== -1) {\n contentType = contentType.substring(0, splitIndex);\n }\n }\n switch (contentType) {\n case 'application/x-www-form-urlencoded':\n return Object.keys(body).map(function (key) { return encodeURIComponent(key) + \"=\" + encodeURIComponent(body[key]); }).join('&');\n case 'application/json':\n return JSON.stringify(body);\n default:\n return body;\n }\n };\n AjaxSubscriber.prototype.setHeaders = function (xhr, headers) {\n for (var key in headers) {\n if (headers.hasOwnProperty(key)) {\n xhr.setRequestHeader(key, headers[key]);\n }\n }\n };\n AjaxSubscriber.prototype.getHeader = function (headers, headerName) {\n for (var key in headers) {\n if (key.toLowerCase() === headerName.toLowerCase()) {\n return headers[key];\n }\n }\n return undefined;\n };\n AjaxSubscriber.prototype.setupEvents = function (xhr, request) {\n var progressSubscriber = request.progressSubscriber;\n function xhrTimeout(e) {\n var _a = xhrTimeout, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n var error;\n try {\n error = new AjaxTimeoutError(this, request);\n }\n catch (err) {\n error = err;\n }\n subscriber.error(error);\n }\n xhr.ontimeout = xhrTimeout;\n xhrTimeout.request = request;\n xhrTimeout.subscriber = this;\n xhrTimeout.progressSubscriber = progressSubscriber;\n if (xhr.upload && 'withCredentials' in xhr) {\n if (progressSubscriber) {\n var xhrProgress_1;\n xhrProgress_1 = function (e) {\n var progressSubscriber = xhrProgress_1.progressSubscriber;\n progressSubscriber.next(e);\n };\n if (root.XDomainRequest) {\n xhr.onprogress = xhrProgress_1;\n }\n else {\n xhr.upload.onprogress = xhrProgress_1;\n }\n xhrProgress_1.progressSubscriber = progressSubscriber;\n }\n var xhrError_1;\n xhrError_1 = function (e) {\n var _a = xhrError_1, progressSubscriber = _a.progressSubscriber, subscriber = _a.subscriber, request = _a.request;\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n var error;\n try {\n error = new AjaxError('ajax error', this, request);\n }\n catch (err) {\n error = err;\n }\n subscriber.error(error);\n };\n xhr.onerror = xhrError_1;\n xhrError_1.request = request;\n xhrError_1.subscriber = this;\n xhrError_1.progressSubscriber = progressSubscriber;\n }\n function xhrReadyStateChange(e) {\n return;\n }\n xhr.onreadystatechange = xhrReadyStateChange;\n xhrReadyStateChange.subscriber = this;\n xhrReadyStateChange.progressSubscriber = progressSubscriber;\n xhrReadyStateChange.request = request;\n function xhrLoad(e) {\n var _a = xhrLoad, subscriber = _a.subscriber, progressSubscriber = _a.progressSubscriber, request = _a.request;\n if (this.readyState === 4) {\n var status_1 = this.status === 1223 ? 204 : this.status;\n var response = (this.responseType === 'text' ? (this.response || this.responseText) : this.response);\n if (status_1 === 0) {\n status_1 = response ? 200 : 0;\n }\n if (status_1 < 400) {\n if (progressSubscriber) {\n progressSubscriber.complete();\n }\n subscriber.next(e);\n subscriber.complete();\n }\n else {\n if (progressSubscriber) {\n progressSubscriber.error(e);\n }\n var error = void 0;\n try {\n error = new AjaxError('ajax error ' + status_1, this, request);\n }\n catch (err) {\n error = err;\n }\n subscriber.error(error);\n }\n }\n }\n xhr.onload = xhrLoad;\n xhrLoad.subscriber = this;\n xhrLoad.progressSubscriber = progressSubscriber;\n xhrLoad.request = request;\n };\n AjaxSubscriber.prototype.unsubscribe = function () {\n var _a = this, done = _a.done, xhr = _a.xhr;\n if (!done && xhr && xhr.readyState !== 4 && typeof xhr.abort === 'function') {\n xhr.abort();\n }\n _super.prototype.unsubscribe.call(this);\n };\n return AjaxSubscriber;\n}(Subscriber));\nexport { AjaxSubscriber };\nvar AjaxResponse = /*@__PURE__*/ (function () {\n function AjaxResponse(originalEvent, xhr, request) {\n this.originalEvent = originalEvent;\n this.xhr = xhr;\n this.request = request;\n this.status = xhr.status;\n this.responseType = xhr.responseType || request.responseType;\n this.response = parseXhrResponse(this.responseType, xhr);\n }\n return AjaxResponse;\n}());\nexport { AjaxResponse };\nvar AjaxErrorImpl = /*@__PURE__*/ (function () {\n function AjaxErrorImpl(message, xhr, request) {\n Error.call(this);\n this.message = message;\n this.name = 'AjaxError';\n this.xhr = xhr;\n this.request = request;\n this.status = xhr.status;\n this.responseType = xhr.responseType || request.responseType;\n this.response = parseXhrResponse(this.responseType, xhr);\n return this;\n }\n AjaxErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return AjaxErrorImpl;\n})();\nexport var AjaxError = AjaxErrorImpl;\nfunction parseJson(xhr) {\n if ('response' in xhr) {\n return xhr.responseType ? xhr.response : JSON.parse(xhr.response || xhr.responseText || 'null');\n }\n else {\n return JSON.parse(xhr.responseText || 'null');\n }\n}\nfunction parseXhrResponse(responseType, xhr) {\n switch (responseType) {\n case 'json':\n return parseJson(xhr);\n case 'xml':\n return xhr.responseXML;\n case 'text':\n default:\n return ('response' in xhr) ? xhr.response : xhr.responseText;\n }\n}\nfunction AjaxTimeoutErrorImpl(xhr, request) {\n AjaxError.call(this, 'ajax timeout', xhr, request);\n this.name = 'AjaxTimeoutError';\n return this;\n}\nexport var AjaxTimeoutError = AjaxTimeoutErrorImpl;\n//# sourceMappingURL=AjaxObservable.js.map\n","/** PURE_IMPORTS_START _AjaxObservable PURE_IMPORTS_END */\nimport { AjaxObservable } from './AjaxObservable';\nexport var ajax = /*@__PURE__*/ (function () { return AjaxObservable.create; })();\n//# sourceMappingURL=ajax.js.map\n","export default function _has(prop, obj) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}","import _has from './_has.js';\n\nvar toString = Object.prototype.toString;\nvar _isArguments = /*#__PURE__*/function () {\n return toString.call(arguments) === '[object Arguments]' ? function _isArguments(x) {\n return toString.call(x) === '[object Arguments]';\n } : function _isArguments(x) {\n return _has('callee', x);\n };\n}();\n\nexport default _isArguments;","import _curry1 from './internal/_curry1.js';\nimport _has from './internal/_has.js';\nimport _isArguments from './internal/_isArguments.js';\n\n// cover IE < 9 keys issues\nvar hasEnumBug = ! /*#__PURE__*/{ toString: null }.propertyIsEnumerable('toString');\nvar nonEnumerableProps = ['constructor', 'valueOf', 'isPrototypeOf', 'toString', 'propertyIsEnumerable', 'hasOwnProperty', 'toLocaleString'];\n// Safari bug\nvar hasArgsEnumBug = /*#__PURE__*/function () {\n 'use strict';\n\n return arguments.propertyIsEnumerable('length');\n}();\n\nvar contains = function contains(list, item) {\n var idx = 0;\n while (idx < list.length) {\n if (list[idx] === item) {\n return true;\n }\n idx += 1;\n }\n return false;\n};\n\n/**\n * Returns a list containing the names of all the enumerable own properties of\n * the supplied object.\n * Note that the order of the output array is not guaranteed to be consistent\n * across different JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [k]\n * @param {Object} obj The object to extract properties from\n * @return {Array} An array of the object's own properties.\n * @see R.keysIn, R.values\n * @example\n *\n * R.keys({a: 1, b: 2, c: 3}); //=> ['a', 'b', 'c']\n */\nvar keys = typeof Object.keys === 'function' && !hasArgsEnumBug ? /*#__PURE__*/_curry1(function keys(obj) {\n return Object(obj) !== obj ? [] : Object.keys(obj);\n}) : /*#__PURE__*/_curry1(function keys(obj) {\n if (Object(obj) !== obj) {\n return [];\n }\n var prop, nIdx;\n var ks = [];\n var checkArgsLength = hasArgsEnumBug && _isArguments(obj);\n for (prop in obj) {\n if (_has(prop, obj) && (!checkArgsLength || prop !== 'length')) {\n ks[ks.length] = prop;\n }\n }\n if (hasEnumBug) {\n nIdx = nonEnumerableProps.length - 1;\n while (nIdx >= 0) {\n prop = nonEnumerableProps[nIdx];\n if (_has(prop, obj) && !contains(ks, prop)) {\n ks[ks.length] = prop;\n }\n nIdx -= 1;\n }\n }\n return ks;\n});\nexport default keys;","/** PURE_IMPORTS_START _Observable,_util_noop PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { noop } from '../util/noop';\nexport var NEVER = /*@__PURE__*/ new Observable(noop);\nexport function never() {\n return NEVER;\n}\n//# sourceMappingURL=never.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function scan(accumulator, seed) {\n var hasSeed = false;\n if (arguments.length >= 2) {\n hasSeed = true;\n }\n return function scanOperatorFunction(source) {\n return source.lift(new ScanOperator(accumulator, seed, hasSeed));\n };\n}\nvar ScanOperator = /*@__PURE__*/ (function () {\n function ScanOperator(accumulator, seed, hasSeed) {\n if (hasSeed === void 0) {\n hasSeed = false;\n }\n this.accumulator = accumulator;\n this.seed = seed;\n this.hasSeed = hasSeed;\n }\n ScanOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ScanSubscriber(subscriber, this.accumulator, this.seed, this.hasSeed));\n };\n return ScanOperator;\n}());\nvar ScanSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ScanSubscriber, _super);\n function ScanSubscriber(destination, accumulator, _seed, hasSeed) {\n var _this = _super.call(this, destination) || this;\n _this.accumulator = accumulator;\n _this._seed = _seed;\n _this.hasSeed = hasSeed;\n _this.index = 0;\n return _this;\n }\n Object.defineProperty(ScanSubscriber.prototype, \"seed\", {\n get: function () {\n return this._seed;\n },\n set: function (value) {\n this.hasSeed = true;\n this._seed = value;\n },\n enumerable: true,\n configurable: true\n });\n ScanSubscriber.prototype._next = function (value) {\n if (!this.hasSeed) {\n this.seed = value;\n this.destination.next(value);\n }\n else {\n return this._tryNext(value);\n }\n };\n ScanSubscriber.prototype._tryNext = function (value) {\n var index = this.index++;\n var result;\n try {\n result = this.accumulator(this.seed, value, index);\n }\n catch (err) {\n this.destination.error(err);\n }\n this.seed = result;\n this.destination.next(result);\n };\n return ScanSubscriber;\n}(Subscriber));\n//# sourceMappingURL=scan.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Retrieve an element matching the query selector\n *\n * @template T - Element type\n *\n * @param selector - Query selector\n * @param node - Node of reference\n *\n * @return Element\n */\nexport function getElement(\n selector: string, node: ParentNode = document\n): T | undefined {\n return node.querySelector(selector) || undefined\n}\n\n/**\n * Retrieve all elements matching the query selector\n *\n * @template T - Element type\n *\n * @param selector - Query selector\n * @param node - Node of reference\n *\n * @return Elements\n */\nexport function getElements(\n selector: string, node: ParentNode = document\n): T[] {\n return Array.from(node.querySelectorAll(selector))\n}\n","/** PURE_IMPORTS_START tslib,_util_isScheduler,_util_isArray,_OuterSubscriber,_util_subscribeToResult,_fromArray PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { isScheduler } from '../util/isScheduler';\nimport { isArray } from '../util/isArray';\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nimport { fromArray } from './fromArray';\nvar NONE = {};\nexport function combineLatest() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n var resultSelector = null;\n var scheduler = null;\n if (isScheduler(observables[observables.length - 1])) {\n scheduler = observables.pop();\n }\n if (typeof observables[observables.length - 1] === 'function') {\n resultSelector = observables.pop();\n }\n if (observables.length === 1 && isArray(observables[0])) {\n observables = observables[0];\n }\n return fromArray(observables, scheduler).lift(new CombineLatestOperator(resultSelector));\n}\nvar CombineLatestOperator = /*@__PURE__*/ (function () {\n function CombineLatestOperator(resultSelector) {\n this.resultSelector = resultSelector;\n }\n CombineLatestOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new CombineLatestSubscriber(subscriber, this.resultSelector));\n };\n return CombineLatestOperator;\n}());\nexport { CombineLatestOperator };\nvar CombineLatestSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(CombineLatestSubscriber, _super);\n function CombineLatestSubscriber(destination, resultSelector) {\n var _this = _super.call(this, destination) || this;\n _this.resultSelector = resultSelector;\n _this.active = 0;\n _this.values = [];\n _this.observables = [];\n return _this;\n }\n CombineLatestSubscriber.prototype._next = function (observable) {\n this.values.push(NONE);\n this.observables.push(observable);\n };\n CombineLatestSubscriber.prototype._complete = function () {\n var observables = this.observables;\n var len = observables.length;\n if (len === 0) {\n this.destination.complete();\n }\n else {\n this.active = len;\n this.toRespond = len;\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n this.add(subscribeToResult(this, observable, observable, i));\n }\n }\n };\n CombineLatestSubscriber.prototype.notifyComplete = function (unused) {\n if ((this.active -= 1) === 0) {\n this.destination.complete();\n }\n };\n CombineLatestSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n var values = this.values;\n var oldVal = values[outerIndex];\n var toRespond = !this.toRespond\n ? 0\n : oldVal === NONE ? --this.toRespond : this.toRespond;\n values[outerIndex] = innerValue;\n if (toRespond === 0) {\n if (this.resultSelector) {\n this._tryResultSelector(values);\n }\n else {\n this.destination.next(values.slice());\n }\n }\n };\n CombineLatestSubscriber.prototype._tryResultSelector = function (values) {\n var result;\n try {\n result = this.resultSelector.apply(this, values);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return CombineLatestSubscriber;\n}(OuterSubscriber));\nexport { CombineLatestSubscriber };\n//# sourceMappingURL=combineLatest.js.map\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport function takeUntil(notifier) {\n return function (source) { return source.lift(new TakeUntilOperator(notifier)); };\n}\nvar TakeUntilOperator = /*@__PURE__*/ (function () {\n function TakeUntilOperator(notifier) {\n this.notifier = notifier;\n }\n TakeUntilOperator.prototype.call = function (subscriber, source) {\n var takeUntilSubscriber = new TakeUntilSubscriber(subscriber);\n var notifierSubscription = subscribeToResult(takeUntilSubscriber, this.notifier);\n if (notifierSubscription && !takeUntilSubscriber.seenValue) {\n takeUntilSubscriber.add(notifierSubscription);\n return source.subscribe(takeUntilSubscriber);\n }\n return takeUntilSubscriber;\n };\n return TakeUntilOperator;\n}());\nvar TakeUntilSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeUntilSubscriber, _super);\n function TakeUntilSubscriber(destination) {\n var _this = _super.call(this, destination) || this;\n _this.seenValue = false;\n return _this;\n }\n TakeUntilSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.seenValue = true;\n this.complete();\n };\n TakeUntilSubscriber.prototype.notifyComplete = function () {\n };\n return TakeUntilSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=takeUntil.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n EMPTY,\n Observable,\n OperatorFunction,\n combineLatest,\n of,\n pipe\n} from \"rxjs\"\nimport {\n filter,\n map,\n switchMap,\n takeUntil\n} from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Invert boolean value of source observable\n *\n * @param toggle$ - Toggle observable\n *\n * @return Inverted toggle observable\n */\nexport function not(\n toggle$: Observable\n): Observable {\n return toggle$\n .pipe(\n map(active => !active)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Toggle switch map with another observable\n *\n * @template T - Source value type\n * @template U - Target value type\n *\n * @param toggle$ - Toggle observable\n * @param project - Projection\n *\n * @return Operator function\n */\nexport function switchMapIf(\n toggle$: Observable, project: (value: T) => Observable\n): OperatorFunction {\n const begin$ = toggle$.pipe(filter(value => value))\n const end$ = toggle$.pipe(filter(value => !value))\n return pipe(\n switchMap(value => combineLatest([of(value), begin$])),\n switchMap(([value, active]) => active\n ? project(value)\n .pipe(\n takeUntil(end$)\n )\n : EMPTY\n )\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { keys } from \"ramda\"\nimport { NEVER, Observable, OperatorFunction, merge, of, pipe } from \"rxjs\"\nimport { map, scan, shareReplay, switchMap } from \"rxjs/operators\"\n\nimport { getElement } from \"../../../utilities\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Component names\n */\nexport type Component =\n | \"header\" /* Header */\n | \"title\" /* Header title */\n | \"search\" /* Search */\n | \"query\" /* Search input */\n | \"reset\" /* Search reset */\n | \"result\" /* Search results */\n | \"container\" /* Container */\n | \"main\" /* Main area */\n | \"hero\" /* Hero */\n | \"tabs\" /* Tabs */\n | \"navigation\" /* Navigation */\n | \"toc\" /* Table of contents */\n\n/**\n * Component map\n */\nexport type ComponentMap = {\n [P in Component]?: HTMLElement\n}\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n load$: Observable /* Document observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch component map\n *\n * This function returns an observable that will maintain bindings to the given\n * components in-between document switches and update the document in-place.\n *\n * @param names - Component names\n * @param options - Options\n *\n * @return Component map observable\n */\nexport function watchComponentMap(\n names: Component[], { load$ }: Options\n): Observable {\n const components$ = load$\n .pipe(\n\n /* Build component map */\n map(document => names.reduce((components, name) => {\n const el = getElement(`[data-md-component=${name}]`, document)\n return {\n ...components,\n ...typeof el !== \"undefined\" ? { [name]: el } : {}\n }\n }, {})),\n\n /* Re-compute component map on document switch */\n scan((prev, next) => {\n for (const name of keys(prev)) {\n switch (name) {\n\n /* Top-level components: update */\n case \"title\":\n case \"container\":\n if (name in prev && typeof prev[name] !== \"undefined\") {\n prev[name]!.replaceWith(next[name]!)\n prev[name] = next[name]\n }\n break\n\n /* All other components: rebind */\n default:\n prev[name] = getElement(`[data-md-component=${name}]`)\n }\n }\n return prev\n })\n )\n\n /* Return component map as hot observable */\n return components$\n .pipe(\n shareReplay(1)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Switch to component\n *\n * @template T - Element type\n *\n * @param name - Component name\n *\n * @return Operator function\n */\nexport function switchComponent(\n name: Component\n): OperatorFunction {\n return pipe(\n switchMap(components => {\n return typeof components[name] !== \"undefined\"\n ? of(components[name] as T)\n : NEVER\n })\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, defer, of } from \"rxjs\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Header\n */\nexport interface Header {\n sticky: boolean /* Header stickyness */\n height: number /* Header visible height */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch header\n *\n * The header is wrapped in an observable to pave the way for auto-hiding or\n * other dynamic behaviors that may be implemented later on.\n *\n * @param el - Header element\n *\n * @return Header observable\n */\nexport function watchHeader(\n el: HTMLElement\n): Observable
{\n return defer(() => {\n const sticky = getComputedStyle(el)\n .getPropertyValue(\"position\") === \"fixed\"\n\n /* Return header as hot observable */\n return of({\n sticky,\n height: sticky ? el.offsetHeight : 0\n })\n })\n}\n","/** PURE_IMPORTS_START _Observable,_from,_empty PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { from } from './from';\nimport { empty } from './empty';\nexport function defer(observableFactory) {\n return new Observable(function (subscriber) {\n var input;\n try {\n input = observableFactory();\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n var source = input ? from(input) : empty();\n return source.subscribe(subscriber);\n });\n}\n//# sourceMappingURL=defer.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, combineLatest } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n shareReplay,\n switchMapTo\n} from \"rxjs/operators\"\n\nimport { ViewportOffset, ViewportSize } from \"../../../../ui\"\nimport { Header } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n size$: Observable /* Viewport size observable */\n offset$: Observable /* Viewport offset observable */\n header$: Observable
/* Header observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch viewport offset relative to an element's top\n *\n * This function returns an observable that computes the relative offset to the\n * top of the given element based on the current viewport offset.\n *\n * @param el - Element\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchTopOffset(\n el: HTMLElement, { size$, offset$, header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = size$\n .pipe(\n switchMapTo(header$),\n map(({ height }) => el.offsetTop - height),\n distinctUntilChanged()\n )\n\n /* Compute relative offset and return as hot observable */\n return combineLatest([offset$, adjust$])\n .pipe(\n map(([{ x, y }, adjust]) => ({ x, y: y - adjust })),\n shareReplay(1)\n )\n}\n\n/**\n * Watch viewport offset relative to an element's bottom\n *\n * This function returns an observable that computes the relative offset to the\n * bottom of the given element based on the current viewport offset.\n *\n * @param el - Element\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchBottomOffset(\n el: HTMLElement, { size$, offset$, header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = size$\n .pipe(\n switchMapTo(header$),\n map(({ height }) => el.offsetTop + el.offsetHeight - height),\n distinctUntilChanged()\n )\n\n /* Compute relative offset and return as hot observable */\n return combineLatest([offset$, adjust$])\n .pipe(\n map(([{ x, y }, adjust]) => ({ x, y: y - adjust })),\n shareReplay(1)\n )\n}\n","/** PURE_IMPORTS_START tslib,_AsyncAction PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncAction } from './AsyncAction';\nvar AnimationFrameAction = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnimationFrameAction, _super);\n function AnimationFrameAction(scheduler, work) {\n var _this = _super.call(this, scheduler, work) || this;\n _this.scheduler = scheduler;\n _this.work = work;\n return _this;\n }\n AnimationFrameAction.prototype.requestAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if (delay !== null && delay > 0) {\n return _super.prototype.requestAsyncId.call(this, scheduler, id, delay);\n }\n scheduler.actions.push(this);\n return scheduler.scheduled || (scheduler.scheduled = requestAnimationFrame(function () { return scheduler.flush(null); }));\n };\n AnimationFrameAction.prototype.recycleAsyncId = function (scheduler, id, delay) {\n if (delay === void 0) {\n delay = 0;\n }\n if ((delay !== null && delay > 0) || (delay === null && this.delay > 0)) {\n return _super.prototype.recycleAsyncId.call(this, scheduler, id, delay);\n }\n if (scheduler.actions.length === 0) {\n cancelAnimationFrame(id);\n scheduler.scheduled = undefined;\n }\n return undefined;\n };\n return AnimationFrameAction;\n}(AsyncAction));\nexport { AnimationFrameAction };\n//# sourceMappingURL=AnimationFrameAction.js.map\n","/** PURE_IMPORTS_START _AnimationFrameAction,_AnimationFrameScheduler PURE_IMPORTS_END */\nimport { AnimationFrameAction } from './AnimationFrameAction';\nimport { AnimationFrameScheduler } from './AnimationFrameScheduler';\nexport var animationFrame = /*@__PURE__*/ new AnimationFrameScheduler(AnimationFrameAction);\n//# sourceMappingURL=animationFrame.js.map\n","/** PURE_IMPORTS_START tslib,_AsyncScheduler PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { AsyncScheduler } from './AsyncScheduler';\nvar AnimationFrameScheduler = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(AnimationFrameScheduler, _super);\n function AnimationFrameScheduler() {\n return _super !== null && _super.apply(this, arguments) || this;\n }\n AnimationFrameScheduler.prototype.flush = function (action) {\n this.active = true;\n this.scheduled = undefined;\n var actions = this.actions;\n var error;\n var index = -1;\n var count = actions.length;\n action = action || actions.shift();\n do {\n if (error = action.execute(action.state, action.delay)) {\n break;\n }\n } while (++index < count && (action = actions.shift()));\n this.active = false;\n if (error) {\n while (++index < count && (action = actions.shift())) {\n action.unsubscribe();\n }\n throw error;\n }\n };\n return AnimationFrameScheduler;\n}(AsyncScheduler));\nexport { AnimationFrameScheduler };\n//# sourceMappingURL=AnimationFrameScheduler.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_Subscription PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nexport function finalize(callback) {\n return function (source) { return source.lift(new FinallyOperator(callback)); };\n}\nvar FinallyOperator = /*@__PURE__*/ (function () {\n function FinallyOperator(callback) {\n this.callback = callback;\n }\n FinallyOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new FinallySubscriber(subscriber, this.callback));\n };\n return FinallyOperator;\n}());\nvar FinallySubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(FinallySubscriber, _super);\n function FinallySubscriber(destination, callback) {\n var _this = _super.call(this, destination) || this;\n _this.add(new Subscription(callback));\n return _this;\n }\n return FinallySubscriber;\n}(Subscriber));\n//# sourceMappingURL=finalize.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { OperatorFunction, animationFrameScheduler, pipe } from \"rxjs\"\nimport {\n distinctUntilChanged,\n finalize,\n map,\n observeOn,\n tap\n} from \"rxjs/operators\"\n\nimport { ViewportOffset } from \"../../../ui\"\nimport { resetHidden, setHidden } from \"../../action\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint hideable from source observable\n *\n * @param el - Hideable element\n * @param offset - Additional offset\n *\n * @return Operator function\n */\nexport function paintHidden(\n el: HTMLElement, offset: number = 0\n): OperatorFunction {\n return pipe(\n map(({ y }) => y >= offset),\n distinctUntilChanged(),\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(value => {\n setHidden(el, value)\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n resetHidden(el)\n })\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set hidden\n *\n * @param el - Hideable element\n * @param value - Whether the element is hidden\n */\nexport function setHidden(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"hidden\" : \"\")\n}\n\n/**\n * Reset hidden\n *\n * @param el - Hideable element\n */\nexport function resetHidden(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function mapTo(value) {\n return function (source) { return source.lift(new MapToOperator(value)); };\n}\nvar MapToOperator = /*@__PURE__*/ (function () {\n function MapToOperator(value) {\n this.value = value;\n }\n MapToOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new MapToSubscriber(subscriber, this.value));\n };\n return MapToOperator;\n}());\nvar MapToSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(MapToSubscriber, _super);\n function MapToSubscriber(destination, value) {\n var _this = _super.call(this, destination) || this;\n _this.value = value;\n return _this;\n }\n MapToSubscriber.prototype._next = function (x) {\n this.destination.next(this.value);\n };\n return MapToSubscriber;\n}(Subscriber));\n//# sourceMappingURL=mapTo.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent } from \"rxjs\"\nimport { mapTo } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch search reset\n *\n * @param el - Search reset element\n *\n * @return Search reset observable\n */\nexport function watchSearchReset(\n el: HTMLElement\n): Observable {\n return fromEvent(el, \"click\")\n .pipe(\n mapTo(true)\n )\n}\n","import _curry1 from './_curry1.js';\nimport _isPlaceholder from './_isPlaceholder.js';\n\n/**\n * Optimized internal two-arity curry function.\n *\n * @private\n * @category Function\n * @param {Function} fn The function to curry.\n * @return {Function} The curried function.\n */\nexport default function _curry2(fn) {\n return function f2(a, b) {\n switch (arguments.length) {\n case 0:\n return f2;\n case 1:\n return _isPlaceholder(a) ? f2 : _curry1(function (_b) {\n return fn(a, _b);\n });\n default:\n return _isPlaceholder(a) && _isPlaceholder(b) ? f2 : _isPlaceholder(a) ? _curry1(function (_a) {\n return fn(_a, b);\n }) : _isPlaceholder(b) ? _curry1(function (_b) {\n return fn(a, _b);\n }) : fn(a, b);\n }\n };\n}","export default function _arrayFromIterator(iter) {\n var list = [];\n var next;\n while (!(next = iter.next()).done) {\n list.push(next.value);\n }\n return list;\n}","export default function _includesWith(pred, x, list) {\n var idx = 0;\n var len = list.length;\n\n while (idx < len) {\n if (pred(x, list[idx])) {\n return true;\n }\n idx += 1;\n }\n return false;\n}","// Based on https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\nfunction _objectIs(a, b) {\n // SameValue algorithm\n if (a === b) {\n // Steps 1-5, 7-10\n // Steps 6.b-6.e: +0 != -0\n return a !== 0 || 1 / a === 1 / b;\n } else {\n // Step 6.a: NaN == NaN\n return a !== a && b !== b;\n }\n}\n\nexport default typeof Object.is === 'function' ? Object.is : _objectIs;","import _curry1 from './internal/_curry1.js';\n\n/**\n * Gives a single-word string description of the (native) type of a value,\n * returning such answers as 'Object', 'Number', 'Array', or 'Null'. Does not\n * attempt to distinguish user Object types any further, reporting them all as\n * 'Object'.\n *\n * @func\n * @memberOf R\n * @since v0.8.0\n * @category Type\n * @sig (* -> {*}) -> String\n * @param {*} val The value to test\n * @return {String}\n * @example\n *\n * R.type({}); //=> \"Object\"\n * R.type(1); //=> \"Number\"\n * R.type(false); //=> \"Boolean\"\n * R.type('s'); //=> \"String\"\n * R.type(null); //=> \"Null\"\n * R.type([]); //=> \"Array\"\n * R.type(/[A-z]/); //=> \"RegExp\"\n * R.type(() => {}); //=> \"Function\"\n * R.type(undefined); //=> \"Undefined\"\n */\nvar type = /*#__PURE__*/_curry1(function type(val) {\n return val === null ? 'Null' : val === undefined ? 'Undefined' : Object.prototype.toString.call(val).slice(8, -1);\n});\nexport default type;","import _arrayFromIterator from './_arrayFromIterator.js';\nimport _includesWith from './_includesWith.js';\nimport _functionName from './_functionName.js';\nimport _has from './_has.js';\nimport _objectIs from './_objectIs.js';\nimport keys from '../keys.js';\nimport type from '../type.js';\n\n/**\n * private _uniqContentEquals function.\n * That function is checking equality of 2 iterator contents with 2 assumptions\n * - iterators lengths are the same\n * - iterators values are unique\n *\n * false-positive result will be returned for comparision of, e.g.\n * - [1,2,3] and [1,2,3,4]\n * - [1,1,1] and [1,2,3]\n * */\n\nfunction _uniqContentEquals(aIterator, bIterator, stackA, stackB) {\n var a = _arrayFromIterator(aIterator);\n var b = _arrayFromIterator(bIterator);\n\n function eq(_a, _b) {\n return _equals(_a, _b, stackA.slice(), stackB.slice());\n }\n\n // if *a* array contains any element that is not included in *b*\n return !_includesWith(function (b, aItem) {\n return !_includesWith(eq, aItem, b);\n }, b, a);\n}\n\nexport default function _equals(a, b, stackA, stackB) {\n if (_objectIs(a, b)) {\n return true;\n }\n\n var typeA = type(a);\n\n if (typeA !== type(b)) {\n return false;\n }\n\n if (a == null || b == null) {\n return false;\n }\n\n if (typeof a['fantasy-land/equals'] === 'function' || typeof b['fantasy-land/equals'] === 'function') {\n return typeof a['fantasy-land/equals'] === 'function' && a['fantasy-land/equals'](b) && typeof b['fantasy-land/equals'] === 'function' && b['fantasy-land/equals'](a);\n }\n\n if (typeof a.equals === 'function' || typeof b.equals === 'function') {\n return typeof a.equals === 'function' && a.equals(b) && typeof b.equals === 'function' && b.equals(a);\n }\n\n switch (typeA) {\n case 'Arguments':\n case 'Array':\n case 'Object':\n if (typeof a.constructor === 'function' && _functionName(a.constructor) === 'Promise') {\n return a === b;\n }\n break;\n case 'Boolean':\n case 'Number':\n case 'String':\n if (!(typeof a === typeof b && _objectIs(a.valueOf(), b.valueOf()))) {\n return false;\n }\n break;\n case 'Date':\n if (!_objectIs(a.valueOf(), b.valueOf())) {\n return false;\n }\n break;\n case 'Error':\n return a.name === b.name && a.message === b.message;\n case 'RegExp':\n if (!(a.source === b.source && a.global === b.global && a.ignoreCase === b.ignoreCase && a.multiline === b.multiline && a.sticky === b.sticky && a.unicode === b.unicode)) {\n return false;\n }\n break;\n }\n\n var idx = stackA.length - 1;\n while (idx >= 0) {\n if (stackA[idx] === a) {\n return stackB[idx] === b;\n }\n idx -= 1;\n }\n\n switch (typeA) {\n case 'Map':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.entries(), b.entries(), stackA.concat([a]), stackB.concat([b]));\n case 'Set':\n if (a.size !== b.size) {\n return false;\n }\n\n return _uniqContentEquals(a.values(), b.values(), stackA.concat([a]), stackB.concat([b]));\n case 'Arguments':\n case 'Array':\n case 'Object':\n case 'Boolean':\n case 'Number':\n case 'String':\n case 'Date':\n case 'Error':\n case 'RegExp':\n case 'Int8Array':\n case 'Uint8Array':\n case 'Uint8ClampedArray':\n case 'Int16Array':\n case 'Uint16Array':\n case 'Int32Array':\n case 'Uint32Array':\n case 'Float32Array':\n case 'Float64Array':\n case 'ArrayBuffer':\n break;\n default:\n // Values of other types are only equal if identical.\n return false;\n }\n\n var keysA = keys(a);\n if (keysA.length !== keys(b).length) {\n return false;\n }\n\n var extendedStackA = stackA.concat([a]);\n var extendedStackB = stackB.concat([b]);\n\n idx = keysA.length - 1;\n while (idx >= 0) {\n var key = keysA[idx];\n if (!(_has(key, b) && _equals(b[key], a[key], extendedStackA, extendedStackB))) {\n return false;\n }\n idx -= 1;\n }\n return true;\n}","export default function _functionName(f) {\n // String(x => x) evaluates to \"x => x\", so the pattern may not match.\n var match = String(f).match(/^function (\\w*)/);\n return match == null ? '' : match[1];\n}","import _curry2 from './internal/_curry2.js';\nimport _equals from './internal/_equals.js';\n\n/**\n * Returns `true` if its arguments are equivalent, `false` otherwise. Handles\n * cyclical data structures.\n *\n * Dispatches symmetrically to the `equals` methods of both arguments, if\n * present.\n *\n * @func\n * @memberOf R\n * @since v0.15.0\n * @category Relation\n * @sig a -> b -> Boolean\n * @param {*} a\n * @param {*} b\n * @return {Boolean}\n * @example\n *\n * R.equals(1, 1); //=> true\n * R.equals(1, '1'); //=> false\n * R.equals([1, 2, 3], [1, 2, 3]); //=> true\n *\n * const a = {}; a.v = a;\n * const b = {}; b.v = b;\n * R.equals(a, b); //=> true\n */\nvar equals = /*#__PURE__*/_curry2(function equals(a, b) {\n return _equals(a, b, [], []);\n});\nexport default equals;","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { equals } from \"ramda\"\nimport {\n MonoTypeOperatorFunction,\n Observable,\n animationFrameScheduler,\n combineLatest,\n pipe\n} from \"rxjs\"\nimport {\n distinctUntilChanged,\n finalize,\n map,\n observeOn,\n shareReplay,\n tap\n} from \"rxjs/operators\"\n\nimport { ViewportOffset } from \"../../../ui\"\nimport {\n resetSidebarHeight,\n resetSidebarLock,\n setSidebarHeight,\n setSidebarLock\n} from \"../../action\"\nimport { Main } from \"../main\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Sidebar\n */\nexport interface Sidebar {\n height: number /* Sidebar height */\n lock: boolean /* Sidebar lock */\n}\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n offset$: Observable /* Viewport offset observable */\n main$: Observable
/* Main area observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch sidebar\n *\n * This function returns an observable that computes the visual parameters of\n * the given element (a sidebar) from the vertical viewport offset, as well as\n * the height of the main area. When the page is scrolled beyond the header,\n * the sidebar is locked and fills the remaining space.\n *\n * @param el - Sidebar element\n * @param options - Options\n *\n * @return Sidebar observable\n */\nexport function watchSidebar(\n el: HTMLElement, { offset$, main$ }: Options\n): Observable {\n\n /* Adjust for internal main area offset */\n const adjust = parseFloat(\n getComputedStyle(el.parentElement!)\n .getPropertyValue(\"padding-top\")\n )\n\n /* Compute the sidebar's available height */\n const height$ = combineLatest([offset$, main$])\n .pipe(\n map(([{ y }, { offset, height }]) => {\n return height - adjust + Math.min(adjust, Math.max(0, y - offset))\n })\n )\n\n /* Compute whether the sidebar should be locked */\n const lock$ = combineLatest([offset$, main$])\n .pipe(\n map(([{ y }, { offset }]) => y >= offset + adjust)\n )\n\n /* Combine into single hot observable */\n return combineLatest([height$, lock$])\n .pipe(\n map(([height, lock]) => ({ height, lock })),\n distinctUntilChanged(equals),\n shareReplay(1)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Paint sidebar from source observable\n *\n * @param el - Sidebar element\n *\n * @return Operator function\n */\nexport function paintSidebar(\n el: HTMLElement\n): MonoTypeOperatorFunction {\n return pipe(\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(({ height, lock }) => {\n setSidebarHeight(el, height)\n setSidebarLock(el, lock)\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n resetSidebarHeight(el)\n resetSidebarLock(el)\n })\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set sidebar height\n *\n * @param el - Sidebar element\n * @param value - Sidebar height\n */\nexport function setSidebarHeight(\n el: HTMLElement, value: number\n): void {\n el.style.height = `${value}px`\n}\n\n/**\n * Reset sidebar height\n *\n * @param el - Sidebar element\n */\nexport function resetSidebarHeight(\n el: HTMLElement\n): void {\n el.style.height = \"\"\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Set sidebar lock\n *\n * @param el - Sidebar element\n * @param value - Whether the sidebar is locked\n */\nexport function setSidebarLock(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"lock\" : \"\")\n}\n\n/**\n * Reset sidebar lock\n *\n * @param el - Sidebar element\n */\nexport function resetSidebarLock(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n","/** PURE_IMPORTS_START _of,_operators_concatAll PURE_IMPORTS_END */\nimport { of } from './of';\nimport { concatAll } from '../operators/concatAll';\nexport function concat() {\n var observables = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n observables[_i] = arguments[_i];\n }\n return concatAll()(of.apply(void 0, observables));\n}\n//# sourceMappingURL=concat.js.map\n","/** PURE_IMPORTS_START _mergeAll PURE_IMPORTS_END */\nimport { mergeAll } from './mergeAll';\nexport function concatAll() {\n return mergeAll(1);\n}\n//# sourceMappingURL=concatAll.js.map\n","/** PURE_IMPORTS_START _observable_concat,_util_isScheduler PURE_IMPORTS_END */\nimport { concat } from '../observable/concat';\nimport { isScheduler } from '../util/isScheduler';\nexport function startWith() {\n var array = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n array[_i] = arguments[_i];\n }\n var scheduler = array[array.length - 1];\n if (isScheduler(scheduler)) {\n array.pop();\n return function (source) { return concat(array, source, scheduler); };\n }\n else {\n return function (source) { return concat(array, source); };\n }\n}\n//# sourceMappingURL=startWith.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function skip(count) {\n return function (source) { return source.lift(new SkipOperator(count)); };\n}\nvar SkipOperator = /*@__PURE__*/ (function () {\n function SkipOperator(total) {\n this.total = total;\n }\n SkipOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new SkipSubscriber(subscriber, this.total));\n };\n return SkipOperator;\n}());\nvar SkipSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(SkipSubscriber, _super);\n function SkipSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n SkipSubscriber.prototype._next = function (x) {\n if (++this.count > this.total) {\n this.destination.next(x);\n }\n };\n return SkipSubscriber;\n}(Subscriber));\n//# sourceMappingURL=skip.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent } from \"rxjs\"\nimport { ajax } from \"rxjs/ajax\"\nimport {\n distinctUntilChanged,\n map,\n mapTo,\n pluck,\n shareReplay,\n skip,\n startWith,\n switchMap\n} from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Switch options\n */\ninterface SwitchOptions {\n location$: Observable /* Location observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Observable for document load events\n */\nconst load$ = fromEvent(document, \"DOMContentLoaded\")\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch document\n *\n * @return Document observable\n */\nexport function watchDocument(): Observable {\n return load$\n .pipe(\n mapTo(document),\n shareReplay(1)\n )\n}\n\n/**\n * Watch document switch\n *\n * This function returns an observables that fetches a document if the provided\n * location observable emits a new value (i.e. URL). If the emitted URL points\n * to the same page, the request is effectively ignored (e.g. when only the\n * fragment identifier changes)\n *\n * @param options - Options\n *\n * @return Document switch observable\n */\nexport function watchDocumentSwitch(\n { location$ }: SwitchOptions\n): Observable {\n return location$\n .pipe(\n startWith(location.href),\n map(url => url.replace(/#[^#]+$/, \"\")),\n distinctUntilChanged(),\n skip(1),\n\n /* Fetch document */\n switchMap(url => ajax({\n url,\n responseType: \"document\",\n withCredentials: true\n })\n .pipe(\n pluck(\"response\")\n )\n ),\n shareReplay(1)\n )\n}\n","/** PURE_IMPORTS_START tslib,_Subscriber PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nexport function refCount() {\n return function refCountOperatorFunction(source) {\n return source.lift(new RefCountOperator(source));\n };\n}\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=refCount.js.map\n","/** PURE_IMPORTS_START tslib,_Subject,_Observable,_Subscriber,_Subscription,_operators_refCount PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { SubjectSubscriber } from '../Subject';\nimport { Observable } from '../Observable';\nimport { Subscriber } from '../Subscriber';\nimport { Subscription } from '../Subscription';\nimport { refCount as higherOrderRefCount } from '../operators/refCount';\nvar ConnectableObservable = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableObservable, _super);\n function ConnectableObservable(source, subjectFactory) {\n var _this = _super.call(this) || this;\n _this.source = source;\n _this.subjectFactory = subjectFactory;\n _this._refCount = 0;\n _this._isComplete = false;\n return _this;\n }\n ConnectableObservable.prototype._subscribe = function (subscriber) {\n return this.getSubject().subscribe(subscriber);\n };\n ConnectableObservable.prototype.getSubject = function () {\n var subject = this._subject;\n if (!subject || subject.isStopped) {\n this._subject = this.subjectFactory();\n }\n return this._subject;\n };\n ConnectableObservable.prototype.connect = function () {\n var connection = this._connection;\n if (!connection) {\n this._isComplete = false;\n connection = this._connection = new Subscription();\n connection.add(this.source\n .subscribe(new ConnectableSubscriber(this.getSubject(), this)));\n if (connection.closed) {\n this._connection = null;\n connection = Subscription.EMPTY;\n }\n }\n return connection;\n };\n ConnectableObservable.prototype.refCount = function () {\n return higherOrderRefCount()(this);\n };\n return ConnectableObservable;\n}(Observable));\nexport { ConnectableObservable };\nexport var connectableObservableDescriptor = /*@__PURE__*/ (function () {\n var connectableProto = ConnectableObservable.prototype;\n return {\n operator: { value: null },\n _refCount: { value: 0, writable: true },\n _subject: { value: null, writable: true },\n _connection: { value: null, writable: true },\n _subscribe: { value: connectableProto._subscribe },\n _isComplete: { value: connectableProto._isComplete, writable: true },\n getSubject: { value: connectableProto.getSubject },\n connect: { value: connectableProto.connect },\n refCount: { value: connectableProto.refCount }\n };\n})();\nvar ConnectableSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ConnectableSubscriber, _super);\n function ConnectableSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n ConnectableSubscriber.prototype._error = function (err) {\n this._unsubscribe();\n _super.prototype._error.call(this, err);\n };\n ConnectableSubscriber.prototype._complete = function () {\n this.connectable._isComplete = true;\n this._unsubscribe();\n _super.prototype._complete.call(this);\n };\n ConnectableSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (connectable) {\n this.connectable = null;\n var connection = connectable._connection;\n connectable._refCount = 0;\n connectable._subject = null;\n connectable._connection = null;\n if (connection) {\n connection.unsubscribe();\n }\n }\n };\n return ConnectableSubscriber;\n}(SubjectSubscriber));\nvar RefCountOperator = /*@__PURE__*/ (function () {\n function RefCountOperator(connectable) {\n this.connectable = connectable;\n }\n RefCountOperator.prototype.call = function (subscriber, source) {\n var connectable = this.connectable;\n connectable._refCount++;\n var refCounter = new RefCountSubscriber(subscriber, connectable);\n var subscription = source.subscribe(refCounter);\n if (!refCounter.closed) {\n refCounter.connection = connectable.connect();\n }\n return subscription;\n };\n return RefCountOperator;\n}());\nvar RefCountSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(RefCountSubscriber, _super);\n function RefCountSubscriber(destination, connectable) {\n var _this = _super.call(this, destination) || this;\n _this.connectable = connectable;\n return _this;\n }\n RefCountSubscriber.prototype._unsubscribe = function () {\n var connectable = this.connectable;\n if (!connectable) {\n this.connection = null;\n return;\n }\n this.connectable = null;\n var refCount = connectable._refCount;\n if (refCount <= 0) {\n this.connection = null;\n return;\n }\n connectable._refCount = refCount - 1;\n if (refCount > 1) {\n this.connection = null;\n return;\n }\n var connection = this.connection;\n var sharedConnection = connectable._connection;\n this.connection = null;\n if (sharedConnection && (!connection || sharedConnection === connection)) {\n sharedConnection.unsubscribe();\n }\n };\n return RefCountSubscriber;\n}(Subscriber));\n//# sourceMappingURL=ConnectableObservable.js.map\n","/** PURE_IMPORTS_START _observable_ConnectableObservable PURE_IMPORTS_END */\nimport { connectableObservableDescriptor } from '../observable/ConnectableObservable';\nexport function multicast(subjectOrSubjectFactory, selector) {\n return function multicastOperatorFunction(source) {\n var subjectFactory;\n if (typeof subjectOrSubjectFactory === 'function') {\n subjectFactory = subjectOrSubjectFactory;\n }\n else {\n subjectFactory = function subjectFactory() {\n return subjectOrSubjectFactory;\n };\n }\n if (typeof selector === 'function') {\n return source.lift(new MulticastOperator(subjectFactory, selector));\n }\n var connectable = Object.create(source, connectableObservableDescriptor);\n connectable.source = source;\n connectable.subjectFactory = subjectFactory;\n return connectable;\n };\n}\nvar MulticastOperator = /*@__PURE__*/ (function () {\n function MulticastOperator(subjectFactory, selector) {\n this.subjectFactory = subjectFactory;\n this.selector = selector;\n }\n MulticastOperator.prototype.call = function (subscriber, source) {\n var selector = this.selector;\n var subject = this.subjectFactory();\n var subscription = selector(subject).subscribe(subscriber);\n subscription.add(source.subscribe(subject));\n return subscription;\n };\n return MulticastOperator;\n}());\nexport { MulticastOperator };\n//# sourceMappingURL=multicast.js.map\n","/** PURE_IMPORTS_START _multicast,_refCount,_Subject PURE_IMPORTS_END */\nimport { multicast } from './multicast';\nimport { refCount } from './refCount';\nimport { Subject } from '../Subject';\nfunction shareSubjectFactory() {\n return new Subject();\n}\nexport function share() {\n return function (source) { return refCount()(multicast(shareSubjectFactory)(source)); };\n}\n//# sourceMappingURL=share.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, Subject, fromEvent } from \"rxjs\"\nimport { filter, map, share } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Observable for window hash change events\n */\nconst hashchange$ = fromEvent(window, \"hashchange\")\n\n/**\n * Observable for window pop state events\n */\nconst popstate$ = fromEvent(window, \"popstate\")\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch location\n *\n * @return Location subject\n */\nexport function watchLocation(): Subject {\n const location$ = new Subject()\n popstate$\n .pipe(\n map(() => location.href),\n share()\n )\n .subscribe(location$)\n\n /* Return subject */\n return location$\n}\n\n/**\n * Watch location fragment\n *\n * @return Location fragment observable\n */\nexport function watchLocationFragment(): Observable {\n return hashchange$\n .pipe(\n map(() => location.hash),\n filter(hash => hash.length > 0),\n share()\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEventPattern } from \"rxjs\"\nimport { shareReplay, startWith } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch media query\n *\n * @param query - Media query\n *\n * @return Media observable\n */\nexport function watchMedia(query: string): Observable {\n const media = matchMedia(query)\n return fromEventPattern(next =>\n media.addListener(() => next(media.matches))\n )\n .pipe(\n startWith(media.matches),\n shareReplay(1)\n )\n}\n","/** PURE_IMPORTS_START _Observable,_util_isArray,_util_isFunction,_operators_map PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { isFunction } from '../util/isFunction';\nimport { map } from '../operators/map';\nexport function fromEventPattern(addHandler, removeHandler, resultSelector) {\n if (resultSelector) {\n return fromEventPattern(addHandler, removeHandler).pipe(map(function (args) { return isArray(args) ? resultSelector.apply(void 0, args) : resultSelector(args); }));\n }\n return new Observable(function (subscriber) {\n var handler = function () {\n var e = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n e[_i] = arguments[_i];\n }\n return subscriber.next(e.length === 1 ? e[0] : e);\n };\n var retValue;\n try {\n retValue = addHandler(handler);\n }\n catch (err) {\n subscriber.error(err);\n return undefined;\n }\n if (!isFunction(removeHandler)) {\n return undefined;\n }\n return function () { return removeHandler(handler, retValue); };\n });\n}\n//# sourceMappingURL=fromEventPattern.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent, merge } from \"rxjs\"\nimport { map, shareReplay, startWith } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Observable for window scroll events\n */\nconst scroll$ = fromEvent(window, \"scroll\")\n\n/**\n * Observable for window resize events\n */\nconst resize$ = fromEvent(window, \"resize\")\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Viewport offset\n */\nexport interface ViewportOffset {\n x: number /* Horizontal offset */\n y: number /* Vertical offset */\n}\n\n/**\n * Viewport size\n */\nexport interface ViewportSize {\n width: number /* Viewport width */\n height: number /* Viewport height */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Retrieve viewport offset\n *\n * @return Viewport offset\n */\nexport function getViewportOffset(): ViewportOffset {\n return {\n x: pageXOffset,\n y: pageYOffset\n }\n}\n\n/**\n * Retrieve viewport size\n *\n * @return Viewport size\n */\nexport function getViewportSize(): ViewportSize {\n return {\n width: innerWidth,\n height: innerHeight\n }\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Watch viewport offset\n *\n * @return Viewport offset observable\n */\nexport function watchViewportOffset(): Observable {\n return merge(scroll$, resize$)\n .pipe(\n map(getViewportOffset),\n startWith(getViewportOffset()),\n shareReplay(1)\n )\n}\n\n/**\n * Watch viewport size\n *\n * @return Viewport size observable\n */\nexport function watchViewportSize(): Observable {\n return resize$\n .pipe(\n map(getViewportSize),\n startWith(getViewportSize()),\n shareReplay(1)\n )\n}\n","/** PURE_IMPORTS_START tslib,_OuterSubscriber,_util_subscribeToResult PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { OuterSubscriber } from '../OuterSubscriber';\nimport { subscribeToResult } from '../util/subscribeToResult';\nexport var defaultThrottleConfig = {\n leading: true,\n trailing: false\n};\nexport function throttle(durationSelector, config) {\n if (config === void 0) {\n config = defaultThrottleConfig;\n }\n return function (source) { return source.lift(new ThrottleOperator(durationSelector, config.leading, config.trailing)); };\n}\nvar ThrottleOperator = /*@__PURE__*/ (function () {\n function ThrottleOperator(durationSelector, leading, trailing) {\n this.durationSelector = durationSelector;\n this.leading = leading;\n this.trailing = trailing;\n }\n ThrottleOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new ThrottleSubscriber(subscriber, this.durationSelector, this.leading, this.trailing));\n };\n return ThrottleOperator;\n}());\nvar ThrottleSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(ThrottleSubscriber, _super);\n function ThrottleSubscriber(destination, durationSelector, _leading, _trailing) {\n var _this = _super.call(this, destination) || this;\n _this.destination = destination;\n _this.durationSelector = durationSelector;\n _this._leading = _leading;\n _this._trailing = _trailing;\n _this._hasValue = false;\n return _this;\n }\n ThrottleSubscriber.prototype._next = function (value) {\n this._hasValue = true;\n this._sendValue = value;\n if (!this._throttled) {\n if (this._leading) {\n this.send();\n }\n else {\n this.throttle(value);\n }\n }\n };\n ThrottleSubscriber.prototype.send = function () {\n var _a = this, _hasValue = _a._hasValue, _sendValue = _a._sendValue;\n if (_hasValue) {\n this.destination.next(_sendValue);\n this.throttle(_sendValue);\n }\n this._hasValue = false;\n this._sendValue = null;\n };\n ThrottleSubscriber.prototype.throttle = function (value) {\n var duration = this.tryDurationSelector(value);\n if (!!duration) {\n this.add(this._throttled = subscribeToResult(this, duration));\n }\n };\n ThrottleSubscriber.prototype.tryDurationSelector = function (value) {\n try {\n return this.durationSelector(value);\n }\n catch (err) {\n this.destination.error(err);\n return null;\n }\n };\n ThrottleSubscriber.prototype.throttlingDone = function () {\n var _a = this, _throttled = _a._throttled, _trailing = _a._trailing;\n if (_throttled) {\n _throttled.unsubscribe();\n }\n this._throttled = null;\n if (_trailing) {\n this.send();\n }\n };\n ThrottleSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.throttlingDone();\n };\n ThrottleSubscriber.prototype.notifyComplete = function () {\n this.throttlingDone();\n };\n return ThrottleSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=throttle.js.map\n","/** PURE_IMPORTS_START PURE_IMPORTS_END */\nvar ArgumentOutOfRangeErrorImpl = /*@__PURE__*/ (function () {\n function ArgumentOutOfRangeErrorImpl() {\n Error.call(this);\n this.message = 'argument out of range';\n this.name = 'ArgumentOutOfRangeError';\n return this;\n }\n ArgumentOutOfRangeErrorImpl.prototype = /*@__PURE__*/ Object.create(Error.prototype);\n return ArgumentOutOfRangeErrorImpl;\n})();\nexport var ArgumentOutOfRangeError = ArgumentOutOfRangeErrorImpl;\n//# sourceMappingURL=ArgumentOutOfRangeError.js.map\n","/** PURE_IMPORTS_START tslib,_Subscriber,_util_ArgumentOutOfRangeError,_observable_empty PURE_IMPORTS_END */\nimport * as tslib_1 from \"tslib\";\nimport { Subscriber } from '../Subscriber';\nimport { ArgumentOutOfRangeError } from '../util/ArgumentOutOfRangeError';\nimport { empty } from '../observable/empty';\nexport function take(count) {\n return function (source) {\n if (count === 0) {\n return empty();\n }\n else {\n return source.lift(new TakeOperator(count));\n }\n };\n}\nvar TakeOperator = /*@__PURE__*/ (function () {\n function TakeOperator(total) {\n this.total = total;\n if (this.total < 0) {\n throw new ArgumentOutOfRangeError;\n }\n }\n TakeOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new TakeSubscriber(subscriber, this.total));\n };\n return TakeOperator;\n}());\nvar TakeSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(TakeSubscriber, _super);\n function TakeSubscriber(destination, total) {\n var _this = _super.call(this, destination) || this;\n _this.total = total;\n _this.count = 0;\n return _this;\n }\n TakeSubscriber.prototype._next = function (value) {\n var total = this.total;\n var count = ++this.count;\n if (count <= total) {\n this.destination.next(value);\n if (count === total) {\n this.destination.complete();\n this.unsubscribe();\n }\n }\n };\n return TakeSubscriber;\n}(Subscriber));\n//# sourceMappingURL=take.js.map\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { MkDocsSearchIndex } from \"../mkdocs\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search message type\n */\nexport const enum SearchMessageType {\n INIT, /* Initialize search index */\n LOAD, /* Load serialized search index */\n DUMP, /* Dump serialized search index */\n QUERY /* Query search index */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Initialize search index\n */\nexport interface SearchInitMessage {\n type: SearchMessageType.INIT /* Message type */\n data: MkDocsSearchIndex /* Message data */\n}\n\n/**\n * Load serialized search index\n */\nexport interface SearchLoadMessage {\n type: SearchMessageType.LOAD /* Message type */\n data: string /* Message data */\n}\n\n/**\n * Dump serialized search index\n */\nexport interface SearchDumpMessage {\n type: SearchMessageType.DUMP /* Message type */\n data: string /* Message data */\n}\n\n/**\n * TODO: document\n */\nexport interface SearchQueryMessage {\n type: SearchMessageType.QUERY /* Message type */\n data: string /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Search message\n */\nexport type SearchMessage =\n | SearchInitMessage\n | SearchLoadMessage\n | SearchDumpMessage\n | SearchQueryMessage\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent } from \"rxjs\"\nimport {\n pluck,\n shareReplay,\n switchMap,\n take,\n tap,\n throttle\n} from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Worker message\n */\nexport interface WorkerMessage {\n type: unknown /* Message type */\n data: unknown /* Message data */\n}\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n *\n * @template T - Worker message type\n */\ninterface Options {\n message$: Observable /* Message observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch a web worker\n *\n * This function returns an observable that will send all values emitted by the\n * message observable to the web worker. Web worker communication is expected\n * to be bidirectional (request-response) and synchronous. Messages that are\n * emitted during a pending request are throttled, the last one is emitted.\n *\n * @param worker - Web worker\n *\n * @return Worker message observable\n */\nexport function watchWorker(\n worker: Worker, { message$ }: Options\n): Observable {\n\n /* Receive messages from web worker */\n const worker$ = fromEvent(worker, \"message\")\n .pipe(\n pluck(\"data\")\n )\n\n /* Send request and wait for response */\n return message$\n .pipe(\n throttle(() => worker$, { leading: true, trailing: true }),\n tap(message => worker.postMessage(message)),\n switchMap(() => worker$\n .pipe(\n take(1)\n )\n ),\n shareReplay(1)\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { identity } from \"ramda\"\nimport {\n EMPTY,\n MonoTypeOperatorFunction,\n NEVER,\n Observable,\n Subject,\n fromEvent,\n merge,\n of,\n pipe,\n zip\n} from \"rxjs\"\nimport {\n audit,\n buffer,\n bufferWhen,\n concatMapTo,\n delay,\n distinctUntilKeyChanged,\n exhaustMap,\n filter,\n map,\n pluck,\n shareReplay,\n startWith,\n switchMap,\n switchMapTo,\n take,\n tap,\n throttle,\n withLatestFrom\n} from \"rxjs/operators\"\n\nimport { ajax } from \"rxjs/ajax\"\nimport { Config, isConfig } from \"./config\"\nimport { setupSearch } from \"./search\"\nimport {\n Component,\n paintHeaderShadow,\n paintHidden,\n paintSidebar,\n switchComponent,\n watchBottomOffset,\n watchComponentMap,\n watchHeader,\n watchMain,\n watchSearchReset,\n watchSidebar,\n watchToggle,\n watchTopOffset\n} from \"./theme\"\nimport {\n watchDocument,\n watchDocumentSwitch,\n watchLocation,\n watchLocationFragment,\n watchMedia,\n watchViewportOffset,\n watchViewportSize,\n watchWorker\n} from \"./ui\"\nimport {\n getElement,\n not,\n switchMapIf\n} from \"./utilities\"\nimport { SearchMessage, SearchMessageType } from \"./workers/search/_\"\nimport { MkDocsSearchIndex } from \"./workers/search/mkdocs\"\n\n// TBD\n\n// TODO: put this somewhere else... (merge with config!) JSON schema!?\nconst names = [\n \"header\", /* Header */\n \"title\", /* Header title */\n \"search\", /* Search */\n \"query\", /* Search input */\n \"reset\", /* Search reset */\n \"result\", /* Search results */\n \"container\", /* Container */\n \"main\", /* Main area */\n \"hero\", /* Hero */\n \"tabs\", /* Tabs */\n \"navigation\", /* Navigation */\n \"toc\" /* Table of contents */\n] as const\n\n// modernizr for the poor\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Initialize Material for MkDocs\n *\n * @param config - Configuration\n */\nexport function initialize(config: unknown) {\n if (!isConfig(config))\n throw new SyntaxError(`Invalid configuration: ${JSON.stringify(config)}`)\n\n const worker = new Worker(config.search)\n\n const message$ = new Subject()\n\n const worker$ = watchWorker(worker, { message$ })\n worker$.subscribe(message => {\n console.log((message as any).term, \":\", (message as any).res.length)\n })\n\n ajax({\n url: `${config.base}/search/search_index.json`,\n responseType: \"json\",\n withCredentials: true\n })\n .pipe(\n pluck(\"response\"),\n map(data => ({\n type: SearchMessageType.INIT,\n data\n }))\n )\n .subscribe(message => {\n message$.next(message) // TODO: this shall not complete\n })\n\n message$.subscribe(console.log)\n\n /* ----------------------------------------------------------------------- */\n\n /* Create viewport observables */\n const offset$ = watchViewportOffset()\n const size$ = watchViewportSize()\n\n /* Create media observables */\n const screen$ = watchMedia(\"(min-width: 1220px)\")\n const tablet$ = watchMedia(\"(min-width: 960px)\")\n\n /* Create location observables */\n const location$ = watchLocation()\n const fragment$ = watchLocationFragment()\n\n /* Create document observables */\n const load$ = watchDocument()\n // const switch$ = watchDocumentSwitch({ location$ })\n\n /* ----------------------------------------------------------------------- */\n\n /* Create component map observable */\n const components$ = watchComponentMap(names, { load$ })\n\n const component = (name: Component): Observable => {\n return components$\n .pipe(\n switchComponent(name)\n )\n }\n\n /* Create header observable */\n const header$ = component(\"header\")\n .pipe(\n switchMap(watchHeader)\n )\n\n /* Create main area observable */\n const main$ = component(\"main\")\n .pipe(\n switchMap(el => watchMain(el, { size$, offset$, header$ })),\n shareReplay(1)\n )\n\n // ----------------------------------------------------------------------------\n\n component(\"query\")\n .pipe(\n switchMap(el => fromEvent(el, \"keyup\") // not super nice...\n .pipe(\n map(() => ({\n type: SearchMessageType.QUERY,\n data: (el as HTMLInputElement).value\n })), // TODO. ugly...\n distinctUntilKeyChanged(\"data\")\n )\n )\n )\n .subscribe(x => {\n message$.next(x)\n })\n\n // // WIP: instant loading\n // load$\n // .pipe(\n // switchMap(({ body }) => fromEvent(body, \"click\")),\n // switchMap(ev => {\n // if (ev.target instanceof HTMLElement) {\n // const el = ev.target.closest(\"a\") || undefined\n // if (el) {\n // if (!/^(https?:|#)/.test(el.getAttribute(\"href\")!)) {\n // ev.preventDefault()\n // }\n // const href = el.href\n // history.pushState({}, \"\", href) // TODO: reference necessary!?\n // return of(href)\n // }\n // }\n // return EMPTY\n // })\n\n // // try to reduce the jiggle upon instant page load. ideally, the location\n // // should directly be resolved and the respective document loaded, but\n // // we must scroll to the top at first and wait at least 250ms.\n // //\n // // Furthermore, this doesn't include the back/next buttons of the browser\n // // which must be delayed\n // // tap(url => {\n // // if (!/#/.test(url))\n // // scrollTo({ top: 0 })\n // // }) // only when loading something we havent loaded!\n // // delay(250)\n // )\n // .subscribe(location$)\n\n // location$.subscribe(x => {\n // console.log(\"L\", x)\n // })\n // switch$.subscribe(x => {\n // console.log(\"S\", x)\n // })\n\n /* ----------------------------------------------------------------------- */\n\n /* Create header shadow toggle */\n component(\"header\")\n .pipe(\n switchMap(el => main$\n .pipe(\n paintHeaderShadow(el)\n )\n )\n )\n .subscribe()\n\n /* Create sidebar with navigation */\n component(\"navigation\")\n .pipe(\n switchMapIf(screen$, el => watchSidebar(el, { offset$, main$ })\n .pipe(\n paintSidebar(el)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n /* Create sidebar with table of contents */\n component(\"toc\")\n .pipe(\n switchMapIf(tablet$, el => watchSidebar(el, { offset$, main$ })\n .pipe(\n paintSidebar(el)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n /* Create tabs visibility toggle */\n component(\"tabs\")\n .pipe(\n switchMapIf(screen$, el => watchTopOffset(el, { size$, offset$, header$ })\n .pipe(\n paintHidden(el, 8)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n /* Create hero visibility toggle */\n component(\"hero\")\n .pipe(\n switchMap(el => watchTopOffset(el, { size$, offset$, header$ })\n .pipe(\n paintHidden(el, 20)\n )\n ),\n shareReplay(1)\n )\n .subscribe()\n\n // /* Create header title toggle */\n // component(\"main\")\n // .pipe(\n // delay(1000), // initial delay\n // switchMap(el => typeof getElement(\"h1\", el) !== \"undefined\"\n // ? watchBottomOffset(getElement(\"h1\", el)!, { size$, offset$, header$ })\n // .pipe(\n // map(({ y }) => y >= 0),\n // withLatestFrom(component(\"title\")),\n // tap(([active, title]) => {\n // title.dataset.mdState = active ? \"active\" : \"\"\n // })\n // )\n // : NEVER\n // )\n // )\n // .subscribe()\n\n // TODO: replace title as inner text\n\n /* ----------------------------------------------------------------------- */\n\n const drawer = getElement(\"[data-md-toggle=drawer]\")!\n const search = getElement(\"[data-md-toggle=search]\")!\n\n // watchToggle\n\n // --> watchSearchQuery?\n\n // watchSearch\n // watchSearchReset\n\n // toggles stay the same...\n\n const a$ = watchToggle(search)\n .pipe(\n filter(identity),\n delay(400)\n )\n\n // watchSearchReset()\n\n const b$ = component(\"reset\")\n .pipe(\n switchMap(watchSearchReset)\n )\n\n function focusQuery(): MonoTypeOperatorFunction {\n return pipe(\n tap(el => el.focus())\n )\n }\n\n merge(a$, b$)\n .pipe(\n switchMapTo(component(\"query\")),\n focusQuery()\n )\n .subscribe()\n\n /* Return observable factories */\n return {\n\n /* User interface */\n watchDocument: () => load$,\n // watchDocumentSwitch: () => switch$,\n watchLocation: () => location$,\n watchLocationFragment: () => fragment$,\n watchMediaScreen: () => screen$,\n watchMediaTablet: () => tablet$,\n watchViewportOffset: () => offset$,\n watchViewportSize: () => size$\n }\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Configuration\n */\nexport interface Config {\n base: string /* Base URL */\n search: string /* Web worker URL */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Ensure that the given value is a valid configuration\n *\n * @param config - Configuration\n *\n * @return Test result\n */\nexport function isConfig(config: any): config is Config {\n return typeof config === \"object\"\n && typeof config.base === \"string\"\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, combineLatest } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n pluck,\n shareReplay\n} from \"rxjs/operators\"\n\nimport { ViewportOffset, ViewportSize } from \"../../../ui\"\nimport { Header } from \"../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Main area\n */\nexport interface Main {\n offset: number /* Main area top offset */\n height: number /* Main area visible height */\n active: boolean /* Scrolled past top offset */\n}\n\n/* ----------------------------------------------------------------------------\n * Function types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n size$: Observable /* Viewport size observable */\n offset$: Observable /* Viewport offset observable */\n header$: Observable
/* Header observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch main area\n *\n * This function returns an observable that computes the visual parameters of\n * the main area from the viewport height and vertical offset, as well as the\n * height of the header element. The height of the main area is corrected by\n * the height of the header (if fixed) and footer element.\n *\n * @param el - Main area element\n * @param options - Options\n *\n * @return Main area observable\n */\nexport function watchMain(\n el: HTMLElement, { size$, offset$, header$ }: Options\n): Observable
{\n\n /* Compute necessary adjustment for header */\n const adjust$ = header$\n .pipe(\n pluck(\"height\")\n )\n\n /* Compute the main area's visible height */\n const height$ = combineLatest([offset$, size$, adjust$])\n .pipe(\n map(([{ y }, { height }, adjust]) => {\n const top = el.offsetTop\n const bottom = el.offsetHeight + top\n return height\n - Math.max(0, top - y, adjust)\n - Math.max(0, height + y - bottom)\n }),\n distinctUntilChanged()\n )\n\n /* Compute whether the viewport offset is past the main area's top */\n const active$ = combineLatest([offset$, adjust$])\n .pipe(\n map(([{ y }, adjust]) => y >= el.offsetTop - adjust),\n distinctUntilChanged()\n )\n\n /* Combine into a single hot observable */\n return combineLatest([height$, adjust$, active$])\n .pipe(\n map(([height, adjust, active]) => ({\n offset: el.offsetTop - adjust,\n height,\n active\n })),\n shareReplay(1)\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport {\n MonoTypeOperatorFunction,\n animationFrameScheduler,\n pipe\n} from \"rxjs\"\nimport {\n distinctUntilKeyChanged,\n finalize,\n observeOn,\n tap\n} from \"rxjs/operators\"\n\nimport {\n resetHeaderShadow,\n setHeaderShadow\n} from \"../../../action\"\nimport { Main } from \"../../main\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint header shadow from source observable\n *\n * @param el - Header element\n *\n * @return Operator function\n */\nexport function paintHeaderShadow(\n el: HTMLElement\n): MonoTypeOperatorFunction
{\n return pipe(\n distinctUntilKeyChanged(\"active\"),\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(({ active }) => {\n setHeaderShadow(el, active)\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n resetHeaderShadow(el)\n })\n )\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set header shadow\n *\n * @param el - Header element\n * @param value - Whether the shadow is shown\n */\nexport function setHeaderShadow(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"shadow\" : \"\")\n}\n\n/**\n * Reset header shadow\n *\n * @param el - Header element\n */\nexport function resetHeaderShadow(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { Observable, fromEvent } from \"rxjs\"\nimport { pluck } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch toggle\n *\n * @param el - Toggle element\n *\n * @return Toggle observable\n */\nexport function watchToggle(\n el: HTMLInputElement\n): Observable {\n return fromEvent(el, \"change\")\n .pipe(\n pluck(\"checked\")\n )\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/material/assets/javascripts/search.js b/material/assets/javascripts/search.js new file mode 100644 index 000000000..9014905b7 --- /dev/null +++ b/material/assets/javascripts/search.js @@ -0,0 +1,59 @@ +!function(e){var t={};function r(i){if(t[i])return t[i].exports;var n=t[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,r),n.l=!0,n.exports}r.m=e,r.c=t,r.d=function(e,t,i){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:i})},r.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},r.t=function(e,t){if(1&t&&(e=r(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var i=Object.create(null);if(r.r(i),Object.defineProperty(i,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var n in e)r.d(i,n,function(t){return e[t]}.bind(null,n));return i},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=2)}([function(e,t,r){var i,n; +/** + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.6 + * Copyright (C) 2019 Oliver Nightingale + * @license MIT + */!function(){var s,o,a,u,l,c,h,d,f,p,y,m,g,x,v,w,Q,S,b,k,E,L,P,T,O,I,R=function(e){var t=new R.Builder;return t.pipeline.add(R.trimmer,R.stopWordFilter,R.stemmer),t.searchPipeline.add(R.stemmer),e.call(t,t),t.build()};R.version="2.3.6" +/*! + * lunr.utils + * Copyright (C) 2019 Oliver Nightingale + */,R.utils={},R.utils.warn=(s=this,function(e){s.console&&console.warn&&console.warn(e)}),R.utils.asString=function(e){return null==e?"":e.toString()},R.utils.clone=function(e){if(null==e)return e;for(var t=Object.create(null),r=Object.keys(e),i=0;i0){var u=R.utils.clone(t)||{};u.position=[o,a],u.index=n.length,n.push(new R.Token(r.slice(o,s),u))}o=s+1}}return n},R.tokenizer.separator=/[\s\-]+/ +/*! + * lunr.Pipeline + * Copyright (C) 2019 Oliver Nightingale + */,R.Pipeline=function(){this._stack=[]},R.Pipeline.registeredFunctions=Object.create(null),R.Pipeline.registerFunction=function(e,t){t in this.registeredFunctions&&R.utils.warn("Overwriting existing registered function: "+t),e.label=t,R.Pipeline.registeredFunctions[e.label]=e},R.Pipeline.warnIfFunctionNotRegistered=function(e){e.label&&e.label in this.registeredFunctions||R.utils.warn("Function is not registered with pipeline. This may cause problems when serialising the index.\n",e)},R.Pipeline.load=function(e){var t=new R.Pipeline;return e.forEach((function(e){var r=R.Pipeline.registeredFunctions[e];if(!r)throw new Error("Cannot load unregistered function: "+e);t.add(r)})),t},R.Pipeline.prototype.add=function(){var e=Array.prototype.slice.call(arguments);e.forEach((function(e){R.Pipeline.warnIfFunctionNotRegistered(e),this._stack.push(e)}),this)},R.Pipeline.prototype.after=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");r+=1,this._stack.splice(r,0,t)},R.Pipeline.prototype.before=function(e,t){R.Pipeline.warnIfFunctionNotRegistered(t);var r=this._stack.indexOf(e);if(-1==r)throw new Error("Cannot find existingFn");this._stack.splice(r,0,t)},R.Pipeline.prototype.remove=function(e){var t=this._stack.indexOf(e);-1!=t&&this._stack.splice(t,1)},R.Pipeline.prototype.run=function(e){for(var t=this._stack.length,r=0;r1&&(se&&(r=n),s!=e);)i=r-t,n=t+Math.floor(i/2),s=this.elements[2*n];return s==e?2*n:s>e?2*n:sa?l+=2:o==a&&(t+=r[u+1]*i[l+1],u+=2,l+=2);return t},R.Vector.prototype.similarity=function(e){return this.dot(e)/this.magnitude()||0},R.Vector.prototype.toArray=function(){for(var e=new Array(this.elements.length/2),t=1,r=0;t0){var s,o=n.str.charAt(0);o in n.node.edges?s=n.node.edges[o]:(s=new R.TokenSet,n.node.edges[o]=s),1==n.str.length&&(s.final=!0),i.push({node:s,editsRemaining:n.editsRemaining,str:n.str.slice(1)})}if(0!=n.editsRemaining){if("*"in n.node.edges)var a=n.node.edges["*"];else{a=new R.TokenSet;n.node.edges["*"]=a}if(0==n.str.length&&(a.final=!0),i.push({node:a,editsRemaining:n.editsRemaining-1,str:n.str}),n.str.length>1&&i.push({node:n.node,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)}),1==n.str.length&&(n.node.final=!0),n.str.length>=1){if("*"in n.node.edges)var u=n.node.edges["*"];else{u=new R.TokenSet;n.node.edges["*"]=u}1==n.str.length&&(u.final=!0),i.push({node:u,editsRemaining:n.editsRemaining-1,str:n.str.slice(1)})}if(n.str.length>1){var l,c=n.str.charAt(0),h=n.str.charAt(1);h in n.node.edges?l=n.node.edges[h]:(l=new R.TokenSet,n.node.edges[h]=l),1==n.str.length&&(l.final=!0),i.push({node:l,editsRemaining:n.editsRemaining-1,str:c+n.str.slice(2)})}}}return r},R.TokenSet.fromString=function(e){for(var t=new R.TokenSet,r=t,i=0,n=e.length;i=e;t--){var r=this.uncheckedNodes[t],i=r.child.toString();i in this.minimizedNodes?r.parent.edges[r.char]=this.minimizedNodes[i]:(r.child._str=i,this.minimizedNodes[i]=r.child),this.uncheckedNodes.pop()}} +/*! + * lunr.Index + * Copyright (C) 2019 Oliver Nightingale + */,R.Index=function(e){this.invertedIndex=e.invertedIndex,this.fieldVectors=e.fieldVectors,this.tokenSet=e.tokenSet,this.fields=e.fields,this.pipeline=e.pipeline},R.Index.prototype.search=function(e){return this.query((function(t){new R.QueryParser(e,t).parse()}))},R.Index.prototype.query=function(e){for(var t=new R.Query(this.fields),r=Object.create(null),i=Object.create(null),n=Object.create(null),s=Object.create(null),o=Object.create(null),a=0;a1?1:e},R.Builder.prototype.k1=function(e){this._k1=e},R.Builder.prototype.add=function(e,t){var r=e[this._ref],i=Object.keys(this._fields);this._documents[r]=t||{},this.documentCount+=1;for(var n=0;n=this.length)return R.QueryLexer.EOS;var e=this.str.charAt(this.pos);return this.pos+=1,e},R.QueryLexer.prototype.width=function(){return this.pos-this.start},R.QueryLexer.prototype.ignore=function(){this.start==this.pos&&(this.pos+=1),this.start=this.pos},R.QueryLexer.prototype.backup=function(){this.pos-=1},R.QueryLexer.prototype.acceptDigitRun=function(){var e,t;do{t=(e=this.next()).charCodeAt(0)}while(t>47&&t<58);e!=R.QueryLexer.EOS&&this.backup()},R.QueryLexer.prototype.more=function(){return this.pos1&&(e.backup(),e.emit(R.QueryLexer.TERM)),e.ignore(),e.more())return R.QueryLexer.lexText},R.QueryLexer.lexEditDistance=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.EDIT_DISTANCE),R.QueryLexer.lexText},R.QueryLexer.lexBoost=function(e){return e.ignore(),e.acceptDigitRun(),e.emit(R.QueryLexer.BOOST),R.QueryLexer.lexText},R.QueryLexer.lexEOS=function(e){e.width()>0&&e.emit(R.QueryLexer.TERM)},R.QueryLexer.termSeparator=R.tokenizer.separator,R.QueryLexer.lexText=function(e){for(;;){var t=e.next();if(t==R.QueryLexer.EOS)return R.QueryLexer.lexEOS;if(92!=t.charCodeAt(0)){if(":"==t)return R.QueryLexer.lexField;if("~"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexEditDistance;if("^"==t)return e.backup(),e.width()>0&&e.emit(R.QueryLexer.TERM),R.QueryLexer.lexBoost;if("+"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if("-"==t&&1===e.width())return e.emit(R.QueryLexer.PRESENCE),R.QueryLexer.lexText;if(t.match(R.QueryLexer.termSeparator))return R.QueryLexer.lexTerm}else e.escapeCharacter()}},R.QueryParser=function(e,t){this.lexer=new R.QueryLexer(e),this.query=t,this.currentClause={},this.lexemeIdx=0},R.QueryParser.prototype.parse=function(){this.lexer.run(),this.lexemes=this.lexer.lexemes;for(var e=R.QueryParser.parseClause;e;)e=e(this);return this.query},R.QueryParser.prototype.peekLexeme=function(){return this.lexemes[this.lexemeIdx]},R.QueryParser.prototype.consumeLexeme=function(){var e=this.peekLexeme();return this.lexemeIdx+=1,e},R.QueryParser.prototype.nextClause=function(){var e=this.currentClause;this.query.clause(e),this.currentClause={}},R.QueryParser.parseClause=function(e){var t=e.peekLexeme();if(null!=t)switch(t.type){case R.QueryLexer.PRESENCE:return R.QueryParser.parsePresence;case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:var r="expected either a field or a term, found "+t.type;throw t.str.length>=1&&(r+=" with value '"+t.str+"'"),new R.QueryParseError(r,t.start,t.end)}},R.QueryParser.parsePresence=function(e){var t=e.consumeLexeme();if(null!=t){switch(t.str){case"-":e.currentClause.presence=R.Query.presence.PROHIBITED;break;case"+":e.currentClause.presence=R.Query.presence.REQUIRED;break;default:var r="unrecognised presence operator'"+t.str+"'";throw new R.QueryParseError(r,t.start,t.end)}var i=e.peekLexeme();if(null==i){r="expecting term or field, found nothing";throw new R.QueryParseError(r,t.start,t.end)}switch(i.type){case R.QueryLexer.FIELD:return R.QueryParser.parseField;case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:r="expecting term or field, found '"+i.type+"'";throw new R.QueryParseError(r,i.start,i.end)}}},R.QueryParser.parseField=function(e){var t=e.consumeLexeme();if(null!=t){if(-1==e.query.allFields.indexOf(t.str)){var r=e.query.allFields.map((function(e){return"'"+e+"'"})).join(", "),i="unrecognised field '"+t.str+"', possible fields: "+r;throw new R.QueryParseError(i,t.start,t.end)}e.currentClause.fields=[t.str];var n=e.peekLexeme();if(null==n){i="expecting term, found nothing";throw new R.QueryParseError(i,t.start,t.end)}switch(n.type){case R.QueryLexer.TERM:return R.QueryParser.parseTerm;default:i="expecting term, found '"+n.type+"'";throw new R.QueryParseError(i,n.start,n.end)}}},R.QueryParser.parseTerm=function(e){var t=e.consumeLexeme();if(null!=t){e.currentClause.term=t.str.toLowerCase(),-1!=t.str.indexOf("*")&&(e.currentClause.usePipeline=!1);var r=e.peekLexeme();if(null!=r)switch(r.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:var i="Unexpected lexeme type '"+r.type+"'";throw new R.QueryParseError(i,r.start,r.end)}else e.nextClause()}},R.QueryParser.parseEditDistance=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="edit distance must be numeric";throw new R.QueryParseError(i,t.start,t.end)}e.currentClause.editDistance=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new R.QueryParseError(i,n.start,n.end)}else e.nextClause()}},R.QueryParser.parseBoost=function(e){var t=e.consumeLexeme();if(null!=t){var r=parseInt(t.str,10);if(isNaN(r)){var i="boost must be numeric";throw new R.QueryParseError(i,t.start,t.end)}e.currentClause.boost=r;var n=e.peekLexeme();if(null!=n)switch(n.type){case R.QueryLexer.TERM:return e.nextClause(),R.QueryParser.parseTerm;case R.QueryLexer.FIELD:return e.nextClause(),R.QueryParser.parseField;case R.QueryLexer.EDIT_DISTANCE:return R.QueryParser.parseEditDistance;case R.QueryLexer.BOOST:return R.QueryParser.parseBoost;case R.QueryLexer.PRESENCE:return e.nextClause(),R.QueryParser.parsePresence;default:i="Unexpected lexeme type '"+n.type+"'";throw new R.QueryParseError(i,n.start,n.end)}else e.nextClause()}},void 0===(n="function"==typeof(i=function(){return R})?i.call(t,r,t,e):i)||(e.exports=n)}()},function(e,t,r){"use strict"; +/*! + * escape-html + * Copyright(c) 2012-2013 TJ Holowaychuk + * Copyright(c) 2015 Andreas Lubbe + * Copyright(c) 2015 Tiancheng "Timothy" Gu + * MIT Licensed + */var i=/["'&<>]/;e.exports=function(e){var t,r=""+e,n=i.exec(r);if(!n)return r;var s="",o=0,a=0;for(o=n.index;o=e.length&&(e=void 0),{value:e&&e[i++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},a=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var i,n,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(i=s.next()).done;)o.push(i.value)}catch(e){n={error:e}}finally{try{i&&!i.done&&(r=s.return)&&r.call(s)}finally{if(n)throw n.error}}return o};var u,l=function(){function e(e){this.index=e}return e.from=function(t,r){t.config;var i=t.docs;return new e(s((function(){var e,t;this.pipeline.reset(),r.trimmer&&this.pipeline.add(s.trimmer),r.stopwords&&this.pipeline.add(s.stopWordFilter),this.field("title",{boost:10}),this.field("text"),this.ref("location");try{for(var u=o(function(e){var t,r,i=new Map;try{for(var s=o(e),u=s.next();!u.done;u=s.next()){var l=u.value,c=a(l.location.split("#"),2),h=c[0],d=c[1],f=l.location,p=l.title,y=n(l.text).replace(/\s+(?=[,.:;!?])/g,"").replace(/\s+/g," ");if(d){var m=i.get(h);m.section?i.set(f,{location:f,title:p,text:y,article:m}):(m.title=l.title,m.text=y,m.section=!0)}else i.set(f,{location:f,title:p,text:y,section:!1})}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=s.return)&&r.call(s)}finally{if(t)throw t.error}}return i}(i)),l=u.next();!l.done;l=u.next()){var c=a(l.value,2)[1];this.add(c)}}catch(t){e={error:t}}finally{try{l&&!l.done&&(t=u.return)&&t.call(u)}finally{if(e)throw e.error}}})))},e.fromString=function(t){return new e(s.Index.load(JSON.parse(t)))},e.prototype.toString=function(){return JSON.stringify(this.index)},e}();addEventListener("message",(function(e){var t=e.data;switch(t.type){case i.INIT:u=l.from(t.data,{stopwords:!0,trimmer:!0}),postMessage({res:0,term:"DONE"}),console.log("FINISHED INDEX");break;case i.DUMP:if(!u)throw new Error("TOOD: error handling");postMessage(u.toString());break;case i.QUERY:if(u){var r=t.data.trim().replace(/\s+|$/g,"* "),n=u.index.search(r);postMessage({res:n,term:r})}}}))}]); +//# sourceMappingURL=search.js.map \ No newline at end of file diff --git a/material/assets/javascripts/search.js.map b/material/assets/javascripts/search.js.map new file mode 100644 index 000000000..8964dc390 --- /dev/null +++ b/material/assets/javascripts/search.js.map @@ -0,0 +1 @@ +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/lunr/lunr.js","webpack:///./node_modules/escape-html/index.js","webpack:///./src/assets/javascripts/workers/search/_/index.ts","webpack:///./src/assets/javascripts/workers/search/index.ts"],"names":["installedModules","__webpack_require__","moduleId","exports","module","i","l","modules","call","m","c","d","name","getter","o","Object","defineProperty","enumerable","get","r","Symbol","toStringTag","value","t","mode","__esModule","ns","create","key","bind","n","object","property","prototype","hasOwnProperty","p","s","global","step2list","step3list","v","C","re_mgr0","re_mgr1","re_meq1","re_s_v","re_1a","re2_1a","re_1b","re2_1b","re_1b_2","re2_1b_2","re3_1b_2","re4_1b_2","re_1c","re_2","re_3","re_4","re2_4","re_5","re_5_1","re3_5","porterStemmer","lunr","config","builder","Builder","pipeline","add","trimmer","stopWordFilter","stemmer","searchPipeline","build","version","utils","warn","this","message","console","asString","obj","toString","clone","keys","length","val","Array","isArray","slice","TypeError","FieldRef","docRef","fieldName","stringValue","_stringValue","joiner","fromString","indexOf","fieldRef","undefined","Set","elements","complete","intersect","other","union","contains","empty","a","b","intersection","element","push","concat","idf","posting","documentCount","documentsWithTerm","x","Math","log","abs","Token","str","metadata","update","fn","tokenizer","map","toLowerCase","trim","len","tokens","sliceEnd","sliceStart","sliceLength","charAt","match","separator","tokenMetadata","Pipeline","_stack","registeredFunctions","registerFunction","label","warnIfFunctionNotRegistered","load","serialised","forEach","fnName","Error","fns","arguments","after","existingFn","newFn","pos","splice","before","remove","run","stackLength","memo","j","result","k","runString","token","reset","toJSON","Vector","_magnitude","positionForIndex","index","start","end","pivotPoint","floor","pivotIndex","insert","insertIdx","upsert","position","magnitude","sumOfSquares","elementsLength","sqrt","dot","otherVector","dotProduct","aLen","bLen","aVal","bVal","similarity","toArray","output","RegExp","w","stem","suffix","firstch","re","re2","re3","re4","substr","toUpperCase","test","replace","fp","exec","generateStopWordFilter","stopWords","words","reduce","stopWord","TokenSet","final","edges","id","_nextId","fromArray","arr","finish","root","fromClause","clause","fromFuzzyString","term","editDistance","stack","node","editsRemaining","frame","pop","noEditNode","char","insertionNode","substitutionNode","transposeNode","charA","charB","next","prefix","edge","_str","labels","sort","qNode","qEdges","qLen","nEdges","nLen","q","qEdge","nEdge","previousWord","uncheckedNodes","minimizedNodes","word","commonPrefix","minimize","child","nextNode","parent","downTo","childKey","Index","attrs","invertedIndex","fieldVectors","tokenSet","fields","search","queryString","query","QueryParser","parse","Query","matchingFields","queryVectors","termFieldCache","requiredMatches","prohibitedMatches","clauses","terms","clauseMatches","usePipeline","termTokenSet","expandedTerms","presence","REQUIRED","field","expandedTerm","termIndex","_index","fieldPosting","matchingDocumentRefs","termField","matchingDocumentsSet","PROHIBITED","boost","fieldMatch","matchingDocumentRef","matchingFieldRef","MatchData","allRequiredMatches","allProhibitedMatches","matchingFieldRefs","results","matches","isNegated","docMatch","fieldVector","score","matchData","combine","ref","serializedIndex","serializedVectors","serializedInvertedIndex","tokenSetBuilder","tuple","_ref","_fields","_documents","fieldTermFrequencies","fieldLengths","_b","_k1","metadataWhitelist","attributes","RangeError","number","k1","doc","extractor","fieldTerms","metadataKey","calculateAverageFieldLengths","fieldRefs","numberOfFields","accumulator","documentsWithField","averageFieldLength","createFieldVectors","fieldRefsLength","termIdfCache","fieldLength","termFrequencies","termsLength","fieldBoost","docBoost","scoreWithPrecision","tf","round","createTokenSet","use","args","unshift","apply","clonedMetadata","metadataKeys","otherMatchData","allFields","wildcard","String","NONE","LEADING","TRAILING","OPTIONAL","options","QueryParseError","QueryLexer","lexemes","escapeCharPositions","state","lexText","sliceString","subSlices","join","emit","type","escapeCharacter","EOS","width","ignore","backup","acceptDigitRun","charCode","charCodeAt","more","FIELD","TERM","EDIT_DISTANCE","BOOST","PRESENCE","lexField","lexer","lexTerm","lexEditDistance","lexBoost","lexEOS","termSeparator","currentClause","lexemeIdx","parseClause","peekLexeme","consumeLexeme","lexeme","nextClause","completedClause","parser","parsePresence","parseField","parseTerm","errorMessage","nextLexeme","possibleFields","f","parseEditDistance","parseBoost","parseInt","isNaN","matchHtmlRegExp","string","escape","html","lastIndex","substring","SearchMessageType","from","docs","SearchIndex","stopwords","Map","path","hash","location","title","text","article","section","set","preprocess","data","JSON","stringify","addEventListener","ev","INIT","postMessage","res","DUMP","QUERY"],"mappings":"aACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAI,EAAQL,GAAUM,KAAKJ,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBQ,EAAIF,EAGxBN,EAAoBS,EAAIV,EAGxBC,EAAoBU,EAAI,SAASR,EAASS,EAAMC,GAC3CZ,EAAoBa,EAAEX,EAASS,IAClCG,OAAOC,eAAeb,EAASS,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEZ,EAAoBkB,EAAI,SAAShB,GACX,oBAAXiB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeb,EAASiB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeb,EAAS,aAAc,CAAEmB,OAAO,KAQvDrB,EAAoBsB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQrB,EAAoBqB,IAC/B,EAAPE,EAAU,OAAOF,EACpB,GAAW,EAAPE,GAA8B,iBAAVF,GAAsBA,GAASA,EAAMG,WAAY,OAAOH,EAChF,IAAII,EAAKX,OAAOY,OAAO,MAGvB,GAFA1B,EAAoBkB,EAAEO,GACtBX,OAAOC,eAAeU,EAAI,UAAW,CAAET,YAAY,EAAMK,MAAOA,IACtD,EAAPE,GAA4B,iBAATF,EAAmB,IAAI,IAAIM,KAAON,EAAOrB,EAAoBU,EAAEe,EAAIE,EAAK,SAASA,GAAO,OAAON,EAAMM,IAAQC,KAAK,KAAMD,I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,EAAM/C,EAAMtF,cAAgBsF,EAAMtF,WAAY,OAAOsF,IAiBtEzG,EAAKO,eAAiBP,EAAKsJ,uBAAuB,CAChD,IACA,OACA,QACA,SACA,QACA,MACA,SACA,OACA,KACA,QACA,KACA,MACA,MACA,MACA,KACA,KACA,KACA,UACA,OACA,MACA,KACA,MACA,SACA,QACA,OACA,MACA,KACA,OACA,SACA,OACA,OACA,QACA,MACA,OACA,MACA,MACA,MACA,MACA,OACA,KACA,MACA,OACA,MACA,MACA,MACA,UACA,IACA,KACA,KACA,OACA,KACA,KACA,MACA,OACA,QACA,MACA,OACA,SACA,MACA,KACA,QACA,OACA,OACA,KACA,UACA,KACA,MACA,MACA,KACA,MACA,QACA,KACA,OACA,KACA,QACA,MACA,MACA,SACA,OACA,MACA,OACA,MACA,SACA,QACA,KACA,OACA,OACA,OACA,MACA,QACA,OACA,OACA,QACA,QACA,OACA,OACA,MACA,KACA,MACA,OACA,KACA,QACA,MACA,KACA,OACA,OACA,OACA,QACA,QACA,QACA,MACA,OACA,MACA,OACA,OACA,QACA,MACA,MACA,SAGFtJ,EAAK8E,SAASG,iBAAiBjF,EAAKO,eAAgB;;;;IAqBpDP,EAAKM,QAAU,SAAUmG,GACvB,OAAOA,EAAM1C,QAAO,SAAU1F,GAC5B,OAAOA,EAAE8K,QAAQ,OAAQ,IAAIA,QAAQ,OAAQ,QAIjDnJ,EAAK8E,SAASG,iBAAiBjF,EAAKM,QAAS;;;;IA2B7CN,EAAK2J,SAAW,WACd7I,KAAK8I,OAAQ,EACb9I,KAAK+I,MAAQ,GACb/I,KAAKgJ,GAAK9J,EAAK2J,SAASI,QACxB/J,EAAK2J,SAASI,SAAW,GAW3B/J,EAAK2J,SAASI,QAAU,EASxB/J,EAAK2J,SAASK,UAAY,SAAUC,GAGlC,IAFA,IAAI/J,EAAU,IAAIF,EAAK2J,SAASxJ,QAEvB7D,EAAI,EAAG+H,EAAM4F,EAAI3I,OAAQhF,EAAI+H,EAAK/H,IACzC4D,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I,kBACZ,MAEF,KAAKuT,EAAkBuB,KACrB,IAAIzR,EAGF,MAAM,IAAIvB,MAAM,wBAFhB8S,YAAYvR,EAAM5F,YAGpB,MAEF,KAAK8V,EAAkBwB,MAErB,GAAI1R,EAAO,CACT,IAAMuG,EAAQvM,EAAQiX,KAAK5T,OAAO+E,QAAQ,SAAU,MAC9CoP,EAAMxR,EAAMA,MAAMqG,OAAOE,GAG/BgL,YAAY,CAAEC,IAAG,EAAEhO,KAAM+C","file":"search.js","sourcesContent":[" \t// The module cache\n \tvar installedModules = {};\n\n \t// The require function\n \tfunction __webpack_require__(moduleId) {\n\n \t\t// Check if module is in cache\n \t\tif(installedModules[moduleId]) {\n \t\t\treturn installedModules[moduleId].exports;\n \t\t}\n \t\t// Create a new module (and put it into the cache)\n \t\tvar module = installedModules[moduleId] = {\n \t\t\ti: moduleId,\n \t\t\tl: false,\n \t\t\texports: {}\n \t\t};\n\n \t\t// Execute the module function\n \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n\n \t\t// Flag the module as loaded\n \t\tmodule.l = true;\n\n \t\t// Return the exports of the module\n \t\treturn module.exports;\n \t}\n\n\n \t// expose the modules object (__webpack_modules__)\n \t__webpack_require__.m = modules;\n\n \t// expose the module cache\n \t__webpack_require__.c = installedModules;\n\n \t// define getter function for harmony exports\n \t__webpack_require__.d = function(exports, name, getter) {\n \t\tif(!__webpack_require__.o(exports, name)) {\n \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n \t\t}\n \t};\n\n \t// define __esModule on exports\n \t__webpack_require__.r = function(exports) {\n \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n \t\t}\n \t\tObject.defineProperty(exports, '__esModule', { value: true });\n \t};\n\n \t// create a fake namespace object\n \t// mode & 1: value is a module id, require it\n \t// mode & 2: merge all properties of value into the ns\n \t// mode & 4: return value when already ns object\n \t// mode & 8|1: behave like require\n \t__webpack_require__.t = function(value, mode) {\n \t\tif(mode & 1) value = __webpack_require__(value);\n \t\tif(mode & 8) return value;\n \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n \t\tvar ns = Object.create(null);\n \t\t__webpack_require__.r(ns);\n \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n \t\treturn ns;\n \t};\n\n \t// getDefaultExport function for compatibility with non-harmony modules\n \t__webpack_require__.n = function(module) {\n \t\tvar getter = module && module.__esModule ?\n \t\t\tfunction getDefault() { return module['default']; } :\n \t\t\tfunction getModuleExports() { return module; };\n \t\t__webpack_require__.d(getter, 'a', getter);\n \t\treturn getter;\n \t};\n\n \t// Object.prototype.hasOwnProperty.call\n \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n\n \t// __webpack_public_path__\n \t__webpack_require__.p = \"\";\n\n\n \t// Load entry module and return exports\n \treturn __webpack_require__(__webpack_require__.s = 2);\n","/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.6\n * Copyright (C) 2019 Oliver Nightingale\n * @license MIT\n */\n\n;(function(){\n\n/**\n * A convenience function for configuring and constructing\n * a new lunr Index.\n *\n * A lunr.Builder instance is created and the pipeline setup\n * with a trimmer, stop word filter and stemmer.\n *\n * This builder object is yielded to the configuration function\n * that is passed as a parameter, allowing the list of fields\n * and other builder parameters to be customised.\n *\n * All documents _must_ be added within the passed config function.\n *\n * @example\n * var idx = lunr(function () {\n * this.field('title')\n * this.field('body')\n * this.ref('id')\n *\n * documents.forEach(function (doc) {\n * this.add(doc)\n * }, this)\n * })\n *\n * @see {@link lunr.Builder}\n * @see {@link lunr.Pipeline}\n * @see {@link lunr.trimmer}\n * @see {@link lunr.stopWordFilter}\n * @see {@link lunr.stemmer}\n * @namespace {function} lunr\n */\nvar lunr = function (config) {\n var builder = new lunr.Builder\n\n builder.pipeline.add(\n lunr.trimmer,\n lunr.stopWordFilter,\n lunr.stemmer\n )\n\n builder.searchPipeline.add(\n lunr.stemmer\n )\n\n config.call(builder, builder)\n return builder.build()\n}\n\nlunr.version = \"2.3.6\"\n/*!\n * lunr.utils\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A namespace containing utils for the rest of the lunr library\n * @namespace lunr.utils\n */\nlunr.utils = {}\n\n/**\n * Print a warning message to the console.\n *\n * @param {String} message The message to be printed.\n * @memberOf lunr.utils\n * @function\n */\nlunr.utils.warn = (function (global) {\n /* eslint-disable no-console */\n return function (message) {\n if (global.console && console.warn) {\n console.warn(message)\n }\n }\n /* eslint-enable no-console */\n})(this)\n\n/**\n * Convert an object to a string.\n *\n * In the case of `null` and `undefined` the function returns\n * the empty string, in all other cases the result of calling\n * `toString` on the passed object is returned.\n *\n * @param {Any} obj The object to convert to a string.\n * @return {String} string representation of the passed object.\n * @memberOf lunr.utils\n */\nlunr.utils.asString = function (obj) {\n if (obj === void 0 || obj === null) {\n return \"\"\n } else {\n return obj.toString()\n }\n}\n\n/**\n * Clones an object.\n *\n * Will create a copy of an existing object such that any mutations\n * on the copy cannot affect the original.\n *\n * Only shallow objects are supported, passing a nested object to this\n * function will cause a TypeError.\n *\n * Objects with primitives, and arrays of primitives are supported.\n *\n * @param {Object} obj The object to clone.\n * @return {Object} a clone of the passed object.\n * @throws {TypeError} when a nested object is passed.\n * @memberOf Utils\n */\nlunr.utils.clone = function (obj) {\n if (obj === null || obj === undefined) {\n return obj\n }\n\n var clone = Object.create(null),\n keys = Object.keys(obj)\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i],\n val = obj[key]\n\n if (Array.isArray(val)) {\n clone[key] = val.slice()\n continue\n }\n\n if (typeof val === 'string' ||\n typeof val === 'number' ||\n typeof val === 'boolean') {\n clone[key] = val\n continue\n }\n\n throw new TypeError(\"clone is not deep and does not support nested objects\")\n }\n\n return clone\n}\nlunr.FieldRef = function (docRef, fieldName, stringValue) {\n this.docRef = docRef\n this.fieldName = fieldName\n this._stringValue = stringValue\n}\n\nlunr.FieldRef.joiner = \"/\"\n\nlunr.FieldRef.fromString = function (s) {\n var n = s.indexOf(lunr.FieldRef.joiner)\n\n if (n === -1) {\n throw \"malformed field ref string\"\n }\n\n var fieldRef = s.slice(0, n),\n docRef = s.slice(n + 1)\n\n return new lunr.FieldRef (docRef, fieldRef, s)\n}\n\nlunr.FieldRef.prototype.toString = function () {\n if (this._stringValue == undefined) {\n this._stringValue = this.fieldName + lunr.FieldRef.joiner + this.docRef\n }\n\n return this._stringValue\n}\n/*!\n * lunr.Set\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A lunr set.\n *\n * @constructor\n */\nlunr.Set = function (elements) {\n this.elements = Object.create(null)\n\n if (elements) {\n this.length = elements.length\n\n for (var i = 0; i < this.length; i++) {\n this.elements[elements[i]] = true\n }\n } else {\n this.length = 0\n }\n}\n\n/**\n * A complete set that contains all elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.complete = {\n intersect: function (other) {\n return other\n },\n\n union: function (other) {\n return other\n },\n\n contains: function () {\n return true\n }\n}\n\n/**\n * An empty set that contains no elements.\n *\n * @static\n * @readonly\n * @type {lunr.Set}\n */\nlunr.Set.empty = {\n intersect: function () {\n return this\n },\n\n union: function (other) {\n return other\n },\n\n contains: function () {\n return false\n }\n}\n\n/**\n * Returns true if this set contains the specified object.\n *\n * @param {object} object - Object whose presence in this set is to be tested.\n * @returns {boolean} - True if this set contains the specified object.\n */\nlunr.Set.prototype.contains = function (object) {\n return !!this.elements[object]\n}\n\n/**\n * Returns a new set containing only the elements that are present in both\n * this set and the specified set.\n *\n * @param {lunr.Set} other - set to intersect with this set.\n * @returns {lunr.Set} a new set that is the intersection of this and the specified set.\n */\n\nlunr.Set.prototype.intersect = function (other) {\n var a, b, elements, intersection = []\n\n if (other === lunr.Set.complete) {\n return this\n }\n\n if (other === lunr.Set.empty) {\n return other\n }\n\n if (this.length < other.length) {\n a = this\n b = other\n } else {\n a = other\n b = this\n }\n\n elements = Object.keys(a.elements)\n\n for (var i = 0; i < elements.length; i++) {\n var element = elements[i]\n if (element in b.elements) {\n intersection.push(element)\n }\n }\n\n return new lunr.Set (intersection)\n}\n\n/**\n * Returns a new set combining the elements of this and the specified set.\n *\n * @param {lunr.Set} other - set to union with this set.\n * @return {lunr.Set} a new set that is the union of this and the specified set.\n */\n\nlunr.Set.prototype.union = function (other) {\n if (other === lunr.Set.complete) {\n return lunr.Set.complete\n }\n\n if (other === lunr.Set.empty) {\n return this\n }\n\n return new lunr.Set(Object.keys(this.elements).concat(Object.keys(other.elements)))\n}\n/**\n * A function to calculate the inverse document frequency for\n * a posting. This is shared between the builder and the index\n *\n * @private\n * @param {object} posting - The posting for a given term\n * @param {number} documentCount - The total number of documents.\n */\nlunr.idf = function (posting, documentCount) {\n var documentsWithTerm = 0\n\n for (var fieldName in posting) {\n if (fieldName == '_index') continue // Ignore the term index, its not a field\n documentsWithTerm += Object.keys(posting[fieldName]).length\n }\n\n var x = (documentCount - documentsWithTerm + 0.5) / (documentsWithTerm + 0.5)\n\n return Math.log(1 + Math.abs(x))\n}\n\n/**\n * A token wraps a string representation of a token\n * as it is passed through the text processing pipeline.\n *\n * @constructor\n * @param {string} [str=''] - The string token being wrapped.\n * @param {object} [metadata={}] - Metadata associated with this token.\n */\nlunr.Token = function (str, metadata) {\n this.str = str || \"\"\n this.metadata = metadata || {}\n}\n\n/**\n * Returns the token string that is being wrapped by this object.\n *\n * @returns {string}\n */\nlunr.Token.prototype.toString = function () {\n return this.str\n}\n\n/**\n * A token update function is used when updating or optionally\n * when cloning a token.\n *\n * @callback lunr.Token~updateFunction\n * @param {string} str - The string representation of the token.\n * @param {Object} metadata - All metadata associated with this token.\n */\n\n/**\n * Applies the given function to the wrapped string token.\n *\n * @example\n * token.update(function (str, metadata) {\n * return str.toUpperCase()\n * })\n *\n * @param {lunr.Token~updateFunction} fn - A function to apply to the token string.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.update = function (fn) {\n this.str = fn(this.str, this.metadata)\n return this\n}\n\n/**\n * Creates a clone of this token. Optionally a function can be\n * applied to the cloned token.\n *\n * @param {lunr.Token~updateFunction} [fn] - An optional function to apply to the cloned token.\n * @returns {lunr.Token}\n */\nlunr.Token.prototype.clone = function (fn) {\n fn = fn || function (s) { return s }\n return new lunr.Token (fn(this.str, this.metadata), this.metadata)\n}\n/*!\n * lunr.tokenizer\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A function for splitting a string into tokens ready to be inserted into\n * the search index. Uses `lunr.tokenizer.separator` to split strings, change\n * the value of this property to change how strings are split into tokens.\n *\n * This tokenizer will convert its parameter to a string by calling `toString` and\n * then will split this string on the character in `lunr.tokenizer.separator`.\n * Arrays will have their elements converted to strings and wrapped in a lunr.Token.\n *\n * Optional metadata can be passed to the tokenizer, this metadata will be cloned and\n * added as metadata to every token that is created from the object to be tokenized.\n *\n * @static\n * @param {?(string|object|object[])} obj - The object to convert into tokens\n * @param {?object} metadata - Optional metadata to associate with every token\n * @returns {lunr.Token[]}\n * @see {@link lunr.Pipeline}\n */\nlunr.tokenizer = function (obj, metadata) {\n if (obj == null || obj == undefined) {\n return []\n }\n\n if (Array.isArray(obj)) {\n return obj.map(function (t) {\n return new lunr.Token(\n lunr.utils.asString(t).toLowerCase(),\n lunr.utils.clone(metadata)\n )\n })\n }\n\n var str = obj.toString().trim().toLowerCase(),\n len = str.length,\n tokens = []\n\n for (var sliceEnd = 0, sliceStart = 0; sliceEnd <= len; sliceEnd++) {\n var char = str.charAt(sliceEnd),\n sliceLength = sliceEnd - sliceStart\n\n if ((char.match(lunr.tokenizer.separator) || sliceEnd == len)) {\n\n if (sliceLength > 0) {\n var tokenMetadata = lunr.utils.clone(metadata) || {}\n tokenMetadata[\"position\"] = [sliceStart, sliceLength]\n tokenMetadata[\"index\"] = tokens.length\n\n tokens.push(\n new lunr.Token (\n str.slice(sliceStart, sliceEnd),\n tokenMetadata\n )\n )\n }\n\n sliceStart = sliceEnd + 1\n }\n\n }\n\n return tokens\n}\n\n/**\n * The separator used to split a string into tokens. Override this property to change the behaviour of\n * `lunr.tokenizer` behaviour when tokenizing strings. By default this splits on whitespace and hyphens.\n *\n * @static\n * @see lunr.tokenizer\n */\nlunr.tokenizer.separator = /[\\s\\-]+/\n/*!\n * lunr.Pipeline\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.Pipelines maintain an ordered list of functions to be applied to all\n * tokens in documents entering the search index and queries being ran against\n * the index.\n *\n * An instance of lunr.Index created with the lunr shortcut will contain a\n * pipeline with a stop word filter and an English language stemmer. Extra\n * functions can be added before or after either of these functions or these\n * default functions can be removed.\n *\n * When run the pipeline will call each function in turn, passing a token, the\n * index of that token in the original list of all tokens and finally a list of\n * all the original tokens.\n *\n * The output of functions in the pipeline will be passed to the next function\n * in the pipeline. To exclude a token from entering the index the function\n * should return undefined, the rest of the pipeline will not be called with\n * this token.\n *\n * For serialisation of pipelines to work, all functions used in an instance of\n * a pipeline should be registered with lunr.Pipeline. Registered functions can\n * then be loaded. If trying to load a serialised pipeline that uses functions\n * that are not registered an error will be thrown.\n *\n * If not planning on serialising the pipeline then registering pipeline functions\n * is not necessary.\n *\n * @constructor\n */\nlunr.Pipeline = function () {\n this._stack = []\n}\n\nlunr.Pipeline.registeredFunctions = Object.create(null)\n\n/**\n * A pipeline function maps lunr.Token to lunr.Token. A lunr.Token contains the token\n * string as well as all known metadata. A pipeline function can mutate the token string\n * or mutate (or add) metadata for a given token.\n *\n * A pipeline function can indicate that the passed token should be discarded by returning\n * null. This token will not be passed to any downstream pipeline functions and will not be\n * added to the index.\n *\n * Multiple tokens can be returned by returning an array of tokens. Each token will be passed\n * to any downstream pipeline functions and all will returned tokens will be added to the index.\n *\n * Any number of pipeline functions may be chained together using a lunr.Pipeline.\n *\n * @interface lunr.PipelineFunction\n * @param {lunr.Token} token - A token from the document being processed.\n * @param {number} i - The index of this token in the complete list of tokens for this document/field.\n * @param {lunr.Token[]} tokens - All tokens for this document/field.\n * @returns {(?lunr.Token|lunr.Token[])}\n */\n\n/**\n * Register a function with the pipeline.\n *\n * Functions that are used in the pipeline should be registered if the pipeline\n * needs to be serialised, or a serialised pipeline needs to be loaded.\n *\n * Registering a function does not add it to a pipeline, functions must still be\n * added to instances of the pipeline for them to be used when running a pipeline.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @param {String} label - The label to register this function with\n */\nlunr.Pipeline.registerFunction = function (fn, label) {\n if (label in this.registeredFunctions) {\n lunr.utils.warn('Overwriting existing registered function: ' + label)\n }\n\n fn.label = label\n lunr.Pipeline.registeredFunctions[fn.label] = fn\n}\n\n/**\n * Warns if the function is not registered as a Pipeline function.\n *\n * @param {lunr.PipelineFunction} fn - The function to check for.\n * @private\n */\nlunr.Pipeline.warnIfFunctionNotRegistered = function (fn) {\n var isRegistered = fn.label && (fn.label in this.registeredFunctions)\n\n if (!isRegistered) {\n lunr.utils.warn('Function is not registered with pipeline. This may cause problems when serialising the index.\\n', fn)\n }\n}\n\n/**\n * Loads a previously serialised pipeline.\n *\n * All functions to be loaded must already be registered with lunr.Pipeline.\n * If any function from the serialised data has not been registered then an\n * error will be thrown.\n *\n * @param {Object} serialised - The serialised pipeline to load.\n * @returns {lunr.Pipeline}\n */\nlunr.Pipeline.load = function (serialised) {\n var pipeline = new lunr.Pipeline\n\n serialised.forEach(function (fnName) {\n var fn = lunr.Pipeline.registeredFunctions[fnName]\n\n if (fn) {\n pipeline.add(fn)\n } else {\n throw new Error('Cannot load unregistered function: ' + fnName)\n }\n })\n\n return pipeline\n}\n\n/**\n * Adds new functions to the end of the pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction[]} functions - Any number of functions to add to the pipeline.\n */\nlunr.Pipeline.prototype.add = function () {\n var fns = Array.prototype.slice.call(arguments)\n\n fns.forEach(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n this._stack.push(fn)\n }, this)\n}\n\n/**\n * Adds a single function after a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.after = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n pos = pos + 1\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Adds a single function before a function that already exists in the\n * pipeline.\n *\n * Logs a warning if the function has not been registered.\n *\n * @param {lunr.PipelineFunction} existingFn - A function that already exists in the pipeline.\n * @param {lunr.PipelineFunction} newFn - The new function to add to the pipeline.\n */\nlunr.Pipeline.prototype.before = function (existingFn, newFn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(newFn)\n\n var pos = this._stack.indexOf(existingFn)\n if (pos == -1) {\n throw new Error('Cannot find existingFn')\n }\n\n this._stack.splice(pos, 0, newFn)\n}\n\n/**\n * Removes a function from the pipeline.\n *\n * @param {lunr.PipelineFunction} fn The function to remove from the pipeline.\n */\nlunr.Pipeline.prototype.remove = function (fn) {\n var pos = this._stack.indexOf(fn)\n if (pos == -1) {\n return\n }\n\n this._stack.splice(pos, 1)\n}\n\n/**\n * Runs the current list of functions that make up the pipeline against the\n * passed tokens.\n *\n * @param {Array} tokens The tokens to run through the pipeline.\n * @returns {Array}\n */\nlunr.Pipeline.prototype.run = function (tokens) {\n var stackLength = this._stack.length\n\n for (var i = 0; i < stackLength; i++) {\n var fn = this._stack[i]\n var memo = []\n\n for (var j = 0; j < tokens.length; j++) {\n var result = fn(tokens[j], j, tokens)\n\n if (result === void 0 || result === '') continue\n\n if (Array.isArray(result)) {\n for (var k = 0; k < result.length; k++) {\n memo.push(result[k])\n }\n } else {\n memo.push(result)\n }\n }\n\n tokens = memo\n }\n\n return tokens\n}\n\n/**\n * Convenience method for passing a string through a pipeline and getting\n * strings out. This method takes care of wrapping the passed string in a\n * token and mapping the resulting tokens back to strings.\n *\n * @param {string} str - The string to pass through the pipeline.\n * @param {?object} metadata - Optional metadata to associate with the token\n * passed to the pipeline.\n * @returns {string[]}\n */\nlunr.Pipeline.prototype.runString = function (str, metadata) {\n var token = new lunr.Token (str, metadata)\n\n return this.run([token]).map(function (t) {\n return t.toString()\n })\n}\n\n/**\n * Resets the pipeline by removing any existing processors.\n *\n */\nlunr.Pipeline.prototype.reset = function () {\n this._stack = []\n}\n\n/**\n * Returns a representation of the pipeline ready for serialisation.\n *\n * Logs a warning if the function has not been registered.\n *\n * @returns {Array}\n */\nlunr.Pipeline.prototype.toJSON = function () {\n return this._stack.map(function (fn) {\n lunr.Pipeline.warnIfFunctionNotRegistered(fn)\n\n return fn.label\n })\n}\n/*!\n * lunr.Vector\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A vector is used to construct the vector space of documents and queries. These\n * vectors support operations to determine the similarity between two documents or\n * a document and a query.\n *\n * Normally no parameters are required for initializing a vector, but in the case of\n * loading a previously dumped vector the raw elements can be provided to the constructor.\n *\n * For performance reasons vectors are implemented with a flat array, where an elements\n * index is immediately followed by its value. E.g. [index, value, index, value]. This\n * allows the underlying array to be as sparse as possible and still offer decent\n * performance when being used for vector calculations.\n *\n * @constructor\n * @param {Number[]} [elements] - The flat list of element index and element value pairs.\n */\nlunr.Vector = function (elements) {\n this._magnitude = 0\n this.elements = elements || []\n}\n\n\n/**\n * Calculates the position within the vector to insert a given index.\n *\n * This is used internally by insert and upsert. If there are duplicate indexes then\n * the position is returned as if the value for that index were to be updated, but it\n * is the callers responsibility to check whether there is a duplicate at that index\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @returns {Number}\n */\nlunr.Vector.prototype.positionForIndex = function (index) {\n // For an empty vector the tuple can be inserted at the beginning\n if (this.elements.length == 0) {\n return 0\n }\n\n var start = 0,\n end = this.elements.length / 2,\n sliceLength = end - start,\n pivotPoint = Math.floor(sliceLength / 2),\n pivotIndex = this.elements[pivotPoint * 2]\n\n while (sliceLength > 1) {\n if (pivotIndex < index) {\n start = pivotPoint\n }\n\n if (pivotIndex > index) {\n end = pivotPoint\n }\n\n if (pivotIndex == index) {\n break\n }\n\n sliceLength = end - start\n pivotPoint = start + Math.floor(sliceLength / 2)\n pivotIndex = this.elements[pivotPoint * 2]\n }\n\n if (pivotIndex == index) {\n return pivotPoint * 2\n }\n\n if (pivotIndex > index) {\n return pivotPoint * 2\n }\n\n if (pivotIndex < index) {\n return (pivotPoint + 1) * 2\n }\n}\n\n/**\n * Inserts an element at an index within the vector.\n *\n * Does not allow duplicates, will throw an error if there is already an entry\n * for this index.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n */\nlunr.Vector.prototype.insert = function (insertIdx, val) {\n this.upsert(insertIdx, val, function () {\n throw \"duplicate index\"\n })\n}\n\n/**\n * Inserts or updates an existing index within the vector.\n *\n * @param {Number} insertIdx - The index at which the element should be inserted.\n * @param {Number} val - The value to be inserted into the vector.\n * @param {function} fn - A function that is called for updates, the existing value and the\n * requested value are passed as arguments\n */\nlunr.Vector.prototype.upsert = function (insertIdx, val, fn) {\n this._magnitude = 0\n var position = this.positionForIndex(insertIdx)\n\n if (this.elements[position] == insertIdx) {\n this.elements[position + 1] = fn(this.elements[position + 1], val)\n } else {\n this.elements.splice(position, 0, insertIdx, val)\n }\n}\n\n/**\n * Calculates the magnitude of this vector.\n *\n * @returns {Number}\n */\nlunr.Vector.prototype.magnitude = function () {\n if (this._magnitude) return this._magnitude\n\n var sumOfSquares = 0,\n elementsLength = this.elements.length\n\n for (var i = 1; i < elementsLength; i += 2) {\n var val = this.elements[i]\n sumOfSquares += val * val\n }\n\n return this._magnitude = Math.sqrt(sumOfSquares)\n}\n\n/**\n * Calculates the dot product of this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The vector to compute the dot product with.\n * @returns {Number}\n */\nlunr.Vector.prototype.dot = function (otherVector) {\n var dotProduct = 0,\n a = this.elements, b = otherVector.elements,\n aLen = a.length, bLen = b.length,\n aVal = 0, bVal = 0,\n i = 0, j = 0\n\n while (i < aLen && j < bLen) {\n aVal = a[i], bVal = b[j]\n if (aVal < bVal) {\n i += 2\n } else if (aVal > bVal) {\n j += 2\n } else if (aVal == bVal) {\n dotProduct += a[i + 1] * b[j + 1]\n i += 2\n j += 2\n }\n }\n\n return dotProduct\n}\n\n/**\n * Calculates the similarity between this vector and another vector.\n *\n * @param {lunr.Vector} otherVector - The other vector to calculate the\n * similarity with.\n * @returns {Number}\n */\nlunr.Vector.prototype.similarity = function (otherVector) {\n return this.dot(otherVector) / this.magnitude() || 0\n}\n\n/**\n * Converts the vector to an array of the elements within the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toArray = function () {\n var output = new Array (this.elements.length / 2)\n\n for (var i = 1, j = 0; i < this.elements.length; i += 2, j++) {\n output[j] = this.elements[i]\n }\n\n return output\n}\n\n/**\n * A JSON serializable representation of the vector.\n *\n * @returns {Number[]}\n */\nlunr.Vector.prototype.toJSON = function () {\n return this.elements\n}\n/* eslint-disable */\n/*!\n * lunr.stemmer\n * Copyright (C) 2019 Oliver Nightingale\n * Includes code from - http://tartarus.org/~martin/PorterStemmer/js.txt\n */\n\n/**\n * lunr.stemmer is an english language stemmer, this is a JavaScript\n * implementation of the PorterStemmer taken from http://tartarus.org/~martin\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token - The string to stem\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n * @function\n */\nlunr.stemmer = (function(){\n var step2list = {\n \"ational\" : \"ate\",\n \"tional\" : \"tion\",\n \"enci\" : \"ence\",\n \"anci\" : \"ance\",\n \"izer\" : \"ize\",\n \"bli\" : \"ble\",\n \"alli\" : \"al\",\n \"entli\" : \"ent\",\n \"eli\" : \"e\",\n \"ousli\" : \"ous\",\n \"ization\" : \"ize\",\n \"ation\" : \"ate\",\n \"ator\" : \"ate\",\n \"alism\" : \"al\",\n \"iveness\" : \"ive\",\n \"fulness\" : \"ful\",\n \"ousness\" : \"ous\",\n \"aliti\" : \"al\",\n \"iviti\" : \"ive\",\n \"biliti\" : \"ble\",\n \"logi\" : \"log\"\n },\n\n step3list = {\n \"icate\" : \"ic\",\n \"ative\" : \"\",\n \"alize\" : \"al\",\n \"iciti\" : \"ic\",\n \"ical\" : \"ic\",\n \"ful\" : \"\",\n \"ness\" : \"\"\n },\n\n c = \"[^aeiou]\", // consonant\n v = \"[aeiouy]\", // vowel\n C = c + \"[^aeiouy]*\", // consonant sequence\n V = v + \"[aeiou]*\", // vowel sequence\n\n mgr0 = \"^(\" + C + \")?\" + V + C, // [C]VC... is m>0\n meq1 = \"^(\" + C + \")?\" + V + C + \"(\" + V + \")?$\", // [C]VC[V] is m=1\n mgr1 = \"^(\" + C + \")?\" + V + C + V + C, // [C]VCVC... is m>1\n s_v = \"^(\" + C + \")?\" + v; // vowel in stem\n\n var re_mgr0 = new RegExp(mgr0);\n var re_mgr1 = new RegExp(mgr1);\n var re_meq1 = new RegExp(meq1);\n var re_s_v = new RegExp(s_v);\n\n var re_1a = /^(.+?)(ss|i)es$/;\n var re2_1a = /^(.+?)([^s])s$/;\n var re_1b = /^(.+?)eed$/;\n var re2_1b = /^(.+?)(ed|ing)$/;\n var re_1b_2 = /.$/;\n var re2_1b_2 = /(at|bl|iz)$/;\n var re3_1b_2 = new RegExp(\"([^aeiouylsz])\\\\1$\");\n var re4_1b_2 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var re_1c = /^(.+?[^aeiou])y$/;\n var re_2 = /^(.+?)(ational|tional|enci|anci|izer|bli|alli|entli|eli|ousli|ization|ation|ator|alism|iveness|fulness|ousness|aliti|iviti|biliti|logi)$/;\n\n var re_3 = /^(.+?)(icate|ative|alize|iciti|ical|ful|ness)$/;\n\n var re_4 = /^(.+?)(al|ance|ence|er|ic|able|ible|ant|ement|ment|ent|ou|ism|ate|iti|ous|ive|ize)$/;\n var re2_4 = /^(.+?)(s|t)(ion)$/;\n\n var re_5 = /^(.+?)e$/;\n var re_5_1 = /ll$/;\n var re3_5 = new RegExp(\"^\" + C + v + \"[^aeiouwxy]$\");\n\n var porterStemmer = function porterStemmer(w) {\n var stem,\n suffix,\n firstch,\n re,\n re2,\n re3,\n re4;\n\n if (w.length < 3) { return w; }\n\n firstch = w.substr(0,1);\n if (firstch == \"y\") {\n w = firstch.toUpperCase() + w.substr(1);\n }\n\n // Step 1a\n re = re_1a\n re2 = re2_1a;\n\n if (re.test(w)) { w = w.replace(re,\"$1$2\"); }\n else if (re2.test(w)) { w = w.replace(re2,\"$1$2\"); }\n\n // Step 1b\n re = re_1b;\n re2 = re2_1b;\n if (re.test(w)) {\n var fp = re.exec(w);\n re = re_mgr0;\n if (re.test(fp[1])) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1];\n re2 = re_s_v;\n if (re2.test(stem)) {\n w = stem;\n re2 = re2_1b_2;\n re3 = re3_1b_2;\n re4 = re4_1b_2;\n if (re2.test(w)) { w = w + \"e\"; }\n else if (re3.test(w)) { re = re_1b_2; w = w.replace(re,\"\"); }\n else if (re4.test(w)) { w = w + \"e\"; }\n }\n }\n\n // Step 1c - replace suffix y or Y by i if preceded by a non-vowel which is not the first letter of the word (so cry -> cri, by -> by, say -> say)\n re = re_1c;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n w = stem + \"i\";\n }\n\n // Step 2\n re = re_2;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step2list[suffix];\n }\n }\n\n // Step 3\n re = re_3;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n suffix = fp[2];\n re = re_mgr0;\n if (re.test(stem)) {\n w = stem + step3list[suffix];\n }\n }\n\n // Step 4\n re = re_4;\n re2 = re2_4;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n if (re.test(stem)) {\n w = stem;\n }\n } else if (re2.test(w)) {\n var fp = re2.exec(w);\n stem = fp[1] + fp[2];\n re2 = re_mgr1;\n if (re2.test(stem)) {\n w = stem;\n }\n }\n\n // Step 5\n re = re_5;\n if (re.test(w)) {\n var fp = re.exec(w);\n stem = fp[1];\n re = re_mgr1;\n re2 = re_meq1;\n re3 = re3_5;\n if (re.test(stem) || (re2.test(stem) && !(re3.test(stem)))) {\n w = stem;\n }\n }\n\n re = re_5_1;\n re2 = re_mgr1;\n if (re.test(w) && re2.test(w)) {\n re = re_1b_2;\n w = w.replace(re,\"\");\n }\n\n // and turn initial Y back to y\n\n if (firstch == \"y\") {\n w = firstch.toLowerCase() + w.substr(1);\n }\n\n return w;\n };\n\n return function (token) {\n return token.update(porterStemmer);\n }\n})();\n\nlunr.Pipeline.registerFunction(lunr.stemmer, 'stemmer')\n/*!\n * lunr.stopWordFilter\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.generateStopWordFilter builds a stopWordFilter function from the provided\n * list of stop words.\n *\n * The built in lunr.stopWordFilter is built using this generator and can be used\n * to generate custom stopWordFilters for applications or non English languages.\n *\n * @function\n * @param {Array} token The token to pass through the filter\n * @returns {lunr.PipelineFunction}\n * @see lunr.Pipeline\n * @see lunr.stopWordFilter\n */\nlunr.generateStopWordFilter = function (stopWords) {\n var words = stopWords.reduce(function (memo, stopWord) {\n memo[stopWord] = stopWord\n return memo\n }, {})\n\n return function (token) {\n if (token && words[token.toString()] !== token.toString()) return token\n }\n}\n\n/**\n * lunr.stopWordFilter is an English language stop word list filter, any words\n * contained in the list will not be passed through the filter.\n *\n * This is intended to be used in the Pipeline. If the token does not pass the\n * filter then undefined will be returned.\n *\n * @function\n * @implements {lunr.PipelineFunction}\n * @params {lunr.Token} token - A token to check for being a stop word.\n * @returns {lunr.Token}\n * @see {@link lunr.Pipeline}\n */\nlunr.stopWordFilter = lunr.generateStopWordFilter([\n 'a',\n 'able',\n 'about',\n 'across',\n 'after',\n 'all',\n 'almost',\n 'also',\n 'am',\n 'among',\n 'an',\n 'and',\n 'any',\n 'are',\n 'as',\n 'at',\n 'be',\n 'because',\n 'been',\n 'but',\n 'by',\n 'can',\n 'cannot',\n 'could',\n 'dear',\n 'did',\n 'do',\n 'does',\n 'either',\n 'else',\n 'ever',\n 'every',\n 'for',\n 'from',\n 'get',\n 'got',\n 'had',\n 'has',\n 'have',\n 'he',\n 'her',\n 'hers',\n 'him',\n 'his',\n 'how',\n 'however',\n 'i',\n 'if',\n 'in',\n 'into',\n 'is',\n 'it',\n 'its',\n 'just',\n 'least',\n 'let',\n 'like',\n 'likely',\n 'may',\n 'me',\n 'might',\n 'most',\n 'must',\n 'my',\n 'neither',\n 'no',\n 'nor',\n 'not',\n 'of',\n 'off',\n 'often',\n 'on',\n 'only',\n 'or',\n 'other',\n 'our',\n 'own',\n 'rather',\n 'said',\n 'say',\n 'says',\n 'she',\n 'should',\n 'since',\n 'so',\n 'some',\n 'than',\n 'that',\n 'the',\n 'their',\n 'them',\n 'then',\n 'there',\n 'these',\n 'they',\n 'this',\n 'tis',\n 'to',\n 'too',\n 'twas',\n 'us',\n 'wants',\n 'was',\n 'we',\n 'were',\n 'what',\n 'when',\n 'where',\n 'which',\n 'while',\n 'who',\n 'whom',\n 'why',\n 'will',\n 'with',\n 'would',\n 'yet',\n 'you',\n 'your'\n])\n\nlunr.Pipeline.registerFunction(lunr.stopWordFilter, 'stopWordFilter')\n/*!\n * lunr.trimmer\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.trimmer is a pipeline function for trimming non word\n * characters from the beginning and end of tokens before they\n * enter the index.\n *\n * This implementation may not work correctly for non latin\n * characters and should either be removed or adapted for use\n * with languages with non-latin characters.\n *\n * @static\n * @implements {lunr.PipelineFunction}\n * @param {lunr.Token} token The token to pass through the filter\n * @returns {lunr.Token}\n * @see lunr.Pipeline\n */\nlunr.trimmer = function (token) {\n return token.update(function (s) {\n return s.replace(/^\\W+/, '').replace(/\\W+$/, '')\n })\n}\n\nlunr.Pipeline.registerFunction(lunr.trimmer, 'trimmer')\n/*!\n * lunr.TokenSet\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * A token set is used to store the unique list of all tokens\n * within an index. Token sets are also used to represent an\n * incoming query to the index, this query token set and index\n * token set are then intersected to find which tokens to look\n * up in the inverted index.\n *\n * A token set can hold multiple tokens, as in the case of the\n * index token set, or it can hold a single token as in the\n * case of a simple query token set.\n *\n * Additionally token sets are used to perform wildcard matching.\n * Leading, contained and trailing wildcards are supported, and\n * from this edit distance matching can also be provided.\n *\n * Token sets are implemented as a minimal finite state automata,\n * where both common prefixes and suffixes are shared between tokens.\n * This helps to reduce the space used for storing the token set.\n *\n * @constructor\n */\nlunr.TokenSet = function () {\n this.final = false\n this.edges = {}\n this.id = lunr.TokenSet._nextId\n lunr.TokenSet._nextId += 1\n}\n\n/**\n * Keeps track of the next, auto increment, identifier to assign\n * to a new tokenSet.\n *\n * TokenSets require a unique identifier to be correctly minimised.\n *\n * @private\n */\nlunr.TokenSet._nextId = 1\n\n/**\n * Creates a TokenSet instance from the given sorted array of words.\n *\n * @param {String[]} arr - A sorted array of strings to create the set from.\n * @returns {lunr.TokenSet}\n * @throws Will throw an error if the input array is not sorted.\n */\nlunr.TokenSet.fromArray = function (arr) {\n var builder = new lunr.TokenSet.Builder\n\n for (var i = 0, len = arr.length; i < len; i++) {\n builder.insert(arr[i])\n }\n\n builder.finish()\n return builder.root\n}\n\n/**\n * Creates a token set from a query clause.\n *\n * @private\n * @param {Object} clause - A single clause from lunr.Query.\n * @param {string} clause.term - The query clause term.\n * @param {number} [clause.editDistance] - The optional edit distance for the term.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromClause = function (clause) {\n if ('editDistance' in clause) {\n return lunr.TokenSet.fromFuzzyString(clause.term, clause.editDistance)\n } else {\n return lunr.TokenSet.fromString(clause.term)\n }\n}\n\n/**\n * Creates a token set representing a single string with a specified\n * edit distance.\n *\n * Insertions, deletions, substitutions and transpositions are each\n * treated as an edit distance of 1.\n *\n * Increasing the allowed edit distance will have a dramatic impact\n * on the performance of both creating and intersecting these TokenSets.\n * It is advised to keep the edit distance less than 3.\n *\n * @param {string} str - The string to create the token set from.\n * @param {number} editDistance - The allowed edit distance to match.\n * @returns {lunr.Vector}\n */\nlunr.TokenSet.fromFuzzyString = function (str, editDistance) {\n var root = new lunr.TokenSet\n\n var stack = [{\n node: root,\n editsRemaining: editDistance,\n str: str\n }]\n\n while (stack.length) {\n var frame = stack.pop()\n\n // no edit\n if (frame.str.length > 0) {\n var char = frame.str.charAt(0),\n noEditNode\n\n if (char in frame.node.edges) {\n noEditNode = frame.node.edges[char]\n } else {\n noEditNode = new lunr.TokenSet\n frame.node.edges[char] = noEditNode\n }\n\n if (frame.str.length == 1) {\n noEditNode.final = true\n }\n\n stack.push({\n node: noEditNode,\n editsRemaining: frame.editsRemaining,\n str: frame.str.slice(1)\n })\n }\n\n if (frame.editsRemaining == 0) {\n continue\n }\n\n // insertion\n if (\"*\" in frame.node.edges) {\n var insertionNode = frame.node.edges[\"*\"]\n } else {\n var insertionNode = new lunr.TokenSet\n frame.node.edges[\"*\"] = insertionNode\n }\n\n if (frame.str.length == 0) {\n insertionNode.final = true\n }\n\n stack.push({\n node: insertionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str\n })\n\n // deletion\n // can only do a deletion if we have enough edits remaining\n // and if there are characters left to delete in the string\n if (frame.str.length > 1) {\n stack.push({\n node: frame.node,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n })\n }\n\n // deletion\n // just removing the last character from the str\n if (frame.str.length == 1) {\n frame.node.final = true\n }\n\n // substitution\n // can only do a substitution if we have enough edits remaining\n // and if there are characters left to substitute\n if (frame.str.length >= 1) {\n if (\"*\" in frame.node.edges) {\n var substitutionNode = frame.node.edges[\"*\"]\n } else {\n var substitutionNode = new lunr.TokenSet\n frame.node.edges[\"*\"] = substitutionNode\n }\n\n if (frame.str.length == 1) {\n substitutionNode.final = true\n }\n\n stack.push({\n node: substitutionNode,\n editsRemaining: frame.editsRemaining - 1,\n str: frame.str.slice(1)\n })\n }\n\n // transposition\n // can only do a transposition if there are edits remaining\n // and there are enough characters to transpose\n if (frame.str.length > 1) {\n var charA = frame.str.charAt(0),\n charB = frame.str.charAt(1),\n transposeNode\n\n if (charB in frame.node.edges) {\n transposeNode = frame.node.edges[charB]\n } else {\n transposeNode = new lunr.TokenSet\n frame.node.edges[charB] = transposeNode\n }\n\n if (frame.str.length == 1) {\n transposeNode.final = true\n }\n\n stack.push({\n node: transposeNode,\n editsRemaining: frame.editsRemaining - 1,\n str: charA + frame.str.slice(2)\n })\n }\n }\n\n return root\n}\n\n/**\n * Creates a TokenSet from a string.\n *\n * The string may contain one or more wildcard characters (*)\n * that will allow wildcard matching when intersecting with\n * another TokenSet.\n *\n * @param {string} str - The string to create a TokenSet from.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.fromString = function (str) {\n var node = new lunr.TokenSet,\n root = node\n\n /*\n * Iterates through all characters within the passed string\n * appending a node for each character.\n *\n * When a wildcard character is found then a self\n * referencing edge is introduced to continually match\n * any number of any characters.\n */\n for (var i = 0, len = str.length; i < len; i++) {\n var char = str[i],\n final = (i == len - 1)\n\n if (char == \"*\") {\n node.edges[char] = node\n node.final = final\n\n } else {\n var next = new lunr.TokenSet\n next.final = final\n\n node.edges[char] = next\n node = next\n }\n }\n\n return root\n}\n\n/**\n * Converts this TokenSet into an array of strings\n * contained within the TokenSet.\n *\n * @returns {string[]}\n */\nlunr.TokenSet.prototype.toArray = function () {\n var words = []\n\n var stack = [{\n prefix: \"\",\n node: this\n }]\n\n while (stack.length) {\n var frame = stack.pop(),\n edges = Object.keys(frame.node.edges),\n len = edges.length\n\n if (frame.node.final) {\n /* In Safari, at this point the prefix is sometimes corrupted, see:\n * https://github.com/olivernn/lunr.js/issues/279 Calling any\n * String.prototype method forces Safari to \"cast\" this string to what\n * it's supposed to be, fixing the bug. */\n frame.prefix.charAt(0)\n words.push(frame.prefix)\n }\n\n for (var i = 0; i < len; i++) {\n var edge = edges[i]\n\n stack.push({\n prefix: frame.prefix.concat(edge),\n node: frame.node.edges[edge]\n })\n }\n }\n\n return words\n}\n\n/**\n * Generates a string representation of a TokenSet.\n *\n * This is intended to allow TokenSets to be used as keys\n * in objects, largely to aid the construction and minimisation\n * of a TokenSet. As such it is not designed to be a human\n * friendly representation of the TokenSet.\n *\n * @returns {string}\n */\nlunr.TokenSet.prototype.toString = function () {\n // NOTE: Using Object.keys here as this.edges is very likely\n // to enter 'hash-mode' with many keys being added\n //\n // avoiding a for-in loop here as it leads to the function\n // being de-optimised (at least in V8). From some simple\n // benchmarks the performance is comparable, but allowing\n // V8 to optimize may mean easy performance wins in the future.\n\n if (this._str) {\n return this._str\n }\n\n var str = this.final ? '1' : '0',\n labels = Object.keys(this.edges).sort(),\n len = labels.length\n\n for (var i = 0; i < len; i++) {\n var label = labels[i],\n node = this.edges[label]\n\n str = str + label + node.id\n }\n\n return str\n}\n\n/**\n * Returns a new TokenSet that is the intersection of\n * this TokenSet and the passed TokenSet.\n *\n * This intersection will take into account any wildcards\n * contained within the TokenSet.\n *\n * @param {lunr.TokenSet} b - An other TokenSet to intersect with.\n * @returns {lunr.TokenSet}\n */\nlunr.TokenSet.prototype.intersect = function (b) {\n var output = new lunr.TokenSet,\n frame = undefined\n\n var stack = [{\n qNode: b,\n output: output,\n node: this\n }]\n\n while (stack.length) {\n frame = stack.pop()\n\n // NOTE: As with the #toString method, we are using\n // Object.keys and a for loop instead of a for-in loop\n // as both of these objects enter 'hash' mode, causing\n // the function to be de-optimised in V8\n var qEdges = Object.keys(frame.qNode.edges),\n qLen = qEdges.length,\n nEdges = Object.keys(frame.node.edges),\n nLen = nEdges.length\n\n for (var q = 0; q < qLen; q++) {\n var qEdge = qEdges[q]\n\n for (var n = 0; n < nLen; n++) {\n var nEdge = nEdges[n]\n\n if (nEdge == qEdge || qEdge == '*') {\n var node = frame.node.edges[nEdge],\n qNode = frame.qNode.edges[qEdge],\n final = node.final && qNode.final,\n next = undefined\n\n if (nEdge in frame.output.edges) {\n // an edge already exists for this character\n // no need to create a new node, just set the finality\n // bit unless this node is already final\n next = frame.output.edges[nEdge]\n next.final = next.final || final\n\n } else {\n // no edge exists yet, must create one\n // set the finality bit and insert it\n // into the output\n next = new lunr.TokenSet\n next.final = final\n frame.output.edges[nEdge] = next\n }\n\n stack.push({\n qNode: qNode,\n output: next,\n node: node\n })\n }\n }\n }\n }\n\n return output\n}\nlunr.TokenSet.Builder = function () {\n this.previousWord = \"\"\n this.root = new lunr.TokenSet\n this.uncheckedNodes = []\n this.minimizedNodes = {}\n}\n\nlunr.TokenSet.Builder.prototype.insert = function (word) {\n var node,\n commonPrefix = 0\n\n if (word < this.previousWord) {\n throw new Error (\"Out of order word insertion\")\n }\n\n for (var i = 0; i < word.length && i < this.previousWord.length; i++) {\n if (word[i] != this.previousWord[i]) break\n commonPrefix++\n }\n\n this.minimize(commonPrefix)\n\n if (this.uncheckedNodes.length == 0) {\n node = this.root\n } else {\n node = this.uncheckedNodes[this.uncheckedNodes.length - 1].child\n }\n\n for (var i = commonPrefix; i < word.length; i++) {\n var nextNode = new lunr.TokenSet,\n char = word[i]\n\n node.edges[char] = nextNode\n\n this.uncheckedNodes.push({\n parent: node,\n char: char,\n child: nextNode\n })\n\n node = nextNode\n }\n\n node.final = true\n this.previousWord = word\n}\n\nlunr.TokenSet.Builder.prototype.finish = function () {\n this.minimize(0)\n}\n\nlunr.TokenSet.Builder.prototype.minimize = function (downTo) {\n for (var i = this.uncheckedNodes.length - 1; i >= downTo; i--) {\n var node = this.uncheckedNodes[i],\n childKey = node.child.toString()\n\n if (childKey in this.minimizedNodes) {\n node.parent.edges[node.char] = this.minimizedNodes[childKey]\n } else {\n // Cache the key for this node since\n // we know it can't change anymore\n node.child._str = childKey\n\n this.minimizedNodes[childKey] = node.child\n }\n\n this.uncheckedNodes.pop()\n }\n}\n/*!\n * lunr.Index\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * An index contains the built index of all documents and provides a query interface\n * to the index.\n *\n * Usually instances of lunr.Index will not be created using this constructor, instead\n * lunr.Builder should be used to construct new indexes, or lunr.Index.load should be\n * used to load previously built and serialized indexes.\n *\n * @constructor\n * @param {Object} attrs - The attributes of the built search index.\n * @param {Object} attrs.invertedIndex - An index of term/field to document reference.\n * @param {Object} attrs.fieldVectors - Field vectors\n * @param {lunr.TokenSet} attrs.tokenSet - An set of all corpus tokens.\n * @param {string[]} attrs.fields - The names of indexed document fields.\n * @param {lunr.Pipeline} attrs.pipeline - The pipeline to use for search terms.\n */\nlunr.Index = function (attrs) {\n this.invertedIndex = attrs.invertedIndex\n this.fieldVectors = attrs.fieldVectors\n this.tokenSet = attrs.tokenSet\n this.fields = attrs.fields\n this.pipeline = attrs.pipeline\n}\n\n/**\n * A result contains details of a document matching a search query.\n * @typedef {Object} lunr.Index~Result\n * @property {string} ref - The reference of the document this result represents.\n * @property {number} score - A number between 0 and 1 representing how similar this document is to the query.\n * @property {lunr.MatchData} matchData - Contains metadata about this match including which term(s) caused the match.\n */\n\n/**\n * Although lunr provides the ability to create queries using lunr.Query, it also provides a simple\n * query language which itself is parsed into an instance of lunr.Query.\n *\n * For programmatically building queries it is advised to directly use lunr.Query, the query language\n * is best used for human entered text rather than program generated text.\n *\n * At its simplest queries can just be a single term, e.g. `hello`, multiple terms are also supported\n * and will be combined with OR, e.g `hello world` will match documents that contain either 'hello'\n * or 'world', though those that contain both will rank higher in the results.\n *\n * Wildcards can be included in terms to match one or more unspecified characters, these wildcards can\n * be inserted anywhere within the term, and more than one wildcard can exist in a single term. Adding\n * wildcards will increase the number of documents that will be found but can also have a negative\n * impact on query performance, especially with wildcards at the beginning of a term.\n *\n * Terms can be restricted to specific fields, e.g. `title:hello`, only documents with the term\n * hello in the title field will match this query. Using a field not present in the index will lead\n * to an error being thrown.\n *\n * Modifiers can also be added to terms, lunr supports edit distance and boost modifiers on terms. A term\n * boost will make documents matching that term score higher, e.g. `foo^5`. Edit distance is also supported\n * to provide fuzzy matching, e.g. 'hello~2' will match documents with hello with an edit distance of 2.\n * Avoid large values for edit distance to improve query performance.\n *\n * Each term also supports a presence modifier. By default a term's presence in document is optional, however\n * this can be changed to either required or prohibited. For a term's presence to be required in a document the\n * term should be prefixed with a '+', e.g. `+foo bar` is a search for documents that must contain 'foo' and\n * optionally contain 'bar'. Conversely a leading '-' sets the terms presence to prohibited, i.e. it must not\n * appear in a document, e.g. `-foo bar` is a search for documents that do not contain 'foo' but may contain 'bar'.\n *\n * To escape special characters the backslash character '\\' can be used, this allows searches to include\n * characters that would normally be considered modifiers, e.g. `foo\\~2` will search for a term \"foo~2\" instead\n * of attempting to apply a boost of 2 to the search term \"foo\".\n *\n * @typedef {string} lunr.Index~QueryString\n * @example Simple single term query\n * hello\n * @example Multiple term query\n * hello world\n * @example term scoped to a field\n * title:hello\n * @example term with a boost of 10\n * hello^10\n * @example term with an edit distance of 2\n * hello~2\n * @example terms with presence modifiers\n * -foo +bar baz\n */\n\n/**\n * Performs a search against the index using lunr query syntax.\n *\n * Results will be returned sorted by their score, the most relevant results\n * will be returned first. For details on how the score is calculated, please see\n * the {@link https://lunrjs.com/guides/searching.html#scoring|guide}.\n *\n * For more programmatic querying use lunr.Index#query.\n *\n * @param {lunr.Index~QueryString} queryString - A string containing a lunr query.\n * @throws {lunr.QueryParseError} If the passed query string cannot be parsed.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.search = function (queryString) {\n return this.query(function (query) {\n var parser = new lunr.QueryParser(queryString, query)\n parser.parse()\n })\n}\n\n/**\n * A query builder callback provides a query object to be used to express\n * the query to perform on the index.\n *\n * @callback lunr.Index~queryBuilder\n * @param {lunr.Query} query - The query object to build up.\n * @this lunr.Query\n */\n\n/**\n * Performs a query against the index using the yielded lunr.Query object.\n *\n * If performing programmatic queries against the index, this method is preferred\n * over lunr.Index#search so as to avoid the additional query parsing overhead.\n *\n * A query object is yielded to the supplied function which should be used to\n * express the query to be run against the index.\n *\n * Note that although this function takes a callback parameter it is _not_ an\n * asynchronous operation, the callback is just yielded a query object to be\n * customized.\n *\n * @param {lunr.Index~queryBuilder} fn - A function that is used to build the query.\n * @returns {lunr.Index~Result[]}\n */\nlunr.Index.prototype.query = function (fn) {\n // for each query clause\n // * process terms\n // * expand terms from token set\n // * find matching documents and metadata\n // * get document vectors\n // * score documents\n\n var query = new lunr.Query(this.fields),\n matchingFields = Object.create(null),\n queryVectors = Object.create(null),\n termFieldCache = Object.create(null),\n requiredMatches = Object.create(null),\n prohibitedMatches = Object.create(null)\n\n /*\n * To support field level boosts a query vector is created per\n * field. An empty vector is eagerly created to support negated\n * queries.\n */\n for (var i = 0; i < this.fields.length; i++) {\n queryVectors[this.fields[i]] = new lunr.Vector\n }\n\n fn.call(query, query)\n\n for (var i = 0; i < query.clauses.length; i++) {\n /*\n * Unless the pipeline has been disabled for this term, which is\n * the case for terms with wildcards, we need to pass the clause\n * term through the search pipeline. A pipeline returns an array\n * of processed terms. Pipeline functions may expand the passed\n * term, which means we may end up performing multiple index lookups\n * for a single query term.\n */\n var clause = query.clauses[i],\n terms = null,\n clauseMatches = lunr.Set.complete\n\n if (clause.usePipeline) {\n terms = this.pipeline.runString(clause.term, {\n fields: clause.fields\n })\n } else {\n terms = [clause.term]\n }\n\n for (var m = 0; m < terms.length; m++) {\n var term = terms[m]\n\n /*\n * Each term returned from the pipeline needs to use the same query\n * clause object, e.g. the same boost and or edit distance. The\n * simplest way to do this is to re-use the clause object but mutate\n * its term property.\n */\n clause.term = term\n\n /*\n * From the term in the clause we create a token set which will then\n * be used to intersect the indexes token set to get a list of terms\n * to lookup in the inverted index\n */\n var termTokenSet = lunr.TokenSet.fromClause(clause),\n expandedTerms = this.tokenSet.intersect(termTokenSet).toArray()\n\n /*\n * If a term marked as required does not exist in the tokenSet it is\n * impossible for the search to return any matches. We set all the field\n * scoped required matches set to empty and stop examining any further\n * clauses.\n */\n if (expandedTerms.length === 0 && clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k]\n requiredMatches[field] = lunr.Set.empty\n }\n\n break\n }\n\n for (var j = 0; j < expandedTerms.length; j++) {\n /*\n * For each term get the posting and termIndex, this is required for\n * building the query vector.\n */\n var expandedTerm = expandedTerms[j],\n posting = this.invertedIndex[expandedTerm],\n termIndex = posting._index\n\n for (var k = 0; k < clause.fields.length; k++) {\n /*\n * For each field that this query term is scoped by (by default\n * all fields are in scope) we need to get all the document refs\n * that have this term in that field.\n *\n * The posting is the entry in the invertedIndex for the matching\n * term from above.\n */\n var field = clause.fields[k],\n fieldPosting = posting[field],\n matchingDocumentRefs = Object.keys(fieldPosting),\n termField = expandedTerm + \"/\" + field,\n matchingDocumentsSet = new lunr.Set(matchingDocumentRefs)\n\n /*\n * if the presence of this term is required ensure that the matching\n * documents are added to the set of required matches for this clause.\n *\n */\n if (clause.presence == lunr.Query.presence.REQUIRED) {\n clauseMatches = clauseMatches.union(matchingDocumentsSet)\n\n if (requiredMatches[field] === undefined) {\n requiredMatches[field] = lunr.Set.complete\n }\n }\n\n /*\n * if the presence of this term is prohibited ensure that the matching\n * documents are added to the set of prohibited matches for this field,\n * creating that set if it does not yet exist.\n */\n if (clause.presence == lunr.Query.presence.PROHIBITED) {\n if (prohibitedMatches[field] === undefined) {\n prohibitedMatches[field] = lunr.Set.empty\n }\n\n prohibitedMatches[field] = prohibitedMatches[field].union(matchingDocumentsSet)\n\n /*\n * Prohibited matches should not be part of the query vector used for\n * similarity scoring and no metadata should be extracted so we continue\n * to the next field\n */\n continue\n }\n\n /*\n * The query field vector is populated using the termIndex found for\n * the term and a unit value with the appropriate boost applied.\n * Using upsert because there could already be an entry in the vector\n * for the term we are working with. In that case we just add the scores\n * together.\n */\n queryVectors[field].upsert(termIndex, clause.boost, function (a, b) { return a + b })\n\n /**\n * If we've already seen this term, field combo then we've already collected\n * the matching documents and metadata, no need to go through all that again\n */\n if (termFieldCache[termField]) {\n continue\n }\n\n for (var l = 0; l < matchingDocumentRefs.length; l++) {\n /*\n * All metadata for this term/field/document triple\n * are then extracted and collected into an instance\n * of lunr.MatchData ready to be returned in the query\n * results\n */\n var matchingDocumentRef = matchingDocumentRefs[l],\n matchingFieldRef = new lunr.FieldRef (matchingDocumentRef, field),\n metadata = fieldPosting[matchingDocumentRef],\n fieldMatch\n\n if ((fieldMatch = matchingFields[matchingFieldRef]) === undefined) {\n matchingFields[matchingFieldRef] = new lunr.MatchData (expandedTerm, field, metadata)\n } else {\n fieldMatch.add(expandedTerm, field, metadata)\n }\n\n }\n\n termFieldCache[termField] = true\n }\n }\n }\n\n /**\n * If the presence was required we need to update the requiredMatches field sets.\n * We do this after all fields for the term have collected their matches because\n * the clause terms presence is required in _any_ of the fields not _all_ of the\n * fields.\n */\n if (clause.presence === lunr.Query.presence.REQUIRED) {\n for (var k = 0; k < clause.fields.length; k++) {\n var field = clause.fields[k]\n requiredMatches[field] = requiredMatches[field].intersect(clauseMatches)\n }\n }\n }\n\n /**\n * Need to combine the field scoped required and prohibited\n * matching documents into a global set of required and prohibited\n * matches\n */\n var allRequiredMatches = lunr.Set.complete,\n allProhibitedMatches = lunr.Set.empty\n\n for (var i = 0; i < this.fields.length; i++) {\n var field = this.fields[i]\n\n if (requiredMatches[field]) {\n allRequiredMatches = allRequiredMatches.intersect(requiredMatches[field])\n }\n\n if (prohibitedMatches[field]) {\n allProhibitedMatches = allProhibitedMatches.union(prohibitedMatches[field])\n }\n }\n\n var matchingFieldRefs = Object.keys(matchingFields),\n results = [],\n matches = Object.create(null)\n\n /*\n * If the query is negated (contains only prohibited terms)\n * we need to get _all_ fieldRefs currently existing in the\n * index. This is only done when we know that the query is\n * entirely prohibited terms to avoid any cost of getting all\n * fieldRefs unnecessarily.\n *\n * Additionally, blank MatchData must be created to correctly\n * populate the results.\n */\n if (query.isNegated()) {\n matchingFieldRefs = Object.keys(this.fieldVectors)\n\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n var matchingFieldRef = matchingFieldRefs[i]\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRef)\n matchingFields[matchingFieldRef] = new lunr.MatchData\n }\n }\n\n for (var i = 0; i < matchingFieldRefs.length; i++) {\n /*\n * Currently we have document fields that match the query, but we\n * need to return documents. The matchData and scores are combined\n * from multiple fields belonging to the same document.\n *\n * Scores are calculated by field, using the query vectors created\n * above, and combined into a final document score using addition.\n */\n var fieldRef = lunr.FieldRef.fromString(matchingFieldRefs[i]),\n docRef = fieldRef.docRef\n\n if (!allRequiredMatches.contains(docRef)) {\n continue\n }\n\n if (allProhibitedMatches.contains(docRef)) {\n continue\n }\n\n var fieldVector = this.fieldVectors[fieldRef],\n score = queryVectors[fieldRef.fieldName].similarity(fieldVector),\n docMatch\n\n if ((docMatch = matches[docRef]) !== undefined) {\n docMatch.score += score\n docMatch.matchData.combine(matchingFields[fieldRef])\n } else {\n var match = {\n ref: docRef,\n score: score,\n matchData: matchingFields[fieldRef]\n }\n matches[docRef] = match\n results.push(match)\n }\n }\n\n /*\n * Sort the results objects by score, highest first.\n */\n return results.sort(function (a, b) {\n return b.score - a.score\n })\n}\n\n/**\n * Prepares the index for JSON serialization.\n *\n * The schema for this JSON blob will be described in a\n * separate JSON schema file.\n *\n * @returns {Object}\n */\nlunr.Index.prototype.toJSON = function () {\n var invertedIndex = Object.keys(this.invertedIndex)\n .sort()\n .map(function (term) {\n return [term, this.invertedIndex[term]]\n }, this)\n\n var fieldVectors = Object.keys(this.fieldVectors)\n .map(function (ref) {\n return [ref, this.fieldVectors[ref].toJSON()]\n }, this)\n\n return {\n version: lunr.version,\n fields: this.fields,\n fieldVectors: fieldVectors,\n invertedIndex: invertedIndex,\n pipeline: this.pipeline.toJSON()\n }\n}\n\n/**\n * Loads a previously serialized lunr.Index\n *\n * @param {Object} serializedIndex - A previously serialized lunr.Index\n * @returns {lunr.Index}\n */\nlunr.Index.load = function (serializedIndex) {\n var attrs = {},\n fieldVectors = {},\n serializedVectors = serializedIndex.fieldVectors,\n invertedIndex = Object.create(null),\n serializedInvertedIndex = serializedIndex.invertedIndex,\n tokenSetBuilder = new lunr.TokenSet.Builder,\n pipeline = lunr.Pipeline.load(serializedIndex.pipeline)\n\n if (serializedIndex.version != lunr.version) {\n lunr.utils.warn(\"Version mismatch when loading serialised index. Current version of lunr '\" + lunr.version + \"' does not match serialized index '\" + serializedIndex.version + \"'\")\n }\n\n for (var i = 0; i < serializedVectors.length; i++) {\n var tuple = serializedVectors[i],\n ref = tuple[0],\n elements = tuple[1]\n\n fieldVectors[ref] = new lunr.Vector(elements)\n }\n\n for (var i = 0; i < serializedInvertedIndex.length; i++) {\n var tuple = serializedInvertedIndex[i],\n term = tuple[0],\n posting = tuple[1]\n\n tokenSetBuilder.insert(term)\n invertedIndex[term] = posting\n }\n\n tokenSetBuilder.finish()\n\n attrs.fields = serializedIndex.fields\n\n attrs.fieldVectors = fieldVectors\n attrs.invertedIndex = invertedIndex\n attrs.tokenSet = tokenSetBuilder.root\n attrs.pipeline = pipeline\n\n return new lunr.Index(attrs)\n}\n/*!\n * lunr.Builder\n * Copyright (C) 2019 Oliver Nightingale\n */\n\n/**\n * lunr.Builder performs indexing on a set of documents and\n * returns instances of lunr.Index ready for querying.\n *\n * All configuration of the index is done via the builder, the\n * fields to index, the document reference, the text processing\n * pipeline and document scoring parameters are all set on the\n * builder before indexing.\n *\n * @constructor\n * @property {string} _ref - Internal reference to the document reference field.\n * @property {string[]} _fields - Internal reference to the document fields to index.\n * @property {object} invertedIndex - The inverted index maps terms to document fields.\n * @property {object} documentTermFrequencies - Keeps track of document term frequencies.\n * @property {object} documentLengths - Keeps track of the length of documents added to the index.\n * @property {lunr.tokenizer} tokenizer - Function for splitting strings into tokens for indexing.\n * @property {lunr.Pipeline} pipeline - The pipeline performs text processing on tokens before indexing.\n * @property {lunr.Pipeline} searchPipeline - A pipeline for processing search terms before querying the index.\n * @property {number} documentCount - Keeps track of the total number of documents indexed.\n * @property {number} _b - A parameter to control field length normalization, setting this to 0 disabled normalization, 1 fully normalizes field lengths, the default value is 0.75.\n * @property {number} _k1 - A parameter to control how quickly an increase in term frequency results in term frequency saturation, the default value is 1.2.\n * @property {number} termIndex - A counter incremented for each unique term, used to identify a terms position in the vector space.\n * @property {array} metadataWhitelist - A list of metadata keys that have been whitelisted for entry in the index.\n */\nlunr.Builder = function () {\n this._ref = \"id\"\n this._fields = Object.create(null)\n this._documents = Object.create(null)\n this.invertedIndex = Object.create(null)\n this.fieldTermFrequencies = {}\n this.fieldLengths = {}\n this.tokenizer = lunr.tokenizer\n this.pipeline = new lunr.Pipeline\n this.searchPipeline = new lunr.Pipeline\n this.documentCount = 0\n this._b = 0.75\n this._k1 = 1.2\n this.termIndex = 0\n this.metadataWhitelist = []\n}\n\n/**\n * Sets the document field used as the document reference. Every document must have this field.\n * The type of this field in the document should be a string, if it is not a string it will be\n * coerced into a string by calling toString.\n *\n * The default ref is 'id'.\n *\n * The ref should _not_ be changed during indexing, it should be set before any documents are\n * added to the index. Changing it during indexing can lead to inconsistent results.\n *\n * @param {string} ref - The name of the reference field in the document.\n */\nlunr.Builder.prototype.ref = function (ref) {\n this._ref = ref\n}\n\n/**\n * A function that is used to extract a field from a document.\n *\n * Lunr expects a field to be at the top level of a document, if however the field\n * is deeply nested within a document an extractor function can be used to extract\n * the right field for indexing.\n *\n * @callback fieldExtractor\n * @param {object} doc - The document being added to the index.\n * @returns {?(string|object|object[])} obj - The object that will be indexed for this field.\n * @example Extracting a nested field\n * function (doc) { return doc.nested.field }\n */\n\n/**\n * Adds a field to the list of document fields that will be indexed. Every document being\n * indexed should have this field. Null values for this field in indexed documents will\n * not cause errors but will limit the chance of that document being retrieved by searches.\n *\n * All fields should be added before adding documents to the index. Adding fields after\n * a document has been indexed will have no effect on already indexed documents.\n *\n * Fields can be boosted at build time. This allows terms within that field to have more\n * importance when ranking search results. Use a field boost to specify that matches within\n * one field are more important than other fields.\n *\n * @param {string} fieldName - The name of a field to index in all documents.\n * @param {object} attributes - Optional attributes associated with this field.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this field.\n * @param {fieldExtractor} [attributes.extractor] - Function to extract a field from a document.\n * @throws {RangeError} fieldName cannot contain unsupported characters '/'\n */\nlunr.Builder.prototype.field = function (fieldName, attributes) {\n if (/\\//.test(fieldName)) {\n throw new RangeError (\"Field '\" + fieldName + \"' contains illegal character '/'\")\n }\n\n this._fields[fieldName] = attributes || {}\n}\n\n/**\n * A parameter to tune the amount of field length normalisation that is applied when\n * calculating relevance scores. A value of 0 will completely disable any normalisation\n * and a value of 1 will fully normalise field lengths. The default is 0.75. Values of b\n * will be clamped to the range 0 - 1.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.b = function (number) {\n if (number < 0) {\n this._b = 0\n } else if (number > 1) {\n this._b = 1\n } else {\n this._b = number\n }\n}\n\n/**\n * A parameter that controls the speed at which a rise in term frequency results in term\n * frequency saturation. The default value is 1.2. Setting this to a higher value will give\n * slower saturation levels, a lower value will result in quicker saturation.\n *\n * @param {number} number - The value to set for this tuning parameter.\n */\nlunr.Builder.prototype.k1 = function (number) {\n this._k1 = number\n}\n\n/**\n * Adds a document to the index.\n *\n * Before adding fields to the index the index should have been fully setup, with the document\n * ref and all fields to index already having been specified.\n *\n * The document must have a field name as specified by the ref (by default this is 'id') and\n * it should have all fields defined for indexing, though null or undefined values will not\n * cause errors.\n *\n * Entire documents can be boosted at build time. Applying a boost to a document indicates that\n * this document should rank higher in search results than other documents.\n *\n * @param {object} doc - The document to add to the index.\n * @param {object} attributes - Optional attributes associated with this document.\n * @param {number} [attributes.boost=1] - Boost applied to all terms within this document.\n */\nlunr.Builder.prototype.add = function (doc, attributes) {\n var docRef = doc[this._ref],\n fields = Object.keys(this._fields)\n\n this._documents[docRef] = attributes || {}\n this.documentCount += 1\n\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i],\n extractor = this._fields[fieldName].extractor,\n field = extractor ? extractor(doc) : doc[fieldName],\n tokens = this.tokenizer(field, {\n fields: [fieldName]\n }),\n terms = this.pipeline.run(tokens),\n fieldRef = new lunr.FieldRef (docRef, fieldName),\n fieldTerms = Object.create(null)\n\n this.fieldTermFrequencies[fieldRef] = fieldTerms\n this.fieldLengths[fieldRef] = 0\n\n // store the length of this field for this document\n this.fieldLengths[fieldRef] += terms.length\n\n // calculate term frequencies for this field\n for (var j = 0; j < terms.length; j++) {\n var term = terms[j]\n\n if (fieldTerms[term] == undefined) {\n fieldTerms[term] = 0\n }\n\n fieldTerms[term] += 1\n\n // add to inverted index\n // create an initial posting if one doesn't exist\n if (this.invertedIndex[term] == undefined) {\n var posting = Object.create(null)\n posting[\"_index\"] = this.termIndex\n this.termIndex += 1\n\n for (var k = 0; k < fields.length; k++) {\n posting[fields[k]] = Object.create(null)\n }\n\n this.invertedIndex[term] = posting\n }\n\n // add an entry for this term/fieldName/docRef to the invertedIndex\n if (this.invertedIndex[term][fieldName][docRef] == undefined) {\n this.invertedIndex[term][fieldName][docRef] = Object.create(null)\n }\n\n // store all whitelisted metadata about this token in the\n // inverted index\n for (var l = 0; l < this.metadataWhitelist.length; l++) {\n var metadataKey = this.metadataWhitelist[l],\n metadata = term.metadata[metadataKey]\n\n if (this.invertedIndex[term][fieldName][docRef][metadataKey] == undefined) {\n this.invertedIndex[term][fieldName][docRef][metadataKey] = []\n }\n\n this.invertedIndex[term][fieldName][docRef][metadataKey].push(metadata)\n }\n }\n\n }\n}\n\n/**\n * Calculates the average document length for this index\n *\n * @private\n */\nlunr.Builder.prototype.calculateAverageFieldLengths = function () {\n\n var fieldRefs = Object.keys(this.fieldLengths),\n numberOfFields = fieldRefs.length,\n accumulator = {},\n documentsWithField = {}\n\n for (var i = 0; i < numberOfFields; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n field = fieldRef.fieldName\n\n documentsWithField[field] || (documentsWithField[field] = 0)\n documentsWithField[field] += 1\n\n accumulator[field] || (accumulator[field] = 0)\n accumulator[field] += this.fieldLengths[fieldRef]\n }\n\n var fields = Object.keys(this._fields)\n\n for (var i = 0; i < fields.length; i++) {\n var fieldName = fields[i]\n accumulator[fieldName] = accumulator[fieldName] / documentsWithField[fieldName]\n }\n\n this.averageFieldLength = accumulator\n}\n\n/**\n * Builds a vector space model of every document using lunr.Vector\n *\n * @private\n */\nlunr.Builder.prototype.createFieldVectors = function () {\n var fieldVectors = {},\n fieldRefs = Object.keys(this.fieldTermFrequencies),\n fieldRefsLength = fieldRefs.length,\n termIdfCache = Object.create(null)\n\n for (var i = 0; i < fieldRefsLength; i++) {\n var fieldRef = lunr.FieldRef.fromString(fieldRefs[i]),\n fieldName = fieldRef.fieldName,\n fieldLength = this.fieldLengths[fieldRef],\n fieldVector = new lunr.Vector,\n termFrequencies = this.fieldTermFrequencies[fieldRef],\n terms = Object.keys(termFrequencies),\n termsLength = terms.length\n\n\n var fieldBoost = this._fields[fieldName].boost || 1,\n docBoost = this._documents[fieldRef.docRef].boost || 1\n\n for (var j = 0; j < termsLength; j++) {\n var term = terms[j],\n tf = termFrequencies[term],\n termIndex = this.invertedIndex[term]._index,\n idf, score, scoreWithPrecision\n\n if (termIdfCache[term] === undefined) {\n idf = lunr.idf(this.invertedIndex[term], this.documentCount)\n termIdfCache[term] = idf\n } else {\n idf = termIdfCache[term]\n }\n\n score = idf * ((this._k1 + 1) * tf) / (this._k1 * (1 - this._b + this._b * (fieldLength / this.averageFieldLength[fieldName])) + tf)\n score *= fieldBoost\n score *= docBoost\n scoreWithPrecision = Math.round(score * 1000) / 1000\n // Converts 1.23456789 to 1.234.\n // Reducing the precision so that the vectors take up less\n // space when serialised. Doing it now so that they behave\n // the same before and after serialisation. Also, this is\n // the fastest approach to reducing a number's precision in\n // JavaScript.\n\n fieldVector.insert(termIndex, scoreWithPrecision)\n }\n\n fieldVectors[fieldRef] = fieldVector\n }\n\n this.fieldVectors = fieldVectors\n}\n\n/**\n * Creates a token set of all tokens in the index using lunr.TokenSet\n *\n * @private\n */\nlunr.Builder.prototype.createTokenSet = function () {\n this.tokenSet = lunr.TokenSet.fromArray(\n Object.keys(this.invertedIndex).sort()\n )\n}\n\n/**\n * Builds the index, creating an instance of lunr.Index.\n *\n * This completes the indexing process and should only be called\n * once all documents have been added to the index.\n *\n * @returns {lunr.Index}\n */\nlunr.Builder.prototype.build = function () {\n this.calculateAverageFieldLengths()\n this.createFieldVectors()\n this.createTokenSet()\n\n return new lunr.Index({\n invertedIndex: this.invertedIndex,\n fieldVectors: this.fieldVectors,\n tokenSet: this.tokenSet,\n fields: Object.keys(this._fields),\n pipeline: this.searchPipeline\n })\n}\n\n/**\n * Applies a plugin to the index builder.\n *\n * A plugin is a function that is called with the index builder as its context.\n * Plugins can be used to customise or extend the behaviour of the index\n * in some way. A plugin is just a function, that encapsulated the custom\n * behaviour that should be applied when building the index.\n *\n * The plugin function will be called with the index builder as its argument, additional\n * arguments can also be passed when calling use. The function will be called\n * with the index builder as its context.\n *\n * @param {Function} plugin The plugin to apply.\n */\nlunr.Builder.prototype.use = function (fn) {\n var args = Array.prototype.slice.call(arguments, 1)\n args.unshift(this)\n fn.apply(this, args)\n}\n/**\n * Contains and collects metadata about a matching document.\n * A single instance of lunr.MatchData is returned as part of every\n * lunr.Index~Result.\n *\n * @constructor\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n * @property {object} metadata - A cloned collection of metadata associated with this document.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData = function (term, field, metadata) {\n var clonedMetadata = Object.create(null),\n metadataKeys = Object.keys(metadata || {})\n\n // Cloning the metadata to prevent the original\n // being mutated during match data combination.\n // Metadata is kept in an array within the inverted\n // index so cloning the data can be done with\n // Array#slice\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i]\n clonedMetadata[key] = metadata[key].slice()\n }\n\n this.metadata = Object.create(null)\n\n if (term !== undefined) {\n this.metadata[term] = Object.create(null)\n this.metadata[term][field] = clonedMetadata\n }\n}\n\n/**\n * An instance of lunr.MatchData will be created for every term that matches a\n * document. However only one instance is required in a lunr.Index~Result. This\n * method combines metadata from another instance of lunr.MatchData with this\n * objects metadata.\n *\n * @param {lunr.MatchData} otherMatchData - Another instance of match data to merge with this one.\n * @see {@link lunr.Index~Result}\n */\nlunr.MatchData.prototype.combine = function (otherMatchData) {\n var terms = Object.keys(otherMatchData.metadata)\n\n for (var i = 0; i < terms.length; i++) {\n var term = terms[i],\n fields = Object.keys(otherMatchData.metadata[term])\n\n if (this.metadata[term] == undefined) {\n this.metadata[term] = Object.create(null)\n }\n\n for (var j = 0; j < fields.length; j++) {\n var field = fields[j],\n keys = Object.keys(otherMatchData.metadata[term][field])\n\n if (this.metadata[term][field] == undefined) {\n this.metadata[term][field] = Object.create(null)\n }\n\n for (var k = 0; k < keys.length; k++) {\n var key = keys[k]\n\n if (this.metadata[term][field][key] == undefined) {\n this.metadata[term][field][key] = otherMatchData.metadata[term][field][key]\n } else {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(otherMatchData.metadata[term][field][key])\n }\n\n }\n }\n }\n}\n\n/**\n * Add metadata for a term/field pair to this instance of match data.\n *\n * @param {string} term - The term this match data is associated with\n * @param {string} field - The field in which the term was found\n * @param {object} metadata - The metadata recorded about this term in this field\n */\nlunr.MatchData.prototype.add = function (term, field, metadata) {\n if (!(term in this.metadata)) {\n this.metadata[term] = Object.create(null)\n this.metadata[term][field] = metadata\n return\n }\n\n if (!(field in this.metadata[term])) {\n this.metadata[term][field] = metadata\n return\n }\n\n var metadataKeys = Object.keys(metadata)\n\n for (var i = 0; i < metadataKeys.length; i++) {\n var key = metadataKeys[i]\n\n if (key in this.metadata[term][field]) {\n this.metadata[term][field][key] = this.metadata[term][field][key].concat(metadata[key])\n } else {\n this.metadata[term][field][key] = metadata[key]\n }\n }\n}\n/**\n * A lunr.Query provides a programmatic way of defining queries to be performed\n * against a {@link lunr.Index}.\n *\n * Prefer constructing a lunr.Query using the {@link lunr.Index#query} method\n * so the query object is pre-initialized with the right index fields.\n *\n * @constructor\n * @property {lunr.Query~Clause[]} clauses - An array of query clauses.\n * @property {string[]} allFields - An array of all available fields in a lunr.Index.\n */\nlunr.Query = function (allFields) {\n this.clauses = []\n this.allFields = allFields\n}\n\n/**\n * Constants for indicating what kind of automatic wildcard insertion will be used when constructing a query clause.\n *\n * This allows wildcards to be added to the beginning and end of a term without having to manually do any string\n * concatenation.\n *\n * The wildcard constants can be bitwise combined to select both leading and trailing wildcards.\n *\n * @constant\n * @default\n * @property {number} wildcard.NONE - The term will have no wildcards inserted, this is the default behaviour\n * @property {number} wildcard.LEADING - Prepend the term with a wildcard, unless a leading wildcard already exists\n * @property {number} wildcard.TRAILING - Append a wildcard to the term, unless a trailing wildcard already exists\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example query term with trailing wildcard\n * query.term('foo', { wildcard: lunr.Query.wildcard.TRAILING })\n * @example query term with leading and trailing wildcard\n * query.term('foo', {\n * wildcard: lunr.Query.wildcard.LEADING | lunr.Query.wildcard.TRAILING\n * })\n */\n\nlunr.Query.wildcard = new String (\"*\")\nlunr.Query.wildcard.NONE = 0\nlunr.Query.wildcard.LEADING = 1\nlunr.Query.wildcard.TRAILING = 2\n\n/**\n * Constants for indicating what kind of presence a term must have in matching documents.\n *\n * @constant\n * @enum {number}\n * @see lunr.Query~Clause\n * @see lunr.Query#clause\n * @see lunr.Query#term\n * @example query term with required presence\n * query.term('foo', { presence: lunr.Query.presence.REQUIRED })\n */\nlunr.Query.presence = {\n /**\n * Term's presence in a document is optional, this is the default value.\n */\n OPTIONAL: 1,\n\n /**\n * Term's presence in a document is required, documents that do not contain\n * this term will not be returned.\n */\n REQUIRED: 2,\n\n /**\n * Term's presence in a document is prohibited, documents that do contain\n * this term will not be returned.\n */\n PROHIBITED: 3\n}\n\n/**\n * A single clause in a {@link lunr.Query} contains a term and details on how to\n * match that term against a {@link lunr.Index}.\n *\n * @typedef {Object} lunr.Query~Clause\n * @property {string[]} fields - The fields in an index this clause should be matched against.\n * @property {number} [boost=1] - Any boost that should be applied when matching this clause.\n * @property {number} [editDistance] - Whether the term should have fuzzy matching applied, and how fuzzy the match should be.\n * @property {boolean} [usePipeline] - Whether the term should be passed through the search pipeline.\n * @property {number} [wildcard=lunr.Query.wildcard.NONE] - Whether the term should have wildcards appended or prepended.\n * @property {number} [presence=lunr.Query.presence.OPTIONAL] - The terms presence in any matching documents.\n */\n\n/**\n * Adds a {@link lunr.Query~Clause} to this query.\n *\n * Unless the clause contains the fields to be matched all fields will be matched. In addition\n * a default boost of 1 is applied to the clause.\n *\n * @param {lunr.Query~Clause} clause - The clause to add to this query.\n * @see lunr.Query~Clause\n * @returns {lunr.Query}\n */\nlunr.Query.prototype.clause = function (clause) {\n if (!('fields' in clause)) {\n clause.fields = this.allFields\n }\n\n if (!('boost' in clause)) {\n clause.boost = 1\n }\n\n if (!('usePipeline' in clause)) {\n clause.usePipeline = true\n }\n\n if (!('wildcard' in clause)) {\n clause.wildcard = lunr.Query.wildcard.NONE\n }\n\n if ((clause.wildcard & lunr.Query.wildcard.LEADING) && (clause.term.charAt(0) != lunr.Query.wildcard)) {\n clause.term = \"*\" + clause.term\n }\n\n if ((clause.wildcard & lunr.Query.wildcard.TRAILING) && (clause.term.slice(-1) != lunr.Query.wildcard)) {\n clause.term = \"\" + clause.term + \"*\"\n }\n\n if (!('presence' in clause)) {\n clause.presence = lunr.Query.presence.OPTIONAL\n }\n\n this.clauses.push(clause)\n\n return this\n}\n\n/**\n * A negated query is one in which every clause has a presence of\n * prohibited. These queries require some special processing to return\n * the expected results.\n *\n * @returns boolean\n */\nlunr.Query.prototype.isNegated = function () {\n for (var i = 0; i < this.clauses.length; i++) {\n if (this.clauses[i].presence != lunr.Query.presence.PROHIBITED) {\n return false\n }\n }\n\n return true\n}\n\n/**\n * Adds a term to the current query, under the covers this will create a {@link lunr.Query~Clause}\n * to the list of clauses that make up this query.\n *\n * The term is used as is, i.e. no tokenization will be performed by this method. Instead conversion\n * to a token or token-like string should be done before calling this method.\n *\n * The term will be converted to a string by calling `toString`. Multiple terms can be passed as an\n * array, each term in the array will share the same options.\n *\n * @param {object|object[]} term - The term(s) to add to the query.\n * @param {object} [options] - Any additional properties to add to the query clause.\n * @returns {lunr.Query}\n * @see lunr.Query#clause\n * @see lunr.Query~Clause\n * @example adding a single term to a query\n * query.term(\"foo\")\n * @example adding a single term to a query and specifying search fields, term boost and automatic trailing wildcard\n * query.term(\"foo\", {\n * fields: [\"title\"],\n * boost: 10,\n * wildcard: lunr.Query.wildcard.TRAILING\n * })\n * @example using lunr.tokenizer to convert a string to tokens before using them as terms\n * query.term(lunr.tokenizer(\"foo bar\"))\n */\nlunr.Query.prototype.term = function (term, options) {\n if (Array.isArray(term)) {\n term.forEach(function (t) { this.term(t, lunr.utils.clone(options)) }, this)\n return this\n }\n\n var clause = options || {}\n clause.term = term.toString()\n\n this.clause(clause)\n\n return this\n}\nlunr.QueryParseError = function (message, start, end) {\n this.name = \"QueryParseError\"\n this.message = message\n this.start = start\n this.end = end\n}\n\nlunr.QueryParseError.prototype = new Error\nlunr.QueryLexer = function (str) {\n this.lexemes = []\n this.str = str\n this.length = str.length\n this.pos = 0\n this.start = 0\n this.escapeCharPositions = []\n}\n\nlunr.QueryLexer.prototype.run = function () {\n var state = lunr.QueryLexer.lexText\n\n while (state) {\n state = state(this)\n }\n}\n\nlunr.QueryLexer.prototype.sliceString = function () {\n var subSlices = [],\n sliceStart = this.start,\n sliceEnd = this.pos\n\n for (var i = 0; i < this.escapeCharPositions.length; i++) {\n sliceEnd = this.escapeCharPositions[i]\n subSlices.push(this.str.slice(sliceStart, sliceEnd))\n sliceStart = sliceEnd + 1\n }\n\n subSlices.push(this.str.slice(sliceStart, this.pos))\n this.escapeCharPositions.length = 0\n\n return subSlices.join('')\n}\n\nlunr.QueryLexer.prototype.emit = function (type) {\n this.lexemes.push({\n type: type,\n str: this.sliceString(),\n start: this.start,\n end: this.pos\n })\n\n this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.escapeCharacter = function () {\n this.escapeCharPositions.push(this.pos - 1)\n this.pos += 1\n}\n\nlunr.QueryLexer.prototype.next = function () {\n if (this.pos >= this.length) {\n return lunr.QueryLexer.EOS\n }\n\n var char = this.str.charAt(this.pos)\n this.pos += 1\n return char\n}\n\nlunr.QueryLexer.prototype.width = function () {\n return this.pos - this.start\n}\n\nlunr.QueryLexer.prototype.ignore = function () {\n if (this.start == this.pos) {\n this.pos += 1\n }\n\n this.start = this.pos\n}\n\nlunr.QueryLexer.prototype.backup = function () {\n this.pos -= 1\n}\n\nlunr.QueryLexer.prototype.acceptDigitRun = function () {\n var char, charCode\n\n do {\n char = this.next()\n charCode = char.charCodeAt(0)\n } while (charCode > 47 && charCode < 58)\n\n if (char != lunr.QueryLexer.EOS) {\n this.backup()\n }\n}\n\nlunr.QueryLexer.prototype.more = function () {\n return this.pos < this.length\n}\n\nlunr.QueryLexer.EOS = 'EOS'\nlunr.QueryLexer.FIELD = 'FIELD'\nlunr.QueryLexer.TERM = 'TERM'\nlunr.QueryLexer.EDIT_DISTANCE = 'EDIT_DISTANCE'\nlunr.QueryLexer.BOOST = 'BOOST'\nlunr.QueryLexer.PRESENCE = 'PRESENCE'\n\nlunr.QueryLexer.lexField = function (lexer) {\n lexer.backup()\n lexer.emit(lunr.QueryLexer.FIELD)\n lexer.ignore()\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexTerm = function (lexer) {\n if (lexer.width() > 1) {\n lexer.backup()\n lexer.emit(lunr.QueryLexer.TERM)\n }\n\n lexer.ignore()\n\n if (lexer.more()) {\n return lunr.QueryLexer.lexText\n }\n}\n\nlunr.QueryLexer.lexEditDistance = function (lexer) {\n lexer.ignore()\n lexer.acceptDigitRun()\n lexer.emit(lunr.QueryLexer.EDIT_DISTANCE)\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexBoost = function (lexer) {\n lexer.ignore()\n lexer.acceptDigitRun()\n lexer.emit(lunr.QueryLexer.BOOST)\n return lunr.QueryLexer.lexText\n}\n\nlunr.QueryLexer.lexEOS = function (lexer) {\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n}\n\n// This matches the separator used when tokenising fields\n// within a document. These should match otherwise it is\n// not possible to search for some tokens within a document.\n//\n// It is possible for the user to change the separator on the\n// tokenizer so it _might_ clash with any other of the special\n// characters already used within the search string, e.g. :.\n//\n// This means that it is possible to change the separator in\n// such a way that makes some words unsearchable using a search\n// string.\nlunr.QueryLexer.termSeparator = lunr.tokenizer.separator\n\nlunr.QueryLexer.lexText = function (lexer) {\n while (true) {\n var char = lexer.next()\n\n if (char == lunr.QueryLexer.EOS) {\n return lunr.QueryLexer.lexEOS\n }\n\n // Escape character is '\\'\n if (char.charCodeAt(0) == 92) {\n lexer.escapeCharacter()\n continue\n }\n\n if (char == \":\") {\n return lunr.QueryLexer.lexField\n }\n\n if (char == \"~\") {\n lexer.backup()\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n return lunr.QueryLexer.lexEditDistance\n }\n\n if (char == \"^\") {\n lexer.backup()\n if (lexer.width() > 0) {\n lexer.emit(lunr.QueryLexer.TERM)\n }\n return lunr.QueryLexer.lexBoost\n }\n\n // \"+\" indicates term presence is required\n // checking for length to ensure that only\n // leading \"+\" are considered\n if (char == \"+\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE)\n return lunr.QueryLexer.lexText\n }\n\n // \"-\" indicates term presence is prohibited\n // checking for length to ensure that only\n // leading \"-\" are considered\n if (char == \"-\" && lexer.width() === 1) {\n lexer.emit(lunr.QueryLexer.PRESENCE)\n return lunr.QueryLexer.lexText\n }\n\n if (char.match(lunr.QueryLexer.termSeparator)) {\n return lunr.QueryLexer.lexTerm\n }\n }\n}\n\nlunr.QueryParser = function (str, query) {\n this.lexer = new lunr.QueryLexer (str)\n this.query = query\n this.currentClause = {}\n this.lexemeIdx = 0\n}\n\nlunr.QueryParser.prototype.parse = function () {\n this.lexer.run()\n this.lexemes = this.lexer.lexemes\n\n var state = lunr.QueryParser.parseClause\n\n while (state) {\n state = state(this)\n }\n\n return this.query\n}\n\nlunr.QueryParser.prototype.peekLexeme = function () {\n return this.lexemes[this.lexemeIdx]\n}\n\nlunr.QueryParser.prototype.consumeLexeme = function () {\n var lexeme = this.peekLexeme()\n this.lexemeIdx += 1\n return lexeme\n}\n\nlunr.QueryParser.prototype.nextClause = function () {\n var completedClause = this.currentClause\n this.query.clause(completedClause)\n this.currentClause = {}\n}\n\nlunr.QueryParser.parseClause = function (parser) {\n var lexeme = parser.peekLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n switch (lexeme.type) {\n case lunr.QueryLexer.PRESENCE:\n return lunr.QueryParser.parsePresence\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expected either a field or a term, found \" + lexeme.type\n\n if (lexeme.str.length >= 1) {\n errorMessage += \" with value '\" + lexeme.str + \"'\"\n }\n\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n}\n\nlunr.QueryParser.parsePresence = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n switch (lexeme.str) {\n case \"-\":\n parser.currentClause.presence = lunr.Query.presence.PROHIBITED\n break\n case \"+\":\n parser.currentClause.presence = lunr.Query.presence.REQUIRED\n break\n default:\n var errorMessage = \"unrecognised presence operator'\" + lexeme.str + \"'\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term or field, found nothing\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.FIELD:\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expecting term or field, found '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseField = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n if (parser.query.allFields.indexOf(lexeme.str) == -1) {\n var possibleFields = parser.query.allFields.map(function (f) { return \"'\" + f + \"'\" }).join(', '),\n errorMessage = \"unrecognised field '\" + lexeme.str + \"', possible fields: \" + possibleFields\n\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.fields = [lexeme.str]\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n var errorMessage = \"expecting term, found nothing\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n return lunr.QueryParser.parseTerm\n default:\n var errorMessage = \"expecting term, found '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseTerm = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n parser.currentClause.term = lexeme.str.toLowerCase()\n\n if (lexeme.str.indexOf(\"*\") != -1) {\n parser.currentClause.usePipeline = false\n }\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseEditDistance = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n var editDistance = parseInt(lexeme.str, 10)\n\n if (isNaN(editDistance)) {\n var errorMessage = \"edit distance must be numeric\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.editDistance = editDistance\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\nlunr.QueryParser.parseBoost = function (parser) {\n var lexeme = parser.consumeLexeme()\n\n if (lexeme == undefined) {\n return\n }\n\n var boost = parseInt(lexeme.str, 10)\n\n if (isNaN(boost)) {\n var errorMessage = \"boost must be numeric\"\n throw new lunr.QueryParseError (errorMessage, lexeme.start, lexeme.end)\n }\n\n parser.currentClause.boost = boost\n\n var nextLexeme = parser.peekLexeme()\n\n if (nextLexeme == undefined) {\n parser.nextClause()\n return\n }\n\n switch (nextLexeme.type) {\n case lunr.QueryLexer.TERM:\n parser.nextClause()\n return lunr.QueryParser.parseTerm\n case lunr.QueryLexer.FIELD:\n parser.nextClause()\n return lunr.QueryParser.parseField\n case lunr.QueryLexer.EDIT_DISTANCE:\n return lunr.QueryParser.parseEditDistance\n case lunr.QueryLexer.BOOST:\n return lunr.QueryParser.parseBoost\n case lunr.QueryLexer.PRESENCE:\n parser.nextClause()\n return lunr.QueryParser.parsePresence\n default:\n var errorMessage = \"Unexpected lexeme type '\" + nextLexeme.type + \"'\"\n throw new lunr.QueryParseError (errorMessage, nextLexeme.start, nextLexeme.end)\n }\n}\n\n /**\n * export the module via AMD, CommonJS or as a browser global\n * Export code from https://github.com/umdjs/umd/blob/master/returnExports.js\n */\n ;(function (root, factory) {\n if (typeof define === 'function' && define.amd) {\n // AMD. Register as an anonymous module.\n define(factory)\n } else if (typeof exports === 'object') {\n /**\n * Node. Does not work with strict CommonJS, but\n * only CommonJS-like enviroments that support module.exports,\n * like Node.\n */\n module.exports = factory()\n } else {\n // Browser globals (root is window)\n root.lunr = factory()\n }\n }(this, function () {\n /**\n * Just return a value to define the module export.\n * This example returns an object, but the module\n * can return a function as the exported value.\n */\n return lunr\n }))\n})();\n","/*!\n * escape-html\n * Copyright(c) 2012-2013 TJ Holowaychuk\n * Copyright(c) 2015 Andreas Lubbe\n * Copyright(c) 2015 Tiancheng \"Timothy\" Gu\n * MIT Licensed\n */\n\n'use strict';\n\n/**\n * Module variables.\n * @private\n */\n\nvar matchHtmlRegExp = /[\"'&<>]/;\n\n/**\n * Module exports.\n * @public\n */\n\nmodule.exports = escapeHtml;\n\n/**\n * Escape special characters in the given string of html.\n *\n * @param {string} string The string to escape for inserting into HTML\n * @return {string}\n * @public\n */\n\nfunction escapeHtml(string) {\n var str = '' + string;\n var match = matchHtmlRegExp.exec(str);\n\n if (!match) {\n return str;\n }\n\n var escape;\n var html = '';\n var index = 0;\n var lastIndex = 0;\n\n for (index = match.index; index < str.length; index++) {\n switch (str.charCodeAt(index)) {\n case 34: // \"\n escape = '"';\n break;\n case 38: // &\n escape = '&';\n break;\n case 39: // '\n escape = ''';\n break;\n case 60: // <\n escape = '<';\n break;\n case 62: // >\n escape = '>';\n break;\n default:\n continue;\n }\n\n if (lastIndex !== index) {\n html += str.substring(lastIndex, index);\n }\n\n lastIndex = index + 1;\n html += escape;\n }\n\n return lastIndex !== index\n ? html + str.substring(lastIndex, index)\n : html;\n}\n","/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport { MkDocsSearchIndex } from \"../mkdocs\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search message type\n */\nexport const enum SearchMessageType {\n INIT, /* Initialize search index */\n LOAD, /* Load serialized search index */\n DUMP, /* Dump serialized search index */\n QUERY /* Query search index */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Initialize search index\n */\nexport interface SearchInitMessage {\n type: SearchMessageType.INIT /* Message type */\n data: MkDocsSearchIndex /* Message data */\n}\n\n/**\n * Load serialized search index\n */\nexport interface SearchLoadMessage {\n type: SearchMessageType.LOAD /* Message type */\n data: string /* Message data */\n}\n\n/**\n * Dump serialized search index\n */\nexport interface SearchDumpMessage {\n type: SearchMessageType.DUMP /* Message type */\n data: string /* Message data */\n}\n\n/**\n * TODO: document\n */\nexport interface SearchQueryMessage {\n type: SearchMessageType.QUERY /* Message type */\n data: string /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Search message\n */\nexport type SearchMessage =\n | SearchInitMessage\n | SearchLoadMessage\n | SearchDumpMessage\n | SearchQueryMessage\n","\n/*\n * Copyright (c) 2016-2019 Martin Donath \n *\n * Permission is hereby granted, free of charge, to any person obtaining a copy\n * of this software and associated documentation files (the \"Software\"), to\n * deal in the Software without restriction, including without limitation the\n * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or\n * sell copies of the Software, and to permit persons to whom the Software is\n * furnished to do so, subject to the following conditions:\n *\n * The above copyright notice and this permission notice shall be included in\n * all copies or substantial portions of the Software.\n *\n * THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE\n * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING\n * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS\n * IN THE SOFTWARE.\n */\n\nimport * as escapeHTML from \"escape-html\"\nimport * as lunr from \"lunr\"\n\nimport { Config } from \"../../config\"\nimport { SearchMessage, SearchMessageType } from \"./_\"\nimport {\n MkDocsSearchDocument,\n MkDocsSearchIndex\n} from \"./mkdocs\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * A top-level article\n */\nexport interface SearchArticle extends MkDocsSearchDocument {\n section: boolean /* Whether the section was linked */\n}\n\n/**\n * A section of an article\n */\nexport interface SearchSection extends MkDocsSearchDocument {\n article: SearchArticle /* Parent article */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A search document\n */\nexport type SearchDocument =\n | SearchArticle\n | SearchSection\n\n/**\n * A location to search document mapping\n */\nexport type SearchDocumentMap = Map\n\n/* ----------------------------------------------------------------------------\n * Helper functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Preprocess MkDocs search documents\n *\n * @param docs - MkDocs search documents\n *\n * @return Search document map\n */\nfunction preprocess(docs: MkDocsSearchDocument[]): SearchDocumentMap {\n const map = new Map()\n for (const doc of docs) {\n const [path, hash] = doc.location.split(\"#\")\n\n /* Extract location and title */\n const location = doc.location\n const title = doc.title\n\n /* Escape and cleanup text */\n const text = escapeHTML(doc.text)\n .replace(/\\s+(?=[,.:;!?])/g, \"\")\n .replace(/\\s+/g, \" \")\n\n /* Handle section */\n if (hash) {\n const article = map.get(path) as SearchArticle\n\n /* Ignore first section, override article */\n if (!article.section) {\n article.title = doc.title\n article.text = text\n article.section = true\n\n /* Add subsequent section */\n } else {\n map.set(location, { location, title, text, article })\n }\n\n /* Add article */\n } else {\n map.set(location, { location, title, text, section: false }) // split indexing and stuff...\n }\n }\n return map\n}\n\n/* ----------------------------------------------------------------------------\n * Class\n * ------------------------------------------------------------------------- */\n\n/**\n *\n */\ninterface Options {\n trimmer: boolean\n stopwords: boolean\n}\n\n/**\n * Search index\n *\n * This class fetches and sets up the search index using lunr.js.\n */\nexport class SearchIndex { // TODO: better: use curried functions! easier to test...\n\n /**\n * Fetch search index from URL\n *\n * @param base - Base URL\n * @param options - Options\n *\n * @return Search index\n */\n public static from(\n { config, docs }: MkDocsSearchIndex, options: Options\n ): SearchIndex {\n return new SearchIndex(lunr(function() {\n\n /* Remove stemmer, as it cripples search experience */\n this.pipeline.reset()\n if (options.trimmer)\n this.pipeline.add(lunr.trimmer)\n if (options.stopwords)\n this.pipeline.add(lunr.stopWordFilter)\n\n // /* Set up alternate search languages */\n // const config = data.config\n // if (config.lang.length === 1 && config.lang[0] !== \"en\" && lunr[lang[0]]) {\n // this.use(lunr[lang[0]])\n // } else if (lang.length > 1) {\n // // TODO: check lunr[lang[0]] anyway...\n // this.use(lunr.multiLanguage(...lang))\n // }\n\n /* Setup fields and reference */\n this.field(\"title\", { boost: 10 })\n this.field(\"text\")\n this.ref(\"location\")\n\n /* Preprocess and index documents */\n for (const [, doc] of preprocess(docs))\n this.add(doc)\n }))\n }\n\n /**\n * Load a serialized search index\n *\n * @param data - Serialized search index\n *\n * @return Search index\n */\n public static fromString(data: string): SearchIndex {\n return new SearchIndex(lunr.Index.load(JSON.parse(data)))\n }\n\n /**\n * Technical non-public constructor\n *\n * @param map - Search document map\n * @param index - Lunr.js search index\n */\n protected constructor(\n // public map: SearchDocumentMap,\n public index: lunr.Index\n ) {}\n\n /**\n * Return a serialized version of the underlying index\n *\n * @return Serialized search index\n */\n public toString(): string {\n return JSON.stringify(this.index)\n }\n}\n\n// TODO: implement this as simple functions...\n\nlet index: SearchIndex | undefined\n\naddEventListener(\"message\", ev => {\n // console.log(\"worker:\", ev)\n\n const message: SearchMessage = ev.data\n switch (message.type) {\n case SearchMessageType.INIT:\n index = SearchIndex.from(message.data, {\n stopwords: true,\n trimmer: true\n })\n postMessage({ res: 0, term: \"DONE\" })\n console.log(\"FINISHED INDEX\")\n break\n\n case SearchMessageType.DUMP:\n if (index)\n postMessage(index.toString())\n else\n throw new Error(\"TOOD: error handling\")\n break\n\n case SearchMessageType.QUERY:\n // console.log(\"index\", index)\n if (index) {\n const query = message.data.trim().replace(/\\s+|$/g, \"* \")\n const res = index.index.search(query)\n // console.log(res)\n // setTimeout(() => { // TODO: testing\n postMessage({ res, term: query })\n // }, 500)\n }\n\n // TODO: also do search highlighting here!\n }\n})\n\n"],"sourceRoot":""} \ No newline at end of file diff --git a/material/base.html b/material/base.html index bca79d1c6..80a2be410 100644 --- a/material/base.html +++ b/material/base.html @@ -197,7 +197,7 @@ {% endblock %} {% block scripts %} - + {% if lang.t("search.language") != "en" %} {% set languages = lang.t("search.language").split(",") %} {% if languages | length and languages[0] != "" %} @@ -235,7 +235,7 @@ {%- endfor -%} {{ translations | tojson }} - + {% for path in config["extra_javascript"] %} {% endfor %} diff --git a/package.json b/package.json index 729f72107..65e47d72e 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,7 @@ "tslint-sonarts": "^1.9.0", "typescript": "^3.6.3", "webpack": "^4.41.0", - "webpack-cli": "^3.3.9", - "worker-loader": "^2.0.0" + "webpack-cli": "^3.3.9" }, "engines": { "node": ">= 10" diff --git a/src/assets/javascripts/config/index.ts b/src/assets/javascripts/config/index.ts index c399adf11..d89f18ef0 100644 --- a/src/assets/javascripts/config/index.ts +++ b/src/assets/javascripts/config/index.ts @@ -29,6 +29,7 @@ */ export interface Config { base: string /* Base URL */ + search: string /* Web worker URL */ } /* ---------------------------------------------------------------------------- diff --git a/src/assets/javascripts/ui/worker/index.ts b/src/assets/javascripts/ui/worker/index.ts new file mode 100644 index 000000000..2df48f648 --- /dev/null +++ b/src/assets/javascripts/ui/worker/index.ts @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2016-2019 Martin Donath + * + * Permission is hereby granted, free of charge, to any person obtaining a copy + * of this software and associated documentation files (the "Software"), to + * deal in the Software without restriction, including without limitation the + * rights to use, copy, modify, merge, publish, distribute, sublicense, and/or + * sell copies of the Software, and to permit persons to whom the Software is + * furnished to do so, subject to the following conditions: + * + * The above copyright notice and this permission notice shall be included in + * all copies or substantial portions of the Software. + * + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE + * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS + * IN THE SOFTWARE. + */ + +import { Observable, fromEvent } from "rxjs" +import { + pluck, + shareReplay, + switchMap, + take, + tap, + throttle +} from "rxjs/operators" + +/* ---------------------------------------------------------------------------- + * Types + * ------------------------------------------------------------------------- */ + +/** + * Worker message + */ +export interface WorkerMessage { + type: unknown /* Message type */ + data: unknown /* Message data */ +} + +/* ---------------------------------------------------------------------------- + * Function types + * ------------------------------------------------------------------------- */ + +/** + * Options + * + * @template T - Worker message type + */ +interface Options { + message$: Observable /* Message observable */ +} + +/* ---------------------------------------------------------------------------- + * Functions + * ------------------------------------------------------------------------- */ + +/** + * Watch a web worker + * + * This function returns an observable that will send all values emitted by the + * message observable to the web worker. Web worker communication is expected + * to be bidirectional (request-response) and synchronous. Messages that are + * emitted during a pending request are throttled, the last one is emitted. + * + * @param worker - Web worker + * + * @return Worker message observable + */ +export function watchWorker( + worker: Worker, { message$ }: Options +): Observable { + + /* Receive messages from web worker */ + const worker$ = fromEvent(worker, "message") + .pipe( + pluck("data") + ) + + /* Send request and wait for response */ + return message$ + .pipe( + throttle(() => worker$, { leading: true, trailing: true }), + tap(message => worker.postMessage(message)), + switchMap(() => worker$ + .pipe( + take(1) + ) + ), + shareReplay(1) + ) +} diff --git a/src/base.html b/src/base.html index b2b349035..754e8c530 100644 --- a/src/base.html +++ b/src/base.html @@ -395,7 +395,7 @@ {% block scripts %} - + {% if lang.t("search.language") != "en" %} @@ -442,7 +442,8 @@ diff --git a/tsconfig.json b/tsconfig.json index 24589456d..7a076a1a4 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,8 @@ "lib": [ "dom", "es2017", - "esnext" + "esnext", + "webworker" ], "module": "commonjs", "moduleResolution": "node", diff --git a/webpack.config.ts b/webpack.config.ts index 39cebd796..92edd36e6 100644 --- a/webpack.config.ts +++ b/webpack.config.ts @@ -21,28 +21,23 @@ */ import * as path from "path" -// import { Options } from "ts-loader" import { Configuration } from "webpack" /* ---------------------------------------------------------------------------- - * Configuration + * Helper functions * ------------------------------------------------------------------------- */ /** - * Webpack configuration + * Webpack base configuration * - * @param env - Webpack environment arguments * @param args - Command-line arguments * * @return Webpack configuration */ -export default (_env: never, args: Configuration) => { +function config(args: Configuration): Configuration { return { mode: args.mode, - /* Entrypoint */ - entry: ["src/assets/javascripts/index.ts"], - /* Loaders */ module: { rules: [ @@ -57,45 +52,16 @@ export default (_env: never, args: Configuration) => { transpileOnly: true, compilerOptions: { module: "esnext", - noUnusedLocals: args.mode === "production", - noUnusedParameters: args.mode === "production", removeComments: false } } } ], exclude: /\/node_modules\// - }, - - { - test: /\worker\/(.*?)\.ts$/, - use: [ - { loader: "worker-loader", options: { - inline: true, fallback: false } }, - { - loader: "ts-loader", - options: { - transpileOnly: true, - compilerOptions: { - module: "esnext", - noUnusedLocals: args.mode === "production", - noUnusedParameters: args.mode === "production", // TODO: do not duplicate - removeComments: false - } - } - } - ] } ] }, - /* Export class constructor as entrypoint */ - output: { - path: path.resolve(__dirname, "material/assets/javascripts"), - filename: "app.js", - libraryTarget: "window" - }, - /* Module resolver */ resolve: { modules: [ @@ -109,3 +75,40 @@ export default (_env: never, args: Configuration) => { devtool: "source-map" } } + +/* ---------------------------------------------------------------------------- + * Configuration + * ------------------------------------------------------------------------- */ + +/** + * Webpack configuration + * + * @param env - Webpack environment arguments + * @param args - Command-line arguments + * + * @return Webpack configuration + */ +export default (_env: never, args: Configuration): Configuration[] => ([ + + /* Application */ + { + ...config(args), + entry: "src/assets/javascripts", + output: { + path: path.resolve(__dirname, "material/assets/javascripts"), + filename: "bundle.js", + libraryTarget: "window" + } + }, + + /* Search worker */ + { + ...config(args), + entry: "src/assets/javascripts/workers/search", + output: { + path: path.resolve(__dirname, "material/assets/javascripts"), + filename: "search.js", + libraryTarget: "var" + } + } +])