atomirx 0.0.7 → 0.0.8
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/dist/react/index.cjs +1 -30
- package/dist/react/index.js +164 -789
- package/package.json +1 -1
- package/vite.config.ts +4 -1
package/dist/react/index.cjs
CHANGED
|
@@ -1,30 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
2
|
-
* @license React
|
|
3
|
-
* react-jsx-runtime.production.min.js
|
|
4
|
-
*
|
|
5
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
6
|
-
*
|
|
7
|
-
* This source code is licensed under the MIT license found in the
|
|
8
|
-
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var ke;function gr(){if(ke)return M;ke=1;var n=R,o=Symbol.for("react.element"),f=Symbol.for("react.fragment"),E=Object.prototype.hasOwnProperty,S=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,j={key:!0,ref:!0,__self:!0,__source:!0};function h(p,i,T){var d,v={},m=null,k=null;T!==void 0&&(m=""+T),i.key!==void 0&&(m=""+i.key),i.ref!==void 0&&(k=i.ref);for(d in i)E.call(i,d)&&!j.hasOwnProperty(d)&&(v[d]=i[d]);if(p&&p.defaultProps)for(d in i=p.defaultProps,i)v[d]===void 0&&(v[d]=i[d]);return{$$typeof:o,type:p,key:m,ref:k,props:v,_owner:S.current}}return M.Fragment=f,M.jsx=h,M.jsxs=h,M}var z={};/**
|
|
10
|
-
* @license React
|
|
11
|
-
* react-jsx-runtime.development.js
|
|
12
|
-
*
|
|
13
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
14
|
-
*
|
|
15
|
-
* This source code is licensed under the MIT license found in the
|
|
16
|
-
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var De;function _r(){return De||(De=1,process.env.NODE_ENV!=="production"&&function(){var n=R,o=Symbol.for("react.element"),f=Symbol.for("react.portal"),E=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),j=Symbol.for("react.profiler"),h=Symbol.for("react.provider"),p=Symbol.for("react.context"),i=Symbol.for("react.forward_ref"),T=Symbol.for("react.suspense"),d=Symbol.for("react.suspense_list"),v=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),k=Symbol.for("react.offscreen"),F=Symbol.iterator,D="@@iterator";function y(e){if(e===null||typeof e!="object")return null;var r=F&&e[F]||e[D];return typeof r=="function"?r:null}var w=n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function g(e){{for(var r=arguments.length,t=new Array(r>1?r-1:0),a=1;a<r;a++)t[a-1]=arguments[a];I("error",e,t)}}function I(e,r,t){{var a=w.ReactDebugCurrentFrame,l=a.getStackAddendum();l!==""&&(r+="%s",t=t.concat([l]));var b=t.map(function(c){return String(c)});b.unshift("Warning: "+r),Function.prototype.apply.call(console[e],console,b)}}var ae=!1,We=!1,$e=!1,qe=!1,Ye=!1,ie;ie=Symbol.for("react.module.reference");function Le(e){return!!(typeof e=="string"||typeof e=="function"||e===E||e===j||Ye||e===S||e===T||e===d||qe||e===k||ae||We||$e||typeof e=="object"&&e!==null&&(e.$$typeof===m||e.$$typeof===v||e.$$typeof===h||e.$$typeof===p||e.$$typeof===i||e.$$typeof===ie||e.getModuleId!==void 0))}function Ue(e,r,t){var a=e.displayName;if(a)return a;var l=r.displayName||r.name||"";return l!==""?t+"("+l+")":t}function se(e){return e.displayName||"Context"}function W(e){if(e==null)return null;if(typeof e.tag=="number"&&g("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case E:return"Fragment";case f:return"Portal";case j:return"Profiler";case S:return"StrictMode";case T:return"Suspense";case d:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case p:var r=e;return se(r)+".Consumer";case h:var t=e;return se(t._context)+".Provider";case i:return Ue(e,e.render,"ForwardRef");case v:var a=e.displayName||null;return a!==null?a:W(e.type)||"Memo";case m:{var l=e,b=l._payload,c=l._init;try{return W(c(b))}catch{return null}}}return null}var $=Object.assign,U=0,ue,ce,le,fe,de,ve,pe;function be(){}be.__reactDisabledLog=!0;function Ve(){{if(U===0){ue=console.log,ce=console.info,le=console.warn,fe=console.error,de=console.group,ve=console.groupCollapsed,pe=console.groupEnd;var e={configurable:!0,enumerable:!0,value:be,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}U++}}function Me(){{if(U--,U===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:$({},e,{value:ue}),info:$({},e,{value:ce}),warn:$({},e,{value:le}),error:$({},e,{value:fe}),group:$({},e,{value:de}),groupCollapsed:$({},e,{value:ve}),groupEnd:$({},e,{value:pe})})}U<0&&g("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}}var G=w.ReactCurrentDispatcher,H;function N(e,r,t){{if(H===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);H=a&&a[1]||""}return`
|
|
18
|
-
`+H+e}}var X=!1,B;{var ze=typeof WeakMap=="function"?WeakMap:Map;B=new ze}function Re(e,r){if(!e||X)return"";{var t=B.get(e);if(t!==void 0)return t}var a;X=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;var b;b=G.current,G.current=null,Ve();try{if(r){var c=function(){throw Error()};if(Object.defineProperty(c.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(c,[])}catch(A){a=A}Reflect.construct(e,[],c)}else{try{c.call()}catch(A){a=A}e.call(c.prototype)}}else{try{throw Error()}catch(A){a=A}e()}}catch(A){if(A&&a&&typeof A.stack=="string"){for(var s=A.stack.split(`
|
|
19
|
-
`),x=a.stack.split(`
|
|
20
|
-
`),_=s.length-1,O=x.length-1;_>=1&&O>=0&&s[_]!==x[O];)O--;for(;_>=1&&O>=0;_--,O--)if(s[_]!==x[O]){if(_!==1||O!==1)do if(_--,O--,O<0||s[_]!==x[O]){var P=`
|
|
21
|
-
`+s[_].replace(" at new "," at ");return e.displayName&&P.includes("<anonymous>")&&(P=P.replace("<anonymous>",e.displayName)),typeof e=="function"&&B.set(e,P),P}while(_>=1&&O>=0);break}}}finally{X=!1,G.current=b,Me(),Error.prepareStackTrace=l}var L=e?e.displayName||e.name:"",q=L?N(L):"";return typeof e=="function"&&B.set(e,q),q}function Ne(e,r,t){return Re(e,!1)}function Be(e){var r=e.prototype;return!!(r&&r.isReactComponent)}function J(e,r,t){if(e==null)return"";if(typeof e=="function")return Re(e,Be(e));if(typeof e=="string")return N(e);switch(e){case T:return N("Suspense");case d:return N("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case i:return Ne(e.render);case v:return J(e.type,r,t);case m:{var a=e,l=a._payload,b=a._init;try{return J(b(l),r,t)}catch{}}}return""}var V=Object.prototype.hasOwnProperty,Ee={},he=w.ReactDebugCurrentFrame;function K(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);he.setExtraStackFrame(t)}else he.setExtraStackFrame(null)}function Je(e,r,t,a,l){{var b=Function.call.bind(V);for(var c in e)if(b(e,c)){var s=void 0;try{if(typeof e[c]!="function"){var x=Error((a||"React class")+": "+t+" type `"+c+"` is invalid; it must be a function, usually from the `prop-types` package, but received `"+typeof e[c]+"`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");throw x.name="Invariant Violation",x}s=e[c](r,c,a,t,null,"SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}catch(_){s=_}s&&!(s instanceof Error)&&(K(l),g("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).",a||"React class",t,c,typeof s),K(null)),s instanceof Error&&!(s.message in Ee)&&(Ee[s.message]=!0,K(l),g("Failed %s type: %s",t,s.message),K(null))}}}var Ke=Array.isArray;function Z(e){return Ke(e)}function Ge(e){{var r=typeof Symbol=="function"&&Symbol.toStringTag,t=r&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t}}function He(e){try{return me(e),!1}catch{return!0}}function me(e){return""+e}function ye(e){if(He(e))return g("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.",Ge(e)),me(e)}var ge=w.ReactCurrentOwner,Xe={key:!0,ref:!0,__self:!0,__source:!0},_e,Se;function Ze(e){if(V.call(e,"ref")){var r=Object.getOwnPropertyDescriptor(e,"ref").get;if(r&&r.isReactWarning)return!1}return e.ref!==void 0}function Qe(e){if(V.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function er(e,r){typeof e.ref=="string"&&ge.current}function rr(e,r){{var t=function(){_e||(_e=!0,g("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}}function tr(e,r){{var t=function(){Se||(Se=!0,g("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)",r))};t.isReactWarning=!0,Object.defineProperty(e,"ref",{get:t,configurable:!0})}}var nr=function(e,r,t,a,l,b,c){var s={$$typeof:o,type:e,key:r,ref:t,props:c,_owner:b};return s._store={},Object.defineProperty(s._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:!1}),Object.defineProperty(s,"_self",{configurable:!1,enumerable:!1,writable:!1,value:a}),Object.defineProperty(s,"_source",{configurable:!1,enumerable:!1,writable:!1,value:l}),Object.freeze&&(Object.freeze(s.props),Object.freeze(s)),s};function or(e,r,t,a,l){{var b,c={},s=null,x=null;t!==void 0&&(ye(t),s=""+t),Qe(r)&&(ye(r.key),s=""+r.key),Ze(r)&&(x=r.ref,er(r,l));for(b in r)V.call(r,b)&&!Xe.hasOwnProperty(b)&&(c[b]=r[b]);if(e&&e.defaultProps){var _=e.defaultProps;for(b in _)c[b]===void 0&&(c[b]=_[b])}if(s||x){var O=typeof e=="function"?e.displayName||e.name||"Unknown":e;s&&rr(c,O),x&&tr(c,O)}return nr(e,s,x,l,a,ge.current,c)}}var Q=w.ReactCurrentOwner,Oe=w.ReactDebugCurrentFrame;function Y(e){if(e){var r=e._owner,t=J(e.type,e._source,r?r.type:null);Oe.setExtraStackFrame(t)}else Oe.setExtraStackFrame(null)}var ee;ee=!1;function re(e){return typeof e=="object"&&e!==null&&e.$$typeof===o}function Te(){{if(Q.current){var e=W(Q.current.type);if(e)return`
|
|
22
|
-
|
|
23
|
-
Check the render method of \``+e+"`."}return""}}function ar(e){return""}var Ce={};function ir(e){{var r=Te();if(!r){var t=typeof e=="string"?e:e.displayName||e.name;t&&(r=`
|
|
24
|
-
|
|
25
|
-
Check the top-level render call using <`+t+">.")}return r}}function je(e,r){{if(!e._store||e._store.validated||e.key!=null)return;e._store.validated=!0;var t=ir(r);if(Ce[t])return;Ce[t]=!0;var a="";e&&e._owner&&e._owner!==Q.current&&(a=" It was passed a child from "+W(e._owner.type)+"."),Y(e),g('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.',t,a),Y(null)}}function we(e,r){{if(typeof e!="object")return;if(Z(e))for(var t=0;t<e.length;t++){var a=e[t];re(a)&&je(a,r)}else if(re(e))e._store&&(e._store.validated=!0);else if(e){var l=y(e);if(typeof l=="function"&&l!==e.entries)for(var b=l.call(e),c;!(c=b.next()).done;)re(c.value)&&je(c.value,r)}}}function sr(e){{var r=e.type;if(r==null||typeof r=="string")return;var t;if(typeof r=="function")t=r.propTypes;else if(typeof r=="object"&&(r.$$typeof===i||r.$$typeof===v))t=r.propTypes;else return;if(t){var a=W(r);Je(t,e.props,"prop",a,e)}else if(r.PropTypes!==void 0&&!ee){ee=!0;var l=W(r);g("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?",l||"Unknown")}typeof r.getDefaultProps=="function"&&!r.getDefaultProps.isReactClassApproved&&g("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.")}}function ur(e){{for(var r=Object.keys(e.props),t=0;t<r.length;t++){var a=r[t];if(a!=="children"&&a!=="key"){Y(e),g("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.",a),Y(null);break}}e.ref!==null&&(Y(e),g("Invalid attribute `ref` supplied to `React.Fragment`."),Y(null))}}var xe={};function Ae(e,r,t,a,l,b){{var c=Le(e);if(!c){var s="";(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(s+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");var x=ar();x?s+=x:s+=Te();var _;e===null?_="null":Z(e)?_="array":e!==void 0&&e.$$typeof===o?(_="<"+(W(e.type)||"Unknown")+" />",s=" Did you accidentally export a JSX literal instead of a component?"):_=typeof e,g("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",_,s)}var O=or(e,r,t,l,b);if(O==null)return O;if(c){var P=r.children;if(P!==void 0)if(a)if(Z(P)){for(var L=0;L<P.length;L++)we(P[L],e);Object.freeze&&Object.freeze(P)}else g("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else we(P,e)}if(V.call(r,"key")){var q=W(e),A=Object.keys(r).filter(function(pr){return pr!=="key"}),te=A.length>0?"{key: someKey, "+A.join(": ..., ")+": ...}":"{key: someKey}";if(!xe[q+te]){var vr=A.length>0?"{"+A.join(": ..., ")+": ...}":"{}";g(`A props object containing a "key" prop is being spread into JSX:
|
|
26
|
-
let props = %s;
|
|
27
|
-
<%s {...props} />
|
|
28
|
-
React keys must be passed directly to JSX without using spread:
|
|
29
|
-
let props = %s;
|
|
30
|
-
<%s key={someKey} {...props} />`,te,q,vr,q),xe[q+te]=!0}}return e===E?ur(O):sr(O),O}}function cr(e,r,t){return Ae(e,r,t,!0)}function lr(e,r,t){return Ae(e,r,t,!1)}var fr=lr,dr=cr;z.Fragment=E,z.jsx=fr,z.jsxs=dr}()),z}process.env.NODE_ENV==="production"?ne.exports=gr():ne.exports=_r();var C=ne.exports;function Sr(n,o){const f=o===void 0?void 0:typeof o=="object"&&o!==null&&!Array.isArray(o)&&("equals"in o||"loading"in o||"error"in o)?o:{equals:o};return C.jsx(xr,{selectorOrAtom:n,options:f})}class Or extends R.Component{constructor(){super(...arguments);Pe(this,"state",{error:null})}static getDerivedStateFromError(f){return{error:f}}componentDidCatch(f,E){}render(){if(this.state.error!==null&&this.props.onError)return C.jsx(C.Fragment,{children:this.props.onError({error:this.state.error})});if(this.state.error!==null)throw this.state.error;return this.props.children}}function Tr(n){const o=oe(n.selector,n.equals);return C.jsx(C.Fragment,{children:o??null})}function Cr(n){return C.jsx(C.Fragment,{children:n.render()})}function jr(n){return n.fallback?C.jsx(R.Suspense,{fallback:C.jsx(Cr,{render:n.fallback}),children:n.children}):C.jsx(C.Fragment,{children:n.children})}function wr(n){return n.onError?C.jsx(Or,{onError:n.onError,children:n.children}):C.jsx(C.Fragment,{children:n.children})}const xr=R.memo(function(o){var p,i,T,d;const f=R.useRef(o.selectorOrAtom);f.current=o.selectorOrAtom;const E=u.isAtom(o.selectorOrAtom),S=(p=o.options)==null?void 0:p.deps,j=E?[o.selectorOrAtom,...S??[]]:S??[{}],h=R.useCallback(v=>u.isAtom(f.current)?v.read(f.current):f.current(v),j);return C.jsx(wr,{onError:(i=o.options)==null?void 0:i.error,children:C.jsx(jr,{fallback:(T=o.options)==null?void 0:T.loading,children:C.jsx(Tr,{selector:h,equals:(d=o.options)==null?void 0:d.equals})})})},(n,o)=>u.shallowEqual(n.selectorOrAtom,o.selectorOrAtom)&&u.shallowEqual(n.options,o.options));exports.AllAtomsRejectedError=u.AllAtomsRejectedError;exports.atom=u.atom;exports.batch=u.batch;exports.define=u.define;exports.derived=u.derived;exports.effect=u.effect;exports.emitter=u.emitter;exports.getAtomState=u.getAtomState;exports.isAtom=u.isAtom;exports.isDerived=u.isDerived;exports.isFulfilled=u.isFulfilled;exports.isPending=u.isPending;exports.isRejected=u.isRejected;exports.onCreateHook=u.onCreateHook;exports.onErrorHook=u.onErrorHook;exports.promisesEqual=u.promisesEqual;exports.readonly=u.readonly;exports.select=u.select;exports.trackPromise=u.trackPromise;exports.unwrap=u.unwrap;exports.rx=Sr;exports.useAction=yr;exports.useSelector=oe;exports.useStable=hr;
|
|
1
|
+
"use strict";var C=Object.defineProperty;var O=(e,r,n)=>r in e?C(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n;var p=(e,r,n)=>O(e,typeof r!="symbol"?r+"":r,n);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react"),t=require("../index-Cxk9v0um.cjs"),a=require("react/jsx-runtime");function v(e,r){const n=t.isAtom(e)?({read:u})=>u(e):e,f=t.resolveEquality(r??"shallow"),d=s.useRef(n),R=s.useRef(f);d.current=n,R.current=f;const l=s.useRef(new Map),i=s.useRef(new Set),o=s.useRef({value:void 0,initialized:!1}),E=s.useCallback(()=>{const u=t.select(d.current);if(i.current=u.dependencies,u.promise!==void 0)throw u.promise;if(u.error!==void 0)throw u.error;const m=u.value;return(!o.current.initialized||!R.current(m,o.current.value))&&(o.current={value:m,initialized:!0}),o.current.value},[]),b=s.useCallback(u=>{const m=l.current,g=()=>{const S=i.current;for(const[A,c]of m)S.has(A)||(c(),m.delete(A));for(const A of S)if(!m.has(A)){const c=A.on(()=>{const h=t.select(d.current);i.current=h.dependencies,g(),u()});m.set(A,c)}};return g(),()=>{for(const S of m.values())S();m.clear()}},[]);return s.useSyncExternalStore(b,E,E)}function q(e){return e==null?"strict":Array.isArray(e)?"shallow":e instanceof Date?"deep":typeof e=="object"?"shallow":"strict"}function w(e,r){const n=s.useRef({}),f=s.useRef(null);f.current===null&&(f.current={});const d=n.current,R=f.current;for(const l of Object.keys(e)){const i=e[l],o=d[l];if(typeof i=="function"){const[m]=t.tryStabilize(o,i,()=>!1);d[l]={value:m},R[l]=m;continue}const E=r==null?void 0:r[l],b=E?t.resolveEquality(E):t.resolveEquality(q(i)),[u]=t.tryStabilize(o,i,b);d[l]={value:u},R[l]=u}for(const l of Object.keys(d))l in e||(delete d[l],delete R[l]);return R}const x={status:"idle",result:void 0,error:void 0},k={status:"loading",result:void 0,error:void 0};function D(e,r){switch(r.type){case"START":return k;case"SUCCESS":return{status:"success",result:r.result,error:void 0};case"ERROR":return{status:"error",result:void 0,error:r.error};case"RESET":return x;default:return e}}function T(e,r={}){const{lazy:n=!0,exclusive:f=!0,deps:d=[]}=r,R=n?x:k,[l,i]=s.useReducer(D,R),o=s.useRef(null),E=s.useRef(e);E.current=e;const b=s.useCallback(()=>{const c=o.current;return c?(c.abort(),o.current=null,!0):!1},[]),u=(n?[]:d??[]).filter(t.isAtom),m=v(({read:c})=>u.map(h=>c(h))),g=s.useCallback(()=>{f&&b();const c=new AbortController;o.current=c,i({type:"START"});let h;try{h=E.current(t.withUse({signal:c.signal}))}catch(j){return i({type:"ERROR",error:j}),Object.assign(Promise.reject(j),{abort:()=>c.abort()})}if(t.isPromiseLike(h)){const j=h;return j.then(y=>{o.current===c&&i({type:"SUCCESS",result:y})},y=>{if(y instanceof DOMException&&y.name==="AbortError"){(o.current===null||o.current===c)&&i({type:"ERROR",error:y});return}o.current===c&&i({type:"ERROR",error:y})}),Object.assign(j,{abort:()=>{c.abort(),o.current===c&&(o.current=null)}})}return i({type:"SUCCESS",result:h}),Object.assign(Promise.resolve(h),{abort:()=>c.abort()})},[f,b]),S=(d??[]).filter(c=>!t.isAtom(c));s.useEffect(()=>{n||g()},[n,...m,...S]),s.useEffect(()=>()=>{f&&b()},[f,b]);const A=s.useCallback(()=>{f&&b(),i({type:"RESET"})},[f,b]);return Object.assign(g,{...l,abort:b,reset:A})}function F(e,r){const n=r===void 0?void 0:typeof r=="object"&&r!==null&&!Array.isArray(r)&&("equals"in r||"loading"in r||"error"in r)?r:{equals:r};return a.jsx(U,{selectorOrAtom:e,options:n})}class z extends s.Component{constructor(){super(...arguments);p(this,"state",{error:null})}static getDerivedStateFromError(n){return{error:n}}componentDidCatch(n,f){}render(){if(this.state.error!==null&&this.props.onError)return a.jsx(a.Fragment,{children:this.props.onError({error:this.state.error})});if(this.state.error!==null)throw this.state.error;return this.props.children}}function P(e){const r=v(e.selector,e.equals);return a.jsx(a.Fragment,{children:r??null})}function I(e){return a.jsx(a.Fragment,{children:e.render()})}function H(e){return e.fallback?a.jsx(s.Suspense,{fallback:a.jsx(I,{render:e.fallback}),children:e.children}):a.jsx(a.Fragment,{children:e.children})}function L(e){return e.onError?a.jsx(z,{onError:e.onError,children:e.children}):a.jsx(a.Fragment,{children:e.children})}const U=s.memo(function(r){var i,o,E,b;const n=s.useRef(r.selectorOrAtom);n.current=r.selectorOrAtom;const f=t.isAtom(r.selectorOrAtom),d=(i=r.options)==null?void 0:i.deps,R=f?[r.selectorOrAtom,...d??[]]:d??[{}],l=s.useCallback(u=>t.isAtom(n.current)?u.read(n.current):n.current(u),R);return a.jsx(L,{onError:(o=r.options)==null?void 0:o.error,children:a.jsx(H,{fallback:(E=r.options)==null?void 0:E.loading,children:a.jsx(P,{selector:l,equals:(b=r.options)==null?void 0:b.equals})})})},(e,r)=>t.shallowEqual(e.selectorOrAtom,r.selectorOrAtom)&&t.shallowEqual(e.options,r.options));exports.AllAtomsRejectedError=t.AllAtomsRejectedError;exports.atom=t.atom;exports.batch=t.batch;exports.define=t.define;exports.derived=t.derived;exports.effect=t.effect;exports.emitter=t.emitter;exports.getAtomState=t.getAtomState;exports.isAtom=t.isAtom;exports.isDerived=t.isDerived;exports.isFulfilled=t.isFulfilled;exports.isPending=t.isPending;exports.isRejected=t.isRejected;exports.onCreateHook=t.onCreateHook;exports.onErrorHook=t.onErrorHook;exports.promisesEqual=t.promisesEqual;exports.readonly=t.readonly;exports.select=t.select;exports.trackPromise=t.trackPromise;exports.unwrap=t.unwrap;exports.rx=F;exports.useAction=T;exports.useSelector=v;exports.useStable=w;
|
package/dist/react/index.js
CHANGED
|
@@ -1,868 +1,243 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import
|
|
5
|
-
import { i as
|
|
6
|
-
import { A as
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
g
|
|
10
|
-
|
|
1
|
+
var F = Object.defineProperty;
|
|
2
|
+
var I = (r, e, t) => e in r ? F(r, e, { enumerable: !0, configurable: !0, writable: !0, value: t }) : r[e] = t;
|
|
3
|
+
var w = (r, e, t) => I(r, typeof e != "symbol" ? e + "" : e, t);
|
|
4
|
+
import { useRef as m, useCallback as y, useSyncExternalStore as P, useReducer as L, useEffect as x, memo as U, Suspense as _, Component as V } from "react";
|
|
5
|
+
import { i as g, r as k, s as C, t as j, w as H, a as M, b as D } from "../index-CBVj1kSj.js";
|
|
6
|
+
import { A as ir, c as ur, e as ar, f as lr, g as fr, h as dr, j as br, l as hr, k as mr, n as Rr, m as Er, o as pr, q as Sr, v as yr, x as Ar, d as vr, p as gr, u as Or } from "../index-CBVj1kSj.js";
|
|
7
|
+
import { jsx as d, Fragment as O } from "react/jsx-runtime";
|
|
8
|
+
function q(r, e) {
|
|
9
|
+
const t = g(r) ? ({ read: c }) => c(r) : r, u = k(e ?? "shallow"), a = m(t), b = m(u);
|
|
10
|
+
a.current = t, b.current = u;
|
|
11
|
+
const i = m(/* @__PURE__ */ new Map()), o = m(/* @__PURE__ */ new Set()), n = m({
|
|
11
12
|
value: void 0,
|
|
12
13
|
initialized: !1
|
|
13
|
-
}),
|
|
14
|
-
const
|
|
15
|
-
if (
|
|
16
|
-
throw
|
|
17
|
-
if (
|
|
18
|
-
throw
|
|
19
|
-
const
|
|
20
|
-
return (!
|
|
21
|
-
}, []),
|
|
22
|
-
const
|
|
23
|
-
const
|
|
24
|
-
for (const [
|
|
25
|
-
|
|
26
|
-
for (const
|
|
27
|
-
if (!
|
|
28
|
-
const
|
|
29
|
-
const
|
|
30
|
-
|
|
14
|
+
}), h = y(() => {
|
|
15
|
+
const c = C(a.current);
|
|
16
|
+
if (o.current = c.dependencies, c.promise !== void 0)
|
|
17
|
+
throw c.promise;
|
|
18
|
+
if (c.error !== void 0)
|
|
19
|
+
throw c.error;
|
|
20
|
+
const f = c.value;
|
|
21
|
+
return (!n.current.initialized || !b.current(f, n.current.value)) && (n.current = { value: f, initialized: !0 }), n.current.value;
|
|
22
|
+
}, []), l = y((c) => {
|
|
23
|
+
const f = i.current, A = () => {
|
|
24
|
+
const p = o.current;
|
|
25
|
+
for (const [E, s] of f)
|
|
26
|
+
p.has(E) || (s(), f.delete(E));
|
|
27
|
+
for (const E of p)
|
|
28
|
+
if (!f.has(E)) {
|
|
29
|
+
const s = E.on(() => {
|
|
30
|
+
const R = C(a.current);
|
|
31
|
+
o.current = R.dependencies, A(), c();
|
|
31
32
|
});
|
|
32
|
-
|
|
33
|
+
f.set(E, s);
|
|
33
34
|
}
|
|
34
35
|
};
|
|
35
|
-
return
|
|
36
|
-
for (const
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
return A(), () => {
|
|
37
|
+
for (const p of f.values())
|
|
38
|
+
p();
|
|
39
|
+
f.clear();
|
|
39
40
|
};
|
|
40
41
|
}, []);
|
|
41
|
-
return
|
|
42
|
+
return P(l, h, h);
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
-
return
|
|
44
|
+
function W(r) {
|
|
45
|
+
return r == null ? "strict" : Array.isArray(r) ? "shallow" : r instanceof Date ? "deep" : typeof r == "object" ? "shallow" : "strict";
|
|
45
46
|
}
|
|
46
|
-
function
|
|
47
|
-
const
|
|
48
|
-
|
|
49
|
-
const
|
|
50
|
-
for (const
|
|
51
|
-
const
|
|
52
|
-
if (typeof
|
|
53
|
-
const [
|
|
54
|
-
|
|
55
|
-
|
|
47
|
+
function tr(r, e) {
|
|
48
|
+
const t = m({}), u = m(null);
|
|
49
|
+
u.current === null && (u.current = {});
|
|
50
|
+
const a = t.current, b = u.current;
|
|
51
|
+
for (const i of Object.keys(r)) {
|
|
52
|
+
const o = r[i], n = a[i];
|
|
53
|
+
if (typeof o == "function") {
|
|
54
|
+
const [f] = j(
|
|
55
|
+
n,
|
|
56
|
+
o,
|
|
56
57
|
() => !1
|
|
57
58
|
// Equality doesn't matter for functions
|
|
58
59
|
);
|
|
59
|
-
|
|
60
|
+
a[i] = { value: f }, b[i] = f;
|
|
60
61
|
continue;
|
|
61
62
|
}
|
|
62
|
-
const
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
63
|
+
const h = e == null ? void 0 : e[i], l = h ? k(h) : k(W(o)), [c] = j(
|
|
64
|
+
n,
|
|
65
|
+
o,
|
|
66
|
+
l
|
|
66
67
|
);
|
|
67
|
-
|
|
68
|
+
a[i] = { value: c }, b[i] = c;
|
|
68
69
|
}
|
|
69
|
-
for (const
|
|
70
|
-
|
|
71
|
-
return
|
|
70
|
+
for (const i of Object.keys(a))
|
|
71
|
+
i in r || (delete a[i], delete b[i]);
|
|
72
|
+
return b;
|
|
72
73
|
}
|
|
73
|
-
const
|
|
74
|
+
const T = {
|
|
74
75
|
status: "idle",
|
|
75
76
|
result: void 0,
|
|
76
77
|
error: void 0
|
|
77
|
-
},
|
|
78
|
+
}, z = {
|
|
78
79
|
status: "loading",
|
|
79
80
|
result: void 0,
|
|
80
81
|
error: void 0
|
|
81
82
|
};
|
|
82
|
-
function
|
|
83
|
-
switch (
|
|
83
|
+
function B(r, e) {
|
|
84
|
+
switch (e.type) {
|
|
84
85
|
case "START":
|
|
85
|
-
return
|
|
86
|
+
return z;
|
|
86
87
|
case "SUCCESS":
|
|
87
88
|
return {
|
|
88
89
|
status: "success",
|
|
89
|
-
result:
|
|
90
|
+
result: e.result,
|
|
90
91
|
error: void 0
|
|
91
92
|
};
|
|
92
93
|
case "ERROR":
|
|
93
94
|
return {
|
|
94
95
|
status: "error",
|
|
95
96
|
result: void 0,
|
|
96
|
-
error:
|
|
97
|
+
error: e.error
|
|
97
98
|
};
|
|
98
99
|
case "RESET":
|
|
99
|
-
return
|
|
100
|
+
return T;
|
|
100
101
|
default:
|
|
101
|
-
return
|
|
102
|
+
return r;
|
|
102
103
|
}
|
|
103
104
|
}
|
|
104
|
-
function
|
|
105
|
-
const { lazy:
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
),
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
const
|
|
112
|
-
return
|
|
113
|
-
}, []),
|
|
114
|
-
|
|
115
|
-
const
|
|
116
|
-
|
|
117
|
-
let
|
|
105
|
+
function nr(r, e = {}) {
|
|
106
|
+
const { lazy: t = !0, exclusive: u = !0, deps: a = [] } = e, b = t ? T : z, [i, o] = L(
|
|
107
|
+
B,
|
|
108
|
+
b
|
|
109
|
+
), n = m(null), h = m(r);
|
|
110
|
+
h.current = r;
|
|
111
|
+
const l = y(() => {
|
|
112
|
+
const s = n.current;
|
|
113
|
+
return s ? (s.abort(), n.current = null, !0) : !1;
|
|
114
|
+
}, []), c = (t ? [] : a ?? []).filter(g), f = q(({ read: s }) => c.map((R) => s(R))), A = y(() => {
|
|
115
|
+
u && l();
|
|
116
|
+
const s = new AbortController();
|
|
117
|
+
n.current = s, o({ type: "START" });
|
|
118
|
+
let R;
|
|
118
119
|
try {
|
|
119
|
-
|
|
120
|
-
} catch (
|
|
121
|
-
return
|
|
122
|
-
abort: () =>
|
|
120
|
+
R = h.current(H({ signal: s.signal }));
|
|
121
|
+
} catch (v) {
|
|
122
|
+
return o({ type: "ERROR", error: v }), Object.assign(Promise.reject(v), {
|
|
123
|
+
abort: () => s.abort()
|
|
123
124
|
});
|
|
124
125
|
}
|
|
125
|
-
if (
|
|
126
|
-
const
|
|
127
|
-
return
|
|
128
|
-
(
|
|
129
|
-
|
|
126
|
+
if (M(R)) {
|
|
127
|
+
const v = R;
|
|
128
|
+
return v.then(
|
|
129
|
+
(S) => {
|
|
130
|
+
n.current === s && o({ type: "SUCCESS", result: S });
|
|
130
131
|
},
|
|
131
|
-
(
|
|
132
|
-
if (
|
|
133
|
-
(
|
|
132
|
+
(S) => {
|
|
133
|
+
if (S instanceof DOMException && S.name === "AbortError") {
|
|
134
|
+
(n.current === null || n.current === s) && o({ type: "ERROR", error: S });
|
|
134
135
|
return;
|
|
135
136
|
}
|
|
136
|
-
|
|
137
|
+
n.current === s && o({ type: "ERROR", error: S });
|
|
137
138
|
}
|
|
138
|
-
), Object.assign(
|
|
139
|
+
), Object.assign(v, {
|
|
139
140
|
abort: () => {
|
|
140
|
-
|
|
141
|
+
s.abort(), n.current === s && (n.current = null);
|
|
141
142
|
}
|
|
142
143
|
});
|
|
143
144
|
}
|
|
144
|
-
return
|
|
145
|
-
abort: () =>
|
|
145
|
+
return o({ type: "SUCCESS", result: R }), Object.assign(Promise.resolve(R), {
|
|
146
|
+
abort: () => s.abort()
|
|
146
147
|
});
|
|
147
|
-
}, [
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
}, [
|
|
151
|
-
|
|
152
|
-
}, [
|
|
153
|
-
const
|
|
154
|
-
|
|
155
|
-
}, [
|
|
156
|
-
return Object.assign(
|
|
157
|
-
...
|
|
158
|
-
abort:
|
|
159
|
-
reset:
|
|
148
|
+
}, [u, l]), p = (a ?? []).filter((s) => !g(s));
|
|
149
|
+
x(() => {
|
|
150
|
+
t || A();
|
|
151
|
+
}, [t, ...f, ...p]), x(() => () => {
|
|
152
|
+
u && l();
|
|
153
|
+
}, [u, l]);
|
|
154
|
+
const E = y(() => {
|
|
155
|
+
u && l(), o({ type: "RESET" });
|
|
156
|
+
}, [u, l]);
|
|
157
|
+
return Object.assign(A, {
|
|
158
|
+
...i,
|
|
159
|
+
abort: l,
|
|
160
|
+
reset: E
|
|
160
161
|
});
|
|
161
162
|
}
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
*
|
|
167
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
168
|
-
*
|
|
169
|
-
* This source code is licensed under the MIT license found in the
|
|
170
|
-
* LICENSE file in the root directory of this source tree.
|
|
171
|
-
*/
|
|
172
|
-
var $e;
|
|
173
|
-
function Dr() {
|
|
174
|
-
if ($e) return M;
|
|
175
|
-
$e = 1;
|
|
176
|
-
var n = Le, a = Symbol.for("react.element"), l = Symbol.for("react.fragment"), b = Object.prototype.hasOwnProperty, g = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, T = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
177
|
-
function h(v, i, S) {
|
|
178
|
-
var f, d = {}, E = null, P = null;
|
|
179
|
-
S !== void 0 && (E = "" + S), i.key !== void 0 && (E = "" + i.key), i.ref !== void 0 && (P = i.ref);
|
|
180
|
-
for (f in i) b.call(i, f) && !T.hasOwnProperty(f) && (d[f] = i[f]);
|
|
181
|
-
if (v && v.defaultProps) for (f in i = v.defaultProps, i) d[f] === void 0 && (d[f] = i[f]);
|
|
182
|
-
return { $$typeof: a, type: v, key: E, ref: P, props: d, _owner: g.current };
|
|
183
|
-
}
|
|
184
|
-
return M.Fragment = l, M.jsx = h, M.jsxs = h, M;
|
|
185
|
-
}
|
|
186
|
-
var N = {};
|
|
187
|
-
/**
|
|
188
|
-
* @license React
|
|
189
|
-
* react-jsx-runtime.development.js
|
|
190
|
-
*
|
|
191
|
-
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
192
|
-
*
|
|
193
|
-
* This source code is licensed under the MIT license found in the
|
|
194
|
-
* LICENSE file in the root directory of this source tree.
|
|
195
|
-
*/
|
|
196
|
-
var Ye;
|
|
197
|
-
function Fr() {
|
|
198
|
-
return Ye || (Ye = 1, process.env.NODE_ENV !== "production" && function() {
|
|
199
|
-
var n = Le, a = Symbol.for("react.element"), l = Symbol.for("react.portal"), b = Symbol.for("react.fragment"), g = Symbol.for("react.strict_mode"), T = Symbol.for("react.profiler"), h = Symbol.for("react.provider"), v = Symbol.for("react.context"), i = Symbol.for("react.forward_ref"), S = Symbol.for("react.suspense"), f = Symbol.for("react.suspense_list"), d = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), P = Symbol.for("react.offscreen"), D = Symbol.iterator, k = "@@iterator";
|
|
200
|
-
function R(e) {
|
|
201
|
-
if (e === null || typeof e != "object")
|
|
202
|
-
return null;
|
|
203
|
-
var r = D && e[D] || e[k];
|
|
204
|
-
return typeof r == "function" ? r : null;
|
|
205
|
-
}
|
|
206
|
-
var j = n.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
|
207
|
-
function m(e) {
|
|
208
|
-
{
|
|
209
|
-
for (var r = arguments.length, t = new Array(r > 1 ? r - 1 : 0), o = 1; o < r; o++)
|
|
210
|
-
t[o - 1] = arguments[o];
|
|
211
|
-
F("error", e, t);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
function F(e, r, t) {
|
|
215
|
-
{
|
|
216
|
-
var o = j.ReactDebugCurrentFrame, c = o.getStackAddendum();
|
|
217
|
-
c !== "" && (r += "%s", t = t.concat([c]));
|
|
218
|
-
var p = t.map(function(u) {
|
|
219
|
-
return String(u);
|
|
220
|
-
});
|
|
221
|
-
p.unshift("Warning: " + r), Function.prototype.apply.call(console[e], console, p);
|
|
222
|
-
}
|
|
223
|
-
}
|
|
224
|
-
var ie = !1, Me = !1, Ne = !1, ze = !1, Be = !1, se;
|
|
225
|
-
se = Symbol.for("react.module.reference");
|
|
226
|
-
function Je(e) {
|
|
227
|
-
return !!(typeof e == "string" || typeof e == "function" || e === b || e === T || Be || e === g || e === S || e === f || ze || e === P || ie || Me || Ne || typeof e == "object" && e !== null && (e.$$typeof === E || e.$$typeof === d || e.$$typeof === h || e.$$typeof === v || e.$$typeof === i || // This needs to include all possible module reference object
|
|
228
|
-
// types supported by any Flight configuration anywhere since
|
|
229
|
-
// we don't know which Flight build this will end up being used
|
|
230
|
-
// with.
|
|
231
|
-
e.$$typeof === se || e.getModuleId !== void 0));
|
|
232
|
-
}
|
|
233
|
-
function Ke(e, r, t) {
|
|
234
|
-
var o = e.displayName;
|
|
235
|
-
if (o)
|
|
236
|
-
return o;
|
|
237
|
-
var c = r.displayName || r.name || "";
|
|
238
|
-
return c !== "" ? t + "(" + c + ")" : t;
|
|
239
|
-
}
|
|
240
|
-
function ue(e) {
|
|
241
|
-
return e.displayName || "Context";
|
|
242
|
-
}
|
|
243
|
-
function I(e) {
|
|
244
|
-
if (e == null)
|
|
245
|
-
return null;
|
|
246
|
-
if (typeof e.tag == "number" && m("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof e == "function")
|
|
247
|
-
return e.displayName || e.name || null;
|
|
248
|
-
if (typeof e == "string")
|
|
249
|
-
return e;
|
|
250
|
-
switch (e) {
|
|
251
|
-
case b:
|
|
252
|
-
return "Fragment";
|
|
253
|
-
case l:
|
|
254
|
-
return "Portal";
|
|
255
|
-
case T:
|
|
256
|
-
return "Profiler";
|
|
257
|
-
case g:
|
|
258
|
-
return "StrictMode";
|
|
259
|
-
case S:
|
|
260
|
-
return "Suspense";
|
|
261
|
-
case f:
|
|
262
|
-
return "SuspenseList";
|
|
263
|
-
}
|
|
264
|
-
if (typeof e == "object")
|
|
265
|
-
switch (e.$$typeof) {
|
|
266
|
-
case v:
|
|
267
|
-
var r = e;
|
|
268
|
-
return ue(r) + ".Consumer";
|
|
269
|
-
case h:
|
|
270
|
-
var t = e;
|
|
271
|
-
return ue(t._context) + ".Provider";
|
|
272
|
-
case i:
|
|
273
|
-
return Ke(e, e.render, "ForwardRef");
|
|
274
|
-
case d:
|
|
275
|
-
var o = e.displayName || null;
|
|
276
|
-
return o !== null ? o : I(e.type) || "Memo";
|
|
277
|
-
case E: {
|
|
278
|
-
var c = e, p = c._payload, u = c._init;
|
|
279
|
-
try {
|
|
280
|
-
return I(u(p));
|
|
281
|
-
} catch {
|
|
282
|
-
return null;
|
|
283
|
-
}
|
|
284
|
-
}
|
|
285
|
-
}
|
|
286
|
-
return null;
|
|
287
|
-
}
|
|
288
|
-
var W = Object.assign, V = 0, ce, le, fe, de, ve, pe, be;
|
|
289
|
-
function he() {
|
|
290
|
-
}
|
|
291
|
-
he.__reactDisabledLog = !0;
|
|
292
|
-
function Ge() {
|
|
293
|
-
{
|
|
294
|
-
if (V === 0) {
|
|
295
|
-
ce = console.log, le = console.info, fe = console.warn, de = console.error, ve = console.group, pe = console.groupCollapsed, be = console.groupEnd;
|
|
296
|
-
var e = {
|
|
297
|
-
configurable: !0,
|
|
298
|
-
enumerable: !0,
|
|
299
|
-
value: he,
|
|
300
|
-
writable: !0
|
|
301
|
-
};
|
|
302
|
-
Object.defineProperties(console, {
|
|
303
|
-
info: e,
|
|
304
|
-
log: e,
|
|
305
|
-
warn: e,
|
|
306
|
-
error: e,
|
|
307
|
-
group: e,
|
|
308
|
-
groupCollapsed: e,
|
|
309
|
-
groupEnd: e
|
|
310
|
-
});
|
|
311
|
-
}
|
|
312
|
-
V++;
|
|
313
|
-
}
|
|
314
|
-
}
|
|
315
|
-
function He() {
|
|
316
|
-
{
|
|
317
|
-
if (V--, V === 0) {
|
|
318
|
-
var e = {
|
|
319
|
-
configurable: !0,
|
|
320
|
-
enumerable: !0,
|
|
321
|
-
writable: !0
|
|
322
|
-
};
|
|
323
|
-
Object.defineProperties(console, {
|
|
324
|
-
log: W({}, e, {
|
|
325
|
-
value: ce
|
|
326
|
-
}),
|
|
327
|
-
info: W({}, e, {
|
|
328
|
-
value: le
|
|
329
|
-
}),
|
|
330
|
-
warn: W({}, e, {
|
|
331
|
-
value: fe
|
|
332
|
-
}),
|
|
333
|
-
error: W({}, e, {
|
|
334
|
-
value: de
|
|
335
|
-
}),
|
|
336
|
-
group: W({}, e, {
|
|
337
|
-
value: ve
|
|
338
|
-
}),
|
|
339
|
-
groupCollapsed: W({}, e, {
|
|
340
|
-
value: pe
|
|
341
|
-
}),
|
|
342
|
-
groupEnd: W({}, e, {
|
|
343
|
-
value: be
|
|
344
|
-
})
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
V < 0 && m("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
var H = j.ReactCurrentDispatcher, X;
|
|
351
|
-
function B(e, r, t) {
|
|
352
|
-
{
|
|
353
|
-
if (X === void 0)
|
|
354
|
-
try {
|
|
355
|
-
throw Error();
|
|
356
|
-
} catch (c) {
|
|
357
|
-
var o = c.stack.trim().match(/\n( *(at )?)/);
|
|
358
|
-
X = o && o[1] || "";
|
|
359
|
-
}
|
|
360
|
-
return `
|
|
361
|
-
` + X + e;
|
|
362
|
-
}
|
|
363
|
-
}
|
|
364
|
-
var Z = !1, J;
|
|
365
|
-
{
|
|
366
|
-
var Xe = typeof WeakMap == "function" ? WeakMap : Map;
|
|
367
|
-
J = new Xe();
|
|
368
|
-
}
|
|
369
|
-
function Ee(e, r) {
|
|
370
|
-
if (!e || Z)
|
|
371
|
-
return "";
|
|
372
|
-
{
|
|
373
|
-
var t = J.get(e);
|
|
374
|
-
if (t !== void 0)
|
|
375
|
-
return t;
|
|
376
|
-
}
|
|
377
|
-
var o;
|
|
378
|
-
Z = !0;
|
|
379
|
-
var c = Error.prepareStackTrace;
|
|
380
|
-
Error.prepareStackTrace = void 0;
|
|
381
|
-
var p;
|
|
382
|
-
p = H.current, H.current = null, Ge();
|
|
383
|
-
try {
|
|
384
|
-
if (r) {
|
|
385
|
-
var u = function() {
|
|
386
|
-
throw Error();
|
|
387
|
-
};
|
|
388
|
-
if (Object.defineProperty(u.prototype, "props", {
|
|
389
|
-
set: function() {
|
|
390
|
-
throw Error();
|
|
391
|
-
}
|
|
392
|
-
}), typeof Reflect == "object" && Reflect.construct) {
|
|
393
|
-
try {
|
|
394
|
-
Reflect.construct(u, []);
|
|
395
|
-
} catch (w) {
|
|
396
|
-
o = w;
|
|
397
|
-
}
|
|
398
|
-
Reflect.construct(e, [], u);
|
|
399
|
-
} else {
|
|
400
|
-
try {
|
|
401
|
-
u.call();
|
|
402
|
-
} catch (w) {
|
|
403
|
-
o = w;
|
|
404
|
-
}
|
|
405
|
-
e.call(u.prototype);
|
|
406
|
-
}
|
|
407
|
-
} else {
|
|
408
|
-
try {
|
|
409
|
-
throw Error();
|
|
410
|
-
} catch (w) {
|
|
411
|
-
o = w;
|
|
412
|
-
}
|
|
413
|
-
e();
|
|
414
|
-
}
|
|
415
|
-
} catch (w) {
|
|
416
|
-
if (w && o && typeof w.stack == "string") {
|
|
417
|
-
for (var s = w.stack.split(`
|
|
418
|
-
`), x = o.stack.split(`
|
|
419
|
-
`), y = s.length - 1, _ = x.length - 1; y >= 1 && _ >= 0 && s[y] !== x[_]; )
|
|
420
|
-
_--;
|
|
421
|
-
for (; y >= 1 && _ >= 0; y--, _--)
|
|
422
|
-
if (s[y] !== x[_]) {
|
|
423
|
-
if (y !== 1 || _ !== 1)
|
|
424
|
-
do
|
|
425
|
-
if (y--, _--, _ < 0 || s[y] !== x[_]) {
|
|
426
|
-
var C = `
|
|
427
|
-
` + s[y].replace(" at new ", " at ");
|
|
428
|
-
return e.displayName && C.includes("<anonymous>") && (C = C.replace("<anonymous>", e.displayName)), typeof e == "function" && J.set(e, C), C;
|
|
429
|
-
}
|
|
430
|
-
while (y >= 1 && _ >= 0);
|
|
431
|
-
break;
|
|
432
|
-
}
|
|
433
|
-
}
|
|
434
|
-
} finally {
|
|
435
|
-
Z = !1, H.current = p, He(), Error.prepareStackTrace = c;
|
|
436
|
-
}
|
|
437
|
-
var L = e ? e.displayName || e.name : "", $ = L ? B(L) : "";
|
|
438
|
-
return typeof e == "function" && J.set(e, $), $;
|
|
439
|
-
}
|
|
440
|
-
function Ze(e, r, t) {
|
|
441
|
-
return Ee(e, !1);
|
|
442
|
-
}
|
|
443
|
-
function Qe(e) {
|
|
444
|
-
var r = e.prototype;
|
|
445
|
-
return !!(r && r.isReactComponent);
|
|
446
|
-
}
|
|
447
|
-
function K(e, r, t) {
|
|
448
|
-
if (e == null)
|
|
449
|
-
return "";
|
|
450
|
-
if (typeof e == "function")
|
|
451
|
-
return Ee(e, Qe(e));
|
|
452
|
-
if (typeof e == "string")
|
|
453
|
-
return B(e);
|
|
454
|
-
switch (e) {
|
|
455
|
-
case S:
|
|
456
|
-
return B("Suspense");
|
|
457
|
-
case f:
|
|
458
|
-
return B("SuspenseList");
|
|
459
|
-
}
|
|
460
|
-
if (typeof e == "object")
|
|
461
|
-
switch (e.$$typeof) {
|
|
462
|
-
case i:
|
|
463
|
-
return Ze(e.render);
|
|
464
|
-
case d:
|
|
465
|
-
return K(e.type, r, t);
|
|
466
|
-
case E: {
|
|
467
|
-
var o = e, c = o._payload, p = o._init;
|
|
468
|
-
try {
|
|
469
|
-
return K(p(c), r, t);
|
|
470
|
-
} catch {
|
|
471
|
-
}
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
return "";
|
|
475
|
-
}
|
|
476
|
-
var q = Object.prototype.hasOwnProperty, Re = {}, me = j.ReactDebugCurrentFrame;
|
|
477
|
-
function G(e) {
|
|
478
|
-
if (e) {
|
|
479
|
-
var r = e._owner, t = K(e.type, e._source, r ? r.type : null);
|
|
480
|
-
me.setExtraStackFrame(t);
|
|
481
|
-
} else
|
|
482
|
-
me.setExtraStackFrame(null);
|
|
483
|
-
}
|
|
484
|
-
function er(e, r, t, o, c) {
|
|
485
|
-
{
|
|
486
|
-
var p = Function.call.bind(q);
|
|
487
|
-
for (var u in e)
|
|
488
|
-
if (p(e, u)) {
|
|
489
|
-
var s = void 0;
|
|
490
|
-
try {
|
|
491
|
-
if (typeof e[u] != "function") {
|
|
492
|
-
var x = Error((o || "React class") + ": " + t + " type `" + u + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof e[u] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
|
493
|
-
throw x.name = "Invariant Violation", x;
|
|
494
|
-
}
|
|
495
|
-
s = e[u](r, u, o, t, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
|
496
|
-
} catch (y) {
|
|
497
|
-
s = y;
|
|
498
|
-
}
|
|
499
|
-
s && !(s instanceof Error) && (G(c), m("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", o || "React class", t, u, typeof s), G(null)), s instanceof Error && !(s.message in Re) && (Re[s.message] = !0, G(c), m("Failed %s type: %s", t, s.message), G(null));
|
|
500
|
-
}
|
|
501
|
-
}
|
|
502
|
-
}
|
|
503
|
-
var rr = Array.isArray;
|
|
504
|
-
function Q(e) {
|
|
505
|
-
return rr(e);
|
|
506
|
-
}
|
|
507
|
-
function tr(e) {
|
|
508
|
-
{
|
|
509
|
-
var r = typeof Symbol == "function" && Symbol.toStringTag, t = r && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
510
|
-
return t;
|
|
511
|
-
}
|
|
512
|
-
}
|
|
513
|
-
function nr(e) {
|
|
514
|
-
try {
|
|
515
|
-
return ye(e), !1;
|
|
516
|
-
} catch {
|
|
517
|
-
return !0;
|
|
518
|
-
}
|
|
519
|
-
}
|
|
520
|
-
function ye(e) {
|
|
521
|
-
return "" + e;
|
|
522
|
-
}
|
|
523
|
-
function ge(e) {
|
|
524
|
-
if (nr(e))
|
|
525
|
-
return m("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", tr(e)), ye(e);
|
|
526
|
-
}
|
|
527
|
-
var _e = j.ReactCurrentOwner, ar = {
|
|
528
|
-
key: !0,
|
|
529
|
-
ref: !0,
|
|
530
|
-
__self: !0,
|
|
531
|
-
__source: !0
|
|
532
|
-
}, Se, Oe;
|
|
533
|
-
function or(e) {
|
|
534
|
-
if (q.call(e, "ref")) {
|
|
535
|
-
var r = Object.getOwnPropertyDescriptor(e, "ref").get;
|
|
536
|
-
if (r && r.isReactWarning)
|
|
537
|
-
return !1;
|
|
538
|
-
}
|
|
539
|
-
return e.ref !== void 0;
|
|
540
|
-
}
|
|
541
|
-
function ir(e) {
|
|
542
|
-
if (q.call(e, "key")) {
|
|
543
|
-
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
544
|
-
if (r && r.isReactWarning)
|
|
545
|
-
return !1;
|
|
546
|
-
}
|
|
547
|
-
return e.key !== void 0;
|
|
548
|
-
}
|
|
549
|
-
function sr(e, r) {
|
|
550
|
-
typeof e.ref == "string" && _e.current;
|
|
551
|
-
}
|
|
552
|
-
function ur(e, r) {
|
|
553
|
-
{
|
|
554
|
-
var t = function() {
|
|
555
|
-
Se || (Se = !0, m("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
556
|
-
};
|
|
557
|
-
t.isReactWarning = !0, Object.defineProperty(e, "key", {
|
|
558
|
-
get: t,
|
|
559
|
-
configurable: !0
|
|
560
|
-
});
|
|
561
|
-
}
|
|
562
|
-
}
|
|
563
|
-
function cr(e, r) {
|
|
564
|
-
{
|
|
565
|
-
var t = function() {
|
|
566
|
-
Oe || (Oe = !0, m("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", r));
|
|
567
|
-
};
|
|
568
|
-
t.isReactWarning = !0, Object.defineProperty(e, "ref", {
|
|
569
|
-
get: t,
|
|
570
|
-
configurable: !0
|
|
571
|
-
});
|
|
572
|
-
}
|
|
573
|
-
}
|
|
574
|
-
var lr = function(e, r, t, o, c, p, u) {
|
|
575
|
-
var s = {
|
|
576
|
-
// This tag allows us to uniquely identify this as a React Element
|
|
577
|
-
$$typeof: a,
|
|
578
|
-
// Built-in properties that belong on the element
|
|
579
|
-
type: e,
|
|
580
|
-
key: r,
|
|
581
|
-
ref: t,
|
|
582
|
-
props: u,
|
|
583
|
-
// Record the component responsible for creating this element.
|
|
584
|
-
_owner: p
|
|
585
|
-
};
|
|
586
|
-
return s._store = {}, Object.defineProperty(s._store, "validated", {
|
|
587
|
-
configurable: !1,
|
|
588
|
-
enumerable: !1,
|
|
589
|
-
writable: !0,
|
|
590
|
-
value: !1
|
|
591
|
-
}), Object.defineProperty(s, "_self", {
|
|
592
|
-
configurable: !1,
|
|
593
|
-
enumerable: !1,
|
|
594
|
-
writable: !1,
|
|
595
|
-
value: o
|
|
596
|
-
}), Object.defineProperty(s, "_source", {
|
|
597
|
-
configurable: !1,
|
|
598
|
-
enumerable: !1,
|
|
599
|
-
writable: !1,
|
|
600
|
-
value: c
|
|
601
|
-
}), Object.freeze && (Object.freeze(s.props), Object.freeze(s)), s;
|
|
602
|
-
};
|
|
603
|
-
function fr(e, r, t, o, c) {
|
|
604
|
-
{
|
|
605
|
-
var p, u = {}, s = null, x = null;
|
|
606
|
-
t !== void 0 && (ge(t), s = "" + t), ir(r) && (ge(r.key), s = "" + r.key), or(r) && (x = r.ref, sr(r, c));
|
|
607
|
-
for (p in r)
|
|
608
|
-
q.call(r, p) && !ar.hasOwnProperty(p) && (u[p] = r[p]);
|
|
609
|
-
if (e && e.defaultProps) {
|
|
610
|
-
var y = e.defaultProps;
|
|
611
|
-
for (p in y)
|
|
612
|
-
u[p] === void 0 && (u[p] = y[p]);
|
|
613
|
-
}
|
|
614
|
-
if (s || x) {
|
|
615
|
-
var _ = typeof e == "function" ? e.displayName || e.name || "Unknown" : e;
|
|
616
|
-
s && ur(u, _), x && cr(u, _);
|
|
617
|
-
}
|
|
618
|
-
return lr(e, s, x, c, o, _e.current, u);
|
|
619
|
-
}
|
|
620
|
-
}
|
|
621
|
-
var ee = j.ReactCurrentOwner, Te = j.ReactDebugCurrentFrame;
|
|
622
|
-
function Y(e) {
|
|
623
|
-
if (e) {
|
|
624
|
-
var r = e._owner, t = K(e.type, e._source, r ? r.type : null);
|
|
625
|
-
Te.setExtraStackFrame(t);
|
|
626
|
-
} else
|
|
627
|
-
Te.setExtraStackFrame(null);
|
|
628
|
-
}
|
|
629
|
-
var re;
|
|
630
|
-
re = !1;
|
|
631
|
-
function te(e) {
|
|
632
|
-
return typeof e == "object" && e !== null && e.$$typeof === a;
|
|
633
|
-
}
|
|
634
|
-
function je() {
|
|
635
|
-
{
|
|
636
|
-
if (ee.current) {
|
|
637
|
-
var e = I(ee.current.type);
|
|
638
|
-
if (e)
|
|
639
|
-
return `
|
|
640
|
-
|
|
641
|
-
Check the render method of \`` + e + "`.";
|
|
642
|
-
}
|
|
643
|
-
return "";
|
|
644
|
-
}
|
|
645
|
-
}
|
|
646
|
-
function dr(e) {
|
|
647
|
-
return "";
|
|
648
|
-
}
|
|
649
|
-
var xe = {};
|
|
650
|
-
function vr(e) {
|
|
651
|
-
{
|
|
652
|
-
var r = je();
|
|
653
|
-
if (!r) {
|
|
654
|
-
var t = typeof e == "string" ? e : e.displayName || e.name;
|
|
655
|
-
t && (r = `
|
|
656
|
-
|
|
657
|
-
Check the top-level render call using <` + t + ">.");
|
|
658
|
-
}
|
|
659
|
-
return r;
|
|
660
|
-
}
|
|
661
|
-
}
|
|
662
|
-
function we(e, r) {
|
|
663
|
-
{
|
|
664
|
-
if (!e._store || e._store.validated || e.key != null)
|
|
665
|
-
return;
|
|
666
|
-
e._store.validated = !0;
|
|
667
|
-
var t = vr(r);
|
|
668
|
-
if (xe[t])
|
|
669
|
-
return;
|
|
670
|
-
xe[t] = !0;
|
|
671
|
-
var o = "";
|
|
672
|
-
e && e._owner && e._owner !== ee.current && (o = " It was passed a child from " + I(e._owner.type) + "."), Y(e), m('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', t, o), Y(null);
|
|
673
|
-
}
|
|
674
|
-
}
|
|
675
|
-
function Ce(e, r) {
|
|
676
|
-
{
|
|
677
|
-
if (typeof e != "object")
|
|
678
|
-
return;
|
|
679
|
-
if (Q(e))
|
|
680
|
-
for (var t = 0; t < e.length; t++) {
|
|
681
|
-
var o = e[t];
|
|
682
|
-
te(o) && we(o, r);
|
|
683
|
-
}
|
|
684
|
-
else if (te(e))
|
|
685
|
-
e._store && (e._store.validated = !0);
|
|
686
|
-
else if (e) {
|
|
687
|
-
var c = R(e);
|
|
688
|
-
if (typeof c == "function" && c !== e.entries)
|
|
689
|
-
for (var p = c.call(e), u; !(u = p.next()).done; )
|
|
690
|
-
te(u.value) && we(u.value, r);
|
|
691
|
-
}
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
function pr(e) {
|
|
695
|
-
{
|
|
696
|
-
var r = e.type;
|
|
697
|
-
if (r == null || typeof r == "string")
|
|
698
|
-
return;
|
|
699
|
-
var t;
|
|
700
|
-
if (typeof r == "function")
|
|
701
|
-
t = r.propTypes;
|
|
702
|
-
else if (typeof r == "object" && (r.$$typeof === i || // Note: Memo only checks outer props here.
|
|
703
|
-
// Inner props are checked in the reconciler.
|
|
704
|
-
r.$$typeof === d))
|
|
705
|
-
t = r.propTypes;
|
|
706
|
-
else
|
|
707
|
-
return;
|
|
708
|
-
if (t) {
|
|
709
|
-
var o = I(r);
|
|
710
|
-
er(t, e.props, "prop", o, e);
|
|
711
|
-
} else if (r.PropTypes !== void 0 && !re) {
|
|
712
|
-
re = !0;
|
|
713
|
-
var c = I(r);
|
|
714
|
-
m("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", c || "Unknown");
|
|
715
|
-
}
|
|
716
|
-
typeof r.getDefaultProps == "function" && !r.getDefaultProps.isReactClassApproved && m("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
|
717
|
-
}
|
|
718
|
-
}
|
|
719
|
-
function br(e) {
|
|
720
|
-
{
|
|
721
|
-
for (var r = Object.keys(e.props), t = 0; t < r.length; t++) {
|
|
722
|
-
var o = r[t];
|
|
723
|
-
if (o !== "children" && o !== "key") {
|
|
724
|
-
Y(e), m("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", o), Y(null);
|
|
725
|
-
break;
|
|
726
|
-
}
|
|
727
|
-
}
|
|
728
|
-
e.ref !== null && (Y(e), m("Invalid attribute `ref` supplied to `React.Fragment`."), Y(null));
|
|
729
|
-
}
|
|
730
|
-
}
|
|
731
|
-
var Pe = {};
|
|
732
|
-
function ke(e, r, t, o, c, p) {
|
|
733
|
-
{
|
|
734
|
-
var u = Je(e);
|
|
735
|
-
if (!u) {
|
|
736
|
-
var s = "";
|
|
737
|
-
(e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (s += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
738
|
-
var x = dr();
|
|
739
|
-
x ? s += x : s += je();
|
|
740
|
-
var y;
|
|
741
|
-
e === null ? y = "null" : Q(e) ? y = "array" : e !== void 0 && e.$$typeof === a ? (y = "<" + (I(e.type) || "Unknown") + " />", s = " Did you accidentally export a JSX literal instead of a component?") : y = typeof e, m("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", y, s);
|
|
742
|
-
}
|
|
743
|
-
var _ = fr(e, r, t, c, p);
|
|
744
|
-
if (_ == null)
|
|
745
|
-
return _;
|
|
746
|
-
if (u) {
|
|
747
|
-
var C = r.children;
|
|
748
|
-
if (C !== void 0)
|
|
749
|
-
if (o)
|
|
750
|
-
if (Q(C)) {
|
|
751
|
-
for (var L = 0; L < C.length; L++)
|
|
752
|
-
Ce(C[L], e);
|
|
753
|
-
Object.freeze && Object.freeze(C);
|
|
754
|
-
} else
|
|
755
|
-
m("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
|
756
|
-
else
|
|
757
|
-
Ce(C, e);
|
|
758
|
-
}
|
|
759
|
-
if (q.call(r, "key")) {
|
|
760
|
-
var $ = I(e), w = Object.keys(r).filter(function(gr) {
|
|
761
|
-
return gr !== "key";
|
|
762
|
-
}), ne = w.length > 0 ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}";
|
|
763
|
-
if (!Pe[$ + ne]) {
|
|
764
|
-
var yr = w.length > 0 ? "{" + w.join(": ..., ") + ": ...}" : "{}";
|
|
765
|
-
m(`A props object containing a "key" prop is being spread into JSX:
|
|
766
|
-
let props = %s;
|
|
767
|
-
<%s {...props} />
|
|
768
|
-
React keys must be passed directly to JSX without using spread:
|
|
769
|
-
let props = %s;
|
|
770
|
-
<%s key={someKey} {...props} />`, ne, $, yr, $), Pe[$ + ne] = !0;
|
|
771
|
-
}
|
|
772
|
-
}
|
|
773
|
-
return e === b ? br(_) : pr(_), _;
|
|
774
|
-
}
|
|
775
|
-
}
|
|
776
|
-
function hr(e, r, t) {
|
|
777
|
-
return ke(e, r, t, !0);
|
|
778
|
-
}
|
|
779
|
-
function Er(e, r, t) {
|
|
780
|
-
return ke(e, r, t, !1);
|
|
781
|
-
}
|
|
782
|
-
var Rr = Er, mr = hr;
|
|
783
|
-
N.Fragment = b, N.jsx = Rr, N.jsxs = mr;
|
|
784
|
-
}()), N;
|
|
785
|
-
}
|
|
786
|
-
process.env.NODE_ENV === "production" ? oe.exports = Dr() : oe.exports = Fr();
|
|
787
|
-
var O = oe.exports;
|
|
788
|
-
function Br(n, a) {
|
|
789
|
-
const l = a === void 0 ? void 0 : typeof a == "object" && a !== null && !Array.isArray(a) && ("equals" in a || "loading" in a || "error" in a) ? a : { equals: a };
|
|
790
|
-
return /* @__PURE__ */ O.jsx(
|
|
791
|
-
Ur,
|
|
163
|
+
function sr(r, e) {
|
|
164
|
+
const t = e === void 0 ? void 0 : typeof e == "object" && e !== null && !Array.isArray(e) && ("equals" in e || "loading" in e || "error" in e) ? e : { equals: e };
|
|
165
|
+
return /* @__PURE__ */ d(
|
|
166
|
+
X,
|
|
792
167
|
{
|
|
793
|
-
selectorOrAtom:
|
|
794
|
-
options:
|
|
168
|
+
selectorOrAtom: r,
|
|
169
|
+
options: t
|
|
795
170
|
}
|
|
796
171
|
);
|
|
797
172
|
}
|
|
798
|
-
class
|
|
173
|
+
class G extends V {
|
|
799
174
|
constructor() {
|
|
800
175
|
super(...arguments);
|
|
801
|
-
|
|
176
|
+
w(this, "state", { error: null });
|
|
802
177
|
}
|
|
803
|
-
static getDerivedStateFromError(
|
|
804
|
-
return { error:
|
|
178
|
+
static getDerivedStateFromError(t) {
|
|
179
|
+
return { error: t };
|
|
805
180
|
}
|
|
806
181
|
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
807
|
-
componentDidCatch(
|
|
182
|
+
componentDidCatch(t, u) {
|
|
808
183
|
}
|
|
809
184
|
render() {
|
|
810
185
|
if (this.state.error !== null && this.props.onError)
|
|
811
|
-
return /* @__PURE__ */
|
|
186
|
+
return /* @__PURE__ */ d(O, { children: this.props.onError({ error: this.state.error }) });
|
|
812
187
|
if (this.state.error !== null)
|
|
813
188
|
throw this.state.error;
|
|
814
189
|
return this.props.children;
|
|
815
190
|
}
|
|
816
191
|
}
|
|
817
|
-
function
|
|
818
|
-
const
|
|
819
|
-
return /* @__PURE__ */
|
|
192
|
+
function N(r) {
|
|
193
|
+
const e = q(r.selector, r.equals);
|
|
194
|
+
return /* @__PURE__ */ d(O, { children: e ?? null });
|
|
820
195
|
}
|
|
821
|
-
function
|
|
822
|
-
return /* @__PURE__ */
|
|
196
|
+
function J(r) {
|
|
197
|
+
return /* @__PURE__ */ d(O, { children: r.render() });
|
|
823
198
|
}
|
|
824
|
-
function
|
|
825
|
-
return
|
|
199
|
+
function K(r) {
|
|
200
|
+
return r.fallback ? /* @__PURE__ */ d(_, { fallback: /* @__PURE__ */ d(J, { render: r.fallback }), children: r.children }) : /* @__PURE__ */ d(O, { children: r.children });
|
|
826
201
|
}
|
|
827
|
-
function
|
|
828
|
-
return
|
|
202
|
+
function Q(r) {
|
|
203
|
+
return r.onError ? /* @__PURE__ */ d(G, { onError: r.onError, children: r.children }) : /* @__PURE__ */ d(O, { children: r.children });
|
|
829
204
|
}
|
|
830
|
-
const
|
|
831
|
-
function(
|
|
832
|
-
var
|
|
833
|
-
const
|
|
834
|
-
|
|
835
|
-
const
|
|
836
|
-
(
|
|
837
|
-
|
|
205
|
+
const X = U(
|
|
206
|
+
function(e) {
|
|
207
|
+
var o, n, h, l;
|
|
208
|
+
const t = m(e.selectorOrAtom);
|
|
209
|
+
t.current = e.selectorOrAtom;
|
|
210
|
+
const u = g(e.selectorOrAtom), a = (o = e.options) == null ? void 0 : o.deps, b = u ? [e.selectorOrAtom, ...a ?? []] : a ?? [{}], i = y(
|
|
211
|
+
(c) => g(t.current) ? c.read(t.current) : t.current(c),
|
|
212
|
+
b
|
|
838
213
|
);
|
|
839
|
-
return /* @__PURE__ */
|
|
214
|
+
return /* @__PURE__ */ d(Q, { onError: (n = e.options) == null ? void 0 : n.error, children: /* @__PURE__ */ d(K, { fallback: (h = e.options) == null ? void 0 : h.loading, children: /* @__PURE__ */ d(N, { selector: i, equals: (l = e.options) == null ? void 0 : l.equals }) }) });
|
|
840
215
|
},
|
|
841
|
-
(
|
|
216
|
+
(r, e) => D(r.selectorOrAtom, e.selectorOrAtom) && D(r.options, e.options)
|
|
842
217
|
);
|
|
843
218
|
export {
|
|
844
|
-
|
|
845
|
-
|
|
846
|
-
|
|
847
|
-
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
851
|
-
|
|
852
|
-
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
219
|
+
ir as AllAtomsRejectedError,
|
|
220
|
+
ur as atom,
|
|
221
|
+
ar as batch,
|
|
222
|
+
lr as define,
|
|
223
|
+
fr as derived,
|
|
224
|
+
dr as effect,
|
|
225
|
+
br as emitter,
|
|
226
|
+
hr as getAtomState,
|
|
227
|
+
g as isAtom,
|
|
228
|
+
mr as isDerived,
|
|
229
|
+
Rr as isFulfilled,
|
|
230
|
+
Er as isPending,
|
|
231
|
+
pr as isRejected,
|
|
232
|
+
Sr as onCreateHook,
|
|
233
|
+
yr as onErrorHook,
|
|
234
|
+
Ar as promisesEqual,
|
|
235
|
+
vr as readonly,
|
|
236
|
+
sr as rx,
|
|
237
|
+
C as select,
|
|
238
|
+
gr as trackPromise,
|
|
239
|
+
Or as unwrap,
|
|
240
|
+
nr as useAction,
|
|
241
|
+
q as useSelector,
|
|
242
|
+
tr as useStable
|
|
868
243
|
};
|
package/package.json
CHANGED
package/vite.config.ts
CHANGED
|
@@ -23,11 +23,14 @@ export default defineConfig({
|
|
|
23
23
|
formats: ["es", "cjs"],
|
|
24
24
|
},
|
|
25
25
|
rollupOptions: {
|
|
26
|
-
|
|
26
|
+
// Use regex to externalize all react-related imports including jsx-runtime
|
|
27
|
+
external: [/^react($|\/)/, /^react-dom($|\/)/],
|
|
27
28
|
output: {
|
|
28
29
|
globals: {
|
|
29
30
|
react: "React",
|
|
30
31
|
"react-dom": "ReactDOM",
|
|
32
|
+
"react/jsx-runtime": "React",
|
|
33
|
+
"react/jsx-dev-runtime": "React",
|
|
31
34
|
},
|
|
32
35
|
},
|
|
33
36
|
},
|