Comparing version 0.1.11 to 0.1.12
@@ -104,3 +104,3 @@ 'use strict'; | ||
return function (next) { | ||
return async function (action) { | ||
return function (action) { | ||
var workerName = getWorkerName(action); | ||
@@ -119,6 +119,7 @@ if (workerName) { | ||
if ((0, _util.isPromise)(result)) { | ||
var asyncResult = await result; | ||
if ((0, _prop2['default'])('type', asyncResult)) { | ||
dispatch(asyncResult); | ||
} | ||
result.then(function (asyncResult) { | ||
if ((0, _prop2['default'])('type', asyncResult)) { | ||
dispatch(asyncResult); | ||
} | ||
}); | ||
} else if ((0, _prop2['default'])('type', result)) { | ||
@@ -125,0 +126,0 @@ dispatch(result); |
@@ -1,1 +0,1 @@ | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.attadux={})}(this,function(t){"use strict";var n=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]};var r=function(t){return function r(e){return 0===arguments.length||n(e)?r:t.apply(this,arguments)}};var e=function(t){return function e(u,o){switch(arguments.length){case 0:return e;case 1:return n(u)?e:r(function(n){return t(u,n)});default:return n(u)&&n(o)?e:n(u)?r(function(n){return t(n,o)}):n(o)?r(function(n){return t(u,n)}):t(u,o)}}},u=e(function(t,n){return t.apply(this,n)});var o=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,o){return n.apply(this,arguments)};case 6:return function(t,r,e,u,o,i){return n.apply(this,arguments)};case 7:return function(t,r,e,u,o,i,a){return n.apply(this,arguments)};case 8:return function(t,r,e,u,o,i,a,c){return n.apply(this,arguments)};case 9:return function(t,r,e,u,o,i,a,c,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,o,i,a,c,f,s){return n.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}};var i=function t(r,e,u){return function(){for(var i=[],a=0,c=r,f=0;e.length>f||arguments.length>a;){var s;f>=e.length||n(e[f])&&arguments.length>a?(s=arguments[a],a+=1):s=e[f],i[f]=s,n(s)||(c-=1),f+=1}return c>0?o(c,t(r,i,u)):u.apply(this,i)}},a=e(function(t,n){return 1===t?r(n):o(t,i(t,[],n))}),c=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};var f=function(t){return"function"==typeof t["@@transducer/step"]};var s=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!c(u)){for(var o=0;t.length>o;){if("function"==typeof u[t[o]])return u[t[o]].apply(u,e);o+=1}if(f(u))return n.apply(null,e)(u)}return r.apply(this,arguments)}};var l=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u};var p=function(t){return"[object String]"===Object.prototype.toString.call(t)},y=r(function(t){return!!c(t)||!!t&&("object"==typeof t&&(!p(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),h=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},t}();var d=function(t){return new h(t)},v=e(function(t,n){return o(t.length,function(){return t.apply(n,arguments)})});function g(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function b(t,n,r,e){return t["@@transducer/result"](r[e](v(t["@@transducer/step"],t),n))}var m="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";var j=function(t,n,r){if("function"==typeof t&&(t=d(t)),y(r))return function(t,n,r){for(var e=0,u=r.length;u>e;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}(t,n,r);if("function"==typeof r["fantasy-land/reduce"])return b(t,n,r,"fantasy-land/reduce");if(null!=r[m])return g(t,n,r[m]());if("function"==typeof r.next)return g(t,n,r);if("function"==typeof r.reduce)return b(t,n,r,"reduce");throw new TypeError("reduce: list must be array or iterable")},O=function(){return this.xf["@@transducer/init"]()},S=function(t){return this.xf["@@transducer/result"](t)},w=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=S,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},t}(),A=e(function(t,n){return new w(t,n)});var x=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},E=Object.prototype.toString,k=function(){return"[object Arguments]"===E.call(arguments)?function(t){return"[object Arguments]"===E.call(t)}:function(t){return x("callee",t)}},_=!{toString:null}.propertyIsEnumerable("toString"),P=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],N=function(){return arguments.propertyIsEnumerable("length")}(),C=function(t,n){for(var r=0;t.length>r;){if(t[r]===n)return!0;r+=1}return!1},F=r("function"!=typeof Object.keys||N?function(t){if(Object(t)!==t)return[];var n,r,e=[],u=N&&k(t);for(n in t)!x(n,t)||u&&"length"===n||(e[e.length]=n);if(_)for(r=P.length-1;r>=0;)x(n=P[r],t)&&!C(e,n)&&(e[e.length]=n),r-=1;return e}:function(t){return Object(t)!==t?[]:Object.keys(t)}),M=e(s(["fantasy-land/map","map"],A,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return a(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return j(function(r,e){return r[e]=t(n[e]),r},{},F(n));default:return l(t,n)}})),q=e(function(t,n){return n>t?n:t}),T=e(function(t,n){for(var r=n,e=0;t.length>e;){if(null==r)return;r=r[t[e]],e+=1}return r}),L=e(function(t,n){return T([t],n)}),U=e(function(t,n){return M(L(t),n)});var I=function(t){return function u(o,i,a){switch(arguments.length){case 0:return u;case 1:return n(o)?u:e(function(n,r){return t(o,n,r)});case 2:return n(o)&&n(i)?u:n(o)?e(function(n,r){return t(n,i,r)}):n(i)?e(function(n,r){return t(o,n,r)}):r(function(n){return t(o,i,n)});default:return n(o)&&n(i)&&n(a)?u:n(o)&&n(i)?e(function(n,r){return t(n,r,a)}):n(o)&&n(a)?e(function(n,r){return t(n,i,r)}):n(i)&&n(a)?e(function(n,r){return t(o,n,r)}):n(o)?r(function(n){return t(n,i,a)}):n(i)?r(function(n){return t(o,n,a)}):n(a)?r(function(n){return t(o,i,n)}):t(o,i,a)}}},R=I(j),D=r(function(t){for(var n=F(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),z=r(function t(n){return n=M(function(n){return"function"==typeof n?n:t(n)},n),a(R(q,0,U("length",D(n))),function(){var t=arguments;return M(function(n){return u(n,t)},n)})}),B=r(function(t){return a(t.length,t)}),V=e(x),$=Number.isInteger||function(t){return t<<0===t},W=I(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),Z=r(function(t){return null==t}),G=I(function t(n,r,e){if(0===n.length)return r;var u=n[0];if(n.length>1){var o=!Z(e)&&x(u,e)?e[u]:$(n[1])?[]:{};r=t(Array.prototype.slice.call(n,1),r,o)}if($(u)&&c(e)){var i=[].concat(e);return i[u]=r,i}return W(u,r,e)}),H=e(function(t,n){return n(t)});var X=function(t){return"[object Object]"===Object.prototype.toString.call(t)},J=r(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():c(t)?[]:p(t)?"":X(t)?{}:k(t)?function(){return arguments}():void 0});var K=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r};var Y=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1};var Q=function(t){var n=(t+"").match(/^function (\w*)/);return null==n?"":n[1]},tt=e(function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}),nt=r(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function rt(t,n,r,e){var u=K(t),o=K(n);function i(t,n){return et(t,n,r.slice(),e.slice())}return!Y(function(t,n){return!Y(i,n,t)},o,u)}function et(t,n,r,e){if(tt(t,n))return!0;var u=nt(t);if(u!==nt(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===Q(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!tt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!tt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var o=r.length-1;o>=0;){if(r[o]===t)return e[o]===n;o-=1}switch(u){case"Map":return t.size===n.size&&rt(t.entries(),n.entries(),r.concat([t]),e.concat([n]));case"Set":return t.size===n.size&&rt(t.values(),n.values(),r.concat([t]),e.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var i=F(t);if(i.length!==F(n).length)return!1;var a=r.concat([t]),c=e.concat([n]);for(o=i.length-1;o>=0;){var f=i[o];if(!x(f,n)||!et(n[f],t[f],a,c))return!1;o-=1}return!0}var ut=et,ot=e(function(t,n){return ut(t,n,[],[])}),it=r(function(t){return null!=t&&ot(t,J(t))}),at=I(function(t,n,r){return t(r[n])}),ct=B(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),ft=I(function(t,n,r){return n.length>0&&t(T(n,r))}),st=I(function(t,n,r){return ot(n,r[t])}),lt=I(function(t,n,r){return t(r)?r:n(r)}),pt=I(function(t,n,r){return t(r)?n(r):r}),yt=e(function(t,n){for(var r={},e=0;t.length>e;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),ht=e(function t(n,r){var e,u,o,i={};for(u in r)i[u]="function"===(o=typeof(e=n[u]))?e(r[u]):e&&"object"===o?t(e,r[u]):r[u];return i}),dt=I(function(t,n,r){var e,u={};for(e in n)x(e,n)&&(u[e]=x(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)x(e,r)&&!x(e,u)&&(u[e]=r[e]);return u}),vt=I(function t(n,r,e){return dt(function(r,e,u){return X(e)&&X(u)?t(n,e,u):n(r,e,u)},r,e)}),gt=e(function(t,n){return vt(function(t,n,r){return r},t,n)}),bt=e(function(t,n){return a(R(q,0,U("length",n)),function(){var r=arguments,e=this;return t.apply(e,l(function(t){return t.apply(e,r)},n))})}),mt=e(function(t,n){var r={};return r[t]=n,r});var jt=function(t,n){var r,e=(t=t||[]).length,u=(n=n||[]).length,o=[];for(r=0;e>r;)o[o.length]=t[r],r+=1;for(r=0;u>r;)o[o.length]=n[r],r+=1;return o},Ot=e(function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:j(function(t,r){return jt(t,M(r,n))},[],t)});var St=r(function(t){return[t]});var wt="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var o in u)x(o,u)&&(n[o]=u[o]);r+=1}return n},At=r(function(t){return wt.apply(null,[{}].concat(t))});var xt=function(t){return"[object Function]"===Object.prototype.toString.call(t)};var Et=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;t.length>r;){if(0===(u=t[r])&&1/u===e)return r;r+=1}return-1}if(n!=n){for(;t.length>r;){if("number"==typeof(u=t[r])&&u!=u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;t.length>r;){if(ot(t[r],n))return r;r+=1}return-1};var kt=function(t,n){return Et(n,t,0)>=0};var _t=function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'},Pt=function(t){return(10>t?"0":"")+t},Nt="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Pt(t.getUTCMonth()+1)+"-"+Pt(t.getUTCDate())+"T"+Pt(t.getUTCHours())+":"+Pt(t.getUTCMinutes())+":"+Pt(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var Ct=function(t){return function(){return!t.apply(this,arguments)}};var Ft=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},Mt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=S,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},t}(),qt=e(s(["filter"],e(function(t,n){return new Mt(t,n)}),function(t,n){return X(n)?j(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},F(n)):Ft(t,n)})),Tt=e(function(t,n){return qt(Ct(t),n)});var Lt=function t(n,r){var e=function(e){var u=r.concat([n]);return kt(e,u)?"<Circular>":t(e,u)},u=function(t,n){return l(function(n){return _t(n)+": "+e(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(n)){case"[object Arguments]":return"(function() { return arguments; }("+l(e,n).join(", ")+"))";case"[object Array]":return"["+l(e,n).concat(u(n,Tt(function(t){return/^\d+$/.test(t)},F(n)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof n?"new Boolean("+e(n.valueOf())+")":""+n;case"[object Date]":return"new Date("+(isNaN(n.valueOf())?e(NaN):_t(Nt(n)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof n?"new Number("+e(n.valueOf())+")":1/n==-1/0?"-0":n.toString(10);case"[object String]":return"object"==typeof n?"new String("+e(n.valueOf())+")":_t(n);case"[object Undefined]":return"undefined";default:if("function"==typeof n.toString){var o=""+n;if("[object Object]"!==o)return o}return"{"+u(n,F(n)).join(", ")+"}"}},Ut=r(function(t){return Lt(t,[])}),It=e(function(t,n){return a(t+1,function(){var r=arguments[t];if(null!=r&&xt(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(Ut(r)+' does not have a method named "'+n+'"')})}),Rt=It(1,"split"),Dt=e(function(t,n){var r=0>t?n.length+t:t;return p(n)?n.charAt(r):n[r]}),zt=Dt(0),Bt=e(function(t,n){var r=a(t,n);return a(t,function(){return j(Ot,M(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Vt=r(function(t){return Bt(t.length,t)}),$t=e(function(t,n){return t||n}),Wt=e(function(t,n){return xt(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:Vt($t)(t,n)}),Zt=r(function(t){return function(){return t}}),Gt={"@@functional/placeholder":!0},Ht=I(function(t,n,r){return a(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),Xt=e(function(t,n){return null==n||n!=n?t:n});var Jt=r(function(t){return t}),Kt=r(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}});var Yt=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}};var Qt=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return c(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},tn=I(Qt("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),nn=r(Qt("tail",tn(1,1/0)));var rn=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return o(arguments[0].length,R(Yt,arguments[0],nn(arguments)))},en=r(function(t){return p(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()});var un=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return rn.apply(this,en(arguments))},on=e(function(t,n){for(var r=[],e=0,u=t.length;u>e;)kt(t[e],n)||kt(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),an=e(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),cn=e(function(t,n){return wt({},t,n)}),fn=B(function(t,n){return rn(cn,H(Tt(an(Function),t)),ht(qt(an(Function),t)),bt(cn,[Jt,bt(H,[Jt,un(z,yt(Gt,t),on(F(qt(an(Function),t))),F)])]))(n)});var sn,ln,pn=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},yn=function(t){return function n(r){return 0===arguments.length||pn(r)?n:t.apply(this,arguments)}},hn=yn(function(t){return t}),dn=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return pn(r)?n:yn(function(n){return t(r,n)});default:return pn(r)&&pn(e)?n:pn(r)?yn(function(n){return t(n,e)}):pn(e)?yn(function(n){return t(r,n)}):t(r,e)}}},vn=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},gn=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!vn(u)){for(var o=0;t.length>o;){if("function"==typeof u[t[o]])return u[t[o]].apply(u,e);o+=1}if(function(t){return"function"==typeof t["@@transducer/step"]}(u))return n.apply(null,e)(u)}return r.apply(this,arguments)}},bn=yn(function(t){return!!vn(t)||!!t&&("object"==typeof t&&(!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),mn=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),jn=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,o){return n.apply(this,arguments)};case 6:return function(t,r,e,u,o,i){return n.apply(this,arguments)};case 7:return function(t,r,e,u,o,i,a){return n.apply(this,arguments)};case 8:return function(t,r,e,u,o,i,a,c){return n.apply(this,arguments)};case 9:return function(t,r,e,u,o,i,a,c,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,o,i,a,c,f,s){return n.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},On=dn(function(t,n){return jn(t.length,function(){return t.apply(n,arguments)})}),Sn=function(){function t(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function n(t,n,r,e){return t["@@transducer/result"](r[e](On(t["@@transducer/step"],t),n))}var r="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(e,u,o){if("function"==typeof e&&(e=mn(e)),bn(o))return function(t,n,r){for(var e=0,u=r.length;u>e;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}(e,u,o);if("function"==typeof o["fantasy-land/reduce"])return n(e,u,o,"fantasy-land/reduce");if(null!=o[r])return t(e,u,o[r]());if("function"==typeof o.next)return t(e,u,o);if("function"==typeof o.reduce)return n(e,u,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}(),wn=function(){return this.xf["@@transducer/init"]()},An=function(t){return this.xf["@@transducer/result"](t)},xn=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=wn,t.prototype["@@transducer/result"]=An,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},dn(function(n,r){return new t(n,r)})}(),En=dn(function(t,n){return 1===t?yn(n):jn(t,function t(n,r,e){return function(){for(var u=[],o=0,i=n,a=0;r.length>a||arguments.length>o;){var c;a>=r.length||pn(r[a])&&arguments.length>o?(c=arguments[o],o+=1):c=r[a],u[a]=c,pn(c)||(i-=1),a+=1}return i>0?jn(i,t(n,u,e)):e.apply(this,u)}}(t,[],n))}),kn=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},_n=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return kn("callee",t)}}(),Pn=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;t.length>r;){if(t[r]===n)return!0;r+=1}return!1};return yn("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var o,i,a=[],c=r&&_n(u);for(o in u)!kn(o,u)||c&&"length"===o||(a[a.length]=o);if(t)for(i=n.length-1;i>=0;)kn(o=n[i],u)&&!e(a,o)&&(a[a.length]=o),i-=1;return a}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Nn=dn(gn(["fantasy-land/map","map"],xn,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return En(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Sn(function(r,e){return r[e]=t(n[e]),r},{},Pn(n));default:return function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u}(t,n)}})),Cn=(sn=Sn,function t(n,r,e){switch(arguments.length){case 0:return t;case 1:return pn(n)?t:dn(function(t,r){return sn(n,t,r)});case 2:return pn(n)&&pn(r)?t:pn(n)?dn(function(t,n){return sn(t,r,n)}):pn(r)?dn(function(t,r){return sn(n,t,r)}):yn(function(t){return sn(n,r,t)});default:return pn(n)&&pn(r)&&pn(e)?t:pn(n)&&pn(r)?dn(function(t,n){return sn(t,n,e)}):pn(n)&&pn(e)?dn(function(t,n){return sn(t,r,n)}):pn(r)&&pn(e)?dn(function(t,r){return sn(n,t,r)}):pn(n)?yn(function(t){return sn(t,r,e)}):pn(r)?yn(function(t){return sn(n,t,e)}):pn(e)?yn(function(t){return sn(n,r,t)}):sn(n,r,e)}}),Fn=yn(function(t){return En(t.length,t)}),Mn=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=wn,t.prototype["@@transducer/result"]=An,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},dn(function(n,r){return new t(n,r)})}(),qn=dn(gn(["filter"],Mn,function(t,n){return"[object Object]"===Object.prototype.toString.call(n)?Sn(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Pn(n)):function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u}(t,n)})),Tn=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},Ln=dn(function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}),Un=yn(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),In=dn(function(t,n){return function t(n,r,e,u){if(Ln(n,r))return!0;if(Un(n)!==Un(r))return!1;if(null==n||null==r)return!1;if("function"==typeof n["fantasy-land/equals"]||"function"==typeof r["fantasy-land/equals"])return"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](r)&&"function"==typeof r["fantasy-land/equals"]&&r["fantasy-land/equals"](n);if("function"==typeof n.equals||"function"==typeof r.equals)return"function"==typeof n.equals&&n.equals(r)&&"function"==typeof r.equals&&r.equals(n);switch(Un(n)){case"Arguments":case"Array":case"Object":if("function"==typeof n.constructor&&"Promise"===(null==(o=(n.constructor+"").match(/^function (\w*)/))?"":o[1]))return n===r;break;case"Boolean":case"Number":case"String":if(typeof n!=typeof r||!Ln(n.valueOf(),r.valueOf()))return!1;break;case"Date":if(!Ln(n.valueOf(),r.valueOf()))return!1;break;case"Error":return n.name===r.name&&n.message===r.message;case"RegExp":if(n.source!==r.source||n.global!==r.global||n.ignoreCase!==r.ignoreCase||n.multiline!==r.multiline||n.sticky!==r.sticky||n.unicode!==r.unicode)return!1;break;case"Map":case"Set":if(!t(Tn(n.entries()),Tn(r.entries()),e,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o,i=Pn(n);if(i.length!==Pn(r).length)return!1;for(var a=e.length-1;a>=0;){if(e[a]===n)return u[a]===r;a-=1}for(e.push(n),u.push(r),a=i.length-1;a>=0;){var c=i[a];if(!kn(c,r)||!t(r[c],n[c],e,u))return!1;a-=1}return e.pop(),u.pop(),!0}(t,n,[],[])}),Rn=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=wn,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r;return this.f(n)||(this.all=!1,t=(r=this.xf["@@transducer/step"](t,!1))&&r["@@transducer/reduced"]?r:{"@@transducer/value":r,"@@transducer/reduced":!0}),t},dn(function(n,r){return new t(n,r)})}(),Dn=dn(gn(["all"],Rn,function(t,n){for(var r=0;n.length>r;){if(!t(n[r]))return!1;r+=1}return!0})),zn=function(t,n){return t(n={exports:{}},n.exports),n.exports}(function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.validate=void 0;var r=p(hn),e=p(Nn),u=p(Cn),o=p(Fn),i=p(qn),a=p(In),c=p(Dn),f="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},s=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},l=function(){return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var r=[],e=!0,u=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done)&&(r.push(i.value),!n||r.length!==n);e=!0);}catch(t){u=!0,o=t}finally{try{!e&&a.return&&a.return()}finally{if(u)throw o}}return r}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function p(t){return t&&t.__esModule?t:{default:t}}function y(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var h=n.validate=(0,o.default)(function(t,n,r,o){return(0,u.default)(function(u,p){var d=o[p],v=r[p];if(Array.isArray(v))return s({},u,y({},p,function(t,n,r){return(0,c.default)((0,a.default)(!0),r)?t():n((0,i.default)(function(t){return!0!==t},r))}(function(){return t(d)},n,(0,e.default)(function(t){return function(t,n,r,e){var u=l(t,2),o=u[1];return!!(0,u[0])(n,r)||("function"==typeof o?o(n,e):o)}(t,d,o,p)},v))));if("object"===(void 0===v?"undefined":f(v)))return s({},u,y({},p,h(t,n,v,d)));if("function"==typeof v){var g=v(d);return s({},u,y({},p,h(t,n,g,d)))}return s({},u,y({},p,t([])))},{},Object.keys(o))});n.default=(0,o.default)(function(t,n){return h(function(){return!0},r.default,t,n)})}),Bn=(ln=zn)&&ln.__esModule&&Object.prototype.hasOwnProperty.call(ln,"default")?ln.default:ln;var Vn=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},$n=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=Vn(this.xf["@@transducer/step"](t,!0))),t},t}(),Wn=e(function(t,n){return new $n(t,n)}),Zn=e(s(["any"],Wn,function(t,n){for(var r=0;n.length>r;){if(t(n[r]))return!0;r+=1}return!1})),Gn=e(function(t,n){return[t,n]}),Hn=e(function(t,n){return t&&n}),Xn=e(function(t,n){return xt(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:Vt(Hn)(t,n)}),Jn=Dt(-1),Kn=e(kt),Yn=e(function(t,n){return a(n.length,function(){for(var r=[],e=0;n.length>e;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Qn=r(function(t){var n=[];for(var r in t)x(r,t)&&(n[n.length]=[r,t[r]]);return n}),tr=r(function(t){return a(R(q,0,U("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),nr=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=Vn(this.xf["@@transducer/step"](t,!1))),t},t}(),rr=e(s(["all"],e(function(t,n){return new nr(t,n)}),function(t,n){for(var r=0;n.length>r;){if(!t(n[r]))return!1;r+=1}return!0}));var er=r(function(t){return function n(r){for(var e,u,o,i=[],a=0,c=r.length;c>a;){if(y(r[a]))for(o=0,u=(e=t?n(r[a]):r[a]).length;u>o;)i[i.length]=e[o],o+=1;else i[i.length]=r[a];a+=1}return i}}(!0));function ur(t,n,r){var e,u=typeof t;switch(u){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?t in r._items[u]||(n&&(r._items[u][t]=!0),!1):(n&&(r._items[u]={},r._items[u][t]=!0),!1);case"boolean":if(u in r._items){var o=t?1:0;return!!r._items[u][o]||(n&&(r._items[u][o]=!0),!1)}return n&&(r._items[u]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?!!kt(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1);case"undefined":return!!r._items[u]||(n&&(r._items[u]=!0),!1);case"object":if(null===t)return!!r._items.null||(n&&(r._items.null=!0),!1);default:return(u=Object.prototype.toString.call(t))in r._items?!!kt(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1)}}var or=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!ur(t,!0,this)},t.prototype.has=function(t){return ur(t,!1,this)},t}(),ir=e(function(t,n){for(var r,e,u=new or,o=[],i=0;n.length>i;)r=t(e=n[i]),u.add(r)&&o.push(e),i+=1;return o})(Jt),ar=r(function(t){return a(R(q,0,U("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),cr=r(function(t){return!t}),fr=Vt(cr);var sr=function(t){return RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))};var lr=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},pr=e(function(t,n){if(!lr(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+Ut(t));return sr(t).test(n)}),yr=pr(/^(?:[A-Z])([A-Z0-9_\-.]+)([A-Z0-9])$/i),hr=un(ot("Promise"),T(["constructor","name"]),Xt("")),dr=un(ot("Object"),T(["constructor","name"]),Xt("")),vr=fr(Z),gr=fr(it),br=un(cr,pr(/^\s*$/)),mr=tr([br,Wt(an(Number),an(String)),vr]),jr=ar([an(Boolean),an(Number),an(String),an(RegExp),an(Date)]),Or=B(function(t,n){return un(vr,T(t))(n)}),Sr=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},wr=lt(an(Array),Array),Ar=lt(an(Function),Zt),xr=lt(an(String),toString),Er=function(t,n){var r;return Sr({},t,((r={})[n[0]]=n[1],r))},kr=function(t,n){if(nt(t)!==nt(n)||Z(n)){if(an(Array,t)&&!Z(n))return[].concat(t,wr(n));if(!dr(t))return t}else{if(jr(n)||an(Function,n))return n;if(an(Array,t))return[].concat(t,wr(n))}return gt(t,n)},_r=e(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Pr=un(D,L("types")),Nr=function(t,n){return an(Array,t)?[].concat(t,wr(n)):n},Cr=Ht(tr([un(cr,jr),un(cr,an(Array)),an(Object)]),un(Object.freeze,R(Er,{}),Tt(Zn(Wt(Z,it))),M(function(t){var n=t[0],r=t[1];return an(Array,r)?[n,Object.freeze(_r(r.filter(jr),r.filter(jr)))]:dr(r)?[n,un(Ht(it,Zt(null),Object.freeze),qt(jr))(r)]:jr(r)?[n,r]:null}),Qn,Tt(it)),Zt({})),Fr=B(function(t,n){var r=t.namespace,e=t.store;return _r(n,n.map(function(t){return(r||"")+"/"+(e||"")+"/"+t}))}),Mr=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},qr=ar([Z,it]),Tr=B(function(t,n){var r=n.initialState,e=void 0===r?{}:r,u=n.stateMachinesPropName,o=void 0===u?["states"]:u;return un(lt(Or(o),G(o,{})),Xt(e))(t)}),Lr=un(ir,qt(mr),er,M(D),D),Ur=un(ir,qt(mr),er,M(F),D),Ir=un(ir,er,M(Ur),D,L("machines")),Rr=bt(on,[Ir,Pr]),Dr=un(rr(an(String)),F),zr=un(rr(tr([dr,Wt(it,un(rr(rr(an(String))),Qn))])),D),Br=(un(rr(it),Rr),Yn(on,[Lr,F])),Vr=(B(function(t,n,r){return un(V(xr(t)),Xt({}),T([xr(n)]),Xt({}))(r)}),B(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return un(Object.freeze,R(Er,{}),M(function(r){var e=r[1];return[r[0],yt(un(M(zt),qt(un(Kn(Gt,D(n)),zt)),qt(un(V(Gt,t),Jn)),qt(rr(an(String))),Qn)(e),e)]}),qt(Xn(un(an(String),zt),un(dr,Jn))),Qn)(t)})),$r=B(function(t,n){return un(Object.freeze,R(Er,{}),M(function(t){return[t[0],Vr(t[1],n.types)]}),Qn)(t)}),Wr=Ht(tr([an(String),Kn("."),yr]),Rt("."),un(pt(it,Zt(["states"])),qt(br),pt(an(String),Array))),Zr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.machines,r=void 0===n?{}:n,e=t.stateMachinesPropName;return un(gt(M(Zt("initial"),r)),yt(F(r)),Xt({}),T(wr(e)))},Gr=B(function(t,n,r){var e=r.machines,u=void 0===e?{}:e,o=Zr({machines:u,stateMachinesPropName:r.stateMachinesPropName})(t);return un(R(Er,{}),M(function(t){var r=t[0],e=t[1];return un(Gn(r),lt(vr,Zt(o[r])),L(n.type),Xt({}),L(o[r]))(e)}),Qn)(u)}),Hr=B(function(t,n,r){var e=r.machines,u=Zr({machines:e,stateMachinesPropName:r.stateMachinesPropName})(t);return un(Zn(function(t){var r=t[0],e=t[1];return un(vr,L(n.type),Xt({}),L(Gt,e),L(r))(u)}),Qn)(e)}),Xr=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},Jr=function(t,n){return Z(t)?L("initialState",n):t},Kr=B(function(t,n,r,e){return t(Jr(r,n),e,n)}),Yr=B(function(t,n,r,e){var u=Tr(Jr(r,n),n),o=G(n.stateMachinesPropName,Gr(u,e,n),{});return Xr({},t(Xr({},u,o),e,n),o)}),Qr=B(function(t,n,r,e,u){return n.reducer(t.reducer(Jr(r),e,u),e,u)}),te=bt(Kr,[un(Xt(Jt),T(["options","reducer"])),Jt]),ne=bt(Yr,[un(Xt(Jt),T(["options","reducer"])),Jt]),re=tn(0,-1),ee=e(function(t,n){var r={};return o(n.length,function(){var e=t.apply(this,arguments);return x(e,r)||(r[e]=n.apply(this,arguments)),r[e]})})(function(){return Ut(arguments)}),ue=e(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),oe=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},ie=un(ot(!0),L("needsExtraction")),ae=function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return ee(bt(Jn(n),re(n)))},ce=I(function(t,n,r){return Xt(t,T(n,r))}),fe=I(function(t,n,r){return r.replace(t,n)}),se=Zt(!0),le=r(function(t){var n=R(q,0,M(function(t){return t[0].length},t));return o(n,function(){for(var n=0;t.length>n;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})});function pe(t,n,r){t.addEventListener("message",function(e){var u=e.data,o=u.id;if("RPC"===u.type&&null!=o)if(u.method){var i=n[u.method];null==i?t.postMessage({type:"RPC",id:o,error:"NO_SUCH_METHOD"}):Promise.resolve().then(function(){return i.apply(null,u.params)}).then(function(n){t.postMessage({type:"RPC",id:o,result:n})}).catch(function(n){t.postMessage({type:"RPC",id:o,error:""+n})})}else{var a=r[o];if(null==a)throw Error("Unknown callback "+o);delete r[o],u.error?a[1](Error(u.error)):a[0](u.result)}})}var ye="undefined"!=typeof Worker&&null!==Worker&&"undefined"!=typeof Blob&&null!==Blob,he=le([[an(Function),It(0,"toString")],[an(String),Jt],[se,Zt("")]]),de=rn(fe(/^(\s*)\(/m,"export const run = ("),fe(/^(\s*)const/m,"export const"),fe(/^(\s*)function\s*\(/m,"export function run("),fe(/^(\s*)function\s+/m,"export function "),fe(/^(\s*)function\*\s+/m,"export function* "),fe(/^(\s*)async\s+\(/m,"export const run = async ("),fe(/^(\s*)async\s+function\s*\(/m,"export async function run(")),ve=rn(he,de,lt(pr(/^\s*$/),function(t){return function(t,n){var r=this,e={},u="__xpo"+(""+Math.random()).substring(2)+"__";"function"==typeof t&&(t="("+Function.prototype.toString.call(t)+")("+u+")"),t=function(t,n,r){return t=(t=t.replace(/^(\s*)export\s+default\s+/m,function(t,e){return r.default=!0,""+e+n+".default="})).replace(/^(\s*)export\s+((?:async\s*)?function(?:\s*\*)?|const|let|var)(\s+)([a-zA-Z$_][a-zA-Z0-9$_]*)/gm,function(t,e,u,o,i){return r[i]=!0,""+e+n+"."+i+"="+u+o+i}),"var "+n+"={};\n"+t+"\n"+n+";"}(t,u,e)+"\n("+Function.prototype.toString.call(pe)+")(self,"+u+",{})";var o,i=URL.createObjectURL(new Blob([t])),a=new Worker(i,n),c=a.terminate,f={},s=0;for(o in a.kill=function(t){a.postMessage({type:"KILL",signal:t}),setTimeout(a.terminate)},a.terminate=function(){URL.revokeObjectURL(i),c.call(r)},a.call=function(t,n){return new Promise(function(r,e){var u="rpc"+ ++s;f[u]=[r,e],a.postMessage({type:"RPC",id:u,method:t,params:n})})},a.rpcMethods={},pe(a,a.rpcMethods,f),a.expose=function(t){a[o]=function(){return a.call(t,[].slice.call(arguments))}},e)o in a||a.expose(o);return a}(""+t)})),ge=bt(ct,[un(Ar,ce({},["options","workers"])),Jt]),be=rn(ge,M(ye?ve:rn(he,de)),Tt(pr(/^\s*$/))),me=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=Vn(this.xf["@@transducer/step"](t,n))),t},t}(),je=e(s(["find"],e(function(t,n){return new me(t,n)}),function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),Oe=bt(ct,[un(Ar,ce({},["options","queries"])),Jt]),Se=un(Tt(Z),M(function(t){return an(Array,t)?(je(an(Function),t)||Jt)(je(an(String),t)||""):an(String,t)?t:null}),Oe),we=un(qt(an(String)),M(Ht(an(Array),je(an(String)),Zt(null))),L("queries")),Ae=bt(G(["consts","queries"]),[we,Jt]),xe=e(Ct(s(["any"],Wn,Zn)));var Ee=function(t){return"[object Number]"===Object.prototype.toString.call(t)},ke=r(function(t){return null!=t&&Ee(t.length)?t.length:NaN}),_e=r(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Pe=r(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),Ne="\t\n\v\f\r \u2028\u2029\ufeff",Ce=r(!("function"==typeof String.prototype.trim)||Ne.trim()?function(t){var n=RegExp("^["+Ne+"]["+Ne+"]*"),r=RegExp("["+Ne+"]["+Ne+"]*$");return t.replace(n,"").replace(r,"")}:function(t){return t.trim()}),Fe=It(0,"toUpperCase"),Me=Cr({VALIDATION_LEVELS:["STRICT","CANCEL","PRUNE","LOG"]}).VALIDATION_LEVELS,qe=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},Te=Kn(Gt,F(Me)),Le=un(lt(Te,Zt("CANCEL")),Fe,Ce,xr),Ue=B(function(t,n){return un(R(function(n,r){var e,u=r[0],o=r[1],i=dr(o)?Ue(t[u],o):o;return dr(i)&&it(i)?n:qe({},n,((e={})[u]=!0===i?t[u]:i,e))},{}),Tt(un(an(Array),Dt(1))),Pe)(n)}),Ie=un(R(function(t,n){var r,e=n[0],u=n[1],o=dr(u)?Ie(u):u;return dr(o)&&it(o)?t:qe({},t,((r={})[e]=o,r))},{}),Tt(function(t){return!0===t[1]}),Pe),Re=function(t){return un(Xt(se),L(Gt,t),L("type"))},De=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(Zn(Wt(Xn(dr,t),an(Array))),_e)(n)},ze={namespace:Jt,store:Jt,validationLevel:Le,stateMachinesPropName:Wr,consts:Cr},Be={consts:{},creators:{},machines:{},queries:{},workers:{},selectors:{},stateMachinesPropName:"states",types:[],validationLevel:"CANCEL",validators:{}},Ve={validationLevel:[[Te,"must be: STRICT, CANCEL, PRUNE, or LOG. CANCEL is the default."]],store:[[mr,"must be a (non-blank) string"]],namespace:[[mr,"must be a (non-blank) string"]],stateMachinesPropName:[[Wt(mr,Xn(an(Array),rr(mr))),"must be a string (or array of strings)"]],consts:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],creators:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],machines:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],selectors:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],types:[[Xn(an(Array),rr(an(String))),"must be an object (or a function returning an object)"]],validators:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],enhancers:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],queries:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],workers:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],reducer:[[an(Function),"must be a function"]],initialState:[[ar([jr,dr,an(Function)]),"must be an object, a function returning an object, or a primitive value"]]},$e={store:[[mr,"must be a (non-blank) string"]],namespace:[[mr,"must be a (non-blank) string"]],types:[[dr,"must be an object"],[un(rr(un(ot(1),ke,ir)),M(function(t){var n=t[1];return[t[0],un(Jn,Rt("/"))(n)]}),qt(rr(an(String))),Qn),"each key and value are identical"]],machines:[[un(rr(dr),D),"must be an object"],[un(rr(gr),D),"must not be empty"],[un(rr(tr([Dr,zr])),D),"each machine contains nested objects (states) whose inputs and transitions are strings"],[un(rr(Br),D),"each transition value must also be a state"]],stateMachinesPropName:[[Xn(an(Array),rr(mr)),'must be an array of strings (representing the path to the "current state" prop)']]},We=un(it,on(["store","namespace","validators","types"]),F),Ze=ar([fr(dr),un(it,F),un(xe(We),D)]),Ge=e(function(t,n){return n.match(t)||[]}),He=e(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Xe=B(function(t,n){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;n>e;e++)r[e-1]=arguments[e];return mr(t)&&r.length?He(Ge(/(%?)(%([jods]))/g,t),M(le([[Wt(an(Number),an(String)),Jt],[Wt(an(Array),dr),JSON.stringify]]))(r)).reduce(function(t,n){return t.replace(n[0],n[1])},t).replace(/%{2,2}/g,"%"):t}(t,n)}),Je=un(M(Xe("These inputs are not valid Action Types: %o")),qt(gr),M(Rr),D,qt(We)),Ke=un(M(Xe("These violations of the schema rules for the middleware were found: %o")),qt(gr),M(un(Ie,Bn($e))),D,qt(We)),Ye=un(rr(function(t){return ot(t[0],L("store",t[1]))}),Qn,qt(We)),Qe=function(t){if(Ze(t))return"No ducks have been provided! To create the Attadux middleware please provide an Object containing one or more ducks";if(!Ye(t))return"The name of each duck should match its 'store' prop, otherwise it will not be possible to find the correct duck for each dispatched action";var n=Je(t);if(gr(n))return Xe("Invalid State Machines: %o",n);var r=Ke(t);return gr(r)?Xe("Invalid Ducks: %o",r):null},tu=un(R(function(t,n){return W(n.store,n,t)},{}),qt(We),Kt(Jt)),nu=function(t){return un(Xt({}),Ht(br,L(Gt,qt(We,t)),Zt({})),Wt(Dt(1),zt),Rt("/"),L("type"))},ru=un(At,Ot([un(mt("stateMachinesPropName"),Zt(["states"])),un(bt(gt,[un(ht(ze),yt(F(ze)),Ae),un(mt("types"),bt(Fr,[Jt,L("types")]))]),L("validatedOptions")),un(pt(gr,mt("invalidOptions")),Ie,L("validationsResult")),un(mt("options"),L("validatedOptions"))]),St,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=yt(F(Ve),t),r=Bn(Ve,n);return{validationsResult:r,validatedOptions:Ue(n,r)}}),eu=un(lt(st("validationLevel","PRUNE"),ht({validators:M(function(t){return un(Ie,t)})})),bt(gt,[Jt,Ht(ft(Z,["options","validators"]),Zt({}),un(mt("validators"),M(Bn),bt(ct,[un(Ar,T(["options","validators"])),Jt])))])),uu=bt(gt,[Jt,Ht(ft(Z,["options","queries"]),Zt({}),un(mt("queries"),Se))]),ou=bt(gt,[Jt,Ht(ft(Z,["options","workers"]),Zt({}),un(mt("workers"),be))]),iu=bt(gt,[Jt,Ht(ft(Z,["options","machines"]),Zt({}),un(mt("machines"),bt($r,[bt(ct,[un(Ar,T(["options","machines"])),Jt]),Jt])))]),au=bt(gt,[Jt,un(mt("initialState"),bt(gt,[bt(ct,[un(Ar,T(["options","initialState"])),Jt]),Ht(at(it,"machines"),Zt({}),un(H({}),bt(G,[L("stateMachinesPropName"),un(function(){return R(function(t,n){var r;return Mr({},t,((r={})[n]="initial",r))},{},F((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})||{}))},L("machines"))])))]))]),cu=bt(gt,[Jt,Ht(ft(Z,["options","selectors"]),Zt({}),un(mt("selectors"),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(R(function(t,n){var r;return oe({},t,((r={})[n[0]]=n[1].justAddDuckSelectors(t),r))},t),Qn,ue(ie))(t)},bt(ct,[un(Ar,T(["options","selectors"])),Jt])))]),fu=bt(gt,[Jt,Ht(ft(Z,["options","enhancers"]),Zt({}),un(mt("enhancers"),un(M(Ht(V("type"),B(function(t,n){return un(yt(F(t)),fn(t))(n)}),fn)),bt(ct,[un(Ar,T(["options","enhancers"])),Jt]))))]),su=bt(gt,[Jt,Ht(ft(Z,["options","creators"]),Zt({}),un(mt("creators"),bt(ct,[un(Ar,T(["options","creators"])),Jt])))]),lu=bt(gt,[Jt,Ht(Wt(ft(Z,["options","reducer"]),at(it,"machines")),un(mt("reducer"),te),un(mt("reducer"),ne))]),pu=bt(gt,[Jt,Ht(at(Z,"validators"),Zt({}),un(z({isPayloadValid:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(cr,De,H(n),Re(t))(n)}},getValidationErrors:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(pt(it,Zt(null)),Ie,H(n),Re(t))(n)}},pruneInvalidFields:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(pt(it,Zt(null)),Ue(n),function(t){return t(n)},Re(t))(n)}}}),L("validators")))]),yu=e(function(t,n){return a(t,function(){for(var r,e=1,u=n,o=0;t>=e&&"function"==typeof u;)u=u.apply(this,Array.prototype.slice.call(arguments,o,r=e===t?arguments.length:o+u.length)),e+=1,o=r;return u})}),hu=I(function(t,n,r){for(var e=0,u=r.length,o=[],i=[n];u>e;)i=t(i[0],r[e]),o[e]=i[1],e+=1;return[i[0],o]}),du=e(function(t,n){if(c(t)){if(c(n))return t.concat(n);throw new TypeError(Ut(n)+" is not an array")}if(p(t)){if(p(n))return t+n;throw new TypeError(Ut(n)+" is not a string")}if(null!=t&&xt(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&xt(t.concat))return t.concat(n);throw new TypeError(Ut(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),vu=I(function(t,n,r){return vt(function(n,r,e){return t(r,e)},n,r)}),gu=B(function(t,n,r){var e=n.options;return le([[un(Zn(an(Function)),M(L(r)),Gn(e)),Zt(bt(vu(kr),[Ar(e[r]),bt(Ar(t[r]),[Jt,Ar(e[r])])]))],[un(Z,L(r)),Zt(e[r])],[se,un(vu(kr,e[r]),L(r))]])(t)}),bu=function(t){return un(bt(gt,[Jt,un(mt("reducer"),(n=t,r=n.options,un(Ht(rr(V("reducer")),un(Qr(r),Jn),un(je(V("reducer")),Gn(r))),Gn(r))))]),R(gt,{}),du([Be,t.options]),St,H(t),Ar);var n,r},mu=B(function(t,n,r){return un(gt(r),At,Jn,hu(function(t,n){var r=n[0],e=n[1],u=un(mt(r),pt(an(Function),H(r)),e)(t);return[gt(t,u),u]},n))(t)}),ju=un(Object.freeze,lu,ou,pu,su,fu,cu,au,iu,eu,uu,ru,gt(Be)),Ou=bt(un,[Zt(ju),function(t){var n=bu(t);return function(r){var e=n(r),u=[["consts",un(vu(Nr,Gt,e.consts),T(["options","consts"]))],["types",un(ir,du(e.types),T(["options","types"]))],["initialState",gu(e)],["machines",gu(e)],["creators",gu(e)],["selectors",gu(e)],["queries",gu(e)],["enhancers",gu(e)],["validators",gu(e)],["workers",gu(e)]];return mu(u,t,e)}}]),Su=yu(2,Ou),wu=Zt(!1),Au=I(function(t,n,r){return an(t,r[n])}),xu=I(function(t,n,r){return null!=r&&x(n,r)?r[n]:t});var Eu=un(Dt(1),Rt("/"));t.createRow=tu,t.createDuck=ju,t.extendDuck=Su,t.createExtenderForDuck=Ou,t.createSelector=ae,t.createDuckSelector=function(t){return{needsExtraction:!0,justAddDuckSelectors:function(){var n=t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return Array.isArray(n)?ae.apply(void 0,n):n}}},t.createEnhancerMiddleware=function(t){var n=Qe(t);if(n)throw Error(n);var r=nu(t);return function(t){var n=t.dispatch;return function(t){return function(e){var u=r(e).enhancers,o=(void 0===u?{}:u)[e.type];if(!an(Function,o))return t(e);var i=o(e);return Wt(Z,it)(i)?t(e):(i.type!==e.type&&n(i),t(i))}}}},t.createValidatorMiddleware=function(t){var n=Qe(t);if(n)throw Error(n);var r=nu(t);return function(t){var n=t.getState;return function(t){return function(e){var u,o=r(e),i=o.machines,a=o.isPayloadValid,c=void 0===a?se:a,f=o.getValidationErrors,s=void 0===f?Zt(null):f,l=o.pruneInvalidFields,p=void 0===l?Zt(e):l,y=o.stateMachinesPropName,h=void 0===y?"states":y,d=o.validationLevel,v=void 0===d?Me.CANCEL:d;if(qr(i))return t(e);var g=((u={})[Me.CANCEL]=lt(c,wu),u[Me.LOG]=bt(cn,[Jt,un(Ht(Z,Zt({}),mt("validationErrors")),s)]),u[Me.PRUNE]=p,u[Me.STRICT]=lt(bt(Hr,[n,Jt,Zt({machines:i,stateMachinesPropName:h})]),wu),u),b=ct(un(Xt(Jt),L(v))(g),e);return b&&t(b)}}}},t.createWorkerMiddleware=function(t){var n=Qe(t);if(n)throw Error(n);var r=nu(t),e=rn(r,xu({},"workers")),u=Ht(T(["meta","worker"]),bt(lt(an(String)),[rn(L("type"),Zt),T(["meta","worker"])]),Zt(null)),o=rn(u,L),i=bt(ct,[o,e]);return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(e){return o=function*(){var o=u(e);if(o){var a=rn(i,Xt({}),function(t){return le([[an(Function),Jt],[Au(Function,t),L(t)],[Au(Function,"run"),L("run")]])}(o))(e);if(an(Function,a)){var c=Eu(e.type),f=a({action:e,state:c?r()[c]:{}});if(hr(f)){var s=yield f;L("type",s)&&n(s)}else L("type",f)&&n(f)}}return t(e)}(),new Promise(function(t,n){function r(u,i){try{var a=o[i?"throw":"next"](u)}catch(t){return void n(t)}a.done?t(a.value):Promise.resolve(a.value).then(r,e)}function e(t){r(t,1)}r()});var o}}}},Object.defineProperty(t,"__esModule",{value:!0})}); | ||
!function(t,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports):"function"==typeof define&&define.amd?define(["exports"],n):n(t.attadux={})}(this,function(t){"use strict";var n=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]};var r=function(t){return function r(e){return 0===arguments.length||n(e)?r:t.apply(this,arguments)}};var e=function(t){return function e(u,o){switch(arguments.length){case 0:return e;case 1:return n(u)?e:r(function(n){return t(u,n)});default:return n(u)&&n(o)?e:n(u)?r(function(n){return t(n,o)}):n(o)?r(function(n){return t(u,n)}):t(u,o)}}},u=e(function(t,n){return t.apply(this,n)});var o=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,o){return n.apply(this,arguments)};case 6:return function(t,r,e,u,o,i){return n.apply(this,arguments)};case 7:return function(t,r,e,u,o,i,a){return n.apply(this,arguments)};case 8:return function(t,r,e,u,o,i,a,c){return n.apply(this,arguments)};case 9:return function(t,r,e,u,o,i,a,c,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,o,i,a,c,f,s){return n.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}};var i=function t(r,e,u){return function(){for(var i=[],a=0,c=r,f=0;e.length>f||arguments.length>a;){var s;f>=e.length||n(e[f])&&arguments.length>a?(s=arguments[a],a+=1):s=e[f],i[f]=s,n(s)||(c-=1),f+=1}return c>0?o(c,t(r,i,u)):u.apply(this,i)}},a=e(function(t,n){return 1===t?r(n):o(t,i(t,[],n))}),c=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)};var f=function(t){return"function"==typeof t["@@transducer/step"]};var s=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!c(u)){for(var o=0;t.length>o;){if("function"==typeof u[t[o]])return u[t[o]].apply(u,e);o+=1}if(f(u))return n.apply(null,e)(u)}return r.apply(this,arguments)}};var l=function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u};var p=function(t){return"[object String]"===Object.prototype.toString.call(t)},y=r(function(t){return!!c(t)||!!t&&("object"==typeof t&&(!p(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),h=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},t}();var d=function(t){return new h(t)},v=e(function(t,n){return o(t.length,function(){return t.apply(n,arguments)})});function g(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function b(t,n,r,e){return t["@@transducer/result"](r[e](v(t["@@transducer/step"],t),n))}var m="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";var j=function(t,n,r){if("function"==typeof t&&(t=d(t)),y(r))return function(t,n,r){for(var e=0,u=r.length;u>e;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}(t,n,r);if("function"==typeof r["fantasy-land/reduce"])return b(t,n,r,"fantasy-land/reduce");if(null!=r[m])return g(t,n,r[m]());if("function"==typeof r.next)return g(t,n,r);if("function"==typeof r.reduce)return b(t,n,r,"reduce");throw new TypeError("reduce: list must be array or iterable")},O=function(){return this.xf["@@transducer/init"]()},S=function(t){return this.xf["@@transducer/result"](t)},w=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=S,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},t}(),A=e(function(t,n){return new w(t,n)});var x=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},E=Object.prototype.toString,k=function(){return"[object Arguments]"===E.call(arguments)?function(t){return"[object Arguments]"===E.call(t)}:function(t){return x("callee",t)}},_=!{toString:null}.propertyIsEnumerable("toString"),P=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],N=function(){return arguments.propertyIsEnumerable("length")}(),C=function(t,n){for(var r=0;t.length>r;){if(t[r]===n)return!0;r+=1}return!1},F=r("function"!=typeof Object.keys||N?function(t){if(Object(t)!==t)return[];var n,r,e=[],u=N&&k(t);for(n in t)!x(n,t)||u&&"length"===n||(e[e.length]=n);if(_)for(r=P.length-1;r>=0;)x(n=P[r],t)&&!C(e,n)&&(e[e.length]=n),r-=1;return e}:function(t){return Object(t)!==t?[]:Object.keys(t)}),M=e(s(["fantasy-land/map","map"],A,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return a(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return j(function(r,e){return r[e]=t(n[e]),r},{},F(n));default:return l(t,n)}})),q=e(function(t,n){return n>t?n:t}),T=e(function(t,n){for(var r=n,e=0;t.length>e;){if(null==r)return;r=r[t[e]],e+=1}return r}),L=e(function(t,n){return T([t],n)}),U=e(function(t,n){return M(L(t),n)});var I=function(t){return function u(o,i,a){switch(arguments.length){case 0:return u;case 1:return n(o)?u:e(function(n,r){return t(o,n,r)});case 2:return n(o)&&n(i)?u:n(o)?e(function(n,r){return t(n,i,r)}):n(i)?e(function(n,r){return t(o,n,r)}):r(function(n){return t(o,i,n)});default:return n(o)&&n(i)&&n(a)?u:n(o)&&n(i)?e(function(n,r){return t(n,r,a)}):n(o)&&n(a)?e(function(n,r){return t(n,i,r)}):n(i)&&n(a)?e(function(n,r){return t(o,n,r)}):n(o)?r(function(n){return t(n,i,a)}):n(i)?r(function(n){return t(o,n,a)}):n(a)?r(function(n){return t(o,i,n)}):t(o,i,a)}}},R=I(j),D=r(function(t){for(var n=F(t),r=n.length,e=[],u=0;r>u;)e[u]=t[n[u]],u+=1;return e}),z=r(function t(n){return n=M(function(n){return"function"==typeof n?n:t(n)},n),a(R(q,0,U("length",D(n))),function(){var t=arguments;return M(function(n){return u(n,t)},n)})}),B=r(function(t){return a(t.length,t)}),V=e(x),$=Number.isInteger||function(t){return t<<0===t},W=I(function(t,n,r){var e={};for(var u in r)e[u]=r[u];return e[t]=n,e}),Z=r(function(t){return null==t}),G=I(function t(n,r,e){if(0===n.length)return r;var u=n[0];if(n.length>1){var o=!Z(e)&&x(u,e)?e[u]:$(n[1])?[]:{};r=t(Array.prototype.slice.call(n,1),r,o)}if($(u)&&c(e)){var i=[].concat(e);return i[u]=r,i}return W(u,r,e)}),H=e(function(t,n){return n(t)});var X=function(t){return"[object Object]"===Object.prototype.toString.call(t)},J=r(function(t){return null!=t&&"function"==typeof t["fantasy-land/empty"]?t["fantasy-land/empty"]():null!=t&&null!=t.constructor&&"function"==typeof t.constructor["fantasy-land/empty"]?t.constructor["fantasy-land/empty"]():null!=t&&"function"==typeof t.empty?t.empty():null!=t&&null!=t.constructor&&"function"==typeof t.constructor.empty?t.constructor.empty():c(t)?[]:p(t)?"":X(t)?{}:k(t)?function(){return arguments}():void 0});var K=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r};var Y=function(t,n,r){for(var e=0,u=r.length;u>e;){if(t(n,r[e]))return!0;e+=1}return!1};var Q=function(t){var n=(t+"").match(/^function (\w*)/);return null==n?"":n[1]},tt=e(function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}),nt=r(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)});function rt(t,n,r,e){var u=K(t),o=K(n);function i(t,n){return et(t,n,r.slice(),e.slice())}return!Y(function(t,n){return!Y(i,n,t)},o,u)}function et(t,n,r,e){if(tt(t,n))return!0;var u=nt(t);if(u!==nt(n))return!1;if(null==t||null==n)return!1;if("function"==typeof t["fantasy-land/equals"]||"function"==typeof n["fantasy-land/equals"])return"function"==typeof t["fantasy-land/equals"]&&t["fantasy-land/equals"](n)&&"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](t);if("function"==typeof t.equals||"function"==typeof n.equals)return"function"==typeof t.equals&&t.equals(n)&&"function"==typeof n.equals&&n.equals(t);switch(u){case"Arguments":case"Array":case"Object":if("function"==typeof t.constructor&&"Promise"===Q(t.constructor))return t===n;break;case"Boolean":case"Number":case"String":if(typeof t!=typeof n||!tt(t.valueOf(),n.valueOf()))return!1;break;case"Date":if(!tt(t.valueOf(),n.valueOf()))return!1;break;case"Error":return t.name===n.name&&t.message===n.message;case"RegExp":if(t.source!==n.source||t.global!==n.global||t.ignoreCase!==n.ignoreCase||t.multiline!==n.multiline||t.sticky!==n.sticky||t.unicode!==n.unicode)return!1}for(var o=r.length-1;o>=0;){if(r[o]===t)return e[o]===n;o-=1}switch(u){case"Map":return t.size===n.size&&rt(t.entries(),n.entries(),r.concat([t]),e.concat([n]));case"Set":return t.size===n.size&&rt(t.values(),n.values(),r.concat([t]),e.concat([n]));case"Arguments":case"Array":case"Object":case"Boolean":case"Number":case"String":case"Date":case"Error":case"RegExp":case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var i=F(t);if(i.length!==F(n).length)return!1;var a=r.concat([t]),c=e.concat([n]);for(o=i.length-1;o>=0;){var f=i[o];if(!x(f,n)||!et(n[f],t[f],a,c))return!1;o-=1}return!0}var ut=et,ot=e(function(t,n){return ut(t,n,[],[])}),it=r(function(t){return null!=t&&ot(t,J(t))}),at=I(function(t,n,r){return t(r[n])}),ct=B(function(t){return t.apply(this,Array.prototype.slice.call(arguments,1))}),ft=I(function(t,n,r){return n.length>0&&t(T(n,r))}),st=I(function(t,n,r){return ot(n,r[t])}),lt=I(function(t,n,r){return t(r)?r:n(r)}),pt=I(function(t,n,r){return t(r)?n(r):r}),yt=e(function(t,n){for(var r={},e=0;t.length>e;)t[e]in n&&(r[t[e]]=n[t[e]]),e+=1;return r}),ht=e(function t(n,r){var e,u,o,i={};for(u in r)i[u]="function"===(o=typeof(e=n[u]))?e(r[u]):e&&"object"===o?t(e,r[u]):r[u];return i}),dt=I(function(t,n,r){var e,u={};for(e in n)x(e,n)&&(u[e]=x(e,r)?t(e,n[e],r[e]):n[e]);for(e in r)x(e,r)&&!x(e,u)&&(u[e]=r[e]);return u}),vt=I(function t(n,r,e){return dt(function(r,e,u){return X(e)&&X(u)?t(n,e,u):n(r,e,u)},r,e)}),gt=e(function(t,n){return vt(function(t,n,r){return r},t,n)}),bt=e(function(t,n){return a(R(q,0,U("length",n)),function(){var r=arguments,e=this;return t.apply(e,l(function(t){return t.apply(e,r)},n))})}),mt=e(function(t,n){var r={};return r[t]=n,r});var jt=function(t,n){var r,e=(t=t||[]).length,u=(n=n||[]).length,o=[];for(r=0;e>r;)o[o.length]=t[r],r+=1;for(r=0;u>r;)o[o.length]=n[r],r+=1;return o},Ot=e(function(t,n){return"function"==typeof n["fantasy-land/ap"]?n["fantasy-land/ap"](t):"function"==typeof t.ap?t.ap(n):"function"==typeof t?function(r){return t(r)(n(r))}:j(function(t,r){return jt(t,M(r,n))},[],t)});var St=r(function(t){return[t]});var wt="function"==typeof Object.assign?Object.assign:function(t){if(null==t)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(t),r=1,e=arguments.length;e>r;){var u=arguments[r];if(null!=u)for(var o in u)x(o,u)&&(n[o]=u[o]);r+=1}return n},At=r(function(t){return wt.apply(null,[{}].concat(t))});var xt=function(t){return"[object Function]"===Object.prototype.toString.call(t)};var Et=function(t,n,r){var e,u;if("function"==typeof t.indexOf)switch(typeof n){case"number":if(0===n){for(e=1/n;t.length>r;){if(0===(u=t[r])&&1/u===e)return r;r+=1}return-1}if(n!=n){for(;t.length>r;){if("number"==typeof(u=t[r])&&u!=u)return r;r+=1}return-1}return t.indexOf(n,r);case"string":case"boolean":case"function":case"undefined":return t.indexOf(n,r);case"object":if(null===n)return t.indexOf(n,r)}for(;t.length>r;){if(ot(t[r],n))return r;r+=1}return-1};var kt=function(t,n){return Et(n,t,0)>=0};var _t=function(t){return'"'+t.replace(/\\/g,"\\\\").replace(/[\b]/g,"\\b").replace(/\f/g,"\\f").replace(/\n/g,"\\n").replace(/\r/g,"\\r").replace(/\t/g,"\\t").replace(/\v/g,"\\v").replace(/\0/g,"\\0").replace(/"/g,'\\"')+'"'},Pt=function(t){return(10>t?"0":"")+t},Nt="function"==typeof Date.prototype.toISOString?function(t){return t.toISOString()}:function(t){return t.getUTCFullYear()+"-"+Pt(t.getUTCMonth()+1)+"-"+Pt(t.getUTCDate())+"T"+Pt(t.getUTCHours())+":"+Pt(t.getUTCMinutes())+":"+Pt(t.getUTCSeconds())+"."+(t.getUTCMilliseconds()/1e3).toFixed(3).slice(2,5)+"Z"};var Ct=function(t){return function(){return!t.apply(this,arguments)}};var Ft=function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u},Mt=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=S,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},t}(),qt=e(s(["filter"],e(function(t,n){return new Mt(t,n)}),function(t,n){return X(n)?j(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},F(n)):Ft(t,n)})),Tt=e(function(t,n){return qt(Ct(t),n)});var Lt=function t(n,r){var e=function(e){var u=r.concat([n]);return kt(e,u)?"<Circular>":t(e,u)},u=function(t,n){return l(function(n){return _t(n)+": "+e(t[n])},n.slice().sort())};switch(Object.prototype.toString.call(n)){case"[object Arguments]":return"(function() { return arguments; }("+l(e,n).join(", ")+"))";case"[object Array]":return"["+l(e,n).concat(u(n,Tt(function(t){return/^\d+$/.test(t)},F(n)))).join(", ")+"]";case"[object Boolean]":return"object"==typeof n?"new Boolean("+e(n.valueOf())+")":""+n;case"[object Date]":return"new Date("+(isNaN(n.valueOf())?e(NaN):_t(Nt(n)))+")";case"[object Null]":return"null";case"[object Number]":return"object"==typeof n?"new Number("+e(n.valueOf())+")":1/n==-1/0?"-0":n.toString(10);case"[object String]":return"object"==typeof n?"new String("+e(n.valueOf())+")":_t(n);case"[object Undefined]":return"undefined";default:if("function"==typeof n.toString){var o=""+n;if("[object Object]"!==o)return o}return"{"+u(n,F(n)).join(", ")+"}"}},Ut=r(function(t){return Lt(t,[])}),It=e(function(t,n){return a(t+1,function(){var r=arguments[t];if(null!=r&&xt(r[n]))return r[n].apply(r,Array.prototype.slice.call(arguments,0,t));throw new TypeError(Ut(r)+' does not have a method named "'+n+'"')})}),Rt=It(1,"split"),Dt=e(function(t,n){var r=0>t?n.length+t:t;return p(n)?n.charAt(r):n[r]}),zt=Dt(0),Bt=e(function(t,n){var r=a(t,n);return a(t,function(){return j(Ot,M(r,arguments[0]),Array.prototype.slice.call(arguments,1))})}),Vt=r(function(t){return Bt(t.length,t)}),$t=e(function(t,n){return t||n}),Wt=e(function(t,n){return xt(t)?function(){return t.apply(this,arguments)||n.apply(this,arguments)}:Vt($t)(t,n)}),Zt=r(function(t){return function(){return t}}),Gt={"@@functional/placeholder":!0},Ht=I(function(t,n,r){return a(Math.max(t.length,n.length,r.length),function(){return t.apply(this,arguments)?n.apply(this,arguments):r.apply(this,arguments)})}),Xt=e(function(t,n){return null==n||n!=n?t:n});var Jt=r(function(t){return t}),Kt=r(function(t){return function(){return t(Array.prototype.slice.call(arguments,0))}});var Yt=function(t,n){return function(){return n.call(this,t.apply(this,arguments))}};var Qt=function(t,n){return function(){var r=arguments.length;if(0===r)return n();var e=arguments[r-1];return c(e)||"function"!=typeof e[t]?n.apply(this,arguments):e[t].apply(e,Array.prototype.slice.call(arguments,0,r-1))}},tn=I(Qt("slice",function(t,n,r){return Array.prototype.slice.call(r,t,n)})),nn=r(Qt("tail",tn(1,1/0)));var rn=function(){if(0===arguments.length)throw Error("pipe requires at least one argument");return o(arguments[0].length,R(Yt,arguments[0],nn(arguments)))},en=r(function(t){return p(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()});var un=function(){if(0===arguments.length)throw Error("compose requires at least one argument");return rn.apply(this,en(arguments))},on=e(function(t,n){for(var r=[],e=0,u=t.length;u>e;)kt(t[e],n)||kt(t[e],r)||(r[r.length]=t[e]),e+=1;return r}),an=e(function(t,n){return null!=n&&n.constructor===t||n instanceof t}),cn=e(function(t,n){return wt({},t,n)}),fn=B(function(t,n){return rn(cn,H(Tt(an(Function),t)),ht(qt(an(Function),t)),bt(cn,[Jt,bt(H,[Jt,un(z,yt(Gt,t),on(F(qt(an(Function),t))),F)])]))(n)});var sn,ln,pn=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]},yn=function(t){return function n(r){return 0===arguments.length||pn(r)?n:t.apply(this,arguments)}},hn=yn(function(t){return t}),dn=function(t){return function n(r,e){switch(arguments.length){case 0:return n;case 1:return pn(r)?n:yn(function(n){return t(r,n)});default:return pn(r)&&pn(e)?n:pn(r)?yn(function(n){return t(n,e)}):pn(e)?yn(function(n){return t(r,n)}):t(r,e)}}},vn=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)},gn=function(t,n,r){return function(){if(0===arguments.length)return r();var e=Array.prototype.slice.call(arguments,0),u=e.pop();if(!vn(u)){for(var o=0;t.length>o;){if("function"==typeof u[t[o]])return u[t[o]].apply(u,e);o+=1}if(function(t){return"function"==typeof t["@@transducer/step"]}(u))return n.apply(null,e)(u)}return r.apply(this,arguments)}},bn=yn(function(t){return!!vn(t)||!!t&&("object"==typeof t&&(!function(t){return"[object String]"===Object.prototype.toString.call(t)}(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))}),mn=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,n){return this.f(t,n)},function(n){return new t(n)}}(),jn=function(t,n){switch(t){case 0:return function(){return n.apply(this,arguments)};case 1:return function(t){return n.apply(this,arguments)};case 2:return function(t,r){return n.apply(this,arguments)};case 3:return function(t,r,e){return n.apply(this,arguments)};case 4:return function(t,r,e,u){return n.apply(this,arguments)};case 5:return function(t,r,e,u,o){return n.apply(this,arguments)};case 6:return function(t,r,e,u,o,i){return n.apply(this,arguments)};case 7:return function(t,r,e,u,o,i,a){return n.apply(this,arguments)};case 8:return function(t,r,e,u,o,i,a,c){return n.apply(this,arguments)};case 9:return function(t,r,e,u,o,i,a,c,f){return n.apply(this,arguments)};case 10:return function(t,r,e,u,o,i,a,c,f,s){return n.apply(this,arguments)};default:throw Error("First argument to _arity must be a non-negative integer no greater than ten")}},On=dn(function(t,n){return jn(t.length,function(){return t.apply(n,arguments)})}),Sn=function(){function t(t,n,r){for(var e=r.next();!e.done;){if((n=t["@@transducer/step"](n,e.value))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e=r.next()}return t["@@transducer/result"](n)}function n(t,n,r,e){return t["@@transducer/result"](r[e](On(t["@@transducer/step"],t),n))}var r="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";return function(e,u,o){if("function"==typeof e&&(e=mn(e)),bn(o))return function(t,n,r){for(var e=0,u=r.length;u>e;){if((n=t["@@transducer/step"](n,r[e]))&&n["@@transducer/reduced"]){n=n["@@transducer/value"];break}e+=1}return t["@@transducer/result"](n)}(e,u,o);if("function"==typeof o["fantasy-land/reduce"])return n(e,u,o,"fantasy-land/reduce");if(null!=o[r])return t(e,u,o[r]());if("function"==typeof o.next)return t(e,u,o);if("function"==typeof o.reduce)return n(e,u,o,"reduce");throw new TypeError("reduce: list must be array or iterable")}}(),wn=function(){return this.xf["@@transducer/init"]()},An=function(t){return this.xf["@@transducer/result"](t)},xn=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=wn,t.prototype["@@transducer/result"]=An,t.prototype["@@transducer/step"]=function(t,n){return this.xf["@@transducer/step"](t,this.f(n))},dn(function(n,r){return new t(n,r)})}(),En=dn(function(t,n){return 1===t?yn(n):jn(t,function t(n,r,e){return function(){for(var u=[],o=0,i=n,a=0;r.length>a||arguments.length>o;){var c;a>=r.length||pn(r[a])&&arguments.length>o?(c=arguments[o],o+=1):c=r[a],u[a]=c,pn(c)||(i-=1),a+=1}return i>0?jn(i,t(n,u,e)):e.apply(this,u)}}(t,[],n))}),kn=function(t,n){return Object.prototype.hasOwnProperty.call(n,t)},_n=function(){var t=Object.prototype.toString;return"[object Arguments]"===t.call(arguments)?function(n){return"[object Arguments]"===t.call(n)}:function(t){return kn("callee",t)}}(),Pn=function(){var t=!{toString:null}.propertyIsEnumerable("toString"),n=["constructor","valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],r=function(){return arguments.propertyIsEnumerable("length")}(),e=function(t,n){for(var r=0;t.length>r;){if(t[r]===n)return!0;r+=1}return!1};return yn("function"!=typeof Object.keys||r?function(u){if(Object(u)!==u)return[];var o,i,a=[],c=r&&_n(u);for(o in u)!kn(o,u)||c&&"length"===o||(a[a.length]=o);if(t)for(i=n.length-1;i>=0;)kn(o=n[i],u)&&!e(a,o)&&(a[a.length]=o),i-=1;return a}:function(t){return Object(t)!==t?[]:Object.keys(t)})}(),Nn=dn(gn(["fantasy-land/map","map"],xn,function(t,n){switch(Object.prototype.toString.call(n)){case"[object Function]":return En(n.length,function(){return t.call(this,n.apply(this,arguments))});case"[object Object]":return Sn(function(r,e){return r[e]=t(n[e]),r},{},Pn(n));default:return function(t,n){for(var r=0,e=n.length,u=Array(e);e>r;)u[r]=t(n[r]),r+=1;return u}(t,n)}})),Cn=(sn=Sn,function t(n,r,e){switch(arguments.length){case 0:return t;case 1:return pn(n)?t:dn(function(t,r){return sn(n,t,r)});case 2:return pn(n)&&pn(r)?t:pn(n)?dn(function(t,n){return sn(t,r,n)}):pn(r)?dn(function(t,r){return sn(n,t,r)}):yn(function(t){return sn(n,r,t)});default:return pn(n)&&pn(r)&&pn(e)?t:pn(n)&&pn(r)?dn(function(t,n){return sn(t,n,e)}):pn(n)&&pn(e)?dn(function(t,n){return sn(t,r,n)}):pn(r)&&pn(e)?dn(function(t,r){return sn(n,t,r)}):pn(n)?yn(function(t){return sn(t,r,e)}):pn(r)?yn(function(t){return sn(n,t,e)}):pn(e)?yn(function(t){return sn(n,r,t)}):sn(n,r,e)}}),Fn=yn(function(t){return En(t.length,t)}),Mn=function(){function t(t,n){this.xf=n,this.f=t}return t.prototype["@@transducer/init"]=wn,t.prototype["@@transducer/result"]=An,t.prototype["@@transducer/step"]=function(t,n){return this.f(n)?this.xf["@@transducer/step"](t,n):t},dn(function(n,r){return new t(n,r)})}(),qn=dn(gn(["filter"],Mn,function(t,n){return"[object Object]"===Object.prototype.toString.call(n)?Sn(function(r,e){return t(n[e])&&(r[e]=n[e]),r},{},Pn(n)):function(t,n){for(var r=0,e=n.length,u=[];e>r;)t(n[r])&&(u[u.length]=n[r]),r+=1;return u}(t,n)})),Tn=function(t){for(var n,r=[];!(n=t.next()).done;)r.push(n.value);return r},Ln=dn(function(t,n){return t===n?0!==t||1/t==1/n:t!=t&&n!=n}),Un=yn(function(t){return null===t?"Null":void 0===t?"Undefined":Object.prototype.toString.call(t).slice(8,-1)}),In=dn(function(t,n){return function t(n,r,e,u){if(Ln(n,r))return!0;if(Un(n)!==Un(r))return!1;if(null==n||null==r)return!1;if("function"==typeof n["fantasy-land/equals"]||"function"==typeof r["fantasy-land/equals"])return"function"==typeof n["fantasy-land/equals"]&&n["fantasy-land/equals"](r)&&"function"==typeof r["fantasy-land/equals"]&&r["fantasy-land/equals"](n);if("function"==typeof n.equals||"function"==typeof r.equals)return"function"==typeof n.equals&&n.equals(r)&&"function"==typeof r.equals&&r.equals(n);switch(Un(n)){case"Arguments":case"Array":case"Object":if("function"==typeof n.constructor&&"Promise"===(null==(o=(n.constructor+"").match(/^function (\w*)/))?"":o[1]))return n===r;break;case"Boolean":case"Number":case"String":if(typeof n!=typeof r||!Ln(n.valueOf(),r.valueOf()))return!1;break;case"Date":if(!Ln(n.valueOf(),r.valueOf()))return!1;break;case"Error":return n.name===r.name&&n.message===r.message;case"RegExp":if(n.source!==r.source||n.global!==r.global||n.ignoreCase!==r.ignoreCase||n.multiline!==r.multiline||n.sticky!==r.sticky||n.unicode!==r.unicode)return!1;break;case"Map":case"Set":if(!t(Tn(n.entries()),Tn(r.entries()),e,u))return!1;break;case"Int8Array":case"Uint8Array":case"Uint8ClampedArray":case"Int16Array":case"Uint16Array":case"Int32Array":case"Uint32Array":case"Float32Array":case"Float64Array":case"ArrayBuffer":break;default:return!1}var o,i=Pn(n);if(i.length!==Pn(r).length)return!1;for(var a=e.length-1;a>=0;){if(e[a]===n)return u[a]===r;a-=1}for(e.push(n),u.push(r),a=i.length-1;a>=0;){var c=i[a];if(!kn(c,r)||!t(r[c],n[c],e,u))return!1;a-=1}return e.pop(),u.pop(),!0}(t,n,[],[])}),Rn=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=wn,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){var r;return this.f(n)||(this.all=!1,t=(r=this.xf["@@transducer/step"](t,!1))&&r["@@transducer/reduced"]?r:{"@@transducer/value":r,"@@transducer/reduced":!0}),t},dn(function(n,r){return new t(n,r)})}(),Dn=dn(gn(["all"],Rn,function(t,n){for(var r=0;n.length>r;){if(!t(n[r]))return!1;r+=1}return!0})),zn=function(t,n){return t(n={exports:{}},n.exports),n.exports}(function(t,n){Object.defineProperty(n,"__esModule",{value:!0}),n.validate=void 0;var r=p(hn),e=p(Nn),u=p(Cn),o=p(Fn),i=p(qn),a=p(In),c=p(Dn),f="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},s=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},l=function(){return function(t,n){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,n){var r=[],e=!0,u=!1,o=void 0;try{for(var i,a=t[Symbol.iterator]();!(e=(i=a.next()).done)&&(r.push(i.value),!n||r.length!==n);e=!0);}catch(t){u=!0,o=t}finally{try{!e&&a.return&&a.return()}finally{if(u)throw o}}return r}(t,n);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}();function p(t){return t&&t.__esModule?t:{default:t}}function y(t,n,r){return n in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var h=n.validate=(0,o.default)(function(t,n,r,o){return(0,u.default)(function(u,p){var d=o[p],v=r[p];if(Array.isArray(v))return s({},u,y({},p,function(t,n,r){return(0,c.default)((0,a.default)(!0),r)?t():n((0,i.default)(function(t){return!0!==t},r))}(function(){return t(d)},n,(0,e.default)(function(t){return function(t,n,r,e){var u=l(t,2),o=u[1];return!!(0,u[0])(n,r)||("function"==typeof o?o(n,e):o)}(t,d,o,p)},v))));if("object"===(void 0===v?"undefined":f(v)))return s({},u,y({},p,h(t,n,v,d)));if("function"==typeof v){var g=v(d);return s({},u,y({},p,h(t,n,g,d)))}return s({},u,y({},p,t([])))},{},Object.keys(o))});n.default=(0,o.default)(function(t,n){return h(function(){return!0},r.default,t,n)})}),Bn=(ln=zn)&&ln.__esModule&&Object.prototype.hasOwnProperty.call(ln,"default")?ln.default:ln;var Vn=function(t){return t&&t["@@transducer/reduced"]?t:{"@@transducer/value":t,"@@transducer/reduced":!0}},$n=function(){function t(t,n){this.xf=n,this.f=t,this.any=!1}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=function(t){return this.any||(t=this.xf["@@transducer/step"](t,!1)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.any=!0,t=Vn(this.xf["@@transducer/step"](t,!0))),t},t}(),Wn=e(function(t,n){return new $n(t,n)}),Zn=e(s(["any"],Wn,function(t,n){for(var r=0;n.length>r;){if(t(n[r]))return!0;r+=1}return!1})),Gn=e(function(t,n){return[t,n]}),Hn=e(function(t,n){return t&&n}),Xn=e(function(t,n){return xt(t)?function(){return t.apply(this,arguments)&&n.apply(this,arguments)}:Vt(Hn)(t,n)}),Jn=Dt(-1),Kn=e(kt),Yn=e(function(t,n){return a(n.length,function(){for(var r=[],e=0;n.length>e;)r.push(n[e].call(this,arguments[e])),e+=1;return t.apply(this,r.concat(Array.prototype.slice.call(arguments,n.length)))})}),Qn=r(function(t){var n=[];for(var r in t)x(r,t)&&(n[n.length]=[r,t[r]]);return n}),tr=r(function(t){return a(R(q,0,U("length",t)),function(){for(var n=0,r=t.length;r>n;){if(!t[n].apply(this,arguments))return!1;n+=1}return!0})}),nr=function(){function t(t,n){this.xf=n,this.f=t,this.all=!0}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=function(t){return this.all&&(t=this.xf["@@transducer/step"](t,!0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)||(this.all=!1,t=Vn(this.xf["@@transducer/step"](t,!1))),t},t}(),rr=e(s(["all"],e(function(t,n){return new nr(t,n)}),function(t,n){for(var r=0;n.length>r;){if(!t(n[r]))return!1;r+=1}return!0}));var er=r(function(t){return function n(r){for(var e,u,o,i=[],a=0,c=r.length;c>a;){if(y(r[a]))for(o=0,u=(e=t?n(r[a]):r[a]).length;u>o;)i[i.length]=e[o],o+=1;else i[i.length]=r[a];a+=1}return i}}(!0));function ur(t,n,r){var e,u=typeof t;switch(u){case"string":case"number":return 0===t&&1/t==-1/0?!!r._items["-0"]||(n&&(r._items["-0"]=!0),!1):null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?t in r._items[u]||(n&&(r._items[u][t]=!0),!1):(n&&(r._items[u]={},r._items[u][t]=!0),!1);case"boolean":if(u in r._items){var o=t?1:0;return!!r._items[u][o]||(n&&(r._items[u][o]=!0),!1)}return n&&(r._items[u]=t?[!1,!0]:[!0,!1]),!1;case"function":return null!==r._nativeSet?n?(e=r._nativeSet.size,r._nativeSet.add(t),r._nativeSet.size===e):r._nativeSet.has(t):u in r._items?!!kt(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1);case"undefined":return!!r._items[u]||(n&&(r._items[u]=!0),!1);case"object":if(null===t)return!!r._items.null||(n&&(r._items.null=!0),!1);default:return(u=Object.prototype.toString.call(t))in r._items?!!kt(t,r._items[u])||(n&&r._items[u].push(t),!1):(n&&(r._items[u]=[t]),!1)}}var or=function(){function t(){this._nativeSet="function"==typeof Set?new Set:null,this._items={}}return t.prototype.add=function(t){return!ur(t,!0,this)},t.prototype.has=function(t){return ur(t,!1,this)},t}(),ir=e(function(t,n){for(var r,e,u=new or,o=[],i=0;n.length>i;)r=t(e=n[i]),u.add(r)&&o.push(e),i+=1;return o})(Jt),ar=r(function(t){return a(R(q,0,U("length",t)),function(){for(var n=0,r=t.length;r>n;){if(t[n].apply(this,arguments))return!0;n+=1}return!1})}),cr=r(function(t){return!t}),fr=Vt(cr);var sr=function(t){return RegExp(t.source,(t.global?"g":"")+(t.ignoreCase?"i":"")+(t.multiline?"m":"")+(t.sticky?"y":"")+(t.unicode?"u":""))};var lr=function(t){return"[object RegExp]"===Object.prototype.toString.call(t)},pr=e(function(t,n){if(!lr(t))throw new TypeError("‘test’ requires a value of type RegExp as its first argument; received "+Ut(t));return sr(t).test(n)}),yr=pr(/^(?:[A-Z])([A-Z0-9_\-.]+)([A-Z0-9])$/i),hr=un(ot("Promise"),T(["constructor","name"]),Xt("")),dr=un(ot("Object"),T(["constructor","name"]),Xt("")),vr=fr(Z),gr=fr(it),br=un(cr,pr(/^\s*$/)),mr=tr([br,Wt(an(Number),an(String)),vr]),jr=ar([an(Boolean),an(Number),an(String),an(RegExp),an(Date)]),Or=B(function(t,n){return un(vr,T(t))(n)}),Sr=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},wr=lt(an(Array),Array),Ar=lt(an(Function),Zt),xr=lt(an(String),toString),Er=function(t,n){var r;return Sr({},t,((r={})[n[0]]=n[1],r))},kr=function(t,n){if(nt(t)!==nt(n)||Z(n)){if(an(Array,t)&&!Z(n))return[].concat(t,wr(n));if(!dr(t))return t}else{if(jr(n)||an(Function,n))return n;if(an(Array,t))return[].concat(t,wr(n))}return gt(t,n)},_r=e(function(t,n){for(var r=0,e=Math.min(t.length,n.length),u={};e>r;)u[t[r]]=n[r],r+=1;return u}),Pr=un(D,L("types")),Nr=function(t,n){return an(Array,t)?[].concat(t,wr(n)):n},Cr=Ht(tr([un(cr,jr),un(cr,an(Array)),an(Object)]),un(Object.freeze,R(Er,{}),Tt(Zn(Wt(Z,it))),M(function(t){var n=t[0],r=t[1];return an(Array,r)?[n,Object.freeze(_r(r.filter(jr),r.filter(jr)))]:dr(r)?[n,un(Ht(it,Zt(null),Object.freeze),qt(jr))(r)]:jr(r)?[n,r]:null}),Qn,Tt(it)),Zt({})),Fr=B(function(t,n){var r=t.namespace,e=t.store;return _r(n,n.map(function(t){return(r||"")+"/"+(e||"")+"/"+t}))}),Mr=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},qr=ar([Z,it]),Tr=B(function(t,n){var r=n.initialState,e=void 0===r?{}:r,u=n.stateMachinesPropName,o=void 0===u?["states"]:u;return un(lt(Or(o),G(o,{})),Xt(e))(t)}),Lr=un(ir,qt(mr),er,M(D),D),Ur=un(ir,qt(mr),er,M(F),D),Ir=un(ir,er,M(Ur),D,L("machines")),Rr=bt(on,[Ir,Pr]),Dr=un(rr(an(String)),F),zr=un(rr(tr([dr,Wt(it,un(rr(rr(an(String))),Qn))])),D),Br=(un(rr(it),Rr),Yn(on,[Lr,F])),Vr=(B(function(t,n,r){return un(V(xr(t)),Xt({}),T([xr(n)]),Xt({}))(r)}),B(function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return un(Object.freeze,R(Er,{}),M(function(r){var e=r[1];return[r[0],yt(un(M(zt),qt(un(Kn(Gt,D(n)),zt)),qt(un(V(Gt,t),Jn)),qt(rr(an(String))),Qn)(e),e)]}),qt(Xn(un(an(String),zt),un(dr,Jn))),Qn)(t)})),$r=B(function(t,n){return un(Object.freeze,R(Er,{}),M(function(t){return[t[0],Vr(t[1],n.types)]}),Qn)(t)}),Wr=Ht(tr([an(String),Kn("."),yr]),Rt("."),un(pt(it,Zt(["states"])),qt(br),pt(an(String),Array))),Zr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=t.machines,r=void 0===n?{}:n,e=t.stateMachinesPropName;return un(gt(M(Zt("initial"),r)),yt(F(r)),Xt({}),T(wr(e)))},Gr=B(function(t,n,r){var e=r.machines,u=void 0===e?{}:e,o=Zr({machines:u,stateMachinesPropName:r.stateMachinesPropName})(t);return un(R(Er,{}),M(function(t){var r=t[0],e=t[1];return un(Gn(r),lt(vr,Zt(o[r])),L(n.type),Xt({}),L(o[r]))(e)}),Qn)(u)}),Hr=B(function(t,n,r){var e=r.machines,u=Zr({machines:e,stateMachinesPropName:r.stateMachinesPropName})(t);return un(Zn(function(t){var r=t[0],e=t[1];return un(vr,L(n.type),Xt({}),L(Gt,e),L(r))(u)}),Qn)(e)}),Xr=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},Jr=function(t,n){return Z(t)?L("initialState",n):t},Kr=B(function(t,n,r,e){return t(Jr(r,n),e,n)}),Yr=B(function(t,n,r,e){var u=Tr(Jr(r,n),n),o=G(n.stateMachinesPropName,Gr(u,e,n),{});return Xr({},t(Xr({},u,o),e,n),o)}),Qr=B(function(t,n,r,e,u){return n.reducer(t.reducer(Jr(r),e,u),e,u)}),te=bt(Kr,[un(Xt(Jt),T(["options","reducer"])),Jt]),ne=bt(Yr,[un(Xt(Jt),T(["options","reducer"])),Jt]),re=tn(0,-1),ee=e(function(t,n){var r={};return o(n.length,function(){var e=t.apply(this,arguments);return x(e,r)||(r[e]=n.apply(this,arguments)),r[e]})})(function(){return Ut(arguments)}),ue=e(function(t,n){var r={};for(var e in n)t(n[e],e,n)&&(r[e]=n[e]);return r}),oe=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},ie=un(ot(!0),L("needsExtraction")),ae=function(){for(var t=arguments.length,n=Array(t),r=0;t>r;r++)n[r]=arguments[r];return ee(bt(Jn(n),re(n)))},ce=I(function(t,n,r){return Xt(t,T(n,r))}),fe=I(function(t,n,r){return r.replace(t,n)}),se=Zt(!0),le=r(function(t){var n=R(q,0,M(function(t){return t[0].length},t));return o(n,function(){for(var n=0;t.length>n;){if(t[n][0].apply(this,arguments))return t[n][1].apply(this,arguments);n+=1}})});function pe(t,n,r){t.addEventListener("message",function(e){var u=e.data,o=u.id;if("RPC"===u.type&&null!=o)if(u.method){var i=n[u.method];null==i?t.postMessage({type:"RPC",id:o,error:"NO_SUCH_METHOD"}):Promise.resolve().then(function(){return i.apply(null,u.params)}).then(function(n){t.postMessage({type:"RPC",id:o,result:n})}).catch(function(n){t.postMessage({type:"RPC",id:o,error:""+n})})}else{var a=r[o];if(null==a)throw Error("Unknown callback "+o);delete r[o],u.error?a[1](Error(u.error)):a[0](u.result)}})}var ye="undefined"!=typeof Worker&&null!==Worker&&"undefined"!=typeof Blob&&null!==Blob,he=le([[an(Function),It(0,"toString")],[an(String),Jt],[se,Zt("")]]),de=rn(fe(/^(\s*)\(/m,"export const run = ("),fe(/^(\s*)const/m,"export const"),fe(/^(\s*)function\s*\(/m,"export function run("),fe(/^(\s*)function\s+/m,"export function "),fe(/^(\s*)function\*\s+/m,"export function* "),fe(/^(\s*)async\s+\(/m,"export const run = async ("),fe(/^(\s*)async\s+function\s*\(/m,"export async function run(")),ve=rn(he,de,lt(pr(/^\s*$/),function(t){return function(t,n){var r=this,e={},u="__xpo"+(""+Math.random()).substring(2)+"__";"function"==typeof t&&(t="("+Function.prototype.toString.call(t)+")("+u+")"),t=function(t,n,r){return t=(t=t.replace(/^(\s*)export\s+default\s+/m,function(t,e){return r.default=!0,""+e+n+".default="})).replace(/^(\s*)export\s+((?:async\s*)?function(?:\s*\*)?|const|let|var)(\s+)([a-zA-Z$_][a-zA-Z0-9$_]*)/gm,function(t,e,u,o,i){return r[i]=!0,""+e+n+"."+i+"="+u+o+i}),"var "+n+"={};\n"+t+"\n"+n+";"}(t,u,e)+"\n("+Function.prototype.toString.call(pe)+")(self,"+u+",{})";var o,i=URL.createObjectURL(new Blob([t])),a=new Worker(i,n),c=a.terminate,f={},s=0;for(o in a.kill=function(t){a.postMessage({type:"KILL",signal:t}),setTimeout(a.terminate)},a.terminate=function(){URL.revokeObjectURL(i),c.call(r)},a.call=function(t,n){return new Promise(function(r,e){var u="rpc"+ ++s;f[u]=[r,e],a.postMessage({type:"RPC",id:u,method:t,params:n})})},a.rpcMethods={},pe(a,a.rpcMethods,f),a.expose=function(t){a[o]=function(){return a.call(t,[].slice.call(arguments))}},e)o in a||a.expose(o);return a}(""+t)})),ge=bt(ct,[un(Ar,ce({},["options","workers"])),Jt]),be=rn(ge,M(ye?ve:rn(he,de)),Tt(pr(/^\s*$/))),me=function(){function t(t,n){this.xf=n,this.f=t,this.found=!1}return t.prototype["@@transducer/init"]=O,t.prototype["@@transducer/result"]=function(t){return this.found||(t=this.xf["@@transducer/step"](t,void 0)),this.xf["@@transducer/result"](t)},t.prototype["@@transducer/step"]=function(t,n){return this.f(n)&&(this.found=!0,t=Vn(this.xf["@@transducer/step"](t,n))),t},t}(),je=e(s(["find"],e(function(t,n){return new me(t,n)}),function(t,n){for(var r=0,e=n.length;e>r;){if(t(n[r]))return n[r];r+=1}})),Oe=bt(ct,[un(Ar,ce({},["options","queries"])),Jt]),Se=un(Tt(Z),M(function(t){return an(Array,t)?(je(an(Function),t)||Jt)(je(an(String),t)||""):an(String,t)?t:null}),Oe),we=un(qt(an(String)),M(Ht(an(Array),je(an(String)),Zt(null))),L("queries")),Ae=bt(G(["consts","queries"]),[we,Jt]),xe=e(Ct(s(["any"],Wn,Zn)));var Ee=function(t){return"[object Number]"===Object.prototype.toString.call(t)},ke=r(function(t){return null!=t&&Ee(t.length)?t.length:NaN}),_e=r(function(t){var n,r=[];for(n in t)r[r.length]=t[n];return r}),Pe=r(function(t){var n=[];for(var r in t)n[n.length]=[r,t[r]];return n}),Ne="\t\n\v\f\r \u2028\u2029\ufeff",Ce=r(!("function"==typeof String.prototype.trim)||Ne.trim()?function(t){var n=RegExp("^["+Ne+"]["+Ne+"]*"),r=RegExp("["+Ne+"]["+Ne+"]*$");return t.replace(n,"").replace(r,"")}:function(t){return t.trim()}),Fe=It(0,"toUpperCase"),Me=Cr({VALIDATION_LEVELS:["STRICT","CANCEL","PRUNE","LOG"]}).VALIDATION_LEVELS,qe=Object.assign||function(t){for(var n=1;arguments.length>n;n++){var r=arguments[n];for(var e in r)Object.prototype.hasOwnProperty.call(r,e)&&(t[e]=r[e])}return t},Te=Kn(Gt,F(Me)),Le=un(lt(Te,Zt("CANCEL")),Fe,Ce,xr),Ue=B(function(t,n){return un(R(function(n,r){var e,u=r[0],o=r[1],i=dr(o)?Ue(t[u],o):o;return dr(i)&&it(i)?n:qe({},n,((e={})[u]=!0===i?t[u]:i,e))},{}),Tt(un(an(Array),Dt(1))),Pe)(n)}),Ie=un(R(function(t,n){var r,e=n[0],u=n[1],o=dr(u)?Ie(u):u;return dr(o)&&it(o)?t:qe({},t,((r={})[e]=o,r))},{}),Tt(function(t){return!0===t[1]}),Pe),Re=function(t){return un(Xt(se),L(Gt,t),L("type"))},De=function t(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(Zn(Wt(Xn(dr,t),an(Array))),_e)(n)},ze={namespace:Jt,store:Jt,validationLevel:Le,stateMachinesPropName:Wr,consts:Cr},Be={consts:{},creators:{},machines:{},queries:{},workers:{},selectors:{},stateMachinesPropName:"states",types:[],validationLevel:"CANCEL",validators:{}},Ve={validationLevel:[[Te,"must be: STRICT, CANCEL, PRUNE, or LOG. CANCEL is the default."]],store:[[mr,"must be a (non-blank) string"]],namespace:[[mr,"must be a (non-blank) string"]],stateMachinesPropName:[[Wt(mr,Xn(an(Array),rr(mr))),"must be a string (or array of strings)"]],consts:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],creators:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],machines:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],selectors:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],types:[[Xn(an(Array),rr(an(String))),"must be an object (or a function returning an object)"]],validators:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],enhancers:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],queries:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],workers:[[Wt(dr,an(Function)),"must be an object (or a function returning an object)"]],reducer:[[an(Function),"must be a function"]],initialState:[[ar([jr,dr,an(Function)]),"must be an object, a function returning an object, or a primitive value"]]},$e={store:[[mr,"must be a (non-blank) string"]],namespace:[[mr,"must be a (non-blank) string"]],types:[[dr,"must be an object"],[un(rr(un(ot(1),ke,ir)),M(function(t){var n=t[1];return[t[0],un(Jn,Rt("/"))(n)]}),qt(rr(an(String))),Qn),"each key and value are identical"]],machines:[[un(rr(dr),D),"must be an object"],[un(rr(gr),D),"must not be empty"],[un(rr(tr([Dr,zr])),D),"each machine contains nested objects (states) whose inputs and transitions are strings"],[un(rr(Br),D),"each transition value must also be a state"]],stateMachinesPropName:[[Xn(an(Array),rr(mr)),'must be an array of strings (representing the path to the "current state" prop)']]},We=un(it,on(["store","namespace","validators","types"]),F),Ze=ar([fr(dr),un(it,F),un(xe(We),D)]),Ge=e(function(t,n){return n.match(t)||[]}),He=e(function(t,n){for(var r=[],e=0,u=Math.min(t.length,n.length);u>e;)r[e]=[t[e],n[e]],e+=1;return r}),Xe=B(function(t,n){return function(t){for(var n=arguments.length,r=Array(n>1?n-1:0),e=1;n>e;e++)r[e-1]=arguments[e];return mr(t)&&r.length?He(Ge(/(%?)(%([jods]))/g,t),M(le([[Wt(an(Number),an(String)),Jt],[Wt(an(Array),dr),JSON.stringify]]))(r)).reduce(function(t,n){return t.replace(n[0],n[1])},t).replace(/%{2,2}/g,"%"):t}(t,n)}),Je=un(M(Xe("These inputs are not valid Action Types: %o")),qt(gr),M(Rr),D,qt(We)),Ke=un(M(Xe("These violations of the schema rules for the middleware were found: %o")),qt(gr),M(un(Ie,Bn($e))),D,qt(We)),Ye=un(rr(function(t){return ot(t[0],L("store",t[1]))}),Qn,qt(We)),Qe=function(t){if(Ze(t))return"No ducks have been provided! To create the Attadux middleware please provide an Object containing one or more ducks";if(!Ye(t))return"The name of each duck should match its 'store' prop, otherwise it will not be possible to find the correct duck for each dispatched action";var n=Je(t);if(gr(n))return Xe("Invalid State Machines: %o",n);var r=Ke(t);return gr(r)?Xe("Invalid Ducks: %o",r):null},tu=un(R(function(t,n){return W(n.store,n,t)},{}),qt(We),Kt(Jt)),nu=function(t){return un(Xt({}),Ht(br,L(Gt,qt(We,t)),Zt({})),Wt(Dt(1),zt),Rt("/"),L("type"))},ru=un(At,Ot([un(mt("stateMachinesPropName"),Zt(["states"])),un(bt(gt,[un(ht(ze),yt(F(ze)),Ae),un(mt("types"),bt(Fr,[Jt,L("types")]))]),L("validatedOptions")),un(pt(gr,mt("invalidOptions")),Ie,L("validationsResult")),un(mt("options"),L("validatedOptions"))]),St,function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=yt(F(Ve),t),r=Bn(Ve,n);return{validationsResult:r,validatedOptions:Ue(n,r)}}),eu=un(lt(st("validationLevel","PRUNE"),ht({validators:M(function(t){return un(Ie,t)})})),bt(gt,[Jt,Ht(ft(Z,["options","validators"]),Zt({}),un(mt("validators"),M(Bn),bt(ct,[un(Ar,T(["options","validators"])),Jt])))])),uu=bt(gt,[Jt,Ht(ft(Z,["options","queries"]),Zt({}),un(mt("queries"),Se))]),ou=bt(gt,[Jt,Ht(ft(Z,["options","workers"]),Zt({}),un(mt("workers"),be))]),iu=bt(gt,[Jt,Ht(ft(Z,["options","machines"]),Zt({}),un(mt("machines"),bt($r,[bt(ct,[un(Ar,T(["options","machines"])),Jt]),Jt])))]),au=bt(gt,[Jt,un(mt("initialState"),bt(gt,[bt(ct,[un(Ar,T(["options","initialState"])),Jt]),Ht(at(it,"machines"),Zt({}),un(H({}),bt(G,[L("stateMachinesPropName"),un(function(){return R(function(t,n){var r;return Mr({},t,((r={})[n]="initial",r))},{},F((arguments.length>0&&void 0!==arguments[0]?arguments[0]:{})||{}))},L("machines"))])))]))]),cu=bt(gt,[Jt,Ht(ft(Z,["options","selectors"]),Zt({}),un(mt("selectors"),function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(R(function(t,n){var r;return oe({},t,((r={})[n[0]]=n[1].justAddDuckSelectors(t),r))},t),Qn,ue(ie))(t)},bt(ct,[un(Ar,T(["options","selectors"])),Jt])))]),fu=bt(gt,[Jt,Ht(ft(Z,["options","enhancers"]),Zt({}),un(mt("enhancers"),un(M(Ht(V("type"),B(function(t,n){return un(yt(F(t)),fn(t))(n)}),fn)),bt(ct,[un(Ar,T(["options","enhancers"])),Jt]))))]),su=bt(gt,[Jt,Ht(ft(Z,["options","creators"]),Zt({}),un(mt("creators"),bt(ct,[un(Ar,T(["options","creators"])),Jt])))]),lu=bt(gt,[Jt,Ht(Wt(ft(Z,["options","reducer"]),at(it,"machines")),un(mt("reducer"),te),un(mt("reducer"),ne))]),pu=bt(gt,[Jt,Ht(at(Z,"validators"),Zt({}),un(z({isPayloadValid:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(cr,De,H(n),Re(t))(n)}},getValidationErrors:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(pt(it,Zt(null)),Ie,H(n),Re(t))(n)}},pruneInvalidFields:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return function(){var n=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return un(pt(it,Zt(null)),Ue(n),function(t){return t(n)},Re(t))(n)}}}),L("validators")))]),yu=e(function(t,n){return a(t,function(){for(var r,e=1,u=n,o=0;t>=e&&"function"==typeof u;)u=u.apply(this,Array.prototype.slice.call(arguments,o,r=e===t?arguments.length:o+u.length)),e+=1,o=r;return u})}),hu=I(function(t,n,r){for(var e=0,u=r.length,o=[],i=[n];u>e;)i=t(i[0],r[e]),o[e]=i[1],e+=1;return[i[0],o]}),du=e(function(t,n){if(c(t)){if(c(n))return t.concat(n);throw new TypeError(Ut(n)+" is not an array")}if(p(t)){if(p(n))return t+n;throw new TypeError(Ut(n)+" is not a string")}if(null!=t&&xt(t["fantasy-land/concat"]))return t["fantasy-land/concat"](n);if(null!=t&&xt(t.concat))return t.concat(n);throw new TypeError(Ut(t)+' does not have a method named "concat" or "fantasy-land/concat"')}),vu=I(function(t,n,r){return vt(function(n,r,e){return t(r,e)},n,r)}),gu=B(function(t,n,r){var e=n.options;return le([[un(Zn(an(Function)),M(L(r)),Gn(e)),Zt(bt(vu(kr),[Ar(e[r]),bt(Ar(t[r]),[Jt,Ar(e[r])])]))],[un(Z,L(r)),Zt(e[r])],[se,un(vu(kr,e[r]),L(r))]])(t)}),bu=function(t){return un(bt(gt,[Jt,un(mt("reducer"),(n=t,r=n.options,un(Ht(rr(V("reducer")),un(Qr(r),Jn),un(je(V("reducer")),Gn(r))),Gn(r))))]),R(gt,{}),du([Be,t.options]),St,H(t),Ar);var n,r},mu=B(function(t,n,r){return un(gt(r),At,Jn,hu(function(t,n){var r=n[0],e=n[1],u=un(mt(r),pt(an(Function),H(r)),e)(t);return[gt(t,u),u]},n))(t)}),ju=un(Object.freeze,lu,ou,pu,su,fu,cu,au,iu,eu,uu,ru,gt(Be)),Ou=bt(un,[Zt(ju),function(t){var n=bu(t);return function(r){var e=n(r),u=[["consts",un(vu(Nr,Gt,e.consts),T(["options","consts"]))],["types",un(ir,du(e.types),T(["options","types"]))],["initialState",gu(e)],["machines",gu(e)],["creators",gu(e)],["selectors",gu(e)],["queries",gu(e)],["enhancers",gu(e)],["validators",gu(e)],["workers",gu(e)]];return mu(u,t,e)}}]),Su=yu(2,Ou),wu=Zt(!1),Au=I(function(t,n,r){return an(t,r[n])}),xu=I(function(t,n,r){return null!=r&&x(n,r)?r[n]:t}),Eu=un(Dt(1),Rt("/"));t.createRow=tu,t.createDuck=ju,t.extendDuck=Su,t.createExtenderForDuck=Ou,t.createSelector=ae,t.createDuckSelector=function(t){return{needsExtraction:!0,justAddDuckSelectors:function(){var n=t(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{});return Array.isArray(n)?ae.apply(void 0,n):n}}},t.createEnhancerMiddleware=function(t){var n=Qe(t);if(n)throw Error(n);var r=nu(t);return function(t){var n=t.dispatch;return function(t){return function(e){var u=r(e).enhancers,o=(void 0===u?{}:u)[e.type];if(!an(Function,o))return t(e);var i=o(e);return Wt(Z,it)(i)?t(e):(i.type!==e.type&&n(i),t(i))}}}},t.createValidatorMiddleware=function(t){var n=Qe(t);if(n)throw Error(n);var r=nu(t);return function(t){var n=t.getState;return function(t){return function(e){var u,o=r(e),i=o.machines,a=o.isPayloadValid,c=void 0===a?se:a,f=o.getValidationErrors,s=void 0===f?Zt(null):f,l=o.pruneInvalidFields,p=void 0===l?Zt(e):l,y=o.stateMachinesPropName,h=void 0===y?"states":y,d=o.validationLevel,v=void 0===d?Me.CANCEL:d;if(qr(i))return t(e);var g=((u={})[Me.CANCEL]=lt(c,wu),u[Me.LOG]=bt(cn,[Jt,un(Ht(Z,Zt({}),mt("validationErrors")),s)]),u[Me.PRUNE]=p,u[Me.STRICT]=lt(bt(Hr,[n,Jt,Zt({machines:i,stateMachinesPropName:h})]),wu),u),b=ct(un(Xt(Jt),L(v))(g),e);return b&&t(b)}}}},t.createWorkerMiddleware=function(t){var n=Qe(t);if(n)throw Error(n);var r=nu(t),e=rn(r,xu({},"workers")),u=Ht(T(["meta","worker"]),bt(lt(an(String)),[rn(L("type"),Zt),T(["meta","worker"])]),Zt(null)),o=rn(u,L),i=bt(ct,[o,e]);return function(t){var n=t.dispatch,r=t.getState;return function(t){return function(e){var o=u(e);if(o){var a=rn(i,Xt({}),function(t){return le([[an(Function),Jt],[Au(Function,t),L(t)],[Au(Function,"run"),L("run")]])}(o))(e);if(an(Function,a)){var c=Eu(e.type),f=a({action:e,state:c?r()[c]:{}});hr(f)?f.then(function(t){L("type",t)&&n(t)}):L("type",f)&&n(f)}}return t(e)}}}},Object.defineProperty(t,"__esModule",{value:!0})}); |
@@ -45,3 +45,3 @@ import _default17 from 'ramda/src/defaultTo'; | ||
return function (next) { | ||
return async function (action) { | ||
return function (action) { | ||
var workerName = getWorkerName(action); | ||
@@ -60,6 +60,7 @@ if (workerName) { | ||
if (isPromise(result)) { | ||
var asyncResult = await result; | ||
if (_default12('type', asyncResult)) { | ||
dispatch(asyncResult); | ||
} | ||
result.then(function (asyncResult) { | ||
if (_default12('type', asyncResult)) { | ||
dispatch(asyncResult); | ||
} | ||
}); | ||
} else if (_default12('type', result)) { | ||
@@ -66,0 +67,0 @@ dispatch(result); |
{ | ||
"name": "attadux", | ||
"version": "0.1.11", | ||
"version": "0.1.12", | ||
"description": "Implementation of the redux-modular-ducks, forked from the extensible-duck implementation and extended to include spected validators, state machines, helpers, and to follow a broader/looser definition of constants", | ||
@@ -5,0 +5,0 @@ "main": "cjs/index.js", |
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
553370
11225