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

@voidwalkers/void-redux

Package Overview
Dependencies
Maintainers
2
Versions
46
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@voidwalkers/void-redux - npm Package Compare versions

Comparing version 0.1.25 to 0.1.26

2

dist/index.browser.js
/*! For license information please see index.browser.js.LICENSE.txt */
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ololoepepe/api-redux-bindings"),require("@voidwalkers/void-client"),require("redux"),require("redux-persist"),require("redux-saga"),require("@ololoepepe/reducers"),require("@ololoepepe/api-wrapper")):"function"==typeof define&&define.amd?define(["@ololoepepe/api-redux-bindings","@voidwalkers/void-client","redux","redux-persist","redux-saga","@ololoepepe/reducers","@ololoepepe/api-wrapper"],e):"object"==typeof exports?exports.voidRedux=e(require("@ololoepepe/api-redux-bindings"),require("@voidwalkers/void-client"),require("redux"),require("redux-persist"),require("redux-saga"),require("@ololoepepe/reducers"),require("@ololoepepe/api-wrapper")):t.voidRedux=e(t["@ololoepepe/api-redux-bindings"],t["@voidwalkers/void-client"],t.redux,t["redux-persist"],t["redux-saga"],t["@ololoepepe/reducers"],t["@ololoepepe/api-wrapper"])}(self,((t,e,r,n,o,i,a)=>(()=>{var u={535:e=>{"use strict";e.exports=t},22:t=>{"use strict";t.exports=a},558:t=>{"use strict";t.exports=i},39:t=>{"use strict";t.exports=e},580:t=>{"use strict";t.exports=r},85:t=>{"use strict";t.exports=n},655:t=>{"use strict";t.exports=o},61:(t,e,r)=>{var n=r(698)["default"];function o(){"use strict";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports["default"]=t.exports;var e,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},s=c.iterator||"@@iterator",l=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new _(n||[]);return u(i,"_invoke",{value:T(t,r,a)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=d;var h="suspendedStart",v="suspendedYield",m="executing",b="completed",g={};function w(){}function O(){}function x(){}var j={};p(j,s,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(I([])));S&&S!==i&&a.call(S,s)&&(j=S);var A=x.prototype=w.prototype=Object.create(j);function P(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,u,c){var s=y(t[o],t,i);if("throw"!==s.type){var l=s.arg,f=l.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){l.value=t,u(l)}),(function(t){return r("throw",t,u,c)}))}c(s.arg)}var o;u(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function T(t,r,n){var o=h;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var s=y(t,r,n);if("normal"===s.type){if(o=n.done?b:v,s.arg===g)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(o=b,n.method="throw",n.arg=s.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=y(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(a.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(n(t)+" is not iterable")}return O.prototype=x,u(A,"constructor",{value:x,configurable:!0}),u(x,"constructor",{value:O,configurable:!0}),O.displayName=p(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===O||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,p(t,f,"GeneratorFunction")),t.prototype=Object.create(A),t},r.awrap=function(t){return{__await:t}},P(E.prototype),p(E.prototype,l,(function(){return this})),r.AsyncIterator=E,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new E(d(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},P(A),p(A,f,"Generator"),p(A,s,(function(){return this})),p(A,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function o(){for(;r.length;){var t=r.pop();if(t in e)return o.value=t,o.done=!1,o}return o.done=!0,o}},r.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),s=a.call(i,"finallyLoc");if(c&&s){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}t.exports=o,t.exports.__esModule=!0,t.exports["default"]=t.exports},698:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports["default"]=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports["default"]=t.exports},687:(t,e,r)=>{var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(o){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},c={};function s(t){var e=c[t];if(e!==undefined)return e.exports;var r=c[t]={exports:{}};return u[t](r,r.exports,s),r.exports}s.d=(t,e)=>{for(var r in e)s.o(e,r)&&!s.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},s.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),s.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var l={};return(()=>{"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function e(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}function r(r){return function(e){if(Array.isArray(e))return t(e)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||e(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,s=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){s=!0,o=t}finally{try{if(!c&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(s)throw o}}return u}}(t,r)||e(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t){var e=function(t,e){if("object"!==i(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(r!==undefined){var n=r.call(t,e||"default");if("object"!==i(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===i(e)?e:String(e)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function c(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function f(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function p(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,f(t,e,"get"))}function d(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,f(t,e,"set"),r),r}function y(t,e,r){return(e=a(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}s.r(l),s.d(l,{VoidRedux:()=>Ut});var h=s(687),v=s(535),m=s(39),b=s(580),g=s(85),w=s(655),O=function(t){return"@@redux-saga/"+t},x=O("IO"),j=O("MULTICAST"),k=O("SELF_CANCELLATION"),S=function(t){return null!==t&&t!==undefined},A=function(t){return"function"==typeof t},P=function(t){return"string"==typeof t},E=Array.isArray,T=function Bt(t){return t&&(P(t)||L(t)||A(t)||E(t)&&t.every(Bt))},R=function(t){return t&&A(t.take)&&A(t.close)},D=function(t){return A(t)&&t.hasOwnProperty("toString")},L=function(t){return Boolean(t)&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype},_=function(t){return R(t)&&t[j]};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var I=function(t){throw t},C=function(t){return{value:t,done:!0}};var q="TAKE",N="CALL",W="FORK",M="CANCEL",F=function(t,e){var r;return(r={})[x]=!0,r.combinator=!1,r.type=t,r.payload=e,r};function U(t,e){return void 0===t&&(t="*"),T(t)?(S(e)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),F(q,{pattern:t})):_(t)&&S(e)&&T(e)?F(q,{channel:t,pattern:e}):R(t)?(S(e)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),F(q,{channel:t})):void 0}function B(t,e){var r;return(null===(r=e)||r===undefined)&&(e=t,t=undefined),F("PUT",{channel:t,action:e})}function G(t,e){var r,n=null;return A(t)?r=t:(E(t)?(n=t[0],r=t[1]):(n=t.context,r=t.fn),n&&P(r)&&A(n[r])&&(r=n[r])),{context:n,fn:r,args:e}}function z(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return F(N,G(t,r))}function H(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return F(W,G(t,r))}var Y=function(t){return{done:!0,value:t}},K={};function V(t){return R(t)?"channel":D(t)?String(t):A(t)?t.name:String(t)}function $(t,e,r){var n,o,i,a=e;function u(e,r){if(a===K)return Y(e);if(r&&!o)throw a=K,r;n&&n(e);var u=r?t[o](r):t[a]();return a=u.nextState,i=u.effect,n=u.stateUpdater,o=u.errorState,a===K?Y(e):i}return function(t,e,r){void 0===e&&(e=I),void 0===r&&(r="iterator");var n={meta:{name:r},next:t,"throw":e,"return":C,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(n[Symbol.iterator]=function(){return n}),n}(u,(function(t){return u(null,t)}),r)}function J(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var i,a,u={done:!1,value:U(t)},c=function(t){return{done:!1,value:H.apply(void 0,[e].concat(n,[t]))}},s=function(t){return{done:!1,value:(e=t,void 0===e&&(e=k),F(M,e))};var e},l=function(t){return i=t},f=function(t){return a=t};return $({q1:function(){return{nextState:"q2",effect:u,stateUpdater:f}},q2:function(){return i?{nextState:"q3",effect:s(i)}:{nextState:"q1",effect:c(a),stateUpdater:l}},q3:function(){return{nextState:"q1",effect:c(a),stateUpdater:l}}},"q1","takeLatest("+V(t)+", "+e.name+")")}function Q(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return H.apply(void 0,[J,t,e].concat(n))}function X(t,e){return X=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},X(t,e)}function Z(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&X(t,e)}function tt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function et(t,e){if(e&&("object"===i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return tt(t)}function rt(t){return rt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},rt(t)}var nt=s(558);function ot(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function it(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?ot(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ot(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function at(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rt(t);if(e){var o=rt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return et(this,r)}}var ut="grouped_list",ct="single",st=function(t){Z(r,t);var e=at(r);function r(t){var n=t.apiWrapper,i=t.namespace;return o(this,r),e.call(this,{apiWrapper:n,namespace:i})}return c(r,[{key:"createActions",value:function(t){var e=t.namespace,r=t.reducerOptions,n=[this.createAction(e,"setFetched"),this.createAction(e,"setFetching")];return r.type===ct?n.push(this.createAction(e,"setItem")):n.push(this.createAction(e,"setPage")),n}},{key:"createApiActions",value:function(){return[]}},{key:"createReducer",value:function(t){var e=t.actionHandlers,r=t.actions,n=t.reducerOptions,o={changeItem:r[v.ActionType.ChangeItem].actionType,clear:r[v.ActionType.Clear].actionType,create:r[v.ApiActionType.Create].actionType,"delete":r[v.ApiActionType.Delete].actionType,read:r[v.ApiActionType.Read].actionType,removeItem:r[v.ActionType.RemoveItem].actionType,setFetched:r.setFetched.actionType,setFetching:r.setFetching.actionType,update:r[v.ApiActionType.Update].actionType},i=null;return n.type===ct?(o.setItem=r.setItem.actionType,i=nt.createEntityReducer):(Object.assign(o,{addItem:r[v.ActionType.AddItem].actionType,addItems:r[v.ActionType.AddItems].actionType,changeItems:r[v.ActionType.ChangeItems].actionType,setPage:r.setPage.actionType}),i=n.type===ut?nt.createGroupedEntityListReducer:nt.createEntityListReducer),i(o,it(it({getIdFromEntity:function(t){return t._id},getIdFromPayload:function(t){return t._id},getSourceAction:function(t){var e=t.action,r=e.payload;return e.type.endsWith("/".concat(o.update.ACTION))?it(it({},r),{},{data:{}}):r}},n),{},{customHandlers:it(it({},e),null==n?void 0:n.customHandlers)}))}}]),r}(v.ApiDuckCreator),lt=s(22);function ft(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rt(t);if(e){var o=rt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return et(this,r)}}var pt=function(t){Z(r,t);var e=ft(r);function r(){return o(this,r),e.apply(this,arguments)}return c(r,[{key:"authenticate",value:function(){}},{key:"loadAuthenticationData",value:function(){}},{key:"saveAuthenticationData",value:function(){}}]),r}(lt.ApiAuthenticator);function dt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rt(t);if(e){var o=rt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return et(this,r)}}var yt=function(t){Z(r,t);var e=dt(r);function r(){return o(this,r),e.apply(this,arguments)}return c(r,[{key:"connect",value:function(){}},{key:"disconnect",value:function(){}},{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}}]),r}(lt.ApiRealtimeTransport);function ht(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(s){return void r(s)}u.done?e(c):Promise.resolve(c).then(n,o)}function vt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rt(t);if(e){var o=rt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return et(this,r)}}function mt(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function bt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function gt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?bt(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):bt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var wt="deleteOne",Ot="find",xt="findOneAndUpdate",jt="insertOne";function kt(t,e,r){var n,o,i,a=t.apiWrapperOptions,u=t.methodData,c=t.payload,s=u.actionName,l=u.method;return[null==c?void 0:c[e],null==a||null===(n=a[s])||void 0===n?void 0:n[e],null==a||null===(o=a[l])||void 0===o?void 0:o[e],null==a||null===(i=a["default"])||void 0===i?void 0:i[e],r].find((function(t){return t!==undefined}))}function St(t){var e=t.apiWrapperOptions,r=t.method,n=t.methodData,o=t.payload;switch(r){case wt:return[kt({apiWrapperOptions:e,methodData:n,payload:o},"filter")];case Ot:return[kt({apiWrapperOptions:e,methodData:n,payload:o},"filter",{}),kt({apiWrapperOptions:e,methodData:n,payload:o},"options",{})];case xt:return[kt({apiWrapperOptions:e,methodData:n,payload:o},"filter"),kt({apiWrapperOptions:e,methodData:n,payload:o},"data"),kt({apiWrapperOptions:e,methodData:n,payload:o},"options",{})];case jt:return[kt({apiWrapperOptions:e,methodData:n,payload:o},"data")]}}function At(t,e){var r;switch(t){case wt:if(e.deletedCount<1)throw new Error("Not found");return{};case Ot:return{data:{count_total:(null===(r=e[0].count[0])||void 0===r?void 0:r.total)||0,items:e[0].data}};case xt:if(!e.ok)throw new Error("Not found");return{data:{item:gt({},e.value)}};case jt:return{data:{item:{_id:e.insertedId}}};default:return e}}var Pt=new WeakMap,Et=new WeakMap,Tt=function(t){Z(a,t);var e,n,i=vt(a);function a(t){var e,r=t.getExtraRequestData,n=t.voidClient;return o(this,a),mt(tt(e=i.call(this)),Pt,{writable:!0,value:null}),mt(tt(e),Et,{writable:!0,value:null}),d(tt(e),Pt,r),d(tt(e),Et,n),e}return c(a,[{key:"callMethod",value:(e=h.mark((function u(t){var e,n,o,i,a,c,s,l,f,d;return h.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return e=t.methodData,n=t.requestData,o=n.apiWrapperOptions,i=n.payload,a=kt({apiWrapperOptions:o,methodData:e,payload:i},"collectionName"),c=kt({apiWrapperOptions:o,methodData:e,payload:i},"method",e.method),s=p(this,Pt).call(this),u.prev=5,f=St({apiWrapperOptions:o,method:c,methodData:e,payload:i}),u.next=9,(l=p(this,Et).mongo.collection(a))[c].apply(l,r(f.map((function(t){return"function"==typeof t?t(i,s):t}))));case 9:return d=u.sent,u.abrupt("return",At(c,d));case 13:throw u.prev=13,u.t0=u["catch"](5),console.warn(u.t0),u.t0;case 17:case"end":return u.stop()}}),u,this,[[5,13]])})),n=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){ht(i,n,o,a,u,"next",t)}function u(t){ht(i,n,o,a,u,"throw",t)}a(undefined)}))},function(t){return n.apply(this,arguments)})},{key:"getCreateMethodData",value:function(){return{actionName:"create",method:jt}}},{key:"getDeleteMethodData",value:function(){return{actionName:"delete",method:wt}}},{key:"getReadMethodData",value:function(){return{actionName:"read",method:Ot}}},{key:"getUpdateMethodData",value:function(){return{actionName:"update",method:xt}}},{key:"isAuthenticationFailedError",value:function(t){return!1}},{key:"isSessionExpiredError",value:function(t){return!1}}]),a}(lt.ApiTransport);function Rt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=rt(t);if(e){var o=rt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return et(this,r)}}var Dt=function(t){Z(r,t);var e=Rt(r);function r(t){var n=t.getExtraRequestData,i=t.voidClient;return o(this,r),e.call(this,{authenticator:new pt,realtimeTransport:new yt,transport:new Tt({getExtraRequestData:n,voidClient:i})})}return c(r)}(lt.ApiWrapper);function Lt(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function _t(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function It(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?_t(Object(r),!0).forEach((function(e){y(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):_t(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ct={key:"redux-store"};function qt(t){var e=t.apiDuckCreator,r=t.defaultDucks,n=t.defaultName,o=t.duckNames,i=t.name,a=t.params,u=function(t,e,r){var n=null==t?void 0:t[e];return n||(n===undefined?r:null)}(o,i,n);if(!u)return null;var c=e.createDuck(It(It({},a),{},{name:u}));return r[u]=c,c}var Nt=new WeakMap,Wt=new WeakMap,Mt=new WeakMap,Ft=new WeakMap,Ut=function(){function t(e){var i=this,a=e.createDucks,u=void 0===a?function(){return[]}:a,c=e.createSagas,s=void 0===c?function(){return[]}:c,l=e.duckNames,f=void 0===l?{}:l,y=e.namespace,O=void 0===y?"void":y,x=e.project,j=e.reduxCompose,k=void 0===j?b.compose:j,S=e.reduxPersistConfig,A=void 0===S?{}:S,P=e.voidClientConfig,E=void 0===P?{}:P;o(this,t),Lt(this,Nt,{writable:!0,value:null}),Lt(this,Wt,{writable:!0,value:null}),Lt(this,Mt,{writable:!0,value:null}),Lt(this,Ft,{writable:!0,value:null});var T=new m.VoidClient(It(It({},E),{},{project:x}));d(this,Ft,T);var R=new Dt({voidClient:T,getExtraRequestData:function(){return p(i,Mt).getState()}}),D=new st({apiWrapper:R,namespace:O}),L={},_=qt({apiDuckCreator:D,defaultDucks:L,duckNames:f,defaultName:"currentUser",name:"currentUser",params:{actions:[{handle:function(t){return It(It({},t),{},{isInitialized:!0})},name:"initialize"}],reducerOptions:{customInitialState:{isInitialized:!1},type:ct}}}),I=u((function(){return D.createDuck.apply(D,arguments)})).reduce((function(t,e){return t[e.name]=e,t}),L);d(this,Nt,I);var C=(0,b.combineReducers)(Object.entries(I).reduce((function(t,e){var r=n(e,2),o=r[0],i=r[1];return t[o]=i.reducer,t}),{})),q=w["default"](),N=(0,g.persistReducer)(It(It({},Ct),A),C);d(this,Mt,(0,b.createStore)(N,k((0,b.applyMiddleware)(q)))),d(this,Wt,(0,g.persistStore)(p(this,Mt)));var W=[];_&&W.push(h.mark((function M(){var t,e,r;return h.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=w.eventChannel((function(t){var e=function(e){t({currentUser:e})};return T.auth.on("currentUserChange",e),function(){T.auth.removeListener("currentUserChange",e)}}));case 1:return n.next=3,U(t);case 3:return e=n.sent,r=e.currentUser,n.next=7,B(_.actions.setItem(r));case 7:n.next=1;break;case 9:case"end":return n.stop()}}),M)})),h.mark((function G(){var t;return h.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,Q(g.REHYDRATE,h.mark((function r(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,z([T.auth,T.auth.getCurrentUser]);case 2:case"end":return t.stop()}}),r)})));case 2:return t=e.sent,e.next=5,B(_.actions.setItem(t));case 5:return e.next=7,B(_.actions.initialize());case 7:case"end":return e.stop()}}),G)}))),q.run(h.mark((function H(){return h.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e=[(0,v.apiSaga)()].concat(r(W.map((function(t){return t()}))),r(s(I).map((function(t){return t()})))),n=void 0,(n=F("ALL",e)).combinator=!0,n;case 2:case"end":return t.stop()}var e,n}),H)})))}return c(t,[{key:"ducks",get:function(){return p(this,Nt)}},{key:"persistor",get:function(){return p(this,Wt)}},{key:"store",get:function(){return p(this,Mt)}},{key:"voidClient",get:function(){return p(this,Ft)}}]),t}()})(),l})()));
!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e(require("@ololoepepe/api-redux-bindings"),require("@voidwalkers/void-client"),require("redux"),require("redux-persist"),require("redux-saga"),require("@ololoepepe/reducers"),require("@ololoepepe/api-wrapper")):"function"==typeof define&&define.amd?define(["@ololoepepe/api-redux-bindings","@voidwalkers/void-client","redux","redux-persist","redux-saga","@ololoepepe/reducers","@ololoepepe/api-wrapper"],e):"object"==typeof exports?exports.voidRedux=e(require("@ololoepepe/api-redux-bindings"),require("@voidwalkers/void-client"),require("redux"),require("redux-persist"),require("redux-saga"),require("@ololoepepe/reducers"),require("@ololoepepe/api-wrapper")):t.voidRedux=e(t["@ololoepepe/api-redux-bindings"],t["@voidwalkers/void-client"],t.redux,t["redux-persist"],t["redux-saga"],t["@ololoepepe/reducers"],t["@ololoepepe/api-wrapper"])}(self,((t,e,r,n,o,i,a)=>(()=>{var u={535:e=>{"use strict";e.exports=t},22:t=>{"use strict";t.exports=a},558:t=>{"use strict";t.exports=i},39:t=>{"use strict";t.exports=e},580:t=>{"use strict";t.exports=r},85:t=>{"use strict";t.exports=n},655:t=>{"use strict";t.exports=o},61:(t,e,r)=>{var n=r(698)["default"];function o(){"use strict";t.exports=o=function(){return r},t.exports.__esModule=!0,t.exports["default"]=t.exports;var e,r={},i=Object.prototype,a=i.hasOwnProperty,u=Object.defineProperty||function(t,e,r){t[e]=r.value},c="function"==typeof Symbol?Symbol:{},l=c.iterator||"@@iterator",s=c.asyncIterator||"@@asyncIterator",f=c.toStringTag||"@@toStringTag";function p(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{p({},"")}catch(e){p=function(t,e,r){return t[e]=r}}function d(t,e,r,n){var o=e&&e.prototype instanceof w?e:w,i=Object.create(o.prototype),a=new _(n||[]);return u(i,"_invoke",{value:T(t,r,a)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}r.wrap=d;var h="suspendedStart",v="suspendedYield",m="executing",b="completed",g={};function w(){}function O(){}function x(){}var j={};p(j,l,(function(){return this}));var k=Object.getPrototypeOf,S=k&&k(k(I([])));S&&S!==i&&a.call(S,l)&&(j=S);var P=x.prototype=w.prototype=Object.create(j);function A(t){["next","throw","return"].forEach((function(e){p(t,e,(function(t){return this._invoke(e,t)}))}))}function E(t,e){function r(o,i,u,c){var l=y(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==n(f)&&a.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var o;u(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,o){r(t,n,e,o)}))}return o=o?o.then(i,i):i()}})}function T(t,r,n){var o=h;return function(i,a){if(o===m)throw new Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:e,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=R(u,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=y(t,r,n);if("normal"===l.type){if(o=n.done?b:v,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=b,n.method="throw",n.arg=l.arg)}}}function R(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator["return"]&&(r.method="return",r.arg=e,R(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var i=y(o,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,g;var a=i.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function D(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function _(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(D,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[l];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,i=function r(){for(;++o<t.length;)if(a.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return i.next=i}}throw new TypeError(n(t)+" is not iterable")}return O.prototype=x,u(P,"constructor",{value:x,configurable:!0}),u(x,"constructor",{value:O,configurable:!0}),O.displayName=p(x,f,"GeneratorFunction"),r.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===O||"GeneratorFunction"===(e.displayName||e.name))},r.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,x):(t.__proto__=x,p(t,f,"GeneratorFunction")),t.prototype=Object.create(P),t},r.awrap=function(t){return{__await:t}},A(E.prototype),p(E.prototype,s,(function(){return this})),r.AsyncIterator=E,r.async=function(t,e,n,o,i){void 0===i&&(i=Promise);var a=new E(d(t,e,n,o),i);return r.isGeneratorFunction(e)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},A(P),p(P,f,"Generator"),p(P,l,(function(){return this})),p(P,"toString",(function(){return"[object Generator]"})),r.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function o(){for(;r.length;){var t=r.pop();if(t in e)return o.value=t,o.done=!1,o}return o.done=!0,o}},r.values=I,_.prototype={constructor:_,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(L),!t)for(var r in this)"t"===r.charAt(0)&&a.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function n(n,o){return u.type="throw",u.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var o=this.tryEntries.length-1;o>=0;--o){var i=this.tryEntries[o],u=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var c=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(c&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(c){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&a.call(n,"finallyLoc")&&this.prev<n.finallyLoc){var o=n;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=t,i.arg=e,o?(this.method="next",this.next=o.finallyLoc,g):this.complete(i)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),g},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),g}},"catch":function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},r}t.exports=o,t.exports.__esModule=!0,t.exports["default"]=t.exports},698:t=>{function e(r){return t.exports=e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports["default"]=t.exports,e(r)}t.exports=e,t.exports.__esModule=!0,t.exports["default"]=t.exports},687:(t,e,r)=>{var n=r(61)();t.exports=n;try{regeneratorRuntime=n}catch(o){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}}},c={};function l(t){var e=c[t];if(e!==undefined)return e.exports;var r=c[t]={exports:{}};return u[t](r,r.exports,l),r.exports}l.d=(t,e)=>{for(var r in e)l.o(e,r)&&!l.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},l.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),l.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var s={};return(()=>{"use strict";function t(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function e(e,r){if(e){if("string"==typeof e)return t(e,r);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?t(e,r):void 0}}function r(r){return function(e){if(Array.isArray(e))return t(e)}(r)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||e(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(t,r){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,i,a,u=[],c=!0,l=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=i.call(r)).done)&&(u.push(n.value),u.length!==e);c=!0);}catch(t){l=!0,o=t}finally{try{if(!c&&null!=r["return"]&&(a=r["return"](),Object(a)!==a))return}finally{if(l)throw o}}return u}}(t,r)||e(t,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(t,e){if(null==t)return{};var r,n,o=function(t,e){if(null==t)return{};var r,n,o={},i=Object.keys(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||(o[r]=t[r]);return o}(t,e);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(n=0;n<i.length;n++)r=i[n],e.indexOf(r)>=0||Object.prototype.propertyIsEnumerable.call(t,r)&&(o[r]=t[r])}return o}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t){var e=function(t,e){if("object"!==a(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(r!==undefined){var n=r.call(t,e||"default");if("object"!==a(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"===a(e)?e:String(e)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function f(t,e,r){return e&&c(t.prototype,e),r&&c(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function p(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function d(t,e){return function(t,e){return e.get?e.get.call(t):e.value}(t,p(t,e,"get"))}function y(t,e,r){return function(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}(t,p(t,e,"set"),r),r}function h(t,e,r){return(e=u(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}l.r(s),l.d(s,{VoidRedux:()=>Gt});var v=l(687),m=l(535),b=l(39),g=l(580),w=l(85),O=l(655),x=function(t){return"@@redux-saga/"+t},j=x("IO"),k=x("MULTICAST"),S=x("SELF_CANCELLATION"),P=function(t){return null!==t&&t!==undefined},A=function(t){return"function"==typeof t},E=function(t){return"string"==typeof t},T=Array.isArray,R=function zt(t){return t&&(E(t)||_(t)||A(t)||T(t)&&t.every(zt))},D=function(t){return t&&A(t.take)&&A(t.close)},L=function(t){return A(t)&&t.hasOwnProperty("toString")},_=function(t){return Boolean(t)&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype},I=function(t){return D(t)&&t[k]};"function"==typeof Symbol&&Symbol.asyncIterator&&Symbol.asyncIterator;var C=function(t){throw t},q=function(t){return{value:t,done:!0}};var N="TAKE",W="CALL",M="FORK",U="CANCEL",F=function(t,e){var r;return(r={})[j]=!0,r.combinator=!1,r.type=t,r.payload=e,r};function B(t,e){return void 0===t&&(t="*"),R(t)?(P(e)&&console.warn("take(pattern) takes one argument but two were provided. Consider passing an array for listening to several action types"),F(N,{pattern:t})):I(t)&&P(e)&&R(e)?F(N,{channel:t,pattern:e}):D(t)?(P(e)&&console.warn("take(channel) takes one argument but two were provided. Second argument is ignored."),F(N,{channel:t})):void 0}function G(t,e){var r;return(null===(r=e)||r===undefined)&&(e=t,t=undefined),F("PUT",{channel:t,action:e})}function z(t,e){var r,n=null;return A(t)?r=t:(T(t)?(n=t[0],r=t[1]):(n=t.context,r=t.fn),n&&E(r)&&A(n[r])&&(r=n[r])),{context:n,fn:r,args:e}}function H(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return F(W,z(t,r))}function Y(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return F(M,z(t,r))}var K=function(t){return{done:!0,value:t}},V={};function $(t){return D(t)?"channel":L(t)?String(t):A(t)?t.name:String(t)}function J(t,e,r){var n,o,i,a=e;function u(e,r){if(a===V)return K(e);if(r&&!o)throw a=V,r;n&&n(e);var u=r?t[o](r):t[a]();return a=u.nextState,i=u.effect,n=u.stateUpdater,o=u.errorState,a===V?K(e):i}return function(t,e,r){void 0===e&&(e=C),void 0===r&&(r="iterator");var n={meta:{name:r},next:t,"throw":e,"return":q,isSagaIterator:!0};return"undefined"!=typeof Symbol&&(n[Symbol.iterator]=function(){return n}),n}(u,(function(t){return u(null,t)}),r)}function Q(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];var i,a,u={done:!1,value:B(t)},c=function(t){return{done:!1,value:Y.apply(void 0,[e].concat(n,[t]))}},l=function(t){return{done:!1,value:(e=t,void 0===e&&(e=S),F(U,e))};var e},s=function(t){return i=t},f=function(t){return a=t};return J({q1:function(){return{nextState:"q2",effect:u,stateUpdater:f}},q2:function(){return i?{nextState:"q3",effect:l(i)}:{nextState:"q1",effect:c(a),stateUpdater:s}},q3:function(){return{nextState:"q1",effect:c(a),stateUpdater:s}}},"q1","takeLatest("+$(t)+", "+e.name+")")}function X(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),o=2;o<r;o++)n[o-2]=arguments[o];return Y.apply(void 0,[Q,t,e].concat(n))}function Z(t,e){return Z=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Z(t,e)}function tt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Z(t,e)}function et(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function rt(t,e){if(e&&("object"===a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return et(t)}function nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nt(t)}var ot=l(558);function it(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function at(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?it(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function ut(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nt(t);if(e){var o=nt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rt(this,r)}}var ct="grouped_list",lt="single",st=function(t){tt(r,t);var e=ut(r);function r(t){var n=t.apiWrapper,o=t.namespace;return i(this,r),e.call(this,{apiWrapper:n,namespace:o})}return f(r,[{key:"createActions",value:function(t){var e=t.namespace,r=t.reducerOptions,n=[this.createAction(e,"setFetched"),this.createAction(e,"setFetching")];return r.type===lt?n.push(this.createAction(e,"setItem")):n.push(this.createAction(e,"setPage")),n}},{key:"createApiActions",value:function(){return[]}},{key:"createReducer",value:function(t){var e=t.actionHandlers,r=t.actions,n=t.reducerOptions,o={changeItem:r[m.ActionType.ChangeItem].actionType,clear:r[m.ActionType.Clear].actionType,create:r[m.ApiActionType.Create].actionType,"delete":r[m.ApiActionType.Delete].actionType,read:r[m.ApiActionType.Read].actionType,removeItem:r[m.ActionType.RemoveItem].actionType,setFetched:r.setFetched.actionType,setFetching:r.setFetching.actionType,update:r[m.ApiActionType.Update].actionType},i=null;return n.type===lt?(o.setItem=r.setItem.actionType,i=ot.createEntityReducer):(Object.assign(o,{addItem:r[m.ActionType.AddItem].actionType,addItems:r[m.ActionType.AddItems].actionType,changeItems:r[m.ActionType.ChangeItems].actionType,setPage:r.setPage.actionType}),i=n.type===ct?ot.createGroupedEntityListReducer:ot.createEntityListReducer),i(o,at(at({getIdFromEntity:function(t){return t._id},getIdFromPayload:function(t){return t._id},getSourceAction:function(t){var e=t.action,r=e.payload;return e.type.endsWith("/".concat(o.update.ACTION))?at(at({},r),{},{data:{}}):r}},n),{},{customHandlers:at(at({},e),null==n?void 0:n.customHandlers)}))}}]),r}(m.ApiDuckCreator),ft=l(22);function pt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nt(t);if(e){var o=nt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rt(this,r)}}var dt=function(t){tt(r,t);var e=pt(r);function r(){return i(this,r),e.apply(this,arguments)}return f(r,[{key:"authenticate",value:function(){}},{key:"loadAuthenticationData",value:function(){}},{key:"saveAuthenticationData",value:function(){}}]),r}(ft.ApiAuthenticator);function yt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nt(t);if(e){var o=nt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rt(this,r)}}var ht=function(t){tt(r,t);var e=yt(r);function r(){return i(this,r),e.apply(this,arguments)}return f(r,[{key:"connect",value:function(){}},{key:"disconnect",value:function(){}},{key:"subscribe",value:function(){}},{key:"unsubscribe",value:function(){}}]),r}(ft.ApiRealtimeTransport);function vt(t,e,r,n,o,i,a){try{var u=t[i](a),c=u.value}catch(l){return void r(l)}u.done?e(c):Promise.resolve(c).then(n,o)}function mt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nt(t);if(e){var o=nt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rt(this,r)}}function bt(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function gt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function wt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?gt(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gt(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Ot="deleteOne",xt="find",jt="findOneAndUpdate",kt="insertOne";function St(t,e,r){var n,o,i,a=t.apiWrapperOptions,u=t.methodData,c=t.payload,l=u.actionName,s=u.method;return[null==c?void 0:c[e],null==a||null===(n=a[l])||void 0===n?void 0:n[e],null==a||null===(o=a[s])||void 0===o?void 0:o[e],null==a||null===(i=a["default"])||void 0===i?void 0:i[e],r].find((function(t){return t!==undefined}))}function Pt(t){var e=t.apiWrapperOptions,r=t.method,n=t.methodData,o=t.payload;switch(r){case Ot:return[St({apiWrapperOptions:e,methodData:n,payload:o},"filter")];case xt:return[St({apiWrapperOptions:e,methodData:n,payload:o},"filter",{}),St({apiWrapperOptions:e,methodData:n,payload:o},"options",{})];case jt:return[St({apiWrapperOptions:e,methodData:n,payload:o},"filter"),St({apiWrapperOptions:e,methodData:n,payload:o},"data"),St({apiWrapperOptions:e,methodData:n,payload:o},"options",{})];case kt:return[St({apiWrapperOptions:e,methodData:n,payload:o},"data")]}}function At(t,e){var r;switch(t){case Ot:if(e.deletedCount<1)throw new Error("Not found");return{};case xt:return{data:{count_total:(null===(r=e[0].count[0])||void 0===r?void 0:r.total)||0,items:e[0].data}};case jt:if(!e.ok)throw new Error("Not found");return{data:{item:wt({},e.value)}};case kt:return{data:{item:{_id:e.insertedId}}};default:return e}}var Et=new WeakMap,Tt=new WeakMap,Rt=function(t){tt(a,t);var e,n,o=mt(a);function a(t){var e,r=t.getExtraRequestData,n=t.voidClient;return i(this,a),bt(et(e=o.call(this)),Et,{writable:!0,value:null}),bt(et(e),Tt,{writable:!0,value:null}),y(et(e),Et,r),y(et(e),Tt,n),e}return f(a,[{key:"callMethod",value:(e=v.mark((function u(t){var e,n,o,i,a,c,l,s,f,p;return v.wrap((function(u){for(;;)switch(u.prev=u.next){case 0:return e=t.methodData,n=t.requestData,o=n.apiWrapperOptions,i=n.payload,a=St({apiWrapperOptions:o,methodData:e,payload:i},"collectionName"),c=St({apiWrapperOptions:o,methodData:e,payload:i},"method",e.method),l=d(this,Et).call(this),u.prev=5,f=Pt({apiWrapperOptions:o,method:c,methodData:e,payload:i}),u.next=9,(s=d(this,Tt).mongo.collection(a))[c].apply(s,r(f.map((function(t){return"function"==typeof t?t(i,l):t}))));case 9:return p=u.sent,u.abrupt("return",At(c,p));case 13:throw u.prev=13,u.t0=u["catch"](5),console.warn(u.t0),u.t0;case 17:case"end":return u.stop()}}),u,this,[[5,13]])})),n=function(){var t=this,r=arguments;return new Promise((function(n,o){var i=e.apply(t,r);function a(t){vt(i,n,o,a,u,"next",t)}function u(t){vt(i,n,o,a,u,"throw",t)}a(undefined)}))},function(t){return n.apply(this,arguments)})},{key:"getCreateMethodData",value:function(){return{actionName:"create",method:kt}}},{key:"getDeleteMethodData",value:function(){return{actionName:"delete",method:Ot}}},{key:"getReadMethodData",value:function(){return{actionName:"read",method:xt}}},{key:"getUpdateMethodData",value:function(){return{actionName:"update",method:jt}}},{key:"isAuthenticationFailedError",value:function(t){return!1}},{key:"isSessionExpiredError",value:function(t){return!1}}]),a}(ft.ApiTransport);function Dt(t){var e=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}();return function(){var r,n=nt(t);if(e){var o=nt(this).constructor;r=Reflect.construct(n,arguments,o)}else r=n.apply(this,arguments);return rt(this,r)}}var Lt=function(t){tt(r,t);var e=Dt(r);function r(t){var n=t.getExtraRequestData,o=t.voidClient;return i(this,r),e.call(this,{authenticator:new dt,realtimeTransport:new ht,transport:new Rt({getExtraRequestData:n,voidClient:o})})}return f(r)}(ft.ApiWrapper),_t=["clear"];function It(t,e,r){!function(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}(t,e),e.set(t,r)}function Ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function qt(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?Ct(Object(r),!0).forEach((function(e){h(t,e,r[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}var Nt={key:"redux-store"};function Wt(t){var e=t.apiDuckCreator,r=t.defaultDucks,n=t.defaultName,o=t.duckNames,i=t.name,a=t.params,u=function(t,e,r){var n=null==t?void 0:t[e];return n||(n===undefined?r:null)}(o,i,n);if(!u)return null;var c=e.createDuck(qt(qt({},a),{},{name:u}));return r[u]=c,c}var Mt=new WeakMap,Ut=new WeakMap,Ft=new WeakMap,Bt=new WeakMap,Gt=function(){function t(e){var a=this,u=e.createDucks,c=void 0===u?function(){return[]}:u,l=e.createSagas,s=void 0===l?function(){return[]}:l,f=e.duckNames,p=void 0===f?{}:f,h=e.namespace,x=void 0===h?"void":h,j=e.project,k=e.reduxCompose,S=void 0===k?g.compose:k,P=e.reduxPersistConfig,A=void 0===P?{}:P,E=e.voidClientConfig,T=void 0===E?{}:E;i(this,t),It(this,Mt,{writable:!0,value:null}),It(this,Ut,{writable:!0,value:null}),It(this,Ft,{writable:!0,value:null}),It(this,Bt,{writable:!0,value:null});var R=new b.VoidClient(qt(qt({},T),{},{project:j}));y(this,Bt,R);var D=new Lt({voidClient:R,getExtraRequestData:function(){return d(a,Ft).getState()}}),L=new st({apiWrapper:D,namespace:x}),_={},I=Wt({apiDuckCreator:L,defaultDucks:_,duckNames:p,defaultName:"currentUser",name:"currentUser",params:{actions:[{handle:function(t){return qt(qt({},t),{},{isInitialized:!0})},name:"initialize"}],reducerOptions:{customInitialState:{isInitialized:!1},mapItem:function(t){t.clear;var e=o(t,_t);return Object.keys(e).length<1?null:e},type:lt}}}),C=c((function(){return L.createDuck.apply(L,arguments)})).reduce((function(t,e){return t[e.name]=e,t}),_);y(this,Mt,C);var q=(0,g.combineReducers)(Object.entries(C).reduce((function(t,e){var r=n(e,2),o=r[0],i=r[1];return t[o]=i.reducer,t}),{})),N=O["default"](),W=(0,w.persistReducer)(qt(qt({},Nt),A),q);y(this,Ft,(0,g.createStore)(W,S((0,g.applyMiddleware)(N)))),y(this,Ut,(0,w.persistStore)(d(this,Ft)));var M=[];I&&M.push(v.mark((function U(){var t,e,r;return v.wrap((function(n){for(;;)switch(n.prev=n.next){case 0:t=O.eventChannel((function(t){var e=function(e){t({currentUser:e})};return R.auth.on("currentUserChange",e),function(){R.auth.removeListener("currentUserChange",e)}}));case 1:return n.next=3,B(t);case 3:return e=n.sent,r=e.currentUser,n.next=7,G(I.actions.setItem({currentUser:r,clear:!0}));case 7:n.next=1;break;case 9:case"end":return n.stop()}}),U)})),v.mark((function z(){var t;return v.wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,X(w.REHYDRATE,v.mark((function r(){return v.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,H([R.auth,R.auth.getCurrentUser]);case 2:case"end":return t.stop()}}),r)})));case 2:return t=e.sent,e.next=5,G(I.actions.setItem({currentUser:t,clear:!0}));case 5:return e.next=7,G(I.actions.initialize());case 7:case"end":return e.stop()}}),z)}))),N.run(v.mark((function Y(){return v.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,e=[(0,m.apiSaga)()].concat(r(M.map((function(t){return t()}))),r(s(C).map((function(t){return t()})))),n=void 0,(n=F("ALL",e)).combinator=!0,n;case 2:case"end":return t.stop()}var e,n}),Y)})))}return f(t,[{key:"ducks",get:function(){return d(this,Mt)}},{key:"persistor",get:function(){return d(this,Ut)}},{key:"store",get:function(){return d(this,Ft)}},{key:"voidClient",get:function(){return d(this,Bt)}}]),t}()})(),s})()));
//# sourceMappingURL=index.browser.js.map
{
"name": "@voidwalkers/void-redux",
"version": "0.1.25",
"version": "0.1.26",
"description": "Redux-based client lib for Void Walkers Void",

@@ -5,0 +5,0 @@ "main": "dist/index.browser.js",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc