@feathersjs/client 4.5.9 → 4.5.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rest.min.js CHANGED
@@ -1 +1 @@
1
- !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return r={},e.m=t=[function(e,t,r){function n(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}var o=r(10),i=r(3).Unavailable,c=r(5)._,a=r(5).stripSlashes,u=r(3).convert;function s(e){if("ECONNREFUSED"===e.code)throw new i(e.message,c.pick(e,"address","port","config"));throw u(e)}var f=function(){function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.name=a(t.name),this.options=t.options,this.connection=t.connection,this.base="".concat(t.base,"/").concat(this.name)}var t,r;return t=e,(r=[{key:"makeUrl",value:function(e,t){e=e||{};var r=this.base;return null!=t&&(r+="/".concat(encodeURIComponent(t))),r+this.getQuery(e)}},{key:"getQuery",value:function(e){if(0===Object.keys(e).length)return"";var t=o.stringify(e);return"?".concat(t)}},{key:"find",value:function(e){var t=0<arguments.length&&void 0!==e?e:{};return this.request({url:this.makeUrl(t.query),method:"GET",headers:Object.assign({},t.headers)},t).catch(s)}},{key:"get",value:function(e,t){var r=1<arguments.length&&void 0!==t?t:{};return void 0===e?Promise.reject(new Error("id for 'get' can not be undefined")):this.request({url:this.makeUrl(r.query,e),method:"GET",headers:Object.assign({},r.headers)},r).catch(s)}},{key:"create",value:function(e,t){var r=1<arguments.length&&void 0!==t?t:{};return this.request({url:this.makeUrl(r.query),body:e,method:"POST",headers:Object.assign({"Content-Type":"application/json"},r.headers)},r).catch(s)}},{key:"update",value:function(e,t,r){var n=2<arguments.length&&void 0!==r?r:{};return void 0===e?Promise.reject(new Error("id for 'update' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(n.query,e),body:t,method:"PUT",headers:Object.assign({"Content-Type":"application/json"},n.headers)},n).catch(s)}},{key:"patch",value:function(e,t,r){var n=2<arguments.length&&void 0!==r?r:{};return void 0===e?Promise.reject(new Error("id for 'patch' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(n.query,e),body:t,method:"PATCH",headers:Object.assign({"Content-Type":"application/json"},n.headers)},n).catch(s)}},{key:"remove",value:function(e,t){var r=1<arguments.length&&void 0!==t?t:{};return void 0===e?Promise.reject(new Error("id for 'remove' can not be undefined, only 'null' when removing multiple entries")):this.request({url:this.makeUrl(r.query,e),method:"DELETE",headers:Object.assign({},r.headers)},r).catch(s)}}])&&n(t.prototype,r),e}();e.exports=f},function(e,t,r){"use strict";function n(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r}var o=Object.prototype.hasOwnProperty,i=Array.isArray,c=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();e.exports={arrayToObject:n,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],c=o.obj[o.prop],a=Object.keys(c),u=0;u<a.length;++u){var s=a[u],f=c[s];"object"==typeof f&&null!==f&&-1===r.indexOf(f)&&(t.push({obj:c,prop:s}),r.push(f))}return function(e){for(;1<e.length;){var t=e.pop(),r=t.obj[t.prop];if(i(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){var n=e.replace(/\+/g," ");if("iso-8859-1"===r)return n.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(n)}catch(e){return n}},encode:function(e,t,r){if(0===e.length)return e;var n=e;if("symbol"==typeof e?n=Symbol.prototype.toString.call(e):"string"!=typeof e&&(n=String(e)),"iso-8859-1"===r)return escape(n).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var o="",i=0;i<n.length;++i){var a=n.charCodeAt(i);45===a||46===a||95===a||126===a||48<=a&&a<=57||65<=a&&a<=90||97<=a&&a<=122?o+=n.charAt(i):a<128?o+=c[a]:a<2048?o+=c[192|a>>6]+c[128|63&a]:a<55296||57344<=a?o+=c[224|a>>12]+c[128|a>>6&63]+c[128|63&a]:(i+=1,a=65536+((1023&a)<<10|1023&n.charCodeAt(i)),o+=c[240|a>>18]+c[128|a>>12&63]+c[128|a>>6&63]+c[128|63&a])}return o},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(i(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,c){if(!r)return t;if("object"!=typeof r){if(i(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(c&&(c.plainObjects||c.allowPrototypes)||!o.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var a=t;return i(t)&&!i(r)&&(a=n(t,c)),i(t)&&i(r)?(r.forEach((function(r,n){var i;o.call(t,n)?(i=t[n])&&"object"==typeof i&&r&&"object"==typeof r?t[n]=e(i,r,c):t.push(r):t[n]=r})),t):Object.keys(r).reduce((function(t,n){var i=r[n];return o.call(t,n)?t[n]=e(t[n],i,c):t[n]=i,t}),a)}}},function(e,t,r){"use strict";var n=String.prototype.replace,o=/%20/g,i=r(1),c={RFC1738:"RFC1738",RFC3986:"RFC3986"};e.exports=i.assign({default:c.RFC3986,formatters:{RFC1738:function(e){return n.call(e,o,"+")},RFC3986:function(e){return String(e)}}},c)},function(e,t,r){function n(e){return(n="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=r(13)("@feathersjs/errors");function i(e,t,r,c,a){var u,s,f;(e=e||"Error")instanceof Error?(s=e.message||"Error",e.errors&&(u=e.errors)):"object"===n(e)?(s=e.message||"Error",a=e):s=e,a&&((f=JSON.parse(JSON.stringify(a))).errors?(u=f.errors,delete f.errors):a.errors&&(u=JSON.parse(JSON.stringify(a.errors)))),this.type="FeathersError",this.name=t,this.message=s,this.code=r,this.className=c,this.data=f,this.errors=u||{},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 c(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 u(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 y(e,t){i.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function h(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function d(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function b(e,t){i(this,e,"Gone",410,"gone")}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 O(e,t){i.call(this,e,"GeneralError",500,"general-error",t)}function j(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 C(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}c(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}}}),c(a,i),c(u,i),c(s,i),c(f,i),c(l,i),c(p,i),c(y,i),c(h,i),c(d,i),c(b,i),c(m,i),c(v,i),c(g,i),c(O,i),c(j,i),c(w,i),c(C,i);var S={FeathersError:i,BadRequest:a,NotAuthenticated:u,PaymentError:s,Forbidden:f,NotFound:l,MethodNotAllowed:p,NotAcceptable:y,Timeout:h,Conflict:d,Gone:b,LengthRequired:m,Unprocessable:v,TooManyRequests:g,GeneralError:O,NotImplemented:j,BadGateway:w,Unavailable:C,400:a,401:u,402:s,403:f,404:l,405:p,406:y,408:h,409:d,410:b,411:m,422:v,429:g,500:O,501:j,502:w,503:C};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=S[e.name],r=t?new t(e.message,e.data):new Error(e.message||e);return"object"===n(e)&&Object.assign(r,e),r}},S)},function(e,t){var r,n,o=e.exports={};function i(){throw new Error("setTimeout has not been defined")}function c(){throw new Error("clearTimeout has not been defined")}function a(e){if(r===setTimeout)return setTimeout(e,0);if((r===i||!r)&&setTimeout)return r=setTimeout,setTimeout(e,0);try{return r(e,0)}catch(t){try{return r.call(null,e,0)}catch(t){return r.call(this,e,0)}}}!function(){try{r="function"==typeof setTimeout?setTimeout:i}catch(e){r=i}try{n="function"==typeof clearTimeout?clearTimeout:c}catch(e){n=c}}();var u,s=[],f=!1,l=-1;function p(){f&&u&&(f=!1,u.length?s=u.concat(s):l=-1,s.length&&y())}function y(){if(!f){var e=a(p);f=!0;for(var t=s.length;t;){for(u=s,s=[];++l<t;)u&&u[l].run();l=-1,t=s.length}u=null,f=!1,function(e){if(n===clearTimeout)return clearTimeout(e);if((n===c||!n)&&clearTimeout)return n=clearTimeout,clearTimeout(e);try{n(e)}catch(t){try{return n.call(null,e)}catch(t){return n.call(this,e)}}}(e)}}function h(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 r=1;r<arguments.length;r++)t[r-1]=arguments[r];s.push(new h(e,t)),1!==s.length||f||a(y)},h.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,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},c=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=void 0;var a=i(r(16));c(r(6),t),t.hooks=a},function(e,t,r){"use strict";(function(e){function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){return(n="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){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var r=[],n=!0,o=!1,i=void 0;try{for(var c,a=e[Symbol.iterator]();!(n=(c=a.next()).done)&&(r.push(c.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.createSymbol=t.makeUrl=t.isPromise=t._=t.stripSlashes=void 0,t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")},t._={each:function(e,r){e&&"function"==typeof e.forEach?e.forEach(r):t._.isObject(e)&&Object.keys(e).forEach((function(t){return r(e[t],t)}))},some:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).some((function(e){var r=o(e,2),n=r[0],i=r[1];return t(n,i)}))},every:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).every((function(e){var r=o(e,2),n=r[0],i=r[1];return t(n,i)}))},keys:function(e){return Object.keys(e)},values:function(e){return t._.keys(e).map((function(t){return e[t]}))},isMatch:function(e,r){return t._.keys(r).every((function(t){return e[t]===r[t]}))},isEmpty:function(e){return 0===t._.keys(e).length},isObject:function(e){return"object"===n(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===n(e)&&null!==e},extend:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.assign.apply(Object,[e].concat(r))},omit:function(e){for(var r=t._.extend({},e),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(e){return delete r[e]})),r},pick:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t}),{})},merge:function(e,n){return t._.isObject(e)&&t._.isObject(n)&&Object.keys(n).forEach((function(o){t._.isObject(n[o])?(e[o]||Object.assign(e,r({},o,{})),t._.merge(e[o],n[o])):Object.assign(e,r({},o,n[o]))})),e}},t.isPromise=function(e){return t._.isObject(e)&&"function"==typeof e.then},t.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",c=o("host")||e.env.HOST_NAME||"localhost",a="development"===i||"test"===i?"http":"https",u=o("port")||e.env.PORT||3030,s="development"===i||"test"===i?":".concat(u):"";return r=r||"","".concat(a,"://").concat(c).concat(s,"/").concat(t.stripSlashes(r))},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol(e):e}}).call(this,r(4))},function(e,t,r){e.exports=r(8)},function(e,t,r){var n=r(9),o=r(17),i=r(18),c=r(19),a=r(20),u=r(21),s=r(0),f=r(22),l={jquery:n,superagent:o,request:i,fetch:c,axios:a,angular:u,angularHttpClient:f};function p(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t={Base:s};return Object.keys(l).forEach((function(r){t[r]=function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:l[r];if(!t)throw new Error("".concat(r," has to be provided to feathers-rest"));function i(r){return new o({base:e,name:r,connection:t,options:n})}function c(e){if("function"==typeof e.defaultService)throw new Error("Only one default client provider can be configured");e.rest=t,e.defaultService=i}return"function"==typeof n&&(o=n,n={}),c.Service=o,c.service=i,c}})),t}e.exports=Object.assign(p,{SuperagentClient:o,FetchClient:c,jQueryClient:n,RequestClient:i,AxiosClient:a,AngularClient:u,AngularHttpClient:f}),e.exports.default=p},function(e,t,r){function n(e){return(n="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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(0),u=function(){!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&&i(e,t)}(u,a);var e,t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o,i,a=c(e);return o=this,!(i=t?(r=c(this).constructor,Reflect.construct(a,arguments,r)):a.apply(this,arguments))||"object"!==n(i)&&"function"!=typeof i?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(o):i}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return e=u,(t=[{key:"request",value:function(e,t){var r=this,n=t.connection,o=void 0===n?{}:n,i=Object.assign({},e.headers,this.options.headers,o.headers),c=Object.assign({dataType:e.type||"json"},o,e,{headers:i});return e.body&&(c.data=JSON.stringify(e.body),c.contentType="application/json"),delete c.type,delete c.body,new Promise((function(e,t){r.connection.ajax(c).then(e,(function(e){var r=e.responseText;try{r=JSON.parse(r)}catch(t){r=new Error(e.responseText)}r.xhr=r.response=e,t(r)}))}))}}])&&o(e.prototype,t),u}();e.exports=u},function(e,t,r){"use strict";var n=r(11),o=r(12),i=r(2);e.exports={formats:i,parse:o,stringify:n}},function(e,t,r){"use strict";function n(e,t){s.apply(e,u(t)?t:[t])}var o=r(1),i=r(2),c=Object.prototype.hasOwnProperty,a={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},u=Array.isArray,s=Array.prototype.push,f=Date.prototype.toISOString,l=i.default,p={addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:o.encode,encodeValuesOnly:!1,format:l,formatter:i.formatters[l],indices:!1,serializeDate:function(e){return f.call(e)},skipNulls:!1,strictNullHandling:!1};e.exports=function(e,t){var r=e,s=function(e){if(!e)return p;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||p.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=i.default;if(void 0!==e.format){if(!c.call(i.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=i.formatters[r],o=p.filter;return"function"!=typeof e.filter&&!u(e.filter)||(o=e.filter),{addQueryPrefix:"boolean"==typeof e.addQueryPrefix?e.addQueryPrefix:p.addQueryPrefix,allowDots:void 0===e.allowDots?p.allowDots:!!e.allowDots,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:p.charsetSentinel,delimiter:void 0===e.delimiter?p.delimiter:e.delimiter,encode:"boolean"==typeof e.encode?e.encode:p.encode,encoder:"function"==typeof e.encoder?e.encoder:p.encoder,encodeValuesOnly:"boolean"==typeof e.encodeValuesOnly?e.encodeValuesOnly:p.encodeValuesOnly,filter:o,formatter:n,serializeDate:"function"==typeof e.serializeDate?e.serializeDate:p.serializeDate,skipNulls:"boolean"==typeof e.skipNulls?e.skipNulls:p.skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:p.strictNullHandling}}(t);"function"==typeof s.filter?r=(0,s.filter)("",r):u(s.filter)&&(h=s.filter);var f,l=[];if("object"!=typeof r||null===r)return"";f=t&&t.arrayFormat in a?t.arrayFormat:t&&"indices"in t&&!t.indices?"repeat":"indices";var y=a[f],h=h||Object.keys(r);s.sort&&h.sort(s.sort);for(var d=0;d<h.length;++d){var b=h[d];s.skipNulls&&null===r[b]||n(l,function e(t,r,i,c,a,s,f,l,y,h,d,b,m){var v,g=t;if("function"==typeof f?g=f(r,g):g instanceof Date?g=h(g):"comma"===i&&u(g)&&(g=o.maybeMap(g,(function(e){return e instanceof Date?h(e):e})).join(",")),null===g){if(c)return s&&!b?s(r,p.encoder,m,"key"):r;g=""}if("string"==typeof(v=g)||"number"==typeof v||"boolean"==typeof v||"symbol"==typeof v||"bigint"==typeof v||o.isBuffer(g))return s?[d(b?r:s(r,p.encoder,m,"key"))+"="+d(s(g,p.encoder,m,"value"))]:[d(r)+"="+d(String(g))];var O,j,w=[];if(void 0===g)return w;j=u(f)?f:(O=Object.keys(g),l?O.sort(l):O);for(var C=0;C<j.length;++C){var S=j[C],k=g[S];a&&null===k||n(w,e(k,u(g)?"function"==typeof i?i(r,S):r:r+(y?"."+S:"["+S+"]"),i,c,a,s,f,l,y,h,d,b,m))}return w}(r[b],b,y,s.strictNullHandling,s.skipNulls,s.encode?s.encoder:null,s.filter,s.sort,s.allowDots,s.serializeDate,s.formatter,s.encodeValuesOnly,s.charset))}var m=l.join(s.delimiter),v=!0===s.addQueryPrefix?"?":"";return s.charsetSentinel&&("iso-8859-1"===s.charset?v+="utf8=%26%2310003%3B&":v+="utf8=%E2%9C%93&"),0<m.length?v+m:""}},function(e,t,r){"use strict";function n(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e}function o(e,t,r,o){if(e){var i=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,u=0<r.depth&&/(\[[^[\]]*])/.exec(i),s=u?i.slice(0,u.index):i,f=[];if(s){if(!r.plainObjects&&c.call(Object.prototype,s)&&!r.allowPrototypes)return;f.push(s)}for(var l=0;0<r.depth&&null!==(u=a.exec(i))&&l<r.depth;){if(l+=1,!r.plainObjects&&c.call(Object.prototype,u[1].slice(1,-1))&&!r.allowPrototypes)return;f.push(u[1])}return u&&f.push("["+i.slice(u.index)+"]"),function(e,t,r,o){for(var i=o?t:n(t,r),c=e.length-1;0<=c;--c){var a,u,s,f=e[c];"[]"===f&&r.parseArrays?a=[].concat(i):(a=r.plainObjects?Object.create(null):{},u="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,s=parseInt(u,10),r.parseArrays||""!==u?!isNaN(s)&&f!==u&&String(s)===u&&0<=s&&r.parseArrays&&s<=r.arrayLimit?(a=[])[s]=i:a[u]=i:a={0:i}),i=a}return i}(f,t,r,o)}}var i=r(1),c=Object.prototype.hasOwnProperty,a=Array.isArray,u={allowDots:!1,allowPrototypes:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:i.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1};e.exports=function(e,t){var r=function(e){if(!e)return u;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=void 0===e.charset?u.charset:e.charset;return{allowDots:void 0===e.allowDots?u.allowDots:!!e.allowDots,allowPrototypes:"boolean"==typeof e.allowPrototypes?e.allowPrototypes:u.allowPrototypes,arrayLimit:"number"==typeof e.arrayLimit?e.arrayLimit:u.arrayLimit,charset:t,charsetSentinel:"boolean"==typeof e.charsetSentinel?e.charsetSentinel:u.charsetSentinel,comma:"boolean"==typeof e.comma?e.comma:u.comma,decoder:"function"==typeof e.decoder?e.decoder:u.decoder,delimiter:"string"==typeof e.delimiter||i.isRegExp(e.delimiter)?e.delimiter:u.delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:u.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:"boolean"==typeof e.interpretNumericEntities?e.interpretNumericEntities:u.interpretNumericEntities,parameterLimit:"number"==typeof e.parameterLimit?e.parameterLimit:u.parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:"boolean"==typeof e.plainObjects?e.plainObjects:u.plainObjects,strictNullHandling:"boolean"==typeof e.strictNullHandling?e.strictNullHandling:u.strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var r,o,s,f,l,p,y={},h=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,d=t.parameterLimit===1/0?void 0:t.parameterLimit,b=h.split(t.delimiter,d),m=-1,v=t.charset;if(t.charsetSentinel)for(r=0;r<b.length;++r)0===b[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===b[r]?v="utf-8":"utf8=%26%2310003%3B"===b[r]&&(v="iso-8859-1"),m=r,r=b.length);for(r=0;r<b.length;++r)r!==m&&((p=-1===(f=-1===(s=(o=b[r]).indexOf("]="))?o.indexOf("="):s+1)?(l=t.decoder(o,u.decoder,v,"key"),t.strictNullHandling?null:""):(l=t.decoder(o.slice(0,f),u.decoder,v,"key"),i.maybeMap(n(o.slice(f+1),t),(function(e){return t.decoder(e,u.decoder,v,"value")}))))&&t.interpretNumericEntities&&"iso-8859-1"===v&&(p=p.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))),-1<o.indexOf("[]=")&&(p=a(p)?[p]:p),c.call(y,l)?y[l]=i.combine(y[l],p):y[l]=p);return y}(e,r):e,f=r.plainObjects?Object.create(null):{},l=Object.keys(s),p=0;p<l.length;++p){var y=l[p],h=o(y,s[y],r,"string"==typeof e);f=i.merge(f,h,r)}return i.compact(f)}},function(e,t,r){(function(n){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 r="color: "+this.color;t.splice(1,0,r,"color: inherit");var n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)}},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!==n&&"env"in n&&(e=n.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"],t.log=console.debug||console.log||function(){},e.exports=r(14)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}).call(this,r(4))},function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e))return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}e.exports=function(e){function t(e){var r;function n(){for(var e,o,i,c,a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];n.enabled&&(e=n,i=(o=Number(new Date))-(r||o),e.diff=i,e.prev=r,e.curr=o,r=o,u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&u.unshift("%O"),u[c=0]=u[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return r;c++;var o,i=t.formatters[n];return"function"==typeof i&&(o=u[c],r=i.call(e,o),u.splice(c,1),c--),r})),t.formatArgs.call(e,u),(e.log||t.log).apply(e,u))}return n.namespace=e,n.enabled=t.enabled(e),n.useColors=t.useColors(),n.color=t.selectColor(e),n.destroy=o,n.extend=i,"function"==typeof t.init&&t.init(n),t.instances.push(n),n}function o(){var e=t.instances.indexOf(this);return-1!==e&&(t.instances.splice(e,1),!0)}function i(e,r){var n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function c(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(n(t.names.map(c)),n(t.skips.map(c).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")));for(r=0;r<t.instances.length;r++){var i=t.instances[r];i.enabled=t.enabled(i.namespace)}},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(15),Object.keys(e).forEach((function(r){t[r]=e[r]})),t.instances=[],t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},function(e,t){var r=36e5,n=864e5;function o(e,t,r,n){var o=1.5*r<=t;return Math.round(e/r)+" "+n+(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+) *(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*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}}}}(e);if("number"==i&&isFinite(e))return(t.long?function(e){var t=Math.abs(e);return n<=t?o(e,t,n,"day"):r<=t?o(e,t,r,"hour"):6e4<=t?o(e,t,6e4,"minute"):1e3<=t?o(e,t,1e3,"second"):e+" ms"}:function(e){var t=Math.abs(e);return n<=t?Math.round(e/n)+"d":r<=t?Math.round(e/r)+"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,r){"use strict";function n(e){return(n="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.enableHooks=t.processHooks=t.getHooks=t.isHookObject=t.convertHookData=t.makeArguments=t.defaultMakeArguments=t.createHookObject=t.ACTIVATE_HOOKS=void 0;var o=r(6),i=o._,c=i.each,a=i.pick;function u(e){var t=[];return void 0!==e.id&&t.push(e.id),e.data&&t.push(e.data),t.push(e.params||{}),t}function s(e){var t={};return Array.isArray(e)?t={all:e}:"object"!==n(e)?t={all:[e]}:c(e,(function(e,r){t[r]=Array.isArray(e)?e:[e]})),t}function f(e){return"object"===n(e)&&"string"==typeof e.method&&"string"==typeof e.type}t.ACTIVATE_HOOKS=o.createSymbol("__feathersActivateHooks"),t.createHookObject=function(e){var t=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,t,{method:e,get path(){var e=t.app,r=t.service;return r&&e&&e.services?Object.keys(e.services).find((function(t){return e.services[t]===r})):null}})},t.defaultMakeArguments=u,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 u(e)},t.convertHookData=s,t.isHookObject=f,t.getHooks=function(e,t,r,n){var o=4<arguments.length&&void 0!==arguments[4]&&arguments[4],i=e.__hooks[r][n]||[],c=t.__hooks[r][n]||[];return o?c.concat(i):i.concat(c)},t.processHooks=function(e,t){function r(e){if(e){if(!f(e))throw new Error("".concat(o.type," hook for '").concat(o.method,"' method returned invalid hook object"));o=e}return o}var n=this,o=t;return e.reduce((function(e,t){var o=t.bind(n);return e.then((function(e){return o(e)})).then(r)}),Promise.resolve(o)).then((function(){return o})).catch((function(e){throw e.hook=o,e}))},t.enableHooks=function(e,t,r){if("function"==typeof e.hooks)return e;var n={};return r.forEach((function(e){n[e]={}})),Object.defineProperty(e,"__hooks",{configurable:!0,value:n,writable:!0}),Object.assign(e,{hooks:function(e){var r=this;return c(e,(function(e,n){if(!r.__hooks[n])throw new Error("'".concat(n,"' is not a valid hook type"));var o=s(e);c(o,(function(e,r){if("all"!==r&&-1===t.indexOf(r))throw new Error("'".concat(r,"' is not a valid hook method"))})),t.forEach((function(e){var t=r.__hooks[n][e]||(r.__hooks[n][e]=[]);o.all&&t.push.apply(t,o.all),o[e]&&t.push.apply(t,o[e])}))})),this}})}},function(e,t,r){function n(e){return(n="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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(0),u=function(){!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&&i(e,t)}(u,a);var e,t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o,i,a=c(e);return o=this,!(i=t?(r=c(this).constructor,Reflect.construct(a,arguments,r)):a.apply(this,arguments))||"object"!==n(i)&&"function"!=typeof i?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(o):i}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return e=u,(t=[{key:"request",value:function(e,t){var r=this.connection(e.method,e.url).set(this.options.headers||{}).set("Accept","application/json").set(t.connection||{}).set(e.headers||{}).type(e.type||"json");return new Promise((function(t,n){r.set(e.headers),e.body&&r.send(e.body),r.end((function(e,r){if(e){try{var o=e.response;(e=JSON.parse(e.response.text)).response=o}catch(e){}return n(e)}t(r&&r.body)}))}))}}])&&o(e.prototype,t),u}();e.exports=u},function(e,t,r){function n(e){return(n="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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(0),u=function(){!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&&i(e,t)}(u,a);var e,t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o,i,a=c(e);return o=this,!(i=t?(r=c(this).constructor,Reflect.construct(a,arguments,r)):a.apply(this,arguments))||"object"!==n(i)&&"function"!=typeof i?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(o):i}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return e=u,(t=[{key:"request",value:function(e,t){var r=this;return new Promise((function(n,o){var i=t.connection,c=void 0===i?{}:i,a=Object.assign({},e.headers,c.headers);r.connection(Object.assign({json:!0},e,t.connection,{headers:a}),(function(e,t,r){return e?o(e):!e&&400<=t.statusCode?"string"==typeof r?o(new Error(r)):(r.response=t,o(Object.assign(new Error(r.message),r))):void n(r)}))}))}}])&&o(e.prototype,t),u}();e.exports=u},function(e,t,r){function n(e){return(n="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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(0),u=function(){!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&&i(e,t)}(u,a);var e,t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o,i,a=c(e);return o=this,!(i=t?(r=c(this).constructor,Reflect.construct(a,arguments,r)):a.apply(this,arguments))||"object"!==n(i)&&"function"!=typeof i?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(o):i}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return e=u,(t=[{key:"request",value:function(e,t){var r=Object.assign({},e,t.connection);return r.headers=Object.assign({Accept:"application/json"},this.options.headers,r.headers),e.body&&(r.body=JSON.stringify(e.body)),(0,this.connection)(e.url,r).then(this.checkStatus).then((function(e){return 204===e.status?null:e.json()}))}},{key:"checkStatus",value:function(e){return e.ok?e:e.json().catch((function(){return new(errors[e.status]||Error)("JSON parsing error")})).then((function(t){throw t.response=e,t}))}}])&&o(e.prototype,t),u}();e.exports=u},function(e,t,r){function n(e){return(n="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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(0),u=function(){!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&&i(e,t)}(u,a);var e,t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o,i,a=c(e);return o=this,!(i=t?(r=c(this).constructor,Reflect.construct(a,arguments,r)):a.apply(this,arguments))||"object"!==n(i)&&"function"!=typeof i?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(o):i}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return e=u,(t=[{key:"request",value:function(e,t){var r=Object.assign({url:e.url,method:e.method,data:e.body,headers:Object.assign({Accept:"application/json"},this.options.headers,e.headers)},t.connection);return this.connection.request(r).then((function(e){return e.data})).catch((function(e){var t=e.response||e;throw!(t instanceof Error)&&t.data||t}))}}])&&o(e.prototype,t),u}();e.exports=u},function(e,t,r){function n(e){return(n="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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(0),u=function(){!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&&i(e,t)}(u,a);var e,t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o,i,a=c(e);return o=this,!(i=t?(r=c(this).constructor,Reflect.construct(a,arguments,r)):a.apply(this,arguments))||"object"!==n(i)&&"function"!=typeof i?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(o):i}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return e=u,(t=[{key:"request",value:function(e,t){var r=this.connection,n=this.options.Headers;if(!r||!n)throw new Error("Please pass angular's 'http' (instance) and and object with 'Headers' (class) to feathers-rest");var o=e.url,i=t.connection,c=void 0===i?{}:i,a=new n(Object.assign({Accept:"application/json"},this.options.headers,e.headers,c.headers)),u=Object.assign({method:e.method,body:e.body},c,{headers:a});return new Promise((function(e,t){r.request(o,u).subscribe(e,t)})).then((function(e){return e.json()})).catch((function(e){var t=e.response||e;throw!(t instanceof Error)&&t.json()||t}))}}])&&o(e.prototype,t),u}();e.exports=u},function(e,t,r){function n(e){return(n="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){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return(i=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function c(e){return(c=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var a=r(0),u=function(){!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&&i(e,t)}(u,a);var e,t,r=function(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o,i,a=c(e);return o=this,!(i=t?(r=c(this).constructor,Reflect.construct(a,arguments,r)):a.apply(this,arguments))||"object"!==n(i)&&"function"!=typeof i?function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(o):i}}(u);function u(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,u),r.apply(this,arguments)}return e=u,(t=[{key:"request",value:function(e,t){var r=this.connection,n=this.options.HttpHeaders;if(!r||!n)throw new Error("Please pass angular's 'httpClient' (instance) and and object with 'HttpHeaders' (class) to feathers-rest");var o=e.url,i=t.connection,c=void 0===i?{}:i,a=new n(Object.assign({Accept:"application/json"},this.options.headers,e.headers,c.headers)),u=Object.assign({body:e.body},t.connection,{headers:a});return new Promise((function(t,n){r.request(e.method,o,u).subscribe(t,n)})).catch((function(e){var t=e.error;if(t)throw"string"==typeof t?JSON.parse(t):t;throw e}))}}])&&o(e.prototype,t),u}();e.exports=u}],e.c=r,e.d=function(t,r,n){e.o(t,r)||Object.defineProperty(t,r,{enumerable:!0,get:n})},e.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},e.t=function(t,r){if(1&r&&(t=e(t)),8&r)return t;if(4&r&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(e.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&r&&"string"!=typeof t)for(var o in t)e.d(n,o,function(e){return t[e]}.bind(null,o));return n},e.n=function(t){var r=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(r,"a",r),r},e.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},e.p="",e(e.s=7);function e(n){if(r[n])return r[n].exports;var o=r[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,e),o.l=!0,o.exports}var t,r}));
1
+ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.feathers=t():e.feathers=t()}(this,(function(){return e={898:function(e,t,r){var n;t.formatArgs=function(t){var r,n,o;t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),this.useColors&&(r="color: "+this.color,t.splice(1,0,r,"color: inherit"),t[o=n=0].replace(/%[a-zA-Z%]/g,(function(e){"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r))},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&&"undefined"!=typeof process&&"env"in process&&(e=process.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.destroy=(n=!1,function(){n||(n=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}),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"],t.log=console.debug||console.log||function(){},e.exports=r(604)(t),e.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},604:function(e,t,r){function n(e){return function(e){if(Array.isArray(e))return o(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||function(e,t){if(e){if("string"==typeof e)return o(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(e,t):void 0}}(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}e.exports=function(e){function t(e){var r,n,i,a=null;function c(){for(var e,n,o,i,a=arguments.length,u=new Array(a),s=0;s<a;s++)u[s]=arguments[s];c.enabled&&(e=c,o=(n=Number(new Date))-(r||n),e.diff=o,e.prev=r,e.curr=n,r=n,u[0]=t.coerce(u[0]),"string"!=typeof u[0]&&u.unshift("%O"),u[i=0]=u[0].replace(/%([a-zA-Z%])/g,(function(r,n){if("%%"===r)return"%";i++;var o=t.formatters[n];return"function"==typeof o&&(n=u[i],r=o.call(e,n),u.splice(i,1),i--),r})),t.formatArgs.call(e,u),(e.log||t.log).apply(e,u))}return c.namespace=e,c.useColors=t.useColors(),c.color=t.selectColor(e),c.extend=o,c.destroy=t.destroy,Object.defineProperty(c,"enabled",{enumerable:!0,configurable:!1,get:function(){return null!==a?a:(n!==t.namespaces&&(n=t.namespaces,i=t.enabled(e)),i)},set:function(e){a=e}}),"function"==typeof t.init&&t.init(c),c}function o(e,r){return(e=t(this.namespace+(void 0===r?":":r)+e)).log=this.log,e}function i(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return((t.debug=t).default=t).coerce=function(e){return e instanceof Error?e.stack||e.message:e},t.disable=function(){var e=[].concat(n(t.names.map(i)),n(t.skips.map(i).map((function(e){return"-"+e})))).join(",");return t.enable(""),e},t.enable=function(e){var r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];var n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.substr(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;var r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(378),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((function(r){t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){for(var r=0,n=0;n<e.length;n++)r=(r<<5)-r+e.charCodeAt(n),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},905:function(e,t,r){e.exports=r(357)},196:function(e,t,r){"use strict";function n(e){return(n="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)}Object.defineProperty(t,"__esModule",{value:!0}),t.enableHooks=t.processHooks=t.getHooks=t.isHookObject=t.convertHookData=t.makeArguments=t.defaultMakeArguments=t.createHookObject=t.ACTIVATE_HOOKS=void 0;var o=r(541),i=(r=o._).each,a=r.pick;function c(e){var t=[];return void 0!==e.id&&t.push(e.id),e.data&&t.push(e.data),t.push(e.params||{}),t}function u(e){var t={};return Array.isArray(e)?t={all:e}:"object"!==n(e)?t={all:[e]}:i(e,(function(e,r){t[r]=Array.isArray(e)?e:[e]})),t}function s(e){return"object"===n(e)&&"string"==typeof e.method&&"string"==typeof e.type}t.ACTIVATE_HOOKS=(0,o.createSymbol)("__feathersActivateHooks"),t.createHookObject=function(e){var t=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,t,{method:e,get path(){var e=t.app,r=t.service;return r&&e&&e.services?Object.keys(e.services).find((function(t){return e.services[t]===r})):null}})},t.defaultMakeArguments=c,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 c(e)},t.convertHookData=u,t.isHookObject=s,t.getHooks=function(e,t,r,n){return e=e.__hooks[r][n]||[],n=t.__hooks[r][n]||[],4<arguments.length&&void 0!==arguments[4]&&arguments[4]?n.concat(e):e.concat(n)},t.processHooks=function(e,t){function r(e){if(e){if(!s(e))throw new Error("".concat(o.type," hook for '").concat(o.method,"' method returned invalid hook object"));o=e}return o}var n=this,o=t;return e.reduce((function(e,t){var o=t.bind(n);return e.then((function(e){return o(e)})).then(r)}),Promise.resolve(o)).then((function(){return o})).catch((function(e){throw e.hook=o,e}))},t.enableHooks=function(e,t,r){if("function"==typeof e.hooks)return e;var n={};return r.forEach((function(e){n[e]={}})),Object.defineProperty(e,"__hooks",{configurable:!0,value:n,writable:!0}),Object.assign(e,{hooks:function(e){var r=this;return i(e,(function(e,n){if(!r.__hooks[n])throw new Error("'".concat(n,"' is not a valid hook type"));var o=u(e);i(o,(function(e,r){if("all"!==r&&-1===t.indexOf(r))throw new Error("'".concat(r,"' is not a valid hook method"))})),t.forEach((function(e){var t=r.__hooks[n][e]||(r.__hooks[n][e]=[]);o.all&&t.push.apply(t,o.all),o[e]&&t.push.apply(t,o[e])}))})),this}})}},575:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r),Object.defineProperty(e,n,{enumerable:!0,get:function(){return t[r]}})}:function(e,t,r,n){e[n=void 0===n?r:n]=t[r]}),o=this&&this.__setModuleDefault||(Object.create?function(e,t){Object.defineProperty(e,"default",{enumerable:!0,value:t})}:function(e,t){e.default=t}),i=this&&this.__importStar||function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var r in e)"default"!==r&&Object.prototype.hasOwnProperty.call(e,r)&&n(t,e,r);return o(t,e),t},a=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),t.hooks=void 0,i=i(r(196)),a(r(541),t),t.hooks=i},541:function(e,t){"use strict";function r(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function n(e){return(n="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 r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,i=[],a=!0,c=!1;try{for(r=r.call(e);!(a=(n=r.next()).done)&&(i.push(n.value),!t||i.length!==t);a=!0);}catch(e){c=!0,o=e}finally{try{a||null==r.return||r.return()}finally{if(c)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return i(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Map"===(r="Object"===r&&e.constructor?e.constructor.name:r)||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}Object.defineProperty(t,"__esModule",{value:!0}),t.createSymbol=t.makeUrl=t.isPromise=t._=t.stripSlashes=void 0,t.stripSlashes=function(e){return e.replace(/^(\/+)|(\/+)$/g,"")},t._={each:function(e,r){e&&"function"==typeof e.forEach?e.forEach(r):t._.isObject(e)&&Object.keys(e).forEach((function(t){return r(e[t],t)}))},some:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).some((function(e){e=(r=o(e,2))[0];var r=r[1];return t(e,r)}))},every:function(e,t){return Object.keys(e).map((function(t){return[e[t],t]})).every((function(e){e=(r=o(e,2))[0];var r=r[1];return t(e,r)}))},keys:function(e){return Object.keys(e)},values:function(e){return t._.keys(e).map((function(t){return e[t]}))},isMatch:function(e,r){return t._.keys(r).every((function(t){return e[t]===r[t]}))},isEmpty:function(e){return 0===t._.keys(e).length},isObject:function(e){return"object"===n(e)&&!Array.isArray(e)&&null!==e},isObjectOrArray:function(e){return"object"===n(e)&&null!==e},extend:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return Object.assign.apply(Object,[e].concat(r))},omit:function(e){for(var r=t._.extend({},e),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(e){return delete r[e]})),r},pick:function(e){for(var t=arguments.length,r=new Array(1<t?t-1:0),n=1;n<t;n++)r[n-1]=arguments[n];return r.reduce((function(t,r){return void 0!==e[r]&&(t[r]=e[r]),t}),{})},merge:function(e,n){return t._.isObject(e)&&t._.isObject(n)&&Object.keys(n).forEach((function(o){t._.isObject(n[o])?(e[o]||Object.assign(e,r({},o,{})),t._.merge(e[o],n[o])):Object.assign(e,r({},o,n[o]))})),e}},t.isPromise=function(e){return t._.isObject(e)&&"function"==typeof e.then},t.makeUrl=function(e){var r=(i="function"==typeof(o=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{}).get?o.get.bind(o):function(){})("env")||"production",n=i("host")||process.env.HOST_NAME||"localhost",o="development"===r||"test"===r?"http":"https",i=i("port")||process.env.PORT||3030;return i="development"===r||"test"===r?":".concat(i):"",e=e||"","".concat(o,"://").concat(n).concat(i,"/").concat(t.stripSlashes(e))},t.createSymbol=function(e){return"undefined"!=typeof Symbol?Symbol(e):e}},441:function(e,t,r){function n(e){return(n="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=r(898)("@feathersjs/errors");function i(e,t,r,a,c){var u,s,f;(e=e||"Error")instanceof Error?(s=e.message||"Error",e.errors&&(u=e.errors)):"object"===n(e)?(s=e.message||"Error",c=e):s=e,c&&((f=JSON.parse(JSON.stringify(c))).errors?(u=f.errors,delete f.errors):c.errors&&(u=JSON.parse(JSON.stringify(c.errors)))),this.type="FeathersError",this.name=t,this.message=s,this.code=r,this.className=a,this.data=f,this.errors=u||{},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 a(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e}function c(e,t){i.call(this,e,"BadRequest",400,"bad-request",t)}function u(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 y(e,t){i.call(this,e,"NotAcceptable",406,"not-acceptable",t)}function d(e,t){i.call(this,e,"Timeout",408,"timeout",t)}function h(e,t){i.call(this,e,"Conflict",409,"conflict",t)}function b(e,t){i(this,e,"Gone",410,"gone")}function m(e,t){i.call(this,e,"LengthRequired",411,"length-required",t)}function g(e,t){i.call(this,e,"Unprocessable",422,"unprocessable",t)}function v(e,t){i.call(this,e,"TooManyRequests",429,"too-many-requests",t)}function j(e,t){i.call(this,e,"GeneralError",500,"general-error",t)}function O(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 S(e,t){i.call(this,e,"Unavailable",503,"unavailable",t)}a(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}}}),a(c,i),a(u,i),a(s,i),a(f,i),a(l,i),a(p,i),a(y,i),a(d,i),a(h,i),a(b,i),a(m,i),a(g,i),a(v,i),a(j,i),a(O,i),a(w,i),a(S,i);var P={FeathersError:i,BadRequest:c,NotAuthenticated:u,PaymentError:s,Forbidden:f,NotFound:l,MethodNotAllowed:p,NotAcceptable:y,Timeout:d,Conflict:h,Gone:b,LengthRequired:m,Unprocessable:g,TooManyRequests:v,GeneralError:j,NotImplemented:O,BadGateway:w,Unavailable:S,400:c,401:u,402:s,403:f,404:l,405:p,406:y,408:d,409:h,410:b,411:m,422:g,429:v,500:j,501:O,502:w,503:S};e.exports=Object.assign({convert:function(e){if(!e)return e;var t=(t=P[e.name])?new t(e.message,e.data):new Error(e.message||e);return"object"===n(e)&&Object.assign(t,e),t}},P)},977:function(e,t,r){function n(e){return(n="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(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=a(e);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?(r=a(this).constructor,Reflect.construct(o,arguments,r)):o.apply(this,arguments))}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=r(421);r=function(){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,c);var e,t,r=i(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),r.apply(this,arguments)}return e=n,(t=[{key:"request",value:function(e,t){var r=this.connection,n=this.options.HttpHeaders;if(!r||!n)throw new Error("Please pass angular's 'httpClient' (instance) and and object with 'HttpHeaders' (class) to feathers-rest");var o=e.url,i=t.connection,a=(i=new n(Object.assign({Accept:"application/json"},this.options.headers,e.headers,(void 0===i?{}:i).headers)),Object.assign({body:e.body},t.connection,{headers:i}));return new Promise((function(t,n){r.request(e.method,o,a).subscribe(t,n)})).catch((function(e){var t=e.error;if(t)throw"string"==typeof t?JSON.parse(t):t;throw e}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),e.exports=r},3:function(e,t,r){function n(e){return(n="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(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=a(e);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?(r=a(this).constructor,Reflect.construct(o,arguments,r)):o.apply(this,arguments))}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=r(421);r=function(){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,c);var e,t,r=i(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),r.apply(this,arguments)}return e=n,(t=[{key:"request",value:function(e,t){var r=this.connection,n=this.options.Headers;if(!r||!n)throw new Error("Please pass angular's 'http' (instance) and and object with 'Headers' (class) to feathers-rest");var o=e.url,i=(t=void 0===(t=t.connection)?{}:t,n=new n(Object.assign({Accept:"application/json"},this.options.headers,e.headers,t.headers)),Object.assign({method:e.method,body:e.body},t,{headers:n}));return new Promise((function(e,t){r.request(o,i).subscribe(e,t)})).then((function(e){return e.json()})).catch((function(e){throw!((e=e.response||e)instanceof Error)&&e.json()||e}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),e.exports=r},167:function(e,t,r){function n(e){return(n="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(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=a(e);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?(r=a(this).constructor,Reflect.construct(o,arguments,r)):o.apply(this,arguments))}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=r(421);r=function(){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,c);var e,t,r=i(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),r.apply(this,arguments)}return e=n,(t=[{key:"request",value:function(e,t){return t=Object.assign({url:e.url,method:e.method,data:e.body,headers:Object.assign({Accept:"application/json"},this.options.headers,e.headers)},t.connection),this.connection.request(t).then((function(e){return e.data})).catch((function(e){throw!((e=e.response||e)instanceof Error)&&e.data||e}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),e.exports=r},421:function(e,t,r){var n=r(126),o=r(441).Unavailable,i=r(575)._,a=r(575).stripSlashes,c=r(441).convert;function u(e){if("ECONNREFUSED"===e.code)throw new o(e.message,i.pick(e,"address","port","config"));throw c(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.name=a(t.name),this.options=t.options,this.connection=t.connection,this.base="".concat(t.base,"/").concat(this.name)}var t,r;return t=e,(r=[{key:"makeUrl",value:function(e,t){e=e||{};var r=this.base;return null!=t&&(r+="/".concat(encodeURIComponent(t))),r+this.getQuery(e)}},{key:"getQuery",value:function(e){return 0===Object.keys(e).length?"":(e=n.stringify(e),"?".concat(e))}},{key:"find",value:function(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:{};return this.request({url:this.makeUrl(e.query),method:"GET",headers:Object.assign({},e.headers)},e).catch(u)}},{key:"get",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return void 0===e?Promise.reject(new Error("id for 'get' can not be undefined")):this.request({url:this.makeUrl(t.query,e),method:"GET",headers:Object.assign({},t.headers)},t).catch(u)}},{key:"create",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return this.request({url:this.makeUrl(t.query),body:e,method:"POST",headers:Object.assign({"Content-Type":"application/json"},t.headers)},t).catch(u)}},{key:"update",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return void 0===e?Promise.reject(new Error("id for 'update' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(r.query,e),body:t,method:"PUT",headers:Object.assign({"Content-Type":"application/json"},r.headers)},r).catch(u)}},{key:"patch",value:function(e,t){var r=2<arguments.length&&void 0!==arguments[2]?arguments[2]:{};return void 0===e?Promise.reject(new Error("id for 'patch' can not be undefined, only 'null' when updating multiple entries")):this.request({url:this.makeUrl(r.query,e),body:t,method:"PATCH",headers:Object.assign({"Content-Type":"application/json"},r.headers)},r).catch(u)}},{key:"remove",value:function(e){var t=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{};return void 0===e?Promise.reject(new Error("id for 'remove' can not be undefined, only 'null' when removing multiple entries")):this.request({url:this.makeUrl(t.query,e),method:"DELETE",headers:Object.assign({},t.headers)},t).catch(u)}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},798:function(e,t,r){function n(e){return(n="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(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=a(e);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?(r=a(this).constructor,Reflect.construct(o,arguments,r)):o.apply(this,arguments))}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=r(421);r=function(){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,c);var e,t,r=i(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),r.apply(this,arguments)}return e=n,(t=[{key:"request",value:function(e,t){return(t=Object.assign({},e,t.connection)).headers=Object.assign({Accept:"application/json"},this.options.headers,t.headers),e.body&&(t.body=JSON.stringify(e.body)),(0,this.connection)(e.url,t).then(this.checkStatus).then((function(e){return 204===e.status?null:e.json()}))}},{key:"checkStatus",value:function(e){return e.ok?e:e.json().catch((function(){return new(errors[e.status]||Error)("JSON parsing error")})).then((function(t){throw t.response=e,t}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),e.exports=r},357:function(e,t,r){var n=r(63),o=r(467),i=r(364),a=r(798),c=r(167),u=r(3),s=r(421),f={jquery:n,superagent:o,request:i,fetch:a,axios:c,angular:u,angularHttpClient:r=r(977)};function l(){var e=0<arguments.length&&void 0!==arguments[0]?arguments[0]:"",t={Base:s};return Object.keys(f).forEach((function(r){t[r]=function(t){var n=1<arguments.length&&void 0!==arguments[1]?arguments[1]:{},o=2<arguments.length&&void 0!==arguments[2]?arguments[2]:f[r];if(!t)throw new Error("".concat(r," has to be provided to feathers-rest"));function i(e){if("function"==typeof e.defaultService)throw new Error("Only one default client provider can be configured");e.rest=t,e.defaultService=a}"function"==typeof n&&(o=n,n={});var a=function(r){return new o({base:e,name:r,connection:t,options:n})};return i.Service=o,i.service=a,i}})),t}e.exports=Object.assign(l,{SuperagentClient:o,FetchClient:a,jQueryClient:n,RequestClient:i,AxiosClient:c,AngularClient:u,AngularHttpClient:r}),e.exports.default=l},63:function(e,t,r){function n(e){return(n="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(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=a(e);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?(r=a(this).constructor,Reflect.construct(o,arguments,r)):o.apply(this,arguments))}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=r(421);r=function(){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,c);var e,t,r=i(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),r.apply(this,arguments)}return e=n,(t=[{key:"request",value:function(e,t){var r=this,n=(t=void 0===(n=t.connection)?{}:n,Object.assign({},e.headers,this.options.headers,t.headers)),o=Object.assign({dataType:e.type||"json"},t,e,{headers:n});return e.body&&(o.data=JSON.stringify(e.body),o.contentType="application/json"),delete o.type,delete o.body,new Promise((function(e,t){r.connection.ajax(o).then(e,(function(e){var r=e.responseText;try{r=JSON.parse(r)}catch(t){r=new Error(e.responseText)}r.xhr=r.response=e,t(r)}))}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),e.exports=r},364:function(e,t,r){function n(e){return(n="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(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=a(e);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?(r=a(this).constructor,Reflect.construct(o,arguments,r)):o.apply(this,arguments))}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=r(421);r=function(){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,c);var e,t,r=i(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),r.apply(this,arguments)}return e=n,(t=[{key:"request",value:function(e,t){var r=this;return new Promise((function(n,o){var i=t.connection;i=Object.assign({},e.headers,(void 0===i?{}:i).headers),r.connection(Object.assign({json:!0},e,t.connection,{headers:i}),(function(e,t,r){return e?o(e):!e&&400<=t.statusCode?"string"==typeof r?o(new Error(r)):(r.response=t,o(Object.assign(new Error(r.message),r))):void n(r)}))}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),e.exports=r},467:function(e,t,r){function n(e){return(n="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(o=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e})(e,t)}function i(e){var t=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(e){return!1}}();return function(){var r,o=a(e);return function(e,t){if(t&&("object"===n(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0!==e)return e;throw new ReferenceError("this hasn't been initialised - super() hasn't been called")}(e)}(this,t?(r=a(this).constructor,Reflect.construct(o,arguments,r)):o.apply(this,arguments))}}function a(e){return(a=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)})(e)}var c=r(421);r=function(){!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}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&o(e,t)}(n,c);var e,t,r=i(n);function n(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),r.apply(this,arguments)}return e=n,(t=[{key:"request",value:function(e,t){var r=this.connection(e.method,e.url).set(this.options.headers||{}).set("Accept","application/json").set(t.connection||{}).set(e.headers||{}).type(e.type||"json");return new Promise((function(t,n){r.set(e.headers),e.body&&r.send(e.body),r.end((function(e,r){if(e){try{var o=e.response;(e=JSON.parse(e.response.text)).response=o}catch(e){}return n(e)}t(r&&r.body)}))}))}}])&&function(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),n}(),e.exports=r},680:function(e,t,r){"use strict";var n=r(286),o=r(429),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){return"function"==typeof(t=n(e,!!t))&&-1<i(e,".prototype.")?o(t):t}},429:function(e,t,r){"use strict";var n=r(90),o=(r=r(286))("%Function.prototype.apply%"),i=r("%Function.prototype.call%"),a=r("%Reflect.apply%",!0)||n.call(i,o),c=r("%Object.getOwnPropertyDescriptor%",!0),u=r("%Object.defineProperty%",!0),s=r("%Math.max%");if(u)try{u({},"a",{value:1})}catch(e){u=null}function f(){return a(n,o,arguments)}e.exports=function(e){var t=a(n,i,arguments);return c&&u&&c(t,"length").configurable&&u(t,"length",{value:1+s(0,e.length-(arguments.length-1))}),t},u?u(e.exports,"apply",{value:f}):e.exports.apply=f},795:function(e){"use strict";var t=Array.prototype.slice,r=Object.prototype.toString;e.exports=function(e){var n=this;if("function"!=typeof n||"[object Function]"!==r.call(n))throw new TypeError("Function.prototype.bind called on incompatible "+n);for(var o,i,a=t.call(arguments,1),c=Math.max(0,n.length-a.length),u=[],s=0;s<c;s++)u.push("$"+s);return o=Function("binder","return function ("+u.join(",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof o){var r=n.apply(this,a.concat(t.call(arguments)));return Object(r)===r?r:this}return n.apply(e,a.concat(t.call(arguments)))})),n.prototype&&((i=function(){}).prototype=n.prototype,o.prototype=new i,i.prototype=null),o}},90:function(e,t,r){"use strict";r=r(795),e.exports=Function.prototype.bind||r},286:function(e,t,r){"use strict";var n=SyntaxError,o=Function,i=TypeError,a=function(e){try{return o('"use strict"; return ('+e+").constructor;")()}catch(e){}},c=Object.getOwnPropertyDescriptor;if(c)try{c({},"")}catch(e){c=null}function u(){throw new i}function s(e){var t,r;return"%AsyncFunction%"===e?t=a("async function () {}"):"%GeneratorFunction%"===e?t=a("function* () {}"):"%AsyncGeneratorFunction%"===e?t=a("async function* () {}"):"%AsyncGenerator%"===e?(r=s("%AsyncGeneratorFunction%"))&&(t=r.prototype):"%AsyncIteratorPrototype%"!==e||(r=s("%AsyncGenerator%"))&&(t=p(r.prototype)),h[e]=t}var f=c?function(){try{return u}catch(e){try{return c(arguments,"callee").get}catch(e){return u}}}():u,l=r(636)(),p=Object.getPrototypeOf||function(e){return e.__proto__},y={},d="undefined"==typeof Uint8Array?m:p(Uint8Array),h={"%AggregateError%":"undefined"==typeof AggregateError?m:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?m:ArrayBuffer,"%ArrayIteratorPrototype%":l?p([][Symbol.iterator]()):m,"%AsyncFromSyncIteratorPrototype%":m,"%AsyncFunction%":y,"%AsyncGenerator%":y,"%AsyncGeneratorFunction%":y,"%AsyncIteratorPrototype%":y,"%Atomics%":"undefined"==typeof Atomics?m:Atomics,"%BigInt%":"undefined"==typeof BigInt?m:BigInt,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?m:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":Error,"%eval%":eval,"%EvalError%":EvalError,"%Float32Array%":"undefined"==typeof Float32Array?m:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?m:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?m:FinalizationRegistry,"%Function%":o,"%GeneratorFunction%":y,"%Int8Array%":"undefined"==typeof Int8Array?m:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?m:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?m:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":l?p(p([][Symbol.iterator]())):m,"%JSON%":"object"==typeof JSON?JSON:m,"%Map%":"undefined"==typeof Map?m:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&l?p((new Map)[Symbol.iterator]()):m,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?m:Promise,"%Proxy%":"undefined"==typeof Proxy?m:Proxy,"%RangeError%":RangeError,"%ReferenceError%":ReferenceError,"%Reflect%":"undefined"==typeof Reflect?m:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?m:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&l?p((new Set)[Symbol.iterator]()):m,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?m:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":l?p(""[Symbol.iterator]()):m,"%Symbol%":l?Symbol:m,"%SyntaxError%":n,"%ThrowTypeError%":f,"%TypedArray%":d,"%TypeError%":i,"%Uint8Array%":"undefined"==typeof Uint8Array?m:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?m:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?m:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?m:Uint32Array,"%URIError%":URIError,"%WeakMap%":"undefined"==typeof WeakMap?m:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?m:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?m:WeakSet},b={"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},m=r(90),g=r(198),v=m.call(Function.call,Array.prototype.concat),j=m.call(Function.apply,Array.prototype.splice),O=m.call(Function.call,String.prototype.replace),w=m.call(Function.call,String.prototype.slice),S=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,P=/\\(\\)?/g;e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new i("intrinsic name must be a non-empty string");if(1<arguments.length&&"boolean"!=typeof t)throw new i('"allowMissing" argument must be a boolean');var r=function(e){var t=w(e,0,1),r=w(e,-1);if("%"===t&&"%"!==r)throw new n("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new n("invalid intrinsic syntax, expected opening `%`");var o=[];return O(e,S,(function(e,t,r,n){o[o.length]=r?O(n,P,"$1"):t||e})),o}(e),o=0<r.length?r[0]:"",a=function(e,t){var r,o=e;if(g(b,o)&&(o="%"+(r=b[o])[0]+"%"),g(h,o)){var a=h[o];if(void 0===(a=a===y?s(o):a)&&!t)throw new i("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:o,value:a}}throw new n("intrinsic "+e+" does not exist!")}("%"+o+"%",t),u=(a.name,a.value),f=!1;(a=a.alias)&&(o=a[0],j(r,v([0,1],a)));for(var l=1,p=!0;l<r.length;l+=1){var d=r[l],m=w(d,0,1),A=w(d,-1);if(('"'===m||"'"===m||"`"===m||'"'===A||"'"===A||"`"===A)&&m!==A)throw new n("property names with quotes must have matching quotes");if("constructor"!==d&&p||(f=!0),g(h,m="%"+(o+="."+d)+"%"))u=h[m];else if(null!=u){if(!(d in u)){if(!t)throw new i("base intrinsic for "+e+" exists, but the property is not available.");return}u=c&&l+1>=r.length?(p=!!(A=c(u,d)))&&"get"in A&&!("originalValue"in A.get)?A.get:u[d]:(p=g(u,d),u[d]),p&&!f&&(h[m]=u)}}return u}},636:function(e,t,r){"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(679);e.exports=function(){return"function"==typeof n&&"function"==typeof Symbol&&"symbol"==typeof n("foo")&&"symbol"==typeof Symbol("bar")&&o()}},679:function(e){"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;return!("function"==typeof Object.keys&&0!==Object.keys(e).length||"function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length||1!==(r=Object.getOwnPropertySymbols(e)).length||r[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t)||"function"==typeof Object.getOwnPropertyDescriptor&&(42!==(e=Object.getOwnPropertyDescriptor(e,t)).value||!0!==e.enumerable))}},198:function(e,t,r){"use strict";r=r(90),e.exports=r.call(Function.call,Object.prototype.hasOwnProperty)},378:function(e){var t=36e5,r=864e5;function n(e,t,r,n){return t=1.5*r<=t,Math.round(e/r)+" "+n+(t?"s":"")}e.exports=function(e,o){o=o||{};var i=typeof e;if("string"==i&&0<e.length)return function(e){if(!(100<(e=String(e)).length)&&(e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e))){var n=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*n;case"weeks":case"week":case"w":return 6048e5*n;case"days":case"day":case"d":return n*r;case"hours":case"hour":case"hrs":case"hr":case"h":return n*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*n;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*n;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return n;default:return}}}(e);if("number"==i&&isFinite(e))return(o.long?function(e){var o=Math.abs(e);return r<=o?n(e,o,r,"day"):t<=o?n(e,o,t,"hour"):6e4<=o?n(e,o,6e4,"minute"):1e3<=o?n(e,o,1e3,"second"):e+" ms"}:function(e){var n=Math.abs(e);return r<=n?Math.round(e/r)+"d":t<=n?Math.round(e/t)+"h":6e4<=n?Math.round(e/6e4)+"m":1e3<=n?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))}},500:function(e,t,r){var n="function"==typeof Map&&Map.prototype,o=Object.getOwnPropertyDescriptor&&n?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,i=n&&o&&"function"==typeof o.get?o.get:null,a=n&&Map.prototype.forEach,c=(o="function"==typeof Set&&Set.prototype,n=Object.getOwnPropertyDescriptor&&o?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,o&&n&&"function"==typeof n.get?n.get:null),u=o&&Set.prototype.forEach,s="function"==typeof WeakMap&&WeakMap.prototype?WeakMap.prototype.has:null,f="function"==typeof WeakSet&&WeakSet.prototype?WeakSet.prototype.has:null,l="function"==typeof WeakRef&&WeakRef.prototype?WeakRef.prototype.deref:null,p=Boolean.prototype.valueOf,y=Object.prototype.toString,d=Function.prototype.toString,h=String.prototype.match,b=String.prototype.slice,m=String.prototype.replace,g=String.prototype.toUpperCase,v=String.prototype.toLowerCase,j=RegExp.prototype.test,O=Array.prototype.concat,w=Array.prototype.join,S=Array.prototype.slice,P=Math.floor,A="function"==typeof BigInt?BigInt.prototype.valueOf:null,C=Object.getOwnPropertySymbols,E="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?Symbol.prototype.toString:null,k="function"==typeof Symbol&&"object"==typeof Symbol.iterator,x="function"==typeof Symbol&&Symbol.toStringTag&&(Symbol.toStringTag,1)?Symbol.toStringTag:null,F=Object.prototype.propertyIsEnumerable,_=("function"==typeof Reflect?Reflect:Object).getPrototypeOf||([].__proto__===Array.prototype?function(e){return e.__proto__}:null);function R(e,t){if(e===1/0||e===-1/0||e!=e||e&&-1e3<e&&e<1e3||j.call(/e/,t))return t;var r=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if("number"==typeof e){var n=e<0?-P(-e):P(e);if(n!==e)return e=String(n),n=b.call(t,e.length+1),m.call(e,r,"$&_")+"."+m.call(m.call(n,/([0-9]{3})/g,"$&_"),/_$/,"")}return m.call(t,r,"$&_")}var N=(r=r(260).custom)&&M(r)?r:null;function T(e,t,r){return(t="double"===(r.quoteStyle||t)?'"':"'")+e+t}function I(e){return!("[object Array]"!==B(e)||x&&"object"==typeof e&&x in e)}function M(e){if(k)return e&&"object"==typeof e&&e instanceof Symbol;if("symbol"==typeof e)return 1;if(e&&"object"==typeof e&&E)try{return E.call(e),1}catch(e){}}e.exports=function e(t,r,n,o){var y=r||{};if(D(y,"quoteStyle")&&"single"!==y.quoteStyle&&"double"!==y.quoteStyle)throw new TypeError('option "quoteStyle" must be "single" or "double"');if(D(y,"maxStringLength")&&("number"==typeof y.maxStringLength?y.maxStringLength<0&&y.maxStringLength!==1/0:null!==y.maxStringLength))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');if("boolean"!=typeof(ee=!D(y,"customInspect")||y.customInspect)&&"symbol"!==ee)throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(D(y,"indent")&&null!==y.indent&&"\t"!==y.indent&&!(parseInt(y.indent,10)===y.indent&&0<y.indent))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(D(y,"numericSeparator")&&"boolean"!=typeof y.numericSeparator)throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var g,j=y.numericSeparator;if(void 0===t)return"undefined";if(null===t)return"null";if("boolean"==typeof t)return t?"true":"false";if("string"==typeof t)return function e(t,r){if(t.length>r.maxStringLength){var n="... "+(n=t.length-r.maxStringLength)+" more character"+(1<n?"s":"");return e(b.call(t,0,r.maxStringLength),r)+n}return T(t=m.call(m.call(t,/(['\\])/g,"\\$1"),/[\x00-\x1f]/g,H),"single",r)}(t,y);if("number"==typeof t)return 0===t?0<1/0/t?"0":"-0":(r=String(t),j?R(t,r):r);if("bigint"==typeof t){var P=String(t)+"n";return j?R(t,P):P}if((j=void 0===y.depth?5:y.depth)<=(n=void 0===n?0:n)&&0<j&&"object"==typeof t)return I(t)?"[Array]":"[Object]";if(P=function(e,t){var r;if("\t"===e.indent)r="\t";else{if(!("number"==typeof e.indent&&0<e.indent))return null;r=w.call(Array(e.indent+1)," ")}return{base:r,prev:w.call(Array(t+1),r)}}(y,n),void 0===o)o=[];else if(0<=q(o,t))return"[Circular]";function C(t,r,i){return r&&(o=S.call(o)).push(r),i?(i={depth:y.depth},D(y,"quoteStyle")&&(i.quoteStyle=y.quoteStyle),e(t,i,n+1,o)):e(t,y,n+1,o)}if("function"==typeof t){j=function(e){return e.name?e.name:(e=h.call(d.call(e),/^function\s*([\w$]+)/))?e[1]:null}(t);var U=J(t,C);return"[Function"+(j?": "+j:" (anonymous)")+"]"+(0<U.length?" { "+w.call(U,", ")+" }":"")}if(M(t))return U=k?m.call(String(t),/^(Symbol\(.*\))_[^)]*$/,"$1"):E.call(t),"object"!=typeof t||k?U:W(U);if(function(e){return!(!e||"object"!=typeof e)&&("undefined"!=typeof HTMLElement&&e instanceof HTMLElement||"string"==typeof e.nodeName&&"function"==typeof e.getAttribute)}(t)){for(var z="<"+v.call(String(t.nodeName)),V=t.attributes||[],Q=0;Q<V.length;Q++)z+=" "+V[Q].name+"="+T((g=V[Q].value,m.call(String(g),/"/g,"&quot;")),"double",y);return z+=">",t.childNodes&&t.childNodes.length&&(z+="..."),z+"</"+v.call(String(t.nodeName))+">"}if(I(t)){if(0===t.length)return"[]";var K=J(t,C);return P&&!function(e){for(var t=0;t<e.length;t++)if(0<=q(e[t],"\n"))return!1;return!0}(K)?"["+$(K,P)+"]":"[ "+w.call(K,", ")+" ]"}if(!("[object Error]"!==B(K=t)||x&&"object"==typeof K&&x in K)){var Z=J(t,C);return"cause"in t&&!F.call(t,"cause")?"{ ["+String(t)+"] "+w.call(O.call("[cause]: "+C(t.cause),Z),", ")+" }":0===Z.length?"["+String(t)+"]":"{ ["+String(t)+"] "+w.call(Z,", ")+" }"}if("object"==typeof t&&ee){if(N&&"function"==typeof t[N])return t[N]();if("symbol"!==ee&&"function"==typeof t.inspect)return t.inspect()}if(function(e){if(!i||!e||"object"!=typeof e)return!1;try{i.call(e);try{c.call(e)}catch(e){return!0}return e instanceof Map}catch(e){}return!1}(t)){var X=[];return a.call(t,(function(e,r){X.push(C(r,t,!0)+" => "+C(e,t))})),G("Map",i.call(t),X,P)}if(function(e){if(!c||!e||"object"!=typeof e)return!1;try{c.call(e);try{i.call(e)}catch(e){return!0}return e instanceof Set}catch(e){}return!1}(t)){var Y=[];return u.call(t,(function(e){Y.push(C(e,t))})),G("Set",c.call(t),Y,P)}if(function(e){if(!s||!e||"object"!=typeof e)return!1;try{s.call(e,s);try{f.call(e,f)}catch(e){return!0}return e instanceof WeakMap}catch(e){}return!1}(t))return L("WeakMap");if(function(e){if(!f||!e||"object"!=typeof e)return!1;try{f.call(e,f);try{s.call(e,s)}catch(e){return!0}return e instanceof WeakSet}catch(e){}return!1}(t))return L("WeakSet");if(function(e){if(!l||!e||"object"!=typeof e)return!1;try{return l.call(e),!0}catch(e){}return!1}(t))return L("WeakRef");if(!("[object Number]"!==B(K=t)||x&&"object"==typeof K&&x in K))return W(C(Number(t)));if(function(e){if(!e||"object"!=typeof e||!A)return!1;try{return A.call(e),!0}catch(e){}return!1}(t))return W(C(A.call(t)));if(!("[object Boolean]"!==B(Z=t)||x&&"object"==typeof Z&&x in Z))return W(p.call(t));if(!("[object String]"!==B(ee=t)||x&&"object"==typeof ee&&x in ee))return W(C(String(t)));if(("[object Date]"!==B(K=t)||x&&"object"==typeof K&&x in K)&&("[object RegExp]"!==B(te=t)||x&&"object"==typeof te&&x in te)){Z=J(t,C);var ee=_?_(t)===Object.prototype:t instanceof Object||t.constructor===Object,te=(K=t instanceof Object?"":"null prototype",!ee&&x&&Object(t)===t&&x in t?b.call(B(t),8,-1):K?"Object":"");return K=(!ee&&"function"==typeof t.constructor&&t.constructor.name?t.constructor.name+" ":"")+(te||K?"["+w.call(O.call([],te||[],K||[]),": ")+"] ":""),0===Z.length?K+"{}":P?K+"{"+$(Z,P)+"}":K+"{ "+w.call(Z,", ")+" }"}return String(t)};var U=Object.prototype.hasOwnProperty||function(e){return e in this};function D(e,t){return U.call(e,t)}function B(e){return y.call(e)}function q(e,t){if(e.indexOf)return e.indexOf(t);for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}function H(e){var t=e.charCodeAt(0);return(e={8:"b",9:"t",10:"n",12:"f",13:"r"}[t])?"\\"+e:"\\x"+(t<16?"0":"")+g.call(t.toString(16))}function W(e){return"Object("+e+")"}function L(e){return e+" { ? }"}function G(e,t,r,n){return e+" ("+t+") {"+(n?$(r,n):w.call(r,", "))+"}"}function $(e,t){if(0===e.length)return"";var r="\n"+t.prev+t.base;return r+w.call(e,","+r)+"\n"+t.prev}function J(e,t){var r=I(e),n=[];if(r){n.length=e.length;for(var o=0;o<e.length;o++)n[o]=D(e,o)?t(e[o],e):""}var i,a="function"==typeof C?C(e):[];if(k)for(var c={},u=0;u<a.length;u++)c["$"+a[u]]=a[u];for(i in e)D(e,i)&&(r&&String(Number(i))===i&&i<e.length||k&&c["$"+i]instanceof Symbol||(j.call(/[^\w$]/,i)?n.push(t(i,e)+": "+t(e[i],e)):n.push(i+": "+t(e[i],e))));if("function"==typeof C)for(var s=0;s<a.length;s++)F.call(e,a[s])&&n.push("["+t(a[s])+"]: "+t(e[a[s]],e));return n}},527:function(e){"use strict";var t=String.prototype.replace,r=/%20/g,n="RFC3986";e.exports={default:n,formatters:{RFC1738:function(e){return t.call(e,r,"+")},RFC3986:function(e){return String(e)}},RFC1738:"RFC1738",RFC3986:n}},126:function(e,t,r){"use strict";var n=r(845),o=r(166);r=r(527),e.exports={formats:r,parse:o,stringify:n}},166:function(e,t,r){"use strict";function n(e,t,r,n){if(e){var o=r.allowDots?e.replace(/\.([^.[]+)/g,"[$1]"):e,a=/(\[[^[\]]*])/g,c=0<r.depth&&/(\[[^[\]]*])/.exec(o),s=[];if(e=c?o.slice(0,c.index):o){if(!r.plainObjects&&i.call(Object.prototype,e)&&!r.allowPrototypes)return;s.push(e)}for(var f=0;0<r.depth&&null!==(c=a.exec(o))&&f<r.depth;){if(f+=1,!r.plainObjects&&i.call(Object.prototype,c[1].slice(1,-1))&&!r.allowPrototypes)return;s.push(c[1])}return c&&s.push("["+o.slice(c.index)+"]"),function(e,t,r,n){for(var o=n?t:u(t,r),i=e.length-1;0<=i;--i){var a,c,s,f=e[i];"[]"===f&&r.parseArrays?a=[].concat(o):(a=r.plainObjects?Object.create(null):{},c="["===f.charAt(0)&&"]"===f.charAt(f.length-1)?f.slice(1,-1):f,s=parseInt(c,10),r.parseArrays||""!==c?!isNaN(s)&&f!==c&&String(s)===c&&0<=s&&r.parseArrays&&s<=r.arrayLimit?(a=[])[s]=o:a[c]=o:a={0:o}),o=a}return o}(s,t,r,n)}}var o=r(493),i=Object.prototype.hasOwnProperty,a=Array.isArray,c={allowDots:!1,allowPrototypes:!1,allowSparse:!1,arrayLimit:20,charset:"utf-8",charsetSentinel:!1,comma:!1,decoder:o.decode,delimiter:"&",depth:5,ignoreQueryPrefix:!1,interpretNumericEntities:!1,parameterLimit:1e3,parseArrays:!0,plainObjects:!1,strictNullHandling:!1},u=function(e,t){return e&&"string"==typeof e&&t.comma&&-1<e.indexOf(",")?e.split(","):e};e.exports=function(e,t){var r=function(e){if(!e)return c;if(null!==e.decoder&&void 0!==e.decoder&&"function"!=typeof e.decoder)throw new TypeError("Decoder has to be a function.");if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var t=(void 0===e.charset?c:e).charset;return{allowDots:void 0===e.allowDots?c.allowDots:!!e.allowDots,allowPrototypes:("boolean"==typeof e.allowPrototypes?e:c).allowPrototypes,allowSparse:("boolean"==typeof e.allowSparse?e:c).allowSparse,arrayLimit:("number"==typeof e.arrayLimit?e:c).arrayLimit,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:c).charsetSentinel,comma:("boolean"==typeof e.comma?e:c).comma,decoder:("function"==typeof e.decoder?e:c).decoder,delimiter:("string"==typeof e.delimiter||o.isRegExp(e.delimiter)?e:c).delimiter,depth:"number"==typeof e.depth||!1===e.depth?+e.depth:c.depth,ignoreQueryPrefix:!0===e.ignoreQueryPrefix,interpretNumericEntities:("boolean"==typeof e.interpretNumericEntities?e:c).interpretNumericEntities,parameterLimit:("number"==typeof e.parameterLimit?e:c).parameterLimit,parseArrays:!1!==e.parseArrays,plainObjects:("boolean"==typeof e.plainObjects?e:c).plainObjects,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:c).strictNullHandling}}(t);if(""===e||null==e)return r.plainObjects?Object.create(null):{};for(var s="string"==typeof e?function(e,t){var r,n,s,f,l={},p=t.ignoreQueryPrefix?e.replace(/^\?/,""):e,y=(e=t.parameterLimit===1/0?void 0:t.parameterLimit,p.split(t.delimiter,e)),d=-1,h=t.charset;if(t.charsetSentinel)for(r=0;r<y.length;++r)0===y[r].indexOf("utf8=")&&("utf8=%E2%9C%93"===y[r]?h="utf-8":"utf8=%26%2310003%3B"===y[r]&&(h="iso-8859-1"),d=r,r=y.length);for(r=0;r<y.length;++r)r!==d&&((f=-1===(f=-1===(f=(n=y[r]).indexOf("]="))?n.indexOf("="):f+1)?(s=t.decoder(n,c.decoder,h,"key"),t.strictNullHandling?null:""):(s=t.decoder(n.slice(0,f),c.decoder,h,"key"),o.maybeMap(u(n.slice(f+1),t),(function(e){return t.decoder(e,c.decoder,h,"value")}))))&&t.interpretNumericEntities&&"iso-8859-1"===h&&(f=f.replace(/&#(\d+);/g,(function(e,t){return String.fromCharCode(parseInt(t,10))}))),-1<n.indexOf("[]=")&&(f=a(f)?[f]:f),i.call(l,s)?l[s]=o.combine(l[s],f):l[s]=f);return l}(e,r):e,f=r.plainObjects?Object.create(null):{},l=Object.keys(s),p=0;p<l.length;++p){var y=n(y=l[p],s[y],r,"string"==typeof e);f=o.merge(f,y,r)}return!0===r.allowSparse?f:o.compact(f)}},845:function(e,t,r){"use strict";function n(e,t){p.apply(e,f(t)?t:[t])}function o(e,t,r,c,u,s,p,y,b,m,g,v,j,O,w){for(var S,P=e,A=w,C=0,E=!1;void 0!==(A=A.get(h))&&!E;){var k=A.get(e);if(C+=1,void 0!==k){if(k===C)throw new RangeError("Cyclic object value");E=!0}void 0===A.get(h)&&(C=0)}if("function"==typeof p?P=p(t,P):P instanceof Date?P=m(P):"comma"===r&&f(P)&&(P=a.maybeMap(P,(function(e){return e instanceof Date?m(e):e}))),null===P){if(c)return s&&!j?s(t,d.encoder,O,"key",g):t;P=""}if("string"==typeof(S=P)||"number"==typeof S||"boolean"==typeof S||"symbol"==typeof S||"bigint"==typeof S||a.isBuffer(P)){if(s){var x=j?t:s(t,d.encoder,O,"key",g);if("comma"===r&&j){for(var F=l.call(String(P),","),_="",R=0;R<F.length;++R)_+=(0===R?"":",")+v(s(F[R],d.encoder,O,"value",g));return[v(x)+"="+_]}return[v(x)+"="+v(s(P,d.encoder,O,"value",g))]}return[v(t)+"="+v(String(P))]}var N,T=[];if(void 0===P)return T;N="comma"===r&&f(P)?[{value:0<P.length?P.join(",")||null:void 0}]:f(p)?p:(x=Object.keys(P),y?x.sort(y):x);for(var I=0;I<N.length;++I){var M,U=N[I],D="object"==typeof U&&void 0!==U.value?U.value:P[U];u&&null===D||(M=f(P)?"function"==typeof r?r(t,U):t:t+(b?"."+U:"["+U+"]"),w.set(e,C),(U=i()).set(h,w),n(T,o(D,M,r,c,u,s,p,y,b,m,g,v,j,O,U)))}return T}var i=r(294),a=r(493),c=r(527),u=Object.prototype.hasOwnProperty,s={brackets:function(e){return e+"[]"},comma:"comma",indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},f=Array.isArray,l=String.prototype.split,p=Array.prototype.push,y=Date.prototype.toISOString,d=(r=c.default,{addQueryPrefix:!1,allowDots:!1,charset:"utf-8",charsetSentinel:!1,delimiter:"&",encode:!0,encoder:a.encode,encodeValuesOnly:!1,format:r,formatter:c.formatters[r],indices:!1,serializeDate:function(e){return y.call(e)},skipNulls:!1,strictNullHandling:!1}),h={};e.exports=function(e,t){var r=e,a=function(e){if(!e)return d;if(null!==e.encoder&&void 0!==e.encoder&&"function"!=typeof e.encoder)throw new TypeError("Encoder has to be a function.");var t=e.charset||d.charset;if(void 0!==e.charset&&"utf-8"!==e.charset&&"iso-8859-1"!==e.charset)throw new TypeError("The charset option must be either utf-8, iso-8859-1, or undefined");var r=c.default;if(void 0!==e.format){if(!u.call(c.formatters,e.format))throw new TypeError("Unknown format option provided.");r=e.format}var n=c.formatters[r],o=d.filter;return"function"!=typeof e.filter&&!f(e.filter)||(o=e.filter),{addQueryPrefix:("boolean"==typeof e.addQueryPrefix?e:d).addQueryPrefix,allowDots:void 0===e.allowDots?d.allowDots:!!e.allowDots,charset:t,charsetSentinel:("boolean"==typeof e.charsetSentinel?e:d).charsetSentinel,delimiter:(void 0===e.delimiter?d:e).delimiter,encode:("boolean"==typeof e.encode?e:d).encode,encoder:("function"==typeof e.encoder?e:d).encoder,encodeValuesOnly:("boolean"==typeof e.encodeValuesOnly?e:d).encodeValuesOnly,filter:o,format:r,formatter:n,serializeDate:("function"==typeof e.serializeDate?e:d).serializeDate,skipNulls:("boolean"==typeof e.skipNulls?e:d).skipNulls,sort:"function"==typeof e.sort?e.sort:null,strictNullHandling:("boolean"==typeof e.strictNullHandling?e:d).strictNullHandling}}(t);"function"==typeof a.filter?r=(0,a.filter)("",r):f(a.filter)&&(y=a.filter);var l=[];if("object"!=typeof r||null===r)return"";e=t&&t.arrayFormat in s?t.arrayFormat:t&&"indices"in t&&!t.indices?"repeat":"indices";var p=s[e],y=y||Object.keys(r);a.sort&&y.sort(a.sort);for(var h=i(),b=0;b<y.length;++b){var m=y[b];a.skipNulls&&null===r[m]||n(l,o(r[m],m,p,a.strictNullHandling,a.skipNulls,a.encode?a.encoder:null,a.filter,a.sort,a.allowDots,a.serializeDate,a.format,a.formatter,a.encodeValuesOnly,a.charset,h))}return t=l.join(a.delimiter),e=!0===a.addQueryPrefix?"?":"",a.charsetSentinel&&("iso-8859-1"===a.charset?e+="utf8=%26%2310003%3B&":e+="utf8=%E2%9C%93&"),0<t.length?e+t:""}},493:function(e,t,r){"use strict";function n(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;n<e.length;++n)void 0!==e[n]&&(r[n]=e[n]);return r}var o=r(527),i=Object.prototype.hasOwnProperty,a=Array.isArray,c=function(){for(var e=[],t=0;t<256;++t)e.push("%"+((t<16?"0":"")+t.toString(16)).toUpperCase());return e}();e.exports={arrayToObject:n,assign:function(e,t){return Object.keys(t).reduce((function(e,r){return e[r]=t[r],e}),e)},combine:function(e,t){return[].concat(e,t)},compact:function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;n<t.length;++n)for(var o=t[n],i=o.obj[o.prop],c=Object.keys(i),u=0;u<c.length;++u){var s=c[u],f=i[s];"object"==typeof f&&null!==f&&-1===r.indexOf(f)&&(t.push({obj:i,prop:s}),r.push(f))}return function(e){for(;1<e.length;){var t=e.pop(),r=t.obj[t.prop];if(a(r)){for(var n=[],o=0;o<r.length;++o)void 0!==r[o]&&n.push(r[o]);t.obj[t.prop]=n}}}(t),e},decode:function(e,t,r){if(e=e.replace(/\+/g," "),"iso-8859-1"===r)return e.replace(/%[0-9a-f]{2}/gi,unescape);try{return decodeURIComponent(e)}catch(t){return e}},encode:function(e,t,r,n,i){if(0===e.length)return e;var a=e;if("symbol"==typeof e?a=Symbol.prototype.toString.call(e):"string"!=typeof e&&(a=String(e)),"iso-8859-1"===r)return escape(a).replace(/%u[0-9a-f]{4}/gi,(function(e){return"%26%23"+parseInt(e.slice(2),16)+"%3B"}));for(var u="",s=0;s<a.length;++s){var f=a.charCodeAt(s);45===f||46===f||95===f||126===f||48<=f&&f<=57||65<=f&&f<=90||97<=f&&f<=122||i===o.RFC1738&&(40===f||41===f)?u+=a.charAt(s):f<128?u+=c[f]:f<2048?u+=c[192|f>>6]+c[128|63&f]:f<55296||57344<=f?u+=c[224|f>>12]+c[128|f>>6&63]+c[128|63&f]:(s+=1,f=65536+((1023&f)<<10|1023&a.charCodeAt(s)),u+=c[240|f>>18]+c[128|f>>12&63]+c[128|f>>6&63]+c[128|63&f])}return u},isBuffer:function(e){return!(!e||"object"!=typeof e||!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e)))},isRegExp:function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},maybeMap:function(e,t){if(a(e)){for(var r=[],n=0;n<e.length;n+=1)r.push(t(e[n]));return r}return t(e)},merge:function e(t,r,o){if(!r)return t;if("object"!=typeof r){if(a(t))t.push(r);else{if(!t||"object"!=typeof t)return[t,r];(o&&(o.plainObjects||o.allowPrototypes)||!i.call(Object.prototype,r))&&(t[r]=!0)}return t}if(!t||"object"!=typeof t)return[t].concat(r);var c=t;return a(t)&&!a(r)&&(c=n(t,o)),a(t)&&a(r)?(r.forEach((function(r,n){var a;i.call(t,n)?(a=t[n])&&"object"==typeof a&&r&&"object"==typeof r?t[n]=e(a,r,o):t.push(r):t[n]=r})),t):Object.keys(r).reduce((function(t,n){var a=r[n];return i.call(t,n)?t[n]=e(t[n],a,o):t[n]=a,t}),c)}}},294:function(e,t,r){"use strict";function n(e,t){for(var r,n=e;null!==(r=n.next);n=r)if(r.key===t)return n.next=r.next,r.next=e.next,e.next=r}var o=r(286),i=r(680),a=r(500),c=o("%TypeError%"),u=o("%WeakMap%",!0),s=o("%Map%",!0),f=i("WeakMap.prototype.get",!0),l=i("WeakMap.prototype.set",!0),p=i("WeakMap.prototype.has",!0),y=i("Map.prototype.get",!0),d=i("Map.prototype.set",!0),h=i("Map.prototype.has",!0);e.exports=function(){var e,t,r,o={assert:function(e){if(!o.has(e))throw new c("Side channel does not contain "+a(e))},get:function(o){if(u&&o&&("object"==typeof o||"function"==typeof o)){if(e)return f(e,o)}else if(s){if(t)return y(t,o)}else if(r)return function(e,t){return(t=n(e,t))&&t.value}(r,o)},has:function(o){if(u&&o&&("object"==typeof o||"function"==typeof o)){if(e)return p(e,o)}else if(s){if(t)return h(t,o)}else if(r)return!!n(r,o);return!1},set:function(o,i){var a,c;u&&o&&("object"==typeof o||"function"==typeof o)?(e=e||new u,l(e,o,i)):s?(t=t||new s,d(t,o,i)):(c=i,(o=n(a=r=r||{key:{},next:null},i=o))?o.value=c:a.next={key:i,next:a.next,value:c})}};return o}},260:function(){}},t={},function r(n){var o=t[n];return void 0!==o||(o=t[n]={exports:{}},e[n].call(o.exports,o,o.exports,r)),o.exports}(905);var e,t}));