@brigad/redux-rest-easy
Advanced tools
Comparing version 2.3.5 to 2.3.6
@@ -1,1 +0,1 @@ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-redux")):"function"==typeof define&&define.amd?define(["exports","react","react-redux"],t):t(e.ReduxRestEasy={},e.React,e.ReactRedux)}(this,function(e,t,r){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}o(function(e){!function(t){var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",s=t.regeneratorRuntime;if(s)e.exports=s;else{(s=t.regeneratorRuntime=e.exports).wrap=m;var f="suspendedStart",l="suspendedYield",d="executing",p="completed",h={},y={};y[u]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(x([])));g&&g!==n&&o.call(g,u)&&(y=g);var b=j.prototype=_.prototype=Object.create(y);E.prototype=b.constructor=j,j.constructor=E,j[a]=E.displayName="GeneratorFunction",s.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(b),e},s.awrap=function(e){return{__await:e}},O(C.prototype),C.prototype[c]=function(){return this},s.AsyncIterator=C,s.async=function(e,t,r,n){var o=new C(m(e,t,r,n));return s.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},O(b),b[a]="Generator",b[u]=function(){return this},b.toString=function(){return"[object Generator]"},s.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},s.values=x,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return c.type="throw",c.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],c=u.completion;if("root"===u.tryLoc)return n("end");if(this.prev>=u.tryLoc){var a=o.call(u,"catchLoc"),s=o.call(u,"finallyLoc");if(a&&s){if(u.catchLoc>this.prev)return n(u.catchLoc,!0);if(u.finallyLoc>this.prev)return n(u.finallyLoc)}else if(a){if(u.catchLoc>this.prev)return n(u.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(u.finallyLoc>this.prev)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(this.prev>=n.tryLoc&&o.call(n,"finallyLoc")&&n.finallyLoc>this.prev){var i=n;break}}!i||"break"!==e&&"continue"!==e||i.tryLoc>t||t>i.finallyLoc||(i=null);var u=i?i.completion:{};return u.type=e,u.arg=t,i?(this.method="next",this.next=i.finallyLoc,h):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),h},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),h}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),h}}}function m(e,t,r,n){var o=Object.create((t&&t.prototype instanceof _?t:_).prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n=f;return function(o,i){if(n===d)throw Error("Generator is already running");if(n===p){if("throw"===o)throw i;return q()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var c=w(u,r);if(c){if(c===h)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=p,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var a=A(e,t,r);if("normal"===a.type){if(n=r.done?p:l,a.arg===h)continue;return{value:a.arg,done:r.done}}"throw"===a.type&&(n=p,r.method="throw",r.arg=a.arg)}}}(e,r,i),o}function A(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function _(){}function E(){}function j(){}function O(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function C(e){var t;this._invoke=function(r,n){function i(){return new Promise(function(t,i){!function t(r,n,i,u){var c=A(e[r],e,n);if("throw"!==c.type){var a=c.arg,s=a.value;return s&&"object"==typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,i,u)},function(e){t("throw",e,i,u)}):Promise.resolve(s).then(function(e){a.value=e,i(a)},u)}u(c.arg)}(r,n,t,i)})}return t=t?t.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,w(e,t),"throw"===t.method))return h;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return h}var o=A(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,h;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,h):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,h)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function x(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:q}}function q(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())});var i,u,c,a,s=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,r){return function n(o,i){try{var u=t[o](i),c=u.value}catch(e){return void r(e)}if(!u.done)return Promise.resolve(c).then(function(e){n("next",e)},function(e){n("throw",e)});e(c)}("next")})}},f=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},p=function(e){return function(t,n){for(var o=arguments.length,i=Array(o>2?o-2:0),u=2;o>u;u++)i[u-2]=arguments[u];return r.connect.apply(void 0,[t,n&&"function"==typeof n?function(){var t=n.apply(void 0,arguments);return Object.keys(t).reduce(function(r,n){var o;return l({},r,((o={})[n]=function(){var r=t[n].apply(t,arguments);return r&&r.__actionName&&r.__requestURL&&(e(r.__actionName,r.__requestURL),delete r.__actionName,delete r.__requestURL),r},o))},{})}:n].concat(i))}},h=function(e,t){return function(r){return{type:e,resourceName:t,resourceId:r}}},y=function(e,t,r){return"@@rest-easy/"+e+"/"+t+"/"+r.toUpperCase()},v=function(e){var t=function(e){return{INVALIDATE_RESOURCE:y(e,"@invalidate","INVALIDATE_RESOURCE"),INVALIDATE_ID:y(e,"@invalidate","INVALIDATE_ID"),RESET_RESOURCE:y(e,"@reset","RESET_RESOURCE")}}(e),r=t.INVALIDATE_ID,n=t.RESET_RESOURCE;return{resource:{invalidate:h(t.INVALIDATE_RESOURCE,e),invalidateId:h(r,e),reset:h(n,e)}}},g=function(e){return function(t,r,n,o){return{type:e,url:t,resourceId:r,payload:n&&Object.keys(n).length?n:void 0,principalResourceIds:"string"==typeof o?[o]:o}}},b=function(e,t){var r=function(e,t){return{REQUEST:y(e,t,"REQUEST"),RECEIVE:y(e,t,"RECEIVE"),FAIL:y(e,t,"FAIL"),RECEIVE_FROM_CACHE:y(e,t,"RECEIVE_FROM_CACHE")}}(e,t),n=r.RECEIVE,o=r.FAIL,i=r.RECEIVE_FROM_CACHE;return{REQUEST:g(r.REQUEST),RECEIVE:g(n),FAIL:g(o),RECEIVE_FROM_CACHE:g(i)}},m={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},A=function(e){throw{name:"SyntaxError",message:e,at:i,text:c}},_=function(e){return e&&e!==u&&A("Expected '"+e+"' instead of '"+u+"'"),u=c.charAt(i),i+=1,u},E=function(){var e,t="";for("-"===u&&(t="-",_("-"));u>="0"&&"9">=u;)t+=u,_();if("."===u)for(t+=".";_()&&u>="0"&&"9">=u;)t+=u;if("e"===u||"E"===u)for(t+=u,_(),"-"!==u&&"+"!==u||(t+=u,_());u>="0"&&"9">=u;)t+=u,_();if(isFinite(e=+t))return e;A("Bad number")},j=function(){var e,t,r,n="";if('"'===u)for(;_();){if('"'===u)return _(),n;if("\\"===u)if(_(),"u"===u){for(r=0,t=0;4>t&&(e=parseInt(_(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof m[u])break;n+=m[u]}else n+=u}A("Bad string")},O=function(){for(;u&&" ">=u;)_()};a=function(){switch(O(),u){case"{":return function(){var e,t={};if("{"===u){if(_("{"),O(),"}"===u)return _("}"),t;for(;u;){if(e=j(),O(),_(":"),Object.hasOwnProperty.call(t,e)&&A('Duplicate key "'+e+'"'),t[e]=a(),O(),"}"===u)return _("}"),t;_(","),O()}}A("Bad object")}();case"[":return function(){var e=[];if("["===u){if(_("["),O(),"]"===u)return _("]"),e;for(;u;){if(e.push(a()),O(),"]"===u)return _("]"),e;_(","),O()}}A("Bad array")}();case'"':return j();case"-":return E();default:return"0">u||u>"9"?function(){switch(u){case"t":return _("t"),_("r"),_("u"),_("e"),!0;case"f":return _("f"),_("a"),_("l"),_("s"),_("e"),!1;case"n":return _("n"),_("u"),_("l"),_("l"),null}A("Unexpected '"+u+"'")}():E()}};var C,w,I,S=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,R={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function x(e){return S.lastIndex=0,S.test(e)?'"'+e.replace(S,function(e){var t=R[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}var q,k=void 0!==JSON?JSON:{parse:function(e,t){var r;return c=e,i=0,u=" ",r=a(),O(),u&&A("Syntax error"),"function"==typeof t?function e(r,n){var o,i,u=r[n];if(u&&"object"==typeof u)for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(void 0!==(i=e(u,o))?u[o]=i:delete u[o]);return t.call(r,n,u)}({"":r},""):r},stringify:function(e,t,r){var n;if(C="",w="","number"==typeof r)for(n=0;r>n;n+=1)w+=" ";else"string"==typeof r&&(w=r);if(I=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw Error("JSON.stringify");return function e(t,r){var n,o,i,u,c,a=C,s=r[t];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(t)),"function"==typeof I&&(s=I.call(r,t,s)),typeof s){case"string":return x(s);case"number":return isFinite(s)?s+"":"null";case"boolean":case"null":return s+"";case"object":if(!s)return"null";if(C+=w,c=[],"[object Array]"===Object.prototype.toString.apply(s)){for(u=s.length,n=0;u>n;n+=1)c[n]=e(n,s)||"null";return i=0===c.length?"[]":C?"[\n"+C+c.join(",\n"+C)+"\n"+a+"]":"["+c.join(",")+"]",C=a,i}if(I&&"object"==typeof I)for(u=I.length,n=0;u>n;n+=1)"string"==typeof(o=I[n])&&(i=e(o,s))&&c.push(x(o)+(C?": ":":")+i);else for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(i=e(o,s))&&c.push(x(o)+(C?": ":":")+i);return i=0===c.length?"{}":C?"{\n"+C+c.join(",\n"+C)+"\n"+a+"}":"{"+c.join(",")+"}",C=a,i}}("",{"":e})}},T=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var n,o="boolean"==typeof t.cycles&&t.cycles,i=t.replacer||function(e,t){return t},u=t.cmp&&(n=t.cmp,function(e){return function(t,r){return n({key:t,value:e[t]},{key:r,value:e[r]})}}),c=[];return function e(t,n,a,s){var f=r?"\n"+Array(s+1).join(r):"",l=r?": ":":";if(a&&a.toJSON&&"function"==typeof a.toJSON&&(a=a.toJSON()),void 0!==(a=i.call(t,n,a))){if("object"!=typeof a||null===a)return k.stringify(a);if(L(a)){for(var d=[],p=0;a.length>p;p++){var h=e(a,p,a[p],s+1)||k.stringify(null);d.push(f+r+h)}return"["+d.join(",")+f+"]"}if(-1!==c.indexOf(a)){if(o)return k.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}c.push(a);var y=N(a).sort(u&&u(a));for(d=[],p=0;y.length>p;p++){var v=e(a,n=y[p],a[n],s+1);if(v){var g=k.stringify(n)+l+v;d.push(f+r+g)}}return c.splice(c.indexOf(a),1),"{"+d.join(",")+f+"}"}}({"":e},"",e,0)},L=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},N=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in e)t.call(e,n)&&r.push(n);return r},F=o(function(e,t){var r=Object.prototype.hasOwnProperty,n=function(){for(var e=[],t=0;256>t;++t)e.push("%"+((16>t?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;e.length>n;++n)void 0!==e[n]&&(r[n]=e[n]);return r},t.merge=function(e,n,o){if(!n)return e;if("object"!=typeof n){if(Array.isArray(e))e.push(n);else{if("object"!=typeof e)return[e,n];(o.plainObjects||o.allowPrototypes||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if("object"!=typeof e)return[e].concat(n);var i=e;return Array.isArray(e)&&!Array.isArray(n)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],n,o):e.push(n):e[i]=n}),e):Object.keys(n).reduce(function(e,i){var u=n[i];return e[i]=r.call(e,i)?t.merge(e[i],u,o):u,e},i)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:e+"",r="",o=0;t.length>o;++o){var i=t.charCodeAt(o);45!==i&&46!==i&&95!==i&&126!==i&&(48>i||i>57)&&(65>i||i>90)&&(97>i||i>122)?128>i?r+=n[i]:2048>i?r+=n[192|i>>6]+n[128|63&i]:i>=55296&&57344>i?(i=65536+((1023&i)<<10|1023&t.charCodeAt(o+=1)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i]):r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:r+=t.charAt(o)}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;t.length>n;++n)for(var o=t[n],i=o.obj[o.prop],u=Object.keys(i),c=0;u.length>c;++c){var a=u[c],s=i[a];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:i,prop:a}),r.push(s))}return function(e){for(var t;e.length;){var r=e.pop();if(Array.isArray(t=r.obj[r.prop])){for(var n=[],o=0;t.length>o;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}}),P=String.prototype.replace,U=/%20/g,z={default:"RFC3986",formatters:{RFC1738:function(e){return P.call(e,U,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"},D={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},B=Date.prototype.toISOString,V={delimiter:"&",encode:!0,encoder:F.encode,encodeValuesOnly:!1,serializeDate:function(e){return B.call(e)},skipNulls:!1,strictNullHandling:!1},H=function e(t,r,n,o,i,u,c,a,s,f,l,d){var p=t;if("function"==typeof c)p=c(r,p);else if(p instanceof Date)p=f(p);else if(null===p){if(o)return u&&!d?u(r,V.encoder):r;p=""}if("string"==typeof p||"number"==typeof p||"boolean"==typeof p||F.isBuffer(p))return u?[l(d?r:u(r,V.encoder))+"="+l(u(p,V.encoder))]:[l(r)+"="+l(p+"")];var h,y=[];if(void 0===p)return y;if(Array.isArray(c))h=c;else{var v=Object.keys(p);h=a?v.sort(a):v}for(var g=0;h.length>g;++g){var b=h[g];i&&null===p[b]||(y=y.concat(e(p[b],Array.isArray(p)?n(r,b):r+(s?"."+b:"["+b+"]"),n,o,i,u,c,a,s,f,l,d)))}return y},M=function(e,t){var r=e,n=t?F.assign({},t):{};if(null!=n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");var o=void 0===n.delimiter?V.delimiter:n.delimiter,i="boolean"==typeof n.strictNullHandling?n.strictNullHandling:V.strictNullHandling,u="boolean"==typeof n.skipNulls?n.skipNulls:V.skipNulls,c="boolean"==typeof n.encode?n.encode:V.encode,a="function"==typeof n.encoder?n.encoder:V.encoder,s="function"==typeof n.sort?n.sort:null,f=void 0!==n.allowDots&&n.allowDots,l="function"==typeof n.serializeDate?n.serializeDate:V.serializeDate,d="boolean"==typeof n.encodeValuesOnly?n.encodeValuesOnly:V.encodeValuesOnly;if(void 0===n.format)n.format=z.default;else if(!Object.prototype.hasOwnProperty.call(z.formatters,n.format))throw new TypeError("Unknown format option provided.");var p,h,y=z.formatters[n.format];"function"==typeof n.filter?r=(h=n.filter)("",r):Array.isArray(n.filter)&&(p=h=n.filter);var v=[];if("object"!=typeof r||null===r)return"";var g=D[n.arrayFormat in D?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices"];p||(p=Object.keys(r)),s&&p.sort(s);for(var b=0;p.length>b;++b){var m=p[b];u&&null===r[m]||(v=v.concat(H(r[m],m,g,i,u,c?a:null,h,s,f,l,y,d)))}var A=v.join(o);return A.length>0?(!0===n.addQueryPrefix?"?":"")+A:""},G=function(e){var t,r=(t=e)&&Object.keys(t)?M(t):"";return r?"?"+r:""},J=function(e){return e&&e.restEasy?e.restEasy:(console.error('\n There doesn\'t seem to be a "restEasy" key in your state.\n\n For more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/reducer.md#reducer\n '),null)},Q=function(e,t){return new Date-new Date(e)>1e3*t},K=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];if(e&&"function"==typeof e)return e.apply(void 0,r)},Y=window,$={getToken:function(){return"token"},requestGET:function(){return{method:"GET",headers:l({Accept:"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{})}},requestPATCH:function(e){return{method:"PATCH",headers:l({Accept:"application/json","Content-Type":"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{}),body:JSON.stringify(e)}},requestPUT:function(e){return{method:"PUT",headers:l({Accept:"application/json","Content-Type":"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{}),body:JSON.stringify(e)}},requestPOST:function(e){return{method:"POST",headers:l({Accept:"application/json","Content-Type":"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{}),body:JSON.stringify(e)}},requestDELETE:function(){return{method:"DELETE",headers:l({Accept:"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{})}},handleStatusCode:function(e){if(e){if(e.status>=200&&300>e.status)return e;var t=Error(e.statusText);throw t.response=e,t}return null},handleError:(q=s(regeneratorRuntime.mark(function e(t,r){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t||!t.response){e.next=8;break}return e.next=4,t.response.json();case 4:console.error(e.sent),e.next=9;break;case 8:console.error(t);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.error(e.t0);case 14:case"end":return e.stop()}},e,Y,[[0,11]])})),function(e,t){return q.apply(this,arguments)})},W=$,X=function(){return W},Z=window,ee=function(e,t,r,n,o,i,u){return function(e,c,a){return function(){var f,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},p=d.query,h=void 0===p?{}:p,y=d.body,v=void 0===y?{}:y,g=d.urlParams,b=void 0===g?{}:g,m=d.onSuccess,A=d.onError,_=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(d,["query","body","urlParams","onSuccess","onError"]);return f=s(regeneratorRuntime.mark(function s(f,d){var p,y,g,E,j,O,C;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return p=l({},X(),u||{}),f(t.REQUEST(c,a)),s.prev=2,s.next=5,K(n,b,h,v,_,f);case 5:return y=s.sent||v,s.next=9,fetch(e,p["request"+r](y));case 9:if(p.handleStatusCode(g=s.sent),204===g.status){s.next=17;break}return s.next=14,g.json();case 14:s.t0=s.sent,s.next=18;break;case 17:s.t0={};case 18:return E=s.t0,j=o?o(E,J(d()).resources,b,h,y,_):{entities:E},f(t.RECEIVE(c,a,O=j.entities,Array.isArray(C=j.result)?C:[C])),s.next=24,K(i,O||{},b,h,y,_,f);case 24:return K(m,O||{},_),s.abrupt("return",{normalizedPayload:O||{},otherArgs:_});case 28:return s.prev=28,s.t1=s.catch(2),f(t.FAIL(c,a)),p.handleError(s.t1,f),K(A,s.t1),s.abrupt("return",{error:s.t1});case 34:case"end":return s.stop()}},s,Z,[[2,28]])})),function(e,t){return f.apply(this,arguments)}}}},te=function(e,t,r,n){var o=r[n],i=o.method,u=o.url,c=o.beforeHook,a=o.normalizer,s=o.afterHook,f=o.networkHelpers,l=b(e,n),d=ee(0,l,i,c,a,s,f);return function(r){return function(o,c){var a=J(c()),s=r||{},f=s.urlParams,p=s.query,h=function(e){var t=("string"!=typeof e?e():e).split("/").reverse(),r=t.findIndex(function(e){return e.startsWith("::")});return-1!==r?t.length-1-r:-1}(u),y=function(e,t,r){var n="string"!=typeof e?e():e;t&&Object.keys(t).forEach(function(e){n=n.replace("::"+e,t[e]).replace(":"+e,t[e])});var o=r?G(JSON.parse(T(r))):"";return""+n+o}(u,f,p),v=function(e,t){return(e||"")+":"+(t||"")}(n,y),g=function(e,t){if(!e||!t&&0!==t||-1===t)return null;for(var r=0,n=0;t>n;n+=1)r=e.indexOf("/",r+1);var o=e.indexOf("/",r+1);return e.substr(r+1,-1!==o?o-r-1:e.length)}(v,h),b=void 0;(function(e,t){return!(e&&t&&e.requests&&e.requests[t]&&!e.requests[t].endedAt)})(a,v)&&function(e,t,r,n){if(!("GET"===t&&e&&r&&e.requests&&e.requests[r]))return!0;var o=e.requests[r];return!o.hasSucceeded||o.didInvalidate||Q(o.endedAt,n)}(a,i,v,t)&&(b=function(e,t,r,n,o){return!!("GET"===t&&e&&e.requests&&r&&null!==n)&&Object.values(e.requests).some(function(e){var t=e.endedAt,i=e.payloadIds;return e.hasSucceeded&&!e.didInvalidate&&(r===e.resourceName&&n===e.resourceId||i&&i[r]&&i[r].includes(n))&&!Q(t,o)})}(a,i,e,g,t)?function(){var t,r;return o(l.RECEIVE_FROM_CACHE(v,g,((r={})[e]=((t={})[g]=null,t),r),[g]))}:function(){return o(d(y,v,g)(r))});var m=b?b():{};return m.__actionName=n,m.__requestURL=v,m}}},re=function(e,t,r,n){var o,i=function(e){return{INVALIDATE_REQUEST:y(e,"@invalidate","INVALIDATE_REQUEST")}}(e).INVALIDATE_REQUEST;return(o={})[n]={perform:te(e,t,r,n),invalidate:function(e,t){return function(r){return{type:e,url:r,resourceName:t}}}(i,e)},o},ne="[object Object]";var oe,ie,ue=Object.prototype,ce=Function.prototype.toString,ae=ue.hasOwnProperty,se=ce.call(Object),fe=ue.toString,le=(oe=Object.getPrototypeOf,ie=Object,function(e){return oe(ie(e))});var de,pe=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||fe.call(e)!=ne||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=le(e);if(null===t)return!0;var r=ae.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ce.call(r)==se},he=function(e){return function(t){throw Error("redux-rest-easy: "+e+" "+t)}},ye=function(e){return"string"==typeof e},ve=function(e){return"function"==typeof e},ge=function(e){return void 0!==e},be=["method","url"],me=[].concat(be,["beforeHook","normalizer","afterHook","networkHelpers"]),Ae=["GET","POST","PATCH","PUT","DELETE"],_e=function(e){return e+" >"},Ee=function(e,t){return e+' "'+t+'" is invalid. Expected a valid function.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig'},je=function(e,t){if(t){if(!pe(t)||!Object.keys(t).length)he(_e(e)+" createResource >")("You have to provide a valid actions configuration.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource.md#createresourceresourcename-optionsactions");Object.keys(t).forEach(function(r){var n=he(_e(e)+" "+function(e){return e+" >"}(r)+" createResource >"),o=t[r],i=Object.keys(o);be.forEach(function(e){i.includes(e)||n('Key "'+e+'" is missing.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig')}),i.forEach(function(e){me.includes(e)||n(function(e){return'Unknown key "'+e+".\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig"}(e))});var u=o.method,c=o.url,a=o.beforeHook,s=o.normalizer,f=o.afterHook,l=o.networkHelpers;ye(u)&&Ae.includes(u)||n(function(e){return'Method "'+e+'" is invalid. Expected one of: '+Ae.join(", ")+".\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig"}(u)),c&&(ye(c)||ve(c))||n(function(e){return'URL "'+e+'" is invalid. Expected a string or a function returning a string.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig'}(c)),ge(a)&&!ve(a)&&n(Ee("beforeHook",a)),ge(s)&&!ve(s)&&n(Ee("normalizer",s)),ge(f)&&!ve(f)&&n(Ee("afterHook",f)),ge(l)&&!pe(l)&&n("networkHelpers"+' "'+l+'" is invalid. Expected a valid object.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig'),Object.keys(l||{}).forEach(function(e){ge(l[e])&&!ve(l[e])&&n(e+' "networkHelpers.'+l[e]+'" is invalid. Expected a valid function.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig')})})}},Oe=function(e){return void 0!==e},Ce=["cacheLifetime","denormalizer"],we=function(e,t){var r,n=(r=function(e){return e+" >"}(e||"[no resource name]")+" createResource >",function(e){throw Error("redux-rest-easy: "+r+" "+e)});if(e&&"string"==typeof e||n("You have to provide a valid resource name."),t){pe(t)&&Object.keys(t).length||n("You have to provide a valid resource configuration (or not at all)."),Object.keys(t).forEach(function(e){Ce.includes(e)||n(function(e){return'Unknown key "'+e+'" in resource config.'}(e))});var o=t.cacheLifetime,i=t.denormalizer;!Oe(o)||function(e){return"number"==typeof e}(o)&&o>=0||n(function(e){return'cacheLifetime "'+e+'" in resource config is invalid. Expected a number between 0 and Infinity.'}(o)),Oe(i)&&!function(e){return"function"==typeof e}(i)&&n(function(e,t){return e+' "'+t+'" in resource config is invalid. Expected a valid function.'}("denormalizer",i))}},Ie=o(function(e,t){function r(e,t){return e===t}function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return function(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;n>o;o++)if(!e(t[o],r[o]))return!1;return!0}(t,n,arguments)||(o=e.apply(null,arguments)),n=arguments,o}}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;t>o;o++)r[o-1]=arguments[o];return function(){for(var t=arguments.length,o=Array(t),i=0;t>i;i++)o[i]=arguments[i];var u=0,c=o.pop(),a=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var r=t.map(function(e){return typeof e}).join(", ");throw Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+r+"]")}return t}(o),s=e.apply(void 0,[function(){return u++,c.apply(null,arguments)}].concat(r)),f=n(function(){for(var e=[],t=a.length,r=0;t>r;r++)e.push(a[r].apply(null,arguments));return s.apply(null,e)});return f.resultFunc=c,f.recomputations=function(){return u},f.resetRecomputations=function(){return u=0},f}}t.__esModule=!0,t.defaultMemoize=n,t.createSelectorCreator=o,t.createStructuredSelector=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if("object"!=typeof e)throw Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var r=Object.keys(e);return t(r.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return t.reduce(function(e,t,n){return e[r[n]]=t,e},{})})};var i=t.createSelector=o(n)});(de=Ie)&&de.__esModule&&Object.prototype.hasOwnProperty.call(de,"default");var Se=Ie.createSelectorCreator,Re=Ie.createSelector,xe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},qe=function(){function e(){xe(this,e),this._cache={}}return e.prototype.set=function(e,t){this._cache[e]=t},e.prototype.get=function(e){return this._cache[e]},e.prototype.remove=function(e){delete this._cache[e]},e.prototype.clear=function(){this._cache={}},e}();function ke(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];var n=qe;return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=void 0,i=void 0;"function"==typeof r?(console.warn('[re-reselect] Deprecation warning: "selectorCreator" argument is discouraged and will be removed in the upcoming major release. Please use "options.selectorCreator" instead.'),o=new n,i=r):(o=r.cacheObject||new n,i=r.selectorCreator||Re);var u=function(){var r=e.apply(void 0,arguments);if("string"==typeof r||"number"==typeof r){var n=o.get(r);return void 0===n&&(n=i.apply(void 0,t),o.set(r,n)),n.apply(void 0,arguments)}};return u.getMatchingSelector=function(){var t=e.apply(void 0,arguments);return o.get(t)},u.removeMatchingSelector=function(){var t=e.apply(void 0,arguments);o.remove(t)},u.clearCache=function(){o.clear()},u.resultFunc=t[t.length-1],u}}var Te=function(e){return e.split(":")[0]},Le=function(e,t,r){return r?r.__requestURLsByActionKey?r.__requestURLsByActionKey[t]:(console.error("You may have forgotten to use redux-rest-easy's connect on a Component which requested "+e+"."+t+"\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/connect.md#connectconnectargs"),""):(console.error("You may have forgotten to pass ownProps to a selector related to "+e+"."+t+"\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/selectors.md#actionrequest"),"")},Ne={selectorCreator:Se(function(e){var t=null;return function(){return t||(t=e.apply(void 0,arguments)),t}})},Fe=function(){return Ne},Pe=function(e,t,r){return t?Object.keys(t).reduce(function(n,o){var i;return l({},n,((i={})[o]=o===e?r:Object.keys(t[o]||{}),i))},{}):{}},Ue=o(function(e,t){!function(r,n){var o={version:"2.1.2",x86:{},x64:{}};function i(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}function u(e,t){return e<<t|e>>>32-t}function c(e){return e=i(e^=e>>>16,2246822507),e=i(e^=e>>>13,3266489909),e^=e>>>16}function a(e,t){var r=[0,0,0,0];return r[3]+=(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3]+(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function s(e,t){var r=[0,0,0,0];return r[3]+=(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3]*(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function f(e,t){return 32===(t%=64)?[e[1],e[0]]:32>t?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:[e[1]<<(t-=32)|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t]}function l(e,t){return 0===(t%=64)?e:32>t?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function d(e,t){return[e[0]^t[0],e[1]^t[1]]}function p(e){return e=d(e=s(e=d(e=s(e=d(e,[0,e[0]>>>1]),[4283543511,3981806797]),[0,e[0]>>>1]),[3301882366,444984403]),[0,e[0]>>>1])}o.x86.hash32=function(e,t){for(var r=(e=e||"").length%4,n=e.length-r,o=t=t||0,a=0,s=3432918353,f=461845907,l=0;n>l;l+=4)o=i(o=u(o^=a=i(a=u(a=i(a=255&e.charCodeAt(l)|(255&e.charCodeAt(l+1))<<8|(255&e.charCodeAt(l+2))<<16|(255&e.charCodeAt(l+3))<<24,s),15),f),13),5)+3864292196;switch(a=0,r){case 3:a^=(255&e.charCodeAt(l+2))<<16;case 2:a^=(255&e.charCodeAt(l+1))<<8;case 1:o^=a=i(a=u(a=i(a^=255&e.charCodeAt(l),s),15),f)}return(o=c(o^=e.length))>>>0},o.x86.hash128=function(e,t){for(var r=(e=e||"").length%16,n=e.length-r,o=t=t||0,a=t,s=t,f=t,l=0,d=0,p=0,h=0,y=597399067,v=2869860233,g=951274213,b=2716044179,m=0;n>m;m+=16)l=255&e.charCodeAt(m)|(255&e.charCodeAt(m+1))<<8|(255&e.charCodeAt(m+2))<<16|(255&e.charCodeAt(m+3))<<24,d=255&e.charCodeAt(m+4)|(255&e.charCodeAt(m+5))<<8|(255&e.charCodeAt(m+6))<<16|(255&e.charCodeAt(m+7))<<24,p=255&e.charCodeAt(m+8)|(255&e.charCodeAt(m+9))<<8|(255&e.charCodeAt(m+10))<<16|(255&e.charCodeAt(m+11))<<24,h=255&e.charCodeAt(m+12)|(255&e.charCodeAt(m+13))<<8|(255&e.charCodeAt(m+14))<<16|(255&e.charCodeAt(m+15))<<24,o=u(o^=l=i(l=u(l=i(l,y),15),v),19),o=i(o+=a,5)+1444728091,a=u(a^=d=i(d=u(d=i(d,v),16),g),17),a=i(a+=s,5)+197830471,s=u(s^=p=i(p=u(p=i(p,g),17),b),15),s=i(s+=f,5)+2530024501,f=u(f^=h=i(h=u(h=i(h,b),18),y),13),f=i(f+=o,5)+850148119;switch(l=0,d=0,p=0,h=0,r){case 15:h^=e.charCodeAt(m+14)<<16;case 14:h^=e.charCodeAt(m+13)<<8;case 13:f^=h=i(h=u(h=i(h^=e.charCodeAt(m+12),b),18),y);case 12:p^=e.charCodeAt(m+11)<<24;case 11:p^=e.charCodeAt(m+10)<<16;case 10:p^=e.charCodeAt(m+9)<<8;case 9:s^=p=i(p=u(p=i(p^=e.charCodeAt(m+8),g),17),b);case 8:d^=e.charCodeAt(m+7)<<24;case 7:d^=e.charCodeAt(m+6)<<16;case 6:d^=e.charCodeAt(m+5)<<8;case 5:a^=d=i(d=u(d=i(d^=e.charCodeAt(m+4),v),16),g);case 4:l^=e.charCodeAt(m+3)<<24;case 3:l^=e.charCodeAt(m+2)<<16;case 2:l^=e.charCodeAt(m+1)<<8;case 1:o^=l=i(l=u(l=i(l^=e.charCodeAt(m),y),15),v)}return o^=e.length,o+=a^=e.length,o+=s^=e.length,a+=o+=f^=e.length,s+=o,f+=o,o=c(o),o+=a=c(a),o+=s=c(s),a+=o+=f=c(f),s+=o,f+=o,("00000000"+(o>>>0).toString(16)).slice(-8)+("00000000"+(a>>>0).toString(16)).slice(-8)+("00000000"+(s>>>0).toString(16)).slice(-8)+("00000000"+(f>>>0).toString(16)).slice(-8)},o.x64.hash128=function(e,t){for(var r=(e=e||"").length%16,n=e.length-r,o=[0,t=t||0],i=[0,t],u=[0,0],c=[0,0],h=[2277735313,289559509],y=[1291169091,658871167],v=0;n>v;v+=16)u=[255&e.charCodeAt(v+4)|(255&e.charCodeAt(v+5))<<8|(255&e.charCodeAt(v+6))<<16|(255&e.charCodeAt(v+7))<<24,255&e.charCodeAt(v)|(255&e.charCodeAt(v+1))<<8|(255&e.charCodeAt(v+2))<<16|(255&e.charCodeAt(v+3))<<24],c=[255&e.charCodeAt(v+12)|(255&e.charCodeAt(v+13))<<8|(255&e.charCodeAt(v+14))<<16|(255&e.charCodeAt(v+15))<<24,255&e.charCodeAt(v+8)|(255&e.charCodeAt(v+9))<<8|(255&e.charCodeAt(v+10))<<16|(255&e.charCodeAt(v+11))<<24],o=a(s(o=a(o=f(o=d(o,u=s(u=f(u=s(u,h),31),y)),27),i),[0,5]),[0,1390208809]),i=a(s(i=a(i=f(i=d(i,c=s(c=f(c=s(c,y),33),h)),31),o),[0,5]),[0,944331445]);switch(u=[0,0],c=[0,0],r){case 15:c=d(c,l([0,e.charCodeAt(v+14)],48));case 14:c=d(c,l([0,e.charCodeAt(v+13)],40));case 13:c=d(c,l([0,e.charCodeAt(v+12)],32));case 12:c=d(c,l([0,e.charCodeAt(v+11)],24));case 11:c=d(c,l([0,e.charCodeAt(v+10)],16));case 10:c=d(c,l([0,e.charCodeAt(v+9)],8));case 9:i=d(i,c=s(c=f(c=s(c=d(c,[0,e.charCodeAt(v+8)]),y),33),h));case 8:u=d(u,l([0,e.charCodeAt(v+7)],56));case 7:u=d(u,l([0,e.charCodeAt(v+6)],48));case 6:u=d(u,l([0,e.charCodeAt(v+5)],40));case 5:u=d(u,l([0,e.charCodeAt(v+4)],32));case 4:u=d(u,l([0,e.charCodeAt(v+3)],24));case 3:u=d(u,l([0,e.charCodeAt(v+2)],16));case 2:u=d(u,l([0,e.charCodeAt(v+1)],8));case 1:o=d(o,u=s(u=f(u=s(u=d(u,[0,e.charCodeAt(v)]),h),31),y))}return o=d(o,[0,e.length]),i=a(i=d(i,[0,e.length]),o=a(o,i)),o=p(o),i=a(i=p(i),o=a(o,i)),("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)},e.exports&&(t=e.exports=o),t.murmurHash3=o}()}),ze=Ue,De=o(function(e){e.exports={v3:ze},function(){throw Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}.main===e&&console.log(e.exports.v3)}).v3,Be=function(e){return De.x64.hash128(T(e||null))},Ve=Be([]),He={empty:Ve,requests:{},resources:{}},Me=l({},He),Ge=function(e,t,r,n,o){var i,u,c=Pe(t,n,o),a=Object.keys(c).reduce(function(t,n){var o;return l({},t,((o={})[n]=e&&e.requests&&e.requests[r]&&e.requests[r].payloadIds&&e.requests[r].payloadIds[n]?Be(e.requests[r].payloadIds[n]):Ve,o))},{});Me=l({},Me,{requests:l({},Me.requests,(i={},i[r]=a,i)),resources:l({},Me.resources,(u={_getResourcesHash:function(){return Be(e.resources)}},u[t]=e.resources&&e.resources[t]?Be(e.resources[t]):Ve,u))})},Je=function(){return Me.empty},Qe=function(e,t){return Me.requests[e]?Me.requests[e][t]:Ve},Ke=function(e){return Me.resources[e]?Me.resources[e]:Ve},Ye=[],$e=function(e,t){return("number"==typeof e?""+e:e)===("number"==typeof t?""+t:t)},We=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;return!!e.requests&&Object.entries(e.requests).some(function(e){var o=e[1],i=o.resourceName,u=o.resourceId,c=o.endedAt;return Te(e[0])===r&&i===t&&(-1===n||null!==u&&$e(u,n))&&!c})},Xe=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,i=e.requests&&Object.entries(e.requests).filter(function(e){var n=e[1],i=n.resourceName,u=n.resourceId,c=n.endedAt,a=n.payloadIds;return Te(e[0])===r&&i===t&&(-1===o||null!==u&&$e(u,o)||!!c&&a&&a[t]&&a[t].includes(o))}).map(function(e){return e[1]});return!(!i||!i.length)&&i.reduce(function(e,t){return t.endedAt&&e.endedAt&&t.endedAt>e.endedAt?t:e},i[0])[n]},Ze=function(e,t){return e.resources&&e.resources[t]?e.resources[t]:null},et=function(e,t,r){return e.requests&&e.requests[r]&&e.requests[r].payloadIds&&e.requests[r].payloadIds[t]?e.requests[r].payloadIds[t]:null},tt=ke(function(e){return e.resources},Ze,et,function(e,t,r,n){return n},function(e,t,r,n,o){return o},function(e,t,r,n,o){return t&&r?n&&o?o(r,e):r.reduce(function(e,r){return[].concat(e,[t[r]])},[]):Ye})(function(e,t,r,n,o){var i=Ze(e,t),u=et(e,t,r);return i&&u?n&&o?n+"-"+Object.keys(e.requests[r].payloadIds).map(function(e){return Qe(r,e)+"-"+Ke(e)}).join("--"):n+"-"+Qe(r,t)+"-"+Ke(t):Je()},Fe()),rt=function(e,t){return!(!e.requests||!e.requests[t]||e.requests[t].endedAt)},nt=function(e,t,r){return!!(e.requests&&e.requests[t]&&e.requests[t][r])},ot=[],it=function(e,t){return e.resources&&e.resources[t]?e.resources[t]:null},ut=ke(function(e){return e.resources},it,function(e,t,r){return r},function(e,t,r,n){return n},function(e,t,r,n){return t?r&&n?n(Object.keys(t),e):Object.values(t):ot})(function(e,t,r,n){return it(e,t)?r&&n?r+"-"+(Me.resources._getResourcesHash?Me.resources._getResourcesHash():Ve):r+"-"+Ke(t):Je()},Fe()),ct=function(e){var t=e.split("/");return{resourceName:t[1],actionName:t[2],caseName:t[3]}},at=o(function(e,t){var r=200,o="__lodash_hash_undefined__",i=800,u=16,c=9007199254740991,a="[object Arguments]",s="[object AsyncFunction]",f="[object Function]",l="[object GeneratorFunction]",d="[object Null]",p="[object Object]",h="[object Proxy]",y="[object Undefined]",v=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[a]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[f]=b["[object Map]"]=b["[object Number]"]=b[p]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var m="object"==typeof n&&n&&n.Object===Object&&n,A="object"==typeof self&&self&&self.Object===Object&&self,_=m||A||Function("return this")(),E=t&&!t.nodeType&&t,j=E&&e&&!e.nodeType&&e,O=j&&j.exports===E,C=O&&m.process,w=function(){try{return C&&C.binding&&C.binding("util")}catch(e){}}(),I=w&&w.isTypedArray;function S(e,t){return"__proto__"==t?void 0:e[t]}var R,x,q,k=Array.prototype,T=Object.prototype,L=_["__core-js_shared__"],N=Function.prototype.toString,F=T.hasOwnProperty,P=(R=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"",U=T.toString,z=N.call(Object),D=RegExp("^"+N.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),B=O?_.Buffer:void 0,V=_.Symbol,H=_.Uint8Array,M=B?B.allocUnsafe:void 0,G=(x=Object.getPrototypeOf,q=Object,function(e){return x(q(e))}),J=Object.create,Q=T.propertyIsEnumerable,K=k.splice,Y=V?V.toStringTag:void 0,$=function(){try{var e=_e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),W=B?B.isBuffer:void 0,X=Math.max,Z=Date.now,ee=_e(_,"Map"),te=_e(Object,"create"),re=function(){function e(){}return function(t){if(!ke(t))return{};if(J)return J(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ie(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ue(e){var t=this.__data__=new oe(e);this.size=t.size}function ce(e,t){var r=Ie(e),n=!r&&we(e),o=!r&&!n&&Re(e),i=!r&&!n&&!o&&Le(e),u=r||n||o||i,c=u?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],a=c.length;for(var s in e)!t&&!F.call(e,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ee(s,a))||c.push(s);return c}function ae(e,t,r){(void 0===r||Ce(e[t],r))&&(void 0!==r||t in e)||le(e,t,r)}function se(e,t,r){var n=e[t];F.call(e,t)&&Ce(n,r)&&(void 0!==r||t in e)||le(e,t,r)}function fe(e,t){for(var r=e.length;r--;)if(Ce(e[r][0],t))return r;return-1}function le(e,t,r){"__proto__"==t&&$?$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}ne.prototype.clear=function(){this.__data__=te?te(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(te){var r=t[e];return r===o?void 0:r}return F.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return te?void 0!==t[e]:F.call(t,e)},ne.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=te&&void 0===t?o:t,this},oe.prototype.clear=function(){this.__data__=[],this.size=0},oe.prototype.delete=function(e){var t=this.__data__,r=fe(t,e);return r>=0&&(r==t.length-1?t.pop():K.call(t,r,1),--this.size,!0)},oe.prototype.get=function(e){var t=this.__data__,r=fe(t,e);return 0>r?void 0:t[r][1]},oe.prototype.has=function(e){return fe(this.__data__,e)>-1},oe.prototype.set=function(e,t){var r=this.__data__,n=fe(r,e);return 0>n?(++this.size,r.push([e,t])):r[n][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(ee||oe),string:new ne}},ie.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return Ae(this,e).get(e)},ie.prototype.has=function(e){return Ae(this,e).has(e)},ie.prototype.set=function(e,t){var r=Ae(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ue.prototype.clear=function(){this.__data__=new oe,this.size=0},ue.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oe){var o=n.__data__;if(!ee||r-1>o.length)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new ie(o)}return n.set(e,t),this.size=n.size,this};var de,pe=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),u=i.length;u--;){var c=i[de?u:++n];if(!1===t(o[c],c,o))break}return e};function he(e){return null==e?void 0===e?y:d:Y&&Y in Object(e)?function(e){var t=F.call(e,Y),r=e[Y];try{e[Y]=void 0;var n=!0}catch(e){}var o=U.call(e);n&&(t?e[Y]=r:delete e[Y]);return o}(e):function(e){return U.call(e)}(e)}function ye(e){return Te(e)&&he(e)==a}function ve(e){return!(!ke(e)||P&&P in e)&&(xe(e)?D:v).test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!ke(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=je(e),r=[];for(var n in e)("constructor"!=n||!t&&F.call(e,n))&&r.push(n);return r}function be(e,t,r,n,o){e!==t&&pe(t,function(i,u){if(ke(i))o||(o=new ue),function(e,t,r,n,o,i,u){var c=S(e,r),a=S(t,r),s=u.get(a);if(s)return void ae(e,r,s);var f=i?i(c,a,r+"",e,t,u):void 0,l=void 0===f;if(l){var d=Ie(a),h=!d&&Re(a),y=!d&&!h&&Le(a);f=a,d||h||y?Ie(c)?f=c:Te(A=c)&&Se(A)?f=function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r<n;)t[r]=e[r];return t}(c):h?(l=!1,f=function(e,t){if(t)return e.slice();var r=e.length,n=M?M(r):new e.constructor(r);return e.copy(n),n}(a,!0)):y?(l=!1,v=a,g=!0?(new H(m=new(b=v.buffer).constructor(b.byteLength)).set(new H(b)),m):v.buffer,f=new v.constructor(g,v.byteOffset,v.length)):f=[]:function(e){if(!Te(e)||he(e)!=p)return!1;var t=G(e);if(null===t)return!0;var r=F.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&N.call(r)==z}(a)||we(a)?(f=c,we(c)?f=function(e){return function(e,t,r,n){var o=!r;r||(r={});var i=-1,u=t.length;for(;++i<u;){var c=t[i],a=n?n(r[c],e[c],c,r,e):void 0;void 0===a&&(a=e[c]),o?le(r,c,a):se(r,c,a)}return r}(e,Ne(e))}(c):(!ke(c)||n&&xe(c))&&(f=function(e){return"function"!=typeof e.constructor||je(e)?{}:re(G(e))}(a))):l=!1}var v,g,b,m;var A;l&&(u.set(a,f),o(f,a,n,i,u),u.delete(a));ae(e,r,f)}(e,t,u,r,be,n,o);else{var c=n?n(S(e,u),i,u+"",e,t,o):void 0;void 0===c&&(c=i),ae(e,u,c)}},Ne)}function me(e,t){return Oe(function(e,t,r){return t=X(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=X(n.length-t,0),u=Array(i);++o<i;)u[o]=n[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=n[o];return c[t]=r(u),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,c)}}(e,t,Ue),e+"")}function Ae(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ve(r)?r:void 0}function Ee(e,t){var r=typeof e;return!!(t=null==t?c:t)&&("number"==r||"symbol"!=r&&g.test(e))&&e>-1&&e%1==0&&t>e}function je(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T)}var Oe=function(e){var t=0,r=0;return function(){var n=Z(),o=u-(n-r);if(r=n,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}($?function(e,t){return $(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Ue);function Ce(e,t){return e===t||e!=e&&t!=t}var we=ye(function(){return arguments}())?ye:function(e){return Te(e)&&F.call(e,"callee")&&!Q.call(e,"callee")},Ie=Array.isArray;function Se(e){return null!=e&&qe(e.length)&&!xe(e)}var Re=W||function(){return!1};function xe(e){if(!ke(e))return!1;var t=he(e);return t==f||t==l||t==s||t==h}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&c>=e}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Le=I?function(e){return function(t){return e(t)}}(I):function(e){return Te(e)&&qe(e.length)&&!!b[he(e)]};function Ne(e){return Se(e)?ce(e,!0):ge(e)}var Fe,Pe=(Fe=function(e,t,r,n){be(e,t,r,n)},me(function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=Fe.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!ke(r))return!1;var n=typeof t;return!!("number"==n?Se(r)&&Ee(t,r.length):"string"==n&&t in r)&&Ce(r[t],e)}(t[0],t[1],i)&&(o=3>n?void 0:o,n=1),e=Object(e);++r<n;){var u=t[r];u&&Fe(e,u,r,o)}return e}));function Ue(e){return e}e.exports=Pe}),st=function(e,t){return at(e.resources,t,function(e,t){return pe(e)?l({},e,t):void 0})},ft={},lt={REQUEST:function(e,t){var r,n=t.url,o=t.resourceId;return l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{resourceName:ct(t.type).resourceName,resourceId:o,startedAt:(new Date).toISOString(),endedAt:null,hasSucceeded:!(!e.requests||!e.requests[n])&&e.requests[n].hasSucceeded,hasFailed:!(!e.requests||!e.requests[n])&&e.requests[n].hasFailed,didInvalidate:!(!e.requests||!e.requests[n])&&e.requests[n].didInvalidate,fromCache:!(!e.requests||!e.requests[n])&&e.requests[n].fromCache}),r))})},RECEIVE:function(e,t){var r,n=t.url,o=t.payload,i=t.principalResourceIds,u=ct(t.type).resourceName,c=l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{endedAt:(new Date).toISOString(),hasSucceeded:!0,hasFailed:!1,didInvalidate:!1,fromCache:!1,payloadIds:Pe(u,o,i)}),r)),resources:st(e,o)});return Ge(c,u,n,o,i),c},FAIL:function(e,t){var r,n=t.url;return l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{endedAt:(new Date).toISOString(),hasSucceeded:!1,hasFailed:!0}),r))})},RECEIVE_FROM_CACHE:function(e,t){var r,n=t.type,o=t.url,i=t.resourceId,u=t.payload,c=t.principalResourceIds,a=ct(n).resourceName,s=l({},e,{requests:l({},e.requests||{},(r={},r[o]=l({},e.requests&&e.requests[o]?e.requests[o]:{},{resourceName:ct(n).resourceName,resourceId:i,startedAt:(new Date).toISOString(),endedAt:(new Date).toISOString(),hasSucceeded:!0,hasFailed:!1,didInvalidate:!1,fromCache:!0,payloadIds:Pe(a,u,c)}),r)),resources:st(e,u)});return Ge(s,a,o,u,c),s},INVALIDATE_RESOURCE:function(e,t){var r=t.resourceName;return l({},e,{requests:l({},Object.entries(e.requests||{}).reduce(function(e,t){var n,o=t[1];return l({},e,((n={})[t[0]]=!o.didInvalidate&&(o.resourceName===r||o.payloadIds&&o.payloadIds[r])?l({},o,{didInvalidate:!0}):o,n))},{}))})},INVALIDATE_ID:function(e,t){var r=t.resourceName,n=t.resourceId;return l({},e,{requests:l({},Object.entries(e.requests||{}).reduce(function(e,t){var o,i=t[1];return l({},e,((o={})[t[0]]=!i.didInvalidate&&(i.resourceName===r&&i.resourceId===n||i.payloadIds&&i.payloadIds[r]&&i.payloadIds[r].map(function(e){return""+e}).includes(""+n))?l({},i,{didInvalidate:!0}):i,o))},{}))})},INVALIDATE_REQUEST:function(e,t){var r,n=t.url;return l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{didInvalidate:!0}),r))})},RESET_RESOURCE:function(e,t){var r,n=t.resourceName,o=l({},e,{requests:l({},Object.entries(e.requests||{}).filter(function(e){var t=e[1],r=t.payloadIds;return!(n===t.resourceName||r&&Object.keys(r).includes(n))}).reduce(function(e,t){var r;return l({},e,((r={})[t[0]]=t[1],r))},{})),resources:l({},e.resources||{},(r={},r[n]=void 0,r))});return function(e,t){var r;Me=l({},Me,{requests:l({},Object.entries(Me.requests).reduce(function(t,r){var n,o=r[0],i=r[1];return l({},t,Object.keys(e.requests).includes(o)?((n={})[o]=i,n):{})},{})),resources:l({},Me.resources,(r={},r[t]=Ve,r))})}(o),o},RESET_ALL:function(){return Me=l({},He),{}}},dt=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ft;return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===t)return e;if(!r.type||!r.type.startsWith("@@rest-easy"))return t;var n=lt[ct(r.type).caseName];return n?n(t,r):t}}(),pt=function(){var e,t={RESET_ALL:y("@global","@reset","RESET_ALL")};return{resetAll:(e=t.RESET_ALL,function(){return{type:e}})}};e.connect=function(){for(var e=arguments.length,r=Array(e),n=0;e>n;n++)r[n]=arguments[n];return function(e){var n=e.displayName||e.name||"Component",o=function(n){function o(t){f(this,o);var i=d(this,n.call(this,t));return i.onInjectProps=function(e,t){i.setState(function(r){var n;return r.__requestURLsByActionKey[e]!==t?{__requestURLsByActionKey:l({},r.__requestURLsByActionKey,(n={},n[e]=t,n))}:null})},i.getWrappedInstance=function(){return i.innerRef&&i.innerRef.getWrappedInstance?i.innerRef.getWrappedInstance():null},i.state={__requestURLsByActionKey:{}},i.ConnectedComponent=p(i.onInjectProps).apply(void 0,r)(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype.render=function(){var e=this,r=this.ConnectedComponent,n=l({},this.props,this.state);return t.createElement(r,l({ref:function(t){e.innerRef=t}},n))},o}(t.Component);return o.displayName="EasyConnect("+n+")",o}},e.createResource=function(e,t){return function(r){we(e,t),je(e,r);var n=t||{},o=n.cacheLifetime,i=void 0===o?0:o,u=n.denormalizer,c=l({},v(e)),a=l({},function(e,t){return{resource:{getResource:function(r){var n=1>=arguments.length||void 0===arguments[1]||arguments[1];return ut(J(r),e,n,t)},getResourceById:function(r,n){var o=2>=arguments.length||void 0===arguments[2]||arguments[2];return function(e,t,r,n,o){return n&&o?o([r],e.resources)[0]||null:e.resources&&e.resources[t]&&e.resources[t][r]?e.resources[t][r]:null}(J(r),e,n,o,t)}}}}(e,u));return Object.keys(r||{}).forEach(function(t){c=l({},c,re(e,i,r||{},t)),a=l({},a,function(e,t,r){var n;return(n={})[t]={resource:{couldPerform:function(r){return!We(J(r),e,t)},isPerforming:function(r){return We(J(r),e,t)},isValid:function(r){return!Xe(J(r),e,t,"didInvalidate")},hasSucceeded:function(r){return Xe(J(r),e,t,"hasSucceeded")},hasFailed:function(r){return Xe(J(r),e,t,"hasFailed")},couldPerformOnId:function(r,n){return!We(J(r),e,t,n)},isPerformingOnId:function(r,n){return We(J(r),e,t,n)},hasSucceededOnId:function(r,n){return Xe(J(r),e,t,"hasSucceeded",n)},hasFailedOnId:function(r,n){return Xe(J(r),e,t,"hasFailed",n)},isValidId:function(r,n){return!Xe(J(r),e,t,"didInvalidate",n)}},request:{getResource:function(n,o){var i=2>=arguments.length||void 0===arguments[2]||arguments[2];return tt(J(n),e,Le(e,t,o),i,r)},couldPerform:function(r,n){return!rt(J(r),Le(e,t,n))},isPerforming:function(r,n){return rt(J(r),Le(e,t,n))},isValid:function(r,n){return!nt(J(r),Le(e,t,n),"didInvalidate")},hasSucceeded:function(r,n){return nt(J(r),Le(e,t,n),"hasSucceeded")},hasFailed:function(r,n){return nt(J(r),Le(e,t,n),"hasFailed")}}},n}(e,t,u))}),{actions:c,selectors:a}}},e.reducer=dt,e.reset=function(){return(0,pt().resetAll)()},e.initializeNetworkHelpers=function(e){!function(e){W=e?l({},$,e):$}(e)},Object.defineProperty(e,"__esModule",{value:!0})}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-redux")):"function"==typeof define&&define.amd?define(["exports","react","react-redux"],t):t(e.ReduxRestEasy={},e.React,e.ReactRedux)}(this,function(e,t,r){"use strict";t=t&&t.hasOwnProperty("default")?t.default:t;var n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function o(e,t){return e(t={exports:{}},t.exports),t.exports}o(function(e){!function(t){var r,n=Object.prototype,o=n.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},u=i.iterator||"@@iterator",c=i.asyncIterator||"@@asyncIterator",a=i.toStringTag||"@@toStringTag",s=t.regeneratorRuntime;if(s)e.exports=s;else{(s=t.regeneratorRuntime=e.exports).wrap=m;var f="suspendedStart",l="suspendedYield",d="executing",h="completed",p={},y={};y[u]=function(){return this};var v=Object.getPrototypeOf,g=v&&v(v(x([])));g&&g!==n&&o.call(g,u)&&(y=g);var b=j.prototype=_.prototype=Object.create(y);E.prototype=b.constructor=j,j.constructor=E,j[a]=E.displayName="GeneratorFunction",s.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===E||"GeneratorFunction"===(t.displayName||t.name))},s.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,j):(e.__proto__=j,a in e||(e[a]="GeneratorFunction")),e.prototype=Object.create(b),e},s.awrap=function(e){return{__await:e}},O(C.prototype),C.prototype[c]=function(){return this},s.AsyncIterator=C,s.async=function(e,t,r,n){var o=new C(m(e,t,r,n));return s.isGeneratorFunction(t)?o:o.next().then(function(e){return e.done?e.value:o.next()})},O(b),b[a]="Generator",b[u]=function(){return this},b.toString=function(){return"[object Generator]"},s.keys=function(e){var t=[];for(var r in e)t.push(r);return t.reverse(),function r(){for(;t.length;){var n=t.pop();if(n in e)return r.value=n,r.done=!1,r}return r.done=!0,r}},s.values=x,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=r,this.done=!1,this.delegate=null,this.method="next",this.arg=r,this.tryEntries.forEach(S),!e)for(var t in this)"t"===t.charAt(0)&&o.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=r)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,o){return c.type="throw",c.arg=e,t.next=n,o&&(t.method="next",t.arg=r),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var u=this.tryEntries[i],c=u.completion;if("root"===u.tryLoc)return n("end");if(this.prev>=u.tryLoc){var a=o.call(u,"catchLoc"),s=o.call(u,"finallyLoc");if(a&&s){if(u.catchLoc>this.prev)return n(u.catchLoc,!0);if(u.finallyLoc>this.prev)return n(u.finallyLoc)}else if(a){if(u.catchLoc>this.prev)return n(u.catchLoc,!0)}else{if(!s)throw Error("try statement without catch or finally");if(u.finallyLoc>this.prev)return n(u.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(this.prev>=n.tryLoc&&o.call(n,"finallyLoc")&&n.finallyLoc>this.prev){var i=n;break}}!i||"break"!==e&&"continue"!==e||i.tryLoc>t||t>i.finallyLoc||(i=null);var u=i?i.completion:{};return u.type=e,u.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(u)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),S(r),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;S(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:x(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=r),p}}}function m(e,t,r,n){var o=Object.create((t&&t.prototype instanceof _?t:_).prototype),i=new R(n||[]);return o._invoke=function(e,t,r){var n=f;return function(o,i){if(n===d)throw Error("Generator is already running");if(n===h){if("throw"===o)throw i;return q()}for(r.method=o,r.arg=i;;){var u=r.delegate;if(u){var c=w(u,r);if(c){if(c===p)continue;return c}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var a=A(e,t,r);if("normal"===a.type){if(n=r.done?h:l,a.arg===p)continue;return{value:a.arg,done:r.done}}"throw"===a.type&&(n=h,r.method="throw",r.arg=a.arg)}}}(e,r,i),o}function A(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}function _(){}function E(){}function j(){}function O(e){["next","throw","return"].forEach(function(t){e[t]=function(e){return this._invoke(t,e)}})}function C(e){var t;this._invoke=function(r,n){function i(){return new Promise(function(t,i){!function t(r,n,i,u){var c=A(e[r],e,n);if("throw"!==c.type){var a=c.arg,s=a.value;return s&&"object"==typeof s&&o.call(s,"__await")?Promise.resolve(s.__await).then(function(e){t("next",e,i,u)},function(e){t("throw",e,i,u)}):Promise.resolve(s).then(function(e){a.value=e,i(a)},u)}u(c.arg)}(r,n,t,i)})}return t=t?t.then(i,i):i()}}function w(e,t){var n=e.iterator[t.method];if(n===r){if(t.delegate=null,"throw"===t.method){if(e.iterator.return&&(t.method="return",t.arg=r,w(e,t),"throw"===t.method))return p;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var o=A(n,e.iterator,t.arg);if("throw"===o.type)return t.method="throw",t.arg=o.arg,t.delegate=null,p;var i=o.arg;return i?i.done?(t[e.resultName]=i.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=r),t.delegate=null,p):i:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function I(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function S(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function R(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(I,this),this.reset(!0)}function x(e){if(e){var t=e[u];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,i=function t(){for(;++n<e.length;)if(o.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=r,t.done=!0,t};return i.next=i}}return{next:q}}function q(){return{value:r,done:!0}}}(function(){return this}()||Function("return this")())});var i,u,c,a,s=function(e){return function(){var t=e.apply(this,arguments);return new Promise(function(e,r){return function n(o,i){try{var u=t[o](i),c=u.value}catch(e){return void r(e)}if(!u.done)return Promise.resolve(c).then(function(e){n("next",e)},function(e){n("throw",e)});e(c)}("next")})}},f=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},l=Object.assign||function(e){for(var t=1;arguments.length>t;t++){var r=arguments[t];for(var n in r)Object.prototype.hasOwnProperty.call(r,n)&&(e[n]=r[n])}return e},d=function(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t},h=function(e){return function(t,n){for(var o=arguments.length,i=Array(o>2?o-2:0),u=2;o>u;u++)i[u-2]=arguments[u];return r.connect.apply(void 0,[t,n&&"function"==typeof n?function(){var t=n.apply(void 0,arguments);return Object.keys(t).reduce(function(r,n){var o;return l({},r,((o={})[n]=function(){var r=t[n].apply(t,arguments);return r&&r.__actionName&&r.__requestURL&&(e(r.__actionName,r.__requestURL),delete r.__actionName,delete r.__requestURL),r},o))},{})}:n].concat(i))}},p=function(e,t){return function(r){return{type:e,resourceName:t,resourceId:r}}},y=function(e,t,r){return"@@rest-easy/"+e+"/"+t+"/"+r.toUpperCase()},v=function(e){var t=function(e){return{INVALIDATE_RESOURCE:y(e,"@invalidate","INVALIDATE_RESOURCE"),INVALIDATE_ID:y(e,"@invalidate","INVALIDATE_ID"),RESET_RESOURCE:y(e,"@reset","RESET_RESOURCE")}}(e),r=t.INVALIDATE_ID,n=t.RESET_RESOURCE;return{resource:{invalidate:p(t.INVALIDATE_RESOURCE,e),invalidateId:p(r,e),reset:p(n,e)}}},g=function(e){return function(t,r,n,o){return{type:e,url:t,resourceId:r,payload:n&&Object.keys(n).length?n:void 0,principalResourceIds:"string"==typeof o?[o]:o}}},b=function(e,t){var r=function(e,t){return{REQUEST:y(e,t,"REQUEST"),RECEIVE:y(e,t,"RECEIVE"),FAIL:y(e,t,"FAIL"),RECEIVE_FROM_CACHE:y(e,t,"RECEIVE_FROM_CACHE")}}(e,t),n=r.RECEIVE,o=r.FAIL,i=r.RECEIVE_FROM_CACHE;return{REQUEST:g(r.REQUEST),RECEIVE:g(n),FAIL:g(o),RECEIVE_FROM_CACHE:g(i)}},m={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},A=function(e){throw{name:"SyntaxError",message:e,at:i,text:c}},_=function(e){return e&&e!==u&&A("Expected '"+e+"' instead of '"+u+"'"),u=c.charAt(i),i+=1,u},E=function(){var e,t="";for("-"===u&&(t="-",_("-"));u>="0"&&"9">=u;)t+=u,_();if("."===u)for(t+=".";_()&&u>="0"&&"9">=u;)t+=u;if("e"===u||"E"===u)for(t+=u,_(),"-"!==u&&"+"!==u||(t+=u,_());u>="0"&&"9">=u;)t+=u,_();if(isFinite(e=+t))return e;A("Bad number")},j=function(){var e,t,r,n="";if('"'===u)for(;_();){if('"'===u)return _(),n;if("\\"===u)if(_(),"u"===u){for(r=0,t=0;4>t&&(e=parseInt(_(),16),isFinite(e));t+=1)r=16*r+e;n+=String.fromCharCode(r)}else{if("string"!=typeof m[u])break;n+=m[u]}else n+=u}A("Bad string")},O=function(){for(;u&&" ">=u;)_()};a=function(){switch(O(),u){case"{":return function(){var e,t={};if("{"===u){if(_("{"),O(),"}"===u)return _("}"),t;for(;u;){if(e=j(),O(),_(":"),Object.hasOwnProperty.call(t,e)&&A('Duplicate key "'+e+'"'),t[e]=a(),O(),"}"===u)return _("}"),t;_(","),O()}}A("Bad object")}();case"[":return function(){var e=[];if("["===u){if(_("["),O(),"]"===u)return _("]"),e;for(;u;){if(e.push(a()),O(),"]"===u)return _("]"),e;_(","),O()}}A("Bad array")}();case'"':return j();case"-":return E();default:return"0">u||u>"9"?function(){switch(u){case"t":return _("t"),_("r"),_("u"),_("e"),!0;case"f":return _("f"),_("a"),_("l"),_("s"),_("e"),!1;case"n":return _("n"),_("u"),_("l"),_("l"),null}A("Unexpected '"+u+"'")}():E()}};var C,w,I,S=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,R={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};function x(e){return S.lastIndex=0,S.test(e)?'"'+e.replace(S,function(e){var t=R[e];return"string"==typeof t?t:"\\u"+("0000"+e.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+e+'"'}var q,k=void 0!==JSON?JSON:{parse:function(e,t){var r;return c=e,i=0,u=" ",r=a(),O(),u&&A("Syntax error"),"function"==typeof t?function e(r,n){var o,i,u=r[n];if(u&&"object"==typeof u)for(o in u)Object.prototype.hasOwnProperty.call(u,o)&&(void 0!==(i=e(u,o))?u[o]=i:delete u[o]);return t.call(r,n,u)}({"":r},""):r},stringify:function(e,t,r){var n;if(C="",w="","number"==typeof r)for(n=0;r>n;n+=1)w+=" ";else"string"==typeof r&&(w=r);if(I=t,t&&"function"!=typeof t&&("object"!=typeof t||"number"!=typeof t.length))throw Error("JSON.stringify");return function e(t,r){var n,o,i,u,c,a=C,s=r[t];switch(s&&"object"==typeof s&&"function"==typeof s.toJSON&&(s=s.toJSON(t)),"function"==typeof I&&(s=I.call(r,t,s)),typeof s){case"string":return x(s);case"number":return isFinite(s)?s+"":"null";case"boolean":case"null":return s+"";case"object":if(!s)return"null";if(C+=w,c=[],"[object Array]"===Object.prototype.toString.apply(s)){for(u=s.length,n=0;u>n;n+=1)c[n]=e(n,s)||"null";return i=0===c.length?"[]":C?"[\n"+C+c.join(",\n"+C)+"\n"+a+"]":"["+c.join(",")+"]",C=a,i}if(I&&"object"==typeof I)for(u=I.length,n=0;u>n;n+=1)"string"==typeof(o=I[n])&&(i=e(o,s))&&c.push(x(o)+(C?": ":":")+i);else for(o in s)Object.prototype.hasOwnProperty.call(s,o)&&(i=e(o,s))&&c.push(x(o)+(C?": ":":")+i);return i=0===c.length?"{}":C?"{\n"+C+c.join(",\n"+C)+"\n"+a+"}":"{"+c.join(",")+"}",C=a,i}}("",{"":e})}},T=function(e,t){t||(t={}),"function"==typeof t&&(t={cmp:t});var r=t.space||"";"number"==typeof r&&(r=Array(r+1).join(" "));var n,o="boolean"==typeof t.cycles&&t.cycles,i=t.replacer||function(e,t){return t},u=t.cmp&&(n=t.cmp,function(e){return function(t,r){return n({key:t,value:e[t]},{key:r,value:e[r]})}}),c=[];return function e(t,n,a,s){var f=r?"\n"+Array(s+1).join(r):"",l=r?": ":":";if(a&&a.toJSON&&"function"==typeof a.toJSON&&(a=a.toJSON()),void 0!==(a=i.call(t,n,a))){if("object"!=typeof a||null===a)return k.stringify(a);if(L(a)){for(var d=[],h=0;a.length>h;h++){var p=e(a,h,a[h],s+1)||k.stringify(null);d.push(f+r+p)}return"["+d.join(",")+f+"]"}if(-1!==c.indexOf(a)){if(o)return k.stringify("__cycle__");throw new TypeError("Converting circular structure to JSON")}c.push(a);var y=N(a).sort(u&&u(a));for(d=[],h=0;y.length>h;h++){var v=e(a,n=y[h],a[n],s+1);if(v){var g=k.stringify(n)+l+v;d.push(f+r+g)}}return c.splice(c.indexOf(a),1),"{"+d.join(",")+f+"}"}}({"":e},"",e,0)},L=Array.isArray||function(e){return"[object Array]"==={}.toString.call(e)},N=Object.keys||function(e){var t=Object.prototype.hasOwnProperty||function(){return!0},r=[];for(var n in e)t.call(e,n)&&r.push(n);return r},F=o(function(e,t){var r=Object.prototype.hasOwnProperty,n=function(){for(var e=[],t=0;256>t;++t)e.push("%"+((16>t?"0":"")+t.toString(16)).toUpperCase());return e}();t.arrayToObject=function(e,t){for(var r=t&&t.plainObjects?Object.create(null):{},n=0;e.length>n;++n)void 0!==e[n]&&(r[n]=e[n]);return r},t.merge=function(e,n,o){if(!n)return e;if("object"!=typeof n){if(Array.isArray(e))e.push(n);else{if("object"!=typeof e)return[e,n];(o.plainObjects||o.allowPrototypes||!r.call(Object.prototype,n))&&(e[n]=!0)}return e}if("object"!=typeof e)return[e].concat(n);var i=e;return Array.isArray(e)&&!Array.isArray(n)&&(i=t.arrayToObject(e,o)),Array.isArray(e)&&Array.isArray(n)?(n.forEach(function(n,i){r.call(e,i)?e[i]&&"object"==typeof e[i]?e[i]=t.merge(e[i],n,o):e.push(n):e[i]=n}),e):Object.keys(n).reduce(function(e,i){var u=n[i];return e[i]=r.call(e,i)?t.merge(e[i],u,o):u,e},i)},t.assign=function(e,t){return Object.keys(t).reduce(function(e,r){return e[r]=t[r],e},e)},t.decode=function(e){try{return decodeURIComponent(e.replace(/\+/g," "))}catch(t){return e}},t.encode=function(e){if(0===e.length)return e;for(var t="string"==typeof e?e:e+"",r="",o=0;t.length>o;++o){var i=t.charCodeAt(o);45!==i&&46!==i&&95!==i&&126!==i&&(48>i||i>57)&&(65>i||i>90)&&(97>i||i>122)?128>i?r+=n[i]:2048>i?r+=n[192|i>>6]+n[128|63&i]:i>=55296&&57344>i?(i=65536+((1023&i)<<10|1023&t.charCodeAt(o+=1)),r+=n[240|i>>18]+n[128|i>>12&63]+n[128|i>>6&63]+n[128|63&i]):r+=n[224|i>>12]+n[128|i>>6&63]+n[128|63&i]:r+=t.charAt(o)}return r},t.compact=function(e){for(var t=[{obj:{o:e},prop:"o"}],r=[],n=0;t.length>n;++n)for(var o=t[n],i=o.obj[o.prop],u=Object.keys(i),c=0;u.length>c;++c){var a=u[c],s=i[a];"object"==typeof s&&null!==s&&-1===r.indexOf(s)&&(t.push({obj:i,prop:a}),r.push(s))}return function(e){for(var t;e.length;){var r=e.pop();if(Array.isArray(t=r.obj[r.prop])){for(var n=[],o=0;t.length>o;++o)void 0!==t[o]&&n.push(t[o]);r.obj[r.prop]=n}}return t}(t)},t.isRegExp=function(e){return"[object RegExp]"===Object.prototype.toString.call(e)},t.isBuffer=function(e){return null!=e&&!!(e.constructor&&e.constructor.isBuffer&&e.constructor.isBuffer(e))}}),P=String.prototype.replace,U=/%20/g,z={default:"RFC3986",formatters:{RFC1738:function(e){return P.call(e,U,"+")},RFC3986:function(e){return e}},RFC1738:"RFC1738",RFC3986:"RFC3986"},D={brackets:function(e){return e+"[]"},indices:function(e,t){return e+"["+t+"]"},repeat:function(e){return e}},H=Date.prototype.toISOString,B={delimiter:"&",encode:!0,encoder:F.encode,encodeValuesOnly:!1,serializeDate:function(e){return H.call(e)},skipNulls:!1,strictNullHandling:!1},V=function e(t,r,n,o,i,u,c,a,s,f,l,d){var h=t;if("function"==typeof c)h=c(r,h);else if(h instanceof Date)h=f(h);else if(null===h){if(o)return u&&!d?u(r,B.encoder):r;h=""}if("string"==typeof h||"number"==typeof h||"boolean"==typeof h||F.isBuffer(h))return u?[l(d?r:u(r,B.encoder))+"="+l(u(h,B.encoder))]:[l(r)+"="+l(h+"")];var p,y=[];if(void 0===h)return y;if(Array.isArray(c))p=c;else{var v=Object.keys(h);p=a?v.sort(a):v}for(var g=0;p.length>g;++g){var b=p[g];i&&null===h[b]||(y=y.concat(e(h[b],Array.isArray(h)?n(r,b):r+(s?"."+b:"["+b+"]"),n,o,i,u,c,a,s,f,l,d)))}return y},M=function(e,t){var r=e,n=t?F.assign({},t):{};if(null!=n.encoder&&"function"!=typeof n.encoder)throw new TypeError("Encoder has to be a function.");var o=void 0===n.delimiter?B.delimiter:n.delimiter,i="boolean"==typeof n.strictNullHandling?n.strictNullHandling:B.strictNullHandling,u="boolean"==typeof n.skipNulls?n.skipNulls:B.skipNulls,c="boolean"==typeof n.encode?n.encode:B.encode,a="function"==typeof n.encoder?n.encoder:B.encoder,s="function"==typeof n.sort?n.sort:null,f=void 0!==n.allowDots&&n.allowDots,l="function"==typeof n.serializeDate?n.serializeDate:B.serializeDate,d="boolean"==typeof n.encodeValuesOnly?n.encodeValuesOnly:B.encodeValuesOnly;if(void 0===n.format)n.format=z.default;else if(!Object.prototype.hasOwnProperty.call(z.formatters,n.format))throw new TypeError("Unknown format option provided.");var h,p,y=z.formatters[n.format];"function"==typeof n.filter?r=(p=n.filter)("",r):Array.isArray(n.filter)&&(h=p=n.filter);var v=[];if("object"!=typeof r||null===r)return"";var g=D[n.arrayFormat in D?n.arrayFormat:"indices"in n?n.indices?"indices":"repeat":"indices"];h||(h=Object.keys(r)),s&&h.sort(s);for(var b=0;h.length>b;++b){var m=h[b];u&&null===r[m]||(v=v.concat(V(r[m],m,g,i,u,c?a:null,p,s,f,l,y,d)))}var A=v.join(o);return A.length>0?(!0===n.addQueryPrefix?"?":"")+A:""},G=function(e){var t,r=(t=e)&&Object.keys(t)?M(t):"";return r?"?"+r:""},J=function(e){return e&&e.restEasy?e.restEasy:(console.error('\n There doesn\'t seem to be a "restEasy" key in your state.\n\n For more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/reducer.md#reducer\n '),null)},Q=function(e,t){return new Date-new Date(e)>1e3*t},K=function(e){for(var t=arguments.length,r=Array(t>1?t-1:0),n=1;t>n;n++)r[n-1]=arguments[n];if(e&&"function"==typeof e)return e.apply(void 0,r)},Y=window,$={getToken:function(){return"token"},requestGET:function(){return{method:"GET",headers:l({Accept:"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{})}},requestPATCH:function(e){return{method:"PATCH",headers:l({Accept:"application/json","Content-Type":"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{}),body:JSON.stringify(e)}},requestPUT:function(e){return{method:"PUT",headers:l({Accept:"application/json","Content-Type":"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{}),body:JSON.stringify(e)}},requestPOST:function(e){return{method:"POST",headers:l({Accept:"application/json","Content-Type":"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{}),body:JSON.stringify(e)}},requestDELETE:function(){return{method:"DELETE",headers:l({Accept:"application/json"},this.getToken&&this.getToken()?{Authorization:"Bearer "+this.getToken()}:{})}},handleStatusCode:function(e){if(e){if(e.status>=200&&300>e.status)return e;var t=Error(e.statusText);throw t.response=e,t}return null},handleError:(q=s(regeneratorRuntime.mark(function e(t,r){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(e.prev=0,!t||!t.response){e.next=8;break}return e.next=4,t.response.json();case 4:console.error(e.sent),e.next=9;break;case 8:console.error(t);case 9:e.next=14;break;case 11:e.prev=11,e.t0=e.catch(0),console.error(e.t0);case 14:case"end":return e.stop()}},e,Y,[[0,11]])})),function(e,t){return q.apply(this,arguments)})},W=$,X=function(){return W},Z=window,ee=function(e,t,r,n,o,i,u){return function(e,c,a){return function(){var f,d=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},h=d.query,p=void 0===h?{}:h,y=d.body,v=void 0===y?{}:y,g=d.urlParams,b=void 0===g?{}:g,m=d.onSuccess,A=d.onError,_=function(e,t){var r={};for(var n in e)0>t.indexOf(n)&&Object.prototype.hasOwnProperty.call(e,n)&&(r[n]=e[n]);return r}(d,["query","body","urlParams","onSuccess","onError"]);return f=s(regeneratorRuntime.mark(function s(f,d){var h,y,g,E,j,O,C;return regeneratorRuntime.wrap(function(s){for(;;)switch(s.prev=s.next){case 0:return h=l({},X(),u||{}),f(t.REQUEST(c,a)),s.prev=2,s.next=5,K(n,b,p,v,_,f);case 5:return y=s.sent||v,s.next=9,fetch(e,h["request"+r](y));case 9:if(h.handleStatusCode(g=s.sent),204===g.status){s.next=17;break}return s.next=14,g.json();case 14:s.t0=s.sent,s.next=18;break;case 17:s.t0={};case 18:return E=s.t0,j=o?o(E,J(d()).resources,b,p,y,_):{entities:E},f(t.RECEIVE(c,a,O=j.entities,Array.isArray(C=j.result)?C:[C])),s.next=24,K(i,O||{},b,p,y,_,f);case 24:return K(m,O||{},_),s.abrupt("return",{normalizedPayload:O||{},otherArgs:_});case 28:return s.prev=28,s.t1=s.catch(2),f(t.FAIL(c,a)),h.handleError(s.t1,f),K(A,s.t1),s.abrupt("return",{error:s.t1});case 34:case"end":return s.stop()}},s,Z,[[2,28]])})),function(e,t){return f.apply(this,arguments)}}}},te=function(e,t,r,n){var o=r[n],i=o.method,u=o.url,c=o.beforeHook,a=o.normalizer,s=o.afterHook,f=o.networkHelpers,l=b(e,n),d=ee(0,l,i,c,a,s,f);return function(r){return function(o,c){var a=J(c()),s=r||{},f=s.urlParams,h=s.query,p=function(e){var t=("string"!=typeof e?e():e).split("/").reverse(),r=t.findIndex(function(e){return e.startsWith("::")});return-1!==r?t.length-1-r:-1}(u),y=function(e,t,r){var n="string"!=typeof e?e():e;t&&Object.keys(t).forEach(function(e){n=n.replace("::"+e,t[e]).replace(":"+e,t[e])});var o=r?G(JSON.parse(T(r))):"";return""+n+o}(u,f,h),v=function(e,t){return(e||"")+":"+(t||"")}(n,y),g=function(e,t){if(!e||!t&&0!==t||-1===t)return null;for(var r=0,n=0;t>n;n+=1)r=e.indexOf("/",r+1);var o=e.indexOf("/",r+1);return e.substr(r+1,-1!==o?o-r-1:e.length)}(v,p),b=void 0;(function(e,t){return!(e&&t&&e.requests&&e.requests[t]&&!e.requests[t].endedAt)})(a,v)&&function(e,t,r,n){if(!("GET"===t&&e&&r&&e.requests&&e.requests[r]))return!0;var o=e.requests[r];return!o.hasSucceeded||o.didInvalidate||Q(o.endedAt,n)}(a,i,v,t)&&(b=function(e,t,r,n,o){return!!("GET"===t&&e&&e.requests&&r&&null!==n)&&Object.values(e.requests).some(function(e){var t=e.endedAt,i=e.payloadIds;return e.hasSucceeded&&!e.didInvalidate&&(r===e.resourceName&&n===e.resourceId||i&&i[r]&&i[r].includes(n))&&!Q(t,o)})}(a,i,e,g,t)?function(){var t,r;return o(l.RECEIVE_FROM_CACHE(v,g,((r={})[e]=((t={})[g]=null,t),r),[g]))}:function(){return o(d(y,v,g)(r))});var m=b?b():{};return m.__actionName=n,m.__requestURL=v,m}}},re=function(e,t,r,n){var o,i=function(e){return{INVALIDATE_REQUEST:y(e,"@invalidate","INVALIDATE_REQUEST")}}(e).INVALIDATE_REQUEST;return(o={})[n]={perform:te(e,t,r,n),invalidate:function(e,t){return function(r){return{type:e,url:r,resourceName:t}}}(i,e)},o},ne="[object Object]";var oe,ie,ue=Object.prototype,ce=Function.prototype.toString,ae=ue.hasOwnProperty,se=ce.call(Object),fe=ue.toString,le=(oe=Object.getPrototypeOf,ie=Object,function(e){return oe(ie(e))});var de,he=function(e){if(!function(e){return!!e&&"object"==typeof e}(e)||fe.call(e)!=ne||function(e){var t=!1;if(null!=e&&"function"!=typeof e.toString)try{t=!!(e+"")}catch(e){}return t}(e))return!1;var t=le(e);if(null===t)return!0;var r=ae.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&ce.call(r)==se},pe=function(e){return function(t){throw Error("redux-rest-easy: "+e+" "+t)}},ye=function(e){return"string"==typeof e},ve=function(e){return"function"==typeof e},ge=function(e){return void 0!==e},be=["method","url"],me=[].concat(be,["beforeHook","normalizer","afterHook","networkHelpers"]),Ae=["GET","POST","PATCH","PUT","DELETE"],_e=function(e){return e+" >"},Ee=function(e,t){return e+' "'+t+'" is invalid. Expected a valid function.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig'},je=function(e,t){if(t){if(!he(t)||!Object.keys(t).length)pe(_e(e)+" createResource >")("You have to provide a valid actions configuration.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource.md#createresourceresourcename-optionsactions");Object.keys(t).forEach(function(r){var n=pe(_e(e)+" "+function(e){return e+" >"}(r)+" createResource >"),o=t[r],i=Object.keys(o);be.forEach(function(e){i.includes(e)||n('Key "'+e+'" is missing.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig')}),i.forEach(function(e){me.includes(e)||n(function(e){return'Unknown key "'+e+".\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig"}(e))});var u=o.method,c=o.url,a=o.beforeHook,s=o.normalizer,f=o.afterHook,l=o.networkHelpers;ye(u)&&Ae.includes(u)||n(function(e){return'Method "'+e+'" is invalid. Expected one of: '+Ae.join(", ")+".\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig"}(u)),c&&(ye(c)||ve(c))||n(function(e){return'URL "'+e+'" is invalid. Expected a string or a function returning a string.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig'}(c)),ge(a)&&!ve(a)&&n(Ee("beforeHook",a)),ge(s)&&!ve(s)&&n(Ee("normalizer",s)),ge(f)&&!ve(f)&&n(Ee("afterHook",f)),ge(l)&&!he(l)&&n("networkHelpers"+' "'+l+'" is invalid. Expected a valid object.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig'),Object.keys(l||{}).forEach(function(e){ge(l[e])&&!ve(l[e])&&n(e+' "networkHelpers.'+l[e]+'" is invalid. Expected a valid function.\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/actionsConfig.md#actionsconfig')})})}},Oe=function(e){return void 0!==e},Ce=["cacheLifetime","denormalizer"],we=function(e,t){var r,n=(r=function(e){return e+" >"}(e||"[no resource name]")+" createResource >",function(e){throw Error("redux-rest-easy: "+r+" "+e)});if(e&&"string"==typeof e||n("You have to provide a valid resource name."),t){he(t)&&Object.keys(t).length||n("You have to provide a valid resource configuration (or not at all)."),Object.keys(t).forEach(function(e){Ce.includes(e)||n(function(e){return'Unknown key "'+e+'" in resource config.'}(e))});var o=t.cacheLifetime,i=t.denormalizer;!Oe(o)||function(e){return"number"==typeof e}(o)&&o>=0||n(function(e){return'cacheLifetime "'+e+'" in resource config is invalid. Expected a number between 0 and Infinity.'}(o)),Oe(i)&&!function(e){return"function"==typeof e}(i)&&n(function(e,t){return e+' "'+t+'" in resource config is invalid. Expected a valid function.'}("denormalizer",i))}},Ie=o(function(e,t){function r(e,t){return e===t}function n(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:r,n=null,o=null;return function(){return function(e,t,r){if(null===t||null===r||t.length!==r.length)return!1;for(var n=t.length,o=0;n>o;o++)if(!e(t[o],r[o]))return!1;return!0}(t,n,arguments)||(o=e.apply(null,arguments)),n=arguments,o}}function o(e){for(var t=arguments.length,r=Array(t>1?t-1:0),o=1;t>o;o++)r[o-1]=arguments[o];return function(){for(var t=arguments.length,o=Array(t),i=0;t>i;i++)o[i]=arguments[i];var u=0,c=o.pop(),a=function(e){var t=Array.isArray(e[0])?e[0]:e;if(!t.every(function(e){return"function"==typeof e})){var r=t.map(function(e){return typeof e}).join(", ");throw Error("Selector creators expect all input-selectors to be functions, instead received the following types: ["+r+"]")}return t}(o),s=e.apply(void 0,[function(){return u++,c.apply(null,arguments)}].concat(r)),f=n(function(){for(var e=[],t=a.length,r=0;t>r;r++)e.push(a[r].apply(null,arguments));return s.apply(null,e)});return f.resultFunc=c,f.recomputations=function(){return u},f.resetRecomputations=function(){return u=0},f}}t.__esModule=!0,t.defaultMemoize=n,t.createSelectorCreator=o,t.createStructuredSelector=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:i;if("object"!=typeof e)throw Error("createStructuredSelector expects first argument to be an object where each property is a selector, instead received a "+typeof e);var r=Object.keys(e);return t(r.map(function(t){return e[t]}),function(){for(var e=arguments.length,t=Array(e),n=0;e>n;n++)t[n]=arguments[n];return t.reduce(function(e,t,n){return e[r[n]]=t,e},{})})};var i=t.createSelector=o(n)});(de=Ie)&&de.__esModule&&Object.prototype.hasOwnProperty.call(de,"default");var Se=Ie.createSelectorCreator,Re=Ie.createSelector,xe=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},qe=function(){function e(){xe(this,e),this._cache={}}return e.prototype.set=function(e,t){this._cache[e]=t},e.prototype.get=function(e){return this._cache[e]},e.prototype.remove=function(e){delete this._cache[e]},e.prototype.clear=function(){this._cache={}},e}();function ke(){for(var e=arguments.length,t=Array(e),r=0;e>r;r++)t[r]=arguments[r];var n=qe;return function(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=void 0,i=void 0;"function"==typeof r?(console.warn('[re-reselect] Deprecation warning: "selectorCreator" argument is discouraged and will be removed in the upcoming major release. Please use "options.selectorCreator" instead.'),o=new n,i=r):(o=r.cacheObject||new n,i=r.selectorCreator||Re);var u=function(){var r=e.apply(void 0,arguments);if("string"==typeof r||"number"==typeof r){var n=o.get(r);return void 0===n&&(n=i.apply(void 0,t),o.set(r,n)),n.apply(void 0,arguments)}};return u.getMatchingSelector=function(){var t=e.apply(void 0,arguments);return o.get(t)},u.removeMatchingSelector=function(){var t=e.apply(void 0,arguments);o.remove(t)},u.clearCache=function(){o.clear()},u.resultFunc=t[t.length-1],u}}var Te=function(e){return e.split(":")[0]},Le=function(e,t,r){return r?r.__requestURLsByActionKey?r.__requestURLsByActionKey[t]:(console.error("You may have forgotten to use redux-rest-easy's connect on a Component which requested "+e+"."+t+"\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/connect.md#connectconnectargs"),""):(console.error("You may have forgotten to pass ownProps to a selector related to "+e+"."+t+"\n\nFor more information, browse the related documentation: https://github.com/Brigad/redux-rest-easy/blob/master/docs/api/createResource/selectors.md#actionrequest"),"")},Ne={selectorCreator:Se(function(e){var t=null;return function(){return t||(t=e.apply(void 0,arguments)),t}})},Fe=function(){return Ne},Pe=function(e,t,r){return t?Object.keys(t).reduce(function(n,o){var i;return l({},n,((i={})[o]=o===e?r:Object.keys(t[o]||{}),i))},{}):{}},Ue=o(function(e,t){!function(r,n){var o={version:"2.1.2",x86:{},x64:{}};function i(e,t){return(65535&e)*t+(((e>>>16)*t&65535)<<16)}function u(e,t){return e<<t|e>>>32-t}function c(e){return e=i(e^=e>>>16,2246822507),e=i(e^=e>>>13,3266489909),e^=e>>>16}function a(e,t){var r=[0,0,0,0];return r[3]+=(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3]+(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function s(e,t){var r=[0,0,0,0];return r[3]+=(e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]])[3]*(t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]])[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function f(e,t){return 32===(t%=64)?[e[1],e[0]]:32>t?[e[0]<<t|e[1]>>>32-t,e[1]<<t|e[0]>>>32-t]:[e[1]<<(t-=32)|e[0]>>>32-t,e[0]<<t|e[1]>>>32-t]}function l(e,t){return 0===(t%=64)?e:32>t?[e[0]<<t|e[1]>>>32-t,e[1]<<t]:[e[1]<<t-32,0]}function d(e,t){return[e[0]^t[0],e[1]^t[1]]}function h(e){return e=d(e=s(e=d(e=s(e=d(e,[0,e[0]>>>1]),[4283543511,3981806797]),[0,e[0]>>>1]),[3301882366,444984403]),[0,e[0]>>>1])}o.x86.hash32=function(e,t){for(var r=(e=e||"").length%4,n=e.length-r,o=t=t||0,a=0,s=3432918353,f=461845907,l=0;n>l;l+=4)o=i(o=u(o^=a=i(a=u(a=i(a=255&e.charCodeAt(l)|(255&e.charCodeAt(l+1))<<8|(255&e.charCodeAt(l+2))<<16|(255&e.charCodeAt(l+3))<<24,s),15),f),13),5)+3864292196;switch(a=0,r){case 3:a^=(255&e.charCodeAt(l+2))<<16;case 2:a^=(255&e.charCodeAt(l+1))<<8;case 1:o^=a=i(a=u(a=i(a^=255&e.charCodeAt(l),s),15),f)}return(o=c(o^=e.length))>>>0},o.x86.hash128=function(e,t){for(var r=(e=e||"").length%16,n=e.length-r,o=t=t||0,a=t,s=t,f=t,l=0,d=0,h=0,p=0,y=597399067,v=2869860233,g=951274213,b=2716044179,m=0;n>m;m+=16)l=255&e.charCodeAt(m)|(255&e.charCodeAt(m+1))<<8|(255&e.charCodeAt(m+2))<<16|(255&e.charCodeAt(m+3))<<24,d=255&e.charCodeAt(m+4)|(255&e.charCodeAt(m+5))<<8|(255&e.charCodeAt(m+6))<<16|(255&e.charCodeAt(m+7))<<24,h=255&e.charCodeAt(m+8)|(255&e.charCodeAt(m+9))<<8|(255&e.charCodeAt(m+10))<<16|(255&e.charCodeAt(m+11))<<24,p=255&e.charCodeAt(m+12)|(255&e.charCodeAt(m+13))<<8|(255&e.charCodeAt(m+14))<<16|(255&e.charCodeAt(m+15))<<24,o=u(o^=l=i(l=u(l=i(l,y),15),v),19),o=i(o+=a,5)+1444728091,a=u(a^=d=i(d=u(d=i(d,v),16),g),17),a=i(a+=s,5)+197830471,s=u(s^=h=i(h=u(h=i(h,g),17),b),15),s=i(s+=f,5)+2530024501,f=u(f^=p=i(p=u(p=i(p,b),18),y),13),f=i(f+=o,5)+850148119;switch(l=0,d=0,h=0,p=0,r){case 15:p^=e.charCodeAt(m+14)<<16;case 14:p^=e.charCodeAt(m+13)<<8;case 13:f^=p=i(p=u(p=i(p^=e.charCodeAt(m+12),b),18),y);case 12:h^=e.charCodeAt(m+11)<<24;case 11:h^=e.charCodeAt(m+10)<<16;case 10:h^=e.charCodeAt(m+9)<<8;case 9:s^=h=i(h=u(h=i(h^=e.charCodeAt(m+8),g),17),b);case 8:d^=e.charCodeAt(m+7)<<24;case 7:d^=e.charCodeAt(m+6)<<16;case 6:d^=e.charCodeAt(m+5)<<8;case 5:a^=d=i(d=u(d=i(d^=e.charCodeAt(m+4),v),16),g);case 4:l^=e.charCodeAt(m+3)<<24;case 3:l^=e.charCodeAt(m+2)<<16;case 2:l^=e.charCodeAt(m+1)<<8;case 1:o^=l=i(l=u(l=i(l^=e.charCodeAt(m),y),15),v)}return o^=e.length,o+=a^=e.length,o+=s^=e.length,a+=o+=f^=e.length,s+=o,f+=o,o=c(o),o+=a=c(a),o+=s=c(s),a+=o+=f=c(f),s+=o,f+=o,("00000000"+(o>>>0).toString(16)).slice(-8)+("00000000"+(a>>>0).toString(16)).slice(-8)+("00000000"+(s>>>0).toString(16)).slice(-8)+("00000000"+(f>>>0).toString(16)).slice(-8)},o.x64.hash128=function(e,t){for(var r=(e=e||"").length%16,n=e.length-r,o=[0,t=t||0],i=[0,t],u=[0,0],c=[0,0],p=[2277735313,289559509],y=[1291169091,658871167],v=0;n>v;v+=16)u=[255&e.charCodeAt(v+4)|(255&e.charCodeAt(v+5))<<8|(255&e.charCodeAt(v+6))<<16|(255&e.charCodeAt(v+7))<<24,255&e.charCodeAt(v)|(255&e.charCodeAt(v+1))<<8|(255&e.charCodeAt(v+2))<<16|(255&e.charCodeAt(v+3))<<24],c=[255&e.charCodeAt(v+12)|(255&e.charCodeAt(v+13))<<8|(255&e.charCodeAt(v+14))<<16|(255&e.charCodeAt(v+15))<<24,255&e.charCodeAt(v+8)|(255&e.charCodeAt(v+9))<<8|(255&e.charCodeAt(v+10))<<16|(255&e.charCodeAt(v+11))<<24],o=a(s(o=a(o=f(o=d(o,u=s(u=f(u=s(u,p),31),y)),27),i),[0,5]),[0,1390208809]),i=a(s(i=a(i=f(i=d(i,c=s(c=f(c=s(c,y),33),p)),31),o),[0,5]),[0,944331445]);switch(u=[0,0],c=[0,0],r){case 15:c=d(c,l([0,e.charCodeAt(v+14)],48));case 14:c=d(c,l([0,e.charCodeAt(v+13)],40));case 13:c=d(c,l([0,e.charCodeAt(v+12)],32));case 12:c=d(c,l([0,e.charCodeAt(v+11)],24));case 11:c=d(c,l([0,e.charCodeAt(v+10)],16));case 10:c=d(c,l([0,e.charCodeAt(v+9)],8));case 9:i=d(i,c=s(c=f(c=s(c=d(c,[0,e.charCodeAt(v+8)]),y),33),p));case 8:u=d(u,l([0,e.charCodeAt(v+7)],56));case 7:u=d(u,l([0,e.charCodeAt(v+6)],48));case 6:u=d(u,l([0,e.charCodeAt(v+5)],40));case 5:u=d(u,l([0,e.charCodeAt(v+4)],32));case 4:u=d(u,l([0,e.charCodeAt(v+3)],24));case 3:u=d(u,l([0,e.charCodeAt(v+2)],16));case 2:u=d(u,l([0,e.charCodeAt(v+1)],8));case 1:o=d(o,u=s(u=f(u=s(u=d(u,[0,e.charCodeAt(v)]),p),31),y))}return o=d(o,[0,e.length]),i=a(i=d(i,[0,e.length]),o=a(o,i)),o=h(o),i=a(i=h(i),o=a(o,i)),("00000000"+(o[0]>>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)+("00000000"+(i[0]>>>0).toString(16)).slice(-8)+("00000000"+(i[1]>>>0).toString(16)).slice(-8)},e.exports&&(t=e.exports=o),t.murmurHash3=o}()}),ze=Ue,De=o(function(e){e.exports={v3:ze},function(){throw Error("Dynamic requires are not currently supported by rollup-plugin-commonjs")}.main===e&&console.log(e.exports.v3)}).v3,He=function(e){return De.x64.hash128(T(e||null))},Be=He([]),Ve=function(e,t,r,n,o){var i,u,c=e.requests,a=void 0===c?{}:c,s=e.resources,f=void 0===s?{}:s,d=e.resolversHashes,h=void 0===d?{}:d,p=Pe(t,n,o);return l({},h,{requests:l({},h.requests||{},(i={},i[r]=Object.keys(p).reduce(function(e,t){var n;return l({},e,((n={})[t]=a[r]&&a[r].payloadIds&&a[r].payloadIds[t]?He(a[r].payloadIds[t]):Be,n))},{}),i)),resources:l({},h.resources||{},(u={_getResourcesHash:function(){return He(f)}},u[t]=f[t]?He(f[t]):Be,u))})},Me=function(){return Be},Ge=function(e,t,r){return e&&e.requests&&e.requests[t]&&e.requests[t][r]?e.requests[t][r]:Be},Je=function(e,t){return e&&e.resources&&e.resources[t]?e.resources[t]:Be},Qe=[],Ke=function(e,t){return("number"==typeof e?""+e:e)===("number"==typeof t?""+t:t)},Ye=function(e,t,r){var n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:-1;return!!e.requests&&Object.entries(e.requests).some(function(e){var o=e[1],i=o.resourceName,u=o.resourceId,c=o.endedAt;return Te(e[0])===r&&i===t&&(-1===n||null!==u&&Ke(u,n))&&!c})},$e=function(e,t,r,n){var o=arguments.length>4&&void 0!==arguments[4]?arguments[4]:-1,i=e.requests&&Object.entries(e.requests).filter(function(e){var n=e[1],i=n.resourceName,u=n.resourceId,c=n.endedAt,a=n.payloadIds;return Te(e[0])===r&&i===t&&(-1===o||null!==u&&Ke(u,o)||!!c&&a&&a[t]&&a[t].includes(o))}).map(function(e){return e[1]});return!(!i||!i.length)&&i.reduce(function(e,t){return t.endedAt&&e.endedAt&&t.endedAt>e.endedAt?t:e},i[0])[n]},We=function(e,t){return e.resources&&e.resources[t]?e.resources[t]:null},Xe=function(e,t,r){return e.requests&&e.requests[r]&&e.requests[r].payloadIds&&e.requests[r].payloadIds[t]?e.requests[r].payloadIds[t]:null},Ze=ke(function(e){return e.resources},We,Xe,function(e,t,r,n){return n},function(e,t,r,n,o){return o},function(e,t,r,n,o){return t&&r?n&&o?o(r,e):r.reduce(function(e,r){return[].concat(e,[t[r]])},[]):Qe})(function(e,t,r,n,o){var i=We(e,t),u=Xe(e,t,r),c=function(e){return e.resolversHashes}(e);return i&&u?n&&o?n+"-"+Object.keys(e.requests[r].payloadIds).map(function(e){return Ge(c,r,e)+"-"+Je(c,e)}).join("--"):n+"-"+Ge(c,r,t)+"-"+Je(c,t):Me()},Fe()),et=function(e,t){return!(!e.requests||!e.requests[t]||e.requests[t].endedAt)},tt=function(e,t,r){return!!(e.requests&&e.requests[t]&&e.requests[t][r])},rt=[],nt=function(e,t){return e.resources&&e.resources[t]?e.resources[t]:null},ot=ke(function(e){return e.resources},nt,function(e,t,r){return r},function(e,t,r,n){return n},function(e,t,r,n){return t?r&&n?n(Object.keys(t),e):Object.values(t):rt})(function(e,t,r,n){var o=nt(e,t),i=function(e){return e.resolversHashes}(e);return o?r&&n?r+"-"+function(e){return e&&e.resources&&e.resources._getResourcesHash?e.resources._getResourcesHash():Be}(i):r+"-"+Je(i,t):Me()},Fe()),it=function(e){var t=e.split("/");return{resourceName:t[1],actionName:t[2],caseName:t[3]}},ut=o(function(e,t){var r=200,o="__lodash_hash_undefined__",i=800,u=16,c=9007199254740991,a="[object Arguments]",s="[object AsyncFunction]",f="[object Function]",l="[object GeneratorFunction]",d="[object Null]",h="[object Object]",p="[object Proxy]",y="[object Undefined]",v=/^\[object .+?Constructor\]$/,g=/^(?:0|[1-9]\d*)$/,b={};b["[object Float32Array]"]=b["[object Float64Array]"]=b["[object Int8Array]"]=b["[object Int16Array]"]=b["[object Int32Array]"]=b["[object Uint8Array]"]=b["[object Uint8ClampedArray]"]=b["[object Uint16Array]"]=b["[object Uint32Array]"]=!0,b[a]=b["[object Array]"]=b["[object ArrayBuffer]"]=b["[object Boolean]"]=b["[object DataView]"]=b["[object Date]"]=b["[object Error]"]=b[f]=b["[object Map]"]=b["[object Number]"]=b[h]=b["[object RegExp]"]=b["[object Set]"]=b["[object String]"]=b["[object WeakMap]"]=!1;var m="object"==typeof n&&n&&n.Object===Object&&n,A="object"==typeof self&&self&&self.Object===Object&&self,_=m||A||Function("return this")(),E=t&&!t.nodeType&&t,j=E&&e&&!e.nodeType&&e,O=j&&j.exports===E,C=O&&m.process,w=function(){try{return C&&C.binding&&C.binding("util")}catch(e){}}(),I=w&&w.isTypedArray;function S(e,t){return"__proto__"==t?void 0:e[t]}var R,x,q,k=Array.prototype,T=Object.prototype,L=_["__core-js_shared__"],N=Function.prototype.toString,F=T.hasOwnProperty,P=(R=/[^.]+$/.exec(L&&L.keys&&L.keys.IE_PROTO||""))?"Symbol(src)_1."+R:"",U=T.toString,z=N.call(Object),D=RegExp("^"+N.call(F).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),H=O?_.Buffer:void 0,B=_.Symbol,V=_.Uint8Array,M=H?H.allocUnsafe:void 0,G=(x=Object.getPrototypeOf,q=Object,function(e){return x(q(e))}),J=Object.create,Q=T.propertyIsEnumerable,K=k.splice,Y=B?B.toStringTag:void 0,$=function(){try{var e=_e(Object,"defineProperty");return e({},"",{}),e}catch(e){}}(),W=H?H.isBuffer:void 0,X=Math.max,Z=Date.now,ee=_e(_,"Map"),te=_e(Object,"create"),re=function(){function e(){}return function(t){if(!ke(t))return{};if(J)return J(t);e.prototype=t;var r=new e;return e.prototype=void 0,r}}();function ne(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function oe(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ie(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t<r;){var n=e[t];this.set(n[0],n[1])}}function ue(e){var t=this.__data__=new oe(e);this.size=t.size}function ce(e,t){var r=Ie(e),n=!r&&we(e),o=!r&&!n&&Re(e),i=!r&&!n&&!o&&Le(e),u=r||n||o||i,c=u?function(e,t){for(var r=-1,n=Array(e);++r<e;)n[r]=t(r);return n}(e.length,String):[],a=c.length;for(var s in e)!t&&!F.call(e,s)||u&&("length"==s||o&&("offset"==s||"parent"==s)||i&&("buffer"==s||"byteLength"==s||"byteOffset"==s)||Ee(s,a))||c.push(s);return c}function ae(e,t,r){(void 0===r||Ce(e[t],r))&&(void 0!==r||t in e)||le(e,t,r)}function se(e,t,r){var n=e[t];F.call(e,t)&&Ce(n,r)&&(void 0!==r||t in e)||le(e,t,r)}function fe(e,t){for(var r=e.length;r--;)if(Ce(e[r][0],t))return r;return-1}function le(e,t,r){"__proto__"==t&&$?$(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}ne.prototype.clear=function(){this.__data__=te?te(null):{},this.size=0},ne.prototype.delete=function(e){var t=this.has(e)&&delete this.__data__[e];return this.size-=t?1:0,t},ne.prototype.get=function(e){var t=this.__data__;if(te){var r=t[e];return r===o?void 0:r}return F.call(t,e)?t[e]:void 0},ne.prototype.has=function(e){var t=this.__data__;return te?void 0!==t[e]:F.call(t,e)},ne.prototype.set=function(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=te&&void 0===t?o:t,this},oe.prototype.clear=function(){this.__data__=[],this.size=0},oe.prototype.delete=function(e){var t=this.__data__,r=fe(t,e);return r>=0&&(r==t.length-1?t.pop():K.call(t,r,1),--this.size,!0)},oe.prototype.get=function(e){var t=this.__data__,r=fe(t,e);return 0>r?void 0:t[r][1]},oe.prototype.has=function(e){return fe(this.__data__,e)>-1},oe.prototype.set=function(e,t){var r=this.__data__,n=fe(r,e);return 0>n?(++this.size,r.push([e,t])):r[n][1]=t,this},ie.prototype.clear=function(){this.size=0,this.__data__={hash:new ne,map:new(ee||oe),string:new ne}},ie.prototype.delete=function(e){var t=Ae(this,e).delete(e);return this.size-=t?1:0,t},ie.prototype.get=function(e){return Ae(this,e).get(e)},ie.prototype.has=function(e){return Ae(this,e).has(e)},ie.prototype.set=function(e,t){var r=Ae(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this},ue.prototype.clear=function(){this.__data__=new oe,this.size=0},ue.prototype.delete=function(e){var t=this.__data__,r=t.delete(e);return this.size=t.size,r},ue.prototype.get=function(e){return this.__data__.get(e)},ue.prototype.has=function(e){return this.__data__.has(e)},ue.prototype.set=function(e,t){var n=this.__data__;if(n instanceof oe){var o=n.__data__;if(!ee||r-1>o.length)return o.push([e,t]),this.size=++n.size,this;n=this.__data__=new ie(o)}return n.set(e,t),this.size=n.size,this};var de,he=function(e,t,r){for(var n=-1,o=Object(e),i=r(e),u=i.length;u--;){var c=i[de?u:++n];if(!1===t(o[c],c,o))break}return e};function pe(e){return null==e?void 0===e?y:d:Y&&Y in Object(e)?function(e){var t=F.call(e,Y),r=e[Y];try{e[Y]=void 0;var n=!0}catch(e){}var o=U.call(e);n&&(t?e[Y]=r:delete e[Y]);return o}(e):function(e){return U.call(e)}(e)}function ye(e){return Te(e)&&pe(e)==a}function ve(e){return!(!ke(e)||P&&P in e)&&(xe(e)?D:v).test(function(e){if(null!=e){try{return N.call(e)}catch(e){}try{return e+""}catch(e){}}return""}(e))}function ge(e){if(!ke(e))return function(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}(e);var t=je(e),r=[];for(var n in e)("constructor"!=n||!t&&F.call(e,n))&&r.push(n);return r}function be(e,t,r,n,o){e!==t&&he(t,function(i,u){if(ke(i))o||(o=new ue),function(e,t,r,n,o,i,u){var c=S(e,r),a=S(t,r),s=u.get(a);if(s)return void ae(e,r,s);var f=i?i(c,a,r+"",e,t,u):void 0,l=void 0===f;if(l){var d=Ie(a),p=!d&&Re(a),y=!d&&!p&&Le(a);f=a,d||p||y?Ie(c)?f=c:Te(A=c)&&Se(A)?f=function(e,t){var r=-1,n=e.length;t||(t=Array(n));for(;++r<n;)t[r]=e[r];return t}(c):p?(l=!1,f=function(e,t){if(t)return e.slice();var r=e.length,n=M?M(r):new e.constructor(r);return e.copy(n),n}(a,!0)):y?(l=!1,v=a,g=!0?(new V(m=new(b=v.buffer).constructor(b.byteLength)).set(new V(b)),m):v.buffer,f=new v.constructor(g,v.byteOffset,v.length)):f=[]:function(e){if(!Te(e)||pe(e)!=h)return!1;var t=G(e);if(null===t)return!0;var r=F.call(t,"constructor")&&t.constructor;return"function"==typeof r&&r instanceof r&&N.call(r)==z}(a)||we(a)?(f=c,we(c)?f=function(e){return function(e,t,r,n){var o=!r;r||(r={});var i=-1,u=t.length;for(;++i<u;){var c=t[i],a=n?n(r[c],e[c],c,r,e):void 0;void 0===a&&(a=e[c]),o?le(r,c,a):se(r,c,a)}return r}(e,Ne(e))}(c):(!ke(c)||n&&xe(c))&&(f=function(e){return"function"!=typeof e.constructor||je(e)?{}:re(G(e))}(a))):l=!1}var v,g,b,m;var A;l&&(u.set(a,f),o(f,a,n,i,u),u.delete(a));ae(e,r,f)}(e,t,u,r,be,n,o);else{var c=n?n(S(e,u),i,u+"",e,t,o):void 0;void 0===c&&(c=i),ae(e,u,c)}},Ne)}function me(e,t){return Oe(function(e,t,r){return t=X(void 0===t?e.length-1:t,0),function(){for(var n=arguments,o=-1,i=X(n.length-t,0),u=Array(i);++o<i;)u[o]=n[t+o];o=-1;for(var c=Array(t+1);++o<t;)c[o]=n[o];return c[t]=r(u),function(e,t,r){switch(r.length){case 0:return e.call(t);case 1:return e.call(t,r[0]);case 2:return e.call(t,r[0],r[1]);case 3:return e.call(t,r[0],r[1],r[2])}return e.apply(t,r)}(e,this,c)}}(e,t,Ue),e+"")}function Ae(e,t){var r,n,o=e.__data__;return("string"==(n=typeof(r=t))||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==r:null===r)?o["string"==typeof t?"string":"hash"]:o.map}function _e(e,t){var r=function(e,t){return null==e?void 0:e[t]}(e,t);return ve(r)?r:void 0}function Ee(e,t){var r=typeof e;return!!(t=null==t?c:t)&&("number"==r||"symbol"!=r&&g.test(e))&&e>-1&&e%1==0&&t>e}function je(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||T)}var Oe=function(e){var t=0,r=0;return function(){var n=Z(),o=u-(n-r);if(r=n,o>0){if(++t>=i)return arguments[0]}else t=0;return e.apply(void 0,arguments)}}($?function(e,t){return $(e,"toString",{configurable:!0,enumerable:!1,value:(r=t,function(){return r}),writable:!0});var r}:Ue);function Ce(e,t){return e===t||e!=e&&t!=t}var we=ye(function(){return arguments}())?ye:function(e){return Te(e)&&F.call(e,"callee")&&!Q.call(e,"callee")},Ie=Array.isArray;function Se(e){return null!=e&&qe(e.length)&&!xe(e)}var Re=W||function(){return!1};function xe(e){if(!ke(e))return!1;var t=pe(e);return t==f||t==l||t==s||t==p}function qe(e){return"number"==typeof e&&e>-1&&e%1==0&&c>=e}function ke(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function Te(e){return null!=e&&"object"==typeof e}var Le=I?function(e){return function(t){return e(t)}}(I):function(e){return Te(e)&&qe(e.length)&&!!b[pe(e)]};function Ne(e){return Se(e)?ce(e,!0):ge(e)}var Fe,Pe=(Fe=function(e,t,r,n){be(e,t,r,n)},me(function(e,t){var r=-1,n=t.length,o=n>1?t[n-1]:void 0,i=n>2?t[2]:void 0;for(o=Fe.length>3&&"function"==typeof o?(n--,o):void 0,i&&function(e,t,r){if(!ke(r))return!1;var n=typeof t;return!!("number"==n?Se(r)&&Ee(t,r.length):"string"==n&&t in r)&&Ce(r[t],e)}(t[0],t[1],i)&&(o=3>n?void 0:o,n=1),e=Object(e);++r<n;){var u=t[r];u&&Fe(e,u,r,o)}return e}));function Ue(e){return e}e.exports=Pe}),ct=function(e,t){return ut(e.resources,t,function(e,t){return he(e)?l({},e,t):void 0})},at={},st={REQUEST:function(e,t){var r,n=t.url,o=t.resourceId;return l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{resourceName:it(t.type).resourceName,resourceId:o,startedAt:(new Date).toISOString(),endedAt:null,hasSucceeded:!(!e.requests||!e.requests[n])&&e.requests[n].hasSucceeded,hasFailed:!(!e.requests||!e.requests[n])&&e.requests[n].hasFailed,didInvalidate:!(!e.requests||!e.requests[n])&&e.requests[n].didInvalidate,fromCache:!(!e.requests||!e.requests[n])&&e.requests[n].fromCache}),r))})},RECEIVE:function(e,t){var r,n=t.url,o=t.payload,i=t.principalResourceIds,u=it(t.type).resourceName,c=l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{endedAt:(new Date).toISOString(),hasSucceeded:!0,hasFailed:!1,didInvalidate:!1,fromCache:!1,payloadIds:Pe(u,o,i)}),r)),resources:ct(e,o)});return l({},c,{resolversHashes:Ve(c,u,n,o,i)})},FAIL:function(e,t){var r,n=t.url;return l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{endedAt:(new Date).toISOString(),hasSucceeded:!1,hasFailed:!0}),r))})},RECEIVE_FROM_CACHE:function(e,t){var r,n=t.type,o=t.url,i=t.resourceId,u=t.payload,c=t.principalResourceIds,a=it(n).resourceName,s=l({},e,{requests:l({},e.requests||{},(r={},r[o]=l({},e.requests&&e.requests[o]?e.requests[o]:{},{resourceName:it(n).resourceName,resourceId:i,startedAt:(new Date).toISOString(),endedAt:(new Date).toISOString(),hasSucceeded:!0,hasFailed:!1,didInvalidate:!1,fromCache:!0,payloadIds:Pe(a,u,c)}),r)),resources:ct(e,u)});return l({},s,{resolversHashes:Ve(s,a,o,u,c)})},INVALIDATE_RESOURCE:function(e,t){var r=t.resourceName;return l({},e,{requests:l({},Object.entries(e.requests||{}).reduce(function(e,t){var n,o=t[1];return l({},e,((n={})[t[0]]=!o.didInvalidate&&(o.resourceName===r||o.payloadIds&&o.payloadIds[r])?l({},o,{didInvalidate:!0}):o,n))},{}))})},INVALIDATE_ID:function(e,t){var r=t.resourceName,n=t.resourceId;return l({},e,{requests:l({},Object.entries(e.requests||{}).reduce(function(e,t){var o,i=t[1];return l({},e,((o={})[t[0]]=!i.didInvalidate&&(i.resourceName===r&&i.resourceId===n||i.payloadIds&&i.payloadIds[r]&&i.payloadIds[r].map(function(e){return""+e}).includes(""+n))?l({},i,{didInvalidate:!0}):i,o))},{}))})},INVALIDATE_REQUEST:function(e,t){var r,n=t.url;return l({},e,{requests:l({},e.requests||{},(r={},r[n]=l({},e.requests&&e.requests[n]?e.requests[n]:{},{didInvalidate:!0}),r))})},RESET_RESOURCE:function(e,t){var r,n=t.resourceName,o=l({},e,{requests:l({},Object.entries(e.requests||{}).filter(function(e){var t=e[1],r=t.payloadIds;return!(n===t.resourceName||r&&Object.keys(r).includes(n))}).reduce(function(e,t){var r;return l({},e,((r={})[t[0]]=t[1],r))},{})),resources:l({},e.resources||{},(r={},r[n]=void 0,r))});return l({},o,{resolversHashes:function(e,t){var r,n=e.requests,o=void 0===n?{}:n,i=e.resolversHashes,u=void 0===i?{}:i;return l({},u,{requests:l({},Object.entries(u.requests||{}).reduce(function(e,t){var r,n=t[0],i=t[1];return l({},e,Object.keys(o).includes(n)?((r={})[n]=i,r):{})},{})),resources:l({},u.resources||{},(r={},r[t]=Be,r))})}(o,n)})},RESET_ALL:function(){return{}}},ft=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:at;return function(t){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(void 0===t)return e;if(!r.type||!r.type.startsWith("@@rest-easy"))return t;var n=st[it(r.type).caseName];return n?n(t,r):t}}(),lt=function(){var e,t={RESET_ALL:y("@global","@reset","RESET_ALL")};return{resetAll:(e=t.RESET_ALL,function(){return{type:e}})}};e.connect=function(){for(var e=arguments.length,r=Array(e),n=0;e>n;n++)r[n]=arguments[n];return function(e){var n=e.displayName||e.name||"Component",o=function(n){function o(t){f(this,o);var i=d(this,n.call(this,t));return i.onInjectProps=function(e,t){i.setState(function(r){var n;return r.__requestURLsByActionKey[e]!==t?{__requestURLsByActionKey:l({},r.__requestURLsByActionKey,(n={},n[e]=t,n))}:null})},i.getWrappedInstance=function(){return i.innerRef&&i.innerRef.getWrappedInstance?i.innerRef.getWrappedInstance():null},i.state={__requestURLsByActionKey:{}},i.ConnectedComponent=h(i.onInjectProps).apply(void 0,r)(e),i}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}(o,n),o.prototype.render=function(){var e=this,r=this.ConnectedComponent,n=l({},this.props,this.state);return t.createElement(r,l({ref:function(t){e.innerRef=t}},n))},o}(t.Component);return o.displayName="EasyConnect("+n+")",o}},e.createResource=function(e,t){return function(r){we(e,t),je(e,r);var n=t||{},o=n.cacheLifetime,i=void 0===o?0:o,u=n.denormalizer,c=l({},v(e)),a=l({},function(e,t){return{resource:{getResource:function(r){var n=1>=arguments.length||void 0===arguments[1]||arguments[1];return ot(J(r),e,n,t)},getResourceById:function(r,n){var o=2>=arguments.length||void 0===arguments[2]||arguments[2];return function(e,t,r,n,o){return n&&o?o([r],e.resources)[0]||null:e.resources&&e.resources[t]&&e.resources[t][r]?e.resources[t][r]:null}(J(r),e,n,o,t)}}}}(e,u));return Object.keys(r||{}).forEach(function(t){c=l({},c,re(e,i,r||{},t)),a=l({},a,function(e,t,r){var n;return(n={})[t]={resource:{couldPerform:function(r){return!Ye(J(r),e,t)},isPerforming:function(r){return Ye(J(r),e,t)},isValid:function(r){return!$e(J(r),e,t,"didInvalidate")},hasSucceeded:function(r){return $e(J(r),e,t,"hasSucceeded")},hasFailed:function(r){return $e(J(r),e,t,"hasFailed")},couldPerformOnId:function(r,n){return!Ye(J(r),e,t,n)},isPerformingOnId:function(r,n){return Ye(J(r),e,t,n)},hasSucceededOnId:function(r,n){return $e(J(r),e,t,"hasSucceeded",n)},hasFailedOnId:function(r,n){return $e(J(r),e,t,"hasFailed",n)},isValidId:function(r,n){return!$e(J(r),e,t,"didInvalidate",n)}},request:{getResource:function(n,o){var i=2>=arguments.length||void 0===arguments[2]||arguments[2];return Ze(J(n),e,Le(e,t,o),i,r)},couldPerform:function(r,n){return!et(J(r),Le(e,t,n))},isPerforming:function(r,n){return et(J(r),Le(e,t,n))},isValid:function(r,n){return!tt(J(r),Le(e,t,n),"didInvalidate")},hasSucceeded:function(r,n){return tt(J(r),Le(e,t,n),"hasSucceeded")},hasFailed:function(r,n){return tt(J(r),Le(e,t,n),"hasFailed")}}},n}(e,t,u))}),{actions:c,selectors:a}}},e.reducer=ft,e.reset=function(){return(0,lt().resetAll)()},e.initializeNetworkHelpers=function(e){!function(e){W=e?l({},$,e):$}(e)},Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -5,3 +5,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import getResourceIdsByResourceNameFromNormalizedPayload from '../../utils/getResourceIdsByResourceNameFromNormalizedPayload'; | ||
import { computeHashesForSelectorsResolvers, resetAllResourcesHashForSelectorsResolvers, resetResourceHashForSelectorsResolvers } from '../../utils/hashesForSelectorsResolvers'; | ||
import { computeNewResolversHashes, resetResourceResolversHashes } from '../../utils/resolversHashes'; | ||
import shallowMergeResources from '../../utils/shallowMergeResources'; | ||
@@ -40,3 +40,3 @@ | ||
var newState = _extends({}, state, { | ||
var newStateOldHashes = _extends({}, state, { | ||
requests: _extends({}, state.requests || {}, (_extends3 = {}, _extends3[normalizedURL] = _extends({}, state.requests && state.requests[normalizedURL] ? state.requests[normalizedURL] : {}, { | ||
@@ -53,3 +53,5 @@ endedAt: new Date().toISOString(), | ||
computeHashesForSelectorsResolvers(newState, resourceName, normalizedURL, normalizedPayload, principalResourceIds); | ||
var newState = _extends({}, newStateOldHashes, { | ||
resolversHashes: computeNewResolversHashes(newStateOldHashes, resourceName, normalizedURL, normalizedPayload, principalResourceIds) | ||
}); | ||
@@ -82,3 +84,3 @@ return newState; | ||
var newState = _extends({}, state, { | ||
var newStateOldHashes = _extends({}, state, { | ||
requests: _extends({}, state.requests || {}, (_extends5 = {}, _extends5[normalizedURL] = _extends({}, state.requests && state.requests[normalizedURL] ? state.requests[normalizedURL] : {}, { | ||
@@ -98,3 +100,5 @@ resourceName: getInfosFromActionType(type).resourceName, | ||
computeHashesForSelectorsResolvers(newState, resourceName, normalizedURL, normalizedPayload, principalResourceIds); | ||
var newState = _extends({}, newStateOldHashes, { | ||
resolversHashes: computeNewResolversHashes(newStateOldHashes, resourceName, normalizedURL, normalizedPayload, principalResourceIds) | ||
}); | ||
@@ -149,3 +153,3 @@ return newState; | ||
var newState = _extends({}, state, { | ||
var newStateOldHashes = _extends({}, state, { | ||
requests: _extends({}, Object.entries(state.requests || {}).filter(function (_ref11) { | ||
@@ -166,3 +170,5 @@ var _ref11$ = _ref11[1], | ||
resetResourceHashForSelectorsResolvers(newState); | ||
var newState = _extends({}, newStateOldHashes, { | ||
resolversHashes: resetResourceResolversHashes(newStateOldHashes, resourceName) | ||
}); | ||
@@ -174,4 +180,2 @@ return newState; | ||
resetAllResourcesHashForSelectorsResolvers(); | ||
return newState; | ||
@@ -178,0 +182,0 @@ } |
@@ -7,3 +7,3 @@ import createCachedSelector from 're-reselect'; | ||
import getState from '../utils/getState'; | ||
import { getEmptyResourceHash, getPayloadIdsHash, getResourceHash } from '../utils/hashesForSelectorsResolvers'; | ||
import { getEmptyResourceHash, getPayloadIdsHash, getResourceHash } from '../utils/resolversHashes'; | ||
@@ -76,2 +76,6 @@ /* eslint-disable no-underscore-dangle */ | ||
var resolversHashesSelector = function resolversHashesSelector(state) { | ||
return state.resolversHashes; | ||
}; | ||
var applyDenormalizerSelector = function applyDenormalizerSelector(state, resourceName, normalizedURL, applyDenormalizer) { | ||
@@ -98,6 +102,7 @@ return applyDenormalizer; | ||
var payloadIds = payloadIdsSelector(state, resourceName, normalizedURL); | ||
var resolversHashes = resolversHashesSelector(state); | ||
if (resource && payloadIds) { | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getPayloadIdsHash(normalizedURL, resourceName) + '-' + getResourceHash(resourceName) : applyDenormalizer + '-' + Object.keys(state.requests[normalizedURL].payloadIds).map(function (resourceKey) { | ||
return getPayloadIdsHash(normalizedURL, resourceKey) + '-' + getResourceHash(resourceKey); | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getPayloadIdsHash(resolversHashes, normalizedURL, resourceName) + '-' + getResourceHash(resolversHashes, resourceName) : applyDenormalizer + '-' + Object.keys(state.requests[normalizedURL].payloadIds).map(function (resourceKey) { | ||
return getPayloadIdsHash(resolversHashes, normalizedURL, resourceKey) + '-' + getResourceHash(resolversHashes, resourceKey); | ||
}).join('--'); | ||
@@ -104,0 +109,0 @@ } |
@@ -5,3 +5,3 @@ import createCachedSelector from 're-reselect'; | ||
import getState from '../utils/getState'; | ||
import { getEmptyResourceHash, getResourceHash, getResourcesHash } from '../utils/hashesForSelectorsResolvers'; | ||
import { getEmptyResourceHash, getResourceHash, getResourcesHash } from '../utils/resolversHashes'; | ||
@@ -19,2 +19,6 @@ var EMPTY_RESOURCE = []; | ||
var resolversHashesSelector = function resolversHashesSelector(state) { | ||
return state.resolversHashes; | ||
}; | ||
var applyDenormalizerSelector = function applyDenormalizerSelector(state, resourceName, applyDenormalizer) { | ||
@@ -38,5 +42,6 @@ return applyDenormalizer; | ||
var resource = resourceSelector(state, resourceName); | ||
var resolversHashes = resolversHashesSelector(state); | ||
if (resource) { | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getResourceHash(resourceName) : applyDenormalizer + '-' + getResourcesHash(); | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getResourceHash(resolversHashes, resourceName) : applyDenormalizer + '-' + getResourcesHash(resolversHashes); | ||
} | ||
@@ -43,0 +48,0 @@ |
@@ -5,3 +5,3 @@ var _extends = Object.assign || function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; | ||
import getResourceIdsByResourceNameFromNormalizedPayload from '../../utils/getResourceIdsByResourceNameFromNormalizedPayload'; | ||
import { computeHashesForSelectorsResolvers, resetAllResourcesHashForSelectorsResolvers, resetResourceHashForSelectorsResolvers } from '../../utils/hashesForSelectorsResolvers'; | ||
import { computeNewResolversHashes, resetResourceResolversHashes } from '../../utils/resolversHashes'; | ||
import shallowMergeResources from '../../utils/shallowMergeResources'; | ||
@@ -40,3 +40,3 @@ | ||
var newState = _extends({}, state, { | ||
var newStateOldHashes = _extends({}, state, { | ||
requests: _extends({}, state.requests || {}, (_extends3 = {}, _extends3[normalizedURL] = _extends({}, state.requests && state.requests[normalizedURL] ? state.requests[normalizedURL] : {}, { | ||
@@ -53,3 +53,5 @@ endedAt: new Date().toISOString(), | ||
computeHashesForSelectorsResolvers(newState, resourceName, normalizedURL, normalizedPayload, principalResourceIds); | ||
var newState = _extends({}, newStateOldHashes, { | ||
resolversHashes: computeNewResolversHashes(newStateOldHashes, resourceName, normalizedURL, normalizedPayload, principalResourceIds) | ||
}); | ||
@@ -82,3 +84,3 @@ return newState; | ||
var newState = _extends({}, state, { | ||
var newStateOldHashes = _extends({}, state, { | ||
requests: _extends({}, state.requests || {}, (_extends5 = {}, _extends5[normalizedURL] = _extends({}, state.requests && state.requests[normalizedURL] ? state.requests[normalizedURL] : {}, { | ||
@@ -98,3 +100,5 @@ resourceName: getInfosFromActionType(type).resourceName, | ||
computeHashesForSelectorsResolvers(newState, resourceName, normalizedURL, normalizedPayload, principalResourceIds); | ||
var newState = _extends({}, newStateOldHashes, { | ||
resolversHashes: computeNewResolversHashes(newStateOldHashes, resourceName, normalizedURL, normalizedPayload, principalResourceIds) | ||
}); | ||
@@ -149,3 +153,3 @@ return newState; | ||
var newState = _extends({}, state, { | ||
var newStateOldHashes = _extends({}, state, { | ||
requests: _extends({}, Object.entries(state.requests || {}).filter(function (_ref11) { | ||
@@ -166,3 +170,5 @@ var _ref11$ = _ref11[1], | ||
resetResourceHashForSelectorsResolvers(newState); | ||
var newState = _extends({}, newStateOldHashes, { | ||
resolversHashes: resetResourceResolversHashes(newStateOldHashes, resourceName) | ||
}); | ||
@@ -174,4 +180,2 @@ return newState; | ||
resetAllResourcesHashForSelectorsResolvers(); | ||
return newState; | ||
@@ -178,0 +182,0 @@ } |
@@ -7,3 +7,3 @@ import createCachedSelector from 're-reselect'; | ||
import getState from '../utils/getState'; | ||
import { getEmptyResourceHash, getPayloadIdsHash, getResourceHash } from '../utils/hashesForSelectorsResolvers'; | ||
import { getEmptyResourceHash, getPayloadIdsHash, getResourceHash } from '../utils/resolversHashes'; | ||
@@ -76,2 +76,6 @@ /* eslint-disable no-underscore-dangle */ | ||
var resolversHashesSelector = function resolversHashesSelector(state) { | ||
return state.resolversHashes; | ||
}; | ||
var applyDenormalizerSelector = function applyDenormalizerSelector(state, resourceName, normalizedURL, applyDenormalizer) { | ||
@@ -98,6 +102,7 @@ return applyDenormalizer; | ||
var payloadIds = payloadIdsSelector(state, resourceName, normalizedURL); | ||
var resolversHashes = resolversHashesSelector(state); | ||
if (resource && payloadIds) { | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getPayloadIdsHash(normalizedURL, resourceName) + '-' + getResourceHash(resourceName) : applyDenormalizer + '-' + Object.keys(state.requests[normalizedURL].payloadIds).map(function (resourceKey) { | ||
return getPayloadIdsHash(normalizedURL, resourceKey) + '-' + getResourceHash(resourceKey); | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getPayloadIdsHash(resolversHashes, normalizedURL, resourceName) + '-' + getResourceHash(resolversHashes, resourceName) : applyDenormalizer + '-' + Object.keys(state.requests[normalizedURL].payloadIds).map(function (resourceKey) { | ||
return getPayloadIdsHash(resolversHashes, normalizedURL, resourceKey) + '-' + getResourceHash(resolversHashes, resourceKey); | ||
}).join('--'); | ||
@@ -104,0 +109,0 @@ } |
@@ -5,3 +5,3 @@ import createCachedSelector from 're-reselect'; | ||
import getState from '../utils/getState'; | ||
import { getEmptyResourceHash, getResourceHash, getResourcesHash } from '../utils/hashesForSelectorsResolvers'; | ||
import { getEmptyResourceHash, getResourceHash, getResourcesHash } from '../utils/resolversHashes'; | ||
@@ -19,2 +19,6 @@ var EMPTY_RESOURCE = []; | ||
var resolversHashesSelector = function resolversHashesSelector(state) { | ||
return state.resolversHashes; | ||
}; | ||
var applyDenormalizerSelector = function applyDenormalizerSelector(state, resourceName, applyDenormalizer) { | ||
@@ -38,5 +42,6 @@ return applyDenormalizer; | ||
var resource = resourceSelector(state, resourceName); | ||
var resolversHashes = resolversHashesSelector(state); | ||
if (resource) { | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getResourceHash(resourceName) : applyDenormalizer + '-' + getResourcesHash(); | ||
return !applyDenormalizer || !denormalizer ? applyDenormalizer + '-' + getResourceHash(resolversHashes, resourceName) : applyDenormalizer + '-' + getResourcesHash(resolversHashes); | ||
} | ||
@@ -43,0 +48,0 @@ |
{ | ||
"name": "@brigad/redux-rest-easy", | ||
"version": "2.3.5", | ||
"version": "2.3.6", | ||
"description": "Redux/React/React Native framework generating actions, reducers and selectors to perform network requests", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
import getInfosFromActionType from '../../utils/getInfosFromActionType'; | ||
import getResourceIdsByResourceNameFromNormalizedPayload from '../../utils/getResourceIdsByResourceNameFromNormalizedPayload'; | ||
import { | ||
computeHashesForSelectorsResolvers, | ||
resetAllResourcesHashForSelectorsResolvers, | ||
resetResourceHashForSelectorsResolvers, | ||
} from '../../utils/hashesForSelectorsResolvers'; | ||
computeNewResolversHashes, | ||
resetResourceResolversHashes, | ||
} from '../../utils/resolversHashes'; | ||
import shallowMergeResources from '../../utils/shallowMergeResources'; | ||
@@ -52,3 +51,3 @@ | ||
const { resourceName } = getInfosFromActionType(type); | ||
const newState = { | ||
const newStateOldHashes = { | ||
...state, | ||
@@ -76,9 +75,12 @@ requests: { | ||
computeHashesForSelectorsResolvers( | ||
newState, | ||
resourceName, | ||
normalizedURL, | ||
normalizedPayload, | ||
principalResourceIds, | ||
); | ||
const newState = { | ||
...newStateOldHashes, | ||
resolversHashes: computeNewResolversHashes( | ||
newStateOldHashes, | ||
resourceName, | ||
normalizedURL, | ||
normalizedPayload, | ||
principalResourceIds, | ||
), | ||
}; | ||
@@ -112,3 +114,3 @@ return newState; | ||
const { resourceName } = getInfosFromActionType(type); | ||
const newState = { | ||
const newStateOldHashes = { | ||
...state, | ||
@@ -139,9 +141,12 @@ requests: { | ||
computeHashesForSelectorsResolvers( | ||
newState, | ||
resourceName, | ||
normalizedURL, | ||
normalizedPayload, | ||
principalResourceIds, | ||
); | ||
const newState = { | ||
...newStateOldHashes, | ||
resolversHashes: computeNewResolversHashes( | ||
newStateOldHashes, | ||
resourceName, | ||
normalizedURL, | ||
normalizedPayload, | ||
principalResourceIds, | ||
), | ||
}; | ||
@@ -208,3 +213,3 @@ return newState; | ||
RESET_RESOURCE: (state, { resourceName }) => { | ||
const newState = { | ||
const newStateOldHashes = { | ||
...state, | ||
@@ -232,3 +237,9 @@ requests: { | ||
resetResourceHashForSelectorsResolvers(newState); | ||
const newState = { | ||
...newStateOldHashes, | ||
resolversHashes: resetResourceResolversHashes( | ||
newStateOldHashes, | ||
resourceName, | ||
), | ||
}; | ||
@@ -240,4 +251,2 @@ return newState; | ||
resetAllResourcesHashForSelectorsResolvers(); | ||
return newState; | ||
@@ -244,0 +253,0 @@ }, |
@@ -11,3 +11,3 @@ import createCachedSelector from 're-reselect'; | ||
getResourceHash, | ||
} from '../utils/hashesForSelectorsResolvers'; | ||
} from '../utils/resolversHashes'; | ||
@@ -96,2 +96,4 @@ /* eslint-disable no-underscore-dangle */ | ||
const resolversHashesSelector = state => state.resolversHashes; | ||
const applyDenormalizerSelector = ( | ||
@@ -137,2 +139,3 @@ state, | ||
const payloadIds = payloadIdsSelector(state, resourceName, normalizedURL); | ||
const resolversHashes = resolversHashesSelector(state); | ||
@@ -142,5 +145,6 @@ if (resource && payloadIds) { | ||
? `${applyDenormalizer}-${getPayloadIdsHash( | ||
resolversHashes, | ||
normalizedURL, | ||
resourceName, | ||
)}-${getResourceHash(resourceName)}` | ||
)}-${getResourceHash(resolversHashes, resourceName)}` | ||
: `${applyDenormalizer}-${Object.keys( | ||
@@ -152,5 +156,6 @@ state.requests[normalizedURL].payloadIds, | ||
`${getPayloadIdsHash( | ||
resolversHashes, | ||
normalizedURL, | ||
resourceKey, | ||
)}-${getResourceHash(resourceKey)}`, | ||
)}-${getResourceHash(resolversHashes, resourceKey)}`, | ||
) | ||
@@ -157,0 +162,0 @@ .join('--')}`; |
@@ -9,3 +9,3 @@ import createCachedSelector from 're-reselect'; | ||
getResourcesHash, | ||
} from '../utils/hashesForSelectorsResolvers'; | ||
} from '../utils/resolversHashes'; | ||
@@ -22,2 +22,4 @@ const EMPTY_RESOURCE = []; | ||
const resolversHashesSelector = state => state.resolversHashes; | ||
const applyDenormalizerSelector = (state, resourceName, applyDenormalizer) => | ||
@@ -55,7 +57,8 @@ applyDenormalizer; | ||
const resource = resourceSelector(state, resourceName); | ||
const resolversHashes = resolversHashesSelector(state); | ||
if (resource) { | ||
return !applyDenormalizer || !denormalizer | ||
? `${applyDenormalizer}-${getResourceHash(resourceName)}` | ||
: `${applyDenormalizer}-${getResourcesHash()}`; | ||
? `${applyDenormalizer}-${getResourceHash(resolversHashes, resourceName)}` | ||
: `${applyDenormalizer}-${getResourcesHash(resolversHashes)}`; | ||
} | ||
@@ -62,0 +65,0 @@ |
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
456936
9853