diff --git a/material/assets/javascripts/bundle.js b/material/assets/javascripts/bundle.js index c7e18ca36..3b9dfc2bd 100644 --- a/material/assets/javascripts/bundle.js +++ b/material/assets/javascripts/bundle.js @@ -1,2 +1,2 @@ -!function(t,e){for(var r in e)t[r]=e[r]}(window,function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([,,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var n="undefined"!=typeof window&&window,i="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=n||void 0!==t&&t||i}).call(this,r(5))},,,function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){},function(t,e,r){"use strict";function n(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function i(t){return function e(r){return 0===arguments.length||n(r)?e:t.apply(this,arguments)}}function o(t){return t}r.r(e);var u=i(o);function s(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var c=Object.prototype.toString,a=function(){return"[object Arguments]"===c.call(arguments)?function(t){return"[object Arguments]"===c.call(t)}:function(t){return s("callee",t)}}(),f=!{toString:null}.propertyIsEnumerable("toString"),l=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],h=function(){return arguments.propertyIsEnumerable("length")}(),p=function(t,e){for(var r=0;r=0;)s(e=l[r],t)&&!p(n,e)&&(n[n.length]=e),r-=1;return n})):i((function(t){return Object(t)!==t?[]:Object.keys(t)})),y=i((function(t){for(var e=d(t),r=e.length,n=[],i=0;i0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(ct);function lt(t){return t}function ht(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),function t(e,r,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof r?function(i){return i.pipe(t((function(t,n){return it(e(t,n)).pipe(G((function(e,i){return r(t,e,n,i)})))}),n))}:("number"==typeof r&&(n=r),function(t){return t.lift(new at(e,n))})}(lt,t)}function pt(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof i&&(r=t.pop()),null===n&&1===t.length&&t[0]instanceof q?t[0]:ht(r)(z(t,n))}var dt=r(2);function yt(t,e){return void 0===e&&(e=null),new xt({method:"GET",url:t,headers:e})}function vt(t,e,r){return new xt({method:"POST",url:t,body:e,headers:r})}function bt(t,e){return new xt({method:"DELETE",url:t,headers:e})}function mt(t,e,r){return new xt({method:"PUT",url:t,body:e,headers:r})}function wt(t,e,r){return new xt({method:"PATCH",url:t,body:e,headers:r})}var gt=G((function(t,e){return t.response}));function _t(t,e){return gt(new xt({method:"GET",url:t,responseType:"json",headers:e}))}var xt=function(t){function e(e){var r=t.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(dt.a.XMLHttpRequest)return new dt.a.XMLHttpRequest;if(dt.a.XDomainRequest)return new dt.a.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(dt.a.XMLHttpRequest)return new dt.a.XMLHttpRequest;var t=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;r<3;r++)try{if(t=e[r],new dt.a.ActiveXObject(t))break}catch(t){}return new dt.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)n.url=e;else for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);return r.request=n,r}var r;return b(e,t),e.prototype._subscribe=function(t){return new St(t,this.request)},e.create=((r=function(t){return new e(t)}).get=yt,r.post=vt,r.delete=bt,r.put=mt,r.patch=wt,r.getJSON=_t,r),e}(q),St=function(t){function e(e,r){var n=t.call(this,e)||this;n.request=r,n.done=!1;var i=r.headers=r.headers||{};return r.crossDomain||n.getHeader(i,"X-Requested-With")||(i["X-Requested-With"]="XMLHttpRequest"),n.getHeader(i,"Content-Type")||dt.a.FormData&&r.body instanceof dt.a.FormData||void 0===r.body||(i["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=n.serializeBody(r.body,n.getHeader(r.headers,"Content-Type")),n.send(),n}return b(e,t),e.prototype.next=function(t){this.done=!0;var e,r=this.xhr,n=this.request,i=this.destination;try{e=new Et(t,r,n)}catch(t){return i.error(t)}i.next(e)},e.prototype.send=function(){var t=this.request,e=this.request,r=e.user,n=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),r?a.open(n,i,o,r,u):a.open(n,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(dt.a.FormData&&t instanceof dt.a.FormData)return t;if(e){var r=e.indexOf(";");-1!==r&&(e=e.substring(0,r))}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 r in e)e.hasOwnProperty(r)&&t.setRequestHeader(r,e[r])},e.prototype.getHeader=function(t,e){for(var r in t)if(r.toLowerCase()===e.toLowerCase())return t[r]},e.prototype.setupEvents=function(t,e){var r=e.progressSubscriber;function n(t){var e,r=n,i=r.subscriber,o=r.progressSubscriber,u=r.request;o&&o.error(t);try{e=new jt(this,u)}catch(t){e=t}i.error(e)}if(t.ontimeout=n,n.request=e,n.subscriber=this,n.progressSubscriber=r,t.upload&&"withCredentials"in t){var i,o;if(r)i=function(t){i.progressSubscriber.next(t)},dt.a.XDomainRequest?t.onprogress=i:t.upload.onprogress=i,i.progressSubscriber=r;o=function(t){var e,r=o,n=r.progressSubscriber,i=r.subscriber,u=r.request;n&&n.error(t);try{e=new Tt("ajax error",this,u)}catch(t){e=t}i.error(e)},t.onerror=o,o.request=e,o.subscriber=this,o.progressSubscriber=r}function u(t){}function s(t){var e=s,r=e.subscriber,n=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)n&&n.complete(),r.next(t),r.complete();else{n&&n.error(t);var c=void 0;try{c=new Tt("ajax error "+o,this,i)}catch(t){c=t}r.error(c)}}}t.onreadystatechange=u,u.subscriber=this,u.progressSubscriber=r,u.request=e,t.onload=s,s.subscriber=this,s.progressSubscriber=r,s.request=e},e.prototype.unsubscribe=function(){var e=this.done,r=this.xhr;!e&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),t.prototype.unsubscribe.call(this)},e}(N),Et=function(){return function(t,e,r){this.originalEvent=t,this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType||r.responseType,this.response=Ot(this.responseType,e)}}(),Tt=function(){function t(t,e,r){return Error.call(this),this.message=t,this.name="AjaxError",this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType||r.responseType,this.response=Ot(this.responseType,e),this}return t.prototype=Object.create(Error.prototype),t}();function Ot(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 jt=function(t,e){return Tt.call(this,"ajax timeout",t,e),this.name="AjaxTimeoutError",this},It=function(){return xt.create}();function Nt(t,e){return function(r){return r.lift(new kt(t,e))}}var kt=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,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.thisArg=n,i.count=0,i}return b(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}(N);function Pt(t,e,r){return function(n){return n.lift(new $t(t,e,r))}}var $t=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new Ct(t,this.nextOrObserver,this.error,this.complete))},t}(),Ct=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o._tapNext=P,o._tapError=P,o._tapComplete=P,o._tapError=n||P,o._tapComplete=i||P,m(r)?(o._context=o,o._tapNext=r):r&&(o._context=r,o._tapNext=r.next||P,o._tapError=r.error||P,o._tapComplete=r.complete||P),o}return b(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}(N);function qt(){for(var t=[],e=0;e0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.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,r=new Qt(e.now()+this.delay,t);this.queue.push(r),!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}(N),Qt=function(){return function(t,e){this.time=t,this.notification=e}}();function Zt(t,e){return e?Dt((function(){return t}),e):Dt((function(){return t}))}var te=new q(P);function ee(t,e){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new re(t,e,r))}}var re=function(){function t(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}return t.prototype.call=function(t,e){return e.subscribe(new ne(t,this.accumulator,this.seed,this.hasSeed))},t}(),ne=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.accumulator=r,o._seed=n,o.hasSeed=i,o.index=0,o}return b(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,r=this.index++;try{e=this.accumulator(this.seed,t,r)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(N),ie=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return b(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):e.flush(this)},e}(Ut),oe=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e}(zt))(ie);function ue(t,e){return void 0===e&&(e=0),function(r){return r.lift(new se(t,e))}}var se=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.scheduler,this.delay))},t}(),ce=function(t){function e(e,r,n){void 0===n&&(n=0);var i=t.call(this,e)||this;return i.scheduler=r,i.delay=n,i}return b(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new ae(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(Bt.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(Bt.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(Bt.createComplete()),this.unsubscribe()},e}(N),ae=function(){return function(t,e){this.notification=t,this.destination=e}}(),fe=function(t){function e(e,r,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return b(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var r=this._events;r.push(e),r.length>this._bufferSize&&r.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new le(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=n.length;if(this.closed)throw new R;if(this.isStopped||this.hasError?e=O.EMPTY:(this.observers.push(t),e=new H(this,t)),i&&t.add(t=new ce(t,i)),r)for(var u=0;ue&&(o=Math.max(o,i-e)),o>0&&n.splice(0,o),n},e}(L),le=function(){return function(t,e){this.time=t,this.value=e}}();function he(t,e,r){var n;return n=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:r},function(t){return t.lift(function(t){var e,r,n=t.bufferSize,i=void 0===n?Number.POSITIVE_INFINITY:n,o=t.windowTime,u=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,c=t.scheduler,a=0,f=!1,l=!1;return function(t){a++,e&&!f||(f=!1,e=new fe(i,u,c),r=t.subscribe({next:function(t){e.next(t)},error:function(t){f=!0,e.error(t)},complete:function(){l=!0,e.complete()}}));var n=e.subscribe(this);this.add((function(){a--,n.unsubscribe(),r&&!l&&s&&0===a&&(r.unsubscribe(),r=void 0,e=void 0)}))}}(n))}}function pe(t,e,r,n){return m(r)&&(n=r,r=void 0),n?pe(t,e,r).pipe(G((function(t){return S(t)?n.apply(void 0,t):n(t)}))):new q((function(n){!function t(e,r,n,i,o){var u;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var s=e;e.addEventListener(r,n,o),u=function(){return s.removeEventListener(r,n,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var c=e;e.on(r,n),u=function(){return c.off(r,n)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var a=e;e.addListener(r,n),u=function(){return a.removeListener(r,n)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var f=0,l=e.length;f1?n.next(Array.prototype.slice.call(arguments)):n.next(t)}),n,r)}))}function de(t){return function(e){return e.lift(new ye(t))}}var ye=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new ve(t,this.value))},t}(),ve=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return b(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(N);function be(){for(var t=[],e=0;e1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},e}(N),Ne=function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return b(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 O).add(this.source.subscribe(new Ae(this.getSubject(),this))),t.closed&&(this._connection=null,t=O.EMPTY)),t},e.prototype.refCount=function(){return Oe()(this)},e}(q),ke=function(){var t=Ne.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}}}(),Ae=function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return b(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}(D);var Pe=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(t);return i.add(e.subscribe(n)),i},t}();function $e(){return new L}function Ce(){return function(t){return Oe()((e=$e,function(t){var n;if(n="function"==typeof e?e:function(){return e},"function"==typeof r)return t.lift(new Pe(n,r));var i=Object.create(t,ke);return i.source=t,i.subjectFactory=n,i})(t));var e,r}}var qe=pe(window,"hashchange"),Me=pe(window,"popstate");function Re(t){var e=matchMedia(t);return function t(e,r,n){return n?t(e,r).pipe(G((function(t){return S(t)?n.apply(void 0,t):n(t)}))):new q((function(t){var n,i=function(){for(var e=[],r=0;r0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(cancelAnimationFrame(r),e.scheduled=void 0)},e}(Ut),We=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n=e})),we(),ue(We),Pt((function(e){!function(t,e){t.setAttribute("data-md-state",e?"hidden":"")}(t,e)})),Be((function(){!function(t){t.removeAttribute("data-md-state")}(t)})))}function ir(t,e){var r=e;if(t.length>r){for(;" "!==t[r]&&--r>0;);return t.substring(0,r)+"..."}return t}function or(t,e){if(void 0===Ge){var r=Se("#__lang");Ge=JSON.parse(r.innerText)}if(void 0===Ge[t])throw new ReferenceError("Invalid translation: "+t);return void 0!==e?Ge[t].replace("#",e):Ge[t]}var ur=function(){return(ur=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function cr(t){return e=function(){var e="fixed"===getComputedStyle(t).getPropertyValue("position");return X({sticky:e,height:e?t.offsetHeight:0})},new q((function(t){var r;try{r=e()}catch(e){return void t.error(e)}return(r?it(r):B()).subscribe(t)}));var e}var ar={};function fr(){for(var t=[],e=0;e0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function dr(t,e,r){var n=e.viewport,i=r.header$,o=n.size$.pipe(Zt(i),G((function(e){var r=e.height;return t.offsetTop-r})),we());return fr([n.offset$,o]).pipe(G((function(t){var e=pr(t,2),r=e[0];return{x:r.x,y:r.y-e[1]}})),he(1))}function yr(t){return $((e="active",we((function(t,n){return r?r(t[e],n[e]):t[e]===n[e]}))),ue(We),Pt((function(e){var r=e.active;!function(t,e){t.setAttribute("data-md-state",e?"shadow":"")}(t,r)})),Be((function(){!function(t){t.removeAttribute("data-md-state")}(t)})));var e,r}r(6);var vr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function br(t,e){var r,n;if("string"==typeof e||"number"==typeof e)t.innerHTML+=e.toString();else if(e instanceof Node)t.appendChild(e);else if(Array.isArray(e))try{for(var i=vr(e),o=i.next();!o.done;o=i.next()){br(t,o.value)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}function mr(t,e){for(var r,n,i,o,u=[],s=2;s0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function xr(t,e){var r=t.pipe(Nt((function(t){return t}))),n=t.pipe(Nt((function(t){return!t})));return $(Dt((function(t){return fr([X(t),r])})),Dt((function(t){var r,i=_r(t,2),o=i[0];return i[1]?e(o).pipe((r=n,function(t){return t.lift(new wr(r))})):W})))}function Sr(t,e){return $(xr(t.media.screen$,(function(r){return function(t,e,r){return dr(t,e,{header$:r.header$}).pipe(nr(t,20)).pipe(G((function(t){return{hidden:t}})))}(r,t,e)})),he(1))}var Er=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function Tr(t,e){return $(Dt((function(r){return function(t,e,r){var n=e.viewport,i=r.header$.pipe(qt("height")),o=fr([n.offset$,n.size$,i]).pipe(G((function(e){var r=Er(e,3),n=r[0].y,i=r[1].height,o=r[2],u=t.offsetTop,s=t.offsetHeight+u;return i-Math.max(0,u-n,o)-Math.max(0,i+n-s)})),we()),u=fr([n.offset$,i]).pipe(G((function(e){var r=Er(e,2),n=r[0].y,i=r[1];return n>=t.offsetTop-i})),we());return fr([o,i,u]).pipe(G((function(e){var r=Er(e,3),n=r[0],i=r[1],o=r[2];return{offset:t.offsetTop-i,height:n,active:o}})))}(r,t,e)})),he(1))}function Or(t){return function e(r,o){switch(arguments.length){case 0:return e;case 1:return n(r)?e:i((function(e){return t(r,e)}));default:return n(r)&&n(o)?e:n(r)?i((function(e){return t(e,o)})):n(o)?i((function(e){return t(r,e)})):t(r,o)}}}function jr(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}function Ir(t,e,r){for(var n=0,i=r.length;n=0;){if(r[c]===t)return n[c]===e;c-=1}switch(u){case"Map":return t.size===e.size&&Ar(t.entries(),e.entries(),r.concat([t]),n.concat([e]));case"Set":return t.size===e.size&&Ar(t.values(),e.values(),r.concat([t]),n.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 a=d(t);if(a.length!==d(e).length)return!1;var f=r.concat([t]),l=n.concat([e]);for(c=a.length-1;c>=0;){var h=a[c];if(!s(h,e)||!Pr(e[h],t[h],f,l))return!1;c-=1}return!0}var $r=Or((function(t,e){return Pr(t,e,[],[])})),Cr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function qr(t,e,r){var n=e.viewport,i=r.main$,o=parseFloat(getComputedStyle(t.parentElement).getPropertyValue("padding-top")),u=fr([n.offset$,i]).pipe(G((function(t){var e=Cr(t,2),r=e[0].y,n=e[1],i=n.offset;return n.height-o+Math.min(o,Math.max(0,r-i))}))),s=fr([n.offset$,i]).pipe(G((function(t){var e=Cr(t,2);return e[0].y>=e[1].offset+o})));return fr([u,s]).pipe(G((function(t){var e=Cr(t,2);return{height:e[0],lock:e[1]}})),we($r),he(1))}function Mr(t){return $(ue(We),Pt((function(e){var r=e.height,n=e.lock;!function(t,e){t.style.height=e+"px"}(t,r),function(t,e){t.setAttribute("data-md-state",e?"lock":"")}(t,n)})),Be((function(){!function(t){t.style.height=""}(t),function(t){t.removeAttribute("data-md-state")}(t)})))}function Rr(t,e){return $(xr(t.media.screen$,(function(r){return function(t,e,r){return qr(t,e,{main$:r.main$}).pipe(Mr(t)).pipe(G((function(t){return{sidebar:t}})))}(r,t,e)})),he(1))}var Hr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function Dr(t,e){var r=e.prepare;return fr([pe(t,"keyup").pipe(G((function(){return r(t.value)})),me(""),we()),function(t){var e=pe(t,"focus"),r=pe(t,"blur");return pt(e.pipe(de(!0)),r.pipe(de(!1))).pipe(me(t===document.activeElement),he(1))}(t)]).pipe(G((function(t){var e=Hr(t,2);return{value:e[0],focus:e[1]}})),he(1))}function Lr(t){return pe(t,"click").pipe(de(void 0))}var Vr={link:"md-search-result__link",article:"md-search-result__article md-search-result__article--document",title:"md-search-result__title",teaser:"md-search-result__teaser"};var Fr={link:"md-search-result__link",article:"md-search-result__article",title:"md-search-result__title",teaser:"md-search-result__teaser"};function Ur(t){var e=t.location,r=t.title,n=t.text;return mr("a",{href:e,title:r,class:Fr.link,tabIndex:-1},mr("article",{class:Fr.article},mr("h1",{class:Fr.title},r),n.length?mr("p",{class:Fr.teaser},ir(n,320)):void 0))}var Yr={item:"md-search-result__item"};function zr(t){var e=t.article,r=t.sections;return mr("li",{class:Yr.item},function(t){var e=t.location,r=t.title,n=t.text;return mr("a",{href:e,title:r,class:Vr.link,tabIndex:-1},mr("article",{class:Vr.article},mr("h1",{class:Vr.title},r),n.length?mr("p",{class:Vr.teaser},ir(n,320)):void 0))}(e),r.map(Ur))}var Xr={facts:"md-source__facts",fact:"md-source__fact"};var Wr=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Br(t,this.observables,this.project))},t}(),Br=function(t){function e(e,r,n){var i=t.call(this,e)||this;i.observables=r,i.project=n,i.toRespond=[];var o=r.length;i.values=new Array(o);for(var u=0;u0){var u=o.indexOf(r);-1!==u&&o.splice(u,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(ct),Gr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function Jr(t,e){var r=e.query$,n=Se(".md-search-result__meta",t);return $(function(){for(var t=[],e=0;e1?or("search.result.other",e.toString()):or(1===e?"search.result.one":"search.result.none")}(n,r.length):function(t){t.textContent=or("search.result.placeholder")}(n),r})))}function Kr(t,e,r){var n=r.result$,i=r.query$,o=t.parentElement,s=function(t,e){var r=e.viewport;return pt(pe(t,"scroll"),r.size$).pipe(G((function(){return Te(t)})),me(Te(t)),he(1))}(o,e).pipe(G((function(t){return t.y>=o.scrollHeight-o.offsetHeight-16})),we(),Nt(u));return n.pipe(Jr(t,{query$:i}),function(t,e){var r=e.render$,n=t.parentElement,i=Se(".md-search-result__list",t);return $(Dt((function(t){return r.pipe(ue(We),ee((function(e){for(;e16)););return e}),0),de(t),Be((function(){!function(t){t.innerHTML=""}(i)})))})))}(t,{render$:s}))}function Qr(t,e){return $(xr(t.media.screen$,(function(r){return function(t,e,r){return dr(t,e,{header$:r.header$}).pipe(nr(t,8)).pipe(G((function(t){return{hidden:t}})))}(r,t,e)})),he(1))}var Zr=i((function(t){return e=t,"[object String]"===Object.prototype.toString.call(e)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse();var e}));function tn(t,e){return function(t,e,r){var n,i;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(n=1/e;r=0}function en(t,e,r){var n,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(e&&(r._items["-0"]=!0),!1):null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):i in r._items?t in r._items[i]||(e&&(r._items[i][t]=!0),!1):(e&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return!!r._items[i][o]||(e&&(r._items[i][o]=!0),!1)}return e&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):i in r._items?!!tn(t,r._items[i])||(e&&r._items[i].push(t),!1):(e&&(r._items[i]=[t]),!1);case"undefined":return!!r._items[i]||(e&&(r._items[i]=!0),!1);case"object":if(null===t)return!!r._items.null||(e&&(r._items.null=!0),!1);default:return(i=Object.prototype.toString.call(t))in r._items?!!tn(t,r._items[i])||(e&&r._items[i].push(t),!1):(e&&(r._items[i]=[t]),!1)}}var rn=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!en(t,!0,this)},t.prototype.has=function(t){return en(t,!1,this)},t}(),nn=Or((function(t,e){for(var r=[],n=0,i=t.length,o=e.length,u=new rn,s=0;s=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},un=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},sn=function(){for(var t=[],e=0;e0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function ln(t,e,r){var n=r.header$,i=qr(t,e,{main$:r.main$}).pipe(Mr(t)),o=Ee(".md-nav__link",t),u=function(t,e,r){var n,i,o=e.viewport,u=r.header$,s=new Map;try{for(var c=on(t),a=c.next();!a.done;a=c.next()){var f=a.value,l=Se('[id="'+decodeURIComponent(f.hash.substring(1))+'"]');void 0!==l&&s.set(f,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}var h=u.pipe(G((function(t){return 18+t.height})));return o.size$.pipe(G((function(){var t=[];return sn(s).reduce((function(e,r){for(var n=un(r,2),i=n[0],o=n[1];t.length;){if(!(s.get(t[t.length-1]).tagName>=o.tagName))break;t.pop()}return e.set(Zr(t=sn(t,[i])),o.offsetTop)}),new Map)})),Dt((function(t){return fr(o.offset$,h).pipe(ee((function(t,e){for(var r=un(t,2),n=r[0],i=r[1],o=un(e,2),u=o[0].y,s=o[1];i.length;){if(!(un(i[0],2)[1]-s=u))break;i=sn([n.pop()],i)}return[n,i]}),[[],sn(t)]),we((function(t,e){return t[0]===e[0]&&t[1]===e[1]})))}))).pipe(G((function(t){var e=un(t,2),r=e[0],n=e[1];return{prev:r.map((function(t){return un(t,1)[0]})),next:n.map((function(t){return un(t,1)[0]}))}})),ee((function(t,e){var r=Math.max(0,Math.min(e.prev.length,t.prev.length)-1),n=Math.max(e.prev.length,t.prev.length);return{prev:e.prev.slice(r,n+1),next:nn(e.next,t.next)}}),{prev:[],next:[]})).pipe(he(1))}(o,e,{header$:n}).pipe(function(t){return $(ue(We),Pt((function(t){var e,r,n,i,o=t.prev,u=t.next;try{for(var s=on(u),c=s.next();!c.done;c=s.next()){er(l=un(c.value,1)[0]),Ze(l)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}try{for(var a=on(o.entries()),f=a.next();!f.done;f=a.next()){var l,h=un(f.value,2),p=h[0];tr(l=un(h[1],1)[0],p===o.length-1),Qe(l,!0)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}})),Be((function(){var e,r;try{for(var n=on(t),i=n.next();!i.done;i=n.next()){var o=i.value;er(o),Ze(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}})))}(o));return fr([i,u]).pipe(G((function(t){var e=fn(t,2);return{sidebar:e[0],anchors:e[1]}})))}function hn(t){return t.type===an.DUMP}function pn(t){return t.type===an.RESULT}!function(t){t[t.STRING=0]="STRING",t[t.BINARY=1]="BINARY"}(cn||(cn={})),function(t){t[t.SETUP=0]="SETUP",t[t.DUMP=1]="DUMP",t[t.QUERY=2]="QUERY",t[t.RESULT=3]="RESULT"}(an||(an={})),r.d(e,"initialize",(function(){return _n}));var dn=function(){return(dn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},bn=function(){for(var t=[],e=0;e0})),Ce())},media:{screen$:Re("(min-width: 1220px)"),tablet$:Re("(min-width: 960px)")},viewport:{offset$:pt(He,De).pipe(G(Le),me(Le()),he(1)),size$:De.pipe(G(Ve),me(Ve()),he(1))}},n=vn(gn(t),2),i=n[0],o=n[1];(function(){var t=Se("[data-md-source][href]");if(console.log(t),!t)return W;var e=localStorage.getItem("repository");if(e)return X(JSON.parse(e));function r(t){return t>1e4?(t/1e3).toFixed(0)+"k":t>1e3?(t/1e3).toFixed(1)+"k":""+t}var n=vn(t.href.match(/^.+github\.com\/([^\/]+)\/?([^\/]+)?.*$/),3),i=n[1],o=n[2];return i&&o?It({url:"https://api.github.com/repos/"+i+"/"+o,responseType:"json"}).pipe(G((function(t){var e=t.status,n=t.response;if(200===e){var i=n.stargazers_count,o=n.forks_count;return[r(i)+" Stars",r(o)+" Forks"]}return[]})),Pt((function(t){return localStorage.setItem("repository",JSON.stringify(t))}))):i?It({url:"https://api.github.com/users/"+i,responseType:"json"}).pipe(G((function(t){var e=t.status,n=t.response;return 200===e?[r(n.public_repos)+" Repositories"]:[]})),Pt((function(t){return localStorage.setItem("repository",JSON.stringify(t))}))):X([])})().subscribe((function(t){t.length&&Ee("[data-md-source] .md-source__repository").forEach((function(e){e.dataset.mdState="done",e.appendChild(function(t){return mr("ul",{class:Xr.facts},t.map((function(t){return mr("li",{class:Xr.fact},t)})))}(t))}))}));var s=function(t,e){return e.document$.pipe(G((function(e){return t.reduce((function(t,r){var n,i=Se("[data-md-component="+r+"]",e);return ur(ur({},t),void 0!==i?((n={})[r]=i,n):{})}),{})})),ee((function(t,e){var r,n;try{for(var i=sr(d(t)),o=i.next();!o.done;o=i.next()){var u=o.value;switch(u){case"header-title":case"container":u in t&&void 0!==t[u]&&(t[u].replaceWith(e[u]),t[u]=e[u]);break;default:t[u]=Se("[data-md-component="+u+"]")}}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return t}))).pipe(he(1))}(mn,{document$:r.document.load$}),c=function(t){return s.pipe(function(t){return $(Dt((function(e){return void 0!==e[t]?X(e[t]):te})))}(t))},a=c("header").pipe(Dt(cr));c("header").pipe(Dt((function(t){return p.pipe(yr(t))}))).subscribe();var f=i.pipe(Nt(pn),qt("data"),Pt((function(e){return e.forEach((function(e){e.article.location=t.base+"/"+e.article.location,e.sections.forEach((function(e){e.location=t.base+"/"+e.location}))}))}))),l=c("search-query").pipe(Dt((function(t){return Dr(t,{prepare:wn})})));l.pipe(G((function(t){return{type:an.QUERY,data:t.value}}))).subscribe(o),l.pipe(Pt((function(t){var e,r;t.focus&&(r=!0,(e=_).checked!==r&&e.click())}))).subscribe();var h,p=c("main").pipe(Tr(r,{header$:a})),v=c("navigation").pipe(Rr(r,{main$:p})),b=c("toc").pipe(function(t,e){return $(xr(t.media.tablet$,(function(r){return ln(r,t,e)})),he(1))}(r,{header$:a,main$:p})),m=c("search-result").pipe(function(t,e){return $(Dt((function(r){return Kr(r,t,e)})),he(1))}(r,{result$:f,query$:l.pipe(qt("value"))})),w=c("tabs").pipe(Qr(r,{header$:a})),g=c("hero").pipe(Sr(r,{header$:a})),_=(Se("[data-md-toggle=drawer]"),Se("[data-md-toggle=search]")),x=(h=_,pe(h,"change").pipe(qt("checked"))).pipe(Nt(u),Gt(400)),S=c("search-reset").pipe(Dt(Lr));pt(x,S).pipe(Zt(c("search-query")),Pt((function(t){return t.focus()}))).subscribe();var E={search:{query$:l,result$:m,reset$:S},main$:p,navigation$:v,toc$:b,tabs$:w,hero$:g},T=E.search,O=yn(E,["search"]);return pt.apply(void 0,bn(y(O),y(T))).subscribe(),{agent:r,state:E}}}])); +!function(t,e){for(var r in e)t[r]=e[r]}(window,function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=7)}([,,function(t,e,r){"use strict";(function(t){r.d(e,"a",(function(){return o}));var n="undefined"!=typeof window&&window,i="undefined"!=typeof self&&"undefined"!=typeof WorkerGlobalScope&&self instanceof WorkerGlobalScope&&self,o=n||void 0!==t&&t||i}).call(this,r(5))},,,function(t,e){var r;r=function(){return this}();try{r=r||new Function("return this")()}catch(t){"object"==typeof window&&(r=window)}t.exports=r},function(t,e){},function(t,e,r){"use strict";function n(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}function i(t){return function e(r){return 0===arguments.length||n(r)?e:t.apply(this,arguments)}}function o(t){return t}r.r(e);var u=i(o);function s(t,e){return Object.prototype.hasOwnProperty.call(e,t)}var c=Object.prototype.toString,a=function(){return"[object Arguments]"===c.call(arguments)?function(t){return"[object Arguments]"===c.call(t)}:function(t){return s("callee",t)}}(),f=!{toString:null}.propertyIsEnumerable("toString"),l=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],h=function(){return arguments.propertyIsEnumerable("length")}(),p=function(t,e){for(var r=0;r=0;)s(e=l[r],t)&&!p(n,e)&&(n[n.length]=e),r-=1;return n})):i((function(t){return Object(t)!==t?[]:Object.keys(t)})),y=i((function(t){for(var e=d(t),r=e.length,n=[],i=0;i1?n.next(Array.prototype.slice.call(arguments)):n.next(t)}),n,r)}))}var st=new q(P);var ct=function(t){function e(e,r,n){var i=t.call(this)||this;return i.parent=e,i.outerValue=r,i.outerIndex=n,i.index=0,i}return b(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}(N);function at(t,e,r,n,i){if(void 0===i&&(i=new ct(t,r,n)),!i.closed)return e instanceof q?e.subscribe(i):rt(e)(i)}var ft=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e.prototype.notifyNext=function(t,e,r,n,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(N);var lt=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new ht(t,this.project,this.concurrent))},t}(),ht=function(t){function e(e,r,n){void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=r,i.concurrent=n,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return b(e,t),e.prototype._next=function(t){this.active0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(ft);function pt(t){return t}function dt(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),function t(e,r,n){return void 0===n&&(n=Number.POSITIVE_INFINITY),"function"==typeof r?function(i){return i.pipe(t((function(t,n){return it(e(t,n)).pipe(G((function(e,i){return r(t,e,n,i)})))}),n))}:("number"==typeof r&&(n=r),function(t){return t.lift(new lt(e,n))})}(pt,t)}function yt(){for(var t=[],e=0;e1&&"number"==typeof t[t.length-1]&&(r=t.pop())):"number"==typeof i&&(r=t.pop()),null===n&&1===t.length&&t[0]instanceof q?t[0]:dt(r)(z(t,n))}var vt=r(2);function bt(t,e){return void 0===e&&(e=null),new Et({method:"GET",url:t,headers:e})}function mt(t,e,r){return new Et({method:"POST",url:t,body:e,headers:r})}function wt(t,e){return new Et({method:"DELETE",url:t,headers:e})}function gt(t,e,r){return new Et({method:"PUT",url:t,body:e,headers:r})}function _t(t,e,r){return new Et({method:"PATCH",url:t,body:e,headers:r})}var xt=G((function(t,e){return t.response}));function St(t,e){return xt(new Et({method:"GET",url:t,responseType:"json",headers:e}))}var Et=function(t){function e(e){var r=t.call(this)||this,n={async:!0,createXHR:function(){return this.crossDomain?function(){if(vt.a.XMLHttpRequest)return new vt.a.XMLHttpRequest;if(vt.a.XDomainRequest)return new vt.a.XDomainRequest;throw new Error("CORS is not supported by your browser")}():function(){if(vt.a.XMLHttpRequest)return new vt.a.XMLHttpRequest;var t=void 0;try{for(var e=["Msxml2.XMLHTTP","Microsoft.XMLHTTP","Msxml2.XMLHTTP.4.0"],r=0;r<3;r++)try{if(t=e[r],new vt.a.ActiveXObject(t))break}catch(t){}return new vt.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)n.url=e;else for(var i in e)e.hasOwnProperty(i)&&(n[i]=e[i]);return r.request=n,r}var r;return b(e,t),e.prototype._subscribe=function(t){return new Tt(t,this.request)},e.create=((r=function(t){return new e(t)}).get=bt,r.post=mt,r.delete=wt,r.put=gt,r.patch=_t,r.getJSON=St,r),e}(q),Tt=function(t){function e(e,r){var n=t.call(this,e)||this;n.request=r,n.done=!1;var i=r.headers=r.headers||{};return r.crossDomain||n.getHeader(i,"X-Requested-With")||(i["X-Requested-With"]="XMLHttpRequest"),n.getHeader(i,"Content-Type")||vt.a.FormData&&r.body instanceof vt.a.FormData||void 0===r.body||(i["Content-Type"]="application/x-www-form-urlencoded; charset=UTF-8"),r.body=n.serializeBody(r.body,n.getHeader(r.headers,"Content-Type")),n.send(),n}return b(e,t),e.prototype.next=function(t){this.done=!0;var e,r=this.xhr,n=this.request,i=this.destination;try{e=new Ot(t,r,n)}catch(t){return i.error(t)}i.next(e)},e.prototype.send=function(){var t=this.request,e=this.request,r=e.user,n=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),r?a.open(n,i,o,r,u):a.open(n,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(vt.a.FormData&&t instanceof vt.a.FormData)return t;if(e){var r=e.indexOf(";");-1!==r&&(e=e.substring(0,r))}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 r in e)e.hasOwnProperty(r)&&t.setRequestHeader(r,e[r])},e.prototype.getHeader=function(t,e){for(var r in t)if(r.toLowerCase()===e.toLowerCase())return t[r]},e.prototype.setupEvents=function(t,e){var r=e.progressSubscriber;function n(t){var e,r=n,i=r.subscriber,o=r.progressSubscriber,u=r.request;o&&o.error(t);try{e=new Nt(this,u)}catch(t){e=t}i.error(e)}if(t.ontimeout=n,n.request=e,n.subscriber=this,n.progressSubscriber=r,t.upload&&"withCredentials"in t){var i,o;if(r)i=function(t){i.progressSubscriber.next(t)},vt.a.XDomainRequest?t.onprogress=i:t.upload.onprogress=i,i.progressSubscriber=r;o=function(t){var e,r=o,n=r.progressSubscriber,i=r.subscriber,u=r.request;n&&n.error(t);try{e=new jt("ajax error",this,u)}catch(t){e=t}i.error(e)},t.onerror=o,o.request=e,o.subscriber=this,o.progressSubscriber=r}function u(t){}function s(t){var e=s,r=e.subscriber,n=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)n&&n.complete(),r.next(t),r.complete();else{n&&n.error(t);var c=void 0;try{c=new jt("ajax error "+o,this,i)}catch(t){c=t}r.error(c)}}}t.onreadystatechange=u,u.subscriber=this,u.progressSubscriber=r,u.request=e,t.onload=s,s.subscriber=this,s.progressSubscriber=r,s.request=e},e.prototype.unsubscribe=function(){var e=this.done,r=this.xhr;!e&&r&&4!==r.readyState&&"function"==typeof r.abort&&r.abort(),t.prototype.unsubscribe.call(this)},e}(N),Ot=function(){return function(t,e,r){this.originalEvent=t,this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType||r.responseType,this.response=It(this.responseType,e)}}(),jt=function(){function t(t,e,r){return Error.call(this),this.message=t,this.name="AjaxError",this.xhr=e,this.request=r,this.status=e.status,this.responseType=e.responseType||r.responseType,this.response=It(this.responseType,e),this}return t.prototype=Object.create(Error.prototype),t}();function It(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 Nt=function(t,e){return jt.call(this,"ajax timeout",t,e),this.name="AjaxTimeoutError",this},At=function(){return Et.create}();function kt(t,e){return function(r){return r.lift(new Pt(t,e))}}var Pt=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new $t(t,this.predicate,this.thisArg))},t}(),$t=function(t){function e(e,r,n){var i=t.call(this,e)||this;return i.predicate=r,i.thisArg=n,i.count=0,i}return b(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}(N);function Ct(t,e,r){return function(n){return n.lift(new qt(t,e,r))}}var qt=function(){function t(t,e,r){this.nextOrObserver=t,this.error=e,this.complete=r}return t.prototype.call=function(t,e){return e.subscribe(new Mt(t,this.nextOrObserver,this.error,this.complete))},t}(),Mt=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o._tapNext=P,o._tapError=P,o._tapComplete=P,o._tapError=n||P,o._tapComplete=i||P,m(r)?(o._context=o,o._tapNext=r):r&&(o._context=r,o._tapNext=r.next||P,o._tapError=r.error||P,o._tapComplete=r.complete||P),o}return b(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}(N);function Rt(){for(var t=[],e=0;e0&&r[0].time-n.now()<=0;)r.shift().notification.observe(i);if(r.length>0){var o=Math.max(0,r[0].time-n.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,r=new te(e.now()+this.delay,t);this.queue.push(r),!1===this.active&&this._schedule(e)}},e.prototype._next=function(t){this.scheduleNotification(Jt.createNext(t))},e.prototype._error=function(t){this.errored=!0,this.queue=[],this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.scheduleNotification(Jt.createComplete()),this.unsubscribe()},e}(N),te=function(){return function(t,e){this.time=t,this.notification=e}}();function ee(t,e){return e?Vt((function(){return t}),e):Vt((function(){return t}))}function re(t,e){var r=!1;return arguments.length>=2&&(r=!0),function(n){return n.lift(new ne(t,e,r))}}var ne=function(){function t(t,e,r){void 0===r&&(r=!1),this.accumulator=t,this.seed=e,this.hasSeed=r}return t.prototype.call=function(t,e){return e.subscribe(new ie(t,this.accumulator,this.seed,this.hasSeed))},t}(),ie=function(t){function e(e,r,n,i){var o=t.call(this,e)||this;return o.accumulator=r,o._seed=n,o.hasSeed=i,o.index=0,o}return b(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,r=this.index++;try{e=this.accumulator(this.seed,t,r)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(N),oe=function(t){function e(e,r){var n=t.call(this,e,r)||this;return n.scheduler=e,n.work=r,n}return b(e,t),e.prototype.schedule=function(e,r){return void 0===r&&(r=0),r>0?t.prototype.schedule.call(this,e,r):(this.delay=r,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,r){return r>0||this.closed?t.prototype.execute.call(this,e,r):this._execute(e,r)},e.prototype.requestAsyncId=function(e,r,n){return void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0?t.prototype.requestAsyncId.call(this,e,r,n):e.flush(this)},e}(zt),ue=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e}(Wt))(oe);function se(t,e){return void 0===e&&(e=0),function(r){return r.lift(new ce(t,e))}}var ce=function(){function t(t,e){void 0===e&&(e=0),this.scheduler=t,this.delay=e}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.scheduler,this.delay))},t}(),ae=function(t){function e(e,r,n){void 0===n&&(n=0);var i=t.call(this,e)||this;return i.scheduler=r,i.delay=n,i}return b(e,t),e.dispatch=function(t){var e=t.notification,r=t.destination;e.observe(r),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.destination.add(this.scheduler.schedule(e.dispatch,this.delay,new fe(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(Jt.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(Jt.createError(t)),this.unsubscribe()},e.prototype._complete=function(){this.scheduleMessage(Jt.createComplete()),this.unsubscribe()},e}(N),fe=function(){return function(t,e){this.notification=t,this.destination=e}}(),le=function(t){function e(e,r,n){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=n,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=r<1?1:r,r===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return b(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var r=this._events;r.push(e),r.length>this._bufferSize&&r.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new he(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,r=this._infiniteTimeWindow,n=r?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=n.length;if(this.closed)throw new R;if(this.isStopped||this.hasError?e=O.EMPTY:(this.observers.push(t),e=new H(this,t)),i&&t.add(t=new ae(t,i)),r)for(var u=0;ue&&(o=Math.max(o,i-e)),o>0&&n.splice(0,o),n},e}(L),he=function(){return function(t,e){this.time=t,this.value=e}}();function pe(t,e,r){var n;return n=t&&"object"==typeof t?t:{bufferSize:t,windowTime:e,refCount:!1,scheduler:r},function(t){return t.lift(function(t){var e,r,n=t.bufferSize,i=void 0===n?Number.POSITIVE_INFINITY:n,o=t.windowTime,u=void 0===o?Number.POSITIVE_INFINITY:o,s=t.refCount,c=t.scheduler,a=0,f=!1,l=!1;return function(t){a++,e&&!f||(f=!1,e=new le(i,u,c),r=t.subscribe({next:function(t){e.next(t)},error:function(t){f=!0,e.error(t)},complete:function(){l=!0,e.complete()}}));var n=e.subscribe(this);this.add((function(){a--,n.unsubscribe(),r&&!l&&s&&0===a&&(r.unsubscribe(),r=void 0,e=void 0)}))}}(n))}}function de(t){return function(e){return e.lift(new ye(t))}}var ye=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new ve(t,this.value))},t}(),ve=function(t){function e(e,r){var n=t.call(this,e)||this;return n.value=r,n}return b(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(N);function be(){for(var t=[],e=0;e1)this.connection=null;else{var r=this.connection,n=t._connection;this.connection=null,!n||r&&n!==r||n.unsubscribe()}}else this.connection=null},e}(N),Ne=function(t){function e(e,r){var n=t.call(this)||this;return n.source=e,n.subjectFactory=r,n._refCount=0,n._isComplete=!1,n}return b(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 O).add(this.source.subscribe(new ke(this.getSubject(),this))),t.closed&&(this._connection=null,t=O.EMPTY)),t},e.prototype.refCount=function(){return Oe()(this)},e}(q),Ae=function(){var t=Ne.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}}}(),ke=function(t){function e(e,r){var n=t.call(this,e)||this;return n.connectable=r,n}return b(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}(D);var Pe=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var r=this.selector,n=this.subjectFactory(),i=r(n).subscribe(t);return i.add(e.subscribe(n)),i},t}();function $e(){return new L}function Ce(){return function(t){return Oe()((e=$e,function(t){var n;if(n="function"==typeof e?e:function(){return e},"function"==typeof r)return t.lift(new Pe(n,r));var i=Object.create(t,Ae);return i.source=t,i.subjectFactory=n,i})(t));var e,r}}var qe=ut(window,"hashchange"),Me=ut(window,"popstate");function Re(t){var e=matchMedia(t);return function t(e,r,n){return n?t(e,r).pipe(G((function(t){return S(t)?n.apply(void 0,t):n(t)}))):new q((function(t){var n,i=function(){for(var e=[],r=0;r0?t.prototype.requestAsyncId.call(this,e,r,n):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame((function(){return e.flush(null)}))))},e.prototype.recycleAsyncId=function(e,r,n){if(void 0===n&&(n=0),null!==n&&n>0||null===n&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,r,n);0===e.actions.length&&(cancelAnimationFrame(r),e.scheduled=void 0)},e}(zt),We=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return b(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,r=this.actions,n=-1,i=r.length;t=t||r.shift();do{if(e=t.execute(t.state,t.delay))break}while(++n=e})),we(),se(We),Ct((function(e){!function(t,e){t.setAttribute("data-md-state",e?"hidden":"")}(t,e)})),Be((function(){!function(t){t.removeAttribute("data-md-state")}(t)})))}function ir(t,e){var r=e;if(t.length>r){for(;" "!==t[r]&&--r>0;);return t.substring(0,r)+"..."}return t}function or(t,e){if(void 0===Ge){var r=Se("#__lang");Ge=JSON.parse(r.innerText)}if(void 0===Ge[t])throw new ReferenceError("Invalid translation: "+t);return void 0!==e?Ge[t].replace("#",e):Ge[t]}var ur=function(){return(ur=Object.assign||function(t){for(var e,r=1,n=arguments.length;r=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function cr(t){return e=function(){var e="fixed"===getComputedStyle(t).getPropertyValue("position");return X({sticky:e,height:e?t.offsetHeight:0})},new q((function(t){var r;try{r=e()}catch(e){return void t.error(e)}return(r?it(r):B()).subscribe(t)}));var e}var ar={};function fr(){for(var t=[],e=0;e0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function dr(t,e,r){var n=e.viewport,i=r.header$,o=n.size$.pipe(ee(i),G((function(e){var r=e.height;return t.offsetTop-r})),we());return fr([n.offset$,o]).pipe(G((function(t){var e=pr(t,2),r=e[0];return{x:r.x,y:r.y-e[1]}})),pe(1))}function yr(t){return $((e="active",we((function(t,n){return r?r(t[e],n[e]):t[e]===n[e]}))),se(We),Ct((function(e){var r=e.active;!function(t,e){t.setAttribute("data-md-state",e?"shadow":"")}(t,r)})),Be((function(){!function(t){t.removeAttribute("data-md-state")}(t)})));var e,r}r(6);var vr=function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};function br(t,e){var r,n;if("string"==typeof e||"number"==typeof e)t.innerHTML+=e.toString();else if(e instanceof Node)t.appendChild(e);else if(Array.isArray(e))try{for(var i=vr(e),o=i.next();!o.done;o=i.next()){br(t,o.value)}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}}function mr(t,e){for(var r,n,i,o,u=[],s=2;s0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function xr(t,e){var r=t.pipe(kt((function(t){return t}))),n=t.pipe(kt((function(t){return!t})));return $(Vt((function(t){return fr([X(t),r])})),Vt((function(t){var r,i=_r(t,2),o=i[0];return i[1]?e(o).pipe((r=n,function(t){return t.lift(new wr(r))})):W})))}function Sr(t,e){return $(xr(t.media.screen$,(function(r){return function(t,e,r){return dr(t,e,{header$:r.header$}).pipe(nr(t,20)).pipe(G((function(t){return{hidden:t}})))}(r,t,e)})),pe(1))}var Er=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function Tr(t,e){return $(Vt((function(r){return function(t,e,r){var n=e.viewport,i=r.header$.pipe(Rt("height")),o=fr([n.offset$,n.size$,i]).pipe(G((function(e){var r=Er(e,3),n=r[0].y,i=r[1].height,o=r[2],u=t.offsetTop,s=t.offsetHeight+u;return i-Math.max(0,u-n,o)-Math.max(0,i+n-s)})),we()),u=fr([n.offset$,i]).pipe(G((function(e){var r=Er(e,2),n=r[0].y,i=r[1];return n>=t.offsetTop-i})),we());return fr([o,i,u]).pipe(G((function(e){var r=Er(e,3),n=r[0],i=r[1],o=r[2];return{offset:t.offsetTop-i,height:n,active:o}})))}(r,t,e)})),pe(1))}function Or(t){return function e(r,o){switch(arguments.length){case 0:return e;case 1:return n(r)?e:i((function(e){return t(r,e)}));default:return n(r)&&n(o)?e:n(r)?i((function(e){return t(e,o)})):n(o)?i((function(e){return t(r,e)})):t(r,o)}}}function jr(t){for(var e,r=[];!(e=t.next()).done;)r.push(e.value);return r}function Ir(t,e,r){for(var n=0,i=r.length;n=0;){if(r[c]===t)return n[c]===e;c-=1}switch(u){case"Map":return t.size===e.size&&kr(t.entries(),e.entries(),r.concat([t]),n.concat([e]));case"Set":return t.size===e.size&&kr(t.values(),e.values(),r.concat([t]),n.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 a=d(t);if(a.length!==d(e).length)return!1;var f=r.concat([t]),l=n.concat([e]);for(c=a.length-1;c>=0;){var h=a[c];if(!s(h,e)||!Pr(e[h],t[h],f,l))return!1;c-=1}return!0}var $r=Or((function(t,e){return Pr(t,e,[],[])})),Cr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function qr(t,e,r){var n=e.viewport,i=r.main$,o=parseFloat(getComputedStyle(t.parentElement).getPropertyValue("padding-top")),u=fr([n.offset$,i]).pipe(G((function(t){var e=Cr(t,2),r=e[0].y,n=e[1],i=n.offset;return n.height-o+Math.min(o,Math.max(0,r-i))}))),s=fr([n.offset$,i]).pipe(G((function(t){var e=Cr(t,2);return e[0].y>=e[1].offset+o})));return fr([u,s]).pipe(G((function(t){var e=Cr(t,2);return{height:e[0],lock:e[1]}})),we($r),pe(1))}function Mr(t){return $(se(We),Ct((function(e){var r=e.height,n=e.lock;!function(t,e){t.style.height=e+"px"}(t,r),function(t,e){t.setAttribute("data-md-state",e?"lock":"")}(t,n)})),Be((function(){!function(t){t.style.height=""}(t),function(t){t.removeAttribute("data-md-state")}(t)})))}function Rr(t,e){return $(xr(t.media.screen$,(function(r){return function(t,e,r){return qr(t,e,{main$:r.main$}).pipe(Mr(t)).pipe(G((function(t){return{sidebar:t}})))}(r,t,e)})),pe(1))}var Hr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function Dr(t,e){var r=e.prepare;return fr([ut(t,"keyup").pipe(G((function(){return r(t.value)})),me(""),we()),function(t){var e=ut(t,"focus"),r=ut(t,"blur");return yt(e.pipe(de(!0)),r.pipe(de(!1))).pipe(me(t===document.activeElement),pe(1))}(t)]).pipe(G((function(t){var e=Hr(t,2);return{value:e[0],focus:e[1]}})),pe(1))}function Lr(t){return ut(t,"click").pipe(de(void 0))}var Vr={link:"md-search-result__link",article:"md-search-result__article md-search-result__article--document",title:"md-search-result__title",teaser:"md-search-result__teaser"};var Fr={link:"md-search-result__link",article:"md-search-result__article",title:"md-search-result__title",teaser:"md-search-result__teaser"};function Ur(t){var e=t.location,r=t.title,n=t.text;return mr("a",{href:e,title:r,class:Fr.link,tabIndex:-1},mr("article",{class:Fr.article},mr("h1",{class:Fr.title},r),n.length?mr("p",{class:Fr.teaser},ir(n,320)):void 0))}var Yr={item:"md-search-result__item"};function zr(t){var e=t.article,r=t.sections;return mr("li",{class:Yr.item},function(t){var e=t.location,r=t.title,n=t.text;return mr("a",{href:e,title:r,class:Vr.link,tabIndex:-1},mr("article",{class:Vr.article},mr("h1",{class:Vr.title},r),n.length?mr("p",{class:Vr.teaser},ir(n,320)):void 0))}(e),r.map(Ur))}var Xr={facts:"md-source__facts",fact:"md-source__fact"};var Wr=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Br(t,this.observables,this.project))},t}(),Br=function(t){function e(e,r,n){var i=t.call(this,e)||this;i.observables=r,i.project=n,i.toRespond=[];var o=r.length;i.values=new Array(o);for(var u=0;u0){var u=o.indexOf(r);-1!==u&&o.splice(u,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(ft),Gr=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function Jr(t,e){var r=e.query$,n=Se(".md-search-result__meta",t);return $(function(){for(var t=[],e=0;e1?or("search.result.other",e.toString()):or(1===e?"search.result.one":"search.result.none")}(n,r.length):function(t){t.textContent=or("search.result.placeholder")}(n),r})))}function Kr(t,e,r){var n=r.result$,i=r.query$,o=t.parentElement,s=function(t,e){var r=e.viewport;return yt(ut(t,"scroll"),r.size$).pipe(G((function(){return Te(t)})),me(Te(t)),pe(1))}(o,e).pipe(G((function(t){return t.y>=o.scrollHeight-o.offsetHeight-16})),we(),kt(u));return n.pipe(Jr(t,{query$:i}),function(t,e){var r=e.render$,n=t.parentElement,i=Se(".md-search-result__list",t);return $(Vt((function(t){return r.pipe(se(We),re((function(e){for(;e16)););return e}),0),de(t),Be((function(){!function(t){t.innerHTML=""}(i)})))})))}(t,{render$:s}))}function Qr(t,e){return $(xr(t.media.screen$,(function(r){return function(t,e,r){return dr(t,e,{header$:r.header$}).pipe(nr(t,8)).pipe(G((function(t){return{hidden:t}})))}(r,t,e)})),pe(1))}var Zr=i((function(t){return e=t,"[object String]"===Object.prototype.toString.call(e)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse();var e}));function tn(t,e){return function(t,e,r){var n,i;if("function"==typeof t.indexOf)switch(typeof e){case"number":if(0===e){for(n=1/e;r=0}function en(t,e,r){var n,i=typeof t;switch(i){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(e&&(r._items["-0"]=!0),!1):null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):i in r._items?t in r._items[i]||(e&&(r._items[i][t]=!0),!1):(e&&(r._items[i]={},r._items[i][t]=!0),!1);case"boolean":if(i in r._items){var o=t?1:0;return!!r._items[i][o]||(e&&(r._items[i][o]=!0),!1)}return e&&(r._items[i]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?e?(n=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===n):r._nativeSet.has(t):i in r._items?!!tn(t,r._items[i])||(e&&r._items[i].push(t),!1):(e&&(r._items[i]=[t]),!1);case"undefined":return!!r._items[i]||(e&&(r._items[i]=!0),!1);case"object":if(null===t)return!!r._items.null||(e&&(r._items.null=!0),!1);default:return(i=Object.prototype.toString.call(t))in r._items?!!tn(t,r._items[i])||(e&&r._items[i].push(t),!1):(e&&(r._items[i]=[t]),!1)}}var rn=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!en(t,!0,this)},t.prototype.has=function(t){return en(t,!1,this)},t}(),nn=Or((function(t,e){for(var r=[],n=0,i=t.length,o=e.length,u=new rn,s=0;s=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},un=function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,o=r.call(t),u=[];try{for(;(void 0===e||e-- >0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},sn=function(){for(var t=[],e=0;e0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u};function ln(t,e,r){var n=r.header$,i=qr(t,e,{main$:r.main$}).pipe(Mr(t)),o=Ee(".md-nav__link",t),u=function(t,e,r){var n,i,o=e.viewport,u=r.header$,s=new Map;try{for(var c=on(t),a=c.next();!a.done;a=c.next()){var f=a.value,l=Se('[id="'+decodeURIComponent(f.hash.substring(1))+'"]');void 0!==l&&s.set(f,l)}}catch(t){n={error:t}}finally{try{a&&!a.done&&(i=c.return)&&i.call(c)}finally{if(n)throw n.error}}var h=u.pipe(G((function(t){return 18+t.height})));return o.size$.pipe(G((function(){var t=[];return sn(s).reduce((function(e,r){for(var n=un(r,2),i=n[0],o=n[1];t.length;){if(!(s.get(t[t.length-1]).tagName>=o.tagName))break;t.pop()}return e.set(Zr(t=sn(t,[i])),o.offsetTop)}),new Map)})),Vt((function(t){return fr(o.offset$,h).pipe(re((function(t,e){for(var r=un(t,2),n=r[0],i=r[1],o=un(e,2),u=o[0].y,s=o[1];i.length;){if(!(un(i[0],2)[1]-s=u))break;i=sn([n.pop()],i)}return[n,i]}),[[],sn(t)]),we((function(t,e){return t[0]===e[0]&&t[1]===e[1]})))}))).pipe(G((function(t){var e=un(t,2),r=e[0],n=e[1];return{prev:r.map((function(t){return un(t,1)[0]})),next:n.map((function(t){return un(t,1)[0]}))}})),re((function(t,e){var r=Math.max(0,Math.min(e.prev.length,t.prev.length)-1),n=Math.max(e.prev.length,t.prev.length);return{prev:e.prev.slice(r,n+1),next:nn(e.next,t.next)}}),{prev:[],next:[]})).pipe(pe(1))}(o,e,{header$:n}).pipe(function(t){return $(se(We),Ct((function(t){var e,r,n,i,o=t.prev,u=t.next;try{for(var s=on(u),c=s.next();!c.done;c=s.next()){er(l=un(c.value,1)[0]),Ze(l)}}catch(t){e={error:t}}finally{try{c&&!c.done&&(r=s.return)&&r.call(s)}finally{if(e)throw e.error}}try{for(var a=on(o.entries()),f=a.next();!f.done;f=a.next()){var l,h=un(f.value,2),p=h[0];tr(l=un(h[1],1)[0],p===o.length-1),Qe(l,!0)}}catch(t){n={error:t}}finally{try{f&&!f.done&&(i=a.return)&&i.call(a)}finally{if(n)throw n.error}}})),Be((function(){var e,r;try{for(var n=on(t),i=n.next();!i.done;i=n.next()){var o=i.value;er(o),Ze(o)}}catch(t){e={error:t}}finally{try{i&&!i.done&&(r=n.return)&&r.call(n)}finally{if(e)throw e.error}}})))}(o));return fr([i,u]).pipe(G((function(t){var e=fn(t,2);return{sidebar:e[0],anchors:e[1]}})))}function hn(t){return t.type===an.DUMP}function pn(t){return t.type===an.RESULT}!function(t){t[t.STRING=0]="STRING",t[t.BINARY=1]="BINARY"}(cn||(cn={})),function(t){t[t.SETUP=0]="SETUP",t[t.DUMP=1]="DUMP",t[t.QUERY=2]="QUERY",t[t.RESULT=3]="RESULT"}(an||(an={})),r.d(e,"initialize",(function(){return _n}));var dn=function(){return(dn=Object.assign||function(t){for(var e,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)u.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return u},bn=function(){for(var t=[],e=0;e0})),Ce())},media:{screen$:Re("(min-width: 1220px)"),tablet$:Re("(min-width: 960px)")},viewport:{offset$:yt(He,De).pipe(G(Le),me(Le()),pe(1)),size$:De.pipe(G(Ve),me(Ve()),pe(1))}},n=vn(gn(t),2),i=n[0],o=n[1];(function(){var t=Se("[data-md-source][href]");if(console.log(t),!t)return W;var e=sessionStorage.getItem("repository");if(e)return X(JSON.parse(e));function r(t){return t>999?(t/1e3).toFixed(1)+"k":""+t}var n=vn(t.href.match(/^.+github\.com\/([^\/]+)\/?([^\/]+)?.*$/i),3),i=n[1],o=n[2];return i&&o?At({url:"https://api.github.com/repos/"+i+"/"+o,responseType:"json"}).pipe(G((function(t){var e=t.status,n=t.response;if(200===e){var i=n.stargazers_count,o=n.forks_count;return[r(i)+" Stars",r(o)+" Forks"]}return[]})),Ct((function(t){return sessionStorage.setItem("repository",JSON.stringify(t))}))):i?At({url:"https://api.github.com/users/"+i,responseType:"json"}).pipe(G((function(t){var e=t.status,n=t.response;return 200===e?[r(n.public_repos)+" Repositories"]:[]})),Ct((function(t){return sessionStorage.setItem("repository",JSON.stringify(t))}))):X([])})().subscribe((function(t){t.length&&Ee("[data-md-source] .md-source__repository").forEach((function(e){e.dataset.mdState="done",e.appendChild(function(t){return mr("ul",{class:Xr.facts},t.map((function(t){return mr("li",{class:Xr.fact},t)})))}(t))}))}));var s=function(t,e){return e.document$.pipe(G((function(e){return t.reduce((function(t,r){var n,i=Se("[data-md-component="+r+"]",e);return ur(ur({},t),void 0!==i?((n={})[r]=i,n):{})}),{})})),re((function(t,e){var r,n;try{for(var i=sr(d(t)),o=i.next();!o.done;o=i.next()){var u=o.value;switch(u){case"header-title":case"container":u in t&&void 0!==t[u]&&(t[u].replaceWith(e[u]),t[u]=e[u]);break;default:t[u]=Se("[data-md-component="+u+"]")}}}catch(t){r={error:t}}finally{try{o&&!o.done&&(n=i.return)&&n.call(i)}finally{if(r)throw r.error}}return t}))).pipe(pe(1))}(mn,{document$:r.document.load$}),c=function(t){return s.pipe(function(t){return $(Vt((function(e){return void 0!==e[t]?X(e[t]):st})))}(t))},a=c("header").pipe(Vt(cr));c("header").pipe(Vt((function(t){return p.pipe(yr(t))}))).subscribe();var f=i.pipe(kt(pn),Rt("data"),Ct((function(e){return e.forEach((function(e){e.article.location=t.base+"/"+e.article.location,e.sections.forEach((function(e){e.location=t.base+"/"+e.location}))}))}))),l=c("search-query").pipe(Vt((function(t){return Dr(t,{prepare:wn})})));l.pipe(G((function(t){return{type:an.QUERY,data:t.value}}))).subscribe(o),l.pipe(Ct((function(t){var e,r;t.focus&&(r=!0,(e=_).checked!==r&&e.click())}))).subscribe();var h,p=c("main").pipe(Tr(r,{header$:a})),v=c("navigation").pipe(Rr(r,{main$:p})),b=c("toc").pipe(function(t,e){return $(xr(t.media.tablet$,(function(r){return ln(r,t,e)})),pe(1))}(r,{header$:a,main$:p})),m=c("search-result").pipe(function(t,e){return $(Vt((function(r){return Kr(r,t,e)})),pe(1))}(r,{result$:f,query$:l.pipe(Rt("value"))})),w=c("tabs").pipe(Qr(r,{header$:a})),g=c("hero").pipe(Sr(r,{header$:a})),_=(Se("[data-md-toggle=drawer]"),Se("[data-md-toggle=search]")),x=(h=_,ut(h,"change").pipe(G((function(){return h.checked})))).pipe(Kt(400)),S=c("search-reset").pipe(Vt(Lr)),E=x.pipe(Vt((function(t){return!0===t?ut(window,"keydown"):st})));yt(x.pipe(kt(u)),S,E).pipe(ee(c("search-query")),Ct((function(t){return t.focus()}))).subscribe(),yt(Re("print").pipe(kt(u)),ut(window,"beforeprint")).subscribe((function(){var t=document.querySelectorAll("details");Array.prototype.forEach.call(t,(function(t){t.setAttribute("open","")}))}));var T={search:{query$:l,result$:m,reset$:S},main$:p,navigation$:v,toc$:b,tabs$:w,hero$:g},O=T.search,j=yn(T,["search"]);return yt.apply(void 0,bn(y(j),y(O))).subscribe(),{agent:r,state:T}}}])); //# 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 index abc59c6d9..c0c488ae8 100644 --- a/material/assets/javascripts/bundle.js.map +++ b/material/assets/javascripts/bundle.js.map @@ -1 +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/ramda/es/internal/_has.js","webpack:///./node_modules/ramda/es/internal/_isArguments.js","webpack:///./node_modules/ramda/es/keys.js","webpack:///./node_modules/ramda/es/values.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/util/isScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/of.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/empty.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/map.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/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/observable/forkJoin.js","webpack:///./node_modules/rxjs/_esm5/internal/InnerSubscriber.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/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/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/AjaxObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/ajax.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/filter.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/tap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/pluck.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/take.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.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/async.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/throwError.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/switchMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/never.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/scan.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.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/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/observable/fromEvent.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/mapTo.js","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/distinctUntilChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skip.js","webpack:///./src/assets/javascripts/utilities/agent/document/index.ts","webpack:///./src/assets/javascripts/utilities/agent/element/_/index.ts","webpack:///./src/assets/javascripts/utilities/agent/element/offset/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/utilities/agent/location/index.ts","webpack:///./src/assets/javascripts/utilities/agent/media/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js","webpack:///./src/assets/javascripts/utilities/agent/viewport/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/throttle.js","webpack:///./src/assets/javascripts/utilities/agent/worker/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/utilities/string/index.ts","webpack:///./src/assets/javascripts/actions/anchor/index.ts","webpack:///./src/assets/javascripts/actions/search/result/index.ts","webpack:///./src/assets/javascripts/utilities/hidden/index.ts","webpack:///./src/assets/javascripts/actions/hidden/index.ts","webpack:///./src/assets/javascripts/components/header/_/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/defer.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/combineLatest.js","webpack:///./src/assets/javascripts/components/header/offset/index.ts","webpack:///./src/assets/javascripts/components/header/shadow/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","webpack:///./src/assets/javascripts/actions/header/index.ts","webpack:///./src/assets/javascripts/extensions/jsx/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeUntil.js","webpack:///./src/assets/javascripts/extensions/rxjs/operators/index.ts","webpack:///./src/assets/javascripts/components/hero/index.ts","webpack:///./src/assets/javascripts/components/main/_/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/components/main/sidebar/index.ts","webpack:///./src/assets/javascripts/actions/sidebar/index.ts","webpack:///./src/assets/javascripts/components/navigation/_/index.ts","webpack:///./src/assets/javascripts/components/search/query/index.ts","webpack:///./src/assets/javascripts/utilities/agent/element/focus/index.ts","webpack:///./src/assets/javascripts/components/search/reset/index.ts","webpack:///./src/assets/javascripts/templates/search/result/article/index.tsx","webpack:///./src/assets/javascripts/templates/search/result/section/index.tsx","webpack:///./src/assets/javascripts/templates/search/result/_/index.tsx","webpack:///./src/assets/javascripts/templates/source/index.tsx","webpack:///./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js","webpack:///./src/assets/javascripts/components/search/result/meta/index.ts","webpack:///./src/assets/javascripts/components/search/result/_/index.ts","webpack:///./src/assets/javascripts/components/search/result/list/index.ts","webpack:///./src/assets/javascripts/components/tabs/index.ts","webpack:///./node_modules/ramda/es/reverse.js","webpack:///./node_modules/ramda/es/internal/_isString.js","webpack:///./node_modules/ramda/es/internal/_includes.js","webpack:///./node_modules/ramda/es/internal/_indexOf.js","webpack:///./node_modules/ramda/es/internal/_Set.js","webpack:///./node_modules/ramda/es/difference.js","webpack:///./src/assets/javascripts/workers/packer/_/index.ts","webpack:///./src/assets/javascripts/workers/search/_/index.ts","webpack:///./src/assets/javascripts/components/toc/_/index.ts","webpack:///./src/assets/javascripts/components/toc/anchor/index.ts","webpack:///./src/assets/javascripts/index.ts","webpack:///./src/assets/javascripts/utilities/agent/_/index.ts","webpack:///./src/assets/javascripts/components/_/index.ts","webpack:///./src/assets/javascripts/utilities/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","_has","prop","obj","toString","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","list","item","idx","keys","nIdx","ks","checkArgsLength","props","len","vals","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","join","Subscription","unsubscribe","_parentOrParents","_subscriptions","_unsubscribe","remove","index","flattenUnsubscriptionErrors","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","isScheduler","schedule","subscribeToArray","array","scheduleArray","scheduler","fromArray","of","args","pop","emptyScheduled","project","thisArg","TypeError","MapOperator","MapSubscriber","count","result","getSymbolIterator","iterator","isArrayLike","isPromise","then","subscribeTo","obs","promise","iterable","done","return","scheduled","isInteropObservable","scheduleObservable","schedulePromise","isIterable","scheduleIterable","from","forkJoinInternal","sources","values","completed","emitted","_loop_1","hasValue","InnerSubscriber","outerValue","outerIndex","notifyNext","notifyError","notifyComplete","subscribeToResult","outerSubscriber","OuterSubscriber","innerValue","innerIndex","innerSub","MergeMapOperator","concurrent","Number","POSITIVE_INFINITY","MergeMapSubscriber","hasCompleted","buffer","active","_tryNext","_innerSub","ish","innerSubscriber","shift","mergeAll","mergeMap","resultSelector","ii","merge","observables","last","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","post","delete","put","patch","getJSON","AjaxSubscriber","getHeader","FormData","serializeBody","send","xhr","AjaxResponse","_b","user","password","setupEvents","open","setHeaders","contentType","splitIndex","substring","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","filter","predicate","FilterOperator","FilterSubscriber","tap","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","pluck","properties","currentProp","plucker","ArgumentOutOfRangeError","ArgumentOutOfRangeErrorImpl","TakeOperator","total","TakeSubscriber","switchMap","SwitchMapOperator","NotificationKind","SwitchMapSubscriber","innerSubscription","AsyncAction","work","pending","state","delay","id","recycleAsyncId","requestAsyncId","setInterval","flush","clearInterval","execute","_execute","errored","errorValue","actions","Action","Scheduler","SchedulerAction","now","Date","AsyncScheduler","delegate","action","dispatch","Notification","kind","observe","do","accept","toObservable","createNext","undefinedValueNotification","createError","createComplete","completeNotification","delayFor","isNaN","abs","DelayOperator","DelaySubscriber","queue","time","notification","delay_1","max","_schedule","scheduleNotification","DelayMessage","switchMapTo","innerObservable","NEVER","scan","accumulator","seed","hasSeed","ScanOperator","ScanSubscriber","_seed","set","configurable","QueueAction","QueueScheduler","observeOn","ObserveOnOperator","ObserveOnSubscriber","arg","scheduleMessage","ObserveOnMessage","ReplaySubject","bufferSize","windowTime","_events","_infiniteTimeWindow","_bufferSize","_windowTime","nextInfiniteTimeWindow","nextTimeWindow","ReplayEvent","_getNow","_trimBufferThenGetEvents","eventsCount","spliceCount","shareReplay","configOrBufferSize","config","refCount","_c","useRefCount","isComplete","shareReplayOperator","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","concatAll","startWith","distinctUntilChanged","compare","keySelector","DistinctUntilChangedOperator","DistinctUntilChangedSubscriber","hasKey","y","load$","document","getElement","selector","node","querySelector","getElements","querySelectorAll","getElementOffset","el","scrollLeft","scrollTop","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","resize$","getViewportOffset","pageXOffset","pageYOffset","getViewportSize","width","innerWidth","height","innerHeight","defaultThrottleConfig","leading","trailing","ThrottleOperator","durationSelector","ThrottleSubscriber","_leading","_trailing","_hasValue","_sendValue","_throttled","throttle","duration","tryDurationSelector","throttlingDone","watchWorker","worker","send$","recv$","postMessage","AnimationFrameAction","requestAnimationFrame","cancelAnimationFrame","animationFrame","AnimationFrameScheduler","finalize","callback","FinallyOperator","lang","FinallySubscriber","setAnchorBlur","setAttribute","resetAnchorBlur","removeAttribute","setAnchorActive","classList","toggle","resetAnchorActive","addToSearchResultList","child","appendChild","paintHidden","offset","setHidden","resetHidden","truncate","translate","innerText","ReferenceError","replace","watchHeader","observableFactory","sticky","getComputedStyle","getPropertyValue","offsetHeight","NONE","combineLatest","CombineLatestOperator","CombineLatestSubscriber","toRespond","unused","oldVal","_tryResultSelector","watchViewportOffsetFromTopOf","viewport","header$","adjust$","size$","offsetTop","offset$","paintHeaderShadow","setHeaderShadow","resetHeaderShadow","innerHTML","Node","h","tag","attributes","createElement","attr","children","TakeUntilOperator","notifier","takeUntilSubscriber","notifierSubscription","seenValue","TakeUntilSubscriber","switchMapIf","toggle$","begin$","end$","mountHero","agent","screen$","hidden","watchHero","mountMain","height$","adjust","top","bottom","active$","watchMain","_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$","parseFloat","parentElement","min","lock$","lock","paintSidebar","style","setSidebarHeight","setSidebarLock","resetSidebarHeight","resetSidebarLock","mountNavigation","sidebar","watchNavigation","watchSearchQuery","prepare","focus$","blur$","activeElement","watchElementFocus","focus","watchSearchReset","css","link","article","title","teaser","renderSectionDocument","location","text","href","class","tabIndex","renderSearchResult","sections","renderArticleDocument","facts","fact","WithLatestFromOperator","WithLatestFromSubscriber","found","_tryProject","paintSearchResultMeta","query$","meta","withLatestFrom","textContent","setSearchResultMeta","resetSearchResultMeta","watchSearchResult","result$","container","render$","watchElementOffset","scrollHeight","resetSearchResultList","paintSearchResultList","mountTabs","watchTabs","split","reverse","_includes","inf","_indexOf","hasOrAdd","shouldAdd","prevSize","type","Infinity","_items","_nativeSet","has","bIdx","_Set","Set","first","second","out","firstLen","secondLen","toFilterOut","PackerMessageType","SearchMessageType","watchTableOfContents","sidebar$","els","anchors$","table","Map","decodeURIComponent","hash","header","path","anchor","tagName","begin","end","watchAnchorList","paintAnchorList","anchors","isSearchDumpMessage","DUMP","isSearchResultMessage","RESULT","documentElement","newvalue","trim","setupWorkers","base","Worker","search","packer","packerMessage$","packer$","BINARY","data","localStorage","setItem","searchMessage$","search$","STRING","data$","fromLocal","getItem","first_1","getPrototypeOf","resultSelector_1","forkJoin","SETUP","initialize","isConfig","SyntaxError","location$","href$","hash$","tablet$","searchWorkerRecv$","log","format","toFixed","repo","stargazers_count","forks_count","public_repos","repository","dataset","mdState","renderSource","components$","names","document$","components","replaceWith","watchComponentMap","component","switchComponent","section","QUERY","checked","click","navigation$","toc$","mountTableOfContents","resultComponent$","mountSearchResult","tabs$","hero$","a$","reset$","rest","temp"],"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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AAI0I,EAAO/K,MAC7CX,GAAY,Ia8TVwY,CAAkB9M,EAAO,CAAE4F,QAAO,EAAEP,OAAQA,EAAOnkB,KAAKmN,GAAM,aAG5D0e,EAAQX,EAAU,QACrBlrB,KACCilB,GAAUnG,EAAO,CAAE3B,QAAO,KAGxB2O,EAAQZ,EAAU,QACrBlrB,KACC6e,GAAUC,EAAO,CAAE3B,QAAO,KAOxBmL,GADSzS,GAA6B,2BAC7BA,GAA6B,4BAEtCkW,GGvYN3V,EHuYuBkS,EGrYhB1U,GAAUwC,EAAI,UAClBpW,KACCmN,GAAM,aHoYPnN,KACCyM,GAAO,GACP,GAAM,MAGJuf,EAASd,EAAU,gBACtBlrB,KACC4N,GAAUiV,KAGdzb,GAAM2kB,EAAIC,GACPhsB,KACCkR,GAAYga,EAA4B,iBACxCre,IAAI,SAAAuJ,GAAM,OAAAA,EAAGwM,YAEZriB,YAIL,IAAM6N,EAAQ,CACZka,OAAQ,CACNnE,OAAM,EACNO,QAASiH,EACTK,OAAM,GAERzK,MAAK,EACLiK,YAAW,EACXC,KAAI,EACJI,MAAK,EACLC,MAAK,GAGC,IAAAxD,OAAc,mBAItB,OAHAlhB,GAAK,gBAAI,EAAO6kB,GAAU,EAAOC,KAC9B3rB,YAEI,CACLue,MAAK,EACL1Q,MAAK","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 = 7);\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;","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;","import _curry1 from './internal/_curry1.js';\nimport keys from './keys.js';\n\n/**\n * Returns a list of all the enumerable own properties of the supplied object.\n * Note that the order of the output array is not guaranteed across different\n * JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [v]\n * @param {Object} obj The object to extract values from\n * @return {Array} An array of the values of the object's own properties.\n * @see R.valuesIn, R.keys\n * @example\n *\n * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]\n */\nvar values = /*#__PURE__*/_curry1(function values(obj) {\n var props = keys(obj);\n var len = props.length;\n var vals = [];\n var idx = 0;\n while (idx < len) {\n vals[idx] = obj[props[idx]];\n idx += 1;\n }\n return vals;\n});\nexport default values;","/*! *****************************************************************************\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 PURE_IMPORTS_END */\nexport function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.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 _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 _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 _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 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 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 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 _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 _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n if (sources.length === 1) {\n var first_1 = sources[0];\n if (isArray(first_1)) {\n return forkJoinInternal(first_1, null);\n }\n if (isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {\n var keys = Object.keys(first_1);\n return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);\n }\n }\n if (typeof sources[sources.length - 1] === 'function') {\n var resultSelector_1 = sources.pop();\n sources = (sources.length === 1 && isArray(sources[0])) ? sources[0] : sources;\n return forkJoinInternal(sources, null).pipe(map(function (args) { return resultSelector_1.apply(void 0, args); }));\n }\n return forkJoinInternal(sources, null);\n}\nfunction forkJoinInternal(sources, keys) {\n return new Observable(function (subscriber) {\n var len = sources.length;\n if (len === 0) {\n subscriber.complete();\n return;\n }\n var values = new Array(len);\n var completed = 0;\n var emitted = 0;\n var _loop_1 = function (i) {\n var source = from(sources[i]);\n var hasValue = false;\n subscriber.add(source.subscribe({\n next: function (value) {\n if (!hasValue) {\n hasValue = true;\n emitted++;\n }\n values[i] = value;\n },\n error: function (err) { return subscriber.error(err); },\n complete: function () {\n completed++;\n if (completed === len || !hasValue) {\n if (emitted === len) {\n subscriber.next(keys ?\n keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :\n values);\n }\n subscriber.complete();\n }\n }\n }));\n };\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n }\n });\n}\n//# sourceMappingURL=forkJoin.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 _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,_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_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,_.._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","/** 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 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 _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 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","/** 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","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 _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 _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,_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 _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 _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","/** 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","/** 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 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 _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","/** 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 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 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 * Helper 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","/*\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","/*\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\nimport { Agent } from \"../../_\"\nimport { ViewportSize } from \"../../viewport\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Element offset\n */\nexport interface ElementOffset {\n x: number /* Horizontal offset */\n y: number /* Vertical offset */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n size$: Observable /* Viewport size observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Retrieve element offset\n *\n * @param el - HTML element\n *\n * @return Element offset\n */\nexport function getElementOffset(el: HTMLElement): ElementOffset {\n return {\n x: el.scrollLeft,\n y: el.scrollTop\n }\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Watch element offset\n *\n * @param el - Element\n * @param agent - Agent\n *\n * @return Element offset observable\n */\nexport function watchElementOffset(\n el: HTMLElement, { viewport }: Agent\n): Observable {\n const scroll$ = fromEvent(el, \"scroll\")\n return merge(scroll$, viewport.size$)\n .pipe(\n map(() => getElementOffset(el)),\n startWith(getElementOffset(el)),\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 hash\n *\n * @return Location hash observable\n */\nexport function watchLocationHash(): 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","/*\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, share, switchMapTo, tap, throttle } 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 * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n *\n * @template T - Worker message type\n */\ninterface Options {\n send$: 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, { send$ }: Options\n): Observable {\n\n /* Intercept messages from web worker */\n const recv$ = fromEvent(worker, \"message\")\n .pipe(\n pluck(\"data\"),\n share()\n )\n\n /* Send and receive messages, return hot observable */\n return send$\n .pipe(\n throttle(() => recv$, { leading: true, trailing: true }),\n tap(message => worker.postMessage(message)),\n switchMapTo(recv$),\n share()\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 { getElement } from \"../agent\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Translations\n */\nlet lang: Record\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Truncate a string after the given number of characters\n *\n * @param value - Value to be truncated\n * @param n - Number of characters\n *\n * @return Truncated value\n */\nexport function truncate(value: string, n: number): string {\n let i = n\n if (value.length > i) {\n while (value[i] !== \" \" && --i > 0); // tslint:disable-line\n return `${value.substring(0, i)}...`\n }\n return value\n}\n\n/**\n * Translate the given key\n *\n * @param key - Key to be translated\n * @param value - Value to be replaced\n *\n * @return Translation\n */\nexport function translate(key: string, value?: string): string {\n if (typeof lang === \"undefined\") {\n const el = getElement(\"#__lang\")!\n lang = JSON.parse(el.innerText)\n }\n if (typeof lang[key] === \"undefined\") {\n throw new ReferenceError(`Invalid translation: ${key}`)\n }\n return typeof value !== \"undefined\"\n ? lang[key].replace(\"#\", value)\n : lang[key]\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 anchor blur\n *\n * @param el - Anchor element\n * @param value - Whether the anchor is blurred\n */\nexport function setAnchorBlur(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"blur\" : \"\")\n}\n\n/**\n * Reset anchor blur\n *\n * @param el - Anchor element\n */\nexport function resetAnchorBlur(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Set anchor active\n *\n * @param el - Anchor element\n * @param value - Whether the anchor is active\n */\nexport function setAnchorActive(\n el: HTMLElement, value: boolean\n): void {\n el.classList.toggle(\"md-nav__link--active\", value)\n}\n\n/**\n * Reset anchor active\n *\n * @param el - Anchor element\n */\nexport function resetAnchorActive(\n el: HTMLElement\n): void {\n el.classList.remove(\"md-nav__link--active\")\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 { translate } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set number of search results\n *\n * @param el - Search result metadata element\n * @param value - Number of results\n */\nexport function setSearchResultMeta(\n el: HTMLElement, value: number\n): void {\n el.textContent = value > 1\n ? translate(\"search.result.other\", value.toString())\n : value === 1\n ? translate(\"search.result.one\")\n : translate(\"search.result.none\")\n}\n\n/**\n * Reset number of search results\n *\n * @param el - Search result metadata element\n */\nexport function resetSearchResultMeta(\n el: HTMLElement\n): void {\n el.textContent = translate(\"search.result.placeholder\")\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Add an element to the search result list\n *\n * @param el - Search result list element\n * @param child - Search result element\n */\nexport function addToSearchResultList(\n el: HTMLElement, child: HTMLElement\n): void {\n el.appendChild(child)\n}\n\n/**\n * Reset search result list\n *\n * @param el - Search result list element\n */\nexport function resetSearchResultList(\n el: HTMLElement\n): void {\n el.innerHTML = \"\"\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 { resetHidden, setHidden } from \"actions\"\n\nimport { ViewportOffset } from \"../agent\"\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","/*\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 state\n */\nexport interface HeaderState {\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 state 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,_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","/*\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 { Agent, ViewportOffset } from \"utilities\"\n\nimport { HeaderState } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state 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 - HTML element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchViewportOffsetFromTopOf(\n el: HTMLElement, { viewport }: Agent, { header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = viewport.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([viewport.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 - HTML element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchViewportOffsetFromBottomOf(\n el: HTMLElement, { viewport }: Agent, { header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = viewport.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([viewport.offset$, adjust$])\n .pipe(\n map(([{ x, y }, adjust]) => ({ x, y: y - adjust })),\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 { resetHeaderShadow, setHeaderShadow } from \"actions\"\n\nimport { MainState } 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 { JSX as JSXInternal } from \"preact\"\nimport { keys } from \"ramda\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * HTML attributes\n */\ntype Attributes =\n & JSXInternal.HTMLAttributes\n & JSXInternal.SVGAttributes\n & Record\n\n/**\n * Child element\n */\ntype Child = Child[] | HTMLElement | Text | string | number\n\n/* ----------------------------------------------------------------------------\n * Helper functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Append a child node to an element\n *\n * @param el - HTML element\n * @param child - Child node\n */\nfunction appendChild(el: HTMLElement, child: Child): void {\n\n /* Handle primitive types (including raw HTML) */\n if (typeof child === \"string\" || typeof child === \"number\") {\n el.innerHTML += child.toString()\n\n /* Handle nodes */\n } else if (child instanceof Node) {\n el.appendChild(child)\n\n /* Handle nested children */\n } else if (Array.isArray(child)) {\n for (const node of child)\n appendChild(el, node)\n }\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * JSX factory\n *\n * @param tag - HTML tag\n * @param attributes - HTML attributes\n * @param children - Child elements\n *\n * @return HTML element\n */\nexport function h(\n tag: string, attributes: Attributes | null,\n ...children: Array\n): HTMLElement {\n const el = document.createElement(tag)\n\n /* Set attributes, if any */\n if (attributes)\n for (const attr of keys(attributes))\n if (typeof attributes[attr] !== \"boolean\")\n el.setAttribute(attr, attributes[attr])\n else if (attributes[attr])\n el.setAttribute(attr, \"\")\n\n /* Append child nodes */\n for (const child of children)\n appendChild(el, child)\n\n /* Return element */\n return el\n}\n\n/**\n * JSX factory wrapper\n *\n * @param el - JSX element\n *\n * @return HTML element\n */\nexport function toHTMLElement(el: JSXInternal.Element): HTMLElement {\n return el as any // Hack: if you have a better idea, PR!\n}\n\n/* ----------------------------------------------------------------------------\n * Namespace\n * ------------------------------------------------------------------------- */\n\nexport declare namespace h {\n export import JSX = JSXInternal\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 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 switchMap,\n takeUntil\n} from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\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 { Observable, OperatorFunction, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent, paintHidden } from \"utilities\"\n\nimport { HeaderState, watchViewportOffsetFromTopOf } from \"../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Hero state\n */\nexport interface HeroState {\n hidden: boolean /* Whether the hero is hidden */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch hero\n *\n * @param el - Hero element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Hero state\n */\nexport function watchHero(\n el: HTMLElement, agent: Agent, { header$ }: Options\n): Observable {\n\n /* Watch and paint visibility */\n const hidden$ = watchViewportOffsetFromTopOf(el, agent, { header$ })\n .pipe(\n paintHidden(el, 20)\n )\n\n /* Combine into a single hot observable */\n return hidden$\n .pipe(\n map(hidden => ({ hidden }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount hero from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountHero(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.screen$, el => watchHero(el, agent, options)),\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, OperatorFunction, combineLatest, pipe } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n pluck,\n shareReplay,\n switchMap\n} from \"rxjs/operators\"\n\nimport { Agent } from \"utilities\"\n\nimport { HeaderState } from \"../../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Main area state\n */\nexport interface MainState {\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 * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state 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 which depends on the viewport height and vertical offset, as\n * well as the height of the header element, if the header is fixed.\n *\n * @param el - Main area element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Main area state observable\n */\nexport function watchMain(\n el: HTMLElement, { viewport }: Agent, { 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([\n viewport.offset$,\n viewport.size$,\n adjust$\n ])\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([viewport.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 )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount main area from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountMain(\n agent: Agent, options: Options\n): OperatorFunction {\n return pipe(\n switchMap(el => watchMain(el, agent, options)),\n shareReplay(1)\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 {\n resetSidebarHeight,\n resetSidebarLock,\n setSidebarHeight,\n setSidebarLock\n} from \"actions\"\nimport { Agent } from \"utilities\"\n\nimport { MainState } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Sidebar state\n */\nexport interface SidebarState {\n height: number /* Sidebar height */\n lock: boolean /* Sidebar lock */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n main$: Observable /* Main area state 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 sidebar which depends on the vertical viewport offset, as well as the\n * height of the main area. When the page is scrolled beyond the header, the\n * sidebar is locked and fills the remaining space.\n *\n * @param el - Sidebar element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Sidebar state observable\n */\nexport function watchSidebar(\n el: HTMLElement, { viewport }: Agent, { 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([viewport.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([viewport.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","/*\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, OperatorFunction, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent } from \"utilities\"\n\nimport {\n MainState,\n SidebarState,\n paintSidebar,\n watchSidebar\n} from \"../../main\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Navigation state\n */\nexport interface NavigationState {\n sidebar: SidebarState /* Sidebar state */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n main$: Observable /* Main area state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch navigation\n *\n * @param el - Navigation element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Navigation state observable\n */\nexport function watchNavigation(\n el: HTMLElement, agent: Agent, { main$ }: Options\n): Observable {\n\n /* Watch and paint sidebar */\n const sidebar$ = watchSidebar(el, agent, { main$ })\n .pipe(\n paintSidebar(el)\n )\n\n /* Combine into a single hot observable */\n return sidebar$\n .pipe(\n map(sidebar => ({ sidebar }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount navigation from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountNavigation(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.screen$, el => watchNavigation(el, agent, options)),\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, combineLatest, fromEvent } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n shareReplay,\n startWith\n} from \"rxjs/operators\"\n\nimport { watchElementFocus } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search query state\n */\nexport interface SearchQueryState {\n value: string /* Query value */\n focus: boolean /* Query focus state */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n prepare(value: string): string /* Preparation function */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch search query\n *\n * @param el - Search query element\n * @param options - Options\n *\n * @return Search query state observable\n */\nexport function watchSearchQuery(\n el: HTMLInputElement, { prepare }: Options\n): Observable {\n\n /* Intercept keyboard events */\n const value$ = fromEvent(el, \"keyup\")\n .pipe(\n map(() => prepare(el.value)),\n startWith(\"\"),\n distinctUntilChanged()\n )\n\n /* Intercept focus events */\n const focus$ = watchElementFocus(el)\n\n /* Combine into a single hot observable */\n return combineLatest([value$, focus$])\n .pipe(\n map(([value, focus]) => ({ value, focus })),\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, merge } from \"rxjs\"\nimport { mapTo, shareReplay, startWith } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch element focus\n *\n * @param el - Element\n *\n * @return Element focus observable\n */\nexport function watchElementFocus(\n el: HTMLElement\n): Observable {\n const focus$ = fromEvent(el, \"focus\")\n const blur$ = fromEvent(el, \"blur\")\n\n /* Map events to boolean state */\n return merge(\n focus$.pipe(mapTo(true)),\n blur$.pipe(mapTo(false))\n )\n .pipe(\n startWith(el === document.activeElement),\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 { 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(undefined)\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 { h, toHTMLElement } from \"extensions\"\nimport { ArticleDocument } from \"modules\"\nimport { truncate } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n link: \"md-search-result__link\",\n article: \"md-search-result__article md-search-result__article--document\",\n title: \"md-search-result__title\",\n teaser: \"md-search-result__teaser\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render an article document\n *\n * @param article - Article document\n *\n * @return HTML element\n */\nexport function renderArticleDocument(\n { location, title, text }: ArticleDocument\n): HTMLElement {\n return toHTMLElement(\n \n
\n

{title}

\n {text.length\n ?

{truncate(text, 320)}

\n : undefined\n }\n
\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 { h, toHTMLElement } from \"extensions\"\nimport { SectionDocument } from \"modules\"\nimport { truncate } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n link: \"md-search-result__link\",\n article: \"md-search-result__article\",\n title: \"md-search-result__title\",\n teaser: \"md-search-result__teaser\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render a section document\n *\n * @param section - Section document\n *\n * @return HTML element\n */\nexport function renderSectionDocument(\n { location, title, text }: SectionDocument\n): HTMLElement {\n return toHTMLElement(\n \n
\n

{title}

\n {text.length\n ?

{truncate(text, 320)}

\n : undefined\n }\n
\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 { h, toHTMLElement } from \"extensions\"\nimport { SearchResult } from \"modules\"\n\nimport { renderArticleDocument } from \"../article\"\nimport { renderSectionDocument } from \"../section\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n item: \"md-search-result__item\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render a search result\n *\n * @param result - Search result\n *\n * @return HTML element\n */\nexport function renderSearchResult(\n { article, sections }: SearchResult\n): HTMLElement {\n return toHTMLElement(\n
  • \n {renderArticleDocument(article)}\n {...sections.map(renderSectionDocument)}\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 { h, toHTMLElement } from \"extensions\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n facts: \"md-source__facts\",\n fact: \"md-source__fact\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render source facts\n *\n * @param facts - Source facts\n *\n * @return HTML element\n */\nexport function renderSource(\n facts: any // TODO: add typings\n): HTMLElement {\n return toHTMLElement(\n
      \n {facts.map((fact: any) =>
    • {fact}
    • )}\n
    \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 function withLatestFrom() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return function (source) {\n var project;\n if (typeof args[args.length - 1] === 'function') {\n project = args.pop();\n }\n var observables = args;\n return source.lift(new WithLatestFromOperator(observables, project));\n };\n}\nvar WithLatestFromOperator = /*@__PURE__*/ (function () {\n function WithLatestFromOperator(observables, project) {\n this.observables = observables;\n this.project = project;\n }\n WithLatestFromOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n };\n return WithLatestFromOperator;\n}());\nvar WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WithLatestFromSubscriber, _super);\n function WithLatestFromSubscriber(destination, observables, project) {\n var _this = _super.call(this, destination) || this;\n _this.observables = observables;\n _this.project = project;\n _this.toRespond = [];\n var len = observables.length;\n _this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n _this.toRespond.push(i);\n }\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n _this.add(subscribeToResult(_this, observable, observable, i));\n }\n return _this;\n }\n WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n var toRespond = this.toRespond;\n if (toRespond.length > 0) {\n var found = toRespond.indexOf(outerIndex);\n if (found !== -1) {\n toRespond.splice(found, 1);\n }\n }\n };\n WithLatestFromSubscriber.prototype.notifyComplete = function () {\n };\n WithLatestFromSubscriber.prototype._next = function (value) {\n if (this.toRespond.length === 0) {\n var args = [value].concat(this.values);\n if (this.project) {\n this._tryProject(args);\n }\n else {\n this.destination.next(args);\n }\n }\n };\n WithLatestFromSubscriber.prototype._tryProject = function (args) {\n var result;\n try {\n result = this.project.apply(this, args);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return WithLatestFromSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=withLatestFrom.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 { MonoTypeOperatorFunction, Observable, pipe } from \"rxjs\"\nimport { map, withLatestFrom } from \"rxjs/operators\"\n\nimport {\n resetSearchResultMeta,\n setSearchResultMeta\n} from \"actions\"\nimport { SearchResult } from \"modules\"\nimport { getElement } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n query$: Observable /* Search query observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint search result metadata from source observable\n *\n * @param el - Search result metadata element\n * @param options - Options\n *\n * @return Operator function\n */\nexport function paintSearchResultMeta(\n el: HTMLElement, { query$ }: Options\n): MonoTypeOperatorFunction {\n const meta = getElement(\".md-search-result__meta\", el)!\n return pipe(\n withLatestFrom(query$),\n map(([result, query]) => {\n if (query) {\n setSearchResultMeta(meta, result.length)\n } else {\n resetSearchResultMeta(meta)\n }\n return result\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 { identity } from \"ramda\"\nimport { Observable, OperatorFunction, pipe } from \"rxjs\"\nimport {\n distinctUntilChanged,\n filter,\n map,\n shareReplay,\n switchMap\n} from \"rxjs/operators\"\n\nimport { SearchResult } from \"modules\"\nimport { Agent, watchElementOffset } from \"utilities\"\n\nimport { paintSearchResultList } from \"../list\"\nimport { paintSearchResultMeta } from \"../meta\"\n\n// /* ----------------------------------------------------------------------------\n// * Types\n// * ------------------------------------------------------------------------- */\n\n// tslint:disable-next-line: no-commented-code\n// /**\n// * Search result state\n// */\n// export interface SearchResultState {\n// result: SearchResult[] /* Search results */\n// }\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n result$: Observable /* Search result observable */\n query$: Observable /* Search query observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch search result\n *\n * @param el - Search result element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Search result state observable\n */\nexport function watchSearchResult(\n el: HTMLElement, agent: Agent, { result$, query$ }: Options\n): Observable {\n const container = el.parentElement!\n\n /* Compute whether there are more search results elements */\n const render$ = watchElementOffset(container, agent)\n .pipe(\n map(({ y }) => y >= container.scrollHeight - container.offsetHeight - 16),\n distinctUntilChanged(),\n filter(identity)\n )\n\n /* Paint search results */\n return result$\n .pipe(\n paintSearchResultMeta(el, { query$ }),\n paintSearchResultList(el, { render$ })\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount search result from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountSearchResult(\n agent: Agent, options: Options\n): OperatorFunction {\n return pipe(\n switchMap(el => watchSearchResult(el, agent, options)),\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 Observable,\n animationFrameScheduler,\n pipe\n} from \"rxjs\"\nimport {\n finalize,\n mapTo,\n observeOn,\n scan,\n switchMap\n} from \"rxjs/operators\"\n\nimport {\n addToSearchResultList,\n resetSearchResultList\n} from \"actions\"\nimport { SearchResult } from \"modules\"\nimport { renderSearchResult } from \"templates\"\nimport { getElement } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n render$: Observable /* Render trigger observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint search result list from source observable\n *\n * @param el - Search result element\n * @param options - Options\n *\n * @return Operator function\n */\nexport function paintSearchResultList(\n el: HTMLElement, { render$ }: Options\n): MonoTypeOperatorFunction {\n const container = el.parentElement!\n const list = getElement(\".md-search-result__list\", el)!\n return pipe(\n switchMap(result => render$\n .pipe(\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n scan(index => {\n while (index < result.length) {\n addToSearchResultList(list, renderSearchResult(result[index++]))\n if (container.scrollHeight - container.offsetHeight > 16)\n break\n }\n return index\n }, 0),\n\n /* Re-map to search result */\n mapTo(result),\n\n /* Reset on complete or error */\n finalize(() => {\n resetSearchResultList(list)\n })\n )\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, OperatorFunction, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent, paintHidden } from \"utilities\"\n\nimport { HeaderState, watchViewportOffsetFromTopOf } from \"../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Tabs state\n */\nexport interface TabsState {\n hidden: boolean /* Whether the tabs are hidden */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch tabs\n *\n * This function returns an observable that computes the visual parameters of\n * the tabs, currently only denoting whether the tabs are hidden or not.\n *\n * @param el - Tabs element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Tabs state\n */\nexport function watchTabs(\n el: HTMLElement, agent: Agent, { header$ }: Options\n): Observable {\n\n /* Watch and paint visibility */\n const hidden$ = watchViewportOffsetFromTopOf(el, agent, { header$ })\n .pipe(\n paintHidden(el, 8)\n )\n\n /* Combine into a single hot observable */\n return hidden$\n .pipe(\n map(hidden => ({ hidden }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount tabs from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountTabs(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.screen$, el => watchTabs(el, agent, options)),\n shareReplay(1)\n )\n}\n","import _curry1 from './internal/_curry1.js';\nimport _isString from './internal/_isString.js';\n\n/**\n * Returns a new list or string with the elements or characters in reverse\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {Array|String} list\n * @return {Array|String}\n * @example\n *\n * R.reverse([1, 2, 3]); //=> [3, 2, 1]\n * R.reverse([1, 2]); //=> [2, 1]\n * R.reverse([1]); //=> [1]\n * R.reverse([]); //=> []\n *\n * R.reverse('abc'); //=> 'cba'\n * R.reverse('ab'); //=> 'ba'\n * R.reverse('a'); //=> 'a'\n * R.reverse(''); //=> ''\n */\nvar reverse = /*#__PURE__*/_curry1(function reverse(list) {\n return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse();\n});\nexport default reverse;","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _indexOf from './_indexOf.js';\n\nexport default function _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}","import equals from '../equals.js';\n\nexport default function _indexOf(list, a, idx) {\n var inf, item;\n // Array.prototype.indexOf doesn't exist below IE9\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n while (idx < list.length) {\n item = list[idx];\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n }\n // non-zero numbers can utilise Set\n return list.indexOf(a, idx);\n\n // all these types can utilise Set\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n }\n }\n // anything else not covered above, defer to R.equals\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n}","import _includes from './_includes.js';\n\nvar _Set = /*#__PURE__*/function () {\n function _Set() {\n /* globals Set */\n this._nativeSet = typeof Set === 'function' ? new Set() : null;\n this._items = {};\n }\n\n // until we figure out why jsdoc chokes on this\n // @param item The item to add to the Set\n // @returns {boolean} true if the item did not exist prior, otherwise false\n //\n _Set.prototype.add = function (item) {\n return !hasOrAdd(item, true, this);\n };\n\n //\n // @param item The item to check for existence in the Set\n // @returns {boolean} true if the item exists in the Set, otherwise false\n //\n _Set.prototype.has = function (item) {\n return hasOrAdd(item, false, this);\n };\n\n //\n // Combines the logic for checking whether an item is a member of the set and\n // for adding a new item to the set.\n //\n // @param item The item to check or add to the Set instance.\n // @param shouldAdd If true, the item will be added to the set if it doesn't\n // already exist.\n // @param set The set instance to check or add to.\n // @return {boolean} true if the item already existed, otherwise false.\n //\n return _Set;\n}();\n\nfunction hasOrAdd(item, shouldAdd, set) {\n var type = typeof item;\n var prevSize, newSize;\n switch (type) {\n case 'string':\n case 'number':\n // distinguish between +0 and -0\n if (item === 0 && 1 / item === -Infinity) {\n if (set._items['-0']) {\n return true;\n } else {\n if (shouldAdd) {\n set._items['-0'] = true;\n }\n return false;\n }\n }\n // these types can all utilise the native Set\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = {};\n set._items[type][item] = true;\n }\n return false;\n } else if (item in set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][item] = true;\n }\n return false;\n }\n }\n\n case 'boolean':\n // set._items['boolean'] holds a two element array\n // representing [ falseExists, trueExists ]\n if (type in set._items) {\n var bIdx = item ? 1 : 0;\n if (set._items[type][bIdx]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][bIdx] = true;\n }\n return false;\n }\n } else {\n if (shouldAdd) {\n set._items[type] = item ? [false, true] : [true, false];\n }\n return false;\n }\n\n case 'function':\n // compare functions for reference equality\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n\n case 'undefined':\n if (set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type] = true;\n }\n return false;\n }\n\n case 'object':\n if (item === null) {\n if (!set._items['null']) {\n if (shouldAdd) {\n set._items['null'] = true;\n }\n return false;\n }\n return true;\n }\n /* falls through */\n default:\n // reduce the search size of heterogeneous sets by creating buckets\n // for each type.\n type = Object.prototype.toString.call(item);\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n // scan through all previously applied items\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n}\n\n// A simple Set type that honours R.equals semantics\nexport default _Set;","import _curry2 from './internal/_curry2.js';\nimport _Set from './internal/_Set.js';\n\n/**\n * Finds the set (i.e. no duplicates) of all elements in the first list not\n * contained in the second list. Objects and Arrays are compared in terms of\n * value equality, not reference equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The elements in `list1` that are not in `list2`.\n * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without\n * @example\n *\n * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2]\n * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5]\n * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}]\n */\nvar difference = /*#__PURE__*/_curry2(function difference(first, second) {\n var out = [];\n var idx = 0;\n var firstLen = first.length;\n var secondLen = second.length;\n var toFilterOut = new _Set();\n\n for (var i = 0; i < secondLen; i += 1) {\n toFilterOut.add(second[i]);\n }\n\n while (idx < firstLen) {\n if (toFilterOut.add(first[idx])) {\n out[out.length] = first[idx];\n }\n idx += 1;\n }\n return out;\n});\nexport default difference;","\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 * Packer message type\n */\nexport const enum PackerMessageType {\n STRING, /* String data */\n BINARY /* Packed data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message containing an unpacked string\n */\nexport interface PackerStringMessage {\n type: PackerMessageType.STRING /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing a packed string\n */\nexport interface PackerBinaryMessage {\n type: PackerMessageType.BINARY /* Message type */\n data: string /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message exchanged with the packer worker\n */\nexport type PackerMessage =\n | PackerStringMessage\n | PackerBinaryMessage\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Type guard for packer binary messages\n *\n * @param message - Packer worker message\n *\n * @return Test result\n */\nexport function isPackerBinaryMessage(\n message: PackerMessage\n): message is PackerBinaryMessage {\n return message.type === PackerMessageType.BINARY\n}\n\n/**\n * Type guard for packer string messages\n *\n * @param message - Packer worker message\n *\n * @return Test result\n */\nexport function isPackerStringMessage(\n message: PackerMessage\n): message is PackerStringMessage {\n return message.type === PackerMessageType.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 RTICULAR 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 { SearchIndexOptions, SearchResult } from \"modules\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search message type\n */\nexport const enum SearchMessageType {\n SETUP, /* Search index setup */\n DUMP, /* Search index dump */\n QUERY, /* Search query */\n RESULT /* Search results */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message containing the data necessary to setup the search index\n */\nexport interface SearchSetupMessage {\n type: SearchMessageType.SETUP /* Message type */\n data: SearchIndexOptions /* Message data */\n}\n\n/**\n * A message containing the a dump of the search index\n */\nexport interface SearchDumpMessage {\n type: SearchMessageType.DUMP /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing a search query\n */\nexport interface SearchQueryMessage {\n type: SearchMessageType.QUERY /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing results for a search query\n */\nexport interface SearchResultMessage {\n type: SearchMessageType.RESULT /* Message type */\n data: SearchResult[] /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message exchanged with the search worker\n */\nexport type SearchMessage =\n | SearchSetupMessage\n | SearchDumpMessage\n | SearchQueryMessage\n | SearchResultMessage\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Type guard for search setup messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchSetupMessage(\n message: SearchMessage\n): message is SearchSetupMessage {\n return message.type === SearchMessageType.SETUP\n}\n\n/**\n * Type guard for search dump messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchDumpMessage(\n message: SearchMessage\n): message is SearchDumpMessage {\n return message.type === SearchMessageType.DUMP\n}\n\n/**\n * Type guard for search query messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchQueryMessage(\n message: SearchMessage\n): message is SearchQueryMessage {\n return message.type === SearchMessageType.QUERY\n}\n\n/**\n * Type guard for search result messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchResultMessage(\n message: SearchMessage\n): message is SearchResultMessage {\n return message.type === SearchMessageType.RESULT\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, OperatorFunction, combineLatest, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent, getElements } from \"utilities\"\n\nimport { HeaderState } from \"../../header\"\nimport {\n MainState,\n SidebarState,\n paintSidebar,\n watchSidebar\n} from \"../../main\"\nimport {\n AnchorList,\n paintAnchorList,\n watchAnchorList\n} from \"../anchor\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Table of contents state\n */\nexport interface TableOfContentsState {\n sidebar: SidebarState /* Sidebar state */\n anchors: AnchorList /* Anchor list */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n main$: Observable /* Main area state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch table of contents\n *\n * @param el - Table of contents element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Table of contents state observable\n */\nexport function watchTableOfContents(\n el: HTMLElement, agent: Agent, { header$, main$ }: Options\n): Observable {\n\n /* Watch and paint sidebar */\n const sidebar$ = watchSidebar(el, agent, { main$ })\n .pipe(\n paintSidebar(el)\n )\n\n /* Watch and paint anchor list (scroll spy) */\n const els = getElements(\".md-nav__link\", el)\n const anchors$ = watchAnchorList(els, agent, { header$ })\n .pipe(\n paintAnchorList(els)\n )\n\n /* Combine into a single hot observable */\n return combineLatest([sidebar$, anchors$])\n .pipe(\n map(([sidebar, anchors]) => ({ sidebar, anchors }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount table of contents from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountTableOfContents(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.tablet$, el => watchTableOfContents(el, agent, options)),\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 { difference, reverse } 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 scan,\n shareReplay,\n switchMap,\n tap\n} from \"rxjs/operators\"\n\nimport {\n resetAnchorActive,\n resetAnchorBlur,\n setAnchorActive,\n setAnchorBlur\n} from \"actions\"\nimport { Agent, getElement } from \"utilities\"\n\nimport { HeaderState } from \"../../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Anchor list\n */\nexport interface AnchorList {\n prev: HTMLAnchorElement[][] /* Anchors (previous) */\n next: HTMLAnchorElement[][] /* Anchors (next) */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch anchor list\n *\n * This is effectively a scroll-spy implementation which will account for the\n * fixed header and automatically re-calculate anchor offsets when the viewport\n * is resized. The returned observable will only emit if the anchor list needs\n * to be repainted.\n *\n * This implementation tracks an anchor element's entire path starting from its\n * level up to the top-most anchor element, e.g. `[h3, h2, h1]`. Although the\n * Material theme currently doesn't make use of this information, it enables\n * the styling of the entire hierarchy through customization.\n *\n * Note that the current anchor is the last item of the `prev` anchor list.\n *\n * @param els - Anchor elements\n * @param agent - Agent\n * @param options - Options\n *\n * @return Anchor list observable\n */\nexport function watchAnchorList(\n els: HTMLAnchorElement[], { viewport }: Agent, { header$ }: Options\n): Observable {\n const table = new Map()\n for (const el of els) {\n const id = decodeURIComponent(el.hash.substring(1))\n const target = getElement(`[id=\"${id}\"]`)\n if (typeof target !== \"undefined\")\n table.set(el, target)\n }\n\n /* Compute necessary adjustment for header */\n const adjust$ = header$\n .pipe(\n map(header => 18 + header.height)\n )\n\n /* Compute partition of previous and next anchors */\n const partition$ = viewport.size$\n .pipe(\n\n /* Build index to map anchor paths to vertical offsets */\n map(() => {\n let path: HTMLAnchorElement[] = []\n return [...table].reduce((index, [anchor, target]) => {\n while (path.length) {\n const last = table.get(path[path.length - 1])!\n if (last.tagName >= target.tagName) {\n path.pop()\n } else {\n break\n }\n }\n return index.set(\n reverse(path = [...path, anchor]),\n target.offsetTop\n )\n }, new Map())\n }),\n\n /* Re-compute partition when viewport offset changes */\n switchMap(index => combineLatest(viewport.offset$, adjust$)\n .pipe(\n scan(([prev, next], [{ y }, adjust]) => {\n\n /* Look forward */\n while (next.length) {\n const [, offset] = next[0]\n if (offset - adjust < y) {\n prev = [...prev, next.shift()!]\n } else {\n break\n }\n }\n\n /* Look backward */\n while (prev.length) {\n const [, offset] = prev[prev.length - 1]\n if (offset - adjust >= y) {\n next = [prev.pop()!, ...next]\n } else {\n break\n }\n }\n\n /* Return partition */\n return [prev, next]\n }, [[], [...index]]),\n distinctUntilChanged((a, b) => {\n return a[0] === b[0]\n && a[1] === b[1]\n })\n )\n )\n )\n\n /* Compute anchor list migrations */\n const migration$ = partition$\n .pipe(\n map(([prev, next]) => ({\n prev: prev.map(([path]) => path),\n next: next.map(([path]) => path)\n })),\n\n /* Extract anchor list migrations */\n scan((a, b) => {\n const begin = Math.max(0, Math.min(b.prev.length, a.prev.length) - 1)\n const end = Math.max(b.prev.length, a.prev.length)\n return {\n prev: b.prev.slice(begin, end + 1),\n next: difference(b.next, a.next)\n }\n }, { prev: [], next: [] })\n )\n\n /* Return anchor list migrations as hot observable */\n return migration$\n .pipe(\n shareReplay(1)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Paint anchor list from source observable\n *\n * @param els - Anchor elements\n *\n * @return Operator function\n */\nexport function paintAnchorList(\n els: HTMLAnchorElement[]\n): MonoTypeOperatorFunction {\n return pipe(\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(({ prev, next }) => {\n\n /* Look forward */\n for (const [el] of next) {\n resetAnchorActive(el)\n resetAnchorBlur(el)\n }\n\n /* Look backward */\n for (const [index, [el]] of prev.entries()) {\n setAnchorActive(el, index === prev.length - 1)\n setAnchorBlur(el, true)\n }\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n for (const el of els) {\n resetAnchorActive(el)\n resetAnchorBlur(el)\n }\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// TODO: remove this after we finished refactoring\n// tslint:disable\n\nimport { identity, values } from \"ramda\"\nimport {\n EMPTY,\n Observable,\n Subject,\n forkJoin,\n merge,\n of\n} from \"rxjs\"\nimport { ajax } from \"rxjs/ajax\"\nimport {\n delay,\n filter,\n map,\n pluck,\n switchMap,\n switchMapTo,\n take,\n tap,\n} from \"rxjs/operators\"\n\nimport {\n Component,\n paintHeaderShadow,\n mountHero,\n mountMain,\n mountNavigation,\n mountSearchResult,\n mountTableOfContents,\n mountTabs,\n switchComponent,\n watchComponentMap,\n watchHeader,\n watchSearchQuery,\n watchSearchReset\n} from \"./components\"\nimport { SearchIndexOptions } from \"./modules\"\nimport {\n getElement,\n setupAgent,\n watchToggle,\n watchWorker,\n setToggle,\n getElements\n} from \"./utilities\"\nimport {\n PackerMessage,\n PackerMessageType,\n SearchMessage,\n SearchMessageType,\n SearchSetupMessage,\n isSearchDumpMessage,\n isSearchResultMessage\n} from \"./workers\"\nimport { renderSource } from \"templates\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Configuration\n */\nexport interface Config {\n base: string /* Base URL */\n worker: {\n search: string /* Search worker URL */\n packer: string /* Packer worker URL */\n }\n}\n\n/* ----------------------------------------------------------------------------\n * TODO: where do we put this stuff?\n * ------------------------------------------------------------------------- */\n\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\nconst names: Component[] = [\n \"container\", /* Container */\n \"header\", /* Header */\n \"header-title\", /* Header title */\n \"hero\", /* Hero */\n \"main\", /* Main area */\n \"navigation\", /* Navigation */\n \"search\", /* Search */\n \"search-query\", /* Search input */\n \"search-reset\", /* Search reset */\n \"search-result\", /* Search results */\n \"tabs\", /* Tabs */\n \"toc\" /* Table of contents */\n]\n\n/* ----------------------------------------------------------------------------\n * Helper functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Ensure that the given value is a valid configuration\n *\n * We could use `jsonschema` or any other schema validation framework, but that\n * would just add more bloat to the bundle, so we'll keep it plain and simple.\n *\n * @param config - Configuration\n *\n * @return Test result\n */\nfunction isConfig(config: any): config is Config {\n return typeof config === \"object\"\n && typeof config.base === \"string\"\n && typeof config.worker === \"object\"\n && typeof config.worker.search === \"string\"\n && typeof config.worker.packer === \"string\"\n}\n\n/**\n *\n * Rogue control characters must be filtered before handing the query to the\n * search index, as lunr will throw otherwise.\n */\nfunction prepare(value: string): string {\n const newvalue = value\n .replace(/(?:^|\\s+)[*+-:^~]+(?=\\s+|$)/g, \"\")\n .trim()\n\n return newvalue ? newvalue.replace(/\\s+|$/g, \"* \") : \"\"\n}\n\nfunction setupWorkers(config: Config) {\n // Remove trailing URL, or search might not work on the 404 page.\n config.base = config.base.replace(/\\/$/, \"\")\n\n const worker = new Worker(config.worker.search)\n const packer = new Worker(config.worker.packer)\n\n const packerMessage$ = new Subject()\n const packer$ = watchWorker(packer, { send$: packerMessage$ })\n\n // send a message, then switchMapTo worker!\n\n packer$.subscribe(message => {\n // console.log(\"PACKER.MSG\", message.data.length)\n // is always packed!\n if (message.type === PackerMessageType.BINARY && message.data[0] !== \"{\")\n localStorage.setItem(\"index\", message.data)\n })\n\n // storing = experimental feature\n\n const searchMessage$ = new Subject()\n\n const search$ = watchWorker(worker, { send$: searchMessage$ })\n\n /* Link search to packer */\n search$\n .pipe(\n filter(isSearchDumpMessage),\n map(message => ({\n type: PackerMessageType.STRING,\n data: message.data\n })),\n tap(message => packerMessage$.next(message)) // send message and wait!\n // switchMapTo(packer$)\n )\n .subscribe()\n\n const data$ = ajax({\n url: `${config.base}/search/search_index.json`,\n responseType: \"json\",\n withCredentials: true\n })\n .pipe(\n pluck(\"response\")\n // take(1)\n )\n\n const fromLocal = localStorage.getItem(\"index\")\n\n ;\n (fromLocal ? of({\n type: PackerMessageType.BINARY,\n data: localStorage.getItem(\"index\")!\n }) : EMPTY)\n .subscribe(x => {\n // console.log(\"send message to packer\")\n packerMessage$.next(x)\n })\n\n const index$ = fromLocal ? packer$.pipe(pluck(\"data\"), take(1)) : of(undefined) // of(localStorage.getItem(\"index\"))\n\n // index$.subscribe(xx => console.log(\"INDEX\", xx))\n\n forkJoin([data$, index$])\n .pipe(\n map(([data, index]) => ({\n type: SearchMessageType.SETUP,\n data: { ...data, index }\n }))\n )\n .subscribe(message => {\n searchMessage$.next(message) // TODO: this shall not complete\n })\n\n return [search$, searchMessage$] as const\n}\n\n/**\n * Yes, this is a super hacky implementation. Needs clean up.\n */\nfunction repository() {\n const el = getElement(\"[data-md-source][href]\")\n console.log(el)\n if (!el)\n return EMPTY\n\n const data = localStorage.getItem(\"repository\")\n if (data) {\n const x = JSON.parse(data)\n return of(x)\n }\n\n // TODO: do correct rounding, see GitHub\n function format(value: number) {\n if (value > 10000)\n return `${(value / 1000).toFixed(0)}k`\n else if (value > 1000)\n return `${(value / 1000).toFixed(1)}k`\n return `${value}`\n }\n\n const [, user, repo] = el.href.match(/^.+github\\.com\\/([^\\/]+)\\/?([^\\/]+)?.*$/)\n\n // Show repo stats\n if (user && repo) {\n return ajax({\n url: `https://api.github.com/repos/${user}/${repo}`,\n responseType: \"json\"\n })\n .pipe(\n map(({ status, response }) => {\n if (status === 200) {\n const { stargazers_count, forks_count } = response\n return [\n `${format(stargazers_count)} Stars`,\n `${format(forks_count)} Forks`\n ]\n }\n return []\n }),\n tap(data => localStorage.setItem(\"repository\", JSON.stringify(data)))\n )\n\n // Show user or organization stats\n } else if (user) {\n return ajax({\n url: `https://api.github.com/users/${user}`,\n responseType: \"json\"\n })\n .pipe(\n map(({ status, response }) => {\n if (status === 200) {\n const { public_repos } = response\n return [\n `${format(public_repos)} Repositories`\n ]\n }\n return []\n }),\n tap(data => localStorage.setItem(\"repository\", JSON.stringify(data)))\n )\n }\n return of([])\n}\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 // pass config here!?\n const agent = setupAgent() // TODO: add a config parameter here to configure media queries\n\n const [\n searchWorkerRecv$,\n searchMessage$\n ] = setupWorkers(config)\n\n // TODO: WIP repo rendering\n repository().subscribe(facts => {\n if (facts.length) {\n const sources = getElements(\"[data-md-source] .md-source__repository\")\n sources.forEach(repo => {\n repo.dataset.mdState = \"done\"\n repo.appendChild(\n renderSource(facts)\n )\n })\n }\n })\n\n /* ----------------------------------------------------------------------- */\n\n /* Create component map observable */\n const components$ = watchComponentMap(names, { document$: agent.document.load$ })\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\") // TODO:!\n .pipe(\n switchMap(watchHeader)\n )\n\n /* Create header shadow toggle */\n component(\"header\")\n .pipe(\n switchMap(el => main$\n .pipe(\n paintHeaderShadow(el) // technically, this could be done in paintMain\n )\n )\n )\n .subscribe()\n\n // ----------------------------------------------------------------------------\n\n // watchSearchResult // emit, if at bottom...\n // receive results as a second observable!? filter stuff, paint\n\n const result$ = searchWorkerRecv$ // move worker initialization into mountSearch ?\n .pipe(\n // tap(m => console.log(\"message from worker\", m)),\n filter(isSearchResultMessage),\n pluck(\"data\"),\n // Prefix URLs with base URL\n tap(result => result.forEach(item => {\n item.article.location = `${config.base}/${item.article.location}`\n item.sections.forEach(section => {\n section.location = `${config.base}/${section.location}`\n })\n }))\n )\n\n // handleSearchResult <-- operator\n\n const query$ = component(\"search-query\")\n .pipe(\n switchMap(el => watchSearchQuery(el, { prepare }))\n )\n\n query$\n .pipe(\n map(query => ({ // put this into some function...\n type: SearchMessageType.QUERY,\n data: query.value\n })), // TODO. ugly...\n // distinctUntilKeyChanged(\"data\")\n )\n .subscribe(searchMessage$)\n\n // create the message subject internally... and link it to the worker...?\n // watchSearchWorker(worker, agent, { query$ }) // message internally...\n\n query$\n .pipe(\n tap(query => {\n if (query.focus)\n setToggle(search, true)\n })\n )\n .subscribe()\n\n /* ----------------------------------------------------------------------- */\n\n const main$ = component(\"main\")\n .pipe(\n mountMain(agent, { header$ })\n )\n\n const navigation$ = component(\"navigation\")\n .pipe(\n mountNavigation(agent, { main$ })\n )\n\n const toc$ = component(\"toc\")\n .pipe(\n mountTableOfContents(agent, { header$, main$ })\n )\n\n // TODO: naming?\n const resultComponent$ = component(\"search-result\")\n .pipe(\n mountSearchResult(agent, { result$, query$: query$.pipe(pluck(\"value\")) })\n ) // temporary fix\n\n const tabs$ = component(\"tabs\")\n .pipe(\n mountTabs(agent, { header$ })\n )\n\n const hero$ = component(\"hero\")\n .pipe(\n mountHero(agent, { header$ })\n )\n\n\n /* ----------------------------------------------------------------------- */\n\n const drawer = getElement(\"[data-md-toggle=drawer]\")!\n const search = getElement(\"[data-md-toggle=search]\")!\n\n const a$ = watchToggle(search)\n .pipe(\n filter(identity),\n delay(400)\n )\n\n const reset$ = component(\"search-reset\")\n .pipe(\n switchMap(watchSearchReset)\n )\n\n merge(a$, reset$)\n .pipe(\n switchMapTo(component(\"search-query\")),\n tap(el => el.focus())\n )\n .subscribe()\n\n /* ----------------------------------------------------------------------- */\n\n const state = {\n search: {\n query$,\n result$: resultComponent$,\n reset$,\n },\n main$,\n navigation$,\n toc$,\n tabs$,\n hero$\n }\n\n const { search: temp, ...rest } = state\n merge(...values(rest), ...values(temp))\n .subscribe() // potential memleak <-- use takeUntil\n\n return {\n agent,\n state\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, Subject } from \"rxjs\"\n\nimport {\n ViewportOffset,\n ViewportSize,\n watchDocument,\n watchLocation,\n watchLocationHash,\n watchMedia,\n watchViewportOffset,\n watchViewportSize\n} from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Agent document\n */\nexport interface AgentDocument {\n load$: Observable /* Document observable */\n}\n\n/**\n * Agent location\n */\nexport interface AgentLocation {\n href$: Subject /* Location subject */\n hash$: Observable /* Location hash observable */\n}\n\n/**\n * Agent media\n */\nexport interface AgentMedia {\n screen$: Observable /* Media observable for screen */\n tablet$: Observable /* Media observable for tablet */\n}\n\n/**\n * Agent viewport\n */\nexport interface AgentViewport {\n offset$: Observable /* Viewport offset observable */\n size$: Observable /* Viewport size observable */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Agent\n */\nexport interface Agent {\n document: AgentDocument /* Document observables */\n location: AgentLocation /* Location observables */\n media: AgentMedia /* Media observables */\n viewport: AgentViewport /* Viewport observables */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Create the agent\n *\n * This function returns a data structure that contains all observables that\n * are related to the browser and/or environment.\n *\n * @return Agent\n */\nexport function setupAgent(): Agent {\n return {\n document: {\n load$: watchDocument()\n },\n location: {\n href$: watchLocation(),\n hash$: watchLocationHash()\n },\n media: {\n screen$: watchMedia(\"(min-width: 1220px)\"),\n tablet$: watchMedia(\"(min-width: 960px)\")\n },\n viewport: {\n offset$: watchViewportOffset(),\n size$: watchViewportSize()\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, 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 | \"container\" /* Container */\n | \"header\" /* Header */\n | \"header-title\" /* Header title */\n | \"hero\" /* Hero */\n | \"main\" /* Main area */\n | \"navigation\" /* Navigation */\n | \"search\" /* Search */\n | \"search-query\" /* Search input */\n | \"search-reset\" /* Search reset */\n | \"search-result\" /* Search results */\n | \"tabs\" /* Tabs */\n | \"toc\" /* Table of contents */\n\n/**\n * Component map\n */\nexport type ComponentMap = {\n [P in Component]?: HTMLElement\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n document$: Observable /* Document observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch component mapping\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 mapping observable\n */\nexport function watchComponentMap(\n names: Component[], { document$ }: Options\n): Observable {\n const components$ = document$\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 \"header-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, fromEvent } from \"rxjs\"\nimport { pluck } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set toggle\n *\n * Simulating a click event seems to be the most cross-browser compatible way\n * of changing the value while also emitting a `change` event. Before, Material\n * used `CustomEvent` to programatically change the value of a toggle, but this\n * is a much simpler and cleaner solution.\n *\n * @param el - Toggle element\n * @param value - Toggle value\n */\nexport function setToggle(\n el: HTMLInputElement, value: boolean\n): void {\n if (el.checked !== value)\n el.click()\n}\n\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 +{"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/ramda/es/internal/_has.js","webpack:///./node_modules/ramda/es/internal/_isArguments.js","webpack:///./node_modules/ramda/es/keys.js","webpack:///./node_modules/ramda/es/values.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/util/isScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/util/subscribeToArray.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduled/scheduleArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromArray.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/of.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/empty.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/map.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/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/observable/forkJoin.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEvent.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/never.js","webpack:///./node_modules/rxjs/_esm5/internal/InnerSubscriber.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/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/merge.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/AjaxObservable.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/dom/ajax.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/filter.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/tap.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/pluck.js","webpack:///./node_modules/rxjs/_esm5/internal/util/ArgumentOutOfRangeError.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/take.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.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/AsyncScheduler.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/async.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/throwError.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/switchMapTo.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/scan.js","webpack:///./node_modules/rxjs/_esm5/internal/scheduler/QueueAction.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/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/mapTo.js","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/distinctUntilChanged.js","webpack:///./node_modules/rxjs/_esm5/internal/operators/skip.js","webpack:///./src/assets/javascripts/utilities/agent/document/index.ts","webpack:///./src/assets/javascripts/utilities/agent/element/_/index.ts","webpack:///./src/assets/javascripts/utilities/agent/element/offset/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/utilities/agent/location/index.ts","webpack:///./src/assets/javascripts/utilities/agent/media/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/fromEventPattern.js","webpack:///./src/assets/javascripts/utilities/agent/viewport/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/throttle.js","webpack:///./src/assets/javascripts/utilities/agent/worker/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/utilities/string/index.ts","webpack:///./src/assets/javascripts/actions/anchor/index.ts","webpack:///./src/assets/javascripts/actions/search/result/index.ts","webpack:///./src/assets/javascripts/utilities/hidden/index.ts","webpack:///./src/assets/javascripts/actions/hidden/index.ts","webpack:///./src/assets/javascripts/components/header/_/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/observable/defer.js","webpack:///./node_modules/rxjs/_esm5/internal/observable/combineLatest.js","webpack:///./src/assets/javascripts/components/header/offset/index.ts","webpack:///./src/assets/javascripts/components/header/shadow/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/distinctUntilKeyChanged.js","webpack:///./src/assets/javascripts/actions/header/index.ts","webpack:///./src/assets/javascripts/extensions/jsx/index.ts","webpack:///./node_modules/rxjs/_esm5/internal/operators/takeUntil.js","webpack:///./src/assets/javascripts/extensions/rxjs/operators/index.ts","webpack:///./src/assets/javascripts/components/hero/index.ts","webpack:///./src/assets/javascripts/components/main/_/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/components/main/sidebar/index.ts","webpack:///./src/assets/javascripts/actions/sidebar/index.ts","webpack:///./src/assets/javascripts/components/navigation/_/index.ts","webpack:///./src/assets/javascripts/components/search/query/index.ts","webpack:///./src/assets/javascripts/utilities/agent/element/focus/index.ts","webpack:///./src/assets/javascripts/components/search/reset/index.ts","webpack:///./src/assets/javascripts/templates/search/result/article/index.tsx","webpack:///./src/assets/javascripts/templates/search/result/section/index.tsx","webpack:///./src/assets/javascripts/templates/search/result/_/index.tsx","webpack:///./src/assets/javascripts/templates/source/index.tsx","webpack:///./node_modules/rxjs/_esm5/internal/operators/withLatestFrom.js","webpack:///./src/assets/javascripts/components/search/result/meta/index.ts","webpack:///./src/assets/javascripts/components/search/result/_/index.ts","webpack:///./src/assets/javascripts/components/search/result/list/index.ts","webpack:///./src/assets/javascripts/components/tabs/index.ts","webpack:///./node_modules/ramda/es/reverse.js","webpack:///./node_modules/ramda/es/internal/_isString.js","webpack:///./node_modules/ramda/es/internal/_includes.js","webpack:///./node_modules/ramda/es/internal/_indexOf.js","webpack:///./node_modules/ramda/es/internal/_Set.js","webpack:///./node_modules/ramda/es/difference.js","webpack:///./src/assets/javascripts/workers/packer/_/index.ts","webpack:///./src/assets/javascripts/workers/search/_/index.ts","webpack:///./src/assets/javascripts/components/toc/_/index.ts","webpack:///./src/assets/javascripts/components/toc/anchor/index.ts","webpack:///./src/assets/javascripts/index.ts","webpack:///./src/assets/javascripts/utilities/agent/_/index.ts","webpack:///./src/assets/javascripts/components/_/index.ts","webpack:///./src/assets/javascripts/utilities/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","_has","prop","obj","toString","hasEnumBug","propertyIsEnumerable","nonEnumerableProps","hasArgsEnumBug","contains","list","item","idx","keys","nIdx","ks","checkArgsLength","props","len","vals","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","join","Subscription","unsubscribe","_parentOrParents","_subscriptions","_unsubscribe","remove","index","flattenUnsubscriptionErrors","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","isScheduler","schedule","subscribeToArray","array","scheduleArray","scheduler","fromArray","of","args","pop","emptyScheduled","project","thisArg","TypeError","MapOperator","MapSubscriber","count","result","getSymbolIterator","iterator","isArrayLike","isPromise","then","subscribeTo","obs","promise","iterable","done","return","scheduled","isInteropObservable","scheduleObservable","schedulePromise","isIterable","scheduleIterable","from","forkJoinInternal","sources","values","completed","emitted","_loop_1","hasValue","fromEvent","target","eventName","options","resultSelector","setupSubscription","sourceObj","handler","addEventListener","removeEventListener","isEventTarget","source_1","on","off","isJQueryStyleEventEmitter","source_2","addListener","removeListener","isNodeStyleEventEmitter","source_3","NEVER","InnerSubscriber","outerValue","outerIndex","notifyNext","notifyError","notifyComplete","subscribeToResult","outerSubscriber","OuterSubscriber","innerValue","innerIndex","innerSub","MergeMapOperator","concurrent","Number","POSITIVE_INFINITY","MergeMapSubscriber","hasCompleted","buffer","active","_tryNext","_innerSub","ish","innerSubscriber","shift","mergeAll","mergeMap","ii","merge","observables","last","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","post","delete","put","patch","getJSON","AjaxSubscriber","getHeader","FormData","serializeBody","send","xhr","AjaxResponse","_b","user","password","setupEvents","open","setHeaders","contentType","splitIndex","substring","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","filter","predicate","FilterOperator","FilterSubscriber","tap","DoOperator","TapSubscriber","_tapNext","_tapError","_tapComplete","pluck","properties","currentProp","plucker","ArgumentOutOfRangeError","ArgumentOutOfRangeErrorImpl","TakeOperator","total","TakeSubscriber","switchMap","SwitchMapOperator","NotificationKind","SwitchMapSubscriber","innerSubscription","AsyncAction","work","pending","state","delay","id","recycleAsyncId","requestAsyncId","setInterval","flush","clearInterval","execute","_execute","errored","errorValue","actions","Action","Scheduler","SchedulerAction","now","Date","AsyncScheduler","delegate","action","dispatch","Notification","kind","observe","do","accept","toObservable","createNext","undefinedValueNotification","createError","createComplete","completeNotification","delayFor","isNaN","abs","DelayOperator","DelaySubscriber","queue","time","notification","delay_1","max","_schedule","scheduleNotification","DelayMessage","switchMapTo","innerObservable","scan","accumulator","seed","hasSeed","ScanOperator","ScanSubscriber","_seed","set","configurable","QueueAction","QueueScheduler","observeOn","ObserveOnOperator","ObserveOnSubscriber","arg","scheduleMessage","ObserveOnMessage","ReplaySubject","bufferSize","windowTime","_events","_infiniteTimeWindow","_bufferSize","_windowTime","nextInfiniteTimeWindow","nextTimeWindow","ReplayEvent","_getNow","_trimBufferThenGetEvents","eventsCount","spliceCount","shareReplay","configOrBufferSize","config","refCount","_c","useRefCount","isComplete","shareReplayOperator","mapTo","MapToOperator","MapToSubscriber","concatAll","startWith","distinctUntilChanged","compare","keySelector","DistinctUntilChangedOperator","DistinctUntilChangedSubscriber","hasKey","y","load$","document","getElement","selector","node","querySelector","getElements","querySelectorAll","getElementOffset","el","scrollLeft","scrollTop","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","resize$","getViewportOffset","pageXOffset","pageYOffset","getViewportSize","width","innerWidth","height","innerHeight","defaultThrottleConfig","leading","trailing","ThrottleOperator","durationSelector","ThrottleSubscriber","_leading","_trailing","_hasValue","_sendValue","_throttled","throttle","duration","tryDurationSelector","throttlingDone","watchWorker","worker","send$","recv$","postMessage","AnimationFrameAction","requestAnimationFrame","cancelAnimationFrame","animationFrame","AnimationFrameScheduler","finalize","callback","FinallyOperator","lang","FinallySubscriber","setAnchorBlur","setAttribute","resetAnchorBlur","removeAttribute","setAnchorActive","classList","toggle","resetAnchorActive","addToSearchResultList","child","appendChild","paintHidden","offset","setHidden","resetHidden","truncate","translate","innerText","ReferenceError","replace","watchHeader","observableFactory","sticky","getComputedStyle","getPropertyValue","offsetHeight","NONE","combineLatest","CombineLatestOperator","CombineLatestSubscriber","toRespond","unused","oldVal","_tryResultSelector","watchViewportOffsetFromTopOf","viewport","header$","adjust$","size$","offsetTop","offset$","paintHeaderShadow","setHeaderShadow","resetHeaderShadow","innerHTML","Node","h","tag","attributes","createElement","attr","children","TakeUntilOperator","notifier","takeUntilSubscriber","notifierSubscription","seenValue","TakeUntilSubscriber","switchMapIf","toggle$","begin$","end$","mountHero","agent","screen$","hidden","watchHero","mountMain","height$","adjust","top","bottom","active$","watchMain","_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$","parseFloat","parentElement","min","lock$","lock","paintSidebar","style","setSidebarHeight","setSidebarLock","resetSidebarHeight","resetSidebarLock","mountNavigation","sidebar","watchNavigation","watchSearchQuery","prepare","focus$","blur$","activeElement","watchElementFocus","focus","watchSearchReset","css","link","article","title","teaser","renderSectionDocument","location","text","href","class","tabIndex","renderSearchResult","sections","renderArticleDocument","facts","fact","WithLatestFromOperator","WithLatestFromSubscriber","found","_tryProject","paintSearchResultMeta","query$","meta","withLatestFrom","textContent","setSearchResultMeta","resetSearchResultMeta","watchSearchResult","result$","container","render$","watchElementOffset","scrollHeight","resetSearchResultList","paintSearchResultList","mountTabs","watchTabs","split","reverse","_includes","inf","_indexOf","hasOrAdd","shouldAdd","prevSize","type","Infinity","_items","_nativeSet","has","bIdx","_Set","Set","first","second","out","firstLen","secondLen","toFilterOut","PackerMessageType","SearchMessageType","watchTableOfContents","sidebar$","els","anchors$","table","Map","decodeURIComponent","hash","header","path","anchor","tagName","begin","end","watchAnchorList","paintAnchorList","anchors","isSearchDumpMessage","DUMP","isSearchResultMessage","RESULT","documentElement","newvalue","trim","setupWorkers","base","Worker","search","packer","packerMessage$","packer$","BINARY","data","localStorage","setItem","searchMessage$","search$","STRING","data$","fromLocal","getItem","first_1","getPrototypeOf","resultSelector_1","forkJoin","SETUP","initialize","isConfig","SyntaxError","location$","href$","hash$","tablet$","searchWorkerRecv$","log","sessionStorage","format","toFixed","repo","stargazers_count","forks_count","public_repos","repository","dataset","mdState","renderSource","components$","names","document$","components","replaceWith","watchComponentMap","component","switchComponent","section","QUERY","checked","click","navigation$","toc$","mountTableOfContents","resultComponent$","mountSearchResult","tabs$","hero$","a$","reset$","keysIfSearchActive$","details","detail","rest","temp"],"mappings":"4DACE,IAAIA,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAA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c,mBAItB,OAHA9f,GAAK,gBAAI,EAAO6jB,GAAU,EAAOC,KAC9B/rB,YAEI,CACLue,MAAK,EACLtP,MAAK","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 = 7);\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;","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;","import _curry1 from './internal/_curry1.js';\nimport keys from './keys.js';\n\n/**\n * Returns a list of all the enumerable own properties of the supplied object.\n * Note that the order of the output array is not guaranteed across different\n * JS platforms.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Object\n * @sig {k: v} -> [v]\n * @param {Object} obj The object to extract values from\n * @return {Array} An array of the values of the object's own properties.\n * @see R.valuesIn, R.keys\n * @example\n *\n * R.values({a: 1, b: 2, c: 3}); //=> [1, 2, 3]\n */\nvar values = /*#__PURE__*/_curry1(function values(obj) {\n var props = keys(obj);\n var len = props.length;\n var vals = [];\n var idx = 0;\n while (idx < len) {\n vals[idx] = obj[props[idx]];\n idx += 1;\n }\n return vals;\n});\nexport default values;","/*! *****************************************************************************\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 PURE_IMPORTS_END */\nexport function isScheduler(value) {\n return value && typeof value.schedule === 'function';\n}\n//# sourceMappingURL=isScheduler.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 _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 _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 _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 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 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 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 _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 _Observable,_util_isArray,_operators_map,_util_isObject,_from PURE_IMPORTS_END */\nimport { Observable } from '../Observable';\nimport { isArray } from '../util/isArray';\nimport { map } from '../operators/map';\nimport { isObject } from '../util/isObject';\nimport { from } from './from';\nexport function forkJoin() {\n var sources = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n sources[_i] = arguments[_i];\n }\n if (sources.length === 1) {\n var first_1 = sources[0];\n if (isArray(first_1)) {\n return forkJoinInternal(first_1, null);\n }\n if (isObject(first_1) && Object.getPrototypeOf(first_1) === Object.prototype) {\n var keys = Object.keys(first_1);\n return forkJoinInternal(keys.map(function (key) { return first_1[key]; }), keys);\n }\n }\n if (typeof sources[sources.length - 1] === 'function') {\n var resultSelector_1 = sources.pop();\n sources = (sources.length === 1 && isArray(sources[0])) ? sources[0] : sources;\n return forkJoinInternal(sources, null).pipe(map(function (args) { return resultSelector_1.apply(void 0, args); }));\n }\n return forkJoinInternal(sources, null);\n}\nfunction forkJoinInternal(sources, keys) {\n return new Observable(function (subscriber) {\n var len = sources.length;\n if (len === 0) {\n subscriber.complete();\n return;\n }\n var values = new Array(len);\n var completed = 0;\n var emitted = 0;\n var _loop_1 = function (i) {\n var source = from(sources[i]);\n var hasValue = false;\n subscriber.add(source.subscribe({\n next: function (value) {\n if (!hasValue) {\n hasValue = true;\n emitted++;\n }\n values[i] = value;\n },\n error: function (err) { return subscriber.error(err); },\n complete: function () {\n completed++;\n if (completed === len || !hasValue) {\n if (emitted === len) {\n subscriber.next(keys ?\n keys.reduce(function (result, key, i) { return (result[key] = values[i], result); }, {}) :\n values);\n }\n subscriber.complete();\n }\n }\n }));\n };\n for (var i = 0; i < len; i++) {\n _loop_1(i);\n }\n });\n}\n//# sourceMappingURL=forkJoin.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 _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';\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 _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,_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_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,_.._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","/** 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 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 _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 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","/** 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","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 _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 _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,_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 _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,_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","/** 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","/** 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 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 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","/** 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 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 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 * Helper 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","/*\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","/*\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\nimport { Agent } from \"../../_\"\nimport { ViewportSize } from \"../../viewport\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Element offset\n */\nexport interface ElementOffset {\n x: number /* Horizontal offset */\n y: number /* Vertical offset */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n size$: Observable /* Viewport size observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Retrieve element offset\n *\n * @param el - HTML element\n *\n * @return Element offset\n */\nexport function getElementOffset(el: HTMLElement): ElementOffset {\n return {\n x: el.scrollLeft,\n y: el.scrollTop\n }\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Watch element offset\n *\n * @param el - Element\n * @param agent - Agent\n *\n * @return Element offset observable\n */\nexport function watchElementOffset(\n el: HTMLElement, { viewport }: Agent\n): Observable {\n const scroll$ = fromEvent(el, \"scroll\")\n return merge(scroll$, viewport.size$)\n .pipe(\n map(() => getElementOffset(el)),\n startWith(getElementOffset(el)),\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 hash\n *\n * @return Location hash observable\n */\nexport function watchLocationHash(): 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","/*\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, share, switchMapTo, tap, throttle } 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 * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n *\n * @template T - Worker message type\n */\ninterface Options {\n send$: 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, { send$ }: Options\n): Observable {\n\n /* Intercept messages from web worker */\n const recv$ = fromEvent(worker, \"message\")\n .pipe(\n pluck(\"data\"),\n share()\n )\n\n /* Send and receive messages, return hot observable */\n return send$\n .pipe(\n throttle(() => recv$, { leading: true, trailing: true }),\n tap(message => worker.postMessage(message)),\n switchMapTo(recv$),\n share()\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 { getElement } from \"../agent\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Translations\n */\nlet lang: Record\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Truncate a string after the given number of characters\n *\n * @param value - Value to be truncated\n * @param n - Number of characters\n *\n * @return Truncated value\n */\nexport function truncate(value: string, n: number): string {\n let i = n\n if (value.length > i) {\n while (value[i] !== \" \" && --i > 0); // tslint:disable-line\n return `${value.substring(0, i)}...`\n }\n return value\n}\n\n/**\n * Translate the given key\n *\n * @param key - Key to be translated\n * @param value - Value to be replaced\n *\n * @return Translation\n */\nexport function translate(key: string, value?: string): string {\n if (typeof lang === \"undefined\") {\n const el = getElement(\"#__lang\")!\n lang = JSON.parse(el.innerText)\n }\n if (typeof lang[key] === \"undefined\") {\n throw new ReferenceError(`Invalid translation: ${key}`)\n }\n return typeof value !== \"undefined\"\n ? lang[key].replace(\"#\", value)\n : lang[key]\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 anchor blur\n *\n * @param el - Anchor element\n * @param value - Whether the anchor is blurred\n */\nexport function setAnchorBlur(\n el: HTMLElement, value: boolean\n): void {\n el.setAttribute(\"data-md-state\", value ? \"blur\" : \"\")\n}\n\n/**\n * Reset anchor blur\n *\n * @param el - Anchor element\n */\nexport function resetAnchorBlur(\n el: HTMLElement\n): void {\n el.removeAttribute(\"data-md-state\")\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Set anchor active\n *\n * @param el - Anchor element\n * @param value - Whether the anchor is active\n */\nexport function setAnchorActive(\n el: HTMLElement, value: boolean\n): void {\n el.classList.toggle(\"md-nav__link--active\", value)\n}\n\n/**\n * Reset anchor active\n *\n * @param el - Anchor element\n */\nexport function resetAnchorActive(\n el: HTMLElement\n): void {\n el.classList.remove(\"md-nav__link--active\")\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 { translate } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set number of search results\n *\n * @param el - Search result metadata element\n * @param value - Number of results\n */\nexport function setSearchResultMeta(\n el: HTMLElement, value: number\n): void {\n el.textContent = value > 1\n ? translate(\"search.result.other\", value.toString())\n : value === 1\n ? translate(\"search.result.one\")\n : translate(\"search.result.none\")\n}\n\n/**\n * Reset number of search results\n *\n * @param el - Search result metadata element\n */\nexport function resetSearchResultMeta(\n el: HTMLElement\n): void {\n el.textContent = translate(\"search.result.placeholder\")\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Add an element to the search result list\n *\n * @param el - Search result list element\n * @param child - Search result element\n */\nexport function addToSearchResultList(\n el: HTMLElement, child: HTMLElement\n): void {\n el.appendChild(child)\n}\n\n/**\n * Reset search result list\n *\n * @param el - Search result list element\n */\nexport function resetSearchResultList(\n el: HTMLElement\n): void {\n el.innerHTML = \"\"\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 { resetHidden, setHidden } from \"actions\"\n\nimport { ViewportOffset } from \"../agent\"\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","/*\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 state\n */\nexport interface HeaderState {\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 state 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,_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","/*\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 { Agent, ViewportOffset } from \"utilities\"\n\nimport { HeaderState } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state 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 - HTML element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchViewportOffsetFromTopOf(\n el: HTMLElement, { viewport }: Agent, { header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = viewport.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([viewport.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 - HTML element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Viewport offset observable\n */\nexport function watchViewportOffsetFromBottomOf(\n el: HTMLElement, { viewport }: Agent, { header$ }: Options\n): Observable {\n\n /* Compute necessary adjustment for offset */\n const adjust$ = viewport.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([viewport.offset$, adjust$])\n .pipe(\n map(([{ x, y }, adjust]) => ({ x, y: y - adjust })),\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 { resetHeaderShadow, setHeaderShadow } from \"actions\"\n\nimport { MainState } 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 { JSX as JSXInternal } from \"preact\"\nimport { keys } from \"ramda\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * HTML attributes\n */\ntype Attributes =\n & JSXInternal.HTMLAttributes\n & JSXInternal.SVGAttributes\n & Record\n\n/**\n * Child element\n */\ntype Child = Child[] | HTMLElement | Text | string | number\n\n/* ----------------------------------------------------------------------------\n * Helper functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Append a child node to an element\n *\n * @param el - HTML element\n * @param child - Child node\n */\nfunction appendChild(el: HTMLElement, child: Child): void {\n\n /* Handle primitive types (including raw HTML) */\n if (typeof child === \"string\" || typeof child === \"number\") {\n el.innerHTML += child.toString()\n\n /* Handle nodes */\n } else if (child instanceof Node) {\n el.appendChild(child)\n\n /* Handle nested children */\n } else if (Array.isArray(child)) {\n for (const node of child)\n appendChild(el, node)\n }\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * JSX factory\n *\n * @param tag - HTML tag\n * @param attributes - HTML attributes\n * @param children - Child elements\n *\n * @return HTML element\n */\nexport function h(\n tag: string, attributes: Attributes | null,\n ...children: Array\n): HTMLElement {\n const el = document.createElement(tag)\n\n /* Set attributes, if any */\n if (attributes)\n for (const attr of keys(attributes))\n if (typeof attributes[attr] !== \"boolean\")\n el.setAttribute(attr, attributes[attr])\n else if (attributes[attr])\n el.setAttribute(attr, \"\")\n\n /* Append child nodes */\n for (const child of children)\n appendChild(el, child)\n\n /* Return element */\n return el\n}\n\n/**\n * JSX factory wrapper\n *\n * @param el - JSX element\n *\n * @return HTML element\n */\nexport function toHTMLElement(el: JSXInternal.Element): HTMLElement {\n return el as any // Hack: if you have a better idea, PR!\n}\n\n/* ----------------------------------------------------------------------------\n * Namespace\n * ------------------------------------------------------------------------- */\n\nexport declare namespace h {\n export import JSX = JSXInternal\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 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 switchMap,\n takeUntil\n} from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\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 { Observable, OperatorFunction, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent, paintHidden } from \"utilities\"\n\nimport { HeaderState, watchViewportOffsetFromTopOf } from \"../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Hero state\n */\nexport interface HeroState {\n hidden: boolean /* Whether the hero is hidden */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch hero\n *\n * @param el - Hero element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Hero state\n */\nexport function watchHero(\n el: HTMLElement, agent: Agent, { header$ }: Options\n): Observable {\n\n /* Watch and paint visibility */\n const hidden$ = watchViewportOffsetFromTopOf(el, agent, { header$ })\n .pipe(\n paintHidden(el, 20)\n )\n\n /* Combine into a single hot observable */\n return hidden$\n .pipe(\n map(hidden => ({ hidden }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount hero from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountHero(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.screen$, el => watchHero(el, agent, options)),\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, OperatorFunction, combineLatest, pipe } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n pluck,\n shareReplay,\n switchMap\n} from \"rxjs/operators\"\n\nimport { Agent } from \"utilities\"\n\nimport { HeaderState } from \"../../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Main area state\n */\nexport interface MainState {\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 * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state 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 which depends on the viewport height and vertical offset, as\n * well as the height of the header element, if the header is fixed.\n *\n * @param el - Main area element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Main area state observable\n */\nexport function watchMain(\n el: HTMLElement, { viewport }: Agent, { 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([\n viewport.offset$,\n viewport.size$,\n adjust$\n ])\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([viewport.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 )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount main area from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountMain(\n agent: Agent, options: Options\n): OperatorFunction {\n return pipe(\n switchMap(el => watchMain(el, agent, options)),\n shareReplay(1)\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 {\n resetSidebarHeight,\n resetSidebarLock,\n setSidebarHeight,\n setSidebarLock\n} from \"actions\"\nimport { Agent } from \"utilities\"\n\nimport { MainState } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Sidebar state\n */\nexport interface SidebarState {\n height: number /* Sidebar height */\n lock: boolean /* Sidebar lock */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n main$: Observable /* Main area state 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 sidebar which depends on the vertical viewport offset, as well as the\n * height of the main area. When the page is scrolled beyond the header, the\n * sidebar is locked and fills the remaining space.\n *\n * @param el - Sidebar element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Sidebar state observable\n */\nexport function watchSidebar(\n el: HTMLElement, { viewport }: Agent, { 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([viewport.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([viewport.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","/*\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, OperatorFunction, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent } from \"utilities\"\n\nimport {\n MainState,\n SidebarState,\n paintSidebar,\n watchSidebar\n} from \"../../main\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Navigation state\n */\nexport interface NavigationState {\n sidebar: SidebarState /* Sidebar state */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n main$: Observable /* Main area state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch navigation\n *\n * @param el - Navigation element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Navigation state observable\n */\nexport function watchNavigation(\n el: HTMLElement, agent: Agent, { main$ }: Options\n): Observable {\n\n /* Watch and paint sidebar */\n const sidebar$ = watchSidebar(el, agent, { main$ })\n .pipe(\n paintSidebar(el)\n )\n\n /* Combine into a single hot observable */\n return sidebar$\n .pipe(\n map(sidebar => ({ sidebar }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount navigation from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountNavigation(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.screen$, el => watchNavigation(el, agent, options)),\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, combineLatest, fromEvent } from \"rxjs\"\nimport {\n distinctUntilChanged,\n map,\n shareReplay,\n startWith\n} from \"rxjs/operators\"\n\nimport { watchElementFocus } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search query state\n */\nexport interface SearchQueryState {\n value: string /* Query value */\n focus: boolean /* Query focus state */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n prepare(value: string): string /* Preparation function */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch search query\n *\n * @param el - Search query element\n * @param options - Options\n *\n * @return Search query state observable\n */\nexport function watchSearchQuery(\n el: HTMLInputElement, { prepare }: Options\n): Observable {\n\n /* Intercept keyboard events */\n const value$ = fromEvent(el, \"keyup\")\n .pipe(\n map(() => prepare(el.value)),\n startWith(\"\"),\n distinctUntilChanged()\n )\n\n /* Intercept focus events */\n const focus$ = watchElementFocus(el)\n\n /* Combine into a single hot observable */\n return combineLatest([value$, focus$])\n .pipe(\n map(([value, focus]) => ({ value, focus })),\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, merge } from \"rxjs\"\nimport { mapTo, shareReplay, startWith } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch element focus\n *\n * @param el - Element\n *\n * @return Element focus observable\n */\nexport function watchElementFocus(\n el: HTMLElement\n): Observable {\n const focus$ = fromEvent(el, \"focus\")\n const blur$ = fromEvent(el, \"blur\")\n\n /* Map events to boolean state */\n return merge(\n focus$.pipe(mapTo(true)),\n blur$.pipe(mapTo(false))\n )\n .pipe(\n startWith(el === document.activeElement),\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 { 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(undefined)\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 { h, toHTMLElement } from \"extensions\"\nimport { ArticleDocument } from \"modules\"\nimport { truncate } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n link: \"md-search-result__link\",\n article: \"md-search-result__article md-search-result__article--document\",\n title: \"md-search-result__title\",\n teaser: \"md-search-result__teaser\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render an article document\n *\n * @param article - Article document\n *\n * @return HTML element\n */\nexport function renderArticleDocument(\n { location, title, text }: ArticleDocument\n): HTMLElement {\n return toHTMLElement(\n \n
    \n

    {title}

    \n {text.length\n ?

    {truncate(text, 320)}

    \n : undefined\n }\n
    \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 { h, toHTMLElement } from \"extensions\"\nimport { SectionDocument } from \"modules\"\nimport { truncate } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n link: \"md-search-result__link\",\n article: \"md-search-result__article\",\n title: \"md-search-result__title\",\n teaser: \"md-search-result__teaser\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render a section document\n *\n * @param section - Section document\n *\n * @return HTML element\n */\nexport function renderSectionDocument(\n { location, title, text }: SectionDocument\n): HTMLElement {\n return toHTMLElement(\n \n
    \n

    {title}

    \n {text.length\n ?

    {truncate(text, 320)}

    \n : undefined\n }\n
    \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 { h, toHTMLElement } from \"extensions\"\nimport { SearchResult } from \"modules\"\n\nimport { renderArticleDocument } from \"../article\"\nimport { renderSectionDocument } from \"../section\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n item: \"md-search-result__item\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render a search result\n *\n * @param result - Search result\n *\n * @return HTML element\n */\nexport function renderSearchResult(\n { article, sections }: SearchResult\n): HTMLElement {\n return toHTMLElement(\n
  • \n {renderArticleDocument(article)}\n {...sections.map(renderSectionDocument)}\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 { h, toHTMLElement } from \"extensions\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * CSS classes\n */\nconst css = {\n facts: \"md-source__facts\",\n fact: \"md-source__fact\"\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Render source facts\n *\n * @param facts - Source facts\n *\n * @return HTML element\n */\nexport function renderSource(\n facts: any // TODO: add typings\n): HTMLElement {\n return toHTMLElement(\n
      \n {facts.map((fact: any) =>
    • {fact}
    • )}\n
    \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 function withLatestFrom() {\n var args = [];\n for (var _i = 0; _i < arguments.length; _i++) {\n args[_i] = arguments[_i];\n }\n return function (source) {\n var project;\n if (typeof args[args.length - 1] === 'function') {\n project = args.pop();\n }\n var observables = args;\n return source.lift(new WithLatestFromOperator(observables, project));\n };\n}\nvar WithLatestFromOperator = /*@__PURE__*/ (function () {\n function WithLatestFromOperator(observables, project) {\n this.observables = observables;\n this.project = project;\n }\n WithLatestFromOperator.prototype.call = function (subscriber, source) {\n return source.subscribe(new WithLatestFromSubscriber(subscriber, this.observables, this.project));\n };\n return WithLatestFromOperator;\n}());\nvar WithLatestFromSubscriber = /*@__PURE__*/ (function (_super) {\n tslib_1.__extends(WithLatestFromSubscriber, _super);\n function WithLatestFromSubscriber(destination, observables, project) {\n var _this = _super.call(this, destination) || this;\n _this.observables = observables;\n _this.project = project;\n _this.toRespond = [];\n var len = observables.length;\n _this.values = new Array(len);\n for (var i = 0; i < len; i++) {\n _this.toRespond.push(i);\n }\n for (var i = 0; i < len; i++) {\n var observable = observables[i];\n _this.add(subscribeToResult(_this, observable, observable, i));\n }\n return _this;\n }\n WithLatestFromSubscriber.prototype.notifyNext = function (outerValue, innerValue, outerIndex, innerIndex, innerSub) {\n this.values[outerIndex] = innerValue;\n var toRespond = this.toRespond;\n if (toRespond.length > 0) {\n var found = toRespond.indexOf(outerIndex);\n if (found !== -1) {\n toRespond.splice(found, 1);\n }\n }\n };\n WithLatestFromSubscriber.prototype.notifyComplete = function () {\n };\n WithLatestFromSubscriber.prototype._next = function (value) {\n if (this.toRespond.length === 0) {\n var args = [value].concat(this.values);\n if (this.project) {\n this._tryProject(args);\n }\n else {\n this.destination.next(args);\n }\n }\n };\n WithLatestFromSubscriber.prototype._tryProject = function (args) {\n var result;\n try {\n result = this.project.apply(this, args);\n }\n catch (err) {\n this.destination.error(err);\n return;\n }\n this.destination.next(result);\n };\n return WithLatestFromSubscriber;\n}(OuterSubscriber));\n//# sourceMappingURL=withLatestFrom.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 { MonoTypeOperatorFunction, Observable, pipe } from \"rxjs\"\nimport { map, withLatestFrom } from \"rxjs/operators\"\n\nimport {\n resetSearchResultMeta,\n setSearchResultMeta\n} from \"actions\"\nimport { SearchResult } from \"modules\"\nimport { getElement } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n query$: Observable /* Search query observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint search result metadata from source observable\n *\n * @param el - Search result metadata element\n * @param options - Options\n *\n * @return Operator function\n */\nexport function paintSearchResultMeta(\n el: HTMLElement, { query$ }: Options\n): MonoTypeOperatorFunction {\n const meta = getElement(\".md-search-result__meta\", el)!\n return pipe(\n withLatestFrom(query$),\n map(([result, query]) => {\n if (query) {\n setSearchResultMeta(meta, result.length)\n } else {\n resetSearchResultMeta(meta)\n }\n return result\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 { identity } from \"ramda\"\nimport { Observable, OperatorFunction, pipe } from \"rxjs\"\nimport {\n distinctUntilChanged,\n filter,\n map,\n shareReplay,\n switchMap\n} from \"rxjs/operators\"\n\nimport { SearchResult } from \"modules\"\nimport { Agent, watchElementOffset } from \"utilities\"\n\nimport { paintSearchResultList } from \"../list\"\nimport { paintSearchResultMeta } from \"../meta\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n result$: Observable /* Search result observable */\n query$: Observable /* Search query observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch search result\n *\n * @param el - Search result element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Search result state observable\n */\nexport function watchSearchResult(\n el: HTMLElement, agent: Agent, { result$, query$ }: Options\n): Observable {\n const container = el.parentElement!\n\n /* Compute whether there are more search results elements */\n const render$ = watchElementOffset(container, agent)\n .pipe(\n map(({ y }) => y >= container.scrollHeight - container.offsetHeight - 16),\n distinctUntilChanged(),\n filter(identity)\n )\n\n /* Paint search results */\n return result$\n .pipe(\n paintSearchResultMeta(el, { query$ }),\n paintSearchResultList(el, { render$ })\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount search result from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountSearchResult(\n agent: Agent, options: Options\n): OperatorFunction {\n return pipe(\n switchMap(el => watchSearchResult(el, agent, options)),\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 Observable,\n animationFrameScheduler,\n pipe\n} from \"rxjs\"\nimport {\n finalize,\n mapTo,\n observeOn,\n scan,\n switchMap\n} from \"rxjs/operators\"\n\nimport {\n addToSearchResultList,\n resetSearchResultList\n} from \"actions\"\nimport { SearchResult } from \"modules\"\nimport { renderSearchResult } from \"templates\"\nimport { getElement } from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n render$: Observable /* Render trigger observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Paint search result list from source observable\n *\n * @param el - Search result element\n * @param options - Options\n *\n * @return Operator function\n */\nexport function paintSearchResultList(\n el: HTMLElement, { render$ }: Options\n): MonoTypeOperatorFunction {\n const container = el.parentElement!\n const list = getElement(\".md-search-result__list\", el)!\n return pipe(\n switchMap(result => render$\n .pipe(\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n scan(index => {\n while (index < result.length) {\n addToSearchResultList(list, renderSearchResult(result[index++]))\n if (container.scrollHeight - container.offsetHeight > 16)\n break\n }\n return index\n }, 0),\n\n /* Re-map to search result */\n mapTo(result),\n\n /* Reset on complete or error */\n finalize(() => {\n resetSearchResultList(list)\n })\n )\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, OperatorFunction, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent, paintHidden } from \"utilities\"\n\nimport { HeaderState, watchViewportOffsetFromTopOf } from \"../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Tabs state\n */\nexport interface TabsState {\n hidden: boolean /* Whether the tabs are hidden */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch tabs\n *\n * This function returns an observable that computes the visual parameters of\n * the tabs, currently only denoting whether the tabs are hidden or not.\n *\n * @param el - Tabs element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Tabs state\n */\nexport function watchTabs(\n el: HTMLElement, agent: Agent, { header$ }: Options\n): Observable {\n\n /* Watch and paint visibility */\n const hidden$ = watchViewportOffsetFromTopOf(el, agent, { header$ })\n .pipe(\n paintHidden(el, 8)\n )\n\n /* Combine into a single hot observable */\n return hidden$\n .pipe(\n map(hidden => ({ hidden }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount tabs from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountTabs(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.screen$, el => watchTabs(el, agent, options)),\n shareReplay(1)\n )\n}\n","import _curry1 from './internal/_curry1.js';\nimport _isString from './internal/_isString.js';\n\n/**\n * Returns a new list or string with the elements or characters in reverse\n * order.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category List\n * @sig [a] -> [a]\n * @sig String -> String\n * @param {Array|String} list\n * @return {Array|String}\n * @example\n *\n * R.reverse([1, 2, 3]); //=> [3, 2, 1]\n * R.reverse([1, 2]); //=> [2, 1]\n * R.reverse([1]); //=> [1]\n * R.reverse([]); //=> []\n *\n * R.reverse('abc'); //=> 'cba'\n * R.reverse('ab'); //=> 'ba'\n * R.reverse('a'); //=> 'a'\n * R.reverse(''); //=> ''\n */\nvar reverse = /*#__PURE__*/_curry1(function reverse(list) {\n return _isString(list) ? list.split('').reverse().join('') : Array.prototype.slice.call(list, 0).reverse();\n});\nexport default reverse;","export default function _isString(x) {\n return Object.prototype.toString.call(x) === '[object String]';\n}","import _indexOf from './_indexOf.js';\n\nexport default function _includes(a, list) {\n return _indexOf(list, a, 0) >= 0;\n}","import equals from '../equals.js';\n\nexport default function _indexOf(list, a, idx) {\n var inf, item;\n // Array.prototype.indexOf doesn't exist below IE9\n if (typeof list.indexOf === 'function') {\n switch (typeof a) {\n case 'number':\n if (a === 0) {\n // manually crawl the list to distinguish between +0 and -0\n inf = 1 / a;\n while (idx < list.length) {\n item = list[idx];\n if (item === 0 && 1 / item === inf) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n } else if (a !== a) {\n // NaN\n while (idx < list.length) {\n item = list[idx];\n if (typeof item === 'number' && item !== item) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n }\n // non-zero numbers can utilise Set\n return list.indexOf(a, idx);\n\n // all these types can utilise Set\n case 'string':\n case 'boolean':\n case 'function':\n case 'undefined':\n return list.indexOf(a, idx);\n\n case 'object':\n if (a === null) {\n // null can utilise Set\n return list.indexOf(a, idx);\n }\n }\n }\n // anything else not covered above, defer to R.equals\n while (idx < list.length) {\n if (equals(list[idx], a)) {\n return idx;\n }\n idx += 1;\n }\n return -1;\n}","import _includes from './_includes.js';\n\nvar _Set = /*#__PURE__*/function () {\n function _Set() {\n /* globals Set */\n this._nativeSet = typeof Set === 'function' ? new Set() : null;\n this._items = {};\n }\n\n // until we figure out why jsdoc chokes on this\n // @param item The item to add to the Set\n // @returns {boolean} true if the item did not exist prior, otherwise false\n //\n _Set.prototype.add = function (item) {\n return !hasOrAdd(item, true, this);\n };\n\n //\n // @param item The item to check for existence in the Set\n // @returns {boolean} true if the item exists in the Set, otherwise false\n //\n _Set.prototype.has = function (item) {\n return hasOrAdd(item, false, this);\n };\n\n //\n // Combines the logic for checking whether an item is a member of the set and\n // for adding a new item to the set.\n //\n // @param item The item to check or add to the Set instance.\n // @param shouldAdd If true, the item will be added to the set if it doesn't\n // already exist.\n // @param set The set instance to check or add to.\n // @return {boolean} true if the item already existed, otherwise false.\n //\n return _Set;\n}();\n\nfunction hasOrAdd(item, shouldAdd, set) {\n var type = typeof item;\n var prevSize, newSize;\n switch (type) {\n case 'string':\n case 'number':\n // distinguish between +0 and -0\n if (item === 0 && 1 / item === -Infinity) {\n if (set._items['-0']) {\n return true;\n } else {\n if (shouldAdd) {\n set._items['-0'] = true;\n }\n return false;\n }\n }\n // these types can all utilise the native Set\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = {};\n set._items[type][item] = true;\n }\n return false;\n } else if (item in set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][item] = true;\n }\n return false;\n }\n }\n\n case 'boolean':\n // set._items['boolean'] holds a two element array\n // representing [ falseExists, trueExists ]\n if (type in set._items) {\n var bIdx = item ? 1 : 0;\n if (set._items[type][bIdx]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type][bIdx] = true;\n }\n return false;\n }\n } else {\n if (shouldAdd) {\n set._items[type] = item ? [false, true] : [true, false];\n }\n return false;\n }\n\n case 'function':\n // compare functions for reference equality\n if (set._nativeSet !== null) {\n if (shouldAdd) {\n prevSize = set._nativeSet.size;\n set._nativeSet.add(item);\n newSize = set._nativeSet.size;\n return newSize === prevSize;\n } else {\n return set._nativeSet.has(item);\n }\n } else {\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n\n case 'undefined':\n if (set._items[type]) {\n return true;\n } else {\n if (shouldAdd) {\n set._items[type] = true;\n }\n return false;\n }\n\n case 'object':\n if (item === null) {\n if (!set._items['null']) {\n if (shouldAdd) {\n set._items['null'] = true;\n }\n return false;\n }\n return true;\n }\n /* falls through */\n default:\n // reduce the search size of heterogeneous sets by creating buckets\n // for each type.\n type = Object.prototype.toString.call(item);\n if (!(type in set._items)) {\n if (shouldAdd) {\n set._items[type] = [item];\n }\n return false;\n }\n // scan through all previously applied items\n if (!_includes(item, set._items[type])) {\n if (shouldAdd) {\n set._items[type].push(item);\n }\n return false;\n }\n return true;\n }\n}\n\n// A simple Set type that honours R.equals semantics\nexport default _Set;","import _curry2 from './internal/_curry2.js';\nimport _Set from './internal/_Set.js';\n\n/**\n * Finds the set (i.e. no duplicates) of all elements in the first list not\n * contained in the second list. Objects and Arrays are compared in terms of\n * value equality, not reference equality.\n *\n * @func\n * @memberOf R\n * @since v0.1.0\n * @category Relation\n * @sig [*] -> [*] -> [*]\n * @param {Array} list1 The first list.\n * @param {Array} list2 The second list.\n * @return {Array} The elements in `list1` that are not in `list2`.\n * @see R.differenceWith, R.symmetricDifference, R.symmetricDifferenceWith, R.without\n * @example\n *\n * R.difference([1,2,3,4], [7,6,5,4,3]); //=> [1,2]\n * R.difference([7,6,5,4,3], [1,2,3,4]); //=> [7,6,5]\n * R.difference([{a: 1}, {b: 2}], [{a: 1}, {c: 3}]) //=> [{b: 2}]\n */\nvar difference = /*#__PURE__*/_curry2(function difference(first, second) {\n var out = [];\n var idx = 0;\n var firstLen = first.length;\n var secondLen = second.length;\n var toFilterOut = new _Set();\n\n for (var i = 0; i < secondLen; i += 1) {\n toFilterOut.add(second[i]);\n }\n\n while (idx < firstLen) {\n if (toFilterOut.add(first[idx])) {\n out[out.length] = first[idx];\n }\n idx += 1;\n }\n return out;\n});\nexport default difference;","\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 * Packer message type\n */\nexport const enum PackerMessageType {\n STRING, /* String data */\n BINARY /* Packed data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message containing an unpacked string\n */\nexport interface PackerStringMessage {\n type: PackerMessageType.STRING /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing a packed string\n */\nexport interface PackerBinaryMessage {\n type: PackerMessageType.BINARY /* Message type */\n data: string /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message exchanged with the packer worker\n */\nexport type PackerMessage =\n | PackerStringMessage\n | PackerBinaryMessage\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Type guard for packer binary messages\n *\n * @param message - Packer worker message\n *\n * @return Test result\n */\nexport function isPackerBinaryMessage(\n message: PackerMessage\n): message is PackerBinaryMessage {\n return message.type === PackerMessageType.BINARY\n}\n\n/**\n * Type guard for packer string messages\n *\n * @param message - Packer worker message\n *\n * @return Test result\n */\nexport function isPackerStringMessage(\n message: PackerMessage\n): message is PackerStringMessage {\n return message.type === PackerMessageType.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 RTICULAR 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 { SearchIndexOptions, SearchResult } from \"modules\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search message type\n */\nexport const enum SearchMessageType {\n SETUP, /* Search index setup */\n DUMP, /* Search index dump */\n QUERY, /* Search query */\n RESULT /* Search results */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message containing the data necessary to setup the search index\n */\nexport interface SearchSetupMessage {\n type: SearchMessageType.SETUP /* Message type */\n data: SearchIndexOptions /* Message data */\n}\n\n/**\n * A message containing the a dump of the search index\n */\nexport interface SearchDumpMessage {\n type: SearchMessageType.DUMP /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing a search query\n */\nexport interface SearchQueryMessage {\n type: SearchMessageType.QUERY /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing results for a search query\n */\nexport interface SearchResultMessage {\n type: SearchMessageType.RESULT /* Message type */\n data: SearchResult[] /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message exchanged with the search worker\n */\nexport type SearchMessage =\n | SearchSetupMessage\n | SearchDumpMessage\n | SearchQueryMessage\n | SearchResultMessage\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Type guard for search setup messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchSetupMessage(\n message: SearchMessage\n): message is SearchSetupMessage {\n return message.type === SearchMessageType.SETUP\n}\n\n/**\n * Type guard for search dump messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchDumpMessage(\n message: SearchMessage\n): message is SearchDumpMessage {\n return message.type === SearchMessageType.DUMP\n}\n\n/**\n * Type guard for search query messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchQueryMessage(\n message: SearchMessage\n): message is SearchQueryMessage {\n return message.type === SearchMessageType.QUERY\n}\n\n/**\n * Type guard for search result messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchResultMessage(\n message: SearchMessage\n): message is SearchResultMessage {\n return message.type === SearchMessageType.RESULT\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, OperatorFunction, combineLatest, pipe } from \"rxjs\"\nimport { map, shareReplay } from \"rxjs/operators\"\n\nimport { switchMapIf } from \"extensions\"\nimport { Agent, getElements } from \"utilities\"\n\nimport { HeaderState } from \"../../header\"\nimport {\n MainState,\n SidebarState,\n paintSidebar,\n watchSidebar\n} from \"../../main\"\nimport {\n AnchorList,\n paintAnchorList,\n watchAnchorList\n} from \"../anchor\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Table of contents state\n */\nexport interface TableOfContentsState {\n sidebar: SidebarState /* Sidebar state */\n anchors: AnchorList /* Anchor list */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n main$: Observable /* Main area state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch table of contents\n *\n * @param el - Table of contents element\n * @param agent - Agent\n * @param options - Options\n *\n * @return Table of contents state observable\n */\nexport function watchTableOfContents(\n el: HTMLElement, agent: Agent, { header$, main$ }: Options\n): Observable {\n\n /* Watch and paint sidebar */\n const sidebar$ = watchSidebar(el, agent, { main$ })\n .pipe(\n paintSidebar(el)\n )\n\n /* Watch and paint anchor list (scroll spy) */\n const els = getElements(\".md-nav__link\", el)\n const anchors$ = watchAnchorList(els, agent, { header$ })\n .pipe(\n paintAnchorList(els)\n )\n\n /* Combine into a single hot observable */\n return combineLatest([sidebar$, anchors$])\n .pipe(\n map(([sidebar, anchors]) => ({ sidebar, anchors }))\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Mount table of contents from source observable\n *\n * @param agent - Agent\n * @param options - Options\n *\n * @return Operator function\n */\nexport function mountTableOfContents(\n agent: Agent, options: Options\n): OperatorFunction {\n const { media } = agent\n return pipe(\n switchMapIf(media.tablet$, el => watchTableOfContents(el, agent, options)),\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 { difference, reverse } 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 scan,\n shareReplay,\n switchMap,\n tap\n} from \"rxjs/operators\"\n\nimport {\n resetAnchorActive,\n resetAnchorBlur,\n setAnchorActive,\n setAnchorBlur\n} from \"actions\"\nimport { Agent, getElement } from \"utilities\"\n\nimport { HeaderState } from \"../../header\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Anchor list\n */\nexport interface AnchorList {\n prev: HTMLAnchorElement[][] /* Anchors (previous) */\n next: HTMLAnchorElement[][] /* Anchors (next) */\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n header$: Observable /* Header state observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch anchor list\n *\n * This is effectively a scroll-spy implementation which will account for the\n * fixed header and automatically re-calculate anchor offsets when the viewport\n * is resized. The returned observable will only emit if the anchor list needs\n * to be repainted.\n *\n * This implementation tracks an anchor element's entire path starting from its\n * level up to the top-most anchor element, e.g. `[h3, h2, h1]`. Although the\n * Material theme currently doesn't make use of this information, it enables\n * the styling of the entire hierarchy through customization.\n *\n * Note that the current anchor is the last item of the `prev` anchor list.\n *\n * @param els - Anchor elements\n * @param agent - Agent\n * @param options - Options\n *\n * @return Anchor list observable\n */\nexport function watchAnchorList(\n els: HTMLAnchorElement[], { viewport }: Agent, { header$ }: Options\n): Observable {\n const table = new Map()\n for (const el of els) {\n const id = decodeURIComponent(el.hash.substring(1))\n const target = getElement(`[id=\"${id}\"]`)\n if (typeof target !== \"undefined\")\n table.set(el, target)\n }\n\n /* Compute necessary adjustment for header */\n const adjust$ = header$\n .pipe(\n map(header => 18 + header.height)\n )\n\n /* Compute partition of previous and next anchors */\n const partition$ = viewport.size$\n .pipe(\n\n /* Build index to map anchor paths to vertical offsets */\n map(() => {\n let path: HTMLAnchorElement[] = []\n return [...table].reduce((index, [anchor, target]) => {\n while (path.length) {\n const last = table.get(path[path.length - 1])!\n if (last.tagName >= target.tagName) {\n path.pop()\n } else {\n break\n }\n }\n return index.set(\n reverse(path = [...path, anchor]),\n target.offsetTop\n )\n }, new Map())\n }),\n\n /* Re-compute partition when viewport offset changes */\n switchMap(index => combineLatest(viewport.offset$, adjust$)\n .pipe(\n scan(([prev, next], [{ y }, adjust]) => {\n\n /* Look forward */\n while (next.length) {\n const [, offset] = next[0]\n if (offset - adjust < y) {\n prev = [...prev, next.shift()!]\n } else {\n break\n }\n }\n\n /* Look backward */\n while (prev.length) {\n const [, offset] = prev[prev.length - 1]\n if (offset - adjust >= y) {\n next = [prev.pop()!, ...next]\n } else {\n break\n }\n }\n\n /* Return partition */\n return [prev, next]\n }, [[], [...index]]),\n distinctUntilChanged((a, b) => {\n return a[0] === b[0]\n && a[1] === b[1]\n })\n )\n )\n )\n\n /* Compute anchor list migrations */\n const migration$ = partition$\n .pipe(\n map(([prev, next]) => ({\n prev: prev.map(([path]) => path),\n next: next.map(([path]) => path)\n })),\n\n /* Extract anchor list migrations */\n scan((a, b) => {\n const begin = Math.max(0, Math.min(b.prev.length, a.prev.length) - 1)\n const end = Math.max(b.prev.length, a.prev.length)\n return {\n prev: b.prev.slice(begin, end + 1),\n next: difference(b.next, a.next)\n }\n }, { prev: [], next: [] })\n )\n\n /* Return anchor list migrations as hot observable */\n return migration$\n .pipe(\n shareReplay(1)\n )\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Paint anchor list from source observable\n *\n * @param els - Anchor elements\n *\n * @return Operator function\n */\nexport function paintAnchorList(\n els: HTMLAnchorElement[]\n): MonoTypeOperatorFunction {\n return pipe(\n\n /* Defer repaint to next animation frame */\n observeOn(animationFrameScheduler),\n tap(({ prev, next }) => {\n\n /* Look forward */\n for (const [el] of next) {\n resetAnchorActive(el)\n resetAnchorBlur(el)\n }\n\n /* Look backward */\n for (const [index, [el]] of prev.entries()) {\n setAnchorActive(el, index === prev.length - 1)\n setAnchorBlur(el, true)\n }\n }),\n\n /* Reset on complete or error */\n finalize(() => {\n for (const el of els) {\n resetAnchorActive(el)\n resetAnchorBlur(el)\n }\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// TODO: remove this after we finished refactoring\n// tslint:disable\n\nimport { identity, values } from \"ramda\"\nimport {\n EMPTY,\n Observable,\n Subject,\n forkJoin,\n merge,\n of,\n fromEvent,\n interval,\n NEVER\n} from \"rxjs\"\nimport { ajax } from \"rxjs/ajax\"\nimport {\n delay,\n filter,\n map,\n pluck,\n switchMap,\n switchMapTo,\n take,\n tap,\n} from \"rxjs/operators\"\n\nimport {\n Component,\n paintHeaderShadow,\n mountHero,\n mountMain,\n mountNavigation,\n mountSearchResult,\n mountTableOfContents,\n mountTabs,\n switchComponent,\n watchComponentMap,\n watchHeader,\n watchSearchQuery,\n watchSearchReset\n} from \"./components\"\nimport { SearchIndexOptions } from \"./modules\"\nimport {\n getElement,\n setupAgent,\n watchToggle,\n watchWorker,\n setToggle,\n getElements,\n watchMedia\n} from \"./utilities\"\nimport {\n PackerMessage,\n PackerMessageType,\n SearchMessage,\n SearchMessageType,\n SearchSetupMessage,\n isSearchDumpMessage,\n isSearchResultMessage\n} from \"./workers\"\nimport { renderSource } from \"templates\"\nimport { switchMapIf, not } from \"extensions\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Configuration\n */\nexport interface Config {\n base: string /* Base URL */\n worker: {\n search: string /* Search worker URL */\n packer: string /* Packer worker URL */\n }\n}\n\n/* ----------------------------------------------------------------------------\n * TODO: where do we put this stuff?\n * ------------------------------------------------------------------------- */\n\ndocument.documentElement.classList.remove(\"no-js\")\ndocument.documentElement.classList.add(\"js\")\n\nconst names: Component[] = [\n \"container\", /* Container */\n \"header\", /* Header */\n \"header-title\", /* Header title */\n \"hero\", /* Hero */\n \"main\", /* Main area */\n \"navigation\", /* Navigation */\n \"search\", /* Search */\n \"search-query\", /* Search input */\n \"search-reset\", /* Search reset */\n \"search-result\", /* Search results */\n \"tabs\", /* Tabs */\n \"toc\" /* Table of contents */\n]\n\n/* ----------------------------------------------------------------------------\n * Helper functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Ensure that the given value is a valid configuration\n *\n * We could use `jsonschema` or any other schema validation framework, but that\n * would just add more bloat to the bundle, so we'll keep it plain and simple.\n *\n * @param config - Configuration\n *\n * @return Test result\n */\nfunction isConfig(config: any): config is Config {\n return typeof config === \"object\"\n && typeof config.base === \"string\"\n && typeof config.worker === \"object\"\n && typeof config.worker.search === \"string\"\n && typeof config.worker.packer === \"string\"\n}\n\n/**\n *\n * Rogue control characters must be filtered before handing the query to the\n * search index, as lunr will throw otherwise.\n */\nfunction prepare(value: string): string {\n const newvalue = value\n .replace(/(?:^|\\s+)[*+-:^~]+(?=\\s+|$)/g, \"\")\n .trim()\n\n return newvalue ? newvalue.replace(/\\s+|$/g, \"* \") : \"\"\n}\n\nfunction setupWorkers(config: Config) {\n // Remove trailing URL, or search might not work on the 404 page.\n config.base = config.base.replace(/\\/$/, \"\")\n\n const worker = new Worker(config.worker.search)\n const packer = new Worker(config.worker.packer)\n\n const packerMessage$ = new Subject()\n const packer$ = watchWorker(packer, { send$: packerMessage$ })\n\n // send a message, then switchMapTo worker!\n\n packer$.subscribe(message => {\n // console.log(\"PACKER.MSG\", message.data.length)\n // is always packed!\n if (message.type === PackerMessageType.BINARY && message.data[0] !== \"{\")\n localStorage.setItem(\"index\", message.data)\n })\n\n // storing = experimental feature\n\n const searchMessage$ = new Subject()\n\n const search$ = watchWorker(worker, { send$: searchMessage$ })\n\n /* Link search to packer */\n search$\n .pipe(\n filter(isSearchDumpMessage),\n map(message => ({\n type: PackerMessageType.STRING,\n data: message.data\n })),\n tap(message => packerMessage$.next(message)) // send message and wait!\n // switchMapTo(packer$)\n )\n .subscribe()\n\n const data$ = ajax({\n url: `${config.base}/search/search_index.json`,\n responseType: \"json\",\n withCredentials: true\n })\n .pipe(\n pluck(\"response\")\n // take(1)\n )\n\n const fromLocal = localStorage.getItem(\"index\")\n\n ;\n (fromLocal ? of({\n type: PackerMessageType.BINARY,\n data: localStorage.getItem(\"index\")!\n }) : EMPTY)\n .subscribe(x => {\n // console.log(\"send message to packer\")\n packerMessage$.next(x)\n })\n\n const index$ = fromLocal ? packer$.pipe(pluck(\"data\"), take(1)) : of(undefined) // of(localStorage.getItem(\"index\"))\n\n // index$.subscribe(xx => console.log(\"INDEX\", xx))\n\n forkJoin([data$, index$])\n .pipe(\n map(([data, index]) => ({\n type: SearchMessageType.SETUP,\n data: { ...data, index }\n }))\n )\n .subscribe(message => {\n searchMessage$.next(message) // TODO: this shall not complete\n })\n\n return [search$, searchMessage$] as const\n}\n\n/**\n * Yes, this is a super hacky implementation. Needs clean up.\n */\nfunction repository() {\n const el = getElement(\"[data-md-source][href]\")\n console.log(el)\n if (!el)\n return EMPTY\n\n const data = sessionStorage.getItem(\"repository\")\n if (data) {\n const x = JSON.parse(data)\n return of(x)\n }\n\n // TODO: do correct rounding, see GitHub\n function format(value: number) {\n return value > 999\n ? `${(value / 1000).toFixed(1)}k`\n : `${(value)}`\n }\n\n // github repository...\n const [, user, repo] = el.href.match(/^.+github\\.com\\/([^\\/]+)\\/?([^\\/]+)?.*$/i)\n\n // Show repo stats\n if (user && repo) {\n return ajax({\n url: `https://api.github.com/repos/${user}/${repo}`,\n responseType: \"json\"\n })\n .pipe(\n map(({ status, response }) => {\n if (status === 200) {\n const { stargazers_count, forks_count } = response\n return [\n `${format(stargazers_count)} Stars`,\n `${format(forks_count)} Forks`\n ]\n }\n return []\n }),\n tap(data => sessionStorage.setItem(\"repository\", JSON.stringify(data)))\n )\n\n // Show user or organization stats\n } else if (user) {\n return ajax({\n url: `https://api.github.com/users/${user}`,\n responseType: \"json\"\n })\n .pipe(\n map(({ status, response }) => {\n if (status === 200) {\n const { public_repos } = response\n return [\n `${format(public_repos)} Repositories`\n ]\n }\n return []\n }),\n tap(data => sessionStorage.setItem(\"repository\", JSON.stringify(data)))\n )\n }\n return of([])\n}\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 // pass config here!?\n const agent = setupAgent() // TODO: add a config parameter here to configure media queries\n\n const [\n searchWorkerRecv$,\n searchMessage$\n ] = setupWorkers(config)\n\n // TODO: WIP repo rendering\n repository().subscribe(facts => {\n if (facts.length) {\n const sources = getElements(\"[data-md-source] .md-source__repository\")\n sources.forEach(repo => {\n repo.dataset.mdState = \"done\"\n repo.appendChild(\n renderSource(facts)\n )\n })\n }\n })\n\n /* ----------------------------------------------------------------------- */\n\n /* Create component map observable */\n const components$ = watchComponentMap(names, { document$: agent.document.load$ })\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\") // TODO:!\n .pipe(\n switchMap(watchHeader)\n )\n\n /* Create header shadow toggle */\n component(\"header\")\n .pipe(\n switchMap(el => main$\n .pipe(\n paintHeaderShadow(el) // technically, this could be done in paintMain\n )\n )\n )\n .subscribe()\n\n // ----------------------------------------------------------------------------\n\n // watchSearchResult // emit, if at bottom...\n // receive results as a second observable!? filter stuff, paint\n\n const result$ = searchWorkerRecv$ // move worker initialization into mountSearch ?\n .pipe(\n // tap(m => console.log(\"message from worker\", m)),\n filter(isSearchResultMessage),\n pluck(\"data\"),\n // Prefix URLs with base URL\n tap(result => result.forEach(item => {\n item.article.location = `${config.base}/${item.article.location}`\n item.sections.forEach(section => {\n section.location = `${config.base}/${section.location}`\n })\n }))\n )\n\n // handleSearchResult <-- operator\n\n const query$ = component(\"search-query\")\n .pipe(\n switchMap(el => watchSearchQuery(el, { prepare }))\n )\n\n query$\n .pipe(\n map(query => ({ // put this into some function...\n type: SearchMessageType.QUERY,\n data: query.value\n })), // TODO. ugly...\n // distinctUntilKeyChanged(\"data\")\n )\n .subscribe(searchMessage$)\n\n // create the message subject internally... and link it to the worker...?\n // watchSearchWorker(worker, agent, { query$ }) // message internally...\n\n query$\n .pipe(\n tap(query => {\n if (query.focus)\n setToggle(search, true)\n })\n )\n .subscribe()\n\n /* ----------------------------------------------------------------------- */\n\n const main$ = component(\"main\")\n .pipe(\n mountMain(agent, { header$ })\n )\n\n const navigation$ = component(\"navigation\")\n .pipe(\n mountNavigation(agent, { main$ })\n )\n\n const toc$ = component(\"toc\")\n .pipe(\n mountTableOfContents(agent, { header$, main$ })\n )\n\n // TODO: naming?\n const resultComponent$ = component(\"search-result\")\n .pipe(\n mountSearchResult(agent, { result$, query$: query$.pipe(pluck(\"value\")) })\n ) // temporary fix\n\n const tabs$ = component(\"tabs\")\n .pipe(\n mountTabs(agent, { header$ })\n )\n\n const hero$ = component(\"hero\")\n .pipe(\n mountHero(agent, { header$ })\n )\n\n\n /* ----------------------------------------------------------------------- */\n\n const drawer = getElement(\"[data-md-toggle=drawer]\")!\n const search = getElement(\"[data-md-toggle=search]\")!\n\n const a$ = watchToggle(search)\n .pipe(\n delay(400)\n )\n\n const reset$ = component(\"search-reset\")\n .pipe(\n switchMap(watchSearchReset)\n )\n\n /* Listener: focus query if search is open and character is typed */\n // TODO: combine with watchElementFocus\n const keysIfSearchActive$ = a$\n .pipe(\n switchMap(x => x === true ? fromEvent(window, \"keydown\") : NEVER),\n )\n\n // focus search on reset, on toggle and on keypress if open\n merge(a$.pipe(filter(identity)), reset$, keysIfSearchActive$)\n .pipe(\n switchMapTo(component(\"search-query\")),\n tap(el => el.focus()) // TODO: only if element isnt focused! setFocus? setToggle?\n )\n .subscribe()\n\n /* ----------------------------------------------------------------------- */\n\n /* Open details before printing */\n merge(\n watchMedia(\"print\").pipe(filter(identity)), // Webkit\n fromEvent(window, \"beforeprint\") // IE, FF\n )\n .subscribe(() => {\n const details = document.querySelectorAll(\"details\")\n Array.prototype.forEach.call(details, detail => {\n detail.setAttribute(\"open\", \"\")\n })\n })\n\n /* ----------------------------------------------------------------------- */\n\n const state = {\n search: {\n query$,\n result$: resultComponent$,\n reset$,\n },\n main$,\n navigation$,\n toc$,\n tabs$,\n hero$\n }\n\n const { search: temp, ...rest } = state\n merge(...values(rest), ...values(temp))\n .subscribe() // potential memleak <-- use takeUntil\n\n return {\n agent,\n state\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, Subject } from \"rxjs\"\n\nimport {\n ViewportOffset,\n ViewportSize,\n watchDocument,\n watchLocation,\n watchLocationHash,\n watchMedia,\n watchViewportOffset,\n watchViewportSize\n} from \"utilities\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Agent document\n */\nexport interface AgentDocument {\n load$: Observable /* Document observable */\n}\n\n/**\n * Agent location\n */\nexport interface AgentLocation {\n href$: Subject /* Location subject */\n hash$: Observable /* Location hash observable */\n}\n\n/**\n * Agent media\n */\nexport interface AgentMedia {\n screen$: Observable /* Media observable for screen */\n tablet$: Observable /* Media observable for tablet */\n}\n\n/**\n * Agent viewport\n */\nexport interface AgentViewport {\n offset$: Observable /* Viewport offset observable */\n size$: Observable /* Viewport size observable */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Agent\n */\nexport interface Agent {\n document: AgentDocument /* Document observables */\n location: AgentLocation /* Location observables */\n media: AgentMedia /* Media observables */\n viewport: AgentViewport /* Viewport observables */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Create the agent\n *\n * This function returns a data structure that contains all observables that\n * are related to the browser and/or environment.\n *\n * @return Agent\n */\nexport function setupAgent(): Agent {\n return {\n document: {\n load$: watchDocument()\n },\n location: {\n href$: watchLocation(),\n hash$: watchLocationHash()\n },\n media: {\n screen$: watchMedia(\"(min-width: 1220px)\"),\n tablet$: watchMedia(\"(min-width: 960px)\")\n },\n viewport: {\n offset$: watchViewportOffset(),\n size$: watchViewportSize()\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, 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 | \"container\" /* Container */\n | \"header\" /* Header */\n | \"header-title\" /* Header title */\n | \"hero\" /* Hero */\n | \"main\" /* Main area */\n | \"navigation\" /* Navigation */\n | \"search\" /* Search */\n | \"search-query\" /* Search input */\n | \"search-reset\" /* Search reset */\n | \"search-result\" /* Search results */\n | \"tabs\" /* Tabs */\n | \"toc\" /* Table of contents */\n\n/**\n * Component map\n */\nexport type ComponentMap = {\n [P in Component]?: HTMLElement\n}\n\n/* ----------------------------------------------------------------------------\n * Helper types\n * ------------------------------------------------------------------------- */\n\n/**\n * Options\n */\ninterface Options {\n document$: Observable /* Document observable */\n}\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Watch component mapping\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 mapping observable\n */\nexport function watchComponentMap(\n names: Component[], { document$ }: Options\n): Observable {\n const components$ = document$\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 \"header-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, fromEvent } from \"rxjs\"\nimport { map } from \"rxjs/operators\"\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Set toggle\n *\n * Simulating a click event seems to be the most cross-browser compatible way\n * of changing the value while also emitting a `change` event. Before, Material\n * used `CustomEvent` to programatically change the value of a toggle, but this\n * is a much simpler and cleaner solution.\n *\n * @param el - Toggle element\n * @param value - Toggle value\n */\nexport function setToggle(\n el: HTMLInputElement, value: boolean\n): void {\n if (el.checked !== value)\n el.click()\n}\n\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 map(() => el.checked)\n )\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/material/assets/javascripts/lunr/lunr.multi.min.js b/material/assets/javascripts/lunr/lunr.multi.min.js index d3dbc860c..7debad096 100644 --- a/material/assets/javascripts/lunr/lunr.multi.min.js +++ b/material/assets/javascripts/lunr/lunr.multi.min.js @@ -1 +1 @@ -!function(e,i){"function"==typeof define&&define.amd?define(i):"object"==typeof exports?module.exports=i():i()(e.lunr)}(this,function(){return function(e){e.multiLanguage=function(){for(var i=Array.prototype.slice.call(arguments),t=i.join("-"),r="",n=[],s=[],p=0;p>>8,t[2*o+1]=s%256}return t},decompressFromUint8Array:function(e){if(null==e)return i.decompress(e);for(var t=new Array(e.length/2),o=0,n=t.length;o>=1}else{for(n=1,o=0;o>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[p]}else for(n=s[p],o=0;o>=1;0==--l&&(l=Math.pow(2,h),h++),s[c]=f++,p=String(a)}if(""!==p){if(Object.prototype.hasOwnProperty.call(u,p)){if(p.charCodeAt(0)<256){for(o=0;o>=1}else{for(n=1,o=0;o>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[p]}else for(n=s[p],o=0;o>=1;0==--l&&(l=Math.pow(2,h),h++)}for(n=2,o=0;o>=1;for(;;){if(m<<=1,v==e-1){d.push(t(m));break}v++}return d.join("")},decompress:function(r){return null==r?"":""==r?null:i._decompress(r.length,32768,(function(e){return r.charCodeAt(e)}))},_decompress:function(e,t,o){var n,i,s,u,a,c,p,l=[],f=4,h=4,d=3,m="",v=[],y={val:o(0),position:t,index:1};for(n=0;n<3;n+=1)l[n]=n;for(s=0,a=Math.pow(2,2),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),s|=(u>0?1:0)*c,c<<=1;switch(s){case 0:for(s=0,a=Math.pow(2,8),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),s|=(u>0?1:0)*c,c<<=1;p=r(s);break;case 1:for(s=0,a=Math.pow(2,16),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),s|=(u>0?1:0)*c,c<<=1;p=r(s);break;case 2:return""}for(l[3]=p,i=p,v.push(p);;){if(y.index>e)return"";for(s=0,a=Math.pow(2,d),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),s|=(u>0?1:0)*c,c<<=1;switch(p=s){case 0:for(s=0,a=Math.pow(2,8),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),s|=(u>0?1:0)*c,c<<=1;l[h++]=r(s),p=h-1,f--;break;case 1:for(s=0,a=Math.pow(2,16),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),s|=(u>0?1:0)*c,c<<=1;l[h++]=r(s),p=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[p])m=l[p];else{if(p!==h)return null;m=i+i.charAt(0)}v.push(m),l[h++]=i+m.charAt(0),i=m,0==--f&&(f=Math.pow(2,d),d++)}}};return i}();void 0===(o=function(){return n}.call(e,t,e,r))||(r.exports=o)},function(r,e,t){"use strict";t.r(e);var o,n=t(0);!function(r){r[r.STRING=0]="STRING",r[r.BINARY=1]="BINARY"}(o||(o={})),t.d(e,"handler",(function(){return a}));var i=navigator.userAgent.includes("AppleWebKit"),s=i?n.compress:n.compressToUTF16,u=i?n.decompress:n.decompressFromUTF16;function a(r){switch(r.type){case o.STRING:return{type:o.BINARY,data:s(r.data)};case o.BINARY:return{type:o.STRING,data:u(r.data)}}}addEventListener("message",(function(r){postMessage(a(r.data))}))}]); +!function(e){var r={};function t(o){if(r[o])return r[o].exports;var n=r[o]={i:o,l:!1,exports:{}};return e[o].call(n.exports,n,n.exports,t),n.l=!0,n.exports}t.m=e,t.c=r,t.d=function(e,r,o){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:o})},t.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var o=Object.create(null);if(t.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)t.d(o,n,function(r){return e[r]}.bind(null,n));return o},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},t.p="",t(t.s=1)}([function(e,r,t){var o,n=function(){var e=String.fromCharCode,r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$",o={};function n(e,r){if(!o[e]){o[e]={};for(var t=0;t>>8,t[2*o+1]=i%256}return t},decompressFromUint8Array:function(r){if(null==r)return s.decompress(r);for(var t=new Array(r.length/2),o=0,n=t.length;o>=1}else{for(n=1,o=0;o>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[p]}else for(n=i[p],o=0;o>=1;0==--l&&(l=Math.pow(2,h),h++),i[c]=f++,p=String(a)}if(""!==p){if(Object.prototype.hasOwnProperty.call(u,p)){if(p.charCodeAt(0)<256){for(o=0;o>=1}else{for(n=1,o=0;o>=1}0==--l&&(l=Math.pow(2,h),h++),delete u[p]}else for(n=i[p],o=0;o>=1;0==--l&&(l=Math.pow(2,h),h++)}for(n=2,o=0;o>=1;for(;;){if(m<<=1,v==r-1){d.push(t(m));break}v++}return d.join("")},decompress:function(e){return null==e?"":""==e?null:s._decompress(e.length,32768,(function(r){return e.charCodeAt(r)}))},_decompress:function(r,t,o){var n,s,i,u,a,c,p,l=[],f=4,h=4,d=3,m="",v=[],y={val:o(0),position:t,index:1};for(n=0;n<3;n+=1)l[n]=n;for(i=0,a=Math.pow(2,2),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),i|=(u>0?1:0)*c,c<<=1;switch(i){case 0:for(i=0,a=Math.pow(2,8),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),i|=(u>0?1:0)*c,c<<=1;p=e(i);break;case 1:for(i=0,a=Math.pow(2,16),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),i|=(u>0?1:0)*c,c<<=1;p=e(i);break;case 2:return""}for(l[3]=p,s=p,v.push(p);;){if(y.index>r)return"";for(i=0,a=Math.pow(2,d),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),i|=(u>0?1:0)*c,c<<=1;switch(p=i){case 0:for(i=0,a=Math.pow(2,8),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),i|=(u>0?1:0)*c,c<<=1;l[h++]=e(i),p=h-1,f--;break;case 1:for(i=0,a=Math.pow(2,16),c=1;c!=a;)u=y.val&y.position,y.position>>=1,0==y.position&&(y.position=t,y.val=o(y.index++)),i|=(u>0?1:0)*c,c<<=1;l[h++]=e(i),p=h-1,f--;break;case 2:return v.join("")}if(0==f&&(f=Math.pow(2,d),d++),l[p])m=l[p];else{if(p!==h)return null;m=s+s.charAt(0)}v.push(m),l[h++]=s+m.charAt(0),s=m,0==--f&&(f=Math.pow(2,d),d++)}}};return s}();void 0===(o=function(){return n}.call(r,t,r,e))||(e.exports=o)},function(e,r,t){"use strict";t.r(r);var o,n=t(0);!function(e){e[e.STRING=0]="STRING",e[e.BINARY=1]="BINARY"}(o||(o={})),t.d(r,"handler",(function(){return a}));var s=navigator.userAgent.includes("AppleWebKit"),i=s?n.compress:n.compressToUTF16,u=s?n.decompress:n.decompressFromUTF16;function a(e){switch(e.type){case o.STRING:return{type:o.BINARY,data:i(e.data)};case o.BINARY:return{type:o.STRING,data:u(e.data)}}}self.addEventListener("message",(function(e){self.postMessage(a(e.data))}))}]); //# sourceMappingURL=packer.js.map \ No newline at end of file diff --git a/material/assets/javascripts/worker/packer.js.map b/material/assets/javascripts/worker/packer.js.map index 48ad37ae1..237aaab77 100644 --- a/material/assets/javascripts/worker/packer.js.map +++ b/material/assets/javascripts/worker/packer.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///packer.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","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","__WEBPACK_AMD_DEFINE_RESULT__","LZString","f","String","fromCharCode","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","length","charAt","compressToBase64","input","res","_compress","a","decompressFromBase64","_decompress","index","compressToUTF16","decompressFromUTF16","compressed","charCodeAt","compressToUint8Array","uncompressed","compress","buf","Uint8Array","TotalLen","current_value","decompressFromUint8Array","decompress","Array","result","forEach","push","join","compressToEncodedURIComponent","decompressFromEncodedURIComponent","replace","bitsPerChar","getCharFromInt","ii","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","Math","pow","resetValue","getNextValue","w","bits","resb","maxpower","power","dictionary","enlargeIn","dictSize","numBits","entry","data","val","position","undefined","__webpack_exports__","PackerMessageType","lz_string","handler","isWebkit","navigator","userAgent","includes","pack","unpack","message","type","STRING","BINARY","addEventListener","ev","postMessage"],"mappings":"CAAS,SAAUA,GAET,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,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AQ0G,EAAqB7G,GAE7C,aACAA,EAAoBiB,EAAE4F,GAGtB,IA8BIC,EA9BAC,EAAY/G,EAAoB,IA+BpC,SAAW8G,GACPA,EAAkBA,EAA0B,OAAI,GAAK,SACrDA,EAAkBA,EAA0B,OAAI,GAAK,SAFzD,CAGGA,IAAsBA,EAAoB,KA0Bd9G,EAAoBS,EAAEoG,EAAqB,WAAW,WAAa,OAAOG,KAmCzG,IAAIC,EAAWC,UAAUC,UAAUC,SAAS,eAKxCC,EAAOJ,EACLF,EAAoB,SACpBA,EAA2B,gBAI7BO,EAASL,EACPF,EAAsB,WACtBA,EAA+B,oBAWrC,SAASC,EAAQO,GACb,OAAQA,EAAQC,MAEZ,KAAKV,EAAkBW,OACnB,MAAO,CACHD,KAAMV,EAAkBY,OACxBjB,KAAMY,EAAKE,EAAQd,OAG3B,KAAKK,EAAkBY,OACnB,MAAO,CACHF,KAAMV,EAAkBW,OACxBhB,KAAMa,EAAOC,EAAQd,QAOrCkB,iBAAiB,WAAW,SAAUC,GAClCC,YAAYb,EAAQY,EAAGnB","file":"worker/packer.js","sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/lz-string/libs/lz-string.js","webpack:///./src/assets/javascripts/workers/packer/_/index.ts","webpack:///./src/assets/javascripts/workers/packer/main/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","LZString","f","String","fromCharCode","keyStrBase64","keyStrUriSafe","baseReverseDic","getBaseValue","alphabet","character","length","charAt","compressToBase64","input","res","_compress","a","decompressFromBase64","_decompress","index","compressToUTF16","decompressFromUTF16","compressed","charCodeAt","compressToUint8Array","uncompressed","compress","buf","Uint8Array","TotalLen","current_value","decompressFromUint8Array","decompress","Array","result","forEach","push","join","compressToEncodedURIComponent","decompressFromEncodedURIComponent","replace","bitsPerChar","getCharFromInt","ii","context_dictionary","context_dictionaryToCreate","context_c","context_wc","context_w","context_enlargeIn","context_dictSize","context_numBits","context_data","context_data_val","context_data_position","Math","pow","resetValue","getNextValue","w","bits","resb","maxpower","power","dictionary","enlargeIn","dictSize","numBits","entry","data","val","position","PackerMessageType","isWebkit","navigator","userAgent","includes","pack","unpack","handler","message","type","STRING","BINARY","self","addEventListener","ev","postMessage"],"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,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F,GACb+F,EAAQJ,EAAW3F,OACd,CACL,GAAIA,IAAM6F,EAGR,OAAO,KAFPE,EAAQT,EAAIA,EAAEhD,OAAO,GAKzBuB,EAAOE,KAAKgC,GAGZJ,EAAWE,KAAcP,EAAIS,EAAMzD,OAAO,GAG1CgD,EAAIS,EAEa,KAJjBH,IAKEA,EAAYV,KAAKC,IAAI,EAAGW,GACxBA,QAMN,OAAOnE,EApeM,QAwe0B,KAAvC,aAAqB,OAAOA,GAAW,+B,wCCndvBwE,E,QAAlB,SAAkBA,GAChB,uBACA,uBAFF,CAAkBA,MAAiB,KC7BnC,wCA2CA,IAAMC,EAAWC,UAAUC,UAAUC,SAAS,eAOxCC,EAAOJ,EACT,WACA,kBAKEK,EAASL,EACX,aACA,sBAaG,SAASM,EAAQC,GACtB,OAAQA,EAAQC,MAGd,KAAKT,EAAkBU,OACrB,MAAO,CACLD,KAAMT,EAAkBW,OACxBd,KAAMQ,EAAKG,EAAQX,OAIvB,KAAKG,EAAkBW,OACrB,MAAO,CACLF,KAAMT,EAAkBU,OACxBb,KAAMS,EAAOE,EAAQX,QAS7Be,KAAKC,iBAAiB,WAAW,SAAAC,GAC/BF,KAAKG,YAAYR,EAAQO,EAAGjB","file":"worker/packer.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 = 1);\n","// Copyright (c) 2013 Pieroxy \n// This work is free. You can redistribute it and/or modify it\n// under the terms of the WTFPL, Version 2\n// For more information see LICENSE.txt or http://www.wtfpl.net/\n//\n// For more information, the home page:\n// http://pieroxy.net/blog/pages/lz-string/testing.html\n//\n// LZ-based compression algorithm, version 1.4.4\nvar LZString = (function() {\n\n// private property\nvar f = String.fromCharCode;\nvar keyStrBase64 = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\";\nvar keyStrUriSafe = \"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+-$\";\nvar baseReverseDic = {};\n\nfunction getBaseValue(alphabet, character) {\n if (!baseReverseDic[alphabet]) {\n baseReverseDic[alphabet] = {};\n for (var i=0 ; i>> 8;\n buf[i*2+1] = current_value % 256;\n }\n return buf;\n },\n\n //decompress from uint8array (UCS-2 big endian format)\n decompressFromUint8Array:function (compressed) {\n if (compressed===null || compressed===undefined){\n return LZString.decompress(compressed);\n } else {\n var buf=new Array(compressed.length/2); // 2 bytes per character\n for (var i=0, TotalLen=buf.length; i> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n // Add wc to the dictionary.\n context_dictionary[context_wc] = context_dictSize++;\n context_w = String(context_c);\n }\n }\n\n // Output the code for w.\n if (context_w !== \"\") {\n if (Object.prototype.hasOwnProperty.call(context_dictionaryToCreate,context_w)) {\n if (context_w.charCodeAt(0)<256) {\n for (i=0 ; i> 1;\n }\n } else {\n value = 1;\n for (i=0 ; i> 1;\n }\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n delete context_dictionaryToCreate[context_w];\n } else {\n value = context_dictionary[context_w];\n for (i=0 ; i> 1;\n }\n\n\n }\n context_enlargeIn--;\n if (context_enlargeIn == 0) {\n context_enlargeIn = Math.pow(2, context_numBits);\n context_numBits++;\n }\n }\n\n // Mark the end of the stream\n value = 2;\n for (i=0 ; i> 1;\n }\n\n // Flush the last char\n while (true) {\n context_data_val = (context_data_val << 1);\n if (context_data_position == bitsPerChar-1) {\n context_data.push(getCharFromInt(context_data_val));\n break;\n }\n else context_data_position++;\n }\n return context_data.join('');\n },\n\n decompress: function (compressed) {\n if (compressed == null) return \"\";\n if (compressed == \"\") return null;\n return LZString._decompress(compressed.length, 32768, function(index) { return compressed.charCodeAt(index); });\n },\n\n _decompress: function (length, resetValue, getNextValue) {\n var dictionary = [],\n next,\n enlargeIn = 4,\n dictSize = 4,\n numBits = 3,\n entry = \"\",\n result = [],\n i,\n w,\n bits, resb, maxpower, power,\n c,\n data = {val:getNextValue(0), position:resetValue, index:1};\n\n for (i = 0; i < 3; i += 1) {\n dictionary[i] = i;\n }\n\n bits = 0;\n maxpower = Math.pow(2,2);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (next = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n c = f(bits);\n break;\n case 2:\n return \"\";\n }\n dictionary[3] = c;\n w = c;\n result.push(c);\n while (true) {\n if (data.index > length) {\n return \"\";\n }\n\n bits = 0;\n maxpower = Math.pow(2,numBits);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n switch (c = bits) {\n case 0:\n bits = 0;\n maxpower = Math.pow(2,8);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 1:\n bits = 0;\n maxpower = Math.pow(2,16);\n power=1;\n while (power!=maxpower) {\n resb = data.val & data.position;\n data.position >>= 1;\n if (data.position == 0) {\n data.position = resetValue;\n data.val = getNextValue(data.index++);\n }\n bits |= (resb>0 ? 1 : 0) * power;\n power <<= 1;\n }\n dictionary[dictSize++] = f(bits);\n c = dictSize-1;\n enlargeIn--;\n break;\n case 2:\n return result.join('');\n }\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n if (dictionary[c]) {\n entry = dictionary[c];\n } else {\n if (c === dictSize) {\n entry = w + w.charAt(0);\n } else {\n return null;\n }\n }\n result.push(entry);\n\n // Add w+entry[0] to the dictionary.\n dictionary[dictSize++] = w + entry.charAt(0);\n enlargeIn--;\n\n w = entry;\n\n if (enlargeIn == 0) {\n enlargeIn = Math.pow(2, numBits);\n numBits++;\n }\n\n }\n }\n};\n return LZString;\n})();\n\nif (typeof define === 'function' && define.amd) {\n define(function () { return LZString; });\n} else if( typeof module !== 'undefined' && module != null ) {\n module.exports = LZString\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 * Packer message type\n */\nexport const enum PackerMessageType {\n STRING, /* String data */\n BINARY /* Packed data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message containing an unpacked string\n */\nexport interface PackerStringMessage {\n type: PackerMessageType.STRING /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing a packed string\n */\nexport interface PackerBinaryMessage {\n type: PackerMessageType.BINARY /* Message type */\n data: string /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message exchanged with the packer worker\n */\nexport type PackerMessage =\n | PackerStringMessage\n | PackerBinaryMessage\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Type guard for packer binary messages\n *\n * @param message - Packer worker message\n *\n * @return Test result\n */\nexport function isPackerBinaryMessage(\n message: PackerMessage\n): message is PackerBinaryMessage {\n return message.type === PackerMessageType.BINARY\n}\n\n/**\n * Type guard for packer string messages\n *\n * @param message - Packer worker message\n *\n * @return Test result\n */\nexport function isPackerStringMessage(\n message: PackerMessage\n): message is PackerStringMessage {\n return message.type === PackerMessageType.STRING\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 compress,\n compressToUTF16,\n decompress,\n decompressFromUTF16\n} from \"lz-string\"\n\nimport { PackerMessage, PackerMessageType } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Determine methods for packing and unpacking\n *\n * While all Webkit-based browsers can store invalid UTF-16 strings in local\n * storage, other browsers may only store valid UTF-16 strings.\n *\n * @see https://bit.ly/2Q1ArhU - LZ-String documentation\n */\nconst isWebkit = navigator.userAgent.includes(\"AppleWebKit\")\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Method for packing\n */\nconst pack = isWebkit\n ? compress\n : compressToUTF16\n\n/**\n * Method for unpacking\n */\nconst unpack = isWebkit\n ? decompress\n : decompressFromUTF16\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Message handler\n *\n * @param message - Source message\n *\n * @return Target message\n */\nexport function handler(message: PackerMessage): PackerMessage {\n switch (message.type) {\n\n /* Pack an unpacked string */\n case PackerMessageType.STRING:\n return {\n type: PackerMessageType.BINARY,\n data: pack(message.data)\n }\n\n /* Unpack a packed string */\n case PackerMessageType.BINARY:\n return {\n type: PackerMessageType.STRING,\n data: unpack(message.data)\n }\n }\n}\n\n/* ----------------------------------------------------------------------------\n * Worker\n * ------------------------------------------------------------------------- */\n\nself.addEventListener(\"message\", ev => {\n self.postMessage(handler(ev.data))\n})\n"],"sourceRoot":""} \ No newline at end of file diff --git a/material/assets/javascripts/worker/search.js b/material/assets/javascripts/worker/search.js index cc20171e6..4c8712df0 100644 --- a/material/assets/javascripts/worker/search.js +++ b/material/assets/javascripts/worker/search.js @@ -1,9 +1,9 @@ !function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:n})},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 n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var i in e)r.d(n,i,function(t){return e[t]}.bind(null,i));return n},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=3)}([function(e,t,r){var n,i; /** - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.6 + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8 * 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,b,S,E,k,P,L,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" + */!function(){var s,o,a,u,l,c,h,d,f,p,y,m,g,x,v,w,Q,b,S,E,k,P,L,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.8" /*! * lunr.utils * Copyright (C) 2019 Oliver Nightingale @@ -15,11 +15,11 @@ /*! * lunr.tokenizer * Copyright (C) 2019 Oliver Nightingale - */,R.tokenizer=function(e,t){if(null==e||null==e)return[];if(Array.isArray(e))return e.map((function(e){return new R.Token(R.utils.asString(e).toLowerCase(),R.utils.clone(t))}));for(var r=e.toString().trim().toLowerCase(),n=r.length,i=[],s=0,o=0;s<=n;s++){var a=s-o;if(r.charAt(s).match(R.tokenizer.separator)||s==n){if(a>0){var u=R.utils.clone(t)||{};u.position=[o,a],u.index=i.length,i.push(new R.Token(r.slice(o,s),u))}o=s+1}}return i},R.tokenizer.separator=/[\s\-]+/ + */,R.tokenizer=function(e,t){if(null==e||null==e)return[];if(Array.isArray(e))return e.map((function(e){return new R.Token(R.utils.asString(e).toLowerCase(),R.utils.clone(t))}));for(var r=e.toString().toLowerCase(),n=r.length,i=[],s=0,o=0;s<=n;s++){var a=s-o;if(r.charAt(s).match(R.tokenizer.separator)||s==n){if(a>0){var u=R.utils.clone(t)||{};u.position=[o,a],u.index=i.length,i.push(new R.Token(r.slice(o,s),u))}o=s+1}}return i},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;r]/;e.exports=function(e){var t,r=""+e,i=n.exec(r);if(!i)return r;var s="",o=0,a=0;for(o=i.index;o{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},function(e,t,r){"use strict";r.r(t);var n=r(0),i=r(1),s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o};var a=r(2),u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},d=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o},f=function(){for(var e=[],t=0;t"+r+""};return function(n){n=n.replace(/[\s*+-:~^]+/g," ").trim();var i=new RegExp("(^|"+e.separator+")("+a(n).replace(t,"|")+")","img");return function(e){return u(u({},e),{title:e.title.replace(i,r),text:e.text.replace(i,r)})}}}(t),this.index=void 0===c?n((function(){var e,t;l=l||{trimmer:!0,stopwords:!0},this.pipeline.reset(),l.trimmer&&this.pipeline.add(n.trimmer),l.stopwords&&this.pipeline.add(n.stopWordFilter),this.field("title",{boost:10}),this.field("text"),this.ref("location");try{for(var i=h(r),s=i.next();!s.done;s=i.next()){var o=s.value;this.add(o)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}})):n.Index.load("string"==typeof c?JSON.parse(c):c)}return e.prototype.search=function(e){var t=this;if(e)try{var r=this.index.search(e).reduce((function(e,r){var n=t.documents.get(r.ref);if(void 0!==n)if("parent"in n){var i=n.parent.location;e.set(i,f(e.get(i)||[],[r]))}else{i=n.location;e.set(i,e.get(i)||[])}return e}),new Map),n=this.highlight(e);return f(r).map((function(e){var r=d(e,2),i=r[0],s=r[1];return{article:n(t.documents.get(i)),sections:s.map((function(e){return n(t.documents.get(e.ref))}))}}))}catch(t){console.warn("Invalid query: "+e+" – see https://bit.ly/2s3ChXG")}return[]},e.prototype.toString=function(){return JSON.stringify(this.index)},e}();function y(e){switch(e.type){case l.SETUP:return c=new p(e.data),{type:l.DUMP,data:c.toString()};case l.QUERY:return{type:l.RESULT,data:c?c.search(e.data):[]};default:throw new TypeError("Invalid message type")}}!function(e){e[e.SETUP=0]="SETUP",e[e.DUMP=1]="DUMP",e[e.QUERY=2]="QUERY",e[e.RESULT=3]="RESULT"}(l||(l={})),r.d(t,"handler",(function(){return y})),addEventListener("message",(function(e){postMessage(y(e.data))}))}]); + */var n=/["'&<>]/;e.exports=function(e){var t,r=""+e,i=n.exec(r);if(!i)return r;var s="",o=0,a=0;for(o=i.index;o{if("string"!=typeof e)throw new TypeError("Expected a string");return e.replace(n,"\\$&")}},function(e,t,r){"use strict";r.r(t);var n=r(0),i=r(1),s=function(e){var t="function"==typeof Symbol&&Symbol.iterator,r=t&&e[t],n=0;if(r)return r.call(e);if(e&&"number"==typeof e.length)return{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},o=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o};var a=r(2),u=function(){return(u=Object.assign||function(e){for(var t,r=1,n=arguments.length;r=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")},d=function(e,t){var r="function"==typeof Symbol&&e[Symbol.iterator];if(!r)return e;var n,i,s=r.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(n=s.next()).done;)o.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=s.return)&&r.call(s)}finally{if(i)throw i.error}}return o},f=function(){for(var e=[],t=0;t"+r+""};return function(n){n=n.replace(/[\s*+-:~^]+/g," ").trim();var i=new RegExp("(^|"+e.separator+")("+a(n).replace(t,"|")+")","img");return function(e){return u(u({},e),{title:e.title.replace(i,r),text:e.text.replace(i,r)})}}}(t),this.index=void 0===c?n((function(){var e,t;l=l||{trimmer:!0,stopwords:!0},this.pipeline.reset(),l.trimmer&&this.pipeline.add(n.trimmer),l.stopwords&&this.pipeline.add(n.stopWordFilter),this.field("title",{boost:10}),this.field("text"),this.ref("location");try{for(var i=h(r),s=i.next();!s.done;s=i.next()){var o=s.value;this.add(o)}}catch(t){e={error:t}}finally{try{s&&!s.done&&(t=i.return)&&t.call(i)}finally{if(e)throw e.error}}})):n.Index.load("string"==typeof c?JSON.parse(c):c)}return e.prototype.search=function(e){var t=this;if(e)try{var r=this.index.search(e).reduce((function(e,r){var n=t.documents.get(r.ref);if(void 0!==n)if("parent"in n){var i=n.parent.location;e.set(i,f(e.get(i)||[],[r]))}else{i=n.location;e.set(i,e.get(i)||[])}return e}),new Map),n=this.highlight(e);return f(r).map((function(e){var r=d(e,2),i=r[0],s=r[1];return{article:n(t.documents.get(i)),sections:s.map((function(e){return n(t.documents.get(e.ref))}))}}))}catch(t){console.warn("Invalid query: "+e+" – see https://bit.ly/2s3ChXG")}return[]},e.prototype.toString=function(){return JSON.stringify(this.index)},e}();function y(e){switch(e.type){case l.SETUP:return c=new p(e.data),{type:l.DUMP,data:c.toString()};case l.QUERY:return{type:l.RESULT,data:c?c.search(e.data):[]};default:throw new TypeError("Invalid message type")}}!function(e){e[e.SETUP=0]="SETUP",e[e.DUMP=1]="DUMP",e[e.QUERY=2]="QUERY",e[e.RESULT=3]="RESULT"}(l||(l={})),r.d(t,"handler",(function(){return y})),self.addEventListener("message",(function(e){self.postMessage(y(e.data))}))}]); //# sourceMappingURL=search.js.map \ No newline at end of file diff --git a/material/assets/javascripts/worker/search.js.map b/material/assets/javascripts/worker/search.js.map index 461f5ea76..47b9adc32 100644 --- a/material/assets/javascripts/worker/search.js.map +++ b/material/assets/javascripts/worker/search.js.map @@ -1 +1 @@ -{"version":3,"sources":["webpack:///search.js"],"names":["modules","installedModules","__webpack_require__","moduleId","exports","module","i","l","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","__WEBPACK_AMD_DEFINE_FACTORY__","__WEBPACK_AMD_DEFINE_RESULT__","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","ational","tional","enci","anci","izer","bli","alli","entli","eli","ousli","ization","ation","ator","alism","iveness","fulness","ousness","aliti","iviti","biliti","logi","icate","ative","alize","iciti","ical","ful","ness","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","matchOperatorsRegex","__webpack_exports__","escape_html","__values","iterator","done","__read","e","ar","error","escape_string_regexp","__assign","assign","SearchMessageType","main_index","_values","_read","__spread","_SearchIndex","SearchIndex","_a","docs","documents","e_1","Map","docs_1","docs_1_1","location","split","path","hash","title","text","linked","set","e_1_1","return","setupSearchDocumentMap","highlight","_","data","document","setupSearchHighlighter","stopwords","JSON","_this","groups","fn_1","sections","article","section","err","stringify","handler","SETUP","DUMP","QUERY","RESULT","addEventListener","ev","postMessage"],"mappings":"CAAS,SAAUA,GAET,IAAIC,EAAmB,GAGvB,SAASC,EAAoBC,GAG5B,GAAGF,EAAiBE,GACnB,OAAOF,EAAiBE,GAAUC,QAGnC,IAAIC,EAASJ,EAAiBE,GAAY,CACzCG,EAAGH,EACHI,GAAG,EACHH,QAAS,IAUV,OANAJ,EAAQG,GAAUK,KAAKH,EAAOD,QAASC,EAAQA,EAAOD,QAASF,GAG/DG,EAAOE,GAAI,EAGJF,EAAOD,QAKfF,EAAoBO,EAAIT,EAGxBE,EAAoBQ,EAAIT,EAGxBC,EAAoBS,EAAI,SAASP,EAASQ,EAAMC,GAC3CX,EAAoBY,EAAEV,EAASQ,IAClCG,OAAOC,eAAeZ,EAASQ,EAAM,CAAEK,YAAY,EAAMC,IAAKL,KAKhEX,EAAoBiB,EAAI,SAASf,GACX,oBAAXgB,QAA0BA,OAAOC,aAC1CN,OAAOC,eAAeZ,EAASgB,OAAOC,YAAa,CAAEC,MAAO,WAE7DP,OAAOC,eAAeZ,EAAS,aAAc,CAAEkB,OAAO,KAQvDpB,EAAoBqB,EAAI,SAASD,EAAOE,GAEvC,GADU,EAAPA,IAAUF,EAAQpB,EAAoBoB,IAC/B,EAAPE,EAAU,OAA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K,EAAIK,KAAKV,KACzBI,EAAKrL,EACLiL,EAAIA,EAAEW,QAAQP,EAAG,KAKJ,KAAXD,IACFH,EAAIG,EAAQpG,cAAgBiG,EAAEQ,OAAO,IAGhCR,GAGF,SAAU3D,GACf,OAAOA,EAAM1C,OAAOhE,KAIxBC,EAAK8E,SAASG,iBAAiBjF,EAAKQ,QAAS;;;;IAmB7CR,EAAKkL,uBAAyB,SAAUC,GACtC,IAAIC,EAAQD,EAAUE,QAAO,SAAUjF,EAAMkF,GAE3C,OADAlF,EAAKkF,GAAYA,EACVlF,IACN,IAEH,OAAO,SAAUK,GACf,GAAIA,GAAS2E,EAAM3E,EAAMtF,cAAgBsF,EAAMtF,WAAY,OAAOsF,IAiBtEzG,EAAKO,eAAiBP,EAAKkL,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,SAGFlL,EAAK8E,SAASG,iBAAiBjF,EAAKO,eAAgB;;;;IAqBpDP,EAAKM,QAAU,SAAUmG,GACvB,OAAOA,EAAM1C,QAAO,SAAU5F,GAC5B,OAAOA,EAAE4M,QAAQ,OAAQ,IAAIA,QAAQ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MACnB,MAAO,CACHxG,KAAM6D,EAAkB4C,OACxBjB,KAAM1B,EAAaA,EAAW3K,OAAOjO,EAAQsa,MAAQ,IAG7D,QACI,MAAM,IAAI1Z,UAAU,0BA7GhC,SAAW+X,GACPA,EAAkBA,EAAyB,MAAI,GAAK,QACpDA,EAAkBA,EAAwB,KAAI,GAAK,OACnDA,EAAkBA,EAAyB,MAAI,GAAK,QACpDA,EAAkBA,EAA0B,OAAI,GAAK,SAJzD,CAKGA,IAAsBA,EAAoB,KA8Cdzd,EAAoBS,EAAEoc,EAAqB,WAAW,WAAa,OAAOoD,KAgEzGK,iBAAiB,WAAW,SAAUC,GAClCC,YAAYP,EAAQM,EAAGnB","file":"worker/search.js","sourceRoot":""} \ No newline at end of file +{"version":3,"sources":["webpack:///webpack/bootstrap","webpack:///./node_modules/lunr/lunr.js","webpack:///./node_modules/escape-html/index.js","webpack:///./node_modules/escape-string-regexp/index.js","webpack:///./src/assets/javascripts/workers/search/_/index.ts","webpack:///./src/assets/javascripts/workers/search/main/index.ts","webpack:///./src/assets/javascripts/modules/search/_/index.ts","webpack:///./src/assets/javascripts/modules/search/document/index.ts","webpack:///./src/assets/javascripts/modules/search/highlight/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","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","matchOperatorsRegex","SearchMessageType","docs","documents","Map","path","hash","location","title","text","linked","set","setupSearchDocumentMap","highlight","_","data","trim","document","setupSearchHighlighter","stopwords","JSON","groups","sections","article","section","err","stringify","handler","SETUP","DUMP","QUERY","RESULT","self","addEventListener","ev","postMessage"],"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,OAA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ACXD,EAAIC,KAKRG,EAAK/I,GACEqJ,KAAKV,KAEVC,GADIW,EAAKR,EAAGS,KAAKb,IACP,GAEVK,EAAM/J,EACNgK,EAAM/I,IAFN6I,EAAK/J,GAGEqK,KAAKT,IAAUI,EAAIK,KAAKT,KAAWK,EAAII,KAAKT,MACjDD,EAAIC,IAKRI,EAAMhK,GADN+J,EAAK9I,GAEEoJ,KAAKV,IAAMK,EAAIK,KAAKV,KACzBI,EAAKxJ,EACLoJ,EAAIA,EAAEW,QAAQP,EAAG,KAKJ,KAAXD,IACFH,EAAIG,EAAQvE,cAAgBoE,EAAEQ,OAAO,IAGhCR,GAGF,SAAU/B,GACf,OAAOA,EAAMzC,OAAOhE,KAIxBC,EAAK6E,SAASG,iBAAiBhF,EAAKQ,QAAS;;;;IAmB7CR,EAAKqJ,uBAAyB,SAAUC,GACtC,IAAIC,EAAQD,EAAUE,QAAO,SAAUrD,EAAMsD,GAE3C,OADAtD,EAAKsD,GAAYA,EACVtD,IACN,IAEH,OAAO,SAAUK,GACf,GAAIA,GAAS+C,EAAM/C,EAAMrF,cAAgBqF,EAAMrF,WAAY,OAAOqF,IAiBtExG,EAAKO,eAAiBP,EAAKqJ,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,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R,EAAQpS,IAAI4S,IAAQ,GAAI,CAAA1J,SACxC,CACC0J,EAAMkI,EAASV,SACrBhI,EAAQoI,IAAI5H,EAAKR,EAAQpS,IAAI4S,IAAQ,IAGzC,OAAOR,IACN,IAAI6H,KAGH,EAAKtW,KAAK+W,UAAUxK,GAG1B,OAAO,EAAIgL,GAAQnU,KAAI,SAAC,G,IAAA,SAAC6L,EAAA,KAAKuI,EAAA,KAAc,OAC1CC,QAAS,EAAG,EAAKpB,UAAUha,IAAI4S,IAC/BuI,SAAUA,EAASpU,KAAI,SAAAsU,GACrB,OAAO,EAAG,EAAKrB,UAAUha,IAAIqb,EAAQzI,aAKzC,MAAO0I,GAEPzX,QAAQH,KAAK,kBAAkBwM,EAAK,iCAKxC,MAAO,IAQF,YAAAlM,SAAP,WACE,OAAOiX,KAAKM,UAAU5X,KAAKgG,QAE/B,EApIA,GD/CO,SAAS6R,EAAQ5X,GACtB,OAAQA,EAAQiT,MAGd,KAAKiD,EAAkB2B,MAErB,OADA,EAAQ,IAAI,EAAY7X,EAAQgX,MACzB,CACL/D,KAAMiD,EAAkB4B,KACxBd,KAAM,EAAM5W,YAIhB,KAAK8V,EAAkB6B,MACrB,MAAO,CACL9E,KAAMiD,EAAkB8B,OACxBhB,KAAM,EAAQ,EAAM5K,OAAOpM,EAAQgX,MAAQ,IAI/C,QACE,MAAM,IAAIpW,UAAU,0BDnC1B,SAAkBsV,GAChB,qBACA,mBACA,qBACA,uBAJF,CAAkBA,MAAiB,KC/BnC,wCA0EA+B,KAAKC,iBAAiB,WAAW,SAAAC,GAC/BF,KAAKG,YAAYR,EAAQO,EAAGnB","file":"worker/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 = 3);\n","/**\n * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8\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.8\"\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().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, undefined or an empty string. This token will not be passed to any downstream pipeline\n * functions and will not be 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 === null || 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 * This is not intended to be used on a TokenSet that\n * contains wildcards, in these cases the results are\n * undefined and are likely to cause an infinite loop.\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","'use strict';\n\nconst matchOperatorsRegex = /[|\\\\{}()[\\]^$+*?.-]/g;\n\nmodule.exports = string => {\n\tif (typeof string !== 'string') {\n\t\tthrow new TypeError('Expected a string');\n\t}\n\n\treturn string.replace(matchOperatorsRegex, '\\\\$&');\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 RTICULAR 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 { SearchIndexOptions, SearchResult } from \"modules\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search message type\n */\nexport const enum SearchMessageType {\n SETUP, /* Search index setup */\n DUMP, /* Search index dump */\n QUERY, /* Search query */\n RESULT /* Search results */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message containing the data necessary to setup the search index\n */\nexport interface SearchSetupMessage {\n type: SearchMessageType.SETUP /* Message type */\n data: SearchIndexOptions /* Message data */\n}\n\n/**\n * A message containing the a dump of the search index\n */\nexport interface SearchDumpMessage {\n type: SearchMessageType.DUMP /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing a search query\n */\nexport interface SearchQueryMessage {\n type: SearchMessageType.QUERY /* Message type */\n data: string /* Message data */\n}\n\n/**\n * A message containing results for a search query\n */\nexport interface SearchResultMessage {\n type: SearchMessageType.RESULT /* Message type */\n data: SearchResult[] /* Message data */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * A message exchanged with the search worker\n */\nexport type SearchMessage =\n | SearchSetupMessage\n | SearchDumpMessage\n | SearchQueryMessage\n | SearchResultMessage\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Type guard for search setup messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchSetupMessage(\n message: SearchMessage\n): message is SearchSetupMessage {\n return message.type === SearchMessageType.SETUP\n}\n\n/**\n * Type guard for search dump messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchDumpMessage(\n message: SearchMessage\n): message is SearchDumpMessage {\n return message.type === SearchMessageType.DUMP\n}\n\n/**\n * Type guard for search query messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchQueryMessage(\n message: SearchMessage\n): message is SearchQueryMessage {\n return message.type === SearchMessageType.QUERY\n}\n\n/**\n * Type guard for search result messages\n *\n * @param message - Search worker message\n *\n * @return Test result\n */\nexport function isSearchResultMessage(\n message: SearchMessage\n): message is SearchResultMessage {\n return message.type === SearchMessageType.RESULT\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 RTICULAR 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 { SearchIndex } from \"modules\"\n\nimport { SearchMessage, SearchMessageType } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Data\n * ------------------------------------------------------------------------- */\n\n/**\n * Search index\n */\nlet index: SearchIndex\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Message handler\n *\n * @param message - Source message\n *\n * @return Target message\n */\nexport function handler(message: SearchMessage): SearchMessage {\n switch (message.type) {\n\n /* Setup search index */\n case SearchMessageType.SETUP:\n index = new SearchIndex(message.data)\n return {\n type: SearchMessageType.DUMP,\n data: index.toString()\n }\n\n /* Query search index */\n case SearchMessageType.QUERY:\n return {\n type: SearchMessageType.RESULT,\n data: index ? index.search(message.data) : []\n }\n\n /* All other messages */\n default:\n throw new TypeError(\"Invalid message type\")\n }\n}\n\n/* ----------------------------------------------------------------------------\n * Worker\n * ------------------------------------------------------------------------- */\n\nself.addEventListener(\"message\", ev => {\n self.postMessage(handler(ev.data))\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 lunr from \"lunr\"\n\nimport {\n ArticleDocument,\n SearchDocumentMap,\n SectionDocument,\n setupSearchDocumentMap\n} from \"../document\"\nimport {\n SearchHighlightFactoryFn,\n setupSearchHighlighter\n} from \"../highlight\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search index configuration\n */\nexport interface SearchIndexConfig {\n lang: string[] /* Search languages */\n separator: string /* Search separator */\n}\n\n/**\n * Search index document\n */\nexport interface SearchIndexDocument {\n location: string /* Document location */\n title: string /* Document title */\n text: string /* Document text */\n}\n\n/**\n * Search index pipeline\n */\nexport interface SearchIndexPipeline {\n trimmer: boolean /* Add trimmer to pipeline */\n stopwords: boolean /* Add stopword filter to pipeline */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Search index options\n *\n * This interfaces describes the format of the `search_index.json` file which\n * is automatically built by the MkDocs search plugin.\n */\nexport interface SearchIndexOptions {\n config: SearchIndexConfig /* Search index configuration */\n docs: SearchIndexDocument[] /* Search index documents */\n pipeline?: SearchIndexPipeline /* Search index pipeline */\n index?: object | string /* Prebuilt or serialized index */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Search result\n */\nexport interface SearchResult {\n article: ArticleDocument /* Article document */\n sections: SectionDocument[] /* Section documents */\n}\n\n/* ----------------------------------------------------------------------------\n * Class\n * ------------------------------------------------------------------------- */\n\nexport class SearchIndex {\n\n /**\n * Search document mapping\n *\n * A mapping of URLs (including hash fragments) to the actual articles and\n * sections of the documentation. The search document mapping must be created\n * regardless of whether the index was prebuilt or not, as lunr itself will\n * only store the actual index.\n */\n protected documents: SearchDocumentMap\n\n /**\n * Search highlight factory function\n */\n protected highlight: SearchHighlightFactoryFn\n\n /**\n * The lunr search index\n */\n protected index: lunr.Index\n\n /**\n * Create a search index\n *\n * @param options - Options\n */\n public constructor({ config, docs, pipeline, index }: SearchIndexOptions) {\n this.documents = setupSearchDocumentMap(docs)\n this.highlight = setupSearchHighlighter(config)\n\n /* If no index was given, create it */\n if (typeof index === \"undefined\") {\n this.index = lunr(function() {\n pipeline = pipeline || {\n trimmer: true,\n stopwords: true\n }\n\n /* Remove stemmer, as it cripples search experience */\n this.pipeline.reset()\n if (pipeline.trimmer)\n this.pipeline.add(lunr.trimmer)\n if (pipeline.stopwords)\n this.pipeline.add(lunr.stopWordFilter)\n\n /* Setup fields and reference */\n this.field(\"title\", { boost: 10 })\n this.field(\"text\")\n this.ref(\"location\")\n\n /* Index documents */\n for (const doc of docs)\n this.add(doc)\n })\n\n /* Prebuilt or serialized index */\n } else {\n this.index = lunr.Index.load(\n typeof index === \"string\"\n ? JSON.parse(index)\n : index\n )\n }\n }\n\n /**\n * Search for matching documents\n *\n * The search index which MkDocs provides is divided up into articles, which\n * contain the whole content of the individual pages, and sections, which only\n * contain the contents of the subsections obtained by breaking the individual\n * pages up at `h1` ... `h6`. As there may be many sections on different pages\n * with indentical titles (for example within this very project, e.g. \"Usage\"\n * or \"Installation\"), they need to be put into the context of the containing\n * page. For this reason, section results are grouped within their respective\n * articles which are the top-level results that are returned.\n *\n * @param query - Query string\n *\n * @return Search results\n */\n public search(query: string): SearchResult[] {\n if (query) {\n try {\n\n /* Group sections by containing article */\n const groups = this.index.search(query)\n .reduce((results, result) => {\n const document = this.documents.get(result.ref)\n if (typeof document !== \"undefined\") {\n if (\"parent\" in document) {\n const ref = document.parent.location\n results.set(ref, [...results.get(ref) || [], result])\n } else {\n const ref = document.location\n results.set(ref, results.get(ref) || [])\n }\n }\n return results\n }, new Map())\n\n /* Create highlighter for query */\n const fn = this.highlight(query)\n\n /* Map groups to search documents */\n return [...groups].map(([ref, sections]) => ({\n article: fn(this.documents.get(ref) as ArticleDocument),\n sections: sections.map(section => {\n return fn(this.documents.get(section.ref) as SectionDocument)\n })\n }))\n\n /* Log errors to console (for now) */\n } catch (err) {\n // tslint:disable-next-line no-console\n console.warn(`Invalid query: ${query} – see https://bit.ly/2s3ChXG`)\n }\n }\n\n /* Return nothing in case of error or empty query */\n return []\n }\n\n /**\n * Serialize search index\n *\n * @return String representation\n */\n public toString(): string {\n return JSON.stringify(this.index)\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 * as escapeHTML from \"escape-html\"\n\nimport { SearchIndexDocument } from \"../_\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * A top-level article\n */\nexport interface ArticleDocument extends SearchIndexDocument {\n linked: boolean /* Whether the section was linked */\n}\n\n/**\n * A section of an article\n */\nexport interface SectionDocument extends SearchIndexDocument {\n parent: ArticleDocument /* Parent article */\n}\n\n/* ------------------------------------------------------------------------- */\n\n/**\n * Search document\n */\nexport type SearchDocument =\n | ArticleDocument\n | SectionDocument\n\n/**\n * Search document mapping\n */\nexport type SearchDocumentMap = Map\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Create a search document mapping\n *\n * @param docs - Search index documents\n *\n * @return Search document map\n */\nexport function setupSearchDocumentMap(\n docs: SearchIndexDocument[]\n): SearchDocumentMap {\n const documents = 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 parent = documents.get(path) as ArticleDocument\n\n /* Ignore first section, override article */\n if (!parent.linked) {\n parent.title = doc.title\n parent.text = text\n parent.linked = true\n\n /* Add subsequent section */\n } else {\n documents.set(location, { location, title, text, parent })\n }\n\n /* Add article */\n } else {\n documents.set(location, { location, title, text, linked: false })\n }\n }\n return documents\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 escapeRegExp from \"escape-string-regexp\"\n\nimport { SearchIndexConfig } from \"../_\"\nimport { SearchDocument } from \"../document\"\n\n/* ----------------------------------------------------------------------------\n * Types\n * ------------------------------------------------------------------------- */\n\n/**\n * Search highlight function\n *\n * @template T - Search document type\n *\n * @param document - Search document\n *\n * @return Highlighted document\n */\nexport type SearchHighlightFn =\n (document: Readonly) => T\n\n/**\n * Search highlight factory function\n *\n * @param query - Query string\n *\n * @return Search highlight function\n */\nexport type SearchHighlightFactoryFn =\n (query: string) => SearchHighlightFn\n\n/* ----------------------------------------------------------------------------\n * Functions\n * ------------------------------------------------------------------------- */\n\n/**\n * Create a search highlighter\n *\n * @param config - Search index configuration\n *\n * @return Search highlight factory function\n */\nexport function setupSearchHighlighter(\n config: SearchIndexConfig\n): SearchHighlightFactoryFn {\n const separator = new RegExp(config.separator, \"img\")\n const highlight = (_: unknown, data: string, term: string) => {\n return `${data}${term}`\n }\n\n /* Return factory function */\n return (query: string) => {\n query = query\n .replace(/[\\s*+-:~^]+/g, \" \")\n .trim()\n\n /* Create search term match expression */\n const match = new RegExp(`(^|${config.separator})(${\n escapeRegExp(query).replace(separator, \"|\")\n })`, \"img\")\n\n /* Highlight document */\n return document => ({\n ...document,\n title: document.title.replace(match, highlight),\n text: document.text.replace(match, highlight)\n })\n }\n}\n"],"sourceRoot":""} \ No newline at end of file diff --git a/material/assets/stylesheets/application.e194128b.css b/material/assets/stylesheets/application.e194128b.css deleted file mode 100644 index 3371fc09b..000000000 --- a/material/assets/stylesheets/application.e194128b.css +++ /dev/null @@ -1 +0,0 @@ -@charset "UTF-8";html{box-sizing:border-box}*,:after,:before{box-sizing:inherit}html{-webkit-text-size-adjust:none;-moz-text-size-adjust:none;-ms-text-size-adjust:none;text-size-adjust:none}body{margin:0}hr{overflow:visible;box-sizing:content-box}a{-webkit-text-decoration-skip:objects}a,button,input,label{-webkit-tap-highlight-color:transparent}a{color:inherit;text-decoration:none}small,sub,sup{font-size:80%}sub,sup{position:relative;line-height:0;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}img{border-style:none}table{border-collapse:separate;border-spacing:0}td,th{font-weight:400;vertical-align:top}button{margin:0;padding:0;border:0;outline-style:none;background:transparent;font-size:inherit}input{border:0;outline:0}.md-clipboard:before,.md-icon,.md-nav__button,.md-nav__link:after,.md-nav__title:before,.md-search-result__article--document:before,.md-source-file:before,.md-typeset .admonition>.admonition-title:before,.md-typeset .admonition>summary:before,.md-typeset .critic.comment:before,.md-typeset .footnote-backref,.md-typeset .task-list-control .task-list-indicator:before,.md-typeset details>.admonition-title:before,.md-typeset details>summary:before,.md-typeset summary:after{font-family:Material Icons;font-style:normal;font-variant:normal;font-weight:400;line-height:1;text-transform:none;white-space:nowrap;word-wrap:normal;direction:ltr}.md-content__icon,.md-footer-nav__button,.md-header-nav__button,.md-nav__button,.md-nav__title:before,.md-search-result__article--document:before{display:inline-block;margin:.2rem;padding:.4rem;font-size:1.2rem;cursor:pointer}.md-icon--arrow-back:before{content:""}.md-icon--arrow-forward:before{content:""}.md-icon--menu:before{content:""}.md-icon--search:before{content:""}[dir=rtl] .md-icon--arrow-back:before{content:""}[dir=rtl] .md-icon--arrow-forward:before{content:""}body{-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}body,input{color:rgba(0,0,0,.87);-webkit-font-feature-settings:"kern","liga";font-feature-settings:"kern","liga";font-family:Helvetica Neue,Helvetica,Arial,sans-serif}code,kbd,pre{color:rgba(0,0,0,.87);-webkit-font-feature-settings:"kern";font-feature-settings:"kern";font-family:Courier New,Courier,monospace}.md-typeset{font-size:.8rem;line-height:1.6;-webkit-print-color-adjust:exact}.md-typeset blockquote,.md-typeset ol,.md-typeset p,.md-typeset ul{margin:1em 0}.md-typeset h1{margin:0 0 2rem;color:rgba(0,0,0,.54);font-size:1.5625rem;line-height:1.3}.md-typeset h1,.md-typeset h2{font-weight:300;letter-spacing:-.01em}.md-typeset h2{margin:2rem 0 .8rem;font-size:1.25rem;line-height:1.4}.md-typeset h3{margin:1.6rem 0 .8rem;font-size:1rem;font-weight:400;letter-spacing:-.01em;line-height:1.5}.md-typeset h2+h3{margin-top:.8rem}.md-typeset h4{font-size:.8rem}.md-typeset h4,.md-typeset h5,.md-typeset h6{margin:.8rem 0;font-weight:700;letter-spacing:-.01em}.md-typeset h5,.md-typeset h6{color:rgba(0,0,0,.54);font-size:.64rem}.md-typeset h5{text-transform:uppercase}.md-typeset hr{margin:1.5em 0;border-bottom:.05rem dotted rgba(0,0,0,.26)}.md-typeset a{color:#3f51b5;word-break:break-word}.md-typeset a,.md-typeset a:before{transition:color .125s}.md-typeset a:active,.md-typeset a:hover{color:#536dfe}.md-typeset code,.md-typeset pre{background-color:hsla(0,0%,92.5%,.5);color:#37474f;font-size:85%;direction:ltr}.md-typeset code{margin:0 .29412em;padding:.07353em 0;border-radius:.1rem;box-shadow:.29412em 0 0 hsla(0,0%,92.5%,.5),-.29412em 0 0 hsla(0,0%,92.5%,.5);word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone}.md-typeset h1 code,.md-typeset h2 code,.md-typeset h3 code,.md-typeset h4 code,.md-typeset h5 code,.md-typeset h6 code{margin:0;background-color:transparent;box-shadow:none}.md-typeset a>code{margin:inherit;padding:inherit;border-radius:initial;background-color:inherit;color:inherit;box-shadow:none}.md-typeset pre{position:relative;margin:1em 0;border-radius:.1rem;line-height:1.4;-webkit-overflow-scrolling:touch}.md-typeset pre>code{display:block;margin:0;padding:.525rem .6rem;background-color:transparent;font-size:inherit;box-shadow:none;-webkit-box-decoration-break:slice;box-decoration-break:slice;overflow:auto}.md-typeset pre>code::-webkit-scrollbar{width:.2rem;height:.2rem}.md-typeset pre>code::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-typeset pre>code::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-typeset kbd{padding:0 .29412em;border-radius:.15rem;border:.05rem solid #c9c9c9;border-bottom-color:#bcbcbc;background-color:#fcfcfc;color:#555;font-size:85%;box-shadow:0 .05rem 0 #b0b0b0;word-break:break-word}.md-typeset mark{margin:0 .25em;padding:.0625em 0;border-radius:.1rem;background-color:rgba(255,235,59,.5);box-shadow:.25em 0 0 rgba(255,235,59,.5),-.25em 0 0 rgba(255,235,59,.5);word-break:break-word;-webkit-box-decoration-break:clone;box-decoration-break:clone}.md-typeset abbr{border-bottom:.05rem dotted rgba(0,0,0,.54);text-decoration:none;cursor:help}.md-typeset small{opacity:.75}.md-typeset sub,.md-typeset sup{margin-left:.07812em}[dir=rtl] .md-typeset sub,[dir=rtl] .md-typeset sup{margin-right:.07812em;margin-left:0}.md-typeset blockquote{padding-left:.6rem;border-left:.2rem solid rgba(0,0,0,.26);color:rgba(0,0,0,.54)}[dir=rtl] .md-typeset blockquote{padding-right:.6rem;padding-left:0;border-right:.2rem solid rgba(0,0,0,.26);border-left:initial}.md-typeset ul{list-style-type:disc}.md-typeset ol,.md-typeset ul{margin-left:.625em;padding:0}[dir=rtl] .md-typeset ol,[dir=rtl] .md-typeset ul{margin-right:.625em;margin-left:0}.md-typeset ol ol,.md-typeset ul ol{list-style-type:lower-alpha}.md-typeset ol ol ol,.md-typeset ul ol ol{list-style-type:lower-roman}.md-typeset ol li,.md-typeset ul li{margin-bottom:.5em;margin-left:1.25em}[dir=rtl] .md-typeset ol li,[dir=rtl] .md-typeset ul li{margin-right:1.25em;margin-left:0}.md-typeset ol li blockquote,.md-typeset ol li p,.md-typeset ul li blockquote,.md-typeset ul li p{margin:.5em 0}.md-typeset ol li:last-child,.md-typeset ul li:last-child{margin-bottom:0}.md-typeset ol li ol,.md-typeset ol li ul,.md-typeset ul li ol,.md-typeset ul li ul{margin:.5em 0 .5em .625em}[dir=rtl] .md-typeset ol li ol,[dir=rtl] .md-typeset ol li ul,[dir=rtl] .md-typeset ul li ol,[dir=rtl] .md-typeset ul li ul{margin-right:.625em;margin-left:0}.md-typeset dd{margin:1em 0 1em 1.875em}[dir=rtl] .md-typeset dd{margin-right:1.875em;margin-left:0}.md-typeset iframe,.md-typeset img,.md-typeset svg{max-width:100%}.md-typeset table:not([class]){box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);display:inline-block;max-width:100%;border-radius:.1rem;font-size:.64rem;overflow:auto;-webkit-overflow-scrolling:touch}.md-typeset table:not([class])+*{margin-top:1.5em}.md-typeset table:not([class]) td:not([align]),.md-typeset table:not([class]) th:not([align]){text-align:left}[dir=rtl] .md-typeset table:not([class]) td:not([align]),[dir=rtl] .md-typeset table:not([class]) th:not([align]){text-align:right}.md-typeset table:not([class]) th{min-width:5rem;padding:.6rem .8rem;background-color:rgba(0,0,0,.54);color:#fff;vertical-align:top}.md-typeset table:not([class]) td{padding:.6rem .8rem;border-top:.05rem solid rgba(0,0,0,.07);vertical-align:top}.md-typeset table:not([class]) tr{transition:background-color .125s}.md-typeset table:not([class]) tr:hover{background-color:rgba(0,0,0,.035);box-shadow:inset 0 .05rem 0 #fff}.md-typeset table:not([class]) tr:first-child td{border-top:0}.md-typeset table:not([class]) a{word-break:normal}.md-typeset__scrollwrap{margin:1em -.8rem;overflow-x:auto;-webkit-overflow-scrolling:touch}.md-typeset .md-typeset__table{display:inline-block;margin-bottom:.5em;padding:0 .8rem}.md-typeset .md-typeset__table table{display:table;width:100%;margin:0;overflow:hidden}html{font-size:125%;overflow-x:hidden}body,html{height:100%}body{position:relative;font-size:.5rem}hr{display:block;height:.05rem;padding:0;border:0}.md-svg{display:none}.md-grid{max-width:61rem;margin-right:auto;margin-left:auto}.md-container,.md-main{overflow:auto}.md-container{display:table;width:100%;height:100%;padding-top:2.4rem;table-layout:fixed}.md-main{display:table-row;height:100%}.md-main__inner{height:100%;padding-top:1.5rem;padding-bottom:.05rem}.md-toggle{display:none}.md-overlay{position:fixed;top:0;width:0;height:0;transition:width 0s .25s,height 0s .25s,opacity .25s;background-color:rgba(0,0,0,.54);opacity:0;z-index:3}.md-flex{display:table}.md-flex__cell{display:table-cell;position:relative;vertical-align:top}.md-flex__cell--shrink{width:0}.md-flex__cell--stretch{display:table;width:100%;table-layout:fixed}.md-flex__ellipsis{display:table-cell;text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-skip{position:fixed;width:.05rem;height:.05rem;margin:.5rem;padding:.3rem .5rem;-webkit-transform:translateY(.4rem);transform:translateY(.4rem);border-radius:.1rem;background-color:rgba(0,0,0,.87);color:#fff;font-size:.64rem;opacity:0;overflow:hidden}.md-skip:focus{width:auto;height:auto;clip:auto;-webkit-transform:translateX(0);transform:translateX(0);transition:opacity .175s 75ms,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .175s 75ms;transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .175s 75ms,-webkit-transform .25s cubic-bezier(.4,0,.2,1);opacity:1;z-index:10}@page{margin:25mm}.md-clipboard{position:absolute;top:.3rem;right:.3rem;width:1.4rem;height:1.4rem;border-radius:.1rem;font-size:.8rem;cursor:pointer;z-index:1;-webkit-backface-visibility:hidden;backface-visibility:hidden}.md-clipboard:before{transition:color .25s,opacity .25s;color:rgba(0,0,0,.07);content:"\E14D"}.codehilite:hover .md-clipboard:before,.md-typeset .highlight:hover .md-clipboard:before,pre:hover .md-clipboard:before{color:rgba(0,0,0,.54)}.md-clipboard:focus:before,.md-clipboard:hover:before{color:#536dfe}.md-clipboard__message{display:block;position:absolute;top:0;right:1.7rem;padding:.3rem .5rem;-webkit-transform:translateX(.4rem);transform:translateX(.4rem);transition:opacity .175s,-webkit-transform .25s cubic-bezier(.9,.1,.9,0);transition:transform .25s cubic-bezier(.9,.1,.9,0),opacity .175s;transition:transform .25s cubic-bezier(.9,.1,.9,0),opacity .175s,-webkit-transform .25s cubic-bezier(.9,.1,.9,0);border-radius:.1rem;background-color:rgba(0,0,0,.54);color:#fff;font-size:.64rem;white-space:nowrap;opacity:0;pointer-events:none}.md-clipboard__message--active{-webkit-transform:translateX(0);transform:translateX(0);transition:opacity .175s 75ms,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .175s 75ms;transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .175s 75ms,-webkit-transform .25s cubic-bezier(.4,0,.2,1);opacity:1;pointer-events:auto}.md-clipboard__message:before{content:attr(aria-label)}.md-clipboard__message:after{display:block;position:absolute;top:50%;right:-.2rem;width:0;margin-top:-.2rem;border-color:transparent rgba(0,0,0,.54);border-style:solid;border-width:.2rem 0 .2rem .2rem;content:""}.md-content__inner{margin:0 .8rem 1.2rem;padding-top:.6rem}.md-content__inner:before{display:block;height:.4rem;content:""}.md-content__inner>:last-child{margin-bottom:0}.md-content__icon{position:relative;margin:.4rem 0;padding:0;float:right}.md-typeset .md-content__icon{color:rgba(0,0,0,.26)}.md-header{position:fixed;top:0;right:0;left:0;height:2.4rem;transition:background-color .25s,color .25s;background-color:#3f51b5;color:#fff;box-shadow:none;z-index:2;-webkit-backface-visibility:hidden;backface-visibility:hidden}.no-js .md-header{transition:none;box-shadow:none}.md-header[data-md-state=shadow]{transition:background-color .25s,color .25s,box-shadow .25s;box-shadow:0 0 .2rem rgba(0,0,0,.1),0 .2rem .4rem rgba(0,0,0,.2)}.md-header-nav{padding:0 .2rem}.md-header-nav__button{position:relative;transition:opacity .25s;z-index:1}.md-header-nav__button:hover{opacity:.7}.md-header-nav__button.md-logo *{display:block}.no-js .md-header-nav__button.md-icon--search{display:none}.md-header-nav__topic{display:block;position:absolute;transition:opacity .15s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .15s;transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .15s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.md-header-nav__topic+.md-header-nav__topic{-webkit-transform:translateX(1.25rem);transform:translateX(1.25rem);transition:opacity .15s,-webkit-transform .4s cubic-bezier(1,.7,.1,.1);transition:transform .4s cubic-bezier(1,.7,.1,.1),opacity .15s;transition:transform .4s cubic-bezier(1,.7,.1,.1),opacity .15s,-webkit-transform .4s cubic-bezier(1,.7,.1,.1);opacity:0;z-index:-1;pointer-events:none}[dir=rtl] .md-header-nav__topic+.md-header-nav__topic{-webkit-transform:translateX(-1.25rem);transform:translateX(-1.25rem)}.no-js .md-header-nav__topic{position:static}.no-js .md-header-nav__topic+.md-header-nav__topic{display:none}.md-header-nav__title{padding:0 1rem;font-size:.9rem;line-height:2.4rem}.md-header-nav__title[data-md-state=active] .md-header-nav__topic{-webkit-transform:translateX(-1.25rem);transform:translateX(-1.25rem);transition:opacity .15s,-webkit-transform .4s cubic-bezier(1,.7,.1,.1);transition:transform .4s cubic-bezier(1,.7,.1,.1),opacity .15s;transition:transform .4s cubic-bezier(1,.7,.1,.1),opacity .15s,-webkit-transform .4s cubic-bezier(1,.7,.1,.1);opacity:0;z-index:-1;pointer-events:none}[dir=rtl] .md-header-nav__title[data-md-state=active] .md-header-nav__topic{-webkit-transform:translateX(1.25rem);transform:translateX(1.25rem)}.md-header-nav__title[data-md-state=active] .md-header-nav__topic+.md-header-nav__topic{-webkit-transform:translateX(0);transform:translateX(0);transition:opacity .15s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .15s;transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .15s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);opacity:1;z-index:0;pointer-events:auto}.md-header-nav__source{display:none}.md-hero{transition:background .25s;background-color:#3f51b5;color:#fff;font-size:1rem;overflow:hidden}.md-hero__inner{margin-top:1rem;padding:.8rem .8rem .4rem;transition:opacity .25s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .25s;transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .25s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition-delay:.1s}[data-md-state=hidden] .md-hero__inner{pointer-events:none;-webkit-transform:translateY(.625rem);transform:translateY(.625rem);transition:opacity .1s 0s,-webkit-transform 0s .4s;transition:transform 0s .4s,opacity .1s 0s;transition:transform 0s .4s,opacity .1s 0s,-webkit-transform 0s .4s;opacity:0}.md-hero--expand .md-hero__inner{margin-bottom:1.2rem}.md-footer-nav{background-color:rgba(0,0,0,.87);color:#fff}.md-footer-nav__inner{padding:.2rem;overflow:auto}.md-footer-nav__link{padding-top:1.4rem;padding-bottom:.4rem;transition:opacity .25s}.md-footer-nav__link:hover{opacity:.7}.md-footer-nav__link--prev{width:25%;float:left}[dir=rtl] .md-footer-nav__link--prev{float:right}.md-footer-nav__link--next{width:75%;float:right;text-align:right}[dir=rtl] .md-footer-nav__link--next{float:left;text-align:left}.md-footer-nav__button{transition:background .25s}.md-footer-nav__title{position:relative;padding:0 1rem;font-size:.9rem;line-height:2.4rem}.md-footer-nav__direction{position:absolute;right:0;left:0;margin-top:-1rem;padding:0 1rem;color:hsla(0,0%,100%,.7);font-size:.75rem}.md-footer-meta{background-color:rgba(0,0,0,.895)}.md-footer-meta__inner{padding:.2rem;overflow:auto}html .md-footer-meta.md-typeset a{color:hsla(0,0%,100%,.7)}html .md-footer-meta.md-typeset a:focus,html .md-footer-meta.md-typeset a:hover{color:#fff}.md-footer-copyright{margin:0 .6rem;padding:.4rem 0;color:hsla(0,0%,100%,.3);font-size:.64rem}.md-footer-copyright__highlight{color:hsla(0,0%,100%,.7)}.md-footer-social{margin:0 .4rem;padding:.2rem 0 .6rem}.md-footer-social__link{display:inline-block;width:1.6rem;height:1.6rem;font-size:.8rem;text-align:center}.md-footer-social__link:before{line-height:1.9}.md-nav{font-size:.7rem;line-height:1.3}.md-nav__title{display:block;padding:0 .6rem;font-weight:700;text-overflow:ellipsis;overflow:hidden}.md-nav__title:before{display:none;content:"\E5C4"}[dir=rtl] .md-nav__title:before{content:"\E5C8"}.md-nav__title .md-nav__button{display:none}.md-nav__list{margin:0;padding:0;list-style:none}.md-nav__item{padding:0 .6rem}.md-nav__item:last-child{padding-bottom:.6rem}.md-nav__item .md-nav__item{padding-right:0}[dir=rtl] .md-nav__item .md-nav__item{padding-right:.6rem;padding-left:0}.md-nav__item .md-nav__item:last-child{padding-bottom:0}.md-nav__button img{width:100%;height:auto}.md-nav__link{display:block;margin-top:.625em;transition:color .125s;text-overflow:ellipsis;cursor:pointer;overflow:hidden}.md-nav__item--nested>.md-nav__link:after{content:"\E313"}html .md-nav__link[for=__toc],html .md-nav__link[for=__toc]+.md-nav__link:after,html .md-nav__link[for=__toc]~.md-nav{display:none}.md-nav__link[data-md-state=blur]{color:rgba(0,0,0,.54)}.md-nav__link--active,.md-nav__link:active{color:#3f51b5}.md-nav__item--nested>.md-nav__link{color:inherit}.md-nav__link:focus,.md-nav__link:hover{color:#536dfe}.md-nav__source,.no-js .md-search{display:none}.md-search__overlay{opacity:0;z-index:1}.md-search__form{position:relative}.md-search__input{position:relative;padding:0 2.2rem 0 3.6rem;text-overflow:ellipsis;z-index:2}[dir=rtl] .md-search__input{padding:0 3.6rem 0 2.2rem}.md-search__input::-webkit-input-placeholder{transition:color .25s cubic-bezier(.1,.7,.1,1)}.md-search__input:-ms-input-placeholder{transition:color .25s cubic-bezier(.1,.7,.1,1)}.md-search__input::-ms-input-placeholder{transition:color .25s cubic-bezier(.1,.7,.1,1)}.md-search__input::placeholder{transition:color .25s cubic-bezier(.1,.7,.1,1)}.md-search__input::-webkit-input-placeholder,.md-search__input~.md-search__icon{color:rgba(0,0,0,.54)}.md-search__input:-ms-input-placeholder,.md-search__input~.md-search__icon{color:rgba(0,0,0,.54)}.md-search__input::-ms-input-placeholder,.md-search__input~.md-search__icon{color:rgba(0,0,0,.54)}.md-search__input::placeholder,.md-search__input~.md-search__icon{color:rgba(0,0,0,.54)}.md-search__input::-ms-clear{display:none}.md-search__icon{position:absolute;transition:color .25s cubic-bezier(.1,.7,.1,1),opacity .25s;font-size:1.2rem;cursor:pointer;z-index:2}.md-search__icon:hover{opacity:.7}.md-search__icon[for=__search]{top:.3rem;left:.5rem}[dir=rtl] .md-search__icon[for=__search]{right:.5rem;left:auto}.md-search__icon[for=__search]:before{content:"\E8B6"}.md-search__icon[type=reset]{top:.3rem;right:.5rem;-webkit-transform:scale(.125);transform:scale(.125);transition:opacity .15s,-webkit-transform .15s cubic-bezier(.1,.7,.1,1);transition:transform .15s cubic-bezier(.1,.7,.1,1),opacity .15s;transition:transform .15s cubic-bezier(.1,.7,.1,1),opacity .15s,-webkit-transform .15s cubic-bezier(.1,.7,.1,1);opacity:0}[dir=rtl] .md-search__icon[type=reset]{right:auto;left:.5rem}[data-md-toggle=search]:checked~.md-header .md-search__input:valid~.md-search__icon[type=reset]{-webkit-transform:scale(1);transform:scale(1);opacity:1}[data-md-toggle=search]:checked~.md-header .md-search__input:valid~.md-search__icon[type=reset]:hover{opacity:.7}.md-search__output{position:absolute;width:100%;border-radius:0 0 .1rem .1rem;overflow:hidden;z-index:1}.md-search__scrollwrap{height:100%;background-color:#fff;box-shadow:inset 0 .05rem 0 rgba(0,0,0,.07);overflow-y:auto;-webkit-overflow-scrolling:touch}.md-search-result{color:rgba(0,0,0,.87);word-break:break-word}.md-search-result__meta{padding:0 .8rem;background-color:rgba(0,0,0,.07);color:rgba(0,0,0,.54);font-size:.64rem;line-height:1.8rem}.md-search-result__list{margin:0;padding:0;border-top:.05rem solid rgba(0,0,0,.07);list-style:none}.md-search-result__item{box-shadow:0 -.05rem 0 rgba(0,0,0,.07)}.md-search-result__link{display:block;transition:background .25s;outline:0;overflow:hidden}.md-search-result__link:hover,.md-search-result__link[data-md-state=active]{background-color:rgba(83,109,254,.1)}.md-search-result__link:hover .md-search-result__article:before,.md-search-result__link[data-md-state=active] .md-search-result__article:before{opacity:.7}.md-search-result__link:last-child .md-search-result__teaser{margin-bottom:.6rem}.md-search-result__article{position:relative;padding:0 .8rem;overflow:auto}.md-search-result__article--document:before{position:absolute;left:0;margin:.1rem;transition:opacity .25s;color:rgba(0,0,0,.54);content:"\E880"}[dir=rtl] .md-search-result__article--document:before{right:0;left:auto}.md-search-result__article--document .md-search-result__title{margin:.55rem 0;font-size:.8rem;font-weight:400;line-height:1.4}.md-search-result__title{margin:.5em 0;font-size:.64rem;font-weight:700;line-height:1.4}.md-search-result__teaser{display:-webkit-box;max-height:1.65rem;margin:.5em 0;color:rgba(0,0,0,.54);font-size:.64rem;line-height:1.4;text-overflow:ellipsis;overflow:hidden;-webkit-line-clamp:2}.md-search-result em{font-style:normal;font-weight:700;text-decoration:underline}.md-sidebar{position:absolute;width:12.1rem;padding:1.2rem 0;overflow:hidden}.md-sidebar[data-md-state=lock]{position:fixed;top:2.4rem}.md-sidebar--secondary{display:none}.md-sidebar__scrollwrap{max-height:100%;margin:0 .2rem;overflow-y:auto;-webkit-backface-visibility:hidden;backface-visibility:hidden}.md-sidebar__scrollwrap::-webkit-scrollbar{width:.2rem;height:.2rem}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-sidebar__scrollwrap::-webkit-scrollbar-thumb:hover{background-color:#536dfe}@-webkit-keyframes md-source__facts--done{0%{height:0}to{height:.65rem}}@keyframes md-source__facts--done{0%{height:0}to{height:.65rem}}@-webkit-keyframes md-source__fact--done{0%{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}50%{opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}@keyframes md-source__fact--done{0%{-webkit-transform:translateY(100%);transform:translateY(100%);opacity:0}50%{opacity:0}to{-webkit-transform:translateY(0);transform:translateY(0);opacity:1}}.md-source{display:block;padding-right:.6rem;transition:opacity .25s;font-size:.65rem;line-height:1.2;white-space:nowrap}[dir=rtl] .md-source{padding-right:0;padding-left:.6rem}.md-source:hover{opacity:.7}.md-source:after,.md-source__icon{display:inline-block;height:2.4rem;content:"";vertical-align:middle}.md-source__icon{width:2.4rem}.md-source__icon svg{width:1.2rem;height:1.2rem;margin-top:.6rem;margin-left:.6rem}[dir=rtl] .md-source__icon svg{margin-right:.6rem;margin-left:0}.md-source__icon+.md-source__repository{margin-left:-2rem;padding-left:2rem}[dir=rtl] .md-source__icon+.md-source__repository{margin-right:-2rem;margin-left:0;padding-right:2rem;padding-left:0}.md-source__repository{display:inline-block;max-width:100%;margin-left:.6rem;font-weight:700;text-overflow:ellipsis;overflow:hidden;vertical-align:middle}.md-source__facts{margin:0;padding:0;font-size:.55rem;font-weight:700;list-style-type:none;opacity:.75;overflow:hidden}[data-md-state=done] .md-source__facts{-webkit-animation:md-source__facts--done .25s ease-in;animation:md-source__facts--done .25s ease-in}.md-source__fact{float:left}[dir=rtl] .md-source__fact{float:right}[data-md-state=done] .md-source__fact{-webkit-animation:md-source__fact--done .4s ease-out;animation:md-source__fact--done .4s ease-out}.md-source__fact:before{margin:0 .1rem;content:"\00B7"}.md-source__fact:first-child:before{display:none}.md-source-file{display:inline-block;margin:1em .5em 1em 0;padding-right:.25rem;border-radius:.1rem;background-color:rgba(0,0,0,.07);font-size:.64rem;list-style-type:none;cursor:pointer;overflow:hidden}.md-source-file:before{display:inline-block;margin-right:.25rem;padding:.25rem;background-color:rgba(0,0,0,.26);color:#fff;font-size:.8rem;content:"\E86F";vertical-align:middle}html .md-source-file{transition:background .4s,color .4s,box-shadow .4s cubic-bezier(.4,0,.2,1)}html .md-source-file:before{transition:inherit}html body .md-typeset .md-source-file{color:rgba(0,0,0,.54)}.md-source-file:hover{box-shadow:0 0 8px rgba(0,0,0,.18),0 8px 16px rgba(0,0,0,.36)}.md-source-file:hover:before{background-color:#536dfe}.md-tabs{width:100%;transition:background .25s;background-color:#3f51b5;color:#fff;overflow:auto}.md-tabs__list{margin:0 0 0 .2rem;padding:0;list-style:none;white-space:nowrap}.md-tabs__item{display:inline-block;height:2.4rem;padding-right:.6rem;padding-left:.6rem}.md-tabs__link{display:block;margin-top:.8rem;transition:opacity .25s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .25s;transition:transform .4s cubic-bezier(.1,.7,.1,1),opacity .25s,-webkit-transform .4s cubic-bezier(.1,.7,.1,1);font-size:.7rem;opacity:.7}.md-tabs__link--active,.md-tabs__link:hover{color:inherit;opacity:1}.md-tabs__item:nth-child(2) .md-tabs__link{transition-delay:.02s}.md-tabs__item:nth-child(3) .md-tabs__link{transition-delay:.04s}.md-tabs__item:nth-child(4) .md-tabs__link{transition-delay:.06s}.md-tabs__item:nth-child(5) .md-tabs__link{transition-delay:.08s}.md-tabs__item:nth-child(6) .md-tabs__link{transition-delay:.1s}.md-tabs__item:nth-child(7) .md-tabs__link{transition-delay:.12s}.md-tabs__item:nth-child(8) .md-tabs__link{transition-delay:.14s}.md-tabs__item:nth-child(9) .md-tabs__link{transition-delay:.16s}.md-tabs__item:nth-child(10) .md-tabs__link{transition-delay:.18s}.md-tabs__item:nth-child(11) .md-tabs__link{transition-delay:.2s}.md-tabs__item:nth-child(12) .md-tabs__link{transition-delay:.22s}.md-tabs__item:nth-child(13) .md-tabs__link{transition-delay:.24s}.md-tabs__item:nth-child(14) .md-tabs__link{transition-delay:.26s}.md-tabs__item:nth-child(15) .md-tabs__link{transition-delay:.28s}.md-tabs__item:nth-child(16) .md-tabs__link{transition-delay:.3s}.md-tabs[data-md-state=hidden]{pointer-events:none}.md-tabs[data-md-state=hidden] .md-tabs__link{-webkit-transform:translateY(50%);transform:translateY(50%);transition:color .25s,opacity .1s,-webkit-transform 0s .4s;transition:color .25s,transform 0s .4s,opacity .1s;transition:color .25s,transform 0s .4s,opacity .1s,-webkit-transform 0s .4s;opacity:0}.md-typeset .admonition,.md-typeset details{box-shadow:0 2px 2px 0 rgba(0,0,0,.14),0 1px 5px 0 rgba(0,0,0,.12),0 3px 1px -2px rgba(0,0,0,.2);position:relative;margin:1.5625em 0;padding:0 .6rem;border-left:.2rem solid #448aff;border-radius:.1rem;font-size:.64rem;overflow:auto}[dir=rtl] .md-typeset .admonition,[dir=rtl] .md-typeset details{border-right:.2rem solid #448aff;border-left:none}html .md-typeset .admonition>:last-child,html .md-typeset details>:last-child{margin-bottom:.6rem}.md-typeset .admonition .admonition,.md-typeset .admonition details,.md-typeset details .admonition,.md-typeset details details{margin:1em 0}.md-typeset .admonition>.admonition-title,.md-typeset .admonition>summary,.md-typeset details>.admonition-title,.md-typeset details>summary{margin:0 -.6rem;padding:.4rem .6rem .4rem 2rem;border-bottom:.05rem solid rgba(68,138,255,.1);background-color:rgba(68,138,255,.1);font-weight:700}[dir=rtl] .md-typeset .admonition>.admonition-title,[dir=rtl] .md-typeset .admonition>summary,[dir=rtl] .md-typeset details>.admonition-title,[dir=rtl] .md-typeset details>summary{padding:.4rem 2rem .4rem .6rem}.md-typeset .admonition>.admonition-title:last-child,.md-typeset .admonition>summary:last-child,.md-typeset details>.admonition-title:last-child,.md-typeset details>summary:last-child{margin-bottom:0}.md-typeset .admonition>.admonition-title:before,.md-typeset .admonition>summary:before,.md-typeset details>.admonition-title:before,.md-typeset details>summary:before{position:absolute;left:.6rem;color:#448aff;font-size:1rem;content:"\E3C9"}[dir=rtl] .md-typeset .admonition>.admonition-title:before,[dir=rtl] .md-typeset .admonition>summary:before,[dir=rtl] .md-typeset details>.admonition-title:before,[dir=rtl] .md-typeset details>summary:before{right:.6rem;left:auto}.md-typeset .admonition.abstract,.md-typeset .admonition.summary,.md-typeset .admonition.tldr,.md-typeset details.abstract,.md-typeset details.summary,.md-typeset details.tldr{border-left-color:#00b0ff}[dir=rtl] .md-typeset .admonition.abstract,[dir=rtl] .md-typeset .admonition.summary,[dir=rtl] .md-typeset .admonition.tldr,[dir=rtl] .md-typeset details.abstract,[dir=rtl] .md-typeset details.summary,[dir=rtl] .md-typeset details.tldr{border-right-color:#00b0ff}.md-typeset .admonition.abstract>.admonition-title,.md-typeset .admonition.abstract>summary,.md-typeset .admonition.summary>.admonition-title,.md-typeset .admonition.summary>summary,.md-typeset .admonition.tldr>.admonition-title,.md-typeset .admonition.tldr>summary,.md-typeset details.abstract>.admonition-title,.md-typeset details.abstract>summary,.md-typeset details.summary>.admonition-title,.md-typeset details.summary>summary,.md-typeset details.tldr>.admonition-title,.md-typeset details.tldr>summary{border-bottom-color:rgba(0,176,255,.1);background-color:rgba(0,176,255,.1)}.md-typeset .admonition.abstract>.admonition-title:before,.md-typeset .admonition.abstract>summary:before,.md-typeset .admonition.summary>.admonition-title:before,.md-typeset .admonition.summary>summary:before,.md-typeset .admonition.tldr>.admonition-title:before,.md-typeset .admonition.tldr>summary:before,.md-typeset details.abstract>.admonition-title:before,.md-typeset details.abstract>summary:before,.md-typeset details.summary>.admonition-title:before,.md-typeset details.summary>summary:before,.md-typeset details.tldr>.admonition-title:before,.md-typeset details.tldr>summary:before{color:#00b0ff;content:""}.md-typeset .admonition.info,.md-typeset .admonition.todo,.md-typeset details.info,.md-typeset details.todo{border-left-color:#00b8d4}[dir=rtl] .md-typeset .admonition.info,[dir=rtl] .md-typeset .admonition.todo,[dir=rtl] .md-typeset details.info,[dir=rtl] .md-typeset details.todo{border-right-color:#00b8d4}.md-typeset .admonition.info>.admonition-title,.md-typeset .admonition.info>summary,.md-typeset .admonition.todo>.admonition-title,.md-typeset .admonition.todo>summary,.md-typeset details.info>.admonition-title,.md-typeset details.info>summary,.md-typeset details.todo>.admonition-title,.md-typeset details.todo>summary{border-bottom-color:rgba(0,184,212,.1);background-color:rgba(0,184,212,.1)}.md-typeset .admonition.info>.admonition-title:before,.md-typeset .admonition.info>summary:before,.md-typeset .admonition.todo>.admonition-title:before,.md-typeset .admonition.todo>summary:before,.md-typeset details.info>.admonition-title:before,.md-typeset details.info>summary:before,.md-typeset details.todo>.admonition-title:before,.md-typeset details.todo>summary:before{color:#00b8d4;content:""}.md-typeset .admonition.hint,.md-typeset .admonition.important,.md-typeset .admonition.tip,.md-typeset details.hint,.md-typeset details.important,.md-typeset details.tip{border-left-color:#00bfa5}[dir=rtl] .md-typeset .admonition.hint,[dir=rtl] .md-typeset .admonition.important,[dir=rtl] .md-typeset .admonition.tip,[dir=rtl] .md-typeset details.hint,[dir=rtl] .md-typeset details.important,[dir=rtl] .md-typeset details.tip{border-right-color:#00bfa5}.md-typeset .admonition.hint>.admonition-title,.md-typeset .admonition.hint>summary,.md-typeset .admonition.important>.admonition-title,.md-typeset .admonition.important>summary,.md-typeset .admonition.tip>.admonition-title,.md-typeset .admonition.tip>summary,.md-typeset details.hint>.admonition-title,.md-typeset details.hint>summary,.md-typeset details.important>.admonition-title,.md-typeset details.important>summary,.md-typeset details.tip>.admonition-title,.md-typeset details.tip>summary{border-bottom-color:rgba(0,191,165,.1);background-color:rgba(0,191,165,.1)}.md-typeset .admonition.hint>.admonition-title:before,.md-typeset .admonition.hint>summary:before,.md-typeset .admonition.important>.admonition-title:before,.md-typeset .admonition.important>summary:before,.md-typeset .admonition.tip>.admonition-title:before,.md-typeset .admonition.tip>summary:before,.md-typeset details.hint>.admonition-title:before,.md-typeset details.hint>summary:before,.md-typeset details.important>.admonition-title:before,.md-typeset details.important>summary:before,.md-typeset details.tip>.admonition-title:before,.md-typeset details.tip>summary:before{color:#00bfa5;content:""}.md-typeset .admonition.check,.md-typeset .admonition.done,.md-typeset .admonition.success,.md-typeset details.check,.md-typeset details.done,.md-typeset details.success{border-left-color:#00c853}[dir=rtl] .md-typeset .admonition.check,[dir=rtl] .md-typeset .admonition.done,[dir=rtl] .md-typeset .admonition.success,[dir=rtl] .md-typeset details.check,[dir=rtl] .md-typeset details.done,[dir=rtl] .md-typeset details.success{border-right-color:#00c853}.md-typeset .admonition.check>.admonition-title,.md-typeset .admonition.check>summary,.md-typeset .admonition.done>.admonition-title,.md-typeset .admonition.done>summary,.md-typeset .admonition.success>.admonition-title,.md-typeset .admonition.success>summary,.md-typeset details.check>.admonition-title,.md-typeset details.check>summary,.md-typeset details.done>.admonition-title,.md-typeset details.done>summary,.md-typeset details.success>.admonition-title,.md-typeset details.success>summary{border-bottom-color:rgba(0,200,83,.1);background-color:rgba(0,200,83,.1)}.md-typeset .admonition.check>.admonition-title:before,.md-typeset .admonition.check>summary:before,.md-typeset .admonition.done>.admonition-title:before,.md-typeset .admonition.done>summary:before,.md-typeset .admonition.success>.admonition-title:before,.md-typeset .admonition.success>summary:before,.md-typeset details.check>.admonition-title:before,.md-typeset details.check>summary:before,.md-typeset details.done>.admonition-title:before,.md-typeset details.done>summary:before,.md-typeset details.success>.admonition-title:before,.md-typeset details.success>summary:before{color:#00c853;content:""}.md-typeset .admonition.faq,.md-typeset .admonition.help,.md-typeset .admonition.question,.md-typeset details.faq,.md-typeset details.help,.md-typeset details.question{border-left-color:#64dd17}[dir=rtl] .md-typeset .admonition.faq,[dir=rtl] .md-typeset .admonition.help,[dir=rtl] .md-typeset .admonition.question,[dir=rtl] .md-typeset details.faq,[dir=rtl] .md-typeset details.help,[dir=rtl] .md-typeset details.question{border-right-color:#64dd17}.md-typeset .admonition.faq>.admonition-title,.md-typeset .admonition.faq>summary,.md-typeset .admonition.help>.admonition-title,.md-typeset .admonition.help>summary,.md-typeset .admonition.question>.admonition-title,.md-typeset .admonition.question>summary,.md-typeset details.faq>.admonition-title,.md-typeset details.faq>summary,.md-typeset details.help>.admonition-title,.md-typeset details.help>summary,.md-typeset details.question>.admonition-title,.md-typeset details.question>summary{border-bottom-color:rgba(100,221,23,.1);background-color:rgba(100,221,23,.1)}.md-typeset .admonition.faq>.admonition-title:before,.md-typeset .admonition.faq>summary:before,.md-typeset .admonition.help>.admonition-title:before,.md-typeset .admonition.help>summary:before,.md-typeset .admonition.question>.admonition-title:before,.md-typeset .admonition.question>summary:before,.md-typeset details.faq>.admonition-title:before,.md-typeset details.faq>summary:before,.md-typeset details.help>.admonition-title:before,.md-typeset details.help>summary:before,.md-typeset details.question>.admonition-title:before,.md-typeset details.question>summary:before{color:#64dd17;content:""}.md-typeset .admonition.attention,.md-typeset .admonition.caution,.md-typeset .admonition.warning,.md-typeset details.attention,.md-typeset details.caution,.md-typeset details.warning{border-left-color:#ff9100}[dir=rtl] .md-typeset .admonition.attention,[dir=rtl] .md-typeset .admonition.caution,[dir=rtl] .md-typeset .admonition.warning,[dir=rtl] .md-typeset details.attention,[dir=rtl] .md-typeset details.caution,[dir=rtl] .md-typeset details.warning{border-right-color:#ff9100}.md-typeset .admonition.attention>.admonition-title,.md-typeset .admonition.attention>summary,.md-typeset .admonition.caution>.admonition-title,.md-typeset .admonition.caution>summary,.md-typeset .admonition.warning>.admonition-title,.md-typeset .admonition.warning>summary,.md-typeset details.attention>.admonition-title,.md-typeset details.attention>summary,.md-typeset details.caution>.admonition-title,.md-typeset details.caution>summary,.md-typeset details.warning>.admonition-title,.md-typeset details.warning>summary{border-bottom-color:rgba(255,145,0,.1);background-color:rgba(255,145,0,.1)}.md-typeset .admonition.attention>.admonition-title:before,.md-typeset .admonition.attention>summary:before,.md-typeset .admonition.caution>.admonition-title:before,.md-typeset .admonition.caution>summary:before,.md-typeset .admonition.warning>.admonition-title:before,.md-typeset .admonition.warning>summary:before,.md-typeset details.attention>.admonition-title:before,.md-typeset details.attention>summary:before,.md-typeset details.caution>.admonition-title:before,.md-typeset details.caution>summary:before,.md-typeset details.warning>.admonition-title:before,.md-typeset details.warning>summary:before{color:#ff9100;content:""}.md-typeset .admonition.fail,.md-typeset .admonition.failure,.md-typeset .admonition.missing,.md-typeset details.fail,.md-typeset details.failure,.md-typeset details.missing{border-left-color:#ff5252}[dir=rtl] .md-typeset .admonition.fail,[dir=rtl] .md-typeset .admonition.failure,[dir=rtl] .md-typeset .admonition.missing,[dir=rtl] .md-typeset details.fail,[dir=rtl] .md-typeset details.failure,[dir=rtl] .md-typeset details.missing{border-right-color:#ff5252}.md-typeset .admonition.fail>.admonition-title,.md-typeset .admonition.fail>summary,.md-typeset .admonition.failure>.admonition-title,.md-typeset .admonition.failure>summary,.md-typeset .admonition.missing>.admonition-title,.md-typeset .admonition.missing>summary,.md-typeset details.fail>.admonition-title,.md-typeset details.fail>summary,.md-typeset details.failure>.admonition-title,.md-typeset details.failure>summary,.md-typeset details.missing>.admonition-title,.md-typeset details.missing>summary{border-bottom-color:rgba(255,82,82,.1);background-color:rgba(255,82,82,.1)}.md-typeset .admonition.fail>.admonition-title:before,.md-typeset .admonition.fail>summary:before,.md-typeset .admonition.failure>.admonition-title:before,.md-typeset .admonition.failure>summary:before,.md-typeset .admonition.missing>.admonition-title:before,.md-typeset .admonition.missing>summary:before,.md-typeset details.fail>.admonition-title:before,.md-typeset details.fail>summary:before,.md-typeset details.failure>.admonition-title:before,.md-typeset details.failure>summary:before,.md-typeset details.missing>.admonition-title:before,.md-typeset details.missing>summary:before{color:#ff5252;content:""}.md-typeset .admonition.danger,.md-typeset .admonition.error,.md-typeset details.danger,.md-typeset details.error{border-left-color:#ff1744}[dir=rtl] .md-typeset .admonition.danger,[dir=rtl] .md-typeset .admonition.error,[dir=rtl] .md-typeset details.danger,[dir=rtl] .md-typeset details.error{border-right-color:#ff1744}.md-typeset .admonition.danger>.admonition-title,.md-typeset .admonition.danger>summary,.md-typeset .admonition.error>.admonition-title,.md-typeset .admonition.error>summary,.md-typeset details.danger>.admonition-title,.md-typeset details.danger>summary,.md-typeset details.error>.admonition-title,.md-typeset details.error>summary{border-bottom-color:rgba(255,23,68,.1);background-color:rgba(255,23,68,.1)}.md-typeset .admonition.danger>.admonition-title:before,.md-typeset .admonition.danger>summary:before,.md-typeset .admonition.error>.admonition-title:before,.md-typeset .admonition.error>summary:before,.md-typeset details.danger>.admonition-title:before,.md-typeset details.danger>summary:before,.md-typeset details.error>.admonition-title:before,.md-typeset details.error>summary:before{color:#ff1744;content:""}.md-typeset .admonition.bug,.md-typeset details.bug{border-left-color:#f50057}[dir=rtl] .md-typeset .admonition.bug,[dir=rtl] .md-typeset details.bug{border-right-color:#f50057}.md-typeset .admonition.bug>.admonition-title,.md-typeset .admonition.bug>summary,.md-typeset details.bug>.admonition-title,.md-typeset details.bug>summary{border-bottom-color:rgba(245,0,87,.1);background-color:rgba(245,0,87,.1)}.md-typeset .admonition.bug>.admonition-title:before,.md-typeset .admonition.bug>summary:before,.md-typeset details.bug>.admonition-title:before,.md-typeset details.bug>summary:before{color:#f50057;content:""}.md-typeset .admonition.example,.md-typeset details.example{border-left-color:#651fff}[dir=rtl] .md-typeset .admonition.example,[dir=rtl] .md-typeset details.example{border-right-color:#651fff}.md-typeset .admonition.example>.admonition-title,.md-typeset .admonition.example>summary,.md-typeset details.example>.admonition-title,.md-typeset details.example>summary{border-bottom-color:rgba(101,31,255,.1);background-color:rgba(101,31,255,.1)}.md-typeset .admonition.example>.admonition-title:before,.md-typeset .admonition.example>summary:before,.md-typeset details.example>.admonition-title:before,.md-typeset details.example>summary:before{color:#651fff;content:""}.md-typeset .admonition.cite,.md-typeset .admonition.quote,.md-typeset details.cite,.md-typeset details.quote{border-left-color:#9e9e9e}[dir=rtl] .md-typeset .admonition.cite,[dir=rtl] .md-typeset .admonition.quote,[dir=rtl] .md-typeset details.cite,[dir=rtl] .md-typeset details.quote{border-right-color:#9e9e9e}.md-typeset .admonition.cite>.admonition-title,.md-typeset .admonition.cite>summary,.md-typeset .admonition.quote>.admonition-title,.md-typeset .admonition.quote>summary,.md-typeset details.cite>.admonition-title,.md-typeset details.cite>summary,.md-typeset details.quote>.admonition-title,.md-typeset details.quote>summary{border-bottom-color:hsla(0,0%,62%,.1);background-color:hsla(0,0%,62%,.1)}.md-typeset .admonition.cite>.admonition-title:before,.md-typeset .admonition.cite>summary:before,.md-typeset .admonition.quote>.admonition-title:before,.md-typeset .admonition.quote>summary:before,.md-typeset details.cite>.admonition-title:before,.md-typeset details.cite>summary:before,.md-typeset details.quote>.admonition-title:before,.md-typeset details.quote>summary:before{color:#9e9e9e;content:""}.codehilite .o,.codehilite .ow,.md-typeset .highlight .o,.md-typeset .highlight .ow{color:inherit}.codehilite .ge,.md-typeset .highlight .ge{color:#000}.codehilite .gr,.md-typeset .highlight .gr{color:#a00}.codehilite .gh,.md-typeset .highlight .gh{color:#999}.codehilite .go,.md-typeset .highlight .go{color:#888}.codehilite .gp,.md-typeset .highlight .gp{color:#555}.codehilite .gs,.md-typeset .highlight .gs{color:inherit}.codehilite .gu,.md-typeset .highlight .gu{color:#aaa}.codehilite .gt,.md-typeset .highlight .gt{color:#a00}.codehilite .gd,.md-typeset .highlight .gd{background-color:#fdd}.codehilite .gi,.md-typeset .highlight .gi{background-color:#dfd}.codehilite .k,.md-typeset .highlight .k{color:#3b78e7}.codehilite .kc,.md-typeset .highlight .kc{color:#a71d5d}.codehilite .kd,.codehilite .kn,.md-typeset .highlight .kd,.md-typeset .highlight .kn{color:#3b78e7}.codehilite .kp,.md-typeset .highlight .kp{color:#a71d5d}.codehilite .kr,.codehilite .kt,.md-typeset .highlight .kr,.md-typeset .highlight .kt{color:#3e61a2}.codehilite .c,.codehilite .cm,.md-typeset .highlight .c,.md-typeset .highlight .cm{color:#999}.codehilite .cp,.md-typeset .highlight .cp{color:#666}.codehilite .c1,.codehilite .ch,.codehilite .cs,.md-typeset .highlight .c1,.md-typeset .highlight .ch,.md-typeset .highlight .cs{color:#999}.codehilite .na,.codehilite .nb,.md-typeset .highlight .na,.md-typeset .highlight .nb{color:#c2185b}.codehilite .bp,.md-typeset .highlight .bp{color:#3e61a2}.codehilite .nc,.md-typeset .highlight .nc{color:#c2185b}.codehilite .no,.md-typeset .highlight .no{color:#3e61a2}.codehilite .nd,.codehilite .ni,.md-typeset .highlight .nd,.md-typeset .highlight .ni{color:#666}.codehilite .ne,.codehilite .nf,.md-typeset .highlight .ne,.md-typeset .highlight .nf{color:#c2185b}.codehilite .nl,.md-typeset .highlight .nl{color:#3b5179}.codehilite .nn,.md-typeset .highlight .nn{color:#ec407a}.codehilite .nt,.md-typeset .highlight .nt{color:#3b78e7}.codehilite .nv,.codehilite .vc,.codehilite .vg,.codehilite .vi,.md-typeset .highlight .nv,.md-typeset .highlight .vc,.md-typeset .highlight .vg,.md-typeset .highlight .vi{color:#3e61a2}.codehilite .nx,.md-typeset .highlight .nx{color:#ec407a}.codehilite .il,.codehilite .m,.codehilite .mf,.codehilite .mh,.codehilite .mi,.codehilite .mo,.md-typeset .highlight .il,.md-typeset .highlight .m,.md-typeset .highlight .mf,.md-typeset .highlight .mh,.md-typeset .highlight .mi,.md-typeset .highlight .mo{color:#e74c3c}.codehilite .s,.codehilite .sb,.codehilite .sc,.md-typeset .highlight .s,.md-typeset .highlight .sb,.md-typeset .highlight .sc{color:#0d904f}.codehilite .sd,.md-typeset .highlight .sd{color:#999}.codehilite .s2,.md-typeset .highlight .s2{color:#0d904f}.codehilite .se,.codehilite .sh,.codehilite .si,.codehilite .sx,.md-typeset .highlight .se,.md-typeset .highlight .sh,.md-typeset .highlight .si,.md-typeset .highlight .sx{color:#183691}.codehilite .sr,.md-typeset .highlight .sr{color:#009926}.codehilite .s1,.codehilite .ss,.md-typeset .highlight .s1,.md-typeset .highlight .ss{color:#0d904f}.codehilite .err,.md-typeset .highlight .err{color:#a61717}.codehilite .w,.md-typeset .highlight .w{color:transparent}.codehilite .hll,.md-typeset .highlight .hll{display:block;margin:0 -.6rem;padding:0 .6rem;background-color:rgba(255,235,59,.5)}.md-typeset .codehilite,.md-typeset .highlight{position:relative;margin:1em 0;padding:0;border-radius:.1rem;background-color:hsla(0,0%,92.5%,.5);color:#37474f;line-height:1.4;-webkit-overflow-scrolling:touch}.md-typeset .codehilite code,.md-typeset .codehilite pre,.md-typeset .highlight code,.md-typeset .highlight pre{display:block;margin:0;padding:.525rem .6rem;background-color:transparent;overflow:auto;vertical-align:top}.md-typeset .codehilite code::-webkit-scrollbar,.md-typeset .codehilite pre::-webkit-scrollbar,.md-typeset .highlight code::-webkit-scrollbar,.md-typeset .highlight pre::-webkit-scrollbar{width:.2rem;height:.2rem}.md-typeset .codehilite code::-webkit-scrollbar-thumb,.md-typeset .codehilite pre::-webkit-scrollbar-thumb,.md-typeset .highlight code::-webkit-scrollbar-thumb,.md-typeset .highlight pre::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-typeset .codehilite code::-webkit-scrollbar-thumb:hover,.md-typeset .codehilite pre::-webkit-scrollbar-thumb:hover,.md-typeset .highlight code::-webkit-scrollbar-thumb:hover,.md-typeset .highlight pre::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-typeset pre.codehilite,.md-typeset pre.highlight{overflow:visible}.md-typeset pre.codehilite code,.md-typeset pre.highlight code{display:block;padding:.525rem .6rem;overflow:auto}.md-typeset .codehilitetable,.md-typeset .highlighttable{display:block;margin:1em 0;border-radius:.2em;font-size:.8rem;overflow:hidden}.md-typeset .codehilitetable tbody,.md-typeset .codehilitetable td,.md-typeset .highlighttable tbody,.md-typeset .highlighttable td{display:block;padding:0}.md-typeset .codehilitetable tr,.md-typeset .highlighttable tr{display:flex}.md-typeset .codehilitetable .codehilite,.md-typeset .codehilitetable .highlight,.md-typeset .codehilitetable .linenodiv,.md-typeset .highlighttable .codehilite,.md-typeset .highlighttable .highlight,.md-typeset .highlighttable .linenodiv{margin:0;border-radius:0}.md-typeset .codehilitetable .linenodiv,.md-typeset .highlighttable .linenodiv{padding:.525rem .6rem}.md-typeset .codehilitetable .linenos,.md-typeset .highlighttable .linenos{background-color:rgba(0,0,0,.07);color:rgba(0,0,0,.26);-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none}.md-typeset .codehilitetable .linenos pre,.md-typeset .highlighttable .linenos pre{margin:0;padding:0;background-color:transparent;color:inherit;text-align:right}.md-typeset .codehilitetable .code,.md-typeset .highlighttable .code{flex:1;overflow:hidden}.md-typeset>.codehilitetable,.md-typeset>.highlighttable{box-shadow:none}.md-typeset [id^="fnref:"]{display:inline-block}.md-typeset [id^="fnref:"]:target{margin-top:-3.8rem;padding-top:3.8rem;pointer-events:none}.md-typeset [id^="fn:"]:before{display:none;height:0;content:""}.md-typeset [id^="fn:"]:target:before{display:block;margin-top:-3.5rem;padding-top:3.5rem;pointer-events:none}.md-typeset .footnote{color:rgba(0,0,0,.54);font-size:.64rem}.md-typeset .footnote ol{margin-left:0}.md-typeset .footnote li{transition:color .25s}.md-typeset .footnote li:target{color:rgba(0,0,0,.87)}.md-typeset .footnote li :first-child{margin-top:0}.md-typeset .footnote li:hover .footnote-backref,.md-typeset .footnote li:target .footnote-backref{-webkit-transform:translateX(0);transform:translateX(0);opacity:1}.md-typeset .footnote li:hover .footnote-backref:hover,.md-typeset .footnote li:target .footnote-backref{color:#536dfe}.md-typeset .footnote-ref{display:inline-block;pointer-events:auto}.md-typeset .footnote-ref:before{display:inline;margin:0 .2em;border-left:.05rem solid rgba(0,0,0,.26);font-size:1.25em;content:"";vertical-align:-.25rem}.md-typeset .footnote-backref{display:inline-block;-webkit-transform:translateX(.25rem);transform:translateX(.25rem);transition:color .25s,opacity .125s .125s,-webkit-transform .25s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s;transition:transform .25s .125s,color .25s,opacity .125s .125s,-webkit-transform .25s .125s;color:rgba(0,0,0,.26);font-size:0;opacity:0;vertical-align:text-bottom}[dir=rtl] .md-typeset .footnote-backref{-webkit-transform:translateX(-.25rem);transform:translateX(-.25rem)}.md-typeset .footnote-backref:before{display:inline-block;font-size:.8rem;content:"\E31B"}[dir=rtl] .md-typeset .footnote-backref:before{-webkit-transform:scaleX(-1);transform:scaleX(-1)}.md-typeset .headerlink{display:inline-block;margin-left:.5rem;-webkit-transform:translateY(.25rem);transform:translateY(.25rem);transition:color .25s,opacity .125s .25s,-webkit-transform .25s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s;transition:transform .25s .25s,color .25s,opacity .125s .25s,-webkit-transform .25s .25s;opacity:0}[dir=rtl] .md-typeset .headerlink{margin-right:.5rem;margin-left:0}html body .md-typeset .headerlink{color:rgba(0,0,0,.26)}.md-typeset h1[id]:before{display:block;margin-top:-9px;padding-top:9px;content:""}.md-typeset h1[id]:target:before{margin-top:-3.45rem;padding-top:3.45rem}.md-typeset h1[id] .headerlink:focus,.md-typeset h1[id]:hover .headerlink,.md-typeset h1[id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset h1[id] .headerlink:focus,.md-typeset h1[id]:hover .headerlink:hover,.md-typeset h1[id]:target .headerlink{color:#536dfe}.md-typeset h2[id]:before{display:block;margin-top:-8px;padding-top:8px;content:""}.md-typeset h2[id]:target:before{margin-top:-3.4rem;padding-top:3.4rem}.md-typeset h2[id] .headerlink:focus,.md-typeset h2[id]:hover .headerlink,.md-typeset h2[id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset h2[id] .headerlink:focus,.md-typeset h2[id]:hover .headerlink:hover,.md-typeset h2[id]:target .headerlink{color:#536dfe}.md-typeset h3[id]:before{display:block;margin-top:-9px;padding-top:9px;content:""}.md-typeset h3[id]:target:before{margin-top:-3.45rem;padding-top:3.45rem}.md-typeset h3[id] .headerlink:focus,.md-typeset h3[id]:hover .headerlink,.md-typeset h3[id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset h3[id] .headerlink:focus,.md-typeset h3[id]:hover .headerlink:hover,.md-typeset h3[id]:target .headerlink{color:#536dfe}.md-typeset h4[id]:before{display:block;margin-top:-9px;padding-top:9px;content:""}.md-typeset h4[id]:target:before{margin-top:-3.45rem;padding-top:3.45rem}.md-typeset h4[id] .headerlink:focus,.md-typeset h4[id]:hover .headerlink,.md-typeset h4[id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset h4[id] .headerlink:focus,.md-typeset h4[id]:hover .headerlink:hover,.md-typeset h4[id]:target .headerlink{color:#536dfe}.md-typeset h5[id]:before{display:block;margin-top:-11px;padding-top:11px;content:""}.md-typeset h5[id]:target:before{margin-top:-3.55rem;padding-top:3.55rem}.md-typeset h5[id] .headerlink:focus,.md-typeset h5[id]:hover .headerlink,.md-typeset h5[id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset h5[id] .headerlink:focus,.md-typeset h5[id]:hover .headerlink:hover,.md-typeset h5[id]:target .headerlink{color:#536dfe}.md-typeset h6[id]:before{display:block;margin-top:-11px;padding-top:11px;content:""}.md-typeset h6[id]:target:before{margin-top:-3.55rem;padding-top:3.55rem}.md-typeset h6[id] .headerlink:focus,.md-typeset h6[id]:hover .headerlink,.md-typeset h6[id]:target .headerlink{-webkit-transform:translate(0);transform:translate(0);opacity:1}.md-typeset h6[id] .headerlink:focus,.md-typeset h6[id]:hover .headerlink:hover,.md-typeset h6[id]:target .headerlink{color:#536dfe}.md-typeset .MJXc-display{margin:.75em 0;padding:.75em 0;overflow:auto;-webkit-overflow-scrolling:touch}.md-typeset .MathJax_CHTML{outline:0}.md-typeset .critic.comment,.md-typeset del.critic,.md-typeset ins.critic{margin:0 .25em;padding:.0625em 0;border-radius:.1rem;-webkit-box-decoration-break:clone;box-decoration-break:clone}.md-typeset del.critic{background-color:#fdd;box-shadow:.25em 0 0 #fdd,-.25em 0 0 #fdd}.md-typeset ins.critic{background-color:#dfd;box-shadow:.25em 0 0 #dfd,-.25em 0 0 #dfd}.md-typeset .critic.comment{background-color:hsla(0,0%,92.5%,.5);color:#37474f;box-shadow:.25em 0 0 hsla(0,0%,92.5%,.5),-.25em 0 0 hsla(0,0%,92.5%,.5)}.md-typeset .critic.comment:before{padding-right:.125em;color:rgba(0,0,0,.26);content:"\E0B7";vertical-align:-.125em}.md-typeset .critic.block{display:block;margin:1em 0;padding-right:.8rem;padding-left:.8rem;box-shadow:none}.md-typeset .critic.block :first-child{margin-top:.5em}.md-typeset .critic.block :last-child{margin-bottom:.5em}.md-typeset details{display:block;padding-top:0}.md-typeset details[open]>summary:after{-webkit-transform:rotate(180deg);transform:rotate(180deg)}.md-typeset details:not([open]){padding-bottom:0}.md-typeset details:not([open])>summary{border-bottom:none}.md-typeset details summary{padding-right:2rem}[dir=rtl] .md-typeset details summary{padding-left:2rem}.no-details .md-typeset details:not([open])>*{display:none}.no-details .md-typeset details:not([open]) summary{display:block}.md-typeset summary{display:block;outline:none;cursor:pointer}.md-typeset summary::-webkit-details-marker{display:none}.md-typeset summary:after{position:absolute;top:.4rem;right:.6rem;color:rgba(0,0,0,.26);font-size:1rem;content:"\E313"}[dir=rtl] .md-typeset summary:after{right:auto;left:.6rem}.md-typeset .emojione,.md-typeset .gemoji,.md-typeset .twemoji{width:1rem;vertical-align:text-top}.md-typeset code.codehilite,.md-typeset code.highlight{margin:0 .29412em;padding:.07353em 0}.md-typeset .superfences-content{display:none;order:99;width:100%;background-color:#fff}.md-typeset .superfences-content>*{margin:0;border-radius:0}.md-typeset .superfences-tabs{display:flex;position:relative;flex-wrap:wrap;margin:1em 0;border:.05rem solid rgba(0,0,0,.07);border-radius:.2em}.md-typeset .superfences-tabs>input{display:none}.md-typeset .superfences-tabs>input:checked+label{font-weight:700}.md-typeset .superfences-tabs>input:checked+label+.superfences-content{display:block}.md-typeset .superfences-tabs>label{width:auto;padding:.6rem;transition:color .125s;font-size:.64rem;cursor:pointer}html .md-typeset .superfences-tabs>label:hover{color:#536dfe}.md-typeset .task-list-item{position:relative;list-style-type:none}.md-typeset .task-list-item [type=checkbox]{position:absolute;top:.45em;left:-2em}[dir=rtl] .md-typeset .task-list-item [type=checkbox]{right:-2em;left:auto}.md-typeset .task-list-control .task-list-indicator:before{position:absolute;top:.15em;left:-1.25em;color:rgba(0,0,0,.26);font-size:1.25em;content:"\E835";vertical-align:-.25em}[dir=rtl] .md-typeset .task-list-control .task-list-indicator:before{right:-1.25em;left:auto}.md-typeset .task-list-control [type=checkbox]:checked+.task-list-indicator:before{content:"\E834"}.md-typeset .task-list-control [type=checkbox]{opacity:0;z-index:-1}@media print{.md-typeset a:after{color:rgba(0,0,0,.54);content:" [" attr(href) "]"}.md-typeset code,.md-typeset pre{white-space:pre-wrap}.md-typeset code{box-shadow:none;-webkit-box-decoration-break:initial;box-decoration-break:slice}.md-clipboard,.md-content__icon,.md-footer,.md-header,.md-sidebar,.md-tabs,.md-typeset .headerlink{display:none}}@media only screen and (max-width:44.9375em){.md-typeset pre{margin:1em -.8rem;border-radius:0}.md-typeset pre>code{padding:.525rem .8rem}.md-footer-nav__link--prev .md-footer-nav__title{display:none}.md-search-result__teaser{max-height:2.5rem;-webkit-line-clamp:3}.codehilite .hll,.md-typeset .highlight .hll{margin:0 -.8rem;padding:0 .8rem}.md-typeset>.codehilite,.md-typeset>.highlight{margin:1em -.8rem;border-radius:0}.md-typeset>.codehilite code,.md-typeset>.codehilite pre,.md-typeset>.highlight code,.md-typeset>.highlight pre{padding:.525rem .8rem}.md-typeset>.codehilitetable,.md-typeset>.highlighttable{margin:1em -.8rem;border-radius:0}.md-typeset>.codehilitetable .codehilite>code,.md-typeset>.codehilitetable .codehilite>pre,.md-typeset>.codehilitetable .highlight>code,.md-typeset>.codehilitetable .highlight>pre,.md-typeset>.codehilitetable .linenodiv,.md-typeset>.highlighttable .codehilite>code,.md-typeset>.highlighttable .codehilite>pre,.md-typeset>.highlighttable .highlight>code,.md-typeset>.highlighttable .highlight>pre,.md-typeset>.highlighttable .linenodiv{padding:.5rem .8rem}.md-typeset>p>.MJXc-display{margin:.75em -.8rem;padding:.25em .8rem}.md-typeset>.superfences-tabs{margin:1em -.8rem;border:0;border-top:.05rem solid rgba(0,0,0,.07);border-radius:0}.md-typeset>.superfences-tabs code,.md-typeset>.superfences-tabs pre{padding:.525rem .8rem}}@media only screen and (min-width:100em){html{font-size:137.5%}}@media only screen and (min-width:125em){html{font-size:150%}}@media only screen and (max-width:59.9375em){body[data-md-state=lock]{overflow:hidden}.ios body[data-md-state=lock] .md-container{display:none}html .md-nav__link[for=__toc]{display:block;padding-right:2.4rem}html .md-nav__link[for=__toc]:after{color:inherit;content:"\E8DE"}html .md-nav__link[for=__toc]+.md-nav__link{display:none}html .md-nav__link[for=__toc]~.md-nav{display:flex}html [dir=rtl] .md-nav__link{padding-right:.8rem;padding-left:2.4rem}.md-nav__source{display:block;padding:0 .2rem;background-color:rgba(50,64,144,.9675);color:#fff}.md-search__overlay{position:absolute;top:.2rem;left:.2rem;width:1.8rem;height:1.8rem;-webkit-transform-origin:center;transform-origin:center;transition:opacity .2s .2s,-webkit-transform .3s .1s;transition:transform .3s .1s,opacity .2s .2s;transition:transform .3s .1s,opacity .2s .2s,-webkit-transform .3s .1s;border-radius:1rem;background-color:#fff;overflow:hidden;pointer-events:none}[dir=rtl] .md-search__overlay{right:.2rem;left:auto}[data-md-toggle=search]:checked~.md-header .md-search__overlay{transition:opacity .1s,-webkit-transform .4s;transition:transform .4s,opacity .1s;transition:transform .4s,opacity .1s,-webkit-transform .4s;opacity:1}.md-search__inner{position:fixed;top:0;left:100%;width:100%;height:100%;-webkit-transform:translateX(5%);transform:translateX(5%);transition:right 0s .3s,left 0s .3s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.4,0,.2,1) .15s;transition:right 0s .3s,left 0s .3s,transform .15s cubic-bezier(.4,0,.2,1) .15s,opacity .15s .15s;transition:right 0s .3s,left 0s .3s,transform .15s cubic-bezier(.4,0,.2,1) .15s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.4,0,.2,1) .15s;opacity:0;z-index:2}[data-md-toggle=search]:checked~.md-header .md-search__inner{left:0;-webkit-transform:translateX(0);transform:translateX(0);transition:right 0s 0s,left 0s 0s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.1,.7,.1,1) .15s;transition:right 0s 0s,left 0s 0s,transform .15s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s;transition:right 0s 0s,left 0s 0s,transform .15s cubic-bezier(.1,.7,.1,1) .15s,opacity .15s .15s,-webkit-transform .15s cubic-bezier(.1,.7,.1,1) .15s;opacity:1}[dir=rtl] [data-md-toggle=search]:checked~.md-header .md-search__inner{right:0;left:auto}html [dir=rtl] .md-search__inner{right:100%;left:auto;-webkit-transform:translateX(-5%);transform:translateX(-5%)}.md-search__input{width:100%;height:2.4rem;font-size:.9rem}.md-search__icon[for=__search]{top:.6rem;left:.8rem}.md-search__icon[for=__search][for=__search]:before{content:"\E5C4"}[dir=rtl] .md-search__icon[for=__search][for=__search]:before{content:"\E5C8"}.md-search__icon[type=reset]{top:.6rem;right:.8rem}.md-search__output{top:2.4rem;bottom:0}.md-search-result__article--document:before{display:none}}@media only screen and (max-width:76.1875em){[data-md-toggle=drawer]:checked~.md-overlay{width:100%;height:100%;transition:width 0s,height 0s,opacity .25s;opacity:1}.md-header-nav__button.md-icon--home,.md-header-nav__button.md-logo{display:none}.md-hero__inner{margin-top:2.4rem;margin-bottom:1.2rem}.md-nav{background-color:#fff}.md-nav--primary,.md-nav--primary .md-nav{display:flex;position:absolute;top:0;right:0;left:0;flex-direction:column;height:100%;z-index:1}.md-nav--primary .md-nav__item,.md-nav--primary .md-nav__title{font-size:.8rem;line-height:1.5}html .md-nav--primary .md-nav__title{position:relative;height:5.6rem;padding:3rem .8rem .2rem;background-color:rgba(0,0,0,.07);color:rgba(0,0,0,.54);font-weight:400;line-height:2.4rem;white-space:nowrap;cursor:pointer}html .md-nav--primary .md-nav__title:before{display:block;position:absolute;top:.2rem;left:.2rem;width:2rem;height:2rem;color:rgba(0,0,0,.54)}html .md-nav--primary .md-nav__title~.md-nav__list{background-color:#fff;box-shadow:inset 0 .05rem 0 rgba(0,0,0,.07)}html .md-nav--primary .md-nav__title~.md-nav__list>.md-nav__item:first-child{border-top:0}html .md-nav--primary .md-nav__title--site{position:relative;background-color:#3f51b5;color:#fff}html .md-nav--primary .md-nav__title--site .md-nav__button{display:block;position:absolute;top:.2rem;left:.2rem;width:3.2rem;height:3.2rem;font-size:2.4rem}html .md-nav--primary .md-nav__title--site:before{display:none}html [dir=rtl] .md-nav--primary .md-nav__title--site .md-nav__button,html [dir=rtl] .md-nav--primary .md-nav__title:before{right:.2rem;left:auto}.md-nav--primary .md-nav__list{flex:1;overflow-y:auto}.md-nav--primary .md-nav__item{padding:0;border-top:.05rem solid rgba(0,0,0,.07)}[dir=rtl] .md-nav--primary .md-nav__item{padding:0}.md-nav--primary .md-nav__item--nested>.md-nav__link{padding-right:2.4rem}[dir=rtl] .md-nav--primary .md-nav__item--nested>.md-nav__link{padding-right:.8rem;padding-left:2.4rem}.md-nav--primary .md-nav__item--nested>.md-nav__link:after{content:"\E315"}[dir=rtl] .md-nav--primary .md-nav__item--nested>.md-nav__link:after{content:"\E314"}.md-nav--primary .md-nav__link{position:relative;margin-top:0;padding:.6rem .8rem}.md-nav--primary .md-nav__link:after{position:absolute;top:50%;right:.6rem;margin-top:-.6rem;color:inherit;font-size:1.2rem}[dir=rtl] .md-nav--primary .md-nav__link:after{right:auto;left:.6rem}.md-nav--primary .md-nav--secondary .md-nav__link{position:static}.md-nav--primary .md-nav--secondary .md-nav{position:static;background-color:transparent}.md-nav--primary .md-nav--secondary .md-nav .md-nav__link{padding-left:1.4rem}[dir=rtl] .md-nav--primary .md-nav--secondary .md-nav .md-nav__link{padding-right:1.4rem;padding-left:0}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav__link{padding-left:2rem}[dir=rtl] .md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav__link{padding-right:2rem;padding-left:0}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav__link{padding-left:2.6rem}[dir=rtl] .md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav__link{padding-right:2.6rem;padding-left:0}.md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav .md-nav__link{padding-left:3.2rem}[dir=rtl] .md-nav--primary .md-nav--secondary .md-nav .md-nav .md-nav .md-nav .md-nav__link{padding-right:3.2rem;padding-left:0}.md-nav__toggle~.md-nav{display:flex;-webkit-transform:translateX(100%);transform:translateX(100%);transition:opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s;transition:transform .25s cubic-bezier(.8,0,.6,1),opacity .125s .05s,-webkit-transform .25s cubic-bezier(.8,0,.6,1);opacity:0}[dir=rtl] .md-nav__toggle~.md-nav{-webkit-transform:translateX(-100%);transform:translateX(-100%)}.no-csstransforms3d .md-nav__toggle~.md-nav{display:none}.md-nav__toggle:checked~.md-nav{-webkit-transform:translateX(0);transform:translateX(0);transition:opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s;transition:transform .25s cubic-bezier(.4,0,.2,1),opacity .125s .125s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);opacity:1}.no-csstransforms3d .md-nav__toggle:checked~.md-nav{display:flex}.md-sidebar--primary{position:fixed;top:0;left:-12.1rem;width:12.1rem;height:100%;-webkit-transform:translateX(0);transform:translateX(0);transition:box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s;transition:transform .25s cubic-bezier(.4,0,.2,1),box-shadow .25s,-webkit-transform .25s cubic-bezier(.4,0,.2,1);background-color:#fff;z-index:3}[dir=rtl] .md-sidebar--primary{right:-12.1rem;left:auto}.no-csstransforms3d .md-sidebar--primary{display:none}[data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary{box-shadow:0 8px 10px 1px rgba(0,0,0,.14),0 3px 14px 2px rgba(0,0,0,.12),0 5px 5px -3px rgba(0,0,0,.4);-webkit-transform:translateX(12.1rem);transform:translateX(12.1rem)}[dir=rtl] [data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary{-webkit-transform:translateX(-12.1rem);transform:translateX(-12.1rem)}.no-csstransforms3d [data-md-toggle=drawer]:checked~.md-container .md-sidebar--primary{display:block}.md-sidebar--primary .md-sidebar__scrollwrap{overflow:hidden;position:absolute;top:0;right:0;bottom:0;left:0;margin:0}.md-tabs{display:none}}@media only screen and (min-width:60em){.md-content{margin-right:12.1rem}[dir=rtl] .md-content{margin-right:0;margin-left:12.1rem}.md-header-nav__button.md-icon--search{display:none}.md-header-nav__source{display:block;width:11.7rem;max-width:11.7rem;padding-right:.6rem}[dir=rtl] .md-header-nav__source{padding-right:0;padding-left:.6rem}.md-search{padding:.2rem}.md-search__overlay{position:fixed;top:0;left:0;width:0;height:0;transition:width 0s .25s,height 0s .25s,opacity .25s;background-color:rgba(0,0,0,.54);cursor:pointer}[dir=rtl] .md-search__overlay{right:0;left:auto}[data-md-toggle=search]:checked~.md-header .md-search__overlay{width:100%;height:100%;transition:width 0s,height 0s,opacity .25s;opacity:1}.md-search__inner{position:relative;width:11.5rem;margin-right:.8rem;padding:.1rem 0;float:right;transition:width .25s cubic-bezier(.1,.7,.1,1)}[dir=rtl] .md-search__inner{margin-right:0;margin-left:.8rem;float:left}.md-search__form,.md-search__input{border-radius:.1rem}.md-search__input{width:100%;height:1.8rem;padding-left:2.2rem;transition:background-color .25s cubic-bezier(.1,.7,.1,1),color .25s cubic-bezier(.1,.7,.1,1);background-color:rgba(0,0,0,.26);color:inherit;font-size:.8rem}[dir=rtl] .md-search__input{padding-right:2.2rem}.md-search__input+.md-search__icon{color:inherit}.md-search__input::-webkit-input-placeholder{color:hsla(0,0%,100%,.7)}.md-search__input:-ms-input-placeholder{color:hsla(0,0%,100%,.7)}.md-search__input::-ms-input-placeholder{color:hsla(0,0%,100%,.7)}.md-search__input::placeholder{color:hsla(0,0%,100%,.7)}.md-search__input:hover{background-color:hsla(0,0%,100%,.12)}[data-md-toggle=search]:checked~.md-header .md-search__input{border-radius:.1rem .1rem 0 0;background-color:#fff;color:rgba(0,0,0,.87);text-overflow:clip}[data-md-toggle=search]:checked~.md-header .md-search__input+.md-search__icon,[data-md-toggle=search]:checked~.md-header .md-search__input::-webkit-input-placeholder{color:rgba(0,0,0,.54)}[data-md-toggle=search]:checked~.md-header .md-search__input+.md-search__icon,[data-md-toggle=search]:checked~.md-header .md-search__input:-ms-input-placeholder{color:rgba(0,0,0,.54)}[data-md-toggle=search]:checked~.md-header .md-search__input+.md-search__icon,[data-md-toggle=search]:checked~.md-header .md-search__input::-ms-input-placeholder{color:rgba(0,0,0,.54)}[data-md-toggle=search]:checked~.md-header .md-search__input+.md-search__icon,[data-md-toggle=search]:checked~.md-header .md-search__input::placeholder{color:rgba(0,0,0,.54)}.md-search__output{top:1.9rem;transition:opacity .4s;opacity:0}[data-md-toggle=search]:checked~.md-header .md-search__output{box-shadow:0 6px 10px 0 rgba(0,0,0,.14),0 1px 18px 0 rgba(0,0,0,.12),0 3px 5px -1px rgba(0,0,0,.4);opacity:1}.md-search__scrollwrap{max-height:0}[data-md-toggle=search]:checked~.md-header .md-search__scrollwrap{max-height:75vh}.md-search__scrollwrap::-webkit-scrollbar{width:.2rem;height:.2rem}.md-search__scrollwrap::-webkit-scrollbar-thumb{background-color:rgba(0,0,0,.26)}.md-search__scrollwrap::-webkit-scrollbar-thumb:hover{background-color:#536dfe}.md-search-result__meta{padding-left:2.2rem}[dir=rtl] .md-search-result__meta{padding-right:2.2rem;padding-left:0}.md-search-result__article{padding-left:2.2rem}[dir=rtl] .md-search-result__article{padding-right:2.2rem;padding-left:.8rem}.md-sidebar--secondary{display:block;margin-left:100%;-webkit-transform:translate(-100%);transform:translate(-100%)}[dir=rtl] .md-sidebar--secondary{margin-right:100%;margin-left:0;-webkit-transform:translate(100%);transform:translate(100%)}}@media only screen and (min-width:76.25em){.md-content{margin-left:12.1rem}[dir=rtl] .md-content{margin-right:12.1rem}.md-content__inner{margin-right:1.2rem;margin-left:1.2rem}.md-header-nav__button.md-icon--menu{display:none}.md-nav[data-md-state=animate]{transition:max-height .25s cubic-bezier(.86,0,.07,1)}.md-nav__toggle~.md-nav{max-height:0;overflow:hidden}.no-js .md-nav__toggle~.md-nav{display:none}.md-nav[data-md-state=expand],.md-nav__toggle:checked~.md-nav{max-height:100%}.no-js .md-nav[data-md-state=expand],.no-js .md-nav__toggle:checked~.md-nav{display:block}.md-nav__item--nested>.md-nav>.md-nav__title{display:none}.md-nav__item--nested>.md-nav__link:after{display:inline-block;-webkit-transform-origin:.45em .45em;transform-origin:.45em .45em;-webkit-transform-style:preserve-3d;transform-style:preserve-3d;vertical-align:-.125em}.js .md-nav__item--nested>.md-nav__link:after{transition:-webkit-transform .4s;transition:transform .4s;transition:transform .4s,-webkit-transform .4s}.md-nav__item--nested .md-nav__toggle:checked~.md-nav__link:after{-webkit-transform:rotateX(180deg);transform:rotateX(180deg)}.md-search__inner{margin-right:1.2rem}[dir=rtl] .md-search__inner{margin-left:1.2rem}.md-search__scrollwrap,[data-md-toggle=search]:checked~.md-header .md-search__inner{width:34.4rem}.md-sidebar--secondary{margin-left:61rem}[dir=rtl] .md-sidebar--secondary{margin-right:61rem;margin-left:0}.md-tabs~.md-main .md-nav--primary>.md-nav__list>.md-nav__item--nested{font-size:0;visibility:hidden}.md-tabs--active~.md-main .md-nav--primary .md-nav__title{display:block;padding:0}.md-tabs--active~.md-main .md-nav--primary .md-nav__title--site{display:none}.no-js .md-tabs--active~.md-main .md-nav--primary .md-nav{display:block}.md-tabs--active~.md-main .md-nav--primary>.md-nav__list>.md-nav__item{font-size:0;visibility:hidden}.md-tabs--active~.md-main .md-nav--primary>.md-nav__list>.md-nav__item--nested{display:none;font-size:.7rem;overflow:auto;visibility:visible}.md-tabs--active~.md-main .md-nav--primary>.md-nav__list>.md-nav__item--nested>.md-nav__link{display:none}.md-tabs--active~.md-main .md-nav--primary>.md-nav__list>.md-nav__item--active{display:block}.md-tabs--active~.md-main .md-nav[data-md-level="1"]{max-height:none;overflow:visible}.md-tabs--active~.md-main .md-nav[data-md-level="1"]>.md-nav__list>.md-nav__item{padding-left:0}.md-tabs--active~.md-main .md-nav[data-md-level="1"] .md-nav .md-nav__title{display:none}}@media only screen and (min-width:45em){.md-footer-nav__link{width:50%}.md-footer-copyright{max-width:75%;float:left}[dir=rtl] .md-footer-copyright{float:right}.md-footer-social{padding:.6rem 0;float:right}[dir=rtl] .md-footer-social{float:left}}@media only screen and (max-width:29.9375em){[data-md-toggle=search]:checked~.md-header .md-search__overlay{-webkit-transform:scale(45);transform:scale(45)}}@media only screen and (min-width:30em) and (max-width:44.9375em){[data-md-toggle=search]:checked~.md-header .md-search__overlay{-webkit-transform:scale(60);transform:scale(60)}}@media only screen and (min-width:45em) and (max-width:59.9375em){[data-md-toggle=search]:checked~.md-header .md-search__overlay{-webkit-transform:scale(75);transform:scale(75)}}@media only screen and (min-width:60em) and (max-width:76.1875em){.md-search__scrollwrap,[data-md-toggle=search]:checked~.md-header .md-search__inner{width:23.4rem}.md-search-result__teaser{max-height:2.5rem;-webkit-line-clamp:3}} \ No newline at end of file diff --git a/material/base.html b/material/base.html index a2b97d8d5..0218b5b8d 100644 --- a/material/base.html +++ b/material/base.html @@ -193,7 +193,7 @@ {% if language == "ja" %} {% endif %} - {% if language in ("da","de","du","es","fi","fr","hu","it","ja","jp","nl","no","pt","ro","ru","sv","tr") %} + {% if language in ("ar","da","de","du","es","fi","fr","hu","it","ja","jp","nl","no","pt","ro","ru","sv","tr","vi") %} {% endif %} {% endif %} diff --git a/material/partials/social.html b/material/partials/social.html index 9a04b7bb8..96f6aff07 100644 --- a/material/partials/social.html +++ b/material/partials/social.html @@ -5,7 +5,7 @@ diff --git a/mkdocs.yml b/mkdocs.yml index 8b8636078..ab6bf8222 100755 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -61,18 +61,18 @@ theme: # Plugins plugins: - - search: + - search - minify: minify_html: true # Customization extra: social: - - type: brands/github-alt + - icon: brands/github-alt link: https://github.com/squidfunk - - type: brands/twitter + - icon: brands/twitter link: https://twitter.com/squidfunk - - type: brands/linkedin + - icon: brands/linkedin link: https://www.linkedin.com/in/squidfunk/ # Extensions diff --git a/src/assets/javascripts/components/search/result/_/index.ts b/src/assets/javascripts/components/search/result/_/index.ts index 8ad06cb12..6e24578b1 100644 --- a/src/assets/javascripts/components/search/result/_/index.ts +++ b/src/assets/javascripts/components/search/result/_/index.ts @@ -36,18 +36,6 @@ import { Agent, watchElementOffset } from "utilities" import { paintSearchResultList } from "../list" import { paintSearchResultMeta } from "../meta" -// /* ---------------------------------------------------------------------------- -// * Types -// * ------------------------------------------------------------------------- */ - -// tslint:disable-next-line: no-commented-code -// /** -// * Search result state -// */ -// export interface SearchResultState { -// result: SearchResult[] /* Search results */ -// } - /* ---------------------------------------------------------------------------- * Helper types * ------------------------------------------------------------------------- */ diff --git a/src/assets/javascripts/index.ts b/src/assets/javascripts/index.ts index c91d1253e..36091b6cb 100644 --- a/src/assets/javascripts/index.ts +++ b/src/assets/javascripts/index.ts @@ -30,7 +30,10 @@ import { Subject, forkJoin, merge, - of + of, + fromEvent, + interval, + NEVER } from "rxjs" import { ajax } from "rxjs/ajax" import { @@ -66,7 +69,8 @@ import { watchToggle, watchWorker, setToggle, - getElements + getElements, + watchMedia } from "./utilities" import { PackerMessage, @@ -78,6 +82,7 @@ import { isSearchResultMessage } from "./workers" import { renderSource } from "templates" +import { switchMapIf, not } from "extensions" /* ---------------------------------------------------------------------------- * Types @@ -238,7 +243,7 @@ function repository() { if (!el) return EMPTY - const data = localStorage.getItem("repository") + const data = sessionStorage.getItem("repository") if (data) { const x = JSON.parse(data) return of(x) @@ -246,14 +251,13 @@ function repository() { // TODO: do correct rounding, see GitHub function format(value: number) { - if (value > 10000) - return `${(value / 1000).toFixed(0)}k` - else if (value > 1000) - return `${(value / 1000).toFixed(1)}k` - return `${value}` + return value > 999 + ? `${(value / 1000).toFixed(1)}k` + : `${(value)}` } - const [, user, repo] = el.href.match(/^.+github\.com\/([^\/]+)\/?([^\/]+)?.*$/) + // github repository... + const [, user, repo] = el.href.match(/^.+github\.com\/([^\/]+)\/?([^\/]+)?.*$/i) // Show repo stats if (user && repo) { @@ -272,7 +276,7 @@ function repository() { } return [] }), - tap(data => localStorage.setItem("repository", JSON.stringify(data))) + tap(data => sessionStorage.setItem("repository", JSON.stringify(data))) ) // Show user or organization stats @@ -291,7 +295,7 @@ function repository() { } return [] }), - tap(data => localStorage.setItem("repository", JSON.stringify(data))) + tap(data => sessionStorage.setItem("repository", JSON.stringify(data))) ) } return of([]) @@ -448,7 +452,6 @@ export function initialize(config: unknown) { const a$ = watchToggle(search) .pipe( - filter(identity), delay(400) ) @@ -457,15 +460,37 @@ export function initialize(config: unknown) { switchMap(watchSearchReset) ) - merge(a$, reset$) + /* Listener: focus query if search is open and character is typed */ + // TODO: combine with watchElementFocus + const keysIfSearchActive$ = a$ + .pipe( + switchMap(x => x === true ? fromEvent(window, "keydown") : NEVER), + ) + + // focus search on reset, on toggle and on keypress if open + merge(a$.pipe(filter(identity)), reset$, keysIfSearchActive$) .pipe( switchMapTo(component("search-query")), - tap(el => el.focus()) + tap(el => el.focus()) // TODO: only if element isnt focused! setFocus? setToggle? ) .subscribe() /* ----------------------------------------------------------------------- */ + /* Open details before printing */ + merge( + watchMedia("print").pipe(filter(identity)), // Webkit + fromEvent(window, "beforeprint") // IE, FF + ) + .subscribe(() => { + const details = document.querySelectorAll("details") + Array.prototype.forEach.call(details, detail => { + detail.setAttribute("open", "") + }) + }) + + /* ----------------------------------------------------------------------- */ + const state = { search: { query$, diff --git a/src/assets/javascripts/utilities/toggle/index.ts b/src/assets/javascripts/utilities/toggle/index.ts index bdcf25e08..4f778b0e0 100644 --- a/src/assets/javascripts/utilities/toggle/index.ts +++ b/src/assets/javascripts/utilities/toggle/index.ts @@ -21,7 +21,7 @@ */ import { Observable, fromEvent } from "rxjs" -import { pluck } from "rxjs/operators" +import { map } from "rxjs/operators" /* ---------------------------------------------------------------------------- * Functions @@ -59,6 +59,6 @@ export function watchToggle( ): Observable { return fromEvent(el, "change") .pipe( - pluck("checked") + map(() => el.checked) ) } diff --git a/src/assets/javascripts/workers/packer/main/index.ts b/src/assets/javascripts/workers/packer/main/index.ts index 963130d7e..04491c9ca 100644 --- a/src/assets/javascripts/workers/packer/main/index.ts +++ b/src/assets/javascripts/workers/packer/main/index.ts @@ -94,6 +94,6 @@ export function handler(message: PackerMessage): PackerMessage { * Worker * ------------------------------------------------------------------------- */ -addEventListener("message", ev => { - postMessage(handler(ev.data)) +self.addEventListener("message", ev => { + self.postMessage(handler(ev.data)) }) diff --git a/src/assets/javascripts/workers/search/main/index.ts b/src/assets/javascripts/workers/search/main/index.ts index bba479b57..0348a6851 100644 --- a/src/assets/javascripts/workers/search/main/index.ts +++ b/src/assets/javascripts/workers/search/main/index.ts @@ -72,6 +72,6 @@ export function handler(message: SearchMessage): SearchMessage { * Worker * ------------------------------------------------------------------------- */ -addEventListener("message", ev => { - postMessage(handler(ev.data)) +self.addEventListener("message", ev => { + self.postMessage(handler(ev.data)) }) diff --git a/src/partials/social.html b/src/partials/social.html index fafb86b93..d6e813c3d 100644 --- a/src/partials/social.html +++ b/src/partials/social.html @@ -29,7 +29,7 @@ target="_blank" rel="noopener" class="md-footer-social__link" > - {% include "assets/images/icons/fontawesome/" ~ social.type ~ ".svg" %} + {% include "assets/images/icons/fontawesome/" ~ social.icon ~ ".svg" %} {% endfor %}