state-decorator 7.6.0 → 7.7.0-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/es/index.d.ts CHANGED
@@ -39,6 +39,12 @@ export type StoreApi<S, A extends DecoratedActions, P, DS = {}> = {
39
39
  * Initializes the store with the specified props
40
40
  */
41
41
  readonly init: (p: P) => void;
42
+ /**
43
+ * Runs onMount (and onPropsChange entries flagged onMount) exactly once for this store instance.
44
+ * Must be called from an effect (useLayoutEffect/useEffect), never from a render body.
45
+ * @internal
46
+ */
47
+ readonly runMountEffects: () => void;
42
48
  /**
43
49
  * Update the store with the specified props
44
50
  */
@@ -99,7 +105,7 @@ export declare function createStore<S, A extends DecoratedActions, P, DS = {}>(c
99
105
  * @param slicerFunc A function that returns a state slice
100
106
  * @returns The state slice.
101
107
  */
102
- export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, SLICE>(store: StoreApi<S, A, P, DS>, slicerFunc: (ctx: StateListenerContext<S, DS, A, P>) => SLICE): SLICE;
108
+ export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, SLICE>(store: StoreApi<S, A, P, DS>, slicerFunc: (ctx: StateListenerContext<S, DS, A, P>) => SLICE, deps?: any[]): SLICE;
103
109
  /**
104
110
  * A react hook to get a state slice. Will be refresh if, and only if, one property of the slice has changed
105
111
  * @param store The store to listen to.
package/es/index.js CHANGED
@@ -1,2 +1,2 @@
1
- import r,{useMemo as e,useContext as n,useRef as t,useEffect as u,useLayoutEffect as o,useReducer as c}from"react";import{createRef as i,isFuncConfig as a,isSimpleSyncAction as l,decorateSimpleSyncAction as f,isAsyncAction as s,decorateAsyncAction as d,computeAsyncActionInput as v,isSyncAction as p,decorateSyncAction as O,globalConfig as _,onPropChange as E,DEFAULT_PROMISE_ID as S,fixDerivedDeps as y,computeDerivedValues as g,buildOnMountInvocationContext as L,buildOnUnMountInvocationContext as h,isLoadingImpl as b,runMiddlewares as A,buildLoadingMap as m,buildErrorMap as R}from"./impl";export{EffectError,ParallelActionError,setGlobalConfig}from"./impl";import{logDetailedEffects as T}from"./development";var M=function(){return M=Object.assign||function(r){for(var e,n=1,t=arguments.length;n<t;n++)for(var u in e=arguments[n])Object.prototype.hasOwnProperty.call(e,u)&&(r[u]=e[u]);return r},M.apply(this,arguments)};function j(r){var e={exports:{}};return r(e,e.exports),e.exports}"function"==typeof SuppressedError&&SuppressedError;var w="function"==typeof Object.is?Object.is:function(r,e){return r===e&&(0!==r||1/r==1/e)||r!=r&&e!=e},V=r.useState,x=r.useEffect,D=r.useLayoutEffect,k=r.useDebugValue;function P(r){var e=r.getSnapshot;r=r.value;try{var n=e();return!w(r,n)}catch(r){return!0}}var C="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(r,e){return e()}:function(r,e){var n=e(),t=V({inst:{value:n,getSnapshot:e}}),u=t[0].inst,o=t[1];return D((function(){u.value=n,u.getSnapshot=e,P(u)&&o({inst:u})}),[r,n,e]),x((function(){return P(u)&&o({inst:u}),r((function(){P(u)&&o({inst:u})}))}),[r]),k(n),n},G={useSyncExternalStore:void 0!==r.useSyncExternalStore?r.useSyncExternalStore:C},K=j((function(e,n){"production"!==process.env.NODE_ENV&&function(){function e(r){var e=r.getSnapshot;r=r.value;try{var n=e();return!u(r,n)}catch(r){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=r,u="function"==typeof Object.is?Object.is:function(r,e){return r===e&&(0!==r||1/r==1/e)||r!=r&&e!=e},o=t.useState,c=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue,l=!1,f=!1,s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(r,e){return e()}:function(r,n){l||void 0===t.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var s=n();if(!f){var d=n();u(s,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var v=(d=o({inst:{value:s,getSnapshot:n}}))[0].inst,p=d[1];return i((function(){v.value=s,v.getSnapshot=n,e(v)&&p({inst:v})}),[r,s,n]),c((function(){return e(v)&&p({inst:v}),r((function(){e(v)&&p({inst:v})}))}),[r]),a(s),s};n.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:s,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),B=G,I=K,H=j((function(r){"production"===process.env.NODE_ENV?r.exports=B:r.exports=I})),N=H;var U,W="function"==typeof Object.is?Object.is:function(r,e){return r===e&&(0!==r||1/r==1/e)||r!=r&&e!=e},z=H.useSyncExternalStore,F=r.useRef,J=r.useEffect,Y=r.useMemo,q=r.useDebugValue,Q={useSyncExternalStoreWithSelector:function(r,e,n,t,u){var o=F(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=Y((function(){function r(r){if(!a){if(a=!0,o=r,r=t(r),void 0!==u&&c.hasValue){var e=c.value;if(u(e,r))return i=e}return i=r}if(e=i,W(o,r))return e;var n=t(r);return void 0!==u&&u(e,n)?(o=r,e):(o=r,i=n)}var o,i,a=!1,l=void 0===n?null:n;return[function(){return r(e())},null===l?void 0:function(){return r(l())}]}),[e,n,t,u]);var i=z(r,o[0],o[1]);return J((function(){c.hasValue=!0,c.value=i}),[i]),q(i),i}},X=j((function(e,n){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=r,t=H,u="function"==typeof Object.is?Object.is:function(r,e){return r===e&&(0!==r||1/r==1/e)||r!=r&&e!=e},o=t.useSyncExternalStore,c=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;n.useSyncExternalStoreWithSelector=function(r,e,n,t,f){var s=c(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;s=a((function(){function r(r){if(!i){if(i=!0,o=r,r=t(r),void 0!==f&&d.hasValue){var e=d.value;if(f(e,r))return c=e}return c=r}if(e=c,u(o,r))return e;var n=t(r);return void 0!==f&&f(e,n)?(o=r,e):(o=r,c=n)}var o,c,i=!1,a=void 0===n?null:n;return[function(){return r(e())},null===a?void 0:function(){return r(a())}]}),[e,n,t,f]);var v=o(r,s[0],s[1]);return i((function(){d.hasValue=!0,d.value=v}),[v]),l(v),v},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),Z=Q,$=X,rr=j((function(r){"production"===process.env.NODE_ENV?r.exports=Z:r.exports=$}));!function(r){r.REJECT="reject",r.IGNORE="ignore",r.KEEP_LAST="keepLast",r.KEEP_ALL="keepAll",r.PARALLEL="parallel",r.REUSE="reuse",r.ABORT="abort"}(U||(U={}));var er=rr.useSyncExternalStoreWithSelector,nr=N.useSyncExternalStore;function tr(r){var e=i(),n=i(),t=i(),u=i(),o=i(),c=i(),j=i(),w=i(),V=i(),x=i(),D=i(),k=i(!1),P=i(!1),C=i(),G=i([]),K=r.actions,B=r.middlewares,I=void 0===B?[]:B,H=function(r,e){var n={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&e.indexOf(t)<0&&(n[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(t=Object.getOwnPropertySymbols(r);u<t.length;u++)e.indexOf(t[u])<0&&Object.prototype.propertyIsEnumerable.call(r,t[u])&&(n[t[u]]=r[t[u]])}return n}(r,["actions","middlewares"]),N=a(r)?r.getInitialState:function(){return r.initialState},U={},W=0;function z(){C.current=M(M(M(M(M({},t.current),u.current),e.current),n.current.state),{isLoading:$,abortAction:rr,loading:w.current,loadingMap:j.current,loadingParallelMap:c.current,errorMap:er(),errorParallelMap:V.current}),P.current=!1,Object.keys(U).forEach((function(r){var e;null===(e=U[r])||void 0===e||e.call(U)}))}function F(r){var o=t.current;t.current=r,k.current?E(e,n,t,o,u,H,N,X,!1,!1):q(r)}function J(r){e.current=r,g(e,t,n,H),z()}function Y(r){c.current=r,j.current=function(){if(k.current){var r=c.current;return Object.keys(r).reduce((function(e,n){var t=r[n];return e[n]=null!=Object.keys(t).find((function(r){return!!t[r]})),e}),{})}return null}(),w.current=function(){if(k.current){var r=c.current;return null!=Object.keys(r).find((function(e){var n=r[e];return Object.keys(n).find((function(r){return!!n[r]}))}))}return null}()}function q(c){var i;if(!k.current){t.current=c,k.current=!0,e.current=N(c);var a=new Set(null==H?void 0:H.initialActionsMarkedLoading),l=Object.keys(K).reduce((function(r,e){var n;return r[e]=a.has(e)?((n={})[S]=!0,n):{},r}),{});Y(l),V.current=Object.keys(K).reduce((function(r,e){return r[e]={},r}),{}),o.current={},x.current={},D.current={},n.current={state:null,deps:{}},(null==H?void 0:H.derivedState)&&y(H),G.current=[];var f={options:H,get state(){return e.current},actions:K,setState:J};r.logEnabled&&T&&I.push(T());var s=function(r){var e,n=r();G.current.push(n),null===(e=n.init)||void 0===e||e.call(n,f)};null===(i=_.defaultMiddlewares)||void 0===i||i.forEach(s),null==I||I.forEach(s),g(e,t,n,H),E(e,n,t,null,u,H,N,X,!0,!1),(null==H?void 0:H.onMount)&&H.onMount(L(e,n,t,u)),z()}}function Q(r,e){void 0===e&&(e=S);var n=V.current[r];(null==n?void 0:n[e])&&delete n[e],z()}function X(r,u,o,i,a,l,f,s,d){void 0===f&&(f=!1),void 0===s&&(s=!1),void 0===d&&(d=!1);var v=!1;if(!k.current)return z;var p=u,O=!!a&&b(p||c.current,[o,null==l?void 0:l.promiseId]),_=A(G.current,e.current,r,O,o,i,a,l),E=_.newState,y=_.newLoading;if(null!=E&&(v=!0,e.current=E),O!==y&&(p=m(p,o,(null==l?void 0:l.promiseId)||S,y),0===Object.keys(p).length&&(p=void 0)),null!=p&&(v=!0,Y(p)),v)g(e,t,n,H),s||(e.current=E||e.current,d||z());else if(f){!g(e,t,n,H)||s||d||z()}return z}var Z=Object.keys(K);function $(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return b.apply(void 0,function(r,e,n){if(n||2===arguments.length)for(var t,u=0,o=e.length;u<o;u++)!t&&u in e||(t||(t=Array.prototype.slice.call(e,0,u)),t[u]=e[u]);return r.concat(t||Array.prototype.slice.call(e))}([c.current],r,!1))}function rr(r,e){var n,t;void 0===e&&(e=S);var u=null===(t=null===(n=x.current[r])||void 0===n?void 0:n[e])||void 0===t?void 0:t.abortController,o=!1;return u&&(u.abort(),o=!0),o}function er(){return k.current?R(V.current):null}return u.current=Z.reduce((function(r,i){var a=K[i];return l(a)?r[i]=f(i,a,e,n,t,k,H,X):s(a)?r[i]=d({actionName:i,stateRef:e,derivedStateRef:n,propsRef:t,loadingParallelMapRef:c,errorMapRef:V,actionsRef:u,promisesRef:x,conflictActionsRef:D,initializedRef:k,timeoutRef:o,needNotifyListenersRef:P,options:H,setState:X,clearError:Q,action:v(a)}):p(a)&&(r[i]=O(i,a,e,n,t,u,k,o,P,H,X,Q)),r}),{}),{getConfig:function(){return M({},r)},setProps:F,addStateListener:function(r){var e="".concat(W++);return U[e]=r,function(){delete U[e]}},init:q,destroy:function(){var r;if(k.current){var u=Object.keys(K).reduce((function(r,e){var n=K[e];if(s(n)&&n.abortable){var t=c.current[e],u=Object.keys(t).reduce((function(r,n){return t[n]&&(rr(e,n),r.push(n)),r}),[]);u.length>0&&(r[e]=u)}return r}),{});null===(r=null==H?void 0:H.onUnmount)||void 0===r||r.call(H,h(e,n,t,u)),Object.keys(o.current).forEach((function(r){clearTimeout(o.current[r])})),t.current=null,e.current=null,c.current=null,j.current=null,w.current=null,V.current=null,x.current=null,D.current=null,n.current=null,C.current=null,o.current=null,U={},k.current=!1,G.current.forEach((function(r){var e;null===(e=r.destroy)||void 0===e||e.call(r)})),G.current=[]}},isLoading:$,abortAction:rr,clearError:Q,getSnapshot:function(){return C.current},invokeOnMountDeferred:function(){E(e,n,t,null,u,H,N,X,!0,!0),(null==H?void 0:H.onMountDeferred)&&H.onMountDeferred(L(e,n,t,u))},listenToStoreProps:function(r,e){var n=r.state?lr(r.state,e):{};return r.addStateListener((function(){var u=r.state;if(u){var o=lr(u,e);e.some((function(r){return!Object.is(n[r],o[r])}))&&(n=o,F(M(M({},t.current),o)))}}))},get actions(){return u.current},get state(){return k.current?M(M({},e.current),n.current.state):null},get loading(){return w.current},get loadingMap(){return j.current},get errorMap(){return er()},get loadingParallelMap(){return k.current?c.current:null},get errorParallelMap(){return k.current?V.current:null}}}function ur(r,n){var t=e((function(){return n instanceof Function?n:function(r){return lr(r,n)}}),[n]);return er(r.addStateListener,r.getSnapshot,void 0,t,_.comparator)}function or(r){return nr(r.addStateListener,r.getSnapshot),r}function cr(r,e){return ur(n(r),e)}function ir(r,e,n){void 0===n&&(n=!0);var i=t();return null==i.current&&(i.current=tr(r)),u((function(){return i.current.invokeOnMountDeferred(),function(){var r;null===(r=i.current)||void 0===r||r.destroy()}}),[]),function(r,e,n){void 0===e&&(e=null),void 0===n&&(n=!0);var u=c((function(r){return r>100?0:r+1}),0)[1],i=t(r);return r.setProps(e),o((function(){r.init(e)}),[]),o((function(){if(n)return i.current.addStateListener((function(){u()}))}),[n]),r}(i.current,e,n)}function ar(r,e){return r.setProps(e),nr(r.addStateListener,r.getSnapshot),o((function(){r.init(e)}),[]),u((function(){r.invokeOnMountDeferred()}),[r]),r}function lr(r,e){return e.reduce((function(e,n){return r.hasOwnProperty(n)&&(e[n]=r[n]),e}),{})}function fr(){for(var r=[],e=0;e<arguments.length;e++)r[e]=arguments[e];return function(e){return lr(e,r)}}export{U as ConflictPolicy,tr as createStore,ir as default,lr as pick,fr as slice,ar as useBindStore,ir as useLocalStore,or as useStore,cr as useStoreContextSlice,ur as useStoreSlice};
1
+ import r,{useMemo as n,useContext as e,useRef as t,useEffect as u,useLayoutEffect as o,useReducer as c}from"react";import{createRef as i,isFuncConfig as a,isSimpleSyncAction as l,decorateSimpleSyncAction as f,isAsyncAction as s,decorateAsyncAction as d,computeAsyncActionInput as v,isSyncAction as p,decorateSyncAction as O,globalConfig as _,onPropChange as E,DEFAULT_PROMISE_ID as S,fixDerivedDeps as y,computeDerivedValues as g,buildOnMountInvocationContext as L,buildOnUnMountInvocationContext as h,isLoadingImpl as b,runMiddlewares as A,buildLoadingMap as m,buildErrorMap as M}from"./impl";export{EffectError,ParallelActionError,setGlobalConfig}from"./impl";import{logDetailedEffects as R}from"./development";var T=function(){return T=Object.assign||function(r){for(var n,e=1,t=arguments.length;e<t;e++)for(var u in n=arguments[e])Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u]);return r},T.apply(this,arguments)};function j(r,n,e){if(e||2===arguments.length)for(var t,u=0,o=n.length;u<o;u++)!t&&u in n||(t||(t=Array.prototype.slice.call(n,0,u)),t[u]=n[u]);return r.concat(t||Array.prototype.slice.call(n))}function w(r){var n={exports:{}};return r(n,n.exports),n.exports}"function"==typeof SuppressedError&&SuppressedError;var V="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},x=r.useState,D=r.useEffect,k=r.useLayoutEffect,P=r.useDebugValue;function C(r){var n=r.getSnapshot;r=r.value;try{var e=n();return!V(r,e)}catch(r){return!0}}var G="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(r,n){return n()}:function(r,n){var e=n(),t=x({inst:{value:e,getSnapshot:n}}),u=t[0].inst,o=t[1];return k((function(){u.value=e,u.getSnapshot=n,C(u)&&o({inst:u})}),[r,e,n]),D((function(){return C(u)&&o({inst:u}),r((function(){C(u)&&o({inst:u})}))}),[r]),P(e),e},K={useSyncExternalStore:void 0!==r.useSyncExternalStore?r.useSyncExternalStore:G},B=w((function(n,e){"production"!==process.env.NODE_ENV&&function(){function n(r){var n=r.getSnapshot;r=r.value;try{var e=n();return!u(r,e)}catch(r){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var t=r,u="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},o=t.useState,c=t.useEffect,i=t.useLayoutEffect,a=t.useDebugValue,l=!1,f=!1,s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(r,n){return n()}:function(r,e){l||void 0===t.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var s=e();if(!f){var d=e();u(s,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var v=(d=o({inst:{value:s,getSnapshot:e}}))[0].inst,p=d[1];return i((function(){v.value=s,v.getSnapshot=e,n(v)&&p({inst:v})}),[r,s,e]),c((function(){return n(v)&&p({inst:v}),r((function(){n(v)&&p({inst:v})}))}),[r]),a(s),s};e.useSyncExternalStore=void 0!==t.useSyncExternalStore?t.useSyncExternalStore:s,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),I=K,H=B,N=w((function(r){"production"===process.env.NODE_ENV?r.exports=I:r.exports=H})),U=N;var W,z="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},F=N.useSyncExternalStore,J=r.useRef,Y=r.useEffect,q=r.useMemo,Q=r.useDebugValue,X={useSyncExternalStoreWithSelector:function(r,n,e,t,u){var o=J(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=q((function(){function r(r){if(!a){if(a=!0,o=r,r=t(r),void 0!==u&&c.hasValue){var n=c.value;if(u(n,r))return i=n}return i=r}if(n=i,z(o,r))return n;var e=t(r);return void 0!==u&&u(n,e)?(o=r,n):(o=r,i=e)}var o,i,a=!1,l=void 0===e?null:e;return[function(){return r(n())},null===l?void 0:function(){return r(l())}]}),[n,e,t,u]);var i=F(r,o[0],o[1]);return Y((function(){c.hasValue=!0,c.value=i}),[i]),Q(i),i}},Z=w((function(n,e){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var n=r,t=N,u="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},o=t.useSyncExternalStore,c=n.useRef,i=n.useEffect,a=n.useMemo,l=n.useDebugValue;e.useSyncExternalStoreWithSelector=function(r,n,e,t,f){var s=c(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;s=a((function(){function r(r){if(!i){if(i=!0,o=r,r=t(r),void 0!==f&&d.hasValue){var n=d.value;if(f(n,r))return c=n}return c=r}if(n=c,u(o,r))return n;var e=t(r);return void 0!==f&&f(n,e)?(o=r,n):(o=r,c=e)}var o,c,i=!1,a=void 0===e?null:e;return[function(){return r(n())},null===a?void 0:function(){return r(a())}]}),[n,e,t,f]);var v=o(r,s[0],s[1]);return i((function(){d.hasValue=!0,d.value=v}),[v]),l(v),v},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),$=X,rr=Z,nr=w((function(r){"production"===process.env.NODE_ENV?r.exports=$:r.exports=rr}));!function(r){r.REJECT="reject",r.IGNORE="ignore",r.KEEP_LAST="keepLast",r.KEEP_ALL="keepAll",r.PARALLEL="parallel",r.REUSE="reuse",r.ABORT="abort"}(W||(W={}));var er=nr.useSyncExternalStoreWithSelector,tr=U.useSyncExternalStore;function ur(r){var n=i(),e=i(),t=i(),u=i(),o=i(),c=i(),w=i(),V=i(),x=i(),D=i(),k=i(),P=i(!1),C=i(!1),G=i(!1),K=i(),B=i([]),I=r.actions,H=r.middlewares,N=void 0===H?[]:H,U=function(r,n){var e={};for(var t in r)Object.prototype.hasOwnProperty.call(r,t)&&n.indexOf(t)<0&&(e[t]=r[t]);if(null!=r&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(t=Object.getOwnPropertySymbols(r);u<t.length;u++)n.indexOf(t[u])<0&&Object.prototype.propertyIsEnumerable.call(r,t[u])&&(e[t[u]]=r[t[u]])}return e}(r,["actions","middlewares"]),W=a(r)?r.getInitialState:function(){return r.initialState},z={},F=0;function J(){K.current=T(T(T(T(T({},t.current),u.current),n.current),e.current.state),{isLoading:nr,abortAction:er,loading:V.current,loadingMap:w.current,loadingParallelMap:c.current,errorMap:tr(),errorParallelMap:x.current}),G.current=!1,Object.keys(z).forEach((function(r){var n;null===(n=z[r])||void 0===n||n.call(z)}))}function Y(r){var o=t.current;t.current=r,P.current?E(n,e,t,o,u,U,W,$,!1,!1):X(r)}function q(r){n.current=r,g(n,t,e,U),J()}function Q(r){c.current=r,w.current=function(){if(P.current){var r=c.current;return Object.keys(r).reduce((function(n,e){var t=r[e];return n[e]=null!=Object.keys(t).find((function(r){return!!t[r]})),n}),{})}return null}(),V.current=function(){if(P.current){var r=c.current;return null!=Object.keys(r).find((function(n){var e=r[n];return Object.keys(e).find((function(r){return!!e[r]}))}))}return null}()}function X(u){var c;if(!P.current){t.current=u,P.current=!0,n.current=W(u);var i=new Set(null==U?void 0:U.initialActionsMarkedLoading),a=Object.keys(I).reduce((function(r,n){var e;return r[n]=i.has(n)?((e={})[S]=!0,e):{},r}),{});Q(a),x.current=Object.keys(I).reduce((function(r,n){return r[n]={},r}),{}),o.current={},D.current={},k.current={},e.current={state:null,deps:{}},(null==U?void 0:U.derivedState)&&y(U),B.current=[];var l={options:U,get state(){return n.current},actions:I,setState:q};r.logEnabled&&R&&N.push(R());var f=function(r){var n,e=r();B.current.push(e),null===(n=e.init)||void 0===n||n.call(e,l)};null===(c=_.defaultMiddlewares)||void 0===c||c.forEach(f),null==N||N.forEach(f),g(n,t,e,U),J()}}function Z(r,n){void 0===n&&(n=S);var e=x.current[r];(null==e?void 0:e[n])&&delete e[n],J()}function $(r,u,o,i,a,l,f,s,d){void 0===f&&(f=!1),void 0===s&&(s=!1),void 0===d&&(d=!1);var v=!1;if(!P.current)return J;var p=u,O=!!a&&b(p||c.current,[o,null==l?void 0:l.promiseId]),_=A(B.current,n.current,r,O,o,i,a,l),E=_.newState,y=_.newLoading;if(null!=E&&(v=!0,n.current=E),O!==y&&(p=m(p,o,(null==l?void 0:l.promiseId)||S,y),0===Object.keys(p).length&&(p=void 0)),null!=p&&(v=!0,Q(p)),v)g(n,t,e,U),s||(n.current=E||n.current,d||J());else if(f){!g(n,t,e,U)||s||d||J()}return J}var rr=Object.keys(I);function nr(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return b.apply(void 0,j([c.current],r,!1))}function er(r,n){var e,t;void 0===n&&(n=S);var u=null===(t=null===(e=D.current[r])||void 0===e?void 0:e[n])||void 0===t?void 0:t.abortController,o=!1;return u&&(u.abort(),o=!0),o}function tr(){return P.current?M(x.current):null}return u.current=rr.reduce((function(r,i){var a=I[i];return l(a)?r[i]=f(i,a,n,e,t,P,U,$):s(a)?r[i]=d({actionName:i,stateRef:n,derivedStateRef:e,propsRef:t,loadingParallelMapRef:c,errorMapRef:x,actionsRef:u,promisesRef:D,conflictActionsRef:k,initializedRef:P,timeoutRef:o,needNotifyListenersRef:G,options:U,setState:$,clearError:Z,action:v(a)}):p(a)&&(r[i]=O(i,a,n,e,t,u,P,o,G,U,$,Z)),r}),{}),{getConfig:function(){return T({},r)},setProps:Y,addStateListener:function(r){var n="".concat(F++);return z[n]=r,function(){delete z[n]}},init:X,runMountEffects:function(){P.current&&!C.current&&(C.current=!0,E(n,e,t,null,u,U,W,$,!0,!1),(null==U?void 0:U.onMount)&&U.onMount(L(n,e,t,u)),J())},destroy:function(){var r;if(P.current){var u=Object.keys(I).reduce((function(r,n){var e=I[n];if(s(e)&&e.abortable){var t=c.current[n],u=Object.keys(t).reduce((function(r,e){return t[e]&&(er(n,e),r.push(e)),r}),[]);u.length>0&&(r[n]=u)}return r}),{});null===(r=null==U?void 0:U.onUnmount)||void 0===r||r.call(U,h(n,e,t,u)),Object.keys(o.current).forEach((function(r){clearTimeout(o.current[r])})),t.current=null,n.current=null,c.current=null,w.current=null,V.current=null,x.current=null,D.current=null,k.current=null,e.current=null,K.current=null,o.current=null,z={},P.current=!1,C.current=!1,B.current.forEach((function(r){var n;null===(n=r.destroy)||void 0===n||n.call(r)})),B.current=[]}},isLoading:nr,abortAction:er,clearError:Z,getSnapshot:function(){return K.current},invokeOnMountDeferred:function(){E(n,e,t,null,u,U,W,$,!0,!0),(null==U?void 0:U.onMountDeferred)&&U.onMountDeferred(L(n,e,t,u))},listenToStoreProps:function(r,n){var e=r.state?fr(r.state,n):{};return r.addStateListener((function(){var u=r.state;if(u){var o=fr(u,n);n.some((function(r){return!Object.is(e[r],o[r])}))&&(e=o,Y(T(T({},t.current),o)))}}))},get actions(){return u.current},get state(){return P.current?T(T({},n.current),e.current.state):null},get loading(){return V.current},get loadingMap(){return w.current},get errorMap(){return tr()},get loadingParallelMap(){return P.current?c.current:null},get errorParallelMap(){return P.current?x.current:null}}}function or(r,e,t){void 0===t&&(t=[]);var u=n((function(){return e instanceof Function?e:function(r){return fr(r,e)}}),j([e],t,!0));return er(r.addStateListener,r.getSnapshot,void 0,u,_.comparator)}function cr(r){return tr(r.addStateListener,r.getSnapshot),r}function ir(r,n){return or(e(r),n)}function ar(r,n,e){void 0===e&&(e=!0);var i=t();return null==i.current&&(i.current=ur(r)),u((function(){return i.current.invokeOnMountDeferred(),function(){var r;null===(r=i.current)||void 0===r||r.destroy()}}),[]),function(r,n,e){void 0===n&&(n=null),void 0===e&&(e=!0);var u=c((function(r){return r>100?0:r+1}),0)[1],i=t(r);return r.setProps(n),o((function(){r.init(n),r.runMountEffects()}),[]),o((function(){if(e)return i.current.addStateListener((function(){u()}))}),[e]),r}(i.current,n,e)}function lr(r,n){return r.setProps(n),tr(r.addStateListener,r.getSnapshot),o((function(){r.init(n),r.runMountEffects()}),[]),u((function(){r.invokeOnMountDeferred()}),[r]),r}function fr(r,n){return n.reduce((function(n,e){return r.hasOwnProperty(e)&&(n[e]=r[e]),n}),{})}function sr(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return function(n){return fr(n,r)}}export{W as ConflictPolicy,ur as createStore,ar as default,fr as pick,sr as slice,lr as useBindStore,ar as useLocalStore,cr as useStore,ir as useStoreContextSlice,or as useStoreSlice};
2
2
  //# sourceMappingURL=index.js.map
package/es/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.mjs","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../node_modules/use-sync-external-store/shim/index.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","SuppressedError","objectIs","is","x","y","useState","React","useEffect","useLayoutEffect","useDebugValue","checkIfSnapshotChanged","inst","latestGetSnapshot","getSnapshot","value","nextValue","error","shim","window","document","createElement","subscribe","_useState","forceUpdate","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","require$$0","didWarnOld18Alpha","didWarnUncachedGetSnapshot","startTransition","console","cachedValue","exports","registerInternalModuleStop","module","require$$1","useRef","useMemo","getServerSnapshot","selector","isEqual","instRef","current","hasValue","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","useSyncExternalStoreWithSelector","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","to","from","pack","ar","l","Array","slice","concat"],"mappings":"ysBA+BO,IAAIA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAC9B,mEA+RkD,mBAApBQ,iBAAiCA,gBCxT/D,IAAIC,EAAW,mBAAsBf,OAAOgB,GAAKhB,OAAOgB,GAHxD,SAAYC,EAAGC,GACb,OAAQD,IAAMC,IAAM,IAAMD,GAAK,EAAIA,GAAM,EAAIC,IAAQD,GAAMA,GAAKC,GAAMA,CACxE,EAEEC,EAAWC,EAAMD,SACjBE,EAAYD,EAAMC,UAClBC,EAAkBF,EAAME,gBACxBC,EAAgBH,EAAMG,cA0BxB,SAASC,EAAuBC,GAC9B,IAAIC,EAAoBD,EAAKE,YAC7BF,EAAOA,EAAKG,MACZ,IACE,IAAIC,EAAYH,IAChB,OAAQX,EAASU,EAAMI,EACxB,CAAC,MAAOC,GACP,OAAO,CACR,CACH,CAIA,IAAIC,EACF,oBAAuBC,aAC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,IAEHL,EAAcK,GACPA,CACb,EACI,oBAAuBc,gCACrB,mBACSA,+BAA+BU,4BACxCV,+BAA+BU,2BAA2BR,QAC7D,CApFD,gCCV2B,eAAzBL,QAAQC,IAAIC,SACdY,EAAAF,QAAiBN,EAEjBQ,EAAAF,QAAiBG,4YNqCZ,SAAgBnD,EAAGqE,GACxB,IAAItE,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMgE,EAAEC,QAAQjE,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAO0E,sBACtB,KAAItE,EAAI,EAAb,IAAgBI,EAAIR,OAAO0E,sBAAsBvE,GAAIC,EAAII,EAAED,OAAQH,IAC3DoE,EAAEC,QAAQjE,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUkE,qBAAqBhE,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACT,s3EAiKO,SAAuB0E,EAAIC,EAAMC,GACtC,GAAIA,GAA6B,IAArBxE,UAAUC,OAAc,IAAK,IAA4BwE,EAAxB3E,EAAI,EAAG4E,EAAIH,EAAKtE,OAAYH,EAAI4E,EAAG5E,KACxE2E,GAAQ3E,KAAKyE,IACRE,IAAIA,EAAKE,MAAMxE,UAAUyE,MAAMvE,KAAKkE,EAAM,EAAGzE,IAClD2E,EAAG3E,GAAKyE,EAAKzE,IAGrB,OAAOwE,EAAGO,OAAOJ,GAAME,MAAMxE,UAAUyE,MAAMvE,KAAKkE,GACpD"}
1
+ {"version":3,"file":"index.js","sources":["../../node_modules/tslib/tslib.es6.mjs","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../../node_modules/use-sync-external-store/shim/index.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__spreadArray","to","from","pack","ar","l","Array","slice","concat","SuppressedError","objectIs","is","x","y","useState","React","useEffect","useLayoutEffect","useDebugValue","checkIfSnapshotChanged","inst","latestGetSnapshot","getSnapshot","value","nextValue","error","shim","window","document","createElement","subscribe","_useState","forceUpdate","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","require$$0","didWarnOld18Alpha","didWarnUncachedGetSnapshot","startTransition","console","cachedValue","exports","registerInternalModuleStop","module","require$$1","useRef","useMemo","getServerSnapshot","selector","isEqual","instRef","current","hasValue","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","useSyncExternalStoreWithSelector","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable"],"mappings":"ysBA+BO,IAAIA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAC9B,EA6KO,SAASQ,EAAcC,EAAIC,EAAMC,GACtC,GAAIA,GAA6B,IAArBX,UAAUC,OAAc,IAAK,IAA4BW,EAAxBd,EAAI,EAAGe,EAAIH,EAAKT,OAAYH,EAAIe,EAAGf,KACxEc,GAAQd,KAAKY,IACRE,IAAIA,EAAKE,MAAMX,UAAUY,MAAMV,KAAKK,EAAM,EAAGZ,IAClDc,EAAGd,GAAKY,EAAKZ,IAGrB,OAAOW,EAAGO,OAAOJ,GAAME,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@
1
- import{createStore as e}from"./index";import{useReducer as n,useRef as r,useLayoutEffect as t,useEffect as o}from"react";var i,s=function(){return s=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},s.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,function(e){e.REJECT="reject",e.IGNORE="ignore",e.KEEP_LAST="keepLast",e.KEEP_ALL="keepAll",e.PARALLEL="parallel",e.REUSE="reuse",e.ABORT="abort"}(i||(i={}));var u=function e(n,r){if(n===r)return!0;if(n&&r&&"object"==typeof n&&"object"==typeof r){if(n.constructor!==r.constructor)return!1;var t,o,i;if(Array.isArray(n)){if((t=n.length)!=r.length)return!1;for(o=t;0!=o--;)if(!e(n[o],r[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===r.source&&n.flags===r.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===r.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===r.toString();if((t=(i=Object.keys(n)).length)!==Object.keys(r).length)return!1;for(o=t;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=t;0!=o--;){var s=i[o];if(!e(n[s],r[s]))return!1}return!0}return n!=n&&r!=r},c=null;function a(e){return!(e instanceof Function)&&e.hasOwnProperty("promiseGet")}function f(e){return!(e instanceof Function)&&(e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))}function l(e){return!(e instanceof Function||e.hasOwnProperty("promise")&&e.hasOwnProperty("promiseGet"))}function p(e){return e instanceof Function}function g(e){return!(e instanceof Function||e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))}function d(e){return Object.keys(e).reduce((function(n,r){var t=e[r];if(p(t))n[r]=function(e){return t(e.s,e.args,e.p)};else if(g(t)){var o={effects:function(e){return t.action(e.s,e.args,e.p)}};t.onActionDone&&(o.sideEffects=function(e){var n=e.s,r=e.p,o=e.args,i=e.a,s=e.notifyWarning;t.onActionDone(n,o,r,i,s)}),n[r]=o}else if(function(e){return!(e instanceof Function)&&e.hasOwnProperty("promise")}(t)||a(t)){var s;s=a(t)?{getPromise:function(e){var n=e.s,r=e.p,o=e.a,i=e.args,s=e.abortSignal;return t.promiseGet(i,n,r,o,s)},retryCount:3,conflictPolicy:i.REUSE}:{getPromise:function(e){var n=e.s,r=e.p,o=e.a,i=e.args,s=e.abortSignal;return t.promise(i,n,r,o,s)}},["abortable","conflictPolicy","getPromiseId","isTriggerRetryError","rejectPromiseOnError","retryCount","debounceTimeout","debounceSideEffectsTimeout","retryDelaySeed"].forEach((function(e){null!=t[e]&&(s[e]=t[e])})),t.successMessage&&(s.getSuccessMessage=function(){return t.successMessage}),t.errorMessage&&(s.getSuccessMessage=function(){return t.errorMessage}),t.getSuccessMessage&&(s.getSuccessMessage=function(e){var n=e.res,r=e.args,o=e.p;return t.getSuccessMessage(n,r,o)}),t.getErrorMessage&&(s.getErrorMessage=function(e){var n=e.err,r=e.args,o=e.p;return t.getErrorMessage(n,r,o)}),t.preReducer&&(s.preEffects=function(e){var n=e.s,r=e.p,o=e.args;return t.preReducer(n,o,r)}),t.optimisticReducer&&(s.optimisticEffects=function(e){var n=e.s,r=e.p,o=e.args;return t.optimisticReducer(n,o,r)}),t.reducer&&(s.effects=function(e){var n=e.s,r=e.res,o=e.p,i=e.args;return t.reducer(n,r,i,o)}),t.errorReducer&&(s.errorEffects=function(e){var n=e.s,r=e.err,o=e.p,i=e.args;return t.errorReducer(n,r,i,o)}),t.onDone&&(s.sideEffects=function(e){var n=e.s,r=e.res,o=e.p,i=e.args,s=e.a,u=e.notifyWarning;return t.onDone(n,r,i,o,s,u)}),t.onFail&&(s.errorSideEffects=function(e){var n=e.s,r=e.err,o=e.p,i=e.args,s=e.a,u=e.notifyWarning;return t.onFail(n,r,i,o,s,u)}),n[r]=s}return n}),{})}function v(o,i,u,a,f){void 0===a&&(a={});var l,p,g,v,y=n((function(e){return e>100?0:e+1}),0)[1],E=r(),h=r();null==E.current&&(E.current=d(i)),null==h.current&&(h.current=(l=a,p={},g=Object.keys(l),v=["onPropsChange","onPropsChangeReducer","getPropsRefValues","onMount","initialActionsMarkedLoading"],g.forEach((function(e){v.includes(e)||(p[e]=l[e])})),l.onMount&&(p.onMount=function(e){var n=e.s,r=e.p,t=e.a;return l.onMount(t,r,n)}),l.getPropsRefValues&&(p.onPropsChange={getDeps:l.getPropsRefValues,effects:function(e){var n=e.s,r=e.p,t=e.indices;return l.onPropsChangeReducer?l.onPropsChangeReducer(n,r,t):null},sideEffects:function(e){var n=e.s,r=e.p,t=e.a,o=e.indices;return null==l.onPropsChange?null:l.onPropsChange(n,r,t,o)}}),l.initialActionsMarkedLoading&&(p.initialActionsMarkedLoading=l.initialActionsMarkedLoading),p));var m=r();if(null==m.current){var O=f;a.logEnabled&&O.push(c()),m.current=e(s(s({getInitialState:o,actions:E.current},h.current),{middlewares:O}))}m.current.setProps(u),t((function(){return m.current.addStateListener((function(){y()}))}),[]);var P=m.current;return{state:P.state,actions:P.actions,loading:P.loading,loadingMap:P.loadingMap,loadingParallelMap:P.loadingParallelMap,abortAction:P.abortAction}}function y(e){o((function(){var n=e();return"function"==typeof n?n:void 0}),[e])}function E(e,n){void 0===n&&(n=[]),o((function(){return e}),[n,e])}function h(e){o((function(){return document.addEventListener("beforeunload",e),function(){document.removeEventListener("beforeunload",e)}}),[e])}"development"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV||(c=function(e){return void 0===e&&(e=console),function(){var n="",r=e,t=function(e,n){var r;if(n!==e){var t=null!=e?typeof e:typeof n;if("number"===t||"string"===t||"boolean"===t)r="".concat(e," => ").concat(""===n?'""':n);else if(e&&e.length||n&&n.length)if(null==e)r="was ".concat(e,", now contains ").concat(n.length," element(s)");else if(null==n)r="contained ".concat(e.length," element(s), now is ").concat(n);else if(0===e.length)r="was empty, now contains ".concat(n.length," elements");else if(0===n.length)r="contained ".concat(e.length," elements, now is empty");else{var o=n.filter((function(n){return!e.find((function(e){return u(n,e)}))})),i=e.filter((function(e){return!n.find((function(n){return u(e,n)}))}));o.length>10&&(o="".concat(o.length," element(s) added")),i.length>10&&(i="".concat(i.length," element(s) removed")),r={added:o,removed:i}}else r=n}return r},o=function(e){return"string"==typeof e?'"'.concat(e,'"'):e};return{init:function(t){var i,s;n=(null===(i=t.options)||void 0===i?void 0:i.name)?"[".concat(null===(s=t.options)||void 0===s?void 0:s.name,"]"):"";var u=t.state;e.group(n,"initialState"),Object.keys(u).forEach((function(e){r.log(e,":",o(u[e]))})),e.groupEnd()},destroy:null,effects:function(e,i,s,u){var c,a=null===(c=e.context)||void 0===c?void 0:c.args,f=[n,e.name.toString()];if(e.isAsync&&("preEffects"===e.type?f.push(u?"START":"CANCELLED"):"effects"===e.type?f.push("DONE"):f.push("FAILED")),null!=s||a&&0!==Object.keys(a).length?r.group.apply(r,f):r.log.apply(r,f),a&&Object.keys(a).length>0&&(r.group("Arguments"),a.forEach((function(e){r.log(e,":",o(e))})),r.groupEnd()),null!=s){if(r.groupCollapsed("Before"),null==i)r.log("was null");else Object.keys(i).forEach((function(e){r.log(e,":",o(i[e]))}));if(r.groupEnd(),r.groupCollapsed("After"),null==s)r.log("was null");else Object.keys(s).forEach((function(e){r.log(e,":",o(s[e]))}));if(r.groupEnd(),null!=s){r.group("Diff");var l=function(e,n){var r={};return e&&Object.keys(e).forEach((function(o){if(n.hasOwnProperty(o)){var i=e[o],s=n[o],u=t(i,s);u&&(r[o]=u)}else r[o]="was deleted"})),Object.keys(n).forEach((function(o){if(null==e||!e.hasOwnProperty(o)){var i=n[o];r[o]=t(void 0,i)}})),r}(i,s);Object.keys(l).forEach((function(e){return r.log(e,":",l[e])})),r.groupEnd()}}return r.groupEnd(),null}}}});export{v as default,g as isAdvancedSyncAction,f as isAsyncAction,l as isAsyncPromiseGetAction,p as isSyncAction,y as useOnMount,h as useOnUnload,E as useOnUnmount};
1
+ import{createStore as e}from"./index";import{useReducer as n,useRef as r,useLayoutEffect as t,useEffect as o}from"react";var i,s=function(){return s=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},s.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,function(e){e.REJECT="reject",e.IGNORE="ignore",e.KEEP_LAST="keepLast",e.KEEP_ALL="keepAll",e.PARALLEL="parallel",e.REUSE="reuse",e.ABORT="abort"}(i||(i={}));var u=function e(n,r){if(n===r)return!0;if(n&&r&&"object"==typeof n&&"object"==typeof r){if(n.constructor!==r.constructor)return!1;var t,o,i;if(Array.isArray(n)){if((t=n.length)!=r.length)return!1;for(o=t;0!=o--;)if(!e(n[o],r[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===r.source&&n.flags===r.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===r.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===r.toString();if((t=(i=Object.keys(n)).length)!==Object.keys(r).length)return!1;for(o=t;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,i[o]))return!1;for(o=t;0!=o--;){var s=i[o];if(!e(n[s],r[s]))return!1}return!0}return n!=n&&r!=r},c=null;function a(e){return!(e instanceof Function)&&e.hasOwnProperty("promiseGet")}function f(e){return!(e instanceof Function)&&(e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))}function l(e){return!(e instanceof Function||e.hasOwnProperty("promise")&&e.hasOwnProperty("promiseGet"))}function p(e){return e instanceof Function}function g(e){return!(e instanceof Function||e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))}function d(e){return Object.keys(e).reduce((function(n,r){var t=e[r];if(p(t))n[r]=function(e){return t(e.s,e.args,e.p)};else if(g(t)){var o={effects:function(e){return t.action(e.s,e.args,e.p)}};t.onActionDone&&(o.sideEffects=function(e){var n=e.s,r=e.p,o=e.args,i=e.a,s=e.notifyWarning;t.onActionDone(n,o,r,i,s)}),n[r]=o}else if(function(e){return!(e instanceof Function)&&e.hasOwnProperty("promise")}(t)||a(t)){var s;s=a(t)?{getPromise:function(e){var n=e.s,r=e.p,o=e.a,i=e.args,s=e.abortSignal;return t.promiseGet(i,n,r,o,s)},retryCount:3,conflictPolicy:i.REUSE}:{getPromise:function(e){var n=e.s,r=e.p,o=e.a,i=e.args,s=e.abortSignal;return t.promise(i,n,r,o,s)}},["abortable","conflictPolicy","getPromiseId","isTriggerRetryError","rejectPromiseOnError","retryCount","debounceTimeout","debounceSideEffectsTimeout","retryDelaySeed"].forEach((function(e){null!=t[e]&&(s[e]=t[e])})),t.successMessage&&(s.getSuccessMessage=function(){return t.successMessage}),t.errorMessage&&(s.getSuccessMessage=function(){return t.errorMessage}),t.getSuccessMessage&&(s.getSuccessMessage=function(e){var n=e.res,r=e.args,o=e.p;return t.getSuccessMessage(n,r,o)}),t.getErrorMessage&&(s.getErrorMessage=function(e){var n=e.err,r=e.args,o=e.p;return t.getErrorMessage(n,r,o)}),t.preReducer&&(s.preEffects=function(e){var n=e.s,r=e.p,o=e.args;return t.preReducer(n,o,r)}),t.optimisticReducer&&(s.optimisticEffects=function(e){var n=e.s,r=e.p,o=e.args;return t.optimisticReducer(n,o,r)}),t.reducer&&(s.effects=function(e){var n=e.s,r=e.res,o=e.p,i=e.args;return t.reducer(n,r,i,o)}),t.errorReducer&&(s.errorEffects=function(e){var n=e.s,r=e.err,o=e.p,i=e.args;return t.errorReducer(n,r,i,o)}),t.onDone&&(s.sideEffects=function(e){var n=e.s,r=e.res,o=e.p,i=e.args,s=e.a,u=e.notifyWarning;return t.onDone(n,r,i,o,s,u)}),t.onFail&&(s.errorSideEffects=function(e){var n=e.s,r=e.err,o=e.p,i=e.args,s=e.a,u=e.notifyWarning;return t.onFail(n,r,i,o,s,u)}),n[r]=s}return n}),{})}function v(o,i,u,a,f){void 0===a&&(a={});var l,p,g,v,y=n((function(e){return e>100?0:e+1}),0)[1],E=r(),h=r();null==E.current&&(E.current=d(i)),null==h.current&&(h.current=(l=a,p={},g=Object.keys(l),v=["onPropsChange","onPropsChangeReducer","getPropsRefValues","onMount","initialActionsMarkedLoading"],g.forEach((function(e){v.includes(e)||(p[e]=l[e])})),l.onMount&&(p.onMount=function(e){var n=e.s,r=e.p,t=e.a;return l.onMount(t,r,n)}),l.getPropsRefValues&&(p.onPropsChange={getDeps:l.getPropsRefValues,effects:function(e){var n=e.s,r=e.p,t=e.indices;return l.onPropsChangeReducer?l.onPropsChangeReducer(n,r,t):null},sideEffects:function(e){var n=e.s,r=e.p,t=e.a,o=e.indices;return null==l.onPropsChange?null:l.onPropsChange(n,r,t,o)}}),l.initialActionsMarkedLoading&&(p.initialActionsMarkedLoading=l.initialActionsMarkedLoading),p));var m=r();if(null==m.current){var O=f;a.logEnabled&&O.push(c()),m.current=e(s(s({getInitialState:o,actions:E.current},h.current),{middlewares:O}))}m.current.setProps(u),t((function(){m.current.init(u),m.current.runMountEffects()}),[]),t((function(){return m.current.addStateListener((function(){y()}))}),[]);var P=m.current;return{state:P.state,actions:P.actions,loading:P.loading,loadingMap:P.loadingMap,loadingParallelMap:P.loadingParallelMap,abortAction:P.abortAction}}function y(e){o((function(){var n=e();return"function"==typeof n?n:void 0}),[e])}function E(e,n){void 0===n&&(n=[]),o((function(){return e}),[n,e])}function h(e){o((function(){return document.addEventListener("beforeunload",e),function(){document.removeEventListener("beforeunload",e)}}),[e])}"development"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV||(c=function(e){return void 0===e&&(e=console),function(){var n="",r=e,t=function(e,n){var r;if(n!==e){var t=null!=e?typeof e:typeof n;if("number"===t||"string"===t||"boolean"===t)r="".concat(e," => ").concat(""===n?'""':n);else if(e&&e.length||n&&n.length)if(null==e)r="was ".concat(e,", now contains ").concat(n.length," element(s)");else if(null==n)r="contained ".concat(e.length," element(s), now is ").concat(n);else if(0===e.length)r="was empty, now contains ".concat(n.length," elements");else if(0===n.length)r="contained ".concat(e.length," elements, now is empty");else{var o=n.filter((function(n){return!e.find((function(e){return u(n,e)}))})),i=e.filter((function(e){return!n.find((function(n){return u(e,n)}))}));o.length>10&&(o="".concat(o.length," element(s) added")),i.length>10&&(i="".concat(i.length," element(s) removed")),r={added:o,removed:i}}else r=n}return r},o=function(e){return"string"==typeof e?'"'.concat(e,'"'):e};return{init:function(t){var i,s;n=(null===(i=t.options)||void 0===i?void 0:i.name)?"[".concat(null===(s=t.options)||void 0===s?void 0:s.name,"]"):"";var u=t.state;e.group(n,"initialState"),Object.keys(u).forEach((function(e){r.log(e,":",o(u[e]))})),e.groupEnd()},destroy:null,effects:function(e,i,s,u){var c,a=null===(c=e.context)||void 0===c?void 0:c.args,f=[n,e.name.toString()];if(e.isAsync&&("preEffects"===e.type?f.push(u?"START":"CANCELLED"):"effects"===e.type?f.push("DONE"):f.push("FAILED")),null!=s||a&&0!==Object.keys(a).length?r.group.apply(r,f):r.log.apply(r,f),a&&Object.keys(a).length>0&&(r.group("Arguments"),a.forEach((function(e){r.log(e,":",o(e))})),r.groupEnd()),null!=s){if(r.groupCollapsed("Before"),null==i)r.log("was null");else Object.keys(i).forEach((function(e){r.log(e,":",o(i[e]))}));if(r.groupEnd(),r.groupCollapsed("After"),null==s)r.log("was null");else Object.keys(s).forEach((function(e){r.log(e,":",o(s[e]))}));if(r.groupEnd(),null!=s){r.group("Diff");var l=function(e,n){var r={};return e&&Object.keys(e).forEach((function(o){if(n.hasOwnProperty(o)){var i=e[o],s=n[o],u=t(i,s);u&&(r[o]=u)}else r[o]="was deleted"})),Object.keys(n).forEach((function(o){if(null==e||!e.hasOwnProperty(o)){var i=n[o];r[o]=t(void 0,i)}})),r}(i,s);Object.keys(l).forEach((function(e){return r.log(e,":",l[e])})),r.groupEnd()}}return r.groupEnd(),null}}}});export{v as default,g as isAdvancedSyncAction,f as isAsyncAction,l as isAsyncPromiseGetAction,p as isSyncAction,y as useOnMount,h as useOnUnload,E as useOnUnmount};
2
2
  //# sourceMappingURL=v5.js.map
package/index.d.ts CHANGED
@@ -39,6 +39,12 @@ export type StoreApi<S, A extends DecoratedActions, P, DS = {}> = {
39
39
  * Initializes the store with the specified props
40
40
  */
41
41
  readonly init: (p: P) => void;
42
+ /**
43
+ * Runs onMount (and onPropsChange entries flagged onMount) exactly once for this store instance.
44
+ * Must be called from an effect (useLayoutEffect/useEffect), never from a render body.
45
+ * @internal
46
+ */
47
+ readonly runMountEffects: () => void;
42
48
  /**
43
49
  * Update the store with the specified props
44
50
  */
@@ -99,7 +105,7 @@ export declare function createStore<S, A extends DecoratedActions, P, DS = {}>(c
99
105
  * @param slicerFunc A function that returns a state slice
100
106
  * @returns The state slice.
101
107
  */
102
- export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, SLICE>(store: StoreApi<S, A, P, DS>, slicerFunc: (ctx: StateListenerContext<S, DS, A, P>) => SLICE): SLICE;
108
+ export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, SLICE>(store: StoreApi<S, A, P, DS>, slicerFunc: (ctx: StateListenerContext<S, DS, A, P>) => SLICE, deps?: any[]): SLICE;
103
109
  /**
104
110
  * A react hook to get a state slice. Will be refresh if, and only if, one property of the slice has changed
105
111
  * @param store The store to listen to.
package/index.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./impl"),r=require("./development");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(e),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e},o.apply(this,arguments)};function c(e){var t={exports:{}};return e(t,t.exports),t.exports}"function"==typeof SuppressedError&&SuppressedError;var i="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},a=u.default.useState,l=u.default.useEffect,f=u.default.useLayoutEffect,s=u.default.useDebugValue;function d(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!i(e,r)}catch(e){return!0}}var v="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=a({inst:{value:r,getSnapshot:t}}),u=n[0].inst,o=n[1];return f((function(){u.value=r,u.getSnapshot=t,d(u)&&o({inst:u})}),[e,r,t]),l((function(){return d(u)&&o({inst:u}),e((function(){d(u)&&o({inst:u})}))}),[e]),s(r),r},p={useSyncExternalStore:void 0!==u.default.useSyncExternalStore?u.default.useSyncExternalStore:v},O=c((function(e,t){"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=u.default,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,c=r.useEffect,i=r.useLayoutEffect,a=r.useDebugValue,l=!1,f=!1,s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===r.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var s=u();if(!f){var d=u();n(s,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var v=(d=o({inst:{value:s,getSnapshot:u}}))[0].inst,p=d[1];return i((function(){v.value=s,v.getSnapshot=u,e(v)&&p({inst:v})}),[t,s,u]),c((function(){return e(v)&&p({inst:v}),t((function(){e(v)&&p({inst:v})}))}),[t]),a(s),s};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:s,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),S=p,E=O,_=c((function(e){"production"===process.env.NODE_ENV?e.exports=S:e.exports=E})),y=_;var g,L="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},b=_.useSyncExternalStore,A=u.default.useRef,h=u.default.useEffect,R=u.default.useMemo,x=u.default.useDebugValue,D={useSyncExternalStoreWithSelector:function(e,t,r,n,u){var o=A(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=R((function(){function e(e){if(!a){if(a=!0,o=e,e=n(e),void 0!==u&&c.hasValue){var t=c.value;if(u(t,e))return i=t}return i=e}if(t=i,L(o,e))return t;var r=n(e);return void 0!==u&&u(t,r)?(o=e,t):(o=e,i=r)}var o,i,a=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,r,n,u]);var i=b(e,o[0],o[1]);return h((function(){c.hasValue=!0,c.value=i}),[i]),x(i),i}},M=c((function(e,t){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=u.default,r=_,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useSyncExternalStore,c=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,u,f){var s=c(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;s=a((function(){function e(e){if(!i){if(i=!0,o=e,e=u(e),void 0!==f&&d.hasValue){var t=d.value;if(f(t,e))return c=t}return c=e}if(t=c,n(o,e))return t;var r=u(e);return void 0!==f&&f(t,r)?(o=e,t):(o=e,c=r)}var o,c,i=!1,a=void 0===r?null:r;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,r,u,f]);var v=o(e,s[0],s[1]);return i((function(){d.hasValue=!0,d.value=v}),[v]),l(v),v},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),m=D,T=M,j=c((function(e){"production"===process.env.NODE_ENV?e.exports=m:e.exports=T}));exports.ConflictPolicy=void 0,(g=exports.ConflictPolicy||(exports.ConflictPolicy={})).REJECT="reject",g.IGNORE="ignore",g.KEEP_LAST="keepLast",g.KEEP_ALL="keepAll",g.PARALLEL="parallel",g.REUSE="reuse",g.ABORT="abort";var P=j.useSyncExternalStoreWithSelector,C=y.useSyncExternalStore;function V(e){var n=t.createRef(),u=t.createRef(),c=t.createRef(),i=t.createRef(),a=t.createRef(),l=t.createRef(),f=t.createRef(),s=t.createRef(),d=t.createRef(),v=t.createRef(),p=t.createRef(),O=t.createRef(!1),S=t.createRef(!1),E=t.createRef(),_=t.createRef([]),y=e.actions,g=e.middlewares,L=void 0===g?[]:g,b=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(n=Object.getOwnPropertySymbols(e);u<n.length;u++)t.indexOf(n[u])<0&&Object.prototype.propertyIsEnumerable.call(e,n[u])&&(r[n[u]]=e[n[u]])}return r}(e,["actions","middlewares"]),A=t.isFuncConfig(e)?e.getInitialState:function(){return e.initialState},h={},R=0;function x(){E.current=o(o(o(o(o({},c.current),i.current),n.current),u.current.state),{isLoading:V,abortAction:w,loading:s.current,loadingMap:f.current,loadingParallelMap:l.current,errorMap:I(),errorParallelMap:d.current}),S.current=!1,Object.keys(h).forEach((function(e){var t;null===(t=h[e])||void 0===t||t.call(h)}))}function D(e){var r=c.current;c.current=e,O.current?t.onPropChange(n,u,c,r,i,b,A,P,!1,!1):T(e)}function M(e){n.current=e,t.computeDerivedValues(n,c,u,b),x()}function m(e){l.current=e,f.current=function(){if(O.current){var e=l.current;return Object.keys(e).reduce((function(t,r){var n=e[r];return t[r]=null!=Object.keys(n).find((function(e){return!!n[e]})),t}),{})}return null}(),s.current=function(){if(O.current){var e=l.current;return null!=Object.keys(e).find((function(t){var r=e[t];return Object.keys(r).find((function(e){return!!r[e]}))}))}return null}()}function T(o){var l;if(!O.current){c.current=o,O.current=!0,n.current=A(o);var f=new Set(null==b?void 0:b.initialActionsMarkedLoading),s=Object.keys(y).reduce((function(e,r){var n;return e[r]=f.has(r)?((n={})[t.DEFAULT_PROMISE_ID]=!0,n):{},e}),{});m(s),d.current=Object.keys(y).reduce((function(e,t){return e[t]={},e}),{}),a.current={},v.current={},p.current={},u.current={state:null,deps:{}},(null==b?void 0:b.derivedState)&&t.fixDerivedDeps(b),_.current=[];var S={options:b,get state(){return n.current},actions:y,setState:M};e.logEnabled&&r.logDetailedEffects&&L.push(r.logDetailedEffects());var E=function(e){var t,r=e();_.current.push(r),null===(t=r.init)||void 0===t||t.call(r,S)};null===(l=t.globalConfig.defaultMiddlewares)||void 0===l||l.forEach(E),null==L||L.forEach(E),t.computeDerivedValues(n,c,u,b),t.onPropChange(n,u,c,null,i,b,A,P,!0,!1),(null==b?void 0:b.onMount)&&b.onMount(t.buildOnMountInvocationContext(n,u,c,i)),x()}}function j(e,r){void 0===r&&(r=t.DEFAULT_PROMISE_ID);var n=d.current[e];(null==n?void 0:n[r])&&delete n[r],x()}function P(e,r,o,i,a,f,s,d,v){void 0===s&&(s=!1),void 0===d&&(d=!1),void 0===v&&(v=!1);var p=!1;if(!O.current)return x;var S=r,E=!!a&&t.isLoadingImpl(S||l.current,[o,null==f?void 0:f.promiseId]),y=t.runMiddlewares(_.current,n.current,e,E,o,i,a,f),g=y.newState,L=y.newLoading;if(null!=g&&(p=!0,n.current=g),E!==L&&(S=t.buildLoadingMap(S,o,(null==f?void 0:f.promiseId)||t.DEFAULT_PROMISE_ID,L),0===Object.keys(S).length&&(S=void 0)),null!=S&&(p=!0,m(S)),p)t.computeDerivedValues(n,c,u,b),d||(n.current=g||n.current,v||x());else if(s){!t.computeDerivedValues(n,c,u,b)||d||v||x()}return x}var C=Object.keys(y);function V(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.isLoadingImpl.apply(void 0,function(e,t,r){if(r||2===arguments.length)for(var n,u=0,o=t.length;u<o;u++)!n&&u in t||(n||(n=Array.prototype.slice.call(t,0,u)),n[u]=t[u]);return e.concat(n||Array.prototype.slice.call(t))}([l.current],e,!1))}function w(e,r){var n,u;void 0===r&&(r=t.DEFAULT_PROMISE_ID);var o=null===(u=null===(n=v.current[e])||void 0===n?void 0:n[r])||void 0===u?void 0:u.abortController,c=!1;return o&&(o.abort(),c=!0),c}function I(){return O.current?t.buildErrorMap(d.current):null}return i.current=C.reduce((function(e,r){var o=y[r];return t.isSimpleSyncAction(o)?e[r]=t.decorateSimpleSyncAction(r,o,n,u,c,O,b,P):t.isAsyncAction(o)?e[r]=t.decorateAsyncAction({actionName:r,stateRef:n,derivedStateRef:u,propsRef:c,loadingParallelMapRef:l,errorMapRef:d,actionsRef:i,promisesRef:v,conflictActionsRef:p,initializedRef:O,timeoutRef:a,needNotifyListenersRef:S,options:b,setState:P,clearError:j,action:t.computeAsyncActionInput(o)}):t.isSyncAction(o)&&(e[r]=t.decorateSyncAction(r,o,n,u,c,i,O,a,S,b,P,j)),e}),{}),{getConfig:function(){return o({},e)},setProps:D,addStateListener:function(e){var t="".concat(R++);return h[t]=e,function(){delete h[t]}},init:T,destroy:function(){var e;if(O.current){var r=Object.keys(y).reduce((function(e,r){var n=y[r];if(t.isAsyncAction(n)&&n.abortable){var u=l.current[r],o=Object.keys(u).reduce((function(e,t){return u[t]&&(w(r,t),e.push(t)),e}),[]);o.length>0&&(e[r]=o)}return e}),{});null===(e=null==b?void 0:b.onUnmount)||void 0===e||e.call(b,t.buildOnUnMountInvocationContext(n,u,c,r)),Object.keys(a.current).forEach((function(e){clearTimeout(a.current[e])})),c.current=null,n.current=null,l.current=null,f.current=null,s.current=null,d.current=null,v.current=null,p.current=null,u.current=null,E.current=null,a.current=null,h={},O.current=!1,_.current.forEach((function(e){var t;null===(t=e.destroy)||void 0===t||t.call(e)})),_.current=[]}},isLoading:V,abortAction:w,clearError:j,getSnapshot:function(){return E.current},invokeOnMountDeferred:function(){t.onPropChange(n,u,c,null,i,b,A,P,!0,!0),(null==b?void 0:b.onMountDeferred)&&b.onMountDeferred(t.buildOnMountInvocationContext(n,u,c,i))},listenToStoreProps:function(e,t){var r=e.state?k(e.state,t):{};return e.addStateListener((function(){var n=e.state;if(n){var u=k(n,t);t.some((function(e){return!Object.is(r[e],u[e])}))&&(r=u,D(o(o({},c.current),u)))}}))},get actions(){return i.current},get state(){return O.current?o(o({},n.current),u.current.state):null},get loading(){return s.current},get loadingMap(){return f.current},get errorMap(){return I()},get loadingParallelMap(){return O.current?l.current:null},get errorParallelMap(){return O.current?d.current:null}}}function w(r,n){var u=e.useMemo((function(){return n instanceof Function?n:function(e){return k(e,n)}}),[n]);return P(r.addStateListener,r.getSnapshot,void 0,u,t.globalConfig.comparator)}function I(t,r,n){void 0===n&&(n=!0);var u=e.useRef();return null==u.current&&(u.current=V(t)),e.useEffect((function(){return u.current.invokeOnMountDeferred(),function(){var e;null===(e=u.current)||void 0===e||e.destroy()}}),[]),function(t,r,n){void 0===r&&(r=null),void 0===n&&(n=!0);var u=e.useReducer((function(e){return e>100?0:e+1}),0)[1],o=e.useRef(t);return t.setProps(r),e.useLayoutEffect((function(){t.init(r)}),[]),e.useLayoutEffect((function(){if(n)return o.current.addStateListener((function(){u()}))}),[n]),t}(u.current,r,n)}function k(e,t){return t.reduce((function(t,r){return e.hasOwnProperty(r)&&(t[r]=e[r]),t}),{})}Object.defineProperty(exports,"EffectError",{enumerable:!0,get:function(){return t.EffectError}}),Object.defineProperty(exports,"ParallelActionError",{enumerable:!0,get:function(){return t.ParallelActionError}}),Object.defineProperty(exports,"setGlobalConfig",{enumerable:!0,get:function(){return t.setGlobalConfig}}),exports.createStore=V,exports.default=I,exports.pick=k,exports.slice=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return k(t,e)}},exports.useBindStore=function(t,r){return t.setProps(r),C(t.addStateListener,t.getSnapshot),e.useLayoutEffect((function(){t.init(r)}),[]),e.useEffect((function(){t.invokeOnMountDeferred()}),[t]),t},exports.useLocalStore=I,exports.useStore=function(e){return C(e.addStateListener,e.getSnapshot),e},exports.useStoreContextSlice=function(t,r){return w(e.useContext(t),r)},exports.useStoreSlice=w;
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),t=require("./impl"),r=require("./development");function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var u=n(e),o=function(){return o=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var u in t=arguments[r])Object.prototype.hasOwnProperty.call(t,u)&&(e[u]=t[u]);return e},o.apply(this,arguments)};function c(e,t,r){if(r||2===arguments.length)for(var n,u=0,o=t.length;u<o;u++)!n&&u in t||(n||(n=Array.prototype.slice.call(t,0,u)),n[u]=t[u]);return e.concat(n||Array.prototype.slice.call(t))}function i(e){var t={exports:{}};return e(t,t.exports),t.exports}"function"==typeof SuppressedError&&SuppressedError;var a="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},l=u.default.useState,f=u.default.useEffect,s=u.default.useLayoutEffect,d=u.default.useDebugValue;function v(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!a(e,r)}catch(e){return!0}}var p="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=l({inst:{value:r,getSnapshot:t}}),u=n[0].inst,o=n[1];return s((function(){u.value=r,u.getSnapshot=t,v(u)&&o({inst:u})}),[e,r,t]),f((function(){return v(u)&&o({inst:u}),e((function(){v(u)&&o({inst:u})}))}),[e]),d(r),r},O={useSyncExternalStore:void 0!==u.default.useSyncExternalStore?u.default.useSyncExternalStore:p},E=i((function(e,t){"production"!==process.env.NODE_ENV&&function(){function e(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!n(e,r)}catch(e){return!0}}"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var r=u.default,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useState,c=r.useEffect,i=r.useLayoutEffect,a=r.useDebugValue,l=!1,f=!1,s="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(t,u){l||void 0===r.startTransition||(l=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var s=u();if(!f){var d=u();n(s,d)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),f=!0)}var v=(d=o({inst:{value:s,getSnapshot:u}}))[0].inst,p=d[1];return i((function(){v.value=s,v.getSnapshot=u,e(v)&&p({inst:v})}),[t,s,u]),c((function(){return e(v)&&p({inst:v}),t((function(){e(v)&&p({inst:v})}))}),[t]),a(s),s};t.useSyncExternalStore=void 0!==r.useSyncExternalStore?r.useSyncExternalStore:s,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),S=O,_=E,y=i((function(e){"production"===process.env.NODE_ENV?e.exports=S:e.exports=_})),g=y;var L,b="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},A=y.useSyncExternalStore,R=u.default.useRef,h=u.default.useEffect,x=u.default.useMemo,M=u.default.useDebugValue,D={useSyncExternalStoreWithSelector:function(e,t,r,n,u){var o=R(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=x((function(){function e(e){if(!a){if(a=!0,o=e,e=n(e),void 0!==u&&c.hasValue){var t=c.value;if(u(t,e))return i=t}return i=e}if(t=i,b(o,e))return t;var r=n(e);return void 0!==u&&u(t,r)?(o=e,t):(o=e,i=r)}var o,i,a=!1,l=void 0===r?null:r;return[function(){return e(t())},null===l?void 0:function(){return e(l())}]}),[t,r,n,u]);var i=A(e,o[0],o[1]);return h((function(){c.hasValue=!0,c.value=i}),[i]),M(i),i}},m=i((function(e,t){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var e=u.default,r=y,n="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},o=r.useSyncExternalStore,c=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;t.useSyncExternalStoreWithSelector=function(e,t,r,u,f){var s=c(null);if(null===s.current){var d={hasValue:!1,value:null};s.current=d}else d=s.current;s=a((function(){function e(e){if(!i){if(i=!0,o=e,e=u(e),void 0!==f&&d.hasValue){var t=d.value;if(f(t,e))return c=t}return c=e}if(t=c,n(o,e))return t;var r=u(e);return void 0!==f&&f(t,r)?(o=e,t):(o=e,c=r)}var o,c,i=!1,a=void 0===r?null:r;return[function(){return e(t())},null===a?void 0:function(){return e(a())}]}),[t,r,u,f]);var v=o(e,s[0],s[1]);return i((function(){d.hasValue=!0,d.value=v}),[v]),l(v),v},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()})),T=D,j=m,P=i((function(e){"production"===process.env.NODE_ENV?e.exports=T:e.exports=j}));exports.ConflictPolicy=void 0,(L=exports.ConflictPolicy||(exports.ConflictPolicy={})).REJECT="reject",L.IGNORE="ignore",L.KEEP_LAST="keepLast",L.KEEP_ALL="keepAll",L.PARALLEL="parallel",L.REUSE="reuse",L.ABORT="abort";var C=P.useSyncExternalStoreWithSelector,V=g.useSyncExternalStore;function w(e){var n=t.createRef(),u=t.createRef(),i=t.createRef(),a=t.createRef(),l=t.createRef(),f=t.createRef(),s=t.createRef(),d=t.createRef(),v=t.createRef(),p=t.createRef(),O=t.createRef(),E=t.createRef(!1),S=t.createRef(!1),_=t.createRef(!1),y=t.createRef(),g=t.createRef([]),L=e.actions,b=e.middlewares,A=void 0===b?[]:b,R=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(n=Object.getOwnPropertySymbols(e);u<n.length;u++)t.indexOf(n[u])<0&&Object.prototype.propertyIsEnumerable.call(e,n[u])&&(r[n[u]]=e[n[u]])}return r}(e,["actions","middlewares"]),h=t.isFuncConfig(e)?e.getInitialState:function(){return e.initialState},x={},M=0;function D(){y.current=o(o(o(o(o({},i.current),a.current),n.current),u.current.state),{isLoading:I,abortAction:k,loading:d.current,loadingMap:s.current,loadingParallelMap:f.current,errorMap:B(),errorParallelMap:v.current}),_.current=!1,Object.keys(x).forEach((function(e){var t;null===(t=x[e])||void 0===t||t.call(x)}))}function m(e){var r=i.current;i.current=e,E.current?t.onPropChange(n,u,i,r,a,R,h,V,!1,!1):P(e)}function T(e){n.current=e,t.computeDerivedValues(n,i,u,R),D()}function j(e){f.current=e,s.current=function(){if(E.current){var e=f.current;return Object.keys(e).reduce((function(t,r){var n=e[r];return t[r]=null!=Object.keys(n).find((function(e){return!!n[e]})),t}),{})}return null}(),d.current=function(){if(E.current){var e=f.current;return null!=Object.keys(e).find((function(t){var r=e[t];return Object.keys(r).find((function(e){return!!r[e]}))}))}return null}()}function P(o){var c;if(!E.current){i.current=o,E.current=!0,n.current=h(o);var a=new Set(null==R?void 0:R.initialActionsMarkedLoading),f=Object.keys(L).reduce((function(e,r){var n;return e[r]=a.has(r)?((n={})[t.DEFAULT_PROMISE_ID]=!0,n):{},e}),{});j(f),v.current=Object.keys(L).reduce((function(e,t){return e[t]={},e}),{}),l.current={},p.current={},O.current={},u.current={state:null,deps:{}},(null==R?void 0:R.derivedState)&&t.fixDerivedDeps(R),g.current=[];var s={options:R,get state(){return n.current},actions:L,setState:T};e.logEnabled&&r.logDetailedEffects&&A.push(r.logDetailedEffects());var d=function(e){var t,r=e();g.current.push(r),null===(t=r.init)||void 0===t||t.call(r,s)};null===(c=t.globalConfig.defaultMiddlewares)||void 0===c||c.forEach(d),null==A||A.forEach(d),t.computeDerivedValues(n,i,u,R),D()}}function C(e,r){void 0===r&&(r=t.DEFAULT_PROMISE_ID);var n=v.current[e];(null==n?void 0:n[r])&&delete n[r],D()}function V(e,r,o,c,a,l,s,d,v){void 0===s&&(s=!1),void 0===d&&(d=!1),void 0===v&&(v=!1);var p=!1;if(!E.current)return D;var O=r,S=!!a&&t.isLoadingImpl(O||f.current,[o,null==l?void 0:l.promiseId]),_=t.runMiddlewares(g.current,n.current,e,S,o,c,a,l),y=_.newState,L=_.newLoading;if(null!=y&&(p=!0,n.current=y),S!==L&&(O=t.buildLoadingMap(O,o,(null==l?void 0:l.promiseId)||t.DEFAULT_PROMISE_ID,L),0===Object.keys(O).length&&(O=void 0)),null!=O&&(p=!0,j(O)),p)t.computeDerivedValues(n,i,u,R),d||(n.current=y||n.current,v||D());else if(s){!t.computeDerivedValues(n,i,u,R)||d||v||D()}return D}var w=Object.keys(L);function I(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return t.isLoadingImpl.apply(void 0,c([f.current],e,!1))}function k(e,r){var n,u;void 0===r&&(r=t.DEFAULT_PROMISE_ID);var o=null===(u=null===(n=p.current[e])||void 0===n?void 0:n[r])||void 0===u?void 0:u.abortController,c=!1;return o&&(o.abort(),c=!0),c}function B(){return E.current?t.buildErrorMap(v.current):null}return a.current=w.reduce((function(e,r){var o=L[r];return t.isSimpleSyncAction(o)?e[r]=t.decorateSimpleSyncAction(r,o,n,u,i,E,R,V):t.isAsyncAction(o)?e[r]=t.decorateAsyncAction({actionName:r,stateRef:n,derivedStateRef:u,propsRef:i,loadingParallelMapRef:f,errorMapRef:v,actionsRef:a,promisesRef:p,conflictActionsRef:O,initializedRef:E,timeoutRef:l,needNotifyListenersRef:_,options:R,setState:V,clearError:C,action:t.computeAsyncActionInput(o)}):t.isSyncAction(o)&&(e[r]=t.decorateSyncAction(r,o,n,u,i,a,E,l,_,R,V,C)),e}),{}),{getConfig:function(){return o({},e)},setProps:m,addStateListener:function(e){var t="".concat(M++);return x[t]=e,function(){delete x[t]}},init:P,runMountEffects:function(){E.current&&!S.current&&(S.current=!0,t.onPropChange(n,u,i,null,a,R,h,V,!0,!1),(null==R?void 0:R.onMount)&&R.onMount(t.buildOnMountInvocationContext(n,u,i,a)),D())},destroy:function(){var e;if(E.current){var r=Object.keys(L).reduce((function(e,r){var n=L[r];if(t.isAsyncAction(n)&&n.abortable){var u=f.current[r],o=Object.keys(u).reduce((function(e,t){return u[t]&&(k(r,t),e.push(t)),e}),[]);o.length>0&&(e[r]=o)}return e}),{});null===(e=null==R?void 0:R.onUnmount)||void 0===e||e.call(R,t.buildOnUnMountInvocationContext(n,u,i,r)),Object.keys(l.current).forEach((function(e){clearTimeout(l.current[e])})),i.current=null,n.current=null,f.current=null,s.current=null,d.current=null,v.current=null,p.current=null,O.current=null,u.current=null,y.current=null,l.current=null,x={},E.current=!1,S.current=!1,g.current.forEach((function(e){var t;null===(t=e.destroy)||void 0===t||t.call(e)})),g.current=[]}},isLoading:I,abortAction:k,clearError:C,getSnapshot:function(){return y.current},invokeOnMountDeferred:function(){t.onPropChange(n,u,i,null,a,R,h,V,!0,!0),(null==R?void 0:R.onMountDeferred)&&R.onMountDeferred(t.buildOnMountInvocationContext(n,u,i,a))},listenToStoreProps:function(e,t){var r=e.state?G(e.state,t):{};return e.addStateListener((function(){var n=e.state;if(n){var u=G(n,t);t.some((function(e){return!Object.is(r[e],u[e])}))&&(r=u,m(o(o({},i.current),u)))}}))},get actions(){return a.current},get state(){return E.current?o(o({},n.current),u.current.state):null},get loading(){return d.current},get loadingMap(){return s.current},get errorMap(){return B()},get loadingParallelMap(){return E.current?f.current:null},get errorParallelMap(){return E.current?v.current:null}}}function I(r,n,u){void 0===u&&(u=[]);var o=e.useMemo((function(){return n instanceof Function?n:function(e){return G(e,n)}}),c([n],u,!0));return C(r.addStateListener,r.getSnapshot,void 0,o,t.globalConfig.comparator)}function k(t,r,n){void 0===n&&(n=!0);var u=e.useRef();return null==u.current&&(u.current=w(t)),e.useEffect((function(){return u.current.invokeOnMountDeferred(),function(){var e;null===(e=u.current)||void 0===e||e.destroy()}}),[]),function(t,r,n){void 0===r&&(r=null),void 0===n&&(n=!0);var u=e.useReducer((function(e){return e>100?0:e+1}),0)[1],o=e.useRef(t);return t.setProps(r),e.useLayoutEffect((function(){t.init(r),t.runMountEffects()}),[]),e.useLayoutEffect((function(){if(n)return o.current.addStateListener((function(){u()}))}),[n]),t}(u.current,r,n)}function G(e,t){return t.reduce((function(t,r){return e.hasOwnProperty(r)&&(t[r]=e[r]),t}),{})}Object.defineProperty(exports,"EffectError",{enumerable:!0,get:function(){return t.EffectError}}),Object.defineProperty(exports,"ParallelActionError",{enumerable:!0,get:function(){return t.ParallelActionError}}),Object.defineProperty(exports,"setGlobalConfig",{enumerable:!0,get:function(){return t.setGlobalConfig}}),exports.createStore=w,exports.default=k,exports.pick=G,exports.slice=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return function(t){return G(t,e)}},exports.useBindStore=function(t,r){return t.setProps(r),V(t.addStateListener,t.getSnapshot),e.useLayoutEffect((function(){t.init(r),t.runMountEffects()}),[]),e.useEffect((function(){t.invokeOnMountDeferred()}),[t]),t},exports.useLocalStore=k,exports.useStore=function(e){return V(e.addStateListener,e.getSnapshot),e},exports.useStoreContextSlice=function(t,r){return I(e.useContext(t),r)},exports.useStoreSlice=I;
2
2
  //# sourceMappingURL=index.js.map
package/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.mjs","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../node_modules/use-sync-external-store/shim/index.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","SuppressedError","objectIs","is","x","y","useState","React","useEffect","useLayoutEffect","useDebugValue","checkIfSnapshotChanged","inst","latestGetSnapshot","getSnapshot","value","nextValue","error","shim","window","document","createElement","subscribe","_useState","forceUpdate","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","require$$0","didWarnOld18Alpha","didWarnUncachedGetSnapshot","startTransition","console","cachedValue","exports","registerInternalModuleStop","module","require$$1","useRef","useMemo","getServerSnapshot","selector","isEqual","instRef","current","hasValue","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","useSyncExternalStoreWithSelector","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable","to","from","pack","ar","l","Array","slice","concat"],"mappings":"6NA+BWA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EA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3DoE,EAAEC,QAAQjE,EAAEJ,IAAM,GAAKJ,OAAOS,UAAUkE,qBAAqBhE,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACT,msFAiKO,SAAuB0E,EAAIC,EAAMC,GACtC,GAAIA,GAA6B,IAArBxE,UAAUC,OAAc,IAAK,IAA4BwE,EAAxB3E,EAAI,EAAG4E,EAAIH,EAAKtE,OAAYH,EAAI4E,EAAG5E,KACxE2E,GAAQ3E,KAAKyE,IACRE,IAAIA,EAAKE,MAAMxE,UAAUyE,MAAMvE,KAAKkE,EAAM,EAAGzE,IAClD2E,EAAG3E,GAAKyE,EAAKzE,IAGrB,OAAOwE,EAAGO,OAAOJ,GAAME,MAAMxE,UAAUyE,MAAMvE,KAAKkE,GACpD"}
1
+ {"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.mjs","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.development.js","../node_modules/use-sync-external-store/shim/index.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.production.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim/with-selector.development.js","../node_modules/use-sync-external-store/shim/with-selector.js"],"sourcesContent":["/******************************************************************************\nCopyright (c) Microsoft Corporation.\n\nPermission to use, copy, modify, and/or distribute this software for any\npurpose with or without fee is hereby granted.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\nPERFORMANCE OF THIS SOFTWARE.\n***************************************************************************** */\n/* global Reflect, Promise, SuppressedError, Symbol, Iterator */\n\nvar extendStatics = function(d, b) {\n extendStatics = Object.setPrototypeOf ||\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\n return extendStatics(d, b);\n};\n\nexport function __extends(d, b) {\n if (typeof b !== \"function\" && b !== null)\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\n extendStatics(d, b);\n function __() { this.constructor = d; }\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\n}\n\nexport var __assign = function() {\n __assign = Object.assign || function __assign(t) {\n for (var s, i = 1, n = arguments.length; i < n; i++) {\n s = arguments[i];\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\n }\n return t;\n }\n return __assign.apply(this, arguments);\n}\n\nexport function __rest(s, e) {\n var t = {};\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\n t[p] = s[p];\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\n t[p[i]] = s[p[i]];\n }\n return t;\n}\n\nexport function __decorate(decorators, target, key, desc) {\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\n else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;\n return c > 3 && r && Object.defineProperty(target, key, r), r;\n}\n\nexport function __param(paramIndex, decorator) {\n return function (target, key) { decorator(target, key, paramIndex); }\n}\n\nexport function __esDecorate(ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {\n function accept(f) { if (f !== void 0 && typeof f !== \"function\") throw new TypeError(\"Function expected\"); return f; }\n var kind = contextIn.kind, key = kind === \"getter\" ? \"get\" : kind === \"setter\" ? \"set\" : \"value\";\n var target = !descriptorIn && ctor ? contextIn[\"static\"] ? ctor : ctor.prototype : null;\n var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});\n var _, done = false;\n for (var i = decorators.length - 1; i >= 0; i--) {\n var context = {};\n for (var p in contextIn) context[p] = p === \"access\" ? {} : contextIn[p];\n for (var p in contextIn.access) context.access[p] = contextIn.access[p];\n context.addInitializer = function (f) { if (done) throw new TypeError(\"Cannot add initializers after decoration has completed\"); extraInitializers.push(accept(f || null)); };\n var result = (0, decorators[i])(kind === \"accessor\" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);\n if (kind === \"accessor\") {\n if (result === void 0) continue;\n if (result === null || typeof result !== \"object\") throw new TypeError(\"Object expected\");\n if (_ = accept(result.get)) descriptor.get = _;\n if (_ = accept(result.set)) descriptor.set = _;\n if (_ = accept(result.init)) initializers.unshift(_);\n }\n else if (_ = accept(result)) {\n if (kind === \"field\") initializers.unshift(_);\n else descriptor[key] = _;\n }\n }\n if (target) Object.defineProperty(target, contextIn.name, descriptor);\n done = true;\n};\n\nexport function __runInitializers(thisArg, initializers, value) {\n var useValue = arguments.length > 2;\n for (var i = 0; i < initializers.length; i++) {\n value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);\n }\n return useValue ? value : void 0;\n};\n\nexport function __propKey(x) {\n return typeof x === \"symbol\" ? x : \"\".concat(x);\n};\n\nexport function __setFunctionName(f, name, prefix) {\n if (typeof name === \"symbol\") name = name.description ? \"[\".concat(name.description, \"]\") : \"\";\n return Object.defineProperty(f, \"name\", { configurable: true, value: prefix ? \"\".concat(prefix, \" \", name) : name });\n};\n\nexport function __metadata(metadataKey, metadataValue) {\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\n}\n\nexport function __awaiter(thisArg, _arguments, P, generator) {\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\n return new (P || (P = Promise))(function (resolve, reject) {\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\n step((generator = generator.apply(thisArg, _arguments || [])).next());\n });\n}\n\nexport function __generator(thisArg, body) {\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === \"function\" ? Iterator : Object).prototype);\n return g.next = verb(0), g[\"throw\"] = verb(1), g[\"return\"] = verb(2), typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\n function verb(n) { return function (v) { return step([n, v]); }; }\n function step(op) {\n if (f) throw new TypeError(\"Generator is already executing.\");\n while (g && (g = 0, op[0] && (_ = 0)), _) try {\n if (f = 1, y && (t = op[0] & 2 ? y[\"return\"] : op[0] ? y[\"throw\"] || ((t = y[\"return\"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;\n if (y = 0, t) op = [op[0] & 2, t.value];\n switch (op[0]) {\n case 0: case 1: t = op; break;\n case 4: _.label++; return { value: op[1], done: false };\n case 5: _.label++; y = op[1]; op = [0]; continue;\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\n default:\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\n if (t[2]) _.ops.pop();\n _.trys.pop(); continue;\n }\n op = body.call(thisArg, _);\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\n }\n}\n\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n var desc = Object.getOwnPropertyDescriptor(m, k);\n if (!desc || (\"get\" in desc ? !m.__esModule : desc.writable || desc.configurable)) {\n desc = { enumerable: true, get: function() { return m[k]; } };\n }\n Object.defineProperty(o, k2, desc);\n}) : (function(o, m, k, k2) {\n if (k2 === undefined) k2 = k;\n o[k2] = m[k];\n});\n\nexport function __exportStar(m, o) {\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\n}\n\nexport function __values(o) {\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\n if (m) return m.call(o);\n if (o && typeof o.length === \"number\") return {\n next: function () {\n if (o && i >= o.length) o = void 0;\n return { value: o && o[i++], done: !o };\n }\n };\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\n}\n\nexport function __read(o, n) {\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\n if (!m) return o;\n var i = m.call(o), r, ar = [], e;\n try {\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\n }\n catch (error) { e = { error: error }; }\n finally {\n try {\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\n }\n finally { if (e) throw e.error; }\n }\n return ar;\n}\n\n/** @deprecated */\nexport function __spread() {\n for (var ar = [], i = 0; i < arguments.length; i++)\n ar = ar.concat(__read(arguments[i]));\n return ar;\n}\n\n/** @deprecated */\nexport function __spreadArrays() {\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\n r[k] = a[j];\n return r;\n}\n\nexport function __spreadArray(to, from, pack) {\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\n if (ar || !(i in from)) {\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\n ar[i] = from[i];\n }\n }\n return to.concat(ar || Array.prototype.slice.call(from));\n}\n\nexport function __await(v) {\n return this instanceof __await ? (this.v = v, this) : new __await(v);\n}\n\nexport function __asyncGenerator(thisArg, _arguments, generator) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\n return i = Object.create((typeof AsyncIterator === \"function\" ? AsyncIterator : Object).prototype), verb(\"next\"), verb(\"throw\"), verb(\"return\", awaitReturn), i[Symbol.asyncIterator] = function () { return this; }, i;\n function awaitReturn(f) { return function (v) { return Promise.resolve(v).then(f, reject); }; }\n function verb(n, f) { if (g[n]) { i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; if (f) i[n] = f(i[n]); } }\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\n function fulfill(value) { resume(\"next\", value); }\n function reject(value) { resume(\"throw\", value); }\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\n}\n\nexport function __asyncDelegator(o) {\n var i, p;\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: false } : f ? f(v) : v; } : f; }\n}\n\nexport function __asyncValues(o) {\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\n var m = o[Symbol.asyncIterator], i;\n return m ? m.call(o) : (o = typeof __values === \"function\" ? __values(o) : o[Symbol.iterator](), i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i);\n function verb(n) { i[n] = o[n] && function (v) { return new Promise(function (resolve, reject) { v = o[n](v), settle(resolve, reject, v.done, v.value); }); }; }\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\n}\n\nexport function __makeTemplateObject(cooked, raw) {\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\n return cooked;\n};\n\nvar __setModuleDefault = Object.create ? (function(o, v) {\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\n}) : function(o, v) {\n o[\"default\"] = v;\n};\n\nvar ownKeys = function(o) {\n ownKeys = Object.getOwnPropertyNames || function (o) {\n var ar = [];\n for (var k in o) if (Object.prototype.hasOwnProperty.call(o, k)) ar[ar.length] = k;\n return ar;\n };\n return ownKeys(o);\n};\n\nexport function __importStar(mod) {\n if (mod && mod.__esModule) return mod;\n var result = {};\n if (mod != null) for (var k = ownKeys(mod), i = 0; i < k.length; i++) if (k[i] !== \"default\") __createBinding(result, mod, k[i]);\n __setModuleDefault(result, mod);\n return result;\n}\n\nexport function __importDefault(mod) {\n return (mod && mod.__esModule) ? mod : { default: mod };\n}\n\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n}\n\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot write private member to an object whose class did not declare it\");\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\n}\n\nexport function __classPrivateFieldIn(state, receiver) {\n if (receiver === null || (typeof receiver !== \"object\" && typeof receiver !== \"function\")) throw new TypeError(\"Cannot use 'in' operator on non-object\");\n return typeof state === \"function\" ? receiver === state : state.has(receiver);\n}\n\nexport function __addDisposableResource(env, value, async) {\n if (value !== null && value !== void 0) {\n if (typeof value !== \"object\" && typeof value !== \"function\") throw new TypeError(\"Object expected.\");\n var dispose, inner;\n if (async) {\n if (!Symbol.asyncDispose) throw new TypeError(\"Symbol.asyncDispose is not defined.\");\n dispose = value[Symbol.asyncDispose];\n }\n if (dispose === void 0) {\n if (!Symbol.dispose) throw new TypeError(\"Symbol.dispose is not defined.\");\n dispose = value[Symbol.dispose];\n if (async) inner = dispose;\n }\n if (typeof dispose !== \"function\") throw new TypeError(\"Object not disposable.\");\n if (inner) dispose = function() { try { inner.call(this); } catch (e) { return Promise.reject(e); } };\n env.stack.push({ value: value, dispose: dispose, async: async });\n }\n else if (async) {\n env.stack.push({ async: true });\n }\n return value;\n}\n\nvar _SuppressedError = typeof SuppressedError === \"function\" ? SuppressedError : function (error, suppressed, message) {\n var e = new Error(message);\n return e.name = \"SuppressedError\", e.error = error, e.suppressed = suppressed, e;\n};\n\nexport function __disposeResources(env) {\n function fail(e) {\n env.error = env.hasError ? new _SuppressedError(e, env.error, \"An error was suppressed during disposal.\") : e;\n env.hasError = true;\n }\n var r, s = 0;\n function next() {\n while (r = env.stack.pop()) {\n try {\n if (!r.async && s === 1) return s = 0, env.stack.push(r), Promise.resolve().then(next);\n if (r.dispose) {\n var result = r.dispose.call(r.value);\n if (r.async) return s |= 2, Promise.resolve(result).then(next, function(e) { fail(e); return next(); });\n }\n else s |= 1;\n }\n catch (e) {\n fail(e);\n }\n }\n if (s === 1) return env.hasError ? Promise.reject(env.error) : Promise.resolve();\n if (env.hasError) throw env.error;\n }\n return next();\n}\n\nexport function __rewriteRelativeImportExtension(path, preserveJsx) {\n if (typeof path === \"string\" && /^\\.\\.?\\//.test(path)) {\n return path.replace(/\\.(tsx)$|((?:\\.d)?)((?:\\.[^./]+?)?)\\.([cm]?)ts$/i, function (m, tsx, d, ext, cm) {\n return tsx ? preserveJsx ? \".jsx\" : \".js\" : d && (!ext || !cm) ? m : (d + ext + \".\" + cm.toLowerCase() + \"js\");\n });\n }\n return path;\n}\n\nexport default {\n __extends,\n __assign,\n __rest,\n __decorate,\n __param,\n __esDecorate,\n __runInitializers,\n __propKey,\n __setFunctionName,\n __metadata,\n __awaiter,\n __generator,\n __createBinding,\n __exportStar,\n __values,\n __read,\n __spread,\n __spreadArrays,\n __spreadArray,\n __await,\n __asyncGenerator,\n __asyncDelegator,\n __asyncValues,\n __makeTemplateObject,\n __importStar,\n __importDefault,\n __classPrivateFieldGet,\n __classPrivateFieldSet,\n __classPrivateFieldIn,\n __addDisposableResource,\n __disposeResources,\n __rewriteRelativeImportExtension,\n};\n","/**\n * @license React\n * use-sync-external-store-shim.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nfunction useSyncExternalStore$2(subscribe, getSnapshot) {\n var value = getSnapshot(),\n _useState = useState({ inst: { value: value, getSnapshot: getSnapshot } }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n}\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n}\nfunction useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n}\nvar shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\nexports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n function useSyncExternalStore$2(subscribe, getSnapshot) {\n didWarnOld18Alpha ||\n void 0 === React.startTransition ||\n ((didWarnOld18Alpha = !0),\n console.error(\n \"You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release.\"\n ));\n var value = getSnapshot();\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n objectIs(value, cachedValue) ||\n (console.error(\n \"The result of getSnapshot should be cached to avoid an infinite loop\"\n ),\n (didWarnUncachedGetSnapshot = !0));\n }\n cachedValue = useState({\n inst: { value: value, getSnapshot: getSnapshot }\n });\n var inst = cachedValue[0].inst,\n forceUpdate = cachedValue[1];\n useLayoutEffect(\n function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot;\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n },\n [subscribe, value, getSnapshot]\n );\n useEffect(\n function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n return subscribe(function () {\n checkIfSnapshotChanged(inst) && forceUpdate({ inst: inst });\n });\n },\n [subscribe]\n );\n useDebugValue(value);\n return value;\n }\n function checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n inst = inst.value;\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(inst, nextValue);\n } catch (error) {\n return !0;\n }\n }\n function useSyncExternalStore$1(subscribe, getSnapshot) {\n return getSnapshot();\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue,\n didWarnOld18Alpha = !1,\n didWarnUncachedGetSnapshot = !1,\n shim =\n \"undefined\" === typeof window ||\n \"undefined\" === typeof window.document ||\n \"undefined\" === typeof window.document.createElement\n ? useSyncExternalStore$1\n : useSyncExternalStore$2;\n exports.useSyncExternalStore =\n void 0 !== React.useSyncExternalStore ? React.useSyncExternalStore : shim;\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim.development.js');\n}\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.production.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\nvar React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\");\nfunction is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n}\nvar objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\nexports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot)) return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Meta Platforms, Inc. and affiliates.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\n\n\"use strict\";\n\"production\" !== process.env.NODE_ENV &&\n (function () {\n function is(x, y) {\n return (x === y && (0 !== x || 1 / x === 1 / y)) || (x !== x && y !== y);\n }\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());\n var React = require(\"react\"),\n shim = require(\"use-sync-external-store/shim\"),\n objectIs = \"function\" === typeof Object.is ? Object.is : is,\n useSyncExternalStore = shim.useSyncExternalStore,\n useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue;\n exports.useSyncExternalStoreWithSelector = function (\n subscribe,\n getSnapshot,\n getServerSnapshot,\n selector,\n isEqual\n ) {\n var instRef = useRef(null);\n if (null === instRef.current) {\n var inst = { hasValue: !1, value: null };\n instRef.current = inst;\n } else inst = instRef.current;\n instRef = useMemo(\n function () {\n function memoizedSelector(nextSnapshot) {\n if (!hasMemo) {\n hasMemo = !0;\n memoizedSnapshot = nextSnapshot;\n nextSnapshot = selector(nextSnapshot);\n if (void 0 !== isEqual && inst.hasValue) {\n var currentSelection = inst.value;\n if (isEqual(currentSelection, nextSnapshot))\n return (memoizedSelection = currentSelection);\n }\n return (memoizedSelection = nextSnapshot);\n }\n currentSelection = memoizedSelection;\n if (objectIs(memoizedSnapshot, nextSnapshot))\n return currentSelection;\n var nextSelection = selector(nextSnapshot);\n if (void 0 !== isEqual && isEqual(currentSelection, nextSelection))\n return (memoizedSnapshot = nextSnapshot), currentSelection;\n memoizedSnapshot = nextSnapshot;\n return (memoizedSelection = nextSelection);\n }\n var hasMemo = !1,\n memoizedSnapshot,\n memoizedSelection,\n maybeGetServerSnapshot =\n void 0 === getServerSnapshot ? null : getServerSnapshot;\n return [\n function () {\n return memoizedSelector(getSnapshot());\n },\n null === maybeGetServerSnapshot\n ? void 0\n : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n }\n ];\n },\n [getSnapshot, getServerSnapshot, selector, isEqual]\n );\n var value = useSyncExternalStore(subscribe, instRef[0], instRef[1]);\n useEffect(\n function () {\n inst.hasValue = !0;\n inst.value = value;\n },\n [value]\n );\n useDebugValue(value);\n return value;\n };\n \"undefined\" !== typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ &&\n \"function\" ===\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop &&\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());\n })();\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.js');\n} else {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.development.js');\n}\n"],"names":["__assign","Object","assign","t","s","i","n","arguments","length","p","prototype","hasOwnProperty","call","apply","this","__spreadArray","to","from","pack","ar","l","Array","slice","concat","SuppressedError","objectIs","is","x","y","useState","React","useEffect","useLayoutEffect","useDebugValue","checkIfSnapshotChanged","inst","latestGetSnapshot","getSnapshot","value","nextValue","error","shim","window","document","createElement","subscribe","_useState","forceUpdate","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","require$$0","didWarnOld18Alpha","didWarnUncachedGetSnapshot","startTransition","console","cachedValue","exports","registerInternalModuleStop","module","require$$1","useRef","useMemo","getServerSnapshot","selector","isEqual","instRef","current","hasValue","memoizedSelector","nextSnapshot","hasMemo","memoizedSnapshot","currentSelection","memoizedSelection","nextSelection","maybeGetServerSnapshot","useSyncExternalStoreWithSelector","e","indexOf","getOwnPropertySymbols","propertyIsEnumerable"],"mappings":"6NA+BWA,EAAW,WAQpB,OAPAA,EAAWC,OAAOC,QAAU,SAAkBC,GAC1C,IAAK,IAAIC,EAAGC,EAAI,EAAGC,EAAIC,UAAUC,OAAQH,EAAIC,EAAGD,IAE5C,IAAK,IAAII,KADTL,EAAIG,UAAUF,GACOJ,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,KAAIN,EAAEM,GAAKL,EAAEK,IAE9E,OAAON,CACV,EACMH,EAASa,MAAMC,KAAMP,UAC9B,EA6KO,SAASQ,EAAcC,EAAIC,EAAMC,GACtC,GAAIA,GAA6B,IAArBX,UAAUC,OAAc,IAAK,IAA4BW,EAAxBd,EAAI,EAAGe,EAAIH,EAAKT,OAAYH,EAAIe,EAAGf,KACxEc,GAAQd,KAAKY,IACRE,IAAIA,EAAKE,MAAMX,UAAUY,MAAMV,KAAKK,EAAM,EAAGZ,IAClDc,EAAGd,GAAKY,EAAKZ,IAGrB,OAAOW,EAAGO,OAAOJ,GAAME,MAAMX,UAAUY,MAAMV,KAAKK,GACpD,kEA0GkD,mBAApBO,iBAAiCA,gBCxT/D,IAAIC,EAAW,mBAAsBxB,OAAOyB,GAAKzB,OAAOyB,GAHxD,SAAYC,EAAGC,GACb,OAAQD,IAAMC,IAAM,IAAMD,GAAK,EAAIA,GAAM,EAAIC,IAAQD,GAAMA,GAAKC,GAAMA,CACxE,EAEEC,EAAWC,EAAK,QAACD,SACjBE,EAAYD,EAAK,QAACC,UAClBC,EAAkBF,EAAK,QAACE,gBACxBC,EAAgBH,EAAK,QAACG,cA0BxB,SAASC,EAAuBC,GAC9B,IAAIC,EAAoBD,EAAKE,YAC7BF,EAAOA,EAAKG,MACZ,IACE,IAAIC,EAAYH,IAChB,OAAQX,EAASU,EAAMI,EACxB,CAAC,MAAOC,GACP,OAAO,CACR,CACH,CA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A,EAAQ,IAShE,OARAvC,GACE,WACEI,EAAKqC,UAAW,EAChBrC,EAAKG,MAAQA,CACd,GACD,CAACA,IAEHL,EAAcK,GACPA,CACb,EACI,oBAAuBc,gCACrB,mBACSA,+BAA+BU,4BACxCV,+BAA+BU,2BAA2BR,QAC7D,CApFD,+BCV2B,eAAzBL,QAAQC,IAAIC,SACdY,EAAAF,QAAiBN,EAEjBQ,EAAAF,QAAiBG,2mBNqCZ,SAAgB5D,EAAG8E,GACxB,IAAI/E,EAAI,CAAA,EACR,IAAK,IAAIM,KAAKL,EAAOH,OAAOS,UAAUC,eAAeC,KAAKR,EAAGK,IAAMyE,EAAEC,QAAQ1E,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOmF,sBACtB,KAAI/E,EAAI,EAAb,IAAgBI,EAAIR,OAAOmF,sBAAsBhF,GAAIC,EAAII,EAAED,OAAQH,IAC3D6E,EAAEC,QAAQ1E,EAAEJ,IAAM,GAAKJ,OAAOS,UAAU2E,qBAAqBzE,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACT"}
package/package.json CHANGED
@@ -1,12 +1,15 @@
1
1
  {
2
2
  "name": "state-decorator",
3
- "version": "7.6.0",
3
+ "version": "7.7.0-beta.1",
4
4
  "description": "React state management library",
5
5
  "main": "index.js",
6
6
  "module": "es/index.js",
7
7
  "types": "index.d.ts",
8
8
  "private": false,
9
- "repository": "git@github.com:GlobalSport/state-decorator.git",
9
+ "repository": {
10
+ "type": "git",
11
+ "url": "git+ssh://git@github.com/GlobalSport/state-decorator.git"
12
+ },
10
13
  "author": "Damien Garbarino <d.garbarino@mycoachsport.com>",
11
14
  "license": "MIT",
12
15
  "sideEffects": false,
package/v5.js CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("./index"),r=require("react"),t=function(){return t=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,function(e){e.REJECT="reject",e.IGNORE="ignore",e.KEEP_LAST="keepLast",e.KEEP_ALL="keepAll",e.PARALLEL="parallel",e.REUSE="reuse",e.ABORT="abort"}(e||(e={}));var o=function e(n,r){if(n===r)return!0;if(n&&r&&"object"==typeof n&&"object"==typeof r){if(n.constructor!==r.constructor)return!1;var t,o,s;if(Array.isArray(n)){if((t=n.length)!=r.length)return!1;for(o=t;0!=o--;)if(!e(n[o],r[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===r.source&&n.flags===r.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===r.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===r.toString();if((t=(s=Object.keys(n)).length)!==Object.keys(r).length)return!1;for(o=t;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=t;0!=o--;){var i=s[o];if(!e(n[i],r[i]))return!1}return!0}return n!=n&&r!=r},s=null;function i(e){return!(e instanceof Function)&&e.hasOwnProperty("promiseGet")}function u(e){return e instanceof Function}function c(e){return!(e instanceof Function||e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))}function a(n){return Object.keys(n).reduce((function(r,t){var o=n[t];if(u(o))r[t]=function(e){return o(e.s,e.args,e.p)};else if(c(o)){var s={effects:function(e){return o.action(e.s,e.args,e.p)}};o.onActionDone&&(s.sideEffects=function(e){var n=e.s,r=e.p,t=e.args,s=e.a,i=e.notifyWarning;o.onActionDone(n,t,r,s,i)}),r[t]=s}else if(function(e){return!(e instanceof Function)&&e.hasOwnProperty("promise")}(o)||i(o)){var a;a=i(o)?{getPromise:function(e){var n=e.s,r=e.p,t=e.a,s=e.args,i=e.abortSignal;return o.promiseGet(s,n,r,t,i)},retryCount:3,conflictPolicy:e.REUSE}:{getPromise:function(e){var n=e.s,r=e.p,t=e.a,s=e.args,i=e.abortSignal;return o.promise(s,n,r,t,i)}},["abortable","conflictPolicy","getPromiseId","isTriggerRetryError","rejectPromiseOnError","retryCount","debounceTimeout","debounceSideEffectsTimeout","retryDelaySeed"].forEach((function(e){null!=o[e]&&(a[e]=o[e])})),o.successMessage&&(a.getSuccessMessage=function(){return o.successMessage}),o.errorMessage&&(a.getSuccessMessage=function(){return o.errorMessage}),o.getSuccessMessage&&(a.getSuccessMessage=function(e){var n=e.res,r=e.args,t=e.p;return o.getSuccessMessage(n,r,t)}),o.getErrorMessage&&(a.getErrorMessage=function(e){var n=e.err,r=e.args,t=e.p;return o.getErrorMessage(n,r,t)}),o.preReducer&&(a.preEffects=function(e){var n=e.s,r=e.p,t=e.args;return o.preReducer(n,t,r)}),o.optimisticReducer&&(a.optimisticEffects=function(e){var n=e.s,r=e.p,t=e.args;return o.optimisticReducer(n,t,r)}),o.reducer&&(a.effects=function(e){var n=e.s,r=e.res,t=e.p,s=e.args;return o.reducer(n,r,s,t)}),o.errorReducer&&(a.errorEffects=function(e){var n=e.s,r=e.err,t=e.p,s=e.args;return o.errorReducer(n,r,s,t)}),o.onDone&&(a.sideEffects=function(e){var n=e.s,r=e.res,t=e.p,s=e.args,i=e.a,u=e.notifyWarning;return o.onDone(n,r,s,t,i,u)}),o.onFail&&(a.errorSideEffects=function(e){var n=e.s,r=e.err,t=e.p,s=e.args,i=e.a,u=e.notifyWarning;return o.onFail(n,r,s,t,i,u)}),r[t]=a}return r}),{})}"development"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV||(s=function(e){return void 0===e&&(e=console),function(){var n="",r=e,t=function(e,n){var r;if(n!==e){var t=null!=e?typeof e:typeof n;if("number"===t||"string"===t||"boolean"===t)r="".concat(e," => ").concat(""===n?'""':n);else if(e&&e.length||n&&n.length)if(null==e)r="was ".concat(e,", now contains ").concat(n.length," element(s)");else if(null==n)r="contained ".concat(e.length," element(s), now is ").concat(n);else if(0===e.length)r="was empty, now contains ".concat(n.length," elements");else if(0===n.length)r="contained ".concat(e.length," elements, now is empty");else{var s=n.filter((function(n){return!e.find((function(e){return o(n,e)}))})),i=e.filter((function(e){return!n.find((function(n){return o(e,n)}))}));s.length>10&&(s="".concat(s.length," element(s) added")),i.length>10&&(i="".concat(i.length," element(s) removed")),r={added:s,removed:i}}else r=n}return r},s=function(e){return"string"==typeof e?'"'.concat(e,'"'):e};return{init:function(t){var o,i;n=(null===(o=t.options)||void 0===o?void 0:o.name)?"[".concat(null===(i=t.options)||void 0===i?void 0:i.name,"]"):"";var u=t.state;e.group(n,"initialState"),Object.keys(u).forEach((function(e){r.log(e,":",s(u[e]))})),e.groupEnd()},destroy:null,effects:function(e,o,i,u){var c,a=null===(c=e.context)||void 0===c?void 0:c.args,f=[n,e.name.toString()];if(e.isAsync&&("preEffects"===e.type?f.push(u?"START":"CANCELLED"):"effects"===e.type?f.push("DONE"):f.push("FAILED")),null!=i||a&&0!==Object.keys(a).length?r.group.apply(r,f):r.log.apply(r,f),a&&Object.keys(a).length>0&&(r.group("Arguments"),a.forEach((function(e){r.log(e,":",s(e))})),r.groupEnd()),null!=i){if(r.groupCollapsed("Before"),null==o)r.log("was null");else Object.keys(o).forEach((function(e){r.log(e,":",s(o[e]))}));if(r.groupEnd(),r.groupCollapsed("After"),null==i)r.log("was null");else Object.keys(i).forEach((function(e){r.log(e,":",s(i[e]))}));if(r.groupEnd(),null!=i){r.group("Diff");var l=function(e,n){var r={};return e&&Object.keys(e).forEach((function(o){if(n.hasOwnProperty(o)){var s=e[o],i=n[o],u=t(s,i);u&&(r[o]=u)}else r[o]="was deleted"})),Object.keys(n).forEach((function(o){if(null==e||!e.hasOwnProperty(o)){var s=n[o];r[o]=t(void 0,s)}})),r}(o,i);Object.keys(l).forEach((function(e){return r.log(e,":",l[e])})),r.groupEnd()}}return r.groupEnd(),null}}}}),exports.default=function(e,o,i,u,c){void 0===u&&(u={});var f,l,p,g,d=r.useReducer((function(e){return e>100?0:e+1}),0)[1],v=r.useRef(),y=r.useRef();null==v.current&&(v.current=a(o)),null==y.current&&(y.current=(f=u,l={},p=Object.keys(f),g=["onPropsChange","onPropsChangeReducer","getPropsRefValues","onMount","initialActionsMarkedLoading"],p.forEach((function(e){g.includes(e)||(l[e]=f[e])})),f.onMount&&(l.onMount=function(e){var n=e.s,r=e.p,t=e.a;return f.onMount(t,r,n)}),f.getPropsRefValues&&(l.onPropsChange={getDeps:f.getPropsRefValues,effects:function(e){var n=e.s,r=e.p,t=e.indices;return f.onPropsChangeReducer?f.onPropsChangeReducer(n,r,t):null},sideEffects:function(e){var n=e.s,r=e.p,t=e.a,o=e.indices;return null==f.onPropsChange?null:f.onPropsChange(n,r,t,o)}}),f.initialActionsMarkedLoading&&(l.initialActionsMarkedLoading=f.initialActionsMarkedLoading),l));var E=r.useRef();if(null==E.current){var h=c;u.logEnabled&&h.push(s()),E.current=n.createStore(t(t({getInitialState:e,actions:v.current},y.current),{middlewares:h}))}E.current.setProps(i),r.useLayoutEffect((function(){return E.current.addStateListener((function(){d()}))}),[]);var O=E.current;return{state:O.state,actions:O.actions,loading:O.loading,loadingMap:O.loadingMap,loadingParallelMap:O.loadingParallelMap,abortAction:O.abortAction}},exports.isAdvancedSyncAction=c,exports.isAsyncAction=function(e){return!(e instanceof Function)&&(e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))},exports.isAsyncPromiseGetAction=function(e){return!(e instanceof Function||e.hasOwnProperty("promise")&&e.hasOwnProperty("promiseGet"))},exports.isSyncAction=u,exports.useOnMount=function(e){r.useEffect((function(){var n=e();return"function"==typeof n?n:void 0}),[e])},exports.useOnUnload=function(e){r.useEffect((function(){return document.addEventListener("beforeunload",e),function(){document.removeEventListener("beforeunload",e)}}),[e])},exports.useOnUnmount=function(e,n){void 0===n&&(n=[]),r.useEffect((function(){return e}),[n,e])};
1
+ "use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e,n=require("./index"),r=require("react"),t=function(){return t=Object.assign||function(e){for(var n,r=1,t=arguments.length;r<t;r++)for(var o in n=arguments[r])Object.prototype.hasOwnProperty.call(n,o)&&(e[o]=n[o]);return e},t.apply(this,arguments)};"function"==typeof SuppressedError&&SuppressedError,function(e){e.REJECT="reject",e.IGNORE="ignore",e.KEEP_LAST="keepLast",e.KEEP_ALL="keepAll",e.PARALLEL="parallel",e.REUSE="reuse",e.ABORT="abort"}(e||(e={}));var o=function e(n,r){if(n===r)return!0;if(n&&r&&"object"==typeof n&&"object"==typeof r){if(n.constructor!==r.constructor)return!1;var t,o,s;if(Array.isArray(n)){if((t=n.length)!=r.length)return!1;for(o=t;0!=o--;)if(!e(n[o],r[o]))return!1;return!0}if(n.constructor===RegExp)return n.source===r.source&&n.flags===r.flags;if(n.valueOf!==Object.prototype.valueOf)return n.valueOf()===r.valueOf();if(n.toString!==Object.prototype.toString)return n.toString()===r.toString();if((t=(s=Object.keys(n)).length)!==Object.keys(r).length)return!1;for(o=t;0!=o--;)if(!Object.prototype.hasOwnProperty.call(r,s[o]))return!1;for(o=t;0!=o--;){var u=s[o];if(!e(n[u],r[u]))return!1}return!0}return n!=n&&r!=r},s=null;function u(e){return!(e instanceof Function)&&e.hasOwnProperty("promiseGet")}function i(e){return e instanceof Function}function c(e){return!(e instanceof Function||e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))}function a(n){return Object.keys(n).reduce((function(r,t){var o=n[t];if(i(o))r[t]=function(e){return o(e.s,e.args,e.p)};else if(c(o)){var s={effects:function(e){return o.action(e.s,e.args,e.p)}};o.onActionDone&&(s.sideEffects=function(e){var n=e.s,r=e.p,t=e.args,s=e.a,u=e.notifyWarning;o.onActionDone(n,t,r,s,u)}),r[t]=s}else if(function(e){return!(e instanceof Function)&&e.hasOwnProperty("promise")}(o)||u(o)){var a;a=u(o)?{getPromise:function(e){var n=e.s,r=e.p,t=e.a,s=e.args,u=e.abortSignal;return o.promiseGet(s,n,r,t,u)},retryCount:3,conflictPolicy:e.REUSE}:{getPromise:function(e){var n=e.s,r=e.p,t=e.a,s=e.args,u=e.abortSignal;return o.promise(s,n,r,t,u)}},["abortable","conflictPolicy","getPromiseId","isTriggerRetryError","rejectPromiseOnError","retryCount","debounceTimeout","debounceSideEffectsTimeout","retryDelaySeed"].forEach((function(e){null!=o[e]&&(a[e]=o[e])})),o.successMessage&&(a.getSuccessMessage=function(){return o.successMessage}),o.errorMessage&&(a.getSuccessMessage=function(){return o.errorMessage}),o.getSuccessMessage&&(a.getSuccessMessage=function(e){var n=e.res,r=e.args,t=e.p;return o.getSuccessMessage(n,r,t)}),o.getErrorMessage&&(a.getErrorMessage=function(e){var n=e.err,r=e.args,t=e.p;return o.getErrorMessage(n,r,t)}),o.preReducer&&(a.preEffects=function(e){var n=e.s,r=e.p,t=e.args;return o.preReducer(n,t,r)}),o.optimisticReducer&&(a.optimisticEffects=function(e){var n=e.s,r=e.p,t=e.args;return o.optimisticReducer(n,t,r)}),o.reducer&&(a.effects=function(e){var n=e.s,r=e.res,t=e.p,s=e.args;return o.reducer(n,r,s,t)}),o.errorReducer&&(a.errorEffects=function(e){var n=e.s,r=e.err,t=e.p,s=e.args;return o.errorReducer(n,r,s,t)}),o.onDone&&(a.sideEffects=function(e){var n=e.s,r=e.res,t=e.p,s=e.args,u=e.a,i=e.notifyWarning;return o.onDone(n,r,s,t,u,i)}),o.onFail&&(a.errorSideEffects=function(e){var n=e.s,r=e.err,t=e.p,s=e.args,u=e.a,i=e.notifyWarning;return o.onFail(n,r,s,t,u,i)}),r[t]=a}return r}),{})}"development"!==process.env.NODE_ENV&&"test"!==process.env.NODE_ENV||(s=function(e){return void 0===e&&(e=console),function(){var n="",r=e,t=function(e,n){var r;if(n!==e){var t=null!=e?typeof e:typeof n;if("number"===t||"string"===t||"boolean"===t)r="".concat(e," => ").concat(""===n?'""':n);else if(e&&e.length||n&&n.length)if(null==e)r="was ".concat(e,", now contains ").concat(n.length," element(s)");else if(null==n)r="contained ".concat(e.length," element(s), now is ").concat(n);else if(0===e.length)r="was empty, now contains ".concat(n.length," elements");else if(0===n.length)r="contained ".concat(e.length," elements, now is empty");else{var s=n.filter((function(n){return!e.find((function(e){return o(n,e)}))})),u=e.filter((function(e){return!n.find((function(n){return o(e,n)}))}));s.length>10&&(s="".concat(s.length," element(s) added")),u.length>10&&(u="".concat(u.length," element(s) removed")),r={added:s,removed:u}}else r=n}return r},s=function(e){return"string"==typeof e?'"'.concat(e,'"'):e};return{init:function(t){var o,u;n=(null===(o=t.options)||void 0===o?void 0:o.name)?"[".concat(null===(u=t.options)||void 0===u?void 0:u.name,"]"):"";var i=t.state;e.group(n,"initialState"),Object.keys(i).forEach((function(e){r.log(e,":",s(i[e]))})),e.groupEnd()},destroy:null,effects:function(e,o,u,i){var c,a=null===(c=e.context)||void 0===c?void 0:c.args,f=[n,e.name.toString()];if(e.isAsync&&("preEffects"===e.type?f.push(i?"START":"CANCELLED"):"effects"===e.type?f.push("DONE"):f.push("FAILED")),null!=u||a&&0!==Object.keys(a).length?r.group.apply(r,f):r.log.apply(r,f),a&&Object.keys(a).length>0&&(r.group("Arguments"),a.forEach((function(e){r.log(e,":",s(e))})),r.groupEnd()),null!=u){if(r.groupCollapsed("Before"),null==o)r.log("was null");else Object.keys(o).forEach((function(e){r.log(e,":",s(o[e]))}));if(r.groupEnd(),r.groupCollapsed("After"),null==u)r.log("was null");else Object.keys(u).forEach((function(e){r.log(e,":",s(u[e]))}));if(r.groupEnd(),null!=u){r.group("Diff");var l=function(e,n){var r={};return e&&Object.keys(e).forEach((function(o){if(n.hasOwnProperty(o)){var s=e[o],u=n[o],i=t(s,u);i&&(r[o]=i)}else r[o]="was deleted"})),Object.keys(n).forEach((function(o){if(null==e||!e.hasOwnProperty(o)){var s=n[o];r[o]=t(void 0,s)}})),r}(o,u);Object.keys(l).forEach((function(e){return r.log(e,":",l[e])})),r.groupEnd()}}return r.groupEnd(),null}}}}),exports.default=function(e,o,u,i,c){void 0===i&&(i={});var f,l,p,g,d=r.useReducer((function(e){return e>100?0:e+1}),0)[1],v=r.useRef(),y=r.useRef();null==v.current&&(v.current=a(o)),null==y.current&&(y.current=(f=i,l={},p=Object.keys(f),g=["onPropsChange","onPropsChangeReducer","getPropsRefValues","onMount","initialActionsMarkedLoading"],p.forEach((function(e){g.includes(e)||(l[e]=f[e])})),f.onMount&&(l.onMount=function(e){var n=e.s,r=e.p,t=e.a;return f.onMount(t,r,n)}),f.getPropsRefValues&&(l.onPropsChange={getDeps:f.getPropsRefValues,effects:function(e){var n=e.s,r=e.p,t=e.indices;return f.onPropsChangeReducer?f.onPropsChangeReducer(n,r,t):null},sideEffects:function(e){var n=e.s,r=e.p,t=e.a,o=e.indices;return null==f.onPropsChange?null:f.onPropsChange(n,r,t,o)}}),f.initialActionsMarkedLoading&&(l.initialActionsMarkedLoading=f.initialActionsMarkedLoading),l));var E=r.useRef();if(null==E.current){var h=c;i.logEnabled&&h.push(s()),E.current=n.createStore(t(t({getInitialState:e,actions:v.current},y.current),{middlewares:h}))}E.current.setProps(u),r.useLayoutEffect((function(){E.current.init(u),E.current.runMountEffects()}),[]),r.useLayoutEffect((function(){return E.current.addStateListener((function(){d()}))}),[]);var O=E.current;return{state:O.state,actions:O.actions,loading:O.loading,loadingMap:O.loadingMap,loadingParallelMap:O.loadingParallelMap,abortAction:O.abortAction}},exports.isAdvancedSyncAction=c,exports.isAsyncAction=function(e){return!(e instanceof Function)&&(e.hasOwnProperty("promise")||e.hasOwnProperty("promiseGet"))},exports.isAsyncPromiseGetAction=function(e){return!(e instanceof Function||e.hasOwnProperty("promise")&&e.hasOwnProperty("promiseGet"))},exports.isSyncAction=i,exports.useOnMount=function(e){r.useEffect((function(){var n=e();return"function"==typeof n?n:void 0}),[e])},exports.useOnUnload=function(e){r.useEffect((function(){return document.addEventListener("beforeunload",e),function(){document.removeEventListener("beforeunload",e)}}),[e])},exports.useOnUnmount=function(e,n){void 0===n&&(n=[]),r.useEffect((function(){return e}),[n,e])};
2
2
  //# sourceMappingURL=v5.js.map