feathers-memory
Advanced tools
Comparing version 4.0.1 to 4.1.0
# Change Log | ||
## [v4.0.1](https://github.com/feathersjs-ecosystem/feathers-memory/tree/v4.0.1) (2019-09-29) | ||
[Full Changelog](https://github.com/feathersjs-ecosystem/feathers-memory/compare/v4.0.0...v4.0.1) | ||
**Closed issues:** | ||
- An in-range update of @types/node is breaking the build 🚨 [\#101](https://github.com/feathersjs-ecosystem/feathers-memory/issues/101) | ||
- An in-range update of webpack is breaking the build 🚨 [\#98](https://github.com/feathersjs-ecosystem/feathers-memory/issues/98) | ||
**Merged pull requests:** | ||
- Pass entity type to AdapterService\<T\> [\#103](https://github.com/feathersjs-ecosystem/feathers-memory/pull/103) ([daffl](https://github.com/daffl)) | ||
- Update semistandard to the latest version 🚀 [\#102](https://github.com/feathersjs-ecosystem/feathers-memory/pull/102) ([greenkeeper[bot]](https://github.com/apps/greenkeeper)) | ||
- Update dtslint to the latest version 🚀 [\#100](https://github.com/feathersjs-ecosystem/feathers-memory/pull/100) ([greenkeeper[bot]](https://github.com/apps/greenkeeper)) | ||
- Greenkeeper/webpack 4.36.1 [\#99](https://github.com/feathersjs-ecosystem/feathers-memory/pull/99) ([daffl](https://github.com/daffl)) | ||
## [v4.0.0](https://github.com/feathersjs-ecosystem/feathers-memory/tree/v4.0.0) (2019-07-05) | ||
@@ -4,0 +19,0 @@ [Full Changelog](https://github.com/feathersjs-ecosystem/feathers-memory/compare/v3.0.2...v4.0.0) |
@@ -1,1 +0,1 @@ | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.memory=e():(t.feathers=t.feathers||{},t.feathers.memory=e())}(window,function(){return r={},t.m=e=[function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=r(6)("@feathersjs/errors");function i(t,e,r,u,a){var c,s,f;(t=t||"Error")instanceof Error?(s=t.message||"Error",t.errors&&(c=t.errors)):"object"===n(t)?(s=t.message||"Error",a=t):s=t,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=e,this.message=s,this.code=r,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(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function a(t,e){i.call(this,t,"BadRequest",400,"bad-request",e)}function c(t,e){i.call(this,t,"NotAuthenticated",401,"not-authenticated",e)}function s(t,e){i.call(this,t,"PaymentError",402,"payment-error",e)}function f(t,e){i.call(this,t,"Forbidden",403,"forbidden",e)}function l(t,e){i.call(this,t,"NotFound",404,"not-found",e)}function p(t,e){i.call(this,t,"MethodNotAllowed",405,"method-not-allowed",e)}function h(t,e){i.call(this,t,"NotAcceptable",406,"not-acceptable",e)}function y(t,e){i.call(this,t,"Timeout",408,"timeout",e)}function d(t,e){i.call(this,t,"Conflict",409,"conflict",e)}function m(t,e){i.call(this,t,"LengthRequired",411,"length-required",e)}function v(t,e){i.call(this,t,"Unprocessable",422,"unprocessable",e)}function b(t,e){i.call(this,t,"TooManyRequests",429,"too-many-requests",e)}function g(t,e){i.call(this,t,"GeneralError",500,"general-error",e)}function w(t,e){i.call(this,t,"NotImplemented",501,"not-implemented",e)}function C(t,e){i.call(this,t,"BadGateway",502,"bad-gateway",e)}function O(t,e){i.call(this,t,"Unavailable",503,"unavailable",e)}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(b,i),u(g,i),u(w,i),u(C,i),u(O,i);var k={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:b,GeneralError:g,NotImplemented:w,BadGateway:C,Unavailable:O,400:a,401:c,402:s,403:f,404:l,405:p,406:h,408:y,409:d,411:m,422:v,429:b,500:g,501:w,502:C,503:O};t.exports=Object.assign({convert:function(t){if(!t)return t;var e=k[t.name],r=e?new e(t.message,t.data):new Error(t.message||t);return"object"===n(t)&&Object.assign(r,t),r}},k)},function(t,e,r){var n=r(3),o=r(9);t.exports=Object.assign({},n,{hooks:o})},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=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 t=a(p);f=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function d(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new y(t,e)),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(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){(function(t){function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}e.stripSlashes=function(t){return t.replace(/^(\/+)|(\/+)$/g,"")};var i=e._={each:function(t,e){t&&"function"==typeof t.forEach?t.forEach(e):i.isObject(t)&&Object.keys(t).forEach(function(r){return e(t[r],r)})},some:function(t,e){return Object.keys(t).map(function(e){return[t[e],e]}).some(function(t){var r=o(t,2),n=r[0],i=r[1];return e(n,i)})},every:function(t,e){return Object.keys(t).map(function(e){return[t[e],e]}).every(function(t){var r=o(t,2),n=r[0],i=r[1];return e(n,i)})},keys:function(t){return Object.keys(t)},values:function(t){return i.keys(t).map(function(e){return t[e]})},isMatch:function(t,e){return i.keys(e).every(function(r){return t[r]===e[r]})},isEmpty:function(t){return 0===i.keys(t).length},isObject:function(t){return"object"===n(t)&&!Array.isArray(t)&&null!==t},isObjectOrArray:function(t){return"object"===n(t)&&null!==t},extend:function(){return Object.assign.apply(Object,arguments)},omit:function(t){for(var e=i.extend({},t),r=arguments.length,n=new Array(1<r?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return n.forEach(function(t){return delete e[t]}),e},pick:function(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce(function(e,r){return void 0!==t[r]&&(e[r]=t[r]),e},{})},merge:function(t,e){return i.isObject(t)&&i.isObject(e)&&Object.keys(e).forEach(function(n){i.isObject(e[n])?(t[n]||Object.assign(t,r({},n,{})),i.merge(t[n],e[n])):Object.assign(t,r({},n,e[n]))}),t}};e.isPromise=function(t){return i.isObject(t)&&"function"==typeof t.then},e.makeUrl=function(r,n){var o=1<arguments.length&&void 0!==n?n:{},i="function"==typeof o.get?o.get.bind(o):function(){},u=i("env")||"production",a=i("host")||t.env.HOST_NAME||"localhost",c="development"===u||"test"===u?"http":"https",s=i("port")||t.env.PORT||3030,f="development"===u||"test"===u?":".concat(s):"";return r=r||"","".concat(c,"://").concat(a).concat(f,"/").concat(e.stripSlashes(r))},e.createSymbol=function(t){return"undefined"!=typeof Symbol?Symbol(t):t}}).call(this,r(2))},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=r(0);function u(t){if(void 0!==t)return Math.abs(parseInt(t,10))}function a(t,e,r,n){return Array.isArray(r)?o._.each(r,function(r){void 0!==e[r]&&(t[r]=e[r])}):o._.each(r,function(r,o){var i=r(e[o],n);void 0!==i&&(t[o]=i)}),t}function c(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=r.filters,u=void 0===n?{}:n,c=r.operators,s=void 0===c?[]:c,f={};return f.filters=a({},t,e.FILTERS,r),f.filters=a(f.filters,t,u,r),f.query=function t(e,r,n){if(o._.isObject(e)&&e.constructor==={}.constructor){var u={};return o._.each(e,function(o,a){if("$"===a[0]){if(void 0!==n[a])return;if(!r.includes(a))throw new i.BadRequest("Invalid query parameter ".concat(a),e)}u[a]=t(o,r,n)}),Object.getOwnPropertySymbols(e).forEach(function(t){u[t]=e[t]}),u}return e}(t,e.OPERATORS.concat(s),f.filters),f}e.FILTERS={$sort:function(t){return function(t){return"object"!==n(t)||Array.isArray(t)?t:Object.keys(t).reduce(function(e,r){return e[r]="object"===n(t[r])?t[r]:parseInt(t[r],10),e},{})}(t)},$limit:function(t,e){return function(t,e){if(e&&e.default){var r="number"==typeof t?t:e.default,n="number"==typeof e.max?e.max:Number.MAX_VALUE;return Math.min(r,n)}return t}(u(t),e.paginate)},$skip:function(t){return u(t)},$select:function(t){return t}},e.OPERATORS=["$in","$nin","$lt","$lte","$gt","$gte","$ne","$or"],e.default=c,t.exports=Object.assign(c,t.exports)},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var u=t.apply(e,r);function a(t){i(u,n,o,a,c,"next",t)}function c(t){i(u,n,o,a,c,"throw",t)}a(void 0)})}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return m.apply(void 0,r)(JSON.parse(JSON.stringify(t)))}var p=r(0),h=r(1)._,y=r(10),d=y.sorter,m=y.select,v=y.AdapterService,b=r(13).default,g=function(){function t(){var e,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(e,r){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this),(e=c(this,s(t).call(this,h.extend({id:"id",matcher:b,sorter:d},r))))._uId=r.startId||0,e.store=r.store||{},e}var e,r,n,i,y,m,g;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(t,v),function(t,e,r){e&&a(t.prototype,e)}(t,[{key:"getEntries",value:(g=u(regeneratorRuntime.mark(function t(){var e,r,n,o=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<o.length&&void 0!==o[0]?o[0]:{},r=this.filterQuery(e),n=r.query,t.abrupt("return",this._find(Object.assign({},e,{paginate:!1,query:n})));case 3:case"end":return t.stop()}},t,this)})),function(){return g.apply(this,arguments)})},{key:"_find",value:(m=u(regeneratorRuntime.mark(function t(){var e,r,n,o,i,u,a,c,s=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(e=0<s.length&&void 0!==s[0]?s[0]:{},r=this.filterQuery(e),n=r.query,o=r.filters,i=r.paginate,u=h.values(this.store).filter(this.options.matcher(n)),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(t){return l(t,e)})},i&&i.default){t.next=10;break}return t.abrupt("return",c.data);case 10:return t.abrupt("return",c);case 11:case"end":return t.stop()}},t,this)})),function(){return m.apply(this,arguments)})},{key:"_get",value:(y=u(regeneratorRuntime.mark(function t(e){var r,n,o,i,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1<u.length&&void 0!==u[1]?u[1]:{},!(e in this.store)){t.next=6;break}if(n=this.filterQuery(r),o=n.query,i=this.store[e],this.options.matcher(o)(i))return t.abrupt("return",l(i,r,this.id));t.next=6;break;case 6:throw new p.NotFound("No record found for id '".concat(e,"'"));case 7:case"end":return t.stop()}},t,this)})),function(t){return y.apply(this,arguments)})},{key:"_create",value:(i=u(regeneratorRuntime.mark(function t(e){var r,n,i,u,a=this,c=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1<c.length&&void 0!==c[1]?c[1]:{},Array.isArray(e))return t.abrupt("return",Promise.all(e.map(function(t){return a._create(t,r)})));t.next=3;break;case 3:return n=e[this.id]||this._uId++,i=h.extend({},e,o({},this.id,n)),u=this.store[n]=i,t.abrupt("return",l(u,r,this.id));case 7:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)})},{key:"_update",value:(n=u(regeneratorRuntime.mark(function t(e,r){var n,i,u,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return n=2<a.length&&void 0!==a[2]?a[2]:{},t.next=3,this._get(e);case 3:return i=t.sent,u=i[this.id],e=u==e?u:e,this.store[e]=h.extend({},r,o({},this.id,e)),t.abrupt("return",this._get(e,n));case 8:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)})},{key:"_patch",value:(r=u(regeneratorRuntime.mark(function t(e,r){var n,o,i,u=this,a=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(n=2<a.length&&void 0!==a[2]?a[2]:{},o=function(t){var e=t[u.id];return u.store[e]=h.extend(u.store[e],h.omit(r,u.id)),l(u.store[e],n,u.id)},null===e)return t.next=5,this.getEntries(n);t.next=7;break;case 5:return i=t.sent,t.abrupt("return",i.map(o));case 7:return t.t0=o,t.next=10,this._get(e,n);case 10:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 12:case"end":return t.stop()}},t,this)})),function(t,e){return r.apply(this,arguments)})},{key:"_remove",value:(e=u(regeneratorRuntime.mark(function t(e){var r,n,o,i=this,u=arguments;return regeneratorRuntime.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1<u.length&&void 0!==u[1]?u[1]:{},null===e)return t.next=4,this.getEntries(r);t.next=6;break;case 4:return n=t.sent,t.abrupt("return",Promise.all(n.map(function(t){return i._remove(t[i.id],r)})));case 6:return t.next=8,this._get(e,r);case 8:return o=t.sent,delete this.store[e],t.abrupt("return",o);case 11:case"end":return t.stop()}},t,this)})),function(t){return e.apply(this,arguments)})}]),t}();t.exports=function(t){return new g(t)},t.exports.Service=g},function(t,e,r){(function(n){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.log=function(){var t;return"object"===("undefined"==typeof console?"undefined":o(console))&&console.log&&(t=console).log.apply(t,arguments)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,function(t){"%%"!==t&&(n++,"%c"===t&&(o=n))}),e.splice(o,0,r)}},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t},e.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+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.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"],t.exports=r(7)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,r(2))},function(t,e,r){function n(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}t.exports=function(t){function e(t){for(var e=0,r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return o.colors[Math.abs(e)%o.colors.length]}function o(t){var r;function n(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(n.enabled){var u=n,a=Number(new Date),c=a-(r||a);u.diff=c,u.prev=r,u.curr=a,r=a,e[0]=o.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,function(t,r){if("%%"===t)return t;s++;var n=o.formatters[r];if("function"==typeof n){var i=e[s];t=n.call(u,i),e.splice(s,1),s--}return t}),o.formatArgs.call(u,e),(u.log||o.log).apply(u,e)}}return n.namespace=t,n.enabled=o.enabled(t),n.useColors=o.useColors(),n.color=e(t),n.destroy=i,n.extend=u,"function"==typeof o.init&&o.init(n),o.instances.push(n),n}function i(){var t=o.instances.indexOf(this);return-1!==t&&(o.instances.splice(t,1),!0)}function u(t,e){var r=o(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function a(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return((o.debug=o).default=o).coerce=function(t){return t instanceof Error?t.stack||t.message:t},o.disable=function(){var t=[].concat(n(o.names.map(a)),n(o.skips.map(a).map(function(t){return"-"+t}))).join(",");return o.enable(""),t},o.enable=function(t){var e;o.save(t),o.names=[],o.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(e=0;e<n;e++)r[e]&&("-"===(t=r[e].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+t.substr(1)+"$")):o.names.push(new RegExp("^"+t+"$")));for(e=0;e<o.instances.length;e++){var i=o.instances[e];i.enabled=o.enabled(i.namespace)}},o.enabled=function(t){if("*"===t[t.length-1])return!0;var e,r;for(e=0,r=o.skips.length;e<r;e++)if(o.skips[e].test(t))return!1;for(e=0,r=o.names.length;e<r;e++)if(o.names[e].test(t))return!0;return!1},o.humanize=r(8),Object.keys(t).forEach(function(e){o[e]=t[e]}),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=e,o.enable(o.load()),o}},function(t,e){var r=36e5,n=864e5;function o(t,e,r,n){var o=1.5*r<=e;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,e){e=e||{};var i=typeof t;if("string"==i&&0<t.length)return function(t){if(!(100<(t=String(t)).length)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var o=parseFloat(e[1]);switch((e[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*n;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;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}}}}(t);if("number"==i&&isFinite(t))return e.long?function(t){var e=Math.abs(t);return n<=e?o(t,e,n,"day"):r<=e?o(t,e,r,"hour"):6e4<=e?o(t,e,6e4,"minute"):1e3<=e?o(t,e,1e3,"second"):t+" ms"}(t):function(t){var e=Math.abs(t);return n<=e?Math.round(t/n)+"d":r<=e?Math.round(t/r)+"h":6e4<=e?Math.round(t/6e4)+"m":1e3<=e?Math.round(t/1e3)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=r(3),i=o._,u=i.each,a=i.pick,c=o.createSymbol,s=c("__feathersSkipHooks");e.SKIP=s,e.ACTIVATE_HOOKS=c("__feathersActivateHooks"),e.createHookObject=function(t,e){var r=1<arguments.length&&void 0!==e?e:{},n={};return Object.defineProperty(n,"toJSON",{value:function(){return a(this,"type","method","path","params","id","data","result","error")}}),Object.assign(n,r,{method:t,get path(){var t=r.app,e=r.service;return e&&t&&t.services?Object.keys(t.services).find(function(r){return t.services[r]===e}):null}})},e.defaultMakeArguments=function(t){var e=[];return void 0!==t.id&&e.push(t.id),t.data&&e.push(t.data),e.push(t.params||{}),e},e.makeArguments=function(t){switch(t.method){case"find":return[t.params];case"get":case"remove":return[t.id,t.params];case"update":case"patch":return[t.id,t.data,t.params];case"create":return[t.data,t.params]}return e.defaultMakeArguments(t)},e.convertHookData=function(t){var e={};return Array.isArray(t)?e={all:t}:"object"!==n(t)?e={all:[t]}:u(t,function(t,r){e[r]=Array.isArray(t)?t:[t]}),e},e.isHookObject=function(t){return"object"===n(t)&&"string"==typeof t.method&&"string"==typeof t.type},e.getHooks=function(t,e,r,n,o){var i=4<arguments.length&&void 0!==o&&o,u=t.__hooks[r][n]||[],a=e.__hooks[r][n]||[];return i?a.concat(u):u.concat(a)},e.processHooks=function(t,r){function n(t){if(t){if(t===s)return s;if(!e.isHookObject(t))throw new Error("".concat(i.type," hook for '").concat(i.method,"' method returned invalid hook object"));i=t}return i}var o=this,i=r;return t.reduce(function(t,e){var r=e.bind(o);return(t=2===r.length?t.then(function(t){return t===s?s:new Promise(function(e,n){r(t,function(t,r){return t?n(t):e(r)})})}):t.then(function(t){return t===s?s:r(t)})).then(n)},Promise.resolve(i)).then(function(){return i}).catch(function(t){throw t.hook=i,t})},e.enableHooks=function(t,r,n){if("function"==typeof t.hooks)return t;var o={};return n.forEach(function(t){o[t]={}}),Object.defineProperty(t,"__hooks",{value:o}),Object.assign(t,{hooks:function(t){var n=this;return u(t,function(t,o){if(!n.__hooks[o])throw new Error("'".concat(o,"' is not a valid hook type"));var i=e.convertHookData(t);u(i,function(t,e){if("all"!==e&&-1===r.indexOf(e))throw new Error("'".concat(e,"' is not a valid hook method"))}),r.forEach(function(t){var e=n.__hooks[o][t]||(n.__hooks[o][t]=[]);i.all&&e.push.apply(e,i.all),i[t]&&e.push.apply(e,i[t])})}),this}})}},function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=r(11);e.AdapterService=i.AdapterService;var u=r(4);e.filterQuery=u.default,e.FILTERS=u.FILTERS,e.OPERATORS=u.OPERATORS,function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(12)),e.select=function(t){for(var e=t&&t.query&&t.query.$select,r=arguments.length,i=new Array(1<r?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];function a(t){var r;return Array.isArray(e)?(r=o._).pick.apply(r,[t].concat(n(e))):t}return Array.isArray(e)&&i.length&&e.push.apply(e,i),function(t){return Array.isArray(t)?t.map(a):a(t)}}},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};function i(t,e){if("function"!=typeof t[e])return Promise.reject(new u.NotImplemented("Method ".concat(e," not available")));for(var r=arguments.length,n=new Array(2<r?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return t[e].apply(t,n)}Object.defineProperty(e,"__esModule",{value:!0});var u=r(0),a=o(r(4)),c={find:!0,get:!1,update:!1},s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=Object.assign({id:"id",events:[],paginate:{},multi:!1,filters:[],whitelist:[]},e)}return function(t,e,r){e&&n(t.prototype,e)}(t,[{key:"filterQuery",value:function(t,e){var r=0<arguments.length&&void 0!==t?t:{},n=1<arguments.length&&void 0!==e?e:{},o=void 0!==r.paginate?r.paginate:this.options.paginate,i=r.query,u=void 0===i?{}:i,c=Object.assign({operators:this.options.whitelist||[],filters:this.options.filters,paginate:o},n),s=a.default(u,c);return Object.assign(s,{paginate:o})}},{key:"allowsMulti",value:function(t){var e=c[t];if(void 0!==e)return e;var r=this.options.multi;return!0===r||!1===r?r:r.includes(t)}},{key:"find",value:function(t){return i(this,"_find",t)}},{key:"get",value:function(t,e){return i(this,"_get",t,e)}},{key:"create",value:function(t,e){return Array.isArray(t)&&!this.allowsMulti("create")?Promise.reject(new u.MethodNotAllowed("Can not create multiple entries")):i(this,"_create",t,e)}},{key:"update",value:function(t,e,r){return null===t||Array.isArray(e)?Promise.reject(new u.BadRequest("You can not replace multiple instances. Did you mean 'patch'?")):i(this,"_update",t,e,r)}},{key:"patch",value:function(t,e,r){return null!==t||this.allowsMulti("patch")?i(this,"_patch",t,e,r):Promise.reject(new u.MethodNotAllowed("Can not patch multiple entries"))}},{key:"remove",value:function(t,e){return null!==t||this.allowsMulti("remove")?i(this,"_remove",t,e):Promise.reject(new u.MethodNotAllowed("Can not remove multiple entries"))}},{key:"id",get:function(){return this.options.id}},{key:"events",get:function(){return this.options.events}}]),t}();e.AdapterService=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareNSB=function(t,e){return t<e?-1:e<t?1:0},e.compareArrays=function(t,r){var n,o;for(n=0;n<Math.min(t.length,r.length);n+=1)if(0!==(o=e.compare(t[n],r[n])))return o;return e.compareNSB(t.length,r.length)},e.compare=function(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.compareNSB,o=e,i=o.compareNSB,u=o.compare,a=o.compareArrays;if(void 0===t)return void 0===r?0:-1;if(void 0===r)return void 0===t?0:1;if(null===t)return null===r?0:-1;if(null===r)return null===t?0:1;if("number"==typeof t)return"number"==typeof r?i(t,r):-1;if("number"==typeof r)return"number"==typeof t?i(t,r):1;if("string"==typeof t)return"string"==typeof r?n(t,r):-1;if("string"==typeof r)return"string"==typeof t?n(t,r):1;if("boolean"==typeof t)return"boolean"==typeof r?i(t,r):-1;if("boolean"==typeof r)return"boolean"==typeof t?i(t,r):1;if(t instanceof Date)return r instanceof Date?i(t.getTime(),r.getTime()):-1;if(r instanceof Date)return t instanceof Date?i(t.getTime(),r.getTime()):1;if(Array.isArray(t))return Array.isArray(r)?a(t,r):-1;if(Array.isArray(r))return Array.isArray(t)?a(t,r):1;for(var c=Object.keys(t).sort(),s=Object.keys(r).sort(),f=0,l=0;l<Math.min(c.length,s.length);l+=1)if(0!==(f=u(t[c[l]],r[s[l]])))return f;return i(c.length,s.length)},e.sorter=function(t){var r=Object.keys(t).map(function(e){return{key:e,direction:t[e]}});return function(t,n){var o,i=!0,u=!1,a=void 0;try{for(var c,s=r[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var f=c.value;if(0!=(o=f.direction*e.compare(t[f.key],n[f.key])))return o}}catch(t){u=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(u)throw a}}return 0}}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){var e="[object "+t+"]";return function(t){return Object.prototype.toString.call(t)===e}}r.r(e),r.d(e,"default",function(){return g}),r.d(e,"compare",function(){return w}),r.d(e,"comparable",function(){return C});var i=o("Array"),u=o("Object"),a=o("Function");function c(t,e){return a(t.get)?t.get(e):t[e]}function s(t){return function(e,r){if(!i(r)||!r.length)return t(e,r);for(var n=0,o=r.length;n<o;n++)if(t(e,c(r,n)))return!0;return!1}}function f(t){return function(e,r){if(!i(r)||!r.length)return t(e,r);for(var n=0,o=r.length;n<o;n++)if(!t(e,c(r,n)))return!1;return!0}}function l(t,e,r,n){return t.v(t.a,e,r,n)}var p={$eq:s(function(t,e){return t(e)}),$ne:f(function(t,e){return t(e)}),$gt:s(function(t,e){return t(e)}),$gte:s(function(t,e){return t(e)}),$lt:s(function(t,e){return t(e)}),$lte:s(function(t,e){return t(e)}),$mod:s(function(t,e){return t(e)}),$in:function(t,e){return t(e)},$nin:function(t,e){return t(e)},$not:function(t,e,r,n){return t(e,r,n)},$type:function(t,e){return t(e)},$all:function(t,e,r,n){return p.$and(t,e,r,n)},$size:function(t,e){return!!e&&t===e.length},$or:function(t,e,r,n){for(var o=0,i=t.length;o<i;o++)if(l(c(t,o),e,r,n))return!0;return!1},$nor:function(t,e,r,n){return!p.$or(t,e,r,n)},$and:function(t,e,r,n){for(var o=0,i=t.length;o<i;o++)if(!l(c(t,o),e,r,n))return!1;return!0},$regex:s(function(t,e){return"string"==typeof e&&t.test(e)}),$where:function(t,e,r,n){return t.call(e,e,r,n)},$elemMatch:function(t,e,r,n){return i(e)?!!~function(t,e){for(var r=0;r<t.length;r++)if(c(t,r),l(e,c(t,r)))return r;return-1}(e,t):l(t,e,r,n)},$exists:function(t,e,r,n){return n.hasOwnProperty(r)===t}},h={$eq:function(t,e,r){var n=r.comparable,o=r.compare;return t instanceof RegExp?s(function(e){return"string"==typeof e&&t.test(e)}):t instanceof Function?s(t):i(t)&&!t.length?s(function(t){return i(t)&&!t.length}):s(null===t?function(t){return null==t}:function(e){return 0===o(n(e),n(t))})},$gt:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return 0<o(n(e),n(t))}},$gte:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return 0<=o(n(e),n(t))}},$lt:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return o(n(e),n(t))<0}},$lte:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return o(n(e),n(t))<=0}},$in:function(t,e,r){var o=r.comparable;return function(e){if(!(e instanceof Array)){var i=o(e);if(i===e&&"object"===n(e))for(a=t.length;a--;)if(String(t[a])===String(e)&&"[object Object]"!==String(e))return!0;if(void 0===i)for(a=t.length;a--;)if(null==t[a])return!0;for(a=t.length;a--;){var u=l(b(c(t,a),r),e,a,t);if(u&&"[object Object]"!==String(u)&&"[object Object]"!==String(e))return!0}return!!~t.indexOf(i)}for(var a=e.length;a--;)if(~t.indexOf(o(c(e,a))))return!0;return!1}},$nin:function(t,e,r){var n=h.$in(t,e,r);return function(t,e,r,o){return!n(t,e,r,o)}},$mod:function(t){return function(e){return e%t[0]==t[1]}},$ne:function(t,e,r){var n=h.$eq(t,e,r);return f(function(t,e,r,o){return!n(t,e,r,o)})},$and:function(t,e,r){return t.map(m(r))},$all:function(t,e,r){return h.$and(t,e,r)},$or:function(t,e,r){return t.map(m(r))},$nor:function(t,e,r){return t.map(m(r))},$not:function(t,e,r){var n=m(r)(t);return function(t,e,r){return!l(n,t,e,r)}},$type:function(t){return function(e,r,n){return null!=e&&(e instanceof t||e.constructor==t)}},$regex:function(t,e){return new RegExp(t,e.$options)},$where:function(t){return"string"==typeof t?new Function("obj","return "+t):t},$elemMatch:function(t,e,r){return m(r)(t)},$exists:function(t){return!!t}};function y(t,e){return{a:t,v:e}}function d(t,e){var r=[];if(function t(e,r,n,o,u){if(n!==r.length&&null!=e){var a=c(r,n);if(i(e)&&isNaN(Number(a)))for(var s=0,f=e.length;s<f;s++)t(c(e,s),r,n,e,u);else t(c(e,a),r,n+1,e,u)}else u.push([e,r[n-1],o])}(e,t.k,0,e,r),1===r.length){var n=r[0];return l(t.nv,n[0],n[1],n[2])}for(var o=t&&t.q&&void 0!==t.q.$ne,u=o,a=0;a<r.length;a++){var s=r[a],f=l(t.nv,s[0],s[1],s[2]);o?u&=f:u|=f}return u}function m(t){function e(t){return t&&function(t){return t&&(t.constructor===Object||t.constructor===Array||"function Object() { [native code] }"===t.constructor.toString()||"function Array() { [native code] }"===t.constructor.toString())}(t)||(t={$eq:t}),t}function r(e){e=n(e);var r=[];for(var u in e){var a=e[u];if("$options"!==u){var c=p[u]||t&&o&&o[u];if(c)h[u]&&(a=h[u](a,e,t)),r.push(y(n(a),c));else{if(36===u.charCodeAt(0))throw new Error("Unknown operation "+u);var s=u.split(".");r.push({a:{k:s,nv:i(a),q:a},v:d})}}}return 1===r.length?r[0]:y(r,p.$and)}var n=t.comparable,o=t.expressions,i=function(t){return function(t){return-1===function t(e,r){if(!u(e))return r;for(var n in e)r.push(n),t(e[n],r);return r}(t,[]).join(",").search(/[$.]/)}(t=e(t))?y(t,v):r(t)};return function(t){return r(e(t))}}function v(t,e){if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(e))return!1;if(u(t)){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var r in t)if(!v(t[r],e[r]))return!1;return!0}if(i(t)){if(t.length!==e.length)return!1;for(var n=0,o=t.length;n<o;n++)if(!v(t[n],e[n]))return!1;return!0}return t===e}function b(t,e){var r=m(e)(t);return e&&e.select&&(r={a:r,v:function(t,r,n,o){return l(t,r&&e.select(r),n,o)}}),r}function g(t,e){var r=b(t,e=Object.assign({compare:w,comparable:C},e));return function(t,e,n){return l(r,t,e,n)}}function w(t,e){if(v(t,e))return 0;if(n(t)===n(e)){if(e<t)return 1;if(t<e)return-1}}function C(t){return t instanceof Date?t.getTime():i(t)?t.map(C):t&&"function"==typeof t.toJSON?t.toJSON():t}}],t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(t){return e[t]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=5);function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,r}); | ||
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.memory=e():(t.feathers=t.feathers||{},t.feathers.memory=e())}(window,(function(){return r={},t.m=e=[function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var o=r(6)("@feathersjs/errors");function i(t,e,r,u,a){var c,s,f;(t=t||"Error")instanceof Error?(s=t.message||"Error",t.errors&&(c=t.errors)):"object"===n(t)?(s=t.message||"Error",a=t):s=t,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=e,this.message=s,this.code=r,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(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t}function a(t,e){i.call(this,t,"BadRequest",400,"bad-request",e)}function c(t,e){i.call(this,t,"NotAuthenticated",401,"not-authenticated",e)}function s(t,e){i.call(this,t,"PaymentError",402,"payment-error",e)}function f(t,e){i.call(this,t,"Forbidden",403,"forbidden",e)}function l(t,e){i.call(this,t,"NotFound",404,"not-found",e)}function p(t,e){i.call(this,t,"MethodNotAllowed",405,"method-not-allowed",e)}function h(t,e){i.call(this,t,"NotAcceptable",406,"not-acceptable",e)}function y(t,e){i.call(this,t,"Timeout",408,"timeout",e)}function d(t,e){i.call(this,t,"Conflict",409,"conflict",e)}function m(t,e){i.call(this,t,"LengthRequired",411,"length-required",e)}function v(t,e){i.call(this,t,"Unprocessable",422,"unprocessable",e)}function b(t,e){i.call(this,t,"TooManyRequests",429,"too-many-requests",e)}function g(t,e){i.call(this,t,"GeneralError",500,"general-error",e)}function w(t,e){i.call(this,t,"NotImplemented",501,"not-implemented",e)}function C(t,e){i.call(this,t,"BadGateway",502,"bad-gateway",e)}function O(t,e){i.call(this,t,"Unavailable",503,"unavailable",e)}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(b,i),u(g,i),u(w,i),u(C,i),u(O,i);var j={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:b,GeneralError:g,NotImplemented:w,BadGateway:C,Unavailable:O,400:a,401:c,402:s,403:f,404:l,405:p,406:h,408:y,409:d,411:m,422:v,429:b,500:g,501:w,502:C,503:O};t.exports=Object.assign({convert:function(t){if(!t)return t;var e=j[t.name],r=e?new e(t.message,t.data):new Error(t.message||t);return"object"===n(t)&&Object.assign(r,t),r}},j)},function(t,e,r){"use strict";var n=this&&this.__importStar||function(t){if(t&&t.__esModule)return t;var e={};if(null!=t)for(var r in t)Object.hasOwnProperty.call(t,r)&&(e[r]=t[r]);return e.default=t,e};Object.defineProperty(e,"__esModule",{value:!0});var o=n(r(9));!function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(3)),e.hooks=o},function(t,e){var r,n,o=t.exports={};function i(){throw new Error("setTimeout has not been defined")}function u(){throw new Error("clearTimeout has not been defined")}function a(t){if(r===setTimeout)return setTimeout(t,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(t,0);try{return r(t,0)}catch(e){try{return r.call(null,t,0)}catch(e){return r.call(this,t,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(t){r=i}try{n="function"==typeof clearTimeout?clearTimeout:u}catch(t){n=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 t=a(p);f=!0;for(var e=s.length;e;){for(c=s,s=[];++l<e;)c&&c[l].run();l=-1,e=s.length}c=null,f=!1,function(t){if(n===clearTimeout)return clearTimeout(t);if((n===u||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(t);try{n(t)}catch(e){try{return n.call(null,t)}catch(e){return n.call(this,t)}}}(t)}}function y(t,e){this.fun=t,this.array=e}function d(){}o.nextTick=function(t){var e=new Array(arguments.length-1);if(1<arguments.length)for(var r=1;r<arguments.length;r++)e[r-1]=arguments[r];s.push(new y(t,e)),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(t){return[]},o.binding=function(t){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(t){throw new Error("process.chdir is not supported")},o.umask=function(){return 0}},function(t,e,r){"use strict";(function(t){function r(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t)){var r=[],n=!0,o=!1,i=void 0;try{for(var u,a=t[Symbol.iterator]();!(n=(u=a.next()).done)&&(r.push(u.value),!e||r.length!==e);n=!0);}catch(t){o=!0,i=t}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}Object.defineProperty(e,"__esModule",{value:!0}),e.stripSlashes=function(t){return t.replace(/^(\/+)|(\/+)$/g,"")},e._={each:function(t,r){t&&"function"==typeof t.forEach?t.forEach(r):e._.isObject(t)&&Object.keys(t).forEach((function(e){return r(t[e],e)}))},some:function(t,e){return Object.keys(t).map((function(e){return[t[e],e]})).some((function(t){var r=o(t,2),n=r[0],i=r[1];return e(n,i)}))},every:function(t,e){return Object.keys(t).map((function(e){return[t[e],e]})).every((function(t){var r=o(t,2),n=r[0],i=r[1];return e(n,i)}))},keys:function(t){return Object.keys(t)},values:function(t){return e._.keys(t).map((function(e){return t[e]}))},isMatch:function(t,r){return e._.keys(r).every((function(e){return t[e]===r[e]}))},isEmpty:function(t){return 0===e._.keys(t).length},isObject:function(t){return"object"===n(t)&&!Array.isArray(t)&&null!==t},isObjectOrArray:function(t){return"object"===n(t)&&null!==t},extend:function(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return Object.assign.apply(Object,[t].concat(r))},omit:function(t){for(var r=e._.extend({},t),n=arguments.length,o=new Array(1<n?n-1:0),i=1;i<n;i++)o[i-1]=arguments[i];return o.forEach((function(t){return delete r[t]})),r},pick:function(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return r.reduce((function(e,r){return void 0!==t[r]&&(e[r]=t[r]),e}),{})},merge:function(t,n){return e._.isObject(t)&&e._.isObject(n)&&Object.keys(n).forEach((function(o){e._.isObject(n[o])?(t[o]||Object.assign(t,r({},o,{})),e._.merge(t[o],n[o])):Object.assign(t,r({},o,n[o]))})),t}},e.isPromise=function(t){return e._.isObject(t)&&"function"==typeof t.then},e.makeUrl=function(r){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o="function"==typeof n.get?n.get.bind(n):function(){},i=o("env")||"production",u=o("host")||t.env.HOST_NAME||"localhost",a="development"===i||"test"===i?"http":"https",c=o("port")||t.env.PORT||3030,s="development"===i||"test"===i?":".concat(c):"";return r=r||"","".concat(a,"://").concat(u).concat(s,"/").concat(e.stripSlashes(r))},e.createSymbol=function(t){return"undefined"!=typeof Symbol?Symbol(t):t}}).call(this,r(2))},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=r(0);function u(t){if(void 0!==t)return Math.abs(parseInt(t,10))}function a(t,e,r,n){return Array.isArray(r)?o._.each(r,(function(r){void 0!==e[r]&&(t[r]=e[r])})):o._.each(r,(function(r,o){var i=r(e[o],n);void 0!==i&&(t[o]=i)})),t}function c(t){var r=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},n=r.filters,u=void 0===n?{}:n,c=r.operators,s=void 0===c?[]:c,f={};return f.filters=a({},t,e.FILTERS,r),f.filters=a(f.filters,t,u,r),f.query=function t(e,r,n){if(o._.isObject(e)&&e.constructor==={}.constructor){var u={};return o._.each(e,(function(o,a){if("$"===a[0]){if(void 0!==n[a])return;if(!r.includes(a))throw new i.BadRequest("Invalid query parameter ".concat(a),e)}u[a]=t(o,r,n)})),Object.getOwnPropertySymbols(e).forEach((function(t){u[t]=e[t]})),u}return e}(t,e.OPERATORS.concat(s),f.filters),f}e.FILTERS={$sort:function(t){return function(t){return"object"!==n(t)||Array.isArray(t)?t:Object.keys(t).reduce((function(e,r){return e[r]="object"===n(t[r])?t[r]:parseInt(t[r],10),e}),{})}(t)},$limit:function(t,e){return function(t,e){if(e&&e.default){var r="number"!=typeof t||isNaN(t)?e.default:t,n="number"==typeof e.max?e.max:Number.MAX_VALUE;return Math.min(r,n)}return t}(u(t),e.paginate)},$skip:function(t){return u(t)},$select:function(t){return t}},e.OPERATORS=["$in","$nin","$lt","$lte","$gt","$gte","$ne","$or"],e.default=c,t.exports=Object.assign(c,t.exports)},function(t,e,r){function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function i(t,e,r,n,o,i,u){try{var a=t[i](u),c=a.value}catch(t){return void r(t)}a.done?e(c):Promise.resolve(c).then(n,o)}function u(t){return function(){var e=this,r=arguments;return new Promise((function(n,o){var u=t.apply(e,r);function a(t){i(u,n,o,a,c,"next",t)}function c(t){i(u,n,o,a,c,"throw",t)}a(void 0)}))}}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function c(t,e){return!e||"object"!==n(e)&&"function"!=typeof e?function(t){if(void 0!==t)return t;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(t):e}function s(t){return(s=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function f(t,e){return(f=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function l(t){for(var e=arguments.length,r=new Array(1<e?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return m.apply(void 0,r)(JSON.parse(JSON.stringify(t)))}var p=r(0),h=r(1)._,y=r(10),d=y.sorter,m=y.select,v=y.AdapterService,b=r(13).default,g=function(){function t(){var e,r=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=c(this,s(t).call(this,h.extend({id:"id",matcher:b,sorter:d},r))))._uId=r.startId||0,e.store=r.store||{},e}var e,r,n,i,y,m,g;return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&f(t,e)}(t,v),function(t,e,r){e&&a(t.prototype,e)}(t,[{key:"getEntries",value:(g=u(regeneratorRuntime.mark((function t(){var e,r,n,o=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=0<o.length&&void 0!==o[0]?o[0]:{},r=this.filterQuery(e),n=r.query,t.abrupt("return",this._find(Object.assign({},e,{paginate:!1,query:n})));case 3:case"end":return t.stop()}}),t,this)}))),function(){return g.apply(this,arguments)})},{key:"_find",value:(m=u(regeneratorRuntime.mark((function t(){var e,r,n,o,i,u,a,c,s=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=0<s.length&&void 0!==s[0]?s[0]:{},r=this.filterQuery(e),n=r.query,o=r.filters,i=r.paginate,u=h.values(this.store).filter(this.options.matcher(n)),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(t){return l(t,e)}))},i&&i.default){t.next=10;break}return t.abrupt("return",c.data);case 10:return t.abrupt("return",c);case 11:case"end":return t.stop()}}),t,this)}))),function(){return m.apply(this,arguments)})},{key:"_get",value:(y=u(regeneratorRuntime.mark((function t(e){var r,n,o,i,u=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1<u.length&&void 0!==u[1]?u[1]:{},!(e in this.store)){t.next=6;break}if(n=this.filterQuery(r),o=n.query,i=this.store[e],this.options.matcher(o)(i))return t.abrupt("return",l(i,r,this.id));t.next=6;break;case 6:throw new p.NotFound("No record found for id '".concat(e,"'"));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return y.apply(this,arguments)})},{key:"_create",value:(i=u(regeneratorRuntime.mark((function t(e){var r,n,i,u,a=this,c=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1<c.length&&void 0!==c[1]?c[1]:{},Array.isArray(e))return t.abrupt("return",Promise.all(e.map((function(t){return a._create(t,r)}))));t.next=3;break;case 3:return n=e[this.id]||this._uId++,i=h.extend({},e,o({},this.id,n)),u=this.store[n]=i,t.abrupt("return",l(u,r,this.id));case 7:case"end":return t.stop()}}),t,this)}))),function(t){return i.apply(this,arguments)})},{key:"_update",value:(n=u(regeneratorRuntime.mark((function t(e,r){var n,i,u,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=2<a.length&&void 0!==a[2]?a[2]:{},t.next=3,this._get(e);case 3:return i=t.sent,u=i[this.id],e=u==e?u:e,this.store[e]=h.extend({},r,o({},this.id,e)),t.abrupt("return",this._get(e,n));case 8:case"end":return t.stop()}}),t,this)}))),function(t,e){return n.apply(this,arguments)})},{key:"_patch",value:(r=u(regeneratorRuntime.mark((function t(e,r){var n,o,i,u=this,a=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(n=2<a.length&&void 0!==a[2]?a[2]:{},o=function(t){var e=t[u.id];return u.store[e]=h.extend(u.store[e],h.omit(r,u.id)),l(u.store[e],n,u.id)},null===e)return t.next=5,this.getEntries(n);t.next=7;break;case 5:return i=t.sent,t.abrupt("return",i.map(o));case 7:return t.t0=o,t.next=10,this._get(e,n);case 10:return t.t1=t.sent,t.abrupt("return",(0,t.t0)(t.t1));case 12:case"end":return t.stop()}}),t,this)}))),function(t,e){return r.apply(this,arguments)})},{key:"_remove",value:(e=u(regeneratorRuntime.mark((function t(e){var r,n,o,i=this,u=arguments;return regeneratorRuntime.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(r=1<u.length&&void 0!==u[1]?u[1]:{},null===e)return t.next=4,this.getEntries(r);t.next=6;break;case 4:return n=t.sent,t.abrupt("return",Promise.all(n.map((function(t){return i._remove(t[i.id],r)}))));case 6:return t.next=8,this._get(e,r);case 8:return o=t.sent,delete this.store[e],t.abrupt("return",o);case 11:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})}]),t}();t.exports=function(t){return new g(t)},t.exports.Service=g},function(t,e,r){(function(n){function o(t){return(o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}e.log=function(){var t;return"object"===("undefined"==typeof console?"undefined":o(console))&&console.log&&(t=console).log.apply(t,arguments)},e.formatArgs=function(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+t.exports.humanize(this.diff),this.useColors){var r="color: "+this.color;e.splice(1,0,r,"color: inherit");var n=0,o=0;e[0].replace(/%[a-zA-Z%]/g,(function(t){"%%"!==t&&(n++,"%c"===t&&(o=n))})),e.splice(o,0,r)}},e.save=function(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch(t){}},e.load=function(){var t;try{t=e.storage.getItem("debug")}catch(t){}return!t&&void 0!==n&&"env"in n&&(t=n.env.DEBUG),t},e.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+)/))},e.storage=function(){try{return localStorage}catch(t){}}(),e.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"],t.exports=r(7)(e),t.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}).call(this,r(2))},function(t,e,r){function n(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}t.exports=function(t){function e(t){for(var e=0,r=0;r<t.length;r++)e=(e<<5)-e+t.charCodeAt(r),e|=0;return o.colors[Math.abs(e)%o.colors.length]}function o(t){var r;function n(){for(var t=arguments.length,e=new Array(t),i=0;i<t;i++)e[i]=arguments[i];if(n.enabled){var u=n,a=Number(new Date),c=a-(r||a);u.diff=c,u.prev=r,u.curr=a,r=a,e[0]=o.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");var s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,(function(t,r){if("%%"===t)return t;s++;var n=o.formatters[r];if("function"==typeof n){var i=e[s];t=n.call(u,i),e.splice(s,1),s--}return t})),o.formatArgs.call(u,e),(u.log||o.log).apply(u,e)}}return n.namespace=t,n.enabled=o.enabled(t),n.useColors=o.useColors(),n.color=e(t),n.destroy=i,n.extend=u,"function"==typeof o.init&&o.init(n),o.instances.push(n),n}function i(){var t=o.instances.indexOf(this);return-1!==t&&(o.instances.splice(t,1),!0)}function u(t,e){var r=o(this.namespace+(void 0===e?":":e)+t);return r.log=this.log,r}function a(t){return t.toString().substring(2,t.toString().length-2).replace(/\.\*\?$/,"*")}return((o.debug=o).default=o).coerce=function(t){return t instanceof Error?t.stack||t.message:t},o.disable=function(){var t=[].concat(n(o.names.map(a)),n(o.skips.map(a).map((function(t){return"-"+t})))).join(",");return o.enable(""),t},o.enable=function(t){var e;o.save(t),o.names=[],o.skips=[];var r=("string"==typeof t?t:"").split(/[\s,]+/),n=r.length;for(e=0;e<n;e++)r[e]&&("-"===(t=r[e].replace(/\*/g,".*?"))[0]?o.skips.push(new RegExp("^"+t.substr(1)+"$")):o.names.push(new RegExp("^"+t+"$")));for(e=0;e<o.instances.length;e++){var i=o.instances[e];i.enabled=o.enabled(i.namespace)}},o.enabled=function(t){if("*"===t[t.length-1])return!0;var e,r;for(e=0,r=o.skips.length;e<r;e++)if(o.skips[e].test(t))return!1;for(e=0,r=o.names.length;e<r;e++)if(o.names[e].test(t))return!0;return!1},o.humanize=r(8),Object.keys(t).forEach((function(e){o[e]=t[e]})),o.instances=[],o.names=[],o.skips=[],o.formatters={},o.selectColor=e,o.enable(o.load()),o}},function(t,e){var r=36e5,n=864e5;function o(t,e,r,n){var o=1.5*r<=e;return Math.round(t/r)+" "+n+(o?"s":"")}t.exports=function(t,e){e=e||{};var i=typeof t;if("string"==i&&0<t.length)return function(t){if(!(100<(t=String(t)).length)){var e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t);if(e){var o=parseFloat(e[1]);switch((e[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*n;case"hours":case"hour":case"hrs":case"hr":case"h":return o*r;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}}}}(t);if("number"==i&&isFinite(t))return e.long?function(t){var e=Math.abs(t);return n<=e?o(t,e,n,"day"):r<=e?o(t,e,r,"hour"):6e4<=e?o(t,e,6e4,"minute"):1e3<=e?o(t,e,1e3,"second"):t+" ms"}(t):function(t){var e=Math.abs(t);return n<=e?Math.round(t/n)+"d":r<=e?Math.round(t/r)+"h":6e4<=e?Math.round(t/6e4)+"m":1e3<=e?Math.round(t/1e3)+"s":t+"ms"}(t);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(t))}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}Object.defineProperty(e,"__esModule",{value:!0});var o=r(3),i=o._,u=i.each,a=i.pick;function c(t){var e=[];return void 0!==t.id&&e.push(t.id),t.data&&e.push(t.data),e.push(t.params||{}),e}function s(t){var e={};return Array.isArray(t)?e={all:t}:"object"!==n(t)?e={all:[t]}:u(t,(function(t,r){e[r]=Array.isArray(t)?t:[t]})),e}function f(t){return"object"===n(t)&&"string"==typeof t.method&&"string"==typeof t.type}e.ACTIVATE_HOOKS=o.createSymbol("__feathersActivateHooks"),e.createHookObject=function(t){var e=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},r={};return Object.defineProperty(r,"toJSON",{value:function(){return a(this,"type","method","path","params","id","data","result","error")}}),Object.assign(r,e,{method:t,get path(){var t=e.app,r=e.service;return r&&t&&t.services?Object.keys(t.services).find((function(e){return t.services[e]===r})):null}})},e.defaultMakeArguments=c,e.makeArguments=function(t){switch(t.method){case"find":return[t.params];case"get":case"remove":return[t.id,t.params];case"update":case"patch":return[t.id,t.data,t.params];case"create":return[t.data,t.params]}return c(t)},e.convertHookData=s,e.isHookObject=f,e.getHooks=function(t,e,r,n){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],i=t.__hooks[r][n]||[],u=e.__hooks[r][n]||[];return o?u.concat(i):i.concat(u)},e.processHooks=function(t,e){function r(t){if(t){if(!f(t))throw new Error("".concat(o.type," hook for '").concat(o.method,"' method returned invalid hook object"));o=t}return o}var n=this,o=e;return t.reduce((function(t,e){var o=e.bind(n);return t.then((function(t){return o(t)})).then(r)}),Promise.resolve(o)).then((function(){return o})).catch((function(t){throw t.hook=o,t}))},e.enableHooks=function(t,e,r){if("function"==typeof t.hooks)return t;var n={};return r.forEach((function(t){n[t]={}})),Object.defineProperty(t,"__hooks",{value:n}),Object.assign(t,{hooks:function(t){var r=this;return u(t,(function(t,n){if(!r.__hooks[n])throw new Error("'".concat(n,"' is not a valid hook type"));var o=s(t);u(o,(function(t,r){if("all"!==r&&-1===e.indexOf(r))throw new Error("'".concat(r,"' is not a valid hook method"))})),e.forEach((function(t){var e=r.__hooks[n][t]||(r.__hooks[n][t]=[]);o.all&&e.push.apply(e,o.all),o[t]&&e.push.apply(e,o[t])}))})),this}})}},function(t,e,r){"use strict";function n(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}Object.defineProperty(e,"__esModule",{value:!0});var o=r(1),i=r(11);e.AdapterService=i.AdapterService;var u=r(4);e.filterQuery=u.default,e.FILTERS=u.FILTERS,e.OPERATORS=u.OPERATORS,function(t){for(var r in t)e.hasOwnProperty(r)||(e[r]=t[r])}(r(12)),e.select=function(t){for(var e=t&&t.query&&t.query.$select,r=arguments.length,i=new Array(1<r?r-1:0),u=1;u<r;u++)i[u-1]=arguments[u];function a(t){var r;return Array.isArray(e)?(r=o._).pick.apply(r,[t].concat(n(e))):t}return Array.isArray(e)&&i.length&&e.push.apply(e,i),function(t){return Array.isArray(t)?t.map(a):a(t)}}},function(t,e,r){"use strict";function n(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}var o=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};function i(t,e){if("function"!=typeof t[e])return Promise.reject(new u.NotImplemented("Method ".concat(e," not available")));for(var r=arguments.length,n=new Array(2<r?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return t[e].apply(t,n)}Object.defineProperty(e,"__esModule",{value:!0});var u=r(0),a=o(r(4)),c={find:!0,get:!1,update:!1},s=function(){function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=Object.assign({id:"id",events:[],paginate:{},multi:!1,filters:[],whitelist:[]},e)}return function(t,e,r){e&&n(t.prototype,e)}(t,[{key:"filterQuery",value:function(t,e){var r=0<arguments.length&&void 0!==t?t:{},n=1<arguments.length&&void 0!==e?e:{},o=void 0!==r.paginate?r.paginate:this.options.paginate,i=r.query,u=void 0===i?{}:i,c=Object.assign({operators:this.options.whitelist||[],filters:this.options.filters,paginate:o},n),s=a.default(u,c);return Object.assign(s,{paginate:o})}},{key:"allowsMulti",value:function(t){var e=c[t];if(void 0!==e)return e;var r=this.options.multi;return!0===r||!1===r?r:r.includes(t)}},{key:"find",value:function(t){return i(this,"_find",t)}},{key:"get",value:function(t,e){return i(this,"_get",t,e)}},{key:"create",value:function(t,e){return Array.isArray(t)&&!this.allowsMulti("create")?Promise.reject(new u.MethodNotAllowed("Can not create multiple entries")):i(this,"_create",t,e)}},{key:"update",value:function(t,e,r){return null===t||Array.isArray(e)?Promise.reject(new u.BadRequest("You can not replace multiple instances. Did you mean 'patch'?")):i(this,"_update",t,e,r)}},{key:"patch",value:function(t,e,r){return null!==t||this.allowsMulti("patch")?i(this,"_patch",t,e,r):Promise.reject(new u.MethodNotAllowed("Can not patch multiple entries"))}},{key:"remove",value:function(t,e){return null!==t||this.allowsMulti("remove")?i(this,"_remove",t,e):Promise.reject(new u.MethodNotAllowed("Can not remove multiple entries"))}},{key:"id",get:function(){return this.options.id}},{key:"events",get:function(){return this.options.events}}]),t}();e.AdapterService=s},function(t,e,r){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.compareNSB=function(t,e){return t<e?-1:e<t?1:0},e.compareArrays=function(t,r){var n,o;for(n=0;n<Math.min(t.length,r.length);n+=1)if(0!==(o=e.compare(t[n],r[n])))return o;return e.compareNSB(t.length,r.length)},e.compare=function(t,r){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:e.compareNSB,o=e,i=o.compareNSB,u=o.compare,a=o.compareArrays;if(void 0===t)return void 0===r?0:-1;if(void 0===r)return void 0===t?0:1;if(null===t)return null===r?0:-1;if(null===r)return null===t?0:1;if("number"==typeof t)return"number"==typeof r?i(t,r):-1;if("number"==typeof r)return"number"==typeof t?i(t,r):1;if("string"==typeof t)return"string"==typeof r?n(t,r):-1;if("string"==typeof r)return"string"==typeof t?n(t,r):1;if("boolean"==typeof t)return"boolean"==typeof r?i(t,r):-1;if("boolean"==typeof r)return"boolean"==typeof t?i(t,r):1;if(t instanceof Date)return r instanceof Date?i(t.getTime(),r.getTime()):-1;if(r instanceof Date)return t instanceof Date?i(t.getTime(),r.getTime()):1;if(Array.isArray(t))return Array.isArray(r)?a(t,r):-1;if(Array.isArray(r))return Array.isArray(t)?a(t,r):1;for(var c=Object.keys(t).sort(),s=Object.keys(r).sort(),f=0,l=0;l<Math.min(c.length,s.length);l+=1)if(0!==(f=u(t[c[l]],r[s[l]])))return f;return i(c.length,s.length)},e.sorter=function(t){var r=Object.keys(t).map((function(e){return{key:e,direction:t[e]}}));return function(t,n){var o,i=!0,u=!1,a=void 0;try{for(var c,s=r[Symbol.iterator]();!(i=(c=s.next()).done);i=!0){var f=c.value;if(0!=(o=f.direction*e.compare(t[f.key],n[f.key])))return o}}catch(t){u=!0,a=t}finally{try{i||null==s.return||s.return()}finally{if(u)throw a}}return 0}}},function(t,e,r){"use strict";function n(t){return(n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function o(t){var e="[object "+t+"]";return function(t){return Object.prototype.toString.call(t)===e}}r.r(e),r.d(e,"default",(function(){return g})),r.d(e,"compare",(function(){return w})),r.d(e,"comparable",(function(){return C}));var i=o("Array"),u=o("Object"),a=o("Function");function c(t,e){return a(t.get)?t.get(e):t[e]}function s(t){return function(e,r){if(!i(r)||!r.length)return t(e,r);for(var n=0,o=r.length;n<o;n++)if(t(e,c(r,n)))return!0;return!1}}function f(t){return function(e,r){if(!i(r)||!r.length)return t(e,r);for(var n=0,o=r.length;n<o;n++)if(!t(e,c(r,n)))return!1;return!0}}function l(t,e,r,n){return t.v(t.a,e,r,n)}var p={$eq:s((function(t,e){return t(e)})),$ne:f((function(t,e){return t(e)})),$gt:s((function(t,e){return t(e)})),$gte:s((function(t,e){return t(e)})),$lt:s((function(t,e){return t(e)})),$lte:s((function(t,e){return t(e)})),$mod:s((function(t,e){return t(e)})),$in:function(t,e){return t(e)},$nin:function(t,e){return t(e)},$not:function(t,e,r,n){return t(e,r,n)},$type:function(t,e){return t(e)},$all:function(t,e,r,n){return p.$and(t,e,r,n)},$size:function(t,e){return!!e&&t===e.length},$or:function(t,e,r,n){for(var o=0,i=t.length;o<i;o++)if(l(c(t,o),e,r,n))return!0;return!1},$nor:function(t,e,r,n){return!p.$or(t,e,r,n)},$and:function(t,e,r,n){for(var o=0,i=t.length;o<i;o++)if(!l(c(t,o),e,r,n))return!1;return!0},$regex:s((function(t,e){return"string"==typeof e&&t.test(e)})),$where:function(t,e,r,n){return t.call(e,e,r,n)},$elemMatch:function(t,e,r,n){return i(e)?!!~function(t,e){for(var r=0;r<t.length;r++)if(c(t,r),l(e,c(t,r)))return r;return-1}(e,t):l(t,e,r,n)},$exists:function(t,e,r,n){return n.hasOwnProperty(r)===t}},h={$eq:function(t,e,r){var n=r.comparable,o=r.compare;return t instanceof RegExp?s((function(e){return"string"==typeof e&&t.test(e)})):t instanceof Function?s(t):i(t)&&!t.length?s((function(t){return i(t)&&!t.length})):s(null===t?function(t){return null==t}:function(e){return 0===o(n(e),n(t))})},$gt:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return 0<o(n(e),n(t))}},$gte:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return 0<=o(n(e),n(t))}},$lt:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return o(n(e),n(t))<0}},$lte:function(t,e,r){var n=r.comparable,o=r.compare;return function(e){return o(n(e),n(t))<=0}},$in:function(t,e,r){var o=r.comparable;return function(e){if(!(e instanceof Array)){var i=o(e);if(i===e&&"object"===n(e))for(a=t.length;a--;)if(String(t[a])===String(e)&&"[object Object]"!==String(e))return!0;if(void 0===i)for(a=t.length;a--;)if(null==t[a])return!0;for(a=t.length;a--;){var u=l(b(c(t,a),r),e,a,t);if(u&&"[object Object]"!==String(u)&&"[object Object]"!==String(e))return!0}return!!~t.indexOf(i)}for(var a=e.length;a--;)if(~t.indexOf(o(c(e,a))))return!0;return!1}},$nin:function(t,e,r){var n=h.$in(t,e,r);return function(t,e,r,o){return!n(t,e,r,o)}},$mod:function(t){return function(e){return e%t[0]==t[1]}},$ne:function(t,e,r){var n=h.$eq(t,e,r);return f((function(t,e,r,o){return!n(t,e,r,o)}))},$and:function(t,e,r){return t.map(m(r))},$all:function(t,e,r){return h.$and(t,e,r)},$or:function(t,e,r){return t.map(m(r))},$nor:function(t,e,r){return t.map(m(r))},$not:function(t,e,r){var n=m(r)(t);return function(t,e,r){return!l(n,t,e,r)}},$type:function(t){return function(e,r,n){return null!=e&&(e instanceof t||e.constructor==t)}},$regex:function(t,e){return new RegExp(t,e.$options)},$where:function(t){return"string"==typeof t?new Function("obj","return "+t):t},$elemMatch:function(t,e,r){return m(r)(t)},$exists:function(t){return!!t}};function y(t,e){return{a:t,v:e}}function d(t,e){var r=[];if(function t(e,r,n,o,u){if(n!==r.length&&null!=e){var a=c(r,n);if(i(e)&&isNaN(Number(a)))for(var s=0,f=e.length;s<f;s++)t(c(e,s),r,n,e,u);else t(c(e,a),r,n+1,e,u)}else u.push([e,r[n-1],o])}(e,t.k,0,e,r),1===r.length){var n=r[0];return l(t.nv,n[0],n[1],n[2])}for(var o=t&&t.q&&void 0!==t.q.$ne,u=o,a=0;a<r.length;a++){var s=r[a],f=l(t.nv,s[0],s[1],s[2]);o?u&=f:u|=f}return u}function m(t){function e(t){return t&&function(t){return t&&(t.constructor===Object||t.constructor===Array||"function Object() { [native code] }"===t.constructor.toString()||"function Array() { [native code] }"===t.constructor.toString())}(t)||(t={$eq:t}),t}function r(e){e=n(e);var r=[];for(var u in e){var a=e[u];if("$options"!==u){var c=p[u]||t&&o&&o[u];if(c)h[u]&&(a=h[u](a,e,t)),r.push(y(n(a),c));else{if(36===u.charCodeAt(0))throw new Error("Unknown operation "+u);var s=u.split(".");r.push({a:{k:s,nv:i(a),q:a},v:d})}}}return 1===r.length?r[0]:y(r,p.$and)}var n=t.comparable,o=t.expressions,i=function(t){return function(t){return-1===function t(e,r){if(!u(e))return r;for(var n in e)r.push(n),t(e[n],r);return r}(t,[]).join(",").search(/[$.]/)}(t=e(t))?y(t,v):r(t)};return function(t){return r(e(t))}}function v(t,e){if(Object.prototype.toString.call(t)!==Object.prototype.toString.call(e))return!1;if(u(t)){if(Object.keys(t).length!==Object.keys(e).length)return!1;for(var r in t)if(!v(t[r],e[r]))return!1;return!0}if(i(t)){if(t.length!==e.length)return!1;for(var n=0,o=t.length;n<o;n++)if(!v(t[n],e[n]))return!1;return!0}return t===e}function b(t,e){var r=m(e)(t);return e&&e.select&&(r={a:r,v:function(t,r,n,o){return l(t,r&&e.select(r),n,o)}}),r}function g(t,e){var r=b(t,e=Object.assign({compare:w,comparable:C},e));return function(t,e,n){return l(r,t,e,n)}}function w(t,e){if(v(t,e))return 0;if(n(t)===n(e)){if(e<t)return 1;if(t<e)return-1}}function C(t){return t instanceof Date?t.getTime():i(t)?t.map(C):t&&"function"==typeof t.toJSON?t.toJSON():t}}],t.c=r,t.d=function(e,r,n){t.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:n})},t.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},t.t=function(e,r){if(1&r&&(e=t(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var n=Object.create(null);if(t.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var o in e)t.d(n,o,function(t){return e[t]}.bind(null,o));return n},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},t.p="",t(t.s=5);function t(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return e[n].call(o.exports,o,o.exports,t),o.l=!0,o.exports}var e,r})); |
{ | ||
"name": "feathers-memory", | ||
"description": "An in memory service store", | ||
"version": "4.0.1", | ||
"version": "4.1.0", | ||
"homepage": "https://github.com/feathersjs-ecosystem/feathers-memory", | ||
@@ -59,27 +59,27 @@ "main": "lib/index", | ||
"dependencies": { | ||
"@feathersjs/adapter-commons": "^4.0.0-pre.4", | ||
"@feathersjs/commons": "^4.0.0-pre.4", | ||
"@feathersjs/errors": "^4.0.0-pre.4", | ||
"@feathersjs/adapter-commons": "^4.3.6", | ||
"@feathersjs/commons": "^4.3.0", | ||
"@feathersjs/errors": "^4.3.4", | ||
"sift": "^8.5.0" | ||
}, | ||
"devDependencies": { | ||
"@babel/core": "^7.5.0", | ||
"@babel/preset-env": "^7.5.0", | ||
"@feathersjs/adapter-tests": "^4.0.0-pre.4", | ||
"@feathersjs/express": "^4.0.0-pre.4", | ||
"@feathersjs/feathers": "^4.0.0-pre.4", | ||
"@feathersjs/socketio": "^4.0.0-pre.4", | ||
"@types/node": "^12.0.12", | ||
"@babel/core": "^7.6.2", | ||
"@babel/preset-env": "^7.6.2", | ||
"@feathersjs/adapter-tests": "^4.3.4", | ||
"@feathersjs/express": "^4.3.5", | ||
"@feathersjs/feathers": "^4.3.4", | ||
"@feathersjs/socketio": "^4.3.5", | ||
"@types/node": "^12.7.11", | ||
"babel-loader": "^8.0.6", | ||
"body-parser": "^1.19.0", | ||
"dtslint": "^0.9.0", | ||
"dtslint": "^0.9.8", | ||
"istanbul": "^1.1.0-alpha.1", | ||
"mocha": "^6.1.4", | ||
"semistandard": "^14.0.1", | ||
"mocha": "^6.2.1", | ||
"semistandard": "^14.2.0", | ||
"shx": "^0.3.2", | ||
"uglifyjs-webpack-plugin": "^2.1.3", | ||
"webpack": "^4.36.1", | ||
"webpack-cli": "^3.3.5", | ||
"webpack-merge": "^4.2.1" | ||
"uglifyjs-webpack-plugin": "^2.2.0", | ||
"webpack": "^4.41.0", | ||
"webpack-cli": "^3.3.9", | ||
"webpack-merge": "^4.2.2" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
310300
2935