Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

feathers-memory

Package Overview
Dependencies
Maintainers
3
Versions
47
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

feathers-memory - npm Package Compare versions

Comparing version 3.0.0 to 3.0.1

15

CHANGELOG.md
# Change Log
## [v3.0.0](https://github.com/feathersjs-ecosystem/feathers-memory/tree/v3.0.0) (2018-12-17)
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-memory/compare/v2.2.0...v3.0.0)
**Closed issues:**
- An in-range update of webpack is breaking the build 🚨 [\#84](https://github.com/feathersjs-ecosystem/feathers-memory/issues/84)
- An in-range update of @feathersjs/errors is breaking the build 🚨 [\#83](https://github.com/feathersjs-ecosystem/feathers-memory/issues/83)
**Merged pull requests:**
- Update to @feathersjs/adapter-commons and drop Node 6 [\#88](https://github.com/feathersjs-ecosystem/feathers-memory/pull/88) ([daffl](https://github.com/daffl))
- Update semistandard to the latest version 🚀 [\#87](https://github.com/feathersjs-ecosystem/feathers-memory/pull/87) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
- Update all dependencies and Webpack build [\#85](https://github.com/feathersjs-ecosystem/feathers-memory/pull/85) ([daffl](https://github.com/daffl))
- Update babel-loader to the latest version 🚀 [\#81](https://github.com/feathersjs-ecosystem/feathers-memory/pull/81) ([greenkeeper[bot]](https://github.com/apps/greenkeeper))
## [v2.2.0](https://github.com/feathersjs-ecosystem/feathers-memory/tree/v2.2.0) (2018-08-26)

@@ -4,0 +19,0 @@ [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-memory/compare/v2.1.3...v2.2.0)

2

dist/feathers-memory.min.js

@@ -1,1 +0,1 @@

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.memory=t():(e.feathers=e.feathers||{},e.feathers.memory=t())}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(6)("@feathersjs/errors");function i(e,t,n,u,a){var c,s,f;(e=e||"Error")instanceof Error?(s=e.message||"Error",e.errors&&(c=e.errors)):"object"===r(e)?(s=e.message||"Error",a=e):s=e,a&&((f=JSON.parse(JSON.stringify(a))).errors?(c=f.errors,delete f.errors):a.errors&&(c=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=s,this.code=n,this.className=u,this.data=f,this.errors=c||{},o("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),o(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,i):this.stack=(new Error).stack}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function a(e,t){i.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){i.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function s(e,t){i.call(this,e,"PaymentError",402,"payment-error",t)}function f(e,t){i.call(this,e,"Forbidden",403,"forbidden",t)}function l(e,t){i.call(this,e,"NotFound",404,"not-found",t)}function p(e,t){i.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){i.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function y(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function d(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function m(e,t){i.call(this,e,"LengthRequired",411,"length-required",t)}function v(e,t){i.call(this,e,"Unprocessable",422,"unprocessable",t)}function g(e,t){i.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){i.call(this,e,"GeneralError",500,"general-error",t)}function C(e,t){i.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){i.call(this,e,"BadGateway",502,"bad-gateway",t)}function k(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}u(i,Error),Object.defineProperty(i.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),u(a,i),u(c,i),u(s,i),u(f,i),u(l,i),u(p,i),u(h,i),u(y,i),u(d,i),u(m,i),u(v,i),u(g,i),u(b,i),u(C,i),u(w,i),u(k,i);var O={FeathersError:i,BadRequest:a,NotAuthenticated:c,PaymentError:s,Forbidden:f,NotFound:l,MethodNotAllowed:p,NotAcceptable:h,Timeout:y,Conflict:d,LengthRequired:m,Unprocessable:v,TooManyRequests:g,GeneralError:b,NotImplemented:C,BadGateway:w,Unavailable:k,400:a,401:c,402:s,403:f,404:l,405:p,406:h,408:y,409:d,411:m,422:v,429:g,500:b,501:C,502:w,503:k};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=O[e.name],n=t?new t(e.message,e.data):new Error(e.message||e);return"object"===r(e)&&Object.assign(n,e),n}},O)},function(e,t,n){var r=n(3),o=n(9);e.exports=Object.assign({},r,{hooks:o})},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var c,s=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?s=c.concat(s):l=-1,s.length&&h())}function h(){if(!f){var e=a(p);f=!0;for(var t=s.length;t;){for(c=s,s=[];++l<t;)c&&c[l].run();l=-1,t=s.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new y(e,t)),1!==s.length||f||a(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(e){function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")};var i=t._={each:function(e,t){e&&"function"==typeof e.forEach?e.forEach(t):i.isObject(e)&&Object.keys(e).forEach(function(n){return t(e[n],n)})},some:function(e,t){return Object.keys(e).map(function(t){return[e[t],t]}).some(function(e){var n=o(e,2),r=n[0],i=n[1];return t(r,i)})},every:function(e,t){return Object.keys(e).map(function(t){return[e[t],t]}).every(function(e){var n=o(e,2),r=n[0],i=n[1];return t(r,i)})},keys:function(e){return Object.keys(e)},values:function(e){return i.keys(e).map(function(t){return e[t]})},isMatch:function(e,t){return i.keys(t).every(function(n){return e[n]===t[n]})},isEmpty:function(e){return 0===i.keys(e).length},isObject:function(e){return"object"===r(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===r(e)&&null!==e},extend:function(){return Object.assign.apply(Object,arguments)},omit:function(e){for(var t=i.extend({},e),n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach(function(e){return delete t[e]}),t},pick:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})},merge:function(e,t){return i.isObject(e)&&i.isObject(t)&&Object.keys(t).forEach(function(r){i.isObject(t[r])?(e[r]||Object.assign(e,n({},r,{})),i.merge(e[r],t[r])):Object.assign(e,n({},r,t[r]))}),e}};t.isPromise=function(e){return i.isObject(e)&&"function"==typeof e.then},t.makeUrl=function(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o="function"==typeof r.get?r.get.bind(r):function(){},i=o("env")||"production",u=o("host")||e.env.HOST_NAME||"localhost",a="development"===i||"test"===i||void 0===i?"http":"https",c=o("port")||e.env.PORT||3030,s="development"===i||"test"===i||void 0===i?":".concat(c):"";return n=n||"","".concat(a,"://").concat(u).concat(s,"/").concat(t.stripSlashes(n))},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol(e):e}}).call(this,n(2))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1)._,i=n(0).BadRequest;function u(e){if(void 0!==e)return Math.abs(parseInt(e,10))}function a(e,t,n,r){return Array.isArray(n)?o.each(n,function(n){void 0!==t[n]&&(e[n]=t[n])}):o.each(n,function(n,o){var i=n(t[o],r);void 0!==i&&(e[o]=i)}),e}var c={$sort:function(e){return"object"!==r(t=e)||Array.isArray(t)?t:Object.keys(t).reduce(function(e,n){return e[n]="object"===r(t[n])?t[n]:parseInt(t[n],10),e},{});var t},$limit:function(e,t){return function(e,t){if(t&&t.default){var n="number"==typeof e?e:t.default,r="number"==typeof t.max?t.max:Number.MAX_VALUE;return Math.min(n,r)}return e}(u(e),t.paginate)},$skip:function(e){return u(e)},$select:function(e){return e}},s=["$in","$nin","$lt","$lte","$gt","$gte","$ne","$or"];e.exports=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.filters,r=void 0===n?{}:n,u=t.operators,f=void 0===u?[]:u,l={};return l.filters=a({},e,c,t),l.filters=a(l.filters,e,r,t),l.query=function e(t,n,r){if(o.isObject(t)&&t.constructor==={}.constructor){var u={};return o.each(t,function(o,a){if("$"===a[0]){if(void 0!==r[a])return;if(!n.includes(a))throw new i("Invalid query parameter ".concat(a),t)}u[a]=e(o,n,r)}),u}return t}(e,s.concat(f),l.filters),l},Object.assign(e.exports,{OPERATORS:s,FILTERS:c})},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function a(e){i(u,r,o,a,c,"next",e)}function c(e){i(u,r,o,a,c,"throw",e)}a(void 0)})}}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=n(0),p=n(1)._,h=n(10),y=h.sorter,d=h.select,m=h.AdapterService,v=n(13).default,g=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return d.apply(void 0,n)(JSON.parse(JSON.stringify(e)))},b=function(e){function t(){var e,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),(e=c(this,s(t).call(this,p.extend({id:"id",matcher:v,sorter:y},n)))).store=n.store||{},e._uId=n.startId||0,e}var n,r,i,h,d,b,C,w,k;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,m),n=t,(r=[{key:"getEntries",value:(k=u(regeneratorRuntime.mark(function e(t){var n,r;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return n=this.filterQuery(t),r=n.query,e.abrupt("return",this._find(Object.assign({},t,{paginate:!1,query:r})));case 2:case"end":return e.stop()}},e,this)})),function(e){return k.apply(this,arguments)})},{key:"_find",value:(w=u(regeneratorRuntime.mark(function e(t){var n,r,o,i,u,a,c;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=this.filterQuery(t),r=n.query,o=n.filters,i=n.paginate,u=p.values(this.store).filter(this.options.matcher(r)),a=u.length,void 0!==o.$sort&&u.sort(this.options.sorter(o.$sort)),void 0!==o.$skip&&(u=u.slice(o.$skip)),void 0!==o.$limit&&(u=u.slice(0,o.$limit)),c={total:a,limit:o.$limit,skip:o.$skip||0,data:u.map(function(e){return g(e,t)})},i&&i.default){e.next=9;break}return e.abrupt("return",c.data);case 9:return e.abrupt("return",c);case 10:case"end":return e.stop()}},e,this)})),function(e){return w.apply(this,arguments)})},{key:"_get",value:(C=u(regeneratorRuntime.mark(function e(t){var n,r,o,i,u=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=1<u.length&&void 0!==u[1]?u[1]:{},!(t in this.store)){e.next=6;break}if(r=this.filterQuery(n),o=r.query,i=this.store[t],this.options.matcher(o)(i))return e.abrupt("return",g(i,n,this.id));e.next=6;break;case 6:throw new l.NotFound("No record found for id '".concat(t,"'"));case 7:case"end":return e.stop()}},e,this)})),function(e){return C.apply(this,arguments)})},{key:"_create",value:(b=u(regeneratorRuntime.mark(function e(t,n){var r,i,u,a=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(Array.isArray(t))return e.abrupt("return",Promise.all(t.map(function(e){return a._create(e,n)})));e.next=2;break;case 2:return r=t[this.id]||this._uId++,i=p.extend({},t,o({},this.id,r)),u=this.store[r]=i,e.abrupt("return",g(u,n,this.id));case 6:case"end":return e.stop()}},e,this)})),function(e,t){return b.apply(this,arguments)})},{key:"_update",value:(d=u(regeneratorRuntime.mark(function e(t,n,r){var i,u;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this._get(t);case 2:return i=e.sent,u=i[this.id],t=u==t?u:t,this.store[t]=p.extend({},n,o({},this.id,t)),e.abrupt("return",this._get(t,r));case 7:case"end":return e.stop()}},e,this)})),function(e,t,n){return d.apply(this,arguments)})},{key:"_patch",value:(h=u(regeneratorRuntime.mark(function e(t,n,r){var o,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t)return e.next=3,this.getEntries(r);e.next=5;break;case 3:return o=e.sent,e.abrupt("return",Promise.all(o.map(function(e){return i._patch(e[i.id],n,r)})));case 5:return e.next=7,this._get(t,r);case 7:return this.store[t]=p.extend(this.store[t],p.omit(n,this.id)),e.abrupt("return",this._get(t,r));case 9:case"end":return e.stop()}},e,this)})),function(e,t,n){return h.apply(this,arguments)})},{key:"_remove",value:(i=u(regeneratorRuntime.mark(function e(t,n){var r,o,i=this;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(null===t)return e.next=3,this.getEntries(n);e.next=5;break;case 3:return r=e.sent,e.abrupt("return",Promise.all(r.map(function(e){return i._remove(e[i.id],n)})));case 5:return e.next=7,this._get(t,n);case 7:return o=e.sent,delete this.store[t],e.abrupt("return",o);case 10:case"end":return e.stop()}},e,this)})),function(e,t){return i.apply(this,arguments)})}])&&a(n.prototype,r),t}();e.exports=function(e){return new b(e)},e.exports.Service=b},function(e,t,n){(function(r){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":o(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))}),t.splice(o,0,n)}},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(7)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var u=r,a=Number(new Date),c=a-(n||a);u.diff=c,u.prev=n,u.curr=a,n=a,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;s++;var r=o.formatters[n];if("function"==typeof r){var i=t[s];e=r.call(u,i),t.splice(s,1),s--}return e}),o.formatArgs.call(u,t),(u.log||o.log).apply(u,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=u,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function u(e,t){return o(this.namespace+(void 0===t?":":t)+e)}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((o.debug=o).default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},o.disable=function(){var e=[].concat(r(o.names.map(a)),r(o.skips.map(a).map(function(e){return"-"+e}))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(8),Object.keys(e).forEach(function(t){o[t]=e[t]}),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t){var n=36e5,r=864e5;function o(e,t,n,r){var o=1.5*n<=t;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var i=typeof e;if("string"===i&&0<e.length)return function(e){if(!(100<(e=String(e)).length)){var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*o;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===i&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);return r<=t?o(e,t,r,"day"):n<=t?o(e,t,n,"hour"):6e4<=t?o(e,t,6e4,"minute"):1e3<=t?o(e,t,1e3,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return r<=t?Math.round(e/r)+"d":n<=t?Math.round(e/n)+"h":6e4<=t?Math.round(e/6e4)+"m":1e3<=t?Math.round(e/1e3)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(3),i=o._,u=i.each,a=i.pick,c=o.createSymbol,s=c("__feathersSkipHooks");t.SKIP=s,t.ACTIVATE_HOOKS=c("__feathersActivateHooks"),t.createHookObject=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n={};return Object.defineProperty(n,"toJSON",{value:function(){return a(this,"type","method","path","params","id","data","result","error")}}),Object.assign(n,t,{method:e,get path(){var e=t.app,n=t.service;return n&&e&&e.services?Object.keys(e.services).find(function(t){return e.services[t]===n}):null}})},t.defaultMakeArguments=function(e){var t=[];return void 0!==e.id&&t.push(e.id),e.data&&t.push(e.data),t.push(e.params||{}),t},t.makeArguments=function(e){switch(e.method){case"find":return[e.params];case"get":case"remove":return[e.id,e.params];case"update":case"patch":return[e.id,e.data,e.params];case"create":return[e.data,e.params]}return t.defaultMakeArguments(e)},t.convertHookData=function(e){var t={};return Array.isArray(e)?t={all:e}:"object"!==r(e)?t={all:[e]}:u(e,function(e,n){t[n]=Array.isArray(e)?e:[e]}),t},t.isHookObject=function(e){return"object"===r(e)&&"string"==typeof e.method&&"string"==typeof e.type},t.getHooks=function(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],i=e.__hooks[n][r]||[],u=t.__hooks[n][r]||[];return o?u.concat(i):i.concat(u)},t.processHooks=function(e,n){var r=this,o=n,i=function(e){if(e){if(e===s)return s;if(!t.isHookObject(e))throw new Error("".concat(o.type," hook for '").concat(o.method,"' method returned invalid hook object"));o=e}return o};return e.reduce(function(e,t){var n=t.bind(r);return(e=2===n.length?e.then(function(e){return e===s?s:new Promise(function(t,r){n(e,function(e,n){return e?r(e):t(n)})})}):e.then(function(e){return e===s?s:n(e)})).then(i)},Promise.resolve(o)).then(function(){return o}).catch(function(e){throw e.hook=o,e})},t.enableHooks=function(e,n,r){if("function"==typeof e.hooks)return e;var o={};return r.forEach(function(e){o[e]={}}),Object.defineProperty(e,"__hooks",{value:o}),Object.assign(e,{hooks:function(e){var r=this;return u(e,function(e,o){if(!r.__hooks[o])throw new Error("'".concat(o,"' is not a valid hook type"));var i=t.convertHookData(e);u(i,function(e,t){if("all"!==t&&-1===n.indexOf(t))throw new Error("'".concat(t,"' is not a valid hook method"))}),n.forEach(function(e){var t=r.__hooks[o][e]||(r.__hooks[o][e]=[]);i.all&&t.push.apply(t,i.all),i[e]&&t.push.apply(t,i[e])})}),this}})}},function(e,t,n){var r=n(1)._,o=n(11),i=n(4),u=n(12);e.exports=Object.assign({select:function(e){for(var t=e&&e.query&&e.query.$select,n=arguments.length,o=new Array(1<n?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];Array.isArray(t)&&o.length&&t.push.apply(t,o);var u=function(e){return Array.isArray(t)?r.pick.apply(r,[e].concat(function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(t))):e};return function(e){return Array.isArray(e)?e.map(u):u(e)}},filterQuery:i,AdapterService:o},u)},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(0),i=o.NotImplemented,u=o.BadRequest,a=o.MethodNotAllowed,c=n(4),s=function(e,t){if("function"!=typeof e[t])return Promise.reject(new i("Method ".concat(t," not available")));for(var n=arguments.length,r=new Array(2<n?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e[t].apply(e,r)},f=function(e,t){if(!0!==t)return!!Array.isArray(t)&&t.includes(e)};e.exports=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=Object.assign({events:[],paginate:{},multi:!1},t)}var t,n;return t=e,(n=[{key:"filterQuery",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==e.paginate?e.paginate:this.options.paginate,r=e.query,o=void 0===r?{}:r,i=Object.assign({operators:this.options.whitelist||[],filters:this.options.filters,paginate:n},t),u=c(o,i);return Object.assign(u,{paginate:n})}},{key:"find",value:function(e){return s(this,"_find",e)}},{key:"get",value:function(e,t){return s(this,"_get",e,t)}},{key:"create",value:function(e,t){return Array.isArray(e)&&!f("create",this.options.multi)?Promise.reject(new a("Can not create multiple entries")):s(this,"_create",e,t)}},{key:"update",value:function(e,t,n){return null===e||Array.isArray(t)?Promise.reject(new u("You can not replace multiple instances. Did you mean 'patch'?")):s(this,"_update",e,t,n)}},{key:"patch",value:function(e,t,n){return null!==e||f("patch",this.options.multi)?s(this,"_patch",e,t,n):Promise.reject(new a("Can not patch multiple entries"))}},{key:"remove",value:function(e,t,n){return null!==e||f("remove",this.options.multi)?s(this,"_remove",e,t,n):Promise.reject(new a("Can not remove multiple entries"))}},{key:"id",get:function(){return this.options.id}},{key:"events",get:function(){return this.options.events}}])&&r(t.prototype,n),e}()},function(e,t){t.compareNSB=function(e,t){return e<t?-1:t<e?1:0},t.compareArrays=function(e,n){var r,o;for(r=0;r<Math.min(e.length,n.length);r+=1)if(0!==(o=t.compare(e[r],n[r])))return o;return t.compareNSB(e.length,n.length)},t.compare=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.compareNSB,o=t,i=o.compareNSB,u=o.compare,a=o.compareArrays;if(void 0===e)return void 0===n?0:-1;if(void 0===n)return void 0===e?0:1;if(null===e)return null===n?0:-1;if(null===n)return null===e?0:1;if("number"==typeof e)return"number"==typeof n?i(e,n):-1;if("number"==typeof n)return"number"==typeof e?i(e,n):1;if("string"==typeof e)return"string"==typeof n?r(e,n):-1;if("string"==typeof n)return"string"==typeof e?r(e,n):1;if("boolean"==typeof e)return"boolean"==typeof n?i(e,n):-1;if("boolean"==typeof n)return"boolean"==typeof e?i(e,n):1;if(e instanceof Date)return n instanceof Date?i(e.getTime(),n.getTime()):-1;if(n instanceof Date)return e instanceof Date?i(e.getTime(),n.getTime()):1;if(Array.isArray(e))return Array.isArray(n)?a(e,n):-1;if(Array.isArray(n))return Array.isArray(e)?a(e,n):1;for(var c=Object.keys(e).sort(),s=Object.keys(n).sort(),f=0,l=0;l<Math.min(c.length,s.length);l+=1)if(0!==(f=u(e[c[l]],n[s[l]])))return f;return i(c.length,s.length)},t.sorter=function(e){var n=Object.keys(e).map(function(t){return{key:t,direction:e[t]}});return function(e,r){for(var o,i=0;i<n.length;i++){var u=n[i];if(0!=(o=u.direction*t.compare(e[u.key],r[u.key])))return o}return 0}}},function(e,t,n){"use strict";function r(e){return"function"==typeof e}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e instanceof Date?e.getTime():o(e)?e.map(i):e&&"function"==typeof e.toJSON?e.toJSON():e}function u(e,t){return r(e.get)?e.get(t):e[t]}function a(e){return function(t,n){if(!o(n)||!n.length)return e(t,n);for(var r=0,i=n.length;r<i;r++)if(e(t,u(n,r)))return!0;return!1}}function c(e,t,n,r){return e.v(e.a,t,n,r)}n.r(t),n.d(t,"default",function(){return v}),n.d(t,"indexOf",function(){return g}),n.d(t,"compare",function(){return b});var s,f={$eq:a(function(e,t){return e(t)}),$ne:(s=function(e,t){return!e(t)},function(e,t){if(!o(t)||!t.length)return s(e,t);for(var n=0,r=t.length;n<r;n++)if(!s(e,u(t,n)))return!1;return!0}),$gt:a(function(e,t){return 0<b(i(t),e)}),$gte:a(function(e,t){return 0<=b(i(t),e)}),$lt:a(function(e,t){return b(i(t),e)<0}),$lte:a(function(e,t){return b(i(t),e)<=0}),$mod:a(function(e,t){return t%e[0]==e[1]}),$in:function(e,t){if(!(t instanceof Array)){var n=i(t);if(n===t&&"object"==typeof t)for(o=e.length;o--;)if(String(e[o])===String(t)&&"[object Object]"!==String(t))return!0;if(void 0===n)for(o=e.length;o--;)if(null==e[o])return!0;for(o=e.length;o--;){var r=c(m(u(e,o),void 0),t,o,e);if(r&&"[object Object]"!==String(r)&&"[object Object]"!==String(t))return!0}return!!~e.indexOf(n)}for(var o=t.length;o--;)if(~e.indexOf(i(u(t,o))))return!0;return!1},$nin:function(e,t,n,r){return!f.$in(e,t,n,r)},$not:function(e,t,n,r){return!c(e,t,n,r)},$type:function(e,t){return null!=t&&(t instanceof e||t.constructor==e)},$all:function(e,t,n,r){return f.$and(e,t,n,r)},$size:function(e,t){return!!t&&e===t.length},$or:function(e,t,n,r){for(var o=0,i=e.length;o<i;o++)if(c(u(e,o),t,n,r))return!0;return!1},$nor:function(e,t,n,r){return!f.$or(e,t,n,r)},$and:function(e,t,n,r){for(var o=0,i=e.length;o<i;o++)if(!c(u(e,o),t,n,r))return!1;return!0},$regex:a(function(e,t){return"string"==typeof t&&e.test(t)}),$where:function(e,t,n,r){return e.call(t,t,n,r)},$elemMatch:function(e,t,n,r){return o(t)?!!~p(t,e):c(e,t,n,r)},$exists:function(e,t,n,r){return r.hasOwnProperty(n)===e}},l={$eq:function(e){return e instanceof RegExp?function(t){return"string"==typeof t&&e.test(t)}:e instanceof Function?e:o(e)&&!e.length?function(e){return o(e)&&!e.length}:null===e?function(e){return null==e}:function(t){return 0===b(i(t),i(e))}},$ne:function(e){return l.$eq(e)},$and:function(e){return e.map(d)},$all:function(e){return l.$and(e)},$or:function(e){return e.map(d)},$nor:function(e){return e.map(d)},$not:function(e){return d(e)},$regex:function(e,t){return new RegExp(e,t.$options)},$where:function(e){return"string"==typeof e?new Function("obj","return "+e):e},$elemMatch:function(e){return d(e)},$exists:function(e){return!!e}};function p(e,t){for(var n=0;n<e.length;n++)if(u(e,n),c(t,u(e,n)))return n;return-1}function h(e,t){return{a:e,v:t}}function y(e,t){var n=[];if(function e(t,n,r,i,a){if(r!==n.length&&null!=t){var c=u(n,r);if(o(t)&&isNaN(Number(c)))for(var s=0,f=t.length;s<f;s++)e(u(t,s),n,r,t,a);else e(u(t,c),n,r+1,t,a)}else a.push([t,n[r-1],i])}(t,e.k,0,t,n),1===n.length){var r=n[0];return c(e.nv,r[0],r[1],r[2])}for(var i=e&&e.q&&void 0!==e.q.$ne,a=i,s=0;s<n.length;s++){var f=n[s],l=c(e.nv,f[0],f[1],f[2]);i?a&=l:a|=l}return a}function d(e){var t;(e=i(e))&&(t=e)&&t.constructor===Object||(e={$eq:e});var n=[];for(var r in e){var o=e[r];if("$options"!==r)if(f[r])l[r]&&(o=l[r](o,e)),n.push(h(i(o),f[r]));else{if(36===r.charCodeAt(0))throw new Error("Unknown operation "+r);n.push({a:{k:r.split("."),nv:d(o),q:o},v:y})}}return 1===n.length?n[0]:h(n,f.$and)}function m(e,t){var n=d(e);return t&&(n={a:n,v:function(e,n,r,o){return c(e,t(n),r,o)}}),n}function v(e,t,n){r(t)&&(n=t,t=void 0);var o=m(e,n);function i(e,t,n){return c(o,e,t,n)}return t?t.filter(i):i}function g(e,t,n){return p(t,m(e,n))}function b(e,t){if(e===t)return 0;if(typeof e==typeof t){if(t<e)return 1;if(e<t)return-1}}}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.memory=t():(e.feathers=e.feathers||{},e.feathers.memory=t())}(window,function(){return function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}return n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=5)}([function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(6)("@feathersjs/errors");function i(e,t,n,u,a){var c,s,f;(e=e||"Error")instanceof Error?(s=e.message||"Error",e.errors&&(c=e.errors)):"object"===r(e)?(s=e.message||"Error",a=e):s=e,a&&((f=JSON.parse(JSON.stringify(a))).errors?(c=f.errors,delete f.errors):a.errors&&(c=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=s,this.code=n,this.className=u,this.data=f,this.errors=c||{},o("".concat(this.name,"(").concat(this.code,"): ").concat(this.message)),o(this.errors),Error.captureStackTrace?Error.captureStackTrace(this,i):this.stack=(new Error).stack}function u(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function a(e,t){i.call(this,e,"BadRequest",400,"bad-request",t)}function c(e,t){i.call(this,e,"NotAuthenticated",401,"not-authenticated",t)}function s(e,t){i.call(this,e,"PaymentError",402,"payment-error",t)}function f(e,t){i.call(this,e,"Forbidden",403,"forbidden",t)}function l(e,t){i.call(this,e,"NotFound",404,"not-found",t)}function p(e,t){i.call(this,e,"MethodNotAllowed",405,"method-not-allowed",t)}function h(e,t){i.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function y(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function d(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function m(e,t){i.call(this,e,"LengthRequired",411,"length-required",t)}function v(e,t){i.call(this,e,"Unprocessable",422,"unprocessable",t)}function g(e,t){i.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function b(e,t){i.call(this,e,"GeneralError",500,"general-error",t)}function C(e,t){i.call(this,e,"NotImplemented",501,"not-implemented",t)}function w(e,t){i.call(this,e,"BadGateway",502,"bad-gateway",t)}function k(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}u(i,Error),Object.defineProperty(i.prototype,"toJSON",{value:function(){return{name:this.name,message:this.message,code:this.code,className:this.className,data:this.data,errors:this.errors}}}),u(a,i),u(c,i),u(s,i),u(f,i),u(l,i),u(p,i),u(h,i),u(y,i),u(d,i),u(m,i),u(v,i),u(g,i),u(b,i),u(C,i),u(w,i),u(k,i);var O={FeathersError:i,BadRequest:a,NotAuthenticated:c,PaymentError:s,Forbidden:f,NotFound:l,MethodNotAllowed:p,NotAcceptable:h,Timeout:y,Conflict:d,LengthRequired:m,Unprocessable:v,TooManyRequests:g,GeneralError:b,NotImplemented:C,BadGateway:w,Unavailable:k,400:a,401:c,402:s,403:f,404:l,405:p,406:h,408:y,409:d,411:m,422:v,429:g,500:b,501:C,502:w,503:k};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=O[e.name],n=t?new t(e.message,e.data):new Error(e.message||e);return"object"===r(e)&&Object.assign(n,e),n}},O)},function(e,t,n){var r=n(3),o=n(9);e.exports=Object.assign({},r,{hooks:o})},function(e,t){var n,r,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(e){if(n===setTimeout)return setTimeout(e,0);if((n===i||!n)&&setTimeout)return n=setTimeout,setTimeout(e,0);try{return n(e,0)}catch(t){try{return n.call(null,e,0)}catch(t){return n.call(this,e,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:i}catch(e){n=i}try{r="function"==typeof clearTimeout?clearTimeout:u}catch(e){r=u}}();var c,s=[],f=!1,l=-1;function p(){f&&c&&(f=!1,c.length?s=c.concat(s):l=-1,s.length&&h())}function h(){if(!f){var e=a(p);f=!0;for(var t=s.length;t;){for(c=s,s=[];++l<t;)c&&c[l].run();l=-1,t=s.length}c=null,f=!1,function(e){if(r===clearTimeout)return clearTimeout(e);if((r===u||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(e);try{r(e)}catch(t){try{return r.call(null,e)}catch(t){return r.call(this,e)}}}(e)}}function y(e,t){this.fun=e,this.array=t}function d(){}o.nextTick=function(e){var t=new Array(arguments.length-1);if(1<arguments.length)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];s.push(new y(e,t)),1!==s.length||f||a(h)},y.prototype.run=function(){this.fun.apply(null,this.array)},o.title="browser",o.browser=!0,o.env={},o.argv=[],o.version="",o.versions={},o.on=d,o.addListener=d,o.once=d,o.off=d,o.removeListener=d,o.removeAllListeners=d,o.emit=d,o.prependListener=d,o.prependOnceListener=d,o.listeners=function(e){return[]},o.binding=function(e){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(e){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(e,t,n){(function(e){function n(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=[],r=!0,o=!1,i=void 0;try{for(var u,a=e[Symbol.iterator]();!(r=(u=a.next()).done)&&(n.push(u.value),!t||n.length!==t);r=!0);}catch(e){o=!0,i=e}finally{try{r||null==a.return||a.return()}finally{if(o)throw i}}return n}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")};var i=t._={each:function(e,t){e&&"function"==typeof e.forEach?e.forEach(t):i.isObject(e)&&Object.keys(e).forEach(function(n){return t(e[n],n)})},some:function(e,t){return Object.keys(e).map(function(t){return[e[t],t]}).some(function(e){var n=o(e,2),r=n[0],i=n[1];return t(r,i)})},every:function(e,t){return Object.keys(e).map(function(t){return[e[t],t]}).every(function(e){var n=o(e,2),r=n[0],i=n[1];return t(r,i)})},keys:function(e){return Object.keys(e)},values:function(e){return i.keys(e).map(function(t){return e[t]})},isMatch:function(e,t){return i.keys(t).every(function(n){return e[n]===t[n]})},isEmpty:function(e){return 0===i.keys(e).length},isObject:function(e){return"object"===r(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===r(e)&&null!==e},extend:function(){return Object.assign.apply(Object,arguments)},omit:function(e){for(var t=i.extend({},e),n=arguments.length,r=new Array(1<n?n-1:0),o=1;o<n;o++)r[o-1]=arguments[o];return r.forEach(function(e){return delete t[e]}),t},pick:function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return n.reduce(function(t,n){return void 0!==e[n]&&(t[n]=e[n]),t},{})},merge:function(e,t){return i.isObject(e)&&i.isObject(t)&&Object.keys(t).forEach(function(r){i.isObject(t[r])?(e[r]||Object.assign(e,n({},r,{})),i.merge(e[r],t[r])):Object.assign(e,n({},r,t[r]))}),e}};t.isPromise=function(e){return i.isObject(e)&&"function"==typeof e.then},t.makeUrl=function(n){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o="function"==typeof r.get?r.get.bind(r):function(){},i=o("env")||"production",u=o("host")||e.env.HOST_NAME||"localhost",a="development"===i||"test"===i||void 0===i?"http":"https",c=o("port")||e.env.PORT||3030,s="development"===i||"test"===i||void 0===i?":".concat(c):"";return n=n||"","".concat(a,"://").concat(u).concat(s,"/").concat(t.stripSlashes(n))},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol(e):e}}).call(this,n(2))},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(1)._,i=n(0).BadRequest;function u(e){if(void 0!==e)return Math.abs(parseInt(e,10))}function a(e,t,n,r){return Array.isArray(n)?o.each(n,function(n){void 0!==t[n]&&(e[n]=t[n])}):o.each(n,function(n,o){var i=n(t[o],r);void 0!==i&&(e[o]=i)}),e}var c={$sort:function(e){return"object"!==r(t=e)||Array.isArray(t)?t:Object.keys(t).reduce(function(e,n){return e[n]="object"===r(t[n])?t[n]:parseInt(t[n],10),e},{});var t},$limit:function(e,t){return function(e,t){if(t&&t.default){var n="number"==typeof e?e:t.default,r="number"==typeof t.max?t.max:Number.MAX_VALUE;return Math.min(n,r)}return e}(u(e),t.paginate)},$skip:function(e){return u(e)},$select:function(e){return e}},s=["$in","$nin","$lt","$lte","$gt","$gte","$ne","$or"];e.exports=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=t.filters,r=void 0===n?{}:n,u=t.operators,f=void 0===u?[]:u,l={};return l.filters=a({},e,c,t),l.filters=a(l.filters,e,r,t),l.query=function e(t,n,r){if(o.isObject(t)&&t.constructor==={}.constructor){var u={};return o.each(t,function(o,a){if("$"===a[0]){if(void 0!==r[a])return;if(!n.includes(a))throw new i("Invalid query parameter ".concat(a),t)}u[a]=e(o,n,r)}),u}return t}(e,s.concat(f),l.filters),l},Object.assign(e.exports,{OPERATORS:s,FILTERS:c})},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function o(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function i(e,t,n,r,o,i,u){try{var a=e[i](u),c=a.value}catch(e){return void n(e)}a.done?t(c):Promise.resolve(c).then(r,o)}function u(e){return function(){var t=this,n=arguments;return new Promise(function(r,o){var u=e.apply(t,n);function a(e){i(u,r,o,a,c,"next",e)}function c(e){i(u,r,o,a,c,"throw",e)}a(void 0)})}}function a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}function c(e,t){return!t||"object"!==r(t)&&"function"!=typeof t?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e):t}function s(e){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}function f(e,t){return(f=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}var l=n(0),p=n(1)._,h=n(10),y=h.sorter,d=h.select,m=h.AdapterService,v=n(13).default,g=function(e){for(var t=arguments.length,n=new Array(1<t?t-1:0),r=1;r<t;r++)n[r-1]=arguments[r];return d.apply(void 0,n)(JSON.parse(JSON.stringify(e)))},b=function(e){function t(){var e,n=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(e,n){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),(e=c(this,s(t).call(this,p.extend({id:"id",matcher:v,sorter:y},n)))).store=n.store||{},e._uId=n.startId||0,e}var n,r,i,h,d,b,C,w,k;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&f(e,t)}(t,m),n=t,(r=[{key:"getEntries",value:(k=u(regeneratorRuntime.mark(function e(){var t,n,r,o=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return t=0<o.length&&void 0!==o[0]?o[0]:{},n=this.filterQuery(t),r=n.query,e.abrupt("return",this._find(Object.assign({},t,{paginate:!1,query:r})));case 3:case"end":return e.stop()}},e,this)})),function(){return k.apply(this,arguments)})},{key:"_find",value:(w=u(regeneratorRuntime.mark(function e(){var t,n,r,o,i,u,a,c,s=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(t=0<s.length&&void 0!==s[0]?s[0]:{},n=this.filterQuery(t),r=n.query,o=n.filters,i=n.paginate,u=p.values(this.store).filter(this.options.matcher(r)),a=u.length,void 0!==o.$sort&&u.sort(this.options.sorter(o.$sort)),void 0!==o.$skip&&(u=u.slice(o.$skip)),void 0!==o.$limit&&(u=u.slice(0,o.$limit)),c={total:a,limit:o.$limit,skip:o.$skip||0,data:u.map(function(e){return g(e,t)})},i&&i.default){e.next=10;break}return e.abrupt("return",c.data);case 10:return e.abrupt("return",c);case 11:case"end":return e.stop()}},e,this)})),function(){return w.apply(this,arguments)})},{key:"_get",value:(C=u(regeneratorRuntime.mark(function e(t){var n,r,o,i,u=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=1<u.length&&void 0!==u[1]?u[1]:{},!(t in this.store)){e.next=6;break}if(r=this.filterQuery(n),o=r.query,i=this.store[t],this.options.matcher(o)(i))return e.abrupt("return",g(i,n,this.id));e.next=6;break;case 6:throw new l.NotFound("No record found for id '".concat(t,"'"));case 7:case"end":return e.stop()}},e,this)})),function(e){return C.apply(this,arguments)})},{key:"_create",value:(b=u(regeneratorRuntime.mark(function e(t){var n,r,i,u,a=this,c=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=1<c.length&&void 0!==c[1]?c[1]:{},Array.isArray(t))return e.abrupt("return",Promise.all(t.map(function(e){return a._create(e,n)})));e.next=3;break;case 3:return r=t[this.id]||this._uId++,i=p.extend({},t,o({},this.id,r)),u=this.store[r]=i,e.abrupt("return",g(u,n,this.id));case 7:case"end":return e.stop()}},e,this)})),function(e){return b.apply(this,arguments)})},{key:"_update",value:(d=u(regeneratorRuntime.mark(function e(t,n){var r,i,u,a=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return r=2<a.length&&void 0!==a[2]?a[2]:{},e.next=3,this._get(t);case 3:return i=e.sent,u=i[this.id],t=u==t?u:t,this.store[t]=p.extend({},n,o({},this.id,t)),e.abrupt("return",this._get(t,r));case 8:case"end":return e.stop()}},e,this)})),function(e,t){return d.apply(this,arguments)})},{key:"_patch",value:(h=u(regeneratorRuntime.mark(function e(t,n){var r,o,i=this,u=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(r=2<u.length&&void 0!==u[2]?u[2]:{},null===t)return e.next=4,this.getEntries(r);e.next=6;break;case 4:return o=e.sent,e.abrupt("return",Promise.all(o.map(function(e){return i._patch(e[i.id],n,r)})));case 6:return e.next=8,this._get(t,r);case 8:return this.store[t]=p.extend(this.store[t],p.omit(n,this.id)),e.abrupt("return",this._get(t,r));case 10:case"end":return e.stop()}},e,this)})),function(e,t){return h.apply(this,arguments)})},{key:"_remove",value:(i=u(regeneratorRuntime.mark(function e(t){var n,r,o,i=this,u=arguments;return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(n=1<u.length&&void 0!==u[1]?u[1]:{},null===t)return e.next=4,this.getEntries(n);e.next=6;break;case 4:return r=e.sent,e.abrupt("return",Promise.all(r.map(function(e){return i._remove(e[i.id],n)})));case 6:return e.next=8,this._get(t,n);case 8:return o=e.sent,delete this.store[t],e.abrupt("return",o);case 11:case"end":return e.stop()}},e,this)})),function(e){return i.apply(this,arguments)})}])&&a(n.prototype,r),t}();e.exports=function(e){return new b(e)},e.exports.Service=b},function(e,t,n){(function(r){function o(e){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}t.log=function(){var e;return"object"===("undefined"==typeof console?"undefined":o(console))&&console.log&&(e=console).log.apply(e,arguments)},t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");var r=0,o=0;t[0].replace(/%[a-zA-Z%]/g,function(e){"%%"!==e&&(r++,"%c"===e&&(o=r))}),t.splice(o,0,n)}},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){var e;try{e=t.storage.getItem("debug")}catch(e){}return!e&&void 0!==r&&"env"in r&&(e=r.env.DEBUG),e},t.useColors=function(){return!("undefined"==typeof window||!window.process||"renderer"!==window.process.type&&!window.process.__nwjs)||("undefined"==typeof navigator||!navigator.userAgent||!navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))&&("undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&31<=parseInt(RegExp.$1,10)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/))},t.storage=function(){try{return localStorage}catch(e){}}(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],e.exports=n(7)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,n(2))},function(e,t,n){function r(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}e.exports=function(e){function t(e){for(var t=0,n=0;n<e.length;n++)t=(t<<5)-t+e.charCodeAt(n),t|=0;return o.colors[Math.abs(t)%o.colors.length]}function o(e){var n;function r(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];if(r.enabled){var u=r,a=Number(new Date),c=a-(n||a);u.diff=c,u.prev=n,u.curr=a,n=a,t[0]=o.coerce(t[0]),"string"!=typeof t[0]&&t.unshift("%O");var s=0;t[0]=t[0].replace(/%([a-zA-Z%])/g,function(e,n){if("%%"===e)return e;s++;var r=o.formatters[n];if("function"==typeof r){var i=t[s];e=r.call(u,i),t.splice(s,1),s--}return e}),o.formatArgs.call(u,t),(u.log||o.log).apply(u,t)}}return r.namespace=e,r.enabled=o.enabled(e),r.useColors=o.useColors(),r.color=t(e),r.destroy=i,r.extend=u,"function"==typeof o.init&&o.init(r),o.instances.push(r),r}function i(){var e=o.instances.indexOf(this);return-1!==e&&(o.instances.splice(e,1),!0)}function u(e,t){return o(this.namespace+(void 0===t?":":t)+e)}function a(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((o.debug=o).default=o).coerce=function(e){return e instanceof Error?e.stack||e.message:e},o.disable=function(){var e=[].concat(r(o.names.map(a)),r(o.skips.map(a).map(function(e){return"-"+e}))).join(",");return o.enable(""),e},o.enable=function(e){var t;o.save(e),o.names=[],o.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),r=n.length;for(t=0;t<r;t++)n[t]&&("-"===(e=n[t].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+e.substr(1)+"$")):o.names.push(new RegExp("^"+e+"$")));for(t=0;t<o.instances.length;t++){var i=o.instances[t];i.enabled=o.enabled(i.namespace)}},o.enabled=function(e){if("*"===e[e.length-1])return!0;var t,n;for(t=0,n=o.skips.length;t<n;t++)if(o.skips[t].test(e))return!1;for(t=0,n=o.names.length;t<n;t++)if(o.names[t].test(e))return!0;return!1},o.humanize=n(8),Object.keys(e).forEach(function(t){o[t]=e[t]}),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=t,o.enable(o.load()),o}},function(e,t){var n=36e5,r=864e5;function o(e,t,n,r){var o=1.5*n<=t;return Math.round(e/n)+" "+r+(o?"s":"")}e.exports=function(e,t){t=t||{};var i=typeof e;if("string"===i&&0<e.length)return function(e){if(!(100<(e=String(e)).length)){var t=/^((?:\d+)?\-?\d?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(t){var o=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*o;case"weeks":case"week":case"w":return 6048e5*o;case"days":case"day":case"d":return o*r;case"hours":case"hour":case"hrs":case"hr":case"h":return o*n;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*o;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*o;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return o;default:return}}}}(e);if("number"===i&&!1===isNaN(e))return t.long?function(e){var t=Math.abs(e);return r<=t?o(e,t,r,"day"):n<=t?o(e,t,n,"hour"):6e4<=t?o(e,t,6e4,"minute"):1e3<=t?o(e,t,1e3,"second"):e+" ms"}(e):function(e){var t=Math.abs(e);return r<=t?Math.round(e/r)+"d":n<=t?Math.round(e/n)+"h":6e4<=t?Math.round(e/6e4)+"m":1e3<=t?Math.round(e/1e3)+"s":e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},function(e,t,n){function r(e){return(r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}var o=n(3),i=o._,u=i.each,a=i.pick,c=o.createSymbol,s=c("__feathersSkipHooks");t.SKIP=s,t.ACTIVATE_HOOKS=c("__feathersActivateHooks"),t.createHookObject=function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n={};return Object.defineProperty(n,"toJSON",{value:function(){return a(this,"type","method","path","params","id","data","result","error")}}),Object.assign(n,t,{method:e,get path(){var e=t.app,n=t.service;return n&&e&&e.services?Object.keys(e.services).find(function(t){return e.services[t]===n}):null}})},t.defaultMakeArguments=function(e){var t=[];return void 0!==e.id&&t.push(e.id),e.data&&t.push(e.data),t.push(e.params||{}),t},t.makeArguments=function(e){switch(e.method){case"find":return[e.params];case"get":case"remove":return[e.id,e.params];case"update":case"patch":return[e.id,e.data,e.params];case"create":return[e.data,e.params]}return t.defaultMakeArguments(e)},t.convertHookData=function(e){var t={};return Array.isArray(e)?t={all:e}:"object"!==r(e)?t={all:[e]}:u(e,function(e,n){t[n]=Array.isArray(e)?e:[e]}),t},t.isHookObject=function(e){return"object"===r(e)&&"string"==typeof e.method&&"string"==typeof e.type},t.getHooks=function(e,t,n,r){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],i=e.__hooks[n][r]||[],u=t.__hooks[n][r]||[];return o?u.concat(i):i.concat(u)},t.processHooks=function(e,n){var r=this,o=n,i=function(e){if(e){if(e===s)return s;if(!t.isHookObject(e))throw new Error("".concat(o.type," hook for '").concat(o.method,"' method returned invalid hook object"));o=e}return o};return e.reduce(function(e,t){var n=t.bind(r);return(e=2===n.length?e.then(function(e){return e===s?s:new Promise(function(t,r){n(e,function(e,n){return e?r(e):t(n)})})}):e.then(function(e){return e===s?s:n(e)})).then(i)},Promise.resolve(o)).then(function(){return o}).catch(function(e){throw e.hook=o,e})},t.enableHooks=function(e,n,r){if("function"==typeof e.hooks)return e;var o={};return r.forEach(function(e){o[e]={}}),Object.defineProperty(e,"__hooks",{value:o}),Object.assign(e,{hooks:function(e){var r=this;return u(e,function(e,o){if(!r.__hooks[o])throw new Error("'".concat(o,"' is not a valid hook type"));var i=t.convertHookData(e);u(i,function(e,t){if("all"!==t&&-1===n.indexOf(t))throw new Error("'".concat(t,"' is not a valid hook method"))}),n.forEach(function(e){var t=r.__hooks[o][e]||(r.__hooks[o][e]=[]);i.all&&t.push.apply(t,i.all),i[e]&&t.push.apply(t,i[e])})}),this}})}},function(e,t,n){var r=n(1)._,o=n(11),i=n(4),u=n(12);e.exports=Object.assign({select:function(e){for(var t=e&&e.query&&e.query.$select,n=arguments.length,o=new Array(1<n?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];Array.isArray(t)&&o.length&&t.push.apply(t,o);var u=function(e){return Array.isArray(t)?r.pick.apply(r,[e].concat(function(e){return function(e){if(Array.isArray(e)){for(var t=0,n=new Array(e.length);t<e.length;t++)n[t]=e[t];return n}}(e)||function(e){if(Symbol.iterator in Object(e)||"[object Arguments]"===Object.prototype.toString.call(e))return Array.from(e)}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}(t))):e};return function(e){return Array.isArray(e)?e.map(u):u(e)}},filterQuery:i,AdapterService:o},u)},function(e,t,n){function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}var o=n(0),i=o.NotImplemented,u=o.BadRequest,a=o.MethodNotAllowed,c=n(4),s=function(e,t){if("function"!=typeof e[t])return Promise.reject(new i("Method ".concat(t," not available")));for(var n=arguments.length,r=new Array(2<n?n-2:0),o=2;o<n;o++)r[o-2]=arguments[o];return e[t].apply(e,r)},f=function(e,t){if(!0!==t)return!!Array.isArray(t)&&t.includes(e)};e.exports=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.options=Object.assign({events:[],paginate:{},multi:!1},t)}var t,n;return t=e,(n=[{key:"filterQuery",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{},t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=void 0!==e.paginate?e.paginate:this.options.paginate,r=e.query,o=void 0===r?{}:r,i=Object.assign({operators:this.options.whitelist||[],filters:this.options.filters,paginate:n},t),u=c(o,i);return Object.assign(u,{paginate:n})}},{key:"find",value:function(e){return s(this,"_find",e)}},{key:"get",value:function(e,t){return s(this,"_get",e,t)}},{key:"create",value:function(e,t){return Array.isArray(e)&&!f("create",this.options.multi)?Promise.reject(new a("Can not create multiple entries")):s(this,"_create",e,t)}},{key:"update",value:function(e,t,n){return null===e||Array.isArray(t)?Promise.reject(new u("You can not replace multiple instances. Did you mean 'patch'?")):s(this,"_update",e,t,n)}},{key:"patch",value:function(e,t,n){return null!==e||f("patch",this.options.multi)?s(this,"_patch",e,t,n):Promise.reject(new a("Can not patch multiple entries"))}},{key:"remove",value:function(e,t,n){return null!==e||f("remove",this.options.multi)?s(this,"_remove",e,t,n):Promise.reject(new a("Can not remove multiple entries"))}},{key:"id",get:function(){return this.options.id}},{key:"events",get:function(){return this.options.events}}])&&r(t.prototype,n),e}()},function(e,t){t.compareNSB=function(e,t){return e<t?-1:t<e?1:0},t.compareArrays=function(e,n){var r,o;for(r=0;r<Math.min(e.length,n.length);r+=1)if(0!==(o=t.compare(e[r],n[r])))return o;return t.compareNSB(e.length,n.length)},t.compare=function(e,n){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:t.compareNSB,o=t,i=o.compareNSB,u=o.compare,a=o.compareArrays;if(void 0===e)return void 0===n?0:-1;if(void 0===n)return void 0===e?0:1;if(null===e)return null===n?0:-1;if(null===n)return null===e?0:1;if("number"==typeof e)return"number"==typeof n?i(e,n):-1;if("number"==typeof n)return"number"==typeof e?i(e,n):1;if("string"==typeof e)return"string"==typeof n?r(e,n):-1;if("string"==typeof n)return"string"==typeof e?r(e,n):1;if("boolean"==typeof e)return"boolean"==typeof n?i(e,n):-1;if("boolean"==typeof n)return"boolean"==typeof e?i(e,n):1;if(e instanceof Date)return n instanceof Date?i(e.getTime(),n.getTime()):-1;if(n instanceof Date)return e instanceof Date?i(e.getTime(),n.getTime()):1;if(Array.isArray(e))return Array.isArray(n)?a(e,n):-1;if(Array.isArray(n))return Array.isArray(e)?a(e,n):1;for(var c=Object.keys(e).sort(),s=Object.keys(n).sort(),f=0,l=0;l<Math.min(c.length,s.length);l+=1)if(0!==(f=u(e[c[l]],n[s[l]])))return f;return i(c.length,s.length)},t.sorter=function(e){var n=Object.keys(e).map(function(t){return{key:t,direction:e[t]}});return function(e,r){for(var o,i=0;i<n.length;i++){var u=n[i];if(0!=(o=u.direction*t.compare(e[u.key],r[u.key])))return o}return 0}}},function(e,t,n){"use strict";function r(e){return"function"==typeof e}function o(e){return"[object Array]"===Object.prototype.toString.call(e)}function i(e){return e instanceof Date?e.getTime():o(e)?e.map(i):e&&"function"==typeof e.toJSON?e.toJSON():e}function u(e,t){return r(e.get)?e.get(t):e[t]}function a(e){return function(t,n){if(!o(n)||!n.length)return e(t,n);for(var r=0,i=n.length;r<i;r++)if(e(t,u(n,r)))return!0;return!1}}function c(e,t,n,r){return e.v(e.a,t,n,r)}n.r(t),n.d(t,"default",function(){return v}),n.d(t,"indexOf",function(){return g}),n.d(t,"compare",function(){return b});var s,f={$eq:a(function(e,t){return e(t)}),$ne:(s=function(e,t){return!e(t)},function(e,t){if(!o(t)||!t.length)return s(e,t);for(var n=0,r=t.length;n<r;n++)if(!s(e,u(t,n)))return!1;return!0}),$gt:a(function(e,t){return 0<b(i(t),e)}),$gte:a(function(e,t){return 0<=b(i(t),e)}),$lt:a(function(e,t){return b(i(t),e)<0}),$lte:a(function(e,t){return b(i(t),e)<=0}),$mod:a(function(e,t){return t%e[0]==e[1]}),$in:function(e,t){if(!(t instanceof Array)){var n=i(t);if(n===t&&"object"==typeof t)for(o=e.length;o--;)if(String(e[o])===String(t)&&"[object Object]"!==String(t))return!0;if(void 0===n)for(o=e.length;o--;)if(null==e[o])return!0;for(o=e.length;o--;){var r=c(m(u(e,o),void 0),t,o,e);if(r&&"[object Object]"!==String(r)&&"[object Object]"!==String(t))return!0}return!!~e.indexOf(n)}for(var o=t.length;o--;)if(~e.indexOf(i(u(t,o))))return!0;return!1},$nin:function(e,t,n,r){return!f.$in(e,t,n,r)},$not:function(e,t,n,r){return!c(e,t,n,r)},$type:function(e,t){return null!=t&&(t instanceof e||t.constructor==e)},$all:function(e,t,n,r){return f.$and(e,t,n,r)},$size:function(e,t){return!!t&&e===t.length},$or:function(e,t,n,r){for(var o=0,i=e.length;o<i;o++)if(c(u(e,o),t,n,r))return!0;return!1},$nor:function(e,t,n,r){return!f.$or(e,t,n,r)},$and:function(e,t,n,r){for(var o=0,i=e.length;o<i;o++)if(!c(u(e,o),t,n,r))return!1;return!0},$regex:a(function(e,t){return"string"==typeof t&&e.test(t)}),$where:function(e,t,n,r){return e.call(t,t,n,r)},$elemMatch:function(e,t,n,r){return o(t)?!!~p(t,e):c(e,t,n,r)},$exists:function(e,t,n,r){return r.hasOwnProperty(n)===e}},l={$eq:function(e){return e instanceof RegExp?function(t){return"string"==typeof t&&e.test(t)}:e instanceof Function?e:o(e)&&!e.length?function(e){return o(e)&&!e.length}:null===e?function(e){return null==e}:function(t){return 0===b(i(t),i(e))}},$ne:function(e){return l.$eq(e)},$and:function(e){return e.map(d)},$all:function(e){return l.$and(e)},$or:function(e){return e.map(d)},$nor:function(e){return e.map(d)},$not:function(e){return d(e)},$regex:function(e,t){return new RegExp(e,t.$options)},$where:function(e){return"string"==typeof e?new Function("obj","return "+e):e},$elemMatch:function(e){return d(e)},$exists:function(e){return!!e}};function p(e,t){for(var n=0;n<e.length;n++)if(u(e,n),c(t,u(e,n)))return n;return-1}function h(e,t){return{a:e,v:t}}function y(e,t){var n=[];if(function e(t,n,r,i,a){if(r!==n.length&&null!=t){var c=u(n,r);if(o(t)&&isNaN(Number(c)))for(var s=0,f=t.length;s<f;s++)e(u(t,s),n,r,t,a);else e(u(t,c),n,r+1,t,a)}else a.push([t,n[r-1],i])}(t,e.k,0,t,n),1===n.length){var r=n[0];return c(e.nv,r[0],r[1],r[2])}for(var i=e&&e.q&&void 0!==e.q.$ne,a=i,s=0;s<n.length;s++){var f=n[s],l=c(e.nv,f[0],f[1],f[2]);i?a&=l:a|=l}return a}function d(e){var t;(e=i(e))&&(t=e)&&t.constructor===Object||(e={$eq:e});var n=[];for(var r in e){var o=e[r];if("$options"!==r)if(f[r])l[r]&&(o=l[r](o,e)),n.push(h(i(o),f[r]));else{if(36===r.charCodeAt(0))throw new Error("Unknown operation "+r);n.push({a:{k:r.split("."),nv:d(o),q:o},v:y})}}return 1===n.length?n[0]:h(n,f.$and)}function m(e,t){var n=d(e);return t&&(n={a:n,v:function(e,n,r,o){return c(e,t(n),r,o)}}),n}function v(e,t,n){r(t)&&(n=t,t=void 0);var o=m(e,n);function i(e,t,n){return c(o,e,t,n)}return t?t.filter(i):i}function g(e,t,n){return p(t,m(e,n))}function b(e,t){if(e===t)return 0;if(typeof e==typeof t){if(t<e)return 1;if(e<t)return-1}}}])});

@@ -23,3 +23,3 @@ const errors = require('@feathersjs/errors');

async getEntries (params) {
async getEntries (params = {}) {
const { query } = this.filterQuery(params);

@@ -33,3 +33,3 @@

async _find (params) {
async _find (params = {}) {
const { query, filters, paginate } = this.filterQuery(params);

@@ -79,3 +79,3 @@ let values = _.values(this.store).filter(this.options.matcher(query));

// Create without hooks and mixins that can be used internally
async _create (data, params) {
async _create (data, params = {}) {
if (Array.isArray(data)) {

@@ -92,3 +92,3 @@ return Promise.all(data.map(current => this._create(current, params)));

async _update (id, data, params) {
async _update (id, data, params = {}) {
const oldEntry = await this._get(id);

@@ -105,3 +105,3 @@ // We don't want our id to change type if it can be coerced

async _patch (id, data, params) {
async _patch (id, data, params = {}) {
if (id === null) {

@@ -123,3 +123,3 @@ const entries = await this.getEntries(params);

// Remove without hooks and mixins that can be used internally
async _remove (id, params) {
async _remove (id, params = {}) {
if (id === null) {

@@ -126,0 +126,0 @@ const entries = await this.getEntries(params);

{
"name": "feathers-memory",
"description": "An in memory service store",
"version": "3.0.0",
"version": "3.0.1",
"homepage": "https://github.com/feathersjs-ecosystem/feathers-memory",

@@ -6,0 +6,0 @@ "main": "lib/index",

@@ -38,4 +38,5 @@ # feathers-memory

- `paginate` (*optional*) - A [pagination object](https://docs.feathersjs.com/api/databases/common.html#pagination) containing a `default` and `max` page size
- `whitelist` (*optional*) - A list of additional query parameters to allow
- `multi` (*optional*) - Allow `create` with arrays and `update` and `remove` with `id` `null` to change multiple items. Can be `true` for all methods or an array of allowed methods (e.g. `[ 'remove', 'create' ]`)
## Example

@@ -42,0 +43,0 @@

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc