state-decorator 7.0.0-rc6 → 7.0.0-rc8
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/README.md +3 -70
- package/es/helpers.d.ts +10 -9
- package/es/helpers.js +1 -1
- package/es/index.d.ts +9 -13
- package/es/index.js +1 -1
- package/es/index.js.map +1 -1
- package/helpers.d.ts +10 -9
- package/helpers.js +1 -1
- package/index.d.ts +9 -13
- package/index.js +1 -1
- package/index.js.map +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -153,7 +153,7 @@ export function App(props: Props) => {
|
|
|
153
153
|
| Hook | Purpose | Returns | Is component refreshed on store change? | Is store destroyed on unmount? |
|
|
154
154
|
| -------------------- | --------------------------------------------------- | ------- | --------------------------------------- | ------------------------------ |
|
|
155
155
|
| useLocalStore | Create a store and binds it to the react component. | Store | if **refreshOnUpdate** is set | Y |
|
|
156
|
-
| useStore | Binds a store instance to the react component. | Store |
|
|
156
|
+
| useStore | Binds a store instance to the react component. | Store | yes | N |
|
|
157
157
|
| useStoreSlice | Get a slice of a store. | Slice | If slice has changed only | N |
|
|
158
158
|
| useStoreContextSlice | Get a slice of a store stored in a context | Slice | If slice has changed only | N |
|
|
159
159
|
|
|
@@ -695,75 +695,6 @@ const config: StoreConfig<State, Actions, Props> = {
|
|
|
695
695
|
};
|
|
696
696
|
```
|
|
697
697
|
|
|
698
|
-
## State sharing and slices
|
|
699
|
-
|
|
700
|
-
- Declare a store and bind it to a component using _useStore_ or _useBindStore_ hooks.
|
|
701
|
-
- Deeper in the tree component, use _useStoreSlice_ to get a store slice.
|
|
702
|
-
- Component using slices will be refreshed only if their store slice changes.
|
|
703
|
-
|
|
704
|
-
```typescript
|
|
705
|
-
import React from 'react';
|
|
706
|
-
import { useStore, useStoreSlice, StoreActions } from 'state-decorator';
|
|
707
|
-
|
|
708
|
-
// Declare typings & actions as above
|
|
709
|
-
|
|
710
|
-
// Create a store
|
|
711
|
-
|
|
712
|
-
export const store = createStore(config);
|
|
713
|
-
|
|
714
|
-
// Bind to react component
|
|
715
|
-
|
|
716
|
-
export function Container(prop: Props) {
|
|
717
|
-
const { state, actions } = useStore(store, props);
|
|
718
|
-
|
|
719
|
-
// or
|
|
720
|
-
// useBindStore(store, props);
|
|
721
|
-
// if you are not interested in getting the state here
|
|
722
|
-
|
|
723
|
-
return <div />;
|
|
724
|
-
}
|
|
725
|
-
|
|
726
|
-
// Components deeper in the component tree will be refreshed if, and only if,
|
|
727
|
-
// slice is changed (here: text property)
|
|
728
|
-
|
|
729
|
-
export function SubComponent2() {
|
|
730
|
-
const s = useStoreSlice(store, ['text']);
|
|
731
|
-
return <div>{s.text}</div>;
|
|
732
|
-
}
|
|
733
|
-
|
|
734
|
-
export function SubComponent() {
|
|
735
|
-
const s = useStoreSlice(store, (s) => ({ text: s.text }));
|
|
736
|
-
return <div>{s.text}</div>;
|
|
737
|
-
}
|
|
738
|
-
```
|
|
739
|
-
|
|
740
|
-
[](https://codesandbox.io/s/local-state-slices-v7-ehmj6f?file=/src/SliceView.tsx)
|
|
741
|
-
|
|
742
|
-
# Update store when props change
|
|
743
|
-
|
|
744
|
-
## Getting started
|
|
745
|
-
|
|
746
|
-
```typescript
|
|
747
|
-
import { createStore } from 'state-decorator';
|
|
748
|
-
|
|
749
|
-
const config: StoreConfig<State, Actions, Props> = {
|
|
750
|
-
getInitialState,
|
|
751
|
-
actions,
|
|
752
|
-
onPropsChange: {
|
|
753
|
-
// list of depedencies that should trigger effects & side effects if changed
|
|
754
|
-
getDeps: (p) => [p.id],
|
|
755
|
-
// state changes, indices contains the indices of dependencies that have changed
|
|
756
|
-
effects: ({ props, indices, isInit }) => ({ selectedId: props.id }),
|
|
757
|
-
// other changes (use short aliases)
|
|
758
|
-
sideEffects: ({ p, a, indices, isInit }) => {
|
|
759
|
-
a.loadItem(p.id);
|
|
760
|
-
},
|
|
761
|
-
// whether apply effects & side effects on mount
|
|
762
|
-
onMount: true,
|
|
763
|
-
},
|
|
764
|
-
};
|
|
765
|
-
```
|
|
766
|
-
|
|
767
698
|
## Multiple props change configuration
|
|
768
699
|
|
|
769
700
|
The store can manage several props change configurations to have a better granularity.
|
|
@@ -999,6 +930,8 @@ function Subtitle(props: { subtitle: string }) {
|
|
|
999
930
|
|
|
1000
931
|
## Local Store
|
|
1001
932
|
|
|
933
|
+
**IMPORTANT**: the context children _MUST_ be with no prop and memoized to prevent refreshes (React can display warning on the console)
|
|
934
|
+
|
|
1002
935
|
```typescript
|
|
1003
936
|
// ------- stores/MyStore.ts --------
|
|
1004
937
|
|
package/es/helpers.d.ts
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Effect function that sets the first action argument to the specified prop.
|
|
3
|
+
* if dirtyProp is set
|
|
3
4
|
*/
|
|
4
|
-
export declare function setArgIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
5
|
+
export declare function setArgIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
5
6
|
s: S;
|
|
6
7
|
args: [S[K]];
|
|
7
8
|
}) => Partial<S>;
|
|
8
9
|
/**
|
|
9
10
|
* Effect function that sets <code>true</code> in the specified prop.
|
|
10
11
|
*/
|
|
11
|
-
export declare function setTrueIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
12
|
+
export declare function setTrueIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
12
13
|
s: S;
|
|
13
14
|
}) => Partial<S>;
|
|
14
15
|
/**
|
|
15
16
|
* Effect function that sets <code>false</code> in the specified prop.
|
|
16
17
|
*/
|
|
17
|
-
export declare function setFalseIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
18
|
+
export declare function setFalseIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
18
19
|
s: S;
|
|
19
20
|
}) => Partial<S>;
|
|
20
21
|
/**
|
|
21
22
|
* Effect function that sets toggles the boolean value of the specified prop.
|
|
22
23
|
*/
|
|
23
|
-
export declare function toggleProp<S, K extends keyof S>(propName: K): (ctx: {
|
|
24
|
+
export declare function toggleProp<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
24
25
|
s: S;
|
|
25
26
|
}) => Partial<S>;
|
|
26
27
|
/**
|
|
27
28
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
28
29
|
* and second as value to set.
|
|
29
30
|
*/
|
|
30
|
-
export declare function setArgsInMap<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
31
|
+
export declare function setArgsInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
31
32
|
s: S;
|
|
32
33
|
args: [string, T];
|
|
33
34
|
}) => Partial<S>;
|
|
@@ -35,14 +36,14 @@ export declare function setArgsInMap<S, K extends keyof S, T>(propName: K): (ctx
|
|
|
35
36
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
36
37
|
* and second as value to set.
|
|
37
38
|
*/
|
|
38
|
-
export declare function setArgsInArray<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
39
|
+
export declare function setArgsInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
39
40
|
s: S;
|
|
40
41
|
args: [number, T];
|
|
41
42
|
}) => Partial<S>;
|
|
42
43
|
/**
|
|
43
44
|
* Effect function that sets the asynchronous action result to the specified prop.
|
|
44
45
|
*/
|
|
45
|
-
export declare function setResIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
46
|
+
export declare function setResIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
46
47
|
s: S;
|
|
47
48
|
res: S[K];
|
|
48
49
|
}) => Partial<S>;
|
|
@@ -50,7 +51,7 @@ export declare function setResIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
|
50
51
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
51
52
|
* and second as value to set.
|
|
52
53
|
*/
|
|
53
|
-
export declare function setResInArray<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
54
|
+
export declare function setResInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
54
55
|
s: S;
|
|
55
56
|
args: [number];
|
|
56
57
|
res: T;
|
|
@@ -59,7 +60,7 @@ export declare function setResInArray<S, K extends keyof S, T>(propName: K): (ct
|
|
|
59
60
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
60
61
|
* and second as value to set.
|
|
61
62
|
*/
|
|
62
|
-
export declare function setResInMap<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
63
|
+
export declare function setResInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
63
64
|
s: S;
|
|
64
65
|
args: [string];
|
|
65
66
|
res: T;
|
package/es/helpers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
var r=function(){return r=Object.assign||function(r){for(var n,t=1,u=arguments.length;t<u;t++)for(var e in n=arguments[t])Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e]);return r},r.apply(this,arguments)};function n(r,n,t){if(t||2===arguments.length)for(var u,e=0,o=n.length;e<o;e++)!u&&e in n||(u||(u=Array.prototype.slice.call(n,0,e)),u[e]=n[e]);return r.concat(u||Array.prototype.slice.call(n))}function t(r){return function(n){var
|
|
1
|
+
var r=function(){return r=Object.assign||function(r){for(var n,t=1,u=arguments.length;t<u;t++)for(var e in n=arguments[t])Object.prototype.hasOwnProperty.call(n,e)&&(r[e]=n[e]);return r},r.apply(this,arguments)};function n(r,n,t){if(t||2===arguments.length)for(var u,e=0,o=n.length;e<o;e++)!u&&e in n||(u||(u=Array.prototype.slice.call(n,0,e)),u[e]=n[e]);return r.concat(u||Array.prototype.slice.call(n))}function t(r,n){return n&&(r[n]=!0),r}function u(r,n){return function(u){var e,o=u.s,c=u.args[0];return o[r]===c?null:t(((e={})[r]=c,e),n)}}function e(r,n){return function(u){var e;return u.s[r]?null:t(((e={})[r]=!0,e),n)}}function o(r,n){return function(u){var e;return u.s[r]?t(((e={})[r]=!1,e),n):null}}function c(r,n){return function(u){var e,o=u.s;return t(((e={})[r]=!o[r],e),n)}}function i(n,u){return function(e){var o,c,i=e.s,a=e.args,f=a[0],s=a[1];return t(((o={})[n]=r(r({},i[n]),((c={})[f]=s,c)),o),u)}}function a(r,u){return function(e){var o,c=e.s,i=e.args,a=i[0],f=i[1],s=n([],c[r],!0);return s[a]=f,t(((o={})[r]=s,o),u)}}function f(r,n){return function(u){var e,o=u.res;return t(((e={})[r]=o,e),n)}}function s(r,u){return function(e){var o,c=e.s,i=e.args[0],a=e.res,f=n([],c[r],!0);return f[i]=a,t(((o={})[r]=f,o),u)}}function l(n,u){return function(e){var o,c,i=e.s,a=e.args[0],f=e.res;return t(((o={})[n]=r(r({},i[n]),((c={})[a]=f,c)),o),u)}}export{u as setArgIn,a as setArgsInArray,i as setArgsInMap,o as setFalseIn,f as setResIn,s as setResInArray,l as setResInMap,e as setTrueIn,c as toggleProp};
|
|
2
2
|
//# sourceMappingURL=helpers.js.map
|
package/es/index.d.ts
CHANGED
|
@@ -101,6 +101,15 @@ export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, SLIC
|
|
|
101
101
|
export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, K extends keyof StateListenerContext<S, DS, A>, KL extends keyof A>(store: StoreApi<S, A, P, DS>, properties: K[]): Pick<StateListenerContext<S, DS, A>, K> & {
|
|
102
102
|
loadingMap: LoadingMap<Pick<A, KL>>;
|
|
103
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* Binds the store to this component.
|
|
106
|
+
* Store will NOT be destroyed when component is unmouted.
|
|
107
|
+
* The component will be refreshed for every change in the store.
|
|
108
|
+
*
|
|
109
|
+
* @param store The store to listen to.
|
|
110
|
+
* @returns The store.
|
|
111
|
+
*/
|
|
112
|
+
export declare function useStore<S, A extends DecoratedActions, P, DS>(store: StoreApi<S, A, P, DS>): StateListenerContext<S, DS, A>;
|
|
104
113
|
/**
|
|
105
114
|
* A react hook to get a state slice from a store context.
|
|
106
115
|
* The component be refreshed if, and only if, one property of the slice has changed.
|
|
@@ -119,19 +128,6 @@ export declare function useStoreContextSlice<S, A extends DecoratedActions, P, D
|
|
|
119
128
|
export declare function useStoreContextSlice<S, A extends DecoratedActions, P, DS, K extends keyof StateListenerContext<S, DS, A>, KL extends keyof A>(storeContext: Context<StoreApi<S, A, P, DS>>, properties: K[]): Pick<StateListenerContext<S, DS, A>, K> & {
|
|
120
129
|
loadingMap: LoadingMap<Pick<A, KL>>;
|
|
121
130
|
};
|
|
122
|
-
/**
|
|
123
|
-
* Binds the store to this component.
|
|
124
|
-
* Store will NOT be destroyed when component is unmouted.
|
|
125
|
-
* Props passed to actions will come from this components.
|
|
126
|
-
* If store is configured to react of props changes, it will used passed props.
|
|
127
|
-
* The component will be refreshed for every change in the store.
|
|
128
|
-
*
|
|
129
|
-
* @param store The store to listen to.
|
|
130
|
-
* @param props The parent component props
|
|
131
|
-
* @param refreshOnUpdate Whether refresh the component if store state changes.
|
|
132
|
-
* @returns The store.
|
|
133
|
-
*/
|
|
134
|
-
export declare function useStore<S, A extends DecoratedActions, P, DS = {}>(store: StoreApi<S, A, P, DS>, props?: P, refreshOnUpdate?: boolean): StoreApi<S, A, P, DS>;
|
|
135
131
|
/**
|
|
136
132
|
* Creates and manages a local store.
|
|
137
133
|
* The component will be refreshed for every change in the store.
|
package/es/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import r,{useMemo as n,useContext as e,useReducer as t,useRef as u,useLayoutEffect as o,useEffect as c}from"react";import{createRef as i,isSimpleSyncAction as a,decorateSimpleSyncAction as l,isAsyncAction as f,decorateAsyncAction as s,computeAsyncActionInput as d,isSyncAction as v,decorateSyncAction as p,globalConfig as O,onPropChange as _,DEFAULT_PROMISE_ID as E,fixDerivedDeps as S,computeDerivedValues as y,buildOnMountInvocationContext as g,buildOnUnMountInvocationContext as L,isLoadingImpl as h,runMiddlewares as b,buildLoadingMap as A,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 w(r){var n={exports:{}};return r(n,n.exports),n.exports}var D="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},M=r.useState,j=r.useEffect,V=r.useLayoutEffect,x=r.useDebugValue;function k(r){var n=r.getSnapshot;r=r.value;try{var e=n();return!D(r,e)}catch(r){return!0}}var C="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(r,n){return n()}:function(r,n){var e=n(),t=M({inst:{value:e,getSnapshot:n}}),u=t[0].inst,o=t[1];return V((function(){u.value=e,u.getSnapshot=n,k(u)&&o({inst:u})}),[r,e,n]),j((function(){return k(u)&&o({inst:u}),r((function(){k(u)&&o({inst:u})}))}),[r]),x(e),e},I={useSyncExternalStore:void 0!==r.useSyncExternalStore?r.useSyncExternalStore:C},P=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(new Error);var n=r,t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(r){for(var n=arguments.length,e=new Array(n>1?n-1:0),u=1;u<n;u++)e[u-1]=arguments[u];!function(r,n,e){var u=t.ReactDebugCurrentFrame.getStackAddendum();""!==u&&(n+="%s",e=e.concat([u]));var o=e.map((function(r){return String(r)}));o.unshift("Warning: "+n),Function.prototype.apply.call(console[r],console,o)}("error",r,e)}var o="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},c=n.useState,i=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue,f=!1,s=!1;function d(r){var n=r.getSnapshot,e=r.value;try{var t=n();return!o(e,t)}catch(r){return!0}}var v=!!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?function(r,n,e){return n()}:function(r,e,t){f||void 0!==n.startTransition&&(f=!0,u("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 v=e();if(!s){var p=e();o(v,p)||(u("The result of getSnapshot should be cached to avoid an infinite loop"),s=!0)}var O=c({inst:{value:v,getSnapshot:e}}),_=O[0].inst,E=O[1];return a((function(){_.value=v,_.getSnapshot=e,d(_)&&E({inst:_})}),[r,v,e]),i((function(){d(_)&&E({inst:_});return r((function(){d(_)&&E({inst:_})}))}),[r]),l(v),v},p=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:v;e.useSyncExternalStore=p,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),G=w((function(r){"production"===process.env.NODE_ENV?r.exports=I:r.exports=P}));var K,B="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},N=G.useSyncExternalStore,H=r.useRef,U=r.useEffect,W=r.useMemo,F=r.useDebugValue,Y={useSyncExternalStoreWithSelector:function(r,n,e,t,u){var o=H(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=W((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,B(o,r))return n;var e=t(r);return void 0!==u&&u(n,e)?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=N(r,o[0],o[1]);return U((function(){c.hasValue=!0,c.value=i}),[i]),F(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(new Error);var n=r,t=G;var 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,d=c(null);null===d.current?(s={hasValue:!1,value:null},d.current=s):s=d.current;var v=a((function(){var r,o,c=!1,i=function(n){if(!c){c=!0,r=n;var e=t(n);if(void 0!==f&&s.hasValue){var i=s.value;if(f(i,e))return o=i,i}return o=e,e}var a=o;if(u(r,n))return a;var l=t(n);return void 0!==f&&f(a,l)?a:(r=n,o=l,l)},a=void 0===e?null:e;return[function(){return i(n())},null===a?void 0:function(){return i(a())}]}),[n,e,t,f]),p=v[0],O=v[1],_=o(r,p,O);return i((function(){s.hasValue=!0,s.value=_}),[_]),l(_),_},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),J=w((function(r){"production"===process.env.NODE_ENV?r.exports=Y:r.exports=z}));!function(r){r.REJECT="reject",r.IGNORE="ignore",r.KEEP_LAST="keepLast",r.KEEP_ALL="keepAll",r.PARALLEL="parallel",r.REUSE="reuse"}(K||(K={}));var q=J.useSyncExternalStoreWithSelector;function Q(r){var n=i(),e=i(),t=i(),u=i(),o=i(),c=i(),w=i(),D=i(),M=i(),j=i(),V=i(),x=i(!1),k=i(),C=i([]),I=r.actions,P=r.middlewares,G=void 0===P?[]:P,K=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"]),B=r.getInitialState||function(){return r.initialState},N={},H=0;function U(){k.current=T(T(T(T({},u.current),n.current),e.current.state),{isLoading:Q,abortAction:X,loading:D.current,loadingMap:w.current,loadingParallelMap:c.current,errorMap:Z(),errorParallelMap:M.current}),Object.keys(N).forEach((function(r){var n;null===(n=N[r])||void 0===n||n.call(N)}))}function W(r){n.current=r,y(n,t,e,K),U()}function F(r){c.current=r,w.current=function(){if(x.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}(),D.current=function(){if(x.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 Y(c){var i;if(!x.current){t.current=c,x.current=!0,n.current=B(c);var a=new Set(null==K?void 0:K.initialActionsMarkedLoading),l=Object.keys(I).reduce((function(r,n){var e;return r[n]=a.has(n)?((e={})[E]=!0,e):{},r}),{});F(l),M.current=Object.keys(I).reduce((function(r,n){return r[n]={},r}),{}),o.current={},j.current={},V.current={},e.current={state:null,deps:{}},(null==K?void 0:K.derivedState)&&S(K),C.current=[];var f={options:K,get state(){return n.current},actions:I,setState:W};r.logEnabled&&R&&(console.log("logDetailedEffects"),G.push(R()));var s=function(r){var n,e=r();C.current.push(e),null===(n=e.init)||void 0===n||n.call(e,f)};null===(i=O.defaultMiddlewares)||void 0===i||i.forEach(s),null==G||G.forEach(s),y(n,t,e,K),_(n,e,t,null,u,K,B,J,!0,!1),(null==K?void 0:K.onMount)&&K.onMount(g(n,e,t,u)),U()}}function z(r,n){void 0===n&&(n=E);var e=M.current[r];(null==e?void 0:e[n])&&delete e[n],U()}function J(r,u,o,i,a,l,f,s){void 0===f&&(f=!1),void 0===s&&(s=!1);var d=!1;if(x.current){var v=u,p=!!a&&h(v||c.current,[o,null==l?void 0:l.promiseId]),O=b(C.current,n.current,r,p,o,i,a,l),_=O.newState,S=O.newLoading;if(null!=_&&(d=!0,n.current=_),p!==S&&(v=A(v,o,(null==l?void 0:l.promiseId)||E,S),0===Object.keys(v).length&&(v=void 0)),null!=v&&(d=!0,F(v)),d)y(n,t,e,K),s||(n.current=_||n.current,U());else if(f){y(n,t,e,K)&&!s&&U()}}}var q=Object.keys(I);function Q(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return h.apply(void 0,function(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))}([c.current],r,!1))}function X(r,n){var e,t;void 0===n&&(n=E);var u=null===(t=null===(e=j.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 Z(){return x.current?m(M.current):null}return u.current=q.reduce((function(r,i){var O=I[i];return a(O)?r[i]=l(i,O,n,e,t,x,K,J):f(O)?r[i]=s({actionName:i,stateRef:n,derivedStateRef:e,propsRef:t,loadingParallelMapRef:c,errorMapRef:M,actionsRef:u,promisesRef:j,conflictActionsRef:V,initializedRef:x,options:K,setState:J,clearError:z,action:d(O)}):v(O)&&(r[i]=p(i,O,n,e,t,u,x,o,K,J,z)),r}),{}),{getConfig:function(){return T({},r)},setProps:function(r){var o=t.current;t.current=r,x.current?_(n,e,t,o,u,K,B,J,!1,!1):Y(r)},addStateListener:function(r){var n="".concat(H++);return N[n]=r,function(){delete N[n]}},init:Y,destroy:function(){var r;if(x.current){var u=Object.keys(I).reduce((function(r,n){var e=I[n];if(f(e)&&e.abortable){var t=c.current[n],u=Object.keys(t).reduce((function(r,e){return t[e]&&(X(n,e),r.push(e)),r}),[]);u.length>0&&(r[n]=u)}return r}),{});null===(r=null==K?void 0:K.onUnmount)||void 0===r||r.call(K,L(n,e,t,u)),t.current=null,n.current=null,c.current=null,w.current=null,D.current=null,M.current=null,j.current=null,V.current=null,e.current=null,k.current=null,Object.keys(o.current).forEach((function(r){clearTimeout(o.current[r])})),o.current=null,N={},x.current=!1,C.current.forEach((function(r){var n;null===(n=r.destroy)||void 0===n||n.call(r)})),C.current=[]}},isLoading:Q,abortAction:X,clearError:z,getSnapshot:function(){return k.current},invokeOnMountDeferred:function(){_(n,e,t,null,u,K,B,J,!0,!0),(null==K?void 0:K.onMountDeferred)&&K.onMountDeferred(g(n,e,t,u))},get actions(){return u.current},get state(){return x.current?T(T({},n.current),e.current.state):null},get loading(){return D.current},get loadingMap(){return w.current},get errorMap(){return Z()},get loadingParallelMap(){return x.current?c.current:null},get errorParallelMap(){return x.current?M.current:null}}}function X(r,e){var t=n((function(){return e instanceof Function?e:function(r){return nr(r,e)}}),[e]);return q(r.addStateListener,r.getSnapshot,r.getSnapshot,t,O.comparator)}function Z(r,n){return X(e(r),n)}function $(r,n,e){void 0===n&&(n=null),void 0===e&&(e=!0);var c=t((function(r){return r>100?0:r+1}),0)[1],i=u(r);return r.setProps(n),o((function(){r.init(n)}),[]),o((function(){if(e)return i.current.addStateListener((function(){c()}))}),[e]),r}function rr(r,n,e){void 0===e&&(e=!0);var t=u();return null==t.current&&(t.current=Q(r)),c((function(){return t.current.invokeOnMountDeferred(),function(){var r;null===(r=t.current)||void 0===r||r.destroy()}}),[]),$(t.current,n,e)}function nr(r,n){return n.reduce((function(n,e){return r.hasOwnProperty(e)&&(n[e]=r[e]),n}),{})}function er(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return function(n){return nr(n,r)}}export default rr;export{K as ConflictPolicy,Q as createStore,nr as pick,er as slice,rr as useLocalStore,$ as useStore,Z as useStoreContextSlice,X as useStoreSlice};
|
|
1
|
+
import r,{useMemo as n,useContext as e,useRef as t,useEffect as u,useReducer as o,useLayoutEffect as c}from"react";import{createRef as i,isSimpleSyncAction as a,decorateSimpleSyncAction as l,isAsyncAction as f,decorateAsyncAction as s,computeAsyncActionInput as d,isSyncAction as v,decorateSyncAction as p,globalConfig as O,onPropChange as _,DEFAULT_PROMISE_ID as E,fixDerivedDeps as S,computeDerivedValues as y,buildOnMountInvocationContext as g,buildOnUnMountInvocationContext as L,isLoadingImpl as h,runMiddlewares as b,buildLoadingMap as A,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 w(r){var n={exports:{}};return r(n,n.exports),n.exports}var M="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},j=r.useState,D=r.useEffect,x=r.useLayoutEffect,V=r.useDebugValue;function k(r){var n=r.getSnapshot;r=r.value;try{var e=n();return!M(r,e)}catch(r){return!0}}var C="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(r,n){return n()}:function(r,n){var e=n(),t=j({inst:{value:e,getSnapshot:n}}),u=t[0].inst,o=t[1];return x((function(){u.value=e,u.getSnapshot=n,k(u)&&o({inst:u})}),[r,e,n]),D((function(){return k(u)&&o({inst:u}),r((function(){k(u)&&o({inst:u})}))}),[r]),V(e),e},I={useSyncExternalStore:void 0!==r.useSyncExternalStore?r.useSyncExternalStore:C},P=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(new Error);var n=r,t=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function u(r){for(var n=arguments.length,e=new Array(n>1?n-1:0),u=1;u<n;u++)e[u-1]=arguments[u];!function(r,n,e){var u=t.ReactDebugCurrentFrame.getStackAddendum();""!==u&&(n+="%s",e=e.concat([u]));var o=e.map((function(r){return String(r)}));o.unshift("Warning: "+n),Function.prototype.apply.call(console[r],console,o)}("error",r,e)}var o="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},c=n.useState,i=n.useEffect,a=n.useLayoutEffect,l=n.useDebugValue,f=!1,s=!1;function d(r){var n=r.getSnapshot,e=r.value;try{var t=n();return!o(e,t)}catch(r){return!0}}var v=!!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?function(r,n,e){return n()}:function(r,e,t){f||void 0!==n.startTransition&&(f=!0,u("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 v=e();if(!s){var p=e();o(v,p)||(u("The result of getSnapshot should be cached to avoid an infinite loop"),s=!0)}var O=c({inst:{value:v,getSnapshot:e}}),_=O[0].inst,E=O[1];return a((function(){_.value=v,_.getSnapshot=e,d(_)&&E({inst:_})}),[r,v,e]),i((function(){d(_)&&E({inst:_});return r((function(){d(_)&&E({inst:_})}))}),[r]),l(v),v},p=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:v;e.useSyncExternalStore=p,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),G=w((function(r){"production"===process.env.NODE_ENV?r.exports=I:r.exports=P}));var K,B="function"==typeof Object.is?Object.is:function(r,n){return r===n&&(0!==r||1/r==1/n)||r!=r&&n!=n},N=G.useSyncExternalStore,H=r.useRef,U=r.useEffect,W=r.useMemo,F=r.useDebugValue,Y={useSyncExternalStoreWithSelector:function(r,n,e,t,u){var o=H(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=W((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,B(o,r))return n;var e=t(r);return void 0!==u&&u(n,e)?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=N(r,o[0],o[1]);return U((function(){c.hasValue=!0,c.value=i}),[i]),F(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(new Error);var n=r,t=G;var 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,d=c(null);null===d.current?(s={hasValue:!1,value:null},d.current=s):s=d.current;var v=a((function(){var r,o,c=!1,i=function(n){if(!c){c=!0,r=n;var e=t(n);if(void 0!==f&&s.hasValue){var i=s.value;if(f(i,e))return o=i,i}return o=e,e}var a=o;if(u(r,n))return a;var l=t(n);return void 0!==f&&f(a,l)?a:(r=n,o=l,l)},a=void 0===e?null:e;return[function(){return i(n())},null===a?void 0:function(){return i(a())}]}),[n,e,t,f]),p=v[0],O=v[1],_=o(r,p,O);return i((function(){s.hasValue=!0,s.value=_}),[_]),l(_),_},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),J=w((function(r){"production"===process.env.NODE_ENV?r.exports=Y:r.exports=z}));!function(r){r.REJECT="reject",r.IGNORE="ignore",r.KEEP_LAST="keepLast",r.KEEP_ALL="keepAll",r.PARALLEL="parallel",r.REUSE="reuse"}(K||(K={}));var q=J.useSyncExternalStoreWithSelector,Q=G.useSyncExternalStore;function X(r){var n=i(),e=i(),t=i(),u=i(),o=i(),c=i(),w=i(),M=i(),j=i(),D=i(),x=i(),V=i(!1),k=i(),C=i([]),I=r.actions,P=r.middlewares,G=void 0===P?[]:P,K=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"]),B=r.getInitialState||function(){return r.initialState},N={},H=0;function U(){k.current=T(T(T(T({},u.current),n.current),e.current.state),{isLoading:Q,abortAction:X,loading:M.current,loadingMap:w.current,loadingParallelMap:c.current,errorMap:Z(),errorParallelMap:j.current}),Object.keys(N).forEach((function(r){var n;null===(n=N[r])||void 0===n||n.call(N)}))}function W(r){n.current=r,y(n,t,e,K),U()}function F(r){c.current=r,w.current=function(){if(V.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}(),M.current=function(){if(V.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 Y(c){var i;if(!V.current){t.current=c,V.current=!0,n.current=B(c);var a=new Set(null==K?void 0:K.initialActionsMarkedLoading),l=Object.keys(I).reduce((function(r,n){var e;return r[n]=a.has(n)?((e={})[E]=!0,e):{},r}),{});F(l),j.current=Object.keys(I).reduce((function(r,n){return r[n]={},r}),{}),o.current={},D.current={},x.current={},e.current={state:null,deps:{}},(null==K?void 0:K.derivedState)&&S(K),C.current=[];var f={options:K,get state(){return n.current},actions:I,setState:W};r.logEnabled&&R&&G.push(R());var s=function(r){var n,e=r();C.current.push(e),null===(n=e.init)||void 0===n||n.call(e,f)};null===(i=O.defaultMiddlewares)||void 0===i||i.forEach(s),null==G||G.forEach(s),y(n,t,e,K),_(n,e,t,null,u,K,B,J,!0,!1),(null==K?void 0:K.onMount)&&K.onMount(g(n,e,t,u)),U()}}function z(r,n){void 0===n&&(n=E);var e=j.current[r];(null==e?void 0:e[n])&&delete e[n],U()}function J(r,u,o,i,a,l,f,s){void 0===f&&(f=!1),void 0===s&&(s=!1);var d=!1;if(V.current){var v=u,p=!!a&&h(v||c.current,[o,null==l?void 0:l.promiseId]),O=b(C.current,n.current,r,p,o,i,a,l),_=O.newState,S=O.newLoading;if(null!=_&&(d=!0,n.current=_),p!==S&&(v=A(v,o,(null==l?void 0:l.promiseId)||E,S),0===Object.keys(v).length&&(v=void 0)),null!=v&&(d=!0,F(v)),d)y(n,t,e,K),s||(n.current=_||n.current,U());else if(f){y(n,t,e,K)&&!s&&U()}}}var q=Object.keys(I);function Q(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return h.apply(void 0,function(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))}([c.current],r,!1))}function X(r,n){var e,t;void 0===n&&(n=E);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 Z(){return V.current?m(j.current):null}return u.current=q.reduce((function(r,i){var O=I[i];return a(O)?r[i]=l(i,O,n,e,t,V,K,J):f(O)?r[i]=s({actionName:i,stateRef:n,derivedStateRef:e,propsRef:t,loadingParallelMapRef:c,errorMapRef:j,actionsRef:u,promisesRef:D,conflictActionsRef:x,initializedRef:V,options:K,setState:J,clearError:z,action:d(O)}):v(O)&&(r[i]=p(i,O,n,e,t,u,V,o,K,J,z)),r}),{}),{getConfig:function(){return T({},r)},setProps:function(r){var o=t.current;t.current=r,V.current?_(n,e,t,o,u,K,B,J,!1,!1):Y(r)},addStateListener:function(r){var n="".concat(H++);return N[n]=r,function(){delete N[n]}},init:Y,destroy:function(){var r;if(V.current){var u=Object.keys(I).reduce((function(r,n){var e=I[n];if(f(e)&&e.abortable){var t=c.current[n],u=Object.keys(t).reduce((function(r,e){return t[e]&&(X(n,e),r.push(e)),r}),[]);u.length>0&&(r[n]=u)}return r}),{});null===(r=null==K?void 0:K.onUnmount)||void 0===r||r.call(K,L(n,e,t,u)),t.current=null,n.current=null,c.current=null,w.current=null,M.current=null,j.current=null,D.current=null,x.current=null,e.current=null,k.current=null,Object.keys(o.current).forEach((function(r){clearTimeout(o.current[r])})),o.current=null,N={},V.current=!1,C.current.forEach((function(r){var n;null===(n=r.destroy)||void 0===n||n.call(r)})),C.current=[]}},isLoading:Q,abortAction:X,clearError:z,getSnapshot:function(){return k.current},invokeOnMountDeferred:function(){_(n,e,t,null,u,K,B,J,!0,!0),(null==K?void 0:K.onMountDeferred)&&K.onMountDeferred(g(n,e,t,u))},get actions(){return u.current},get state(){return V.current?T(T({},n.current),e.current.state):null},get loading(){return M.current},get loadingMap(){return w.current},get errorMap(){return Z()},get loadingParallelMap(){return V.current?c.current:null},get errorParallelMap(){return V.current?j.current:null}}}function Z(r,e){var t=n((function(){return e instanceof Function?e:function(r){return er(r,e)}}),[e]);return q(r.addStateListener,r.getSnapshot,r.getSnapshot,t,O.comparator)}function $(r){return Q(r.addStateListener,r.getSnapshot)}function rr(r,n){return Z(e(r),n)}function nr(r,n,e){void 0===e&&(e=!0);var i=t();return null==i.current&&(i.current=X(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=o((function(r){return r>100?0:r+1}),0)[1],i=t(r);return r.setProps(n),c((function(){r.init(n)}),[]),c((function(){if(e)return i.current.addStateListener((function(){u()}))}),[e]),r}(i.current,n,e)}function er(r,n){return n.reduce((function(n,e){return r.hasOwnProperty(e)&&(n[e]=r[e]),n}),{})}function tr(){for(var r=[],n=0;n<arguments.length;n++)r[n]=arguments[n];return function(n){return er(n,r)}}export default nr;export{K as ConflictPolicy,X as createStore,er as pick,tr as slice,nr as useLocalStore,$ as useStore,rr as useStoreContextSlice,Z 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.js","../../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.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.min.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":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n// dispatch for CommonJS interop named imports.\n\nvar useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nvar didWarnOld18Alpha = false;\nvar didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n {\n if (!didWarnOld18Alpha) {\n if (React.startTransition !== undefined) {\n didWarnOld18Alpha = true;\n\n 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.');\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n var value = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n\n if (!objectIs(value, cachedValue)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n var _useState = useState({\n inst: {\n value: value,\n getSnapshot: getSnapshot\n }\n }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n\n useLayoutEffect(function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }, [subscribe, value, getSnapshot]);\n useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n\n var handleStoreChange = function () {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar isServerEnvironment = !canUseDOM;\n\nvar shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;\nvar useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim;\n\nexports.useSyncExternalStore = useSyncExternalStore$2;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.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.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.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","k","is","a","b","l","e","useState","m","useEffect","useLayoutEffect","useDebugValue","r","getSnapshot","value","d","f","u","window","document","createElement","inst","c","g","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","React","require$$0","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","error","format","_len2","args","Array","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","console","printWarning","objectIs","x","y","didWarnOld18Alpha","didWarnUncachedGetSnapshot","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","shim","subscribe","getServerSnapshot","undefined","startTransition","cachedValue","_useState","forceUpdate","useSyncExternalStore$2","exports","registerInternalModuleStop","module","require$$1","q","h","useRef","v","useMemo","w","current","hasValue","selector","isEqual","instRef","_useMemo","memoizedSnapshot","memoizedSelection","hasMemo","memoizedSelector","nextSnapshot","_nextSelection","currentSelection","prevSelection","nextSelection","maybeGetServerSnapshot","getSelection","getServerSelection","indexOf","getOwnPropertySymbols","propertyIsEnumerable","to","from","pack","ar","slice"],"mappings":"urBA+BO,IAAIA,EAAW,WAQlB,OAPAA,EAAWC,OAAOC,QAAU,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cjs/use-sync-external-store-shim.production.min.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.min.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":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n// dispatch for CommonJS interop named imports.\n\nvar useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nvar didWarnOld18Alpha = false;\nvar didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n {\n if (!didWarnOld18Alpha) {\n if (React.startTransition !== undefined) {\n didWarnOld18Alpha = true;\n\n 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.');\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n var value = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n\n if (!objectIs(value, cachedValue)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n var _useState = useState({\n inst: {\n value: value,\n getSnapshot: getSnapshot\n }\n }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n\n useLayoutEffect(function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }, [subscribe, value, getSnapshot]);\n useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n\n var handleStoreChange = function () {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar isServerEnvironment = !canUseDOM;\n\nvar shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;\nvar useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim;\n\nexports.useSyncExternalStore = useSyncExternalStore$2;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.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.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.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","k","is","a","b","l","e","useState","m","useEffect","useLayoutEffect","useDebugValue","r","getSnapshot","value","d","f","u","window","document","createElement","inst","c","g","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","React","require$$0","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","error","format","_len2","args","Array","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","console","printWarning","objectIs","x","y","didWarnOld18Alpha","didWarnUncachedGetSnapshot","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","shim","subscribe","getServerSnapshot","undefined","startTransition","cachedValue","_useState","forceUpdate","useSyncExternalStore$2","exports","registerInternalModuleStop","module","require$$1","q","h","useRef","v","useMemo","w","current","hasValue","selector","isEqual","instRef","_useMemo","memoizedSnapshot","memoizedSelection","hasMemo","memoizedSelector","nextSnapshot","_nextSelection","currentSelection","prevSelection","nextSelection","maybeGetServerSnapshot","getSelection","getServerSelection","indexOf","getOwnPropertySymbols","propertyIsEnumerable","to","from","pack","ar","slice"],"mappings":"urBA+BO,IAAIA,EAAW,WAQlB,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,GAEJH,EAASa,MAAMC,KAAMP,UAChC,mEC/BmG,IAAIQ,EAAE,mBAAoBd,OAAOe,GAAGf,OAAOe,GAA1G,SAAWC,EAAEC,GAAG,OAAOD,IAAIC,IAAI,IAAID,GAAG,EAAEA,GAAI,EAAEC,IAAID,GAAIA,GAAGC,GAAIA,CAAC,EAAiDC,EAAEC,EAAEC,SAASC,EAAEF,EAAEG,UAAUjB,EAAEc,EAAEI,gBAAgBf,EAAEW,EAAEK,cACtM,SAASC,EAAET,GAAG,IAAIC,EAAED,EAAEU,YAAYV,EAAEA,EAAEW,MAAM,IAAI,IAAIC,EAAEX,IAAI,OAAOH,EAAEE,EAAEY,EAAE,CAAC,MAAMC,GAAG,OAAM,CA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AAM,GAAKJ,OAAOS,UAAU0G,qBAAqBxG,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,ytEAgHO,SAAuBkH,EAAIC,EAAMC,GACpC,GAAIA,GAA6B,IAArBhH,UAAUC,OAAc,IAAK,IAA4BgH,EAAxBnH,EAAI,EAAGc,EAAImG,EAAK9G,OAAYH,EAAIc,EAAGd,KACxEmH,GAAQnH,KAAKiH,IACRE,IAAIA,EAAKnE,MAAM3C,UAAU+G,MAAM7G,KAAK0G,EAAM,EAAGjH,IAClDmH,EAAGnH,GAAKiH,EAAKjH,IAGrB,OAAOgH,EAAG1D,OAAO6D,GAAMnE,MAAM3C,UAAU+G,MAAM7G,KAAK0G,GACtD"}
|
package/helpers.d.ts
CHANGED
|
@@ -1,33 +1,34 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Effect function that sets the first action argument to the specified prop.
|
|
3
|
+
* if dirtyProp is set
|
|
3
4
|
*/
|
|
4
|
-
export declare function setArgIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
5
|
+
export declare function setArgIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
5
6
|
s: S;
|
|
6
7
|
args: [S[K]];
|
|
7
8
|
}) => Partial<S>;
|
|
8
9
|
/**
|
|
9
10
|
* Effect function that sets <code>true</code> in the specified prop.
|
|
10
11
|
*/
|
|
11
|
-
export declare function setTrueIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
12
|
+
export declare function setTrueIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
12
13
|
s: S;
|
|
13
14
|
}) => Partial<S>;
|
|
14
15
|
/**
|
|
15
16
|
* Effect function that sets <code>false</code> in the specified prop.
|
|
16
17
|
*/
|
|
17
|
-
export declare function setFalseIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
18
|
+
export declare function setFalseIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
18
19
|
s: S;
|
|
19
20
|
}) => Partial<S>;
|
|
20
21
|
/**
|
|
21
22
|
* Effect function that sets toggles the boolean value of the specified prop.
|
|
22
23
|
*/
|
|
23
|
-
export declare function toggleProp<S, K extends keyof S>(propName: K): (ctx: {
|
|
24
|
+
export declare function toggleProp<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
24
25
|
s: S;
|
|
25
26
|
}) => Partial<S>;
|
|
26
27
|
/**
|
|
27
28
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
28
29
|
* and second as value to set.
|
|
29
30
|
*/
|
|
30
|
-
export declare function setArgsInMap<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
31
|
+
export declare function setArgsInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
31
32
|
s: S;
|
|
32
33
|
args: [string, T];
|
|
33
34
|
}) => Partial<S>;
|
|
@@ -35,14 +36,14 @@ export declare function setArgsInMap<S, K extends keyof S, T>(propName: K): (ctx
|
|
|
35
36
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
36
37
|
* and second as value to set.
|
|
37
38
|
*/
|
|
38
|
-
export declare function setArgsInArray<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
39
|
+
export declare function setArgsInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
39
40
|
s: S;
|
|
40
41
|
args: [number, T];
|
|
41
42
|
}) => Partial<S>;
|
|
42
43
|
/**
|
|
43
44
|
* Effect function that sets the asynchronous action result to the specified prop.
|
|
44
45
|
*/
|
|
45
|
-
export declare function setResIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
46
|
+
export declare function setResIn<S, K extends keyof S, K2 extends keyof S>(propName: K, dirtyProp?: K2): (ctx: {
|
|
46
47
|
s: S;
|
|
47
48
|
res: S[K];
|
|
48
49
|
}) => Partial<S>;
|
|
@@ -50,7 +51,7 @@ export declare function setResIn<S, K extends keyof S>(propName: K): (ctx: {
|
|
|
50
51
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
51
52
|
* and second as value to set.
|
|
52
53
|
*/
|
|
53
|
-
export declare function setResInArray<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
54
|
+
export declare function setResInArray<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
54
55
|
s: S;
|
|
55
56
|
args: [number];
|
|
56
57
|
res: T;
|
|
@@ -59,7 +60,7 @@ export declare function setResInArray<S, K extends keyof S, T>(propName: K): (ct
|
|
|
59
60
|
* Effect function that sets the update the specifed prop as an array using first action argument as index
|
|
60
61
|
* and second as value to set.
|
|
61
62
|
*/
|
|
62
|
-
export declare function setResInMap<S, K extends keyof S, T>(propName: K): (ctx: {
|
|
63
|
+
export declare function setResInMap<S, K extends keyof S, K2 extends keyof S, T>(propName: K, dirtyProp?: K2): (ctx: {
|
|
63
64
|
s: S;
|
|
64
65
|
args: [string];
|
|
65
66
|
res: T;
|
package/helpers.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){return r=Object.assign||function(r){for(var n,t=1,e=arguments.length;t<e;t++)for(var
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var r=function(){return r=Object.assign||function(r){for(var n,t=1,e=arguments.length;t<e;t++)for(var u in n=arguments[t])Object.prototype.hasOwnProperty.call(n,u)&&(r[u]=n[u]);return r},r.apply(this,arguments)};function n(r,n,t){if(t||2===arguments.length)for(var e,u=0,s=n.length;u<s;u++)!e&&u in n||(e||(e=Array.prototype.slice.call(n,0,u)),e[u]=n[u]);return r.concat(e||Array.prototype.slice.call(n))}function t(r,n){return n&&(r[n]=!0),r}exports.setArgIn=function(r,n){return function(e){var u,s=e.s,o=e.args[0];return s[r]===o?null:t(((u={})[r]=o,u),n)}},exports.setArgsInArray=function(r,e){return function(u){var s,o=u.s,a=u.args,c=a[0],i=a[1],f=n([],o[r],!0);return f[c]=i,t(((s={})[r]=f,s),e)}},exports.setArgsInMap=function(n,e){return function(u){var s,o,a=u.s,c=u.args,i=c[0],f=c[1];return t(((s={})[n]=r(r({},a[n]),((o={})[i]=f,o)),s),e)}},exports.setFalseIn=function(r,n){return function(e){var u;return e.s[r]?t(((u={})[r]=!1,u),n):null}},exports.setResIn=function(r,n){return function(e){var u,s=e.res;return t(((u={})[r]=s,u),n)}},exports.setResInArray=function(r,e){return function(u){var s,o=u.s,a=u.args[0],c=u.res,i=n([],o[r],!0);return i[a]=c,t(((s={})[r]=i,s),e)}},exports.setResInMap=function(n,e){return function(u){var s,o,a=u.s,c=u.args[0],i=u.res;return t(((s={})[n]=r(r({},a[n]),((o={})[c]=i,o)),s),e)}},exports.setTrueIn=function(r,n){return function(e){var u;return e.s[r]?null:t(((u={})[r]=!0,u),n)}},exports.toggleProp=function(r,n){return function(e){var u,s=e.s;return t(((u={})[r]=!s[r],u),n)}};
|
|
2
2
|
//# sourceMappingURL=helpers.js.map
|
package/index.d.ts
CHANGED
|
@@ -101,6 +101,15 @@ export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, SLIC
|
|
|
101
101
|
export declare function useStoreSlice<S, A extends DecoratedActions, P, DS, K extends keyof StateListenerContext<S, DS, A>, KL extends keyof A>(store: StoreApi<S, A, P, DS>, properties: K[]): Pick<StateListenerContext<S, DS, A>, K> & {
|
|
102
102
|
loadingMap: LoadingMap<Pick<A, KL>>;
|
|
103
103
|
};
|
|
104
|
+
/**
|
|
105
|
+
* Binds the store to this component.
|
|
106
|
+
* Store will NOT be destroyed when component is unmouted.
|
|
107
|
+
* The component will be refreshed for every change in the store.
|
|
108
|
+
*
|
|
109
|
+
* @param store The store to listen to.
|
|
110
|
+
* @returns The store.
|
|
111
|
+
*/
|
|
112
|
+
export declare function useStore<S, A extends DecoratedActions, P, DS>(store: StoreApi<S, A, P, DS>): StateListenerContext<S, DS, A>;
|
|
104
113
|
/**
|
|
105
114
|
* A react hook to get a state slice from a store context.
|
|
106
115
|
* The component be refreshed if, and only if, one property of the slice has changed.
|
|
@@ -119,19 +128,6 @@ export declare function useStoreContextSlice<S, A extends DecoratedActions, P, D
|
|
|
119
128
|
export declare function useStoreContextSlice<S, A extends DecoratedActions, P, DS, K extends keyof StateListenerContext<S, DS, A>, KL extends keyof A>(storeContext: Context<StoreApi<S, A, P, DS>>, properties: K[]): Pick<StateListenerContext<S, DS, A>, K> & {
|
|
120
129
|
loadingMap: LoadingMap<Pick<A, KL>>;
|
|
121
130
|
};
|
|
122
|
-
/**
|
|
123
|
-
* Binds the store to this component.
|
|
124
|
-
* Store will NOT be destroyed when component is unmouted.
|
|
125
|
-
* Props passed to actions will come from this components.
|
|
126
|
-
* If store is configured to react of props changes, it will used passed props.
|
|
127
|
-
* The component will be refreshed for every change in the store.
|
|
128
|
-
*
|
|
129
|
-
* @param store The store to listen to.
|
|
130
|
-
* @param props The parent component props
|
|
131
|
-
* @param refreshOnUpdate Whether refresh the component if store state changes.
|
|
132
|
-
* @returns The store.
|
|
133
|
-
*/
|
|
134
|
-
export declare function useStore<S, A extends DecoratedActions, P, DS = {}>(store: StoreApi<S, A, P, DS>, props?: P, refreshOnUpdate?: boolean): StoreApi<S, A, P, DS>;
|
|
135
131
|
/**
|
|
136
132
|
* Creates and manages a local store.
|
|
137
133
|
* The component will be refreshed for every change in the store.
|
package/index.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("./impl"),t=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 r,t=1,n=arguments.length;t<n;t++)for(var u in r=arguments[t])Object.prototype.hasOwnProperty.call(r,u)&&(e[u]=r[u]);return e},o.apply(this,arguments)};function c(e){var r={exports:{}};return e(r,r.exports),r.exports}var i="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},a=u.default.useState,l=u.default.useEffect,f=u.default.useLayoutEffect,s=u.default.useDebugValue;function d(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!i(e,t)}catch(e){return!0}}var v="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,r){return r()}:function(e,r){var t=r(),n=a({inst:{value:t,getSnapshot:r}}),u=n[0].inst,o=n[1];return f((function(){u.value=t,u.getSnapshot=r,d(u)&&o({inst:u})}),[e,t,r]),l((function(){return d(u)&&o({inst:u}),e((function(){d(u)&&o({inst:u})}))}),[e]),s(t),t},p={useSyncExternalStore:void 0!==u.default.useSyncExternalStore?u.default.useSyncExternalStore:v},O=c((function(e,r){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=u.default,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),u=1;u<r;u++)n[u-1]=arguments[u];!function(e,r,n){var u=t.ReactDebugCurrentFrame.getStackAddendum();""!==u&&(r+="%s",n=n.concat([u]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,o)}("error",e,n)}var o="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},c=e.useState,i=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue,f=!1,s=!1;function d(e){var r=e.getSnapshot,t=e.value;try{var n=r();return!o(t,n)}catch(e){return!0}}var v=!!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?function(e,r,t){return r()}:function(r,t,u){f||void 0!==e.startTransition&&(f=!0,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."));var v=t();if(!s){var p=t();o(v,p)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),s=!0)}var O=c({inst:{value:v,getSnapshot:t}}),_=O[0].inst,E=O[1];return a((function(){_.value=v,_.getSnapshot=t,d(_)&&E({inst:_})}),[r,v,t]),i((function(){d(_)&&E({inst:_});return r((function(){d(_)&&E({inst:_})}))}),[r]),l(v),v},p=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:v;r.useSyncExternalStore=p,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),_=c((function(e){"production"===process.env.NODE_ENV?e.exports=p:e.exports=O}));var E,S="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},y=_.useSyncExternalStore,g=u.default.useRef,L=u.default.useEffect,b=u.default.useMemo,A=u.default.useDebugValue,h={useSyncExternalStoreWithSelector:function(e,r,t,n,u){var o=g(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=b((function(){function e(e){if(!a){if(a=!0,o=e,e=n(e),void 0!==u&&c.hasValue){var r=c.value;if(u(r,e))return i=r}return i=e}if(r=i,S(o,e))return r;var t=n(e);return void 0!==u&&u(r,t)?r:(o=e,i=t)}var o,i,a=!1,l=void 0===t?null:t;return[function(){return e(r())},null===l?void 0:function(){return e(l())}]}),[r,t,n,u]);var i=y(e,o[0],o[1]);return L((function(){c.hasValue=!0,c.value=i}),[i]),A(i),i}},R=c((function(e,r){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=u.default,t=_;var n="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},o=t.useSyncExternalStore,c=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,r,t,u,f){var s,d=c(null);null===d.current?(s={hasValue:!1,value:null},d.current=s):s=d.current;var v=a((function(){var e,o,c=!1,i=function(r){if(!c){c=!0,e=r;var t=u(r);if(void 0!==f&&s.hasValue){var i=s.value;if(f(i,t))return o=i,i}return o=t,t}var a=o;if(n(e,r))return a;var l=u(r);return void 0!==f&&f(a,l)?a:(e=r,o=l,l)},a=void 0===t?null:t;return[function(){return i(r())},null===a?void 0:function(){return i(a())}]}),[r,t,u,f]),p=v[0],O=v[1],_=o(e,p,O);return i((function(){s.hasValue=!0,s.value=_}),[_]),l(_),_},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),D=c((function(e){"production"===process.env.NODE_ENV?e.exports=h:e.exports=R}));exports.ConflictPolicy=void 0,(E=exports.ConflictPolicy||(exports.ConflictPolicy={})).REJECT="reject",E.IGNORE="ignore",E.KEEP_LAST="keepLast",E.KEEP_ALL="keepAll",E.PARALLEL="parallel",E.REUSE="reuse";var x=D.useSyncExternalStoreWithSelector;function M(e){var n=r.createRef(),u=r.createRef(),c=r.createRef(),i=r.createRef(),a=r.createRef(),l=r.createRef(),f=r.createRef(),s=r.createRef(),d=r.createRef(),v=r.createRef(),p=r.createRef(),O=r.createRef(!1),_=r.createRef(),E=r.createRef([]),S=e.actions,y=e.middlewares,g=void 0===y?[]:y,L=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(n=Object.getOwnPropertySymbols(e);u<n.length;u++)r.indexOf(n[u])<0&&Object.prototype.propertyIsEnumerable.call(e,n[u])&&(t[n[u]]=e[n[u]])}return t}(e,["actions","middlewares"]),b=e.getInitialState||function(){return e.initialState},A={},h=0;function R(){_.current=o(o(o(o({},i.current),n.current),u.current.state),{isLoading:w,abortAction:C,loading:s.current,loadingMap:f.current,loadingParallelMap:l.current,errorMap:P(),errorParallelMap:d.current}),Object.keys(A).forEach((function(e){var r;null===(r=A[e])||void 0===r||r.call(A)}))}function D(e){n.current=e,r.computeDerivedValues(n,c,u,L),R()}function x(e){l.current=e,f.current=function(){if(O.current){var e=l.current;return Object.keys(e).reduce((function(r,t){var n=e[t];return r[t]=null!=Object.keys(n).find((function(e){return!!n[e]})),r}),{})}return null}(),s.current=function(){if(O.current){var e=l.current;return null!=Object.keys(e).find((function(r){var t=e[r];return Object.keys(t).find((function(e){return!!t[e]}))}))}return null}()}function M(o){var l;if(!O.current){c.current=o,O.current=!0,n.current=b(o);var f=new Set(null==L?void 0:L.initialActionsMarkedLoading),s=Object.keys(S).reduce((function(e,t){var n;return e[t]=f.has(t)?((n={})[r.DEFAULT_PROMISE_ID]=!0,n):{},e}),{});x(s),d.current=Object.keys(S).reduce((function(e,r){return e[r]={},e}),{}),a.current={},v.current={},p.current={},u.current={state:null,deps:{}},(null==L?void 0:L.derivedState)&&r.fixDerivedDeps(L),E.current=[];var _={options:L,get state(){return n.current},actions:S,setState:D};e.logEnabled&&t.logDetailedEffects&&(console.log("logDetailedEffects"),g.push(t.logDetailedEffects()));var y=function(e){var r,t=e();E.current.push(t),null===(r=t.init)||void 0===r||r.call(t,_)};null===(l=r.globalConfig.defaultMiddlewares)||void 0===l||l.forEach(y),null==g||g.forEach(y),r.computeDerivedValues(n,c,u,L),r.onPropChange(n,u,c,null,i,L,b,T,!0,!1),(null==L?void 0:L.onMount)&&L.onMount(r.buildOnMountInvocationContext(n,u,c,i)),R()}}function m(e,t){void 0===t&&(t=r.DEFAULT_PROMISE_ID);var n=d.current[e];(null==n?void 0:n[t])&&delete n[t],R()}function T(e,t,o,i,a,f,s,d){void 0===s&&(s=!1),void 0===d&&(d=!1);var v=!1;if(O.current){var p=t,_=!!a&&r.isLoadingImpl(p||l.current,[o,null==f?void 0:f.promiseId]),S=r.runMiddlewares(E.current,n.current,e,_,o,i,a,f),y=S.newState,g=S.newLoading;if(null!=y&&(v=!0,n.current=y),_!==g&&(p=r.buildLoadingMap(p,o,(null==f?void 0:f.promiseId)||r.DEFAULT_PROMISE_ID,g),0===Object.keys(p).length&&(p=void 0)),null!=p&&(v=!0,x(p)),v)r.computeDerivedValues(n,c,u,L),d||(n.current=y||n.current,R());else if(s){r.computeDerivedValues(n,c,u,L)&&!d&&R()}}}var j=Object.keys(S);function w(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.isLoadingImpl.apply(void 0,function(e,r,t){if(t||2===arguments.length)for(var n,u=0,o=r.length;u<o;u++)!n&&u in r||(n||(n=Array.prototype.slice.call(r,0,u)),n[u]=r[u]);return e.concat(n||Array.prototype.slice.call(r))}([l.current],e,!1))}function C(e,t){var n,u;void 0===t&&(t=r.DEFAULT_PROMISE_ID);var o=null===(u=null===(n=v.current[e])||void 0===n?void 0:n[t])||void 0===u?void 0:u.abortController,c=!1;return o&&(o.abort(),c=!0),c}function P(){return O.current?r.buildErrorMap(d.current):null}return i.current=j.reduce((function(e,t){var o=S[t];return r.isSimpleSyncAction(o)?e[t]=r.decorateSimpleSyncAction(t,o,n,u,c,O,L,T):r.isAsyncAction(o)?e[t]=r.decorateAsyncAction({actionName:t,stateRef:n,derivedStateRef:u,propsRef:c,loadingParallelMapRef:l,errorMapRef:d,actionsRef:i,promisesRef:v,conflictActionsRef:p,initializedRef:O,options:L,setState:T,clearError:m,action:r.computeAsyncActionInput(o)}):r.isSyncAction(o)&&(e[t]=r.decorateSyncAction(t,o,n,u,c,i,O,a,L,T,m)),e}),{}),{getConfig:function(){return o({},e)},setProps:function(e){var t=c.current;c.current=e,O.current?r.onPropChange(n,u,c,t,i,L,b,T,!1,!1):M(e)},addStateListener:function(e){var r="".concat(h++);return A[r]=e,function(){delete A[r]}},init:M,destroy:function(){var e;if(O.current){var t=Object.keys(S).reduce((function(e,t){var n=S[t];if(r.isAsyncAction(n)&&n.abortable){var u=l.current[t],o=Object.keys(u).reduce((function(e,r){return u[r]&&(C(t,r),e.push(r)),e}),[]);o.length>0&&(e[t]=o)}return e}),{});null===(e=null==L?void 0:L.onUnmount)||void 0===e||e.call(L,r.buildOnUnMountInvocationContext(n,u,c,t)),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,_.current=null,Object.keys(a.current).forEach((function(e){clearTimeout(a.current[e])})),a.current=null,A={},O.current=!1,E.current.forEach((function(e){var r;null===(r=e.destroy)||void 0===r||r.call(e)})),E.current=[]}},isLoading:w,abortAction:C,clearError:m,getSnapshot:function(){return _.current},invokeOnMountDeferred:function(){r.onPropChange(n,u,c,null,i,L,b,T,!0,!0),(null==L?void 0:L.onMountDeferred)&&L.onMountDeferred(r.buildOnMountInvocationContext(n,u,c,i))},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 P()},get loadingParallelMap(){return O.current?l.current:null},get errorParallelMap(){return O.current?d.current:null}}}function m(t,n){var u=e.useMemo((function(){return n instanceof Function?n:function(e){return w(e,n)}}),[n]);return x(t.addStateListener,t.getSnapshot,t.getSnapshot,u,r.globalConfig.comparator)}function T(r,t,n){void 0===t&&(t=null),void 0===n&&(n=!0);var u=e.useReducer((function(e){return e>100?0:e+1}),0)[1],o=e.useRef(r);return r.setProps(t),e.useLayoutEffect((function(){r.init(t)}),[]),e.useLayoutEffect((function(){if(n)return o.current.addStateListener((function(){u()}))}),[n]),r}function j(r,t,n){void 0===n&&(n=!0);var u=e.useRef();return null==u.current&&(u.current=M(r)),e.useEffect((function(){return u.current.invokeOnMountDeferred(),function(){var e;null===(e=u.current)||void 0===e||e.destroy()}}),[]),T(u.current,t,n)}function w(e,r){return r.reduce((function(r,t){return e.hasOwnProperty(t)&&(r[t]=e[t]),r}),{})}Object.defineProperty(exports,"EffectError",{enumerable:!0,get:function(){return r.EffectError}}),Object.defineProperty(exports,"ParallelActionError",{enumerable:!0,get:function(){return r.ParallelActionError}}),Object.defineProperty(exports,"setGlobalConfig",{enumerable:!0,get:function(){return r.setGlobalConfig}}),exports.createStore=M,exports.default=j,exports.pick=w,exports.slice=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(r){return w(r,e)}},exports.useLocalStore=j,exports.useStore=T,exports.useStoreContextSlice=function(r,t){return m(e.useContext(r),t)},exports.useStoreSlice=m;
|
|
1
|
+
"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e=require("react"),r=require("./impl"),t=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 r,t=1,n=arguments.length;t<n;t++)for(var u in r=arguments[t])Object.prototype.hasOwnProperty.call(r,u)&&(e[u]=r[u]);return e},o.apply(this,arguments)};function c(e){var r={exports:{}};return e(r,r.exports),r.exports}var i="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},a=u.default.useState,l=u.default.useEffect,f=u.default.useLayoutEffect,s=u.default.useDebugValue;function d(e){var r=e.getSnapshot;e=e.value;try{var t=r();return!i(e,t)}catch(e){return!0}}var v="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,r){return r()}:function(e,r){var t=r(),n=a({inst:{value:t,getSnapshot:r}}),u=n[0].inst,o=n[1];return f((function(){u.value=t,u.getSnapshot=r,d(u)&&o({inst:u})}),[e,t,r]),l((function(){return d(u)&&o({inst:u}),e((function(){d(u)&&o({inst:u})}))}),[e]),s(t),t},p={useSyncExternalStore:void 0!==u.default.useSyncExternalStore?u.default.useSyncExternalStore:v},O=c((function(e,r){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=u.default,t=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function n(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),u=1;u<r;u++)n[u-1]=arguments[u];!function(e,r,n){var u=t.ReactDebugCurrentFrame.getStackAddendum();""!==u&&(r+="%s",n=n.concat([u]));var o=n.map((function(e){return String(e)}));o.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,o)}("error",e,n)}var o="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},c=e.useState,i=e.useEffect,a=e.useLayoutEffect,l=e.useDebugValue,f=!1,s=!1;function d(e){var r=e.getSnapshot,t=e.value;try{var n=r();return!o(t,n)}catch(e){return!0}}var v=!!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement)?function(e,r,t){return r()}:function(r,t,u){f||void 0!==e.startTransition&&(f=!0,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."));var v=t();if(!s){var p=t();o(v,p)||(n("The result of getSnapshot should be cached to avoid an infinite loop"),s=!0)}var O=c({inst:{value:v,getSnapshot:t}}),_=O[0].inst,E=O[1];return a((function(){_.value=v,_.getSnapshot=t,d(_)&&E({inst:_})}),[r,v,t]),i((function(){d(_)&&E({inst:_});return r((function(){d(_)&&E({inst:_})}))}),[r]),l(v),v},p=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:v;r.useSyncExternalStore=p,"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),_=c((function(e){"production"===process.env.NODE_ENV?e.exports=p:e.exports=O}));var E,S="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},y=_.useSyncExternalStore,g=u.default.useRef,L=u.default.useEffect,b=u.default.useMemo,A=u.default.useDebugValue,h={useSyncExternalStoreWithSelector:function(e,r,t,n,u){var o=g(null);if(null===o.current){var c={hasValue:!1,value:null};o.current=c}else c=o.current;o=b((function(){function e(e){if(!a){if(a=!0,o=e,e=n(e),void 0!==u&&c.hasValue){var r=c.value;if(u(r,e))return i=r}return i=e}if(r=i,S(o,e))return r;var t=n(e);return void 0!==u&&u(r,t)?r:(o=e,i=t)}var o,i,a=!1,l=void 0===t?null:t;return[function(){return e(r())},null===l?void 0:function(){return e(l())}]}),[r,t,n,u]);var i=y(e,o[0],o[1]);return L((function(){c.hasValue=!0,c.value=i}),[i]),A(i),i}},R=c((function(e,r){"production"!==process.env.NODE_ENV&&function(){"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error);var e=u.default,t=_;var n="function"==typeof Object.is?Object.is:function(e,r){return e===r&&(0!==e||1/e==1/r)||e!=e&&r!=r},o=t.useSyncExternalStore,c=e.useRef,i=e.useEffect,a=e.useMemo,l=e.useDebugValue;r.useSyncExternalStoreWithSelector=function(e,r,t,u,f){var s,d=c(null);null===d.current?(s={hasValue:!1,value:null},d.current=s):s=d.current;var v=a((function(){var e,o,c=!1,i=function(r){if(!c){c=!0,e=r;var t=u(r);if(void 0!==f&&s.hasValue){var i=s.value;if(f(i,t))return o=i,i}return o=t,t}var a=o;if(n(e,r))return a;var l=u(r);return void 0!==f&&f(a,l)?a:(e=r,o=l,l)},a=void 0===t?null:t;return[function(){return i(r())},null===a?void 0:function(){return i(a())}]}),[r,t,u,f]),p=v[0],O=v[1],_=o(e,p,O);return i((function(){s.hasValue=!0,s.value=_}),[_]),l(_),_},"undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error)}()})),x=c((function(e){"production"===process.env.NODE_ENV?e.exports=h:e.exports=R}));exports.ConflictPolicy=void 0,(E=exports.ConflictPolicy||(exports.ConflictPolicy={})).REJECT="reject",E.IGNORE="ignore",E.KEEP_LAST="keepLast",E.KEEP_ALL="keepAll",E.PARALLEL="parallel",E.REUSE="reuse";var D=x.useSyncExternalStoreWithSelector,M=_.useSyncExternalStore;function m(e){var n=r.createRef(),u=r.createRef(),c=r.createRef(),i=r.createRef(),a=r.createRef(),l=r.createRef(),f=r.createRef(),s=r.createRef(),d=r.createRef(),v=r.createRef(),p=r.createRef(),O=r.createRef(!1),_=r.createRef(),E=r.createRef([]),S=e.actions,y=e.middlewares,g=void 0===y?[]:y,L=function(e,r){var t={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&r.indexOf(n)<0&&(t[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var u=0;for(n=Object.getOwnPropertySymbols(e);u<n.length;u++)r.indexOf(n[u])<0&&Object.prototype.propertyIsEnumerable.call(e,n[u])&&(t[n[u]]=e[n[u]])}return t}(e,["actions","middlewares"]),b=e.getInitialState||function(){return e.initialState},A={},h=0;function R(){_.current=o(o(o(o({},i.current),n.current),u.current.state),{isLoading:w,abortAction:C,loading:s.current,loadingMap:f.current,loadingParallelMap:l.current,errorMap:P(),errorParallelMap:d.current}),Object.keys(A).forEach((function(e){var r;null===(r=A[e])||void 0===r||r.call(A)}))}function x(e){n.current=e,r.computeDerivedValues(n,c,u,L),R()}function D(e){l.current=e,f.current=function(){if(O.current){var e=l.current;return Object.keys(e).reduce((function(r,t){var n=e[t];return r[t]=null!=Object.keys(n).find((function(e){return!!n[e]})),r}),{})}return null}(),s.current=function(){if(O.current){var e=l.current;return null!=Object.keys(e).find((function(r){var t=e[r];return Object.keys(t).find((function(e){return!!t[e]}))}))}return null}()}function M(o){var l;if(!O.current){c.current=o,O.current=!0,n.current=b(o);var f=new Set(null==L?void 0:L.initialActionsMarkedLoading),s=Object.keys(S).reduce((function(e,t){var n;return e[t]=f.has(t)?((n={})[r.DEFAULT_PROMISE_ID]=!0,n):{},e}),{});D(s),d.current=Object.keys(S).reduce((function(e,r){return e[r]={},e}),{}),a.current={},v.current={},p.current={},u.current={state:null,deps:{}},(null==L?void 0:L.derivedState)&&r.fixDerivedDeps(L),E.current=[];var _={options:L,get state(){return n.current},actions:S,setState:x};e.logEnabled&&t.logDetailedEffects&&g.push(t.logDetailedEffects());var y=function(e){var r,t=e();E.current.push(t),null===(r=t.init)||void 0===r||r.call(t,_)};null===(l=r.globalConfig.defaultMiddlewares)||void 0===l||l.forEach(y),null==g||g.forEach(y),r.computeDerivedValues(n,c,u,L),r.onPropChange(n,u,c,null,i,L,b,T,!0,!1),(null==L?void 0:L.onMount)&&L.onMount(r.buildOnMountInvocationContext(n,u,c,i)),R()}}function m(e,t){void 0===t&&(t=r.DEFAULT_PROMISE_ID);var n=d.current[e];(null==n?void 0:n[t])&&delete n[t],R()}function T(e,t,o,i,a,f,s,d){void 0===s&&(s=!1),void 0===d&&(d=!1);var v=!1;if(O.current){var p=t,_=!!a&&r.isLoadingImpl(p||l.current,[o,null==f?void 0:f.promiseId]),S=r.runMiddlewares(E.current,n.current,e,_,o,i,a,f),y=S.newState,g=S.newLoading;if(null!=y&&(v=!0,n.current=y),_!==g&&(p=r.buildLoadingMap(p,o,(null==f?void 0:f.promiseId)||r.DEFAULT_PROMISE_ID,g),0===Object.keys(p).length&&(p=void 0)),null!=p&&(v=!0,D(p)),v)r.computeDerivedValues(n,c,u,L),d||(n.current=y||n.current,R());else if(s){r.computeDerivedValues(n,c,u,L)&&!d&&R()}}}var j=Object.keys(S);function w(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];return r.isLoadingImpl.apply(void 0,function(e,r,t){if(t||2===arguments.length)for(var n,u=0,o=r.length;u<o;u++)!n&&u in r||(n||(n=Array.prototype.slice.call(r,0,u)),n[u]=r[u]);return e.concat(n||Array.prototype.slice.call(r))}([l.current],e,!1))}function C(e,t){var n,u;void 0===t&&(t=r.DEFAULT_PROMISE_ID);var o=null===(u=null===(n=v.current[e])||void 0===n?void 0:n[t])||void 0===u?void 0:u.abortController,c=!1;return o&&(o.abort(),c=!0),c}function P(){return O.current?r.buildErrorMap(d.current):null}return i.current=j.reduce((function(e,t){var o=S[t];return r.isSimpleSyncAction(o)?e[t]=r.decorateSimpleSyncAction(t,o,n,u,c,O,L,T):r.isAsyncAction(o)?e[t]=r.decorateAsyncAction({actionName:t,stateRef:n,derivedStateRef:u,propsRef:c,loadingParallelMapRef:l,errorMapRef:d,actionsRef:i,promisesRef:v,conflictActionsRef:p,initializedRef:O,options:L,setState:T,clearError:m,action:r.computeAsyncActionInput(o)}):r.isSyncAction(o)&&(e[t]=r.decorateSyncAction(t,o,n,u,c,i,O,a,L,T,m)),e}),{}),{getConfig:function(){return o({},e)},setProps:function(e){var t=c.current;c.current=e,O.current?r.onPropChange(n,u,c,t,i,L,b,T,!1,!1):M(e)},addStateListener:function(e){var r="".concat(h++);return A[r]=e,function(){delete A[r]}},init:M,destroy:function(){var e;if(O.current){var t=Object.keys(S).reduce((function(e,t){var n=S[t];if(r.isAsyncAction(n)&&n.abortable){var u=l.current[t],o=Object.keys(u).reduce((function(e,r){return u[r]&&(C(t,r),e.push(r)),e}),[]);o.length>0&&(e[t]=o)}return e}),{});null===(e=null==L?void 0:L.onUnmount)||void 0===e||e.call(L,r.buildOnUnMountInvocationContext(n,u,c,t)),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,_.current=null,Object.keys(a.current).forEach((function(e){clearTimeout(a.current[e])})),a.current=null,A={},O.current=!1,E.current.forEach((function(e){var r;null===(r=e.destroy)||void 0===r||r.call(e)})),E.current=[]}},isLoading:w,abortAction:C,clearError:m,getSnapshot:function(){return _.current},invokeOnMountDeferred:function(){r.onPropChange(n,u,c,null,i,L,b,T,!0,!0),(null==L?void 0:L.onMountDeferred)&&L.onMountDeferred(r.buildOnMountInvocationContext(n,u,c,i))},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 P()},get loadingParallelMap(){return O.current?l.current:null},get errorParallelMap(){return O.current?d.current:null}}}function T(t,n){var u=e.useMemo((function(){return n instanceof Function?n:function(e){return w(e,n)}}),[n]);return D(t.addStateListener,t.getSnapshot,t.getSnapshot,u,r.globalConfig.comparator)}function j(r,t,n){void 0===n&&(n=!0);var u=e.useRef();return null==u.current&&(u.current=m(r)),e.useEffect((function(){return u.current.invokeOnMountDeferred(),function(){var e;null===(e=u.current)||void 0===e||e.destroy()}}),[]),function(r,t,n){void 0===t&&(t=null),void 0===n&&(n=!0);var u=e.useReducer((function(e){return e>100?0:e+1}),0)[1],o=e.useRef(r);return r.setProps(t),e.useLayoutEffect((function(){r.init(t)}),[]),e.useLayoutEffect((function(){if(n)return o.current.addStateListener((function(){u()}))}),[n]),r}(u.current,t,n)}function w(e,r){return r.reduce((function(r,t){return e.hasOwnProperty(t)&&(r[t]=e[t]),r}),{})}Object.defineProperty(exports,"EffectError",{enumerable:!0,get:function(){return r.EffectError}}),Object.defineProperty(exports,"ParallelActionError",{enumerable:!0,get:function(){return r.ParallelActionError}}),Object.defineProperty(exports,"setGlobalConfig",{enumerable:!0,get:function(){return r.setGlobalConfig}}),exports.createStore=m,exports.default=j,exports.pick=w,exports.slice=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(r){return w(r,e)}},exports.useLocalStore=j,exports.useStore=function(e){return M(e.addStateListener,e.getSnapshot)},exports.useStoreContextSlice=function(r,t){return T(e.useContext(r),t)},exports.useStoreSlice=T;
|
|
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.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.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.min.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":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n// dispatch for CommonJS interop named imports.\n\nvar useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nvar didWarnOld18Alpha = false;\nvar didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n {\n if (!didWarnOld18Alpha) {\n if (React.startTransition !== undefined) {\n didWarnOld18Alpha = true;\n\n 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.');\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n var value = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n\n if (!objectIs(value, cachedValue)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n var _useState = useState({\n inst: {\n value: value,\n getSnapshot: getSnapshot\n }\n }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n\n useLayoutEffect(function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }, [subscribe, value, getSnapshot]);\n useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n\n var handleStoreChange = function () {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar isServerEnvironment = !canUseDOM;\n\nvar shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;\nvar useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim;\n\nexports.useSyncExternalStore = useSyncExternalStore$2;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.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.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.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","k","is","a","b","l","e","useState","m","useEffect","useLayoutEffect","useDebugValue","r","getSnapshot","value","d","f","u","window","document","createElement","inst","c","g","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","React","require$$0","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","error","format","_len2","args","Array","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","console","printWarning","objectIs","x","y","didWarnOld18Alpha","didWarnUncachedGetSnapshot","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","shim","subscribe","getServerSnapshot","undefined","startTransition","cachedValue","_useState","forceUpdate","useSyncExternalStore$2","exports","registerInternalModuleStop","module","require$$1","q","h","useRef","v","useMemo","w","current","hasValue","selector","isEqual","instRef","_useMemo","memoizedSnapshot","memoizedSelection","hasMemo","memoizedSelector","nextSnapshot","_nextSelection","currentSelection","prevSelection","nextSelection","maybeGetServerSnapshot","getSelection","getServerSelection","indexOf","getOwnPropertySymbols","propertyIsEnumerable","to","from","pack","ar","slice"],"mappings":"6NA+BWA,EAAW,WAQlB,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,GAEJH,EAASa,MAAMC,KAAMP,UAChC,mEC/BmG,IAAIQ,EAAE,mBAAoBd,OAAOe,GAAGf,OAAOe,GAA1G,SAAWC,EAAEC,GAAG,OAAOD,IAAIC,IAAI,IAAID,GAAG,EAAEA,GAAI,EAAEC,IAAID,GAAIA,GAAGC,GAAIA,CAAC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eAAeC,KAAKR,EAAGK,IAAMW,EAAE8F,QAAQzG,GAAK,IAC9EN,EAAEM,GAAKL,EAAEK,IACb,GAAS,MAALL,GAAqD,mBAAjCH,OAAOkH,sBACtB,KAAI9G,EAAI,EAAb,IAAgBI,EAAIR,OAAOkH,sBAAsB/G,GAAIC,EAAII,EAAED,OAAQH,IAC3De,EAAE8F,QAAQzG,EAAEJ,IAAM,GAAKJ,OAAOS,UAAU0G,qBAAqBxG,KAAKR,EAAGK,EAAEJ,MACvEF,EAAEM,EAAEJ,IAAMD,EAAEK,EAAEJ,IAF4B,CAItD,OAAOF,CACX,kjFAgHO,SAAuBkH,EAAIC,EAAMC,GACpC,GAAIA,GAA6B,IAArBhH,UAAUC,OAAc,IAAK,IAA4BgH,EAAxBnH,EAAI,EAAGc,EAAImG,EAAK9G,OAAYH,EAAIc,EAAGd,KACxEmH,GAAQnH,KAAKiH,IACRE,IAAIA,EAAKnE,MAAM3C,UAAU+G,MAAM7G,KAAK0G,EAAM,EAAGjH,IAClDmH,EAAGnH,GAAKiH,EAAKjH,IAGrB,OAAOgH,EAAG1D,OAAO6D,GAAMnE,MAAM3C,UAAU+G,MAAM7G,KAAK0G,GACtD"}
|
|
1
|
+
{"version":3,"file":"index.js","sources":["../node_modules/tslib/tslib.es6.js","../node_modules/use-sync-external-store/cjs/use-sync-external-store-shim.production.min.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.min.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":["/*! *****************************************************************************\r\nCopyright (c) Microsoft Corporation.\r\n\r\nPermission to use, copy, modify, and/or distribute this software for any\r\npurpose with or without fee is hereby granted.\r\n\r\nTHE SOFTWARE IS PROVIDED \"AS IS\" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH\r\nREGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY\r\nAND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,\r\nINDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM\r\nLOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR\r\nOTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR\r\nPERFORMANCE OF THIS SOFTWARE.\r\n***************************************************************************** */\r\n/* global Reflect, Promise */\r\n\r\nvar extendStatics = function(d, b) {\r\n extendStatics = Object.setPrototypeOf ||\r\n ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||\r\n function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };\r\n return extendStatics(d, b);\r\n};\r\n\r\nexport function __extends(d, b) {\r\n if (typeof b !== \"function\" && b !== null)\r\n throw new TypeError(\"Class extends value \" + String(b) + \" is not a constructor or null\");\r\n extendStatics(d, b);\r\n function __() { this.constructor = d; }\r\n d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());\r\n}\r\n\r\nexport var __assign = function() {\r\n __assign = Object.assign || function __assign(t) {\r\n for (var s, i = 1, n = arguments.length; i < n; i++) {\r\n s = arguments[i];\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) t[p] = s[p];\r\n }\r\n return t;\r\n }\r\n return __assign.apply(this, arguments);\r\n}\r\n\r\nexport function __rest(s, e) {\r\n var t = {};\r\n for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)\r\n t[p] = s[p];\r\n if (s != null && typeof Object.getOwnPropertySymbols === \"function\")\r\n for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {\r\n if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))\r\n t[p[i]] = s[p[i]];\r\n }\r\n return t;\r\n}\r\n\r\nexport function __decorate(decorators, target, key, desc) {\r\n var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;\r\n if (typeof Reflect === \"object\" && typeof Reflect.decorate === \"function\") r = Reflect.decorate(decorators, target, key, desc);\r\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;\r\n return c > 3 && r && Object.defineProperty(target, key, r), r;\r\n}\r\n\r\nexport function __param(paramIndex, decorator) {\r\n return function (target, key) { decorator(target, key, paramIndex); }\r\n}\r\n\r\nexport function __metadata(metadataKey, metadataValue) {\r\n if (typeof Reflect === \"object\" && typeof Reflect.metadata === \"function\") return Reflect.metadata(metadataKey, metadataValue);\r\n}\r\n\r\nexport function __awaiter(thisArg, _arguments, P, generator) {\r\n function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }\r\n return new (P || (P = Promise))(function (resolve, reject) {\r\n function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }\r\n function rejected(value) { try { step(generator[\"throw\"](value)); } catch (e) { reject(e); } }\r\n function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }\r\n step((generator = generator.apply(thisArg, _arguments || [])).next());\r\n });\r\n}\r\n\r\nexport function __generator(thisArg, body) {\r\n var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;\r\n return g = { next: verb(0), \"throw\": verb(1), \"return\": verb(2) }, typeof Symbol === \"function\" && (g[Symbol.iterator] = function() { return this; }), g;\r\n function verb(n) { return function (v) { return step([n, v]); }; }\r\n function step(op) {\r\n if (f) throw new TypeError(\"Generator is already executing.\");\r\n while (_) try {\r\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;\r\n if (y = 0, t) op = [op[0] & 2, t.value];\r\n switch (op[0]) {\r\n case 0: case 1: t = op; break;\r\n case 4: _.label++; return { value: op[1], done: false };\r\n case 5: _.label++; y = op[1]; op = [0]; continue;\r\n case 7: op = _.ops.pop(); _.trys.pop(); continue;\r\n default:\r\n if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }\r\n if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }\r\n if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }\r\n if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }\r\n if (t[2]) _.ops.pop();\r\n _.trys.pop(); continue;\r\n }\r\n op = body.call(thisArg, _);\r\n } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }\r\n if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };\r\n }\r\n}\r\n\r\nexport var __createBinding = Object.create ? (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } });\r\n}) : (function(o, m, k, k2) {\r\n if (k2 === undefined) k2 = k;\r\n o[k2] = m[k];\r\n});\r\n\r\nexport function __exportStar(m, o) {\r\n for (var p in m) if (p !== \"default\" && !Object.prototype.hasOwnProperty.call(o, p)) __createBinding(o, m, p);\r\n}\r\n\r\nexport function __values(o) {\r\n var s = typeof Symbol === \"function\" && Symbol.iterator, m = s && o[s], i = 0;\r\n if (m) return m.call(o);\r\n if (o && typeof o.length === \"number\") return {\r\n next: function () {\r\n if (o && i >= o.length) o = void 0;\r\n return { value: o && o[i++], done: !o };\r\n }\r\n };\r\n throw new TypeError(s ? \"Object is not iterable.\" : \"Symbol.iterator is not defined.\");\r\n}\r\n\r\nexport function __read(o, n) {\r\n var m = typeof Symbol === \"function\" && o[Symbol.iterator];\r\n if (!m) return o;\r\n var i = m.call(o), r, ar = [], e;\r\n try {\r\n while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value);\r\n }\r\n catch (error) { e = { error: error }; }\r\n finally {\r\n try {\r\n if (r && !r.done && (m = i[\"return\"])) m.call(i);\r\n }\r\n finally { if (e) throw e.error; }\r\n }\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spread() {\r\n for (var ar = [], i = 0; i < arguments.length; i++)\r\n ar = ar.concat(__read(arguments[i]));\r\n return ar;\r\n}\r\n\r\n/** @deprecated */\r\nexport function __spreadArrays() {\r\n for (var s = 0, i = 0, il = arguments.length; i < il; i++) s += arguments[i].length;\r\n for (var r = Array(s), k = 0, i = 0; i < il; i++)\r\n for (var a = arguments[i], j = 0, jl = a.length; j < jl; j++, k++)\r\n r[k] = a[j];\r\n return r;\r\n}\r\n\r\nexport function __spreadArray(to, from, pack) {\r\n if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {\r\n if (ar || !(i in from)) {\r\n if (!ar) ar = Array.prototype.slice.call(from, 0, i);\r\n ar[i] = from[i];\r\n }\r\n }\r\n return to.concat(ar || Array.prototype.slice.call(from));\r\n}\r\n\r\nexport function __await(v) {\r\n return this instanceof __await ? (this.v = v, this) : new __await(v);\r\n}\r\n\r\nexport function __asyncGenerator(thisArg, _arguments, generator) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var g = generator.apply(thisArg, _arguments || []), i, q = [];\r\n return i = {}, verb(\"next\"), verb(\"throw\"), verb(\"return\"), i[Symbol.asyncIterator] = function () { return this; }, i;\r\n function verb(n) { if (g[n]) i[n] = function (v) { return new Promise(function (a, b) { q.push([n, v, a, b]) > 1 || resume(n, v); }); }; }\r\n function resume(n, v) { try { step(g[n](v)); } catch (e) { settle(q[0][3], e); } }\r\n function step(r) { r.value instanceof __await ? Promise.resolve(r.value.v).then(fulfill, reject) : settle(q[0][2], r); }\r\n function fulfill(value) { resume(\"next\", value); }\r\n function reject(value) { resume(\"throw\", value); }\r\n function settle(f, v) { if (f(v), q.shift(), q.length) resume(q[0][0], q[0][1]); }\r\n}\r\n\r\nexport function __asyncDelegator(o) {\r\n var i, p;\r\n return i = {}, verb(\"next\"), verb(\"throw\", function (e) { throw e; }), verb(\"return\"), i[Symbol.iterator] = function () { return this; }, i;\r\n function verb(n, f) { i[n] = o[n] ? function (v) { return (p = !p) ? { value: __await(o[n](v)), done: n === \"return\" } : f ? f(v) : v; } : f; }\r\n}\r\n\r\nexport function __asyncValues(o) {\r\n if (!Symbol.asyncIterator) throw new TypeError(\"Symbol.asyncIterator is not defined.\");\r\n var m = o[Symbol.asyncIterator], i;\r\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);\r\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); }); }; }\r\n function settle(resolve, reject, d, v) { Promise.resolve(v).then(function(v) { resolve({ value: v, done: d }); }, reject); }\r\n}\r\n\r\nexport function __makeTemplateObject(cooked, raw) {\r\n if (Object.defineProperty) { Object.defineProperty(cooked, \"raw\", { value: raw }); } else { cooked.raw = raw; }\r\n return cooked;\r\n};\r\n\r\nvar __setModuleDefault = Object.create ? (function(o, v) {\r\n Object.defineProperty(o, \"default\", { enumerable: true, value: v });\r\n}) : function(o, v) {\r\n o[\"default\"] = v;\r\n};\r\n\r\nexport function __importStar(mod) {\r\n if (mod && mod.__esModule) return mod;\r\n var result = {};\r\n if (mod != null) for (var k in mod) if (k !== \"default\" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);\r\n __setModuleDefault(result, mod);\r\n return result;\r\n}\r\n\r\nexport function __importDefault(mod) {\r\n return (mod && mod.__esModule) ? mod : { default: mod };\r\n}\r\n\r\nexport function __classPrivateFieldGet(receiver, state, kind, f) {\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\r\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\");\r\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\r\n}\r\n\r\nexport function __classPrivateFieldSet(receiver, state, value, kind, f) {\r\n if (kind === \"m\") throw new TypeError(\"Private method is not writable\");\r\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a setter\");\r\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\");\r\n return (kind === \"a\" ? f.call(receiver, value) : f ? f.value = value : state.set(receiver, value)), value;\r\n}\r\n","/**\n * @license React\n * use-sync-external-store-shim.production.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var e=require(\"react\");function h(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var k=\"function\"===typeof Object.is?Object.is:h,l=e.useState,m=e.useEffect,n=e.useLayoutEffect,p=e.useDebugValue;function q(a,b){var d=b(),f=l({inst:{value:d,getSnapshot:b}}),c=f[0].inst,g=f[1];n(function(){c.value=d;c.getSnapshot=b;r(c)&&g({inst:c})},[a,d,b]);m(function(){r(c)&&g({inst:c});return a(function(){r(c)&&g({inst:c})})},[a]);p(d);return d}\nfunction r(a){var b=a.getSnapshot;a=a.value;try{var d=b();return!k(a,d)}catch(f){return!0}}function t(a,b){return b()}var u=\"undefined\"===typeof window||\"undefined\"===typeof window.document||\"undefined\"===typeof window.document.createElement?t:q;exports.useSyncExternalStore=void 0!==e.useSyncExternalStore?e.useSyncExternalStore:u;\n","/**\n * @license React\n * use-sync-external-store-shim.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\n\nvar ReactSharedInternals = React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;\n\nfunction error(format) {\n {\n {\n for (var _len2 = arguments.length, args = new Array(_len2 > 1 ? _len2 - 1 : 0), _key2 = 1; _key2 < _len2; _key2++) {\n args[_key2 - 1] = arguments[_key2];\n }\n\n printWarning('error', format, args);\n }\n }\n}\n\nfunction printWarning(level, format, args) {\n // When changing this logic, you might want to also\n // update consoleWithStackDev.www.js as well.\n {\n var ReactDebugCurrentFrame = ReactSharedInternals.ReactDebugCurrentFrame;\n var stack = ReactDebugCurrentFrame.getStackAddendum();\n\n if (stack !== '') {\n format += '%s';\n args = args.concat([stack]);\n } // eslint-disable-next-line react-internal/safe-string-coercion\n\n\n var argsWithFormat = args.map(function (item) {\n return String(item);\n }); // Careful: RN currently depends on this prefix\n\n argsWithFormat.unshift('Warning: ' + format); // We intentionally don't use spread (or .apply) directly because it\n // breaks IE9: https://github.com/facebook/react/issues/13610\n // eslint-disable-next-line react-internal/no-production-logging\n\n Function.prototype.apply.call(console[level], console, argsWithFormat);\n }\n}\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\n// dispatch for CommonJS interop named imports.\n\nvar useState = React.useState,\n useEffect = React.useEffect,\n useLayoutEffect = React.useLayoutEffect,\n useDebugValue = React.useDebugValue;\nvar didWarnOld18Alpha = false;\nvar didWarnUncachedGetSnapshot = false; // Disclaimer: This shim breaks many of the rules of React, and only works\n// because of a very particular set of implementation details and assumptions\n// -- change any one of them and it will break. The most important assumption\n// is that updates are always synchronous, because concurrent rendering is\n// only available in versions of React that also have a built-in\n// useSyncExternalStore API. And we only use this shim when the built-in API\n// does not exist.\n//\n// Do not assume that the clever hacks used by this hook also work in general.\n// The point of this shim is to replace the need for hacks by other libraries.\n\nfunction useSyncExternalStore(subscribe, getSnapshot, // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n// React do not expose a way to check if we're hydrating. So users of the shim\n// will need to track that themselves and return the correct value\n// from `getSnapshot`.\ngetServerSnapshot) {\n {\n if (!didWarnOld18Alpha) {\n if (React.startTransition !== undefined) {\n didWarnOld18Alpha = true;\n\n 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.');\n }\n }\n } // Read the current snapshot from the store on every render. Again, this\n // breaks the rules of React, and only works here because of specific\n // implementation details, most importantly that updates are\n // always synchronous.\n\n\n var value = getSnapshot();\n\n {\n if (!didWarnUncachedGetSnapshot) {\n var cachedValue = getSnapshot();\n\n if (!objectIs(value, cachedValue)) {\n error('The result of getSnapshot should be cached to avoid an infinite loop');\n\n didWarnUncachedGetSnapshot = true;\n }\n }\n } // Because updates are synchronous, we don't queue them. Instead we force a\n // re-render whenever the subscribed state changes by updating an some\n // arbitrary useState hook. Then, during render, we call getSnapshot to read\n // the current value.\n //\n // Because we don't actually use the state returned by the useState hook, we\n // can save a bit of memory by storing other stuff in that slot.\n //\n // To implement the early bailout, we need to track some things on a mutable\n // object. Usually, we would put that in a useRef hook, but we can stash it in\n // our useState hook instead.\n //\n // To force a re-render, we call forceUpdate({inst}). That works because the\n // new object always fails an equality check.\n\n\n var _useState = useState({\n inst: {\n value: value,\n getSnapshot: getSnapshot\n }\n }),\n inst = _useState[0].inst,\n forceUpdate = _useState[1]; // Track the latest getSnapshot function with a ref. This needs to be updated\n // in the layout phase so we can access it during the tearing check that\n // happens on subscribe.\n\n\n useLayoutEffect(function () {\n inst.value = value;\n inst.getSnapshot = getSnapshot; // Whenever getSnapshot or subscribe changes, we need to check in the\n // commit phase if there was an interleaved mutation. In concurrent mode\n // this can happen all the time, but even in synchronous mode, an earlier\n // effect may have mutated the store.\n\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }, [subscribe, value, getSnapshot]);\n useEffect(function () {\n // Check for changes right before subscribing. Subsequent changes will be\n // detected in the subscription handler.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n\n var handleStoreChange = function () {\n // TODO: Because there is no cross-renderer API for batching updates, it's\n // up to the consumer of this library to wrap their subscription event\n // with unstable_batchedUpdates. Should we try to detect when this isn't\n // the case and print a warning in development?\n // The store changed. Check if the snapshot changed since the last time we\n // read from the store.\n if (checkIfSnapshotChanged(inst)) {\n // Force a re-render.\n forceUpdate({\n inst: inst\n });\n }\n }; // Subscribe to the store and return a clean-up function.\n\n\n return subscribe(handleStoreChange);\n }, [subscribe]);\n useDebugValue(value);\n return value;\n}\n\nfunction checkIfSnapshotChanged(inst) {\n var latestGetSnapshot = inst.getSnapshot;\n var prevValue = inst.value;\n\n try {\n var nextValue = latestGetSnapshot();\n return !objectIs(prevValue, nextValue);\n } catch (error) {\n return true;\n }\n}\n\nfunction useSyncExternalStore$1(subscribe, getSnapshot, getServerSnapshot) {\n // Note: The shim does not use getServerSnapshot, because pre-18 versions of\n // React do not expose a way to check if we're hydrating. So users of the shim\n // will need to track that themselves and return the correct value\n // from `getSnapshot`.\n return getSnapshot();\n}\n\nvar canUseDOM = !!(typeof window !== 'undefined' && typeof window.document !== 'undefined' && typeof window.document.createElement !== 'undefined');\n\nvar isServerEnvironment = !canUseDOM;\n\nvar shim = isServerEnvironment ? useSyncExternalStore$1 : useSyncExternalStore;\nvar useSyncExternalStore$2 = React.useSyncExternalStore !== undefined ? React.useSyncExternalStore : shim;\n\nexports.useSyncExternalStore = useSyncExternalStore$2;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim.production.min.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.min.js\n *\n * Copyright (c) Facebook, Inc. and its 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'use strict';var h=require(\"react\"),n=require(\"use-sync-external-store/shim\");function p(a,b){return a===b&&(0!==a||1/a===1/b)||a!==a&&b!==b}var q=\"function\"===typeof Object.is?Object.is:p,r=n.useSyncExternalStore,t=h.useRef,u=h.useEffect,v=h.useMemo,w=h.useDebugValue;\nexports.useSyncExternalStoreWithSelector=function(a,b,e,l,g){var c=t(null);if(null===c.current){var f={hasValue:!1,value:null};c.current=f}else f=c.current;c=v(function(){function a(a){if(!c){c=!0;d=a;a=l(a);if(void 0!==g&&f.hasValue){var b=f.value;if(g(b,a))return k=b}return k=a}b=k;if(q(d,a))return b;var e=l(a);if(void 0!==g&&g(b,e))return b;d=a;return k=e}var c=!1,d,k,m=void 0===e?null:e;return[function(){return a(b())},null===m?void 0:function(){return a(m())}]},[b,e,l,g]);var d=r(a,c[0],c[1]);\nu(function(){f.hasValue=!0;f.value=d},[d]);w(d);return d};\n","/**\n * @license React\n * use-sync-external-store-shim/with-selector.development.js\n *\n * Copyright (c) Facebook, Inc. and its 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\nif (process.env.NODE_ENV !== \"production\") {\n (function() {\n\n 'use strict';\n\n/* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());\n}\n var React = require('react');\nvar shim = require('use-sync-external-store/shim');\n\n/**\n * inlined Object.is polyfill to avoid requiring consumers ship their own\n * https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/is\n */\nfunction is(x, y) {\n return x === y && (x !== 0 || 1 / x === 1 / y) || x !== x && y !== y // eslint-disable-line no-self-compare\n ;\n}\n\nvar objectIs = typeof Object.is === 'function' ? Object.is : is;\n\nvar useSyncExternalStore = shim.useSyncExternalStore;\n\n// for CommonJS interop.\n\nvar useRef = React.useRef,\n useEffect = React.useEffect,\n useMemo = React.useMemo,\n useDebugValue = React.useDebugValue; // Same as useSyncExternalStore, but supports selector and isEqual arguments.\n\nfunction useSyncExternalStoreWithSelector(subscribe, getSnapshot, getServerSnapshot, selector, isEqual) {\n // Use this to track the rendered snapshot.\n var instRef = useRef(null);\n var inst;\n\n if (instRef.current === null) {\n inst = {\n hasValue: false,\n value: null\n };\n instRef.current = inst;\n } else {\n inst = instRef.current;\n }\n\n var _useMemo = useMemo(function () {\n // Track the memoized state using closure variables that are local to this\n // memoized instance of a getSnapshot function. Intentionally not using a\n // useRef hook, because that state would be shared across all concurrent\n // copies of the hook/component.\n var hasMemo = false;\n var memoizedSnapshot;\n var memoizedSelection;\n\n var memoizedSelector = function (nextSnapshot) {\n if (!hasMemo) {\n // The first time the hook is called, there is no memoized result.\n hasMemo = true;\n memoizedSnapshot = nextSnapshot;\n\n var _nextSelection = selector(nextSnapshot);\n\n if (isEqual !== undefined) {\n // Even if the selector has changed, the currently rendered selection\n // may be equal to the new selection. We should attempt to reuse the\n // current value if possible, to preserve downstream memoizations.\n if (inst.hasValue) {\n var currentSelection = inst.value;\n\n if (isEqual(currentSelection, _nextSelection)) {\n memoizedSelection = currentSelection;\n return currentSelection;\n }\n }\n }\n\n memoizedSelection = _nextSelection;\n return _nextSelection;\n } // We may be able to reuse the previous invocation's result.\n\n\n // We may be able to reuse the previous invocation's result.\n var prevSnapshot = memoizedSnapshot;\n var prevSelection = memoizedSelection;\n\n if (objectIs(prevSnapshot, nextSnapshot)) {\n // The snapshot is the same as last time. Reuse the previous selection.\n return prevSelection;\n } // The snapshot has changed, so we need to compute a new selection.\n\n\n // The snapshot has changed, so we need to compute a new selection.\n var nextSelection = selector(nextSnapshot); // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n\n // If a custom isEqual function is provided, use that to check if the data\n // has changed. If it hasn't, return the previous selection. That signals\n // to React that the selections are conceptually equal, and we can bail\n // out of rendering.\n if (isEqual !== undefined && isEqual(prevSelection, nextSelection)) {\n return prevSelection;\n }\n\n memoizedSnapshot = nextSnapshot;\n memoizedSelection = nextSelection;\n return nextSelection;\n }; // Assigning this to a constant so that Flow knows it can't change.\n\n\n // Assigning this to a constant so that Flow knows it can't change.\n var maybeGetServerSnapshot = getServerSnapshot === undefined ? null : getServerSnapshot;\n\n var getSnapshotWithSelector = function () {\n return memoizedSelector(getSnapshot());\n };\n\n var getServerSnapshotWithSelector = maybeGetServerSnapshot === null ? undefined : function () {\n return memoizedSelector(maybeGetServerSnapshot());\n };\n return [getSnapshotWithSelector, getServerSnapshotWithSelector];\n }, [getSnapshot, getServerSnapshot, selector, isEqual]),\n getSelection = _useMemo[0],\n getServerSelection = _useMemo[1];\n\n var value = useSyncExternalStore(subscribe, getSelection, getServerSelection);\n useEffect(function () {\n inst.hasValue = true;\n inst.value = value;\n }, [value]);\n useDebugValue(value);\n return value;\n}\n\nexports.useSyncExternalStoreWithSelector = useSyncExternalStoreWithSelector;\n /* global __REACT_DEVTOOLS_GLOBAL_HOOK__ */\nif (\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ !== 'undefined' &&\n typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop ===\n 'function'\n) {\n __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(new Error());\n}\n \n })();\n}\n","'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('../cjs/use-sync-external-store-shim/with-selector.production.min.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","k","is","a","b","l","e","useState","m","useEffect","useLayoutEffect","useDebugValue","r","getSnapshot","value","d","f","u","window","document","createElement","inst","c","g","useSyncExternalStore","process","env","NODE_ENV","__REACT_DEVTOOLS_GLOBAL_HOOK__","registerInternalModuleStart","Error","React","require$$0","ReactSharedInternals","__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED","error","format","_len2","args","Array","_key2","level","stack","ReactDebugCurrentFrame","getStackAddendum","concat","argsWithFormat","map","item","String","unshift","Function","console","printWarning","objectIs","x","y","didWarnOld18Alpha","didWarnUncachedGetSnapshot","checkIfSnapshotChanged","latestGetSnapshot","prevValue","nextValue","shim","subscribe","getServerSnapshot","undefined","startTransition","cachedValue","_useState","forceUpdate","useSyncExternalStore$2","exports","registerInternalModuleStop","module","require$$1","q","h","useRef","v","useMemo","w","current","hasValue","selector","isEqual","instRef","_useMemo","memoizedSnapshot","memoizedSelection","hasMemo","memoizedSelector","nextSnapshot","_nextSelection","currentSelection","prevSelection","nextSelection","maybeGetServerSnapshot","getSelection","getServerSelection","indexOf","getOwnPropertySymbols","propertyIsEnumerable","to","from","pack","ar","slice"],"mappings":"6NA+BWA,EAAW,WAQlB,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,GAEJH,EAASa,MAAMC,KAAMP,UAChC,mEC/BmG,IAAIQ,EAAE,mBAAoBd,OAAOe,GAAGf,OAAOe,GAA1G,SAAWC,EAAEC,GAAG,OAAOD,IAAIC,IAAI,IAAID,GAAG,EAAEA,GAAI,EAAEC,IAAID,GAAIA,GAAGC,GAAIA,CAAC,EAAiDC,EAAEC,UAAEC,SAASC,EAAEF,UAAEG,UAAUjB,EAAEc,UAAEI,gBAAgBf,EAAEW,UAAEK,cACtM,SAASC,EAAET,GAAG,IAAIC,EAAED,EAAEU,YAAYV,EAAEA,EAAEW,MAAM,IAAI,IAAIC,EAAEX,IAAI,OAAOH,EAAEE,EAAEY,EAAE,CAAC,MAAMC,GAAG,OAAM,CAAE,CAAC,CAA4B,IAAIC,EAAE,oBAAqBC,aAAQ,IAAqBA,OAAOC,eAAU,IAAqBD,OAAOC,SAASC,cAAzI,SAAWjB,EAAEC,GAAG,OAAOA,GAAG,EAD+F,SAAWD,EAAEC,GAAG,IAAIW,EAAEX,IAAIY,EAAEX,EAAE,CAACgB,KAAK,CAACP,MAAMC,EAAEF,YAAYT,KAAKkB,EAAEN,EAAE,GAAGK,KAAKE,EAAEP,EAAE,GAAwJ,OAArJxB,GAAE,WAAW8B,EAAER,MAAMC,EAAEO,EAAET,YAAYT,EAAEQ,EAAEU,IAAIC,EAAE,CAACF,KAAKC,GAAG,GAAE,CAACnB,EAAEY,EAAEX,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