(this["webpackJsonpgonzo-test-client"]=this["webpackJsonpgonzo-test-client"]||[]).push([[24],{"/1FC":function(t,e,r){"use strict";var i=Array.isArray;e.a=i},"/mkQ":function(t,e,r){var i=r("fL/t"),n=(r("3KVt"),r("YZT1"));t.exports=function(t,e){return arguments.length>2?i(t,17,n(arguments,2),null,e):i(t,1,null,null,e)}},"1Kn6":function(t,e,r){var i=r("/mkQ"),n=r("PzR9"),o=r("OW9J"),a=r("C35W"),s=/^\s*function[ \n\r\t]+\w/,l=/\bthis\b/,c=Function.prototype.toString;t.exports=function(t,e,r){if("function"!=typeof t)return n;if("undefined"==typeof e||!("prototype"in t))return t;var u=t.__bindData__;if("undefined"==typeof u&&(a.funcNames&&(u=!t.name),!(u=u||!a.funcDecomp))){var h=c.call(t);a.funcNames||(u=!s.test(h)),u||(u=l.test(h),o(t,u))}if(!1===u||!0!==u&&1&u[1])return t;switch(r){case 1:return function(r){return t.call(e,r)};case 2:return function(r,i){return t.call(e,r,i)};case 3:return function(r,i,n){return t.call(e,r,i,n)};case 4:return function(r,i,n,o){return t.call(e,r,i,n,o)}}return i(t,e)}},"2kWR":function(t,e){var r=/^\[object .+?Constructor\]$/;var i=Object.prototype,n=Function.prototype.toString,o=i.hasOwnProperty,a=i.toString,s=RegExp("^"+n.call(o).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t,e){var i=null==t?void 0:t[e];return function(t){if(null==t)return!1;if(function(t){return function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)&&"[object Function]"==a.call(t)}(t))return s.test(n.call(t));return function(t){return!!t&&"object"==typeof t}(t)&&r.test(t)}(i)?i:void 0}},"3/ER":function(t,e,r){"use strict";(function(t){var i=r("Ju5/"),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof t&&t&&!t.nodeType&&t,a=o&&o.exports===n?i.a.Buffer:void 0,s=a?a.allocUnsafe:void 0;e.a=function(t,e){if(e)return t.slice();var r=t.length,i=s?s(r):new t.constructor(r);return t.copy(i),i}}).call(this,r("3UD+")(t))},"3KVt":function(t,e){var r=Object.prototype.toString,i=RegExp("^"+String(r).replace(/[.*+?^${}()|[\]\\]/g,"\\$&").replace(/toString| for [^\]]+/g,".*?")+"$");t.exports=i},"6+oW":function(t,e){t.exports={boolean:!1,function:!0,object:!0,number:!1,string:!1,undefined:!1}},"6LIB":function(t,e,r){"use strict";var i=Object.prototype.toString;var n=function(t){return i.call(t)},o=r("UudT");var a=function(t){return null!=t&&"object"==typeof t},s=Function.prototype,l=Object.prototype,c=s.toString,u=l.hasOwnProperty,h=c.call(Object);e.a=function(t){if(!a(t)||"[object Object]"!=n(t))return!1;var e=Object(o.a)(t);if(null===e)return!0;var r=u.call(e,"constructor")&&e.constructor;return"function"==typeof r&&r instanceof r&&c.call(r)==h}},"9/5/":function(t,e,r){(function(e){var r=/^\s+|\s+$/g,i=/^[-+]0x[0-9a-f]+$/i,n=/^0b[01]+$/i,o=/^0o[0-7]+$/i,a=parseInt,s="object"==typeof e&&e&&e.Object===Object&&e,l="object"==typeof self&&self&&self.Object===Object&&self,c=s||l||Function("return this")(),u=Object.prototype.toString,h=Math.max,f=Math.min,p=function(){return c.Date.now()};function d(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function y(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==u.call(t)}(t))return NaN;if(d(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=d(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var s=n.test(t);return s||o.test(t)?a(t.slice(2),s?2:8):i.test(t)?NaN:+t}t.exports=function(t,e,r){var i,n,o,a,s,l,c=0,u=!1,v=!1,m=!0;if("function"!=typeof t)throw new TypeError("Expected a function");function g(e){var r=i,o=n;return i=n=void 0,c=e,a=t.apply(o,r)}function b(t){return c=t,s=setTimeout(I,e),u?g(t):a}function w(t){var r=t-l;return void 0===l||r>=e||r<0||v&&t-c>=o}function I(){var t=p();if(w(t))return O(t);s=setTimeout(I,function(t){var r=e-(t-l);return v?f(r,o-(t-c)):r}(t))}function O(t){return s=void 0,m&&i?g(t):(i=n=void 0,a)}function x(){var t=p(),r=w(t);if(i=arguments,n=this,l=t,r){if(void 0===s)return b(l);if(v)return s=setTimeout(I,e),g(l)}return void 0===s&&(s=setTimeout(I,e)),a}return e=y(e)||0,d(r)&&(u=!!r.leading,o=(v="maxWait"in r)?h(y(r.maxWait)||0,e):o,m="trailing"in r?!!r.trailing:m),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=n=s=void 0},x.flush=function(){return void 0===s?a:O(p())},x}}).call(this,r("yLpj"))},"9N93":function(t,e,r){var i=r("X1gz"),n=r("xQ8M"),o=r("OW9J"),a=r("YZT1"),s=[].push;t.exports=function t(e){var r=e[0],l=e[1],c=e[2],u=e[3],h=e[4],f=e[5],p=1&l,d=2&l,y=4&l,v=8&l,m=r;function g(){var e=p?h:this;if(c){var o=c.slice();s.apply(o,arguments)}if((u||y)&&(o||(o=a(arguments)),u&&s.apply(o,u),y&&o.length-1};var u=function(t,e){var r=this.__data__,i=o(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};function h(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e-1}function g(t){return t!==t}function b(t,e){for(var r=t.length,i=0;r--;)t[r]===e&&i++;return i}function w(t,e){for(var r=-1,i=t.length,n=0,o=[];++r2?t:void 0}();function E(t){return X(t)?S(t):{}}function q(t){return!(!X(t)||(e=t,k&&k in e))&&(function(t){var e=X(t)?D.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)||function(t){var e=!1;if(null!=t&&"function"!=typeof t.toString)try{e=!!(t+"")}catch(r){}return e}(t)?P:c).test(function(t){if(null!=t){try{return j.call(t)}catch(e){}try{return t+""}catch(e){}}return""}(t));var e}function N(t,e,r,i){for(var n=-1,o=t.length,a=r.length,s=-1,l=e.length,c=C(o-a,0),u=Array(l+c),h=!i;++s1&&I.reverse(),u&&l1?"& ":"")+e[i],e=e.join(r>2?", ":" "),t.replace(n,"{\n/* [wrapped with "+e+"] */\n")}function K(t,e){return!!(e=null==e?9007199254740991:e)&&("number"==typeof t||h.test(t))&&t>-1&&t%1==0&&t-1&&t%1==0&&t<=9007199254740991}(t.length)&&!function(t){var e=function(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}(t)?c.call(t):"";return"[object Function]"==e||"[object GeneratorFunction]"==e}(t)}(t)}(t)&&l.call(t,"callee")&&(!h.call(t,"callee")||"[object Arguments]"==c.call(t))}(t)||!!(f&&t&&t[f])}var y=Array.isArray;var v=function(t){return e=function(e){var r=(e=function t(e,r,i,n,o){var s=-1,l=e.length;for(i||(i=d),o||(o=[]);++s0&&i(c)?r>1?t(c,r-1,i,n,o):a(o,c):n||(o[o.length]=c)}return o}(e,1)).length,i=r;for(t&&e.reverse();i--;)if("function"!=typeof e[i])throw new TypeError("Expected a function");return function(){for(var t=0,i=r?e[t].apply(this,arguments):arguments[0];++t=10)return t;for(n in t)"string"===typeof t[n]&&0===t[n].indexOf("[%lktxp]")?(o=t[n].substring(8),r.hasOwnProperty(o)&&(t[n]=r[o])):"object"===typeof t[n]&&(t[n]=e.resolveTransformObject(t[n],r,i));return t},resolveTransformParams:function(t,r){var i,n,o=[];if("undefined"===typeof r)return t;for(i=0;in)&&r:i===i&&n!==n||(n!==n||i===i)&&(te)&&(t==e?r:(i=t.toString())<(n=e.toString())||i==n&&r))}function l(t,e,r){var i,n,o,a;if(!t||!e||!0===t||!0===e||t!==t||e!==e){switch(t){case void 0:case null:o=1;break;case!1:o=3;break;case!0:o=4;break;case"":o=5;break;default:o=t===t?9:0}switch(e){case void 0:case null:a=1;break;case!1:a=3;break;case!0:a=4;break;case"":a=5;break;default:a=e===e?9:0}if(9!==o||9!==a)return o===a?r:o>a}return i=Number(t),n=Number(e),i===i&&n===n?i>n||!(ie||!(t(n=e.toString())||i==n&&r))}function c(t,e,r){return o.aeq(t,e)?0:o.lt(t,e,!1)?r?1:-1:o.gt(t,e,!1)?r?-1:1:0}function u(t,e,r,i,n){var o,a=n||0,s=e[a],l=!1;if("object"===typeof t&&s in t&&(o=t[s]),a+1>=e.length)l=r(o,i);else if(Array.isArray(o))for(var c=0,h=o.length;ce},$jgte:function(t,e){return t>=e},$jlt:function(t,e){return t=e[0]&&t<=e[1]},$in:function(t,e){return-1!==e.indexOf(t)},$nin:function(t,e){return-1===e.indexOf(t)},$keyin:function(t,e){return t in e},$nkeyin:function(t,e){return!(t in e)},$definedin:function(t,e){return void 0!==e[t]},$undefinedin:function(t,e){return void 0===e[t]},$regex:function(t,e){return e.test(t)},$containsString:function(t,e){return"string"===typeof t&&-1!==t.indexOf(e)},$containsNone:function(t,e){return!p.$containsAny(t,e)},$containsAny:function(t,e){var r=h(t);return null!==r&&(Array.isArray(e)?e.some(r):r(e))},$contains:function(t,e){var r=h(t);return null!==r&&(Array.isArray(e)?e.every(r):r(e))},$elemMatch:function(t,e){return!!Array.isArray(t)&&t.some((function(t){return Object.keys(e).every((function(r){var i=e[r];return"object"===typeof i&&i||(i={$eq:i}),-1!==r.indexOf(".")?u(t,r.split("."),f,e[r]):f(t[r],i)}))}))},$type:function(t,e){var r=typeof t;return"object"===r&&(Array.isArray(t)?r="array":t instanceof Date&&(r="date")),"object"!==typeof e?r===e:f(r,e)},$finite:function(t,e){return e===isFinite(t)},$size:function(t,e){return!!Array.isArray(t)&&("object"!==typeof e?t.length===e:f(t.length,e))},$len:function(t,e){return"string"===typeof t&&("object"!==typeof e?t.length===e:f(t.length,e))},$where:function(t,e){return!0===e(t)},$not:function(t,e){return!f(t,e)},$and:function(t,e){for(var r=0,i=e.length;r=0||"$loki"==s||"meta"==s)n[s]=e[s];else{var l=a(t[s],e[s]);"undefined"!==typeof l&&l!={}&&(n[s]=l)}}return 0===Object.keys(n).length?void 0:n}return t===e?void 0:e}function s(){i.changes=[]}this.observerCallback=function(e){var r="function"===typeof Set?new Set:[];r.add||(r.add=function(t){return-1===this.indexOf(t)&&this.push(t),this}),e.forEach((function(t){r.add(t.object)})),r.forEach((function(e){if(!t.call(e,"$loki"))return i.removeAutoUpdateObserver(e);try{i.update(e)}catch(r){}}))},this.getChangeDelta=function(t,e){return e?a(e,t):JSON.parse(JSON.stringify(t))},this.getObjectDelta=a,this.getChanges=function(){return i.changes},this.flushChanges=s,this.setChangesApi=function(t){i.disableChangesApi=!t,t||(i.disableDeltaChangesApi=!1)},this.on("delete",(function(t){i.disableChangesApi||i.createChange(i.name,"R",t)})),this.on("warning",(function(t){i.lokiConsoleWrapper.warn(t)})),s()}function A(t){return-1!==t.indexOf(".")}function D(t){return parseFloat(t,10)}function P(t,e){return t+e}function S(t,e){return t-e}function C(t){return t.reduce(P,0)/t.length}function T(t,e,r){if(!1===r)return t[e];for(var i=e.split("."),n=t;i.length>0;)n=n[i.shift()];return n}function $(t,e,r){for(var i,n,o=0,a=t.length;o>1,0===(i=r.apply(null,[e,t[n]])))return{found:!0,index:n};i<0?a=n:o=n+1}return{found:!1,index:a}}function E(t){return function(e,r){return $(e,r,t)}}function q(){}function N(t){this.field=t,this.keyMap={},this.lokiMap={}}function _(t){this.index={},this.field=t}return m.prototype.events={},m.prototype.asyncListeners=!1,m.prototype.on=function(t,e){var r,i=this;return Array.isArray(t)?(t.forEach((function(t){i.on(t,e)})),e):((r=this.events[t])||(r=this.events[t]=[]),r.push(e),e)},m.prototype.emit=function(t){var e=this,r=Array.prototype.slice.call(arguments,1);if(!t||!this.events[t])throw new Error("No event "+t+" defined");this.events[t].forEach((function(t){e.asyncListeners?setTimeout((function(){t.apply(e,r)}),1):t.apply(e,r)}))},m.prototype.addListener=m.prototype.on,m.prototype.removeListener=function(t,e){var r=this;if(Array.isArray(t))t.forEach((function(t){r.removeListener(t,e)}));else if(this.events[t]){var i=this.events[t];i.splice(i.indexOf(e),1)}},g.prototype=new m,g.prototype.constructor=g,g.prototype.getIndexedAdapter=function(){return r("pnzC")},g.prototype.configureOptions=function(t,e){var r={fs:I,localStorage:O,memory:b};if(this.options={},this.persistenceMethod=null,this.persistenceAdapter=null,"undefined"!==typeof t){if(this.options=t,this.options.hasOwnProperty("persistenceMethod")&&"function"==typeof r[t.persistenceMethod]&&(this.persistenceMethod=t.persistenceMethod,this.persistenceAdapter=new r[t.persistenceMethod]),this.options.hasOwnProperty("adapter")&&(this.persistenceMethod="adapter",this.persistenceAdapter=t.adapter,this.options.adapter=null,this.isIncremental="incremental"===this.persistenceAdapter.mode),t.autoload&&e){var i=this;setTimeout((function(){i.loadDatabase(t,t.autoloadCallback)}),1)}this.options.hasOwnProperty("autosaveInterval")&&(this.autosaveDisable(),this.autosaveInterval=parseInt(this.options.autosaveInterval,10)),this.options.hasOwnProperty("autosave")&&this.options.autosave&&(this.autosaveDisable(),this.autosave=!0,this.options.hasOwnProperty("autosaveCallback")?this.autosaveEnable(t,t.autosaveCallback):this.autosaveEnable()),this.options.hasOwnProperty("throttledSaves")&&(this.throttledSaves=this.options.throttledSaves)}this.options.hasOwnProperty("serializationMethod")||(this.options.serializationMethod="normal"),this.options.hasOwnProperty("destructureDelimiter")||(this.options.destructureDelimiter="$<\n"),null===this.persistenceAdapter&&(this.persistenceMethod={NODEJS:"fs",BROWSER:"localStorage",CORDOVA:"localStorage",MEMORY:"memory"}[this.ENV],this.persistenceMethod&&(this.persistenceAdapter=new r[this.persistenceMethod]))},g.prototype.copy=function(t){var e,r,i=new g(this.filename,{env:"NA"});if(t=t||{},i.loadJSONObject(this,{retainDirtyFlags:!0}),t.hasOwnProperty("removeNonSerializable")&&!0===t.removeNonSerializable)for(i.autosaveHandle=null,i.persistenceAdapter=null,e=i.collections.length,r=0;r0)throw new Error("disableMeta option cannot be passed as true when ttl is enabled")}for(r=0;r=0)return this.serializeCollection({delimited:t.delimited,delimiter:t.delimiter,collectionIndex:t.partition});for((o=new g(this.filename)).loadJSONObject(this),e=0;ei&&(l=!0):(n=JSON.parse(o[s]),r.collections[a].data.push(n)),o[s++]=null;return r},g.prototype.deserializeCollection=function(t,e){var r,i,n=[];for((e=e||{}).hasOwnProperty("partitioned")||(e.partitioned=!1),e.hasOwnProperty("delimited")||(e.delimited=!0),e.hasOwnProperty("delimiter")||(e.delimiter=this.options.destructureDelimiter),e.delimited?(n=t.split(e.delimiter)).pop():n=t,i=n.length,r=0;r=o&&(c=!0)),n>=this.options.pageSize&&(u=!0),u&&!c||(l+=this.options.delimiter,n+=a),c||u)return void this.adapter.saveDatabase(i,l,h)},I.prototype.loadDatabase=function(t,e){var r=this;this.fs.stat(t,(function(i,n){!i&&n.isFile()?r.fs.readFile(t,{encoding:"utf8"},(function(t,r){e(t?new Error(t):r)})):e(null)}))},I.prototype.saveDatabase=function(t,e,r){var i=this,n=t+"~";this.fs.writeFile(n,e,(function(e){e?r(new Error(e)):i.fs.rename(n,t,r)}))},I.prototype.deleteDatabase=function(t,e){this.fs.unlink(t,(function(t){t?e(new Error(t)):e()}))},O.prototype.loadDatabase=function(t,e){v()?e(localStorage.getItem(t)):e(new Error("localStorage is not available"))},O.prototype.saveDatabase=function(t,e,r){v()?(localStorage.setItem(t,e),r(null)):r(new Error("localStorage is not available"))},O.prototype.deleteDatabase=function(t,e){v()?(localStorage.removeItem(t),e(null)):e(new Error("localStorage is not available"))},g.prototype.throttledSaveDrain=function(t,e){var r=this,i=(new Date).getTime();if(this.throttledSaves||t(!0),(e=e||{}).hasOwnProperty("recursiveWait")||(e.recursiveWait=!0),e.hasOwnProperty("recursiveWaitLimit")||(e.recursiveWaitLimit=!1),e.hasOwnProperty("recursiveWaitLimitDuration")||(e.recursiveWaitLimitDuration=2e3),e.hasOwnProperty("started")||(e.started=(new Date).getTime()),this.throttledSaves&&this.throttledSavePending){if(!e.recursiveWait)return void this.throttledCallbacks.push(t);this.throttledCallbacks.push((function(){return r.throttledSavePending?e.recursiveWaitLimit&&i-e.started>e.recursiveWaitLimitDuration?void t(!1):void r.throttledSaveDrain(t,e):void t(!0)}))}else t(!0)},g.prototype.loadDatabaseInternal=function(t,e){var r=e||function(t,e){if(t)throw t},i=this;null!==this.persistenceAdapter?this.persistenceAdapter.loadDatabase(this.filename,(function(e){if("string"===typeof e){var n=!1;try{i.loadJSON(e,t||{}),n=!0}catch(o){r(o)}n&&(r(null),i.emit("loaded","database "+i.filename+" loaded"))}else{if(!e)return r(null),void i.emit("loaded","empty database "+i.filename+" loaded");if(e instanceof Error)return void r(e);if("object"===typeof e)return i.loadJSONObject(e,t||{}),r(null),void i.emit("loaded","database "+i.filename+" loaded");r("unexpected adapter response : "+e)}})):r(new Error("persistenceAdapter not configured"))},g.prototype.loadDatabase=function(t,e){var r=this;this.throttledSaves?this.throttledSaveDrain((function(i){if(i)return r.throttledSavePending=!0,void r.loadDatabaseInternal(t,(function(t){0===r.throttledCallbacks.length?r.throttledSavePending=!1:r.saveDatabase(),"function"===typeof e&&e(t)}));"function"===typeof e&&e(new Error("Unable to pause save throttling long enough to read database"))}),t):this.loadDatabaseInternal(t,e)},g.prototype.saveDatabaseInternal=function(t){var e=t||function(t){if(t)throw t},r=this;if(this.persistenceAdapter)if("reference"!==this.persistenceAdapter.mode&&this.autosaveClearFlags(),"incremental"===this.persistenceAdapter.mode){var i=this.copy({removeNonSerializable:!0}),n=this.collections.map((function(t){return t.dirtyIds}));this.collections.forEach((function(t){t.dirtyIds=[]})),this.persistenceAdapter.saveDatabase(this.filename,i,(function(t){t&&r.collections.forEach((function(t,e){t.dirtyIds=t.dirtyIds.concat(n[e])})),e(t)}))}else"reference"===this.persistenceAdapter.mode&&"function"===typeof this.persistenceAdapter.exportDatabase?this.persistenceAdapter.exportDatabase(this.filename,this.copy({removeNonSerializable:!0}),(function(t){r.autosaveClearFlags(),e(t)})):this.persistenceAdapter.saveDatabase(this.filename,this.serialize(),(function(t){e(t)}));else e(new Error("persistenceAdapter not configured"))},g.prototype.saveDatabase=function(t){if(this.throttledSaves)if(this.throttledSavePending)this.throttledCallbacks.push(t);else{var e=this.throttledCallbacks;this.throttledCallbacks=[],e.unshift(t),this.throttledSavePending=!0;var r=this;this.saveDatabaseInternal((function(t){r.throttledSavePending=!1,e.forEach((function(e){"function"===typeof e&&setTimeout((function(){e(t)}),1)})),r.throttledCallbacks.length>0&&r.saveDatabase()}))}else this.saveDatabaseInternal(t)},g.prototype.save=g.prototype.saveDatabase,g.prototype.deleteDatabase=function(t,e){var r=e||function(t,e){if(t)throw t};"function"!==typeof t||e||(r=t),null!==this.persistenceAdapter?this.persistenceAdapter.deleteDatabase(this.filename,(function(t){r(t)})):r(new Error("persistenceAdapter not configured"))},g.prototype.autosaveDirty=function(){for(var t=0;t0&&(this.filteredrows=[]),this.filterInitialized=!1,this},x.prototype.toJSON=function(){var t=this.copy();return t.collection=null,t},x.prototype.limit=function(t){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var e=new x(this.collection);return e.filteredrows=this.filteredrows.slice(0,t),e.filterInitialized=!0,e},x.prototype.offset=function(t){this.filterInitialized||0!==this.filteredrows.length||(this.filteredrows=this.collection.prepareFullDocIndex());var e=new x(this.collection);return e.filteredrows=this.filteredrows.slice(t),e.filterInitialized=!0,e},x.prototype.copy=function(){var t=new x(this.collection);return this.filteredrows.length>0&&(t.filteredrows=this.filteredrows.slice()),t.filterInitialized=this.filterInitialized,t},x.prototype.branch=x.prototype.copy,x.prototype.transform=function(t,r){var i,n,o=this;if("string"===typeof t&&this.collection.transforms.hasOwnProperty(t)&&(t=this.collection.transforms[t]),"object"!==typeof t||!Array.isArray(t))throw new Error("Invalid transform");for("undefined"!==typeof r&&(t=e.resolveTransformParams(t,r)),i=0;ir[t]?1:e[t]1)return this.find({$and:m},i)}if(!o||"getAll"===f)return i&&(this.filterInitialized?this.filteredrows=this.filteredrows.slice(0,1):(this.filteredrows=this.collection.data.length>0?[0]:[],this.filterInitialized=!0)),this;if("$and"===o||"$or"===o)return this[o](a),i&&this.filteredrows.length>1&&(this.filteredrows=this.filteredrows.slice(0,1)),this;if(null===a||"object"!==typeof a||a instanceof Date)l="$eq",c=a;else{if("object"!==typeof a)throw new Error("Do not know what you want to do.");for(h in a)if(t.call(a,h)){l=h,c=a[h];break}}"$regex"!==l&&"object"!==typeof c||(c=function t(e,r){if("$regex"===e)Array.isArray(r)?r=new RegExp(r[0],r[1]):r instanceof RegExp||(r=new RegExp(r));else if("object"===typeof r)for(var i in r)"$regex"!==i&&"object"!==typeof r[i]||(r[i]=t(i,r[i]));return r}(l,c));var b=-1!==o.indexOf(".");!this.filterInitialized&&this.collection.binaryIndices[o]&&d[l]&&(!0!==this.collection.adaptiveBinaryIndices&&this.collection.ensureIndex(o),y=!0,g=this.collection.binaryIndices[o]);var w,I=p[l],O=this.collection.data,x=0,k=0,j=0;if(this.filterInitialized){if(k=(w=this.filteredrows).length,b){for(o=o.split("."),x=0;x=0?(this.filterPipeline[e]=t,this.reapplyFilters()):(this.cachedresultset=null,this.options.persistent&&(this.resultdata=[],this.resultsdirty=!0),this._addFilter(t),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent(),this)},k.prototype.applyFind=function(t,e){return this.applyFilter({type:"find",val:t,uid:e}),this},k.prototype.applyWhere=function(t,e){return this.applyFilter({type:"where",val:t,uid:e}),this},k.prototype.removeFilter=function(t){var e=this._indexOfFilterWithId(t);if(e<0)throw new Error("Dynamic view does not contain a filter with ID: "+t);return this.filterPipeline.splice(e,1),this.reapplyFilters(),this},k.prototype.count=function(){return this.resultsdirty&&(this.resultdata=this.resultset.data()),this.resultset.count()},k.prototype.data=function(t){return(this.sortDirty||this.resultsdirty)&&this.performSortPhase({suppressRebuildEvent:!0}),this.options.persistent?this.resultdata:this.resultset.data(t)},k.prototype.queueRebuildEvent=function(){if(!this.rebuildPending){this.rebuildPending=!0;var t=this;setTimeout((function(){t.rebuildPending&&(t.rebuildPending=!1,t.emit("rebuild",t))}),this.options.minRebuildInterval)}},k.prototype.queueSortPhase=function(){if(!this.sortDirty){this.sortDirty=!0;var t=this;"active"===this.options.sortPriority?setTimeout((function(){t.performSortPhase()}),this.options.minRebuildInterval):this.queueRebuildEvent()}},k.prototype.performSortPhase=function(t){(this.sortDirty||this.resultsdirty)&&(t=t||{},this.sortDirty&&(this.sortFunction?this.resultset.sort(this.sortFunction):this.sortCriteria?this.resultset.compoundsort(this.sortCriteria):this.sortCriteriaSimple&&this.resultset.simplesort(this.sortCriteriaSimple.propname,this.sortCriteriaSimple.options),this.sortDirty=!1),this.options.persistent&&(this.resultdata=this.resultset.data(),this.resultsdirty=!1),t.suppressRebuildEvent||this.emit("rebuild",this))},k.prototype.evaluateDocument=function(t,e){if(!this.resultset.filterInitialized)return this.options.persistent&&(this.resultdata=this.resultset.data()),void(this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var r,i=this.resultset.filteredrows,n=e?-1:i.indexOf(+t),o=i.length,a=new x(this.collection);a.filteredrows=[t],a.filterInitialized=!0;for(var s=0,l=this.filterPipeline.length;s0&&(this.resultset.filteredrows=this.resultset.filteredrows.filter((function(t,e){return!o[e]})),this.options.persistent&&(this.resultdata=this.resultdata.filter((function(t,e){return!o[e]}))),this.sortFunction||this.sortCriteria||this.sortCriteriaSimple?this.queueSortPhase():this.queueRebuildEvent());var u=function(t){return function(e){return e1)&&(r.randomSamplingFactor=.1);var i,n,o,a,s,l=!0;if(!this.binaryIndices.hasOwnProperty(t))throw new Error("called checkIndex on property without an index: "+t);if(this.adaptiveBinaryIndices||this.ensureIndex(t),(a=(s=this.binaryIndices[t].values).length)!==this.data.length)return r.repair&&this.ensureIndex(t,!0),!1;if(0===a)return!0;var c=-1!==t.indexOf(".");if(1===a)l=0===s[0];else if(r.randomSampling){if(p.$lte(e.getIn(this.data[s[0]],t,c),e.getIn(this.data[s[1]],t,c))||(l=!1),p.$lte(e.getIn(this.data[s[a-2]],t,c),e.getIn(this.data[s[a-1]],t,c))||(l=!1),l)for(n=Math.floor((a-1)*r.randomSamplingFactor),i=0;i0)&&(this.adaptiveBinaryIndices=!1);try{for(i=0;i0,u=this;try{for(this.startTransaction(),i=0;i0||s>0||l>0){if(e>0)for(r=0;r1)for(i=0;i>1;if(t="number"===typeof t?t:parseInt(t,10),isNaN(t))throw new TypeError("Passed id is not an integer");for(;i[o]>1]f[o];o++)l++;u.values[n]-=l}return}t=t[0]}if(null===(c=this.getBinaryIndexPosition(t,e)))return null;if(u.values.splice(c,1),!0!==r)for(i=u.values.length,n=0;nt&&u.values[n]--},j.prototype.calculateRangeStart=function(t,r,i,n){var a=this.data,s=this.binaryIndices[t].values,l=0,c=s.length-1,u=0;if(0===s.length)return-1;for(e.getIn(a[s[l]],t,n),e.getIn(a[s[c]],t,n);l>1,o.lt(e.getIn(a[s[u]],t,n),r,!1)?l=u+1:c=u;var h=l;return o.aeq(r,e.getIn(a[s[h]],t,n))?h:o.lt(r,e.getIn(a[s[h]],t,n),!1)?i?h:h-1:i?h+1:h},j.prototype.calculateRangeEnd=function(t,r,i){var n=this.data,a=this.binaryIndices[t].values,s=0,l=a.length-1,c=0;if(0===a.length)return-1;for(e.getIn(n[a[s]],t,i),e.getIn(n[a[l]],t,i);s>1,o.lt(r,e.getIn(n[a[c]],t,i),!1)?l=c:s=c+1;var u=l;return o.aeq(r,e.getIn(n[a[u]],t,i))?u:o.gt(r,e.getIn(n[a[u]],t,i),!1)?u+1:o.aeq(r,e.getIn(n[a[u-1]],t,i))?u-1:u},j.prototype.calculateRange=function(t,r,i){var n,a,s,l=this.data,c=this.binaryIndices[r].values,u=c.length-1;if(0===l.length)return[0,-1];var h=-1!==r.indexOf("."),f=e.getIn(l[c[0]],r,h),p=e.getIn(l[c[u]],r,h);switch(t){case"$eq":case"$aeq":case"$dteq":if(o.lt(i,f,!1)||o.gt(i,p,!1))return[0,-1];break;case"$gt":if(o.gt(i,p,!0))return[0,-1];if(o.gt(f,i,!1))return[0,u];break;case"$gte":if(o.gt(i,p,!1))return[0,-1];if(o.gt(f,i,!0))return[0,u];break;case"$lt":if(o.lt(i,f,!0))return[0,-1];if(o.lt(p,i,!1))return[0,u];break;case"$lte":if(o.lt(i,f,!1))return[0,-1];if(o.lt(p,i,!0))return[0,u];break;case"$between":return o.gt(i[0],p,!1)||o.lt(i[1],f,!1)?[0,-1]:((n=this.calculateRangeStart(r,i[0],!1,h))<0&&n++,(s=this.calculateRangeEnd(r,i[1],h))>u&&s--,o.gt(e.getIn(l[c[n]],r,h),i[0],!0)||n++,o.lt(e.getIn(l[c[s]],r,h),i[1],!0)||s--,sT(this.data[r],t,n)&&(e=T(this.data[r],t,n),o.index=this.data[r].$loki):(e=T(this.data[r],t,n),o.index=this.data[r].$loki);return o.value=e,o},j.prototype.extractNumerical=function(t){return this.extract(t).map(D).filter(Number).filter((function(t){return!isNaN(t)}))},j.prototype.avg=function(t){return C(this.extractNumerical(t))},j.prototype.stdDev=function(t){return function(t){var e=C(t),r=C(t.map((function(t){var r=t-e;return r*r})));return Math.sqrt(r)}(this.extractNumerical(t))},j.prototype.mode=function(t){var e,r,i,n={},o=this.extract(t);for(r in o.forEach((function(t){n[t]?n[t]+=1:n[t]=1})),n)e?ee?1:0},setSort:function(t){this.bs=new E(t)},bs:function(){return new E(this.sort)},set:function(t,e){var r=this.bs(this.keys,t);r.found?this.values[r.index]=e:(this.keys.splice(r.index,0,t),this.values.splice(r.index,0,e))},get:function(t){return this.values[$(this.keys,t,this.sort).index]}},N.prototype.keyMap={},N.prototype.lokiMap={},N.prototype.set=function(t){var e=t[this.field];if(null!==e&&"undefined"!==typeof e){if(this.keyMap[e])throw new Error("Duplicate key for property "+this.field+": "+e);this.keyMap[e]=t,this.lokiMap[t.$loki]=e}},N.prototype.get=function(t){return this.keyMap[t]},N.prototype.byId=function(t){return this.keyMap[this.lokiMap[t]]},N.prototype.update=function(t,e){if(this.lokiMap[t.$loki]!==e[this.field]){var r=this.lokiMap[t.$loki];this.set(e),this.keyMap[r]=void 0}else this.keyMap[t[this.field]]=e},N.prototype.remove=function(t){var e=this.keyMap[t];if(null===e||"undefined"===typeof e)throw new Error("Key is not in unique index: "+this.field);this.keyMap[t]=void 0,this.lokiMap[e.$loki]=void 0},N.prototype.clear=function(){this.keyMap={},this.lokiMap={}},_.prototype={set:function(t,e){this.index[t]?this.index[t].push(e):this.index[t]=[e]},remove:function(t,e){var r=this.index[t];for(var i in r)r[i]==e&&r.splice(i,1);r.length<1&&(this.index[t]=void 0)},get:function(t){return this.index[t]},clear:function(t){this.index={}}},g.LokiOps=p,g.Collection=j,g.KeyValueStore=q,g.LokiMemoryAdapter=b,g.LokiPartitioningAdapter=w,g.LokiLocalStorageAdapter=O,g.LokiFsAdapter=I,g.persistenceAdapters={fs:I,localStorage:O},g.aeq=a,g.lt=s,g.gt=l,g.Comparators=o,g}()})?o.apply(e,a):o)||(t.exports=s)}).call(this,r("yLpj"),r("8oxB"))},XqMk:function(t,e,r){"use strict";(function(t){var r="object"==typeof t&&t&&t.Object===Object&&t;e.a=r}).call(this,r("yLpj"))},YZT1:function(t,e){t.exports=function(t,e,r){e||(e=0),"undefined"==typeof r&&(r=t?t.length:0);for(var i=-1,n=r-e||0,o=Array(n<0?0:n);++i=e||r<0||d&&t-c>=o}function I(){var t=p();if(w(t))return O(t);s=setTimeout(I,function(t){var r=e-(t-l);return d?f(r,o-(t-c)):r}(t))}function O(t){return s=void 0,m&&i?g(t):(i=n=void 0,a)}function x(){var t=p(),r=w(t);if(i=arguments,n=this,l=t,r){if(void 0===s)return b(l);if(d)return s=setTimeout(I,e),g(l)}return void 0===s&&(s=setTimeout(I,e)),a}return e=v(e)||0,y(r)&&(u=!!r.leading,o=(d="maxWait"in r)?h(v(r.maxWait)||0,e):o,m="trailing"in r?!!r.trailing:m),x.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=n=s=void 0},x.flush=function(){return void 0===s?a:O(p())},x}function y(t){var e=typeof t;return!!t&&("object"==e||"function"==e)}function v(t){if("number"==typeof t)return t;if(function(t){return"symbol"==typeof t||function(t){return!!t&&"object"==typeof t}(t)&&"[object Symbol]"==u.call(t)}(t))return NaN;if(y(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=y(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(r,"");var s=n.test(t);return s||o.test(t)?a(t.slice(2),s?2:8):i.test(t)?NaN:+t}t.exports=function(t,e,r){var i=!0,n=!0;if("function"!=typeof t)throw new TypeError("Expected a function");return y(r)&&(i="leading"in r?!!r.leading:i,n="trailing"in r?!!r.trailing:n),d(t,e,{leading:i,maxWait:e,trailing:n})}}).call(this,r("yLpj"))},kqvA:function(module,exports,__webpack_require__){(function(global){var require,require,f;f=function(){var define,module,exports;return function t(e,r,i){function n(a,s){if(!r[a]){if(!e[a]){if(!s&&"function"==typeof require&&require)return require(a,!0);if(o)return o(a,!0);var l=new Error("Cannot find module '"+a+"'");throw l.code="MODULE_NOT_FOUND",l}var c=r[a]={exports:{}};e[a][0].call(c.exports,(function(t){return n(e[a][1][t]||t)}),c,c.exports,t,e,r,i)}return r[a].exports}for(var o="function"==typeof require&&require,a=0;a-1,maxTimeout=Math.pow(2,31)-1;isRunningInIE&&(_global.setTimeout=_global.setTimeout,_global.clearTimeout=_global.clearTimeout,_global.setInterval=_global.setInterval,_global.clearInterval=_global.clearInterval,_global.Date=_global.Date),void 0!==_global.setImmediate&&(_global.setImmediate=_global.setImmediate,_global.clearImmediate=_global.clearImmediate);var NOOP=function(){},NOOP_ARRAY=function(){return[]},timeoutResult=_global.setTimeout(NOOP,0),addTimerReturnsObject="object"===typeof timeoutResult,hrtimePresent=_global.process&&"function"===typeof _global.process.hrtime,hrtimeBigintPresent=hrtimePresent&&"function"===typeof _global.process.hrtime.bigint,nextTickPresent=_global.process&&"function"===typeof _global.process.nextTick,performancePresent=_global.performance&&"function"===typeof _global.performance.now,hasPerformancePrototype=_global.Performance&&(typeof _global.Performance).match(/^(function|object)$/),queueMicrotaskPresent=_global.hasOwnProperty("queueMicrotask"),requestAnimationFramePresent=_global.requestAnimationFrame&&"function"===typeof _global.requestAnimationFrame,cancelAnimationFramePresent=_global.cancelAnimationFrame&&"function"===typeof _global.cancelAnimationFrame,requestIdleCallbackPresent=_global.requestIdleCallback&&"function"===typeof _global.requestIdleCallback,cancelIdleCallbackPresent=_global.cancelIdleCallback&&"function"===typeof _global.cancelIdleCallback;_global.clearTimeout(timeoutResult);var NativeDate=_global.Date,uniqueTimerId=1;function isNumberFinite(t){return Number.isFinite?Number.isFinite(t):"number"===typeof t&&isFinite(t)}function parseTime(t){if(!t)return 0;var e,r=t.split(":"),i=r.length,n=i,o=0;if(i>3||!/^(\d\d:){0,2}\d\d?$/.test(t))throw new Error("tick only understands numbers, 'm:s' and 'h:m:s'. Each part must be two digits");for(;n--;){if((e=parseInt(r[n],10))>=60)throw new Error("Invalid time "+t);o+=e*Math.pow(60,i-n-1)}return 1e3*o}function nanoRemainder(t){var e=1e6*t%1e6,r=e<0?e+1e6:e;return Math.floor(r)}function getEpoch(t){if(!t)return 0;if("function"===typeof t.getTime)return t.getTime();if("number"===typeof t)return t;throw new TypeError("now should be milliseconds since UNIX epoch")}function inRange(t,e,r){return r&&r.callAt>=t&&r.callAt<=e}function mirrorDateProperties(t,e){var r;for(r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return e.now?t.now=function(){return t.clock.now}:delete t.now,e.toSource?t.toSource=function(){return e.toSource()}:delete t.toSource,t.toString=function(){return e.toString()},t.prototype=e.prototype,t.parse=e.parse,t.UTC=e.UTC,t.prototype.toUTCString=e.prototype.toUTCString,t}function createDate(){return mirrorDateProperties((function t(e,r,i,n,o,a,s){switch(arguments.length){case 0:return new NativeDate(t.clock.now);case 1:return new NativeDate(e);case 2:return new NativeDate(e,r);case 3:return new NativeDate(e,r,i);case 4:return new NativeDate(e,r,i,n);case 5:return new NativeDate(e,r,i,n,o);case 6:return new NativeDate(e,r,i,n,o,a);default:return new NativeDate(e,r,i,n,o,a,s)}}),NativeDate)}function enqueueJob(t,e){t.jobs||(t.jobs=[]),t.jobs.push(e)}function runJobs(t){if(t.jobs){for(var e=0;et.loopLimit)throw new Error("Aborting after running "+t.loopLimit+" timers, assuming an infinite loop!")}t.jobs=[]}}function addTimer(t,e){if(void 0===e.func)throw new Error("Callback must be provided to timer calls");if(e.type=e.immediate?"Immediate":"Timeout",e.hasOwnProperty("delay")&&(isNumberFinite(e.delay)||(e.delay=0),e.delay=e.delay>maxTimeout?1:e.delay,e.delay=Math.max(0,e.delay)),e.hasOwnProperty("interval")&&(e.type="Interval",e.interval=e.interval>maxTimeout?1:e.interval),e.hasOwnProperty("animation")&&(e.type="AnimationFrame",e.animation=!0),t.timers||(t.timers={}),e.id=uniqueTimerId++,e.createdAt=t.now,e.callAt=t.now+(parseInt(e.delay)||(t.duringTick?1:0)),t.timers[e.id]=e,addTimerReturnsObject){var r={id:e.id,ref:function(){return r},unref:function(){return r},refresh:function(){return r}};return r}return e.id}function compareTimers(t,e){return t.callAte.callAt?1:t.immediate&&!e.immediate?-1:!t.immediate&&e.immediate?1:t.createdAte.createdAt?1:t.ide.id?1:void 0}function firstTimerInRange(t,e,r){var i,n=t.timers,o=null;for(i in n)n.hasOwnProperty(i)&&(!inRange(e,r,n[i])||o&&1!==compareTimers(o,n[i])||(o=n[i]));return o}function firstTimer(t){var e,r=t.timers,i=null;for(e in r)r.hasOwnProperty(e)&&(i&&1!==compareTimers(i,r[e])||(i=r[e]));return i}function lastTimer(t){var e,r=t.timers,i=null;for(e in r)r.hasOwnProperty(e)&&(i&&-1!==compareTimers(i,r[e])||(i=r[e]));return i}function callTimer(clock,timer){"number"===typeof timer.interval?clock.timers[timer.id].callAt+=timer.interval:delete clock.timers[timer.id],"function"===typeof timer.func?timer.func.apply(null,timer.args):eval(timer.func)}function clearTimer(t,e,r){if(e&&(t.timers||(t.timers={}),"object"===typeof e&&(e=e.id),t.timers.hasOwnProperty(e))){var i=t.timers[e];if(i.type!==r){var n="AnimationFrame"===r?"cancelAnimationFrame":"clear"+r,o="AnimationFrame"===i.type?"requestAnimationFrame":"set"+i.type;throw new Error("Cannot clear timer: timer created with "+o+"() but cleared with "+n+"()")}delete t.timers[e]}}function uninstall(t,e,r){var i,n,o;for(n=0,o=t.methods.length;n1e9)throw new TypeError("Number of nanoseconds can't exceed a billion");var l=e[0],c=s-e[1],u=a-l;return c<0&&(c+=1e9,u-=1),[u,c]}return[a,s]}if(n.Date.clock=n,hrtimeBigintPresent&&(a.bigint=function(){var t=a();return BigInt(t[0])*BigInt(1e9)+BigInt(t[1])}),n.requestIdleCallback=function(t,e){var r=0;n.countTimers()>0&&(r=50);var i=addTimer(n,{func:t,args:Array.prototype.slice.call(arguments,2),delay:"undefined"===typeof e?r:Math.min(e,r)});return i.id||i},n.cancelIdleCallback=function(t){return clearTimer(n,t,"Timeout")},n.setTimeout=function(t,e){return addTimer(n,{func:t,args:Array.prototype.slice.call(arguments,2),delay:e})},n.clearTimeout=function(t){return clearTimer(n,t,"Timeout")},n.nextTick=function(t){return enqueueJob(n,{func:t,args:Array.prototype.slice.call(arguments,1)})},n.queueMicrotask=function(t){return n.nextTick(t)},n.setInterval=function(t,e){return e=parseInt(e,10),addTimer(n,{func:t,args:Array.prototype.slice.call(arguments,2),delay:e,interval:e})},n.clearInterval=function(t){return clearTimer(n,t,"Interval")},n.setImmediate=function(t){return addTimer(n,{func:t,args:Array.prototype.slice.call(arguments,1),immediate:!0})},n.clearImmediate=function(t){return clearTimer(n,t,"Immediate")},n.countTimers=function(){return Object.keys(n.timers||{}).length+(n.jobs||[]).length},n.requestAnimationFrame=function(t){var e=addTimer(n,{func:t,delay:o(),args:[n.now+o()],animation:!0});return e.id||e},n.cancelAnimationFrame=function(t){return clearTimer(n,t,"AnimationFrame")},n.runMicrotasks=function(){runJobs(n)},n.tick=function(t){var e="number"===typeof t?t:parseTime(t),i=Math.floor(e),o=nanoRemainder(e),a=r+o,s=n.now+i;if(e<0)throw new TypeError("Negative ticks are not supported");a>=1e6&&(s+=1,a-=1e6),r=a;var l,c,u,h=n.now,f=n.now;for(n.duringTick=!0,u=n.now,runJobs(n),u!==n.now&&(h+=n.now-u,s+=n.now-u),l=firstTimerInRange(n,h,s);l&&h<=s;){if(n.timers[l.id]){h=l.callAt,n.now=l.callAt,u=n.now;try{runJobs(n),callTimer(n,l)}catch(p){c=c||p}u!==n.now&&(h+=n.now-u,s+=n.now-u,f+=n.now-u)}l=firstTimerInRange(n,f,s),f=h}if(u=n.now,runJobs(n),u!==n.now&&(h+=n.now-u,s+=n.now-u),n.duringTick=!1,l=firstTimerInRange(n,h,s))try{n.tick(s-n.now)}catch(p){c=c||p}else n.now=s,r=a;if(c)throw c;return n.now},n.next=function(){runJobs(n);var t=firstTimer(n);if(!t)return n.now;n.duringTick=!0;try{return n.now=t.callAt,callTimer(n,t),runJobs(n),n.now}finally{n.duringTick=!1}},n.runAll=function(){var t;for(runJobs(n),t=0;t1||t instanceof Date||Array.isArray(t)||"number"===typeof t)throw new TypeError("lolex.install called with "+String(t)+" lolex 2.0+ requires an object parameter - see https://github.com/sinonjs/lolex");var e,r;(t="undefined"!==typeof t?t:{}).shouldAdvanceTime=t.shouldAdvanceTime||!1,t.advanceTimeDelta=t.advanceTimeDelta||20;var i=t.target||_global,n=createClock(t.now,t.loopLimit);for(n.uninstall=function(){return uninstall(n,i,t)},n.methods=t.toFake||[],0===n.methods.length&&(n.methods=keys(timers).filter((function(t){return"nextTick"!==t&&"queueMicrotask"!==t}))),e=0,r=n.methods.length;e