react-hooks-easy
Version:
Easy use hooks and data linkage
1 lines • 29.5 kB
JavaScript
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var o=e[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,r),o.l=!0,o.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var o in t)r.d(n,o,function(e){return t[e]}.bind(null,o));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="/",r(r.s=12)}([function(t,e,r){t.exports=r(5)},function(t,e,r){"use strict";t.exports=r(4)},function(t,e,r){"use strict";r.r(e);var n=r(1),o=r(0),a=r.n(o);function u(t){if("string"==typeof t);else{if("function"!=typeof t)throw new Error("Invalid namespace");t=t()}return t}function i(t){return(i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function c(t){h(t,"boolean")}function s(t){h(t,"string")}function f(t){if((t=""+t).search(/^[+-]?[0-9.]*$/)<0)throw new Error("The initial value is not a number type")}function l(t){if("object"!==i(t)||void 0===t.length)throw new Error("The initial value is not a array type")}function p(t){h(t,"object")}function h(t,e){if(i(t)!==e)throw new Error("The initial value is not a "+e+" type")}const v=t=>"function"==typeof t,y=t=>"object"==typeof t,d=(t,e)=>y(t)&&null!==t?((t=>Array.isArray(t))(t)?t.forEach((r,n)=>{y(r)&&(t[n]=d(r,e))}):y(t)&&Object.keys(t).forEach(r=>{y(t[r])&&(t[r]=d(t[r],e))}),new Proxy(t,e)):t;var b={};const m={};var w=t=>{const[,e]=Object(n.useState)();Object(n.useEffect)(()=>(((t,e)=>{m[t]||(m[t]=[]),m[t].push(e)})(t,e),()=>((t,e)=>{if(!m[t])return;const r=m[t].indexOf(e);-1!==r&&m[t].splice(r,1)})(t,e)),[])},g=d({},{get(t,e){if(!b[e])throw new Error(`Not found the store: ${e}.`);return w(e),b[e]}});const x=["loading","stores","useStore"];var k=t=>{const{namespace:e="",...r}=t;let n,o=!1;const a={},u={namespace:e};if(!e)throw new Error("Invalid params, namespace is required.");if(b[e])return b[e];x.forEach(t=>{if(!(t=>void 0===t)(r[t]))throw new Error(`${t} is not allowd in params.`)}),Object.keys(r).forEach(t=>{v(r[t])?a[t]=r[t]:u[t]=r[t]});const i=t=>{const e=Object.keys(a);for(let r=0;r<e.length;r++)if(n[e[r]][t])return!0;return!1},c={set:(t,r,n)=>x.includes(r)||v(n)?(t[r]=n,!0):(i("unlock")||console.error("Do not modify data within components, call a method of service to update the data.",`namespace:${e}, prop:${r}, value:${n}`),t[r]!==n&&(o=!0),t[r]=d(n,c),!0)};n=d(u,c);const s=()=>{o&&(o=!1,((t,e)=>{m[t]&&m[t].forEach(t=>t(e))})(e,Math.random()))};return Object.keys(a).forEach(t=>{n[t]=(...e)=>{n[t].unlock=!0;const r=a[t].apply(n,e);return(t=>t instanceof Promise||y(t)&&v(t.then))(r)?(o=!0,n[t].loading=!0,n[t].unlock=!0,s(),new Promise((e,a)=>{r.then(e).catch(a).finally(()=>{o=!0,n[t].loading=!1,n[t].unlock=!1,s()})})):(n[t].unlock=!1,s(),r)},n[t].loading=!1,n[t].unlock=!1}),Object.defineProperty(n,"loading",{get:()=>i("loading")}),Object.assign(n,{stores:b,useStore:()=>(()=>g)()[e]}),b[e]=n,n},j=g;function O(t,e,r,n,o,a,u){try{var i=t[a](u),c=i.value}catch(t){return void r(t)}i.done?e(c):Promise.resolve(c).then(n,o)}function S(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){O(a,n,o,u,i,"next",t)}function i(t){O(a,n,o,u,i,"throw",t)}u(void 0)})}}var _={};function E(t,e){var r=function(t,e){return t=u(t),void 0!==e&&(c(e),_[t]||(_[t]=e),k({namespace:t,value:e,set:(n=S(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return c(e=t.t0),this.value=e,t.abrupt("return",this.value);case 11:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)}),reset:function(){return this.value=_[t],this.value},reInitial:(r=S(a.a.mark(function e(r){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!v(r)){e.next=6;break}return e.next=3,r();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=r;case 7:return c(r=e.t0),_[t]=r,this.value=r,e.abrupt("return",this.value);case 12:case"end":return e.stop()}},e,this)})),function(t){return r.apply(this,arguments)}),toggle:function(){return this.value=!this.value,this.value}})),j[t];var r;var n}("boolean_"+t,e);return{value:r.value,set:r.set,reset:r.reset,reInitial:r.reInitial,toggle:r.toggle}}function P(t,e,r,n,o,a,u){try{var i=t[a](u),c=i.value}catch(t){return void r(t)}i.done?e(c):Promise.resolve(c).then(n,o)}function L(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){P(a,n,o,u,i,"next",t)}function i(t){P(a,n,o,u,i,"throw",t)}u(void 0)})}}var I={};function $(t,e){var r=function(t,e){return t=u(t),void 0!==e&&(f(e),e=Number(e),I[t]||(I[t]=e),k({namespace:t,value:e,set:(i=L(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return f(e=t.t0),this.value=Number(e),t.abrupt("return",this.value);case 11:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)}),reset:function(){return this.value=I[t],this.value},reInitial:(o=L(a.a.mark(function e(r){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!v(r)){e.next=6;break}return e.next=3,r();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=r;case 7:return f(r=e.t0),I[t]=Number(r),this.value=r,e.abrupt("return",this.value);case 12:case"end":return e.stop()}},e,this)})),function(t){return o.apply(this,arguments)}),increment:(n=L(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return f(e=t.t0),this.value+=Number(e),t.abrupt("return",this.value);case 11:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)}),decrement:(r=L(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return f(e=t.t0),this.value-=Number(e),t.abrupt("return",this.value);case 11:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)})})),j[t];var r;var n;var o;var i}("number_"+t,e),n=r.value,o=r.set,i=r.reset,c=r.reInitial,s=r.increment,l=r.decrement;return{value:n,set:o,reset:i,reInitial:c,inc:s,increment:s,dec:l,decrement:l}}function A(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}function C(t,e,r,n,o,a,u){try{var i=t[a](u),c=i.value}catch(t){return void r(t)}i.done?e(c):Promise.resolve(c).then(n,o)}function N(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){C(a,n,o,u,i,"next",t)}function i(t){C(a,n,o,u,i,"throw",t)}u(void 0)})}}function R(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{},n=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(n=n.concat(Object.getOwnPropertySymbols(r).filter(function(t){return Object.getOwnPropertyDescriptor(r,t).enumerable}))),n.forEach(function(e){T(t,e,r[e])})}return t}function T(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}var M={};function F(t,e){var r=function(t,e){return t=u(t),void 0!==e&&(p(e),M[t]||(M[t]=R({},e)),k({namespace:t,value:e,add:(n=N(a.a.mark(function t(e,r){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(r)){t.next=6;break}return t.next=3,r();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=r;case 7:return r=t.t0,this.value[e]=r,t.abrupt("return",this.value);case 10:case"end":return t.stop()}},t,this)})),function(t,e){return n.apply(this,arguments)}),reset:function(){return this.value=R({},M[t]),this.value},reInitial:(r=N(a.a.mark(function e(r){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!v(r)){e.next=6;break}return e.next=3,r();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=r;case 7:return p(r=e.t0),M[t]=R({},r),this.value=r,e.abrupt("return",this.value);case 12:case"end":return e.stop()}},e,this)})),function(t){return r.apply(this,arguments)}),del:function(t){return delete this.value[t],this.value},splice:function(t,e,r){var n=R({},this.value),o=Object.keys(n),a=Object.values(n);o.splice.apply(o,[t,e].concat(A(Object.keys(r)))),a.splice.apply(a,[t,e].concat(A(Object.values(r))));var u={};for(var i in o)u[o[i]]=a[i];return this.value=u,this.value}})),j[t];var r;var n}("object_"+t,e),n=r.value,o=r.add;return{value:n,set:o,add:o,reset:r.reset,reInitial:r.reInitial,del:r.del,splice:r.splice}}function q(t,e){return F(t,e)}function G(t,e,r,n,o,a,u){try{var i=t[a](u),c=i.value}catch(t){return void r(t)}i.done?e(c):Promise.resolve(c).then(n,o)}function U(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){G(a,n,o,u,i,"next",t)}function i(t){G(a,n,o,u,i,"throw",t)}u(void 0)})}}function D(t){return function(t){if(Array.isArray(t)){for(var e=0,r=new Array(t.length);e<t.length;e++)r[e]=t[e];return r}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var V={};function B(t,e){var r=function(t,e){return t=u(t),void 0!==e&&(l(e),V[t]||(V[t]=D(e)),k({namespace:t,value:e,add:(i=U(a.a.mark(function t(e){var r,n=arguments;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(void 0!==(r=n.length>1&&void 0!==n[1]?n[1]:void 0)){t.next=5;break}this.value.push(e),t.next=14;break;case 5:if(!v(r)){t.next=11;break}return t.next=8,r();case 8:t.t0=t.sent,t.next=12;break;case 11:t.t0=r;case 12:r=t.t0,this.value[e]=r;case 14:return t.abrupt("return",this.value);case 15:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)}),reset:function(){return this.value=D(V[t]),this.value},reInitial:(o=U(a.a.mark(function e(r){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!v(r)){e.next=6;break}return e.next=3,r();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=r;case 7:return l(r=e.t0),V[t]=D(r),this.value=r,e.abrupt("return",this.value);case 12:case"end":return e.stop()}},e,this)})),function(t){return o.apply(this,arguments)}),del:function(t){delete this.value[t]},push:(n=U(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return e=t.t0,this.value.push(e),t.abrupt("return",this.value);case 10:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)}),unshift:(r=U(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:e=t.t0,this.value.unshift(e);case 9:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)}),splice:function(t,e){for(var r,n=arguments.length,o=new Array(n>2?n-2:0),a=2;a<n;a++)o[a-2]=arguments[a];return(r=this.value).splice.apply(r,[t,e].concat(o)),this.value}})),j[t];var r;var n;var o;var i}("array_"+t,e),n=r.value,o=r.add,i=r.reset,c=r.reInitial,s=r.push,f=r.unshift;return{value:n,set:o,add:o,reset:i,reInitial:c,push:s,append:s,unshift:f,prepend:f,del:r.del,splice:r.splice}}function Y(t,e){return B(t,e)}function z(t,e,r,n,o,a,u){try{var i=t[a](u),c=i.value}catch(t){return void r(t)}i.done?e(c):Promise.resolve(c).then(n,o)}function H(t){return function(){var e=this,r=arguments;return new Promise(function(n,o){var a=t.apply(e,r);function u(t){z(a,n,o,u,i,"next",t)}function i(t){z(a,n,o,u,i,"throw",t)}u(void 0)})}}var W={};function J(t,e){var r=function(t,e){return t=u(t),void 0!==e&&(s(e),W[t]||(W[t]=e),k({namespace:t,value:e,set:(l=H(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return s(e=t.t0),this.value=e,t.abrupt("return",this.value);case 11:case"end":return t.stop()}},t,this)})),function(t){return l.apply(this,arguments)}),reset:function(){return this.value=W[t],this.value},reInitial:(f=H(a.a.mark(function e(r){return a.a.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(!v(r)){e.next=6;break}return e.next=3,r();case 3:e.t0=e.sent,e.next=7;break;case 6:e.t0=r;case 7:return r=e.t0,W[t]=r,this.value=r,e.abrupt("return",this.value);case 11:case"end":return e.stop()}},e,this)})),function(t){return f.apply(this,arguments)}),append:(c=H(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return s(e=t.t0),this.value+=e,t.abrupt("return",this.value);case 11:case"end":return t.stop()}},t,this)})),function(t){return c.apply(this,arguments)}),prepend:(i=H(a.a.mark(function t(e){return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(!v(e)){t.next=6;break}return t.next=3,e();case 3:t.t0=t.sent,t.next=7;break;case 6:t.t0=e;case 7:return s(e=t.t0),this.value=e+this.value,t.abrupt("return",this.value);case 11:case"end":return t.stop()}},t,this)})),function(t){return i.apply(this,arguments)}),replace:(o=H(a.a.mark(function t(e){var r,n=arguments;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:if(r=n.length>1&&void 0!==n[1]?n[1]:"",!v(r)){t.next=7;break}return t.next=4,r();case 4:t.t0=t.sent,t.next=8;break;case 7:t.t0=r;case 8:return s(r=t.t0),this.value=this.value.replace(e,r),t.abrupt("return",this.value);case 12:case"end":return t.stop()}},t,this)})),function(t){return o.apply(this,arguments)}),substring:(n=H(a.a.mark(function t(e){var r,n=arguments;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:void 0,this.value=this.value.substring(e,r),t.abrupt("return",this.value);case 3:case"end":return t.stop()}},t,this)})),function(t){return n.apply(this,arguments)}),substr:(r=H(a.a.mark(function t(e){var r,n=arguments;return a.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:return r=n.length>1&&void 0!==n[1]?n[1]:void 0,this.value=this.value.substr(e,r),t.abrupt("return",this.value);case 3:case"end":return t.stop()}},t,this)})),function(t){return r.apply(this,arguments)})})),j[t];var r;var n;var o;var i;var c;var f;var l}("string_"+t,e);return{value:r.value,set:r.set,reset:r.reset,reInitial:r.reInitial,append:r.append,prepend:r.prepend,replace:r.replace,substring:r.substring,substr:r.substr}}r.d(e,"useBoolean",function(){return E}),r.d(e,"useNumber",function(){return $}),r.d(e,"useObject",function(){return F}),r.d(e,"useMap",function(){return q}),r.d(e,"useArray",function(){return B}),r.d(e,"useList",function(){return Y}),r.d(e,"useString",function(){return J})},function(t,e,r){"use strict";var n=Object.getOwnPropertySymbols,o=Object.prototype.hasOwnProperty,a=Object.prototype.propertyIsEnumerable;t.exports=function(){try{if(!Object.assign)return!1;var t=new String("abc");if(t[5]="de","5"===Object.getOwnPropertyNames(t)[0])return!1;for(var e={},r=0;r<10;r++)e["_"+String.fromCharCode(r)]=r;if("0123456789"!==Object.getOwnPropertyNames(e).map(function(t){return e[t]}).join(""))return!1;var n={};return"abcdefghijklmnopqrst".split("").forEach(function(t){n[t]=t}),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},n)).join("")}catch(t){return!1}}()?Object.assign:function(t,e){for(var r,u,i=function(t){if(null==t)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(t)}(t),c=1;c<arguments.length;c++){for(var s in r=Object(arguments[c]))o.call(r,s)&&(i[s]=r[s]);if(n){u=n(r);for(var f=0;f<u.length;f++)a.call(r,u[f])&&(i[u[f]]=r[u[f]])}}return i}},function(t,e,r){"use strict";var n=r(3),o="function"==typeof Symbol&&Symbol.for,a=o?Symbol.for("react.element"):60103,u=o?Symbol.for("react.portal"):60106,i=o?Symbol.for("react.fragment"):60107,c=o?Symbol.for("react.strict_mode"):60108,s=o?Symbol.for("react.profiler"):60114,f=o?Symbol.for("react.provider"):60109,l=o?Symbol.for("react.context"):60110,p=o?Symbol.for("react.concurrent_mode"):60111,h=o?Symbol.for("react.forward_ref"):60112,v=o?Symbol.for("react.suspense"):60113,y=o?Symbol.for("react.memo"):60115,d=o?Symbol.for("react.lazy"):60116,b="function"==typeof Symbol&&Symbol.iterator;function m(t){for(var e=arguments.length-1,r="https://reactjs.org/docs/error-decoder.html?invariant="+t,n=0;n<e;n++)r+="&args[]="+encodeURIComponent(arguments[n+1]);!function(t,e,r,n,o,a,u,i){if(!t){if(t=void 0,void 0===e)t=Error("Minified exception occurred; use the non-minified dev environment for the full error message and additional helpful warnings.");else{var c=[r,n,o,a,u,i],s=0;(t=Error(e.replace(/%s/g,function(){return c[s++]}))).name="Invariant Violation"}throw t.framesToPop=1,t}}(!1,"Minified React error #"+t+"; visit %s for the full message or use the non-minified dev environment for full errors and additional helpful warnings. ",r)}var w={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},g={};function x(t,e,r){this.props=t,this.context=e,this.refs=g,this.updater=r||w}function k(){}function j(t,e,r){this.props=t,this.context=e,this.refs=g,this.updater=r||w}x.prototype.isReactComponent={},x.prototype.setState=function(t,e){"object"!=typeof t&&"function"!=typeof t&&null!=t&&m("85"),this.updater.enqueueSetState(this,t,e,"setState")},x.prototype.forceUpdate=function(t){this.updater.enqueueForceUpdate(this,t,"forceUpdate")},k.prototype=x.prototype;var O=j.prototype=new k;O.constructor=j,n(O,x.prototype),O.isPureReactComponent=!0;var S={current:null},_={current:null},E=Object.prototype.hasOwnProperty,P={key:!0,ref:!0,__self:!0,__source:!0};function L(t,e,r){var n=void 0,o={},u=null,i=null;if(null!=e)for(n in void 0!==e.ref&&(i=e.ref),void 0!==e.key&&(u=""+e.key),e)E.call(e,n)&&!P.hasOwnProperty(n)&&(o[n]=e[n]);var c=arguments.length-2;if(1===c)o.children=r;else if(1<c){for(var s=Array(c),f=0;f<c;f++)s[f]=arguments[f+2];o.children=s}if(t&&t.defaultProps)for(n in c=t.defaultProps)void 0===o[n]&&(o[n]=c[n]);return{$$typeof:a,type:t,key:u,ref:i,props:o,_owner:_.current}}function I(t){return"object"==typeof t&&null!==t&&t.$$typeof===a}var $=/\/+/g,A=[];function C(t,e,r,n){if(A.length){var o=A.pop();return o.result=t,o.keyPrefix=e,o.func=r,o.context=n,o.count=0,o}return{result:t,keyPrefix:e,func:r,context:n,count:0}}function N(t){t.result=null,t.keyPrefix=null,t.func=null,t.context=null,t.count=0,10>A.length&&A.push(t)}function R(t,e,r){return null==t?0:function t(e,r,n,o){var i=typeof e;"undefined"!==i&&"boolean"!==i||(e=null);var c=!1;if(null===e)c=!0;else switch(i){case"string":case"number":c=!0;break;case"object":switch(e.$$typeof){case a:case u:c=!0}}if(c)return n(o,e,""===r?"."+T(e,0):r),1;if(c=0,r=""===r?".":r+":",Array.isArray(e))for(var s=0;s<e.length;s++){var f=r+T(i=e[s],s);c+=t(i,f,n,o)}else if(f=null===e||"object"!=typeof e?null:"function"==typeof(f=b&&e[b]||e["@@iterator"])?f:null,"function"==typeof f)for(e=f.call(e),s=0;!(i=e.next()).done;)c+=t(i=i.value,f=r+T(i,s++),n,o);else"object"===i&&m("31","[object Object]"==(n=""+e)?"object with keys {"+Object.keys(e).join(", ")+"}":n,"");return c}(t,"",e,r)}function T(t,e){return"object"==typeof t&&null!==t&&null!=t.key?function(t){var e={"=":"=0",":":"=2"};return"$"+(""+t).replace(/[=:]/g,function(t){return e[t]})}(t.key):e.toString(36)}function M(t,e){t.func.call(t.context,e,t.count++)}function F(t,e,r){var n=t.result,o=t.keyPrefix;t=t.func.call(t.context,e,t.count++),Array.isArray(t)?q(t,n,r,function(t){return t}):null!=t&&(I(t)&&(t=function(t,e){return{$$typeof:a,type:t.type,key:e,ref:t.ref,props:t.props,_owner:t._owner}}(t,o+(!t.key||e&&e.key===t.key?"":(""+t.key).replace($,"$&/")+"/")+r)),n.push(t))}function q(t,e,r,n,o){var a="";null!=r&&(a=(""+r).replace($,"$&/")+"/"),R(t,F,e=C(e,a,n,o)),N(e)}function G(){var t=S.current;return null===t&&m("321"),t}var U={Children:{map:function(t,e,r){if(null==t)return t;var n=[];return q(t,n,null,e,r),n},forEach:function(t,e,r){if(null==t)return t;R(t,M,e=C(null,null,e,r)),N(e)},count:function(t){return R(t,function(){return null},null)},toArray:function(t){var e=[];return q(t,e,null,function(t){return t}),e},only:function(t){return I(t)||m("143"),t}},createRef:function(){return{current:null}},Component:x,PureComponent:j,createContext:function(t,e){return void 0===e&&(e=null),(t={$$typeof:l,_calculateChangedBits:e,_currentValue:t,_currentValue2:t,_threadCount:0,Provider:null,Consumer:null}).Provider={$$typeof:f,_context:t},t.Consumer=t},forwardRef:function(t){return{$$typeof:h,render:t}},lazy:function(t){return{$$typeof:d,_ctor:t,_status:-1,_result:null}},memo:function(t,e){return{$$typeof:y,type:t,compare:void 0===e?null:e}},useCallback:function(t,e){return G().useCallback(t,e)},useContext:function(t,e){return G().useContext(t,e)},useEffect:function(t,e){return G().useEffect(t,e)},useImperativeHandle:function(t,e,r){return G().useImperativeHandle(t,e,r)},useDebugValue:function(){},useLayoutEffect:function(t,e){return G().useLayoutEffect(t,e)},useMemo:function(t,e){return G().useMemo(t,e)},useReducer:function(t,e,r){return G().useReducer(t,e,r)},useRef:function(t){return G().useRef(t)},useState:function(t){return G().useState(t)},Fragment:i,StrictMode:c,Suspense:v,createElement:L,cloneElement:function(t,e,r){null==t&&m("267",t);var o=void 0,u=n({},t.props),i=t.key,c=t.ref,s=t._owner;if(null!=e){void 0!==e.ref&&(c=e.ref,s=_.current),void 0!==e.key&&(i=""+e.key);var f=void 0;for(o in t.type&&t.type.defaultProps&&(f=t.type.defaultProps),e)E.call(e,o)&&!P.hasOwnProperty(o)&&(u[o]=void 0===e[o]&&void 0!==f?f[o]:e[o])}if(1===(o=arguments.length-2))u.children=r;else if(1<o){f=Array(o);for(var l=0;l<o;l++)f[l]=arguments[l+2];u.children=f}return{$$typeof:a,type:t.type,key:i,ref:c,props:u,_owner:s}},createFactory:function(t){var e=L.bind(null,t);return e.type=t,e},isValidElement:I,version:"16.8.6",unstable_ConcurrentMode:p,unstable_Profiler:s,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:{ReactCurrentDispatcher:S,ReactCurrentOwner:_,assign:n}},D={default:U},V=D&&U||D;t.exports=V.default||V},function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",i=o.toStringTag||"@@toStringTag";function c(t,e,r,n){var o=e&&e.prototype instanceof y?e:y,a=Object.create(o.prototype),u=new E(n||[]);return a._invoke=function(t,e,r){var n=f;return function(o,a){if(n===p)throw new Error("Generator is already running");if(n===h){if("throw"===o)throw a;return L()}for(r.method=o,r.arg=a;;){var u=r.delegate;if(u){var i=O(u,r);if(i){if(i===v)continue;return i}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===f)throw n=h,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=p;var c=s(t,e,r);if("normal"===c.type){if(n=r.done?h:l,c.arg===v)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=h,r.method="throw",r.arg=c.arg)}}}(t,r,u),a}function s(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var f="suspendedStart",l="suspendedYield",p="executing",h="completed",v={};function y(){}function d(){}function b(){}var m={};m[a]=function(){return this};var w=Object.getPrototypeOf,g=w&&w(w(P([])));g&&g!==r&&n.call(g,a)&&(m=g);var x=b.prototype=y.prototype=Object.create(m);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function j(t){var e;this._invoke=function(r,o){function a(){return new Promise(function(e,a){!function e(r,o,a,u){var i=s(t[r],t,o);if("throw"!==i.type){var c=i.arg,f=c.value;return f&&"object"==typeof f&&n.call(f,"__await")?Promise.resolve(f.__await).then(function(t){e("next",t,a,u)},function(t){e("throw",t,a,u)}):Promise.resolve(f).then(function(t){c.value=t,a(c)},function(t){return e("throw",t,a,u)})}u(i.arg)}(r,o,e,a)})}return e=e?e.then(a,a):a()}}function O(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,O(t,r),"throw"===r.method))return v;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return v}var o=s(n,t.iterator,r.arg);if("throw"===o.type)return r.method="throw",r.arg=o.arg,r.delegate=null,v;var a=o.arg;return a?a.done?(r[t.resultName]=a.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,v):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,v)}function S(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function _(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function E(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(S,this),this.reset(!0)}function P(t){if(t){var r=t[a];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,u=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return u.next=u}}return{next:L}}function L(){return{value:e,done:!0}}return d.prototype=x.constructor=b,b.constructor=d,b[i]=d.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===d||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,b):(t.__proto__=b,i in t||(t[i]="GeneratorFunction")),t.prototype=Object.create(x),t},t.awrap=function(t){return{__await:t}},k(j.prototype),j.prototype[u]=function(){return this},t.AsyncIterator=j,t.async=function(e,r,n,o){var a=new j(c(e,r,n,o));return t.isGeneratorFunction(r)?a:a.next().then(function(t){return t.done?t.value:a.next()})},k(x),x[i]="Generator",x[a]=function(){return this},x.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=P,E.prototype={constructor:E,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(_),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var u=this.tryEntries[a],i=u.completion;if("root"===u.tryLoc)return o("end");if(u.tryLoc<=this.prev){var c=n.call(u,"catchLoc"),s=n.call(u,"finallyLoc");if(c&&s){if(this.prev<u.catchLoc)return o(u.catchLoc,!0);if(this.prev<u.finallyLoc)return o(u.finallyLoc)}else if(c){if(this.prev<u.catchLoc)return o(u.catchLoc,!0)}else{if(!s)throw new Error("try statement without catch or finally");if(this.prev<u.finallyLoc)return o(u.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===t||"continue"===t)&&a.tryLoc<=e&&e<=a.finallyLoc&&(a=null);var u=a?a.completion:{};return u.type=t,u.arg=e,a?(this.method="next",this.next=a.finallyLoc,v):this.complete(u)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),v},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),_(r),v}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;_(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:P(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),v}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},,,,,,,function(t,e,r){t.exports=r(2)}]);