@argon-router/react 0.8.1 → 0.8.2
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/index.cjs +10 -10
- package/dist/index.js +218 -207
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const y=require("react"),P=require("effector-react");var N={exports:{}},S={};/**
|
|
2
2
|
* @license React
|
|
3
3
|
* react-jsx-runtime.production.js
|
|
4
4
|
*
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* This source code is licensed under the MIT license found in the
|
|
8
8
|
* LICENSE file in the root directory of this source tree.
|
|
9
|
-
*/var
|
|
9
|
+
*/var be;function Se(){if(be)return S;be=1;var n=Symbol.for("react.transitional.element"),s=Symbol.for("react.fragment");function i(m,l,E){var g=null;if(E!==void 0&&(g=""+E),l.key!==void 0&&(g=""+l.key),"key"in l){E={};for(var b in l)b!=="key"&&(E[b]=l[b])}else E=l;return l=E.ref,{$$typeof:n,type:m,key:g,ref:l!==void 0?l:null,props:E}}return S.Fragment=s,S.jsx=i,S.jsxs=i,S}var O={};/**
|
|
10
10
|
* @license React
|
|
11
11
|
* react-jsx-runtime.development.js
|
|
12
12
|
*
|
|
@@ -14,18 +14,18 @@
|
|
|
14
14
|
*
|
|
15
15
|
* This source code is licensed under the MIT license found in the
|
|
16
16
|
* LICENSE file in the root directory of this source tree.
|
|
17
|
-
*/var
|
|
17
|
+
*/var ge;function Oe(){return ge||(ge=1,process.env.NODE_ENV!=="production"&&function(){function n(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===pe?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case V:return"Fragment";case he:return"Portal";case Q:return"Profiler";case Z:return"StrictMode";case W:return"Suspense";case q:return"SuspenseList"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case ee:return(e.displayName||"Context")+".Provider";case D:return(e._context.displayName||"Context")+".Consumer";case U:var r=e.render;return e=e.displayName,e||(e=r.displayName||r.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case z:return r=e.displayName||null,r!==null?r:n(e.type)||"Memo";case J:r=e._payload,e=e._init;try{return n(e(r))}catch{}}return null}function s(e){return""+e}function i(e){try{s(e);var r=!1}catch{r=!0}if(r){r=console;var t=r.error,a=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return t.call(r,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",a),s(e)}}function m(){}function l(){if(k===0){oe=console.log,ne=console.info,ae=console.warn,ue=console.error,se=console.group,ie=console.groupCollapsed,le=console.groupEnd;var e={configurable:!0,enumerable:!0,value:m,writable:!0};Object.defineProperties(console,{info:e,log:e,warn:e,error:e,group:e,groupCollapsed:e,groupEnd:e})}k++}function E(){if(k--,k===0){var e={configurable:!0,enumerable:!0,writable:!0};Object.defineProperties(console,{log:h({},e,{value:oe}),info:h({},e,{value:ne}),warn:h({},e,{value:ae}),error:h({},e,{value:ue}),group:h({},e,{value:se}),groupCollapsed:h({},e,{value:ie}),groupEnd:h({},e,{value:le})})}0>k&&console.error("disabledDepth fell below zero. This is a bug in React. Please file an issue.")}function g(e){if(G===void 0)try{throw Error()}catch(t){var r=t.stack.trim().match(/\n( *(at )?)/);G=r&&r[1]||"",ce=-1<t.stack.indexOf(`
|
|
18
18
|
at`)?" (<anonymous>)":-1<t.stack.indexOf("@")?"@unknown:0:0":""}return`
|
|
19
|
-
`+
|
|
20
|
-
`),T=
|
|
21
|
-
`);for(o=u=0;u<
|
|
22
|
-
`+
|
|
19
|
+
`+G+e+ce}function b(e,r){if(!e||B)return"";var t=F.get(e);if(t!==void 0)return t;B=!0,t=Error.prepareStackTrace,Error.prepareStackTrace=void 0;var a=null;a=_.H,_.H=null,l();try{var c={DetermineComponentFrameRoot:function(){try{if(r){var j=function(){throw Error()};if(Object.defineProperty(j.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(j,[])}catch(x){var A=x}Reflect.construct(e,[],j)}else{try{j.call()}catch(x){A=x}e.call(j.prototype)}}else{try{throw Error()}catch(x){A=x}(j=e())&&typeof j.catch=="function"&&j.catch(function(){})}}catch(x){if(x&&A&&typeof x.stack=="string")return[x.stack,A.stack]}return[null,null]}};c.DetermineComponentFrameRoot.displayName="DetermineComponentFrameRoot";var u=Object.getOwnPropertyDescriptor(c.DetermineComponentFrameRoot,"name");u&&u.configurable&&Object.defineProperty(c.DetermineComponentFrameRoot,"name",{value:"DetermineComponentFrameRoot"});var o=c.DetermineComponentFrameRoot(),w=o[0],p=o[1];if(w&&p){var d=w.split(`
|
|
20
|
+
`),T=p.split(`
|
|
21
|
+
`);for(o=u=0;u<d.length&&!d[u].includes("DetermineComponentFrameRoot");)u++;for(;o<T.length&&!T[o].includes("DetermineComponentFrameRoot");)o++;if(u===d.length||o===T.length)for(u=d.length-1,o=T.length-1;1<=u&&0<=o&&d[u]!==T[o];)o--;for(;1<=u&&0<=o;u--,o--)if(d[u]!==T[o]){if(u!==1||o!==1)do if(u--,o--,0>o||d[u]!==T[o]){var C=`
|
|
22
|
+
`+d[u].replace(" at new "," at ");return e.displayName&&C.includes("<anonymous>")&&(C=C.replace("<anonymous>",e.displayName)),typeof e=="function"&&F.set(e,C),C}while(1<=u&&0<=o);break}}}finally{B=!1,_.H=a,E(),Error.prepareStackTrace=t}return d=(d=e?e.displayName||e.name:"")?g(d):"",typeof e=="function"&&F.set(e,d),d}function R(e){if(e==null)return"";if(typeof e=="function"){var r=e.prototype;return b(e,!(!r||!r.isReactComponent))}if(typeof e=="string")return g(e);switch(e){case W:return g("Suspense");case q:return g("SuspenseList")}if(typeof e=="object")switch(e.$$typeof){case U:return e=b(e.render,!1),e;case z:return R(e.type);case J:r=e._payload,e=e._init;try{return R(e(r))}catch{}}return""}function f(){var e=_.A;return e===null?null:e.getOwner()}function Y(e){if(te.call(e,"key")){var r=Object.getOwnPropertyDescriptor(e,"key").get;if(r&&r.isReactWarning)return!1}return e.key!==void 0}function we(e,r){function t(){fe||(fe=!0,console.error("%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://react.dev/link/special-props)",r))}t.isReactWarning=!0,Object.defineProperty(e,"key",{get:t,configurable:!0})}function xe(){var e=n(this.type);return de[e]||(de[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function ye(e,r,t,a,c,u){return t=u.ref,e={$$typeof:$,type:e,key:r,props:u,_owner:c},(t!==void 0?t:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:xe}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function X(e,r,t,a,c,u){if(typeof e=="string"||typeof e=="function"||e===V||e===Q||e===Z||e===W||e===q||e===Te||typeof e=="object"&&e!==null&&(e.$$typeof===J||e.$$typeof===z||e.$$typeof===ee||e.$$typeof===D||e.$$typeof===U||e.$$typeof===ke||e.getModuleId!==void 0)){var o=r.children;if(o!==void 0)if(a)if(L(o)){for(a=0;a<o.length;a++)K(o[a],e);Object.freeze&&Object.freeze(o)}else console.error("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 K(o,e)}else o="",(e===void 0||typeof e=="object"&&e!==null&&Object.keys(e).length===0)&&(o+=" You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."),e===null?a="null":L(e)?a="array":e!==void 0&&e.$$typeof===$?(a="<"+(n(e.type)||"Unknown")+" />",o=" Did you accidentally export a JSX literal instead of a component?"):a=typeof e,console.error("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",a,o);if(te.call(r,"key")){o=n(e);var w=Object.keys(r).filter(function(d){return d!=="key"});a=0<w.length?"{key: someKey, "+w.join(": ..., ")+": ...}":"{key: someKey}",ve[o+a]||(w=0<w.length?"{"+w.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
23
23
|
let props = %s;
|
|
24
24
|
<%s {...props} />
|
|
25
25
|
React keys must be passed directly to JSX without using spread:
|
|
26
26
|
let props = %s;
|
|
27
|
-
<%s key={someKey} {...props} />`,
|
|
27
|
+
<%s key={someKey} {...props} />`,a,o,w,o),ve[o+a]=!0)}if(o=null,t!==void 0&&(i(t),o=""+t),Y(r)&&(i(r.key),o=""+r.key),"key"in r){t={};for(var p in r)p!=="key"&&(t[p]=r[p])}else t=r;return o&&we(t,typeof e=="function"?e.displayName||e.name||"Unknown":e),ye(e,o,u,c,f(),t)}function K(e,r){if(typeof e=="object"&&e&&e.$$typeof!==Ce){if(L(e))for(var t=0;t<e.length;t++){var a=e[t];M(a)&&I(a,r)}else if(M(e))e._store&&(e._store.validated=1);else if(e===null||typeof e!="object"?t=null:(t=re&&e[re]||e["@@iterator"],t=typeof t=="function"?t:null),typeof t=="function"&&t!==e.entries&&(t=t.call(e),t!==e))for(;!(e=t.next()).done;)M(e.value)&&I(e.value,r)}}function M(e){return typeof e=="object"&&e!==null&&e.$$typeof===$}function I(e,r){if(e._store&&!e._store.validated&&e.key==null&&(e._store.validated=1,r=je(r),!Ee[r])){Ee[r]=!0;var t="";e&&e._owner!=null&&e._owner!==f()&&(t=null,typeof e._owner.tag=="number"?t=n(e._owner.type):typeof e._owner.name=="string"&&(t=e._owner.name),t=" It was passed a child from "+t+".");var a=_.getCurrentStack;_.getCurrentStack=function(){var c=R(e.type);return a&&(c+=a()||""),c},console.error('Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',r,t),_.getCurrentStack=a}}function je(e){var r="",t=f();return t&&(t=n(t.type))&&(r=`
|
|
28
28
|
|
|
29
|
-
Check the render method of \``+t+"`."),r||(e=
|
|
29
|
+
Check the render method of \``+t+"`."),r||(e=n(e))&&(r=`
|
|
30
30
|
|
|
31
|
-
Check the top-level render call using <`+e+">."),r}var
|
|
31
|
+
Check the top-level render call using <`+e+">."),r}var _e=y,$=Symbol.for("react.transitional.element"),he=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),Q=Symbol.for("react.profiler"),D=Symbol.for("react.consumer"),ee=Symbol.for("react.context"),U=Symbol.for("react.forward_ref"),W=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),z=Symbol.for("react.memo"),J=Symbol.for("react.lazy"),Te=Symbol.for("react.offscreen"),re=Symbol.iterator,pe=Symbol.for("react.client.reference"),_=_e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,te=Object.prototype.hasOwnProperty,h=Object.assign,ke=Symbol.for("react.client.reference"),L=Array.isArray,k=0,oe,ne,ae,ue,se,ie,le;m.__reactDisabledLog=!0;var G,ce,B=!1,F=new(typeof WeakMap=="function"?WeakMap:Map),Ce=Symbol.for("react.client.reference"),fe,de={},ve={},Ee={};O.Fragment=V,O.jsx=function(e,r,t,a,c){return X(e,r,t,!1,a,c)},O.jsxs=function(e,r,t,a,c){return X(e,r,t,!0,a,c)}}()),O}var me;function Ae(){return me||(me=1,process.env.NODE_ENV==="production"?N.exports=Se():N.exports=Oe()),N.exports}var v=Ae();const Re=y.createContext(null),Ne=n=>v.jsx(Re.Provider,{value:n.router,children:n.children});function H(){const n=y.useContext(Re);if(!n)throw new Error("[useRouter] Router not found. Add RouterProvider in app root");return n}function Pe(){return P.useUnit(H())}const Ye=y.forwardRef((n,s)=>{const{to:i,params:m,onClick:l,...E}=n,{mappedRoutes:g}=H(),b=g.find(({route:f})=>f===i),{onOpen:R}=P.useUnit(i);if(!b)throw new Error(`[Link] Route with path "${i.path}" not found. Maybe it is not passed into createRouter?`);return v.jsx("a",{...E,ref:s,href:b.build(m??void 0),onClick:f=>{l==null||l(f),!f.defaultPrevented&&(E.target&&E.target!=="_self"||f.metaKey||f.altKey||f.ctrlKey||f.shiftKey||(f.preventDefault(),R({params:m||{}})))}})});function Me(n){return{route:n.route,view:()=>{const{view:s,layout:i}=n;return i?v.jsx(i,{children:v.jsx(s,{})}):v.jsx(s,{})}}}function $e(n,s){return s?s.getState(n):n.getState()}const Ve=n=>{const{routes:s,otherwise:i}=n;return()=>{const m=P.useProvidedScope(),l=P.useUnit(s.map(b=>b.route.$isOpened)),g=y.useMemo(()=>{const b=s.filter(R=>!!$e(R.route.$isOpened,m));return b.reduce((R,f)=>R.filter(Y=>Y.route!==f.route.parent),b)},[l]).at(-1);return g?y.createElement(g.view):i?v.jsx(i,{}):null}};function Ue(n){n.route.internal.setAsyncImport(n.view);const s=y.lazy(n.view);return{route:n.route,view:()=>{const{layout:i,fallback:m=()=>v.jsx(v.Fragment,{})}=n;return i?v.jsx(i,{children:v.jsx(y.Suspense,{fallback:v.jsx(m,{}),children:v.jsx(s,{})})}):v.jsx(y.Suspense,{fallback:v.jsx(m,{}),children:v.jsx(s,{})})}}}exports.Link=Ye;exports.RouterProvider=Ne;exports.createLazyRouteView=Ue;exports.createRouteView=Me;exports.createRoutesView=Ve;exports.useRouter=Pe;exports.useRouterContext=H;
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { useUnit as
|
|
3
|
-
var
|
|
1
|
+
import Se, { createContext as Oe, useContext as Ae, forwardRef as Ne, useMemo as Pe, createElement as Ye, lazy as $e, Suspense as ve } from "react";
|
|
2
|
+
import { useUnit as B, useProvidedScope as Me } from "effector-react";
|
|
3
|
+
var A = { exports: {} }, C = {};
|
|
4
4
|
/**
|
|
5
5
|
* @license React
|
|
6
6
|
* react-jsx-runtime.production.js
|
|
@@ -10,29 +10,29 @@ var S = { exports: {} }, C = {};
|
|
|
10
10
|
* This source code is licensed under the MIT license found in the
|
|
11
11
|
* LICENSE file in the root directory of this source tree.
|
|
12
12
|
*/
|
|
13
|
-
var
|
|
14
|
-
function
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
var
|
|
18
|
-
function l(
|
|
19
|
-
var
|
|
20
|
-
if (
|
|
21
|
-
|
|
22
|
-
for (var
|
|
23
|
-
|
|
24
|
-
} else
|
|
25
|
-
return
|
|
26
|
-
$$typeof:
|
|
27
|
-
type:
|
|
28
|
-
key:
|
|
29
|
-
ref:
|
|
30
|
-
props:
|
|
13
|
+
var Ee;
|
|
14
|
+
function Ve() {
|
|
15
|
+
if (Ee) return C;
|
|
16
|
+
Ee = 1;
|
|
17
|
+
var n = Symbol.for("react.transitional.element"), s = Symbol.for("react.fragment");
|
|
18
|
+
function l(g, i, E) {
|
|
19
|
+
var m = null;
|
|
20
|
+
if (E !== void 0 && (m = "" + E), i.key !== void 0 && (m = "" + i.key), "key" in i) {
|
|
21
|
+
E = {};
|
|
22
|
+
for (var b in i)
|
|
23
|
+
b !== "key" && (E[b] = i[b]);
|
|
24
|
+
} else E = i;
|
|
25
|
+
return i = E.ref, {
|
|
26
|
+
$$typeof: n,
|
|
27
|
+
type: g,
|
|
28
|
+
key: m,
|
|
29
|
+
ref: i !== void 0 ? i : null,
|
|
30
|
+
props: E
|
|
31
31
|
};
|
|
32
32
|
}
|
|
33
|
-
return C.Fragment =
|
|
33
|
+
return C.Fragment = s, C.jsx = l, C.jsxs = l, C;
|
|
34
34
|
}
|
|
35
|
-
var
|
|
35
|
+
var S = {};
|
|
36
36
|
/**
|
|
37
37
|
* @license React
|
|
38
38
|
* react-jsx-runtime.development.js
|
|
@@ -42,24 +42,24 @@ var A = {};
|
|
|
42
42
|
* This source code is licensed under the MIT license found in the
|
|
43
43
|
* LICENSE file in the root directory of this source tree.
|
|
44
44
|
*/
|
|
45
|
-
var
|
|
46
|
-
function
|
|
47
|
-
return
|
|
48
|
-
function
|
|
45
|
+
var be;
|
|
46
|
+
function We() {
|
|
47
|
+
return be || (be = 1, process.env.NODE_ENV !== "production" && function() {
|
|
48
|
+
function n(e) {
|
|
49
49
|
if (e == null) return null;
|
|
50
50
|
if (typeof e == "function")
|
|
51
|
-
return e.$$typeof ===
|
|
51
|
+
return e.$$typeof === Te ? null : e.displayName || e.name || null;
|
|
52
52
|
if (typeof e == "string") return e;
|
|
53
53
|
switch (e) {
|
|
54
|
-
case
|
|
54
|
+
case $:
|
|
55
55
|
return "Fragment";
|
|
56
56
|
case he:
|
|
57
57
|
return "Portal";
|
|
58
|
-
case
|
|
58
|
+
case I:
|
|
59
59
|
return "Profiler";
|
|
60
|
-
case
|
|
60
|
+
case K:
|
|
61
61
|
return "StrictMode";
|
|
62
|
-
case
|
|
62
|
+
case V:
|
|
63
63
|
return "Suspense";
|
|
64
64
|
case W:
|
|
65
65
|
return "SuspenseList";
|
|
@@ -68,53 +68,53 @@ function $e() {
|
|
|
68
68
|
switch (typeof e.tag == "number" && console.error(
|
|
69
69
|
"Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."
|
|
70
70
|
), e.$$typeof) {
|
|
71
|
-
case
|
|
71
|
+
case Q:
|
|
72
72
|
return (e.displayName || "Context") + ".Provider";
|
|
73
|
-
case
|
|
73
|
+
case Z:
|
|
74
74
|
return (e._context.displayName || "Context") + ".Consumer";
|
|
75
75
|
case M:
|
|
76
76
|
var r = e.render;
|
|
77
77
|
return e = e.displayName, e || (e = r.displayName || r.name || "", e = e !== "" ? "ForwardRef(" + e + ")" : "ForwardRef"), e;
|
|
78
78
|
case U:
|
|
79
|
-
return r = e.displayName || null, r !== null ? r :
|
|
80
|
-
case
|
|
79
|
+
return r = e.displayName || null, r !== null ? r : n(e.type) || "Memo";
|
|
80
|
+
case z:
|
|
81
81
|
r = e._payload, e = e._init;
|
|
82
82
|
try {
|
|
83
|
-
return
|
|
83
|
+
return n(e(r));
|
|
84
84
|
} catch {
|
|
85
85
|
}
|
|
86
86
|
}
|
|
87
87
|
return null;
|
|
88
88
|
}
|
|
89
|
-
function
|
|
89
|
+
function s(e) {
|
|
90
90
|
return "" + e;
|
|
91
91
|
}
|
|
92
92
|
function l(e) {
|
|
93
93
|
try {
|
|
94
|
-
|
|
94
|
+
s(e);
|
|
95
95
|
var r = !1;
|
|
96
96
|
} catch {
|
|
97
97
|
r = !0;
|
|
98
98
|
}
|
|
99
99
|
if (r) {
|
|
100
100
|
r = console;
|
|
101
|
-
var t = r.error,
|
|
101
|
+
var t = r.error, a = typeof Symbol == "function" && Symbol.toStringTag && e[Symbol.toStringTag] || e.constructor.name || "Object";
|
|
102
102
|
return t.call(
|
|
103
103
|
r,
|
|
104
104
|
"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",
|
|
105
|
-
|
|
106
|
-
),
|
|
105
|
+
a
|
|
106
|
+
), s(e);
|
|
107
107
|
}
|
|
108
108
|
}
|
|
109
|
-
function
|
|
109
|
+
function g() {
|
|
110
110
|
}
|
|
111
|
-
function
|
|
112
|
-
if (
|
|
113
|
-
|
|
111
|
+
function i() {
|
|
112
|
+
if (T === 0) {
|
|
113
|
+
re = console.log, te = console.info, oe = console.warn, ne = console.error, ae = console.group, ue = console.groupCollapsed, se = console.groupEnd;
|
|
114
114
|
var e = {
|
|
115
115
|
configurable: !0,
|
|
116
116
|
enumerable: !0,
|
|
117
|
-
value:
|
|
117
|
+
value: g,
|
|
118
118
|
writable: !0
|
|
119
119
|
};
|
|
120
120
|
Object.defineProperties(console, {
|
|
@@ -127,83 +127,83 @@ function $e() {
|
|
|
127
127
|
groupEnd: e
|
|
128
128
|
});
|
|
129
129
|
}
|
|
130
|
-
|
|
130
|
+
T++;
|
|
131
131
|
}
|
|
132
|
-
function
|
|
133
|
-
if (
|
|
132
|
+
function E() {
|
|
133
|
+
if (T--, T === 0) {
|
|
134
134
|
var e = { configurable: !0, enumerable: !0, writable: !0 };
|
|
135
135
|
Object.defineProperties(console, {
|
|
136
|
-
log: _({}, e, { value:
|
|
137
|
-
info: _({}, e, { value:
|
|
138
|
-
warn: _({}, e, { value:
|
|
139
|
-
error: _({}, e, { value:
|
|
140
|
-
group: _({}, e, { value:
|
|
141
|
-
groupCollapsed: _({}, e, { value:
|
|
142
|
-
groupEnd: _({}, e, { value:
|
|
136
|
+
log: _({}, e, { value: re }),
|
|
137
|
+
info: _({}, e, { value: te }),
|
|
138
|
+
warn: _({}, e, { value: oe }),
|
|
139
|
+
error: _({}, e, { value: ne }),
|
|
140
|
+
group: _({}, e, { value: ae }),
|
|
141
|
+
groupCollapsed: _({}, e, { value: ue }),
|
|
142
|
+
groupEnd: _({}, e, { value: se })
|
|
143
143
|
});
|
|
144
144
|
}
|
|
145
|
-
0 >
|
|
145
|
+
0 > T && console.error(
|
|
146
146
|
"disabledDepth fell below zero. This is a bug in React. Please file an issue."
|
|
147
147
|
);
|
|
148
148
|
}
|
|
149
|
-
function
|
|
150
|
-
if (
|
|
149
|
+
function m(e) {
|
|
150
|
+
if (J === void 0)
|
|
151
151
|
try {
|
|
152
152
|
throw Error();
|
|
153
153
|
} catch (t) {
|
|
154
154
|
var r = t.stack.trim().match(/\n( *(at )?)/);
|
|
155
|
-
|
|
155
|
+
J = r && r[1] || "", le = -1 < t.stack.indexOf(`
|
|
156
156
|
at`) ? " (<anonymous>)" : -1 < t.stack.indexOf("@") ? "@unknown:0:0" : "";
|
|
157
157
|
}
|
|
158
158
|
return `
|
|
159
|
-
` +
|
|
159
|
+
` + J + e + le;
|
|
160
160
|
}
|
|
161
|
-
function
|
|
162
|
-
if (!e ||
|
|
163
|
-
var t =
|
|
161
|
+
function b(e, r) {
|
|
162
|
+
if (!e || G) return "";
|
|
163
|
+
var t = L.get(e);
|
|
164
164
|
if (t !== void 0) return t;
|
|
165
|
-
|
|
166
|
-
var
|
|
167
|
-
|
|
165
|
+
G = !0, t = Error.prepareStackTrace, Error.prepareStackTrace = void 0;
|
|
166
|
+
var a = null;
|
|
167
|
+
a = j.H, j.H = null, i();
|
|
168
168
|
try {
|
|
169
169
|
var c = {
|
|
170
170
|
DetermineComponentFrameRoot: function() {
|
|
171
171
|
try {
|
|
172
172
|
if (r) {
|
|
173
|
-
var
|
|
173
|
+
var y = function() {
|
|
174
174
|
throw Error();
|
|
175
175
|
};
|
|
176
|
-
if (Object.defineProperty(
|
|
176
|
+
if (Object.defineProperty(y.prototype, "props", {
|
|
177
177
|
set: function() {
|
|
178
178
|
throw Error();
|
|
179
179
|
}
|
|
180
180
|
}), typeof Reflect == "object" && Reflect.construct) {
|
|
181
181
|
try {
|
|
182
|
-
Reflect.construct(
|
|
183
|
-
} catch (
|
|
184
|
-
var O =
|
|
182
|
+
Reflect.construct(y, []);
|
|
183
|
+
} catch (R) {
|
|
184
|
+
var O = R;
|
|
185
185
|
}
|
|
186
|
-
Reflect.construct(e, [],
|
|
186
|
+
Reflect.construct(e, [], y);
|
|
187
187
|
} else {
|
|
188
188
|
try {
|
|
189
|
-
|
|
190
|
-
} catch (
|
|
191
|
-
O =
|
|
189
|
+
y.call();
|
|
190
|
+
} catch (R) {
|
|
191
|
+
O = R;
|
|
192
192
|
}
|
|
193
|
-
e.call(
|
|
193
|
+
e.call(y.prototype);
|
|
194
194
|
}
|
|
195
195
|
} else {
|
|
196
196
|
try {
|
|
197
197
|
throw Error();
|
|
198
|
-
} catch (
|
|
199
|
-
O =
|
|
198
|
+
} catch (R) {
|
|
199
|
+
O = R;
|
|
200
200
|
}
|
|
201
|
-
(
|
|
201
|
+
(y = e()) && typeof y.catch == "function" && y.catch(function() {
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
|
-
} catch (
|
|
205
|
-
if (
|
|
206
|
-
return [
|
|
204
|
+
} catch (R) {
|
|
205
|
+
if (R && O && typeof R.stack == "string")
|
|
206
|
+
return [R.stack, O.stack];
|
|
207
207
|
}
|
|
208
208
|
return [null, null];
|
|
209
209
|
}
|
|
@@ -218,12 +218,12 @@ function $e() {
|
|
|
218
218
|
"name",
|
|
219
219
|
{ value: "DetermineComponentFrameRoot" }
|
|
220
220
|
);
|
|
221
|
-
var o = c.DetermineComponentFrameRoot(),
|
|
222
|
-
if (
|
|
223
|
-
var
|
|
224
|
-
`), h =
|
|
221
|
+
var o = c.DetermineComponentFrameRoot(), w = o[0], p = o[1];
|
|
222
|
+
if (w && p) {
|
|
223
|
+
var d = w.split(`
|
|
224
|
+
`), h = p.split(`
|
|
225
225
|
`);
|
|
226
|
-
for (o = u = 0; u <
|
|
226
|
+
for (o = u = 0; u < d.length && !d[u].includes(
|
|
227
227
|
"DetermineComponentFrameRoot"
|
|
228
228
|
); )
|
|
229
229
|
u++;
|
|
@@ -231,67 +231,67 @@ function $e() {
|
|
|
231
231
|
"DetermineComponentFrameRoot"
|
|
232
232
|
); )
|
|
233
233
|
o++;
|
|
234
|
-
if (u ===
|
|
235
|
-
for (u =
|
|
234
|
+
if (u === d.length || o === h.length)
|
|
235
|
+
for (u = d.length - 1, o = h.length - 1; 1 <= u && 0 <= o && d[u] !== h[o]; )
|
|
236
236
|
o--;
|
|
237
237
|
for (; 1 <= u && 0 <= o; u--, o--)
|
|
238
|
-
if (
|
|
238
|
+
if (d[u] !== h[o]) {
|
|
239
239
|
if (u !== 1 || o !== 1)
|
|
240
240
|
do
|
|
241
|
-
if (u--, o--, 0 > o ||
|
|
241
|
+
if (u--, o--, 0 > o || d[u] !== h[o]) {
|
|
242
242
|
var k = `
|
|
243
|
-
` +
|
|
243
|
+
` + d[u].replace(
|
|
244
244
|
" at new ",
|
|
245
245
|
" at "
|
|
246
246
|
);
|
|
247
|
-
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" &&
|
|
247
|
+
return e.displayName && k.includes("<anonymous>") && (k = k.replace("<anonymous>", e.displayName)), typeof e == "function" && L.set(e, k), k;
|
|
248
248
|
}
|
|
249
249
|
while (1 <= u && 0 <= o);
|
|
250
250
|
break;
|
|
251
251
|
}
|
|
252
252
|
}
|
|
253
253
|
} finally {
|
|
254
|
-
|
|
254
|
+
G = !1, j.H = a, E(), Error.prepareStackTrace = t;
|
|
255
255
|
}
|
|
256
|
-
return
|
|
256
|
+
return d = (d = e ? e.displayName || e.name : "") ? m(d) : "", typeof e == "function" && L.set(e, d), d;
|
|
257
257
|
}
|
|
258
|
-
function
|
|
258
|
+
function x(e) {
|
|
259
259
|
if (e == null) return "";
|
|
260
260
|
if (typeof e == "function") {
|
|
261
261
|
var r = e.prototype;
|
|
262
|
-
return
|
|
262
|
+
return b(
|
|
263
263
|
e,
|
|
264
264
|
!(!r || !r.isReactComponent)
|
|
265
265
|
);
|
|
266
266
|
}
|
|
267
|
-
if (typeof e == "string") return
|
|
267
|
+
if (typeof e == "string") return m(e);
|
|
268
268
|
switch (e) {
|
|
269
|
-
case
|
|
270
|
-
return
|
|
269
|
+
case V:
|
|
270
|
+
return m("Suspense");
|
|
271
271
|
case W:
|
|
272
|
-
return
|
|
272
|
+
return m("SuspenseList");
|
|
273
273
|
}
|
|
274
274
|
if (typeof e == "object")
|
|
275
275
|
switch (e.$$typeof) {
|
|
276
276
|
case M:
|
|
277
|
-
return e =
|
|
277
|
+
return e = b(e.render, !1), e;
|
|
278
278
|
case U:
|
|
279
|
-
return
|
|
280
|
-
case
|
|
279
|
+
return x(e.type);
|
|
280
|
+
case z:
|
|
281
281
|
r = e._payload, e = e._init;
|
|
282
282
|
try {
|
|
283
|
-
return
|
|
283
|
+
return x(e(r));
|
|
284
284
|
} catch {
|
|
285
285
|
}
|
|
286
286
|
}
|
|
287
287
|
return "";
|
|
288
288
|
}
|
|
289
|
-
function
|
|
289
|
+
function f() {
|
|
290
290
|
var e = j.A;
|
|
291
291
|
return e === null ? null : e.getOwner();
|
|
292
292
|
}
|
|
293
|
-
function
|
|
294
|
-
if (
|
|
293
|
+
function N(e) {
|
|
294
|
+
if (ee.call(e, "key")) {
|
|
295
295
|
var r = Object.getOwnPropertyDescriptor(e, "key").get;
|
|
296
296
|
if (r && r.isReactWarning) return !1;
|
|
297
297
|
}
|
|
@@ -299,7 +299,7 @@ function $e() {
|
|
|
299
299
|
}
|
|
300
300
|
function we(e, r) {
|
|
301
301
|
function t() {
|
|
302
|
-
|
|
302
|
+
ie || (ie = !0, console.error(
|
|
303
303
|
"%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://react.dev/link/special-props)",
|
|
304
304
|
r
|
|
305
305
|
));
|
|
@@ -310,14 +310,14 @@ function $e() {
|
|
|
310
310
|
});
|
|
311
311
|
}
|
|
312
312
|
function Re() {
|
|
313
|
-
var e =
|
|
314
|
-
return
|
|
313
|
+
var e = n(this.type);
|
|
314
|
+
return ce[e] || (ce[e] = !0, console.error(
|
|
315
315
|
"Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release."
|
|
316
316
|
)), e = this.props.ref, e !== void 0 ? e : null;
|
|
317
317
|
}
|
|
318
|
-
function ye(e, r, t,
|
|
318
|
+
function ye(e, r, t, a, c, u) {
|
|
319
319
|
return t = u.ref, e = {
|
|
320
|
-
$$typeof:
|
|
320
|
+
$$typeof: Y,
|
|
321
321
|
type: e,
|
|
322
322
|
key: r,
|
|
323
323
|
props: u,
|
|
@@ -337,175 +337,186 @@ function $e() {
|
|
|
337
337
|
value: null
|
|
338
338
|
}), Object.freeze && (Object.freeze(e.props), Object.freeze(e)), e;
|
|
339
339
|
}
|
|
340
|
-
function
|
|
341
|
-
if (typeof e == "string" || typeof e == "function" || e ===
|
|
340
|
+
function F(e, r, t, a, c, u) {
|
|
341
|
+
if (typeof e == "string" || typeof e == "function" || e === $ || e === I || e === K || e === V || e === W || e === pe || typeof e == "object" && e !== null && (e.$$typeof === z || e.$$typeof === U || e.$$typeof === Q || e.$$typeof === Z || e.$$typeof === M || e.$$typeof === ke || e.getModuleId !== void 0)) {
|
|
342
342
|
var o = r.children;
|
|
343
343
|
if (o !== void 0)
|
|
344
|
-
if (
|
|
345
|
-
if (
|
|
346
|
-
for (
|
|
347
|
-
|
|
344
|
+
if (a)
|
|
345
|
+
if (q(o)) {
|
|
346
|
+
for (a = 0; a < o.length; a++)
|
|
347
|
+
H(o[a], e);
|
|
348
348
|
Object.freeze && Object.freeze(o);
|
|
349
349
|
} else
|
|
350
350
|
console.error(
|
|
351
351
|
"React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead."
|
|
352
352
|
);
|
|
353
|
-
else
|
|
353
|
+
else H(o, e);
|
|
354
354
|
} else
|
|
355
|
-
o = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ?
|
|
355
|
+
o = "", (e === void 0 || typeof e == "object" && e !== null && Object.keys(e).length === 0) && (o += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports."), e === null ? a = "null" : q(e) ? a = "array" : e !== void 0 && e.$$typeof === Y ? (a = "<" + (n(e.type) || "Unknown") + " />", o = " Did you accidentally export a JSX literal instead of a component?") : a = typeof e, console.error(
|
|
356
356
|
"React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s",
|
|
357
|
-
|
|
357
|
+
a,
|
|
358
358
|
o
|
|
359
359
|
);
|
|
360
|
-
if (
|
|
361
|
-
o =
|
|
362
|
-
var
|
|
363
|
-
return
|
|
360
|
+
if (ee.call(r, "key")) {
|
|
361
|
+
o = n(e);
|
|
362
|
+
var w = Object.keys(r).filter(function(d) {
|
|
363
|
+
return d !== "key";
|
|
364
364
|
});
|
|
365
|
-
|
|
365
|
+
a = 0 < w.length ? "{key: someKey, " + w.join(": ..., ") + ": ...}" : "{key: someKey}", fe[o + a] || (w = 0 < w.length ? "{" + w.join(": ..., ") + ": ...}" : "{}", console.error(
|
|
366
366
|
`A props object containing a "key" prop is being spread into JSX:
|
|
367
367
|
let props = %s;
|
|
368
368
|
<%s {...props} />
|
|
369
369
|
React keys must be passed directly to JSX without using spread:
|
|
370
370
|
let props = %s;
|
|
371
371
|
<%s key={someKey} {...props} />`,
|
|
372
|
-
|
|
372
|
+
a,
|
|
373
373
|
o,
|
|
374
|
-
|
|
374
|
+
w,
|
|
375
375
|
o
|
|
376
|
-
),
|
|
376
|
+
), fe[o + a] = !0);
|
|
377
377
|
}
|
|
378
|
-
if (o = null, t !== void 0 && (l(t), o = "" + t),
|
|
378
|
+
if (o = null, t !== void 0 && (l(t), o = "" + t), N(r) && (l(r.key), o = "" + r.key), "key" in r) {
|
|
379
379
|
t = {};
|
|
380
|
-
for (var
|
|
381
|
-
|
|
380
|
+
for (var p in r)
|
|
381
|
+
p !== "key" && (t[p] = r[p]);
|
|
382
382
|
} else t = r;
|
|
383
383
|
return o && we(
|
|
384
384
|
t,
|
|
385
385
|
typeof e == "function" ? e.displayName || e.name || "Unknown" : e
|
|
386
|
-
), ye(e, o, u, c,
|
|
386
|
+
), ye(e, o, u, c, f(), t);
|
|
387
387
|
}
|
|
388
|
-
function
|
|
388
|
+
function H(e, r) {
|
|
389
389
|
if (typeof e == "object" && e && e.$$typeof !== Ce) {
|
|
390
|
-
if (
|
|
390
|
+
if (q(e))
|
|
391
391
|
for (var t = 0; t < e.length; t++) {
|
|
392
|
-
var
|
|
393
|
-
|
|
392
|
+
var a = e[t];
|
|
393
|
+
P(a) && X(a, r);
|
|
394
394
|
}
|
|
395
|
-
else if (
|
|
395
|
+
else if (P(e))
|
|
396
396
|
e._store && (e._store.validated = 1);
|
|
397
|
-
else if (e === null || typeof e != "object" ? t = null : (t =
|
|
397
|
+
else if (e === null || typeof e != "object" ? t = null : (t = D && e[D] || e["@@iterator"], t = typeof t == "function" ? t : null), typeof t == "function" && t !== e.entries && (t = t.call(e), t !== e))
|
|
398
398
|
for (; !(e = t.next()).done; )
|
|
399
|
-
|
|
399
|
+
P(e.value) && X(e.value, r);
|
|
400
400
|
}
|
|
401
401
|
}
|
|
402
|
-
function
|
|
403
|
-
return typeof e == "object" && e !== null && e.$$typeof ===
|
|
402
|
+
function P(e) {
|
|
403
|
+
return typeof e == "object" && e !== null && e.$$typeof === Y;
|
|
404
404
|
}
|
|
405
|
-
function
|
|
406
|
-
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r = je(r), !
|
|
407
|
-
|
|
405
|
+
function X(e, r) {
|
|
406
|
+
if (e._store && !e._store.validated && e.key == null && (e._store.validated = 1, r = je(r), !de[r])) {
|
|
407
|
+
de[r] = !0;
|
|
408
408
|
var t = "";
|
|
409
|
-
e && e._owner != null && e._owner !==
|
|
410
|
-
var
|
|
409
|
+
e && e._owner != null && e._owner !== f() && (t = null, typeof e._owner.tag == "number" ? t = n(e._owner.type) : typeof e._owner.name == "string" && (t = e._owner.name), t = " It was passed a child from " + t + ".");
|
|
410
|
+
var a = j.getCurrentStack;
|
|
411
411
|
j.getCurrentStack = function() {
|
|
412
|
-
var c =
|
|
413
|
-
return
|
|
412
|
+
var c = x(e.type);
|
|
413
|
+
return a && (c += a() || ""), c;
|
|
414
414
|
}, console.error(
|
|
415
415
|
'Each child in a list should have a unique "key" prop.%s%s See https://react.dev/link/warning-keys for more information.',
|
|
416
416
|
r,
|
|
417
417
|
t
|
|
418
|
-
), j.getCurrentStack =
|
|
418
|
+
), j.getCurrentStack = a;
|
|
419
419
|
}
|
|
420
420
|
}
|
|
421
421
|
function je(e) {
|
|
422
|
-
var r = "", t =
|
|
423
|
-
return t && (t =
|
|
422
|
+
var r = "", t = f();
|
|
423
|
+
return t && (t = n(t.type)) && (r = `
|
|
424
424
|
|
|
425
|
-
Check the render method of \`` + t + "`."), r || (e =
|
|
425
|
+
Check the render method of \`` + t + "`."), r || (e = n(e)) && (r = `
|
|
426
426
|
|
|
427
427
|
Check the top-level render call using <` + e + ">."), r;
|
|
428
428
|
}
|
|
429
|
-
var _e =
|
|
430
|
-
|
|
431
|
-
var
|
|
432
|
-
|
|
433
|
-
return
|
|
434
|
-
},
|
|
435
|
-
return
|
|
429
|
+
var _e = Se, Y = Symbol.for("react.transitional.element"), he = Symbol.for("react.portal"), $ = Symbol.for("react.fragment"), K = Symbol.for("react.strict_mode"), I = Symbol.for("react.profiler"), Z = Symbol.for("react.consumer"), Q = Symbol.for("react.context"), M = Symbol.for("react.forward_ref"), V = Symbol.for("react.suspense"), W = Symbol.for("react.suspense_list"), U = Symbol.for("react.memo"), z = Symbol.for("react.lazy"), pe = Symbol.for("react.offscreen"), D = Symbol.iterator, Te = Symbol.for("react.client.reference"), j = _e.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE, ee = Object.prototype.hasOwnProperty, _ = Object.assign, ke = Symbol.for("react.client.reference"), q = Array.isArray, T = 0, re, te, oe, ne, ae, ue, se;
|
|
430
|
+
g.__reactDisabledLog = !0;
|
|
431
|
+
var J, le, G = !1, L = new (typeof WeakMap == "function" ? WeakMap : Map)(), Ce = Symbol.for("react.client.reference"), ie, ce = {}, fe = {}, de = {};
|
|
432
|
+
S.Fragment = $, S.jsx = function(e, r, t, a, c) {
|
|
433
|
+
return F(e, r, t, !1, a, c);
|
|
434
|
+
}, S.jsxs = function(e, r, t, a, c) {
|
|
435
|
+
return F(e, r, t, !0, a, c);
|
|
436
436
|
};
|
|
437
|
-
}()),
|
|
437
|
+
}()), S;
|
|
438
438
|
}
|
|
439
|
-
var
|
|
440
|
-
function
|
|
441
|
-
return
|
|
439
|
+
var me;
|
|
440
|
+
function Ue() {
|
|
441
|
+
return me || (me = 1, process.env.NODE_ENV === "production" ? A.exports = Ve() : A.exports = We()), A.exports;
|
|
442
442
|
}
|
|
443
|
-
var
|
|
444
|
-
const
|
|
445
|
-
function
|
|
446
|
-
const
|
|
447
|
-
if (!
|
|
443
|
+
var v = Ue();
|
|
444
|
+
const ge = Oe(null), Ge = (n) => /* @__PURE__ */ v.jsx(ge.Provider, { value: n.router, children: n.children });
|
|
445
|
+
function xe() {
|
|
446
|
+
const n = Ae(ge);
|
|
447
|
+
if (!n)
|
|
448
448
|
throw new Error(
|
|
449
449
|
"[useRouter] Router not found. Add RouterProvider in app root"
|
|
450
450
|
);
|
|
451
|
-
return
|
|
451
|
+
return n;
|
|
452
452
|
}
|
|
453
|
-
function
|
|
454
|
-
return
|
|
453
|
+
function Le() {
|
|
454
|
+
return B(xe());
|
|
455
455
|
}
|
|
456
|
-
const
|
|
457
|
-
const { to: l, params:
|
|
458
|
-
if (!
|
|
456
|
+
const Be = Ne((n, s) => {
|
|
457
|
+
const { to: l, params: g, onClick: i, ...E } = n, { mappedRoutes: m } = xe(), b = m.find(({ route: f }) => f === l), { onOpen: x } = B(l);
|
|
458
|
+
if (!b)
|
|
459
459
|
throw new Error(
|
|
460
460
|
`[Link] Route with path "${l.path}" not found. Maybe it is not passed into createRouter?`
|
|
461
461
|
);
|
|
462
|
-
return /* @__PURE__ */
|
|
462
|
+
return /* @__PURE__ */ v.jsx(
|
|
463
463
|
"a",
|
|
464
464
|
{
|
|
465
|
-
...
|
|
466
|
-
ref:
|
|
467
|
-
href:
|
|
468
|
-
onClick: (
|
|
469
|
-
|
|
465
|
+
...E,
|
|
466
|
+
ref: s,
|
|
467
|
+
href: b.build(g ?? void 0),
|
|
468
|
+
onClick: (f) => {
|
|
469
|
+
i == null || i(f), !f.defaultPrevented && (E.target && E.target !== "_self" || f.metaKey || f.altKey || f.ctrlKey || f.shiftKey || (f.preventDefault(), x({ params: g || {} })));
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
);
|
|
473
473
|
});
|
|
474
|
-
function
|
|
474
|
+
function Fe(n) {
|
|
475
475
|
return {
|
|
476
|
-
route:
|
|
476
|
+
route: n.route,
|
|
477
477
|
view: () => {
|
|
478
|
-
const { view:
|
|
479
|
-
return l ? /* @__PURE__ */
|
|
478
|
+
const { view: s, layout: l } = n;
|
|
479
|
+
return l ? /* @__PURE__ */ v.jsx(l, { children: /* @__PURE__ */ v.jsx(s, {}) }) : /* @__PURE__ */ v.jsx(s, {});
|
|
480
480
|
}
|
|
481
481
|
};
|
|
482
482
|
}
|
|
483
|
-
|
|
484
|
-
|
|
483
|
+
function ze(n, s) {
|
|
484
|
+
return s ? s.getState(n) : n.getState();
|
|
485
|
+
}
|
|
486
|
+
const He = (n) => {
|
|
487
|
+
const { routes: s, otherwise: l } = n;
|
|
485
488
|
return () => {
|
|
486
|
-
const
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
489
|
+
const g = Me(), i = B(s.map((b) => b.route.$isOpened)), m = Pe(() => {
|
|
490
|
+
const b = s.filter(
|
|
491
|
+
(x) => !!ze(x.route.$isOpened, g)
|
|
492
|
+
);
|
|
493
|
+
return b.reduce(
|
|
494
|
+
(x, f) => x.filter(
|
|
495
|
+
(N) => N.route !== f.route.parent
|
|
496
|
+
),
|
|
497
|
+
b
|
|
498
|
+
);
|
|
499
|
+
}, [i]).at(-1);
|
|
500
|
+
return m ? Ye(m.view) : l ? /* @__PURE__ */ v.jsx(l, {}) : null;
|
|
490
501
|
};
|
|
491
502
|
};
|
|
492
|
-
function
|
|
493
|
-
|
|
494
|
-
const
|
|
503
|
+
function Xe(n) {
|
|
504
|
+
n.route.internal.setAsyncImport(n.view);
|
|
505
|
+
const s = $e(n.view);
|
|
495
506
|
return {
|
|
496
|
-
route:
|
|
507
|
+
route: n.route,
|
|
497
508
|
view: () => {
|
|
498
|
-
const { layout: l, fallback:
|
|
499
|
-
return l ? /* @__PURE__ */
|
|
509
|
+
const { layout: l, fallback: g = () => /* @__PURE__ */ v.jsx(v.Fragment, {}) } = n;
|
|
510
|
+
return l ? /* @__PURE__ */ v.jsx(l, { children: /* @__PURE__ */ v.jsx(ve, { fallback: /* @__PURE__ */ v.jsx(g, {}), children: /* @__PURE__ */ v.jsx(s, {}) }) }) : /* @__PURE__ */ v.jsx(ve, { fallback: /* @__PURE__ */ v.jsx(g, {}), children: /* @__PURE__ */ v.jsx(s, {}) });
|
|
500
511
|
}
|
|
501
512
|
};
|
|
502
513
|
}
|
|
503
514
|
export {
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
515
|
+
Be as Link,
|
|
516
|
+
Ge as RouterProvider,
|
|
517
|
+
Xe as createLazyRouteView,
|
|
518
|
+
Fe as createRouteView,
|
|
519
|
+
He as createRoutesView,
|
|
520
|
+
Le as useRouter,
|
|
521
|
+
xe as useRouterContext
|
|
511
522
|
};
|
package/package.json
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
"registry": "https://registry.npmjs.org/"
|
|
6
6
|
},
|
|
7
7
|
"private": false,
|
|
8
|
-
"version": "0.8.
|
|
8
|
+
"version": "0.8.2",
|
|
9
9
|
"description": "React bindings for argon router",
|
|
10
10
|
"keywords": [
|
|
11
11
|
"effector",
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
"url": "https://github.com/movpushmov/argon-router/issues"
|
|
45
45
|
},
|
|
46
46
|
"dependencies": {
|
|
47
|
-
"@argon-router/core": "^0.8.
|
|
47
|
+
"@argon-router/core": "^0.8.2"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
50
|
"@babel/preset-react": "^7.26.3",
|
|
@@ -59,5 +59,5 @@
|
|
|
59
59
|
"effector-react": ">=23",
|
|
60
60
|
"react": "18 || 19"
|
|
61
61
|
},
|
|
62
|
-
"gitHead": "
|
|
62
|
+
"gitHead": "d28e62a131a7b70d6adb3662284b7fc8f1bd66c4"
|
|
63
63
|
}
|